body {
  font-family: 'Inter', sans-serif;
  padding-bottom: 70px; /* Space for mobile navigation */
}

/* OpenStreetMap/Leaflet container */
.map-container {
  height: 70vh;
  max-height: 600px;
  width: 100%;
  border-radius: 12px;
  z-index: 1;
}

.mini-map-container {
  height: 300px;
  width: 100%;
  border-radius: 12px;
  z-index: 1;
}

/* Station markers */
.station-marker {
  background-color: #5D5CDE;
  border: 3px solid white;
  border-radius: 50%;
  text-align: center;
  width: 16px;
  height: 16px;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.dark .station-marker {
  border-color: #374151;
}

.station-marker:hover {
  transform: scale(1.2);
}

.station-marker.origin {
  background-color: #ff6b6b;
  width: 20px;
  height: 20px;
  z-index: 10;
}

.station-marker.destination {
  background-color: #4ecdc4;
  width: 20px;
  height: 20px;
  z-index: 10;
}

/* Custom station label */
.station-label {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 12px;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  white-space: nowrap;
}

.dark .station-label {
  background-color: rgba(31, 41, 55, 0.9);
  color: #e5e7eb;
}

/* Customize Leaflet popups */
.leaflet-popup-content-wrapper {
  border-radius: 8px;
  padding: 0;
}

.dark .leaflet-popup-content-wrapper {
  background-color: #1f2937;
  color: #e5e7eb;
}

.dark .leaflet-popup-tip {
  background-color: #1f2937;
}

.leaflet-popup-content {
  margin: 0;
  padding: 0;
}

/* Timeline visualization */
.timeline-container {
  position: relative;
  padding-left: 30px;
}

.timeline-line {
  position: absolute;
  left: 15px;
  top: 25px;
  bottom: 25px;
  width: 4px;
  background-color: #5D5CDE;
  border-radius: 2px;
}

.timeline-station {
  position: relative;
  padding: 12px 0;
}

.timeline-dot {
  position: absolute;
  left: -30px;
  top: 16px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #5D5CDE;
  border: 3px solid white;
  z-index: 2;
}

.dark .timeline-dot {
  border-color: #1f2937;
}

.timeline-dot.origin {
  background-color: #ff6b6b;
  width: 20px;
  height: 20px;
  top: 14px;
  left: -32px;
}

.timeline-dot.destination {
  background-color: #4ecdc4;
  width: 20px;
  height: 20px;
  top: 14px;
  left: -32px;
}

/* Scroll with fade effect */
.scroll-fade-right {
  -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
  mask-image: linear-gradient(to right, black 85%, transparent 100%);
}

/* Accordion animations */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.accordion-item.active .accordion-content {
  max-height: 1000px;
}

.accordion-icon {
  transition: transform 0.2s ease;
}

.accordion-item.active .accordion-icon {
  transform: rotate(180deg);
}

/* Hover card animations */
.hover-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px -8px rgba(0, 0, 0, 0.15);
}

/* Animated background */
.animated-bg {
  background: linear-gradient(-45deg, #5D5CDE, #FF6B6B, #4ECDC4, #06D6A0);
  background-size: 400% 400%;
  animation: gradient 15s ease infinite;
}

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

/* Smooth scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.dark ::-webkit-scrollbar-track {
  background: #374151;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb {
  background: #4b5563;
}

::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

.dark ::-webkit-scrollbar-thumb:hover {
  background: #6b7280;
}

/* Hide scrollbar but keep functionality */
.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Pulse animations */
.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(93, 92, 222, 0.5); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(93, 92, 222, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(93, 92, 222, 0); }
}

/* Gradients */
.primary-gradient {
  background: linear-gradient(135deg, #5D5CDE, #4c43c9);
}

.secondary-gradient {
  background: linear-gradient(135deg, #ff6b6b, #f83b3b);
}

.accent-gradient {
  background: linear-gradient(135deg, #4ecdc4, #2ab1a8);
}

/* Leaflet marker clusters */
.marker-cluster {
  background-color: rgba(93, 92, 222, 0.6);
  border-radius: 50%;
  color: white;
  font-weight: bold;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.leaflet-tooltip {
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 4px;
  background-color: white;
  color: #333;
  border: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.dark .leaflet-tooltip {
  background-color: #1f2937;
  color: #e5e7eb;
}

.leaflet-tooltip-top:before {
  border-top-color: white;
}

.dark .leaflet-tooltip-top:before {
  border-top-color: #1f2937;
}

/* Make sure Leaflet attribution is visible in dark mode */
.dark .leaflet-control-attribution {
  background-color: rgba(31, 41, 55, 0.8) !important;
  color: #d1d5db !important;
}

.dark .leaflet-control-attribution a {
  color: #93c5fd !important;
}

/* Accessibility focus outlines */
*:focus-visible {
  outline: 2px solid #5D5CDE;
  outline-offset: 2px;
}

/* Mobile navigation bar */
.mobile-navbar {
  box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1);
}

.dark .mobile-navbar {
  box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.25);
}

/* Custom select styling */
.custom-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
}
