/* ==========================================================================
   NASA JUNIOR ASTRONAUT MISSION TRAINER - SCIFI HUD THEME
   ========================================================================== */

:root {
  --bg-deep: #030712;
  --bg-card: rgba(10, 18, 36, 0.88);
  --cyan-glow: #00e5ff;
  --cyan-dim: rgba(0, 229, 255, 0.2);
  --amber-glow: #ffb300;
  --green-glow: #00e676;
  --red-alert: #ff1744;
  --text-main: #f0f6fc;
  --text-dim: #8b9bb4;
  --border-hud: rgba(0, 229, 255, 0.35);
  --font-hud: 'Orbitron', -apple-system, sans-serif;
  --font-body: 'Rajdhani', -apple-system, sans-serif;
}

/* Global Futuristic Sci-Fi Scrollbars (Zero Clunky White Windows Bars) */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(3, 7, 18, 0.75);
  border-radius: 8px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #00e5ff 0%, #0091ea 100%);
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
  border: 1px solid rgba(0, 229, 255, 0.4);
}

::-webkit-scrollbar-thumb:hover {
  background: #00e5ff;
  box-shadow: 0 0 14px #00e5ff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 229, 255, 0.5) rgba(3, 7, 18, 0.75);
}

body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 16px;
}

/* Top-Right Control Cluster: Version + Language + Audio */
.top-nav-cluster {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* PWA Install Button Pill */
.install-pill {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.25), rgba(124, 77, 255, 0.35));
  border: 1px solid var(--neon-cyan);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 20px;
  font-family: var(--font-hud);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.35);
  animation: pulseInstall 2.2s infinite;
}

.install-pill:hover {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.45), rgba(124, 77, 255, 0.55));
  border-color: #ffffff;
  box-shadow: 0 0 25px rgba(0, 229, 255, 0.65);
  transform: translateY(-1px) scale(1.03);
}

.install-pill.hidden {
  display: none !important;
}

@keyframes pulseInstall {
  0% { box-shadow: 0 0 10px rgba(0, 229, 255, 0.3); }
  50% { box-shadow: 0 0 22px rgba(0, 229, 255, 0.7), 0 0 8px rgba(124, 77, 255, 0.5); }
  100% { box-shadow: 0 0 10px rgba(0, 229, 255, 0.3); }
}

/* Version Pill */
.version-pill {
  background: rgba(10, 20, 40, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-dim);
  padding: 6px 12px;
  border-radius: 20px;
  font-family: var(--font-hud);
  font-size: 10px;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 7px;
  backdrop-filter: blur(8px);
  cursor: default;
  transition: all 0.2s ease;
}

.version-pill:hover {
  border-color: var(--green-glow);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(0, 230, 118, 0.25);
}

.v-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green-glow);
  box-shadow: 0 0 8px var(--green-glow);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { opacity: 0.6; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.3); }
  100% { opacity: 0.6; transform: scale(0.9); }
}

/* Language Selector Group */
.lang-selector-group {
  display: flex;
  background: rgba(10, 20, 40, 0.75);
  border: 1px solid var(--border-hud);
  border-radius: 20px;
  padding: 2px;
  backdrop-filter: blur(8px);
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-hud);
  font-size: 10px;
  letter-spacing: 0.5px;
  padding: 5px 10px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn:hover {
  color: #ffffff;
}

.lang-btn.active {
  background: var(--cyan-glow);
  color: #030712;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

/* Sound Toggle */
.sound-toggle {
  background: rgba(10, 20, 40, 0.75);
  border: 1px solid var(--border-hud);
  color: var(--cyan-glow);
  padding: 6px 12px;
  border-radius: 20px;
  font-family: var(--font-hud);
  font-size: 11px;
  letter-spacing: 1px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.sound-toggle:hover {
  background: rgba(0, 229, 255, 0.2);
  box-shadow: 0 0 15px var(--cyan-dim);
}

.sound-toggle.muted {
  color: var(--text-dim);
  border-color: rgba(255, 255, 255, 0.2);
}

/* View Screen Switcher */
.view-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: opacity 0.4s ease;
}

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

.view-screen.active {
  display: block;
}

/* ==========================================================================
   VIEW 1: SOLAR SYSTEM & INTRO
   ========================================================================== */

#spaceCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Intro Overlay */
.intro-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at center, rgba(3, 7, 18, 0.4) 0%, rgba(3, 7, 18, 0.95) 85%);
  backdrop-filter: blur(2px);
  z-index: 10;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.intro-overlay.fade-out {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  display: none !important;
}

.intro-content {
  text-align: center;
  max-width: 680px;
  padding: 30px;
  animation: floatUp 1s ease-out;
}

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

.nasa-badge {
  display: inline-block;
  background: rgba(0, 229, 255, 0.12);
  border: 1px solid var(--border-hud);
  color: var(--cyan-glow);
  font-family: var(--font-hud);
  font-size: 11px;
  letter-spacing: 2px;
  padding: 6px 16px;
  border-radius: 4px;
  margin-bottom: 18px;
}

.intro-title {
  font-family: var(--font-hud);
  font-size: 42px;
  line-height: 1.15;
  letter-spacing: 2px;
  font-weight: 900;
  margin-bottom: 14px;
  text-shadow: 0 0 25px rgba(0, 229, 255, 0.5);
}

.intro-title .highlight {
  color: var(--cyan-glow);
  background: linear-gradient(90deg, #00e5ff, #80d8ff, #ffb300);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.intro-subtitle {
  font-size: 19px;
  color: var(--text-dim);
  margin-bottom: 25px;
  font-weight: 500;
}

.starlight-prompt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #80d8ff;
  font-size: 15px;
  margin-bottom: 30px;
}

.pulse-beacon {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 14px #00e5ff;
  animation: beaconPulse 1.5s infinite;
}

@keyframes beaconPulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.4); opacity: 1; box-shadow: 0 0 25px #00e5ff; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.intro-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
}

/* Sci-Fi Button Styles */
.btn-sci-fi {
  position: relative;
  font-family: var(--font-hud);
  font-size: 13px;
  letter-spacing: 1.5px;
  font-weight: 700;
  padding: 13px 26px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.25s ease;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.9), rgba(0, 140, 255, 0.9));
  border: 1px solid #80d8ff;
  color: #030712;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.7);
}

.btn-secondary {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-main);
}

.btn-secondary:hover {
  border-color: var(--cyan-glow);
  color: var(--cyan-glow);
}

.btn-launch {
  background: linear-gradient(135deg, #ff9100, #ff3d00);
  border: 1px solid #ffab40;
  color: #ffffff;
  font-size: 14px;
  padding: 14px 28px;
  box-shadow: 0 0 20px rgba(255, 109, 0, 0.5);
}

.btn-launch:hover {
  box-shadow: 0 0 35px rgba(255, 109, 0, 0.8);
  transform: scale(1.02);
}

.btn-coming-soon {
  background: linear-gradient(135deg, rgba(74, 85, 104, 0.6), rgba(45, 55, 72, 0.8));
  border: 1px dashed rgba(255, 179, 0, 0.6);
  color: #ffca28;
  font-size: 13px;
  padding: 14px 24px;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(255, 179, 0, 0.15);
}

.btn-coming-soon:hover {
  background: rgba(255, 179, 0, 0.15);
  border-color: #ffb300;
  box-shadow: 0 0 22px rgba(255, 179, 0, 0.35);
  transform: translateY(-1px);
}

/* Solar System Header HUD */
.solar-header {
  position: absolute;
  top: 18px;
  left: 24px;
  right: 400px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 5;
  pointer-events: none;
}

.solar-header * {
  pointer-events: auto;
}

.logo-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.agency {
  font-family: var(--font-hud);
  font-weight: 900;
  font-size: 24px;
  letter-spacing: 3px;
  color: #ffffff;
  border-left: 4px solid #ff3d00;
  padding-left: 10px;
}

.mission {
  font-family: var(--font-hud);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--cyan-glow);
}

.hud-indicator {
  background: rgba(5, 12, 28, 0.8);
  border: 1px solid var(--border-hud);
  padding: 6px 16px;
  border-radius: 4px;
  font-family: var(--font-hud);
  font-size: 11px;
  letter-spacing: 1.5px;
  color: #80d8ff;
}

/* Planet Selector Quick Bar */
.planet-selector-bar {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 16, 30, 0.92);
  border: 1px solid rgba(0, 229, 255, 0.35);
  backdrop-filter: blur(14px);
  padding: 10px 18px;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 5;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 229, 255, 0.15);
  max-width: 95vw;
}

.selector-header-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
}

