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

body {
  font-family: "Courier New", monospace;
  background: #1a1a2e;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  color: #fff;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

.game-container {
  position: relative;
  width: 800px;
  max-width: 95vw;
}

.title-screen,
.game-over-screen,
.victory-screen {
  background: linear-gradient(180deg, #0f0f1e 0%, #1a1a2e 100%);
  border: 4px solid #00ff41;
  padding: 40px;
  text-align: center;
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
}

.pixel-title {
  font-size: 48px;
  color: #00ff41;
  text-shadow: 4px 4px 0 #003311;
  margin-bottom: 20px;
  letter-spacing: 4px;
}

.subtitle,
.message {
  font-size: 18px;
  color: #aaa;
  margin-bottom: 30px;
}

.pixel-button {
  background: #00ff41;
  color: #0f0f1e;
  border: 3px solid #00ff41;
  padding: 15px 40px;
  font-size: 20px;
  font-family: "Courier New", monospace;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 4px 4px 0 #003311;
}

.pixel-button:hover {
  background: #00cc33;
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #003311;
}

.controls-info {
  margin-top: 30px;
  padding: 20px;
  background: rgba(0, 255, 65, 0.1);
  border: 2px solid #00ff41;
}

.controls-info p {
  margin: 5px 0;
  color: #00ff41;
}

.game-screen {
  position: relative;
}

.hud {
  background: #0f0f1e;
  border: 3px solid #00ff41;
  padding: 15px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  box-shadow: 0 4px 0 #003311;
}

.hud-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hud-label {
  color: #00ff41;
  font-weight: bold;
  font-size: 14px;
}

.health-bar {
  width: 150px;
  height: 20px;
  background: #333;
  border: 2px solid #00ff41;
  position: relative;
}

.health-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff0000 0%, #ff6600 50%, #00ff41 100%);
  transition: width 0.3s;
  width: 100%;
}

.key {
  display: inline-block;
  padding: 5px 10px;
  border: 2px solid;
  font-weight: bold;
  margin: 0 5px;
}

.key.red {
  color: #ff3333;
  border-color: #ff3333;
  background: rgba(255, 51, 51, 0.2);
}

.key.blue {
  color: #3333ff;
  border-color: #3333ff;
  background: rgba(51, 51, 255, 0.2);
}

.key.yellow {
  color: #ffff33;
  border-color: #ffff33;
  background: rgba(255, 255, 51, 0.2);
}

.weapon-indicator {
  color: #ffff00;
  font-weight: bold;
  padding: 5px 10px;
  border: 2px solid #ffff00;
  background: rgba(255, 255, 0, 0.2);
}

#gameCanvas {
  display: block;
  background: #000;
  border: 4px solid #00ff41;
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
  image-rendering: pixelated;
}

.minimap {
  position: absolute;
  top: 80px;
  right: 20px;
  width: 100px; /* Updated from 120px */
  height: 100px; /* Updated from 120px */
  border: 2px solid #00ff41;
  padding: 0;
  pointer-events: none;
  opacity: 0.8; /* Added */
  transition: opacity 0.3s; /* Added */
}

/* Added minimap toggle indicator styles */
.minimap-toggle {
  position: absolute;
  top: 190px;
  right: 20px;
  background: rgba(0, 255, 65, 0.2);
  border: 2px solid #00ff41;
  padding: 5px 10px;
  font-size: 12px;
  color: #00ff41;
  pointer-events: none;
}

@media (max-width: 850px) {
  .minimap {
    width: 80px; /* Updated from 100px */
    height: 80px; /* Updated from 100px */
    top: 100px;
    right: 10px;
  }

  /* Added responsive styles for minimap toggle */
  .minimap-toggle {
    top: 185px;
    right: 10px;
    font-size: 10px;
  }

  .pixel-title {
    font-size: 32px;
  }

  .health-bar {
    width: 100px;
  }
}
