@import url("https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700;900&family=Rajdhani:wght@500;600&family=Share+Tech+Mono&display=swap");

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(165deg, #0a2844 0%, #103060 40%, #061828 100%);
  font-family: "Rajdhani", system-ui, sans-serif;
  color: #e8f4ff;
}

#game {
  display: block;
  width: 100vw;
  height: 100vh;
  cursor: crosshair;
  outline: none;
}

/* ═══════════════════════════════════════════════════════
   LOADING SCREEN
═══════════════════════════════════════════════════════ */

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: radial-gradient(ellipse at 35% 40%, #050e20 0%, #030a16 50%, #010608 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease;
}

.loading-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loading-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.loading-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  text-align: center;
  padding: 24px;
}

.loading-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.loading-eyebrow {
  font-family: "Orbitron", sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.35em;
  color: #3a8fbf;
  text-transform: uppercase;
}

.loading-title {
  font-family: "Orbitron", sans-serif;
  font-size: clamp(3rem, 10vw, 5.5rem);
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(175deg, #a8e8ff 0%, #44aaee 40%, #1166cc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 28px rgba(0, 160, 255, 0.5));
  animation: loadingTitlePulse 3s ease-in-out infinite;
}

.loading-title-accent {
  background: linear-gradient(180deg, #ffe566 0%, #e8a010 50%, #a86800 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@keyframes loadingTitlePulse {
  0%, 100% { filter: drop-shadow(0 0 18px rgba(0,180,255,0.5)); }
  50%       { filter: drop-shadow(0 0 36px rgba(0,220,255,0.9)); }
}

.loading-bar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: min(420px, 80vw);
}

.loading-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(0, 40, 70, 0.85);
  border: 1px solid rgba(0, 150, 220, 0.3);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.loading-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0066aa, #00ccff, #66eeff);
  border-radius: 3px;
  transition: width 0.25s ease-out;
  box-shadow: 0 0 14px rgba(0, 200, 255, 0.7);
}

.loading-bar-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.12) 50%, transparent 100%);
  animation: shimmer 1.6s linear infinite;
}

@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(300%); }
}

.loading-status {
  font-family: "Orbitron", sans-serif;
  font-size: 0.7rem;
  color: #4a9dc0;
  letter-spacing: 0.12em;
  min-height: 1em;
  transition: opacity 0.3s;
}

.loading-version {
  font-size: 0.75rem;
  color: #2a5a78;
  letter-spacing: 0.1em;
}

/* ═══════════════════════════════════════════════════════
   SPLASH / TITLE SCREEN
═══════════════════════════════════════════════════════ */

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 990;
  background: radial-gradient(ellipse at 50% 65%, #040d1a 0%, #020810 55%, #010406 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}

.splash-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.splash-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.splash-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
  text-align: center;
  padding: 24px;
}

.splash-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  animation: splashFadeIn 1.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

.splash-codename {
  font-family: "Orbitron", sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.4em;
  color: #3a8fbf;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.splash-title-top {
  font-family: "Orbitron", sans-serif;
  font-size: clamp(3.5rem, 12vw, 7rem);
  font-weight: 700;
  line-height: 0.9;
  background: linear-gradient(180deg, #88d8ff 0%, #2278cc 50%, #0a4080 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 0 rgba(0, 40, 100, 0.7));
  animation: splashTitleFloat 4s ease-in-out infinite;
}

.splash-title-bot {
  font-family: "Orbitron", sans-serif;
  font-size: clamp(3.5rem, 12vw, 7rem);
  font-weight: 700;
  line-height: 0.9;
  background: linear-gradient(180deg, #ffe566 0%, #e8a010 50%, #a86800 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 0 rgba(80, 50, 0, 0.6));
  animation: splashTitleFloat 4s ease-in-out infinite 0.4s;
}

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

.splash-tagline {
  margin-top: 14px;
  font-size: 0.85rem;
  color: #4a7a99;
  letter-spacing: 0.06em;
  animation: splashFadeIn 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}

.splash-cta {
  position: relative;
  font-family: "Orbitron", sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.18em;
  padding: 18px 52px;
  border: 2px solid rgba(0, 200, 255, 0.6);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(0, 140, 200, 0.25), rgba(0, 60, 100, 0.45));
  color: #88eeff;
  cursor: pointer;
  overflow: visible;
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s, transform 0.1s;
  animation: splashFadeIn 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.6s both;
  box-shadow: 0 0 28px rgba(0, 200, 255, 0.18), inset 0 0 20px rgba(0, 100, 180, 0.12);
}

.splash-cta:hover {
  background: linear-gradient(180deg, rgba(0, 200, 255, 0.35), rgba(0, 100, 160, 0.55));
  border-color: #00eeff;
  box-shadow: 0 0 48px rgba(0, 220, 255, 0.45), inset 0 0 30px rgba(0, 150, 220, 0.2);
  transform: translateY(-2px);
}

.splash-cta-text {
  position: relative;
  z-index: 1;
}

.splash-cta-ring {
  position: absolute;
  inset: -6px;
  border-radius: 10px;
  border: 1px solid rgba(0, 200, 255, 0.35);
  animation: ctaRingPulse 2s ease-in-out infinite;
}

@keyframes ctaRingPulse {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50%       { opacity: 0.7; transform: scale(1.04); }
}

.splash-hint {
  font-size: 0.78rem;
  color: #2a5a78;
  letter-spacing: 0.08em;
  animation: splashFadeIn 1.4s cubic-bezier(0.22, 1, 0.36, 1) 1s both;
}

.splash-hint kbd {
  font-family: "Orbitron", sans-serif;
  font-size: 0.72rem;
  background: rgba(0, 80, 120, 0.5);
  border: 1px solid rgba(0, 150, 200, 0.4);
  border-radius: 3px;
  padding: 1px 6px;
  color: #66bbdd;
}

/* ═══════════════════════════════════════════════════════
   HUD
═══════════════════════════════════════════════════════ */

#hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
  text-shadow: 0 0 12px rgba(0, 200, 255, 0.6);
  z-index: 5;
  opacity: 0;
  transition: opacity 0.2s ease;
  background: linear-gradient(180deg, rgba(0,5,15,0.75) 0%, rgba(0,5,15,0) 100%);
}

body.in-game #hud {
  opacity: 1;
}

.hud-left {
  min-width: 280px;
}

.bar-row, .xp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.bar-label {
  width: 30px;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  font-family: "Orbitron", sans-serif;
  text-shadow: 0 0 10px currentColor;
  letter-spacing: 0.05em;
}

.bar-track {
  flex: 1;
  height: 18px;
  border-radius: 4px;
  background: rgba(0, 10, 25, 0.9);
  border: 2px solid rgba(100, 200, 255, 0.45);
  overflow: hidden;
  max-width: 220px;
  box-shadow: 0 0 10px rgba(0, 100, 200, 0.3), inset 0 0 8px rgba(0,0,0,0.5);
}

