:root{--bg:#0f1724;--card:#0b1b2a;--accent:#ffd166;--accent-2:#60a5fa;--muted:#9fb0c1}
*{box-sizing:border-box}body{margin:0;min-height:100vh;background:linear-gradient(180deg,#071427 0%,#0f1f2b 60%);font-family:Inter,system-ui,Segoe UI,Roboto,'Trebuchet MS',sans-serif;color:#e6f0f6;display:grid;place-items:center;padding:24px}
.app{width:min(920px,95%);}
.top{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}
.top h1{font-size:22px;margin:0}
.score-group{display:flex;align-items:center;gap:10px}
.score{font-weight:800;background:linear-gradient(90deg,var(--accent),#ffd88a);color:#07202a;padding:10px 14px;border-radius:12px;box-shadow:0 6px 18px #0008}
.high-score{font-weight:800;color:var(--muted);padding:10px 0}
.level-picker{width:min(420px,100%);display:grid;gap:6px;margin:0 0 14px;color:var(--muted);font-size:12px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}
.level-picker select{width:100%;min-height:48px;padding:10px 38px 10px 13px;border:2px solid rgba(255,255,255,.14);border-radius:12px;color:#e6f0f6;background:#08293a;font-family:inherit;font-size:15px;font-weight:800;letter-spacing:0;text-transform:none;cursor:pointer}
.level-picker select:focus-visible{outline:3px solid var(--accent-2);outline-offset:3px}
.question-area{display:flex;flex-direction:column;gap:10px;margin-bottom:18px}
.question-box{background:linear-gradient(180deg,#072231 0%,#08293a 100%);padding:18px;border-radius:14px;border:1px solid rgba(255,255,255,0.04);display:flex;align-items:center;justify-content:space-between;gap:12px}
#question{font-size:20px;max-width:78%}
.hint{background:transparent;border:2px dashed rgba(255,255,255,0.08);color:var(--accent);padding:10px 12px;border-radius:10px;font-weight:700;cursor:pointer}
.hint-box{min-height:28px;color:var(--muted);padding:8px 4px}
.wheel-area{display:flex;flex-direction:column;align-items:center;gap:12px}
#wheel{max-width:100%;height:auto;touch-action:manipulation}
.slice-text{font-weight:800;fill:#07202a;pointer-events:none}
.slice{cursor:pointer}
.slice:focus{outline:none;filter:brightness(1.12);stroke:#67e8f9;stroke-width:7px}
.message{min-height:26px;font-weight:800}
.controls{display:flex;justify-content:space-between;align-items:center;margin-top:10px}
.btn{background:var(--accent-2);color:#042033;border:none;padding:10px 14px;border-radius:10px;font-weight:800;cursor:pointer}
.hidden{display:none}
.meta{color:var(--muted);font-size:13px}

/* small screens */
@media(max-width:520px){body{padding:12px}.score-group{gap:6px}.score,.high-score{font-size:13px}.score{padding:8px 10px}.level-picker{margin-bottom:10px}#question{font-size:18px}#wheel{width:300px}}
@media(max-width:520px) and (max-height:650px){body.site-page .app{padding-block:8px}.top{margin-bottom:8px}.level-picker{margin-bottom:6px}.level-picker select{min-height:44px;padding-block:7px}.question-area{gap:4px;margin-bottom:8px}.question-box{padding:10px}.hint-box{min-height:20px;padding:3px 4px}#wheel{width:220px}.controls{margin-top:4px}.meta{font-size:11px}}

/* Animations */
@keyframes pop {
  0%{transform:scale(1)}
  50%{transform:scale(1.08)}
  100%{transform:scale(1)}
}
@keyframes glow {
  0%{box-shadow:0 0 0px rgba(255,217,102,0)}
  50%{box-shadow:0 8px 30px rgba(255,217,102,0.35)}
  100%{box-shadow:0 0 0px rgba(255,217,102,0)}
}
@keyframes spinSmall {
  from{transform:rotate(0deg)}
  to{transform:rotate(12deg)}
}
.slice:hover{transform:scale(1.02);filter:brightness(1.03)}
.correct{animation:pop .35s ease, glow .9s ease}
.incorrect{animation:transform .18s ease}
.spin{animation:spinSmall .45s ease}
@media(prefers-reduced-motion:reduce){.slice{transition:none!important}.correct,.spin{animation:none!important}}

/* subtle confetti-like burst pseudo elements for message */
.message.correct{color:var(--accent);}
.message.wrong{color:#ff7b7b}

body.site-page{height:100dvh;min-height:100dvh;padding:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto;place-items:stretch;overflow:hidden}
body.site-page .app{margin:auto;width:min(920px,95%);padding-block:24px}

/* The wheel and HUD define the stage height; do not clip them into a viewport-sized grid row. */
body.site-page.with-game-info{grid-template-rows:auto auto auto auto auto!important;align-content:start}
body.site-page.with-game-info .app{width:min(920px,calc(100% - 32px));padding-block:clamp(18px,4vw,32px)}
body.site-page.with-game-info #wheel{width:min(400px,calc(100vw - 32px));height:auto;flex:0 0 auto}
body.site-page.with-game-info .wheel-area{min-height:0}
@media(max-width:639px){body.site-page.with-game-info .app{width:calc(100% - 24px);padding-block:16px}body.site-page.with-game-info #wheel{width:min(300px,calc(100vw - 24px))}.top{align-items:flex-start;gap:12px;flex-direction:column-reverse}.score-group{width:100%;justify-content:space-between}.question-area{margin-bottom:10px}.message{min-height:22px}.controls{margin-bottom:4px}}
