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

body {
  overflow: hidden;
  background: #0a0e1a;
  font-family: 'Exo 2', sans-serif;
  cursor: none;
}

#canvas {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#startScreen {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  background: radial-gradient(ellipse at center, #0d1229 0%, #060812 100%);
}

#startContent {
  text-align: center;
  max-width: 480px;
  padding: 20px;
}

#gameTitle {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: clamp(3rem, 8vw, 5rem);
  background: linear-gradient(135deg, #00ff88, #00ddff, #ff00cc);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite, titlePulse 2s ease-in-out infinite;
  letter-spacing: 4px;
  margin-bottom: 4px;
  text-shadow: none;
  filter: drop-shadow(0 0 30px rgba(0,255,136,0.3));
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes titlePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

#subtitle {
  font-family: 'Orbitron', sans-serif;
  font-weight: 400;
  font-size: 0.9rem;
  color: #4a5580;
  letter-spacing: 8px;
  text-transform: uppercase;
  margin-bottom: 30px;
}

#nameSection {
  margin-bottom: 20px;
}

#nameInput {
  background: rgba(255,255,255,0.05);
  border: 2px solid rgba(0,255,136,0.3);
  border-radius: 8px;
  padding: 12px 20px;
  font-family: 'Exo 2', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #e0e8ff;
  text-align: center;
  width: 280px;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

#nameInput:focus {
  border-color: #00ff88;
  box-shadow: 0 0 20px rgba(0,255,136,0.2);
}

#nameInput::placeholder {
  color: #3a4466;
}

.color-label {
  font-size: 0.8rem;
  color: #4a5580;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

#colorPicker {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 24px;
}

.color-swatch {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.2s;
  position: relative;
}

.color-swatch:hover {
  transform: scale(1.2);
}

.color-swatch.selected {
  border-color: #fff;
  box-shadow: 0 0 15px currentColor;
  transform: scale(1.15);
}

#playBtn, #playAgainBtn {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 3px;
  padding: 14px 60px;
  border: none;
  border-radius: 50px;
  background: linear-gradient(135deg, #00ff88, #00cc6a);
  color: #0a0e1a;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 0 30px rgba(0,255,136,0.3);
}

#playBtn:hover, #playAgainBtn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 50px rgba(0,255,136,0.5);
}

#instructions {
  margin-top: 24px;
  font-size: 0.75rem;
  color: #3a4466;
  line-height: 1.8;
  letter-spacing: 1px;
}

#highScoreDisplay {
  margin-top: 16px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.8rem;
  color: #ff9900;
}

footer {
  margin-top: 30px;
}

footer a {
  color: #2a3355;
  text-decoration: none;
  font-size: 0.7rem;
  letter-spacing: 1px;
  transition: color 0.3s;
}

footer a:hover {
  color: #00ff88;
}

/* Game Over */
#gameOverScreen {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  background: rgba(6,8,18,0.92);
  backdrop-filter: blur(8px);
}

#gameOverContent {
  text-align: center;
}

#gameOverTitle {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 3rem;
  color: #ff3366;
  letter-spacing: 6px;
  margin-bottom: 10px;
  text-shadow: 0 0 40px rgba(255,51,102,0.5);
}

#eatenBy {
  font-size: 1.1rem;
  color: #8090bb;
  margin-bottom: 20px;
}

#finalStats {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.8rem;
  color: #5a6a99;
  line-height: 2;
  margin-bottom: 30px;
}

#finalStats span {
  color: #00ddff;
}