* { box-sizing: border-box; }

:root {
  --bg: #05070d;
  --panel: rgba(8, 13, 24, .88);
  --cyan: #00f6ff;
  --pink: #ff2bd6;
  --lime: #8dff3f;
  --text: #eafcff;
}

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 40%, rgba(0, 246, 255, .08), transparent 34%),
    radial-gradient(circle at 20% 80%, rgba(255, 43, 214, .07), transparent 30%),
    #05070d;
  border: 1px solid rgba(0,246,255,.18);
  box-shadow: 0 0 60px rgba(0,246,255,.08), inset 0 0 80px rgba(255,43,214,.03);
}

.screen {
  width: 100%;
  height: 100%;
  position: relative;
}

.game-screen {
  position: absolute;
  width: min(92vw, 1100px);
  aspect-ratio: 1.16 / 1;
  height: auto;
  max-height: 90vh;
  max-width: calc(100vw - 12px);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  overflow: hidden;
}

.screen {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  padding: 24px;
}

.scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .16;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 3px,
    rgba(255,255,255,.04) 4px
  );
}

#menu .scanlines { z-index: 1; }

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

.start-orb {
  position: absolute;
  width: clamp(130px, 20vw, 270px);
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(3px);
  opacity: .34;
}

.start-orb--cyan {
  top: 8%;
  left: -5%;
  background: radial-gradient(circle, rgba(104,239,255,.32) 0 3%, rgba(0,246,255,.08) 34%, transparent 70%);
  animation: startOrbDriftCyan 18s ease-in-out infinite alternate;
}

.start-orb--magenta {
  right: -4%;
  bottom: 2%;
  background: radial-gradient(circle, rgba(255,43,214,.26) 0 3%, rgba(255,43,214,.07) 36%, transparent 70%);
  animation: startOrbDriftMagenta 22s ease-in-out infinite alternate;
}

.start-hologram {
  position: absolute;
  width: 92px;
  height: 92px;
  border: 1px solid rgba(104,239,255,.16);
  transform: rotate(45deg);
  box-shadow: 0 0 24px rgba(104,239,255,.06), inset 0 0 18px rgba(255,43,214,.04);
}

.start-hologram::before,
.start-hologram::after {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(255,43,214,.16);
}

.start-hologram::after {
  inset: 31px;
  border-color: rgba(104,239,255,.28);
}

.start-hologram--left {
  left: 7%;
  bottom: 13%;
  animation: startHologramFloat 16s ease-in-out infinite;
}

.start-hologram--right {
  top: 13%;
  right: 9%;
  width: 58px;
  height: 58px;
  opacity: .72;
  animation: startHologramFloat 19s ease-in-out -6s infinite reverse;
}

.start-energy-line {
  position: absolute;
  width: 25vw;
  min-width: 180px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(104,239,255,.38), transparent);
  box-shadow: 0 0 12px rgba(104,239,255,.18);
  opacity: .34;
  transform: rotate(-24deg);
  animation: startEnergyScan 14s linear infinite;
}

.start-energy-line--one { top: 20%; left: -8%; }
.start-energy-line--two {
  top: 61%;
  right: -10%;
  background: linear-gradient(90deg, transparent, rgba(255,43,214,.36), transparent);
  box-shadow: 0 0 12px rgba(255,43,214,.16);
  animation-delay: -5s;
}
.start-energy-line--three {
  bottom: 12%;
  left: 31%;
  width: 16vw;
  min-width: 120px;
  opacity: .22;
  animation-delay: -9s;
}

.start-ufo {
  --ufo-scale: 2.12;
  position: absolute;
  top: 34%;
  left: 3%;
  width: 152px;
  height: 272px;
  opacity: .95;
  filter: drop-shadow(0 0 22px rgba(104,239,255,.34));
  transform-origin: center;
  transform: scale(var(--ufo-scale));
  will-change: transform;
  animation: startUfoPatrol 7.2s cubic-bezier(.45, .05, .55, .95) infinite;
}

.start-ufo__beam {
  position: absolute;
  z-index: 0;
  top: 75px;
  left: -9px;
  width: 170px;
  height: 183px;
  clip-path: polygon(41% 0, 59% 0, 100% 100%, 0 100%);
  background: linear-gradient(to bottom, rgba(255,255,255,.82), rgba(207,255,255,.27) 45%, rgba(104,239,255,0) 100%);
  filter: blur(.2px);
  transform-origin: top center;
  animation: startUfoBeam 1.45s ease-in-out infinite;
}

.start-ufo__alien {
  position: absolute;
  top: 130px;
  left: 76px;
  width: 18px;
  height: 29px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 46% 46% 40% 40%;
  background: radial-gradient(circle at 35% 31%, #ffffff 0 8%, #baffff 10% 22%, #5db9d0 24% 42%, #173245 44% 100%);
  box-shadow: 0 0 11px rgba(255,255,255,.8);
  animation: startAlienAbduction 3.3s ease-in infinite;
}

.start-ufo__alien::before,
.start-ufo__alien::after {
  content: "";
  position: absolute;
  top: 7px;
  width: 5px;
  height: 3px;
  border-radius: 50%;
  background: #141426;
}

.start-ufo__alien::before { left: 3px; }
.start-ufo__alien::after { right: 3px; }

.start-ufo__dome {
  position: absolute;
  z-index: 2;
  top: 20px;
  left: 49px;
  width: 54px;
  height: 38px;
  overflow: hidden;
  border: 1px solid rgba(188,251,255,.78);
  border-bottom: 0;
  border-radius: 54px 54px 16px 16px;
  background: radial-gradient(circle at 50% 25%, rgba(255,255,255,.72), rgba(104,239,255,.27) 28%, rgba(8,25,43,.78) 68%);
  box-shadow: inset 0 0 12px rgba(104,239,255,.24), 0 0 13px rgba(104,239,255,.34);
  animation: startUfoDome 2.6s ease-in-out infinite;
}

.start-ufo__pilot {
  position: absolute;
  left: 19px;
  bottom: 4px;
  width: 15px;
  height: 18px;
  border: 1px solid rgba(255,43,214,.64);
  border-radius: 50% 50% 42% 42%;
  background: #210b2a;
  box-shadow: 0 0 9px rgba(255,43,214,.35);
}

.start-ufo__saucer {
  position: absolute;
  z-index: 3;
  top: 51px;
  left: 12px;
  width: 128px;
  height: 37px;
  border: 1px solid rgba(104,239,255,.76);
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(210,255,255,.34), rgba(15,49,72,.82) 42%, rgba(255,43,214,.18));
  box-shadow: 0 7px 18px rgba(104,239,255,.17), inset 0 -5px 10px rgba(255,43,214,.14);
}

