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

body {
  background: #0a0a0f;
  font-family: system-ui, -apple-system, sans-serif;
  color: #ddd;
  height: 100vh;
  overflow: hidden;
}

#map {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

#loading {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  font-size: 1.2rem;
  z-index: 10;
}

#info {
  position: absolute;
  top: 16px; left: 16px;
  background: rgba(0, 0, 0, 0.65);
  padding: 12px 16px;
  border-radius: 6px;
  z-index: 5;
  backdrop-filter: blur(4px);
}

#date-display {
  font-size: 2.0rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

#fire-count {
  font-size: 0.82rem;
  color: #999;
  margin-top: 4px;
}

/* ---- Controls panel ---- */

#controls {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(0, 0, 0, 0.80);
  padding: 8px 16px 14px;
  z-index: 5;
  backdrop-filter: blur(4px);
}

/* Timeline + event ticks */

#timeline-wrap {
  position: relative;
  margin-bottom: 6px;
}

#event-ticks {
  position: relative;
  height: 10px;
  margin: 0 80px; /* roughly aligns with slider thumb travel */
}

.event-tick {
  position: absolute;
  top: 2px;
  width: 2px;
  height: 6px;
  background: #e09040;
  border-radius: 1px;
  transform: translateX(-50%);
  cursor: default;
}

.event-tick:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.85);
  color: #ffe0a0;
  font-size: 0.72rem;
  white-space: nowrap;
  padding: 3px 7px;
  border-radius: 3px;
  pointer-events: none;
  z-index: 20;
}

#timeline-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

#timeline {
  flex: 1;
  accent-color: #e05020;
  cursor: pointer;
}

.date-label {
  font-size: 0.72rem;
  color: #888;
  white-space: nowrap;
  min-width: 72px;
}

#date-end { text-align: right; }

/* Buttons row */

#buttons-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ctrl-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.group-label {
  font-size: 0.72rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.divider {
  width: 1px;
  height: 28px;
  background: #333;
  flex-shrink: 0;
  margin: 0 4px;
}

#btn-play {
  background: #c03a10;
  color: #fff;
  border: none;
  padding: 5px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.88rem;
  min-width: 88px;
  transition: background 0.12s;
  flex-shrink: 0;
}

#btn-play:hover { background: #e04818; }

label {
  font-size: 0.80rem;
  color: #bbb;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
  white-space: nowrap;
}

.checkbox-label {
  gap: 5px;
  cursor: pointer;
}

input[type="range"] {
  accent-color: #e05020;
  cursor: pointer;
}

#window-slider         { width: 80px; }
#frp-night-min-slider,
#frp-night-max-slider,
#frp-day-min-slider,
#frp-day-max-slider    { width: 60px; }
#opacity-night-slider,
#opacity-day-slider    { width: 70px; }

#window-label,
#frp-night-min-label,
#frp-night-max-label,
#frp-day-min-label,
#frp-day-max-label,
#opacity-night-label,
#opacity-day-label {
  color: #e09070;
  font-variant-numeric: tabular-nums;
}
#frp-night-max-label,
#frp-day-max-label  { min-width: 40px; }
#opacity-night-label,
#opacity-day-label  { min-width: 36px; }

#btn-mode {
  background: #1a1a2e;
  color: #aac;
  border: 1px solid #446;
  padding: 5px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.82rem;
  transition: background 0.12s;
}

#btn-mode:hover { background: #252540; }

#col-night {
  background: #ff00aa;
}

#col-day {
  background: #ffaa00;
}

.color-indicator {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

select {
  background: #1a1a22;
  color: #ddd;
  border: 1px solid #444;
  padding: 3px 5px;
  border-radius: 4px;
  font-size: 0.80rem;
  cursor: pointer;
}

select:focus { outline: 1px solid #e05020; }

input[type="checkbox"] {
  accent-color: #e05020;
  cursor: pointer;
}
