:root {
  color-scheme: dark;
  font-family: "Oswald", "Avenir Next Condensed", "Trebuchet MS", sans-serif;
  background: #05060c;
  color: #f5f3ff;
  --ink: #f5f3ff;
  --muted: rgba(220, 225, 255, 0.68);
  --panel: rgba(12, 14, 24, 0.86);
  --panel-strong: rgba(14, 16, 30, 0.96);
  --accent: #ff7a59;
  --accent-2: #ff3d5a;
  --accent-3: #ffb15a;
  --stroke: rgba(160, 170, 210, 0.2);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(circle at 14% 10%, rgba(80, 140, 255, 0.2), transparent 50%),
    radial-gradient(circle at 82% 16%, rgba(200, 90, 210, 0.18), transparent 52%),
    radial-gradient(circle at 40% 0%, rgba(12, 20, 48, 0.85), transparent 55%),
    radial-gradient(circle at top, #0b0f20, #05070f 72%);
}

/* Full-screen atmospheric layers */
body::before {
  content: "";
  position: fixed;
  inset: -20%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  filter: blur(60px) saturate(1.3);
  background:
    radial-gradient(circle at 18% 30%, rgba(95, 150, 255, 0.18), transparent 58%),
    radial-gradient(circle at 75% 22%, rgba(255, 120, 210, 0.14), transparent 60%),
    radial-gradient(circle at 60% 78%, rgba(110, 255, 200, 0.1), transparent 62%),
    radial-gradient(circle at 25% 85%, rgba(255, 170, 120, 0.08), transparent 60%);
  animation: nebula-drift 34s ease-in-out infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.14;
  mix-blend-mode: screen;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(140, 220, 255, 0.06) 0px,
      rgba(140, 220, 255, 0.06) 1px,
      transparent 2px,
      transparent 7px
    ),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.06), transparent 55%);
  animation: scanline-drift 9.5s linear infinite;
}

@keyframes nebula-drift {
  0% { transform: translate3d(-2%, -1%, 0) scale(1.02); }
  100% { transform: translate3d(2%, 1%, 0) scale(1.05); }
}

@keyframes scanline-drift {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 0 220px, 0 0; }
}

.page {
  width: min(1320px, 96vw);
  padding: 26px 18px 40px;
  animation: pageIn 0.6s ease both;
  position: relative;
  z-index: 1;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(18, 26, 52, 0.94), rgba(8, 12, 26, 0.96));
  border: 1px solid rgba(120, 170, 255, 0.25);
  box-shadow:
    0 22px 52px rgba(0, 0, 0, 0.55),
    0 0 24px rgba(90, 140, 255, 0.18);
  backdrop-filter: blur(18px) saturate(190%);
}

.contract-bar {
  margin: 0 0 16px;
  padding: 14px 18px;
  border-radius: 16px;
  background: linear-gradient(140deg, rgba(24, 18, 34, 0.95), rgba(10, 12, 26, 0.94));
  border: 1px solid rgba(255, 120, 140, 0.45);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.5),
    0 0 16px rgba(255, 110, 140, 0.2);
  display: flex;
  gap: 14px;
  align-items: baseline;
  color: #f4d7cf;
  box-shadow: var(--shadow);
}

.contract-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 191, 166, 0.95);
  flex: 0 0 auto;
}

.contract-text {
  font-size: 18px;
  line-height: 1.35;
  font-weight: 600;
  color: #fff5ef;
  text-wrap: balance;
}

@media (max-width: 900px) {
  .contract-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .contract-text {
    font-size: 16px;
  }

  .in-game-hud {
    top: 8px;
    right: 8px;
  }

  .in-game-hud-item {
    min-width: 148px;
    padding: 7px 10px;
  }

  .in-game-hud-item strong {
    font-size: 17px;
  }
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 11px;
  margin: 0 0 6px;
  color: var(--muted);
}

h1 {
  font-size: clamp(28px, 4vw, 46px);
  margin: 0 0 4px;
}

.tagline {
  margin: 0;
  color: var(--muted);
}

