:root {
  --neon: #00ff41;
  --danger: #ff003c;
  --node: #00f2ff;
  --bg: #000500;
  --neon-var: #00ff41;
  --cyan: #00f2ff;
  --blood: #ff003c;
  --ash: #9eb4b8;
  --ink: #04070a;
}

/* 1. FIX: Ensure html and body can scroll when the class is present */
body,
html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%; /* Keep this for the game canvas */
  background: black;
  color: var(--neon);
  font-family: 'Courier New', monospace;
  overflow-x: hidden;
  overflow-y: hidden; /* Default for game */
}

/* 2. FIX: This must be specific to allow the browser to scroll */
body.allow-scroll {
  overflow-y: auto !important;
  height: auto !important; /* Allow body height to grow with content */
}

body::before {
  content: " ";
  display: block;
  position: fixed; /* Changed to fixed so it stays during scroll */
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.2) 50%);
  z-index: 20;
  background-size: 100% 3px;
  pointer-events: none;
  opacity: 0.6;
}

canvas {
  display: block;
}

.hud-element {
  position: absolute;
  z-index: 30;
  pointer-events: none;
  padding: 15px;
  background: linear-gradient(to bottom, rgba(0, 5, 0, 0.6), transparent);
  transition: opacity 0.1s;
}

#top-left {
  top: 20px;
  left: 20px;
  border-left: 2px solid var(--neon);
}

#top-right {
  top: 20px;
  right: 20px;
  border-right: 2px solid var(--neon);
  text-align: right;
}

#bottom-left {
  bottom: 20px;
  left: 20px;
  border-left: 2px solid var(--neon);
}

.label {
  font-size: 0.6rem;
  opacity: 0.6;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.value {
  font-size: 0.9rem;
  font-weight: bold;
  text-shadow: 0 0 5px var(--neon);
}

#charge-bar {
  width: 150px;
  height: 3px;
  border: 1px solid rgba(0, 255, 65, 0.2);
  margin-top: 5px;
  background: rgba(0, 0, 0, 0.5);
}

#charge-fill {
  height: 100%;
  background: var(--neon);
  width: 0%;
  box-shadow: 0 0 10px var(--neon);
}

/* 3. FIX: Overlay must be relative on scrollable pages to push the height of the body */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100vh;
  background: radial-gradient(circle, rgba(0, 20, 0, 0.4) 0%, rgba(0, 0, 0, 1) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

/* If inside a scrollable body, make the overlay part of the flow */
body.allow-scroll .overlay {
  position: relative;
}

.scrollable-content {
  width: 100%;
  max-width: 800px;
  padding: 60px 20px; /* Adjusted padding */
  box-sizing: border-box;
  z-index: 110;
  color: #fff; /* Ensure text is readable */
  line-height: 1.6;
}

#preview-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.5;
}

/* Ensure preview canvas stays put during scroll */
body.allow-scroll #preview-canvas {
  position: fixed;
}

.title-container {
  text-align: center;
  z-index: 110;
}

h1.glitch {
  font-size: 5rem;
  font-weight: 900;
  letter-spacing: 15px;
  color: #fff;
  text-transform: uppercase;
  position: relative;
  text-shadow: 2px 0 0 var(--danger), -2px -2px 0 var(--node);
  animation: title-shiver 0.2s infinite;
  margin-bottom: 10px;
}

.control-hint {
  margin: 30px 0;
  display: flex;
  gap: 40px;
  font-size: 0.7rem;
  color: var(--neon);
  opacity: 0.8;
}

.control-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.key-box {
  border: 1px solid var(--neon);
  padding: 5px 10px;
  box-shadow: inset 0 0 5px var(--neon);
  min-width: 30px;
  text-align: center;
  font-weight: bold;
}

.warning-strip {
  position: absolute;
  bottom: 8%;
  width: 100%;
  background: rgba(255, 0, 60, 0.05);
  color: var(--danger);
  text-align: center;
  padding: 15px 0;
  font-size: 0.7rem;
  border-top: 1px solid rgba(255, 0, 60, 0.3);
  border-bottom: 1px solid rgba(255, 0, 60, 0.3);
  letter-spacing: 4px;
  animation: pulse 2s infinite;
}

/* 4. FIX: If scrolling, hide the warning strip or move it to relative */
body.allow-scroll .warning-strip {
  position: relative;
  margin-top: 50px;
}

button {
  background: transparent;
  border: 1px solid var(--neon);
  color: var(--neon);
  padding: 15px 40px;
  cursor: pointer;
  font-family: inherit;
  transition: 0.3s;
  letter-spacing: 5px;
  font-weight: bold;
  text-transform: uppercase;
}

button:hover {
  background: var(--neon);
  color: black;
  box-shadow: 0 0 25px var(--neon);
}

@keyframes title-shiver {
  0% { transform: translate(1px, 1px); }
  50% { transform: translate(-1px, -1px); text-shadow: -2px 0 0 var(--danger), 2px 2px 0 var(--neon); }
  100% { transform: translate(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.glitch-hud {
  animation: hud-shiver 0.1s infinite;
  color: var(--danger) !important;
  border-color: var(--danger) !important;
}

@keyframes hud-shiver {
  0% { transform: translate(-1px, 1px); opacity: 0.9; }
  50% { transform: translate(1px, -1px); opacity: 1; }
  100% { transform: translate(0); }
}

#radarCanvas {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 120px;
  height: 120px;
  pointer-events: none;
  z-index: 10;
  opacity: 0.9;
}

/* On touch/mobile, radar moves to top-right below the HUD */
@media (max-width: 900px) and (orientation: landscape) {
  #radarCanvas {
    display: none; /* hidden — radar is drawn on canvas by drawRadar(), not this element */
  }
}

/* ================================================================
   START SCREEN STYLES (moved from index.html inline <style>)
   ================================================================ */

#start-screen.overlay {
  background: #000 !important;
  position: fixed;
  inset: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0;
  font-family: "Rajdhani", sans-serif;
}

