/* Tour de France 2026 Dashboard - CSS Style Guide */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --bg-color: #080B11;
  --panel-bg: rgba(17, 24, 39, 0.6);
  --panel-border: rgba(255, 255, 255, 0.06);
  --card-bg: rgba(26, 36, 54, 0.4);
  --card-hover: rgba(36, 49, 73, 0.6);
  
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  
  /* Brand/Jersey Colors */
  --tdf-yellow: #FFE500;
  --tdf-yellow-glow: rgba(255, 229, 0, 0.15);
  
  --tdf-green: #00E676;
  --tdf-green-glow: rgba(0, 230, 118, 0.15);
  
  --tdf-red: #FF3D00;
  --tdf-red-glow: rgba(255, 61, 0, 0.15);
  
  --tdf-white: #FFFFFF;
  --tdf-white-glow: rgba(255, 255, 255, 0.15);
  
  --sidebar-width: 280px;
  --nav-height: 70px;
  
  --transition-speed: 0.3s;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  overflow-x: hidden;
  height: 100vh;
  display: flex;
}

/* App Container Layout */
.app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* Glassmorphic Sidebar (Desktop / Landscape iPad) */
.sidebar {
  width: var(--sidebar-width);
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--panel-border);
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem;
  z-index: 100;
  flex-shrink: 0;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--tdf-yellow);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px var(--tdf-yellow-glow);
}

.logo-text {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #FFF, #FFE500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
}

/* Navigation Links */
.nav-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
}

.nav-item {
  width: 100%;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  color: var(--text-muted);
  text-decoration: none;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 12px;
  transition: all var(--transition-speed) ease;
  border: 1px solid transparent;
  cursor: pointer;
}

.nav-link svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  transition: transform var(--transition-speed) ease;
}

.nav-link:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}

.nav-link:hover svg {
  transform: translateX(3px);
}

.nav-link.active {
  color: var(--tdf-yellow);
  background: rgba(255, 229, 0, 0.08);
  border-color: rgba(255, 229, 0, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Sidebar Leaderboard Widget */
.sidebar-widget {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 16px;
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.03);
  margin-top: auto;
}

.widget-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.widget-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.widget-row:last-child {
  margin-bottom: 0;
}

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

.dot-yellow { background: var(--tdf-yellow); box-shadow: 0 0 8px var(--tdf-yellow); }
.dot-green { background: var(--tdf-green); box-shadow: 0 0 8px var(--tdf-green); }
.dot-red { background: var(--tdf-red); box-shadow: 0 0 8px var(--tdf-red); }
.dot-white { background: var(--tdf-white); box-shadow: 0 0 8px var(--tdf-white); }

.widget-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main Content Area */
.main-content {
  flex-grow: 1;
  height: 100vh;
  overflow-y: auto;
  padding: 2.5rem;
  padding-bottom: 6rem; /* extra spacing for mobile navbar */
  display: flex;
  flex-direction: column;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
}

.header-title h1 {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 2.25rem;
  letter-spacing: -0.5px;
}

.header-title p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

.live-time-badge {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.live-indicator {
  width: 8px;
  height: 8px;
  background: var(--tdf-green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--tdf-green);
  animation: pulse 1.5s infinite;
}

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

/* Tab Content Visibility */
.tab-content {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

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

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

/* Dashboard View Styles */
.jersey-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.jersey-card {
  border-radius: 24px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  min-height: 180px;
  display: flex;
  flex-direction: column;
}

.jersey-card:hover {
  transform: translateY(-5px);
}

.jersey-card-bg {
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 120px;
  height: 120px;
  opacity: 0.15;
  pointer-events: none;
}

.jersey-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.jersey-badge {
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.jersey-card.yellow {
  background: linear-gradient(135deg, rgba(255, 229, 0, 0.12), rgba(0, 0, 0, 0.4));
  border-color: rgba(255, 229, 0, 0.25);
}
.jersey-card.yellow:hover {
  box-shadow: 0 15px 35px rgba(255, 229, 0, 0.1);
}
.jersey-card.yellow .jersey-badge {
  background: var(--tdf-yellow);
  color: #000;
}

.jersey-card.green {
  background: linear-gradient(135deg, rgba(0, 230, 118, 0.12), rgba(0, 0, 0, 0.4));
  border-color: rgba(0, 230, 118, 0.25);
}
.jersey-card.green:hover {
  box-shadow: 0 15px 35px rgba(0, 230, 118, 0.1);
}
.jersey-card.green .jersey-badge {
  background: var(--tdf-green);
  color: #000;
}

.jersey-card.red {
  background: linear-gradient(135deg, rgba(255, 61, 0, 0.12), rgba(0, 0, 0, 0.4));
  border-color: rgba(255, 61, 0, 0.25);
}
.jersey-card.red:hover {
  box-shadow: 0 15px 35px rgba(255, 61, 0, 0.1);
}
.jersey-card.red .jersey-badge {
  background: var(--tdf-red);
  color: #FFF;
}

.jersey-card.white {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.4));
  border-color: rgba(255, 255, 255, 0.2);
}
.jersey-card.white:hover {
  box-shadow: 0 15px 35px rgba(255, 255, 255, 0.05);
}
.jersey-card.white .jersey-badge {
  background: var(--tdf-white);
  color: #000;
}

.jersey-leader-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  margin-top: auto;
}

.jersey-leader-team {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Secondary Panels */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

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

.panel-card {
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  padding: 1.75rem;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.panel-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
}

/* Progress indicator on Dashboard */
.progress-widget {
  margin-bottom: 2rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.progress-bar-bg {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--tdf-yellow), var(--tdf-green));
  border-radius: 50px;
  transition: width 1s ease-out;
}

/* Recent Results Feed */
.feed-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feed-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  transition: all 0.2s ease;
}

