/* Full-screen game shell (HUD, overlays, question card) used by the 3D games */
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; touch-action: none; }
body { display: flex; flex-direction: column; }
#stage { position: relative; flex: 1; overflow: hidden; }
#stage > canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.hud { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; gap: 8px; pointer-events: none; z-index: 5; }
.hud .box { background: rgba(7, 20, 40, .7); border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px; font-weight: 700; backdrop-filter: blur(6px); }
.hud .box small { display: block; font-size: .65rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.hud .score { font-size: 1.3rem; color: var(--brand); font-variant-numeric: tabular-nums; }
.hud-btn { pointer-events: auto; cursor: pointer; border: 1px solid var(--line); background: rgba(7, 20, 40, .7); color: var(--text); border-radius: 12px; width: 44px; font-size: 1.1rem; }

.qcard { position: absolute; left: 50%; top: 72px; transform: translate(-50%, -20px); width: min(560px, calc(100% - 20px)); z-index: 6;
  background: linear-gradient(180deg, rgba(18, 40, 76, .95), rgba(12, 31, 61, .95)); border: 2px solid var(--brand); border-radius: 18px; padding: 12px 14px;
  box-shadow: 0 10px 40px rgba(255, 183, 3, .25); opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none; text-align: center; }
.qcard.show { opacity: 1; transform: translate(-50%, 0); }
.qcard .tag { font-size: .72rem; color: var(--brand); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.qcard .q { font-size: 1.2rem; font-weight: 800; margin: 2px 0 6px; }
.qcard .lanes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.qcard .lane { font-size: .8rem; font-weight: 700; padding: 6px 4px; border-radius: 10px; background: var(--surface-2); min-height: 2.4em; display: grid; place-items: center; }
.qcard .lane.blocked { background: repeating-linear-gradient(45deg, #3a1f1f, #3a1f1f 6px, #2a1515 6px, #2a1515 12px); color: var(--bad); }
.qcard .timer { height: 4px; background: var(--surface-2); border-radius: 4px; margin-top: 8px; overflow: hidden; }
.qcard .timer i { display: block; height: 100%; background: var(--brand); width: 100%; }

.overlay { position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; padding: 16px; background: rgba(7, 20, 40, .78); backdrop-filter: blur(4px); overflow-y: auto; }
.overlay[hidden] { display: none; }
.panel { width: 100%; max-width: 520px; }
.hero-title { font-size: clamp(2.2rem, 9vw, 3.4rem); font-weight: 800; letter-spacing: -.02em; margin: 0;
  background: linear-gradient(90deg, var(--brand), #fb8500); -webkit-background-clip: text; background-clip: text; color: transparent; }
.big-score { font-size: 3rem; font-weight: 800; color: var(--brand); line-height: 1; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.stat-row div { background: var(--surface-2); border-radius: 12px; padding: 8px; }
.stat-row b { display: block; font-size: 1.2rem; }
.float { position: absolute; z-index: 7; font-weight: 800; font-size: 1.5rem; pointer-events: none; animation: floatUp 1s ease-out forwards; text-shadow: 0 2px 10px rgba(0, 0, 0, .6); transform: translateX(-50%); white-space: nowrap; }
@keyframes floatUp { to { margin-top: -80px; opacity: 0; } }
.flash { position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0; }
.how li { margin-bottom: 6px; }
.reward { display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); margin-bottom: 6px; font-size: .9rem; }
.reward.got { background: rgba(46, 204, 113, .15); color: var(--good); }
.loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); z-index: 1; }