/* ---------- ATMOSPHERE ---------- */
.atmos { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.atmos-base {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 90% 70% at 30% 110%, #1a0408 0%, transparent 55%),
    radial-gradient(ellipse 120% 80% at 80% -10%, #00141b 0%, transparent 60%),
    linear-gradient(180deg, #02060a 0%, #000 100%);
}
.atmos-grid {
  position: absolute; inset: -20% -20% -10% -20%;
  background-image:
    linear-gradient(rgba(0,242,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,242,255,0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: perspective(1100px) rotateX(70deg) translateY(20%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 30%, #000 75%, transparent 100%);
  animation: gridFlow 22s linear infinite;
}
@keyframes gridFlow { from { background-position: 0 0; } to { background-position: 0 64px; } }
.atmos-sweep {
  position: absolute; inset: -50%;
  background: conic-gradient(from 0deg at 50% 50%, transparent 0deg, rgba(0,242,255,0.06) 18deg, transparent 36deg);
  animation: sweepRot 14s linear infinite;
  mix-blend-mode: screen; opacity: .5;
}
@keyframes sweepRot { to { transform: rotate(360deg); } }
.atmos-blood {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 100%, rgba(255,0,60,0.18), transparent 60%);
  mix-blend-mode: screen;
  animation: bloodPulse 4.5s ease-in-out infinite;
}
@keyframes bloodPulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.atmos-noise {
  position: absolute; inset: 0; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
.atmos-scan {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 2px, rgba(0,0,0,0.5) 2px, rgba(0,0,0,0.5) 3px);
  opacity: .3; mix-blend-mode: multiply;
}
.atmos-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 50%, transparent 35%, rgba(0,0,0,0.7) 80%, #000 100%);
}
.atmos-flicker {
  position: absolute; inset: 0; background: rgba(255,0,60,0.05);
  animation: flick 9s steps(2) infinite; mix-blend-mode: screen;
}
@keyframes flick { 0%, 98%, 100% { opacity: 0; } 98.5% { opacity: 1; } 99% { opacity: 0; } 99.5% { opacity: .7; } }

/* ---------- HUD CORNERS ---------- */
.hud-corner { position: absolute; width: 42px; height: 42px; border: 1.5px solid rgba(0,242,255,0.45); z-index: 5; pointer-events: none; }
.hud-corner.tl { top: 24px; left: 24px; border-right: 0; border-bottom: 0; }
.hud-corner.tr { top: 24px; right: 24px; border-left: 0; border-bottom: 0; }
.hud-corner.bl { bottom: 100px; left: 24px; border-right: 0; border-top: 0; }
.hud-corner.br { bottom: 100px; right: 24px; border-left: 0; border-top: 0; }

/* ---------- TOP BAR ---------- */
.top-bar {
  position: absolute; top: 0; left: 0; right: 0; min-height: 46px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 80px; z-index: 6;
  font-family: "Share Tech Mono", monospace; font-size: 10px; letter-spacing: 5px;
  color: rgba(0,242,255,0.6);
  background: linear-gradient(180deg, rgba(0,8,12,0.7), transparent);
}
.top-bar .lhs span { margin-right: 24px; }
.top-bar .rhs { display: flex; align-items: center; gap: 8px; }
.live-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--blood); box-shadow: 0 0 10px var(--blood);
  animation: livePulse 1.4s ease-in-out infinite;
}
@keyframes livePulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------- HERO LAYOUT ---------- */
.hero {
  position: relative; z-index: 5; width: 100%; max-width: 1200px;
  padding: 0 80px; margin-left: auto; margin-right: auto;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: "Share Tech Mono", monospace;
  color: var(--blood); font-size: 11px; letter-spacing: 7px; text-transform: uppercase;
  padding: 6px 14px; border: 1px solid rgba(255,0,60,0.5);
  background: rgba(255,0,60,0.06);
  margin-bottom: 28px;
}
.hero-eyebrow::before {
  content: ""; width: 6px; height: 6px;
  background: var(--blood); box-shadow: 0 0 10px var(--blood);
  animation: livePulse 1.4s infinite;
}

h1.glitch {
  font-family: "Rajdhani", sans-serif !important;
  font-weight: 700 !important;
  font-size: clamp(3.4rem, 9vw, 8rem) !important;
  letter-spacing: .02em !important;
  line-height: .92 !important;
  margin: 0 !important; color: #fff !important;
  text-transform: uppercase;
  text-shadow: 0 0 1px #fff, 0 0 20px rgba(0,242,255,0.18);
  position: relative;
}
h1.glitch .void {
  display: block; color: transparent; -webkit-text-stroke: 1.5px var(--blood);
  text-shadow: 0 0 30px rgba(255,0,60,0.4);
  font-weight: 700;
}
h1.glitch::before {
  content: attr(data-text); position: absolute; left: 0; top: 0;
  color: var(--cyan); mix-blend-mode: screen; opacity: .6;
  transform: translate(2px, 1px);
  clip-path: polygon(0 12%, 100% 12%, 100% 28%, 0 28%);
  animation: gA 5s infinite steps(2);
  pointer-events: none;
}
h1.glitch::after {
  content: attr(data-text); position: absolute; left: 0; top: 0;
  color: var(--blood); mix-blend-mode: screen; opacity: .5;
  transform: translate(-2px, -1px);
  clip-path: polygon(0 60%, 100% 60%, 100% 78%, 0 78%);
  animation: gB 6s infinite steps(2);
  pointer-events: none;
}
@keyframes gA { 0%, 94%, 100% { transform: translate(2px, 1px); } 95% { transform: translate(-6px, 2px); } }
@keyframes gB { 0%, 92%, 100% { transform: translate(-2px, -1px); } 93% { transform: translate(7px, -3px); } }

.tagline {
  font-family: "Share Tech Mono", monospace;
  color: var(--ash); font-size: 13px; letter-spacing: 5px;
  margin-top: 24px; text-transform: uppercase;
  max-width: 580px; line-height: 1.9;
}
.tagline b { color: var(--blood); font-weight: normal; }
.tagline em { color: var(--cyan); font-style: normal; }

/* ---------- META BAR ---------- */
.meta-strip {
  display: flex; gap: 0; margin-top: 36px; border: 1px solid rgba(0,242,255,0.2);
  background: rgba(0,10,14,0.55); backdrop-filter: blur(4px); max-width: 720px;
}
.meta-cell { flex: 1; padding: 14px 20px; border-right: 1px solid rgba(0,242,255,0.15); }
.meta-cell:last-child { border-right: 0; }
.meta-cell .k { font-family: "Share Tech Mono", monospace; color: rgba(0,242,255,0.55); font-size: 9px; letter-spacing: 3px; text-transform: uppercase; }
.meta-cell .v { font-family: "Rajdhani", sans-serif; color: #fff; font-size: 18px; font-weight: 600; letter-spacing: 1px; margin-top: 3px; }
.meta-cell .v.danger { color: var(--blood); }

/* ---------- CTA ---------- */
.cta-row { display: flex; gap: 16px; margin-top: 42px; flex-wrap: wrap; }
#start-screen button {
  font-family: "Rajdhani", sans-serif !important;
  font-weight: 700 !important;
  letter-spacing: 5px; font-size: 14px;
  line-height: normal !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 16px 36px !important; cursor: pointer;
  position: relative;
  background: transparent !important;
  border: 1px solid var(--neon) !important;
  border-radius: 4px !important;
  color: var(--neon) !important;
  text-transform: uppercase;
  box-shadow: inset 0 0 14px rgba(0,255,65,0.12), 0 0 22px rgba(0,255,65,0.18);
  transition: all .18s ease;
}
#start-screen button:hover {
  background: rgba(0,255,65,0.14) !important; color: #fff !important;
  box-shadow: inset 0 0 18px rgba(0,255,65,0.3), 0 0 36px rgba(0,255,65,0.5);
}
#startBtn::before { content: "▶"; margin-right: 12px; }
#continueBtn {
  border-color: var(--cyan) !important; color: var(--cyan) !important;
  box-shadow: inset 0 0 14px rgba(0,242,255,0.12), 0 0 22px rgba(0,242,255,0.18) !important;
}
#continueBtn:hover { background: rgba(0,242,255,0.14) !important; }

