@import url('https://cdn.jsdelivr.net/npm/@vetixy/circular-std@1.0.0/dist/index.css');
@import url('https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,300..900;1,300..900&family=Outfit:wght@100..900&display=swap');

/* --- Theme Variables --- */
:root {
  --font-sans: "CircularStd", "Circular Std", "Outfit", "Figtree", -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Shared transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Default: Dark Cyber-Metro */
  --bg-app: #090a0f;
  --bg-card: rgba(18, 20, 32, 0.6);
  --bg-card-hover: rgba(26, 29, 46, 0.8);
  --bg-input: rgba(30, 33, 52, 0.6);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #00f0ff;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  
  --color-primary: #00f0ff;      /* Cyan neon */
  --color-secondary: #ff9f1c;    /* Amber LED */
  --color-success: #00f5d4;      /* Neon green */
  --color-danger: #ff5400;       /* Neon red/orange */
  --color-accent: #7209b7;       /* Cyber purple */
  
  --shadow-glow: 0 0 15px rgba(0, 240, 255, 0.25);
  --shadow-glow-alert: 0 0 20px rgba(255, 84, 0, 0.4);
  --glass-blur: blur(16px);
  --border-radius: 12px;
}

/* Classic NMBS/SNCB Theme */
[data-theme="classic"] {
  --bg-app: #0c1c38;             /* SNCB Station Blue */
  --bg-card: #041026;            /* Deep board navy */
  --bg-card-hover: #07193b;
  --bg-input: #10244c;
  --border-color: #1e3b70;
  --border-focus: #fbb03b;       /* NMBS Yellow */
  --text-main: #ffffff;
  --text-muted: #8fa0c0;
  
  --color-primary: #fbb03b;      /* Yellow accent */
  --color-secondary: #ff9f00;    /* Delay Orange */
  --color-success: #2ec4b6;
  --color-danger: #e71d36;
  --color-accent: #3a86c8;
  
  --shadow-glow: 0 0 10px rgba(251, 176, 59, 0.3);
  --shadow-glow-alert: 0 0 15px rgba(231, 29, 54, 0.45);
  --glass-blur: none;
  --border-radius: 4px;          /* Rigid retro terminal look */
}

/* Light Minimalist Theme */
[data-theme="light"] {
  --bg-app: #f4f6f9;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: #ffffff;
  --bg-input: #e9ecef;
  --border-color: rgba(0, 0, 0, 0.08);
  --border-focus: #3b82f6;       /* Clean Blue */
  --text-main: #1f2937;
  --text-muted: #6b7280;
  
  --color-primary: #3b82f6;
  --color-secondary: #f59e0b;
  --color-success: #10b981;
  --color-danger: #ef4444;
  --color-accent: #8b5cf6;
  
  --shadow-glow: 0 4px 12px rgba(59, 130, 246, 0.1);
  --shadow-glow-alert: 0 4px 16px rgba(239, 68, 68, 0.2);
  --glass-blur: blur(10px);
  --border-radius: 14px;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  transition: background-color var(--transition-normal), color var(--transition-normal);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* --- App Container --- */
.app-container {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1;
}

/* --- Header Section --- */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

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

.logo-section h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
[data-theme="classic"] .logo-section h1 {
  background: none;
  -webkit-text-fill-color: var(--text-main);
  text-transform: uppercase;
}

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

.header-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Auto Refresh Visual widget */
.refresh-widget {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: var(--border-radius);
  font-size: 13px;
  color: var(--text-muted);
}

.refresh-timer-circle {
  width: 18px;
  height: 18px;
  position: relative;
}

.refresh-timer-circle svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.refresh-timer-circle circle {
  fill: none;
  stroke-width: 2.5;
}

.refresh-timer-circle .bg-circle {
  stroke: var(--border-color);
}

.refresh-timer-circle .progress-circle {
  stroke: var(--color-primary);
  stroke-dasharray: 50.26; /* 2 * PI * r (r=8) */
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;
}

.sync-btn {
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  padding: 4px;
  transition: transform var(--transition-fast);
}

.sync-btn:hover {
  color: var(--color-primary);
  transform: scale(1.1);
}

.sync-btn.spinning {
  animation: rotate-sync 0.8s ease-in-out infinite;
}

@keyframes rotate-sync {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Theme Selector Buttons */
.theme-selector {
  display: flex;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 3px;
}

.theme-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: calc(var(--border-radius) - 2px);
  transition: all var(--transition-fast);
}

.theme-btn:hover {
  color: var(--text-main);
}

.theme-btn.active {
  background: var(--bg-card);
  color: var(--color-primary);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  border: 1px solid var(--border-color);
}

/* --- Configuration Bar --- */
.config-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  backdrop-filter: var(--glass-blur);
  border-radius: var(--border-radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-glow);
}

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

