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

:root {
  --bg: #0b0f1a;
  --surface: #161c2b;
  --surface-2: #1f2738;
  --border: #2d3650;
  --border-light: #3b4660;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --a: #f59e0b;
  --a-light: #fbbf24;
  --a-dark: #b45309;
  --b: #38bdf8;
  --b-light: #7dd3fc;
  --b-dark: #0284c7;
  --primary: #6366f1;
  --primary-light: #818cf8;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
}

/* ── Top Bar ── */
.top-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.back-link {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.back-link:hover { color: var(--text); }

.level-pill {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--a-light);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

/* ── Header ── */
.game-header {
  text-align: center;
  padding: 2rem 1.5rem 1rem;
}

.game-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  background: linear-gradient(135deg, #f1f5f9 0%, var(--a-light) 60%, var(--b-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.game-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0.6rem auto 0;
  line-height: 1.65;
}

/* ── Main ── */
.game-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 1rem 1.5rem 3rem;
}

/* ── Debate Stage ── */
.debate-stage {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 2rem 1.75rem;
  animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.category-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary-light);
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.debate-question {
  font-size: clamp(1.35rem, 3.5vw, 2rem);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 1.75rem;
  text-align: center;
  color: var(--text);
}

/* ── Vote Buttons ── */
.vote-buttons {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.85rem;
  align-items: stretch;
}

.vote-btn {
  background: var(--surface-2);
  border: 2px solid var(--border-light);
  border-radius: 1rem;
  padding: 1.5rem 1rem;
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.2s ease;
  min-height: 150px;
  justify-content: center;
}

.vote-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.vote-btn--a:hover {
  border-color: var(--a);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), var(--surface-2));
}

.vote-btn--b:hover {
  border-color: var(--b);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), var(--surface-2));
}

.vote-btn:active {
  transform: translateY(-1px);
}

.vote-btn__emoji {
  font-size: 2.6rem;
  line-height: 1;
}

.vote-btn__label {
  font-size: 0.95rem;
  text-align: center;
  line-height: 1.35;
}

.vote-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0 0.2rem;
}

/* ── Results ── */
.results-panel {
  animation: fadeIn 0.35s ease;
}

.your-choice {
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  background: var(--surface-2);
  border-radius: 0.75rem;
  border: 1px solid var(--border);
}

.your-choice strong {
  color: var(--text);
}

.result-bars {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.result-row {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.result-row.is-yours {
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

.result-row--a.is-yours { border-color: var(--a); }
.result-row--b.is-yours { border-color: var(--b); }

.result-row__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.result-row__emoji {
  font-size: 1.25rem;
  line-height: 1;
}

.result-row__label {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.result-row__pct {
  font-size: 1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.result-row--a .result-row__pct { color: var(--a-light); }
.result-row--b .result-row__pct { color: var(--b-light); }

.result-bar {
  height: 10px;
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
}

.result-bar__fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.result-bar__fill--a {
  background: linear-gradient(90deg, var(--a-dark), var(--a-light));
}

.result-bar__fill--b {
  background: linear-gradient(90deg, var(--b-dark), var(--b-light));
}

.result-meta {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-align: center;
  margin-bottom: 1.25rem;
}

/* ── Next Button ── */
.next-btn {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: none;
  color: white;
  padding: 0.85rem 1.5rem;
  border-radius: 0.75rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.next-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(99, 102, 241, 0.35);
}

/* ── Summary Panel ── */
.summary-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 2.5rem 1.75rem;
  text-align: center;
  animation: fadeIn 0.4s ease;
}

.summary-emoji {
  font-size: 4rem;
  margin-bottom: 0.5rem;
}

.summary-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #f1f5f9, var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.summary-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 1.75rem;
  line-height: 1.65;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  padding: 1rem 0.75rem;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--a-light);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  line-height: 1.4;
}

.alignment-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1.5rem;
  padding: 0.85rem 1rem;
  background: var(--surface-2);
  border-radius: 0.75rem;
  border: 1px solid var(--border);
}

.restart-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: none;
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 0.75rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.restart-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(99, 102, 241, 0.4);
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .vote-buttons {
    grid-template-columns: 1fr;
  }
  .vote-vs {
    padding: 0.2rem 0;
  }
  .vote-btn {
    min-height: 110px;
    padding: 1.1rem 0.85rem;
  }
  .vote-btn__emoji {
    font-size: 2.2rem;
  }
  .vote-btn__label {
    font-size: 0.88rem;
  }
  .summary-stats {
    grid-template-columns: 1fr;
  }
  .debate-stage {
    padding: 1.5rem 1.1rem;
  }
}
