/**
 * Mission Control: Space Mission Design Game
 * Aerospace Mission Operations Center UI Styles
 */

:root {
  --bg-deep: #060913;
  --bg-surface: rgba(14, 20, 40, 0.75);
  --bg-surface-elevated: rgba(22, 32, 64, 0.85);
  --bg-card: rgba(18, 26, 54, 0.65);
  --bg-card-hover: rgba(28, 42, 85, 0.8);
  --bg-card-selected: rgba(0, 229, 255, 0.12);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-cyan: rgba(0, 229, 255, 0.3);
  --border-selected: #00e5ff;

  --accent-cyan: #00e5ff;
  --accent-blue: #2979ff;
  --accent-purple: #7c4dff;
  --accent-green: #00e676;
  --accent-yellow: #ffd600;
  --accent-orange: #ff9100;
  --accent-red: #ff1744;

  --text-main: #f0f4f8;
  --text-muted: #8b9bb4;
  --text-dim: #5c6b84;

  --font-display: 'Orbitron', monospace, sans-serif;
  --font-heading: 'Rajdhani', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --glow-cyan: 0 0 20px rgba(0, 229, 255, 0.35);
  --glow-green: 0 0 20px rgba(0, 230, 118, 0.35);
  --glow-red: 0 0 20px rgba(255, 23, 68, 0.35);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

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

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   AMBIENT STARFIELD BACKGROUND
   ========================================================================== */
.stars-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.stars-1 {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(1px 1px at 20px 30px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 40px 70px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 90px 40px, #00e5ff, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 160px 120px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 240px 180px, #ffd600, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 320px 90px, #ffffff, rgba(0,0,0,0));
  background-repeat: repeat;
  background-size: 350px 350px;
  opacity: 0.6;
}

.stars-2 {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 50px 160px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 180px 220px, #7c4dff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 280px 310px, #00e5ff, rgba(0,0,0,0));
  background-repeat: repeat;
  background-size: 500px 500px;
  opacity: 0.45;
  animation: starPulse 8s ease-in-out infinite alternate;
}

.nebula-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 15% 20%, rgba(0, 229, 255, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(124, 77, 255, 0.1) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(14, 20, 40, 0.4) 0%, transparent 60%);
}

@keyframes starPulse {
  0% { opacity: 0.3; transform: scale(1); }
  100% { opacity: 0.6; transform: scale(1.02); }
}

/* ==========================================================================
   APP CONTAINER & LAYOUT
   ========================================================================== */
.app-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.global-header {
  display: none !important;
}

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

.brand-icon {
  font-size: 26px;
  filter: drop-shadow(0 0 8px var(--accent-cyan));
}

.brand-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #fff;
  display: block;
}

.brand-subtitle {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--accent-cyan);
  display: block;
}

.header-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid var(--border-cyan);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
}

.badge-tag {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
}

.badge-cyan {
  background: rgba(0, 229, 255, 0.2);
  color: var(--accent-cyan);
}

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

.btn-icon {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: rgba(0, 229, 255, 0.15);
  border-color: var(--accent-cyan);
  transform: translateY(-1px);
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Screen Management */
.screen {
  display: none !important;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 24px;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

.screen.active {
  display: flex !important;
  flex-direction: column;
  opacity: 1;
  animation: screenFadeIn 0.35s ease forwards;
}

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

.hidden {
  display: none !important;
}

/* ==========================================================================
   BUTTONS & CONTROLS
   ========================================================================== */
.btn {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  outline: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #00b0ff, #00e5ff);
  color: #060913;
  box-shadow: 0 4px 15px rgba(0, 229, 255, 0.3);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #29b6f6, #40c4ff);
  box-shadow: var(--glow-cyan);
  transform: translateY(-2px);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(80%);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-cyan);
  color: var(--accent-cyan);
}

.btn-outline:hover {
  background: rgba(0, 229, 255, 0.1);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.25);
}

.btn-glow {
  position: relative;
  overflow: hidden;
}

.btn-glow::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(60deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: rotate(30deg);
  pointer-events: none;
  animation: shineSweep 4s infinite linear;
}

@keyframes shineSweep {
  0% { transform: translateX(-150%) rotate(30deg); }
  25%, 100% { transform: translateX(150%) rotate(30deg); }
}

.btn-small {
  padding: 6px 14px;
  font-size: 13px;
}

.full-width {
  width: 100%;
}

.btn-group {
  display: grid;
  gap: 10px;
}

/* ==========================================================================
   CARDS & COMMON UI CONTAINERS
   ========================================================================== */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: all 0.25s ease;
}

.card:hover {
  border-color: rgba(0, 229, 255, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.card-heading {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--accent-cyan);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.screen-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 16px;
}

.screen-title-group h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #fff;
}

.screen-title-group p {
  color: var(--text-muted);
  font-size: 13px;
}

/* ==========================================================================
   SCREEN 1: TITLE & HERO
   ========================================================================== */
/* ==========================================================================
   SCREEN 1: TITLE & HERO (ONE-VIEW DASHBOARD COCKPIT)
   ========================================================================== */
#screen-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 8px 16px 14px;
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
}

/* NASA Live Operations Telemetry Status Ticker */
.nasa-terminal-ticker {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: rgba(8, 14, 28, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-cyan);
  border-radius: var(--radius-sm);
  padding: 5px 14px;
  width: 100%;
  margin-bottom: 10px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
  font-family: var(--font-heading);
  font-size: 11px;
}

.ticker-segment {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.ticker-label {
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 1px;
}

.ticker-val {
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.green-blink {
  color: var(--accent-green);
  font-size: 11px;
  animation: liveBlink 1.2s infinite;
}

@keyframes liveBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.2; transform: scale(0.85); }
}

/* Unified One-View Cockpit Grid */
.title-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
  align-items: stretch;
}

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

.title-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Left Panel: Hero & Globe & Quick Play */
.brand-hero-compact {
  text-align: left;
  padding: 0 2px;
}

.glitch-title-compact {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 3px;
  color: #fff;
  text-shadow: 0 0 16px rgba(0, 229, 255, 0.6);
  margin: 0 0 2px 0;
  line-height: 1.1;
}

.hero-tagline-compact {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--accent-cyan);
  text-transform: uppercase;
  margin: 0;
}

.title-globe-container-compact {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.globe-glass-frame {
  position: relative;
  background: rgba(10, 16, 35, 0.7);
  border: 1px solid var(--border-cyan);
  border-radius: var(--radius-md);
  padding: 6px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), inset 0 0 18px rgba(0, 229, 255, 0.15);
  backdrop-filter: blur(12px);
  overflow: hidden;
  width: 100%;
  display: flex;
  justify-content: center;
}

#title-earth-canvas {
  width: 100%;
  max-width: 520px;
  height: 190px;
  display: block;
  border-radius: var(--radius-sm);
  cursor: grab;
}

#title-earth-canvas:active {
  cursor: grabbing;
}

.globe-hud-overlay {
  position: absolute;
  bottom: 12px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.globe-hud-tag {
  background: rgba(6, 10, 24, 0.88);
  border: 1px solid var(--border-subtle);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
}

.globe-drag-hint {
  margin-top: 4px;
  font-family: var(--font-heading);
  font-size: 10px;
  color: var(--accent-cyan);
  letter-spacing: 0.8px;
  opacity: 0.85;
}

/* Quick Play Card Compact */
.quick-play-card-compact {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.1), rgba(0, 100, 200, 0.15));
  border: 1.5px solid rgba(0, 229, 255, 0.45);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: 0 0 25px rgba(0, 229, 255, 0.12), inset 0 0 15px rgba(0, 229, 255, 0.05);
}

.quick-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.quick-play-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 230, 118, 0.15);
  border: 1px solid #00e676;
  color: #00e676;
  padding: 3px 8px;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.quick-target-tag {
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 0.8px;
}

.quick-preset-chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.quick-chip {
  background: rgba(4, 12, 28, 0.85);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: var(--radius-sm);
  padding: 6px 5px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.quick-chip:hover {
  background: rgba(0, 229, 255, 0.18);
  border-color: rgba(0, 229, 255, 0.6);
  transform: translateY(-1px);
}

.quick-chip.active {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.25), rgba(0, 150, 255, 0.2));
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.35);
}

.quick-chip .chip-icon {
  font-size: 16px;
}

.quick-chip .chip-info strong {
  font-family: var(--font-heading);
  font-size: 11px;
  color: #fff;
  white-space: nowrap;
  display: block;
}

.quick-chip .chip-info small {
  font-size: 9px;
  color: #80deea;
  white-space: nowrap;
  display: block;
}

.btn-quick-launch-large {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #00e5ff 0%, #00b0ff 50%, #0091ea 100%);
  color: #020712;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1.2px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 229, 255, 0.4);
  transition: all 0.2s ease;
}

.btn-quick-launch-large:hover {
  background: linear-gradient(135deg, #69f0ae 0%, #00e676 50%, #00c853 100%);
  box-shadow: 0 8px 25px rgba(0, 230, 118, 0.55);
  transform: translateY(-1px);
}

.launch-rocket-icon {
  font-size: 20px;
  animation: rocketBob 1.5s infinite ease-in-out;
}

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

.launch-text-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.launch-title {
  font-size: 14px;
  letter-spacing: 1.2px;
}

.launch-sub {
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  opacity: 0.88;
}

.launch-enter-badge {
  background: rgba(0, 0, 0, 0.25);
  color: #020712;
  font-family: monospace;
  font-size: 10px;
  padding: 3px 6px;
  border-radius: 4px;
  margin-left: auto;
}

/* Right Panel: Custom Mission Architect */
.custom-studio-card-compact {
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-cyan);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(0, 229, 255, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.custom-card-header {
  margin-bottom: 10px;
}

.custom-badge-tag {
  display: inline-block;
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--accent-cyan);
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 2px 7px;
  border-radius: 4px;
  margin-bottom: 4px;
}

.custom-headline {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
  margin: 0 0 3px 0;
}

.custom-subline {
  font-size: 11.5px;
  color: #90a4ae;
  line-height: 1.35;
  margin: 0;
}

.setup-group-compact {
  margin-bottom: 10px;
}

.setup-label-compact {
  display: block;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent-cyan);
  margin-bottom: 5px;
  text-transform: uppercase;
}

