/* Capital Cities Quiz — Playnesta original (MIT). */
* { box-sizing: border-box; }
:root {
  --bg: #0f1724;
  --panel: #182433;
  --panel-2: #1f2d3f;
  --ink: #eaf2f8;
  --muted: #93a8ba;
  --accent: #55d6a8;
  --wrong: #ff6b6b;
  --correct: #55d6a8;
  --key: #223140;
  --pn-vh: 1vh;
}
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overscroll-behavior: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
#app { height: 100vh; height: calc(var(--pn-vh, 1vh) * 100); display: flex; flex-direction: column; padding: 12px; gap: 10px; }
.topbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.brand { font-size: 18px; font-weight: 700; }
.brand small { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 6px; text-transform: lowercase; }


.hud { display: flex; align-items: center; gap: 6px; background: var(--panel); padding: 6px 12px; border-radius: 8px; font-size: 14px; }
.hud b { color: var(--accent); }


.tier { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; text-align: center; }
.prompt { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; font-size: clamp(18px, 4.5vw, 26px); font-weight: 700; text-align: center; padding: 0 4px; }
.bar { height: 8px; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.fill { height: 100%; width: 100%; background: var(--accent); transition: width 0.1s linear; }
.fill.low { background: var(--wrong); }
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: start; }
.opt-btn { background: var(--panel-2); font: inherit; color: var(--ink); border: 2px solid transparent; border-radius: 10px; padding: 14px; font-size: 16px; font-weight: 600; cursor: pointer; transition: transform 0.1s, border-color 0.15s, background 0.15s; text-align: left; min-height: 44px; }
.opt-btn:hover { border-color: var(--accent); }
.opt-btn:active { transform: scale(0.98); }
.opt-btn.correct { background: rgba(85,214,168,0.2); border-color: var(--correct); color: var(--correct); }
.opt-btn.wrong { background: rgba(255,107,107,0.2); border-color: var(--wrong); color: var(--wrong); }
.opt-btn:disabled { cursor: default; opacity: 0.85; }


.btn { background: var(--key); color: var(--ink); border: none; border-radius: 8px; padding: 10px 14px; min-height: 44px; font-size: 14px; font-weight: 600; cursor: pointer; }
.btn.primary { background: var(--accent); color: #0f1724; }
.btn:hover { filter: brightness(1.15); }
.quiz { flex: 1; display: flex; flex-direction: column; gap: 14px; min-height: 0; background: var(--panel); border-radius: 12px; padding: 16px; }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.overlay.hidden { display: none; }
.panel { background: var(--panel); border-radius: 16px; padding: 24px; max-width: 420px; width: 100%; }
.panel h2 { margin: 0 0 8px; }
.panel p { color: var(--muted); margin: 0 0 16px; }
.panel-wide { max-width: 520px; }
.rules-list { margin: 0 0 16px; padding-left: 18px; color: var(--ink); font-size: 14px; line-height: 1.55; }
.rules-list li { margin-bottom: 8px; }
.controls { display: flex; gap: 10px; justify-content: center; }
@media (max-width: 520px) {
  .options { grid-template-columns: 1fr; }
  .title { font-size: 16px; }
}
@media (max-height: 480px) {
  .prompt { font-size: 18px; }
}