.config-header h2 {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.config-form {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.input-wrapper {
  position: relative;
  flex: 1;
  min-width: 240px;
}

.input-wrapper label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.input-wrapper input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 10px 14px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 14px;
  transition: all var(--transition-fast);
}

.input-wrapper input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
}

/* Autocomplete Suggestion List */
.autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  max-height: 220px;
  overflow-y: auto;
  z-index: 10;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  display: none;
}

.autocomplete-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  transition: background-color var(--transition-fast);
}

.autocomplete-item:hover, .autocomplete-item.active {
  background-color: var(--bg-input);
  color: var(--color-primary);
}

.autocomplete-item .station-name-french {
  color: var(--text-muted);
  font-size: 11px;
  margin-left: 6px;
}

/* Form Buttons */
.form-buttons {
  display: flex;
  gap: 10px;
}

.swap-btn, .add-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px 16px;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  font-size: 14px;
}

.swap-btn:hover {
  background: var(--bg-card-hover);
  color: var(--color-primary);
}

.add-btn {
  background: var(--color-primary);
  color: #000;
  border: none;
  padding: 10px 24px;
}

.add-btn:hover {
  filter: brightness(1.15);
  box-shadow: var(--shadow-glow);
}

[data-theme="classic"] .add-btn {
  color: #000;
  font-weight: 700;
  text-transform: uppercase;
}

/* Quick Add Station Pills */
.quick-pairs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
}

.quick-pair-pill {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 30px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.quick-pair-pill:hover {
  background: var(--bg-card-hover);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* --- Dashboard Grid --- */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 24px;
  align-items: start;
  flex: 1;
}

@media (max-width: 480px) {
  .app-container {
    padding: 8px;
    gap: 12px;
  }
  .app-header {
    padding-bottom: 8px;
    gap: 8px;
  }
  .logo-section h1 {
    font-size: 18px;
  }
  .logo-icon {
    font-size: 20px;
  }
  .refresh-widget {
    padding: 4px 8px;
    font-size: 11px;
  }
  .theme-btn {
    padding: 4px 8px;
    font-size: 11px;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .trip-card {
    padding: 10px 10px 6px 10px;
    gap: 8px;
  }
  .trip-route {
    font-size: 13px;
  }
  .trip-station {
    max-width: 100px;
  }
  .departure-row {
    grid-template-columns: 34px 20px 26px 1fr 20px 58px 32px 22px;
    padding: 1px 0px;
    gap: 2px;
    font-size: 11px;
  }
  .dep-countdown {
    font-size: 13px;
    width: auto;
    padding-right: 1px;
  }
  .dep-platform-large {
    font-size: 11px;
    padding: 1px 2px;
    min-width: 18px;
    border-radius: 3px;
  }
  .train-badge {
    font-size: 8px;
    padding: 1px 2px;
  }
  .train-destination {
    font-size: 11px;
  }
  .dep-carriages {
    font-size: 9px;
    padding: 0;
    background: none;
    border: none;
    min-width: auto;
  }
  .slower-warning-icon {
    font-size: 10px;
  }
  .dep-times {
    font-size: 10px;
  }
  .dep-times .actual-line {
    font-size: 8px;
  }
  .dep-duration {
    font-size: 9px;
  }
  .delay-tag {
    font-size: 9px;
    padding: 1px 2px;
  }
}

/* --- Trip Card --- */
.trip-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 10px 10px 6px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.trip-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255,255,255,0.15);
}

