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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
}

/* Header */
.header {
    background: #2c3e50;
    color: white;
    padding: 1rem 2rem;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.subtitle {
    font-size: 0.875rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

/* Main Layout */
.main {
    display: flex;
    height: calc(100vh - 80px);
}

/* Map */
.map {
    flex: 1;
    min-height: 400px;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: white;
    padding: 1.5rem;
    overflow-y: auto;
    border-left: 1px solid #ddd;
}

.sidebar h2 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
    margin-bottom: 0.75rem;
}

/* Controls */
.controls {
    margin-bottom: 1.5rem;
}

.layer-toggle {
    display: flex;
    gap: 0.5rem;
}

.btn {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.btn:hover {
    background: #f0f0f0;
}

.btn.active {
    background: #2c3e50;
    color: white;
    border-color: #2c3e50;
}

/* Legend */
.legend {
    margin-bottom: 1.5rem;
}

.legend-scale {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

.legend-color {
    width: 24px;
    height: 16px;
    border-radius: 2px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Info */
.info {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
}

.info p {
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

#data-status {
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .main {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-left: none;
        border-top: 1px solid #ddd;
    }

    .map {
        height: 60vh;
    }
}
