@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Share+Tech+Mono&display=swap');

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

body {
  background: #000;
  overflow: hidden;
  font-family: 'Share Tech Mono', monospace;
  color: #fff;
}

#canvas-container {
  position: fixed;
  inset: 0;
}

canvas { display: block; }

/* HUD */
#hud {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px 32px;
  pointer-events: none;
  z-index: 10;
}

#hud > .hud-box {
  min-width: 90px;
}

.hud-box {
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(0,255,180,0.3);
  padding: 8px 16px;
  backdrop-filter: blur(8px);
}

.hud-label {
  font-size: 10px;
  letter-spacing: 3px;
  color: rgba(0,255,180,0.6);
  text-transform: uppercase;
}

.hud-value {
  font-family: 'Orbitron', monospace;
  font-size: 22px;
  font-weight: 700;
  color: #00ffb4;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  min-width: 4ch;
}

#speed-bar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

#speed-bar-bg {
  width: 120px;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(0,255,180,0.2);
}

#speed-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #00ffb4, #00c8ff);
  width: 20%;
  transition: width 0.5s ease;
  box-shadow: 0 0 8px #00ffb4;
}

/* Lane indicator */
#lane-indicator {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
  pointer-events: none;
}

.lane-pip {
  width: 10px;
  height: 10px;
  border: 1.5px solid rgba(0,255,180,0.4);
  border-radius: 50%;
  transition: all 0.2s ease;
}

.lane-pip.active {
  background: #00ffb4;
  border-color: #00ffb4;
  box-shadow: 0 0 10px #00ffb4;
}

/* Controls hint */
#controls-hint {
  position: fixed;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.3);
  z-index: 10;
  pointer-events: none;
}

/* Overlay screens */
.screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 100;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(4px);
}

.screen.hidden { display: none; }

.screen-title {
  font-family: 'Orbitron', monospace;
  font-size: clamp(48px, 10vw, 96px);
  font-weight: 900;
  letter-spacing: 8px;
  line-height: 1;
  background: linear-gradient(135deg, #00ffb4, #00c8ff, #7b2fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.screen-sub {
  font-size: 12px;
  letter-spacing: 4px;
  color: rgba(0,255,180,0.5);
  margin-bottom: 48px;
}

.btn {
  font-family: 'Orbitron', monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 4px;
  padding: 14px 40px;
  background: transparent;
  border: 2px solid #00ffb4;
  color: #00ffb4;
  cursor: pointer;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #00ffb4;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: -1;
}

.btn:hover {
  color: #000;
  box-shadow: 0 0 30px rgba(0,255,180,0.4);
}

.btn:hover::before { transform: translateX(0); }

.stat-row {
  display: flex;
  gap: 48px;
  margin-bottom: 40px;
}

.stat-item {
  text-align: center;
}

.stat-num {
  font-family: 'Orbitron', monospace;
  font-size: 32px;
  font-weight: 700;
  color: #00c8ff;
}

.stat-label {
  font-size: 10px;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.4);
  margin-top: 4px;
}

/* Death flash */
#flash {
  position: fixed;
  inset: 0;
  background: #ff2244;
  opacity: 0;
  pointer-events: none;
  z-index: 200;
  transition: opacity 0.05s;
}

/* Scanline overlay */
#scanlines {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.05) 2px,
    rgba(0,0,0,0.05) 4px
  );
  pointer-events: none;
  z-index: 5;
}

/* Vignette */
#vignette {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.7) 100%);
  pointer-events: none;
  z-index: 6;
}

.key-hint {
  display: inline-block;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 2px 8px;
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  margin: 0 3px;
}

/* Kill counter HUD */
#kill-box {
  position: fixed;
  top: 90px;
  right: 32px;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,80,80,0.4);
  padding: 8px 16px;
  backdrop-filter: blur(8px);
  z-index: 10;
  pointer-events: none;
}
#kill-box .hud-label { color: rgba(255,80,80,0.7); }
#kill-box .hud-value { color: #ff5050; }

/* Mute indicator */
#mute-indicator {
  position: fixed;
  bottom: 110px;
  right: 32px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.3);
  z-index: 10;
  pointer-events: none;
}
#mute-indicator.muted { color: rgba(255,80,80,0.7); }

/* Overdrive HUD */
#overdrive-hud {
  position: fixed;
  top: 22%;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Orbitron', monospace;
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 8px;
  color: #ffe066;
  text-shadow: 0 0 30px #ffe066, 0 0 60px #ffaa00;
  z-index: 500;
  pointer-events: none;
  display: none;
  text-align: center;
  animation: overdrivePulse 0.6s ease-in-out infinite alternate;
}
#overdrive-hud .od-timer {
  font-size: 16px;
  letter-spacing: 4px;
  color: rgba(255,220,80,0.7);
  margin-top: 4px;
}
@keyframes overdrivePulse {
  from { text-shadow: 0 0 20px #ffe066, 0 0 40px #ffaa00; }
  to   { text-shadow: 0 0 40px #ffe066, 0 0 90px #ffaa00, 0 0 120px #ff6600; }
}