.player-count-group {
  grid-template-columns: repeat(4, 1fr);
  display: grid;
  gap: 6px;
}

.player-count-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  padding: 7px 4px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.player-count-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.player-count-btn.active {
  background: rgba(0, 229, 255, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.25);
}

.difficulty-group {
  grid-template-columns: repeat(3, 1fr);
  display: grid;
  gap: 6px;
}

.difficulty-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.difficulty-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.difficulty-btn.active {
  background: rgba(0, 229, 255, 0.12);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.2);
}

.btn-icon-large {
  font-size: 18px;
  margin-bottom: 2px;
}

.btn-title {
  font-family: var(--font-heading);
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
}

.btn-sub {
  font-size: 9.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.title-action-buttons-compact {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 6px;
}

.title-action-buttons-compact #btn-new-game {
  padding: 10px 14px;
  font-size: 12.5px;
}

.title-sub-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.title-sub-buttons button {
  padding: 7px 10px;
  font-size: 11px;
}

/* How to Play Modal */
.how-to-play-card {
  max-width: 820px;
  width: 95%;
  background: rgba(10, 16, 32, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 24px;
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-title-text {
  font-family: var(--font-display);
  font-size: 18px;
  color: #fff;
  letter-spacing: 1.5px;
}

.modal-sub-text {
  font-size: 11.5px;
  color: var(--accent-cyan);
  margin-top: 2px;
}

.btn-modal-close {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 15px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-modal-close:hover {
  background: rgba(255, 23, 68, 0.3);
  border-color: #ff1744;
}

.how-to-play-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 16px 0;
}

.guide-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color 0.2s;
}

.guide-card:hover {
  border-color: rgba(0, 229, 255, 0.6);
}

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

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

.guide-card-header h4 {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.guide-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.guide-list li {
  font-size: 11.5px;
  line-height: 1.45;
  color: #cdd6f4;
  margin-bottom: 6px;
}

.guide-list li kbd {
  background: rgba(0, 229, 255, 0.15);
  border: 1px solid rgba(0, 229, 255, 0.4);
  color: #00e5ff;
  font-family: monospace;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: bold;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

/* ==========================================================================
   SCREEN 2: MULTI-PLAYER ROSTER
   ========================================================================== */
.team-roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.roster-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.roster-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--role-color, var(--accent-cyan));
}

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

.roster-role-icon {
  font-size: 28px;
}

.roster-role-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.roster-input-group {
  margin-bottom: 14px;
}

.roster-input-group label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.roster-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  outline: none;
}

.roster-input:focus {
  border-color: var(--accent-cyan);
}

.roster-select {
  width: 100%;
  background: rgba(14, 20, 40, 0.9);
  border: 1px solid var(--border-subtle);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 13px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  outline: none;
}

.roster-duties-list {
  list-style: none;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
  margin-top: 10px;
}

.roster-duties-list li {
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.roster-duties-list li::before {
  content: '▹';
  color: var(--accent-cyan);
}

.team-footer {
  display: flex;
  justify-content: flex-end;
}

/* ==========================================================================
   SCREEN 3: MISSION SELECTION
   ========================================================================== */
.mission-select-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
}

.mission-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.mission-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}

.mission-item-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-cyan);
  transform: translateY(-2px);
}

.mission-item-card.card-selected {
  background: var(--bg-card-selected);
  border-color: var(--border-selected);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.2);
}

.mission-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.mission-card-icon {
  font-size: 32px;
}

.mission-card-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.mission-card-dest {
  font-size: 12px;
  color: var(--accent-cyan);
}

.mission-card-brief {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 14px;
  flex: 1;
}

.mission-card-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Mission Detail Panel */
.mission-detail-panel {
  background: rgba(10, 16, 32, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

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

.detail-icon {
  font-size: 36px;
}

.detail-header h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.detail-briefing-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.detail-section {
  margin-bottom: 20px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
}

.detail-section h4 {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent-cyan);
  margin-bottom: 10px;
  text-transform: uppercase;
}

.objectives-list {
  list-style: none;
}

.objectives-list li {
  font-size: 12px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--accent-cyan);
}

.req-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ==========================================================================
   SCREEN 4: SPACECRAFT DESIGN STUDIO
   ========================================================================== */
#screen-design {
  max-width: 1360px;
  width: 100%;
  margin: 0 auto;
  padding: 16px 20px 40px 20px;
  box-sizing: border-box;
  position: relative;
}

.design-screen-header {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 6px 4px 14px 4px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
  width: 100%;
}

