/* ===== DEAD SECTOR — dark military zombie shooter ===== */
:root {
  --bg: #0a0c0a;
  --panel: #12161a;
  --ink: #c8d6c8;
  --dim: #7a8a7a;
  --accent: #7dd35f;     /* toxic green */
  --accent2: #ffb028;    /* amber */
  --danger: #ff4040;
  --hp: #4caf50;
  --armor: #3da9fc;
  --mono: "Courier New", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%; height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

#app { position: fixed; inset: 0; }

/* ===== Screens ===== */
.screen {
  position: absolute; inset: 0;
  display: none;
  align-items: center; justify-content: center;
}
.screen.active { display: flex; }

#screen-game.active { display: block; }

/* ===== Menu ===== */
.menu-content {
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 36px;
  animation: fadeIn .5s ease;
}
.title-block { line-height: 1; }
.title-main {
  font-size: clamp(44px, 9vw, 96px);
  font-weight: bold;
  letter-spacing: 8px;
  color: var(--accent);
  text-shadow: 0 0 18px rgba(125,211,95,.55), 0 4px 0 #1d3a14;
}
.title-sub {
  margin-top: 14px;
  font-size: clamp(12px, 2.4vw, 18px);
  letter-spacing: 6px;
  color: var(--danger);
  text-shadow: 0 0 10px rgba(255,64,64,.5);
}
.menu-buttons { display: flex; flex-direction: column; gap: 14px; width: 280px; }
.menu-foot { color: var(--dim); font-size: 12px; letter-spacing: 1px; }

/* ===== Buttons ===== */
.btn {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: bold;
  letter-spacing: 3px;
  padding: 14px 22px;
  border: 2px solid var(--accent);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  transition: all .12s ease;
  text-transform: uppercase;
}
.btn:hover { background: var(--accent); color: #0a0c0a; box-shadow: 0 0 16px rgba(125,211,95,.6); }
.btn:active { transform: translateY(1px); }
.btn-secondary { border-color: var(--dim); color: var(--dim); }
.btn-secondary:hover { background: var(--dim); color: #0a0c0a; box-shadow: none; }
.btn-primary { border-color: var(--accent); }
.btn-back { margin-top: 24px; }

/* ===== Panels (howto / dashboard / gameover) ===== */
.panel {
  background: var(--panel);
  border: 2px solid #25302a;
  padding: 36px 44px;
  width: min(560px, 92vw);
  text-align: center;
  box-shadow: 0 0 40px rgba(0,0,0,.7);
  animation: fadeIn .35s ease;
}
.panel-title {
  font-size: 26px; letter-spacing: 5px; color: var(--accent);
  margin-bottom: 26px;
}
.panel-title.danger { color: var(--danger); text-shadow: 0 0 14px rgba(255,64,64,.6); }

.howto-list { list-style: none; text-align: left; line-height: 2; font-size: 15px; }
.howto-list b { color: var(--accent2); }
.howto-notes { margin-top: 22px; text-align: left; line-height: 1.7; font-size: 13.5px; color: var(--dim); }
.howto-notes .hl { color: var(--ink); }
.hl { color: var(--accent); }

/* ===== Scores table ===== */
.scores-table { width: 100%; border-collapse: collapse; font-size: 17px; }
.scores-table th, .scores-table td { padding: 10px 12px; text-align: left; }
.scores-table th { color: var(--dim); border-bottom: 2px solid #25302a; letter-spacing: 2px; font-size: 13px; }
.scores-table td { border-bottom: 1px solid #1c241f; }
.scores-table tr:first-child td { color: var(--accent2); font-weight: bold; }
.scores-table td:last-child, .scores-table th:last-child { text-align: right; }
.scores-empty td { color: var(--dim); text-align: center; font-style: italic; }

/* ===== Game canvas ===== */
#game-canvas { display: block; width: 100%; height: 100%; background: #050605; cursor: crosshair; }

/* ===== HUD ===== */
#hud { position: absolute; inset: 0; pointer-events: none; font-weight: bold; }
.hud-top-left { position: absolute; top: 18px; left: 18px; display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: flex; align-items: center; gap: 8px; }
.bar-label { width: 24px; font-size: 13px; color: var(--dim); }
.bar {
  width: 220px; height: 16px; background: #1a201c;
  border: 1px solid #2c382f; overflow: hidden;
}
.bar-fill { height: 100%; width: 100%; transition: width .12s linear; }
.bar-fill.hp { background: linear-gradient(90deg, #2e7d32, #66bb6a); }
.bar-fill.armor { background: linear-gradient(90deg, #1565c0, #42a5f5); }
.bar-fill.broken { background: #5a1414; }
.bar-fill.locked { background: #2a2a2a; }
.bar-text { font-size: 13px; width: 34px; }

.hud-top-right { position: absolute; top: 18px; right: 18px; text-align: right; }
.hud-round { font-size: 20px; letter-spacing: 3px; color: var(--accent); }
.hud-score { font-size: 32px; color: var(--accent2); text-shadow: 0 0 10px rgba(255,176,40,.4); }
.hud-zcount { font-size: 14px; color: var(--danger); margin-top: 2px; }

.hud-bottom { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); text-align: center; }
.weapon-name { font-size: 18px; letter-spacing: 3px; color: var(--ink); }
.ammo-text { font-size: 26px; color: var(--accent); margin-top: 2px; }
.ammo-text.low { color: var(--danger); }
.reload-hint { font-size: 13px; color: var(--accent2); height: 18px; letter-spacing: 2px; }

.mute-indicator { position: absolute; bottom: 18px; right: 18px; font-size: 13px; color: var(--dim); }

/* ===== Round banner ===== */
.round-banner {
  position: absolute; top: 38%; left: 50%; transform: translate(-50%,-50%);
  font-size: clamp(34px, 7vw, 64px); letter-spacing: 8px; font-weight: bold;
  color: var(--accent); text-shadow: 0 0 24px rgba(125,211,95,.6);
  opacity: 0; pointer-events: none; text-align: center;
}
.round-banner.show { animation: bannerPop 2.6s ease forwards; }
.round-banner .sub { display: block; font-size: 18px; letter-spacing: 4px; color: var(--accent2); margin-top: 10px; }
@keyframes bannerPop {
  0% { opacity: 0; transform: translate(-50%,-50%) scale(.7); }
  15% { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(1.05); }
}

/* ===== Overlays ===== */
.overlay {
  position: absolute; inset: 0; display: none;
  align-items: center; justify-content: center;
  background: rgba(5,8,5,.82); pointer-events: auto;
}
.overlay.show { display: flex; }
.overlay-box { text-align: center; display: flex; flex-direction: column; gap: 14px; width: 260px; }
.overlay-title { font-size: 38px; letter-spacing: 6px; color: var(--accent); margin-bottom: 14px; }

/* ===== Game over ===== */
.gameover-stats { margin-bottom: 24px; }
.gameover-stats > div:first-child { color: var(--dim); letter-spacing: 3px; font-size: 14px; }
.final-score { font-size: 56px; color: var(--accent2); text-shadow: 0 0 18px rgba(255,176,40,.5); }
.gameover-detail { color: var(--dim); font-size: 13px; margin-top: 6px; }
.name-entry { display: none; flex-direction: column; gap: 12px; align-items: center; margin-bottom: 22px; }
.name-entry.show { display: flex; }
.name-prompt { color: var(--accent); font-size: 14px; letter-spacing: 1px; }
#name-input {
  font-family: var(--mono); font-size: 22px; text-align: center; letter-spacing: 4px;
  text-transform: uppercase; padding: 10px 14px; width: 240px;
  background: #0a0c0a; border: 2px solid var(--accent); color: var(--accent); outline: none;
}
.gameover-buttons { display: flex; gap: 12px; justify-content: center; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
