:root {
    --primary: #0f172a;
    --primary-light: #1e293b;
    --accent: #38bdf8;
    --accent-hover: #0ea5e9;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --bg: #020617;
    --card-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

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

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

h1, h2, h3 {
    font-family: 'Outfit', sans-serif;
}

/* Header */
.app-header {
    background: linear-gradient(to right, var(--primary), var(--bg));
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
}

.header-content h1 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.accent {
    color: var(--accent);
}

.header-content p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Main Container */
.app-container {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 350px;
    background: var(--primary);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
    border-right: 1px solid var(--glass-border);
}

.info-card, .legend-card, .zones-list {
    background: var(--card-bg);
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(8px);
}

h2 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-muted);
}

/* Legend */
.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.color-box {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.intensity-high { background-color: #ef4444; box-shadow: 0 0 10px rgba(239, 68, 68, 0.5); }
.intensity-med { background-color: #f59e0b; box-shadow: 0 0 10px rgba(245, 158, 11, 0.5); }
.intensity-low { background-color: #10b981; box-shadow: 0 0 10px rgba(16, 185, 129, 0.5); }

/* Zones List */
.zones-list ul {
    list-style: none;
}

.zones-list li {
    padding: 0.75rem;
    border-bottom: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.zones-list li:hover {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent);
}

.zones-list li:last-child {
    border-bottom: none;
}

.nse-badge {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.sidebar-footer p {
    font-size: 0.75rem;
    font-style: italic;
    color: var(--text-muted);
    text-align: center;
}

/* Map */
#map-container {
    flex: 1;
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
}

/* Footer */
.app-footer {
    padding: 0.75rem 2rem;
    background: var(--bg);
    border-top: 1px solid var(--glass-border);
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Leaflet Custom Styles */
.leaflet-container {
    background: #f8fafc !important;
}

.leaflet-popup-content-wrapper {
    background: #ffffff !important;
    color: #0f172a !important;
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
}

.leaflet-popup-tip {
    background: #ffffff !important;
}