.btn-design-back {
  background: rgba(10, 20, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-design-back:hover {
  background: rgba(14, 165, 233, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.design-brand-title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
}

.design-nasa-logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.design-title-text h2,
#design-header-mission-title {
  font-family: var(--font-display);
  font-size: clamp(13px, 1.35vw, 16.5px) !important;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: #ffffff;
  margin: 0;
  line-height: 1.25;
}

.design-sub-title {
  font-family: var(--font-heading);
  font-size: 11px;
  color: #94a3b8;
  margin: 2px 0 0 0;
  letter-spacing: 0.5px;
}

.btn-design-launch {
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  border: 1px solid #38bdf8;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 8px 20px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  z-index: 10;
  box-shadow: 0 0 16px rgba(14, 165, 233, 0.4);
  transition: all 0.2s ease;
}

.btn-design-launch:hover {
  background: linear-gradient(135deg, #0369a1, #0284c7);
  box-shadow: 0 0 20px rgba(14, 165, 233, 0.65);
  transform: translateY(-1px);
}

.design-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  width: 100%;
}

/* Sidebar Margin Tracker */
.design-sidebar {
  background: rgba(10, 20, 42, 0.88);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 16px;
  padding: 16px;
  position: sticky;
  top: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.sidebar-header {
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.15);
  padding-bottom: 10px;
}

.sidebar-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sidebar-title .sidebar-icon {
  color: #38bdf8;
  font-size: 14px;
}

.sidebar-sub {
  font-family: var(--font-heading);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.8px;
  color: #38bdf8;
  margin-top: 2px;
}

.resource-block {
  margin-bottom: 14px;
}

.resource-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  margin-bottom: 5px;
}

.resource-label {
  font-family: var(--font-heading);
  font-weight: 600;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.resource-label .res-ico {
  font-size: 12px;
}

.resource-val {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
}

.resource-track {
  height: 6px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.resource-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease;
}

.fill-green {
  background: linear-gradient(90deg, #059669, #10b981);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.fill-yellow {
  background: linear-gradient(90deg, #d97706, #f59e0b);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.fill-red {
  background: linear-gradient(90deg, #dc2626, #ef4444);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
  animation: barWarningPulse 1.2s infinite alternate;
}

@keyframes barWarningPulse {
  0% { opacity: 0.8; }
  100% { opacity: 1; filter: drop-shadow(0 0 8px var(--accent-red)); }
}

.warnings-box {
  background: rgba(6, 12, 26, 0.7);
  border: 1px solid rgba(234, 179, 8, 0.3);
  border-radius: 10px;
  padding: 12px;
  margin: 16px 0;
}

.warnings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #facc15;
  margin-bottom: 8px;
}

.badge-counter {
  background: rgba(234, 179, 8, 0.2);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.4);
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
}

.warnings-list {
  max-height: 160px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(234, 179, 8, 0.3) rgba(0, 0, 0, 0.3);
}

.warning-item {
  font-size: 10.5px;
  padding: 6px 8px;
  border-radius: 6px;
  line-height: 1.35;
  border-left: 3px solid;
}

.warning-item.info {
  background: rgba(56, 189, 248, 0.08);
  border-color: #38bdf8;
  color: #bae6fd;
}

.warning-item.warning {
  background: rgba(234, 179, 8, 0.08);
  border-color: #facc15;
  color: #fef08a;
}

.warning-item.error {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: #fecaca;
}

.sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.btn-sidebar-gold {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(234, 179, 8, 0.45);
  color: #facc15;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-sidebar-gold:hover {
  background: rgba(234, 179, 8, 0.15);
  border-color: #facc15;
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.3);
}

.btn-sidebar-electric {
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  border: 1px solid #38bdf8;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 11px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(14, 165, 233, 0.35);
  transition: all 0.2s ease;
}

.btn-sidebar-electric:hover {
  background: linear-gradient(135deg, #0369a1, #0284c7);
  box-shadow: 0 0 20px rgba(14, 165, 233, 0.6);
  transform: translateY(-1px);
}

.btn-sidebar-dark {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 9px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-sidebar-dark:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* =========================================================================
   3D SPACECRAFT CAD / BLUEPRINT INSPECTOR
   ========================================================================= */
.cad-inspector-card {
  background: rgba(10, 16, 32, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  position: relative;
}

.cad-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cad-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: clamp(10.5px, 1.1vw, 12px);
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
}

.cad-pulse {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: pulseLive 1.8s infinite ease-in-out;
}

@keyframes pulseLive {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.5; }
}

.cad-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cad-hint {
  font-family: var(--font-heading);
  font-size: 10.5px;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

.cad-hint kbd {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  padding: 1px 5px;
  color: #38bdf8;
}

.btn-cad-toggle {
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.5);
  color: #38bdf8;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-cad-toggle:hover {
  background: rgba(14, 165, 233, 0.25);
  color: #fff;
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.btn-cad-toggle.active {
  background: #0284c7;
  color: #fff;
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.6);
}

.cad-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 195px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background: 
    linear-gradient(rgba(56, 189, 248, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.05) 1px, transparent 1px),
    radial-gradient(circle at 50% 50%, rgba(4, 20, 48, 0.75) 0%, rgba(2, 6, 18, 0.98) 85%);
  background-size: 24px 24px, 24px 24px, 100% 100%;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  cursor: grab;
}

.cad-canvas-wrapper:active {
  cursor: grabbing;
}

#design-cad-canvas {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: block;
}

.cad-overlay-badges {
  position: absolute;
  top: 12px;
  right: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 5;
  pointer-events: none;
}

.cad-badge {
  background: rgba(6, 14, 30, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 6px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cad-badge .badge-icon {
  font-size: 11px;
}

.cad-watermark {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.45);
  z-index: 5;
  pointer-events: none;
}

/* Tabs Navigation */
.design-tabs-nav {
  display: flex;
  gap: 6px;
  background: rgba(10, 18, 38, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 10px;
  padding: 5px;
  margin-bottom: 16px;
  overflow-x: auto;
}

.design-tabs-nav .tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.design-tabs-nav .tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.design-tabs-nav .tab-btn.active {
  background: #0284c7;
  color: #ffffff;
  border: 1px solid #38bdf8;
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.45);
}

.design-panel {
  display: none;
}

.design-panel.active {
  display: block;
  animation: panelFade 0.3s ease forwards;
}

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

.panel-intro {
  margin-bottom: 14px;
}

.panel-intro h3 {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.panel-intro h3 .panel-icon {
  color: #38bdf8;
}

.panel-intro p {
  color: #94a3b8;
  font-size: 11px;
  margin: 0;
  line-height: 1.4;
}

.sub-section {
  margin-bottom: 30px;
}

/* Orbit Cards Grid (3 Columns) */
.orbit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

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

/* Hardware Cards Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.hw-card {
  background: rgba(10, 20, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.hw-card:hover {
  background: rgba(14, 28, 58, 0.95);
  border-color: rgba(56, 189, 248, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.hw-card.card-selected {
  background: rgba(12, 32, 68, 0.95);
  border-color: #38bdf8;
  box-shadow: 0 0 16px rgba(14, 165, 233, 0.35);
  position: relative;
}

.hw-card.card-selected::after {
  content: '✓ SELECTED';
  position: absolute;
  top: 8px;
  right: 8px;
  font-family: var(--font-heading);
  font-size: 9px;
  font-weight: 700;
  background: #0284c7;
  color: #ffffff;
  padding: 2px 5px;
  border-radius: 4px;
}

.hw-card-top {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
}

.hw-card-icon {
  font-size: 16px;
}

.hw-card-name {
  font-family: var(--font-heading);
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
}

.hw-card-check {
  display: none;
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid #38bdf8;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
}

.hw-card.card-selected .hw-card-check {
  display: inline-flex;
}

.hw-card-img-wrap {
  width: 100%;
  height: 38px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #020612;
}

.hw-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hw-card-desc {
  font-size: 10px;
  color: #94a3b8;
  line-height: 1.35;
  margin-bottom: 8px;
  flex: 1;
}

.hw-stats-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 6px;
}

#orbit-cards .hw-stats-badges {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.stat-chip {
  padding: 2.5px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 0 1 auto;
}

.stat-chip.chip-deltav {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #c084fc;
}

.stat-chip.chip-science {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #4ade80;
}

.stat-chip.chip-radiation {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.stat-chip.chip-coverage {
  grid-column: 1 / -1;
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.4);
  color: #facc15;
  padding: 3px 6px;
  margin-top: 2px;
}

.stat-chip.cost { color: #81d4fa; background: rgba(56, 189, 248, 0.1); border: 1px solid rgba(56, 189, 248, 0.3); }
.stat-chip.mass { color: #ce93d8; background: rgba(168, 85, 247, 0.1); border: 1px solid rgba(168, 85, 247, 0.3); }
.stat-chip.power { color: #ffe082; background: rgba(234, 179, 8, 0.1); border: 1px solid rgba(234, 179, 8, 0.3); }
.stat-chip.science { color: #a5d6a7; background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.3); }

/* Full Width L2 Horizontal Card */
.hw-card-l2 {
  grid-column: 1 / -1 !important;
  display: grid !important;
  grid-template-columns: 240px 1fr !important;
  gap: 16px !important;
  align-items: center !important;
  padding: 12px 16px !important;
}

@media (max-width: 900px) {
  .hw-card-l2 {
    grid-template-columns: 1fr !important;
  }
  .hw-card-l2-img {
    width: 100% !important;
  }
}

.hw-card-l2-img {
  width: 240px;
  height: 58px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #020612;
}

.hw-card-l2-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hw-card-l2-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hw-card-l2 .hw-stats-badges.l2-badges {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  border-top: none !important;
  padding-top: 4px !important;
}

.hw-card-l2 .hw-stats-badges.l2-badges .stat-chip {
  padding: 3px 8px !important;
  grid-column: auto !important;
  margin-top: 0 !important;
}

/* ==========================================================================
   SCREEN 5: FLIGHT READINESS REVIEW
   ========================================================================== */
.review-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.review-spec-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--accent-cyan);
}

.spec-label {
  font-family: var(--font-heading);
  font-size: 13px;
  color: var(--text-muted);
}

.spec-val {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.checklist-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.checklist-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
}

.check-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.checklist-row.pass {
  border-left: 3px solid var(--accent-green);
}
.checklist-row.pass .check-icon { color: var(--accent-green); }

.checklist-row.fail {
  border-left: 3px solid var(--accent-red);
}
.checklist-row.fail .check-icon { color: var(--accent-red); }

.checklist-row.warn {
  border-left: 3px solid var(--accent-yellow);
}
.checklist-row.warn .check-icon { color: var(--accent-yellow); }

.launch-call-box {
  margin-top: 20px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 20px;
}

.readiness-banner {
  text-align: center;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  background: rgba(0, 0, 0, 0.4);
}

.readiness-banner.go {
  background: rgba(0, 230, 118, 0.15);
  border: 1px solid var(--accent-green);
  color: var(--accent-green);
  box-shadow: var(--glow-green);
}

.readiness-banner.nogo {
  background: rgba(255, 23, 68, 0.15);
  border: 1px solid var(--accent-red);
  color: var(--accent-red);
  box-shadow: var(--glow-red);
}

.btn-launch {
  background: linear-gradient(135deg, #00e676, #00b0ff);
  color: #060913;
  font-size: 16px;
  padding: 16px 28px;
}

.btn-launch:hover:not(:disabled) {
  box-shadow: 0 0 25px rgba(0, 230, 118, 0.5);
  transform: translateY(-2px);
}

/* ==========================================================================
   SCREEN 6: SIMULATION & LIVE TELEMETRY
   ========================================================================== */
.sim-dashboard {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.telemetry-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.telemetry-gauge {
  background: var(--bg-surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
}

.telemetry-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.telemetry-value {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.text-cyan { color: var(--accent-cyan); }
.text-yellow { color: var(--accent-yellow); }
.text-green { color: var(--accent-green); }

.sim-visual-container {
  position: relative;
  background: #04060c;
  border: 1px solid var(--border-cyan);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

#sim-canvas {
  width: 100%;
  height: 380px;
  display: block;
}

.sim-hud-overlay {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.sim-hud-overlay > * {
  pointer-events: auto;
}

.sim-status-pill {
  background: rgba(10, 20, 45, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid var(--accent-cyan);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent-cyan);
}

.sim-speed-controls {
  display: flex;
  gap: 8px;
}

.btn-control {
  background: rgba(14, 24, 52, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.btn-danger {
  border-color: rgba(255, 23, 68, 0.4);
  color: #ff8a80;
}

.btn-danger:hover {
  background: rgba(255, 23, 68, 0.2);
  border-color: var(--accent-red);
}

.sim-progress-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
}

.sim-progress-track .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00b0ff, #00e5ff);
  transition: width 0.2s ease;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.6);
}

.flight-log-panel {
  background: var(--bg-surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}

.log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent-cyan);
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
}

.live-blip {
  color: var(--accent-red);
  font-size: 11px;
  animation: blip 1.5s infinite;
}

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

.flight-log-content {
  height: 140px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
}

.log-entry {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.log-entry.info { color: #81d4fa; }
.log-entry.success { color: #b9f6ca; border-left: 2px solid var(--accent-green); }
.log-entry.warning { color: #ffe57f; border-left: 2px solid var(--accent-yellow); }
.log-entry.danger { color: #ff8a80; border-left: 2px solid var(--accent-red); }

/* ==========================================================================
   SCREEN 7: RESULTS & MISSION EVALUATION
   ========================================================================== */
.results-header {
  text-align: center;
  margin-bottom: 28px;
}

.results-header h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #fff;
  margin-bottom: 4px;
}

.results-header p {
  color: var(--accent-cyan);
  font-family: var(--font-heading);
  font-size: 14px;
  letter-spacing: 1px;
}

.results-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 24px;
  align-items: start;
}

.score-display {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
  border: 1px solid var(--border-cyan);
}

.grade-box {
  text-align: center;
}

.grade-letter {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 900;
  color: var(--accent-cyan);
  line-height: 1;
  text-shadow: 0 0 20px rgba(0, 229, 255, 0.6);
  display: block;
}

.grade-label {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.score-number-box {
  text-align: center;
}

.score-number {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}

.score-max {
  font-family: var(--font-heading);
  font-size: 13px;
  color: var(--text-muted);
  display: block;
}

.score-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.score-breakdown-item .breakdown-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-family: var(--font-heading);
  font-weight: 600;
  margin-bottom: 4px;
}

.bar-track {
  height: 6px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 3px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1s ease;
}

.cyan-fill { background: var(--accent-cyan); }
.purple-fill { background: var(--accent-purple); }
.green-fill { background: var(--accent-green); }
.orange-fill { background: var(--accent-orange); }

.achievements-section h4 {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent-cyan);
  margin-bottom: 12px;
}

.achievements-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.achievement-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--accent-yellow);
}

.achieve-icon {
  font-size: 20px;
}

.achieve-name {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  display: block;
}

.achieve-desc {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}

.report-content {
  margin-bottom: 24px;
}

.report-summary-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-main);
  background: rgba(0, 229, 255, 0.05);
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-cyan);
  margin-bottom: 20px;
}

.report-section {
  margin-bottom: 18px;
}

.report-section h4 {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 8px;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.report-table th, .report-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.report-table th {
  color: var(--text-muted);
  font-family: var(--font-heading);
  text-transform: uppercase;
}

.results-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ==========================================================================
   SCREEN 8: TUTORIAL
   ========================================================================== */
.tutorial-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.tutorial-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
}

.tutorial-card h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent-cyan);
  margin-bottom: 12px;
}