.start-ufo__saucer::after {
  content: "";
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.82), transparent);
  animation: startUfoHullSweep 2.2s linear infinite;
}

.start-ufo__light {
  position: absolute;
  z-index: 4;
  top: 72px;
  width: 7px;
  height: 4px;
  border-radius: 50%;
  background: #ff54d9;
  box-shadow: 0 0 9px #ff2bd6;
  animation: startUfoLights 1.8s ease-in-out infinite alternate;
}

.start-ufo__light--one { left: 36px; }
.start-ufo__light--two { left: 72px; animation-delay: -.6s; }
.start-ufo__light--three { left: 108px; animation-delay: -1.2s; }

.start-scout {
  --scout-scale: 2.18;
  position: absolute;
  top: 29%;
  right: 3%;
  width: 124px;
  height: 156px;
  opacity: .88;
  filter: drop-shadow(0 0 20px rgba(255,43,214,.26));
  transform-origin: center;
  transform: scale(var(--scout-scale));
  will-change: transform;
  animation: startScoutHover 6.2s cubic-bezier(.45, .05, .55, .95) infinite;
}

.start-scout__antenna {
  position: absolute;
  top: 0;
  left: 60px;
  width: 2px;
  height: 19px;
  background: linear-gradient(#68efff, rgba(104,239,255,.12));
  box-shadow: 0 0 8px rgba(104,239,255,.58);
}

.start-scout__antenna::before {
  content: "";
  position: absolute;
  top: -4px;
  left: -3px;
  width: 8px;
  height: 8px;
  border: 1px solid #ff54d9;
  border-radius: 50%;
  background: #16081e;
  box-shadow: 0 0 10px rgba(255,43,214,.55);
  animation: startScoutSignal 1.6s ease-in-out infinite alternate;
}

.start-scout__head {
  position: absolute;
  z-index: 2;
  top: 18px;
  left: 16px;
  width: 92px;
  height: 62px;
  border: 1px solid rgba(104,239,255,.68);
  border-radius: 27px 27px 15px 15px;
  background: linear-gradient(145deg, rgba(104,239,255,.17), rgba(8,16,34,.86) 58%, rgba(255,43,214,.12));
  box-shadow: inset 0 0 15px rgba(104,239,255,.1), 0 0 16px rgba(104,239,255,.18);
  transform-origin: 50% 80%;
  animation: startScoutHead 3.1s ease-in-out infinite;
}

.start-scout__head::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 8px;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(255,43,214,.72);
  border-radius: 50%;
  box-shadow: 0 0 7px rgba(255,43,214,.48);
}

.start-scout__visor {
  position: absolute;
  top: 20px;
  left: 13px;
  width: 64px;
  height: 20px;
  overflow: hidden;
  border: 1px solid rgba(255,43,214,.5);
  border-radius: 12px;
  background: #100d28;
  box-shadow: inset 0 0 10px rgba(255,43,214,.16);
}

.start-scout__eye {
  position: absolute;
  top: 5px;
  left: -8px;
  width: 22px;
  height: 8px;
  border-radius: 50%;
  background: #b8ffff;
  box-shadow: 0 0 11px #68efff;
  animation: startScoutScan 2.9s ease-in-out infinite;
}

.start-scout__body {
  position: absolute;
  z-index: 1;
  top: 72px;
  left: 29px;
  width: 66px;
  height: 57px;
  border: 1px solid rgba(255,43,214,.58);
  border-radius: 12px 12px 23px 23px;
  background: linear-gradient(135deg, rgba(255,43,214,.16), rgba(10,27,46,.86) 56%, rgba(104,239,255,.12));
  box-shadow: inset 0 0 14px rgba(255,43,214,.08);
  transform-origin: center;
  animation: startScoutCore 1.9s ease-in-out infinite;
}

.start-scout__body::before,
.start-scout__body::after {
  content: "";
  position: absolute;
  top: 16px;
  width: 13px;
  height: 3px;
  background: #68efff;
  box-shadow: 0 0 8px rgba(104,239,255,.72);
}

.start-scout__body::before { left: 15px; }
.start-scout__body::after { right: 15px; background: #ff54d9; box-shadow: 0 0 8px rgba(255,43,214,.72); }

.start-scout__arm {
  position: absolute;
  z-index: 0;
  top: 80px;
  width: 29px;
  height: 13px;
  border: 1px solid rgba(104,239,255,.4);
  background: rgba(104,239,255,.06);
}

.start-scout__arm--left {
  left: 5px;
  transform-origin: right center;
  animation: startScoutArmLeft 1.7s ease-in-out infinite;
}

.start-scout__arm--right {
  right: 5px;
  border-color: rgba(255,43,214,.4);
  transform-origin: left center;
  animation: startScoutArmRight 1.7s ease-in-out -.7s infinite;
}

@keyframes startOrbDriftCyan {
  from { transform: translate3d(-10px, -4px, 0) scale(.92); }
  to { transform: translate3d(36px, 26px, 0) scale(1.08); }
}

@keyframes startOrbDriftMagenta {
  from { transform: translate3d(12px, 8px, 0) scale(1.05); }
  to { transform: translate3d(-34px, -26px, 0) scale(.9); }
}

@keyframes startHologramFloat {
  0%, 100% { translate: 0 0; opacity: .42; }
  50% { translate: 0 -18px; opacity: .74; }
}

@keyframes startEnergyScan {
  from { translate: -18vw 0; opacity: 0; }
  20%, 75% { opacity: .38; }
  to { translate: 36vw 0; opacity: 0; }
}

@keyframes startUfoPatrol {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-4deg) scale(var(--ufo-scale)); }
  25% { transform: translate3d(46px, -24px, 0) rotate(4deg) scale(var(--ufo-scale)); }
  55% { transform: translate3d(82px, -6px, 0) rotate(-1deg) scale(var(--ufo-scale)); }
  78% { transform: translate3d(36px, 32px, 0) rotate(-5deg) scale(var(--ufo-scale)); }
}