.hud {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border-radius: 18px;
  background: rgba(10, 14, 28, 0.78);
  border: 1px solid rgba(140, 180, 255, 0.25);
  backdrop-filter: blur(18px) saturate(190%);
  box-shadow: 0 0 18px rgba(90, 150, 255, 0.15);
}

.hud-item {
  background: linear-gradient(145deg, rgba(18, 20, 32, 0.95), rgba(10, 12, 22, 0.92));
  border: 1px solid rgba(160, 170, 210, 0.28);
  padding: 12px 16px;
  min-width: 112px;
  border-radius: 14px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}

.hud-item.highlight {
  background: linear-gradient(140deg, rgba(255, 150, 110, 0.28), rgba(12, 14, 24, 0.92));
  border-color: rgba(255, 130, 90, 0.55);
  box-shadow:
    0 0 18px rgba(255, 61, 90, 0.35),
    inset 0 0 18px rgba(255, 120, 120, 0.12);
}

.hud-item.cash {
  background: linear-gradient(140deg, rgba(100, 170, 140, 0.22), rgba(12, 16, 26, 0.9));
  border-color: rgba(90, 170, 130, 0.45);
  box-shadow:
    0 0 18px rgba(100, 200, 150, 0.3),
    inset 0 0 18px rgba(110, 220, 170, 0.12);
}
.hud-item.cash .hud-value {
  color: #64c896;
}

.hud-item.round-cash {
  background: linear-gradient(140deg, rgba(255, 196, 118, 0.2), rgba(14, 16, 28, 0.92));
  border-color: rgba(255, 186, 106, 0.46);
}

.hud-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.hud-value {
  font-size: 20px;
  font-weight: 600;
}

#hudTimer.low {
  color: #ff3d5a;
}

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
}

.canvas-wrap {
  position: relative;
  width: 100%;
  border-radius: 22px;
  overflow: hidden;
  border: 2px solid rgba(110, 150, 220, 0.25);
  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.6),
    0 0 28px rgba(80, 120, 255, 0.18);
  background: radial-gradient(circle, rgba(18, 24, 40, 1) 0%, rgba(4, 6, 12, 1) 100%);
}

.canvas-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.22;
  pointer-events: none;
  z-index: 1;
  animation: star-drift 18s linear infinite;
}

.canvas-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 40%, rgba(120, 180, 255, 0.12), transparent 45%),
    radial-gradient(circle at 18% 70%, rgba(255, 120, 180, 0.1), transparent 55%),
    radial-gradient(circle at 80% 30%, rgba(120, 255, 220, 0.08), transparent 50%),
    linear-gradient(180deg, rgba(0,0,0,0.25), rgba(0,0,0,0.55));
  mix-blend-mode: screen;
  opacity: 0.7;
  pointer-events: none;
  z-index: 1;
}

