@font-face {
  font-family: 'Silkscreen';
  src: url('../assets/fonts/Silkscreen-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Silkscreen';
  src: url('../assets/fonts/Silkscreen-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #100D18;
  --dark: #21152F;
  --purple: #9B4DFF;
  --pink: #FF287F;
  --cyan: #35E0E8;
  --blood: #F04452;
  --orange: #FF9A3C;
  --hi: #FFE6C7;
  --black: #08060E;
  --font: 'Silkscreen', monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--black);
  color: var(--hi);
  font-family: var(--font);
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#app {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 40%, #160f24 0%, #08060E 70%),
    #08060E;
}

#game {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: #08060E;
  box-shadow:
    0 0 0 1px rgba(155, 77, 255, 0.22),
    0 0 90px rgba(255, 40, 127, 0.07),
    0 0 200px rgba(155, 77, 255, 0.05);
}

body.in-game, body.in-game #game { cursor: none; }

/* Fatal error surface (boot failures, uncaught runtime errors) */
.fatal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 32px;
  background: rgba(8, 6, 14, 0.96);
  text-align: center;
}
.fatal-title {
  font-size: clamp(20px, 2.6vw, 34px);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--blood);
  text-shadow: 0 0 24px rgba(240, 68, 82, 0.55);
}
.fatal-msg {
  max-width: min(760px, 92vw);
  max-height: 46vh;
  overflow: auto;
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(240, 68, 82, 0.35);
  background: rgba(16, 13, 24, 0.9);
  color: var(--hi);
  font-family: monospace;
  font-size: 12px;
  line-height: 1.6;
  text-align: left;
  white-space: pre-wrap;
}
.fatal-hint {
  font-size: 8px;
  letter-spacing: 0.24em;
  color: rgba(255, 230, 199, 0.4);
}

.hidden { display: none !important; }

/* --------------------------------------------------------------------------
   CRT / scanlines
   -------------------------------------------------------------------------- */
.fx-scanlines {
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.22) 0px,
    rgba(0, 0, 0, 0.22) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: multiply;
  opacity: 0.55;
}

/* --------------------------------------------------------------------------
   HUD
   -------------------------------------------------------------------------- */
#hud {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.7);
}

.hud-top {
  position: absolute;
  top: clamp(10px, 2vh, 24px);
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 12px;
  padding: 0 clamp(14px, 3vw, 44px);
}

.hud-block { min-width: 150px; }
.hud-kills { text-align: right; }

.hud-label {
  font-size: clamp(7px, 0.72vw, 10px);
  letter-spacing: 0.24em;
  color: rgba(255, 230, 199, 0.48);
  margin-bottom: 3px;
}

.hud-main {
  font-size: clamp(12px, 1.15vw, 17px);
  font-weight: 700;
  color: var(--hi);
  line-height: 1.1;
}

.hud-sub {
  font-size: clamp(7px, 0.68vw, 9px);
  letter-spacing: 0.14em;
  color: rgba(255, 230, 199, 0.55);
  margin-top: 4px;
}

.hud-weapon-line {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

#hud-weapon.melee { color: var(--pink); }

.hud-ammo {
  font-size: clamp(18px, 1.9vw, 28px);
  font-weight: 700;
  color: var(--cyan);
  line-height: 0.9;
  text-shadow: 0 0 14px rgba(53, 224, 232, 0.55);
}
.hud-ammo.low { color: var(--blood); text-shadow: 0 0 14px rgba(240, 68, 82, 0.6); }
.hud-reserve {
  font-size: 0.55em;
  color: rgba(255, 230, 199, 0.45);
  text-shadow: none;
}

.hud-reload {
  width: 84px;
  height: 3px;
  margin-top: 7px;
  background: rgba(255, 230, 199, 0.15);
  overflow: hidden;
}
.hud-reload i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--pink);
  box-shadow: 0 0 8px var(--pink);
}

.hud-objective {
  text-align: center;
  padding-top: 2px;
  min-width: 260px;
}
.hud-objective .hud-main {
  font-size: clamp(11px, 1vw, 15px);
  letter-spacing: 0.16em;
  color: var(--hi);
}
.hud-objective .hud-sub { color: var(--pink); letter-spacing: 0.2em; }

