/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Courier New", monospace;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a0a2e 50%, #16213e 100%);
  color: #00ff00;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Navigation */
.nav-back {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
}

.back-btn {
  color: #00ff00;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
  padding: 5px 10px;
  border: 2px solid #00ff00;
  background: rgba(0, 0, 0, 0.8);
  transition: all 0.3s ease;
}

.back-btn:hover {
  background: #00ff00;
  color: #000;
  box-shadow: 0 0 10px #00ff00;
}

/* Game container */
.game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px 20px;
  min-height: 100vh;
}

/* Game header */
.game-header {
  text-align: center;
  margin-bottom: 20px;
}

.game-title {
  font-size: 48px;
  color: #ff0066;
  text-shadow: 0 0 20px #ff0066, 0 0 40px #ff0066;
  margin-bottom: 15px;
  letter-spacing: 4px;
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    text-shadow: 0 0 20px #ff0066, 0 0 40px #ff0066;
  }

  to {
    text-shadow: 0 0 30px #ff0066, 0 0 60px #ff0066;
  }
}

.game-stats {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.stat {
  color: #00ff00;
  font-size: 18px;
  font-weight: bold;
  padding: 5px 10px;
  border: 1px solid #00ff00;
  background: rgba(0, 255, 0, 0.1);
}

/* Game canvas */
#gameCanvas {
  border: 3px solid #00ff00;
  background: #000;
  box-shadow: 0 0 30px #00ff00;
  display: block;
  max-width: 100%;
  height: auto;
}

/* Game over screen */
.game-over {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.game-over-content {
  text-align: center;
  background: linear-gradient(135deg, #1a0a2e, #16213e);
  padding: 40px;
  border: 3px solid #ff0066;
  border-radius: 10px;
  box-shadow: 0 0 50px #ff0066;
}

.game-over h2 {
  color: #ff0066;
  font-size: 1.25rem;
  margin-bottom: 20px;
  text-shadow: 0 0 20px #ff0066;
}

.game-over p {
  color: #00ff00;
  font-size: 18px;
  margin-bottom: 15px;
}

.restart-btn {
  background: linear-gradient(45deg, #ff0066, #ff3366);
  color: white;
  border: none;
  padding: 15px 30px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 5px;
  margin-top: 20px;
  transition: all 0.3s ease;
  font-family: "Courier New", monospace;
}

.restart-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px #ff0066;
}

/* Mobile controls */
.mobile-controls {
  display: none;
  margin-top: 20px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid #00ff00;
  border-radius: 10px;
}

.control-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 5px 0;
}

.control-btn {
  width: 60px;
  height: 60px;
  background: linear-gradient(45deg, #00ff00, #00cc00);
  color: #000;
  border: 2px solid #00ff00;
  border-radius: 10px;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: "Courier New", monospace;
  user-select: none;
  -webkit-user-select: none;
}

.fire-btn {
  width: 120px;
  background: linear-gradient(45deg, #ff0066, #ff3366);
  color: white;
  border-color: #ff0066;
}

.control-btn:active {
  transform: scale(0.95);
  box-shadow: 0 0 15px currentColor;
}

/* Game controls info */
.game-controls {
  margin-top: 20px;
  text-align: center;
  background: rgba(0, 0, 0, 0.8);
  padding: 20px;
  border: 1px solid #00ff00;
  border-radius: 5px;
  max-width: 600px;
}

.game-controls h3 {
  color: #ff0066;
  margin-bottom: 10px;
  font-size: 20px;
}

.game-controls p {
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.4;
}

/* Utility classes */
.hidden {
  display: none !important;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .game-title {
    font-size: 32px;
  }

  .game-stats {
    gap: 15px;
  }

  .stat {
    font-size: 14px;
  }

  #gameCanvas {
    width: 100%;
    max-width: 400px;
    height: 300px;
  }

  .mobile-controls {
    display: block;
  }

  .game-controls {
    font-size: 12px;
    padding: 15px;
  }
}

@media (max-width: 480px) {
  .game-container {
    padding: 80px 10px 10px;
  }

  .game-title {
    font-size: 24px;
    letter-spacing: 2px;
  }

  .control-btn {
    width: 50px;
    height: 50px;
    font-size: 16px;
  }

  .fire-btn {
    width: 100px;
  }
}

/* Touch device optimization */
@media (hover: none) and (pointer: coarse) {
  .mobile-controls {
    display: block;
  }
}