:root {
  color-scheme: dark;
  --bg: #12081f;
  --panel: #1d0f33;
  --accent: #ff4fd8;
  --text: #f4e9ff;
  --muted: #b09ecf;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif;
  overflow: hidden;
}

#stage {
  position: relative;
  width: 960px;
  height: 600px;
  margin: 20px auto;
  max-width: 100%;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(255, 79, 216, 0.25);
}

canvas {
  display: block;
  background: radial-gradient(ellipse at 50% 20%, #241040 0%, #0c0616 80%);
  width: 100%;
  height: 100%;
}

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(10, 4, 20, 0.88);
  text-align: center;
  padding: 16px;
  overflow-y: auto;
}

.overlay.hidden { display: none; }

h1 {
  font-size: 48px;
  margin: 0;
  letter-spacing: 2px;
  text-shadow: 0 0 18px var(--accent);
}
h1 span { color: var(--accent); }

.logo {
  width: 150px;
  height: 150px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 0 24px rgba(255, 79, 216, 0.45));
}

.subtitle {
  color: var(--muted);
  margin-top: -8px;
  margin-bottom: 4px;
}

.picker-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.picker-label {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.picker-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.diff-btn, .mode-btn, .song-btn {
  padding: 8px 18px;
  border-radius: 8px;
  border: 2px solid var(--muted);
  background: transparent;
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.diff-btn:hover, .mode-btn:hover, .song-btn:hover { border-color: var(--accent); }
.diff-btn.selected, .mode-btn.selected, .song-btn.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #1a0a24;
  font-weight: bold;
}

.big-btn {
  padding: 14px 40px;
  font-size: 20px;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: #1a0a24;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 0 #a11f8c;
  transition: transform 0.1s ease;
}
.big-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #a11f8c; }
.big-btn:hover { filter: brightness(1.1); }

.big-btn.secondary {
  background: transparent;
  border: 2px solid var(--muted);
  color: var(--text);
  box-shadow: none;
}
.big-btn.secondary:hover { border-color: var(--accent); }

.instructions {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
.instructions p { margin: 2px 0; }
.instructions b { color: var(--text); }
.instructions .hidden { display: none; }

#countdownNum {
  font-size: 140px;
  font-weight: bold;
  color: var(--accent);
  text-shadow: 0 0 40px var(--accent);
}

.stat-row {
  width: 260px;
  display: flex;
  justify-content: space-between;
  font-size: 18px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding: 6px 0;
}
.stat-row span:last-child { font-weight: bold; color: var(--accent); }

.versus-results {
  display: flex;
  gap: 30px;
}
.versus-col h3 {
  margin: 0 0 6px;
  color: var(--accent);
}
.versus-col .stat-row {
  width: 200px;
}
