#map {
    height: 100vh;
}

#timeline {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(0,0,0,0.8);
    padding: 12px 18px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

#timelineControls {
    display: flex;
    align-items: center;
    gap: 10px;
}

#runtime {
    color: white;
    font-size: 16px;
    font-family: Arial, sans-serif;
}

#validTime {
    font-weight: bold;
}

#slider {
    width: 280px;
}

button {
    background: white;
    border: none;
    padding: 6px 10px;
    cursor: pointer;
    border-radius: 4px;
}

#legend {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.25);
    font-family: Arial, sans-serif;
    font-size: 14px;
}

#legendHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    margin-bottom: 8px;
}

#legendToggle {
    background: white;
    border: 1px solid #ccc;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
}

.legendLabel {
    text-align: center;
    margin: 4px 0;
}

#colorbar {
    width: 30px;
    height: 150px;
    margin: 10px auto;
    background: linear-gradient(
        to top,
        #440154,
        #482878,
        #3e4989,
        #31688e,
        #26828e,
        #1f9e89,
        #35b779,
        #6ece58,
        #b5de2b,
        #fde725
    );
    border-radius: 4px;
}

#legendBody {
    display: none;
}

#titleBox {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 10px 18px;
    font-family: Arial, sans-serif;
    font-size: 18px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

@media (max-width: 768px) {

#slider {
width: min(280px, 70vw);
}

#timeline {
width: min(320px, 85vw);
}

#titleBox {
font-size: 14px;
padding: 6px 12px;
top: 12px;
max-width: 90vw;
white-space: nowrap;
}

button {
padding: 8px 12px;
font-size: 16px;
}

#legend {
left: 10px;
}

}
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 60px;
    background: rgba(0,0,0,0.85);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 2000;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
}

#navbar .logo {
    font-weight: bold;
    font-size: 18px;
    letter-spacing: 1px;
    cursor: pointer;
}

#navbar .links {
    display: flex;
    gap: 20px;
}

#navbar a {
    color: #ddd;
    text-decoration: none;
    font-size: 14px;
    transition: 0.2s;
}

#navbar a:hover {
    color: white;
}