/* ---------- CONTROLS ---------- */
.controls-block {
  margin-top: 46px; display: flex; gap: 24px; align-items: center; flex-wrap: wrap;
  padding-top: 26px; border-top: 1px solid rgba(0,242,255,0.12); max-width: 850px;
}
.controls-label { font-family: "Share Tech Mono", monospace; color: rgba(0,242,255,0.5); font-size: 10px; letter-spacing: 4px; }
.control-group { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.key-box {
  font-family: "Rajdhani", sans-serif; font-weight: 700;
  background: rgba(0,18,8,0.6);
  border: 1px solid rgba(0,255,65,0.4);
  color: var(--neon);
  padding: 6px 10px; min-width: 30px; text-align: center; font-size: 12px; letter-spacing: 1px;
  box-shadow: inset 0 0 8px rgba(0,255,65,0.12);
}
.ctrl-cap { font-family: "Share Tech Mono", monospace; color: var(--ash); font-size: 9px; letter-spacing: 3px; text-transform: uppercase; opacity: .7; }

/* ---------- LIVE COUNTER ---------- */
.hunters-live {
  position: absolute;
  top: 52px;
  right: 80px;
  text-align: right;
  z-index: 6;
  border-left: 2px solid var(--blood);
  padding: 8px 0 8px 16px;
}
.hl-label { font-family: "Share Tech Mono", monospace; color: var(--blood); font-size: 9px; letter-spacing: 5px; text-transform: uppercase; opacity: .85; }
.hl-value { font-family: "Rajdhani", sans-serif; font-weight: 700; color: #fff; font-size: 1.4rem; letter-spacing: 2px; line-height: 1; margin-top: 6px; text-shadow: 0 0 14px rgba(255,0,60,0.4); }
.hl-sub { font-family: "Share Tech Mono", monospace; color: rgba(0,242,255,0.55); font-size: 9px; letter-spacing: 3px; margin-top: 4px; text-transform: uppercase; }

/* ---------- PROFESSIONAL FOOTER ---------- */
.cyber-footer {
  padding: 20px 80px;
  background: rgba(0, 0, 0, 0.9);
  border-top: 1px solid rgba(0, 242, 255, 0.2);
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "Share Tech Mono", monospace;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
}
.footer-links a {
  color: var(--ash);
  text-decoration: none;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: color 0.2s;
  cursor: pointer;
  white-space: nowrap;
}
.footer-links a:hover {
  color: var(--cyan);
  text-shadow: 0 0 8px var(--cyan);
}
.copyright {
  color: rgba(255, 255, 255, 0.3);
  font-size: 9px;
  letter-spacing: 1px;
}

@media (max-width: 900px) {
  .hud-corner { display: none; }
  .hunters-live { right: 30px; top: 52px; }
  .meta-cell { padding: 10px 14px; }
  .meta-cell .v { font-size: 14px; }
  .footer-links { gap: 15px; }
}

/* ================================================================
   RADIOACTIVE PAGE MODAL (footer link popups)
   ================================================================ */

.rad-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 99999;
  justify-content: center;
  align-items: center;
  font-family: "Share Tech Mono", monospace;
  backdrop-filter: blur(3px);
}
.rad-modal-overlay.rad-open {
  display: flex;
}

.rad-modal {
  position: relative;
  width: 90%;
  max-width: 680px;
  max-height: 82vh;
  background: #000;
  border: 1px solid rgba(0, 255, 65, 0.35);
  box-shadow:
    0 0 0 1px rgba(0, 255, 65, 0.12),
    0 0 30px rgba(0, 255, 65, 0.18),
    0 0 80px rgba(0, 255, 65, 0.08),
    inset 0 0 40px rgba(0, 255, 65, 0.04);
  animation: radModalGlow 3s ease-in-out infinite;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@keyframes radModalGlow {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(0, 255, 65, 0.12),
      0 0 30px rgba(0, 255, 65, 0.2),
      0 0 80px rgba(0, 255, 65, 0.08),
      inset 0 0 40px rgba(0, 255, 65, 0.04);
    border-color: rgba(0, 255, 65, 0.35);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(0, 255, 65, 0.25),
      0 0 55px rgba(0, 255, 65, 0.35),
      0 0 120px rgba(0, 255, 65, 0.15),
      inset 0 0 60px rgba(0, 255, 65, 0.07);
    border-color: rgba(0, 255, 65, 0.65);
  }
}

/* Scanline overlay on modal */
.rad-modal::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    rgba(0, 0, 0, 0.45) 2px,
    rgba(0, 0, 0, 0.45) 3px
  );
  pointer-events: none;
  z-index: 2;
  opacity: 0.5;
}

/* Corner accents */
.rad-modal::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon), var(--cyan), var(--neon), transparent);
  animation: radSweep 4s linear infinite;
  background-size: 200% 100%;
  z-index: 3;
}
@keyframes radSweep {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.rad-modal-header {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(0, 255, 65, 0.2);
  background: rgba(0, 255, 65, 0.04);
  flex-shrink: 0;
}

.rad-modal-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.rad-symbol {
  position: relative;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.rad-symbol svg {
  width: 100%;
  height: 100%;
  animation: radSpin 8s linear infinite;
  filter: drop-shadow(0 0 6px var(--neon)) drop-shadow(0 0 12px rgba(0,255,65,0.4));
}
@keyframes radSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.rad-modal-title-text {
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 6px;
  color: var(--neon);
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

.rad-status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 9px;
  letter-spacing: 3px;
  color: rgba(0, 255, 65, 0.5);
}
.rad-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 8px var(--neon);
  animation: livePulse 1.4s ease-in-out infinite;
}

.rad-close-btn {
  position: relative;
  z-index: 4;
  background: transparent;
  border: 1px solid rgba(0, 255, 65, 0.3);
  color: rgba(0, 255, 65, 0.6);
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  letter-spacing: 0;
  transition: all 0.18s ease;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
  font-family: "Share Tech Mono", monospace;
  flex-shrink: 0;
}
.rad-close-btn:hover {
  background: rgba(0, 255, 65, 0.12);
  color: var(--neon);
  border-color: var(--neon);
  box-shadow: 0 0 16px rgba(0, 255, 65, 0.4);
}

.rad-modal-body {
  position: relative;
  z-index: 4;
  overflow-y: auto;
  padding: 30px 28px;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 255, 65, 0.3) transparent;
}
.rad-modal-body::-webkit-scrollbar { width: 4px; }
.rad-modal-body::-webkit-scrollbar-track { background: transparent; }
.rad-modal-body::-webkit-scrollbar-thumb { background: rgba(0, 255, 65, 0.3); border-radius: 2px; }

