/* style.css - Tanks game styling */

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #1a1a1a;
  color: #e0e0e0;
  height: 100vh;
  overflow: hidden;
}

/* Screens */
.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #1a1a1a;
}

.screen.hidden {
  display: none;
}

/* Login Screen */
.login-container {
  text-align: center;
  background: #2a2a2a;
  padding: 40px 60px;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.login-container h1 {
  font-size: 3em;
  margin-bottom: 10px;
  color: #4CAF50;
}

.login-container p {
  margin-bottom: 30px;
  color: #888;
}

#player-name {
  width: 250px;
  padding: 12px 20px;
  margin-bottom: 20px;
  background: #333;
  border: 2px solid #444;
  border-radius: 5px;
  color: #fff;
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s;
}

#player-name:focus {
  border-color: #4CAF50;
}

#join-button {
  width: 250px;
  padding: 12px 20px;
  background: #4CAF50;
  border: none;
  border-radius: 5px;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s;
}

#join-button:hover {
  background: #45a049;
}

.error {
  color: #f44336;
  margin-top: 15px;
  font-size: 14px;
}

/* Game Screen */
.game-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#game-canvas {
  display: block;
  background: #000;
}

/* Map Window */
.map-window {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 300px;
  height: 300px;
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid #4CAF50;
  border-radius: 5px;
  z-index: 100;
}

#map-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.map-controls {
  padding: 5px;
  text-align: center;
}

#toggle-map {
  padding: 5px 10px;
  background: #333;
  border: 1px solid #444;
  border-radius: 3px;
  color: #fff;
  cursor: pointer;
}

/* HUD */
.hud {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: rgba(0, 0, 0, 0.8);
  padding: 15px;
  border-radius: 5px;
  border: 1px solid #444;
  z-index: 100;
}

.health-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.bar-container {
  width: 150px;
  height: 20px;
  background: #333;
  border-radius: 3px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #f44336, #e91e63);
  border-radius: 3px;
  transition: width 0.3s;
}

.coordinates {
  margin-bottom: 10px;
  font-family: monospace;
}

.waypoints {
  margin-top: 10px;
}

.waypoints h3 {
  margin-bottom: 5px;
  font-size: 14px;
}

#waypoints-list {
  list-style: none;
  max-height: 100px;
  overflow-y: auto;
  margin-bottom: 5px;
}

#waypoints-list li {
  padding: 3px 0;
  font-size: 12px;
  cursor: pointer;
}

#waypoints-list li:hover {
  color: #4CAF50;
}

.waypoint-controls {
  display: flex;
  gap: 5px;
}

#waypoint-label {
  flex: 1;
  padding: 5px;
  background: #333;
  border: 1px solid #444;
  border-radius: 3px;
  color: #fff;
  font-size: 12px;
}

#add-waypoint {
  padding: 5px 10px;
  background: #4CAF50;
  border: none;
  border-radius: 3px;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
}

/* Death Screen */
.death-container {
  text-align: center;
  background: #2a2a2a;
  padding: 40px 60px;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.death-container h1 {
  font-size: 3em;
  margin-bottom: 10px;
  color: #f44336;
}

.death-container p {
  margin-bottom: 30px;
  color: #888;
}

#return-to-login {
  width: 200px;
  padding: 12px 20px;
  background: #f44336;
  border: none;
  border-radius: 5px;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s;
}

#return-to-login:hover {
  background: #d32f2f;
}

/* Responsive */
@media (max-width: 768px) {
  .map-window {
    width: 200px;
    height: 200px;
  }
  
  .hud {
    width: calc(100% - 40px);
    left: 20px;
    right: 20px;
  }
}
