* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  overflow: hidden;
  font-family: "Courier New", "Roboto Mono", monospace;
  background: #1a1a2e;
  cursor: crosshair;
}
#gameCanvas {
  display: block;
  width: 100vw;
  height: 100vh;
}

/* Main HUD Container */
#hud {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

/* Top Stats Bar */
#topStats {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 15px 25px;
  background: linear-gradient(
    180deg,
    rgba(17, 24, 39, 0.95) 0%,
    rgba(17, 24, 39, 0) 100%
  );
}
.statGroup {
  display: flex;
  gap: 30px;
}
.statItem {
  text-align: center;
}
.statLabel {
  font-size: 11px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 3px;
}
.statValue {
  font-size: 24px;
  font-weight: bold;
  color: #10b981;
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}
.statValue.wave {
  color: #3b82f6;
  text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}
.statValue.score {
  color: #fbbf24;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
  font-size: 28px;
}
.statValue.enemies {
  color: #ef4444;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}
.statValue.kills {
  color: #22c55e;
  text-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

/* Bottom Stats Bar */
#bottomStats {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 15px 25px;
  background: linear-gradient(
    0deg,
    rgba(17, 24, 39, 0.95) 0%,
    rgba(17, 24, 39, 0) 100%
  );
}
.bottomLeft {
  display: flex;
  gap: 25px;
  align-items: flex-end;
}
.bottomRight {
  display: flex;
  gap: 25px;
  align-items: flex-end;
}

/* Health Bar */
#healthContainer {
  width: 200px;
}
#healthLabel {
  font-size: 11px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
}
#healthBar {
  width: 100%;
  height: 16px;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid #374151;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
#healthFill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #10b981, #34d399);
  transition: width 0.2s, background 0.2s;
}
#armorFill {
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
  opacity: 0.8;
  transition: width 0.2s;
}

/* Fire Rate */
#fireRate {
  width: 120px;
}
#fireRateLabel {
  font-size: 11px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
}
#fireBar {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid #374151;
  border-radius: 3px;
  overflow: hidden;
}
#fireFill {
  width: 0%;
  height: 100%;
  background: #f59e0b;
}

/* Detailed Stats */
.detailedStat {
  text-align: center;
}
.detailedStat .statLabel {
  font-size: 10px;
}
.detailedStat .statValue {
  font-size: 18px;
}
.detailedStat .statValue.accuracy {
  color: #8b5cf6;
  text-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}
.detailedStat .statValue.shots {
  color: #06b6d4;
  text-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}
.detailedStat .statValue.kills {
  color: #22c55e;
  text-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

/* Wave Announcement */
#waveAnnounce {
  position: fixed;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  z-index: 50;
  opacity: 0;
  transition: opacity 0.5s;
}
#waveAnnounce h2 {
  font-size: 64px;
  color: #3b82f6;
  text-shadow: 0 0 30px rgba(59, 130, 246, 0.7);
  margin-bottom: 10px;
}
#waveAnnounce p {
  font-size: 24px;
  color: #fbbf24;
  text-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
}

/* Hit Indicator */
#hitIndicator {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 15;
  opacity: 0;
  background: radial-gradient(
    circle,
    transparent 30%,
    rgba(239, 68, 68, 0.3) 100%
  );
  transition: opacity 0.1s;
}

/* Main Menu */
#mainMenu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1a2e, #0f172a);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 100;
}
#mainMenu h1 {
  font-size: 72px;
  color: #10b981;
  text-shadow: 0 0 40px rgba(16, 185, 129, 0.6);
  margin-bottom: 10px;
  letter-spacing: 6px;
}
#mainMenu h2 {
  font-size: 20px;
  color: #6b7280;
  margin-bottom: 40px;
  letter-spacing: 3px;
}
#startBtn {
  padding: 18px 60px;
  font-size: 24px;
  font-family: inherit;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  pointer-events: auto;
}
#startBtn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 40px rgba(16, 185, 129, 0.6);
}
#menuStats {
  color: #9ca3af;
  text-align: center;
  line-height: 2;
  margin-top: 30px;
  font-size: 14px;
}
#menuStats span {
  color: #10b981;
  font-weight: bold;
}

/* Game Over Screen */
#gameOver {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 100;
}
#gameOver h1 {
  font-size: 64px;
  color: #ef4444;
  text-shadow: 0 0 30px rgba(239, 68, 68, 0.6);
  margin-bottom: 10px;
  letter-spacing: 4px;
}
#finalWave {
  font-size: 24px;
  color: #3b82f6;
  margin-bottom: 30px;
}
#finalScore {
  font-size: 48px;
  color: #fbbf24;
  text-shadow: 0 0 30px rgba(251, 191, 36, 0.5);
  margin-bottom: 40px;
}
#statsGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px 60px;
  margin-bottom: 40px;
}
.finalStat {
  text-align: center;
}
.finalStat .label {
  font-size: 12px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
}
.finalStat .value {
  font-size: 32px;
  font-weight: bold;
}
.finalStat .value.green {
  color: #10b981;
}
.finalStat .value.blue {
  color: #3b82f6;
}
.finalStat .value.purple {
  color: #8b5cf6;
}
.finalStat .value.yellow {
  color: #fbbf24;
}
.finalStat .value.cyan {
  color: #06b6d4;
}
#restartBtn {
  padding: 18px 60px;
  font-size: 24px;
  font-family: inherit;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  pointer-events: auto;
}
#restartBtn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 40px rgba(239, 68, 68, 0.6);
}

/* Wave Progress Bar */
#waveProgress {
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
}
#waveProgressBar {
  width: 100%;
  height: 4px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 2px;
  overflow: hidden;
}