/* Modal content typography */
.rad-modal-body h2 {
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 4px;
  color: var(--neon);
  text-transform: uppercase;
  margin: 0 0 20px 0;
  text-shadow: 0 0 12px rgba(0, 255, 65, 0.4);
  border-bottom: 1px solid rgba(0, 255, 65, 0.15);
  padding-bottom: 12px;
}
.rad-modal-body h3 {
  font-family: "Rajdhani", sans-serif;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 3px;
  color: var(--cyan);
  text-transform: uppercase;
  margin: 22px 0 8px 0;
  text-shadow: 0 0 8px rgba(0, 242, 255, 0.3);
}
.rad-modal-body p {
  font-family: "Share Tech Mono", monospace;
  font-size: 11px;
  line-height: 1.9;
  letter-spacing: 1px;
  color: rgba(158, 180, 184, 0.85);
  margin: 0 0 14px 0;
}
.rad-modal-body a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 242, 255, 0.3);
  transition: all 0.15s;
}
.rad-modal-body a:hover {
  color: var(--neon);
  border-color: var(--neon);
  text-shadow: 0 0 8px var(--neon);
}
.rad-modal-body ul {
  font-family: "Share Tech Mono", monospace;
  font-size: 11px;
  line-height: 2;
  letter-spacing: 1px;
  color: rgba(158, 180, 184, 0.85);
  padding-left: 20px;
  margin: 0 0 14px 0;
}
.rad-modal-body li::marker {
  color: var(--neon);
}

.rad-modal-footer {
  position: relative;
  z-index: 4;
  padding: 14px 24px;
  border-top: 1px solid rgba(0, 255, 65, 0.12);
  background: rgba(0, 255, 65, 0.02);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.rad-footer-sig {
  font-size: 9px;
  letter-spacing: 3px;
  color: rgba(0, 255, 65, 0.35);
  text-transform: uppercase;
}
.rad-footer-close {
  background: transparent;
  border: 1px solid rgba(0, 255, 65, 0.3);
  color: rgba(0, 255, 65, 0.6);
  padding: 8px 22px;
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 4px;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.18s ease;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}
.rad-footer-close:hover {
  background: rgba(0, 255, 65, 0.1);
  color: var(--neon);
  border-color: var(--neon);
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
}

/* ================================================================
   MODAL PAGE CONTENT — shared styles for about / contact /
   privacy / terms when rendered inside .rad-modal-body
   ================================================================ */

/* Reset page-level chrome that doesn't apply inside the modal */
.rad-modal-body .container {
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
}

/* Page title (h1) */
.rad-modal-body h1 {
  font-family: "Share Tech Mono", monospace;
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 6px;
  text-transform: uppercase;
  margin: 0 0 28px 0;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(0, 255, 65, 0.15);
  color: var(--neon);
  text-shadow: 0 0 14px rgba(0, 255, 65, 0.35);
}

/* Section headings (h2, h3) */
.rad-modal-body h2 {
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 28px 0 8px 0;
  text-shadow: 0 0 8px rgba(0, 242, 255, 0.25);
}
.rad-modal-body h3 {
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 22px 0 8px 0;
  text-shadow: 0 0 8px rgba(0, 242, 255, 0.2);
}

/* Body text */
.rad-modal-body p {
  font-family: "Share Tech Mono", monospace;
  font-size: 11px;
  line-height: 1.95;
  letter-spacing: 0.5px;
  color: rgba(158, 180, 184, 0.9);
  margin: 0 0 12px 0;
}
.rad-modal-body p b,
.rad-modal-body p strong {
  color: #fff;
  font-weight: 600;
}
.rad-modal-body em {
  color: var(--neon);
  font-style: normal;
}
.rad-modal-body code {
  font-family: "Share Tech Mono", monospace;
  font-size: 10px;
  color: var(--cyan);
  background: rgba(0, 242, 255, 0.06);
  padding: 1px 5px;
  border: 1px solid rgba(0, 242, 255, 0.15);
}

/* Lists */
.rad-modal-body ul,
.rad-modal-body ol {
  font-family: "Share Tech Mono", monospace;
  font-size: 11px;
  line-height: 2;
  letter-spacing: 0.5px;
  color: rgba(158, 180, 184, 0.9);
  padding-left: 18px;
  margin: 0 0 14px 0;
}
.rad-modal-body li::marker { color: var(--neon); }
.rad-modal-body li b,
.rad-modal-body li strong { color: #fff; }

/* Lore / info highlight box */
.rad-modal-body .lore-box {
  margin: 20px 0;
  padding: 16px 20px;
  border-left: 2px solid var(--blood);
  background: rgba(255, 0, 60, 0.05);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rad-modal-body .lore-box p {
  margin: 0;
  color: rgba(255, 180, 190, 0.85);
}
.rad-modal-body .lore-box b { color: var(--blood); }

/* Warning box (terms page) */
.rad-modal-body .warning-box {
  border: 1px solid rgba(255, 0, 60, 0.5);
  padding: 14px 18px;
  margin: 0 0 24px 0;
  background: rgba(255, 0, 60, 0.07);
  font-family: "Share Tech Mono", monospace;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--blood);
  line-height: 1.6;
}

/* Divider */
.rad-modal-body .page-divider {
  border: none;
  border-top: 1px solid rgba(0, 255, 65, 0.1);
  margin: 24px 0;
}

/* Back / return links — hidden inside modal (close button handles it) */
.rad-modal-body .back-link,
.rad-modal-body .back,
.rad-modal-body a[href="/"] {
  display: none;
}

/* Contact form inputs */
.rad-modal-body .input-group {
  margin-bottom: 16px;
}
.rad-modal-body label {
  display: block;
  font-family: "Share Tech Mono", monospace;
  font-size: 9px;
  letter-spacing: 3px;
  color: rgba(0, 242, 255, 0.55);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.rad-modal-body input,
.rad-modal-body textarea {
  width: 100%;
  background: rgba(0, 255, 65, 0.03);
  border: 1px solid rgba(0, 255, 65, 0.2);
  padding: 10px 12px;
  color: #fff;
  font-family: "Share Tech Mono", monospace;
  font-size: 11px;
  letter-spacing: 1px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.rad-modal-body input:focus,
.rad-modal-body textarea:focus {
  border-color: rgba(0, 242, 255, 0.5);
  box-shadow: 0 0 12px rgba(0, 242, 255, 0.1);
}
.rad-modal-body input::placeholder,
.rad-modal-body textarea::placeholder {
  color: rgba(158, 180, 184, 0.3);
}
.rad-modal-body textarea {
  resize: vertical;
  min-height: 100px;
}
.rad-modal-body form button[type="submit"] {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px solid var(--blood);
  color: var(--blood);
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 5px;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.2s;
  margin-top: 4px;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}
.rad-modal-body form button[type="submit"]:hover {
  background: rgba(255, 0, 60, 0.12);
  color: #fff;
  box-shadow: 0 0 20px rgba(255, 0, 60, 0.3);
}

/* Intro paragraph styling (first p after h1) */
.rad-modal-body .page-intro {
  font-family: "Share Tech Mono", monospace;
  font-size: 11px;
  color: rgba(158, 180, 184, 0.7);
  letter-spacing: 1px;
  line-height: 1.9;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(0, 255, 65, 0.08);
}
/* =============================================================
   PREDATOR VOID — Responsive Patch v2
   ============================================================= */


/* ── Start screen: scrollable, not clipping ────────────────── */
#start-screen.overlay {
  min-height: 0 !important;
  height: auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  padding-bottom: 0 !important;
}

#start-screen #preview-canvas,
#start-screen .atmos {
  position: fixed !important;
}

#start-screen {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 255, 65, 0.2) transparent;
}
#start-screen::-webkit-scrollbar       { width: 3px; }
#start-screen::-webkit-scrollbar-track { background: transparent; }
#start-screen::-webkit-scrollbar-thumb { background: rgba(0, 255, 65, 0.25); border-radius: 2px; }


/* ── Hero: clear the top-bar height, grow freely ───────────── */
.hero {
  margin-top: 84px !important;
  padding-top: 24px !important;
  padding-bottom: 32px !important;
  flex-shrink: 0;
  box-sizing: border-box;
}


/* ── Leaderboard panel: styled via CSS, not inline ─────────── */
#lb-panel {
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  width: 310px;
  background: radial-gradient(circle at 50% 30%, rgba(0,40,20,0.88), rgba(0,0,0,0.97));
  border: 1px solid rgba(0,255,65,0.25);
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: #9bffb3;
  padding: 18px 16px 14px;
  letter-spacing: 1.5px;
  z-index: 10;
  box-shadow: 0 0 40px rgba(0,255,65,0.08), inset 0 0 20px rgba(0,255,65,0.03);
}