.tutorial-card p {
  color: var(--text-main);
  line-height: 1.6;
  margin-bottom: 12px;
}

.tutorial-card ul {
  padding-left: 20px;
  color: var(--text-muted);
}

.tutorial-card li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.tutorial-subsystem-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 12px;
}

.subsystem-box {
  background: rgba(0, 0, 0, 0.3);
  padding: 14px;
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--accent-cyan);
}

.subsystem-box strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 14px;
  color: #fff;
  margin-bottom: 4px;
}

.subsystem-box p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

/* ==========================================================================
   MODAL POPUP (IN-FLIGHT ANOMALIES)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 6, 14, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  background: var(--bg-surface-elevated);
  border: 2px solid var(--accent-yellow);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 580px;
  width: 100%;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8), 0 0 30px rgba(255, 214, 0, 0.2);
  animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalPop {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

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

.modal-alert-icon {
  font-size: 32px;
  animation: alertPulse 1.2s infinite alternate;
}

@keyframes alertPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.15); filter: drop-shadow(0 0 10px var(--accent-yellow)); }
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #fff;
}

.modal-body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-main);
  margin-bottom: 24px;
}

.modal-choices-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-choice-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.4;
}

.modal-choice-btn:hover {
  background: rgba(0, 229, 255, 0.15);
  border-color: var(--accent-cyan);
  transform: translateX(4px);
}

/* ==========================================================================
   ARCADE FLIGHT & MISSION OPERATIONS MODE
   ========================================================================== */
#screen-arcade {
  display: none;
  flex-direction: column;
  gap: 14px;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 0 12px;
}

#screen-arcade.active {
  display: flex;
}

.arcade-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-cyan);
  padding-bottom: 12px;
}

.arcade-title-group h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #fff;
}

.arcade-title-group p {
  font-size: 13px;
  color: var(--accent-cyan);
}

/* NASA Mars 4-Phase Timeline Bar */
.mars-phase-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 16, 32, 0.94);
  border: 1px solid rgba(255, 110, 64, 0.35);
  border-radius: 8px;
  padding: 8px 14px;
  margin: 10px 0 12px 0;
  gap: 12px;
  flex-wrap: wrap;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.65), 0 0 12px rgba(255, 110, 64, 0.12);
}

.mars-phase-title-badge {
  font-family: 'Orbitron', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #ff8a65;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mars-phase-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-mars-phase {
  background: rgba(18, 25, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #b0bec5;
  padding: 6px 14px;
  border-radius: 6px;
  font-family: 'Orbitron', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-mars-phase .phase-num {
  color: #ff7043;
  font-weight: 700;
}

.btn-mars-phase:hover {
  background: rgba(255, 112, 67, 0.18);
  border-color: #ff7043;
  color: #ffffff;
}

.btn-mars-phase.active {
  background: linear-gradient(135deg, rgba(230, 81, 0, 0.85), rgba(191, 54, 12, 0.9));
  border-color: #ffab91;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(255, 112, 67, 0.45);
}

/* Master Flight Console View Switcher Bar (Sticky Top) */
.flight-view-mode-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(90deg, rgba(8, 16, 36, 0.98), rgba(4, 9, 20, 0.98));
  border: 1px solid rgba(0, 229, 255, 0.45);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  flex-wrap: wrap;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 229, 255, 0.15);
  position: sticky;
  top: 54px;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.view-mode-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.view-mode-label {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 1px;
  margin-right: 4px;
}

.view-mode-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 229, 255, 0.2);
  color: #cdd6f4;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.view-mode-btn:hover {
  background: rgba(0, 229, 255, 0.15);
  border-color: rgba(0, 229, 255, 0.6);
  color: #fff;
  transform: translateY(-1px);
}

.view-mode-btn.active {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.3), rgba(0, 150, 255, 0.2));
  border-color: var(--accent-cyan);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.4);
}

.flight-mode-toggles {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-safe-mode {
  background: rgba(0, 230, 118, 0.12);
  border: 1px solid #00e676;
  color: #00e676;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-safe-mode .mode-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00e676;
  box-shadow: 0 0 6px #00e676;
  animation: pulse-dot 1.5s infinite;
}

.btn-safe-mode.inactive {
  background: rgba(255, 87, 34, 0.12);
  border-color: #ff5722;
  color: #ff5722;
}

.btn-safe-mode.inactive .mode-status-dot {
  background: #ff5722;
  box-shadow: 0 0 6px #ff5722;
  animation: none;
}

.btn-flight-restart {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-flight-restart:hover {
  background: rgba(255, 23, 68, 0.2);
  border-color: #ff1744;
  color: #ff1744;
}

/* Workspace Layout Modes */
.arcade-workspace {
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.3s ease;
}

/* Mode 1: Split Console Mode (Standard View - 3D on Top, Ground Track & Oscilloscope below) */
.arcade-workspace {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  transition: all 0.3s ease;
}

.arcade-workspace.view-mode-split {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.arcade-workspace.view-mode-split .arcade-canvas-wrapper {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

.arcade-workspace.view-mode-split .mcc-groundtrack-card,
.arcade-workspace.view-mode-split .mcc-telemetry-card {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

/* Mode 2: 3D Simulator Full Focus */
.arcade-workspace.view-mode-3d .arcade-canvas-wrapper {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  box-shadow: 0 0 40px rgba(0, 229, 255, 0.35);
  border-color: #00e5ff;
}
.arcade-workspace.view-mode-3d .mcc-groundtrack-card,
.arcade-workspace.view-mode-3d .mcc-telemetry-card {
  display: none !important;
}

/* Mode 3: Ground Track Focus */
.arcade-workspace.view-mode-track .mcc-groundtrack-card {
  order: -1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  box-shadow: 0 0 35px rgba(0, 230, 118, 0.35);
  border-color: #00e676;
}
.arcade-workspace.view-mode-track .mcc-groundtrack-card .mcc-canvas-wrapper {
  max-height: 480px;
}
.arcade-workspace.view-mode-track .mcc-groundtrack-card canvas {
  height: 400px;
}
.arcade-workspace.view-mode-track .arcade-canvas-wrapper,
.arcade-workspace.view-mode-track .mcc-telemetry-card {
  display: none !important;
}

/* Mode 4: Telemetry Oscilloscope Focus */
.arcade-workspace.view-mode-telemetry .mcc-telemetry-card {
  order: -1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  box-shadow: 0 0 35px rgba(0, 229, 255, 0.4);
  border-color: #00e5ff;
}
.arcade-workspace.view-mode-telemetry .mcc-chart-wrapper {
  height: 240px;
}
.arcade-workspace.view-mode-telemetry #mcc-stripchart-canvas {
  height: 240px;
}
.arcade-workspace.view-mode-telemetry .arcade-canvas-wrapper,
.arcade-workspace.view-mode-telemetry .mcc-groundtrack-card {
  display: none !important;
}

/* Mode 5: Optical Feed Focus */
.arcade-workspace.view-mode-optical .optical-feed-card {
  display: block !important;
  order: -1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}
.arcade-workspace.view-mode-optical .arcade-canvas-wrapper,
.arcade-workspace.view-mode-optical .mcc-groundtrack-card,
.arcade-workspace.view-mode-optical .mcc-telemetry-card {
  display: none !important;
}

.optical-feed-card {
  background: #020712;
  border: 2px solid var(--accent-cyan);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.3);
}

.optical-feed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: rgba(0, 229, 255, 0.08);
  border-bottom: 1px solid rgba(0, 229, 255, 0.25);
}

.optical-feed-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.optical-rec-pulse {
  color: #ff1744;
  font-weight: 900;
  animation: pulse-dot 1s infinite;
}

.optical-feed-meta {
  font-size: 11px;
  color: var(--accent-cyan);
  font-family: monospace;
}

.optical-canvas-wrapper {
  background: #000;
  display: flex;
  justify-content: center;
}

#optical-feed-canvas {
  width: 100%;
  max-width: 960px;
  height: 480px;
  display: block;
}

.camera-mode-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 15, 30, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
}

.cam-btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toolbar-label {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 1px;
}

.cam-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.cam-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.cam-btn.active {
  background: rgba(0, 229, 255, 0.2);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.25);
}

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

.arcade-canvas-wrapper {
  background: #020308;
  border: 2px solid var(--border-cyan);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(0, 229, 255, 0.2);
  display: flex;
  justify-content: center;
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

#game-canvas-3d, #game-canvas {
  width: 100%;
  height: 100%;
  max-width: 960px;
  display: block;
  object-fit: contain;
}

#game-canvas-hud {
  width: 100%;
  height: 100%;
  max-width: 960px;
  display: block;
  object-fit: contain;
}

/* =========================================================================
   NASA HOUSTON MCC 2D ORBIT GROUND TRACK & TELEMETRY CONSOLE
   ========================================================================= */
.mcc-groundtrack-card {
  background: linear-gradient(135deg, rgba(6, 12, 26, 0.95), rgba(3, 7, 16, 0.98));
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: var(--radius-md);
  margin-top: 14px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7), inset 0 0 20px rgba(0, 229, 255, 0.05);
  transition: all 0.3s ease;
}

.mcc-groundtrack-card.minimized .mcc-canvas-wrapper {
  max-height: 120px;
}