.bar-track.hp .bar-fill {
  background: linear-gradient(90deg, #aa0000, #ff2244, #ff6677);
  box-shadow: 0 0 20px #ff2244, 0 0 40px rgba(255,50,80,0.4);
}

.bar-track.shield .bar-fill {
  background: linear-gradient(90deg, #0055aa, #00aaff, #66ddff);
  box-shadow: 0 0 20px #00aaff, 0 0 40px rgba(0,180,255,0.4);
}

.bar-track.xp {
  max-width: 240px;
  height: 12px;
}

.bar-track.xp .bar-fill {
  background: linear-gradient(90deg, #6600cc, #cc44ff, #ee99ff);
  box-shadow: 0 0 16px #cc44ff, 0 0 32px rgba(180,80,255,0.4);
}

.bar-fill {
  height: 100%;
  width: 50%;
  transition: width 0.12s ease-out;
}

.bar-val {
  font-family: "Orbitron", monospace;
  font-size: 14px;
  font-weight: 700;
  min-width: 48px;
  text-align: right;
  color: #ffffff;
  text-shadow: 0 0 8px rgba(150, 220, 255, 0.8);
}

.xp-label {
  font-family: "Orbitron", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #ee99ff;
  min-width: 56px;
  text-shadow: 0 0 10px #cc44ff;
}

.hud-center {
  text-align: center;
}

#timer {
  font-family: "Orbitron", monospace;
  font-size: 28px;
  letter-spacing: 0.14em;
  color: #7fdfff;
  text-shadow: 0 0 16px #00ccff, 0 0 32px rgba(0,200,255,0.4);
}

.wave {
  font-size: 16px;
  font-weight: 700;
  color: #aaddff;
  margin-top: 4px;
  text-shadow: 0 0 10px rgba(100,200,255,0.6);
}

.hud-right {
  text-align: right;
}

.currencies {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  font-family: "Orbitron", monospace;
  font-size: 15px;
  font-weight: 700;
}

.cur {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
  box-shadow: 0 0 8px currentColor;
}

.dot.g { background: #33ff99; color: #33ff99; }
.dot.o { background: #ff9933; color: #ff9933; }
.dot.b { background: #3399ff; color: #3399ff; }

.cur.coin::before {
  content: "◆";
  color: #ffd34d;
  font-size: 12px;
  margin-right: 4px;
  text-shadow: 0 0 6px #ffaa00;
}

#weaponBar {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

body.in-game #weaponBar {
  opacity: 1;
}

.slot {
  width: 52px;
  height: 52px;
  border-radius: 6px;
  background: rgba(0, 25, 50, 0.75);
  border: 2px solid rgba(80, 160, 220, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.slot.active {
  border-color: #ff3355;
  box-shadow: 0 0 14px rgba(255, 50, 80, 0.45);
}

.slot.locked {
  opacity: 0.45;
  filter: grayscale(0.4);
}

.slot::after {
  content: attr(data-key);
  position: absolute;
  bottom: 2px;
  right: 4px;
  font-size: 10px;
  font-family: "Orbitron", sans-serif;
  color: #6688aa;
}

.icon {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: linear-gradient(145deg, #1a3a55, #0a1520);
  box-shadow: inset 0 0 12px rgba(0, 255, 255, 0.15);
}

.icon.cannon {
  background:
    linear-gradient(90deg, transparent 40%, #00ffff 40%, #00ffff 60%, transparent 60%),
    linear-gradient(145deg, #1a3a55, #0a1520);
}

.icon.missile {
  clip-path: polygon(30% 0, 100% 50%, 30% 100%, 0 70%, 0 30%);
  background: linear-gradient(180deg, #ff8844, #662200);
}

.icon.dash {
  background: conic-gradient(from 0deg, #00ffff, #0066ff, #00ffff);
  border-radius: 50%;
}

.icon.rail {
  background: linear-gradient(90deg, #8844ff, #00ffff);
}

.icon.mortar {
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffff88, #884400);
}

.icon.gauss {
  border-radius: 2px;
  background:
    linear-gradient(180deg, transparent 35%, #ffee88 35%, #ffee88 42%, transparent 42%),
    linear-gradient(90deg, #1a2030 0%, #4466aa 45%, #88ccff 50%, #4466aa 55%, #1a2030 100%);
  box-shadow: inset 0 0 8px rgba(136, 220, 255, 0.4), 0 0 10px rgba(100, 200, 255, 0.25);
}

.icon.flak {
  clip-path: polygon(50% 0, 100% 38%, 82% 100%, 18% 100%, 0 38%);
  background: conic-gradient(from 0deg at 50% 60%, #ff6644, #ffcc44, #66ffaa, #44aaff, #ff6644);
  box-shadow: inset 0 -4px 12px rgba(0, 0, 0, 0.5);
}

.icon.ion {
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff, #66ffee 25%, #0088aa 60%, #001828 100%);
  box-shadow: 0 0 14px rgba(0, 255, 220, 0.45), inset 0 0 10px rgba(255, 255, 255, 0.35);
}

#weaponBar {
  flex-wrap: wrap;
  max-width: min(640px, 96vw);
  justify-content: center;
  gap: 6px;
}

#weaponBar .slot {
  width: 48px;
  height: 48px;
}

#levelOverlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 8, 20, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  backdrop-filter: blur(4px);
}

#levelOverlay.hidden {
  display: none;
}

.panel {
  background: linear-gradient(160deg, rgba(10, 40, 70, 0.95), rgba(5, 15, 35, 0.98));
  border: 1px solid rgba(0, 200, 255, 0.35);
  border-radius: 12px;
  padding: 28px 32px;
  max-width: 920px;
  width: 92%;
  box-shadow: 0 0 40px rgba(0, 180, 255, 0.12), inset 0 0 60px rgba(0, 100, 200, 0.05);
}

.panel.start {
  text-align: center;
  max-width: 440px;
}

.panel h1 {
  font-family: "Orbitron", sans-serif;
  font-size: 2rem;
  color: #7fe8ff;
  margin-bottom: 8px;
  letter-spacing: 0.06em;
}

.panel h2 {
  font-family: "Orbitron", sans-serif;
  font-size: 1.35rem;
  color: #aaf0ff;
  margin-bottom: 6px;
}

.tagline {
  color: #88aacc;
  margin-bottom: 16px;
}

.controls {
  color: #6699bb;
  font-size: 0.95rem;
  margin-bottom: 22px;
}

.sub {
  color: #7a9cbd;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

#upgradeChoices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 720px) {
  #upgradeChoices {
    grid-template-columns: 1fr;
  }
}

.upgrade-card {
  background: rgba(0, 30, 55, 0.9);
  border: 1px solid rgba(0, 200, 255, 0.28);
  border-radius: 10px;
  padding: 18px;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s;
  text-align: left;
}

.upgrade-card:hover {
  transform: translateY(-3px);
  border-color: #00eeff;
  box-shadow: 0 0 24px rgba(0, 220, 255, 0.2);
}

.upgrade-card h3 {
  font-family: "Orbitron", sans-serif;
  font-size: 1rem;
  color: #ffcc66;
  margin-bottom: 8px;
}

.upgrade-card p {
  color: #9ec8e8;
  font-size: 0.92rem;
  line-height: 1.35;
}

.upgrade-card .tag {
  display: inline-block;
  margin-top: 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #55ddff;
  font-family: "Orbitron", sans-serif;
}

/* ---- Global overlays ---- */
.screen-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  background: rgba(4, 12, 28, 0.94);
  backdrop-filter: blur(6px);
  pointer-events: auto;
}

.screen-overlay.hidden {
  display: none !important;
}

#levelOverlay {
  z-index: 50;
}


/* ═══════════════════════════════════════════════════════
   MAIN MENU — DEEP SEA COMMAND BRIDGE
═══════════════════════════════════════════════════════ */

.menu-ocean {
  justify-content: flex-start;
  align-items: stretch;
  padding: 0;
  background: #020c18;
  overflow: hidden;
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
}

#menuBgCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

#menuHeroCanvas {
  position: fixed;
  pointer-events: none;
  z-index: 2;
}

.menu-scanlines {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 3px,
    rgba(0,0,0,0.07) 3px, rgba(0,0,0,0.07) 4px
  );
  pointer-events: none;
  z-index: 9;
}

.menu-vignette {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%,
    transparent 62%, rgba(0,0,0,0.10) 90%, rgba(0,0,0,0.20) 100%);
  pointer-events: none;
  z-index: 8;
}

/* ── TOP BAR ── */
.menu-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: rgba(0, 4, 12, 0.88);
  border-bottom: 1px solid rgba(0, 140, 200, 0.18);
  z-index: 10;
  backdrop-filter: blur(4px);
  gap: 16px;
}

.menu-topbar::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(0,180,255,0.4) 20%,
    rgba(0,200,255,0.6) 50%,
    rgba(0,180,255,0.4) 80%,
    transparent
  );
}

.menu-topbar-left,
.menu-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.menu-topbar-right { justify-content: flex-end; }

.menu-topbar-center {
  font-family: "Orbitron", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  color: rgba(0, 220, 255, 0.92);
  white-space: nowrap;
  text-shadow: 0 0 14px rgba(0,200,255,0.75), 0 0 32px rgba(0,160,255,0.35);
}

.menu-topbar-title {
  font-family: "Orbitron", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  color: rgba(0, 225, 255, 0.95);
  text-transform: uppercase;
  text-shadow: 0 0 14px rgba(0,210,255,0.80), 0 0 32px rgba(0,160,255,0.40);
}

.menu-topbar-ping {
  font-family: "Orbitron", sans-serif;
  font-size: 0.56rem;
  letter-spacing: 0.16em;
  color: #44ff99;
  display: flex;
  align-items: center;
  gap: 5px;
  text-transform: uppercase;
}

.menu-topbar-divider {
  color: rgba(0,140,200,0.3);
  font-size: 0.7rem;
}

.menu-topbar-coord {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.66rem;
  color: rgba(0,160,220,0.5);
  letter-spacing: 0.05em;
}

.menu-alert-badge {
  font-family: "Orbitron", sans-serif;
  font-size: 0.54rem;
  letter-spacing: 0.12em;
  padding: 3px 9px;
  border-radius: 2px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.menu-alert-badge.green {
  background: rgba(0,50,25,0.7);
  border: 1px solid rgba(0,200,100,0.28);
  color: #44ff99;
}

.menu-alert-badge.red {
  background: rgba(50,8,12,0.75);
  border: 1px solid rgba(255,60,80,0.3);
  color: #ff6677;
}

.menu-alert-badge.yellow {
  background: rgba(50,35,0,0.7);
  border: 1px solid rgba(220,160,0,0.28);
  color: #ffcc44;
}

.blink-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  flex-shrink: 0;
  animation: blinkDot 1.2s ease-in-out infinite;
}

@keyframes blinkDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.08; }
}

/* ── MAIN LAYOUT ── */
.main-menu-layout {
  position: fixed;
  inset: 38px 0 40px 0;
  display: grid;
  grid-template-columns: 360px 1fr;
  z-index: 5;
  pointer-events: none;
}

/* ── LEFT PANEL ── */
.main-menu-left {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 36px 32px 28px 40px;
  background: linear-gradient(145deg,
    rgba(1,6,16,0.97) 0%,
    rgba(2,10,24,0.94) 50%,
    rgba(1,6,16,0.82) 100%
  );
  border-right: 1px solid rgba(0,140,200,0.14);
  position: relative;
  overflow: hidden;
  gap: 0;
}

.main-menu-left::before {
  content: "";
  position: absolute;
  top: -80px; right: -60px;
  width: 240px; height: 300px;
  background: radial-gradient(ellipse,
    rgba(0,160,255,0.055) 0%, transparent 70%);
  pointer-events: none;
}

.main-menu-left::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    rgba(0,180,255,0.5), rgba(0,100,200,0.28), transparent);
}

.panel-corner {
  position: absolute;
  width: 18px; height: 18px;
  pointer-events: none;
}

.panel-corner.tl { top: 46px; left: 12px;
  border-top: 1px solid rgba(0,180,255,0.38);
  border-left: 1px solid rgba(0,180,255,0.38); }
.panel-corner.tr { top: 46px; right: 12px;
  border-top: 1px solid rgba(0,180,255,0.18);
  border-right: 1px solid rgba(0,180,255,0.18); }
.panel-corner.bl { bottom: 46px; left: 12px;
  border-bottom: 1px solid rgba(0,180,255,0.38);
  border-left: 1px solid rgba(0,180,255,0.38); }
.panel-corner.br { bottom: 46px; right: 12px;
  border-bottom: 1px solid rgba(0,180,255,0.18);
  border-right: 1px solid rgba(0,180,255,0.18); }

/* ── Brand ── */
.menu-brand { margin-bottom: 22px; }

.menu-brand-eyebrow-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.menu-brand-eyebrow-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(0,120,180,0.45), transparent);
}

.menu-brand-eyebrow-line:last-child {
  background: linear-gradient(270deg, rgba(0,120,180,0.25), transparent);
  max-width: 22px;
}

.menu-brand-eyebrow {
  font-family: "Orbitron", sans-serif;
  font-size: 0.54rem;
  letter-spacing: 0.36em;
  color: rgba(0,150,200,0.6);
  text-transform: uppercase;
  white-space: nowrap;
}

.menu-brand-title {
  font-family: "Orbitron", sans-serif;
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: 0.02em;
}

