/* Cyprus Crossings - Modern Gradient Design */
/* Mobile-first responsive design */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-primary-hover: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
  --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  --gradient-warning: linear-gradient(135deg, #f5af19 0%, #f12711 100%);
  --gradient-card: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);

  /* Colors */
  --color-bg: #f0f4f8;
  --color-bg-card: #ffffff;
  --color-bg-elevated: #ffffff;
  --color-text: #1e293b;
  --color-text-secondary: #64748b;
  --color-text-muted: #94a3b8;
  --color-border: rgba(100, 116, 139, 0.12);
  --color-primary: #667eea;
  --color-primary-dark: #5a6fd6;
  --color-primary-rgb: 102, 126, 234;

  /* Status colors */
  --color-green: #10b981;
  --color-green-bg: rgba(16, 185, 129, 0.15);
  --color-yellow: #f59e0b;
  --color-yellow-bg: rgba(245, 158, 11, 0.15);
  --color-red: #ef4444;
  --color-red-bg: rgba(239, 68, 68, 0.15);

  /* Spacing & Radius */
  --radius: 20px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --radius-full: 50px;

  /* Shadows */
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 30px rgba(102, 126, 234, 0.25);
  --shadow-glow-strong: 0 0 50px rgba(102, 126, 234, 0.4);
}

[data-theme="dark"] {
  --gradient-card: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  --color-bg: #0f172a;
  --color-bg-card: #1e293b;
  --color-bg-elevated: #1e293b;
  --color-text: #f1f5f9;
  --color-text-secondary: #94a3b8;
  --color-text-muted: #64748b;
  --color-border: rgba(148, 163, 184, 0.15);
  --color-green-bg: rgba(16, 185, 129, 0.2);
  --color-yellow-bg: rgba(245, 158, 11, 0.2);
  --color-red-bg: rgba(239, 68, 68, 0.2);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
}

.container { max-width: 900px; margin: 0 auto; padding: 0 20px; }

/* ==================== */
/* HEADER               */
/* ==================== */
.header {
  background: var(--gradient-primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-glow);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  color: white;
  text-decoration: none;
  letter-spacing: -0.5px;
}

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

/* Language Switcher */
.lang-switcher {
  display: flex;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-sm);
  padding: 4px;
}

.lang-btn {
  padding: 6px 12px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
}

.lang-btn:hover {
  color: white;
}

.lang-btn.active {
  background: white;
  color: var(--color-primary);
}

/* Theme Toggle */
.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: none;
  color: white;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

.theme-icon-dark { display: none; }
[data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="dark"] .theme-icon-dark { display: block; }

/* ==================== */
/* HERO SECTION         */
/* ==================== */
.hero {
  background: var(--gradient-primary);
  padding: 32px 0 56px;
  position: relative;
  margin-top: -1px;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: var(--color-bg);
  border-radius: 30px 30px 0 0;
}

.hero-title {
  color: white;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 8px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.hero-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.05rem;
  font-weight: 500;
}

.hero-intro {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-top: 16px;
  max-width: 500px;
}

@media (min-width: 640px) {
  .hero { padding: 40px 0 64px; }
  .hero-title { font-size: 2.5rem; }
  .hero-intro { font-size: 0.95rem; }
}

/* ==================== */
/* CROSSING HERO        */
/* ==================== */
.crossing-hero {
  background: var(--gradient-primary);
  padding: 30px 0 60px;
  position: relative;
  margin-top: -1px;
}

.crossing-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: var(--color-bg);
  border-radius: 40px 40px 0 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 16px;
  margin-bottom: 16px;
  transition: all 0.2s;
}

.back-link:hover {
  color: var(--color-text);
  transform: translateX(-4px);
}

