/*


 */

/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: #0a0a0b;
  color: #e4e4e7;
  min-height: 100vh;
  line-height: 1.6;
}

/* ===== Background Gradient ===== */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
  z-index: -1;
  animation: bgShift 20s ease-in-out infinite alternate;
}

@keyframes bgShift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-5%, 3%); }
}

/* ===== Layout ===== */
.page-container {
  max-width: 640px;
  margin: 0 auto;
  padding: 80px 24px 60px;
  animation: fadeUp 0.6s ease-out;
}

.page-container--wide {
  max-width: 720px;
}

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

/* ===== Typography ===== */
.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 8px;
}

.page-subtitle {
  color: #71717a;
  font-size: 1.05rem;
  margin-bottom: 40px;
  line-height: 1.5;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: #d4d4d8;
}

/* ===== Glass Card ===== */
.glass-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 32px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ===== Form ===== */
.commute-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #a1a1aa;
  letter-spacing: 0.01em;
}

.form-input,
.form-select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: #e4e4e7;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.2s ease;
  outline: none;
}

.form-input::placeholder {
  color: #52525b;
}

.form-input:focus,
.form-select:focus {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  background: rgba(255, 255, 255, 0.06);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2371717a' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.form-select option {
  background: #18181b;
  color: #e4e4e7;
}

/* ===== Errors ===== */
.form-errors {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 12px;
  padding: 14px 18px;
  color: #fca5a5;
  font-size: 0.9rem;
}

.form-errors p {
  margin: 4px 0;
}

/* ===== Button ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
  letter-spacing: -0.01em;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

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

/* ===== Route Header ===== */
.route-header {
  margin-bottom: 36px;
}

.route-cities {
  font-size: 1.1rem;
  color: #d4d4d8;
  margin-bottom: 6px;
}

.route-cities strong {
  color: #f4f4f5;
}

.route-arrow {
  display: inline-block;
  margin: 0 8px;
  color: #6366f1;
}

.route-meta {
  font-size: 0.9rem;
  color: #71717a;
}

/* ===== Suggestion Cards ===== */
.suggestions-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
}

.suggestion-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  transition: all 0.2s ease;
}

.suggestion-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(129, 140, 248, 0.2);
  transform: translateX(4px);
  box-shadow: 0 4px 20px rgba(99,102,241,0.08);
}

.suggestion-emoji {
  font-size: 1.75rem;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
}

.suggestion-photo {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3), 0 0 20px rgba(99,102,241,0.15);
  border: 1px solid rgba(255,255,255,0.15);
}

.suggestion-photo-emoji {
  font-size: 2.2rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.suggestion-body {
  flex: 1;
  min-width: 0;
}

.suggestion-name {
  font-weight: 600;
  color: #f4f4f5;
  font-size: 1rem;
}

.suggestion-category {
  color: #6366f1;
  font-size: 0.8rem;
  font-weight: 500;
  margin-left: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.suggestion-desc {
  color: #a1a1aa;
  font-size: 0.925rem;
  margin-top: 4px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.suggestion-meta {
  font-size: 0.8rem;
  color: #52525b;
  margin-top: 6px;
}

/* ===== Back Link ===== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 36px;
  color: #6366f1;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}

.back-link:hover {
  color: #8b5cf6;
}

/* ===== Map-UI Harmony: tint light tiles to blend with dark chrome ===== */
#map {
  /* Slightly desaturate + darken Voyager tiles so they don't blow out against dark UI */
  filter: brightness(0.88) saturate(0.88) contrast(1.05);
}
/* Vignette overlay softens map edges into dark UI */
#map::after {
  content: '';
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 50%, rgba(10,10,11,0.45) 100%),
    linear-gradient(to bottom, rgba(10,10,11,0.7) 0%, transparent 12%),
    linear-gradient(to top,    rgba(10,10,11,0.6) 0%, transparent 15%);
}

/* ===== Leaflet Map Styling ===== */

