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

body {
  overflow: hidden;
  background: #000;
  font-family: 'Press Start 2P', monospace;
  -webkit-user-select: none;
  user-select: none;
}

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

#controls {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  pointer-events: none;
}

#top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  border-bottom: 2px solid rgba(255, 80, 0, 0.4);
  pointer-events: all;
}

#stats {
  display: flex;
  gap: 16px;
  font-size: 11px;
  color: #FFD54F;
  text-shadow: 0 0 6px rgba(255,100,0,0.6);
}

#slider-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 8px;
  color: #ccc;
}

#spawn-rate {
  width: 120px;
  accent-color: #FF3300;
  cursor: pointer;
}

#buttons {
  display: flex;
  gap: 8px;
}

#nuke-btn {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  padding: 8px 16px;
  background: #CC0000;
  color: #fff;
  border: 2px solid #FF4444;
  border-radius: 4px;
  cursor: pointer;
  text-shadow: 0 0 8px #FF0000;
  animation: nuke-pulse 1.5s ease-in-out infinite;
  transition: transform 0.1s;
}

#nuke-btn:hover {
  transform: scale(1.1);
  background: #FF0000;
}

#nuke-btn:active {
  transform: scale(0.95);
}

@keyframes nuke-pulse {
  0%, 100% { box-shadow: 0 0 8px #FF0000, 0 0 16px rgba(255,0,0,0.4); }
  50% { box-shadow: 0 0 20px #FF4400, 0 0 40px rgba(255,60,0,0.6); }
}

#clear-btn {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  padding: 8px 16px;
  background: rgba(100,100,100,0.6);
  color: #ddd;
  border: 2px solid #888;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.1s, background 0.2s;
}

#clear-btn:hover {
  background: rgba(150,150,150,0.7);
  transform: scale(1.05);
}

#milestone-toast {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: #FFD700;
  text-shadow: 0 0 12px rgba(255,200,0,0.8), 0 2px 4px rgba(0,0,0,0.8);
  text-align: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  white-space: nowrap;
}

#milestone-toast.show {
  opacity: 1;
}

#footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  text-align: center;
  padding: 6px 12px;
  font-size: 7px;
  color: rgba(255,255,255,0.5);
  background: rgba(0,0,0,0.4);
  pointer-events: all;
}

#footer a {
  color: rgba(255,180,50,0.7);
  text-decoration: none;
}

#footer a:hover {
  color: #FFD54F;
  text-decoration: underline;
}

@media (max-width: 600px) {
  #top-bar {
    justify-content: center;
    padding: 8px 10px;
  }
  #slider-wrap {
    order: 3;
    width: 100%;
    justify-content: center;
  }
  #spawn-rate {
    width: 100px;
  }
  #stats {
    font-size: 9px;
  }
  #nuke-btn, #clear-btn {
    font-size: 8px;
    padding: 6px 10px;
  }
}