:root {
  --bg: #070907;
  --blood: #c43c2a;
  --blood-hot: #e85a3a;
  --bone: #e8dfc8;
  --mute: #8a9185;
  --font-display: "Bebas Neue", Impact, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  font-family: var(--font-body);
  color: var(--bone);
  user-select: none;
  -webkit-user-select: none;
}

.page-play {
  position: relative;
}

#game {
  display: block;
  width: 100vw;
  height: 100vh;
  background: #0a0e0b;
  cursor: crosshair;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at center, rgba(20, 26, 22, 0.92), rgba(5, 7, 5, 0.96));
}

.overlay.hidden {
  display: none;
}

.panel {
  text-align: center;
  padding: 2rem 2.5rem;
  max-width: 420px;
}

.brand {
  font-family: var(--font-display);
  font-size: 3.5rem;
  letter-spacing: 0.06em;
  color: var(--blood);
  margin: 0 0 0.5rem;
  line-height: 0.95;
}

.panel h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.05em;
  margin: 0 0 0.75rem;
  font-weight: 400;
}

.hint {
  color: var(--mute);
  margin: 0 0 1.75rem;
  font-size: 0.95rem;
}

.btn-start {
  display: inline-block;
  border: 2px solid var(--blood-hot);
  background: var(--blood);
  color: var(--bone);
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  padding: 0.75rem 1.8rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn-start:hover {
  background: var(--blood-hot);
  color: #050705;
  transform: translateY(-2px);
}

.back-link {
  display: block;
  margin-top: 1.25rem;
  color: var(--mute);
  text-decoration: none;
  font-size: 0.9rem;
}

.back-link:hover {
  color: var(--bone);
}

.hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 7, 5, 0.75), transparent);
  font-size: 0.85rem;
}

.hud.hidden {
  display: none;
}

.hud-left,
.hud-right {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 120px;
}

.hud-right {
  text-align: right;
  align-items: flex-end;
}

.hud-center {
  flex: 1;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
}

.hp-bar,
.nuke-bar {
  height: 10px;
  background: rgba(232, 223, 200, 0.15);
  border: 1px solid rgba(232, 223, 200, 0.25);
  overflow: hidden;
}

.nuke-bar {
  height: 8px;
  border-color: rgba(255, 200, 60, 0.35);
}

.hp-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #8b1e14, var(--blood-hot));
  transition: width 0.15s ease;
}

.nuke-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #8a4a00, #ffcc33);
  transition: width 0.12s linear;
}

.nuke-fill.ready {
  background: linear-gradient(90deg, #ff8800, #ffe066);
  box-shadow: 0 0 8px rgba(255, 180, 40, 0.55);
}

.hud-nuke {
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  font-size: 0.95rem;
  text-align: center;
  color: #ffcc66;
}

#hud-wave,
#hud-monster {
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  font-size: 1.15rem;
}

#hud-monster {
  color: var(--blood-hot);
}
