#map {
    height: 500px;
    width: 100%;
    z-index: 1;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2rem;
    border: 2px solid #e2e8f0;
}

/* Leaflet Popup Styling - Dark theme */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    padding: 0;
    overflow: hidden;
    background: #2a2a2a;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.leaflet-popup-content {
    margin: 0;
    padding: 0;
    min-width: 280px;
}

.leaflet-popup-tip {
    background: #2a2a2a;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.popup-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.25rem;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: -0.3px;
}

.popup-content {
    padding: 1.25rem;
    background: #2a2a2a;
}

.popup-row {
    display: flex;
    padding: 0.875rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.popup-row:last-child {
    border-bottom: none;
}

.popup-label {
    font-weight: 600;
    color: #aaa;
    min-width: 130px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.popup-value {
    color: #fff;
    flex: 1;
    font-size: 0.9rem;
    word-wrap: break-word;
    line-height: 1.5;
}

.popup-value.empty {
    color: #666;
    font-style: italic;
}

/* Leaflet controls light theme */
.leaflet-control-zoom {
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.leaflet-control-zoom a {
    background-color: rgba(255, 255, 255, 0.95) !important;
    color: #333 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.leaflet-control-zoom a:hover {
    background-color: rgba(102, 126, 234, 0.1) !important;
    color: #667eea !important;
}

.leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #666 !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.leaflet-control-attribution a {
    color: #667eea !important;
}

/* Map Legend */
.map-legend {
    background: rgba(255, 255, 255, 0.95) !important;
    padding: 0.75rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    font-size: 0.875rem;
    line-height: 1.5;
}

.legend-header {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
    letter-spacing: 0.3px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.legend-item:last-child {
    margin-bottom: 0;
}

.legend-marker {
    width: 16px;
    height: 16px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.legend-label {
    color: #333;
    font-weight: 400;
}

/* Loading state */
.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background: rgba(42, 42, 42, 0.95);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    backdrop-filter: blur(10px);
}

.loading-spinner {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 768px) {
    #map {
        height: 400px;
    }
}

