:root {
  --panel-bg: rgba(255, 255, 255, 0.94);
  --panel-border: rgba(15, 23, 42, 0.14);
  --shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; }
body { font-family: Arial, Helvetica, sans-serif; overflow: hidden; }
#map { width: 100%; height: 100vh; background: #d9edf5; }

.map-title,
.legend,
.coordinate-box,
.opacity-box,
#mini-map-wrap {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
  border-radius: 5px;
}

.map-title {
  padding: 9px 12px;
  min-width: 220px;
}
.map-title strong { display: block; font-size: 14px; }
.map-title span { display: block; font-size: 11px; color: #475569; margin-top: 3px; }

.legend { padding: 8px 10px; min-width: 290px; }
.legend-title { font-size: 12px; font-weight: 700; margin-bottom: 5px; }
.legend-gradient {
  height: 13px;
  border: 1px solid rgba(0,0,0,.25);
  background: linear-gradient(90deg, #2615d8 0%, #00a7ff 18%, #00e8bd 38%, #8cff45 55%, #fff03a 70%, #ff9d21 84%, #db2118 100%);
}
.legend-labels { display: flex; justify-content: space-between; margin-top: 3px; font-size: 10px; color: #334155; }

.opacity-box { padding: 7px 9px; width: 210px; font-size: 11px; }
.opacity-box label { display: flex; justify-content: space-between; margin-bottom: 4px; }
.opacity-box input { width: 100%; }

.coordinate-box { padding: 6px 9px; font-size: 11px; min-width: 185px; text-align: center; }

#mini-map-wrap {
  position: absolute;
  right: 10px;
  bottom: 34px;
  z-index: 500;
  width: 160px;
  height: 115px;
  padding: 4px;
}
#mini-map { width: 100%; height: 100%; border-radius: 3px; }

.weather-popup { min-width: 210px; line-height: 1.48; }
.weather-popup h3 { margin: 0 0 7px; font-size: 15px; }
.weather-popup table { width: 100%; border-collapse: collapse; font-size: 12px; }
.weather-popup td { padding: 2px 0; vertical-align: top; }
.weather-popup td:first-child { color: #475569; padding-right: 9px; }
.weather-popup .updated { margin-top: 6px; font-size: 10px; color: #64748b; }

.leaflet-control-layers { font-size: 12px; }
.leaflet-control-scale-line { background: rgba(255,255,255,.82); }

@media (max-width: 640px) {
  .map-title { min-width: 0; max-width: 210px; }
  .legend { min-width: 230px; }
  #mini-map-wrap { width: 125px; height: 90px; }
  .opacity-box { width: 170px; }
}