.crossing-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.crossing-hero-title {
  color: white;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.crossing-hero-desc {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  font-weight: 500;
}

/* ==================== */
/* SECTIONS             */
/* ==================== */
.section {
  padding: 24px 0;
}

/* First section after hero needs more top padding */
[data-page="home"] .section:first-of-type {
  padding-top: 8px;
}

.section-alt {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  margin: 0 12px 16px;
  padding: 24px 16px;
  box-shadow: var(--shadow);
}

.section-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.section-subtitle {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
  font-weight: 500;
}

.updated-time {
  display: block;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* ==================== */
/* CROSSINGS GRID       */
/* ==================== */
.crossings-grid {
  display: grid;
  gap: 16px;
  align-items: start;
}

@media (min-width: 640px) {
  .crossings-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Crossing Card */
/* Design C: Large Time Focus */
.crossing-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.crossing-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.crossing-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.crossing-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.3px;
}

.crossing-card-type {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--color-bg);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.crossing-card-body {
  display: flex;
  gap: 12px;
}

.crossing-card-direction {
  flex: 1;
  text-align: center;
  padding: 12px 8px;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
}

.direction-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.direction-time {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
}

.direction-time.status-low {
  background: var(--gradient-success);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.direction-time.status-moderate {
  color: var(--color-yellow);
}

.direction-time.status-high {
  background: var(--gradient-warning);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.direction-time.status-nodata {
  color: var(--color-text-muted);
  font-size: 1.25rem;
}

.direction-unit {
  font-size: 0.7rem;
  font-weight: 600;
  opacity: 0.7;
}

.crossing-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

.crossing-card-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-green);
}

.crossing-card-status.closed .status-dot {
  background: var(--color-red);
}

.crossing-card-action {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ==================== */
/* DESIGN C: Large Time Focus */
/* =========================== */

/* Top section with name and meta */
.card-top {
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
}

.crossing-name {
  font-size: 1.1rem;
  font-weight: 700;
  display: block;
  margin-bottom: 2px;
}

.crossing-name-link {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-color: rgba(79, 70, 229, 0.3);
  text-underline-offset: 2px;
  transition: all 0.2s;
}

.crossing-name-link:hover {
  color: var(--color-primary-dark);
  text-decoration-color: var(--color-primary);
}

.crossing-meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* Times section - two sides */
.card-times {
  display: flex;
}

.time-side {
  flex: 1;
  padding: 20px 16px;
  text-align: center;
  min-height: 115px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.time-side:first-child {
  border-right: 1px solid var(--color-border);
}

.time-dir {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
}

.time-big {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
}

.time-big.status-low {
  color: var(--color-green);
}

.time-big.status-moderate {
  color: var(--color-yellow);
}

.time-big.status-high {
  color: var(--color-red);
}

.time-big.status-nodata {
  color: var(--color-text-muted);
}

.time-unit {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-top: 4px;
}

.community-indicator {
  font-size: 0.6rem;
  color: var(--color-primary);
  font-weight: 600;
  margin-top: 6px;
  min-height: 1em; /* Reserve space even when empty */
}

/* Closed state for time side */
.time-side.closed .time-big {
  font-size: 1rem;
  color: var(--color-red);
}

/* Bottom section - clickable expand trigger */
.card-bottom {
  width: 100%;
  padding: 14px 20px;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.card-bottom:hover {
  background: var(--color-border);
}

.expand-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary);
}

.expand-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: var(--color-bg-card);
  color: var(--color-text-secondary);
  font-size: 1.2rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.card-bottom:hover .expand-icon {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.crossing-card.expanded .expand-icon {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

.card-expanded {
  display: none;
  padding: 16px 20px;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-card);
}

.crossing-card.expanded .card-expanded {
  display: block;
}

.expanded-reports {
  margin-bottom: 12px;
}

.expanded-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

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

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

.expanded-time {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.expanded-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text);
}

.expanded-dir {
  font-size: 0.7rem;
  color: var(--color-text-secondary);
}

.expanded-report-btn {
  width: 100%;
  padding: 12px;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.expanded-report-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.no-reports {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-style: italic;
  padding: 8px 0;
}

.no-reports-clickable {
  cursor: pointer;
  color: var(--color-primary);
  font-style: normal;
  transition: color 0.15s ease;
}

.no-reports-clickable:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

/* Mini traffic chart in expanded card */
.expanded-traffic {
  margin-bottom: 16px;
}

.mini-traffic-chart {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 48px;
  padding: 8px 0;
}

.mini-bar {
  flex: 1;
  min-width: 0;
  border-radius: 2px 2px 0 0;
  position: relative;
  transition: all 0.2s;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 2px;
}

.mini-bar.status-low { background: var(--color-green); }
.mini-bar.status-moderate { background: var(--color-yellow); }
.mini-bar.status-high { background: var(--color-red); }
.mini-bar.status-nodata { background: var(--color-border); }
.mini-bar.status-closed {
  background: repeating-linear-gradient(
    45deg,
    var(--color-border),
    var(--color-border) 2px,
    transparent 2px,
    transparent 4px
  );
  opacity: 0.5;
}

.mini-bar.current {
  box-shadow: 0 0 0 2px var(--color-primary);
}

.mini-bar-value {
  font-size: 0.5rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  line-height: 1;
}

.mini-traffic-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
}

.mini-traffic-label {
  font-size: 0.6rem;
  color: var(--color-text-muted);
}

.mini-traffic-loading {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-align: center;
  padding: 16px 0;
}

/* Mini direction toggle for expanded cards */
.mini-direction-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.mini-dir-btn {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-secondary);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.mini-dir-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.mini-dir-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

.mini-dir-arrow {
  font-size: 0.8rem;
}

.expanded-section {
  margin-bottom: 12px;
}

.expanded-section + .expanded-section {
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

/* ==================== */
/* REPORTS FEED         */
/* ==================== */
.reports-feed {
  grid-column: 1 / -1;
  background: var(--gradient-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
}

.feed-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 16px;
}

.feed-empty {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-style: italic;
  text-align: center;
  padding: 16px;
}

.feed-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}

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

.feed-left {
  flex: 1;
  min-width: 0;
}

.feed-crossing {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  display: block;
}

.feed-dir {
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

.feed-wait {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
  padding: 0 12px;
}

.feed-time {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  text-align: right;
}

/* ==================== */
/* WAIT TIMES CARD      */
/* ==================== */
.wait-times-card {
  background: var(--gradient-card);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  display: flex;
  gap: 16px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
}

.wait-time-box {
  flex: 1;
  text-align: center;
}

.wait-direction {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  font-weight: 600;
  margin-bottom: 10px;
}

.wait-value {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1;
  background: var(--gradient-success);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.wait-value.status-moderate {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.wait-value.status-high {
  background: var(--gradient-warning);
  -webkit-background-clip: text;
  background-clip: text;
}

.wait-value.status-nodata {
  background: none;
  -webkit-text-fill-color: var(--color-text-muted);
  color: var(--color-text-muted);
}

.wait-unit {
  font-size: 1rem;
  font-weight: 600;
  opacity: 0.7;
  -webkit-text-fill-color: initial;
  background: none;
  color: var(--color-text-secondary);
}

.wait-source {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  margin-top: 6px;
}

.wait-divider {
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--color-border), transparent);
  margin: 10px 0;
}

/* ==================== */
/* BEST TIMES SECTION   */
/* ==================== */
.best-times-section {
  margin-top: 24px;
}

.best-times-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 16px;
}

.best-times-day {
  color: var(--color-primary);
}

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

@media (min-width: 640px) {
  .best-times-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.best-time-card {
  background: var(--color-bg-card);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: all 0.2s;
}

.best-time-card.current {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.best-time-period {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 4px;
}

.best-time-range {
  font-size: 0.65rem;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.best-time-hour {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1;
  margin-bottom: 6px;
}

.best-time-wait {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
}

.best-time-value {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
}

.best-time-unit {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-text-secondary);
}

/* Status colors for best time cards */
.best-time-card.status-low .best-time-wait {
  color: var(--color-green);
}

.best-time-card.status-moderate .best-time-wait {
  color: var(--color-yellow);
}

.best-time-card.status-high .best-time-wait {
  color: var(--color-red);
}

.best-time-card.status-nodata .best-time-hour,
.best-time-card.status-nodata .best-time-wait {
  color: var(--color-text-muted);
}

/* Passed state */
.best-time-card.passed {
  opacity: 0.5;
}

.best-time-card.passed .best-time-period::after {
  content: ' (passed)';
  font-size: 0.6rem;
  text-transform: none;
  color: var(--color-text-muted);
}

/* ==================== */
/* DIRECTION TOGGLE     */
/* ==================== */
/* Day Tabs */
.day-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.day-tabs::-webkit-scrollbar {
  display: none;
}

.day-tab {
  flex: 1;
  min-width: 44px;
  padding: 10px 8px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text-secondary);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.day-tab:hover {
  background: var(--color-bg-card);
}

.day-tab.active {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.day-tab.today {
  position: relative;
}

.day-tab.today::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: var(--color-primary);
  border-radius: 50%;
}

.day-tab.today.active::after {
  background: white;
}

/* Global Direction Section */
.global-direction-section {
  margin: 20px 0 8px;
}

.direction-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  justify-content: center;
}

.direction-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: none;
  border-radius: var(--radius-full);
  background: var(--color-bg-card);
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all 0.3s;
}

.direction-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.direction-btn.active {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-glow);
}

.direction-arrow {
  font-size: 1rem;
}

/* ==================== */
/* MAP                  */
/* ==================== */
.crossing-map-container {
  width: 100%;
  height: 220px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--gradient-card);
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
}

.crossing-map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.directions-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 14px 28px;
  background: var(--gradient-primary);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: var(--shadow-glow);
  transition: all 0.3s;
}

