:root {
  /* ===== Base Colors ===== */
  --bg: #0b0f1a;
  --bg-deep: #05070d;
  --panel: #121826;
  --panel-rgb: 18, 24, 38;
  --accent: #6ee7ff;
  --accent-2: #a78bfa;
  --good: #34d399;
  --warn: #f59e0b;
  --bad: #ef4444;
  --muted: #9aa4b2;
  --text: #e5e7eb;
  
  /* ===== Extended Color Palette ===== */
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;
  --blue-900: #1e3a8a;
  
  --red-500: #ef4444;
  --red-600: #dc2626;
  --red-700: #b91c1c;
  --red-800: #991b1b;
  --red-900: #7f1d1d;
  
  --green-500: #34d399;
  --green-600: #059669;
  --green-700: #047857;
  
  --yellow-400: #fbbf24;
  --yellow-500: #f59e0b;
  --yellow-600: #d97706;
  
  --purple-400: #a78bfa;
  --purple-500: #8b5cf6;
  --purple-600: #7c3aed;
  
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* ===== Button Gradients ===== */
  --btn-primary: linear-gradient(180deg, #1f2a44, #162035);
  --btn-primary-hover: linear-gradient(180deg, #2a3a5a, #1f2a44);
  --btn-blue: linear-gradient(180deg, #3b82f6, #1d4ed8);
  --btn-blue-hover: linear-gradient(180deg, #60a5fa, #3b82f6);
  --btn-red: linear-gradient(180deg, #dc2626, #b91c1c);
  --btn-red-hover: linear-gradient(180deg, #ef4444, #dc2626);
  --btn-green: linear-gradient(180deg, #34d399, #059669);
  --btn-yellow: linear-gradient(180deg, #f59e0b, #d97706);
  --btn-yellow-hover: linear-gradient(180deg, #fbbf24, #f59e0b);
  --btn-cyan: linear-gradient(180deg, #6ee7ff, #0ea5e9);
  --btn-cyan-hover: linear-gradient(180deg, #93c5fd, #6ee7ff);
  
  /* ===== System Type Colors ===== */
  --system-home: #34d399;
  --system-ridge: #f59e0b;
  --system-nebula: #a78bfa;
  --system-cluster: #ef4444;
  --system-void: #6b7280;
  --system-binary: #ec4899;
--system-undiscovered: #4b5563;
  
  /* ===== UI Element Colors ===== */
  --btn-text: #e9f6ff;
  --kbd-bg: #0f172a;
  --kbd-text: #dbeafe;
  --selection-bg: rgba(52, 211, 153, 0.2);
  --selection-border: rgba(52, 211, 153, 0.3);
  
  /* ===== Opacity Values ===== */
  --opacity-05: 0.05;
  --opacity-08: 0.08;
  --opacity-1: 0.1;
  --opacity-12: 0.12;
  --opacity-15: 0.15;
  --opacity-2: 0.2;
  --opacity-25: 0.25;
  --opacity-3: 0.3;
  --opacity-4: 0.4;
  --opacity-5: 0.5;
  --opacity-6: 0.6;
  --opacity-65: 0.65;
  --opacity-7: 0.7;
  --opacity-8: 0.8;
  --opacity-85: 0.85;
  --opacity-9: 0.9;
  --opacity-95: 0.95;
  
  /* ===== Spacing ===== */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  
  /* ===== Border Radius ===== */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;
  --radius-2xl: 14px;
  --radius-full: 999px;
  
  /* ===== Shadows ===== */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
  --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.25);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-modal: 0 30px 60px rgba(0, 0, 0, 0.5);
  --shadow-warning: 0 8px 25px rgba(245, 158, 11, 0.3);
  --shadow-danger: 0 8px 25px rgba(220, 38, 38, 0.4);
  
  /* ===== Blur Effects ===== */
  --blur-sm: 4px;
  --blur-md: 8px;
  --blur-lg: 12px;
  --blur-xl: 16px;
  
  /* ===== Z-Index Scale ===== */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  
  /* ===== Typography ===== */
  --font-size-xs: 11px;
  --font-size-sm: 12px;
  --font-size-base: 14px;
  --font-size-lg: 16px;
  --font-size-xl: 18px;
  --font-size-2xl: 24px;
  
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  /* ===== Transitions ===== */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.2s ease;
  --transition-slow: 0.3s ease;
  
  /* ===== Resource Colors ===== */
  --resource-ferrite: #8B7355;
  --resource-carbonite: #8B4513;
  --resource-silicite: #B87333;
  --resource-cobaltite: #4169E1;
  --resource-titanium: #C0C0C0;
  --resource-lithium: #32CD32;
}

/* ===== THEME DEFINITIONS ===== */
/* Dark Space Theme (Default) - Also applied to body without class */
body, .theme-dark {
  --bg: #0b0f1a;
  --bg-deep: #05070d;
  --panel: #121826;
  --panel-rgb: 18, 24, 38;
  --accent: #6ee7ff;
  --accent-2: #a78bfa;
  --good: #34d399;
  --warn: #f59e0b;
  --bad: #ef4444;
  --muted: #9aa4b2;
  --text: #e5e7eb;
}

/* Light Space Theme */
.theme-light {
  --bg: #f8fafc;
  --bg-deep: #e2e8f0;
  --panel: #ffffff;
  --panel-rgb: 255, 255, 255;
  --accent: #0ea5e9;
  --accent-2: #7c3aed;
  --good: #059669;
  --warn: #d97706;
  --bad: #dc2626;
  --muted: #64748b;
  --text: #0f172a;
  
  /* Override shadows for light theme */
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.1);
  --shadow-modal: 0 30px 60px rgba(0, 0, 0, 0.2);
  --shadow-warning: 0 8px 25px rgba(245, 158, 11, 0.2);
  --shadow-danger: 0 8px 25px rgba(220, 38, 38, 0.3);
}

/* Retro/8-Bit Theme */
.theme-retro {
  --bg: #000000;
  --bg-deep: #000000;
  --panel: #00ff00;
  --panel-rgb: 0, 255, 0;
  --accent: #ffff00;
  --accent-2: #ff00ff;
  --good: #00ff00;
  --warn: #ff8000;
  --bad: #ff0000;
  --muted: #808080;
  --text: #ffffff;
  
  /* Retro-specific overrides */
  --radius-sm: 0px;
  --radius-md: 0px;
  --radius-lg: 0px;
  --radius-xl: 0px;
  --radius-2xl: 0px;
  --shadow-card: none;
  --shadow-modal: none;
  --shadow-warning: none;
  --shadow-danger: none;
  --blur-md: 0px;
}

/* Futuristic Neon Theme */
.theme-futuristic {
  --bg: #0a0a0a;
  --bg-deep: #000000;
  --panel: #1a1a1a;
  --panel-rgb: 26, 26, 26;
  --accent: #00ffff;
  --accent-2: #ff00ff;
  --good: #00ff00;
  --warn: #ffff00;
  --bad: #ff0080;
  --muted: #808080;
  --text: #ffffff;
  
  /* Neon effects */
  --shadow-card: 0 10px 30px rgba(0, 255, 255, 0.3);
  --shadow-modal: 0 30px 60px rgba(255, 0, 255, 0.4);
  --shadow-warning: 0 8px 25px rgba(255, 255, 0, 0.4);
  --shadow-danger: 0 8px 25px rgba(255, 0, 128, 0.4);
  --blur-md: 12px;
}

/* High Contrast Accessibility Theme */
.theme-high-contrast {
  --bg: #000000;
  --bg-deep: #000000;
  --panel: #ffffff;
  --panel-rgb: 255, 255, 255;
  --accent: #ffff00;
  --accent-2: #00ffff;
  --good: #00ff00;
  --warn: #ff8000;
  --bad: #ff0000;
  --muted: #ffffff;
  --text: #000000;
  
  /* High contrast overrides */
  --shadow-card: none;
  --shadow-modal: none;
  --shadow-warning: none;
  --shadow-danger: none;
  --blur-md: 0px;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--bg); color: var(--text); font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, "Helvetica Neue", Arial; transition: background-color 0.3s ease, color 0.3s ease; }
#game { position: fixed; inset: 0; display: block; background: radial-gradient(ellipse at center, var(--bg) 0%, var(--bg-deep) 70%); }

/* HUD */
.hud { position: fixed; left: var(--space-4); top: var(--space-4); display: grid; gap: var(--space-2); min-width: 250px; }
.card { background: rgba(var(--panel-rgb), 0.85); border: 1px solid rgba(255,255,255,var(--opacity-06)); border-radius: var(--radius-xl); padding: 10px 12px; backdrop-filter: blur(var(--blur-md)); box-shadow: var(--shadow-card); transition: background-color 0.3s ease; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bar { height: 8px; width: 100%; background: rgba(255,255,255,var(--opacity-07)); border-radius: var(--radius-sm); overflow: hidden; }
.fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.stat { font-variant-numeric: tabular-nums; font-weight: 600; }

.topright { position: fixed; right: var(--space-4); top: var(--space-4); display: grid; gap: var(--space-2); min-width: 220px; }

/* Low fuel warning - positioned at top center above HUD */
.low-fuel-warning { 
  position: fixed; 
  left: 50%; 
  transform: translateX(-50%); 
  top: var(--space-4); 
  background: rgba(245, 158, 11, var(--opacity-95)); 
  border: 1px solid rgba(255,255,255,var(--opacity-15)); 
  color: white; 
  padding: var(--space-2) var(--space-4); 
  border-radius: var(--radius-md); 
  font-size: 14px; 
  font-weight: 600;
  box-shadow: var(--shadow-warning);
  z-index: var(--z-dropdown);
  display: none;
  text-align: center;
}

/* Jumping notification - top center during jump animation */
.jumping-notification {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  top: var(--space-4);
  background: rgba(110, 231, 255, 0.95);
  border: 1px solid rgba(110, 231, 255, 0.5);
  color: #0e1322;
  padding: var(--space-2) var(--space-6);
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(110, 231, 255, 0.4);
  z-index: var(--z-dropdown);
  text-align: center;
  letter-spacing: 0.05em;
}

.low-fuel-warning.out-of-fuel {
  background: rgba(220, 38, 38, 0.95);
  box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4);
  border-color: rgba(255, 255, 255, 0.3);
}

.emergency-haul-btn {
  background: var(--btn-blue);
  border: 1px solid rgba(255, 255, 255, var(--opacity-2));
  color: white;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  margin-top: var(--space-2);
  transition: all 0.2s ease;
}

.emergency-haul-btn:hover {
  background: var(--btn-blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, var(--opacity-4));
}

.emergency-haul-btn:active {
  transform: translateY(0);
}

.emergency-haul-btn.debt-warning {
  background: linear-gradient(180deg, var(--blue-700), var(--blue-800));
  border-color: rgba(255, 255, 255, var(--opacity-4));
  animation: pulse-warning 2s infinite;
}

.emergency-haul-btn.debt-warning:hover {
  background: var(--btn-blue);
  animation: none;
}

@keyframes pulse-warning {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(59, 130, 246, var(--opacity-4));
  }
  50% {
    box-shadow: 0 4px 20px rgba(59, 130, 246, var(--opacity-6));
  }
}

/* Emergency Options Modal */
.emergency-options-modal {
  width: min(600px, 90vw);
}

.emergency-options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.emergency-option {
  border-left: 4px solid transparent;
  transition: all 0.2s ease;
}

.emergency-option:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.emergency-option .emergency-haul-action {
  background: var(--btn-red);
  border-color: rgba(255, 255, 255, var(--opacity-2));
}

.emergency-option .emergency-haul-action:hover {
  background: var(--btn-red-hover);
}

.emergency-option .emergency-haul-action.debt-warning {
  background: linear-gradient(180deg, var(--red-800), var(--red-900));
  border-color: rgba(255, 255, 255, var(--opacity-4));
  animation: pulse-warning 2s infinite;
}

.emergency-option .emergency-haul-action.debt-warning:hover {
  background: linear-gradient(180deg, var(--red-700), var(--red-800));
  animation: none;
}

.emergency-option .reset-game-action {
  background: var(--btn-yellow);
  border-color: rgba(255, 255, 255, var(--opacity-2));
}

.emergency-option .reset-game-action:hover {
  background: var(--btn-yellow-hover);
}

.emergency-option .load-save-action {
  background: var(--btn-cyan);
  border-color: rgba(255, 255, 255, var(--opacity-2));
}

.emergency-option .load-save-action:hover {
  background: var(--btn-cyan-hover);
}

/* Reset Confirmation Modal */
.reset-confirmation-modal {
  width: min(500px, 90vw);
}

.reset-confirmation-content {
  text-align: center;
}

.reset-confirmation-content .card {
  border-left: 4px solid var(--bad);
}

.reset-confirmation-content .btn.danger {
  background: var(--btn-red);
  border-color: rgba(255, 255, 255, var(--opacity-2));
  color: var(--btn-text);
}

.reset-confirmation-content .btn.danger:hover {
  background: var(--btn-red-hover);
}

.prompt { position: fixed; left: 50%; transform: translateX(-50%); bottom: var(--space-5); background: rgba(var(--panel-rgb),var(--opacity-9)); border: 1px solid rgba(255,255,255,var(--opacity-08)); color: var(--text); padding: var(--space-2) 14px; border-radius: var(--radius-full); font-size: 14px; box-shadow: var(--shadow-card); }

/* Station / Modal */
dialog { padding: 0; overflow: hidden; color: var(--text); }
/* Manual backdrop - removed dialog::backdrop for better control */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 5, 10, 0.65);
  z-index: var(--z-modal-backdrop);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop.tutorial-active {
  pointer-events: none;
}

.modal { 
  width: min(700px, 92vw); 
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: var(--z-modal);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-modal);
}
.modal header { display:flex; align-items:center; justify-content:space-between; padding:14px var(--space-4); border-bottom: 1px solid rgba(255,255,255,var(--opacity-08)); }
.modal main { padding: var(--space-4); display: grid; gap: var(--space-4); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--space-3); }
.btn { background: var(--btn-primary); border: 1px solid rgba(255,255,255,var(--opacity-12)); color: var(--btn-text); padding: 10px 12px; border-radius: var(--radius-lg); cursor: pointer; font-weight: 600; }
.btn:hover { filter: brightness(1.06); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.pill { display:inline-flex; gap:var(--space-2); align-items:center; padding:6px 10px; border-radius:var(--radius-full); border:1px solid rgba(255,255,255,var(--opacity-1)); background: rgba(255,255,255,var(--opacity-04)); font-size:12px; color: var(--muted); }
.money { color: var(--good); font-weight:700; }
.danger { color: var(--bad); }

/* Settings Modal Styles */
.settings-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 8px;
}

/* Tutorial Modal Styles */
.tutorial-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 5, 10, 0.8);
  backdrop-filter: blur(8px);
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, backdrop-filter 0.3s ease, transform 0.3s ease;
  pointer-events: auto;
}

/* Tutorial modal without backdrop (for corner positioning) */
.tutorial-modal.no-backdrop {
  background: transparent;
  backdrop-filter: none;
  pointer-events: none;
}

.tutorial-modal.no-backdrop .tutorial-content {
  pointer-events: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(110, 231, 255, 0.3);
  background: linear-gradient(135deg, var(--panel), rgba(18, 24, 38, 0.95));
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.tutorial-modal.no-backdrop .tutorial-content:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  border-color: rgba(110, 231, 255, 0.5);
}

.tutorial-content {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-modal);
  max-width: 500px;
  width: 90vw;
  max-height: 80vh;
  overflow: hidden;
  animation: tutorialSlideIn 0.3s ease-out;
  position: relative;
  z-index: 20001;
  pointer-events: auto;
}

.tutorial-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tutorial-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  font-weight: 600;
}

