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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  overflow: hidden;
  background: #1a1a1a;
  color: #ffffff;
}

/* MapLibre basemap container */
#map-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* Deck.gl canvas overlay */
#deck-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  cursor: grab;
}

#deck-canvas:active {
  cursor: grabbing;
}

/* Controls panel */
#controls {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 320px;
  background: rgba(26, 26, 26, 0.95);
  border: 1px solid #333;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  z-index: 100;
}

#controls h2 {
  font-size: 18px;
  margin-bottom: 20px;
  color: #ffffff;
  border-bottom: 2px solid #444;
  padding-bottom: 10px;
}

#controls h3 {
  font-size: 14px;
  margin-bottom: 8px;
  color: #cccccc;
}

/* Timeline */
.timeline {
  margin-bottom: 20px;
}

#month-slider {
  width: 100%;
  margin-bottom: 8px;
  cursor: pointer;
}

#current-month {
  display: block;
  text-align: center;
  font-size: 16px;
  font-weight: bold;
  color: #4a9eff;
}

/* Playback controls */
.playback {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  align-items: center;
}

.playback button {
  flex: 1;
  padding: 8px 16px;
  background: #4a9eff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.playback button:hover:not(:disabled) {
  background: #3a8eef;
}

.playback button:disabled {
  background: #333;
  cursor: not-allowed;
  opacity: 0.5;
}

.playback select {
  padding: 8px;
  background: #333;
  color: white;
  border: 1px solid #555;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

/* Info section */
.info {
  margin-bottom: 20px;
  padding: 12px;
  background: rgba(74, 158, 255, 0.1);
  border-radius: 4px;
  border: 1px solid rgba(74, 158, 255, 0.3);
}

.info p {
  margin: 6px 0;
  font-size: 13px;
  color: #cccccc;
}

.info span {
  font-weight: bold;
  color: #4a9eff;
}

/* Legend */
.legend {
  padding-top: 15px;
  border-top: 1px solid #444;
}

.gradient {
  height: 20px;
  background: linear-gradient(to right, #ffffb2, #fecc5c, #fd8d3c, #f03b20, #bd0026);
  border-radius: 4px;
  margin: 8px 0;
}

.legend span {
  display: block;
  text-align: center;
  font-size: 12px;
  color: #999;
}

/* Tooltip */
#tooltip {
  position: absolute;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid #4a9eff;
  border-radius: 4px;
  pointer-events: none;
  font-size: 13px;
  line-height: 1.5;
  z-index: 1000;
  max-width: 300px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

#tooltip strong {
  color: #4a9eff;
  display: block;
  margin-bottom: 4px;
}

/* Loading indicator */
#loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  padding: 20px 40px;
  border-radius: 8px;
  font-size: 16px;
  z-index: 1000;
  border: 1px solid #4a9eff;
}

/* Responsive design */
@media (max-width: 768px) {
  #controls {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    border-radius: 8px 8px 0 0;
    max-height: 50vh;
    overflow-y: auto;
  }

  #controls h2 {
    font-size: 16px;
  }

  .playback {
    flex-wrap: wrap;
  }
}

/* Range input styling */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: #333;
  border-radius: 3px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: #4a9eff;
  border-radius: 50%;
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #4a9eff;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}
