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

body {
  background: #111;
  overflow: hidden;
  font-family: 'Segoe UI', Arial, sans-serif;
  color: #fff;
}

#game {
  display: block;
  cursor: crosshair;
}

.hidden {
  display: none !important;
}

/* Menu */
#menu {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  z-index: 100;
  gap: 20px;
}

#menu h1 {
  font-size: 52px;
  color: #0f0;
  text-shadow: 0 0 20px #0f0;
  letter-spacing: 4px;
}

#menu input {
  padding: 12px 24px;
  font-size: 18px;
  border: 2px solid #0f0;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  outline: none;
  text-align: center;
  width: 260px;
}

#menu input:focus {
  box-shadow: 0 0 15px rgba(0, 255, 0, 0.4);
}

#menu button,
#death-screen button {
  padding: 14px 40px;
  font-size: 20px;
  border: none;
  border-radius: 8px;
  background: #0f0;
  color: #111;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

#menu button:hover,
#death-screen button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
}

/* HUD */
#hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  pointer-events: none;
}

#score {
  position: fixed;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 22px;
  font-weight: bold;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

#stats {
  position: fixed;
  top: 15px;
  left: 15px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(0, 0, 0, 0.55);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-family: 'Courier New', monospace;
  color: #0f0;
}

#leaderboard {
  position: fixed;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.6);
  padding: 12px 18px;
  border-radius: 10px;
  min-width: 160px;
}

#leaderboard h3 {
  text-align: center;
  margin-bottom: 8px;
  font-size: 14px;
  color: #0f0;
}

#ranking-list {
  list-style: none;
  padding: 0;
  font-size: 13px;
}

#ranking-list li {
  padding: 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

#ranking-list li::before {
  content: counter(rank) ". ";
  counter-increment: rank;
}

#ranking-list {
  counter-reset: rank;
}

#minimap {
  position: fixed;
  bottom: 15px;
  right: 15px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  overflow: hidden;
}

#powers {
  position: fixed;
  bottom: 15px;
  left: 15px;
  display: flex;
  gap: 10px;
}

.power-empty {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(0, 0, 0, 0.5);
  padding: 8px 14px;
  border-radius: 8px;
  font-style: italic;
}

.power-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid;
  border-radius: 8px;
  padding: 6px 10px;
  min-width: 140px;
}

.power-symbol {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 16px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.power-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.power-name {
  font-size: 13px;
  font-weight: bold;
  color: #fff;
}

.power-key {
  font-size: 11px;
  color: #0f0;
  font-family: 'Courier New', monospace;
}

.power-cost {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.7);
}

#minimap-canvas {
  background: rgba(0, 0, 0, 0.5);
}

/* Death screen */
#death-screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.8);
  z-index: 100;
  gap: 16px;
}

#death-screen h2 {
  font-size: 42px;
  color: #f44;
  text-shadow: 0 0 15px #f44;
}