@keyframes startUfoBeam {
  0%, 100% { opacity: .38; transform: scaleX(.86) scaleY(.82); }
  50% { opacity: .96; transform: scaleX(1.08) scaleY(1.06); }
}

@keyframes startUfoDome {
  0%, 100% { filter: brightness(.9); transform: translateY(0); }
  50% { filter: brightness(1.28); transform: translateY(-2px); }
}

@keyframes startUfoHullSweep {
  from { translate: -25px 0; opacity: 0; }
  18%, 72% { opacity: .88; }
  to { translate: 92px 0; opacity: 0; }
}

@keyframes startUfoLights {
  from { background: #ff54d9; box-shadow: 0 0 6px #ff2bd6; }
  to { background: #b8ffff; box-shadow: 0 0 12px #68efff; }
}

@keyframes startAlienAbduction {
  0% { transform: translateY(0) rotate(-5deg) scale(.9); opacity: 0; }
  14% { opacity: 1; }
  72% { transform: translateY(-91px) rotate(10deg) scale(.68); opacity: 1; }
  100% { transform: translateY(-122px) rotate(18deg) scale(.35); opacity: 0; }
}

@keyframes startScoutHover {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(3deg) scale(var(--scout-scale)); }
  22% { transform: translate3d(-48px, -42px, 0) rotate(-5deg) scale(var(--scout-scale)); }
  52% { transform: translate3d(-108px, -4px, 0) rotate(5deg) scale(var(--scout-scale)); }
  76% { transform: translate3d(-42px, 58px, 0) rotate(-4deg) scale(var(--scout-scale)); }
}

@keyframes startScoutHead {
  0%, 100% { transform: rotate(0); }
  35% { transform: rotate(-8deg); }
  68% { transform: rotate(7deg); }
}

@keyframes startScoutCore {
  0%, 100% { filter: brightness(.86); transform: scale(.96); }
  50% { filter: brightness(1.4); transform: scale(1.04); }
}

@keyframes startScoutArmLeft {
  0%, 100% { transform: rotate(28deg); }
  50% { transform: rotate(58deg) translateX(-4px); }
}

@keyframes startScoutArmRight {
  0%, 100% { transform: rotate(-28deg); }
  50% { transform: rotate(-58deg) translateX(4px); }
}

@keyframes startScoutScan {
  0%, 100% { transform: translateX(0); opacity: .7; }
  50% { transform: translateX(49px); opacity: 1; }
}

@keyframes startScoutSignal {
  from { opacity: .35; transform: scale(.75); }
  to { opacity: 1; transform: scale(1.2); }
}

.logo-wrap { position: relative; text-align: center; }

.eyebrow, .hud-label {
  letter-spacing: .22em;
  font-size: .7rem;
  color: var(--cyan);
  text-transform: uppercase;
}

h1 {
  margin: 8px 0;
  font-size: clamp(3.2rem, 9vw, 7rem);
  line-height: .9;
  letter-spacing: .08em;
  font-weight: 900;
  color: #a9ffff;
  text-shadow:
    0 0 5px rgba(224,255,255,.95),
    0 0 16px rgba(0,246,255,.88),
    0 0 38px rgba(0,246,255,.42),
    0 0 64px rgba(0,174,255,.2);
}

h1 span {
  color: var(--pink);
  text-shadow: 0 0 12px rgba(255,43,214,.78), 0 0 34px rgba(255,43,214,.34);
}

@supports (-webkit-background-clip: text) {
  h1 {
    background: linear-gradient(180deg, #f4ffff 0%, #9cffff 36%, #23e6ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  h1 span {
    background: none;
    -webkit-text-fill-color: var(--pink);
  }
}

.tagline {
  margin: 0;
  color: rgba(234,252,255,.7);
  font-size: 1rem;
}

.primary-btn {
  position: relative;
  z-index: 2;
  min-width: 220px;
  padding: 16px 30px;
  border: 1px solid var(--cyan);
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(0,246,255,.16), rgba(0,246,255,.05));
  color: var(--text);
  font-weight: 900;
  letter-spacing: .22em;
  cursor: pointer;
  box-shadow: 0 0 22px rgba(0,246,255,.18), inset 0 0 18px rgba(0,246,255,.08);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.primary-btn:hover {
  transform: translateY(-2px) scale(1.02);
  background: rgba(0,246,255,.16);
  box-shadow: 0 0 34px rgba(0,246,255,.35), 0 0 50px rgba(255,43,214,.12);
}



.player-entry {
  display: grid;
  gap: 7px;
  width: min(320px, 100%);
  text-align: center;
}

.player-entry label {
  color: var(--cyan);
  font-size: .68rem;
  letter-spacing: .2em;
}

.player-entry input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
  border: 1px solid rgba(0,246,255,.28);
  background: rgba(3,7,14,.72);
  color: #eafcff;
  font: inherit;
  text-align: center;
  outline: none;
  text-transform: none;
}

.player-entry input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 16px rgba(0,246,255,.12);
}

.player-entry input::placeholder {
  color: rgba(234,252,255,.35);
}

.leaderboard {
  width: min(380px, 100%);
  padding: 14px 16px;
  box-sizing: border-box;
  border: 1px solid rgba(0,246,255,.14);
  background: rgba(3,7,14,.48);
}

.leaderboard-title {
  color: var(--cyan);
  font-size: .68rem;
  letter-spacing: .2em;
  text-align: center;
  margin-bottom: 9px;
}

#leaderboard-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 4px;
}

#leaderboard-list li {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 5px 7px;
  color: rgba(234,252,255,.78);
  font-size: .75rem;
  border-bottom: 1px solid rgba(0,246,255,.06);
}