.space-parallax {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.space-layer {
  position: absolute;
  inset: -30%;
  background-repeat: repeat;
  background-position: 0 0;
  will-change: background-position;
}

.space-layer--deep {
  background-image:
    radial-gradient(circle, rgba(196, 205, 225, 0.32) 0.7px, transparent 1.2px),
    radial-gradient(circle, rgba(190, 200, 220, 0.24) 0.5px, transparent 1px);
  background-size: 170px 170px, 240px 240px;
}

.space-layer--mid {
  background-image:
    radial-gradient(circle, rgba(145, 184, 255, 0.56) 1.1px, transparent 1.8px),
    radial-gradient(circle, rgba(105, 168, 255, 0.34) 0.9px, transparent 1.5px);
  background-size: 140px 140px, 210px 210px;
  filter: drop-shadow(0 0 4px rgba(77, 138, 255, 0.35));
}

.space-layer--close {
  background-image:
    radial-gradient(circle, rgba(245, 250, 255, 0.9) 1.7px, transparent 2.4px),
    radial-gradient(circle, rgba(193, 226, 255, 0.72) 1.2px, transparent 1.9px);
  background-size: 120px 120px, 180px 180px;
  filter: drop-shadow(0 0 8px rgba(180, 220, 255, 0.45));
}

.in-game-hud {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.in-game-hud-item {
  min-width: 180px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(160, 190, 255, 0.28);
  background: rgba(12, 16, 28, 0.7);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(15px);
  animation: hud-flicker 4.4s infinite;
}

.in-game-hud-item span {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(220, 240, 255, 0.9);
  text-shadow: 0 0 6px rgba(120, 200, 255, 0.4);
}

.in-game-hud-item strong {
  font-size: 20px;
  line-height: 1;
  color: #a9f3ff;
  font-family: "JetBrains Mono", "SFMono-Regular", "Consolas", monospace;
  letter-spacing: 0.04em;
  text-shadow: 0 0 5px currentColor;
}

.in-game-hud-item:nth-child(1) {
  border-color: rgba(255, 61, 90, 0.55);
  box-shadow: 0 0 18px rgba(255, 61, 90, 0.35);
}

.in-game-hud-item:nth-child(1) strong {
  color: #ff8fa1;
}

.in-game-hud-item:nth-child(2) {
  border-color: rgba(100, 200, 150, 0.55);
  box-shadow: 0 0 18px rgba(100, 200, 150, 0.35);
}

.in-game-hud-item:nth-child(2) strong {
  color: #7ff0b4;
}

.in-game-hud-item:nth-child(3) {
  border-color: rgba(255, 196, 118, 0.5);
  box-shadow: 0 0 16px rgba(255, 196, 118, 0.32);
}

.in-game-hud-item:nth-child(3) strong {
  color: #ffd8a3;
}

@keyframes hud-flicker {
  0%, 94%, 100% { opacity: 1; }
  95% { opacity: 0.93; }
  96% { opacity: 0.98; }
}

canvas {
  width: 100%;
  height: auto;
  display: block;
  position: relative;
  z-index: 2;
  background: transparent;
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(5, 6, 12, 0.72);
  backdrop-filter: blur(3px);
  transition: opacity 0.35s ease;
  z-index: 8;
}

.overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.overlay-card {
  width: min(420px, 88%);
  background: var(--panel-strong);
  border-radius: 20px;
  padding: 24px;
  text-align: center;
  border: 1px solid rgba(160, 170, 210, 0.22);
  box-shadow: var(--shadow);
  font-size: 15px;
}

.overlay-card.shop-card {
  width: min(520px, 90%);
  text-align: left;
}

.overlay-card.summary-card {
  width: min(520px, 90%);
  text-align: left;
  background: rgba(12, 14, 24, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(15px) saturate(180%);
  border-radius: 18px;
}

.overlay-card h2 {
  margin-top: 0;
  margin-bottom: 10px;
}

.overlay-card p {
  margin-top: 0;
  margin-bottom: 16px;
  color: var(--muted);
}

.overlay-actions {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.shop-lead {
  margin-bottom: 18px;
}

.shop-cash {
  margin: 0 0 14px;
  font-weight: 600;
  color: var(--ink);
}

.shop-list {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.shop-item {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(120, 130, 170, 0.18);
  background: rgba(12, 16, 26, 0.88);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.shop-item:hover {
  border-color: rgba(255, 120, 120, 0.45);
  transform: translateY(-1px);
}

.shop-item h4 {
  margin: 0;
  font-size: 16px;
}

.shop-item p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.shop-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.shop-cost {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.shop-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.summary-body ul {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: grid;
  gap: 8px;
}

.summary-body li {
  font-size: 14px;
  color: var(--muted);
}

.summary-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

button {
  font: inherit;
  padding: 10px 16px;
  border-radius: 999px;
  border: none;
  position: relative;
  isolation: isolate;
  --btn-glow: rgba(255, 122, 89, 0.75);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1b0b0b;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 12px 24px rgba(255, 86, 100, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.55;
  border: 1px solid color-mix(in srgb, var(--btn-glow) 70%, transparent);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--btn-glow) 38%, transparent),
    0 0 22px color-mix(in srgb, var(--btn-glow) 55%, transparent);
  mix-blend-mode: screen;
  animation: neon-edge 2.9s ease-in-out infinite;
}

button:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 16px rgba(255, 140, 120, 0.35),
    0 12px 24px rgba(255, 86, 100, 0.35);
}

button:hover::before {
  opacity: 0.9;
}

button:active {
  transform: translateY(1px);
}

button[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

button[disabled]::before {
  opacity: 0.1;
  animation: none;
}

@keyframes neon-edge {
  0%, 100% { transform: scale(1); filter: blur(0px); }
  50% { transform: scale(1.01); filter: blur(0.6px); }
}

/* Per-button identity glow */
#restartBtn,
#summaryRestartBtn,
#summaryRestartRoundBtn {
  --btn-glow: rgba(255, 61, 90, 0.85);
}

#startBtn {
  --btn-glow: rgba(120, 220, 255, 0.9);
}

#controlsTreeBtn,
#overlayTreeBtn,
#summaryUpgradeBtn {
  --btn-glow: rgba(90, 210, 255, 0.9);
}

#controlsIntelBtn,
#overlayIntelBtn {
  --btn-glow: rgba(178, 124, 255, 0.92);
}

#toggleSfx {
  --btn-glow: rgba(100, 200, 150, 0.92);
}

#toggleMusic {
  --btn-glow: rgba(255, 120, 220, 0.92);
}

/* Distinct visual for Restart Run */
#restartBtn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.14;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(0, 0, 0, 0.45) 0px,
      rgba(0, 0, 0, 0.45) 8px,
      rgba(255, 255, 255, 0.12) 8px,
      rgba(255, 255, 255, 0.12) 14px
    );
  mix-blend-mode: overlay;
  animation: hazard-sweep 3.4s linear infinite;
}

@keyframes hazard-sweep {
  0% { background-position: 0 0; }
  100% { background-position: 120px 0; }
}

.controls {
  background: rgba(10, 14, 26, 0.9);
  backdrop-filter: blur(18px) saturate(190%);
  border-radius: 18px;
  padding: 18px;
  border: 1px solid rgba(140, 180, 255, 0.24);
  box-shadow:
    inset 0 0 24px rgba(70, 120, 220, 0.08),
    0 0 24px rgba(70, 120, 220, 0.12);
  position: relative;
  overflow: hidden;
}

.controls::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.05), rgba(0,0,0,0.08)),
    repeating-linear-gradient(
      0deg,
      rgba(140, 175, 220, 0.06) 0px,
      rgba(140, 175, 220, 0.06) 1px,
      transparent 1px,
      transparent 14px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(140, 175, 220, 0.04) 0px,
      rgba(140, 175, 220, 0.04) 1px,
      transparent 1px,
      transparent 14px
    );
  pointer-events: none;
}

.controls > * {
  position: relative;
  z-index: 1;
}

.controls h3 {
  margin-top: 0;
  margin-bottom: 12px;
}

.controls ul {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: grid;
  gap: 10px;
}

.controls li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--muted);
}

.controls li span {
  color: var(--muted);
}

.controls strong {
  color: var(--ink);
}

.buttons {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.audio-controls {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.audio-controls button {
  width: 100%;
}

.buttons button {
  width: 100%;
}

#restartBtn:hover { box-shadow: 0 0 0 2px rgba(255, 120, 120, 0.45), 0 0 24px rgba(255, 90, 120, 0.42); }
#controlsTreeBtn:hover { box-shadow: 0 0 0 2px rgba(120, 210, 255, 0.48), 0 0 24px rgba(90, 180, 255, 0.4); }
#controlsIntelBtn:hover { box-shadow: 0 0 0 2px rgba(170, 140, 255, 0.45), 0 0 24px rgba(150, 100, 255, 0.4); }
#toggleSfx:hover { box-shadow: 0 0 0 2px rgba(110, 255, 180, 0.45), 0 0 24px rgba(70, 230, 160, 0.35); }
#toggleMusic:hover { box-shadow: 0 0 0 2px rgba(255, 160, 240, 0.45), 0 0 24px rgba(255, 110, 215, 0.35); }

.tip {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.legend {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
}

.legend h4 {
  margin: 0 0 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.legend ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.legend li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}

.legend li span {
  color: var(--muted);
}

.legend li:nth-child(1) strong { color: #FFD700; text-shadow: 0 0 10px rgba(255, 215, 0, 0.72); }
.legend li:nth-child(2) strong { color: #0074FF; text-shadow: 0 0 10px rgba(0, 116, 255, 0.72); }
.legend li:nth-child(3) strong { color: #50C878; text-shadow: 0 0 10px rgba(80, 200, 120, 0.72); }
.legend li:nth-child(4) strong { color: #9400D3; text-shadow: 0 0 10px rgba(148, 0, 211, 0.72); }

@media (max-width: 960px) {
  .stage {
    grid-template-columns: 1fr;
  }
}

/* Neon HUD / modal / controls pass */
.overlay,
.overlay.hidden {
  backdrop-filter: blur(15px);
}

.overlay-card {
  background: rgba(10, 10, 15, 0.8) !important;
  border: 1px solid rgba(102, 214, 255, 0.55) !important;
  box-shadow:
    inset 0 0 24px rgba(102, 214, 255, 0.1),
    0 0 0 1px rgba(102, 214, 255, 0.22),
    0 24px 50px rgba(0, 0, 0, 0.6),
    0 0 36px rgba(102, 214, 255, 0.18);
}

.overlay-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.05) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity: 0.15;
  pointer-events: none;
}

.summary-card {
  border-color: rgba(255, 99, 152, 0.62) !important;
  box-shadow:
    inset 0 0 24px rgba(255, 99, 152, 0.11),
    0 0 0 1px rgba(255, 99, 152, 0.24),
    0 24px 50px rgba(0, 0, 0, 0.6),
    0 0 36px rgba(255, 99, 152, 0.2);
}

.hud-value,
.in-game-hud-item strong {
  font-family: "JetBrains Mono", "SFMono-Regular", "Consolas", monospace;
  font-weight: 800;
  letter-spacing: 0.04em;
  animation: hud-flicker 4.2s infinite;
}

.in-game-hud-item {
  border-color: rgba(160, 190, 255, 0.28);
  background: linear-gradient(160deg, rgba(18, 22, 36, 0.88), rgba(8, 10, 18, 0.96));
  backdrop-filter: blur(15px);
}

.controls {
  background: linear-gradient(160deg, rgba(18, 22, 36, 0.88), rgba(8, 10, 18, 0.96));
}

#restartBtn:hover { box-shadow: 0 0 0 2px rgba(255, 120, 120, 0.45), 0 0 24px rgba(255, 90, 120, 0.42); }
#controlsTreeBtn:hover { box-shadow: 0 0 0 2px rgba(120, 210, 255, 0.48), 0 0 24px rgba(90, 180, 255, 0.4); }
#controlsIntelBtn:hover { box-shadow: 0 0 0 2px rgba(170, 140, 255, 0.45), 0 0 24px rgba(150, 100, 255, 0.4); }
#toggleSfx:hover { box-shadow: 0 0 0 2px rgba(110, 255, 180, 0.45), 0 0 24px rgba(70, 230, 160, 0.35); }
#toggleMusic:hover { box-shadow: 0 0 0 2px rgba(255, 160, 240, 0.45), 0 0 24px rgba(255, 110, 215, 0.35); }

#restartBtn:active,
#controlsTreeBtn:active,
#controlsIntelBtn:active,
#toggleSfx:active,
#toggleMusic:active {
  transform: translateY(1px) scale(0.99);
}

@keyframes hud-flicker {
  0%, 95%, 100% { opacity: 1; }
  96% { opacity: 0.92; }
  97% { opacity: 0.98; }
}

@keyframes star-drift {
  0% { background-position: 0 0; }
  100% { background-position: 120px 200px; }
}