.feed-item:hover {
  background: var(--card-hover);
}

.feed-stage-badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.badge-flat { background: rgba(0, 230, 118, 0.15); color: var(--tdf-green); border: 1px solid rgba(0, 230, 118, 0.2); }
.badge-mountain { background: rgba(255, 61, 0, 0.15); color: var(--tdf-red); border: 1px solid rgba(255, 61, 0, 0.2); }
.badge-hilly { background: rgba(255, 229, 0, 0.15); color: var(--tdf-yellow); border: 1px solid rgba(255, 229, 0, 0.2); }
.badge-time { background: rgba(0, 229, 255, 0.15); color: #00E5FF; border: 1px solid rgba(0, 229, 255, 0.2); }

.feed-details {
  flex-grow: 1;
}

.feed-route {
  font-weight: 600;
  font-size: 0.95rem;
}

.feed-winner {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.feed-winner strong {
  color: var(--text-main);
}

/* Stages View Styles */
.filters-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.filter-btn.active {
  background: var(--tdf-yellow);
  color: #000;
  border-color: var(--tdf-yellow);
}

.stages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.stage-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.stage-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.15);
  background: var(--card-hover);
}

.stage-card::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
}

.stage-card.flat::after { background: var(--tdf-green); }
.stage-card.mountain::after { background: var(--tdf-red); }
.stage-card.hilly::after { background: var(--tdf-yellow); }
.stage-card.ttt::after, .stage-card.itt::after { background: #00E5FF; }

.stage-card-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.stage-num {
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
}

.stage-type-label {
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.type-flat { background: rgba(0, 230, 118, 0.15); color: var(--tdf-green); }
.type-mountain { background: rgba(255, 61, 0, 0.15); color: var(--tdf-red); }
.type-hilly { background: rgba(255, 229, 0, 0.15); color: var(--tdf-yellow); }
.type-time { background: rgba(0, 229, 255, 0.15); color: #00E5FF; }

.stage-route {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.stage-stats {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.stage-winner-tag {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.winner-name {
  font-weight: 600;
  color: var(--tdf-yellow);
}

.unfinished-tag {
  color: var(--text-muted);
  font-style: italic;
}

/* Modals / Side Panels (Fidelity UI) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.modal-container {
  background: #0D1322;
  border: 1px solid var(--panel-border);
  border-radius: 28px;
  width: 90%;
  max-width: 650px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 2rem;
}

.modal-overlay.active .modal-container {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(90deg);
}

.modal-header {
  margin-bottom: 1.5rem;
}

.modal-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

/* SVG Chart styled for Elevation Profile */
.elevation-chart-container {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 16px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.elevation-chart-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  font-weight: 600;
}

.elevation-svg {
  width: 100%;
  height: 120px;
  overflow: visible;
}

.favorites-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.favorite-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.favorite-rank {
  font-weight: 700;
  color: var(--tdf-yellow);
}

/* Teams and Riders Styles */
.search-container {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.search-input-wrapper {
  position: relative;
  flex-grow: 1;
}

.search-input {
  width: 100%;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 0.85rem 1rem 0.85rem 2.75rem;
  color: var(--text-main);
  font-size: 0.95rem;
  transition: all 0.2s ease;
  font-family: inherit;
}

.search-input:focus {
  outline: none;
  border-color: var(--tdf-yellow);
  box-shadow: 0 0 15px rgba(255, 229, 0, 0.05);
}

.search-icon-svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.team-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.team-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.team-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.team-jersey-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  color: #FFF;
}

.team-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
}

.team-country {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.team-riders-preview {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rider-preview-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.rider-preview-name {
  font-weight: 600;
}

.rider-preview-role {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Roster Modal Styles */
.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.rider-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.rider-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1rem;
}

.rider-role {
  font-size: 0.8rem;
  color: var(--tdf-yellow);
  font-weight: 600;
}

.rider-type {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.rider-nationality {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: auto;
  align-self: flex-end;
}

/* Rules / Watcher's Guide Styles */
.guide-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

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

.guide-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.guide-rule-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  padding: 1.5rem;
}

.guide-rule-card h3 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.guide-rule-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Admin panel styles */
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.form-group label {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.form-control {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--panel-border);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--tdf-yellow);
}

.btn-primary {
  background: var(--tdf-yellow);
  color: #000;
  border: none;
  padding: 0.85rem 1.5rem;
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.btn-primary:hover {
  box-shadow: 0 0 15px rgba(255, 229, 0, 0.3);
  transform: translateY(-1px);
}

/* Bottom Nav Menu (Mobile / Portrait iPad) */
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: var(--nav-height);
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-top: 1px solid var(--panel-border);
  display: none;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  padding: 0 1rem;
}

.mobile-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease;
}

.mobile-nav-link svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.mobile-nav-link.active {
  color: var(--tdf-yellow);
}

/* Tablet Layout: iPad View (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .sidebar {
    width: 80px;
    padding: 2rem 0.5rem;
    align-items: center;
  }
  .logo-container {
    justify-content: center;
    gap: 0;
    margin-bottom: 2rem;
  }
  .logo-text,
  .logo-sub,
  .nav-text,
  .sidebar-widget {
    display: none;
  }
  .nav-link {
    justify-content: center;
    padding: 0.85rem;
  }
  .nav-link:hover svg {
    transform: none;
  }
  .mobile-nav {
    display: none;
  }
  .main-content {
    padding: 2rem;
  }
}

/* Mobile Layout (width < 768px) */
@media (max-width: 767px) {
  .sidebar {
    display: none;
  }
  .mobile-nav {
    display: flex;
  }
  .main-content {
    padding: 1.5rem;
    padding-bottom: calc(var(--nav-height) + 2rem);
  }
}

/* Route Map Timeline & Markers */
.route-map-container {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 20px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.route-map-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.route-line-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
  position: relative;
  padding: 0 0.5rem;
}

.route-start-label, .route-end-label {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.route-line {
  height: 6px;
  background: linear-gradient(90deg, var(--tdf-yellow), #38bdf8);
  border-radius: 10px;
  flex-grow: 1;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

.route-endpoint {
  width: 12px;
  height: 12px;
  background: #FFF;
  border: 3px solid var(--bg-color);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
}
.route-endpoint.start { background: var(--tdf-yellow); box-shadow: 0 0 10px var(--tdf-yellow); }
.route-endpoint.end { background: #38bdf8; box-shadow: 0 0 10px #38bdf8; }

.poi-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.poi-marker:hover {
  transform: translate(-50%, -50%) scale(1.3);
  background: rgba(255, 255, 255, 0.1);
  border-color: #FFF;
  z-index: 100;
}

.poi-marker-icon {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.poi-marker.poi-climb { border-color: var(--tdf-red); box-shadow: 0 0 8px var(--tdf-red-glow); }
.poi-marker.poi-sprint { border-color: var(--tdf-green); box-shadow: 0 0 8px var(--tdf-green-glow); }
.poi-marker.poi-feed { border-color: #94a3b8; box-shadow: 0 0 8px rgba(148, 163, 184, 0.3); }

/* Marker Tooltips */
.poi-marker-tooltip {
  position: absolute;
  bottom: 140%;
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  font-size: 0.75rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  z-index: 200;
}

.poi-marker-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: #0f172a transparent transparent transparent;
}

.poi-marker:hover .poi-marker-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* POI List Layout */
.poi-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1.25rem;
}

.poi-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  transition: all 0.2s ease;
}

.poi-list-item:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

.poi-list-marker-info {
  display: flex;
  align-items: center;
}

.poi-list-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
}

.poi-list-type {
  font-weight: 600;
  letter-spacing: 0.5px;
}

.poi-list-km-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}