.mcc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: rgba(0, 229, 255, 0.06);
  border-bottom: 1px solid rgba(0, 229, 255, 0.15);
  flex-wrap: wrap;
  gap: 10px;
}

.mcc-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mcc-live-pulse {
  width: 9px;
  height: 9px;
  background: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-green);
  animation: pulseLive 1.8s infinite ease-in-out;
}

.mcc-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #ffffff;
}

.mcc-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid;
}

.badge-aos {
  background: rgba(0, 230, 118, 0.15);
  border-color: #00e676;
  color: #00e676;
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.3);
  animation: pulseLive 1.2s infinite ease-in-out;
}

.badge-los {
  background: rgba(255, 171, 0, 0.12);
  border-color: #ffab00;
  color: #ffab00;
}

.mcc-telemetry-pills {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mcc-telemetry-item {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-cyan);
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.2);
  padding: 3px 8px;
  border-radius: 4px;
}

.btn-mcc-toggle {
  background: rgba(0, 229, 255, 0.12);
  border: 1px solid rgba(0, 229, 255, 0.4);
  color: var(--accent-cyan);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-mcc-toggle:hover {
  background: rgba(0, 229, 255, 0.25);
  color: #fff;
  border-color: #00e5ff;
}

.mcc-canvas-wrapper {
  position: relative;
  width: 100%;
  max-height: 300px;
  background: #020813;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

#mcc-groundtrack-canvas {
  width: 100%;
  height: 100%;
  max-height: 300px;
  display: block;
}

.mcc-footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background: rgba(5, 10, 22, 0.9);
  border-top: 1px solid rgba(0, 229, 255, 0.12);
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 12px;
  color: var(--text-muted);
}

.mcc-stations-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.legend-station {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-dim);
}

.legend-station .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.dot.dsn-gold { background: #ffd600; box-shadow: 0 0 6px #ffd600; }
.dot.dsn-madrid { background: #ff9100; box-shadow: 0 0 6px #ff9100; }
.dot.dsn-canberra { background: #00e5ff; box-shadow: 0 0 6px #00e5ff; }
.dot.polar-svalbard { background: #00e676; box-shadow: 0 0 6px #00e676; }
.dot.ne-wallops { background: #e040fb; box-shadow: 0 0 6px #e040fb; }

.mcc-thermal-indicator {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.mcc-thermal-indicator strong {
  color: #fff;
}

/* =========================================================================
   IN-FLIGHT EMERGENCY ANOMALY BANNER
   ========================================================================= */
.flight-anomaly-banner {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 820px;
  background: linear-gradient(135deg, rgba(30, 8, 8, 0.96), rgba(15, 3, 3, 0.98));
  border: 2px solid #ff1744;
  border-radius: var(--radius-md);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 0 30px rgba(255, 23, 68, 0.5), inset 0 0 15px rgba(255, 23, 68, 0.2);
  z-index: 100;
  animation: pulseEmergency 1.4s infinite ease-in-out;
}

@keyframes pulseEmergency {
  0%, 100% { border-color: #ff1744; box-shadow: 0 0 25px rgba(255, 23, 68, 0.5); }
  50% { border-color: #ffd600; box-shadow: 0 0 35px rgba(255, 214, 0, 0.6); }
}

.anomaly-icon-box {
  font-size: 28px;
  animation: shakeAlert 0.8s infinite ease-in-out;
}

@keyframes shakeAlert {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-8deg); }
  75% { transform: rotate(8deg); }
}

.anomaly-body {
  flex: 1;
}

.anomaly-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 3px;
}

.anomaly-alert-tag {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #ff1744;
}

.anomaly-timer-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 23, 68, 0.2);
  border: 1px solid #ff1744;
  color: #ff5252;
  padding: 1px 6px;
  border-radius: 3px;
}

.anomaly-headline {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #ffffff;
  margin-bottom: 2px;
}

.anomaly-detail {
  font-family: var(--font-heading);
  font-size: 12px;
  color: var(--text-dim);
}

.anomaly-action-pane {
  display: flex;
  align-items: center;
}

.btn-anomaly-solve {
  background: linear-gradient(135deg, #ff1744, #d50000);
  border: 1px solid #ff5252;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(255, 23, 68, 0.4);
}

.btn-anomaly-solve:hover {
  background: #ff5252;
  box-shadow: 0 0 20px #ff1744;
  transform: translateY(-1px);
}

/* =========================================================================
   HOUSTON MOC MULTI-CHANNEL TELEMETRY OSCILLOSCOPE (STRIP CHART)
   ========================================================================= */
.mcc-telemetry-card {
  background: linear-gradient(135deg, rgba(6, 12, 26, 0.95), rgba(3, 7, 16, 0.98));
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: var(--radius-md);
  margin-top: 14px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7), inset 0 0 20px rgba(0, 229, 255, 0.05);
}

.mcc-telemetry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background: rgba(0, 229, 255, 0.06);
  border-bottom: 1px solid rgba(0, 229, 255, 0.15);
  flex-wrap: wrap;
  gap: 8px;
}

.mcc-chart-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #ffffff;
}

.mcc-chart-channels {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.channel-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid;
}

.channel-pill.ch-battery { border-color: rgba(0, 230, 118, 0.4); color: #00e676; background: rgba(0, 230, 118, 0.08); }
.channel-pill.ch-temp { border-color: rgba(0, 229, 255, 0.4); color: #00e5ff; background: rgba(0, 229, 255, 0.08); }
.channel-pill.ch-rf { border-color: rgba(255, 214, 0, 0.4); color: #ffd600; background: rgba(255, 214, 0, 0.08); }
.channel-pill.ch-deltav { border-color: rgba(224, 64, 251, 0.4); color: #e040fb; background: rgba(224, 64, 251, 0.08); }

.mcc-chart-wrapper {
  position: relative;
  width: 100%;
  height: 120px;
  background: #020612;
}

#mcc-stripchart-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Button Variants for Prograde/Retrograde and Danger */
.btn-burn-pro {
  border-color: rgba(0, 230, 118, 0.5) !important;
  color: #00e676 !important;
}

.btn-burn-pro:hover {
  background: rgba(0, 230, 118, 0.25) !important;
  box-shadow: 0 0 12px rgba(0, 230, 118, 0.4) !important;
}

.btn-burn-retro {
  border-color: rgba(255, 171, 0, 0.5) !important;
  color: #ffab00 !important;
}

.btn-burn-retro:hover {
  background: rgba(255, 171, 0, 0.25) !important;
  box-shadow: 0 0 12px rgba(255, 171, 0, 0.4) !important;
}

.btn-touch-danger {
  background: rgba(255, 23, 68, 0.2) !important;
  border-color: #ff1744 !important;
  color: #ff5252 !important;
  animation: pulseLive 1.2s infinite ease-in-out;
}

.arcade-controls-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}

.controls-guide-text {
  font-family: var(--font-heading);
  font-size: 13px;
  letter-spacing: 0.5px;
  color: var(--text-main);
  text-align: center;
  background: rgba(0, 0, 0, 0.3);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.arcade-touch-pad {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1.35fr 1.15fr 1fr;
  gap: 10px;
  width: 100%;
}

.btn-touch {
  background: rgba(14, 24, 52, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-heading);
  font-size: clamp(11px, 1.1vw, 13px);
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 14px 6px;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

#ctrl-anomaly {
  grid-column: 1 / -1;
}

@media (max-width: 768px) {
  .arcade-touch-pad {
    grid-template-columns: 1fr 1fr;
  }
  #ctrl-left { order: 1; }
  #ctrl-right { order: 2; }
  #ctrl-up { order: 3; }
  #ctrl-down { order: 4; }
  #ctrl-action { order: 5; grid-column: 1 / -1; }
  #ctrl-anomaly { order: 6; grid-column: 1 / -1; }
}

.btn-touch:active, .btn-touch:hover {
  background: rgba(0, 229, 255, 0.2);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.3);
  transform: translateY(-1px);
}

.btn-touch-action {
  background: linear-gradient(135deg, #00b0ff, #00e5ff);
  color: #060913;
  font-weight: 800;
}

.btn-touch-action:active, .btn-touch-action:hover {
  background: linear-gradient(135deg, #29b6f6, #40c4ff);
  box-shadow: var(--glow-cyan);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1024px) {
  .design-layout {
    grid-template-columns: 1fr;
  }
  .design-sidebar {
    position: static;
  }
  .mission-select-layout {
    grid-template-columns: 1fr;
  }
  .results-layout {
    grid-template-columns: 1fr;
  }
  .review-layout {
    grid-template-columns: 1fr;
  }
  .telemetry-bar {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .telemetry-bar {
    grid-template-columns: 1fr 1fr;
  }
  .player-count-group {
    grid-template-columns: repeat(2, 1fr);
  }
  .difficulty-group {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   MULTIPLAYER ONLINE CO-OP COCKPIT & LOBBY
   ========================================================================== */
.btn-multiplayer-glow {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.2), rgba(124, 77, 255, 0.35)) !important;
  border: 1px solid var(--accent-cyan) !important;
  color: #fff !important;
  font-weight: 700 !important;
  letter-spacing: 1px !important;
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.35) !important;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-multiplayer-glow:hover {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.35), rgba(124, 77, 255, 0.55)) !important;
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.6) !important;
  transform: translateY(-2px);
}

.header-mp-btn {
  background: rgba(124, 77, 255, 0.15);
  border-color: rgba(124, 77, 255, 0.5);
  color: var(--accent-cyan);
}
.header-mp-btn:hover {
  background: rgba(124, 77, 255, 0.35);
  box-shadow: 0 0 12px rgba(124, 77, 255, 0.6);
}

.header-network-pill {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.3);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 1px;
}

/* ==========================================================================
   SCREEN: REAL-TIME ONLINE MULTIPLAYER CO-OP (ORBITOPS NASA SIMULATION)
   ========================================================================== */
#screen-multiplayer {
  position: relative;
  min-height: 100vh;
  background: 
    radial-gradient(ellipse 100% 40% at 50% 100%, rgba(30, 144, 255, 0.22) 0%, rgba(14, 116, 233, 0.1) 35%, transparent 70%),
    radial-gradient(circle at 50% 25%, rgba(15, 23, 42, 0.65) 0%, transparent 80%);
  display: flex;
  flex-direction: column;
  padding: 0 0 50px 0;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* MP Top Navbar */
.mp-navbar {
  width: 100%;
  height: 64px;
  background: rgba(4, 9, 24, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  box-sizing: border-box;
  z-index: 20;
}

.mp-nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  flex: 1;
}

.mp-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.mp-brand-name {
  font-family: var(--font-display, sans-serif);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #ffffff;
}

.mp-brand-sub {
  font-size: 10.5px;
  color: #94a3b8;
  letter-spacing: 0.5px;
  font-family: var(--font-body, sans-serif);
}

.mp-nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 4px 6px;
}

.mp-nav-link {
  display: flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 7px 15px;
  font-size: 13px;
  font-weight: 500;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-body, sans-serif);
}

.mp-nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.mp-nav-link.active {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.mp-nav-spacer {
  flex: 1;
}

.mp-nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mp-notif-btn {
  position: relative;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #cbd5e1;
  font-size: 16px;
  transition: all 0.2s;
}

.mp-notif-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.mp-notif-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  border-radius: 50%;
  width: 15px;
  height: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #040918;
}

.mp-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
  cursor: pointer;
}

