 /* Base Variables */
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary: #6b7280;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --light: #f9fafb;
  --dark: #111827;
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Car Icon */
.car-icon {
  background: url('van.png') no-repeat center center;
  background-size: contain;
  width: 80px;
  height: 80px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
  transition: transform 0.3s ease;
}

.car-icon:hover {
  transform: scale(1.1);
}

/* Marker Popup */
.marker-popup {
  padding: 1rem;
  text-align: center;
  min-width: 120px;
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  font-family: 'Inter', sans-serif;
}

.marker-popup h3 {
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.marker-popup p {
  margin-bottom: 0.5rem;
  color: var(--secondary);
  font-size: 0.875rem;
}

/* Map Container */
#map {
  height: 70vh;
  margin-top: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  border: 1px solid #e5e7eb;
}

/* Button Container */
.btn-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.btn-container input[type="number"] {
  padding: 0.625rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  width: 200px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-container input[type="number"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.btn-container button {
  margin-left: 0;
  padding: 0.625rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-container button i {
  font-size: 1rem;
}

#optimizeBtn {
  background: linear-gradient(135deg, var(--primary), #3b82f6);
  color: white;
}

#optimizeBtn:hover {
  background: linear-gradient(135deg, var(--primary-hover), #2563eb);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2), 0 2px 4px -1px rgba(37, 99, 235, 0.1);
}

#clearBtn {
  background: white;
  border: 1px solid #ef4444;
  color: #ef4444;
}

#clearBtn:hover {
  background-color: #fef2f2;
  transform: translateY(-1px);
}

/* Cluster Info */
#clusterInfo {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border: 1px solid #e5e7eb;
}

#clusterInfo h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#clusterInfo h3 i {
  color: var(--primary);
}

#clusterInfoContent {
  background-color: #f9fafb;
  padding: 1rem;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #4b5563;
}

/* Leaflet Overrides */
.leaflet-popup-content-wrapper {
  border-radius: 0.5rem !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
  border: 1px solid #e5e7eb !important;
  font-family: 'Inter', sans-serif !important;
}

.leaflet-popup-content {
  margin: 0.75rem 1rem !important;
  font-size: 0.9rem !important;
  line-height: 1.5 !important;
}

.leaflet-popup-tip {
  box-shadow: none !important;
}

.leaflet-control-zoom {
  border: none !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
  border-radius: 0.5rem !important;
  overflow: hidden;
}

.leaflet-control-zoom a {
  width: 36px !important;
  height: 36px !important;
  line-height: 36px !important;
  font-size: 18px !important;
  border: none !important;
  border-radius: 0 !important;
  background: white !important;
  color: #4b5563 !important;
  transition: all 0.2s ease !important;
}

.leaflet-control-zoom a:hover {
  background: #f3f4f6 !important;
  color: #1f2937 !important;
}

.leaflet-control-zoom a:first-child {
  border-bottom: 1px solid #e5e7eb !important;
  border-radius: 0.5rem 0.5rem 0 0 !important;
}

.leaflet-control-zoom a:last-child {
  border-radius: 0 0 0.5rem 0.5rem !important;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  #map {
    height: 60vh;
  }
  
  .btn-container {
    flex-direction: column;
    align-items: stretch;
  }
  
  .btn-container input[type="number"] {
    width: 100%;
  }
  
  .btn-container button {
    width: 100%;
    justify-content: center;
  }
}

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

.animate-fadeIn {
  animation: fadeIn 0.3s ease-out forwards;
}

/* Loading Spinner */
.spinner {
  width: 1.5rem;
  height: 1.5rem;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
  display: inline-block;
  margin-right: 0.5rem;
  vertical-align: middle;
}

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

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-success {
  background-color: #d1fae5;
  color: #065f46;
}

.badge-warning {
  background-color: #fef3c7;
  color: #92400e;
}

.badge-danger {
  background-color: #fee2e2;
  color: #991b1b;
}