/* ── Footer: normal flow, sits at the bottom of the start screen ── */
.cyber-footer {
  flex-shrink: 0;
  position: relative;
  width: 100%;
  background: rgba(0, 0, 0, 0.95);
  border-top: 1px solid rgba(0, 242, 255, 0.2);
  padding: 20px 80px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  align-items: center;
  font-family: "Share Tech Mono", monospace;
  box-sizing: border-box;
}

/* Hide footer when running inside an iframe */
html[data-in-iframe] .cyber-footer {
  display: none !important;
}
.hud-corner.bl,
.hud-corner.br {
  bottom: 80px;
}


/* ── HUD bar widths: don't overflow on small screens ───────── */
#stamina-container,
#charge-bar {
  max-width: 100% !important;
  width: 200px;
  box-sizing: border-box;
}


/* ── Medium monitors (height < 800px) ──────────────────────── */
@media (max-height: 800px) {
  .hero {
    margin-top: 70px !important;
    padding-top: 16px !important;
    padding-bottom: 20px !important;
  }
  h1.glitch { font-size: clamp(2.6rem, 7vw, 5rem) !important; }
  .hero-eyebrow { margin-bottom: 16px; }
  .tagline { margin-top: 14px; font-size: 11px; letter-spacing: 3px; }
  .meta-strip { margin-top: 20px; }
  .meta-cell { padding: 10px 14px; }
  .cta-row { margin-top: 24px; }
  .controls-block { margin-top: 24px; padding-top: 18px; gap: 16px; }
}


/* ── Short landscape screens ────────────────────────────────── */
@media (max-height: 620px) {
  h1.glitch { font-size: clamp(2rem, 6vw, 3.5rem) !important; line-height: 1 !important; }
  .hero-eyebrow { font-size: 9px; letter-spacing: 4px; margin-bottom: 10px; padding: 4px 10px; }
  .tagline { font-size: 10px; letter-spacing: 2px; margin-top: 10px; line-height: 1.7; }
  .meta-strip { margin-top: 14px; }
  .meta-cell .v { font-size: 13px; }
  .cta-row { margin-top: 18px; gap: 10px; }
  #start-screen button { padding: 12px 24px !important; font-size: 12px; }
  .controls-block { margin-top: 18px; padding-top: 14px; gap: 12px 14px; }
  .key-box { padding: 4px 8px; font-size: 11px; }
}


/* ── Tablets: hide lb-panel, give hero full width ───────────── */
@media (max-width: 1100px) {
  #lb-panel {
    position: relative !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    width: auto !important;
    margin: 0 80px 32px 80px;
  }
  .hero {
    padding-right: 80px !important;
  }
}

/* ── Phones / small tablets (≤ 600px) ──────────────────────── */
@media (max-width: 600px) {
  #lb-panel {
    margin: 0 20px 28px 20px;
  }

 .top-bar {
    padding: 10px 22px;
    font-size: 7px;
    flex-wrap: wrap;
    row-gap: 12px;
    gap: 6px;
    height: auto;
    min-height: 40px;
  }
  .top-bar .lhs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    flex: 1 1 100%;
    order: 1;
  }
  .top-bar .lhs span { margin-right: 8px; }
  .top-bar .lhs span:last-child { display: none; }
  .top-bar .rhs {
    flex: 1 1 100%;
    order: 2;
    justify-content: center;
    margin-left: 0;
  }

  .hero {
    padding-left: 20px !important;
    padding-right: 20px !important;
    margin-top: 118px !important;
  }

  h1.glitch {
    font-size: clamp(2.4rem, 11vw, 4rem) !important;
    letter-spacing: 0.01em !important;
  }

  .tagline { font-size: 10px; letter-spacing: 2px; max-width: 100%; }

  .meta-strip { flex-wrap: wrap; max-width: 100%; }
  .meta-cell {
    flex: 1 1 45%;
    border-right: none;
    border-bottom: 1px solid rgba(0,242,255,0.15);
  }
  .meta-cell:nth-child(odd) { border-right: 1px solid rgba(0,242,255,0.15); }

  .cta-row { flex-direction: column; gap: 12px; }
  #start-screen button { width: 100%; text-align: center; }

  .controls-block { gap: 12px; }

  .cyber-footer {
    padding: 16px 20px;
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  .footer-links { flex-wrap: wrap; justify-content: center; gap: 10px 18px; }

  .hud-corner { display: none; }

  #bottom-left { bottom: 10px; left: 10px; }
  #top-left    { top: 10px; left: 10px; }
  #top-right   { top: 10px; right: 10px; }
}


/* ── Tablets mid-range (601–900px) ─────────────────────────── */
@media (min-width: 601px) and (max-width: 900px) {
  .top-bar    { padding: 14px 30px; }
  .hero       { padding-left: 30px !important; padding-right: 30px !important; }
  .cyber-footer { padding: 18px 30px; }
  .footer-links { gap: 15px; }
}