.menu-brand-title-top {
  display: block;
  background: linear-gradient(175deg, #aae8ff 0%, #44aaee 45%, #1166bb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(0,160,255,0.5));
}

.menu-brand-title-bot {
  display: block;
  background: linear-gradient(175deg, #ffe980 0%, #eeaa18 50%, #bb7800 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 14px rgba(220,140,0,0.42));
}

.menu-brand-sub {
  margin-top: 10px;
  font-family: "Orbitron", sans-serif;
  font-size: 0.58rem;
  color: rgba(0,100,150,0.55);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.menu-status {
  min-height: 1.2em;
  color: #ffaa66;
  font-size: 0.8rem;
  margin-bottom: 10px;
  font-family: "Share Tech Mono", monospace;
  letter-spacing: 0.04em;
}

/* ── Difficulty ── */
.difficulty-block { margin-bottom: 18px; }

.diff-label {
  font-family: "Orbitron", sans-serif;
  font-size: 0.56rem;
  color: rgba(0,120,170,0.65);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  display: flex;
  align-items: center;
  gap: 7px;
}

.diff-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(0,100,150,0.28), transparent);
}

.diff-label-icon {
  color: rgba(0,180,255,0.45);
  font-size: 0.62rem;
}

.diff-buttons { display: flex; gap: 3px; }

.diff-btn {
  font-family: "Orbitron", sans-serif;
  font-size: 0.56rem;
  padding: 6px 8px;
  border-radius: 2px;
  border: 1px solid rgba(0,80,120,0.28);
  background: rgba(0,8,18,0.82);
  color: rgba(55,95,135,0.85);
  cursor: pointer;
  transition: all 0.15s ease;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  flex: 1;
  text-align: center;
}

.diff-btn:hover {
  border-color: rgba(0,180,255,0.42);
  color: #88ddff;
  background: rgba(0,28,52,0.7);
}

.diff-btn.active {
  background: linear-gradient(180deg,
    rgba(0,140,200,0.2), rgba(0,60,100,0.44));
  border-color: rgba(0,180,230,0.62);
  color: #cceeff;
  box-shadow: 0 0 9px rgba(0,160,220,0.16),
    inset 0 1px 0 rgba(0,200,255,0.1);
}

.diff-btn[data-diff="impossible"].active,
.diff-btn.impossible.active {
  background: linear-gradient(180deg,
    rgba(200,0,30,0.26), rgba(100,0,15,0.48));
  border-color: rgba(255,40,60,0.62);
  color: #ffbbcc;
  box-shadow: 0 0 9px rgba(255,30,50,0.2);
}

.diff-btn[data-diff="hard"].active {
  background: linear-gradient(180deg,
    rgba(200,80,0,0.24), rgba(100,35,0,0.46));
  border-color: rgba(255,110,30,0.58);
  color: #ffcca0;
}

/* ── Nav ── */
.main-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 20px;
}

.nav-btn {
  font-family: "Orbitron", sans-serif;
  font-size: 0.82rem;
  padding: 12px 14px 12px 14px;
  text-align: left;
  border: 1px solid rgba(0, 190, 255, 0.60);
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(0, 48, 88, 0.96) 0%, rgba(0, 28, 56, 0.90) 100%);
  color: #d8f2ff;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  gap: 11px;
  letter-spacing: 0.1em;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(0,210,255,0.18), 0 2px 12px rgba(0,0,0,0.5), 0 0 18px rgba(0,140,255,0.12), inset 0 0 22px rgba(0,100,200,0.08);
}

.nav-btn::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, transparent, #00ccff, transparent);
  transform: scaleY(0);
  transition: transform 0.18s ease;
}

.nav-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,160,240,0.12) 0%, transparent 65%);
  opacity: 0;
  transition: opacity 0.18s;
}

.nav-btn:hover {
  border-color: rgba(0, 220, 255, 0.85);
  color: #eef9ff;
  background: linear-gradient(90deg, rgba(0, 70, 120, 0.96) 0%, rgba(0, 44, 80, 0.92) 100%);
  transform: translateX(5px);
  box-shadow: inset 0 1px 0 rgba(0,240,255,0.22), 0 3px 18px rgba(0,120,220,0.35), 0 0 28px rgba(0,180,255,0.15);
}

.nav-btn:hover::before { transform: scaleY(1); }
.nav-btn:hover::after  { opacity: 1; }

.nav-btn.selected {
  background: linear-gradient(90deg, rgba(255,200,30,0.18) 0%, rgba(255,200,30,0.06) 100%);
  color: #ffe880;
  border-color: rgba(255, 210, 60, 0.55);
  transform: none;
  box-shadow: inset 0 1px 0 rgba(255,220,80,0.18), 0 2px 12px rgba(180,120,0,0.25);
}

.nav-btn.selected::before {
  background: linear-gradient(180deg, transparent, #ffe066, transparent);
  transform: scaleY(1);
}

.nav-btn.selected::after { opacity: 0; }

.nav-btn-icon-wrap {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px;
  background: rgba(0, 55, 100, 0.9);
  box-shadow: 0 0 10px rgba(0,180,255,0.18), inset 0 0 8px rgba(0,140,220,0.12);
  border: 1px solid rgba(0, 140, 200, 0.40);
  flex-shrink: 0;
  transition: border-color 0.18s, background 0.18s;
}

.nav-btn:hover .nav-btn-icon-wrap {
  border-color: rgba(0, 210, 255, 0.60);
  background: rgba(0, 60, 100, 0.75);
}

.nav-btn.selected .nav-btn-icon-wrap {
  border-color: rgba(255, 200, 60, 0.55);
  background: rgba(50, 36, 0, 0.75);
}

.nav-btn-icon {
  font-size: 0.78rem;
  color: #22ddff;
  text-shadow: 0 0 8px rgba(0,210,255,0.7);
  transition: color 0.18s;
}

.nav-btn.selected .nav-btn-icon { color: #ffe066; }
.nav-btn:hover .nav-btn-icon    { color: #00eeff; }
.nav-btn-label { flex: 1; font-weight: 700; text-shadow: 0 0 14px rgba(100,200,255,0.45); }

.nav-btn-arrow {
  font-size: 1.1rem;
  color: rgba(0, 160, 220, 0.55);
  transition: color 0.18s, transform 0.18s;
  line-height: 1;
}

.nav-btn:hover .nav-btn-arrow {
  color: rgba(0, 230, 255, 0.85);
  transform: translateX(4px);
}

.nav-btn.selected .nav-btn-arrow { color: rgba(255, 210, 60, 0.70); }

.nav-btn-exit {
  margin-top: 6px;
  color: rgba(200, 80, 90, 0.90);
  border-color: rgba(200, 60, 70, 0.35);
  background: linear-gradient(90deg, rgba(40, 8, 12, 0.80) 0%, rgba(24, 4, 8, 0.65) 100%);
}
.nav-btn-exit::before {
  background: linear-gradient(180deg, transparent, #ff4466, transparent);
}
.nav-btn-exit:hover {
  border-color: rgba(255, 80, 100, 0.65);
  background: linear-gradient(90deg, rgba(70, 10, 16, 0.90) 0%, rgba(40, 5, 10, 0.80) 100%);
  color: #ff9aaa;
  box-shadow: 0 3px 14px rgba(200,0,30,0.20);
}
.nav-btn-exit:hover .nav-btn-icon { color: #ff6677; }
.nav-btn-exit .nav-btn-icon-wrap {
  border-color: rgba(180, 40, 50, 0.45);
  background: rgba(35, 5, 10, 0.80);
}

/* ── Personal bests ── */
.menu-pb-strip {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
  padding: 9px 12px;
  border: 1px solid rgba(0,100,140,0.16);
  border-left: 2px solid rgba(0,160,220,0.28);
  border-radius: 3px;
  background: rgba(0,5,14,0.72);
}

.pb-header {
  font-family: "Orbitron", sans-serif;
  font-size: 0.53rem;
  color: rgba(155,125,28,0.88);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pb-icon { color: #ffcc44; font-size: 0.58rem; }

.pb-stats { display: flex; gap: 7px; }

.pb-stat {
  flex: 1;
  background: rgba(0,12,26,0.72);
  border: 1px solid rgba(0,80,118,0.18);
  border-radius: 2px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: "Orbitron", monospace;
  font-size: 0.65rem;
  color: #66aacc;
}

.pb-stat-icon { font-size: 0.58rem; opacity: 0.65; }

.menu-classification {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.56rem;
  color: rgba(0,80,110,0.5);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.menu-class-sep { color: rgba(0,100,140,0.28); font-size: 0.48rem; }

/* ── CENTER panel ── */
.main-menu-center {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
}

.menu-depth-ruler {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  z-index: 6;
}

.depth-mark {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 0;
  border-right: 1px solid rgba(0,120,180,0.18);
  padding-right: 10px;
}

.depth-mark::before {
  content: "";
  width: 8px; height: 1px;
  background: rgba(0,140,200,0.22);
}

.depth-mark.active::before {
  background: rgba(0,200,255,0.65);
  width: 14px;
  box-shadow: 0 0 5px rgba(0,200,255,0.55);
}

.depth-mark.danger::before {
  background: rgba(255,80,80,0.65);
  width: 14px;
}

.depth-mark span {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.53rem;
  color: rgba(0,140,190,0.38);
  letter-spacing: 0.04em;
}

.depth-mark.active span { color: rgba(0,200,255,0.7); }

.depth-mark.danger span {
  color: rgba(255,100,100,0.65);
  animation: depthPulse 1.5s ease-in-out infinite;
}

@keyframes depthPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.32; }
}

.menu-tac-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    linear-gradient(rgba(0,140,220,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,140,220,0.028) 1px, transparent 1px);
  background-size: 64px 64px;
}

.menu-ship-nameplate {
  position: absolute;
  bottom: 22%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  z-index: 6;
  animation: nameplateFloat 5s ease-in-out infinite;
}

@keyframes nameplateFloat {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(-4px); }
}

.nameplate-line {
  width: 80px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,180,255,0.4), transparent);
}

.nameplate-class {
  font-family: "Orbitron", sans-serif;
  font-size: 0.5rem;
  letter-spacing: 0.3em;
  color: rgba(0,160,200,0.4);
  text-transform: uppercase;
}

.nameplate-name {
  font-family: "Orbitron", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: rgba(100,200,255,0.65);
  text-shadow: 0 0 14px rgba(0,180,255,0.35);
  text-transform: uppercase;
}

.menu-ghost-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: "Orbitron", sans-serif;
  font-size: clamp(5rem, 14vw, 11rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0,160,255,0.045);
  white-space: nowrap;
  pointer-events: none;
  z-index: 1;
  user-select: none;
  animation: ghostPulse 9s ease-in-out infinite;
}

@keyframes ghostPulse {
  0%, 100% { -webkit-text-stroke-color: rgba(0,160,255,0.045); }
  50%       { -webkit-text-stroke-color: rgba(0,180,255,0.085); }
}

/* ── TICKER ── */
.menu-ticker-wrap {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 40px;
  background: rgba(0,3,10,0.92);
  border-top: 1px solid rgba(0,100,160,0.2);
  display: flex;
  align-items: center;
  z-index: 10;
  overflow: hidden;
}

.menu-ticker-wrap::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent,
    rgba(0,160,220,0.38) 30%, rgba(0,200,255,0.5) 50%,
    rgba(0,160,220,0.38) 70%, transparent);
}

