:root {
  --bg-overlay: rgba(15, 23, 42, 0.75);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --border-color: rgba(255, 255, 255, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body,
html {
  height: 100%;
  width: 100%;
  font-family: 'Outfit', sans-serif;
  overflow: hidden;
  background-color: #0f172a;
}

#map {
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.overlay-panel {
  z-index: 1000;
  background: var(--bg-overlay);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 24px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  max-width: 350px;
  color: var(--text-primary);
  transform: translateY(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.overlay-panel:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.overlay-panel h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #a78bfa 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.overlay-panel p {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Customizing Leaflet Controls for Dark Theme */
.leaflet-control-zoom {
  border: none !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
  border-radius: 8px !important;
  overflow: hidden;
}

.leaflet-control-zoom a {
  background-color: var(--bg-overlay) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color) !important;
  backdrop-filter: blur(10px);
}

.leaflet-control-zoom a:hover {
  background-color: rgba(30, 41, 59, 0.9) !important;
}

.leaflet-control-attribution {
  background: var(--bg-overlay) !important;
  color: var(--text-secondary) !important;
  backdrop-filter: blur(4px);
}

.legend, .attribution {
  background: rgba(15, 23, 42, 0.88);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.25);
  max-width: 350px;
}

.attribution {
  max-width: none;
}

.attribution-item {
  white-space: nowrap;
  font-size: 0.9rem;
  line-height: 1.6;
}

.legend-title, .attribution-title {
  font-weight: 600;
  margin-bottom: 10px;
  color: #cbd5e1;
}

.legend-item, .attribution-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.legend-item:last-child, .attribution-item:last-child {
  margin-bottom: 0;
}

.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.legend-swatch.school-based {
  background: #f97316;
}

.legend-swatch.home-based {
  background: #38bdf8;
}

.legend-swatch.center-based {
  background: #a78bfa;
}

.legend-swatch.head-start {
  background: #10b981;
}

.legend-swatch.astoria {
  background: #38bdf8;
}

/* County Labels */
.county-label {
  background: rgba(15, 23, 42, 0.9);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
}

.leaflet-control-attribution a {
  color: #38bdf8 !important;
}