.hud-kills .hud-main { font-size: clamp(16px, 1.6vw, 24px); }
.hud-kills .hud-main b { color: var(--pink); font-weight: 700; }

.hud-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(12px, 2.4vh, 26px);
  padding: 0 clamp(14px, 3vw, 44px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.hud-score {
  display: flex;
  align-items: baseline;
  gap: 9px;
}
.hud-score .hud-label { margin: 0; }
.hud-score b {
  font-size: clamp(15px, 1.5vw, 22px);
  color: var(--hi);
  letter-spacing: 0.06em;
}

.hud-status {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  font-size: clamp(8px, 0.78vw, 11px);
  letter-spacing: 0.18em;
  color: var(--orange);
  white-space: nowrap;
  text-shadow: 0 0 10px rgba(255, 154, 60, 0.55);
}
.hud-status.flash { animation: statusFlash 0.4s steps(2, end) 2; }
@keyframes statusFlash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

.hud-combo {
  font-size: clamp(13px, 1.3vw, 19px);
  font-weight: 700;
  color: var(--pink);
  letter-spacing: 0.1em;
  text-shadow: 0 0 16px rgba(255, 40, 127, 0.75);
}
.hud-combo.pop { animation: comboPop 0.22s ease-out; }
@keyframes comboPop {
  0% { transform: scale(1.55); color: var(--hi); }
  100% { transform: scale(1); }
}

/* --------------------------------------------------------------------------
   Crosshair
   -------------------------------------------------------------------------- */
#crosshair {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 12;
  width: 0;
  height: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s linear;
  will-change: transform;
}
#crosshair.visible { opacity: 1; }
.ch-inner { position: absolute; left: 0; top: 0; }
.ch-inner .dot {
  position: absolute;
  left: -1px; top: -1px;
  width: 2px; height: 2px;
  background: var(--hi);
  box-shadow: 0 0 5px var(--pink);
}
.ch-inner i {
  position: absolute;
  background: var(--pink);
  box-shadow: 0 0 6px rgba(255, 40, 127, 0.8);
}
.ch-inner .l { left: -12px; top: 0; width: 7px; height: 1px; }
.ch-inner .r { left: 5px; top: 0; width: 7px; height: 1px; }
.ch-inner .t { left: 0; top: -12px; width: 1px; height: 7px; }
.ch-inner .b { left: 0; top: 5px; width: 1px; height: 7px; }
#crosshair.kick .ch-inner { animation: chKick 0.12s ease-out; }
@keyframes chKick {
  0% { transform: scale(1.5); }
  100% { transform: scale(1); }
}

/* --------------------------------------------------------------------------
   Screens / overlays
   -------------------------------------------------------------------------- */
#screens {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  pointer-events: auto;
  animation: screenIn 0.18s ease-out;
}
.screen.active { display: flex; }
@keyframes screenIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.scrim {
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(33, 21, 47, 0.55), rgba(8, 6, 14, 0.9) 70%),
    rgba(8, 6, 14, 0.55);
  backdrop-filter: blur(2px);
}

/* ---------- Menu ---------- */
.menu-screen {
  background:
    linear-gradient(90deg, rgba(8, 6, 14, 0.94) 0%, rgba(8, 6, 14, 0.82) 42%, rgba(8, 6, 14, 0.28) 100%),
    radial-gradient(ellipse at 18% 48%, rgba(155, 77, 255, 0.14), transparent 55%);
}

.menu-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.55fr);
  align-items: center;
  gap: clamp(20px, 5vw, 80px);
  width: 100%;
  max-width: 1320px;
  padding: clamp(20px, 5vw, 70px);
}

.menu-main { max-width: 640px; }

