/* === Zombie Horde: Last Stand — Styles === */

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

body {
  background: #0a0a0f;
  overflow: hidden;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #e0e0e0;
  cursor: crosshair;
}

/* Canvas */
#gameCanvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  display: block;
}

/* Overlays */
.overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  background: rgba(5, 5, 10, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.overlay.hidden { display: none; }

/* === Main Menu === */
.menu-container {
  text-align: center;
  max-width: 480px;
  width: 90%;
  animation: fadeInUp 0.5s ease-out;
}
.menu-title {
  font-size: 3.8rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  line-height: 1;
  color: #fff;
  text-shadow: 0 0 40px rgba(0,200,80,0.3);
  margin-bottom: 0.1em;
}
.menu-subtitle {
  font-size: 1.4rem;
  font-weight: 300;
  letter-spacing: 0.5em;
  color: #888;
  margin-bottom: 0.8em;
}
.accent-red { color: #e53935; text-shadow: 0 0 30px rgba(229,57,53,0.4); }

.menu-divider {
  width: 60%;
  height: 1px;
  margin: 0 auto 1.5em;
  background: linear-gradient(90deg, transparent, #444, transparent);
}

.btn {
  display: inline-block;
  padding: 14px 48px;
  font-size: 1.2rem;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.05em;
  font-family: inherit;
}
.btn-play {
  background: linear-gradient(135deg, #2e7d32, #1b5e20);
  color: #fff;
  box-shadow: 0 4px 20px rgba(46,125,50,0.3);
}
.btn-play:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(46,125,50,0.5);
  background: linear-gradient(135deg, #388e3c, #2e7d32);
}
.btn-play:active { transform: translateY(0); }

.btn-secondary {
  background: rgba(255,255,255,0.08);
  color: #aaa;
  border: 1px solid rgba(255,255,255,0.12);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.14);
  color: #ddd;
}

.menu-controls {
  margin-top: 1.2em;
  display: flex;
  justify-content: center;
  gap: 1.5em;
  font-size: 0.75rem;
  color: #666;
  letter-spacing: 0.04em;
}
.menu-controls span { white-space: nowrap; }

/* === Leaderboard === */
.leaderboard-section {
  margin-top: 2em;
  max-height: 260px;
  overflow-y: auto;
}
.lb-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #aaa;
  letter-spacing: 0.08em;
  margin-bottom: 0.6em;
}
.lb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  font-family: 'Courier New', monospace;
}
.lb-table th {
  color: #666;
  font-weight: 600;
  padding: 6px 8px;
  border-bottom: 1px solid #333;
  text-align: left;
}
.lb-table th:first-child,
.lb-table td:first-child { text-align: center; width: 30px; }
.lb-table td {
  padding: 5px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: #ccc;
}
.lb-table tr:nth-child(1) td { color: #ffd700; }
.lb-table tr:nth-child(2) td { color: #c0c0c0; }
.lb-table tr:nth-child(3) td { color: #cd7f32; }
.lb-empty {
  font-size: 0.75rem;
  color: #555;
  margin-top: 0.8em;
}

/* === Game Over === */
.gameover-container {
  text-align: center;
  max-width: 420px;
  width: 90%;
  animation: fadeInUp 0.4s ease-out;
}
.gameover-title {
  font-size: 3.2rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  margin-bottom: 0.6em;
  color: #fff;
}
.gameover-stats {
  margin-bottom: 1.5em;
}
.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 20px;
  font-size: 1.05rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.stat-label { color: #888; }
.stat-value {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  color: #fff;
}

.name-input-section {
  margin-bottom: 1.2em;
}
.name-input-section label {
  display: block;
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 0.4em;
}
#nameInput {
  width: 100%;
  padding: 10px 16px;
  font-size: 1rem;
  font-family: 'Courier New', monospace;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  color: #fff;
  outline: none;
  text-align: center;
  letter-spacing: 0.05em;
}
#nameInput:focus {
  border-color: #2e7d32;
  box-shadow: 0 0 12px rgba(46,125,50,0.25);
}
#nameInput::placeholder { color: #555; }

.gameover-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gameover-buttons .btn { width: 100%; }

/* === Animations === */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }
