:root {
    --bg-dark: #121212;
    --sidebar-bg: #1e1e24;
    --text-primary: #f5f5f5;
    --text-secondary: #a0a0a5;
    --accent: #6b8afc;
    --border-subtle: #333333;

    font-family: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

.sidebar {
    width: 320px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-subtle);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.sidebar header h1 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #fff;
}

.lang-switcher {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.lang-switcher button {
    background: #2a2a32;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
}

.lang-switcher button:hover {
    background: #3a3a42;
}

.lang-switcher button.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.sidebar header p {
    font-size: 14px;
    color: var(--text-secondary);
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.controls label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.controls select {
    width: 100%;
    padding: 10px;
    background: #F4F1EA;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.controls select:focus {
    outline: none;
    border-color: var(--accent);
}

.legend h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.legend-scale {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.color-box {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

.info-panel {
    margin-top: auto;
    background: #F4F1EA;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
}

.info-panel h4 {
    font-family: var(--font-serif);
    font-size: 14px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.info-content {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

.info-content .val {
    color: #1A365D;
    /* Mineral Blue */
    font-weight: 600;
    font-size: 20px;
}

.info-content .mesh-id {
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 4px;
}

.map-container {
    flex-grow: 1;
    height: 100%;
    position: relative;
    background: var(--bg-aged-paper);
}

.leaflet-container {
    background: var(--bg-aged-paper) !important;
}

/* Aged paper map filter */
.leaflet-layer.aged-paper-map {
    filter: sepia(30%) contrast(90%) opacity(80%);
}