#leaderboard-list li:last-child { border-bottom: 0; }
#leaderboard-list .rank { color: var(--cyan); }
#leaderboard-list .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#leaderboard-list .points { color: var(--pink); font-weight: 800; }

.score-save-message {
  min-height: 18px;
  margin: -12px 0 18px;
  color: var(--cyan);
  font-size: .75rem;
  letter-spacing: .08em;
}

.start-controls {
  position: relative;
  width: min(680px, 100%);
  padding: 8px;
  border: 1px solid rgba(0,246,255,.17);
  background: rgba(4,12,23,.68);
  box-shadow: inset 0 0 18px rgba(0,246,255,.025);
}

.start-controls-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  color: var(--cyan);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .24em;
}

.start-controls-title::before,
.start-controls-title::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, rgba(0,246,255,.52));
}

.start-controls-title::after {
  background: linear-gradient(90deg, rgba(255,43,214,.38), transparent);
}

.controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(80px, 1fr));
  gap: 6px;
  width: 100%;
}

.controls > div {
  min-height: 42px;
  padding: 7px 5px;
  text-align: center;
  border: 1px solid rgba(0,246,255,.11);
  background: rgba(255,255,255,.018);
}

.controls > div > b {
  display: block;
  color: var(--cyan);
  font-size: .61rem;
  letter-spacing: .08em;
}

.controls > div > span {
  display: block;
  margin-top: 3px;
  color: rgba(234,252,255,.58);
  font-size: .58rem;
  letter-spacing: .02em;
}

.game-screen {
  background: #03050a;
  cursor: default !important;
}

#game {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  cursor: default !important;
}

.hud {
  gap: 18px;
  position: absolute;
  z-index: 5;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.hud-card, .score-card {
  padding: 10px 14px;
  background: rgba(3,7,14,.72);
  border: 1px solid rgba(0,246,255,.22);
  backdrop-filter: blur(5px);
}

.health-track {
  width: 190px;
  height: 8px;
  margin-top: 6px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}

.health-fill {
  width: 100%;
  height: 100%;
  background: var(--lime);
  box-shadow: 0 0 12px rgba(141,255,63,.7);
  transition: width .12s linear;
}

.score-card { min-width: 120px; text-align: right; }
.score-card strong {
  display: block;
  margin-top: 2px;
  color: var(--pink);
  font-size: 1.45rem;
  text-shadow: 0 0 12px rgba(255,43,214,.55);
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  background: rgba(2,4,9,.68);
  backdrop-filter: blur(3px);
}

.gameover-card {
  width: min(420px, calc(100% - 40px));
  padding: 42px 30px 28px;
  text-align: center;
  background: var(--panel);
  border: 1px solid rgba(255,43,214,.38);
  box-shadow: 0 0 50px rgba(255,43,214,.12), inset 0 0 35px rgba(0,246,255,.04);
}

.gameover-card h2 {
  margin: 8px 0 20px;
  font-size: 3rem;
  color: var(--pink);
  text-shadow: 0 0 18px rgba(255,43,214,.5);
}

.gameover-card p { color: rgba(234,252,255,.65); }

.final-score {
  margin: 4px 0 26px;
  font-size: 4rem;
  font-weight: 900;
  color: var(--cyan);
  text-shadow: 0 0 18px rgba(0,246,255,.55);
}

.hint { margin-bottom: 0; font-size: .8rem; }
.hidden { display: none !important; }

.health-number {
  display: inline-block;
  margin-left: 8px;
  color: rgba(234,252,255,.7);
  font-size: .72rem;
}

#crosshair {
  position: absolute;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 1px solid rgba(0,246,255,.8);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(0,246,255,.5);
  pointer-events: none;
  z-index: 20;
  transform: translate3d(0, 0, 0);
}

#crosshair::before, #crosshair::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: rgba(0,246,255,.75);
  transform: translate(-50%, -50%);
}

#crosshair::before { width: 2px; height: 24px; }
#crosshair::after { width: 24px; height: 2px; }

@media (max-width: 650px) {
  .shell { height: 100vh; border: 0; }
  .controls { grid-template-columns: repeat(2, 1fr); }
  .start-controls { padding: 8px; }
  .start-controls-title { margin-bottom: 7px; }
  .start-ufo {
    --ufo-scale: 1.02;
    top: 7%;
    left: -7%;
    opacity: .66;
  }
  .start-scout {
    --scout-scale: 1.04;
    top: 27%;
    right: -4%;
    opacity: .68;
  }
  .hud {
  gap: 18px; top: 8px; left: 8px; right: 8px; }
  .health-track { width: 130px; }
  h1 { font-size: 3.2rem; }
}

.hud-level {
  display: block;
  margin-top: 8px;
  text-align: right;
}
.hud-level b {
  color: var(--cyan);
  font-size: 1rem;
  margin-left: 5px;
}
.level-card {
  border-color: rgba(0,246,255,.42);
  box-shadow: 0 0 55px rgba(0,246,255,.14), inset 0 0 35px rgba(255,43,214,.05);
}
.level-card h2 {
  color: var(--cyan);
  text-shadow: 0 0 18px rgba(0,246,255,.55);
  margin-bottom: 10px;
}
.level-card p {
  margin-top: 8px;
}
.level-card .primary-btn {
  margin-top: 12px;
}


@media (max-width: 700px), (max-height: 700px) {
  .game-screen {
    width: calc(100vw - 8px);
    max-width: calc(100vw - 8px);
    max-height: calc(100vh - 8px);
    aspect-ratio: 1.16 / 1;
  }
}


.build-version {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  font: 600 9px/1 system-ui, sans-serif;
  letter-spacing: 0.18em;
  color: rgba(104, 239, 255, 0.55);
  pointer-events: none;
}

.victory-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(255, 230, 109, .75);
  box-shadow: 0 0 40px rgba(255, 43, 194, .28), 0 0 80px rgba(104, 239, 255, .18);
}