.tutorial-body {
  padding: 20px;
  color: var(--text);
  line-height: 1.6;
  flex: 1;
  overflow-y: auto;
}

.tutorial-text-image-container {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.tutorial-text {
  flex: 1;
  min-width: 0;
}

.tutorial-image-container {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid rgba(110, 231, 255, 0.2);
  background: rgba(18, 24, 38, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tutorial-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.tutorial-footer {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  align-items: center;
}

/* Mobile responsiveness improvements */
@media (max-width: 768px) {
  .tutorial-content {
    width: 95vw;
    max-height: 90vh;
    margin: 10px;
  }
  
  .tutorial-header h2 {
    font-size: 20px;
  }
  
  .tutorial-body {
    padding: 16px;
    font-size: 14px;
  }
  
  .tutorial-text-image-container {
    flex-direction: column;
    gap: 16px;
    align-items: center;
  }
  
  .tutorial-image-container {
    width: 100px;
    height: 100px;
  }
  
  .tutorial-footer {
    padding: 16px;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }
  
  .tutorial-footer .btn {
    width: 100%;
    min-width: auto;
  }
  
  /* Ensure buttons don't get too wide on mobile */
  .tutorial-footer .btn.tutorial-skip,
  .tutorial-footer .btn.tutorial-next,
  .tutorial-footer .btn.tutorial-complete {
    min-width: auto;
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
  }
  
  /* Improve mobile button shadows */
  .tutorial-next {
    box-shadow: 0 4px 15px rgba(110, 231, 255, 0.3) !important;
  }
  
  .tutorial-next:hover {
    box-shadow: 0 6px 20px rgba(110, 231, 255, 0.4) !important;
  }
  
  .tutorial-complete {
    box-shadow: 0 4px 15px rgba(52, 211, 153, 0.3) !important;
  }
  
  .tutorial-complete:hover {
    box-shadow: 0 6px 20px rgba(52, 211, 153, 0.4) !important;
  }
}

/* Small mobile devices */
@media (max-width: 480px) {
  .tutorial-content {
    width: 98vw;
    margin: 5px;
  }
  
  .tutorial-header {
    padding: 16px 20px;
  }
  
  .tutorial-header h2 {
    font-size: 18px;
  }
  
  .tutorial-body {
    padding: 16px 20px;
    font-size: 14px;
  }
  
  .tutorial-text-image-container {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }
  
  .tutorial-image-container {
    width: 80px;
    height: 80px;
  }
  
  .tutorial-footer {
    padding: 16px 20px;
  }
  
  .tutorial-footer .btn.tutorial-skip,
  .tutorial-footer .btn.tutorial-next,
  .tutorial-footer .btn.tutorial-complete {
    padding: 16px 20px;
    font-size: 16px;
    border-radius: var(--radius-md);
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .tutorial-footer .btn {
    border-width: 1px;
  }
  
  .tutorial-skip {
    border-width: 1px !important;
  }
  
  .tutorial-next {
    border-width: 1px !important;
  }
  
  .tutorial-complete {
    border-width: 1px !important;
  }
}

@keyframes tutorialSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.tutorial-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, rgba(110, 231, 255, 0.1), rgba(167, 139, 250, 0.1));
}

.tutorial-header h2 {
  margin: 0;
  color: var(--accent);
  font-size: 24px;
  font-weight: 700;
}

.tutorial-close {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.tutorial-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.tutorial-body {
  padding: 24px;
  line-height: 1.6;
  color: var(--text);
  font-size: 16px;
}

.tutorial-footer {
  display: flex;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
}

/* Tutorial button base styles - override general .btn class */
.tutorial-footer .btn.tutorial-skip,
.tutorial-footer .btn.tutorial-next,
.tutorial-footer .btn.tutorial-complete {
  padding: 12px 20px;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  min-width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  text-transform: none;
  letter-spacing: 0.025em;
  backdrop-filter: blur(4px);
  transform: translateZ(0);
}

/* Subtle hover animation for all tutorial buttons */
.tutorial-footer .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
  z-index: 1;
}

.tutorial-footer .btn:hover::before {
  left: 100%;
}

/* Focus states for accessibility */
.tutorial-footer .btn:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tutorial-footer .btn:focus:not(:focus-visible) {
  outline: none;
}

.tutorial-skip {
  background: transparent !important;
  border: 2px solid var(--muted) !important;
  color: var(--muted) !important;
  backdrop-filter: blur(8px);
}

.tutorial-skip:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: var(--text) !important;
  color: var(--text) !important;
  transform: translateY(-2px) translateZ(0);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.tutorial-skip:active {
  transform: translateY(0) translateZ(0);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.tutorial-next {
  background: var(--btn-cyan) !important;
  border: 2px solid var(--accent) !important;
  color: var(--btn-text) !important;
  box-shadow: 0 6px 20px rgba(110, 231, 255, 0.4);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.tutorial-next:hover {
  background: var(--btn-cyan-hover) !important;
  transform: translateY(-2px) translateZ(0);
  box-shadow: 0 10px 30px rgba(110, 231, 255, 0.5);
}

.tutorial-next:active {
  transform: translateY(0) translateZ(0);
  box-shadow: 0 6px 20px rgba(110, 231, 255, 0.4);
}

.tutorial-next:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}

.continue-text {
  display: inline-block;
  transition: opacity 0.2s ease;
  position: relative;
  z-index: 2;
  font-weight: 600;
}

.continue-countdown {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  border-radius: inherit;
  z-index: 10;
  border: 2px solid var(--accent);
  backdrop-filter: blur(4px);
}

.countdown-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--good));
  width: 0%;
  transition: width 0.1s linear;
  border-radius: inherit;
  z-index: 5;
  box-shadow: 0 0 15px rgba(110, 231, 255, 0.6);
}

