:root {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --accent-crimson: #DC143C;
    --accent-blue: #60A5FA; /* Lighter blue for better accessibility */
    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.header {
    padding: 1rem 2rem;
    background: var(--bg-color);
    border-bottom: 1px solid var(--glass-border);
    z-index: 10;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.header h1 {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.025em;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: #94a3b8;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.state-nav {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.glass-input {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--glass-border);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.875rem;
    outline: none;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 200px;
}

.glass-btn {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--glass-border);
    color: #fff;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.glass-btn:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

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

.report-btn {
    border-color: rgba(96, 165, 250, 0.3);
    background: rgba(96, 165, 250, 0.1);
}

.report-btn:hover {
    background: rgba(96, 165, 250, 0.2);
    border-color: rgba(96, 165, 250, 0.5);
}

.glass-input:hover, .glass-input:focus {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(255, 255, 255, 0.3);
}

.glass-input option {
    background: #0f172a;
    color: #fff;
    padding: 10px;
}

.map-container {
    flex: 1;
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.legend {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    z-index: 1000; /* Above map */
    min-width: 200px;
}

.legend h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 0.75rem;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 0.75rem;
    box-shadow: 0 0 8px currentColor;
}

.dot.crimson {
    background-color: var(--accent-crimson);
    color: var(--accent-crimson);
}

.dot.blue {
    background-color: var(--accent-blue);
    color: var(--accent-blue);
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .header {
        padding: 1rem;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .header h1 {
        font-size: 1.25rem;
    }

    .subtitle {
        font-size: 0.8rem;
    }

    .state-nav {
        width: 100%;
        flex-wrap: wrap;
    }

    .glass-input {
        min-width: 0;
        flex: 1;
    }

    .legend {
        bottom: 2rem;
        left: 1rem;
        right: 1rem;
        min-width: 0;
    }

    .legend h3 {
        font-size: 0.75rem;
    }

    .legend-item {
        font-size: 0.75rem;
    }
}

.footer {
    position: absolute;
    bottom: 0.5rem;
    left: 1rem;
    z-index: 1000;
    font-size: 0.75rem;
    color: #64748b;
    pointer-events: none;
}

/* Leaflet Popup Customization */
.leaflet-popup-content-wrapper {
    background: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
}

.leaflet-popup-tip {
    background: var(--bg-color);
}

.leaflet-popup-content h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: #fff;
}

.leaflet-popup-content p {
    margin: 0;
    color: #94a3b8;
    font-size: 0.875rem;
}

.leaflet-container a.leaflet-popup-close-button {
    color: #94a3b8;
}

/* Map Markers */
.marker-pin {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: relative;
    border: 2px solid #fff;
}

.marker-pin.crimson {
    background-color: var(--accent-crimson);
    box-shadow: 0 0 10px var(--accent-crimson);
}

.marker-pin.blue {
    background-color: var(--accent-blue);
    box-shadow: 0 0 10px var(--accent-blue);
}

.marker-pin::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    animation: pulse 2s infinite;
    z-index: -1;
}

.marker-pin.crimson::after {
    box-shadow: 0 0 0 0 rgba(220, 20, 60, 0.7);
}

.marker-pin.blue::after {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.95);
        opacity: 0.7;
    }
    70% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.95);
        opacity: 0;
    }
}