.logo {
  font-size: clamp(48px, 8.6vw, 120px);
  line-height: 0.84;
  letter-spacing: -0.015em;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  filter: saturate(1.1);
}
.logo .neon-pink {
  color: var(--pink);
  text-shadow:
    0 0 6px rgba(255, 40, 127, 0.9),
    0 0 22px rgba(255, 40, 127, 0.55),
    0 0 64px rgba(255, 40, 127, 0.35);
  animation: neonFlicker 7s infinite;
}
.logo .neon-cyan {
  color: var(--cyan);
  text-shadow:
    0 0 6px rgba(53, 224, 232, 0.9),
    0 0 22px rgba(53, 224, 232, 0.5),
    0 0 64px rgba(53, 224, 232, 0.3);
}
@keyframes neonFlicker {
  0%, 91%, 94%, 100% { opacity: 1; }
  92% { opacity: 0.55; }
  93% { opacity: 0.9; }
}

.tagline {
  margin-top: clamp(10px, 1.6vw, 18px);
  font-size: clamp(8px, 0.85vw, 11px);
  letter-spacing: 0.34em;
  color: rgba(255, 230, 199, 0.62);
}
.tagline span { color: var(--hi); }
.tagline em { color: var(--pink); font-style: normal; }

.menu-nav {
  margin-top: clamp(22px, 3.5vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: min(430px, 100%);
}

.btn {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(255, 230, 199, 0.14);
  border-left: 3px solid var(--pink);
  background: linear-gradient(90deg, rgba(16, 13, 24, 0.72), rgba(16, 13, 24, 0.25));
  color: var(--hi);
  font-family: var(--font);
  font-size: clamp(10px, 0.95vw, 13px);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
  transition: background 0.12s ease, color 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
}
.btn .num {
  color: rgba(255, 230, 199, 0.35);
  font-size: 0.85em;
  transition: color 0.12s;
}
.btn .txt { flex: 1; }
.btn .arrow {
  color: var(--pink);
  font-size: 1.2em;
  transition: color 0.12s, transform 0.12s;
}
.btn:hover, .btn:focus-visible {
  background: var(--pink);
  color: var(--black);
  border-color: transparent;
  box-shadow: 0 0 28px rgba(255, 40, 127, 0.45), 0 0 70px rgba(255, 40, 127, 0.18);
  transform: translateX(5px);
  outline: none;
}
.btn:hover .num, .btn:hover .arrow, .btn:focus-visible .num, .btn:focus-visible .arrow {
  color: var(--black);
}
.btn:hover .arrow { transform: translateX(3px); }
.btn:active { transform: translateX(2px) translateY(1px); }

.btn.ghost { border-left-color: rgba(255, 230, 199, 0.28); }
.btn.ghost:hover { background: rgba(255, 230, 199, 0.12); color: var(--hi); box-shadow: none; }

.btn.back-btn { width: auto; margin-top: 26px; padding-right: 30px; }

.menu-note {
  margin-top: clamp(18px, 3vw, 30px);
  font-size: 7px;
  letter-spacing: 0.28em;
  color: rgba(255, 230, 199, 0.32);
}

.menu-side {
  justify-self: end;
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: min(280px, 100%);
}

.side-card {
  position: relative;
  border: 1px solid rgba(155, 77, 255, 0.4);
  background: rgba(16, 13, 24, 0.68);
  padding: 20px;
  box-shadow: inset 0 0 50px rgba(155, 77, 255, 0.06);
}
.side-card::before, .side-card::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid var(--pink);
}
.side-card::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.side-card::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.side-title {
  font-size: 8px;
  letter-spacing: 0.32em;
  color: var(--pink);
  margin-bottom: 12px;
}
.side-head {
  font-size: 14px;
  line-height: 1.5;
  color: var(--hi);
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}
.side-head span { font-size: 8px; color: var(--cyan); letter-spacing: 0.18em; }
.side-card p {
  font-size: 8px;
  line-height: 2;
  letter-spacing: 0.12em;
  color: rgba(255, 230, 199, 0.55);
  margin: 0;
}
.side-stamp {
  margin-top: 16px;
  display: inline-block;
  font-size: 7px;
  letter-spacing: 0.2em;
  color: var(--orange);
  border: 1px dashed rgba(255, 154, 60, 0.55);
  padding: 4px 8px;
  transform: rotate(-2deg);
}
.side-controls {
  font-size: 7px;
  line-height: 2;
  letter-spacing: 0.14em;
  color: rgba(255, 230, 199, 0.35);
}
.side-controls span { display: block; color: rgba(255, 230, 199, 0.22); }