.victory-card h2 {
  background: linear-gradient(90deg, #fff36a, #ff3bd4, #68efff, #fff36a);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: victoryGlow 2.8s linear infinite;
}

.party-burst {
  margin: 12px 0 18px;
  font-size: 28px;
  letter-spacing: 12px;
  animation: partyBounce .8s ease-in-out infinite alternate;
}

@keyframes victoryGlow {
  from { background-position: 0% 50%; }
  to { background-position: 300% 50%; }
}

@keyframes partyBounce {
  from { transform: translateY(0) rotate(-2deg); }
  to { transform: translateY(-7px) rotate(2deg); }
}


.secondary-btn {
  position: relative;
  z-index: 2;
  min-width: 220px;
  padding: 12px 22px;
  border: 1px solid rgba(0,246,255,.34);
  border-radius: 4px;
  background: rgba(0,246,255,.045);
  color: rgba(234,252,255,.88);
  font: inherit;
  font-weight: 800;
  letter-spacing: .14em;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.secondary-btn:hover {
  transform: translateY(-1px);
  border-color: var(--cyan);
  background: rgba(0,246,255,.10);
}
.gameover-card > .secondary-btn { margin-top: 10px; }
.menu-card { padding-top: 30px; }
.menu-card h2 { margin-bottom: 22px; }
.menu-actions, .menu-panel {
  display: grid;
  gap: 10px;
  justify-items: center;
}
.menu-panel-title {
  color: var(--cyan);
  font-size: .72rem;
  letter-spacing: .2em;
  margin-bottom: 8px;
}
.menu-leaderboard-list {
  list-style: none;
  width: min(360px, 100%);
  padding: 0;
  margin: 0 0 12px;
  display: grid;
  gap: 4px;
}
.menu-leaderboard-list li {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 8px;
  padding: 7px 9px;
  border-bottom: 1px solid rgba(0,246,255,.08);
  color: rgba(234,252,255,.82);
  font-size: .78rem;
}
.menu-leaderboard-list .rank { color: var(--cyan); }
.menu-leaderboard-list .points { color: var(--pink); font-weight: 800; }
.setting-row {
  width: min(360px, 100%);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(0,246,255,.12);
  background: rgba(255,255,255,.025);
  color: rgba(234,252,255,.8);
  font-size: .72rem;
  letter-spacing: .12em;
}
.setting-row input[type="range"] {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: var(--cyan);
}
.setting-row output { color: var(--cyan); font-weight: 800; }
.setting-note {
  width: min(360px, 100%);
  color: rgba(234,252,255,.45);
  font-size: .68rem;
  letter-spacing: .06em;
}
.menu-close { margin-top: 14px; }


.start-menu-btn {
  min-width: 220px;
}

#menu-overlay {
  position: absolute;
  z-index: 100;
}


/* Mobile controls */
#mobile-controls {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  touch-action: none;
}
.touch-control,
.mobile-pause {
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.touch-joystick {
  position: absolute;
  left: 20px;
  bottom: 22px;
  width: 118px;
  height: 118px;
  border: 2px solid rgba(0,246,255,.42);
  border-radius: 50%;
  background: rgba(4,12,24,.42);
  box-shadow: 0 0 24px rgba(0,246,255,.12), inset 0 0 22px rgba(0,246,255,.08);
}
.touch-stick {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  margin: -24px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.7);
  background: rgba(0,246,255,.2);
  box-shadow: 0 0 18px rgba(0,246,255,.25);
}
.touch-aim {
  position: absolute;
  right: 20px;
  bottom: 22px;
  width: 118px;
  height: 118px;
  border: 2px solid rgba(255,43,214,.42);
  border-radius: 50%;
  background: rgba(24,4,24,.35);
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.68);
  font-size: 11px;
  letter-spacing: .16em;
  box-shadow: 0 0 24px rgba(255,43,214,.1), inset 0 0 22px rgba(255,43,214,.08);
}
.mobile-pause {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 42px;
  height: 38px;
  border: 1px solid rgba(0,246,255,.5);
  border-radius: 10px;
  background: rgba(4,10,20,.72);
  color: var(--text);
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 0 16px rgba(0,246,255,.12);
}
@media (max-width: 900px), (pointer: coarse) {
  #mobile-controls { display: block; }
  #crosshair { display: none; }
  .game-screen { touch-action: none; }
}


/* Audio and controls settings */
.setting-group {
  margin: 14px 0 20px;
  padding: 12px 14px;
  border: 1px solid rgba(120, 220, 255, 0.16);
  border-radius: 10px;
  background: rgba(8, 14, 28, 0.45);
}

.setting-title {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  font-weight: 700;
}

.setting-description {
  margin-top: 4px;
  margin-bottom: 8px;
  opacity: 0.58;
  font-size: 0.72rem;
}

.controls-legend {
  margin: 18px 0;
  padding: 14px;
  border: 1px solid rgba(120, 220, 255, 0.16);
  border-radius: 10px;
  background: rgba(8, 14, 28, 0.45);
}

.control-row {
  display: grid;
  grid-template-columns: 78px 1fr;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-size: 0.76rem;
}

.control-row kbd {
  display: inline-block;
  padding: 4px 7px;
  border: 1px solid rgba(120, 220, 255, 0.28);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.68rem;
  text-align: center;
  letter-spacing: 0.08em;
}

/* =========================
   SETTINGS / AUDIO
   ========================= */

.audio-settings {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 8px 0 20px;
}

.audio-setting {
  padding: 14px 16px;
  border: 1px solid rgba(104, 239, 255, 0.18);
  border-radius: 10px;
  background: rgba(8, 16, 28, 0.55);
}

.audio-setting-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.audio-setting-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.audio-setting output {
  min-width: 42px;
  text-align: right;
  font-weight: 700;
  color: #68efff;
}

.audio-setting input[type="range"] {
  width: 100%;
  margin: 2px 0 5px;
}

.audio-setting-help {
  font-size: 11px;
  opacity: 0.58;
}


/* =========================
   CONTROLS LEGEND
   ========================= */

.controls-legend {
  margin-top: 8px;
  padding: 16px;
  border: 1px solid rgba(104, 239, 255, 0.18);
  border-radius: 10px;
  background: rgba(8, 16, 28, 0.55);
}