.tagline-sub {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(0, 242, 255, 0.6);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin: 6px 0 16px;
}
.pv-share-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid #064a25;
  border-radius: 4px;
  cursor: pointer;
  color: #00ff41;
  transition: background .15s, border-color .15s, box-shadow .15s;
  padding: 0;
}
.pv-share-btn:hover {
  background: rgba(0,255,65,0.1);
  border-color: #00ff41;
  box-shadow: 0 0 8px rgba(0,255,65,0.25);
}
#start-screen .pv-share-btn {
  font-family: inherit !important;
  font-weight: normal !important;
  letter-spacing: 0 !important;
  font-size: 0 !important;
  padding: 0 !important;
  width: 34px !important;
  height: 34px !important;
  min-width: unset !important;
  background: transparent !important;
  border: 1px solid #064a25 !important;
  border-radius: 4px !important;
  color: #00ff41 !important;
  box-shadow: none !important;
  clip-path: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background .15s, border-color .15s, box-shadow .15s !important;
}

#start-screen .pv-share-btn:hover {
  background: rgba(0,255,65,0.1) !important;
  border-color: #00ff41 !important;
  box-shadow: 0 0 8px rgba(0,255,65,0.25) !important;
  color: #00ff41 !important;
}

#start-screen .pv-share-btn svg {
  width: 14px !important;
  height: 14px !important;
  display: block !important;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
#about-section {
  position: relative;
  z-index: 5;
  width: 100%;
  background: #020a05;
  border-top: 1px solid rgba(0, 255, 65, 0.15);
  padding: 60px 20px 80px;
  box-sizing: border-box;
  font-family: 'Share Tech Mono', monospace;
}

.about-inner {
  max-width: 960px;
  margin: 0 auto;
}

.about-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
}

.about-header-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 65, 0.3), transparent);
}

.about-header-label {
  color: rgba(0, 255, 65, 0.5);
  font-size: 11px;
  letter-spacing: 4px;
  white-space: nowrap;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: rgba(0, 255, 65, 0.08);
  border: 1px solid rgba(0, 255, 65, 0.08);
  margin-bottom: 40px;
}

.about-card {
  background: #020a05;
  padding: 28px 24px;
  position: relative;
  transition: background 0.2s;
}

.about-card:hover {
  background: rgba(0, 255, 65, 0.03);
}

.about-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 2px; height: 0;
  background: #00ff41;
  transition: height 0.3s ease;
}

.about-card:hover::before {
  height: 100%;
}

.about-card-eyebrow {
  font-size: 9px;
  letter-spacing: 3px;
  color: rgba(0, 242, 255, 0.5);
  margin-bottom: 10px;
}

.about-card-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #00ff41;
  letter-spacing: 1px;
  margin: 0 0 12px;
  line-height: 1.3;
}

.about-card-body {
  font-size: 11px;
  line-height: 1.8;
  color: rgba(155, 255, 179, 0.6);
  margin: 0;
  letter-spacing: 0.3px;
}

/* ============================================
   HOMEPAGE ARCHIVE PREVIEW — polish
   ============================================ */
#stories-placeholder .about-card-eyebrow {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid rgba(0, 242, 255, 0.25);
  border-radius: 20px;
  background: rgba(0, 242, 255, 0.06);
}

#stories-placeholder .about-card a {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 14px;
  border: 1px solid rgba(0, 242, 255, 0.35);
  border-radius: 3px;
  transition: all 0.15s ease;
}
#stories-placeholder .about-card a:hover {
  background: rgba(0, 242, 255, 0.1);
  border-color: #00f2ff;
  box-shadow: 0 0 8px rgba(0, 242, 255, 0.25);
}

#stories-placeholder .about-grid {
  margin-bottom: 24px;
}

#stories-placeholder > a {
  display: inline-block !important;
  padding: 10px 22px;
  border: 1px solid rgba(0, 255, 65, 0.35);
  border-radius: 4px;
  transition: all 0.15s ease;
}
#stories-placeholder > a:hover {
  background: rgba(0, 255, 65, 0.08);
  border-color: #00ff41;
  box-shadow: 0 0 10px rgba(0, 255, 65, 0.25);
}

.about-controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: center;
  padding: 24px;
  border: 1px solid rgba(0, 255, 65, 0.08);
  background: rgba(0, 255, 65, 0.02);
}

.about-ctrl {
  display: flex;
  align-items: center;
  gap: 10px;
}

.about-ctrl kbd {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  background: transparent;
  border: 1px solid rgba(0, 255, 65, 0.4);
  color: #00ff41;
  padding: 4px 8px;
  letter-spacing: 1px;
  min-width: 36px;
  text-align: center;
}

.about-ctrl span {
  font-size: 10px;
  color: rgba(155, 255, 179, 0.45);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.predator-eye-left {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 220px;
    pointer-events: none;
    opacity: 0.5;
    z-index: 0;
}

/* ============================================================
   MOBILE / TOUCH PATCH
   ============================================================ */

/* Hide about section everywhere except inside start-screen */
#about-section {
  display: none !important;
}
#start-screen #about-section {
  display: block !important;
}

/* Force landscape on mobile gameplay — CSS only hides canvas */
@media (max-width: 768px) and (orientation: portrait) {
  #gameCanvas {
    display: none;
  }
}

/* Rotate notice overlay */
#rotate-notice {
  display: none;
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 99999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Share Tech Mono', monospace;
  color: var(--neon);
  text-align: center;
  gap: 24px;
}
#rotate-notice svg {
  animation: rotateHint 2s ease-in-out infinite;
}
@keyframes rotateHint {
  0%, 100% { transform: rotate(0deg); }
  50%       { transform: rotate(90deg); }
}
#rotate-notice p {
  font-size: 12px;
  letter-spacing: 4px;
  color: rgba(0,255,65,0.7);
  margin: 0;
}

/* ── Virtual D-pad / touch controls ─────────────────────────── */
#touch-controls {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 160px;
  z-index: 200;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  /* Subtle dark bar so controls stand out from game */
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.0) 100%);
}

/* ── D-pad: bottom-left ─────────────────────────────────────── */
#joystick-zone {
  position: absolute;
  left: 8px;
  bottom: 8px;
  width: 130px;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

#joystick-base {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(0,255,65,0.06);
  border: 2px solid rgba(0,255,65,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 0 18px rgba(0,255,65,0.12), inset 0 0 12px rgba(0,255,65,0.05);
  touch-action: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

#joystick-knob {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(0,255,65,0.55), rgba(0,255,65,0.18));
  border: 2px solid rgba(0,255,65,0.7);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 14px rgba(0,255,65,0.4);
  pointer-events: none;
}

