:root {
  --bg: #080010;
  --neon-blue: #00f3ff;
  --neon-pink: #ff0055;
  --neon-yellow: #ffee00;
  --font-head: 'Orbitron', sans-serif;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: #fff;
  font-family: var(--font-head);
  overflow: hidden;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.game-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  perspective: 1000px;
  overflow: hidden;
}

#input_video {
  position: absolute;
  top: 20px; left: 20px;
  width: 160px;
  opacity: 0.3;
  border: 1px solid var(--neon-blue);
  transform: scaleX(-1);
  z-index: 5;
}

canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1;
}

/* 3D Grid Floor */
.grid-floor {
  position: absolute;
  bottom: -50%; left: -50%;
  width: 200%; height: 100%;
  background: 
    linear-gradient(transparent 0%, var(--neon-blue) 2%, transparent 3%),
    linear-gradient(90deg, transparent 0%, var(--neon-blue) 2%, transparent 3%);
  background-size: 100px 100px;
  transform: rotateX(60deg);
  animation: moveGrid 2s linear infinite;
  opacity: 0.2;
  z-index: 0;
}

@keyframes moveGrid {
  0% { transform: rotateX(60deg) translateY(0); }
  100% { transform: rotateX(60deg) translateY(100px); }
}

.horizon-glow {
  position: absolute;
  top: 40%; left: 0;
  width: 100%; height: 20%;
  background: radial-gradient(ellipse at center, rgba(0,243,255,0.4) 0%, transparent 70%);
  z-index: 0;
}

/* HUD */
.hud {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 10;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  padding: 20px;
}

.score-box, .health-box {
  background: rgba(0,0,0,0.6);
  padding: 10px 20px;
  border: 2px solid var(--neon-blue);
  border-radius: 8px;
  box-shadow: 0 0 15px var(--neon-blue);
}

.label { font-size: 0.8rem; color: #aaa; margin-bottom: 5px; }
#score-val { font-size: 2rem; font-weight: 900; letter-spacing: 2px; }

.health-bar {
  width: 200px; height: 20px; background: #333;
  border: 1px solid #fff;
}
#health-fill {
  width: 100%; height: 100%;
  background: var(--neon-blue);
  transition: width 0.2s;
  box-shadow: 0 0 10px var(--neon-blue);
}

/* Combo */
.combo-container {
  position: absolute;
  top: 30%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  font-size: 4rem;
  font-weight: 900;
  color: var(--neon-yellow);
  text-shadow: 0 0 20px var(--neon-yellow);
  display: none; /* JS toggles this */
}

/* Overdrive Message */
.overdrive-alert {
  position: absolute;
  top: 60%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  color: var(--neon-pink);
  text-shadow: 0 0 20px var(--neon-pink);
  font-family: 'Black Ops One', cursive;
  display: none;
  animation: pulse 0.2s infinite alternate;
}
@keyframes pulse { from { transform: translate(-50%, -50%) scale(1); } to { transform: translate(-50%, -50%) scale(1.1); } }

/* Modal */
.modal {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.85);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  pointer-events: auto;
  backdrop-filter: blur(5px);
}

.modal h1 {
  font-size: 4rem;
  color: #fff;
  text-shadow: 0 0 30px var(--neon-blue);
  margin-bottom: 40px;
}

.controls-info {
  display: flex; gap: 20px; margin-bottom: 30px;
}
.controls-info div {
  border: 1px solid #fff; padding: 20px; width: 120px; text-align: center;
  background: rgba(255,255,255,0.1);
}

#start-btn {
  background: var(--neon-blue);
  color: #000;
  border: none;
  padding: 20px 60px;
  font-size: 2rem;
  font-family: var(--font-head);
  cursor: pointer;
  font-weight: 900;
  box-shadow: 0 0 30px var(--neon-blue);
  transition: 0.2s;
}
#start-btn:hover { transform: scale(1.1); background: #fff; }

/* Lane Guides */
.lanes-guide {
  position: absolute;
  bottom: 50px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 20px;
  opacity: 0.5;
}
.lanes-guide div {
  width: 80px; text-align: center; font-size: 0.8rem;
  border-top: 2px solid #fff; padding-top: 5px;
}