.selector-meta-count {
  font-family: var(--font-header);
  font-size: 10px;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.25);
  padding: 2px 10px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.selector-meta-count .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.selector-meta-count .highlight {
  color: var(--neon-cyan);
  font-weight: 800;
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
}

.selector-meta-count .meta-sep {
  color: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   PLAYABLE OUTPOSTS QUICK-LAUNCH BAR (Moon, Mars, Europa, Titan)
   ========================================================================== */

.playable-outposts-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.playable-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 4px;
}

.playable-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-header);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #69f0ae;
  text-shadow: 0 0 10px rgba(105, 240, 174, 0.4);
}

.live-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00e676;
  box-shadow: 0 0 10px #00e676;
  animation: pulse-green 1.5s infinite ease-in-out;
}

@keyframes pulse-green {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.4; }
}

.playable-status-hint {
  font-family: var(--font-header);
  font-size: 9px;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.5);
}

.playable-pills-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 2px;
}

.btn-playable-quick {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(0, 230, 118, 0.12), rgba(0, 229, 255, 0.08));
  border: 1px solid rgba(0, 230, 118, 0.45);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 18px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  white-space: nowrap;
}

.btn-playable-quick:hover {
  background: linear-gradient(135deg, rgba(0, 230, 118, 0.25), rgba(0, 229, 255, 0.2));
  border-color: #69f0ae;
  transform: translateY(-2px);
  box-shadow: 0 4px 18px rgba(0, 230, 118, 0.4);
}

.btn-playable-quick.pill-mars {
  background: linear-gradient(135deg, rgba(255, 61, 0, 0.16), rgba(255, 145, 0, 0.1));
  border-color: rgba(255, 87, 34, 0.5);
}

.btn-playable-quick.pill-mars:hover {
  background: linear-gradient(135deg, rgba(255, 61, 0, 0.3), rgba(255, 145, 0, 0.2));
  border-color: #ff5722;
  box-shadow: 0 4px 18px rgba(255, 87, 34, 0.45);
}

.btn-playable-quick.pill-locked {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.14);
  opacity: 0.7;
}

.btn-playable-quick.pill-locked:hover {
  opacity: 0.95;
  border-color: rgba(0, 229, 255, 0.35);
}

.btn-playable-quick .p-badge {
  font-family: var(--font-header);
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.btn-playable-quick .p-badge.ready {
  background: #00e676;
  color: #031508;
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.7);
}

.btn-playable-quick .p-badge.locked {
  background: rgba(255, 255, 255, 0.15);
  color: #b0bec5;
}

.btn-playable-quick .p-icon {
  font-size: 15px;
}

.btn-playable-quick .p-name {
  font-family: var(--font-header);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #ffffff;
}

.btn-playable-quick .p-sub {
  font-size: 11px;
  color: #80d8ff;
  background: rgba(0, 229, 255, 0.1);
  padding: 1px 7px;
  border-radius: 6px;
}

.selector-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.3), transparent);
  margin: 4px 0 2px 0;
}

/* Einstein Gravity Well Toggle Button & Banner */
.btn-gravity {
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.2), rgba(0, 229, 255, 0.25));
  border: 1px solid var(--neon-cyan);
  color: #ffffff;
  transition: all 0.25s ease;
}

.btn-gravity.active {
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.4), rgba(0, 229, 255, 0.4));
  box-shadow: 0 0 15px rgba(124, 77, 255, 0.4), 0 0 8px rgba(0, 229, 255, 0.5);
  border-color: #00e5ff;
}

.gravity-well-banner {
  position: absolute;
  top: 75px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(8, 16, 35, 0.88);
  border: 1px solid rgba(124, 77, 255, 0.5);
  border-radius: 20px;
  padding: 6px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(8px);
  z-index: 5;
  box-shadow: 0 0 20px rgba(124, 77, 255, 0.25);
  animation: fadeInDown 0.4s ease;
  pointer-events: none;
}

.gravity-well-banner.hidden {
  display: none !important;
}

.gw-icon {
  font-size: 16px;
  animation: rotateSpin 6s linear infinite;
}

@keyframes rotateSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.gw-text {
  font-family: var(--font-hud);
  font-size: 11px;
  letter-spacing: 0.8px;
  color: #b388ff;
  text-shadow: 0 0 8px rgba(179, 136, 255, 0.5);
}

/* 8-Second Speed of Gravity & Sun Disappearance HUD */
.sun-experiment-hud {
  position: absolute;
  top: 75px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 6, 25, 0.94);
  border: 2px solid #ff1744;
  box-shadow: 0 0 35px rgba(255, 23, 68, 0.5), inset 0 0 15px rgba(255, 23, 68, 0.2);
  border-radius: 12px;
  padding: 12px 20px;
  max-width: 780px;
  width: 92%;
  z-index: 50;
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: pulseHudGlow 1.8s infinite;
}

.sun-experiment-hud.hidden {
  display: none !important;
}

@keyframes pulseHudGlow {
  0% { box-shadow: 0 0 25px rgba(255, 23, 68, 0.4); }
  50% { box-shadow: 0 0 45px rgba(255, 23, 68, 0.75), 0 0 15px rgba(213, 0, 249, 0.5); }
  100% { box-shadow: 0 0 25px rgba(255, 23, 68, 0.4); }
}

.seh-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-hud);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #ff5252;
}

.seh-phase-tag {
  margin-left: auto;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(0, 229, 255, 0.15);
  border: 1px solid #00e5ff;
  color: #00e5ff;
  letter-spacing: 1px;
}

.seh-planets-timeline {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  margin-top: 6px;
  padding: 8px 12px;
  background: rgba(8, 3, 16, 0.75);
  border-radius: 10px;
  border: 1px solid rgba(255, 23, 68, 0.35);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8), 0 0 10px rgba(255, 23, 68, 0.15);
  max-height: 125px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 23, 68, 0.7) rgba(10, 4, 18, 0.85);
}

/* Modern Sci-Fi Red/Cyan Neon Scrollbar for Timeline */
.seh-planets-timeline::-webkit-scrollbar {
  width: 5px;
}

.seh-planets-timeline::-webkit-scrollbar-track {
  background: rgba(10, 4, 18, 0.85);
  border-radius: 10px;
  margin: 4px 0;
}

.seh-planets-timeline::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ff1744 0%, #ff5252 50%, #d500f9 100%);
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(255, 23, 68, 0.8);
}

.seh-planets-timeline::-webkit-scrollbar-thumb:hover {
  background: #00e5ff;
  box-shadow: 0 0 14px #00e5ff;
}

.seh-planet-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(25, 8, 30, 0.65);
  border: 1px solid rgba(0, 229, 255, 0.25);
  padding: 4px 10px;
  border-radius: 8px;
  font-family: var(--font-hud);
  font-size: 11px;
  color: #e2e8f0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.seh-planet-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.seh-planet-pill.orbiting {
  border-color: rgba(0, 229, 255, 0.5);
  background: rgba(0, 35, 55, 0.45);
  color: #e0f7fa;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.15);
}

.seh-planet-pill.broken {
  background: rgba(45, 8, 22, 0.7);
  border-color: rgba(255, 23, 68, 0.65);
  color: #ffebee;
  box-shadow: 0 0 12px rgba(255, 23, 68, 0.35);
}

.seh-planet-pill .pill-time {
  background: rgba(0, 229, 255, 0.16);
  color: #00e5ff;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.5px;
  border: 1px solid rgba(0, 229, 255, 0.35);
}

.seh-planet-pill.broken .pill-time {
  background: rgba(255, 23, 68, 0.28);
  color: #ff5252;
  border-color: rgba(255, 23, 68, 0.5);
}

.seh-planet-pill .pill-real {
  font-size: 9.5px;
  color: #94a3b8;
  letter-spacing: 0.3px;
}

.pulse-warning {
  animation: pulseDot 1s infinite;
}

.seh-countdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.seh-timer-digit {
  font-family: var(--font-hud);
  font-size: 28px;
  font-weight: 900;
  color: #00e5ff;
  text-shadow: 0 0 15px #00e5ff;
  min-width: 65px;
}

.seh-status-box {
  flex: 1;
}

.seh-status-box strong {
  display: block;
  font-family: var(--font-hud);
  font-size: 13px;
  color: #ffffff;
  letter-spacing: 0.8px;
  margin-bottom: 2px;
}

.seh-status-box p {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.3;
}