/* ---------- Panels ---------- */
.panel {
  position: relative;
  width: min(760px, 94vw);
  max-height: 89vh;
  overflow-y: auto;
  padding: clamp(22px, 4vw, 42px);
  background:
    linear-gradient(180deg, rgba(33, 21, 47, 0.94), rgba(12, 9, 20, 0.97));
  border: 1px solid rgba(155, 77, 255, 0.42);
  box-shadow:
    0 0 0 1px rgba(8, 6, 14, 0.8),
    0 30px 90px rgba(0, 0, 0, 0.65),
    inset 0 0 80px rgba(155, 77, 255, 0.05);
  scrollbar-width: thin;
  scrollbar-color: var(--purple) transparent;
}
.panel::before {
  content: '';
  position: absolute;
  left: 0; top: 0;
  width: 70px; height: 2px;
  background: var(--pink);
  box-shadow: 0 0 16px var(--pink);
}
.panel::-webkit-scrollbar { width: 6px; }
.panel::-webkit-scrollbar-thumb { background: var(--purple); }

.eyebrow {
  font-size: 8px;
  letter-spacing: 0.3em;
  color: var(--pink);
  margin-bottom: 8px;
}

.panel h2 {
  margin: 0 0 24px;
  font-size: clamp(20px, 2.6vw, 32px);
  letter-spacing: 0.08em;
  color: var(--hi);
  line-height: 1.1;
  text-shadow: 0 0 26px rgba(255, 230, 199, 0.12);
}

.panel-note {
  margin: 22px 0 0;
  font-size: 8px;
  line-height: 1.9;
  letter-spacing: 0.08em;
  color: rgba(255, 230, 199, 0.42);
  max-width: 54ch;
}

.control-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 26px;
}
.key-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 230, 199, 0.07);
  font-size: 9px;
  letter-spacing: 0.1em;
}
.key {
  min-width: 74px;
  padding: 5px 7px;
  text-align: center;
  color: var(--cyan);
  border: 1px solid rgba(53, 224, 232, 0.35);
  background: rgba(53, 224, 232, 0.04);
  font-size: 8px;
  letter-spacing: 0.14em;
}
.act { color: rgba(255, 230, 199, 0.72); }

/* ---------- Settings ---------- */
.setting-row {
  display: grid;
  grid-template-columns: 150px 1fr 48px;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 230, 199, 0.07);
  font-size: 9px;
  letter-spacing: 0.14em;
}
.setting-row label, .setting-row > span { color: rgba(255, 230, 199, 0.75); }
.set-val { color: var(--cyan); text-align: right; font-size: 8px; }

input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--purple), var(--pink));
  outline: none;
  cursor: pointer;
}
input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 16px;
  background: var(--hi);
  border: 1px solid var(--black);
  box-shadow: 0 0 12px rgba(255, 40, 127, 0.75);
  cursor: pointer;
}
input[type='range']::-moz-range-thumb {
  width: 12px;
  height: 16px;
  border: 1px solid var(--black);
  border-radius: 0;
  background: var(--hi);
  box-shadow: 0 0 12px rgba(255, 40, 127, 0.75);
  cursor: pointer;
}