.continue-countdown::before {
  content: "Continue";
  color: var(--btn-text);
  font-weight: 600;
  z-index: 15;
  position: relative;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.9);
}

.tutorial-complete {
  background: var(--btn-green) !important;
  border: 2px solid var(--good) !important;
  color: var(--btn-text) !important;
  box-shadow: 0 6px 20px rgba(52, 211, 153, 0.4);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.tutorial-complete:hover {
  background: var(--btn-green-hover) !important;
  transform: translateY(-2px) translateZ(0);
  box-shadow: 0 10px 30px rgba(52, 211, 153, 0.5);
}

.tutorial-complete:active {
  transform: translateY(0) translateZ(0);
  box-shadow: 0 6px 20px rgba(52, 211, 153, 0.4);
}

.tutorial-completion {
  margin-top: 16px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.1), rgba(52, 211, 153, 0.05));
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: var(--radius-lg);
  color: var(--good);
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(52, 211, 153, 0.2);
  backdrop-filter: blur(4px);
  animation: tutorialCompletionFadeIn 0.5s ease-out;
}

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

/* Enhanced tutorial completion styles */
.tutorial-completion ul {
  margin: 16px 0;
  padding-left: 20px;
}

.tutorial-completion li {
  margin: 8px 0;
  color: var(--text);
}