.directions-link:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow-strong);
}

/* ==================== */
/* TODAY CHART - SCROLL TIMELINE */
/* ==================== */
.today-chart {
  margin-bottom: 16px;
}

.scroll-timeline {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  margin: 0 -20px;
  padding: 0 20px;
  scrollbar-width: none;
}

.scroll-timeline::-webkit-scrollbar {
  display: none;
}

.timeline-track {
  display: flex;
  gap: 12px;
  padding: 10px 0 16px;
  width: max-content;
}

.timeline-hour {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 56px;
}

.timeline-time {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.timeline-bar-container {
  height: 100px;
  display: flex;
  align-items: flex-end;
}

.timeline-bar {
  width: 48px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 4px;
  transition: all 0.2s;
  position: relative;
  min-height: 44px;
}

.timeline-bar.status-low {
  background: var(--gradient-success);
}

.timeline-bar.status-moderate {
  background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
}

.timeline-bar.status-high {
  background: var(--gradient-warning);
}

.timeline-bar.status-nodata {
  background: var(--color-bg);
  border: 2px dashed var(--color-border);
}

.timeline-bar.status-nodata .timeline-bar-value {
  color: var(--color-text-muted);
  text-shadow: none;
}

.timeline-bar.status-closed {
  background: repeating-linear-gradient(
    45deg,
    var(--color-border),
    var(--color-border) 2px,
    var(--color-bg) 2px,
    var(--color-bg) 6px
  );
  border: 2px solid var(--color-border);
  opacity: 0.6;
}

.timeline-bar.status-closed .timeline-bar-value {
  color: var(--color-text-muted);
  text-shadow: none;
  font-size: 0.6rem;
}

.timeline-bar-value {
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
  line-height: 1;
}

.timeline-bar-unit {
  font-size: 0.6rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  margin-top: 2px;
}

.timeline-hour.current .timeline-bar {
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.5), 0 4px 12px rgba(102, 126, 234, 0.3);
}