/* ===== Route Map ===== */
.route-map {
  height: 400px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 32px;
  background: rgba(255, 255, 255, 0.03);
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .page-container {
    padding: 48px 18px 40px;
  }

  .page-title {
    font-size: 2rem;
  }

  .glass-card {
    padding: 24px 20px;
  }

  .suggestion-card {
    padding: 14px 16px;
  }
}

/* ===== Hero Section ===== */
.hero-section {
  text-align: center;
  padding: 20px 0 10px;
  animation: fadeUp 0.8s ease-out;
}

.hero-title {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: linear-gradient(135deg, #818cf8, #c084fc, #f472b6, #fb923c, #818cf8);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease-in-out infinite;
  margin-bottom: 12px;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-subtitle {
  color: #a1a1aa;
  font-size: 1.15rem;
  margin-bottom: 32px;
}

/* ===== Popular Routes ===== */
.popular-routes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 32px;
}

@media (max-width: 600px) {
  .popular-routes {
    grid-template-columns: 1fr;
  }
}

.route-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  animation: fadeUp 0.6s ease-out both;
}

.route-card:nth-child(1) { animation-delay: 0.1s; }
.route-card:nth-child(2) { animation-delay: 0.2s; }
.route-card:nth-child(3) { animation-delay: 0.3s; }
.route-card:nth-child(4) { animation-delay: 0.4s; }

.route-card:hover {
  transform: translateY(-4px);
  border-color: rgba(129, 140, 248, 0.3);
  box-shadow: 0 8px 32px rgba(129, 140, 248, 0.12);
  background: rgba(255, 255, 255, 0.07);
}

.route-card--selected {
  border-color: rgba(129, 140, 248, 0.6) !important;
  box-shadow: 0 0 20px rgba(129, 140, 248, 0.2), inset 0 0 20px rgba(129, 140, 248, 0.05) !important;
  background: rgba(129, 140, 248, 0.08) !important;
}

.route-card-emoji {
  font-size: 2rem;
  flex-shrink: 0;
}

.route-card-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #e4e4e7;
  margin-bottom: 4px;
}

.route-card-vibe {
  font-size: 0.82rem;
  color: #71717a;
  line-height: 1.4;
  margin-bottom: 4px;
}

.route-card-time {
  font-size: 0.78rem;
  color: #818cf8;
  font-weight: 500;
}

/* ===== Transport Selector ===== */
.transport-selector {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.transport-option {
  flex: 1;
  min-width: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.transport-option:hover {
  border-color: rgba(129, 140, 248, 0.3);
  background: rgba(255, 255, 255, 0.06);
}

.transport-option:has(.transport-radio:checked) {
  border-color: rgba(129, 140, 248, 0.6);
  box-shadow: 0 0 16px rgba(129, 140, 248, 0.2);
  background: rgba(129, 140, 248, 0.08);
}

.transport-radio {
  display: none;
}

.transport-icon {
  font-size: 1.8rem;
}

.transport-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: #a1a1aa;
}

/* ===== Custom Route Toggle ===== */
.custom-route-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  cursor: pointer;
  color: #a1a1aa;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  margin-bottom: 12px;
}

.custom-route-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #e4e4e7;
}

.custom-route-section {
  animation: fadeUp 0.3s ease-out;
  margin-bottom: 8px;
}

/* ===== Discover Button ===== */
.btn-discover {
  width: 100%;
  padding: 18px 32px;
  font-size: 1.15rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, #818cf8, #c084fc, #f472b6);
  background-size: 200% 200%;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: gradientShift 3s ease-in-out infinite;
  letter-spacing: -0.01em;
}

.btn-discover:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(129, 140, 248, 0.3);
}

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

/* ===== MAP-FIRST UI ===== */

