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

/* Draggable Date Panel (Retro Film Camera Style) */
#date-panel {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 5000;
  padding: 0;
  background: transparent;
  border: none;
  font-family: 'Orbitron', sans-serif;
  font-size: 70px;
  font-weight: 700;
  color: #ff4e00;
  text-shadow: 0 0 10px rgba(255, 78, 0, 0.8), 0 0 20px rgba(255, 78, 0, 0.5);
  cursor: move;
  pointer-events: auto;
  user-select: none;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
  transition: opacity 0.5s ease-in-out;
}

/* Performance Monitor */
#perf-monitor {
  position: absolute;
  bottom: 5px;
  right: 320px;
  background: rgba(0, 0, 0, 0.7);
  color: #00ff00;
  font-family: monospace;
  font-size: 11px;
  padding: 5px;
  border: 1px solid #333;
  border-radius: 4px;
  pointer-events: none;
  z-index: 5000;
  text-align: left;
}

/* Overlays */
#weather-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 500;
}

#fog-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  opacity: 0;
  pointer-events: none;
  z-index: 400;
  transition: opacity 0.5s;
}

#darkness-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
  opacity: 0;
  pointer-events: none;
  z-index: 410;
  transition: opacity 0.3s;
}

/* Rain PNG Overlay */
#rain-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('rain/rain_overlay.png');
  background-size: cover;
  background-position: center;
  opacity: 0;
  pointer-events: none;
  z-index: 6000;
  transition: opacity 0.5s;
}

/* Sidebar */
#sidebar {
  position: absolute;
  top: 0;
  left: 0;
  width: 240px;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  color: white;
  overflow-y: auto;
  z-index: 1000;
  transform: translateX(0);
  transition: transform 0.3s;
  border-right: 1px solid #444;
}

#sidebar.hidden {
  transform: translateX(-240px);
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid #444;
}

.sidebar-header h1 {
  margin: 0;
  font-size: 18px;
  color: #ffcc00;
  letter-spacing: 1px;
}

.menu-group {
  padding: 0;
  margin: 0;
  list-style: none;
}

.menu-item {
  padding: 15px 20px;
  border-bottom: 1px solid #333;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 14px;
}

.menu-item:hover {
  background: rgba(255, 204, 0, 0.2);
}

.menu-item.active {
  background: rgba(255, 204, 0, 0.4);
  border-left: 4px solid #ffcc00;
}

.location-name {
  font-weight: bold;
  display: block;
}

.location-desc {
  font-size: 11px;
  color: #aaa;
  margin-top: 4px;
}

#sidebar-toggle {
  position: absolute;
  top: 10px;
  left: 250px;
  z-index: 1001;
  background: rgba(0, 0, 0, 0.8);
  color: #ffcc00;
  border: 1px solid #ffcc00;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 4px;
  transition: left 0.3s;
}

#sidebar.hidden+#sidebar-toggle {
  left: 10px;
}

/* Controls */
#controls {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  padding: 10px 20px;
  border-radius: 30px;
  display: flex;
  gap: 15px;
  align-items: center;
  color: white;
  border: 1px solid #555;
  z-index: 1000;
}

.control-btn {
  background: #333;
  border: 1px solid #666;
  color: white;
  padding: 5px 15px;
  border-radius: 15px;
  cursor: pointer;
  font-size: 12px;
}

.control-btn:hover {
  background: #555;
  border-color: #ffcc00;
}

#time-display {
  font-family: monospace;
  font-size: 16px;
  min-width: 140px;
  text-align: center;
  color: #ffcc00;
  font-variant-numeric: tabular-nums;
}

#analemma-panel {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.8);
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #555;
}

.toggle-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-size: 12px;
  cursor: pointer;
  margin-bottom: 4px;
}

.toggle-chk {
  width: 14px;
  height: 14px;
  cursor: pointer;
  margin: 0;
}

/* Quality Buttons + Eco */
.quality-group {
  display: flex;
  background: #333;
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid #555;
  align-items: center;
}

.quality-btn {
  background: #333;
  border: none;
  color: #aaa;
  padding: 5px 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
  border-right: 1px solid #555;
  height: 100%;
}

.quality-btn:last-child {
  border-right: none;
}

.quality-btn:hover {
  background: #444;
  color: white;
}

.quality-btn.active {
  background: #ffcc00;
  color: #000;
}

.eco-label {
  display: flex;
  align-items: center;
  padding: 0 10px;
  cursor: pointer;
  color: #8bc34a;
  font-weight: bold;
  font-size: 12px;
  border-left: 1px solid #555;
  height: 100%;
  transition: background 0.2s;
}

.eco-label:hover {
  background: #444;
}

.eco-label input {
  margin-right: 5px;
}

/* Weather Panel */
#weather-panel {
  position: absolute;
  bottom: 100px;
  left: 20px;
  width: 280px;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  border: 1px solid #444;
  border-radius: 8px;
  z-index: 1000;
  transition: max-height 0.3s ease-in-out;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 600px;
}

#weather-panel.minimized {
  max-height: 45px;
}

.weather-header {
  padding: 10px;
  background: #222;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  border-bottom: 1px solid #444;
  flex-shrink: 0;
  height: 45px;
  box-sizing: border-box;
}

.weather-content {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  max-height: 550px;
}

.weather-section-title {
  font-size: 11px;
  color: #ffcc00;
  border-bottom: 1px solid #555;
  padding-bottom: 2px;
  margin-bottom: 5px;
  margin-top: 5px;
}

.weather-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

#loading-indicator {
  position: absolute;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: #ffcc00;
  padding: 10px 20px;
  border-radius: 4px;
  border: 1px solid #ffcc00;
  font-weight: bold;
  z-index: 2000;
  display: none;
  animation: flash 1.5s infinite;
}

#update-log {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 280px;
  background: rgba(0, 0, 0, 0.85);
  color: #ecf0f1;
  border: 1px solid #555;
  border-radius: 8px;
  z-index: 1000;
  font-size: 12px;
  overflow: hidden;
  transition: max-height 0.3s, width 0.3s;
  max-height: 300px;
}

#update-log.minimized {
  max-height: 40px;
  width: 140px;
}

.log-header {
  padding: 10px;
  background: #34495e;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  border-bottom: 1px solid #555;
}

.log-content {
  padding: 10px;
}

.log-content ul {
  margin: 0;
  padding-left: 20px;
}

.log-content li {
  margin-bottom: 5px;
}

/* Cloud Panel */
#cloud-panel {
  position: absolute;
  top: 150px;
  right: 20px;
  width: 280px;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  border: 1px solid #444;
  border-radius: 8px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 800px;
  transition: max-height 0.3s;
}

#cloud-panel.minimized {
  max-height: 45px;
}

.cloud-header {
  padding: 10px;
  background: #2c3e50;
  cursor: move;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  border-bottom: 1px solid #555;
  height: 45px;
  box-sizing: border-box;
}

.cloud-content {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}

.cloud-summary {
  width: 100%;
  height: 60px;
  background: #111;
  color: #0f0;
  font-family: monospace;
  font-size: 10px;
  border: 1px solid #333;
  margin-top: 5px;
  resize: none;
}

@keyframes flash {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}