.timeline-hour.current .timeline-time {
  color: var(--color-primary);
  font-weight: 700;
}

.timeline-now-label {
  font-weight: 800;
  color: white;
  letter-spacing: 0.5px;
}

/* Legacy - can be removed if not used */
.timeline-now-badge {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.95);
  color: var(--color-primary);
  font-size: 0.5rem;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 4px;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  letter-spacing: 0.5px;
}

/* Status labels removed - using legend at bottom instead */

/* Scroll hint */
.scroll-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 8px;
}

/* ==================== */
/* WEEKLY CHART         */
/* ==================== */
.weekly-chart {
  margin-bottom: 16px;
}

.weekly-chart-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.weekly-chart-card {
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
}

.weekly-chart-card-day {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
}

.weekly-chart-card-best,
.weekly-chart-card-worst {
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.weekly-chart-card-best {
  color: var(--color-green);
}

.weekly-chart-card-worst {
  color: var(--color-red);
}

.weekly-chart-card-nodata {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-style: italic;
}

.weekly-chart-card-est {
  font-size: 0.65rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin-top: 4px;
}

.weekly-chart-grid {
  display: none;
}

@media (min-width: 768px) {
  .weekly-chart-cards { display: none; }

  .weekly-chart-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .weekly-chart-day {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .weekly-chart-label {
    width: 40px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-text-secondary);
    text-align: right;
    flex-shrink: 0;
  }

  .weekly-chart-bars {
    display: flex;
    gap: 3px;
    flex: 1;
  }

  .weekly-chart-bar {
    flex: 1;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
    transition: all 0.2s;
    cursor: default;
  }

  .weekly-chart-bar:hover {
    transform: scale(1.08);
    z-index: 1;
  }

  .weekly-chart-bar.status-low {
    background: var(--gradient-success);
  }

  .weekly-chart-bar.status-moderate {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  }

  .weekly-chart-bar.status-high {
    background: var(--gradient-warning);
  }

  .weekly-chart-bar.status-nodata {
    background: var(--color-bg);
    border: 2px dashed var(--color-border);
    color: var(--color-text-muted);
    text-shadow: none;
  }

  .weekly-chart-bar.estimated {
    opacity: 0.7;
  }

  .weekly-chart-times {
    display: flex;
    gap: 3px;
    padding-left: 48px;
    margin-top: 6px;
  }

  .weekly-chart-time-label {
    flex: 1;
    font-size: 0.6rem;
    color: var(--color-text-muted);
    text-align: center;
    font-weight: 600;
  }
}

/* ==================== */
/* LEGEND               */
/* ==================== */
.times-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 16px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  font-weight: 600;
}

.legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 4px;
}

.legend-dot.status-low { background: var(--gradient-success); }
.legend-dot.status-moderate { background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%); }
.legend-dot.status-high { background: var(--gradient-warning); }
.legend-dot.status-nodata { background: var(--color-bg); border: 2px dashed var(--color-text-muted); }

/* ==================== */
/* REPORTS LIST         */
/* ==================== */
.reports-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.report-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
}

.report-item-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.report-item-dir {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
}

.report-item-time {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.report-item-wait {
  font-size: 0.9rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}

.report-item-wait.status-low {
  background: var(--color-green-bg);
  color: var(--color-green);
}

.report-item-wait.status-moderate {
  background: var(--color-yellow-bg);
  color: var(--color-yellow);
}

.report-item-wait.status-high {
  background: var(--color-red-bg);
  color: var(--color-red);
}

.no-reports {
  text-align: center;
  padding: 24px;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* ==================== */
/* FAQ SECTION          */
/* ==================== */
.faq-section {
  padding-bottom: 100px; /* Extra space for report bar */
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--color-bg);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.faq-item[open] {
  box-shadow: var(--shadow-sm);
}

.faq-question {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--color-text-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-item[open] .faq-question::after {
  content: '−';
}

.faq-question:hover {
  color: var(--color-primary);
}

.faq-answer {
  padding: 0 20px 16px;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* ==================== */
/* WIZARD               */
/* ==================== */
.wizard-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.wizard-overlay[hidden] {
  display: none;
}

.wizard-modal {
  background: var(--gradient-card);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  max-width: 400px;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.wizard-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--color-bg);
  border-radius: 50%;
  font-size: 1.25rem;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.wizard-close:hover {
  background: var(--color-border);
  color: var(--color-text);
}

.wizard-question {
  font-size: 1.25rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 24px;
  color: var(--color-text);
}

.wizard-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wizard-opt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.2s;
}

.wizard-opt:hover {
  border-color: var(--color-primary);
  background: rgba(var(--color-primary-rgb), 0.1);
}

.wizard-opt-icon {
  font-size: 1.25rem;
}

.wizard-success {
  text-align: center;
  padding: 20px;
}

.wizard-success-icon {
  width: 64px;
  height: 64px;
  background: var(--gradient-success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  margin: 0 auto 16px;
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.4);
}

.wizard-success-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
}

.wizard-progress {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.wizard-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-border);
  transition: all 0.2s;
}

.wizard-dot.active {
  background: var(--gradient-primary);
  box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

/* ==================== */
/* REPORT FAB           */
/* ==================== */
.report-bar {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--gradient-success);
  color: white;
  padding: 16px 28px;
  border-radius: var(--radius-full);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.4);
  cursor: pointer;
  z-index: 50;
  transition: all 0.3s;
}

.report-bar:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 50px rgba(16, 185, 129, 0.6);
}

.report-bar-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.report-bar-title {
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.report-bar-subtitle {
  font-size: 0.75rem;
  opacity: 0.9;
}

/* ==================== */
/* FOOTER               */
/* ==================== */
.footer {
  background: var(--gradient-primary);
  padding: 32px 0 100px 0; /* Extra bottom padding for floating report button */
  margin-top: 80px;
}

.footer-content {
  text-align: center;
}

.footer-text {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 8px;
}

.footer-links {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  justify-content: center;
  gap: 8px;
}

/* ==================== */
/* UTILITIES            */
/* ==================== */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }

/* Responsive adjustments */
@media (min-width: 640px) {
  .section-alt {
    margin: 0 0 20px;
    padding: 28px;
  }

  .crossing-map-container {
    height: 280px;
  }

  .timeline-bar-container {
    height: 120px;
  }

  .timeline-bar {
    width: 56px;
  }

  .timeline-hour {
    min-width: 64px;
  }
}