.toggle-row { grid-template-columns: 1fr auto; }
.toggle {
  position: relative;
  width: 46px;
  height: 20px;
  padding: 0;
  background: rgba(255, 230, 199, 0.1);
  border: 1px solid rgba(255, 230, 199, 0.25);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.toggle span {
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  background: rgba(255, 230, 199, 0.6);
  transition: transform 0.12s, background 0.12s;
}
.toggle.on { background: rgba(255, 40, 127, 0.25); border-color: var(--pink); }
.toggle.on span { transform: translateX(24px); background: var(--pink); box-shadow: 0 0 10px var(--pink); }

/* ---------- Pause ---------- */
.pause-panel { width: min(430px, 94vw); }
.pause-nav { display: flex; flex-direction: column; gap: 5px; }
.panel-hint {
  margin-top: 22px;
  font-size: 7px;
  letter-spacing: 0.24em;
  color: rgba(255, 230, 199, 0.3);
}

/* ---------- Death ---------- */
.death-screen {
  background:
    radial-gradient(ellipse at 50% 42%, rgba(240, 68, 82, 0.18), transparent 55%),
    rgba(8, 6, 14, 0.88);
}
.death-wrap, .victory-wrap {
  width: min(820px, 92vw);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.death-rule {
  width: min(420px, 70vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blood), transparent);
  margin-bottom: 18px;
}
.big-red {
  margin: 0;
  font-size: clamp(46px, 11vw, 132px);
  line-height: 0.9;
  letter-spacing: 0.02em;
  color: var(--blood);
  text-shadow:
    0 0 8px rgba(240, 68, 82, 0.9),
    0 0 32px rgba(240, 68, 82, 0.5),
    0 0 100px rgba(240, 68, 82, 0.3);
  animation: deathShake 0.5s steps(2, end) 1;
}
@keyframes deathShake {
  0% { transform: translateX(6px); opacity: 0.4; }
  35% { transform: translateX(-4px); }
  70% { transform: translateX(2px); }
  100% { transform: translateX(0); }
}
.death-line {
  margin-top: 12px;
  font-size: 8px;
  letter-spacing: 0.3em;
  color: rgba(255, 230, 199, 0.45);
}
.death-stats {
  display: flex;
  gap: clamp(20px, 5vw, 60px);
  margin: 30px 0 26px;
}
.death-stats div { display: flex; flex-direction: column; gap: 6px; }
.death-stats span {
  font-size: 7px;
  letter-spacing: 0.24em;
  color: rgba(255, 230, 199, 0.4);
}
.death-stats b {
  font-size: clamp(16px, 1.8vw, 24px);
  color: var(--hi);
  letter-spacing: 0.06em;
}
.death-actions, .victory-actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: min(380px, 100%);
}
.death-actions .btn, .victory-actions .btn { justify-content: flex-start; }

/* ---------- Victory ---------- */
.victory-screen {
  background:
    radial-gradient(ellipse at 50% 38%, rgba(53, 224, 232, 0.13), transparent 58%),
    rgba(8, 6, 14, 0.88);
}
.victory-title {
  margin: 4px 0 0;
  font-size: clamp(30px, 6vw, 76px);
  line-height: 1;
  letter-spacing: 0.03em;
  color: var(--cyan);
  text-shadow:
    0 0 8px rgba(53, 224, 232, 0.8),
    0 0 34px rgba(53, 224, 232, 0.45),
    0 0 100px rgba(53, 224, 232, 0.25);
}
.victory-sub {
  margin-top: 12px;
  font-size: 8px;
  letter-spacing: 0.28em;
  color: rgba(255, 230, 199, 0.45);
}
.victory-body {
  display: flex;
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  margin: clamp(24px, 4vw, 40px) 0;
}
.grade-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.grade-label {
  font-size: 7px;
  letter-spacing: 0.3em;
  color: rgba(255, 230, 199, 0.4);
}
.grade {
  width: clamp(96px, 12vw, 132px);
  height: clamp(96px, 12vw, 132px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(48px, 7vw, 82px);
  font-weight: 700;
  color: var(--hi);
  border: 2px solid var(--hi);
  box-shadow:
    0 0 24px rgba(255, 230, 199, 0.22),
    inset 0 0 40px rgba(255, 230, 199, 0.05);
  transform: rotate(-2deg);
}
.grade[data-grade='S'] { color: var(--hi); border-color: var(--hi); }
.grade[data-grade='A'] { color: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 26px rgba(53, 224, 232, 0.35), inset 0 0 40px rgba(53, 224, 232, 0.06); }
.grade[data-grade='B'] { color: var(--purple); border-color: var(--purple); box-shadow: 0 0 26px rgba(155, 77, 255, 0.35), inset 0 0 40px rgba(155, 77, 255, 0.06); }
.grade[data-grade='C'] { color: var(--orange); border-color: var(--orange); box-shadow: 0 0 26px rgba(255, 154, 60, 0.32), inset 0 0 40px rgba(255, 154, 60, 0.06); }
.grade[data-grade='D'] { color: var(--blood); border-color: var(--blood); box-shadow: 0 0 26px rgba(240, 68, 82, 0.32), inset 0 0 40px rgba(240, 68, 82, 0.06); }

.victory-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 34px;
  text-align: left;
  min-width: 250px;
}
.victory-stats div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 230, 199, 0.08);
  padding: 6px 0;
}
.victory-stats .wide { grid-column: 1 / -1; }
.victory-stats span {
  font-size: 7px;
  letter-spacing: 0.18em;
  color: rgba(255, 230, 199, 0.42);
}
.victory-stats b {
  font-size: clamp(12px, 1.2vw, 16px);
  color: var(--hi);
  letter-spacing: 0.06em;
}
.victory-stats .wide b { color: var(--pink); font-size: clamp(15px, 1.5vw, 20px); }