.controls-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin-bottom: 14px;
}

.control-section {
  margin-top: 14px;
}

.control-section:first-of-type {
  margin-top: 0;
}

.control-section-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  opacity: 0.5;
  margin-bottom: 7px;
}

.control-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 34px;
}

.control-keys {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  min-width: 88px;
}

.control-keys span {
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(104, 239, 255, 0.42);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: rgba(104, 239, 255, 0.08);
  color: #68efff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.control-keys.mouse-key span {
  min-width: 62px;
}

.control-description {
  font-size: 12px;
  opacity: 0.82;
}

@media (max-width: 700px) {
  .control-row {
    gap: 10px;
  }

  .control-description {
    font-size: 11px;
  }
}


/* Compacte settings */
.compact-audio {
  gap: 10px;
  margin-bottom: 12px;
}

.compact-audio .audio-setting {
  padding: 10px 12px;
}

.compact-audio .audio-setting-head {
  margin-bottom: 5px;
}

.compact-audio .audio-setting-help {
  display: none;
}

.compact-controls {
  padding: 12px;
  margin-top: 0;
}

.compact-controls .controls-title {
  margin-bottom: 9px;
  font-size: 12px;
}

.controls-compact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 18px;
}

.compact-control {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 29px;
  font-size: 11px;
  white-space: nowrap;
}

.compact-key {
  min-width: 48px;
  height: 24px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(104, 239, 255, 0.42);
  border-radius: 4px;
  background: rgba(104, 239, 255, 0.08);
  color: #68efff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.compact-control span:last-child {
  opacity: 0.8;
}

@media (max-width: 700px) {
  .controls-compact-grid {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   HOMEPAGE — NEON SPACE HOLOGRAM
   ============================================================ */

.menu-card {
  position: relative;
  overflow: hidden;
}

.menu-space-art {
  position: absolute;
  width: 250px;
  height: 190px;
  left: 50%;
  top: 82px;
  transform: translateX(-50%);
  pointer-events: none;
  opacity: 0.78;
  z-index: 0;
}

.menu-card > *:not(.menu-space-art) {
  position: relative;
  z-index: 2;
}

.space-planet {
  position: absolute;
  width: 82px;
  height: 82px;
  left: 84px;
  top: 48px;
  border-radius: 50%;
  transform: rotate(-18deg);
  animation: neonPlanetFloat 5s ease-in-out infinite;
}

.planet-core {
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255,255,255,0.8) 0 3%, transparent 4%),
    radial-gradient(circle at 65% 35%, rgba(104,239,255,0.9) 0 9%, transparent 10%),
    radial-gradient(circle at 35% 68%, rgba(255,42,201,0.75) 0 12%, transparent 13%),
    radial-gradient(circle at 50% 50%, rgba(25,120,180,0.8), rgba(7,15,32,0.95) 70%);
  box-shadow:
    0 0 18px rgba(104,239,255,0.7),
    0 0 42px rgba(255,42,201,0.3);
}

.planet-glow {
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  border: 1px solid rgba(104,239,255,0.35);
  box-shadow: 0 0 25px rgba(104,239,255,0.25);
  animation: neonPulse 2.8s ease-in-out infinite;
}

.space-orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 185px;
  height: 58px;
  border: 1px solid rgba(104,239,255,0.38);
  border-radius: 50%;
  transform-origin: center;
}

.orbit-one {
  transform: translate(-50%, -50%) rotate(-20deg);
  animation: orbitSpinOne 9s linear infinite;
}

.orbit-two {
  width: 155px;
  height: 48px;
  border-color: rgba(255,42,201,0.3);
  transform: translate(-50%, -50%) rotate(48deg);
  animation: orbitSpinTwo 12s linear infinite reverse;
}

.space-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #68efff;
  box-shadow: 0 0 8px #68efff;
  animation: particleFloat 4s ease-in-out infinite;
}

.particle-one { left: 30px; top: 42px; animation-delay: -1s; }
.particle-two { left: 205px; top: 70px; animation-delay: -2s; }
.particle-three { left: 50px; top: 130px; animation-delay: -3s; }
.particle-four { left: 194px; top: 132px; animation-delay: -1.5s; }
.particle-five { left: 126px; top: 18px; animation-delay: -2.5s; }

@keyframes neonPlanetFloat {
  0%, 100% { transform: translateY(0) rotate(-18deg); }
  50% { transform: translateY(-7px) rotate(-12deg); }
}

@keyframes neonPulse {
  0%, 100% { opacity: 0.45; transform: scale(0.96); }
  50% { opacity: 0.9; transform: scale(1.04); }
}

@keyframes orbitSpinOne {
  0% { transform: translate(-50%, -50%) rotate(-20deg) scaleX(1); }
  50% { transform: translate(-50%, -50%) rotate(160deg) scaleX(0.72); }
  100% { transform: translate(-50%, -50%) rotate(340deg) scaleX(1); }
}

@keyframes orbitSpinTwo {
  0% { transform: translate(-50%, -50%) rotate(48deg) scaleX(1); }
  50% { transform: translate(-50%, -50%) rotate(228deg) scaleX(0.68); }
  100% { transform: translate(-50%, -50%) rotate(408deg) scaleX(1); }
}

@keyframes particleFloat {
  0%, 100% { transform: translate(0, 0); opacity: 0.35; }
  50% { transform: translate(5px, -9px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .menu-space-art *,
  .menu-space-art {
    animation: none !important;
  }
}


/* ============================================================
   REAL HOMEPAGE — FLOATING NEON SPACE REACTOR
   ============================================================ */

#menu {
  position: relative;
  overflow: hidden;
}

.home-space-art {
  position: absolute;
  width: 520px;
  height: 300px;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.48;
}

#menu > *:not(.scanlines):not(.home-space-art):not(.start-atmosphere) {
  position: relative;
  z-index: 2;
}

.home-reactor {
  position: absolute;
  width: 150px;
  height: 150px;
  left: 185px;
  top: 72px;
  border-radius: 50%;
  animation: homeReactorFloat 6s ease-in-out infinite;
}

