body {
    margin: 0;
    font-family: Arial, sans-serif;
    /* Add padding at the top so the map doesn't hide behind our new toolbar */
    padding-top: 60px; 
}

#map {
    height: calc(100vh - 60px); /* Adjust map height to fill the remaining space */
    width: 100%;
}

/* --- Our New Full-Width Toolbar --- */
.controls {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: white;
    padding: 10px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    box-sizing: border-box;

    /* We use flexbox to arrange everything in a neat row! */
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.controls h3 {
    margin: 0;
    font-size: 1.1em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
    min-width: 150px;
}

#map-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.time-slider {
    width: 200px;
    margin: 0;
}

.date-labels {
    display: flex;
    justify-content: space-between;
    width: 200px;
    font-size: 12px;
    color: #666;
}

.stats {
    margin: 0;
    font-size: 14px;
    white-space: nowrap;
    background-color: #f0f0f0;
    padding: 8px 12px;
    border-radius: 5px;
}

.play-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin: 0;
}

.play-btn:hover {
    background: #45a049;
}

.play-btn.playing {
    background: #f44336;
}

/* --- Colorbar --- */
.colorbar {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 999;
}

.colorbar-gradient {
    width: 200px;
    height: 20px;
    background: linear-gradient(to right, #000080, #0080FF, #00FFFF, #80FF00, #FFFF00, #FF8000, #FF0000);
    border: 1px solid #ccc;
    margin: 10px 0;
}

.colorbar-labels {
    display: flex;
    justify-content: space-between;
    width: 200px;
    font-size: 12px;
}
