
html, body, #map {
  height: 100%;
  margin: 0;
  padding: 0;
}
#layer-panel {
  position: fixed;
  left: 0;
  top: 0;
  width: 250px;
  height: 100%;
  background: #111;
  color: #eee;
  padding: 20px;
  overflow-y: auto;
  z-index: 1000;
}

#map {
  position: absolute;
  top: 0;
  left: 230px;   /* 패널 너비만큼 지도 시작 위치 조정 */
  right: 0;
  bottom: 0;
  z-index: 0;
}
.layer-group {
  margin-bottom: 20px;
}
.group-title {
  font-weight: bold;
  color: #00aaff;
  margin-bottom: 5px;
}
.layer-group ul {
  list-style: none;
  padding-left: 10px;
}
.layer-group li {
  padding: 6px 10px;
  cursor: pointer;
  color: #ccc;
}
.layer-group li.active {
  background: #00aaff;
  color: #000;
  font-weight: bold;
  border-radius: 4px;
}
.info-panel {
  margin-left: 270px;
  padding: 20px;
  color: #fff;
}
/* Custom horizontal legend layout */
#horizontal-legend {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 16px;
  box-shadow: 0 0 6px rgba(0,0,0,0.2);
}

#horizontal-legend .bar {
  height: 16px;
  width: 240px;
  background: linear-gradient(to right, #30123b, #2443a3, #3dd1a5, #ffe500, #ff8c00, #e60000);
  border: 1px solid #ccc;
}

#horizontal-legend .labels {
  display: flex;
  justify-content: space-between;
  width: 240px;
  margin-top: 2px;
}

#horizontal-legend .unit {
  margin-top: 2px;
  font-style: italic;
  font-size: 16px;
}
#rfi-legend {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 16px;
  box-shadow: 0 0 6px rgba(0,0,0,0.2);
}

#rfi-legend .bar {
  height: 16px;
  width: 240px;
  background: linear-gradient(to right, #3dd1a5, #FFFF00, #FFA500, #FF0000);
  border: 1px solid #ccc;
  margin: 4px 0;
}

#rfi-legend .labels {
  display: flex;
  justify-content: space-between;
  width: 240px;
  margin-top: 2px;
}

#rfi-legend .unit {
  margin-top: 2px;
  font-style: italic;
  font-size: 16px;
}


#timeline-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #222;
  color: #fff;
  z-index: 1001;
  font-family: sans-serif;
}
#timeline-header {
  display: flex;
  align-items: center;
  padding: 5px 15px;
  gap: 10px;
  font-size: 14px;
}
#timeline-track {
  padding: 0 10px 10px 10px;
}
#date-slider {
  width: 100%;
}
#tick-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #aaa;
  margin-top: 2px;
}
#month-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #66ccff;
  margin-top: 3px;
}
#fps-slider {
  width: 120px;
}

#lab-logo-button {
  position: fixed;
  bottom: 120px; /* 타임라인 위로 */
  right: 20px;
  z-index: 1002;
  background: rgba(0, 0, 0, 0.7);
  padding: 6px;
  border-radius: 10px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
  transition: background 0.2s;
}
#lab-logo-button:hover {
  background: rgba(0, 170, 255, 0.9);
}
#lab-logo-button img {
  height: 80px;
  width: auto;
  display: block;
}

#dark-mask {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.35);  /* ✅ 어둡게 */
  z-index: 500;                  /* 📌 Esri 타일보다 위 */
  pointer-events: none;          /* ✅ 클릭 막지 않음 */
}

#update-banner {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);  /* ✅ 정확히 가운데 정렬 */
  background: rgba(0, 0, 0, 0.75);  /* 검정 반투명 */
  color: white;
  padding: 10px 16px;
  font-size: 50px;
  border-radius: 12px;
  z-index: 2000;  /* 모든 위에 떠야 함 */
  box-shadow: 0 0 6px rgba(0,0,0,0.3);
  pointer-events: none;  /* 클릭 차단하지 않음 */
}

/* 모바일에서만 보이게 */
#toggle-panel {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 2001;
  padding: 8px 12px;
  background-color: rgba(0,0,0,0.75);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 20px;
  display: none; /* 기본은 숨김 */
}


/* 📱 모든 모바일 (768px 이하) */
@media (max-width: 768px) {
  #layer-panel {
    width: 60%;
    font-size: 14px;
  }
  
  #update-banner {
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 10px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);  /* ✅ 정확히 가운데 정렬 */
  }

  .info-panel {
    font-size: 13px;
  }

  #toggle-panel {
    display: block;
  }

  #layer-panel {
    transition: left 0.3s ease;
  }

  #layer-panel.hidden {
    left: -100%;
  }
}