body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    color: #000000;
    background-color: #1a2535;
    overflow: hidden;
}

/* Header */
.header {
    width: 100%;
    height: 56px;
    background: linear-gradient(90deg, #005f99 0%, #007cbf 50%, #0096e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 20;
    position: relative;
}

.header h1 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #ffffff;
}

/* Footer */
.footer {
    width: 100%;
    height: 56px;
    background: linear-gradient(90deg, #005f99 0%, #007cbf 50%, #0096e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.2);
    z-index: 20;
    position: absolute;
    bottom: 0;
    box-sizing: border-box;
    padding: 0 24px;
}

#play-btn {
    background: rgba(255,255,255,0.15);
    border: 1.5px solid rgba(255,255,255,0.5);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
}

#play-btn:hover {
    background: rgba(255,255,255,0.3);
}

#footer-slider {
    flex: 1;
    max-width: 420px;
    accent-color: white;
    cursor: pointer;
}

.footer-year-label {
    color: rgba(255,255,255,0.65);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

#footer-active-year {
    color: white;
    font-size: 20px;
    font-weight: 700;
    min-width: 52px;
    text-align: center;
}

/* Map */
#map {
    position: absolute;
    top: 56px;
    bottom: 56px;
    width: 100%;
}

/* Overlay Panels */
.map-overlay, .about-box {
    position: absolute;
    top: 76px;
    padding: 18px;
    background-color: #f7fbff;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
    border-radius: 14px;
    z-index: 10;
    border: 1px solid rgba(0,0,0,0.07);
}

.map-overlay {
    left: 18px;
    width: 260px;
}

.about-box {
    right: 18px;
    width: 290px;
}

/* Panel Headings*/
h2 {
    font-size: 11px;
    font-weight: 700;
    margin: 0 0 14px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #007cbf;
    border-bottom: 2px solid #007cbf;
    padding-bottom: 6px;
}

p { font-size: 13px; line-height: 1.65; margin: 0; color: #444; }

/* Sections */
.session { margin-bottom: 14px; }

.session label {
    display: block;
    font-weight: 700;
    font-size: 10px;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #666;
}

/* Year Slider Card */
.session:has(#slider) {
    background: linear-gradient(135deg, #007cbf, #0096e0);
    padding: 12px 14px;
    border-radius: 10px;
    color: #ffffff;
}

.session:has(#slider) label {
    color: rgba(255,255,255,0.8) !important;
    font-size: 10px;
}

#active-year {
    font-size: 20px;
    font-weight: 700;
    float: right;
    color: #ffffff;
    line-height: 1;
}

/* Country Search */
#country-search {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    background: #fff;
    box-sizing: border-box;
    color: #222;
}

#country-search:focus {
    outline: none;
    border-color: #007cbf;
    box-shadow: 0 0 0 3px rgba(0,124,191,0.15);
}

/* Sliders */
input[type='range'] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    cursor: pointer;
    background: transparent;
    margin-top: 10px;
}

input[type='range']::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.35);
    border-radius: 2px;
}

input[type='range']::-webkit-slider-thumb {
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

input[type='range']::-moz-range-track {
    height: 4px;
    background: rgba(255,255,255,0.35);
    border-radius: 2px;
}

input[type='range']::-moz-range-thumb {
    height: 16px;
    width: 16px;
    background: #ffffff;
    border: none;
    border-radius: 50%;
}

/* Buttons */
.mode-group {
    display: flex;
    border: 1.5px solid #007cbf;
    border-radius: 8px;
    overflow: hidden;
}

.mode-btn {
    flex: 1;
    padding: 9px 6px;
    border: none;
    font-family: 'Roboto', sans-serif;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    background: #fff;
    color: #007cbf;
    transition: background 0.15s, color 0.15s;
    letter-spacing: 0.3px;
}

.mode-btn:not(:last-child) {
    border-right: 1.5px solid #007cbf;
}

.mode-btn.active {
    background: #007cbf;
    color: #fff;
}

.mode-btn:hover:not(.active) {
    background: #e8f4fb;
}

/* Legend */
#legend {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.07);
    border-radius: 10px;
    padding: 10px 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 7px;
    font-size: 12px;
    font-weight: 500;
    color: #333;
}

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

.legend-key {
    display: inline-block;
    width: 20px;
    margin-right: 10px;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
}

/* Reset Button*/
#reset-btn {
    width: 100%;
    margin-top: 14px;
    padding: 10px;
    background: #007cbf;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.5px;
    cursor: pointer;
    text-transform: uppercase;
    transition: background 0.15s;
}

#reset-btn:hover {
    background: #005f99;
}

/* Divider */
hr {
    border: 0;
    border-top: 1px solid #e0e0e0;
    margin: 14px 0;
}