/* MP Sub-Header Bar */
.mp-sub-header {
  max-width: 1120px;
  width: 100%;
  margin: 28px auto 26px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}

.mp-back-pill {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  color: #f1f5f9;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.mp-back-pill:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
  transform: translateX(-2px);
}

.mp-header-center {
  text-align: center;
}

.mp-header-title {
  font-size: 32px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: var(--font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  letter-spacing: 0.5px;
}

.mp-title-icon {
  font-size: 32px;
  filter: drop-shadow(0 2px 8px rgba(245, 158, 11, 0.4));
}

.mp-title-highlight {
  color: #f59e0b;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.mp-guide-pill {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 24px;
  color: #93c5fd;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
  font-family: var(--font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
}

.mp-guide-pill:hover {
  background: rgba(37, 99, 235, 0.2);
  border-color: #60a5fa;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.mp-guide-icon {
  font-size: 14px;
}

.mp-status-pill {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  color: #f1f5f9;
  padding: 8px 18px;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(8px);
}

.mp-status-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 10px #22c55e, 0 0 4px #22c55e;
  display: inline-block;
}

/* MP Setup Grid */
.mp-setup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
  box-sizing: border-box;
  align-items: stretch;
}

@media (max-width: 900px) {
  .mp-setup-grid {
    grid-template-columns: 1fr;
  }
}

.mp-card {
  background: rgba(12, 20, 39, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  padding: 28px 30px 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
}

.mp-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Card Top Row */
.mp-card-top-row {
  display: flex;
  align-items: center;
  position: relative;
  margin-bottom: 26px;
  height: 64px;
}

.mp-badge-box {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 14px;
}

.mp-badge-gold {
  background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
}

.mp-badge-blue {
  background: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}

.mp-badge-icon {
  font-size: 24px;
}

.mp-badge-gold .mp-badge-icon {
  filter: brightness(0); /* Black rocket on gold badge matching Image 2 */
}

.mp-badge-blue .mp-badge-icon {
  filter: brightness(1); /* White crew on blue badge matching Image 2 */
}

.mp-card-title-text {
  font-size: 21px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  font-family: var(--font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex: 1;
}

.mp-corner-graphic {
  position: absolute;
  right: -8px;
  top: -10px;
  height: 78px;
  display: flex;
  align-items: center;
  pointer-events: none;
}

.mp-rocket-thumb, .mp-iss-thumb {
  height: 100%;
  width: auto;
  object-fit: contain;
  border-radius: 10px;
  opacity: 0.95;
}

.mp-rocket-thumb {
  filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.3));
}

.mp-iss-thumb {
  filter: drop-shadow(0 0 12px rgba(59, 130, 246, 0.3));
}

/* Form Rows */
.mp-form-rows {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 26px;
  flex: 1;
}

.mp-form-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mp-row-label {
  width: 120px;
  flex-shrink: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body, sans-serif);
}

.mp-row-label .row-icon {
  font-size: 16px;
  color: #94a3b8;
}

.mp-row-field {
  flex: 1;
}

.mp-input-styled, .mp-select-styled {
  width: 100%;
  background: rgba(10, 17, 33, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  color: #ffffff;
  padding: 12px 16px;
  font-size: 14px;
  box-sizing: border-box;
  outline: none;
  transition: all 0.2s ease;
  font-family: var(--font-body, sans-serif);
}

.mp-input-styled::placeholder {
  color: #64748b;
}

.mp-code-styled {
  font-family: var(--font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.mp-select-styled {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}

.mp-input-styled:focus, .mp-select-styled:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

/* Action Buttons */
.mp-btn-action {
  width: 100%;
  height: 50px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  letter-spacing: 0.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.mp-btn-gold {
  background: linear-gradient(180deg, #fcd34d 0%, #f59e0b 100%);
  color: #0f172a;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.4);
}

.mp-btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.55);
  filter: brightness(1.05);
}

.mp-btn-gold:active {
  transform: translateY(0);
}

.mp-btn-blue {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.4);
}

.mp-btn-blue:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.55);
  filter: brightness(1.1);
}

.mp-btn-blue:active {
  transform: translateY(0);
}

/* MP Quick Guide Banner in Setup Grid */
.mp-guide-banner {
  grid-column: 1 / -1;
  background: rgba(10, 18, 38, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 24px 28px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  margin-top: 4px;
  margin-bottom: 24px;
}

.mp-guide-banner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
  gap: 12px;
}

.mp-guide-banner-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.guide-badge-icon {
  font-size: 24px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 12px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guide-banner-h3 {
  font-family: var(--font-body, sans-serif);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #ffffff;
  margin: 0;
}

.guide-banner-sub {
  font-size: 12.5px;
  color: #94a3b8;
  margin: 2px 0 0;
  font-family: var(--font-body, sans-serif);
}

.mp-guide-steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 960px) {
  .mp-guide-steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 580px) {
  .mp-guide-steps-grid {
    grid-template-columns: 1fr;
  }
}

.mp-guide-step {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: all 0.2s ease;
}

.mp-guide-step:hover {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-2px);
}

.step-num {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

.step-content {
  flex: 1;
}

.step-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 4px;
  font-family: var(--font-body, sans-serif);
}

.step-desc {
  font-size: 12px;
  line-height: 1.45;
  color: #94a3b8;
  font-family: var(--font-body, sans-serif);
}

/* Modal Guide specific accents */
.mp-guide-modal-card {
  max-width: 920px;
}

.role-text-gold {
  color: #fbbf24;
}

.role-text-blue {
  color: #60a5fa;
}

.role-text-cyan {
  color: #38bdf8;
}

.role-text-purple {
  color: #c084fc;
}

.kbd-pill {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 2px 7px;
  font-family: monospace;
  font-size: 11.5px;
  color: #e2e8f0;
}

/* MP Lobby Container */
.mp-lobby-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1220px;
  margin: 0 auto;
  width: 100%;
}

.mp-lobby-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: rgba(8, 14, 28, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-cyan);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.mp-lobby-code-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.mp-lobby-label {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}

.mp-code-pill {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 3px;
  color: #fff;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.25), rgba(124, 77, 255, 0.4));
  border: 1px solid var(--accent-cyan);
  padding: 4px 16px;
  border-radius: var(--radius-sm);
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.8);
}

.mp-toast-badge {
  background: rgba(0, 230, 118, 0.2);
  border: 1px solid var(--accent-green);
  color: var(--accent-green);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.mp-lobby-meta-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mp-meta-tag {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
}

/* 4 Roles Grid */
.mp-roles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

@media (max-width: 1080px) {
  .mp-roles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .mp-roles-grid {
    grid-template-columns: 1fr;
  }
}

.mp-role-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.25s ease;
  position: relative;
}

.mp-role-card:hover {
  border-color: rgba(0, 229, 255, 0.4);
  transform: translateY(-2px);
}

.mp-role-card.claimed {
  border-color: var(--accent-cyan);
  background: rgba(0, 229, 255, 0.04);
}

.mp-role-card.is-you {
  border-color: #7c4dff;
  box-shadow: 0 0 20px rgba(124, 77, 255, 0.25);
}

.role-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.role-badge {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
  line-height: 1.2;
}

.role-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
  flex: 1;
}

.role-occupant {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
}

.occupant-status.empty {
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
}

.occupant-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
}

.occupant-badge-you {
  background: #7c4dff;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.occupant-ready-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-green);
  display: flex;
  align-items: center;
  gap: 4px;
}

.occupant-ready-tag.waiting {
  color: #ff9100;
}

.btn-claim-role {
  width: 100%;
}

/* Comms Intercom Chat Panel */
.mp-comms-panel {
  background: rgba(8, 14, 28, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comms-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--accent-cyan);
}

.mp-chat-messages {
  height: 140px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-mono, monospace);
  font-size: 12px;
}

.chat-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}

.chat-time {
  color: var(--text-muted);
  font-size: 10px;
  white-space: nowrap;
}

.chat-sender {
  font-weight: 700;
  color: var(--accent-cyan);
  white-space: nowrap;
}

.chat-sender.system {
  color: #ffd600;
}

.chat-sender.flight_director {
  color: #ff5252;
}

.chat-sender.systems_engineer {
  color: #00e5ff;
}

.chat-sender.science_officer {
  color: #00e676;
}

.chat-sender.comms_officer {
  color: #b388ff;
}