.btn-restore-sun {
  background: linear-gradient(135deg, #ffca28, #ff6f00);
  border: 1px solid #ffe082;
  color: #000000;
  font-family: var(--font-hud);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 0 15px rgba(255, 179, 0, 0.5);
}

.btn-restore-sun:hover {
  background: linear-gradient(135deg, #ffe082, #ff8f00);
  box-shadow: 0 0 25px rgba(255, 179, 0, 0.85);
  transform: scale(1.04);
}

.seh-progress-track {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.seh-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00e5ff, #ff1744);
  transition: width 0.05s linear;
}

.selector-label {
  font-family: var(--font-hud);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--text-dim);
}

.planet-buttons-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 4px;
}

.btn-planet-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text-main);
  padding: 5px 12px;
  border-radius: 18px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.btn-planet-pill:hover {
  background: rgba(0, 229, 255, 0.16);
  border-color: var(--cyan-glow);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 229, 255, 0.25);
}

.pill-order {
  font-family: var(--font-header);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #00e5ff;
  background: rgba(0, 229, 255, 0.15);
  border: 1px solid rgba(0, 229, 255, 0.4);
  padding: 1px 6px;
  border-radius: 6px;
  text-shadow: 0 0 6px rgba(0, 229, 255, 0.5);
}

.pill-sat-badge {
  font-size: 10px;
  font-weight: 600;
  color: #ffd54f;
  background: rgba(255, 213, 79, 0.12);
  border: 1px solid rgba(255, 213, 79, 0.35);
  padding: 1px 6px;
  border-radius: 6px;
  margin-left: 2px;
  white-space: nowrap;
}

.stat-pill-highlight {
  border-color: rgba(0, 229, 255, 0.45) !important;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.12), rgba(124, 77, 255, 0.1)) !important;
}

.pill-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pill-home {
  border-color: rgba(0, 229, 255, 0.4);
}

.pill-mission {
  border-color: rgba(255, 179, 0, 0.4);
}

/* ==========================================================================
   MODALS: EARTH BIOSPHERE & MISSION BRIEFING
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 18, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 500;
  animation: fadeIn 0.25s ease-out;
}

.modal-backdrop.hidden {
  display: none !important;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.modal-box {
  width: 90%;
  max-width: 650px;
  background: linear-gradient(175deg, rgba(14, 25, 48, 0.98), rgba(7, 12, 24, 0.98));
  border: 1px solid var(--border-hud);
  box-shadow: 0 0 40px rgba(0, 229, 255, 0.25);
  border-radius: 8px;
  overflow: hidden;
}

.modal-header {
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0, 229, 255, 0.2);
  background: rgba(0, 229, 255, 0.05);
}

.modal-tag {
  font-family: var(--font-hud);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--cyan-glow);
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s;
}

.modal-close-btn:hover {
  color: #ff3d00;
}

.modal-body {
  padding: 24px;
  max-height: 70vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: rgba(0, 0, 0, 0.25);
}

/* Earth Pop-up Specifics */
.planet-hologram-preview {
  text-align: center;
  margin-bottom: 20px;
}

.earth-sphere {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 12px;
  background: radial-gradient(circle at 30% 30%, #64b5f6 0%, #1e88e5 45%, #0d47a1 85%, #051a3a 100%);
  box-shadow: 0 0 35px rgba(30, 136, 229, 0.6);
}

.planet-modal-title {
  font-family: var(--font-hud);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 1px;
}

.status-pill {
  display: inline-block;
  font-family: var(--font-hud);
  font-size: 10px;
  letter-spacing: 1.5px;
  padding: 4px 12px;
  border-radius: 12px;
  margin-top: 6px;
}

.status-thriving {
  background: rgba(0, 230, 118, 0.15);
  border: 1px solid var(--green-glow);
  color: var(--green-glow);
}

.earth-info-tabs, .mission-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.tab-btn, .mtab-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-hud);
  font-size: 11px;
  letter-spacing: 1px;
  padding: 8px 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.tab-btn:hover, .mtab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active, .mtab-btn.active {
  color: var(--cyan-glow);
  border-color: var(--cyan-glow);
}

.tab-content, .mtab-content {
  display: none;
}

.tab-content.active, .mtab-content.active {
  display: block;
}

.science-notice-box {
  background: rgba(255, 179, 0, 0.08);
  border-left: 3px solid #ffb300;
  padding: 12px 14px;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.5;
  color: #ffecb3;
  margin-top: 14px;
}

.info-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.info-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(0, 229, 255, 0.2);
  padding: 14px;
  border-radius: 6px;
}

.card-icon {
  font-size: 24px;
  margin-bottom: 6px;
}

.card-title {
  font-family: var(--font-hud);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--cyan-glow);
}

.card-value {
  font-size: 18px;
  font-weight: 700;
  margin: 4px 0 8px;
}

.info-card p {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-dim);
}

.data-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 14px;
}

.data-row span {
  color: var(--text-dim);
}

.note-box {
  background: rgba(0, 229, 255, 0.08);
  border-left: 3px solid var(--cyan-glow);
  padding: 12px;
  border-radius: 4px;
  font-size: 13px;
  margin-top: 14px;
  line-height: 1.5;
}

/* Mission Briefing Specifics */
.frontier-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.mission-planet-icon {
  width: 75px;
  height: 75px;
  border-radius: 50%;
  flex-shrink: 0;
}

.frontier-tagline {
  color: var(--text-dim);
  font-size: 14px;
  margin: 4px 0 6px;
}

.badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.difficulty-badge {
  display: inline-block;
  background: rgba(255, 179, 0, 0.15);
  border: 1px solid var(--amber-glow);
  color: var(--amber-glow);
  font-family: var(--font-hud);
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 4px;
}

.status-badge {
  display: inline-block;
  font-family: var(--font-hud);
  font-size: 10px;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 4px;
}

.status-ready {
  background: rgba(0, 230, 118, 0.15);
  border: 1px solid var(--green-glow);
  color: var(--green-glow);
}

.status-locked {
  background: rgba(255, 179, 0, 0.15);
  border: 1px dashed var(--amber-glow);
  color: var(--amber-glow);
}

/* Coming Soon Modal Styles */
.text-center {
  text-align: center;
}

.lock-icon-glow {
  font-size: 44px;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 16px rgba(255, 179, 0, 0.6));
}

.cs-description {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 16px 0;
}

.cs-eta-box {
  background: rgba(255, 179, 0, 0.08);
  border-left: 3px solid var(--amber-glow);
  padding: 12px 14px;
  border-radius: 4px;
  text-align: left;
  margin-bottom: 14px;
}

.eta-title {
  font-family: var(--font-hud);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--amber-glow);
  margin-bottom: 4px;
}

.cs-eta-box p {
  font-size: 13px;
  line-height: 1.4;
  color: #cfd8dc;
}

.cs-suggestion {
  font-size: 13px;
  color: #80d8ff;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.2);
  padding: 10px;
  border-radius: 4px;
}

.stats-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.stat-pill {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 6px;
  border-radius: 4px;
  text-align: center;
}

.stat-pill .label {
  display: block;
  font-family: var(--font-hud);
  font-size: 9px;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.stat-pill .value {
  font-size: 13px;
  font-weight: 700;
  color: var(--cyan-glow);
}

.challenge-box, .briefing-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.challenge-title {
  color: var(--amber-glow);
  font-family: var(--font-hud);
  font-size: 11px;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

/* ==========================================================================
   EXPEDITION MANIFEST & CREW STYLES
   ========================================================================== */

.project-banner-box {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.12), rgba(0, 114, 255, 0.08));
  border: 1px solid var(--border-hud);
  padding: 14px 18px;
  border-radius: 6px;
  margin-bottom: 16px;
  text-align: left;
}

.project-sub {
  font-family: var(--font-hud);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--cyan-glow);
  margin-bottom: 4px;
}

.project-title {
  font-family: var(--font-hud);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #ffffff;
}

.crew-count-badge {
  display: inline-block;
  background: rgba(0, 230, 118, 0.15);
  border: 1px solid var(--green-glow);
  color: var(--green-glow);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
  margin-top: 6px;
}

/* History & Lore Box */
.history-lore-box {
  background: rgba(255, 179, 0, 0.08);
  border-left: 3px solid var(--amber-glow);
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 16px;
  text-align: left;
}

.lore-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.lore-header strong {
  font-family: var(--font-hud);
  font-size: 11px;
  letter-spacing: 1px;
  color: #ffca28;
}

.history-lore-box p {
  font-size: 13px;
  line-height: 1.5;
  color: #f0f6fc;
}

/* Custom Mission Naming Bar */
.custom-mission-naming-bar {
  background: rgba(10, 20, 38, 0.95);
  border-top: 1px solid var(--border-hud);
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.naming-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.naming-label {
  font-family: var(--font-hud);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--cyan-glow);
}

