html, body, #cesiumContainer {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: sans-serif;
}

/* --- Warning Panel --- */
#warning-panel {
  position: absolute;
  z-index: 2;
  background: rgba(38, 38, 38, 0.9);
  color: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: 3px 0 15px rgba(0,0,0,0.5);
  transition: transform 0.3s ease-in-out;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  border-bottom: 1px solid #555;
  flex-shrink: 0;
}

.panel-header h3 {
  margin: 0;
  font-size: 1.1em;
  white-space: nowrap;
}

#toggle-panel-btn {
  background: rgba(38, 38, 38, 0.9);
  border: 1px solid #777;
  color: #fff;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  font-size: 1.2em;
  line-height: 1;
  flex-shrink: 0;
}

#toggle-panel-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

#toggle-panel-btn span {
  display: inline-block;
  transition: transform 0.3s ease;
}

#warning-list {
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-y: auto;
  flex-grow: 1;
}

#warning-list li {
  padding: 12px 15px;
  border-bottom: 1px solid #444;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#warning-list li:hover {
  background-color: rgba(70, 130, 180, 0.5);
}

#warning-list li .date {
  display: block;
  font-size: 0.8em;
  color: #ccc;
  margin-top: 4px;
}

/* Desktop Styles (Side Panel) */
@media (min-width: 768px) {
  #warning-panel {
    top: 0;
    left: 0;
    width: 350px;
    height: 100%;
    transform: translateX(0);
  }

  #warning-panel.is-closed {
    transform: translateX(-100%);
  }

  #warning-panel.is-closed #toggle-panel-btn {
    transform: rotate(180deg) translateX(-50px);
  }
}

/* Mobile Styles (Overlay Panel) */
@media (max-width: 768px) {
  #warning-panel {
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    max-height: 50vh;
    border-bottom: 1px solid #555;
    box-shadow: 0 3px 15px rgba(0,0,0,0.5);
    /* Hidden by default on mobile */
    transform: translateY(-100%);
  }

  #warning-panel.is-open {
    transform: translateY(0);
  }

  #toggle-panel-btn {
    transform: rotate(-90deg); /* '<' becomes 'v' */
    position: absolute;
    bottom: -40px;
  }

  #warning-panel.is-open #toggle-panel-btn {
    transform: rotate(90deg); /* '<' becomes '^' */
    top: 10px;
  }
  #warning-panel.is-open h3 {
    margin-left: 40px;
  }
}


#legend {
  position: absolute;
  bottom: 80px;
  right: 10px;
  background: rgba(38, 38, 38, 0.9);
  color: #fff;
  padding: 10px;
  border-radius: 5px;
  z-index: 1;
}

#legend h4 {
  margin: 0 0 5px 0;
  text-align: center;
}

#legend ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#legend li {
  margin-bottom: 3px;
  display: flex;
  align-items: center;
}

.color-box {
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: 5px;
  border: 1px solid #000;
}

#resetViewBtn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  padding: 5px 10px;
  background-color: rgba(49, 51, 54, 0.8);
  color: white;
  border: 1px solid #444;
  border-radius: 5px;
  cursor: pointer;
  font-family: sans-serif;
}

#resetViewBtn:hover {
  background-color: rgba(70, 72, 75, 0.9);
}

/* --- Timeline Slider --- */
#timeline-container {
  position: absolute;
  bottom: 10px;
  z-index: 2;
  padding: 15px 20px;
  background: rgba(38, 38, 38, 0.9);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.5);
  border-radius: 5px 5px 0 0;
  width: calc(100vw - 80px);
}

#timeline-slider {
  height: 10px;
}

/* Desktop Styles */
@media (min-width: 768px) {
  #timeline-container {
    width: 50%;
    right: 50px;
    border-radius: 5px;
  }
}

/* noUiSlider Customization */
.noUi-target {
  background: #555;
  border-radius: 5px;
  border: 1px solid #444;
  box-shadow: inset 0 1px 1px #222;
}

.noUi-connect {
  background: #4682B4; /* steelblue */
}

.noUi-handle {
  border: 1px solid #333;
  border-radius: 50%;
  background: #ddd;
  box-shadow: inset 0 0 1px #FFF, inset 0 1px 7px #EBEBEB, 0 3px 6px -3px #666;
  cursor: grab;
  /* Remove the ::before and ::after pseudo-elements for a cleaner look */
  width: 24px !important;
  height: 24px !important;
  right: -12px !important;
  top: -8px !important;
}

.noUi-handle::before, .noUi-handle::after {
  display: none;
}

.noUi-tooltip {
  border: none;
  border-radius: 3px;
  background: #262626;
  color: #fff;
  padding: 5px;
  white-space: nowrap;
  font-size: 0.8em;
  bottom: 150%;
}