/* ── Right action cluster ───────────────────────────────────── */
#action-btns {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  pointer-events: auto;
  align-items: flex-end;
}
.action-btn {
  height: 40px;
  padding: 0 16px;
  background: rgba(0,255,65,0.07);
  border: 1px solid rgba(0,255,65,0.28);
  color: rgba(0,255,65,0.80);
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  border-radius: 6px;
  touch-action: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.07s;
  white-space: nowrap;
  min-width: 90px;
  text-align: center;
}
.action-btn:active, .action-btn.pressed {
  background: rgba(0,255,65,0.20);
  border-color: #00ff41;
  box-shadow: 0 0 8px rgba(0,255,65,0.35);
}
#btn-sonar  {
  border-color: rgba(0,242,255,0.40);
  color: rgba(0,242,255,0.85);
  background: rgba(0,242,255,0.07);
}
#btn-sonar:active, #btn-sonar.pressed {
  background: rgba(0,242,255,0.18);
  border-color: #00f2ff;
  box-shadow: 0 0 8px rgba(0,242,255,0.35);
}
#btn-fire {
  border-color: rgba(255,60,60,0.45);
  color: rgba(255,80,80,0.90);
  background: rgba(255,0,0,0.07);
}
#btn-fire:active, #btn-fire.pressed {
  background: rgba(255,0,0,0.20);
  border-color: #ff3c3c;
  box-shadow: 0 0 8px rgba(255,0,0,0.35);
}
#btn-select {
  border-color: rgba(255,200,0,0.35);
  color: rgba(255,200,0,0.75);
  background: rgba(255,200,0,0.05);
}
#btn-select:active, #btn-select.pressed {
  background: rgba(255,200,0,0.15);
  border-color: #ffc800;
}
#btn-pause {
  border-color: rgba(158,180,184,0.25);
  color: rgba(158,180,184,0.55);
}
#btn-pause {
  position: absolute !important;
  bottom: 12px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  pointer-events: auto;
  height: 40px !important;
  padding: 0 20px !important;
  font-size: 11px !important;
  letter-spacing: 2px !important;
  border-radius: 6px !important;
  border: 1px solid rgba(158,180,184,0.25) !important;
  background: rgba(0,0,0,0.07) !important;
  color: rgba(158,180,184,0.55) !important;
  min-width: unset !important;
}
#btn-pause:active, #btn-pause.pressed {
  background: rgba(158,180,184,0.12);
  border-color: rgba(158,180,184,0.65);
}

/* ── Sprint: in action-btns column, same size as other action btns ── */
#btn-sprint {
  position: static;
  bottom: auto;
  left: auto;
  transform: none;
  height: 40px;
  padding: 0 16px;
  background: rgba(0,255,65,0.07);
  border: 1px solid rgba(0,255,65,0.22);
  color: rgba(0,255,65,0.60);
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  border-radius: 6px;
  touch-action: none;
  cursor: pointer;
  pointer-events: auto;
  min-width: 90px;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.07s;
}
#btn-sprint:active, #btn-sprint.pressed {
  background: rgba(0,255,65,0.20);
  border-color: #00ff41;
}

/* ── Rotate notice — controlled by JS on game start only ────── */
@media (max-width: 768px) and (orientation: portrait) {
  #gameCanvas      { display: none; }
  #touch-controls  { display: none !important; }
}

/* ── Mobile landscape: single authoritative block ──────────── */
@media (max-width: 900px) and (orientation: landscape) {
  #gameCanvas {
    display: block !important;
    position: fixed !important;
    top: 0 !important; left: 0 !important;
    width: 100vw !important; height: 100vh !important;
    z-index: 1 !important;
  }
  #top-left {
    position: fixed !important;
    top: 4px !important; left: 4px !important;
    padding: 4px 6px !important;
    border-left-width: 1px !important;
    background: rgba(0,0,0,0.72) !important;
    z-index: 30 !important;
  }
  #top-left .label { font-size: 0.45rem !important; letter-spacing: 1px !important; }
  #top-left .value { font-size: 0.65rem !important; }
  #top-left #sector-info { font-size: 0.48rem !important; margin-top: 1px !important; }
  #top-right {
    position: fixed !important;
    top: 4px !important; right: 140px !important;
    padding: 4px 6px !important;
    border-right-width: 1px !important;
    background: rgba(0,0,0,0.72) !important;
    text-align: right !important;
    z-index: 30 !important;
  }
  #top-right .label { font-size: 0.45rem !important; letter-spacing: 1px !important; }
  #top-right .value { font-size: 0.65rem !important; }
  #bottom-left {
    position: fixed !important;
    top: 54px !important; bottom: auto !important; left: 4px !important;
    padding: 3px 6px !important;
    border-left-width: 1px !important;
    background: rgba(0,0,0,0.72) !important;
    gap: 3px !important;
    z-index: 30 !important;
  }
  #bottom-left .label { font-size: 0.4rem !important; letter-spacing: 0.5px !important; }
  #bottom-left .hud-sub-group { gap: 2px !important; }
  #stamina-container { width: 80px !important; height: 4px !important; }
  #charge-bar { width: 80px !important; height: 4px !important; }
  #emp-padding { display: none !important; }
  #touch-controls {
    position: fixed !important;
    bottom: 0 !important; left: 0 !important; right: 0 !important;
    height: 130px !important;
    z-index: 200 !important;
  }
  #joystick-zone { left: 8px !important; bottom: 8px !important; width: 110px !important; height: 110px !important; }
  #joystick-base { width: 94px !important; height: 94px !important; }
  #joystick-knob { width: 38px !important; height: 38px !important; }
  #action-btns { right: 10px !important; bottom: 8px !important; gap: 5px !important; }
  .action-btn { height: 32px !important; min-width: 76px !important; font-size: 10px !important; padding: 0 10px !important; }
  #btn-sprint { height: 32px !important; padding: 0 10px !important; font-size: 10px !important; }
  #btn-pause  { height: 32px !important; padding: 0 14px !important; font-size: 10px !important; bottom: 8px !important; }
  #death-screen {
    overflow-y: auto !important; padding: 8px 12px !important;
    padding-top: 12px !important; justify-content: flex-start !important;
  }
  #death-screen h1 { font-size: 1.3rem !important; letter-spacing: 3px !important; margin: 4px 0 !important; }
  #death-screen #ad-death-rect { max-width: 100% !important; margin: 6px auto !important; }
  #death-screen button { padding: 8px 16px !important; font-size: 0.72rem !important; letter-spacing: 2px !important; }
  #death-screen > div:last-of-type { gap: 8px !important; margin-top: 6px !important; flex-wrap: wrap !important; justify-content: center !important; }
}

@media (max-width: 900px) and (orientation: landscape) and (max-height: 420px) {
  .action-btn { height: 28px !important; font-size: 9px !important; }
  #btn-sprint { height: 28px !important; }
  #touch-controls { height: 110px !important; }
  #joystick-zone { width: 96px !important; height: 96px !important; }
  #joystick-base { width: 82px !important; height: 82px !important; }
  #joystick-knob { width: 32px !important; height: 32px !important; }
}