/* Top overlay */
.map-overlay-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  padding: 16px 20px;
  background: linear-gradient(to bottom, rgba(10,10,11,0.9) 0%, rgba(10,10,11,0.5) 60%, transparent 100%);
  display: flex; align-items: center; justify-content: space-between;
  pointer-events: none;
}
.map-overlay-top * { pointer-events: auto; }
.app-title { font-size: 1.8rem; font-weight: 900; color: white; letter-spacing: -0.01em; margin: 0; text-shadow: 0 2px 10px rgba(0,0,0,0.8), 0 0 20px rgba(99,102,241,0.4); }
.transport-selector-bar { display: flex; gap: 8px; }
.transport-btn {
  width: 48px; height: 48px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.12);
  background: rgba(20,20,30,0.55); backdrop-filter: blur(16px);
  font-size: 1.3rem; cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.transport-btn.active { border-color: #6366f1; background: rgba(99,102,241,0.2); box-shadow: 0 0 20px rgba(99,102,241,0.3); }
.transport-btn:hover { transform: scale(1.1); }

/* Instruction */
.map-instruction {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 10;
  background: rgba(0,0,0,0.85); backdrop-filter: blur(16px);
  padding: 16px 28px; border-radius: 100px;
  border: 1px solid rgba(99,102,241,0.35);
  color: white; font-size: 1rem; font-weight: 600;
  animation: pulse 2s ease-in-out infinite;
  pointer-events: none;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
}
@keyframes pulse { 0%,100% { opacity: 0.8; } 50% { opacity: 1; transform: translate(-50%,-50%) scale(1.02); } }

/* Popular routes bar */
.popular-routes-bar {
  position: fixed; bottom: 30px; left: 0; right: 0; z-index: 25;
  display: flex; gap: 10px; padding: 0 20px;
  overflow-x: auto; scrollbar-width: none;
}
.popular-routes-bar::-webkit-scrollbar { display: none; }
.route-chip {
  white-space: nowrap; padding: 10px 16px; border-radius: 100px;
  background: rgba(15,15,25,0.75); backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.15); color: white;
  font-size: 0.8rem; font-weight: 500; cursor: pointer; transition: all 0.3s;
  flex-shrink: 0; box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.route-chip:hover { background: rgba(99,102,241,0.2); border-color: #6366f1; transform: translateY(-2px); }
.route-chip.active { background: rgba(99,102,241,0.35); border-color: #818cf8; box-shadow: 0 0 12px rgba(99,102,241,0.3); }

/* Bottom sheet */
.bottom-sheet {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  background: rgba(8,8,16,0.96); backdrop-filter: blur(28px);
  border-top: 1px solid rgba(99,102,241,0.15);
  border-radius: 24px 24px 0 0;
  padding: 12px 24px 30px;
  max-height: 50vh; overflow-y: auto;
  transform: translateY(100%); transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
  box-shadow: 0 -8px 40px rgba(0,0,0,0.4);
}
.bottom-sheet.visible { transform: translateY(0); }
.sheet-handle { width: 40px; height: 4px; background: linear-gradient(90deg, #6366f1, #c084fc); border-radius: 2px; margin: 0 auto 16px; opacity: 0.7; }
.sheet-header h2 { font-size: 1.2rem; font-weight: 600; color: white; margin-bottom: 4px; }
.route-info { color: #71717a; font-size: 0.9rem; margin-bottom: 16px; }

/* Brand Card */
.brand-card-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 50;
  background: radial-gradient(ellipse at center, #1a1040 0%, #0a0a0b 70%);
  display: flex; align-items: center; justify-content: center;
  animation: brandExplodeIn 0.5s cubic-bezier(0.34,1.56,0.64,1);
  overflow: hidden;
}
.brand-card-overlay::before {
  content: ''; position: absolute; top: 50%; left: 50%; width: 300%; height: 300%;
  transform: translate(-50%,-50%);
  background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 60%);
  animation: brandRipple 1.5s ease-out;
}
@keyframes brandExplodeIn { from { opacity: 0; transform: scale(1.3); filter: blur(20px); } to { opacity: 1; transform: scale(1); filter: blur(0); } }
@keyframes brandRipple { from { transform: translate(-50%,-50%) scale(0); opacity: 1; } to { transform: translate(-50%,-50%) scale(1); opacity: 0; } }
.brand-card-inner {
  text-align: center; padding: 40px; position: relative; z-index: 1;
  animation: brandBounceIn 0.6s cubic-bezier(0.34,1.56,0.64,1) 0.1s both;
}
@keyframes brandBounceIn { from { opacity: 0; transform: scale(0.5) translateY(40px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.brand-logo { font-size: 5rem; margin-bottom: 20px; animation: brandPulse 2s ease-in-out infinite; }
@keyframes brandPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.brand-name {
  font-size: 2.8rem; font-weight: 800; letter-spacing: -0.03em;
  background: linear-gradient(135deg, #818cf8, #c084fc, #f472b6);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 12px;
}
.brand-tagline { color: #a1a1aa; font-size: 1.2rem; margin-bottom: 28px; }
.brand-divider {
  width: 60px; height: 3px; margin: 0 auto 28px;
  background: linear-gradient(90deg, #6366f1, #c084fc);
  border-radius: 2px;
}
.brand-cta {
  font-size: 1.1rem; font-weight: 600;
  color: white; background: linear-gradient(135deg, #6366f1, #8b5cf6);
  padding: 14px 40px; border-radius: 100px; display: inline-block;
  box-shadow: 0 4px 24px rgba(99,102,241,0.4);
  animation: ctaPulse 2s ease-in-out infinite;
}
@keyframes ctaPulse { 0%,100% { box-shadow: 0 4px 24px rgba(99,102,241,0.4); } 50% { box-shadow: 0 4px 32px rgba(139,92,246,0.6); } }
.brand-social-proof {
  color: #c4b5fd; font-size: 1rem; font-weight: 500; margin-bottom: 20px;
  animation: brandSlideUp 0.8s ease-out 0.6s both;
}
.brand-cta-btn {
  font-size: 1.6rem; font-weight: 800; color: white;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  padding: 22px 56px; border-radius: 100px; display: inline-block;
  box-shadow: 0 4px 24px rgba(34,197,94,0.4);
  animation: ctaPulseGreen 2s ease-in-out infinite, brandSlideUp 0.8s ease-out 0.8s both;
  letter-spacing: -0.01em;
}
@keyframes ctaPulseGreen { 0%,100% { box-shadow: 0 4px 24px rgba(34,197,94,0.5), 0 0 0 0 rgba(34,197,94,0.4); transform: scale(1); } 50% { box-shadow: 0 8px 48px rgba(34,197,94,0.8), 0 0 0 18px rgba(34,197,94,0); transform: scale(1.08); } }
.brand-stores {
  display: flex; gap: 16px; justify-content: center; margin-top: 16px;
  animation: brandSlideUp 0.8s ease-out 1s both;
}
.store-badge {
  color: #fff; font-size: 1.1rem; font-weight: 700;
  padding: 14px 28px; border: 2px solid rgba(255,255,255,0.3);
  border-radius: 14px; background: rgba(255,255,255,0.12);
  letter-spacing: 0.02em;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  transition: transform 0.2s ease;
}
.brand-stores {
  display: flex; gap: 16px; margin-top: 16px; justify-content: center;
}

/* Scene transitions */
.scene-fade { animation: sceneFade 0.6s ease-out; }
@keyframes sceneFade { from { opacity: 0; } to { opacity: 1; } }

/* Staggered suggestion cards */
.suggestion-card { opacity: 0; transform: translateY(12px); transition: opacity 0.35s ease, transform 0.35s ease; }
.suggestion-card.visible { opacity: 1; transform: translateY(0); }

/* POI list exit animation on route switch */
.suggestions-list.exiting .suggestion-card {
  opacity: 0 !important;
  transform: translateX(-30px) scale(0.95) !important;
  transition: opacity 0.25s ease, transform 0.25s ease !important;
}

/* Shimmer skeleton while loading new POIs */
.suggestion-skeleton {
  height: 72px;
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
  margin-bottom: 10px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Route name badge in sheet header */
.route-name-badge {
  display: inline-block;
  background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(139,92,246,0.2));
  border: 1px solid rgba(129,140,248,0.3);
  border-radius: 100px;
  padding: 4px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #c4b5fd;
  margin-bottom: 8px;
  animation: badgePop 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes badgePop { from { opacity:0; transform:scale(0.7); } to { opacity:1; transform:scale(1); } }

/* Route line draw animation via dasharray */
.leaflet-overlay-pane svg path.route-animate {
  stroke-dasharray: 3000;
  stroke-dashoffset: 3000;
  animation: drawRoute 1.2s ease-out forwards;
}
@keyframes drawRoute { to { stroke-dashoffset: 0; } }

/* Route chip crossfade */
.route-chip { transition: all 0.35s cubic-bezier(0.16,1,0.3,1); }

/* Bottom sheet smooth height */
.bottom-sheet { transition: transform 0.5s cubic-bezier(0.16,1,0.3,1); }

/* Map markers fade in */
.marker-pin { animation: markerPop 0.4s cubic-bezier(0.34,1.56,0.64,1) both; position: relative; }
@keyframes markerPop { from { opacity: 0; transform: scale(0.3); } to { opacity: 1; transform: scale(1); } }
.marker-pin:hover { transform: scale(1.15); transition: transform 0.2s ease; }
/* Sparkle ring removed for cleaner map */

/* Vibrant suggestion glow on hover */
.suggestion-card.visible {
  border-color: rgba(129,140,248,0.15);
}
.suggestion-card.visible:nth-child(odd) {
  border-left: 3px solid rgba(168,85,247,0.5);
}
.suggestion-card.visible:nth-child(even) {
  border-left: 3px solid rgba(99,102,241,0.5);
}
.suggestion-card.visible:hover {
  border-color: rgba(168,85,247,0.4);
  box-shadow: 0 4px 24px rgba(139,92,246,0.2), inset 0 0 20px rgba(99,102,241,0.03);
}

/* Animated glow behind route chips */
.route-chip.active::before {
  content: '';
  position: absolute; inset: -2px; border-radius: inherit;
  background: linear-gradient(135deg, #818cf8, #c084fc, #f472b6, #818cf8);
  background-size: 300% 300%;
  animation: chipGlow 2s ease-in-out infinite;
  z-index: -1; filter: blur(8px); opacity: 0.5;
}
.route-chip { position: relative; overflow: visible; }
@keyframes chipGlow { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* Vibrant bottom sheet gradient border */
.bottom-sheet.visible {
  border-top: 2px solid transparent;
  border-image: linear-gradient(90deg, #6366f1, #c084fc, #f472b6) 1;
}

/* Map zoom burst */
@keyframes mapZoomBurst {
  0% { transform: scale(1); }
  30% { transform: scale(1.08) rotate(0.3deg); }
  60% { transform: scale(0.98) rotate(-0.1deg); }
  100% { transform: scale(1) rotate(0deg); }
}
#map.zoom-burst { animation: mapZoomBurst 0.6s cubic-bezier(0.34,1.56,0.64,1); }

/* Route info counter animation */
.route-info-animated { animation: infoSlideIn 0.5s ease-out; }
@keyframes infoSlideIn { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }

/* Brand card improved transition */
.brand-card-overlay { opacity: 0; transform: scale(1.3); filter: blur(20px); transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.34,1.56,0.64,1), filter 0.4s ease; }
.brand-card-overlay.show { opacity: 1; transform: scale(1); filter: blur(0); }

/* Loading */
.loading-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 30;
  background: rgba(10,10,11,0.8); backdrop-filter: blur(8px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: white; gap: 16px;
}
.loading-spinner {
  width: 40px; height: 40px; border: 3px solid rgba(255,255,255,0.1);
  border-top-color: #6366f1; border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
