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

body {
  font-family: "Courier New", monospace;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  color: #fff;
  margin: 0;
  padding: 5px;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.game-container {
  background: #000;
  border: 3px solid #fff;
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
  max-width: 100%;
  margin: 0 auto;
  height: 100%;
  display: flex;
  flex-direction: column;
  max-height: 100vh;
}

.header {
  text-align: center;
  margin-bottom: 8px;
  background: #333;
  padding: 8px;
  border-radius: 5px;
  border: 2px solid #666;
  flex-shrink: 0;
}

.header h1 {
  font-size: 1.8em;
  color: #ffff00;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  margin-bottom: 6px;
}

.score {
  display: flex;
  justify-content: space-around;
  font-size: 0.9em;
  color: #fff;
}

.score span {
  background: #444;
  padding: 5px 15px;
  border-radius: 3px;
  border: 1px solid #666;
}

.game-area {
  position: relative;
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
  flex-grow: 1;
  align-items: center;
}

#gameCanvas {
  border: 3px solid #666;
  background: #2d2d2d;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  max-width: 100%;
  max-height: 100%;
}

.controls {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  background: #333;
  padding: 8px;
  border-radius: 5px;
  border: 2px solid #666;
  flex-shrink: 0;
}

.control-info h3,
.terrain-info h3 {
  color: #ffff00;
  margin-bottom: 6px;
  font-size: 0.9em;
}

.control-info p,
.terrain-info p {
  margin: 2px 0;
  font-size: 0.75em;
  line-height: 1.1;
}

.terrain-info {
  text-align: left;
}

.terrain-info span {
  font-weight: bold;
  font-size: 1.1em;
}

.game-status {
  position: relative;
}

.game-over,
.level-complete {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.9);
  border: 3px solid #ffff00;
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  z-index: 1000;
  animation: pulse 1s infinite alternate;
}

.game-over h2,
.level-complete h2 {
  color: #ff0000;
  font-size: 2.5em;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.level-complete h2 {
  color: #00ff00;
}

.game-over p,
.level-complete p {
  font-size: 1.2em;
  color: #fff;
}

.hidden {
  display: none !important;
}

@keyframes pulse {
  from {
    box-shadow: 0 0 20px rgba(255, 255, 0, 0.5);
  }
  to {
    box-shadow: 0 0 30px rgba(255, 255, 0, 0.8);
  }
}

/* Tank and game element styles for reference */
.tank-player {
  background: #00ff00;
}

.tank-enemy {
  background: #ff0000;
}

.bullet {
  background: #ffff00;
}

.wall-brick {
  background: #8b4513;
}

.wall-steel {
  background: #c0c0c0;
}

.wall-water {
  background: #4169e1;
}

.wall-forest {
  background: #228b22;
}

.wall-concrete {
  background: #696969;
}

.powerup {
  background: #ff00ff;
}

.level-info,
.enemy-info,
.terrain-info,
.powerup-info {
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 5px;
  padding: 8px;
  margin-bottom: 8px;
  font-size: 0.85em;
  line-height: 1.4;
}

.level-info h3,
.enemy-info h3,
.terrain-info h3,
.powerup-info h3 {
  color: #ffff00;
  margin-bottom: 5px;
  font-size: 1em;
}

.level-info div,
.enemy-info div,
.terrain-info div {
  margin-bottom: 3px;
}

.enemy-info div div,
.terrain-info div div {
  margin-left: 10px;
  font-size: 0.9em;
}
