/* Design System and Token Definitions */
:root {
  /* Colors */
  --brand-blue: #007AFF;
  --ride-cyan: #00C7D9;
  --fresh-green: #34C759;
  --mint-route: #00C7BE;
  --heart-pink: #FF2D55;
  --stop-red: #FF3B30;
  --energy-orange: #FF9500;
  --weather-yellow: #FFD60A;
  --setup-indigo: #5856D6;
  
  --sky-light: #F0F7FF;
  --sky-mid: #C7E0F5;
  --sky-soft: #E0F0FA;
  
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-shadow: rgba(0, 74, 150, 0.05);
  
  --text-primary: #1C1C1E;
  --text-secondary: #636366;
  --text-tertiary: #8E8E93;
  
  /* Layout tokens */
  --border-radius-sm: 12px;
  --border-radius-md: 20px;
  --border-radius-lg: 32px;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hidden {
  display: none !important;
}

/* Base resets & styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  background-color: var(--sky-light);
}

body {
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Background gradient details */
.sky-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(180deg, var(--sky-light) 0%, var(--sky-soft) 50%, var(--sky-mid) 100%);
  z-index: -10;
}

/* Typography styles */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.text-gradient {
  background: linear-gradient(135deg, var(--brand-blue) 0%, var(--ride-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.font-rounded {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Custom premium scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 122, 255, 0.15);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 122, 255, 0.3);
}

/* Glassmorphism styling */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  box-shadow: 0 8px 32px 0 var(--glass-shadow);
  padding: 24px;
}

.glass-card {
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-sm);
  box-shadow: 0 4px 16px 0 var(--glass-shadow);
  padding: 16px;
  transition: var(--transition-smooth);
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px 0 rgba(0, 74, 150, 0.08);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: var(--border-radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-blue) 0%, #0062cc 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(0, 122, 255, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 16px 28px;
  border-radius: var(--border-radius-md);
  font-size: 1.05rem;
}

.btn-lg .btn-subtext {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.8;
  margin-bottom: -2px;
}

.btn-lg .btn-maintext {
  font-size: 1.15rem;
  font-weight: 700;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 40px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  width: fit-content;
}

.badge-brand {
  background: rgba(0, 122, 255, 0.1);
  color: var(--brand-blue);
  border: 1px solid rgba(0, 122, 255, 0.15);
}

.badge-primary {
  background: rgba(0, 199, 217, 0.1);
  color: var(--ride-cyan);
  border: 1px solid rgba(0, 199, 217, 0.15);
}

.badge-secondary {
  background: rgba(142, 142, 147, 0.1);
  color: var(--text-secondary);
}

/* Header */
.header {
  position: sticky;
  top: 16px;
  margin: 16px 4%;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px;
  border-radius: var(--border-radius-md);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--brand-blue);
}

.logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.logo-text {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--brand-blue) 0%, var(--ride-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.nav-links a:hover {
  color: var(--brand-blue);
}

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

/* Hero Section */
.hero-section {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 60px;
  max-width: 1300px;
  margin: 40px auto 80px;
  padding: 0 4%;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-title {
  font-size: 3.8rem;
  line-height: 1.1;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.hero-tag {
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--glass-border);
  padding: 8px 16px;
  border-radius: 40px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Cockpit Simulator Layout */
.hero-visual {
  display: flex;
  justify-content: center;
}

.cockpit-container {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 20px;
  padding: 40px 0;
}

/* iPhone Device Mockup */
.iphone-frame {
  position: relative;
  width: 320px;
  height: 640px;
  background: #09090b;
  border: 10px solid #27272a;
  border-radius: 48px;
  padding: 8px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  z-index: 10;
  overflow: hidden;
}

.iphone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 25px;
  background: #000000;
  border-radius: 20px;
  z-index: 20;
}

.iphone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: #EAEAEA;
  border-radius: 36px;
  overflow: hidden;
}

/* Dashboard App Layout inside iPhone */
.dash-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: linear-gradient(180deg, #F0F6FC 0%, #D8E6F5 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Map canvas container */
.dash-map-container {
  position: relative;
  flex-grow: 1;
  background: #EAF2FA;
  overflow: hidden;
}

.map-grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}

.map-vector {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Map items */
.map-floating-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
  z-index: 15;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.map-floating-card.top-left {
  top: 40px;
  left: 10px;
}

.map-floating-card.top-right {
  top: 40px;
  right: 10px;
}

.map-floating-card.bottom-right {
  bottom: 12px;
  right: 10px;
}

.mfc-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  flex-shrink: 0;
}

.mfc-icon.green-bg {
  background: var(--fresh-green);
}

.mfc-icon.pink-bg {
  background: var(--heart-pink);
}

.mfc-icon.orange-bg {
  background: var(--energy-orange);
}

.mfc-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.mfc-label {
  font-size: 0.55rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.mfc-value {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
}

.mfc-unit {
  font-size: 0.55rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.map-legal-label {
  position: absolute;
  bottom: 6px;
  left: 10px;
  font-size: 0.55rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.35);
  pointer-events: none;
  z-index: 12;
}

.weather-icon {
  animation: rotateSlowly 8s linear infinite;
}

/* Nav banner inside map */
.nav-banner {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 16px;
  z-index: 15;
  background: rgba(255, 255, 255, 0.85);
  border-left: 5px solid var(--brand-blue);
  animation: slideInBottom 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-banner-icon {
  background: var(--brand-blue);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.nav-banner-text {
  flex-grow: 1;
}

.nav-prompt {
  font-weight: 700;
  font-size: 0.8rem;
}

.nav-distance-remaining {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.nav-cancel-btn {
  background: rgba(0, 0, 0, 0.05);
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.nav-cancel-btn:hover {
  background: rgba(255, 59, 48, 0.15);
  color: var(--stop-red);
}

/* Metrics dashboard grid */
.dash-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 10px 12px 6px 12px;
  align-content: start;
}

.dash-metrics-grid .metric-card {
  background: #FFFFFF;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 12px rgba(0, 74, 150, 0.02);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100px;
  transition: var(--transition-smooth);
}

.dash-metrics-grid .metric-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 74, 150, 0.04);
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.metric-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.card-icon-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.card-icon-circle.blue-circle {
  background: rgba(0, 122, 255, 0.08);
  color: var(--brand-blue);
}

.card-icon-circle.green-circle {
  background: rgba(52, 199, 89, 0.1);
  color: var(--fresh-green);
}

.card-icon-circle.yellow-circle {
  background: rgba(255, 214, 10, 0.15);
  color: #B59300;
}

.card-value-container {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin-top: 4px;
}

.dash-metrics-grid .metric-value {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}

.metric-unit-suffix {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.card-pill {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.62rem;
  font-weight: 600;
  width: fit-content;
  margin-top: auto;
}

.card-pill.blue-pill {
  background: rgba(0, 122, 255, 0.08);
  color: var(--brand-blue);
}

.card-pill.yellow-pill {
  background: rgba(255, 149, 0, 0.08);
  color: #B25E00;
}

/* Dashboard controls bar */
.dash-controls-bar {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 28px;
  padding: 10px 18px;
  margin: 6px 12px 14px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 15px rgba(0, 74, 150, 0.04);
}

.control-round-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: var(--transition-bounce);
}

.control-round-btn:active {
  transform: scale(0.9);
}

.btn-nav-trigger {
  background: rgba(0, 122, 255, 0.12);
  color: #1C1C1E;
}

.btn-nav-trigger:hover {
  background: rgba(0, 122, 255, 0.2);
}

.btn-action-play {
  width: 52px;
  height: 52px;
  background: var(--brand-blue);
  color: white;
  box-shadow: 0 4px 10px rgba(0, 122, 255, 0.2);
}

.btn-action-play:hover {
  background: #006ce6;
}

.btn-action-pause {
  width: 52px;
  height: 52px;
  background: var(--energy-orange);
  color: white;
  box-shadow: 0 4px 10px rgba(255, 149, 0, 0.2);
}

.btn-action-flag {
  background: rgba(142, 142, 147, 0.15);
  color: #1C1C1E;
}

.btn-action-flag:hover {
  background: rgba(142, 142, 147, 0.25);
}

/* Apple Watch Companion Device Mockup */
.watch-frame {
  position: absolute;
  right: -50px;
  bottom: 30px;
  width: 170px;
  height: 210px;
  background: #000000;
  border: 6px solid #27272a;
  border-radius: 36px;
  padding: 6px;
  box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.4);
  z-index: 15;
  overflow: hidden;
  transform: rotate(4deg);
  transition: var(--transition-smooth);
}

.watch-frame:hover {
  transform: rotate(0deg) scale(1.05);
}

.watch-screen {
  width: 100%;
  height: 100%;
  background: #000000;
  border-radius: 26px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
}

.watch-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.watch-time {
  font-size: 0.65rem;
  color: #FFFFFF;
}

.watch-health-icon {
  font-size: 0.65rem;
}

.watch-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.watch-status {
  font-size: 0.55rem;
  font-weight: 800;
  color: var(--fresh-green);
  text-align: center;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.watch-metrics {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex-grow: 1;
}

.watch-tile {
  background: #1C1C1E;
  border-radius: 8px;
  padding: 4px 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.watch-tile-label {
  font-size: 0.4rem;
  font-weight: 700;
  color: #8E8E93;
}

.watch-tile-val {
  font-size: 0.85rem;
  font-weight: 700;
}

.watch-tile-unit {
  font-size: 0.4rem;
  color: #8E8E93;
  margin-left: 2px;
}

/* Sections containers */
.section-container {
  max-width: 1100px;
  margin: 0 auto 100px;
  padding: 0 4%;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.section-title {
  font-size: 2.5rem;
  color: var(--text-primary);
}

.section-lead {
  font-size: 1.1rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* Features interactive layout */
.feature-interactive-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
}

.interactive-control-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel-desc {
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

/* Form Styles */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.input-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.search-input-wrapper {
  position: relative;
  width: 100%;
}

.text-input, .select-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--border-radius-sm);
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition-smooth);
}

.text-input:focus, .select-input:focus {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

.search-clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-tertiary);
  cursor: pointer;
}

/* Search Dropdown */
.search-suggestions-dropdown {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--border-radius-sm);
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  z-index: 50;
  display: flex;
  flex-direction: column;
}

.suggestion-item {
  padding: 12px 16px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 10px;
}

.suggestion-item:hover {
  background: var(--sky-light);
  color: var(--brand-blue);
}

/* Quick Route selection list */
.quick-routes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quick-route-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--border-radius-sm);
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.quick-route-card:hover, .quick-route-card.active {
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--brand-blue);
  transform: translateX(4px);
}