.menu-ticker-label {
  flex-shrink: 0;
  font-family: "Orbitron", sans-serif;
  font-size: 0.54rem;
  letter-spacing: 0.2em;
  color: #00aadd;
  background: rgba(0,55,92,0.45);
  padding: 0 14px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 7px;
  border-right: 1px solid rgba(0,140,200,0.18);
  text-transform: uppercase;
  white-space: nowrap;
}

.menu-ticker-track {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
  mask-image: linear-gradient(90deg, transparent, black 4%, black 96%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 4%, black 96%, transparent);
}

.menu-ticker-inner {
  display: flex;
  align-items: center;
  height: 100%;
  white-space: nowrap;
  animation: tickerScroll 36s linear infinite;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.68rem;
  color: rgba(38,108,148,0.88);
  letter-spacing: 0.04em;
}

@keyframes tickerScroll {
  0%   { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

.ticker-sep {
  color: rgba(0,140,200,0.45);
  margin: 0 28px;
  font-size: 0.5rem;
}

.menu-ticker-time {
  flex-shrink: 0;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.66rem;
  color: rgba(0,140,180,0.48);
  padding: 0 14px;
  letter-spacing: 0.1em;
  border-left: 1px solid rgba(0,100,150,0.18);
  height: 100%;
  display: flex;
  align-items: center;
}

/* ── Responsive ── */
@media (max-width: 860px) {
  .main-menu-layout { grid-template-columns: 310px 1fr; }
  .main-menu-left   { padding: 30px 20px 22px 26px; }
}

@media (max-width: 640px) {
  .main-menu-layout { grid-template-columns: 1fr; }
  .main-menu-center { display: none; }
  .main-menu-left   { background: rgba(1,5,14,0.97); }
  .menu-topbar-coord  { display: none; }
  .menu-topbar-center { font-size: 0.58rem; }
  .menu-depth-ruler   { display: none; }
}


/* ═══════════════════════════════════════════════════════
   SHIPYARD / CUSTOMIZE SCREEN
═══════════════════════════════════════════════════════ */

.customize-screen {
  background: linear-gradient(160deg, #061018 0%, #0a1c2e 50%, #050c14 100%) !important;
  display: flex !important;
  flex-direction: column;
  padding: 0;
  justify-content: flex-start;
  overflow: hidden;
}

.cust-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid rgba(0, 200, 220, 0.18);
  background: rgba(0, 10, 22, 0.6);
  flex-shrink: 0;
  gap: 12px;
}

.cust-back-btn {
  font-size: 0.82rem;
  padding: 8px 16px;
}

.cust-title {
  font-family: "Orbitron", sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.22em;
  color: #7fe8ff;
}

.cust-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cust-salvage-badge {
  font-family: "Orbitron", monospace;
  font-size: 0.9rem;
  color: #ffe566;
  background: rgba(40, 30, 5, 0.6);
  border: 1px solid rgba(255, 220, 80, 0.3);
  border-radius: 20px;
  padding: 6px 14px;
  text-shadow: 0 0 8px rgba(255, 200, 0, 0.4);
}

.cust-launch-btn {
  font-family: "Orbitron", sans-serif;
  font-size: 0.9rem;
  padding: 9px 22px;
  border-radius: 6px;
  border: none;
  background: linear-gradient(180deg, #00c8e8, #0088aa);
  color: #fff;
  cursor: pointer;
  letter-spacing: 0.06em;
  box-shadow: 0 0 18px rgba(0, 200, 255, 0.3);
  transition: box-shadow 0.15s, transform 0.1s;
}

.cust-launch-btn:hover {
  box-shadow: 0 0 28px rgba(0, 220, 255, 0.5);
  transform: translateY(-1px);
}

.cust-ship-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px 24px 16px;
  justify-content: center;
  flex-shrink: 0;
}

.ship-card {
  position: relative;
  width: 110px;
  border-radius: 10px;
  border: 2px solid rgba(0, 180, 220, 0.25);
  background: rgba(0, 20, 38, 0.85);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
  padding: 12px 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  overflow: hidden;
}

.ship-card:hover:not(.ship-locked) {
  border-color: #44ddff;
  box-shadow: 0 0 20px rgba(0, 200, 255, 0.18);
  transform: translateY(-2px);
}

.ship-card.selected {
  border-color: #ffcc44;
  box-shadow: 0 0 22px rgba(255, 200, 80, 0.3);
  background: rgba(20, 15, 0, 0.88);
}

.ship-card.ship-locked {
  opacity: 0.6;
  cursor: pointer;
  border-style: dashed;
}

.ship-card.ship-locked:hover {
  border-color: rgba(255, 200, 80, 0.4);
  box-shadow: 0 0 14px rgba(255, 180, 0, 0.12);
  transform: translateY(-1px);
}

.ship-card-swatch {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.ship-card-name {
  font-family: "Orbitron", sans-serif;
  font-size: 0.68rem;
  color: #c8e8ff;
  text-align: center;
  letter-spacing: 0.06em;
}

.ship-card-cost {
  font-family: "Orbitron", monospace;
  font-size: 0.65rem;
  color: #ffe566;
  background: rgba(40, 30, 0, 0.7);
  border: 1px solid rgba(255, 200, 80, 0.3);
  border-radius: 10px;
  padding: 2px 8px;
}

.ship-card-free {
  font-size: 0.6rem;
  color: #66ff99;
  letter-spacing: 0.08em;
}

.ship-card.selected .ship-card-name { color: #ffe566; }

.ship-selected-tick {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffcc44;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: #1a1200;
  font-weight: bold;
}

.cust-detail-panel {
  flex: 1;
  display: flex;
  gap: 24px;
  padding: 16px 24px;
  min-height: 0;
  align-items: center;
}

.cust-detail-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

#mechPreviewCanvas {
  display: block;
  border-radius: 10px;
  background: radial-gradient(circle at 50% 60%, rgba(0, 180, 255, 0.18), rgba(0, 40, 80, 0.4) 60%, transparent);
  border: 1px solid rgba(0, 180, 220, 0.12);
}

.cust-hull-info { text-align: center; }

.cust-hull-info h3 {
  font-family: "Orbitron", sans-serif;
  font-size: 1.05rem;
  color: #ffcc44;
  margin-bottom: 4px;
}

.cust-hull-info p { font-size: 0.82rem; color: #88aacc; }

.cust-primary-tag {
  margin-top: 5px;
  font-family: "Orbitron", sans-serif;
  font-size: 0.7rem;
  color: #66ffee;
  background: rgba(0, 100, 80, 0.3);
  border: 1px solid rgba(0, 200, 160, 0.3);
  border-radius: 12px;
  padding: 3px 10px;
  display: inline-block;
}

.cust-detail-stats {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  max-width: 380px;
}

.cust-stat-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.csb-label {
  font-family: "Orbitron", sans-serif;
  font-size: 0.72rem;
  color: #6699bb;
  width: 42px;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.csb-track {
  flex: 1;
  height: 10px;
  border-radius: 3px;
  background: rgba(0, 20, 40, 0.9);
  border: 1px solid rgba(0, 100, 140, 0.35);
  overflow: hidden;
}

.csb-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.csb-hp { background: linear-gradient(90deg, #880022, #ff3366); box-shadow: 0 0 8px rgba(255,50,100,0.5); }
.csb-sh { background: linear-gradient(90deg, #004488, #00ccff); box-shadow: 0 0 8px rgba(0,200,255,0.4); }
.csb-sp { background: linear-gradient(90deg, #4400aa, #aa66ff); box-shadow: 0 0 8px rgba(160,80,255,0.4); }
.csb-fr { background: linear-gradient(90deg, #005533, #33ff99); box-shadow: 0 0 8px rgba(0,255,150,0.4); }

.csb-val {
  font-family: "Orbitron", monospace;
  font-size: 0.82rem;
  color: #cce8ff;
  width: 52px;
  text-align: right;
  flex-shrink: 0;
}

.cust-detail-note {
  font-size: 0.8rem;
  color: #5577aa;
  line-height: 1.45;
  margin-top: 4px;
  padding: 8px 12px;
  border: 1px solid rgba(0, 100, 140, 0.2);
  border-radius: 6px;
  background: rgba(0, 20, 40, 0.4);
}

.cust-diff-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  border-top: 1px solid rgba(0, 180, 220, 0.15);
  background: rgba(0, 8, 18, 0.55);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.diff-strip-label {
  font-family: "Orbitron", sans-serif;
  font-size: 0.7rem;
  color: #5577aa;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.cust-diff-pill-sm {
  font-family: "Orbitron", sans-serif;
  font-size: 0.78rem;
  color: #88aacc;
  margin-left: auto;
}

@media (max-width: 700px) {
  .cust-ship-grid { gap: 8px; padding: 14px 12px 10px; }
  .ship-card { width: 88px; }
  .cust-detail-panel { flex-direction: column; padding: 12px; gap: 14px; }
  .cust-detail-left { flex-direction: row; align-items: flex-start; }
  #mechPreviewCanvas { width: 140px !important; height: 120px !important; }
  .cust-detail-stats { max-width: 100%; }
}

/* Tutorial + save overlays */
.tutorial-overlay,
.continue-overlay,
.save-exit-overlay {
  background: rgba(8, 24, 48, 0.88) !important;
  z-index: 120;
}

.tutorial-panel,
.continue-panel {
  max-width: 460px;
  margin: 0 auto;
  padding: 28px;
  background: linear-gradient(160deg, rgba(40, 120, 180, 0.95), rgba(10, 40, 70, 0.98));
  border: 1px solid rgba(100, 200, 255, 0.35);
  border-radius: 14px;
  box-shadow: 0 0 50px rgba(0, 160, 255, 0.15);
}

.tutorial-list {
  margin: 18px 0 22px 20px;
  color: #c8e8ff;
  line-height: 1.5;
  font-size: 0.95rem;
}

.tutorial-list li {
  margin-bottom: 10px;
}

.save-slot-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0;
}

.save-pick-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid rgba(100, 200, 255, 0.3);
  background: rgba(0, 40, 70, 0.65);
  color: #e8f4ff;
  font-family: "Orbitron", sans-serif;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.12s;
}

.save-pick-btn:hover {
  border-color: #44ddff;
  transform: translateY(-2px);
}

.save-pick-btn span {
  font-weight: 700;
  font-size: 0.95rem;
}

.save-pick-btn small {
  font-size: 0.75rem;
  color: #88b8dd;
  font-weight: 500;
}

.save-exit-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 12px;
}

/* Pause overlay */
.pause-overlay {
  background: rgba(4, 10, 22, 0.78) !important;
  backdrop-filter: blur(8px);
}

.pause-panel {
  max-width: 320px;
  margin: 0 auto;
  padding: 32px 28px;
  background: linear-gradient(160deg, rgba(10, 35, 65, 0.97), rgba(5, 15, 35, 0.99));
  border: 1px solid rgba(80, 160, 255, 0.3);
  border-radius: 14px;
  box-shadow: 0 0 50px rgba(0, 100, 255, 0.12);
}

.pause-panel h2 {
  font-family: "Orbitron", sans-serif;
  font-size: 1.35rem;
  color: #aaf0ff;
  margin-bottom: 22px;
  text-align: center;
  letter-spacing: 0.12em;
}

.pause-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Pause buttons */
.pause-btn {
  font-family: "Orbitron", sans-serif;
  font-size: 1rem;
  padding: 14px 26px;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(80, 160, 255, 0.3);
  border-radius: 6px;
  background: rgba(10, 40, 80, 0.7);
  color: #c8e8ff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  letter-spacing: 0.06em;
  transition: background 0.15s, border-color 0.15s, transform 0.1s, box-shadow 0.15s;
}

.pause-btn:hover {
  background: rgba(30, 80, 160, 0.6);
  border-color: rgba(120, 200, 255, 0.55);
  transform: translateX(4px);
  box-shadow: 0 0 14px rgba(0, 150, 255, 0.2);
}

.pause-btn.danger {
  border-color: rgba(255, 80, 80, 0.3);
  color: #ffaaaa;
  background: rgba(60, 10, 10, 0.5);
}

.pause-btn.danger:hover {
  background: rgba(120, 20, 20, 0.6);
  border-color: rgba(255, 100, 100, 0.6);
  box-shadow: 0 0 14px rgba(255, 60, 60, 0.25);
}

.pause-btn-icon {
  font-size: 1rem;
  min-width: 18px;
  opacity: 0.8;
  color: #66aadd;
  flex-shrink: 0;
}

.pause-btn.danger .pause-btn-icon {
  color: #ff8888;
}

/* Settings overlay */
.settings-overlay {
  background: rgba(4, 10, 22, 0.88) !important;
  backdrop-filter: blur(8px);
  z-index: 200;
}

.settings-panel {
  max-width: 400px;
  margin: 0 auto;
  padding: 32px 28px;
  background: linear-gradient(160deg, rgba(10, 35, 65, 0.97), rgba(5, 15, 35, 0.99));
  border: 1px solid rgba(80, 160, 255, 0.3);
  border-radius: 14px;
  box-shadow: 0 0 50px rgba(0, 100, 255, 0.12);
}

.settings-panel h2 {
  font-family: "Orbitron", sans-serif;
  font-size: 1.2rem;
  color: #aaf0ff;
  margin-bottom: 22px;
  letter-spacing: 0.12em;
}

.set-vol-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.set-vol-label {
  font-family: "Orbitron", sans-serif;
  font-size: 0.78rem;
  color: #88b8d8;
  width: 46px;
  flex-shrink: 0;
  letter-spacing: 0.06em;
}

.vol-slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(
    90deg,
    #00aadd var(--fill, 50%),
    rgba(0, 60, 90, 0.8) var(--fill, 50%)
  );
  outline: none;
  cursor: pointer;
  border: 1px solid rgba(0, 170, 220, 0.25);
  transition: background 0.08s;
}

.vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #66ddff, #0088aa);
  border: 2px solid rgba(100, 220, 255, 0.8);
  box-shadow: 0 0 8px rgba(0, 200, 255, 0.55);
  cursor: pointer;
  transition: box-shadow 0.12s;
}

.vol-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 0 14px rgba(0, 220, 255, 0.8);
}

.vol-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #66ddff, #0088aa);
  border: 2px solid rgba(100, 220, 255, 0.8);
  box-shadow: 0 0 8px rgba(0, 200, 255, 0.55);
  cursor: pointer;
}

.vol-slider::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: transparent;
}

.mute-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid rgba(255, 80, 80, 0.35);
  background: rgba(60, 10, 10, 0.55);
  color: #ff8888;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, border-color 0.12s, box-shadow 0.12s;
  padding: 0;
}

.mute-btn:hover {
  background: rgba(180, 30, 30, 0.55);
  border-color: rgba(255, 80, 80, 0.7);
  box-shadow: 0 0 10px rgba(255, 60, 60, 0.35);
}

.mute-btn svg { pointer-events: none; }

.set-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: #88aacc;
  cursor: pointer;
}

.set-row input[type="checkbox"] {
  accent-color: #00ccff;
  width: 16px;
  height: 16px;
}

.settings-note {
  font-size: 0.78rem;
  color: #445566;
  margin: 18px 0;
  line-height: 1.5;
  border-top: 1px solid rgba(0,100,140,0.2);
  padding-top: 14px;
}

/* ── Settings → Controls block ── */
.set-controls {
  margin-top: 18px;
  border-top: 1px solid rgba(0,100,140,0.2);
  padding-top: 14px;
}

.set-subhead {
  font-family: "Orbitron", sans-serif;
  font-size: 0.82rem;
  color: #aaf0ff;
  letter-spacing: 0.12em;
  margin: 0 0 12px;
}

.set-controls-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.set-controls-list li {
  font-size: 0.82rem;
  color: #9fc2dd;
  line-height: 1.45;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.set-controls-list strong { color: #d8ecff; font-weight: 600; }

.key-combo {
  display: inline-flex;
  gap: 3px;
  flex-shrink: 0;
}

.set-controls-list kbd {
  font-family: "Orbitron", "Segoe UI", sans-serif;
  font-size: 0.7rem;
  line-height: 1;
  color: #cdeaff;
  background: linear-gradient(180deg, rgba(20,60,95,0.9), rgba(8,28,50,0.95));
  border: 1px solid rgba(90,170,230,0.45);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 4px 6px;
  min-width: 16px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.settings-back-btn {
  margin-top: 4px;
  width: 100%;
  justify-content: center;
  text-align: center;
}

/* ═══════════════════════════════════════════════════════
   SHARED BUTTONS
═══════════════════════════════════════════════════════ */

.btn-ghost {
  font-family: "Orbitron", sans-serif;
  padding: 10px 22px;
  border-radius: 6px;
  border: 1px solid rgba(120, 200, 255, 0.35);
  background: transparent;
  color: #aad8ff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  letter-spacing: 0.06em;
}

.btn-ghost:hover {
  border-color: rgba(120, 200, 255, 0.6);
  background: rgba(0, 60, 100, 0.25);
  transform: translateY(-1px);
}

.btn-play {
  font-family: "Orbitron", sans-serif;
  padding: 12px 32px;
  border-radius: 6px;
  border: none;
  background: linear-gradient(180deg, #00c8e8, #0088aa);
  color: #fff;
  cursor: pointer;
  letter-spacing: 0.06em;
  box-shadow: 0 0 20px rgba(0, 200, 255, 0.3);
  transition: box-shadow 0.15s, transform 0.1s;
}

.btn-play:hover {
  box-shadow: 0 0 30px rgba(0, 220, 255, 0.5);
  transform: translateY(-1px);
}

.btn-primary {
  font-family: "Orbitron", sans-serif;
  padding: 11px 26px;
  border-radius: 6px;
  border: 1px solid rgba(0, 180, 220, 0.5);
  background: linear-gradient(180deg, rgba(0, 140, 180, 0.4), rgba(0, 80, 120, 0.55));
  color: #88eeff;
  cursor: pointer;
  letter-spacing: 0.06em;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  border-color: #00ddff;
  box-shadow: 0 0 18px rgba(0, 200, 255, 0.3);
  transform: translateY(-1px);
}

.danger-outline {
  border: 1px solid rgba(255, 100, 100, 0.6) !important;
  background: rgba(80, 20, 20, 0.45) !important;
  color: #ffaaaa !important;
}

/* ═══════════════════════════════════════════════════════
   ENGAGEMENT SYSTEMS
═══════════════════════════════════════════════════════ */

.go-pb-badge {
  display: inline-block;
  font-family: "Orbitron", sans-serif;
  font-size: 0.6rem;
  color: #111;
  background: linear-gradient(135deg, #ffe566, #ff9933);
  border-radius: 8px;
  padding: 2px 7px;
  margin-left: 6px;
  vertical-align: middle;
  font-weight: 700;
  letter-spacing: 0.06em;
  box-shadow: 0 0 10px rgba(255, 200, 60, 0.5);
}

.go-stat-best {
  border-color: rgba(255, 200, 60, 0.55) !important;
  background: rgba(40, 30, 0, 0.9) !important;
  box-shadow: 0 0 18px rgba(255, 200, 60, 0.15) !important;
}

.go-personal-bests {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
  margin: 14px 0 20px;
  padding: 10px 20px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 200, 80, 0.15);
  font-family: "Orbitron", monospace;
  font-size: 0.82rem;
  color: #aa8844;
  flex-wrap: wrap;
  gap: 10px 20px;
}

.go-pb-title {
  font-size: 0.65rem;
  color: #664422;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  width: 100%;
  text-align: center;
  margin-bottom: 2px;
}

body.in-game.combo-active #weaponBar {
  box-shadow: 0 -4px 20px rgba(255, 150, 50, 0.2);
}

@keyframes lowHealthPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 30, 60, 0); }
  50% { box-shadow: inset 0 0 80px 20px rgba(255, 30, 60, 0.15); }
}

body.low-health #game {
  animation: lowHealthPulse 0.8s ease-in-out infinite;
}

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

.upgrade-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 200, 255, 0.04), transparent 60%);
  pointer-events: none;
}