.tutorial-completion small {
  opacity: 0.8;
  font-size: 0.9em;
  color: var(--muted);
}

/* Tutorial auto-advance message */
.tutorial-auto-advance {
  margin-top: 16px;
  padding: 16px;
  background: rgba(110, 231, 255, 0.1);
  border: 1px solid rgba(110, 231, 255, 0.3);
  border-radius: 8px;
  color: var(--accent);
  font-weight: 600;
}

.tutorial-auto-advance ul {
  margin: 12px 0;
  padding-left: 20px;
}

.tutorial-auto-advance li {
  margin: 6px 0;
  color: var(--text);
}

/* Tutorial requirement indicators */
.tutorial-requirement {
  display: inline-block;
  margin: 4px 8px 4px 0;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--muted);
  transition: all 0.2s ease;
}

.tutorial-requirement.completed {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.3);
  color: var(--good);
}

/* Tutorial step progress indicator */
.tutorial-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.tutorial-progress-step {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.tutorial-progress-step.completed {
  background: var(--good);
}

.tutorial-progress-step.current {
  background: var(--accent);
}

.tutorial-progress-step.completed .tutorial-progress-fill {
  width: 100%;
  height: 100%;
  background: var(--good);
  transition: width 0.3s ease;
}

.tutorial-progress-step.current .tutorial-progress-fill {
  width: 50%;
  height: 100%;
  background: var(--accent);
  transition: width 0.3s ease;
}

.settings-tab {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.settings-tab:hover {
  color: var(--text);
  background: rgba(255,255,255,0.05);
}

.settings-tab.active {
  color: var(--accent);
  background: rgba(110, 231, 255, 0.1);
  border-bottom: 2px solid var(--accent);
}

.settings-content {
  position: relative;
}

.settings-tab-panel {
  display: none;
}

.settings-tab-panel.active {
  display: block;
}

/* Theme Grid */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255,255,255,0.03);
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.theme-option:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-1px);
}

