:root {
  --bg-dark: #0a0a12;
  --bg-surface: #12121e;
  --neon-purple: #a78bfa;
  --neon-cyan: #67e8f9;
  --neon-green: #4ade80;
  --neon-orange: #fb923c;
  --neon-pink: #f472b6;
  --text-primary: #e4e4f0;
}

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

body {
  background: var(--bg-dark);
  overflow: hidden;
  font-family: 'Press Start 2P', monospace;
  color: var(--text-primary);
  -webkit-user-select: none;
  user-select: none;
}

#game-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

#game-canvas {
  display: block;
  background: radial-gradient(ellipse at center, #0d0d20 0%, var(--bg-dark) 100%);
  border: 2px solid rgba(167, 139, 250, 0.25);
  border-radius: 4px;
  box-shadow: 0 0 50px rgba(167, 139, 250, 0.12), 0 0 100px rgba(103, 232, 249, 0.06);
}

#hud {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 40px;
  font-size: 11px;
  color: var(--neon-cyan);
  text-shadow: 0 0 10px var(--neon-cyan);
  z-index: 10;
  pointer-events: none;
}

#speed-display { color: var(--neon-orange); text-shadow: 0 0 10px var(--neon-orange); }

.overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 18, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 20;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.game-title {
  font-size: clamp(28px, 6vw, 56px);
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  line-height: 1.3;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 24px rgba(167, 139, 250, 0.5));
}

.subtitle {
  font-size: clamp(8px, 1.5vw, 12px);
  color: rgba(167, 139, 250, 0.7);
  margin-bottom: 32px;
}

.game-btn {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(12px, 2vw, 16px);
  padding: 16px 40px;
  background: linear-gradient(135deg, var(--neon-purple), #7c3aed);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 24px rgba(167, 139, 250, 0.4);
  margin-bottom: 24px;
}

.game-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 36px rgba(167, 139, 250, 0.6);
}

.controls-hint {
  font-size: 8px;
  color: rgba(228, 228, 240, 0.3);
  margin-top: 6px;
}

.final-score {
  font-size: clamp(14px, 3vw, 24px);
  color: var(--neon-cyan);
  margin-bottom: 8px;
}

.final-gates {
  font-size: clamp(10px, 2vw, 14px);
  color: var(--neon-purple);
  margin-bottom: 32px;
}

.close-call-text {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(10px, 2vw, 16px);
  color: var(--neon-green);
  text-shadow: 0 0 16px var(--neon-green);
  pointer-events: none;
  opacity: 0;
  z-index: 15;
  transition: opacity 0.15s ease;
}

#badge {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 8px;
  color: rgba(167, 139, 250, 0.5);
  z-index: 5;
}

#badge a { color: var(--neon-cyan); text-decoration: none; }
#badge a:hover { text-decoration: underline; }