.chat-text {
  color: var(--text-main);
  word-break: break-word;
}

.mp-quick-callouts {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.callouts-label {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.btn-callout {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-callout:hover {
  background: rgba(0, 229, 255, 0.15);
  border-color: var(--accent-cyan);
  color: #fff;
}

.mp-chat-form {
  display: flex;
  gap: 10px;
}

.mp-chat-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 8px 12px;
  font-size: 13px;
  outline: none;
}

.mp-chat-input:focus {
  border-color: var(--accent-cyan);
}

.mp-lobby-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.mp-footer-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* In-Flight Multiplayer HUD Overlay */
.flight-multiplayer-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: rgba(8, 14, 28, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  width: 100%;
  margin-bottom: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.mp-hud-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mp-hud-room-tag {
  font-family: var(--font-heading);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.mp-hud-room-tag strong {
  color: var(--accent-cyan);
  letter-spacing: 2px;
}

.mp-hud-crew-chips {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud-crew-chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 4px;
}

.hud-crew-chip.you {
  border-color: #7c4dff;
  background: rgba(124, 77, 255, 0.2);
}

.mp-hud-center {
  flex: 1;
  text-align: center;
}

.mp-hud-ticker {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent-green);
  transition: all 0.3s ease;
}

.mp-hud-ticker.flash {
  color: #ffd600;
  text-shadow: 0 0 10px #ffd600;
}

.btn-comms-toggle {
  background: rgba(0, 229, 255, 0.15);
  border: 1px solid var(--accent-cyan);
  color: #fff;
  font-weight: 700;
}

/* Flight Comms Slide-Out Drawer */
.flight-comms-drawer {
  position: absolute;
  right: 16px;
  bottom: 80px;
  width: 340px;
  height: 280px;
  background: rgba(8, 14, 28, 0.95);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-cyan);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  z-index: 90;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(0, 229, 255, 0.1);
  border-bottom: 1px solid rgba(0, 229, 255, 0.2);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-cyan);
}

.btn-close-drawer {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
}

.drawer-messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
}

.drawer-input-row {
  display: flex;
  padding: 8px;
  gap: 6px;
  border-top: 1px solid var(--border-subtle);
}

.drawer-input-row input {
  flex: 1;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: #fff;
  padding: 6px 10px;
  font-size: 12px;
  outline: none;
}

.drawer-input-row button {
  background: var(--accent-cyan);
  border: none;
  color: #000;
  padding: 6px 12px;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
}

/* Real-Time Live Room Join/Leave Toast Alert */
.mp-live-alert-banner {
  width: 100%;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
  animation: alertSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.mp-live-alert-banner.alert-leave {
  background: rgba(255, 23, 68, 0.18);
  border: 1px solid #ff1744;
  color: #ff5252;
  text-shadow: 0 0 10px rgba(255, 23, 68, 0.6);
}

.mp-live-alert-banner.alert-join {
  background: rgba(0, 230, 118, 0.18);
  border: 1px solid var(--accent-green);
  color: var(--accent-green);
  text-shadow: 0 0 10px rgba(0, 230, 118, 0.6);
}

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

@keyframes vacateFlash {
  0%, 100% {
    border-color: rgba(255, 23, 68, 0.95);
    box-shadow: 0 0 24px rgba(255, 23, 68, 0.75);
    transform: translateY(-2px);
  }
  50% {
    border-color: rgba(255, 145, 0, 0.95);
    box-shadow: 0 0 14px rgba(255, 145, 0, 0.55);
    transform: translateY(0);
  }
}

.role-vacated-flash {
  animation: vacateFlash 0.5s ease-in-out 4 !important;
}

/* ==========================================================================
   NASA APP CHALLENGE: PORTAL & OPERATIONS HUB UI (MATCHING DESIGN REFERENCE)
   ========================================================================== */

.challenge-portal-screen {
  max-width: 1360px;
  margin: 0 auto;
  padding: 16px 24px 40px 24px;
  position: relative;
}

/* 1. TOP NAVBAR */
.portal-navbar {
  position: sticky;
  top: 14px;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px;
  background: rgba(10, 18, 38, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: var(--radius-full);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.5), 0 0 24px rgba(14, 165, 233, 0.15);
  margin-bottom: 24px;
  transition: all 0.25s ease;
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.nasa-meatball-container {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.nasa-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.portal-brand-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.15);
}

.portal-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.portal-brand-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 1.5px;
}

.portal-brand-sub {
  font-size: 11px;
  font-weight: 500;
  color: #94a3b8;
}

/* Center Pill Nav */
.portal-nav-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: rgba(14, 24, 52, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.22s ease;
  user-select: none;
}

.nav-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-tab.active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(37, 99, 235, 0.5);
}

.tab-icon {
  font-size: 14px;
}

.coop-live-tag {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  background: #10b981;
  color: #ffffff;
  letter-spacing: 0.5px;
  animation: pulseLive 2s infinite ease-in-out;
}

@keyframes pulseLive {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.75; transform: scale(1.08); }
}

/* Right Nav Controls */
.portal-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.portal-action-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(14, 24, 52, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.portal-action-btn:hover {
  background: rgba(30, 48, 96, 0.9);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-1px);
}

.notification-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  background: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 8px #ef4444;
}

.portal-user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  border: 2px solid rgba(96, 165, 250, 0.6);
  color: #ffffff;
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

.portal-user-avatar:hover {
  transform: scale(1.06);
  border-color: #60a5fa;
  box-shadow: 0 0 18px rgba(59, 130, 246, 0.6);
}

/* 2. HERO SECTION */
.portal-hero-container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 32px;
  padding: 24px 12px 32px 12px;
}

.hero-main-title {
  font-family: var(--font-body);
  font-size: 46px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.8px;
  line-height: 1.1;
  margin-bottom: 6px;
}

.hero-gradient-sub {
  font-family: var(--font-body);
  font-size: 30px;
  font-weight: 800;
  background: linear-gradient(90deg, #38bdf8 0%, #60a5fa 50%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 14px;
}

.hero-description {
  font-size: 15px;
  color: #94a3b8;
  line-height: 1.6;
  max-width: 520px;
  margin-bottom: 26px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-hero-primary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 22px rgba(37, 99, 235, 0.45);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.65);
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.hero-play-icon {
  font-size: 12px;
  color: #93c5fd;
}

.hero-btn-arrow {
  font-size: 18px;
  font-weight: 800;
  margin-left: 2px;
}

.btn-hero-coop {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-hero-coop:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(124, 58, 237, 0.65);
}

.btn-hero-secondary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-full);
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.25s ease;
}

.btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

/* Photorealistic 3D Earth Visual Card */
.portal-hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.earth-visual-card {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 280px;
  border-radius: 24px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, rgba(14, 165, 233, 0.18) 0%, rgba(3, 7, 18, 0.9) 75%);
  border: 1px solid rgba(56, 189, 248, 0.32);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65), 0 0 35px rgba(14, 165, 233, 0.22);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero-earth-canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  cursor: grab;
}

.hero-earth-canvas:active {
  cursor: grabbing;
}

.earth-hud-overlay {
  position: absolute;
  top: 14px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 5;
}

.earth-hud-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(8, 14, 30, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 700;
  color: #e2e8f0;
  letter-spacing: 0.5px;
  backdrop-filter: blur(8px);
}

.hud-pulse-dot {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 6px #10b981;
  animation: pulseLive 1.5s infinite;
}

.earth-drag-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 14px;
  background: rgba(8, 14, 30, 0.78);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-full);
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
  pointer-events: none;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  z-index: 5;
}

.astronaut-glow-halo {
  position: absolute;
  top: 10%;
  right: 10%;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

/* 3. MAIN WORKSPACE GRID */
.portal-main-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

/* Challenges Section */
.challenges-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.challenges-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rocket-emoji {
  font-size: 20px;
}

.challenges-title {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
}

.btn-view-all {
  border: none;
  background: transparent;
  color: #38bdf8;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-view-all:hover {
  color: #7dd3fc;
  text-decoration: underline;
}

/* 6 Challenge Cards Grid */
.challenge-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.challenge-card {
  position: relative;
  background: rgba(11, 20, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  overflow: hidden;
  display: block;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.challenge-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
}

.card-full-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 17px;
  transition: transform 0.35s ease;
  pointer-events: none;
}

.challenge-card:hover .card-full-img {
  transform: scale(1.02);
}

.card-overlay-btn {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 90px;
  height: 38px;
  opacity: 0;
  cursor: pointer;
  border: none;
  background: transparent;
  z-index: 5;
}

/* Specific Card Hover Glow Themes */
.card-sentinel:hover {
  border-color: rgba(14, 165, 233, 0.6);
  box-shadow: 0 14px 34px rgba(14, 165, 233, 0.3);
}
.card-stormwatch:hover {
  border-color: rgba(168, 85, 247, 0.6);
  box-shadow: 0 14px 34px rgba(168, 85, 247, 0.3);
}
.card-artemis:hover {
  border-color: rgba(249, 115, 22, 0.6);
  box-shadow: 0 14px 34px rgba(249, 115, 22, 0.3);
}
.card-mars:hover {
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 14px 34px rgba(239, 68, 68, 0.3);
}
.card-asteroid:hover {
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 0 14px 34px rgba(16, 185, 129, 0.3);
}
.card-deepview:hover {
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 14px 34px rgba(99, 102, 241, 0.3);
}

/* 4. SIDEBAR (YOUR PROGRESS & QUICK LINKS) */
.portal-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-box {
  background: rgba(11, 20, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 20px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.sidebar-box-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

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

.box-title {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
}

/* Circular Gauge */
.progress-gauge-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-ring-svg {
  transform: rotate(-90deg);
  width: 140px;
  height: 140px;
}

.ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 9;
}

.ring-progress {
  fill: none;
  stroke: #38bdf8;
  stroke-width: 9;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.5));
}