.theme-option.active {
  border-color: var(--accent);
  background: rgba(110, 231, 255, 0.1);
}

.theme-preview {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 2px solid rgba(255,255,255,0.2);
  flex-shrink: 0;
}

.theme-label {
  flex: 1;
}

.theme-name {
  font-weight: 600;
  margin-bottom: 2px;
}

.theme-desc {
  font-size: 12px;
  color: var(--muted);
}

/* Theme Preview Colors */
.theme-dark-preview {
  background: linear-gradient(135deg, var(--bg) 0%, var(--panel) 50%, var(--accent) 100%);
}

.theme-light-preview {
  background: linear-gradient(135deg, var(--bg) 0%, var(--panel) 50%, var(--accent) 100%);
}

.theme-retro-preview {
  background: linear-gradient(135deg, var(--bg) 0%, var(--panel) 50%, var(--accent) 100%);
}

.theme-futuristic-preview {
  background: linear-gradient(135deg, var(--bg) 0%, var(--panel) 50%, var(--accent) 100%);
}

.theme-high-contrast-preview {
  background: linear-gradient(135deg, var(--bg) 0%, var(--panel) 50%, var(--accent) 100%);
}

/* Codex Modal Styles */
.codex-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 8px;
}

.codex-tab {
  background: none;
  border: none;
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.codex-tab:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text);
}