.mode-tag {
  font-family: var(--font-hud);
  font-size: 9px;
  letter-spacing: 1px;
  background: rgba(0, 230, 118, 0.15);
  border: 1px solid var(--green-glow);
  color: var(--green-glow);
  padding: 2px 8px;
  border-radius: 4px;
}

.naming-input-group {
  display: flex;
  gap: 10px;
}

.sci-fi-input {
  flex: 1;
  background: rgba(3, 7, 18, 0.85);
  border: 1px solid var(--border-hud);
  border-radius: 4px;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  padding: 8px 14px;
  outline: none;
  transition: all 0.2s ease;
}

.sci-fi-input:focus {
  border-color: var(--cyan-glow);
  box-shadow: 0 0 15px var(--cyan-dim);
}

.sci-fi-input::placeholder {
  color: var(--text-dim);
  font-weight: 400;
  font-size: 13px;
}

.btn-random-name {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.4);
  color: var(--cyan-glow);
  font-family: var(--font-hud);
  font-size: 11px;
  letter-spacing: 1px;
  padding: 0 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-random-name:hover {
  background: rgba(0, 229, 255, 0.18);
  border-color: var(--cyan-glow);
}

.manifest-section-title {
  font-family: var(--font-hud);
  font-size: 11px;
  letter-spacing: 1px;
  color: #80d8ff;
  margin: 16px 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.crew-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.crew-member-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: all 0.2s ease;
}

.crew-member-card:hover {
  background: rgba(0, 229, 255, 0.08);
  border-color: var(--cyan-glow);
}

.crew-avatar {
  font-size: 24px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.crew-info {
  display: flex;
  flex-direction: column;
}

.crew-role {
  font-family: var(--font-hud);
  font-size: 11px;
  font-weight: 700;
  color: var(--cyan-glow);
  margin-bottom: 2px;
}

.crew-duty {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.35;
}

.support-cards-list, .hardware-cards-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.support-team-row, .hardware-item-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 14px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.team-icon, .hw-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.team-details strong, .hw-name {
  display: block;
  font-family: var(--font-hud);
  font-size: 11px;
  color: #ffca28;
  margin-bottom: 2px;
}

.team-details p, .hw-desc {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.35;
}

.hazards-list {
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.6;
  color: #cfd8dc;
}

.briefing-title {
  color: var(--cyan-glow);
  font-family: var(--font-hud);
  font-size: 11px;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.briefing-box p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-dim);
}

/* Database Guide Modal */
.guide-steps {
  padding-left: 20px;
  margin: 14px 0;
  line-height: 1.8;
  font-size: 14px;
}

.code-highlight {
  background: rgba(0, 229, 255, 0.15);
  color: var(--cyan-glow);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: monospace;
}

.code-snippet {
  background: #020610;
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 6px;
  padding: 14px;
  overflow-x: auto;
  font-size: 12px;
  color: #a7f3d0;
}

/* ==========================================================================
   VIEW 2: OUTPOST BASE BUILDER SIMULATOR
   ========================================================================== */

#outpostView {
  display: flex;
  flex-direction: column;
  background: #080c18;
  height: 100%;
  min-height: 100vh;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

.outpost-header {
  min-height: 98px;
  background: linear-gradient(180deg, rgba(8, 12, 24, 0.98) 0%, rgba(12, 18, 32, 0.96) 100%);
  border-bottom: 1px solid rgba(0, 229, 255, 0.25);
  display: flex;
  flex-direction: column;
  padding: 8px 18px 8px 18px;
  gap: 6px;
  z-index: 10;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
}

.outpost-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding-right: 720px; /* Fully clears fixed .top-nav-cluster on the right */
}

.outpost-header-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 42px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 5px;
}

@media (max-width: 1400px) {
  .outpost-header-top {
    padding-right: 640px;
  }
}

@media (max-width: 1100px) {
  .outpost-header-top {
    padding-right: 0;
    margin-top: 46px; /* stack below top-nav-cluster if screen is narrow */
  }
  .outpost-header-bottom {
    overflow-x: auto;
  }
}

.colony-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-back {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 4px;
  font-family: var(--font-hud);
  font-size: 11px;
  cursor: pointer;
}

.btn-back:hover {
  border-color: var(--cyan-glow);
  color: var(--cyan-glow);
}

.outpost-title {
  font-family: var(--font-hud);
  font-size: 16px;
  letter-spacing: 1.5px;
  font-weight: 900;
  color: #ffffff;
}

.colony-sub {
  font-size: 11px;
  color: var(--text-dim);
}

/* Telemetry Resource Bars */
.telemetry-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.res-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.res-icon {
  font-size: 16px;
}

.res-details {
  display: flex;
  flex-direction: column;
}

.res-label {
  font-family: var(--font-hud);
  font-size: 9px;
  color: var(--text-dim);
}

.res-val {
  font-size: 12px;
  font-weight: 700;
}

.res-meter {
  width: 50px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  transition: width 0.3s ease;
}

.power-bar { background: var(--amber-glow); }
.o2-bar { background: var(--cyan-glow); }
.water-bar { background: #00b0ff; }
.food-bar { background: #76ff03; }
.shield-bar { background: #e040fb; }

/* Time Controls */
.time-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.day-tracker {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.sol-badge {
  font-family: var(--font-hud);
  font-size: 14px;
  font-weight: 900;
  color: #ffffff;
}

.cycle-indicator {
  font-size: 11px;
  font-weight: 600;
}

.speed-btns {
  display: flex;
  gap: 4px;
}

.speed-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  padding: 6px 10px;
  border-radius: 4px;
  font-family: var(--font-hud);
  font-size: 11px;
  cursor: pointer;
}

.speed-btn.active {
  background: var(--cyan-glow);
  color: #030712;
  border-color: var(--cyan-glow);
}

/* Planetary Weather Controls & Status */
.weather-controls-cluster {
  position: relative;
  display: flex;
  align-items: center;
}

.weather-status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 8px;
  padding: 5px 12px;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.15);
}

.weather-status-pill:hover {
  border-color: var(--cyan-glow);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.35);
  transform: translateY(-1px);
}

.weather-icon {
  font-size: 18px;
  animation: pulseWeather 2s infinite ease-in-out;
}

@keyframes pulseWeather {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.weather-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.weather-label {
  font-family: var(--font-hud);
  font-size: 8px;
  letter-spacing: 1px;
  color: var(--neon-cyan);
}

.weather-val {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.weather-toggle-arrow {
  font-size: 10px;
  color: var(--text-dim);
  margin-left: 2px;
}

/* Weather Dropdown Menu */
.weather-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 270px;
  background: rgba(10, 16, 28, 0.96);
  border: 1px solid rgba(0, 229, 255, 0.4);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 100;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7), 0 0 15px rgba(0, 229, 255, 0.2);
  backdrop-filter: blur(14px);
}

.weather-drop-header {
  font-family: var(--font-hud);
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  padding: 4px 8px 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.weather-opt-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 8px 10px;
  color: #ffffff;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.weather-opt-btn:hover {
  background: rgba(0, 229, 255, 0.12);
  border-color: rgba(0, 229, 255, 0.3);
}

.weather-opt-btn.active {
  background: rgba(0, 229, 255, 0.2);
  border-color: var(--neon-cyan);
}

.weather-opt-btn .opt-icon {
  font-size: 20px;
}

.weather-opt-btn .opt-desc {
  display: flex;
  flex-direction: column;
}

.weather-opt-btn .opt-desc strong {
  font-size: 11px;
  color: #ffffff;
}

.weather-opt-btn .opt-desc small {
  font-size: 9px;
  color: var(--text-dim);
}

/* Atmospheric Weather Warning Banner in Viewport */
.weather-warning-banner.hidden {
  display: none !important;
}

.weather-warning-banner {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(185, 28, 28, 0.95));
  border: 1px solid #fca5a5;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.6);
  border-radius: 30px;
  padding: 8px 24px;
  color: #ffffff;
  font-family: var(--font-hud);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: bannerPulse 1.5s infinite alternate;
  pointer-events: none;
}

@keyframes bannerPulse {
  0% { transform: translateX(-50%) scale(1); box-shadow: 0 0 15px rgba(239, 68, 68, 0.4); }
  100% { transform: translateX(-50%) scale(1.03); box-shadow: 0 0 30px rgba(239, 68, 68, 0.8); }
}

/* Outpost Main Workspace */
.outpost-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.canvas-wrapper {
  flex: 1;
  min-height: 250px;
  position: relative;
  width: 100%;
}

#outpostCanvas {
  display: none !important;
}

/* 3D WebGL Three.js Viewport */
.three-container canvas {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}