.home-reactor-core {
  position: absolute;
  inset: 31px;
  border-radius: 50%;
  background:
    radial-gradient(
      circle at 35% 30%,
      rgba(255,255,255,0.95) 0 3%,
      transparent 5%
    ),
    radial-gradient(
      circle,
      rgba(104,239,255,0.95) 0%,
      rgba(30,120,190,0.7) 30%,
      rgba(255,42,201,0.38) 55%,
      rgba(4,8,20,0.95) 78%
    );
  box-shadow:
    0 0 18px rgba(104,239,255,0.9),
    0 0 45px rgba(104,239,255,0.45),
    0 0 75px rgba(255,42,201,0.22);
  animation: homeCorePulse 3s ease-in-out infinite;
}

.home-reactor-ring {
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(104,239,255,0.45);
  border-radius: 50%;
  box-shadow:
    0 0 18px rgba(104,239,255,0.2),
    inset 0 0 15px rgba(255,42,201,0.15);
}

.home-orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  transform-origin: center;
}

.home-orbit-one {
  width: 430px;
  height: 105px;
  border: 1px solid rgba(104,239,255,0.35);
  transform: translate(-50%, -50%) rotate(-18deg);
  animation: homeOrbitOne 12s linear infinite;
}

.home-orbit-two {
  width: 360px;
  height: 85px;
  border: 1px solid rgba(255,42,201,0.25);
  transform: translate(-50%, -50%) rotate(43deg);
  animation: homeOrbitTwo 16s linear infinite reverse;
}

.home-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #68efff;
  box-shadow: 0 0 9px rgba(104,239,255,0.9);
  animation: homeParticleFloat 4s ease-in-out infinite;
}

.hp-one   { left: 55px;  top: 70px;  animation-delay: -0.5s; }
.hp-two   { left: 440px; top: 78px;  animation-delay: -1.4s; }
.hp-three { left: 82px;  top: 218px; animation-delay: -2.1s; }
.hp-four  { left: 420px; top: 225px; animation-delay: -2.8s; }
.hp-five  { left: 155px; top: 25px;  animation-delay: -1.8s; }
.hp-six   { left: 365px; top: 268px; animation-delay: -3.2s; }

@keyframes homeReactorFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-9px);
  }
}

@keyframes homeCorePulse {
  0%, 100% {
    transform: scale(0.94);
    filter: brightness(0.9);
  }
  50% {
    transform: scale(1.05);
    filter: brightness(1.2);
  }
}

@keyframes homeOrbitOne {
  0% {
    transform: translate(-50%, -50%) rotate(-18deg) scaleX(1);
  }
  50% {
    transform: translate(-50%, -50%) rotate(162deg) scaleX(0.72);
  }
  100% {
    transform: translate(-50%, -50%) rotate(342deg) scaleX(1);
  }
}

@keyframes homeOrbitTwo {
  0% {
    transform: translate(-50%, -50%) rotate(43deg) scaleX(1);
  }
  50% {
    transform: translate(-50%, -50%) rotate(223deg) scaleX(0.68);
  }
  100% {
    transform: translate(-50%, -50%) rotate(403deg) scaleX(1);
  }
}

@keyframes homeParticleFloat {
  0%, 100% {
    transform: translate(0, 0);
    opacity: 0.25;
  }
  50% {
    transform: translate(7px, -10px);
    opacity: 0.9;
  }
}

@media (max-width: 700px) {
  .home-space-art {
    width: 390px;
    height: 250px;
    top: 47%;
    opacity: 0.35;
    transform: translate(-50%, -50%) scale(0.8);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-space-art,
  .home-space-art * {
    animation: none !important;
  }
}

/* START SCREEN POLISH V2 */
.start-controls--minimal {
  max-width: 760px;
  margin: 18px auto 0;
  padding: 14px 16px 16px;
  border: 1px solid rgba(0, 224, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(4, 14, 28, 0.86), rgba(2, 8, 18, 0.92));
  box-shadow:
    0 0 24px rgba(0, 224, 255, 0.08),
    inset 0 0 18px rgba(255, 0, 153, 0.05);
}

.controls-mini-title {
  margin-bottom: 10px;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.24em;
  font-weight: 700;
  color: #7df9ff;
}

.controls-inline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.control-chip {
  min-height: 74px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  text-align: center;
  border: 1px solid rgba(0, 224, 255, 0.18);
  background: rgba(3, 14, 28, 0.74);
  box-shadow: inset 0 0 14px rgba(0, 224, 255, 0.04);
}

.control-chip b {
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.12em;
  color: #00f0ff;
}

.control-chip span {
  font-size: 12px;
  line-height: 1.2;
  color: rgba(230, 245, 255, 0.82);
}

#menu .leaderboard {
  margin-top: 14px;
}

#menu .player-entry {
  margin-bottom: 12px;
}

#menu #playBtn,
#menu #startMenuBtn,
#menu #arcadeBackBtn {
  max-width: 260px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 900px) {
  .controls-inline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .controls-inline {
    grid-template-columns: 1fr;
  }

  .control-chip {
    min-height: 64px;
  }
}
/* END START SCREEN POLISH V2 */

/* START SCREEN TUNING V3 */
#menu .tagline {
  display: none !important;
}

#menu h1 span {
  color: inherit;
  text-shadow:
    0 0 12px rgba(125, 249, 255, 0.55),
    0 0 26px rgba(0, 224, 255, 0.46),
    0 0 52px rgba(0, 224, 255, 0.28);
}

.start-hologram--left,
.start-hologram--right {
  opacity: 0.96;
}

.start-hologram--left {
  left: 10.5% !important;
}

.start-hologram--right {
  right: 10.5% !important;
}

@media (max-width: 1100px) {
  .start-hologram--left {
    left: 5% !important;
  }

  .start-hologram--right {
    right: 5% !important;
  }
}
/* END START SCREEN TUNING V3 */



/* START SCREEN POLISH V4 */

#menu {
  padding-inline: clamp(20px, 3vw, 40px);
}

#menu .hero-copy {
  margin-bottom: 16px;
}