/* ---------- Credits ---------- */
.credits-panel { width: min(840px, 94vw); }
.credits-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
.credit-role {
  font-size: 7px;
  letter-spacing: 0.24em;
  color: var(--pink);
  margin: 16px 0 5px;
}
.credit-role:first-child { margin-top: 0; }
.credits-grid p {
  margin: 0;
  font-size: 8px;
  line-height: 1.95;
  letter-spacing: 0.06em;
  color: rgba(255, 230, 199, 0.6);
}
.credits-grid .dim { color: rgba(255, 230, 199, 0.35); }

/* --------------------------------------------------------------------------
   Toast / boot
   -------------------------------------------------------------------------- */
#toast {
  position: fixed;
  left: 50%;
  top: 15%;
  transform: translateX(-50%);
  z-index: 25;
  padding: 10px 20px;
  background: rgba(8, 6, 14, 0.9);
  border: 1px solid var(--pink);
  color: var(--pink);
  font-size: clamp(9px, 0.95vw, 12px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  box-shadow: 0 0 30px rgba(255, 40, 127, 0.3);
  pointer-events: none;
  white-space: nowrap;
}
#toast.pop { animation: toastPop 0.24s ease-out; }
@keyframes toastPop {
  0% { transform: translateX(-50%) scale(1.12); opacity: 0.3; }
  100% { transform: translateX(-50%) scale(1); opacity: 1; }
}

#boot {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--black);
  transition: opacity 0.45s ease, visibility 0.45s;
}
#boot.done { opacity: 0; visibility: hidden; pointer-events: none; }
.boot-logo {
  font-size: clamp(26px, 4.5vw, 56px);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.boot-sub {
  font-size: 8px;
  letter-spacing: 0.34em;
  color: rgba(255, 230, 199, 0.45);
}
.boot-bar {
  width: min(260px, 60vw);
  height: 2px;
  background: rgba(255, 230, 199, 0.12);
  overflow: hidden;
}
.boot-bar i {
  display: block;
  width: 40%;
  height: 100%;
  background: var(--pink);
  box-shadow: 0 0 12px var(--pink);
  animation: bootSlide 0.9s ease-in-out infinite alternate;
}
@keyframes bootSlide {
  from { transform: translateX(-10%); }
  to { transform: translateX(160%); }
}

.neon-pink { color: var(--pink); }
.neon-cyan { color: var(--cyan); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .menu-grid { grid-template-columns: 1fr; }
  .menu-side { display: none; }
  .menu-main { max-width: none; }
  .hud-objective { min-width: 0; }
  .hud-block { min-width: 0; }
}

@media (max-width: 720px) {
  .hud-top { grid-template-columns: 1fr auto; }
  .hud-objective { display: none; }
  .hud-kills .hud-sub { display: none; }
  .control-grid { grid-template-columns: 1fr; }
  .credits-grid { grid-template-columns: 1fr; }
  .victory-body { flex-direction: column; gap: 20px; }
  .victory-stats { min-width: 0; width: 100%; }
  .death-stats { gap: 24px; }
  .setting-row { grid-template-columns: 110px 1fr 44px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