.three-container {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
  z-index: 2;
  display: block !important;
}

.three-container:active {
  cursor: grabbing;
}

/* Engine Mode Toggle Button in Outpost Header */
.btn-engine-toggle {
  background: rgba(0, 229, 255, 0.15) !important;
  border: 1px solid #00e5ff !important;
  color: #00e5ff !important;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
}

.btn-engine-toggle:hover {
  background: rgba(0, 229, 255, 0.32) !important;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.45);
}

.btn-engine-toggle.mode-2d {
  background: rgba(255, 179, 0, 0.18) !important;
  border-color: #ffb300 !important;
  color: #ffb300 !important;
}

.btn-engine-toggle.mode-2d:hover {
  background: rgba(255, 179, 0, 0.35) !important;
  box-shadow: 0 0 12px rgba(255, 179, 0, 0.5);
}

/* GTA 5/6 Style Controls Bar */
.gta-controls-bar {
  position: absolute;
  bottom: 16px;
  right: 20px;
  background: rgba(8, 18, 36, 0.9);
  border: 1px solid rgba(0, 229, 255, 0.35);
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 229, 255, 0.2);
  border-radius: 12px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  backdrop-filter: blur(12px);
  z-index: 35;
  flex-wrap: wrap;
}

.ctrl-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: #b2ebf2;
  letter-spacing: 0.5px;
}

.ctrl-chip kbd {
  background: rgba(0, 229, 255, 0.12);
  border: 1px solid #00e5ff;
  border-radius: 4px;
  padding: 2px 7px;
  font-family: var(--font-hud);
  font-size: 11px;
  color: #00e5ff;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.5);
}

.ctrl-chip.highlight-f kbd {
  border-color: #00e676;
  color: #00e676;
  background: rgba(0, 230, 118, 0.15);
}

.ctrl-chip.highlight-b kbd {
  border-color: #ffb300;
  color: #ffb300;
  background: rgba(255, 179, 0, 0.15);
}

/* GTA 5/6 Style Radar Minimap */
.radar-wrapper {
  position: absolute;
  bottom: 16px;
  left: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 35;
  pointer-events: none;
}

.radar-tag {
  font-family: var(--font-hud);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #00e5ff;
  margin-bottom: 3px;
  text-shadow: 0 0 6px rgba(0, 229, 255, 0.8);
}

#radarCanvas {
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.4), inset 0 0 10px rgba(0, 0, 0, 0.8);
  border: 1.5px solid rgba(0, 229, 255, 0.6);
  background: rgba(5, 12, 24, 0.85);
}

/* Event Banner */
.event-banner {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(183, 28, 28, 0.95);
  border: 2px solid #ff5252;
  box-shadow: 0 0 30px rgba(255, 23, 68, 0.7);
  padding: 12px 20px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 50;
  animation: pulseAlert 1.5s infinite;
}

@keyframes pulseAlert {
  0% { transform: translateX(-50%) scale(0.98); }
  50% { transform: translateX(-50%) scale(1.02); }
  100% { transform: translateX(-50%) scale(0.98); }
}

.event-banner.hidden {
  display: none !important;
}

.event-icon {
  font-size: 24px;
}

.event-text strong {
  display: block;
  font-family: var(--font-hud);
  font-size: 12px;
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.event-text p {
  font-size: 12px;
}

.btn-event-ack {
  background: #ffffff;
  color: #b71c1c;
  border: none;
  font-family: var(--font-hud);
  font-size: 10px;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 700;
}

/* Toast Message */
.toast-message {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 20, 35, 0.92);
  border: 1px solid var(--cyan-glow);
  color: var(--text-main);
  padding: 10px 22px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
  z-index: 50;
  animation: slideToast 0.3s ease;
}

.toast-message.hidden {
  display: none !important;
}

@keyframes slideToast {
  from { opacity: 0; transform: translate(-50%, 15px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* Build Toolbar */
.build-toolbar {
  height: 110px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-hud);
  padding: 10px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10;
}

.toolbar-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-hud);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--cyan-glow);
}

.toolbar-heading .hint {
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0;
}

.module-cards-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.module-card {
  flex: 0 0 auto;
  min-width: 155px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.2s ease;
  text-align: left;
  color: var(--text-main);
}

.module-card:hover {
  background: rgba(0, 229, 255, 0.12);
  border-color: var(--cyan-glow);
}

.module-card.active {
  background: rgba(0, 229, 255, 0.2);
  border-color: var(--cyan-glow);
  box-shadow: 0 0 15px var(--cyan-dim);
}

.mod-icon {
  font-size: 18px;
}

.mod-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mod-name {
  font-family: var(--font-hud);
  font-size: 11px;
  font-weight: 700;
}

.mod-cost {
  font-size: 10px;
  color: var(--amber-glow);
  font-weight: 600;
}

.mod-desc {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.2;
}

/* ==========================================================================
   IN-GAME GUIDANCE, INSPECTOR & MANUAL STYLES
   ========================================================================== */

/* Guidance Widget */
.guidance-widget {
  position: absolute;
  top: 18px;
  left: 20px;
  max-width: 440px;
  background: rgba(10, 20, 42, 0.94);
  border: 1px solid var(--border-hud);
  box-shadow: 0 0 25px rgba(0, 229, 255, 0.25);
  border-radius: 8px;
  padding: 12px 16px;
  backdrop-filter: blur(10px);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: slideInGuidance 0.4s ease;
}

@keyframes slideInGuidance {
  from { opacity: 0; transform: translateY(-15px); }
  to { opacity: 1; transform: translateY(0); }
}

.guidance-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
}

.guide-avatar {
  font-size: 20px;
}

.guide-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.guide-title {
  font-family: var(--font-hud);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--cyan-glow);
}

.guide-step-badge {
  background: rgba(0, 230, 118, 0.15);
  border: 1px solid var(--green-glow);
  color: var(--green-glow);
  font-family: var(--font-hud);
  font-size: 9px;
  padding: 2px 8px;
  border-radius: 4px;
}

.btn-help-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.4);
  color: var(--cyan-glow);
  font-family: var(--font-hud);
  font-size: 10px;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-help-pill:hover {
  background: rgba(0, 229, 255, 0.2);
  border-color: var(--cyan-glow);
}

.guidance-body p {
  font-size: 13px;
  font-weight: 600;
  color: #e0f7fa;
  line-height: 1.4;
}

/* Tile Hover Inspector Tooltip */
.tile-inspector {
  position: absolute;
  pointer-events: none;
  background: rgba(5, 12, 28, 0.95);
  border: 1px solid var(--cyan-glow);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
  padding: 8px 12px;
  border-radius: 6px;
  z-index: 60;
  min-width: 170px;
  transition: opacity 0.15s ease;
}

.tile-inspector.hidden {
  display: none !important;
}

.inspector-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.inspector-header strong {
  font-family: var(--font-hud);
  font-size: 11px;
  color: var(--cyan-glow);
}

.inspector-stats {
  font-size: 11px;
  color: var(--text-dim);
}

/* Manual & Emergency Modal Styles */
.manual-intro {
  margin-bottom: 16px;
  font-size: 14px;
  color: #e0f7fa;
  line-height: 1.5;
}

.manual-steps-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 14px 0;
}

.manual-step-item {
  display: flex;
  gap: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 14px;
  border-radius: 6px;
}

.m-step-num {
  font-family: var(--font-hud);
  font-size: 15px;
  font-weight: 900;
  color: var(--cyan-glow);
  background: rgba(0, 229, 255, 0.12);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.m-step-info strong {
  display: block;
  font-family: var(--font-hud);
  font-size: 12px;
  color: #ffca28;
  margin-bottom: 4px;
}

.m-step-info p {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-dim);
}

.emergency-action-box {
  background: rgba(0, 230, 118, 0.08);
  border: 1px solid var(--green-glow);
  padding: 14px;
  border-radius: 6px;
  margin: 16px 0;
  font-size: 13px;
  line-height: 1.5;
  color: #e8f5e9;
}

/* ==========================================================================
   SATELLITES & MOONS TELEMETRY STYLES
   ========================================================================== */

.satellite-hero-box {
  background: linear-gradient(135deg, rgba(30, 20, 60, 0.75), rgba(10, 18, 35, 0.9));
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 4px 20px rgba(0, 229, 255, 0.1);
}