#menu .hero-copy h1 {
  transform: scale(0.94);
  transform-origin: center;
}

#menu .player-entry {
  max-width: 300px;
  margin: 0 auto 16px;
}

#menu #playBtn,
#menu #startMenuBtn,
#menu #arcadeBackBtn {
  width: min(240px, 100%);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 12px;
}

#menu .leaderboard {
  width: min(330px, 100%);
  margin: 24px auto 0;
  padding: 12px 14px 10px;
  border: 1px solid rgba(0, 224, 255, 0.18);
  background: linear-gradient(180deg, rgba(4, 14, 28, 0.84), rgba(2, 8, 18, 0.95));
  box-shadow:
    0 0 24px rgba(0, 224, 255, 0.06),
    inset 0 0 18px rgba(255, 0, 153, 0.04);
}

#menu .leaderboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

#menu .leaderboard-title {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.18em;
}

#menu .leaderboard-toggle {
  padding: 5px 10px;
  border: 1px solid rgba(0, 224, 255, 0.28);
  background: rgba(4, 20, 36, 0.84);
  color: #7df9ff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

#menu .leaderboard-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 224, 255, 0.55);
  box-shadow: 0 0 14px rgba(0, 224, 255, 0.12);
}

#menu #leaderboard-list {
  margin: 0;
  padding: 0;
  max-height: 120px;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

#menu .leaderboard.is-expanded #leaderboard-list {
  max-height: 420px;
}

#menu #leaderboard-list li {
  min-height: 24px;
  padding: 3px 0;
  font-size: 12px;
}

.start-controls--minimal {
  max-width: 560px;
  margin: 28px auto 0;
  padding: 10px 12px 12px;
}

.controls-mini-title {
  margin-bottom: 8px;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.20em;
  font-weight: 700;
  color: #7df9ff;
}

.controls-inline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.control-chip {
  min-height: 52px;
  padding: 8px 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  text-align: center;
  border: 1px solid rgba(0, 224, 255, 0.18);
  background: rgba(3, 14, 28, 0.74);
  box-shadow: inset 0 0 14px rgba(0, 224, 255, 0.04);
}

.control-chip b {
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0.08em;
  color: #00f0ff;
}

.control-chip span {
  font-size: 10px;
  line-height: 1.2;
  color: rgba(230, 245, 255, 0.82);
}

.start-hologram--left {
  left: clamp(90px, 15vw, 220px) !important;
}

.start-hologram--right {
  right: clamp(90px, 15vw, 220px) !important;
}

@media (max-width: 900px) {
  .controls-inline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .start-hologram--left {
    left: 40px !important;
  }

  .start-hologram--right {
    right: 40px !important;
  }
}

@media (max-width: 560px) {
  .controls-inline {
    grid-template-columns: 1fr;
  }

  .control-chip {
    min-height: 50px;
  }

  #menu .leaderboard {
    width: min(100%, 320px);
  }
}

/* END START SCREEN POLISH V4 */


/* GAME OVER LEVEL REACHED */
.gameover-level {
  margin: 2px 0 14px;
  color: #7df9ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(0, 224, 255, 0.32);
}

/* GAME OVER READABILITY V2 */
#game-over .gameover-stat-label {
  margin: 12px 0 4px;
  font-size: 16px;
  line-height: 1.4;
  color: rgba(235, 246, 255, 0.92);
  letter-spacing: 0.04em;
}

#game-over .gameover-level {
  margin: 12px 0 5px;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 800;
  color: #7df9ff;
  letter-spacing: 0.16em;
  text-shadow: 0 0 12px rgba(0, 224, 255, 0.42);
}

#game-over .score-save-message {
  margin: 4px 0 16px;
  min-height: 20px;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #7df9ff;
}
/* END GAME OVER READABILITY V2 */

/* START BUTTON HIERARCHY V1 */

/* Main action: PLAY */
#menu #playBtn {
  width: min(285px, 100%);
  min-height: 58px;
  margin-top: 4px;
  margin-bottom: 14px;

  border-color: rgba(255, 48, 190, 0.95);

  background:
    linear-gradient(
      135deg,
      rgba(255, 30, 170, 0.30),
      rgba(0, 225, 255, 0.18)
    );

  color: #ffffff;

  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.20em;

  box-shadow:
    0 0 16px rgba(255, 35, 185, 0.38),
    0 0 34px rgba(255, 35, 185, 0.16),
    inset 0 0 20px rgba(0, 235, 255, 0.08);

  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease;
}

#menu #playBtn:hover {
  transform: translateY(-2px) scale(1.025);

  border-color: #ff55cf;

  box-shadow:
    0 0 22px rgba(255, 35, 185, 0.52),
    0 0 46px rgba(255, 35, 185, 0.22),
    0 0 18px rgba(0, 235, 255, 0.12);
}


/* Secondary action: MENU */
#menu #startMenuBtn {
  width: min(240px, 100%);
  min-height: 46px;
  margin-bottom: 12px;

  background: rgba(3, 20, 34, 0.86);

  border-color: rgba(0, 225, 255, 0.42);

  font-size: 13px;
  letter-spacing: 0.16em;

  box-shadow:
    inset 0 0 16px rgba(0, 225, 255, 0.05);
}

#menu #startMenuBtn:hover {
  border-color: rgba(0, 235, 255, 0.78);

  box-shadow:
    0 0 18px rgba(0, 225, 255, 0.14);
}


/* Tertiary navigation: back to the Arcade */
#menu #arcadeBackBtn {
  width: min(215px, 100%);
  min-height: 40px;
  margin-bottom: 0;

  background: rgba(4, 12, 22, 0.60);

  border-color: rgba(125, 249, 255, 0.24);

  color: rgba(220, 245, 255, 0.82);

  font-size: 11.5px;
  letter-spacing: 0.13em;

  box-shadow: none;
}

#menu #arcadeBackBtn:hover {
  color: #ffffff;
  border-color: rgba(125, 249, 255, 0.55);

  background: rgba(4, 20, 32, 0.82);
}

/* END BUTTON HIERARCHY V1 */