.codex-tab.active {
  background: var(--accent);
  color: #0f172a;
  font-weight: 600;
}

.codex-tab-panel {
  display: none;
}

.codex-tab-panel.active {
  display: block;
}

.codex-content {
  min-height: 300px;
}

/* Auto-save Status Indicator */
.auto-save-indicator { 
  position: fixed; 
  left: 16px; 
  bottom: 16px; 
  background: rgba(var(--panel-rgb),0.9); 
  border: 1px solid rgba(255,255,255,0.08); 
  padding: 8px 12px; 
  border-radius: 12px; 
  font-size: 12px; 
  color: var(--muted);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.auto-save-indicator.on {
  border-color: var(--good);
  color: var(--good);
}

.auto-save-indicator.off {
  border-color: var(--muted);
  color: var(--muted);
}
kbd { background:var(--kbd-bg); border:1px solid rgba(255,255,255,0.15); border-bottom-color:rgba(255,255,255,0.25); border-radius:6px; padding:1px 6px; font-size:12px; color:var(--kbd-text); box-shadow: inset 0 -1px 0 rgba(255,255,255,0.1); }

/* Toast Notifications - Top of screen with stacking */
.toast { 
  position: relative; 
  background: rgba(var(--panel-rgb),0.96); 
  border: 1px solid rgba(255,255,255,0.09); 
  padding: 12px 20px; 
  border-radius: 12px; 
  display: none;
  z-index: 1001;
  max-width: 600px;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

/* Toast container for stacking */
.toast-container {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

/* Selection indicator */
.selection { position: absolute; pointer-events: none; border: 2px solid var(--accent); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* Debug Menu Styles - Now handled by MovableWindow class */

/* Upgrade Controls Styles */
.upgrade-controls {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(110, 231, 255, 0.2);
  grid-column: 1 / -1;
}

.upgrade-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 6px 0;
}

.upgrade-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

.upgrade-buttons {
  display: flex;
  align-items: center;
  gap: 4px;
}

.upgrade-btn {
  background: linear-gradient(180deg, #1f2a44, #162035);
  border: 1px solid rgba(110, 231, 255, 0.3);
  color: #e9f6ff;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.upgrade-btn:hover {
  filter: brightness(1.1);
  border-color: rgba(110, 231, 255, 0.5);
  background: linear-gradient(180deg, #2a3a5a, #1f2a44);
}

.upgrade-btn:active {
  transform: translateY(1px);
}

.upgrade-btn.minus {
  color: #fca5a5;
}

.upgrade-btn.plus {
  color: #86efac;
}

.upgrade-level {
  background: rgba(110, 231, 255, 0.1);
  border: 1px solid rgba(110, 231, 255, 0.3);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}




  border-radius: 8px;
  min-width: 160px;
  backdrop-filter: blur(10px);
  z-index: 10;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.legend-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  font-size: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  transition: background-color 0.2s;
}

.legend-header:hover {
  background: rgba(255,255,255,0.05);
}

.legend-toggle-icon {
  font-size: 10px;
  transition: transform 0.2s;
}

.legend-toggle-icon.collapsed {
  transform: rotate(-90deg);
}

.legend-content {
  padding: 8px 12px;
  transition: max-height 0.3s ease;
  overflow: hidden;
}

.legend-content.collapsed {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.legend-content .legend-item {
  margin-bottom: 6px;
  font-size: 11px;
}

.legend-content .legend-item:last-child {
  margin-bottom: 0;
}

.system-info-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  padding: 2px 0;
}

.system-info-item:last-child {
  margin-bottom: 0;
}

.system-type-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.nearby-system-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nearby-system-item:last-child {
  border-bottom: none;
}

.nearby-system-item .system-name {
  font-weight: 600;
  color: var(--accent);
}

.nearby-system-item .system-distance {
  color: var(--muted);
  font-size: 12px;
}

.nearby-system-item .system-type {
  font-size: 11px;
  opacity: 0.8;
}

/* Jump Menu Modal */
.jump-menu-modal { width: min(600px, 90vw); }
.jump-menu-info { margin-bottom: 16px; }
.jump-systems-list { 
  margin-bottom: 16px; 
  max-height: 400px; 
  overflow-y: auto; 
  padding-right: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
  /* Mobile-friendly scrolling */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) rgba(255,255,255,0.05);
}

/* Responsive adjustments for smaller screens */
@media (max-height: 600px) {
  .jump-systems-list {
    max-height: 250px;
  }
}

@media (max-width: 480px) {
  .jump-menu-modal {
    width: 95vw;
  }
  
  .jump-system-item {
    grid-template-columns: 1fr;
    gap: 8px;
    text-align: center;
  }
  
  .jump-system-actions {
    justify-content: center;
  }
}
.jump-systems-list::-webkit-scrollbar {
  width: 8px;
}
.jump-systems-list::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
}
.jump-systems-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
}
.jump-systems-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.3);
}
.jump-systems-list:empty::after {
  content: "No systems available for jumping";
  display: block;
  text-align: center;
  color: var(--muted);
  padding: 20px;
  font-style: italic;
}
.jump-system-item { 
  display: grid; 
  grid-template-columns: 1fr auto auto; 
  gap: 12px; 
  align-items: center; 
  padding: 12px; 
  background: rgba(255,255,255,0.02); 
  border: 1px solid rgba(255,255,255,0.06); 
  border-radius: 8px; 
  transition: all 0.2s ease;
}
.jump-system-item:hover { 
  background: rgba(255,255,255,0.04); 
  border-color: rgba(255,255,255,0.1);
}
.jump-system-item.selected { 
  background: rgba(110, 231, 255, 0.1); 
  border-color: var(--accent);
}
.jump-system-info { display: grid; gap: 4px; }
.jump-system-name { font-weight: 600; font-size: 14px; }
.jump-system-details { font-size: 12px; color: var(--muted); }
.jump-system-distance { font-size: 12px; color: var(--accent); font-weight: 600; }
.jump-system-type { 
  padding: 4px 8px; 
  border-radius: 12px; 
  font-size: 11px; 
  font-weight: 600; 
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.jump-system-type.home { background: rgba(52, 211, 153, 0.2); color: #34d399; }
.jump-system-type.ridge { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.jump-system-type.nebula { background: rgba(167, 139, 250, 0.2); color: #a78bfa; }
.jump-system-type.cluster { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.jump-system-type.void { background: rgba(107, 114, 128, 0.2); color: #6b7280; }
.jump-system-type.binary { background: rgba(236, 72, 153, 0.2); color: #ec4899; }
.jump-system-actions { display: flex; gap: 8px; }
.jump-btn { 
  padding: 8px 16px; 
  font-size: 12px; 
  font-weight: 600;
  background: linear-gradient(180deg, #1f2a44, #162035);
  border: 1px solid rgba(255,255,255,0.12);
  color: #e9f6ff;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.jump-btn:hover { filter: brightness(1.1); }
.jump-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.jump-btn.primary { background: linear-gradient(180deg, #34d399, #059669); border-color: rgba(52, 211, 153, 0.3); }
.jump-btn.primary:hover { filter: brightness(1.1); }
.jump-btn.danger { background: linear-gradient(180deg, #ef4444, #dc2626); border-color: rgba(239, 68, 68, 0.3); }
.jump-btn.danger:hover { filter: brightness(1.1); }

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 2000;
  background: rgba(3, 5, 10, 0.35);
  backdrop-filter: blur(8px) saturate(120%);
}

.loading-content {
  display: grid;
  gap: 12px;
  align-items: center;
  justify-items: center;
  padding: 16px 20px;
  border-radius: 12px;
  background: rgba(18, 24, 38, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.loading-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-message {
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Table Manager Styles */
.sortable-table {
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(var(--panel-rgb), 0.8);
  width: 100%;
  min-width: 300px;
}

.table-header {
  display: grid;
  grid-template-columns: 120px 80px 80px;
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.table-cell {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  font-size: 12px;
  border-right: 1px solid rgba(255,255,255,0.05);
}

.table-cell:last-child {
  border-right: none;
}

.header-cell {
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s;
  justify-content: space-between;
}

.header-cell:hover {
  background: rgba(255,255,255,0.1);
}

.header-cell.sortable {
  cursor: pointer;
}

.header-cell.sortable:hover {
  background: rgba(255,255,255,0.15);
}

.sort-icon {
  color: var(--muted);
  font-size: 10px;
  margin-left: 4px;
}

.table-row {
  display: grid;
  grid-template-columns: 120px 80px 80px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background-color 0.2s;
}

.table-row:hover {
  background: rgba(255,255,255,0.03);
}

.table-row:last-child {
  border-bottom: none;
}

.table-row.no-data {
  grid-template-columns: 1fr;
}

.badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  background: rgba(255,255,255,0.1);
  color: var(--text);
}

.badge-home { background: var(--system-home); color: #000; }
.badge-ridge { background: var(--system-ridge); color: #000; }
.badge-nebula { background: var(--system-nebula); color: #000; }
.badge-cluster { background: var(--system-cluster); color: #000; }
.badge-void { background: var(--system-void); color: #000; }
.badge-binary { background: var(--system-binary); color: #000; }
.badge-undiscovered { background: var(--system-undiscovered); color: #000; }


.system-name-cell {
  font-weight: 600;
  color: var(--accent);
  justify-content: flex-start;
}

.system-type-cell {
  justify-content: center;
}

.system-distance-cell {
  justify-content: flex-end;
  font-family: monospace;
}

/* Ensure table fits in left panel */
#nearbySystemsTable .sortable-table {
  font-size: 11px;
  width: 100%;
}

#nearbySystemsTable .table-header,
#nearbySystemsTable .table-row {
  grid-template-columns: 100px 70px 70px;
}

#nearbySystemsTable .table-cell {
  padding: 6px 8px;
  font-size: 11px;
}

#nearbySystemsTable .system-name-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