.upgrade-card:hover::before {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.1), transparent 60%);
}

.wave-bonus-tag {
  font-family: "Orbitron", sans-serif;
  font-size: 0.7rem;
  color: #33ff99;
}

body.low-health #hud .bar-track.hp {
  border-color: rgba(255, 50, 80, 0.6);
}

#weaponBar .slot.on-cooldown {
  position: relative;
  overflow: hidden;
}

#weaponBar .slot.on-cooldown::before {
  content: "";
  position: absolute;
  inset: 0;
  background: conic-gradient(
    rgba(0, 0, 0, 0.55) calc(var(--cd-frac, 0) * 360deg),
    transparent 0
  );
  border-radius: 4px;
  pointer-events: none;
  z-index: 2;
}

#weaponBar .slot.weapon-ready {
  box-shadow: 0 0 12px rgba(0, 255, 200, 0.4) !important;
  border-color: rgba(0, 255, 180, 0.7) !important;
  animation: weaponReadyPulse 0.35s ease-out;
}

@keyframes weaponReadyPulse {
  0%   { box-shadow: 0 0 22px rgba(0, 255, 200, 0.9); }
  100% { box-shadow: 0 0 8px rgba(0, 255, 200, 0.3); }
}

.go-pb-badge {
  display: inline-block;
  font-family: "Orbitron", sans-serif;
  font-size: 0.65rem;
  color: #ffe566;
  background: rgba(40, 30, 0, 0.7);
  border: 1px solid rgba(255, 220, 80, 0.4);
  border-radius: 10px;
  padding: 1px 7px;
  margin-left: 4px;
  vertical-align: middle;
  text-shadow: 0 0 8px rgba(255, 200, 0, 0.6);
}

