:root {
  --bg: #120f1f;
  --bg-top: #1b1533;
  --surface: #201b33;
  --surface-variant: #2a2440;
  --on-bg: #f6f4ff;
  --muted: #c7c2e4;
  --accent: #2ee6c3;
  --on-accent: #00251c;
  --team-a: #48b5ff;
  --team-b: #ff6fa0;
  --strike: #ff5a6e;
  --correct: #3fd98b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: radial-gradient(120% 80% at 50% 0%, var(--bg-top), var(--bg));
  color: var(--on-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

#app {
  min-height: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.wordmark {
  font-family: "Lilita One", sans-serif;
  text-align: center;
  line-height: 1;
}
.wordmark .couch { display: block; font-size: 20px; letter-spacing: 4px; color: var(--on-bg); }
.wordmark .showdown { display: block; font-size: 40px; color: var(--accent); }

h1 { font-family: "Lilita One", sans-serif; font-weight: 400; font-size: 30px; text-align: center; }
.muted { color: var(--muted); text-align: center; font-size: 16px; line-height: 1.5; }
.big { font-size: 22px; }

.card {
  background: var(--surface);
  border-radius: 20px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

label { font-size: 14px; color: var(--muted); }

input[type="text"] {
  width: 100%;
  font-size: 22px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 2px solid var(--surface-variant);
  background: var(--bg);
  color: var(--on-bg);
  outline: none;
}
input[type="text"]:focus { border-color: var(--accent); }
input.code { text-transform: uppercase; letter-spacing: 6px; text-align: center; font-family: "Lilita One", sans-serif; }

button {
  width: 100%;
  font-family: "Lilita One", sans-serif;
  font-size: 22px;
  padding: 18px;
  border: none;
  border-radius: 50px;
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
  transition: transform 0.08s ease, filter 0.08s ease;
}
button:active { transform: scale(0.97); }
button:disabled { background: var(--surface-variant); color: var(--muted); }
button.secondary { background: var(--surface-variant); color: var(--on-bg); }

.badge {
  display: inline-block;
  align-self: center;
  padding: 8px 20px;
  border-radius: 50px;
  font-family: "Lilita One", sans-serif;
  font-size: 18px;
}
.badge.team-a { background: var(--team-a); color: var(--on-accent); }
.badge.team-b { background: var(--team-b); color: var(--on-accent); }

.question {
  background: var(--surface);
  border-radius: 18px;
  padding: 20px;
  text-align: center;
  font-size: 22px;
  font-weight: 600;
}

.spinner {
  width: 46px; height: 46px;
  border: 4px solid var(--surface-variant);
  border-top-color: var(--accent);
  border-radius: 50%;
  align-self: center;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.scoreline { display: flex; justify-content: center; gap: 18px; font-family: "Lilita One", sans-serif; font-size: 18px; }
.scoreline .a { color: var(--team-a); }
.scoreline .b { color: var(--team-b); }

.feedback { text-align: center; min-height: 24px; font-size: 18px; font-weight: 600; }
.feedback.correct { color: var(--correct); }
.feedback.strike { color: var(--strike); }

.error { color: var(--strike); text-align: center; }

.countdown {
  align-self: center;
  font-family: "Lilita One", sans-serif;
  font-size: 56px;
  line-height: 1;
  color: var(--accent);
  margin: 4px 0;
  transition: color 0.2s ease;
}
.countdown.low { color: var(--strike); }
