/* ── Theme ───────────────────────────────────────────────── */
:root {
  --bg: #0b0b1a;
  --bg2: #131331;
  --card: #1a1a3d;
  --card2: #22224d;
  --line: #2f2f66;
  --text: #f1f0ff;
  --muted: #a4a3c8;
  --cyan: #22d3ee;
  --pink: #f472b6;
  --gold: #fbbf24;
  --lime: #a3e635;
  --purple: #a78bfa;
  --red: #fb7185;
  --radius: 16px;
  --font-head: 'Fredoka', 'Trebuchet MS', system-ui, sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: radial-gradient(1200px 600px at 10% -10%, #2a1459 0%, transparent 60%),
              radial-gradient(900px 500px at 110% 10%, #0e3b58 0%, transparent 55%), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 16px/1.5 var(--font-body);
  min-height: 100vh;
}
a { color: var(--cyan); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .4em; }
kbd { background: #2c2c5a; border: 1px solid #45458a; border-bottom-width: 2px; border-radius: 5px; padding: 0 .35em; font: .85em var(--font-body); }
.muted { color: var(--muted); }
.small { font-size: .85em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── Buttons & pills ─────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  padding: .6em 1.1em; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card2); color: var(--text); font: 600 1em var(--font-body);
  text-decoration: none; cursor: pointer; transition: transform .12s, background .12s, box-shadow .12s;
}
.btn:hover { background: #2d2d63; transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .chip:focus-visible, .icon-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn.primary {
  background: linear-gradient(135deg, var(--pink), #8b5cf6 55%, var(--cyan)); border: 0; color: #fff;
  box-shadow: 0 6px 24px -6px #c026d3aa;
}
.btn.primary:hover { box-shadow: 0 8px 30px -4px #c026d3cc; }
.btn.big { font-size: 1.25em; padding: .7em 1.8em; }
.btn:disabled { opacity: .6; cursor: wait; }
.pill { display: inline-block; padding: .15em .7em; border-radius: 999px; font-size: .75em; font-weight: 700; background: var(--card2); border: 1px solid var(--line); vertical-align: middle; }
.pill.daily { background: #3b2a06; border-color: #a16207; color: var(--gold); }
.pill.new { background: #3a0d2a; border-color: #be185d; color: var(--pink); }
.pill.big { font-size: .95em; }

/* WhatsApp share buttons */
.btn.wa { background: #25d366; border-color: #25d366; color: #052e16; }
.btn.wa:hover { background: #1ebe5b; }
.wa-ico { width: 1.25em; height: 1.25em; flex: none; }

/* ── Site header / footer ────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(10px); background: #0b0b1acc; border-bottom: 1px solid #ffffff10; }
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font: 700 1.25em var(--font-head); }
.logo img { width: 34px; height: 34px; }
.site-nav { margin-left: auto; display: flex; gap: 4px; }
.site-nav a { color: var(--muted); text-decoration: none; padding: .45em .8em; border-radius: 999px; font-weight: 600; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--text); background: var(--card2); }
.site-footer { margin-top: 64px; border-top: 1px solid #ffffff10; padding: 28px 0 40px; color: var(--muted); font-size: .9em; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
.site-footer a { color: var(--muted); }
@media (max-width: 560px) { .logo span { display: none; } .site-nav a { padding: .45em .6em; } }

/* ── Home: hero ──────────────────────────────────────────── */
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; padding: 40px 0 24px; align-items: stretch; }
.hero-main h1 { font-size: clamp(2.1em, 5vw, 3.4em); }
.hero-main h1 .glow { background: linear-gradient(90deg, var(--cyan), var(--pink), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-main p { color: var(--muted); font-size: 1.1em; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.daily-card {
  position: relative; overflow: hidden; border-radius: var(--radius); padding: 22px;
  background: linear-gradient(160deg, #3b2a06, #1a1a3d 70%); border: 1px solid #a16207;
  display: flex; flex-direction: column; gap: 8px;
}
.daily-card .pill { align-self: flex-start; }
.daily-card h2 { font-size: 1.5em; margin: 0; }
.daily-card .countdown { font-variant-numeric: tabular-nums; color: var(--gold); font-weight: 700; }
.daily-card img { position: absolute; right: -10px; bottom: -10px; width: 130px; opacity: .9; transform: rotate(-8deg); }
.daily-card .btn { align-self: flex-start; margin-top: auto; }
.daily-top { font-size: .9em; color: var(--muted); }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; padding-top: 24px; } }

/* ── Ticker ──────────────────────────────────────────────── */
.ticker { display: flex; align-items: center; gap: 12px; background: #ffffff08; border: 1px solid #ffffff12; border-radius: 999px; padding: 8px 8px 8px 16px; overflow: hidden; margin: 8px 0 28px; }
.ticker-label { flex: none; font-weight: 700; color: var(--gold); font-size: .9em; }
.ticker-track { overflow: hidden; flex: 1; mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.ticker-items { display: inline-flex; gap: 32px; white-space: nowrap; animation: ticker 40s linear infinite; padding-left: 100%; }
.ticker-items span { color: var(--muted); font-size: .92em; }
.ticker-items b { color: var(--text); }
.ticker:hover .ticker-items { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .ticker-items { animation: none; padding-left: 0; } }

/* ── Sections ────────────────────────────────────────────── */
.section { margin: 36px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { font-size: 1.6em; margin: 0; }

.continue { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.continue img { width: 48px; height: 48px; border-radius: 12px; }
.continue .btn { margin-left: auto; }

/* ── Game cards ──────────────────────────────────────────── */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.game-card {
  --c: var(--cyan);
  position: relative; display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden;
  background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--text);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.game-card:hover, .game-card:focus-visible { transform: translateY(-4px); border-color: var(--c); box-shadow: 0 14px 40px -12px var(--c); outline: none; }
.game-card .thumb { aspect-ratio: 16/10; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--c) 30%, transparent), transparent 70%), #0f0f28; }
.game-card .thumb img { width: 46%; height: auto; transition: transform .3s; }
.game-card:hover .thumb img { transform: scale(1.1) rotate(-3deg); }
.game-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.game-card h3 { font-size: 1.35em; margin: 0; display: flex; align-items: center; gap: 8px; }
.game-card p { margin: 0; color: var(--muted); font-size: .93em; }
.game-card .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: auto; padding-top: 8px; font-size: .85em; color: var(--muted); }
.game-card .meta b { color: var(--text); }
.game-card .play-cta { position: absolute; top: 12px; right: 12px; background: var(--c); color: #0b0b1a; font-weight: 800; border-radius: 999px; padding: .25em .8em; font-size: .85em; opacity: 0; transform: translateY(-4px); transition: .18s; }
.game-card:hover .play-cta { opacity: 1; transform: none; }
.game-card.soon { opacity: .55; pointer-events: none; border-style: dashed; }

/* ── Badges ──────────────────────────────────────────────── */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.badge { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-size: .85em; }
.badge .ico { font-size: 1.6em; filter: grayscale(1) opacity(.35); }
.badge b { display: block; font-size: 1.05em; }
.badge small { color: var(--muted); line-height: 1.25; display: block; }
.badge.got { border-color: #a16207; background: linear-gradient(160deg, #2b1f05, var(--card)); }
.badge.got .ico { filter: none; }
.badge-group { margin-bottom: 18px; }
.badge-group h3 { font-size: 1.05em; color: var(--muted); margin-bottom: 8px; }
.progress-count { color: var(--gold); font-weight: 700; }

/* ── How it works strip ──────────────────────────────────── */
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.how-grid div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.how-grid b { font-family: var(--font-head); font-size: 1.15em; display: block; margin-bottom: 4px; }
.how-grid p { margin: 0; color: var(--muted); font-size: .92em; }

/* ── Leaderboard page ────────────────────────────────────── */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.tab { padding: .5em 1em; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--muted); font: 600 .95em var(--font-body); cursor: pointer; }
.tab[aria-selected="true"] { background: var(--card2); color: var(--text); border-color: var(--c, var(--cyan)); box-shadow: inset 0 0 0 1px var(--c, var(--cyan)); }
.board { width: 100%; border-collapse: separate; border-spacing: 0 6px; margin-top: 8px; }
.board th { text-align: left; color: var(--muted); font-size: .8em; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding: 0 14px; }
.board td { background: var(--card); padding: 12px 14px; }
.board td:first-child { border-radius: 12px 0 0 12px; width: 64px; font-weight: 800; font-family: var(--font-head); font-size: 1.15em; }
.board td:last-child { border-radius: 0 12px 12px 0; }
.board td.num { text-align: right; font-variant-numeric: tabular-nums; }
.board th.num { text-align: right; }
.board .score { font-weight: 800; font-size: 1.1em; }
.board tr.me td { background: #2b1f05; box-shadow: inset 0 1px 0 #a16207, inset 0 -1px 0 #a16207; }
.board tr.me td:first-child { box-shadow: inset 1px 0 0 #a16207, inset 0 1px 0 #a16207, inset 0 -1px 0 #a16207; }
.board tr.me td:last-child { box-shadow: inset -1px 0 0 #a16207, inset 0 1px 0 #a16207, inset 0 -1px 0 #a16207; }
.board-empty { text-align: center; padding: 48px 16px; background: var(--card); border-radius: var(--radius); color: var(--muted); }
.board-note { font-size: .88em; color: var(--muted); margin-top: 16px; }
@media (max-width: 560px) { .board .hide-sm { display: none; } .board td { padding: 10px; } }

/* ── Prose pages ─────────────────────────────────────────── */
.prose { max-width: 720px; }
.prose h1 { font-size: 2.4em; margin-top: 32px; }
.prose h2 { margin-top: 1.6em; }
.prose p, .prose li { color: #d6d5f0; }
