/* OLPW:css/refreshment.css | styles for refreshment */
:root { --bg: #14110F; --surface: #1E1A17; --surface-light: #29231F; --field: #14110F; --text-main: #EDE3D9; --text-strong: #FFFFFF; --text-muted: #A89788; --border: #3A2F28; --accent: #F97316; --good: #2563eb; --bad: #DC2626; }
html[data-theme="light"] { --field: #FFFBF6; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text-main); min-height: 100vh; padding-bottom: 90px; }
h1, h2, h3 { font-family: 'Space Grotesk', sans-serif; color: var(--text-strong); }
.wrap { max-width: 980px; margin: 0 auto; padding: 32px 20px; }
.head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.head img { width: 44px; height: 44px; border-radius: 50%; }
.head h1 { font-size: 30px; }
.sub { color: var(--text-muted); margin-bottom: 22px; line-height: 1.5; }
.btn { padding: 10px 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-light); color: var(--text-main); font: 600 14px 'Inter', sans-serif; cursor: pointer; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(0.95); color: #fff; }
.btn.on { border-color: var(--accent); color: var(--accent); }
.btn:disabled { opacity: .5; cursor: default; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.muted { color: var(--text-muted); font-size: 14px; }
.box { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 22px; box-shadow: 0 12px 30px rgba(120, 72, 30, 0.08); }
.section-title { font-size: 20px; margin: 28px 0 12px; }

/* Break timer */
.timer { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; }
.ring { width: 132px; height: 132px; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; }
.ring .bg { stroke: var(--surface-light); }
.ring .fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .9s linear; }
.ring .time { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 700 28px 'Space Grotesk', sans-serif; color: var(--text-strong); }
.timer h2 { font-size: 22px; margin-bottom: 4px; }
.timer .muted { margin-bottom: 14px; }
.tip { margin-top: 12px; font-size: 13px; color: var(--text-muted); font-style: italic; }

/* Big game cards */
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.game { display: block; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px; transition: transform .15s, border-color .15s; }
.game:hover { transform: translateY(-3px); border-color: var(--accent); }
.game .ico { font-size: 30px; margin-bottom: 8px; }
.game b { display: block; font: 700 17px 'Space Grotesk', sans-serif; color: var(--text-strong); margin-bottom: 4px; }
.game span { font-size: 13px; color: var(--text-muted); line-height: 1.45; }

/* Quick activities */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tabs button { padding: 10px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-main); font: 600 14px 'Inter', sans-serif; cursor: pointer; }
.tabs button:hover { border-color: var(--accent); color: var(--accent); }
.tabs button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.panel { display: none; }
.panel.on { display: block; }
.panel h2 { font-size: 22px; margin-bottom: 6px; }
.panel .hint { color: var(--text-muted); font-size: 14px; margin-bottom: 18px; line-height: 1.5; }
.stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.stat { background: var(--surface-light); border: 1px solid var(--border); border-radius: 12px; padding: 8px 14px; min-width: 90px; }
.stat small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--text-muted); font-weight: 600; }
.stat b { font: 700 20px 'Space Grotesk', sans-serif; color: var(--text-strong); }

/* Breathing */
.breathe { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 10px 0; }
.bstage { width: 240px; height: 240px; display: flex; align-items: center; justify-content: center; position: relative; }
.bcircle { width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FDBA74, var(--accent) 60%, #C2410C); transform: scale(.55); transition: transform 4s ease-in-out; box-shadow: 0 0 60px rgba(249, 115, 22, .35); }
.blabel { position: absolute; text-align: center; color: #fff; font: 700 20px 'Space Grotesk', sans-serif; text-shadow: 0 1px 6px rgba(0,0,0,.35); pointer-events: none; }
.blabel small { display: block; font: 600 30px 'Space Grotesk', sans-serif; }

/* Reaction */
.react { height: 260px; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; cursor: pointer; user-select: none; font: 700 26px 'Space Grotesk', sans-serif; color: #fff; background: #2563EB; transition: background .1s; padding: 20px; }
.react small { font: 500 15px 'Inter', sans-serif; opacity: .9; margin-top: 8px; }
.react.wait { background: var(--bad); }
.react.go { background: var(--good); }

/* Tic-tac-toe */
.ttt { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: min(320px, 100%); margin: 6px 0 14px; }
.ttt button { aspect-ratio: 1; border-radius: 14px; border: 1px solid var(--border); background: var(--field); font: 700 46px 'Space Grotesk', sans-serif; cursor: pointer; color: var(--text-strong); }
.ttt button.x { color: var(--accent); }
.ttt button.o { color: #3B82F6; }
.ttt button.win { background: color-mix(in srgb, var(--good) 22%, var(--field)); }
.ttt button:disabled { cursor: default; }
.msg { font-weight: 700; color: var(--text-strong); min-height: 24px; margin-bottom: 10px; }

/* 2048 */
.g2048 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: min(360px, 100%); padding: 8px; border-radius: 14px; background: #8f7a66; touch-action: none; margin-bottom: 14px; position: relative; }
.tile { aspect-ratio: 1; border-radius: 8px; display: flex; align-items: center; justify-content: center; font: 700 28px 'Space Grotesk', sans-serif; background: rgba(238, 228, 218, .35); color: #776e65; }
.tile.pop { animation: pop .18s ease-out; }
@keyframes pop { from { transform: scale(.5); } to { transform: scale(1); } }
.over2048 { position: absolute; inset: 0; border-radius: 14px; background: rgba(255, 248, 241, .75); display: none; flex-direction: column; align-items: center; justify-content: center; gap: 10px; font: 700 26px 'Space Grotesk', sans-serif; color: #2B1D12; }
.over2048.on { display: flex; }

/* Quick maths */
.qm-q { font: 700 44px 'Space Grotesk', sans-serif; color: var(--text-strong); margin: 8px 0 14px; min-height: 56px; }
.qm-in { font: 600 24px 'Space Grotesk', sans-serif; width: 180px; padding: 10px 14px; border-radius: 12px; border: 2px solid var(--border); background: var(--field); color: var(--text-strong); outline: none; }
.qm-in:focus { border-color: var(--accent); }
.qm-in.bad { border-color: var(--bad); animation: shake .25s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.bar { height: 8px; border-radius: 99px; background: var(--surface-light); overflow: hidden; margin: 14px 0; max-width: 420px; }
.bar i { display: block; height: 100%; background: var(--accent); width: 100%; transition: width .2s linear; }

.toast { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%) translateY(20px); background: #222; color: #fff; padding: 12px 20px; border-radius: 10px; font-weight: 600; font-size: 14px; opacity: 0; transition: .25s; pointer-events: none; z-index: 60; }
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 640px) {
    .wrap { padding: 22px 14px; }
    .head h1 { font-size: 24px; }
    .timer { grid-template-columns: 1fr; justify-items: center; text-align: center; }
    .timer .row { justify-content: center; }
    .box { padding: 18px 14px; }
    .qm-q { font-size: 36px; }
}
