:root {
  --bg: #10160f;
  --card: #1a221a;
  --line: #2c3a2c;
  --ink: #f2f0e4;
  --muted: #9aa58f;
  --lime: #c8f04b;
  --gold: #f5c542;
  --red: #ff6b6b;
  --font: system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: var(--font); background: var(--bg); color: var(--ink);
  min-height: 100vh; -webkit-tap-highlight-color: transparent;
}
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 400px at 15% 10%, rgba(200,240,75,.06), transparent 60%),
    radial-gradient(700px 500px at 85% 90%, rgba(245,197,66,.05), transparent 60%);
}
main { max-width: 720px; margin: 0 auto; padding: 20px 16px 60px; position: relative; }
.screen { display: none; animation: rise .35s ease-out; }
.screen.active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.hidden { display: none !important; }

/* ---------- start ---------- */
.hero { text-align: center; padding: 48px 12px 20px; }
.hero-badge { font-size: 4rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 800; color: var(--muted); margin: 14px 0 6px; }
.hero h1 { font-size: 3.2rem; margin: 0; letter-spacing: -.02em; }
.hero h1 em { font-style: normal; color: var(--lime); }
.tagline { color: var(--muted); font-size: 1.02rem; line-height: 1.6; max-width: 26em; margin: 12px auto 0; }
.tagline b { color: var(--ink); }
.rules { display: flex; flex-direction: column; gap: 8px; max-width: 340px; margin: 26px auto; }
.rule { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; font-weight: 700; font-size: .95rem; display: flex; gap: 10px; align-items: center; text-align: left; }
.rule span { font-size: 1.3rem; }
.btn {
  font-family: var(--font); font-weight: 900; font-size: 1rem; border: none; cursor: pointer;
  padding: 14px 28px; border-radius: 999px; background: var(--card); color: var(--ink);
  border: 1.5px solid var(--line); transition: transform .12s ease;
}
.btn:active { transform: scale(.96); }
.btn.primary { background: var(--lime); color: #1c2b12; border: none; }
.btn.big { font-size: 1.15rem; padding: 16px 40px; margin-top: 8px; }
.btn.next { background: var(--lime); color: #1c2b12; border: none; margin-top: 14px; }
.btn.ghost { background: transparent; }
.best { color: var(--gold); font-weight: 800; margin-top: 16px; min-height: 1.4em; }

/* ---------- game ---------- */
.game-top { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; }
.q-num { font-weight: 900; font-size: .95rem; }
.trail { display: flex; gap: 5px; flex: 1; min-width: 120px; }
.trail-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--line); transition: background .2s; }
.trail-dot.current { background: var(--gold); box-shadow: 0 0 8px rgba(245,197,66,.7); }
.trail-dot.done { background: var(--lime); }
.trail-dot.miss { background: var(--red); }
.hud-right { display: flex; gap: 8px; margin-left: auto; }
.timer, .score-pill { font-weight: 900; font-size: .9rem; background: var(--card); border: 1px solid var(--line); padding: 7px 14px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.timer { color: var(--gold); }
.prompt { font-size: 1.35rem; font-weight: 900; margin: 14px 2px 10px; letter-spacing: -.01em; }
.money-stage {
  background: radial-gradient(ellipse at 50% 40%, #243024 0%, var(--card) 75%);
  border: 1px solid var(--line); border-radius: 22px;
  min-height: 300px; padding: 28px 20px;
  display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: center; justify-content: center; align-content: center;
}
.money-item { display: flex; align-items: center; justify-content: center; filter: drop-shadow(0 6px 10px rgba(0,0,0,.45)); }
.coin { display: block; }
.bill { width: 168px; height: auto; display: block; }
.options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.option {
  font-family: var(--font); font-size: 1.35rem; font-weight: 900; color: var(--ink);
  background: var(--card); border: 2px solid var(--line); border-radius: 18px;
  padding: 18px 10px; cursor: pointer; transition: transform .12s ease, border-color .12s;
  font-variant-numeric: tabular-nums;
}
.option:active { transform: scale(.96); }
.option:not(:disabled):hover { border-color: var(--lime); }
.option.correct { border-color: var(--lime); background: rgba(200,240,75,.14); }
.option.wrong { border-color: var(--red); background: rgba(255,107,107,.12); }
.option.dim { opacity: .45; }
.option:disabled { cursor: default; }
.feedback { margin-top: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; animation: rise .25s ease-out; }
.fb-line { font-size: 1.12rem; font-weight: 800; }
.fb-check { margin-right: 6px; }
.fb-pts { color: var(--lime); margin-left: 8px; }
.fb-sub { color: var(--muted); font-weight: 700; margin-top: 6px; font-size: .92rem; }
.q-nav { text-align: center; }

/* ---------- results ---------- */
.results-card { text-align: center; padding: 36px 12px; }
.results-card h2 { margin: 0; font-size: 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
.final-score { font-size: 4.5rem; font-weight: 900; color: var(--lime); letter-spacing: -.03em; line-height: 1.1; }
.stat-row { display: flex; gap: 10px; justify-content: center; margin: 18px 0 6px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 18px; min-width: 104px; }
.stat b { display: block; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .78rem; font-weight: 700; }
.res-rows { max-width: 420px; margin: 20px auto; text-align: left; }
.res-row { display: grid; grid-template-columns: 44px 1fr 1fr 70px; gap: 8px; padding: 9px 14px; border-bottom: 1px solid var(--line); font-weight: 700; font-variant-numeric: tabular-nums; font-size: .95rem; }
.res-row.miss { color: var(--muted); }
.res-row span:last-child { text-align: right; color: var(--lime); }
.res-row.miss span:last-child { color: var(--muted); }
.res-actions { display: flex; gap: 10px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }
.res-actions .btn.big { margin-top: 0; }

@media (max-width: 480px) {
  .hero h1 { font-size: 2.6rem; }
  .money-stage { min-height: 240px; padding: 20px 12px; gap: 10px 12px; }
  .bill { width: 138px; }
  .option { font-size: 1.15rem; padding: 15px 8px; }
  .final-score { font-size: 3.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .screen, .feedback { animation: none; }
}