.qr-icon {
  font-size: 1.5rem;
}

.qr-title {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
}

.qr-metrics {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Toggle Switch */
.toggle-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.toggle-switch input {
  display: none;
}

.slider {
  position: relative;
  width: 46px;
  height: 24px;
  background-color: rgba(142, 142, 147, 0.25);
  border-radius: 34px;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: .4s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

input:checked + .slider {
  background-color: var(--fresh-green);
}

input:checked + .slider:before {
  transform: translateX(22px);
}

.toggle-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Feature Showcase Card Grid */
.feature-showcase-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.feature-highlight-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.fh-icon-circle {
  background: rgba(0, 122, 255, 0.1);
  color: var(--brand-blue);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.feature-highlight-card h4 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.feature-highlight-card p {
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

/* History / Workouts Simulator Grid */
.history-routes-simulator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.history-routes-simulator-grid #workout-details-sheet {
  grid-column: span 1;
}

.history-routes-simulator-grid #routes {
  grid-column: span 2;
}

.panel-header-with-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.workout-history-list, .saved-routes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
  max-height: 350px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Workout Cards */
.workout-history-item, .saved-route-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-radius: var(--border-radius-sm);
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.workout-history-item:hover, .workout-history-item.active,
.saved-route-item:hover, .saved-route-item.active {
  background: rgba(255, 255, 255, 0.75);
  border-color: var(--brand-blue);
}

.wh-main, .sr-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wh-title, .sr-title {
  font-weight: 700;
  font-size: 1rem;
}

.wh-date, .sr-date {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.wh-meta, .sr-meta {
  display: flex;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Details Sheet */
.workout-details-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px 0;
  min-height: 250px;
}

.workout-details-content.empty-state {
  justify-content: center;
  align-items: center;
  color: var(--text-tertiary);
  text-align: center;
  gap: 10px;
}

.details-top {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.details-date {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.details-summary-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  background: rgba(0, 0, 0, 0.02);
  padding: 16px;
  border-radius: var(--border-radius-sm);
  text-align: center;
}

.d-metric {
  display: flex;
  flex-direction: column;
}

.dm-val {
  font-size: 1.4rem;
  color: var(--brand-blue);
}

.dm-lbl {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.details-workout-notes textarea {
  resize: none;
}

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

.details-actions button {
  flex: 1;
}

/* Saved Route action layout */
.saved-route-actions {
  display: flex;
  gap: 8px;
}

.btn-route-action {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.btn-route-action:hover {
  background: rgba(0, 122, 255, 0.1);
  color: var(--brand-blue);
  border-color: var(--brand-blue);
}

.btn-route-action.btn-delete-route:hover {
  background: rgba(255, 59, 48, 0.1);
  color: var(--stop-red);
  border-color: var(--stop-red);
}

/* Bluetooth Sensors Scanner layout */
.sensors-layout-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 30px;
}

.sensor-status-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
}

.sensor-status-dot:before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.sensor-status-dot.offline:before {
  background: var(--text-tertiary);
}

.sensor-status-dot.scanning {
  color: var(--setup-indigo);
}

.sensor-status-dot.scanning:before {
  background: var(--setup-indigo);
  animation: pulseOpacity 1s infinite ease-in-out;
}

.sensor-status-dot.online {
  color: var(--fresh-green);
}

.sensor-status-dot.online:before {
  background: var(--fresh-green);
}

.sensor-scan-spinner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(88, 86, 214, 0.05);
  border: 1px dashed rgba(88, 86, 214, 0.25);
  border-radius: var(--border-radius-sm);
  color: var(--setup-indigo);
  font-size: 0.85rem;
  font-weight: 600;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(88, 86, 214, 0.2);
  border-top-color: var(--setup-indigo);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.discovered-sensors-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Bluetooth Accessory Card */
.sensor-device-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-radius: var(--border-radius-sm);
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid var(--glass-border);
  transition: var(--transition-smooth);
}

.sensor-dev-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sensor-dev-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.sensor-dev-type {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-weight: 600;
  text-transform: uppercase;
}

.sensors-guide-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sensor-types-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sensor-type-card h5 {
  font-size: 1rem;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sensor-type-card p {
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

/* Modal dialog custom styling */
dialog#settings-dialog {
  margin: auto;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 25px 80px rgba(0, 74, 150, 0.15);
  max-width: 480px;
  width: 90%;
  color: var(--text-primary);
  padding: 28px;
  outline: none;
  border: 1px solid rgba(255, 255, 255, 0.5);
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

dialog#settings-dialog[open] {
  opacity: 1;
  transform: scale(1);
}

dialog#settings-dialog::backdrop {
  background: rgba(0, 74, 150, 0.15);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

dialog#settings-dialog[open]::backdrop {
  opacity: 1;
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dialog-header h3 {
  font-size: 1.35rem;
  color: var(--text-primary);
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background-color 0.2s;
}

.close-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
}

.close-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.settings-dialog-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-pill-row {
  display: flex;
  background: rgba(0, 0, 0, 0.04);
  padding: 4px;
  border-radius: 12px;
  gap: 4px;
}

.pill-option {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.pill-option.active {
  background: white;
  color: var(--brand-blue);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.select-wrapper {
  position: relative;
}

.select-input {
  appearance: none;
  cursor: pointer;
}

/* Privacy card panel */
.privacy-section {
  max-width: 900px;
}

.privacy-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px;
}

.privacy-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.privacy-icon {
  font-size: 2.2rem;
}

.privacy-card h3 {
  font-size: 1.5rem;
}

.privacy-card p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.permissions-checklist {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 10px;
}

.permission-check {
  display: flex;
  gap: 12px;
}

.pc-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.permission-check strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.permission-check p {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

/* Footer & closing CTA */
.footer-cta-section {
  padding: 60px 4% 30px;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.footer-cta-content {
  text-align: center;
  padding: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.4) 100%);
}

.footer-cta-content h2 {
  font-size: 2.2rem;
}

.footer-cta-content p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 500px;
}

.footer {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding-top: 30px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-tertiary);
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-tertiary);
  transition: var(--transition-smooth);
}

.footer-links a:hover {
  color: var(--brand-blue);
}

/* Animations */
@keyframes rotateSlowly {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

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

@keyframes pulseOpacity {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

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

.heart-pulse-icon {
  display: inline-block;
  animation: heartPulse 1.2s infinite cubic-bezier(0.215, 0.610, 0.355, 1);
}

@keyframes heartPulse {
  0% { transform: scale(1); }
  14% { transform: scale(1.15); }
  28% { transform: scale(1); }
  42% { transform: scale(1.15); }
  70% { transform: scale(1); }
}

/* Responsive breakdowns */
@media (max-width: 1024px) {
  .hero-section {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .hero-content {
    align-items: center;
  }
  .hero-title {
    font-size: 3rem;
  }
  .feature-interactive-grid {
    grid-template-columns: 1fr;
  }
  .sensors-layout-grid {
    grid-template-columns: 1fr;
  }
  .history-routes-simulator-grid {
    grid-template-columns: 1fr;
  }
  .history-routes-simulator-grid #workout-details-sheet {
    grid-column: span 1;
  }
  .history-routes-simulator-grid #routes {
    grid-column: span 1;
  }
  .permissions-checklist {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }
}
