:root {
  --bg: #0e0f13; --panel: #171a21; --line: #262b36;
  --text: #e8eaf0; --muted: #9aa3b2; --accent: #4c8dff; --good: #3fb96b;
}
* { box-sizing: border-box; margin: 0; }
body { background: var(--bg); color: var(--text); font-family: -apple-system, "Segoe UI", Roboto, sans-serif; min-height: 100vh; }
#topbar { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
#brand { font-weight: 700; letter-spacing: 0.4px; }
main { max-width: 560px; margin: 0 auto; padding: 28px 18px 60px; }
.screen { display: none; }
.screen.active { display: block; }
h1 { font-size: 1.9rem; line-height: 1.25; margin: 18px 0 12px; }
h2 { font-size: 1.3rem; margin: 26px 0 10px; }
h3 { font-size: 1.05rem; margin: 22px 0 8px; }
.sub { color: var(--muted); line-height: 1.5; margin-bottom: 18px; }
.muted { color: var(--muted); font-size: 0.92rem; }
.error { color: #ff6b6b; font-size: 0.9rem; margin-top: 8px; }
.hidden { display: none !important; }
#signup-box { display: flex; flex-direction: column; gap: 10px; margin: 20px 0 28px; }
input[type=email] { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; color: var(--text); padding: 14px; font-size: 1rem; width: 100%; }
.btn { border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 10px; padding: 12px 18px; font-size: 1rem; cursor: pointer; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.big { padding: 15px; font-size: 1.05rem; }
.btn:active { transform: scale(0.98); }
#how { border-top: 1px solid var(--line); padding-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.how-row { color: var(--muted); display: flex; gap: 12px; align-items: baseline; line-height: 1.45; }
.how-n { background: var(--panel); border: 1px solid var(--line); color: var(--accent); border-radius: 50%; min-width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 700; }
.prompt-box { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; font-family: ui-monospace, monospace; font-size: 0.85rem; line-height: 1.5; word-break: break-all; color: var(--text); margin-bottom: 12px; }
.chip { display: inline-block; background: var(--panel); border: 1px solid var(--line); color: var(--accent); border-radius: 999px; padding: 3px 12px; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.countdown { color: var(--accent); font-weight: 600; margin-top: 6px; }
.sealed { background: var(--panel); border: 1px dashed var(--line); border-radius: 10px; padding: 16px; color: var(--muted); text-align: center; }
#board-wrap { margin-top: 34px; border-top: 1px solid var(--line); padding-top: 8px; }
.board-row { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; }
.board-row.me { border-color: var(--accent); }
.board-rank { font-weight: 800; font-size: 1.1rem; min-width: 34px; color: var(--accent); }
.board-team { flex: 1; }
.board-team .stack { color: var(--muted); font-size: 0.85rem; }
.board-score { text-align: right; font-size: 0.9rem; color: var(--muted); }
.board-score b { color: var(--text); font-size: 1rem; }
.activity-row { display: flex; justify-content: space-between; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--line); font-size: 0.9rem; color: var(--muted); }
.activity-row b { color: var(--text); font-weight: 600; }
footer { text-align: center; padding: 20px; border-top: 1px solid var(--line); }

/* Live leaderboard */
.live-line { color: var(--good); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.4px; margin-bottom: 10px; }
.status-correct { color: var(--good); }
.status-wrong { color: #ff6b6b; }
.status-judging { color: var(--muted); }