.go-stat-best {
  border-color: rgba(255, 220, 60, 0.5) !important;
  background: rgba(40, 30, 0, 0.8) !important;
}

.go-stat-best .go-stat-val {
  color: #ffe566 !important;
}

.go-personal-bests {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  margin: 8px 0 16px;
  border: 1px solid rgba(100, 80, 0, 0.3);
  border-radius: 8px;
  background: rgba(20, 15, 0, 0.5);
  font-family: "Orbitron", monospace;
  font-size: 0.8rem;
  color: #aa9955;
  flex-wrap: wrap;
}

.go-pb-title {
  color: #ffe566;
  margin-right: 4px;
  font-size: 0.75rem;
}

#waveText {
  transition: color 0.3s;
}

body.low-health .bar-label {
  animation: lowHpBlink 0.5s ease-in-out infinite alternate;
}

body.low-health .bar-track.hp .bar-fill {
  animation: hpBarPulse 0.5s ease-in-out infinite alternate;
}

@keyframes lowHpBlink {
  from { color: #9ecfff; }
  to   { color: #ff3355; text-shadow: 0 0 10px rgba(255, 50, 80, 0.8); }
}

@keyframes hpBarPulse {
  from { box-shadow: 0 0 8px rgba(255, 50, 80, 0.5); }
  to   { box-shadow: 0 0 20px rgba(255, 50, 80, 1); }
}

.upgrade-card .tag[data-tag="Weapon"],
.upgrade-card .tag:has(+ .tag) {
  color: #ff9933;
}

.upgrade-card:hover .tag {
  opacity: 1;
  letter-spacing: 0.12em;
}

.slot.weapon-ready::after {
  border-color: #00ff99 !important;
  text-shadow: 0 0 6px #00ff99;
}

/* Boot overlay (hidden immediately) — kept above GAME OVER section */
.boot-overlay {
  display: none !important;
}
.boot-overlay.gone {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════
   GAME OVER OVERLAY
═══════════════════════════════════════════════════════ */

.game-over-overlay {
  background: radial-gradient(ellipse at 50% 30%, #120820 0%, #060c18 55%, #020810 100%) !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  z-index: 90;
}

.go-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 100, 180, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 100, 180, 0.04) 1px, transparent 1px);
  background-size: 52px 52px;
  pointer-events: none;
  z-index: 0;
}

.go-panel {
  position: relative;
  z-index: 1;
  max-width: 680px;
  width: 92%;
  padding: 36px 40px 30px;
  background: linear-gradient(150deg, rgba(8, 20, 44, 0.98) 0%, rgba(4, 10, 22, 0.99) 100%);
  border: 1px solid rgba(0, 160, 220, 0.22);
  border-radius: 14px;
  box-shadow:
    0 0 80px rgba(0, 80, 180, 0.12),
    0 0 160px rgba(0, 40, 120, 0.08),
    inset 0 0 60px rgba(0, 60, 140, 0.04);
  animation: goPanelIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Decorative corner brackets */
.go-panel::before,
.go-panel::after {
  content: "";
  position: absolute;
  width: 22px; height: 22px;
  pointer-events: none;
}
.go-panel::before {
  top: 10px; left: 10px;
  border-top: 2px solid rgba(0, 160, 220, 0.45);
  border-left: 2px solid rgba(0, 160, 220, 0.45);
}
.go-panel::after {
  bottom: 10px; right: 10px;
  border-bottom: 2px solid rgba(0, 160, 220, 0.28);
  border-right: 2px solid rgba(0, 160, 220, 0.28);
}

@keyframes goPanelIn {
  from { opacity: 0; transform: scale(0.92) translateY(24px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.go-codename {
  font-family: "Orbitron", sans-serif;
  font-size: 0.55rem;
  letter-spacing: 0.38em;
  color: rgba(0, 140, 190, 0.5);
  text-transform: uppercase;
  margin-bottom: 8px;
  text-align: center;
}

.go-title {
  font-family: "Orbitron", sans-serif;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 900;
  text-align: center;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  background: linear-gradient(175deg, #ff8888 0%, #ff3355 40%, #cc0022 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 22px rgba(255, 40, 60, 0.45));
}

.go-sub {
  font-size: 0.9rem;
  color: rgba(120, 160, 200, 0.65);
  text-align: center;
  margin-bottom: 24px;
  letter-spacing: 0.04em;
}

.go-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

@media (max-width: 520px) {
  .go-stats { grid-template-columns: repeat(2, 1fr); }
}

.go-stat {
  background: rgba(0, 15, 32, 0.85);
  border: 1px solid rgba(0, 100, 150, 0.22);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: border-color 0.2s;
}

.go-stat.accent {
  border-color: rgba(255, 200, 60, 0.25);
  background: rgba(20, 12, 0, 0.8);
}

.go-stat.boss {
  border-color: rgba(255, 100, 60, 0.28);
  background: rgba(18, 6, 0, 0.8);
}

.go-stat-val {
  font-family: "Orbitron", monospace;
  font-size: 1.3rem;
  font-weight: 700;
  color: #cce8ff;
  line-height: 1;
  text-shadow: 0 0 12px rgba(100, 200, 255, 0.4);
}

.go-stat.accent .go-stat-val { color: #ffe566; text-shadow: 0 0 12px rgba(255, 200, 60, 0.4); }
.go-stat.boss   .go-stat-val { color: #ffaa77; text-shadow: 0 0 12px rgba(255, 120, 60, 0.4); }

.go-stat-label {
  font-size: 0.68rem;
  color: rgba(100, 150, 190, 0.6);
  text-align: center;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.go-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 6px;
  flex-wrap: wrap;
}

.go-btn-redeploy {
  min-width: 160px;
  font-size: 1rem;
  letter-spacing: 0.1em;
}

.go-btn-menu {
  min-width: 130px;
  font-size: 0.9rem;
}

.go-wallet-note {
  text-align: center;
  margin-top: 14px;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.72rem;
  color: rgba(255, 200, 80, 0.5);
  letter-spacing: 0.06em;
}

/* ── Responsive menu ── */
@media (max-width: 860px) {
  .main-menu-layout {
    grid-template-columns: 280px 1fr;
  }
  .main-menu-left {
    padding: 40px 24px 24px 28px;
  }
}

@media (max-width: 640px) {
  .main-menu-layout {
    grid-template-columns: 1fr;
  }
  .main-menu-center {
    display: none;
  }
  .main-menu-left {
    padding: 40px 24px 120px;
    background: linear-gradient(160deg, rgba(2,10,22,0.98), rgba(4,16,32,0.96));
  }
}

/* ══════════════════════════════════════════════════════════════════════
   MEGA WEAPON  — tutorial hint that fades in once on first unlock
   (the HUD itself is drawn on the game canvas, not the DOM)
══════════════════════════════════════════════════════════════════════ */

/* Weapon bar "Q" key badge — shown on slot active when a mega is ready */
#weaponBar.mega-ready::after {
  content: "Q";
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: "Orbitron", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #00ffee;
  text-shadow: 0 0 10px #00ffee, 0 0 20px #00aacc;
  animation: megaKeyPulse 1.1s ease-in-out infinite;
  pointer-events: none;
}

@keyframes megaKeyPulse {
  0%, 100% { opacity: 0.6; }
  50%       { opacity: 1; }
}

/* Genesis invulnerability — player ship glows gold */
body.genesis-active #game {
  filter: brightness(1.12) drop-shadow(0 0 18px rgba(255,220,60,0.55));
}

/* ══════════════════════════════════════════════════════════════════════════
   ENGAGEMENT EXPANSION — rarity cards, reroll, daily challenge, leaderboard
   ══════════════════════════════════════════════════════════════════════════ */

/* ---- Rarity-coloured level-up cards ---- */
.upgrade-card.rogue-card {
  --rar-color: #9fb4cf;
  border-color: color-mix(in srgb, var(--rar-color) 55%, transparent);
  position: relative;
  overflow: hidden;
}
.upgrade-card.rogue-card:hover {
  border-color: var(--rar-color);
  box-shadow: 0 0 26px color-mix(in srgb, var(--rar-color) 38%, transparent);
}
.upgrade-card.rogue-card h3 { color: var(--rar-color); }
.upgrade-card .rar-badge {
  display: block;
  font-family: "Orbitron", sans-serif;
  font-size: 10px;
  letter-spacing: 0.16em;
  margin-bottom: 6px;
  text-transform: uppercase;
  opacity: 0.95;
}
.upgrade-card .rar-stack {
  position: absolute;
  top: 12px; right: 14px;
  font-size: 11px;
  color: #6fa8c8;
  font-family: "Orbitron", sans-serif;
}
.upgrade-card.rar-legendary {
  background: linear-gradient(160deg, rgba(60,40,0,0.92), rgba(0,24,44,0.92));
  animation: rarLegPulse 2.2s ease-in-out infinite;
}
.upgrade-card.rar-epic {
  background: linear-gradient(160deg, rgba(40,16,60,0.9), rgba(0,24,44,0.9));
}
@keyframes rarLegPulse {
  0%,100% { box-shadow: 0 0 12px rgba(255,180,61,0.25); }
  50%     { box-shadow: 0 0 30px rgba(255,180,61,0.55); }
}

/* ---- Reroll bar ---- */
.rogue-reroll-bar {
  text-align: center;
  margin-top: 18px;
}
.rogue-reroll-btn {
  font-family: "Orbitron", sans-serif;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: #9fe8ff;
  background: rgba(0, 40, 70, 0.85);
  border: 1px solid rgba(0, 200, 255, 0.45);
  border-radius: 8px;
  padding: 9px 22px;
  cursor: pointer;
  transition: all 0.12s;
}
.rogue-reroll-btn:hover {
  background: rgba(0, 70, 110, 0.95);
  border-color: #00eeff;
  box-shadow: 0 0 18px rgba(0, 220, 255, 0.35);
}
.rogue-reroll-empty {
  font-family: "Orbitron", sans-serif;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: #4d6e84;
  text-transform: uppercase;
}

/* ---- Daily challenge overlay ---- */
.daily-overlay { z-index: 60; }
.daily-panel {
  max-width: 560px;
  width: calc(100% - 48px);
  margin: 0 auto;
  background: linear-gradient(165deg, rgba(6,22,42,0.97), rgba(2,10,24,0.97));
  border: 1px solid rgba(0, 200, 255, 0.3);
  border-radius: 16px;
  padding: 30px 32px;
  box-shadow: 0 0 60px rgba(0, 120, 200, 0.25);
}
.daily-eyebrow {
  font-family: "Orbitron", sans-serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: #ffd24d;
  text-transform: uppercase;
}
.daily-title {
  font-family: "Orbitron", sans-serif;
  font-size: 1.9rem;
  color: #eaf6ff;
  margin: 6px 0 18px;
  letter-spacing: 0.04em;
}
.daily-mod {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(0, 30, 55, 0.7);
  border: 1px solid rgba(255, 210, 77, 0.35);
  border-radius: 12px;
  padding: 16px 18px;
}
.daily-mod-icon { font-size: 2.4rem; line-height: 1; }
.daily-mod-name {
  font-family: "Orbitron", sans-serif;
  font-size: 1.1rem;
  color: #ffd24d;
  margin-bottom: 4px;
}
.daily-mod-desc { color: #a9cfe6; font-size: 0.92rem; line-height: 1.35; }
.daily-note { color: #7fa6c0; font-size: 0.86rem; margin: 14px 2px; line-height: 1.4; }
.daily-best {
  font-size: 0.95rem;
  color: #cfe9ff;
  margin: 4px 0 18px;
}
.daily-best b { color: #ffd24d; font-family: "Orbitron", sans-serif; }
.daily-best-none { color: #6f93ab; }

/* ---- Leaderboard ---- */
.lb-block {
  background: rgba(0, 18, 36, 0.6);
  border: 1px solid rgba(0, 160, 220, 0.2);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
}
.lb-title, .go-lb-title {
  font-family: "Orbitron", sans-serif;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: #55ddff;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.lb-row {
  display: grid;
  grid-template-columns: 28px 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.9rem;
}
.lb-row:last-child { border-bottom: none; }
.lb-rank { color: #ffd24d; font-family: "Orbitron", sans-serif; font-weight: 700; }
.lb-score { color: #eaf6ff; font-family: "Orbitron", sans-serif; }
.lb-meta { color: #8fb4cc; font-size: 0.8rem; }
.lb-tag { color: #6fa0bc; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }
.lb-empty, .go-lb-empty { color: #6f93ab; font-size: 0.85rem; font-style: italic; }
.daily-actions { display: flex; gap: 12px; justify-content: center; }

/* ---- Game-over extra panel ---- */
.go-rogue-extra {
  margin: 6px auto 14px;
  text-align: center;
  max-width: 420px;
}
.go-rogue-score {
  font-family: "Orbitron", sans-serif;
  font-size: 14px;
  letter-spacing: 0.12em;
  color: #9fe8ff;
  margin-bottom: 6px;
}
.go-rogue-score b { color: #ffd24d; font-size: 1.5rem; }
.go-rogue-rank { color: #cfe9ff; font-size: 0.9rem; margin: 2px 0; }
.go-rogue-rank b { color: #ffd24d; }
.go-rogue-daily { color: #ffd24d; font-size: 0.92rem; margin: 4px 0; }
.go-stat-line { color: #ff9933; font-size: 0.85rem; margin: 4px 0 10px; }
.go-lb-mini {
  background: rgba(0, 18, 36, 0.55);
  border: 1px solid rgba(0, 160, 220, 0.18);
  border-radius: 10px;
  padding: 10px 14px;
  display: inline-block;
  min-width: 280px;
}
.go-lb-row {
  display: grid;
  grid-template-columns: 24px 1fr auto 18px;
  gap: 8px;
  font-size: 0.85rem;
  color: #cfe4f3;
  padding: 3px 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   QUEST / MISSION SCREEN — rows + canvas icons
   ══════════════════════════════════════════════════════════════════════════ */
.quests-body { display: flex; flex-direction: column; gap: 22px; padding: 4px 2px 24px; }
.qtier { }
.qtier-hdr {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 4px 10px; margin-bottom: 10px;
  border-bottom: 1px solid rgba(0,180,220,0.18);
}
.qtier-name { font-family: "Orbitron", sans-serif; font-size: 0.95rem; letter-spacing: 0.12em; }
.qtier-prog { font-family: "Orbitron", sans-serif; font-size: 0.78rem; color: #7fa6c0; }
.qtier-lock { margin-left: auto; font-size: 0.72rem; color: #ff8a5b; letter-spacing: 0.04em; }
.qtier-rows { display: flex; flex-direction: column; gap: 10px; }
.qtier-dim { opacity: 0.5; }

.qrow {
  display: flex; align-items: center; gap: 14px;
  background: rgba(4,18,34,0.72);
  border: 1px solid rgba(0,160,210,0.16);
  border-radius: 12px;
  padding: 12px 14px;
  transition: border-color 0.15s, transform 0.12s, box-shadow 0.15s;
}
.qrow:hover { transform: translateY(-1px); border-color: rgba(0,210,255,0.4); }
.qrow-claimed   { opacity: 0.62; }
.qrow-claimable { border-color: rgba(255,210,77,0.55); box-shadow: 0 0 22px rgba(255,200,60,0.12); }
.qrow-locked    { opacity: 0.55; }

.qrow-icon {
  flex: 0 0 auto;
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
}
.qicon-canvas {
  width: 52px; height: 52px;
  image-rendering: -webkit-optimize-contrast;
}
.qrow-mid { flex: 1 1 auto; min-width: 0; }
.qrow-top { display: flex; align-items: baseline; gap: 10px; justify-content: space-between; }
.qrow-title { font-family: "Orbitron", sans-serif; font-size: 0.95rem; color: #eaf6ff; }
.qrow-rew   { font-family: "Orbitron", sans-serif; font-size: 0.74rem; white-space: nowrap; }
.qrow-desc  { color: #9ec3da; font-size: 0.84rem; margin: 4px 0 2px; }
.qrow-bar-wrap { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.qbar-track { flex: 1 1 auto; height: 6px; background: rgba(0,40,60,0.8); border-radius: 4px; overflow: hidden; }
.qbar-fill  { height: 100%; border-radius: 4px; transition: width 0.3s; }
.qprog { font-family: "Orbitron", sans-serif; font-size: 0.7rem; color: #8fb4cc; white-space: nowrap; }
.qbadge { display: inline-block; margin-top: 7px; font-family: "Orbitron", sans-serif;
          font-size: 0.62rem; letter-spacing: 0.1em; padding: 3px 9px; border-radius: 20px; }
.qbadge-claimed   { color: #88c0a8; background: rgba(40,90,70,0.4); }
.qbadge-claimable { color: #ffd24d; background: rgba(90,70,10,0.5); }
.qrow-right { flex: 0 0 auto; }
.qclaim-btn {
  font-family: "Orbitron", sans-serif; font-size: 0.7rem; line-height: 1.2;
  color: #06121f; background: linear-gradient(160deg, #ffd24d, #ffae3d);
  border: none; border-radius: 9px; padding: 9px 14px; cursor: pointer;
  text-align: center; transition: transform 0.12s, box-shadow 0.12s;
}
.qclaim-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(255,190,60,0.35); }
.qclaim-btn:disabled { opacity: 0.7; cursor: default; transform: none; }

/* Game-over claimable list — small inline canvas icons */
.go-quest-block { margin: 8px auto 14px; max-width: 420px; text-align: left; }
.go-quest-hdr { font-family: "Orbitron", sans-serif; font-size: 0.7rem; letter-spacing: 0.14em;
                color: #ffd24d; margin-bottom: 8px; text-align: center; }
.go-quest-row { display: flex; align-items: center; gap: 10px; padding: 4px 0; font-size: 0.88rem; color: #cfe4f3; }
.go-quest-ic { flex: 0 0 auto; width: 30px; height: 30px; display: inline-flex; }
.go-quest-ic .qicon-canvas { width: 30px; height: 30px; }
.go-quest-name { flex: 1 1 auto; }
.go-quest-rew { color: #ffd24d; font-family: "Orbitron", sans-serif; }
.go-quest-note { font-size: 0.74rem; color: #7fa6c0; margin-top: 8px; text-align: center; }

/* ══════════════════════════════════════════════════════════════════════════
   FUN PACK — mutator selection panel
   ══════════════════════════════════════════════════════════════════════════ */
.mutator-overlay { z-index: 60; }
.mutator-panel {
  max-width: 620px; width: calc(100% - 48px); margin: 0 auto;
  background: linear-gradient(165deg, rgba(8,20,40,0.97), rgba(2,8,20,0.97));
  border: 1px solid rgba(160,120,255,0.32); border-radius: 16px;
  padding: 28px 30px; box-shadow: 0 0 60px rgba(120,80,220,0.22);
  max-height: 88vh; overflow-y: auto;
}
.mut-eyebrow { font-family:"Orbitron",sans-serif; font-size:11px; letter-spacing:0.2em; color:#c08bff; text-transform:uppercase; }
.mut-title { font-family:"Orbitron",sans-serif; font-size:1.9rem; color:#eaf6ff; margin:6px 0 8px; letter-spacing:0.04em; }
.mut-note { color:#9ec3da; font-size:0.88rem; margin-bottom:14px; }
.mut-mulbar {
  font-family:"Orbitron",sans-serif; font-size:0.8rem; letter-spacing:0.1em; color:#9ec3da;
  background:rgba(0,30,55,0.6); border:1px solid rgba(160,120,255,0.3); border-radius:10px;
  padding:10px 16px; margin-bottom:16px; text-align:center;
}
.mut-mulbar b { color:#ffd24d; font-size:1.2rem; margin-left:8px; }
.mut-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:20px; }
@media (max-width:560px){ .mut-grid{ grid-template-columns:1fr; } }
.mut-card {
  display:flex; align-items:center; gap:12px; padding:12px 14px;
  background:rgba(4,16,30,0.7); border:1px solid rgba(120,140,180,0.18);
  border-radius:12px; cursor:pointer; transition:border-color 0.15s, transform 0.12s, box-shadow 0.15s;
  position:relative;
}
.mut-card:hover { transform:translateY(-2px); border-color:rgba(160,120,255,0.5); }
.mut-card.mut-on { border-color:#c08bff; box-shadow:0 0 22px rgba(160,120,255,0.22); background:rgba(30,16,50,0.7); }
.mut-icon { width:40px; height:40px; flex-shrink:0; }
.mut-text { flex:1; min-width:0; }
.mut-name { font-family:"Orbitron",sans-serif; font-size:0.92rem; color:#eaf6ff; }
.mut-desc { color:#9ec3da; font-size:0.76rem; margin-top:3px; line-height:1.3; }
.mut-mul { font-family:"Orbitron",sans-serif; font-size:0.82rem; flex-shrink:0; }
.mut-mul.pos { color:#5dff9c; }
.mut-mul.neg { color:#ff8a5b; }
.mut-toggle {
  position:absolute; top:8px; right:10px; font-family:"Orbitron",sans-serif;
  font-size:0.6rem; letter-spacing:0.1em; color:#6f8aa6;
}
.mut-card.mut-on .mut-toggle { color:#c08bff; }
.mut-actions { display:flex; gap:12px; justify-content:center; }

/* ═══════════════════════════════════════════════════════
   LEVEL-UP OVERLAY — CINEMATIC AUGMENT SCREEN
═══════════════════════════════════════════════════════ */

/* Full-screen backdrop + enter animation */
#levelOverlay:not(.hidden) {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Background FX layer */
.lup-bg-fx {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse at 50% 45%, rgba(80,0,160,0.28) 0%, rgba(0,10,35,0.88) 60%, rgba(0,4,16,0.97) 100%);
}

/* CRT scanlines */
.lup-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0,0,0,0.08) 3px,
    rgba(0,0,0,0.08) 4px
  );
  pointer-events: none;
  opacity: 0.5;
}

/* Vignette corners */
.lup-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.72) 100%);
  pointer-events: none;
}

/* Canvas particle overlay */
.lup-particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.75;
}

/* Centered panel */
.lup-panel {
  position: relative;
  z-index: 2;
  width: min(960px, 94vw);
  max-height: 90vh;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 0;
  transform: translateY(40px) scale(0.94);
  opacity: 0;
  transition: transform 0.38s cubic-bezier(0.22,1,0.36,1), opacity 0.3s ease;
}

/* Animate the panel in whenever the overlay is shown */
#levelOverlay:not(.hidden) .lup-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Header area */
.lup-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 26px;
  padding: 0 4px;
}

/* Level badge circle */
.lup-level-badge {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid rgba(160, 100, 255, 0.8);
  background: radial-gradient(circle, rgba(100,30,200,0.55) 0%, rgba(20,0,60,0.9) 100%);
  box-shadow: 0 0 24px rgba(160,80,255,0.55), inset 0 0 18px rgba(100,0,200,0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  animation: lupBadgePulse 2.5s ease-in-out infinite;
}

@keyframes lupBadgePulse {
  0%,100% { box-shadow: 0 0 20px rgba(160,80,255,0.5), inset 0 0 14px rgba(100,0,200,0.25); }
  50%      { box-shadow: 0 0 36px rgba(180,100,255,0.8), inset 0 0 22px rgba(120,0,240,0.5); }
}

.lup-level-label {
  font-family: "Orbitron", sans-serif;
  font-size: 0.5rem;
  letter-spacing: 0.22em;
  color: rgba(200,160,255,0.8);
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 1px;
}

.lup-level-number {
  font-family: "Orbitron", sans-serif;
  font-size: 1.9rem;
  font-weight: 900;
  color: #e8ccff;
  line-height: 1;
  text-shadow: 0 0 12px rgba(180,100,255,0.9);
}

/* Title block */
.lup-title-block {
  flex: 1;
  min-width: 0;
}

.lup-title {
  font-family: "Orbitron", sans-serif;
  font-size: clamp(1.2rem, 3.5vw, 1.9rem);
  font-weight: 900;
  letter-spacing: 0.12em;
  background: linear-gradient(135deg, #e8ccff 0%, #aa66ff 50%, #7733dd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 8px rgba(160,80,255,0.6));
  text-transform: uppercase;
  margin-bottom: 4px;
}

.lup-sub {
  color: #9988aa;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  font-family: "Rajdhani", sans-serif;
}

/* Decorative horizontal rule */
.lup-divider-line {
  flex-shrink: 0;
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, transparent, rgba(160,80,255,0.6), transparent);
  margin: 0 4px;
}

@media (max-width: 540px) {
  .lup-divider-line { display: none; }
  .lup-level-badge { width: 56px; height: 56px; }
  .lup-level-number { font-size: 1.45rem; }
}

/* Card grid */
.lup-choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 720px) {
  .lup-choices {
    grid-template-columns: 1fr;
  }
}

/* Individual upgrade card */
.lup-card {
  position: relative;
  background: linear-gradient(160deg, rgba(10,4,28,0.92), rgba(0,18,44,0.95));
  border: 1px solid rgba(var(--rar-rgb, 80,80,180), 0.4);
  border-color: color-mix(in srgb, var(--rar-color, #5566bb) 40%, rgba(0,0,0,0));
  border-radius: 14px;
  padding: 20px 18px 16px;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.15s cubic-bezier(0.22,1,0.36,1),
              border-color 0.15s,
              box-shadow 0.15s;
  /* Staggered entry via --card-delay */
  transform: translateY(24px);
  opacity: 0;
  animation: lupCardIn 0.35s cubic-bezier(0.22,1,0.36,1) forwards;
  animation-delay: var(--card-delay, 0ms);
}

@keyframes lupCardIn {
  to { transform: translateY(0); opacity: 1; }
}

.lup-card:hover {
  transform: translateY(-4px) scale(1.015);
  border-color: var(--rar-color, #88aaff);
  box-shadow: 0 0 32px color-mix(in srgb, var(--rar-color, #5566bb) 45%, transparent),
              0 8px 24px rgba(0,0,0,0.6);
}

/* Shimmer sweep on hover */
.lup-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 30%, color-mix(in srgb, var(--rar-color,#88aaff) 12%, transparent) 60%, transparent 100%);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.lup-card:hover::before { opacity: 1; }

/* Selected state */
.lup-card.lup-card-selected {
  border-color: var(--rar-color, #88aaff) !important;
  box-shadow: 0 0 48px color-mix(in srgb, var(--rar-color,#88aaff) 70%, transparent),
              0 0 0 2px var(--rar-color,#88aaff) !important;
  transform: scale(1.04) !important;
}

.lup-card-select-ring {
  position: absolute;
  inset: -2px;
  border-radius: 16px;
  border: 2px solid var(--rar-color, #88aaff);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s;
  box-shadow: 0 0 18px var(--rar-color, #88aaff);
}
.lup-card.lup-card-selected .lup-card-select-ring { opacity: 1; }

/* Inner flex layout */
.lup-card-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
}

/* Rarity badge pill */
.lup-rar-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: "Orbitron", sans-serif;
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rar-color, #8899bb);
  border: 1px solid color-mix(in srgb, var(--rar-color,#8899bb) 45%, transparent);
  border-radius: 20px;
  padding: 2px 9px;
  width: fit-content;
  margin-bottom: 4px;
  background: color-mix(in srgb, var(--rar-color,#8899bb) 10%, transparent);
}

/* Large tag icon */
.lup-card-icon {
  font-size: 1.8rem;
  line-height: 1;
  margin-bottom: 2px;
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--rar-color,#88aaff) 60%, transparent));
}

/* Card name */
.lup-card-name {
  font-family: "Orbitron", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--rar-color, #ccddff);
  letter-spacing: 0.04em;
  text-shadow: 0 0 10px color-mix(in srgb, var(--rar-color,#88aaff) 55%, transparent);
  line-height: 1.2;
}

/* Card description */
.lup-card-desc {
  color: #9eb8cc;
  font-size: 0.85rem;
  line-height: 1.45;
  flex: 1;
}

/* Footer row */
.lup-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(100,100,180,0.15);
}

.lup-card-tag {
  font-family: "Orbitron", sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(150,160,200,0.7);
}

.lup-card-stack {
  font-family: "Orbitron", sans-serif;
  font-size: 0.62rem;
  color: color-mix(in srgb, var(--rar-color,#88aaff) 70%, white);
  letter-spacing: 0.06em;
}

/* Keyboard hint badge (auto-appended by JS via key shortcut) */
.lup-key-hint {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid rgba(180,180,255,0.35);
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Orbitron", sans-serif;
  font-size: 0.6rem;
  color: rgba(200,200,255,0.7);
  font-weight: 700;
}

/* Legendary card tint */
.lup-card[style*="--rar-color:#ffbb33"],
.lup-card[style*="--rar-color: #ffbb33"] {
  background: linear-gradient(160deg, rgba(50,30,0,0.95), rgba(0,18,44,0.95));
  animation: lupCardIn 0.35s cubic-bezier(0.22,1,0.36,1) forwards,
             lupLegendPulse 2.8s ease-in-out 0.4s infinite;
}

@keyframes lupLegendPulse {
  0%,100% { box-shadow: 0 0 12px rgba(255,180,40,0.2); }
  50%      { box-shadow: 0 0 32px rgba(255,200,60,0.5), 0 0 0 1px rgba(255,180,40,0.3); }
}

/* Epic card tint */
.lup-card[style*="--rar-color:#cc44ff"],
.lup-card[style*="--rar-color: #cc44ff"] {
  background: linear-gradient(160deg, rgba(40,10,60,0.95), rgba(0,14,40,0.95));
}

/* ---- Reroll bar (sits below lup-choices) ---- */
#rogueRerollBar {
  margin-top: 14px;
}