.sat-main-badge {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.sat-icon {
  font-size: 32px;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

.sat-title {
  font-family: var(--font-header);
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1px;
}

.sat-subtitle {
  font-size: 12px;
  color: var(--neon-cyan);
  margin-top: 3px;
}

.sat-count-val {
  font-weight: 800;
  color: #ffd54f;
  text-shadow: 0 0 8px rgba(255, 213, 79, 0.6);
}

.sat-summary-desc {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88);
  margin: 0;
}

.artificial-sat-card {
  background: rgba(0, 229, 255, 0.05);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 14px;
}

.artificial-sat-card .card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.artificial-sat-card .card-icon {
  font-size: 18px;
}

.artificial-sat-card .card-title {
  font-family: var(--font-header);
  font-size: 12px;
  letter-spacing: 0.8px;
  color: #80d8ff;
}

.stat-big-highlight {
  font-family: var(--font-header);
  font-size: 13px;
  font-weight: 700;
  color: #69f0ae;
  background: rgba(105, 240, 174, 0.12);
  border: 1px solid rgba(105, 240, 174, 0.3);
  padding: 6px 12px;
  border-radius: 8px;
  display: inline-block;
  margin-bottom: 10px;
}

.sat-grid-mini {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.sat-mini-item {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px;
}

.sat-mini-item .badge {
  font-family: var(--font-header);
  font-size: 9px;
  font-weight: 700;
  color: #00e5ff;
  background: rgba(0, 229, 255, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 5px;
}

.sat-mini-item strong {
  display: block;
  font-size: 12px;
  color: #ffffff;
  margin-bottom: 3px;
}

.sat-mini-item p {
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-dim);
  margin: 0;
}

.artificial-sat-desc {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

.notable-moons-section {
  margin-top: 14px;
}

.notable-moons-section .section-title {
  font-family: var(--font-header);
  font-size: 12px;
  letter-spacing: 0.8px;
  color: #ffd54f;
  margin-bottom: 8px;
}

.notable-moons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.moon-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 213, 79, 0.25);
  border-radius: 10px;
  padding: 12px;
  transition: all 0.2s ease;
}

.moon-card:hover {
  border-color: rgba(255, 213, 79, 0.6);
  background: rgba(255, 213, 79, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 213, 79, 0.15);
}

.moon-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.moon-name {
  font-family: var(--font-header);
  font-size: 12px;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.moon-size-badge {
  font-family: var(--font-header);
  font-size: 10px;
  color: #00e5ff;
  background: rgba(0, 229, 255, 0.15);
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 700;
  white-space: nowrap;
}

.moon-desc {
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
}

/* ==========================================================================
   AXIAL TILT & ROTATION DYNAMICS CARD
   ========================================================================== */

.rotation-tilt-card {
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.08), rgba(0, 229, 255, 0.05));
  border: 1px solid rgba(124, 77, 255, 0.35);
  border-radius: 10px;
  padding: 14px;
  margin-top: 14px;
  box-shadow: 0 4px 15px rgba(124, 77, 255, 0.1);
}

.rotation-tilt-card .card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.rotation-tilt-card .card-icon {
  font-size: 18px;
}

.rotation-tilt-card .card-title {
  font-family: var(--font-header);
  font-size: 12px;
  letter-spacing: 0.8px;
  color: #b388ff;
}

.spin-summary-alert {
  background: rgba(0, 229, 255, 0.06);
  border-left: 3px solid #00e5ff;
  padding: 10px 12px;
  border-radius: 0 8px 8px 0;
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.9);
}

/* ==========================================================================
   AXIAL ROTATION LAB & SIMULATOR (SPIN LAB MODAL)
   ========================================================================== */

.btn-spin-lab {
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.25), rgba(0, 229, 255, 0.18));
  border: 1px solid #b388ff;
  color: #ffffff;
  font-family: var(--font-header);
  font-weight: 700;
  letter-spacing: 1px;
  box-shadow: 0 0 15px rgba(124, 77, 255, 0.3);
}

.btn-spin-lab:hover {
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.45), rgba(0, 229, 255, 0.35));
  border-color: #d1c4e9;
  box-shadow: 0 0 20px rgba(179, 136, 255, 0.5);
  transform: translateY(-1px);
}

.spin-lab-theme {
  max-width: 960px;
  width: 95vw;
  background: rgba(8, 12, 24, 0.96);
  border: 1px solid rgba(124, 77, 255, 0.4);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.9), 0 0 25px rgba(124, 77, 255, 0.2);
}

.spin-lab-header {
  margin-bottom: 12px;
}

.spin-lab-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-hud);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #ffffff;
  margin: 0 0 6px 0;
  text-shadow: 0 0 12px rgba(124, 77, 255, 0.5);
}

.title-spin-svg {
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px #00e5ff);
}

.spin-lab-subtitle {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-dim);
  margin: 0;
}

.spin-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 14px;
  border-radius: 12px;
  margin-bottom: 14px;
}

.speed-btn-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ctrl-label {
  font-family: var(--font-header);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-right: 4px;
}

.btn-spin-speed {
  font-family: var(--font-header);
  font-size: 10px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
}

.btn-spin-speed.active {
  background: rgba(0, 229, 255, 0.25);
  border-color: #00e5ff;
  color: #00e5ff;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.35);
}

.toggle-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sci-fi-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-header);
  font-size: 10px;
  letter-spacing: 0.8px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
}

.sci-fi-checkbox input {
  accent-color: #00e5ff;
  cursor: pointer;
}

.spin-canvas-container {
  background: radial-gradient(circle at 50% 50%, rgba(20, 15, 45, 0.6) 0%, rgba(5, 8, 18, 0.95) 100%);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8);
}

.spin-canvas-container canvas {
  width: 100%;
  height: auto;
  display: block;
}

.spin-insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.spin-insight-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 12px;
  transition: all 0.2s ease;
}

.spin-insight-card:hover {
  border-color: rgba(0, 229, 255, 0.4);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.spin-insight-card.card-venus {
  border-color: rgba(255, 82, 82, 0.35);
}

.spin-insight-card.card-uranus {
  border-color: rgba(255, 183, 77, 0.35);
}

.insight-badge {
  font-family: var(--font-header);
  font-size: 9px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.insight-badge.prograde {
  background: rgba(105, 240, 174, 0.15);
  border: 1px solid rgba(105, 240, 174, 0.4);
  color: #69f0ae;
}

.insight-badge.retrograde {
  background: rgba(255, 23, 68, 0.2);
  border: 1px solid #ff1744;
  color: #ff5252;
  box-shadow: 0 0 10px rgba(255, 23, 68, 0.4);
}

.insight-badge.sideways {
  background: rgba(255, 179, 0, 0.15);
  border: 1px solid rgba(255, 179, 0, 0.45);
  color: #ffb74d;
}

.insight-badge.lightning {
  background: rgba(255, 235, 59, 0.15);
  border: 1px solid rgba(255, 235, 59, 0.4);
  color: #ffeb3b;
}

.spin-insight-card h4 {
  font-family: var(--font-header);
  font-size: 13px;
  color: #ffffff;
  margin: 0 0 6px 0;
}

.spin-insight-card .meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 3px;
  color: var(--text-dim);
}

.spin-insight-card .meta-row strong {
  color: #ffffff;
}

.spin-insight-card p {
  font-size: 11px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.75);
  margin: 6px 0 0 0;
}


/* =========================================================================
   ASTRONAUT AUTH, EXPEDITION TEAMS & RADIO COMMS HUD STYLES
   ========================================================================= */

/* Top Nav User & Teams Cluster */
.user-profile-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-astronaut-auth {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(13, 27, 42, 0.85);
  border: 1px solid rgba(0, 229, 255, 0.4);
  padding: 5px 12px;
  border-radius: 20px;
  color: #ffffff;
  font-family: var(--font-hud);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
}

.btn-astronaut-auth:hover {
  background: rgba(0, 229, 255, 0.2);
  border-color: #00e5ff;
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.4);
  transform: translateY(-1px);
}

.btn-astronaut-auth.guest-mode {
  border-color: rgba(255, 215, 0, 0.4);
}

.btn-astronaut-auth.logged-in {
  border-color: rgba(105, 240, 174, 0.5);
}

.user-avatar-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 6px #ffd700;
}

.user-action-pill {
  font-size: 9px;
  padding: 2px 6px;
  background: rgba(0, 229, 255, 0.25);
  border-radius: 10px;
  color: #00e5ff;
}

.btn-astronaut-auth.logged-in .user-action-pill {
  background: rgba(105, 240, 174, 0.2);
  color: #69f0ae;
}

.btn-teams-hub {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(13, 27, 42, 0.85);
  border: 1px solid rgba(255, 215, 0, 0.4);
  padding: 5px 12px;
  border-radius: 20px;
  color: #ffd700;
  font-family: var(--font-header);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-teams-hub:hover {
  background: rgba(255, 215, 0, 0.2);
  border-color: #ffd700;
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.4);
  transform: translateY(-1px);
}

