:root {
  --bg: #0b0a12;
  --bg2: #15121f;
  --panel: #1d1830;
  --panel2: #271f3f;
  --magenta: #ff2d78;
  --magenta-d: #c70e57;
  --gold: #ffd23f;
  --green: #2bd576;
  --red: #ff4d4d;
  --ink: #f6f3ff;
  --muted: #a99fc6;
  --line: #36304f;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --r: 16px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(1200px 800px at 50% -10%, #241a3a 0%, var(--bg) 60%);
  color: var(--ink);
  font-family: ui-rounded, "Segoe UI", Roboto, system-ui, -apple-system, sans-serif;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3 { margin: 0; line-height: 1.05; letter-spacing: -0.02em; }

.brand {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 0.9;
}
.brand .a { color: var(--gold); }
.brand .b { color: var(--magenta); }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.06s ease, filter 0.15s ease, background 0.15s ease;
}
button:active { transform: translateY(1px) scale(0.99); }
button:disabled { opacity: 0.45; cursor: not-allowed; }

.btn {
  background: var(--panel2);
  color: var(--ink);
  padding: 0.8rem 1.4rem;
  font-size: 1rem;
  border: 1px solid var(--line);
}
.btn.primary { background: linear-gradient(180deg, var(--magenta), var(--magenta-d)); border: none; }
.btn.gold { background: linear-gradient(180deg, #ffe07a, var(--gold)); color: #2a1d00; border: none; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); }

.card {
  background: linear-gradient(180deg, var(--panel), var(--bg2));
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}

.muted { color: var(--muted); }
.center { text-align: center; }
.hidden { display: none !important; }

/* ---------- timer bar ---------- */
.timer { height: 10px; border-radius: 999px; background: var(--panel2); overflow: hidden; }
.timer > i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--magenta));
  width: 100%; transform-origin: left center;
}

/* ---------- options ---------- */
.options { display: grid; gap: 0.8rem; }
.opt {
  display: flex; align-items: center; gap: 0.9rem;
  text-align: left; width: 100%;
  background: var(--panel2);
  border: 2px solid var(--line);
  color: var(--ink);
  padding: 1rem 1.1rem;
  border-radius: 14px;
  font-size: 1.05rem; font-weight: 700;
}
.opt .key {
  flex: none; width: 2.1rem; height: 2.1rem; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--magenta); color: #fff; font-weight: 900;
}
.opt.correct { border-color: var(--green); background: rgba(43, 213, 118, 0.16); }
.opt.correct .key { background: var(--green); color: #043618; }
.opt.wrong { border-color: var(--red); background: rgba(255, 77, 77, 0.14); }
.opt.wrong .key { background: var(--red); }
.opt.pick { outline: 3px solid var(--gold); }

/* ---------- scoreboard ---------- */
.scores { display: grid; gap: 0.6rem; }
.score-row {
  display: flex; align-items: center; gap: 0.7rem;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 0.6rem 0.8rem;
}
.score-row .nm { font-weight: 800; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-row .pts { font-weight: 900; font-size: 1.3rem; color: var(--gold); min-width: 2.6ch; text-align: right; }
.score-row .tag { font-size: 0.7rem; color: var(--muted); }
.score-row.active { border-color: var(--magenta); box-shadow: 0 0 0 2px rgba(255, 45, 120, 0.35) inset; }
.score-row.buzzed { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(255, 210, 63, 0.4) inset; }
.score-row.elim { opacity: 0.4; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.on { background: var(--green); }
.dot.bot { background: var(--gold); }

.pill {
  display: inline-block; padding: 0.25rem 0.7rem; border-radius: 999px;
  font-size: 0.8rem; font-weight: 800; background: var(--panel2); color: var(--muted);
}
.pill.live { background: var(--magenta); color: #fff; }

@keyframes pop { 0% { transform: scale(0.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.pop { animation: pop 0.25s ease; }
@keyframes pulse { 50% { filter: brightness(1.25); } }