/* Trip Card Header */
.trip-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 4px;
}

.trip-route {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
}

.trip-station {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-arrow {
  color: var(--color-primary);
}

.trip-actions {
  display: flex;
  gap: 8px;
}

.trip-action-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 14px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.trip-action-btn:hover {
  color: var(--text-main);
  background: var(--bg-input);
}

.trip-action-btn.delete-btn:hover {
  color: var(--color-danger);
}

/* --- Departure List --- */
.departures-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
}

.no-departures {
  color: var(--text-muted);
  text-align: center;
  padding: 30px;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* Departure Row */
.departure-row {
  display: grid;
  grid-template-columns: 40px 24px 30px 1fr 24px 70px 38px 28px;
  align-items: center;
  gap: 5px;
  padding: 2px 1px; /* Super compact vertical padding! */
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.departure-row.hidden-row {
  display: none !important;
}

.departure-row:last-child,
.departure-row:has(+ .hidden-row) {
  border-bottom: none;
}

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

.dep-countdown {
  font-size: 16px;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.5px;
  text-align: right;
  padding-right: 4px;
}

.dep-platform-large {
  font-size: 12px;
  font-weight: 800;
  padding: 2px 4px;
  border-radius: 4px;
  min-width: 28px;
  text-align: center;
}

/* High contrast platforms by theme */
[data-theme="dark"] .dep-platform-large {
  background: var(--color-primary);
  color: #000;
}
[data-theme="classic"] .dep-platform-large {
  background: var(--color-primary);
  color: #000;
}
[data-theme="light"] .dep-platform-large {
  background: var(--color-primary);
  color: #fff;
}

.train-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 4px;
  border-radius: 3px;
  text-transform: uppercase;
  color: #fff;
  background-color: var(--text-muted); /* Fallback background for light mode contrast on unmatched types */
  text-align: center;
  line-height: 1;
}

/* NMBS Train Type colors */
.train-badge.ic { background-color: #004d80; } /* IC blue */
.train-badge.s,
.train-badge.s19,
.train-badge[class*=" s-"],
.train-badge[class*=" s0"],
.train-badge[class*=" s1"],
.train-badge[class*=" s2"],
.train-badge[class*=" s3"],
.train-badge[class*=" s4"],
.train-badge[class*=" s5"],
.train-badge[class*=" s6"],
.train-badge[class*=" s7"],
.train-badge[class*=" s8"],
.train-badge[class*=" s9"] { background-color: #2b7a1e; }  /* S green */
.train-badge.l { background-color: #555555; }  /* L grey */
.train-badge.p { background-color: #a30000; }  /* P red */
.train-badge.exp { background-color: #d17a00; }/* Extra */

/* Expand/Collapse Button in Header */
.trip-expand-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 6px;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}

.trip-expand-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-primary);
}

.train-destination {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.dep-carriages {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  border-radius: 3px;
  color: var(--text-muted);
  text-align: center;
  min-width: 18px;
  display: inline-block;
}

.dep-warning-col {
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slower-warning-icon {
  color: var(--color-secondary);
  font-size: 12px;
  animation: pulse-glowing-yellow 1.5s infinite alternate;
}

@keyframes pulse-glowing-yellow {
  0% { transform: scale(0.95); opacity: 0.7; }
  100% { transform: scale(1.15); opacity: 1; }
}

.dep-times {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.15;
}

.dep-times .planned-line {
  font-weight: 600;
  color: var(--text-main);
}

.dep-times .actual-line {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-danger);
}

.dep-duration {
  color: var(--text-muted);
  font-size: 11px;
  text-align: right;
  white-space: nowrap;
}

.dep-duration.slower {
  color: var(--color-secondary);
  font-weight: 700;
}

.dep-delay-col {
  text-align: right;
  display: flex;
  justify-content: flex-end;
}

.delay-tag {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 3px;
  white-space: nowrap;
}

.delay-tag.delayed {
  color: var(--color-danger);
  background: rgba(255, 84, 0, 0.15);
}
.delay-tag.on-time {
  color: var(--color-success);
  background: rgba(0, 245, 212, 0.1);
}

/* --- Special Highlights --- */

/* Canceled train rows: strike-through and greyed out */
.departure-row.canceled {
  text-decoration: line-through;
  opacity: 0.5;
}

.departure-row.urgent .dep-countdown {
  color: var(--color-danger);
  animation: text-alert-pulse 1.5s infinite alternate;
}

@keyframes text-alert-pulse {
  0% { text-shadow: none; opacity: 0.8; }
  100% { text-shadow: 0 0 10px rgba(255, 84, 0, 0.8); opacity: 1; }
}

/* --- Detail Modal Overlay --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 6, 10, 0.75);
  backdrop-filter: blur(12px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  width: 90%;
  max-width: 580px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  gap: 20px;
  transform: scale(0.95);
  transition: transform var(--transition-normal);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

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

.modal-title h3 {
  font-size: 18px;
  font-weight: 800;
}

.modal-title .modal-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.close-modal-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  padding: 4px;
  transition: color var(--transition-fast);
}

.close-modal-btn:hover {
  color: var(--text-main);
}

/* --- Train Composition Visualizer --- */
.composition-section {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.composition-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
}

.train-visual-track {
  width: 100%;
  height: 60px;
  background: linear-gradient(180deg, transparent 45%, var(--border-color) 45%, var(--border-color) 55%, transparent 55%);
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  padding: 0 10px;
  border-radius: var(--border-radius);
}

/* Individual carriage box styling */
.train-carriage {
  height: 34px;
  min-width: 65px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 9px;
  font-weight: 800;
  color: #fff;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.train-carriage.locomotive {
  background: #3a405a;
  min-width: 45px;
  border-radius: 8px 4px 4px 8px;
}

.train-carriage.first-class {
  background: #f1c40f; /* Yellow for first class */
  border-color: #d4ac0d;
  color: #000;
}

.train-carriage.second-class {
  background: #2980b9; /* Blue for second class */
  border-color: #2471a3;
}

.train-carriage.mixed-class {
  background: linear-gradient(135deg, #f1c40f 50%, #2980b9 50%);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.carriage-num {
  font-size: 10px;
}

.carriage-info {
  font-size: 8px;
  opacity: 0.9;
}

.segment-divider {
  width: 8px;
  height: 4px;
  background: var(--text-muted);
  flex-shrink: 0;
  border-radius: 2px;
}

/* --- Itinerary Timeline --- */
.itinerary-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.itinerary-section h4 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.timeline {
  position: relative;
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 6px;
  width: 2px;
  background: var(--border-color);
}

.timeline-node {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.timeline-dot {
  position: absolute;
  left: -24px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 3px solid var(--border-color);
}

.timeline-node.highlighted .timeline-dot {
  border-color: var(--color-primary);
  background: var(--color-primary);
  box-shadow: var(--shadow-glow);
}

.timeline-node.passed {
  opacity: 0.5;
}

.timeline-node.passed .timeline-dot {
  background: var(--border-color);
}

.timeline-station {
  font-weight: 600;
}

.timeline-node.highlighted .timeline-station {
  color: var(--color-primary);
  font-weight: 700;
}

.timeline-timing {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.timeline-time {
  font-weight: 700;
}

.timeline-delay {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-danger);
}

.timeline-platform {
  background: var(--bg-input);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  min-width: 20px;
  text-align: center;
}

/* --- Footer --- */
.app-footer {
  text-align: center;
  padding: 16px;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}
