:root {
  --bg: #0f172a;
  --panel: #1e293b;
  --line: #334155;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --live: #22c55e;
  --warn: #f59e0b;
  --dead: #ef4444;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--panel);
}
.topbar .brand { font-weight: 700; letter-spacing: -.02em; }
.topbar .right { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 14px; }
button {
  background: var(--accent); color: #04263a; border: 0; border-radius: 8px;
  padding: 8px 14px; font-weight: 600; cursor: pointer;
}
button.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
button:disabled { opacity: .45; cursor: not-allowed; }
.wrap { max-width: 760px; margin: 0 auto; padding: 24px 20px; }

/* login */
.login-card {
  max-width: 360px; margin: 12vh auto; background: var(--panel);
  border: 1px solid var(--line); border-radius: 16px; padding: 28px;
}
.login-card h1 { margin: 0 0 18px; font-size: 22px; }
.login-card input {
  width: 100%; margin-bottom: 12px; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: #0b1220; color: var(--text);
}
.error { color: var(--dead); font-size: 14px; min-height: 18px; }

/* match picker */
.match-list { list-style: none; padding: 0; margin: 14px 0 0; }
.match-list li {
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  margin-bottom: 8px; cursor: pointer; display: flex; justify-content: space-between;
}
.match-list li:hover { border-color: var(--accent); }
.match-list .score { color: var(--muted); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }

/* scoreboard */
.status-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot-live { background: var(--live); }
.dot-recon { background: var(--warn); }
.dot-dead { background: var(--dead); }
.board { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 28px; margin-top: 14px; }
.players { display: flex; justify-content: space-between; align-items: center; font-size: 22px; font-weight: 700; }
.players .vs { color: var(--muted); font-weight: 400; font-size: 15px; }
.sets { text-align: center; font-size: 40px; font-weight: 800; margin: 18px 0; font-variant-numeric: tabular-nums; }
.ball {
  text-align: center; font-size: 30px; font-weight: 700; padding: 14px;
  border: 1px solid var(--line); border-radius: 12px; background: #0b1220;
  font-variant-numeric: tabular-nums;
}
.meta { margin-top: 16px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.meta b { color: var(--text); font-weight: 600; }
.actions { margin-top: 18px; }
.swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; vertical-align: middle; border: 1px solid #0006; }