/* Auth Modal Styling */
.modal-box.auth-theme {
  max-width: 720px;
  border: 1px solid rgba(0, 229, 255, 0.45);
  background: linear-gradient(180deg, rgba(13, 27, 42, 0.98), rgba(5, 12, 22, 0.98));
}

.auth-tabs-row, .teams-tabs-row {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 12px;
  margin-bottom: 20px;
  overflow-x: auto;
}

.auth-tab-btn, .teams-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-dim);
  font-family: var(--font-header);
  font-size: 11px;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.auth-tab-btn:hover, .teams-tab-btn:hover {
  background: rgba(0, 229, 255, 0.12);
  color: #ffffff;
  border-color: rgba(0, 229, 255, 0.4);
}

.auth-tab-btn.active, .teams-tab-btn.active {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.25), rgba(0, 176, 255, 0.15));
  border-color: #00e5ff;
  color: #00e5ff;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.3);
}

.auth-tab-pane, .teams-tab-pane {
  display: none;
}

.auth-tab-pane.active, .teams-tab-pane.active {
  display: block;
}

.auth-form-card, .create-team-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-title {
  font-family: var(--font-header);
  font-size: 14px;
  color: #00e5ff;
  margin: 0;
  letter-spacing: 1px;
}

.form-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  line-height: 1.4;
}

.form-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-family: var(--font-hud);
  font-size: 11px;
  color: var(--text-dim);
}

.form-group input, .form-group select {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 229, 255, 0.3);
  padding: 8px 12px;
  border-radius: 6px;
  color: #ffffff;
  font-family: var(--font-hud);
  font-size: 12px;
  outline: none;
  transition: all 0.2s ease;
}

.form-group input:focus, .form-group select:focus {
  border-color: #00e5ff;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.35);
}

.form-actions-row {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

/* Avatar Customizer Grid */
.avatar-customizer-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: center;
}

.avatar-preview-box {
  background: radial-gradient(circle at center, rgba(0, 229, 255, 0.15), rgba(0, 0, 0, 0.6));
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  position: relative;
}

.preview-badge-chip {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 20px;
  background: rgba(0, 0, 0, 0.5);
  padding: 4px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.astronaut-svg-preview {
  width: 140px;
  height: 180px;
  margin: 0 auto;
  filter: drop-shadow(0 0 12px rgba(0, 229, 255, 0.3));
}

.preview-callsign-tag {
  margin-top: 10px;
  font-family: var(--font-header);
  font-size: 13px;
  font-weight: 700;
  color: #00e5ff;
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
}

.avatar-controls-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.custom-sec-title {
  font-family: var(--font-header);
  font-size: 13px;
  color: #ffd700;
  margin: 0;
  letter-spacing: 1px;
}

.control-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.control-row label {
  font-size: 11px;
  color: var(--text-dim);
}

.control-row input[type="text"], .control-row select {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 229, 255, 0.3);
  padding: 8px 12px;
  border-radius: 6px;
  color: #ffffff;
  font-size: 12px;
}

.swatches-palette {
  display: flex;
  gap: 8px;
}

.suit-swatch, .visor-swatch {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
}

.suit-swatch:hover, .visor-swatch:hover {
  transform: scale(1.15);
  border-color: #ffffff;
}

.suit-swatch.active, .visor-swatch.active {
  border-color: #00e5ff;
  box-shadow: 0 0 12px #00e5ff;
  transform: scale(1.15);
}

.avatar-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

/* Teams Modal */
.modal-box.teams-theme {
  max-width: 860px;
  border: 1px solid rgba(255, 215, 0, 0.4);
  background: linear-gradient(180deg, rgba(13, 27, 42, 0.98), rgba(5, 12, 22, 0.98));
}

.teams-cards-grid, .camps-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  max-height: 440px;
  overflow-y: auto;
  padding-right: 6px;
}

.team-crew-card {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.25s ease;
}

.team-crew-card:hover {
  border-color: rgba(0, 229, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.team-crew-card.my-team {
  border-color: #00e5ff;
  background: rgba(0, 229, 255, 0.08);
}

.team-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.t-badge-large {
  font-size: 28px;
}

.t-meta-col {
  flex: 1;
}

.t-title {
  font-family: var(--font-header);
  font-size: 13px;
  color: #ffffff;
  margin: 0;
}

.my-team-pill {
  font-size: 8px;
  background: #00e5ff;
  color: #000000;
  padding: 2px 5px;
  border-radius: 6px;
  margin-left: 4px;
}

.t-motto {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
  margin: 2px 0 0 0;
  font-style: italic;
}

.t-points-badge {
  font-family: var(--font-header);
  font-size: 10px;
  color: #ffd700;
  background: rgba(255, 215, 0, 0.15);
  padding: 3px 6px;
  border-radius: 6px;
}

.team-card-stats {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
  color: var(--text-dim);
}

.btn-team-action {
  width: 100%;
  padding: 7px;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.25), rgba(0, 176, 255, 0.15));
  border: 1px solid rgba(0, 229, 255, 0.4);
  border-radius: 6px;
  color: #00e5ff;
  font-family: var(--font-header);
  font-size: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-team-action:hover:not(:disabled) {
  background: #00e5ff;
  color: #000000;
}

.btn-team-action.active {
  background: rgba(105, 240, 174, 0.2);
  border-color: #69f0ae;
  color: #69f0ae;
  cursor: default;
}

/* Camp Progress Cards */
.camp-progress-card {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.camp-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.camp-planet-icon {
  font-size: 26px;
}

.camp-title-col {
  flex: 1;
}

.camp-name {
  font-family: var(--font-header);
  font-size: 12px;
  color: #ffffff;
  margin: 0;
}

.camp-crew-tag {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.65);
}

.camp-science-tag {
  font-size: 10px;
  color: #69f0ae;
  background: rgba(105, 240, 174, 0.15);
  padding: 3px 6px;
  border-radius: 6px;
}

.camp-telemetry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.telemetry-bar-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.telemetry-bar-item .t-label {
  font-size: 9px;
  color: var(--text-dim);
}

.telemetry-bar-item .t-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.telemetry-bar-item .t-fill {
  height: 100%;
}

.camp-modules-count {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-dim);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 8px;
}

/* My Team Status Banner */
.my-team-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  background: radial-gradient(circle at center, rgba(0, 229, 255, 0.12), rgba(0, 0, 0, 0.6));
  border: 1px solid #00e5ff;
  border-radius: 12px;
  padding: 24px;
}

.banner-badge {
  font-size: 52px;
}

.banner-info h2 {
  font-family: var(--font-header);
  font-size: 18px;
  color: #ffffff;
  margin: 0;
}

.banner-motto {
  font-size: 12px;
  color: #ffd700;
  margin: 4px 0 10px 0;
  font-style: italic;
}

.banner-meta {
  display: flex;
  gap: 20px;
  font-size: 11px;
  color: var(--text-dim);
}

.banner-meta strong {
  color: #ffffff;
}

.team-unassigned-notice {
  text-align: center;
  padding: 30px;
  background: rgba(255, 152, 0, 0.08);
  border: 1px solid rgba(255, 152, 0, 0.3);
  border-radius: 10px;
}

.team-unassigned-notice .icon {
  font-size: 32px;
}

/* Floating Team Radio Comms Panel */
.radio-comms-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 320px;
  background: rgba(10, 20, 32, 0.94);
  border: 1px solid rgba(0, 229, 255, 0.4);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  z-index: 999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.3s ease;
}

.radio-comms-panel.hidden {
  display: none !important;
}

.radio-comms-panel.minimized {
  height: 44px;
}

.comms-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.pulse-beacon {
  width: 7px;
  height: 7px;
  background: #00e5ff;
  border-radius: 50%;
  box-shadow: 0 0 8px #00e5ff;
  animation: beaconPulse 1.6s infinite;
}

@keyframes beaconPulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

.comms-label {
  font-family: var(--font-header);
  font-size: 10px;
  color: #ffffff;
  letter-spacing: 1px;
}