.progress-gauge-inner {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.progress-percent {
  font-size: 26px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
}

.progress-subtext {
  font-size: 10.5px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 4px;
}

/* Sidebar Stats */
.sidebar-stats-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
}

.stat-glyph {
  font-size: 16px;
}

.stat-detail {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.stat-val {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
}

.stat-name {
  font-size: 12px;
  color: #94a3b8;
}

/* Quick Links Items */
.quick-links-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  color: #e2e8f0;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.link-item:hover {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  transform: translateX(2px);
}

.link-icon {
  margin-right: 8px;
}

.link-text {
  flex-grow: 1;
  text-align: left;
}

.link-chev {
  color: #64748b;
  font-size: 14px;
}

.link-item:hover .link-chev {
  color: #38bdf8;
}

/* 5. FOOTER */
.portal-footer {
  position: relative;
  padding: 48px 0 16px 0;
  text-align: center;
  margin-top: auto;
}

.footer-horizon-glow {
  position: absolute;
  bottom: 0;
  left: 5%;
  right: 5%;
  height: 50px;
  background: radial-gradient(ellipse at bottom, rgba(56, 189, 248, 0.35) 0%, rgba(56, 189, 248, 0) 70%);
  pointer-events: none;
}

.footer-text {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 3px;
  user-select: none;
}

/* 6. MODALS FOR HUB */
.modal-hub-card {
  max-width: 640px !important;
  width: 90% !important;
  background: rgba(10, 16, 32, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  border-radius: 20px !important;
}

.modal-hub-body {
  padding: 16px 20px 24px 20px;
}

.leaderboard-table-wrap {
  overflow-x: auto;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.leaderboard-table th {
  text-align: left;
  padding: 10px 12px;
  color: #94a3b8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 600;
}

.leaderboard-table td {
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
}

.rank-gold td:first-child { color: #fbbf24; font-weight: 800; }
.rank-silver td:first-child { color: #cbd5e1; font-weight: 800; }
.rank-bronze td:first-child { color: #d97706; font-weight: 800; }

.badge-status-nominal {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10b981;
}

/* Profile Dossier */
.profile-dossier-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-hero-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
}

.profile-avatar-large {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  border: 3px solid rgba(96, 165, 250, 0.7);
  color: #ffffff;
  font-size: 26px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 24px rgba(59, 130, 246, 0.5);
}

.profile-callsign {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
}

.profile-rank-tag {
  font-size: 11px;
  color: #38bdf8;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.profile-metrics-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.profile-metric-box {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-label {
  font-size: 11px;
  color: #94a3b8;
}

.metric-val {
  font-size: 16px;
  font-weight: 800;
}

/* Notifications Feed */
.notifications-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notification-feed-item {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.notification-feed-item.unread {
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.04);
}

.notif-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  align-self: flex-start;
}

.notif-badge.green { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.notif-badge.blue { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }

.notif-text-wrap strong {
  font-size: 13px;
  color: #ffffff;
  display: block;
  margin-bottom: 2px;
}

.notif-text-wrap p {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.4;
  margin-bottom: 4px;
}

/* About Highlights Grid */
.about-text-content p {
  font-size: 13.5px;
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 18px;
}

.about-highlights-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.highlight-card {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
}

.hl-icon {
  font-size: 18px;
  margin-right: 6px;
}

.highlight-card strong {
  color: #38bdf8;
  font-size: 13px;
}

.highlight-card p {
  font-size: 12px;
  color: #94a3b8;
  margin: 4px 0 0 0;
  line-height: 1.4;
}

/* CHALLENGE MISSION BRIEFING & OPERATIONS MODAL (NEW HORIZONTAL COCKPIT DESIGN) */
.modal-brief-card {
  max-width: 960px !important;
  width: 94% !important;
  background: rgba(10, 16, 32, 0.92) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  border-radius: 22px !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  padding: 24px 28px !important;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

/* Header */
.brief-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  position: relative;
}

.brief-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brief-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.brief-icon {
  font-size: 28px;
}

.brief-header-text {
  display: flex;
  flex-direction: column;
}

.brief-category-badge {
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 4px;
  font-family: var(--font-body, sans-serif);
}

.brief-mission-title {
  font-size: 23px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  letter-spacing: 0.3px;
  font-family: var(--font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
}

.brief-title-bar {
  display: none !important;
}

.brief-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brief-spacecraft-wrap {
  width: 150px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brief-spacecraft-img {
  max-width: 150px;
  max-height: 70px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(56, 189, 248, 0.25));
}

/* Row 1: Meta Pills */
.brief-meta-row {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.brief-meta-pill {
  background: rgba(12, 22, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
}

.meta-pill-icon {
  font-size: 20px;
  color: #94a3b8;
  flex-shrink: 0;
}

.meta-pill-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
}

.meta-pill-label {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
  font-family: var(--font-body, sans-serif);
}

.meta-pill-val {
  font-size: 13.5px;
  color: #f8fafc;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-body, sans-serif);
}

/* Gold Pill for Difficulty */
.brief-diff-pill {
  background: rgba(30, 24, 12, 0.65);
  border: 1px solid rgba(245, 158, 11, 0.45);
  box-shadow: inset 0 0 16px rgba(245, 158, 11, 0.08);
}

.meta-pill-stars {
  font-size: 18px;
  color: #fbbf24;
  flex-shrink: 0;
  letter-spacing: 2px;
}

.brief-diff-pill .meta-pill-label {
  color: #d97706;
}

.brief-diff-pill .meta-pill-val {
  color: #fef3c7;
  font-weight: 700;
}

/* Row 2: Main Grid (Left Objectives & Right Artwork) */
.brief-main-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 16px;
  margin-bottom: 20px;
  align-items: stretch;
}

.brief-objectives-box {
  background: rgba(10, 18, 36, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
}

.brief-box-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.brief-box-icon {
  font-size: 16px;
  color: #38bdf8;
}

.brief-box-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.3px;
  font-family: var(--font-body, sans-serif);
}

.brief-bullets-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.brief-bullet-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  line-height: 1.45;
  color: #cbd5e1;
  font-family: var(--font-body, sans-serif);
}

.brief-bullet-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0284c7;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
}

.bullet-verb {
  font-weight: 700;
  color: #ffffff;
}

.bullet-desc {
  color: #94a3b8;
}

/* Right Art Box */
.brief-art-box {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  display: flex;
}

.brief-art-photo {
  width: 100%;
  height: 100%;
  min-height: 165px;
  max-height: 195px;
  object-fit: cover;
  display: block;
}

/* Row 3: Key Scientific Milestones */
.brief-milestones-section {
  margin-bottom: 22px;
}

.brief-milestones-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.milestones-icon {
  font-size: 16px;
  color: #38bdf8;
}

.milestones-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.3px;
  font-family: var(--font-body, sans-serif);
}

.milestones-line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.brief-milestones-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.brief-milestone-card {
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.brief-milestone-card:hover {
  transform: translateY(-2px);
}

/* Theme Blue */
.brief-milestone-card.theme-blue {
  background: rgba(14, 28, 56, 0.65);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.brief-milestone-card.theme-blue .milestone-icon-wrap {
  color: #60a5fa;
}

/* Theme Green */
.brief-milestone-card.theme-green {
  background: rgba(12, 36, 28, 0.65);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.brief-milestone-card.theme-green .milestone-icon-wrap {
  color: #4ade80;
}

/* Theme Purple */
.brief-milestone-card.theme-purple {
  background: rgba(32, 20, 52, 0.65);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.brief-milestone-card.theme-purple .milestone-icon-wrap {
  color: #c084fc;
}

.milestone-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.milestone-icon-wrap {
  font-size: 20px;
  flex-shrink: 0;
}

.milestone-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  font-family: var(--font-body, sans-serif);
}

.milestone-tags-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.milestone-tag-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 3px 9px;
  font-size: 10.5px;
  color: #cbd5e1;
  font-weight: 500;
  white-space: nowrap;
  font-family: var(--font-body, sans-serif);
}

/* Row 4: Action Buttons */
.brief-footer-actions {
  display: flex;
  width: 100%;
}

.brief-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 13px 20px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.22s ease;
  font-family: var(--font-body, sans-serif);
  box-sizing: border-box;
  width: 100%;
}

.brief-btn .btn-arrow {
  font-size: 16px;
  transition: transform 0.2s ease;
}

.brief-btn:hover .btn-arrow {
  transform: translateX(3px);
}

.brief-btn-launch {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.45);
}

.brief-btn-launch:hover {
  background: linear-gradient(135deg, #0369a1 0%, #1d4ed8 100%);
  box-shadow: 0 6px 26px rgba(37, 99, 235, 0.65);
  transform: translateY(-2px);
}

.brief-btn-studio {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.45);
}

.brief-btn-studio:hover {
  background: linear-gradient(135deg, #0369a1 0%, #1d4ed8 100%);
  box-shadow: 0 6px 26px rgba(37, 99, 235, 0.65);
  transform: translateY(-2px);
}

@media (max-width: 820px) {
  .brief-main-grid {
    grid-template-columns: 1fr;
  }
  .brief-milestones-grid {
    grid-template-columns: 1fr;
  }
  .brief-meta-row {
    grid-template-columns: 1fr;
  }
  .brief-spacecraft-wrap {
    display: none;
  }
}

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 1100px) {
  .portal-main-grid {
    grid-template-columns: 1fr;
  }
  .portal-hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-cta-group {
    justify-content: center;
  }
  .challenge-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .portal-navbar {
    flex-wrap: wrap;
    border-radius: 18px;
    padding: 12px;
  }
  .portal-nav-pill {
    order: 3;
    width: 100%;
    justify-content: space-around;
    margin-top: 8px;
  }
  .nav-tab {
    padding: 6px 10px;
    font-size: 12px;
  }
  .hero-main-title {
    font-size: 34px;
  }
  .hero-gradient-sub {
    font-size: 24px;
  }
  .challenge-cards-grid {
    grid-template-columns: 1fr;
  }
}