/* ── Death screen mobile ────────────────────────────────────── */
@media (max-width: 900px) and (orientation: landscape) {
  #death-screen {
    position: fixed !important;
    inset: 0 !important;
    overflow-y: auto !important;
    padding: 8px 12px !important;
    padding-top: 8px !important;
    justify-content: flex-start !important;
    align-items: center !important;
    z-index: 100 !important;
    box-sizing: border-box !important;
  }
  #death-screen h1 {
    font-size: clamp(0.95rem, 4vw, 1.4rem) !important;
    letter-spacing: 3px !important;
    margin: 4px 0 !important;
  }
  #death-screen #ad-death-rect {
    margin: 4px auto !important;
    max-width: 100% !important;
    min-height: 50px !important;
  }
  #death-screen #share-section {
    padding: 0 !important;
    width: 100% !important;
    max-width: 480px !important;
  }
  #death-screen #share-section > div {
    padding: 8px 10px !important;
    margin: 0 auto !important;
  }
  #death-screen #share-section > div > div:nth-child(2) {
    padding: 8px !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
  }
  #death-screen > div:last-of-type {
    gap: 8px !important;
    margin-top: 6px !important;
    margin-bottom: 8px !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    padding-bottom: 8px !important;
  }
  #death-screen button {
    padding: 8px 16px !important;
    font-size: 0.7rem !important;
    letter-spacing: 2px !important;
  }
}

@media (max-width: 768px) and (orientation: portrait) {
  #death-screen {
    position: fixed !important;
    inset: 0 !important;
    overflow-y: auto !important;
    padding: 16px !important;
    justify-content: flex-start !important;
    align-items: center !important;
    box-sizing: border-box !important;
  }
  #death-screen h1 {
    font-size: clamp(1.2rem, 7vw, 2rem) !important;
    letter-spacing: 4px !important;
    margin: 12px 0 !important;
    text-align: center !important;
  }
  #death-screen #ad-death-rect {
    margin: 10px auto !important;
    max-width: 100% !important;
  }
  #death-screen #share-section > div {
    padding: 10px !important;
  }
  #death-screen > div:last-of-type {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 10px !important;
    margin-top: 12px !important;
    padding-bottom: 20px !important;
  }
}

.faq-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.faq-item {
  border: 1px solid rgba(0,255,65,0.15);
  border-radius: 4px;
  padding: 10px 14px;
  background: rgba(0,255,65,0.02);
}
.faq-item summary {
  cursor: pointer;
  color: #00ff41;
  font-family: 'Share Tech Mono', monospace;
  letter-spacing: 1px;
  font-size: 0.95rem;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "// "; color: rgba(0,255,65,0.5); }
.faq-item p {
  margin: 8px 0 2px;
  color: #9bffb3;
  font-size: 0.85rem;
  line-height: 1.5;
}
#start-screen.overlay {
  padding-bottom: 20px !important;
}

/* ============================================
   BONUS GAMES SECTION
   ============================================ */
.top-bar .rhs {
  pointer-events: auto;
  display: flex;
  justify-content: flex-end;
  flex: 0 0 auto;
  margin-left: auto;
}
#bonusGamesNavBtn {
  position: relative !important;
  overflow: hidden !important;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(180deg, #6dff9a 0%, #00ff41 45%, #00b82f 100%);
  border: none;
  color: #002b0d;
  font-family: "Share Tech Mono", monospace;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 3px;
  padding: 11px 22px;
  cursor: pointer;
  text-transform: uppercase;
  border-radius: 6px;
  box-shadow:
    0 0 0 1px rgba(0,255,65,0.5),
    0 2px 6px rgba(0,255,65,0.4),
    0 0 8px rgba(0,255,65,0.3),
    inset 0 2px 3px rgba(255,255,255,0.65),
    inset 0 -6px 8px rgba(0,60,15,0.35);
  transition: transform .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}
#bonusGamesNavBtn::before {
  content: "🎮";
  font-size: 13px;
  filter: drop-shadow(0 1px 1px rgba(0,60,15,0.4));
}
#bonusGamesNavBtn::after {
  content: "";
  position: absolute !important;
  top: 0; bottom: 0; left: -70%;
  width: 45%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.75), transparent);
  transform: skewX(-20deg);
  animation: bonusBtnSheen 3.4s ease-in-out infinite;
  clip-path: inset(0 round 6px);
  pointer-events: none;
}
@keyframes bonusBtnSheen {
  0%   { left: -70%; }
  35%  { left: 130%; }
  100% { left: 130%; }
}
#bonusGamesNavBtn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow:
    0 0 0 1px rgba(0,255,65,0.7),
    0 3px 10px rgba(0,255,65,0.5),
    0 0 14px rgba(0,255,65,0.4),
    inset 0 2px 3px rgba(255,255,255,0.75),
    inset 0 -6px 8px rgba(0,60,15,0.35);
}
#bonusGamesNavBtn:active {
  transform: translateY(0) scale(0.98);
}

@media (max-width: 600px) {
  #bonusGamesNavBtn {
    font-size: 10px;
    padding: 9px 18px;
    letter-spacing: 2px;
    gap: 6px;
  }
  #bonusGamesNavBtn::before {
    font-size: 12px;
  }
}
.bonus-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}
.bonus-game-card {
  position: relative;
  cursor: pointer;
  border: 1px solid rgba(0,255,65,0.15);
  background: rgba(0,255,65,0.02);
  transition: transform .2s ease, border-color .2s ease;
  overflow: hidden;
}
.bonus-game-card:hover {
  transform: translateY(-4px);
  border-color: #00ff41;
  box-shadow: 0 8px 24px rgba(0,255,65,0.15);
}
.bonus-game-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  overflow: hidden;
  display: block;
}
}
.bonus-game-play {
  position: relative;
  z-index: 2;
  font-family: "Share Tech Mono", monospace;
  color: #000;
  background: rgba(255,255,255,0.88);
  padding: 8px 18px;
  border-radius: 20px;
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 12px;
}

/* ===== ANIMATED BONUS THUMBNAIL — SVG PREVIEW ART ===== */
.cq-thumb {
  background: #0E1424;
}
.cq-art {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.bonus-game-info { padding: 14px 16px; }
.bonus-game-info h3 {
  font-family: "Rajdhani", sans-serif;
  color: #00ff41;
  font-size: 15px;
  letter-spacing: 1px;
  margin: 0 0 6px;
}
.bonus-game-info p {
  font-size: 11px;
  color: rgba(155,255,179,0.6);
  line-height: 1.6;
  margin: 0;
}

.bonus-game-overlay {
  display: none;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 999999;
  background: #000;
  overflow: hidden;
}
.bonus-game-overlay.active { display: block; }
.bonus-game-overlay iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