.comms-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-mic-toggle {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-family: var(--font-header);
  font-size: 9px;
  padding: 3px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-mic-toggle.live-mic {
  background: rgba(255, 23, 68, 0.25);
  border-color: #ff1744;
  color: #ff1744;
  box-shadow: 0 0 10px rgba(255, 23, 68, 0.5);
  animation: micBlink 1s infinite alternate;
}

@keyframes micBlink {
  0% { opacity: 0.8; }
  100% { opacity: 1; }
}

.btn-comms-min {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
}

.voice-wave-box {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 28px;
  background: rgba(0, 0, 0, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.voice-wave-box.active {
  display: flex;
}

.voice-wave-bar {
  width: 4px;
  height: 6px;
  background: #69f0ae;
  border-radius: 2px;
  transition: height 0.06s ease;
}

.comms-messages-list {
  height: 160px;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 11px;
}

.empty-chat {
  color: rgba(255, 255, 255, 0.4);
  font-style: italic;
  text-align: center;
  margin-top: 50px;
}

.chat-msg-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
}

.chat-msg-row.msg-me {
  background: rgba(0, 229, 255, 0.08);
  border-left: 2px solid #00e5ff;
}

.chat-msg-row.msg-crew {
  background: rgba(255, 255, 255, 0.04);
  border-left: 2px solid #ffd700;
}

.msg-header {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.6);
}

.msg-author {
  font-weight: 700;
  color: #00e5ff;
}

.msg-body {
  color: #ffffff;
  line-height: 1.35;
}

.comms-presets-row {
  display: flex;
  gap: 4px;
  padding: 6px 10px;
  overflow-x: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
}

.btn-preset-comm {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
  font-size: 9px;
  padding: 3px 6px;
  border-radius: 4px;
  white-space: nowrap;
  cursor: pointer;
}

.btn-preset-comm:hover {
  background: rgba(0, 229, 255, 0.15);
  color: #00e5ff;
}

.comms-input-form {
  display: flex;
  padding: 8px 10px;
  gap: 6px;
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.comms-input-form input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 5px 8px;
  color: #ffffff;
  font-size: 11px;
  outline: none;
}

.comms-input-form input:focus {
  border-color: #00e5ff;
}

.btn-send-comm {
  background: #00e5ff;
  border: none;
  color: #000000;
  font-family: var(--font-header);
  font-size: 10px;
  font-weight: 700;
  padding: 0 10px;
  border-radius: 4px;
  cursor: pointer;
}

/* Save Camp Outpost Pill in 3D View */
.btn-save-camp-pill {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 143, 0, 0.2));
  border: 1px solid #ffd700;
  color: #ffd700;
  font-family: var(--font-header);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-save-camp-pill:hover {
  background: #ffd700;
  color: #000000;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
}

/* Toast Notifications */
.colony-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(50px);
  background: rgba(13, 27, 42, 0.94);
  border: 1px solid #00e5ff;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 8px;
  font-family: var(--font-hud);
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  z-index: 10000;
}

.colony-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.colony-toast.error {
  border-color: #ff1744;
  color: #ff5252;
}


/* ==================== NASA SCIENCE HUB & STEM TRADE-OFF STYLES ==================== */
.btn-nasa-science {
  background: rgba(0, 229, 255, 0.12) !important;
  border-color: #00e5ff !important;
  color: #00e5ff !important;
}
.btn-nasa-science:hover {
  background: #00e5ff !important;
  color: #030712 !important;
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.6) !important;
}

.btn-dilemma {
  background: linear-gradient(135deg, rgba(255, 179, 0, 0.2), rgba(255, 87, 34, 0.2)) !important;
  border-color: #ffb300 !important;
  color: #ffb300 !important;
}
.btn-dilemma:hover {
  background: linear-gradient(135deg, #ffb300, #ff5722) !important;
  color: #030712 !important;
  box-shadow: 0 0 15px rgba(255, 179, 0, 0.6) !important;
}

.modal-box.science-theme {
  max-width: 860px;
  border: 1px solid rgba(0, 229, 255, 0.45);
  background: linear-gradient(180deg, rgba(8, 18, 36, 0.98), rgba(4, 9, 18, 0.98));
}

.modal-box.dilemma-theme {
  max-width: 780px;
  border: 1px solid rgba(255, 179, 0, 0.5);
  background: linear-gradient(180deg, rgba(24, 16, 8, 0.98), rgba(8, 6, 4, 0.98));
}

.science-tabs-row {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.science-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #b0bec5;
  padding: 8px 18px;
  border-radius: 6px;
  font-family: var(--font-hud);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s;
}

.science-tab-btn.active, .science-tab-btn:hover {
  background: rgba(0, 229, 255, 0.2);
  border-color: #00e5ff;
  color: #00e5ff;
}

.panel-callout {
  background: rgba(0, 229, 255, 0.08);
  border-left: 3px solid #00e5ff;
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 12px;
  color: #cfd8dc;
  margin-bottom: 20px;
  line-height: 1.6;
}

.dataset-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 6px;
}

.dataset-card {
  background: rgba(14, 25, 48, 0.6);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dataset-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dataset-header .d-icon {
  font-size: 26px;
}

.dataset-header strong {
  font-family: var(--font-hud);
  font-size: 13px;
  color: #00e5ff;
  display: block;
}

.dataset-header .d-sub {
  font-size: 10px;
  color: #90a4ae;
  display: block;
}

.dataset-card p {
  font-size: 11px;
  color: #b0bec5;
  margin: 0;
  line-height: 1.5;
}

.d-mapping {
  background: rgba(0, 0, 0, 0.35);
  border-left: 2px solid #ffd600;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 11px;
  color: #eceff1;
  line-height: 1.5;
}

.d-mapping strong {
  color: #ffd600;
}

/* Trade-off Matrix */
.tradeoff-matrix {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 460px;
  overflow-y: auto;
  padding-right: 6px;
}

.tradeoff-row {
  display: flex;
  align-items: center;
  background: rgba(14, 25, 48, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 14px 18px;
  gap: 16px;
}

.to-col-choice {
  flex: 1.2;
}

.to-col-choice strong {
  color: #00e5ff;
  font-family: var(--font-hud);
  font-size: 12px;
  display: block;
  margin-bottom: 4px;
}

.to-col-choice p, .to-col-cost p {
  font-size: 11px;
  color: #cfd8dc;
  margin: 0;
  line-height: 1.4;
}

.to-col-arrow {
  color: #ffd600;
  font-size: 20px;
  font-weight: bold;
}

.to-col-cost {
  flex: 1.2;
}

.cost-tag.penalty {
  display: inline-block;
  background: rgba(255, 23, 68, 0.2);
  border: 1px solid #ff1744;
  color: #ff5252;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* STEM Glossary */
.glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  max-height: 460px;
  overflow-y: auto;
  padding-right: 6px;
}

.glossary-item {
  background: rgba(14, 25, 48, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 14px;
}

.g-term {
  display: block;
  font-family: var(--font-hud);
  font-size: 13px;
  color: #ffd600;
  font-weight: 700;
  margin-bottom: 6px;
}

.glossary-item p {
  font-size: 11px;
  color: #b0bec5;
  margin: 0;
  line-height: 1.5;
}

/* STEM Dilemma Modal */
.dilemma-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dilemma-badge {
  display: inline-block;
  align-self: flex-start;
  background: rgba(255, 179, 0, 0.2);
  border: 1px solid #ffb300;
  color: #ffd600;
  font-family: var(--font-hud);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 4px;
}

.dilemma-title {
  font-family: var(--font-hud);
  font-size: 18px;
  color: #ffffff;
  margin: 0;
  letter-spacing: 0.5px;
}

.dilemma-desc {
  font-size: 13px;
  color: #cfd8dc;
  line-height: 1.6;
  margin: 0;
}

.dilemma-choices-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 8px;
}

.dilemma-choice-btn {
  background: rgba(20, 28, 48, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 16px;
  text-align: left;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dilemma-choice-btn:hover {
  background: rgba(30, 48, 78, 0.9);
  border-color: #00e5ff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 229, 255, 0.3);
}

.choice-tag {
  font-family: var(--font-hud);
  font-size: 9px;
  color: #90a4ae;
  letter-spacing: 1px;
  font-weight: 700;
}

.choice-title {
  font-family: var(--font-hud);
  font-size: 14px;
  color: #ffffff;
}

.choice-effect {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
}

.effect-pos {
  color: #00e676;
}

.effect-neg {
  color: #ff5252;
}

.choice-rationale {
  font-size: 11px;
  color: #90a4ae;
  line-height: 1.4;
  margin: 0;
}

.dilemma-feedback {
  background: rgba(0, 230, 118, 0.12);
  border: 1px solid #00e676;
  border-radius: 8px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  animation: fadeIn 0.3s ease;
}

.dilemma-feedback.hidden {
  display: none !important;
}

.dilemma-feedback .feedback-icon {
  font-size: 28px;
}

.dilemma-feedback strong {
  font-family: var(--font-hud);
  font-size: 13px;
  color: #00e676;
  display: block;
}

.dilemma-feedback p {
  font-size: 11px;
  color: #eceff1;
  margin: 4px 0 0 0;
}
