/* Minimal, clean styling */
:root {
  --bg: #0b0b10;
  --panel: #15151f;
  --text: #e8e8f0;
  --muted: #9aa0a6;
  --accent: #6abf69;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(21,21,31,0.95), rgba(21,21,31,0.85));
  backdrop-filter: blur(6px);
  z-index: 1000;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.brand {
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-right: 8px;
}

.controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

select, input[type="search"] {
  background: var(--panel);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 7px 10px;
  outline: none;
}

#map {
  position: fixed;
  top: 56px; /* height of topbar */
  bottom: 38px; /* height of footer */
  left: 0; right: 0;
}

.footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(0deg, rgba(21,21,31,0.95), rgba(21,21,31,0.85));
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 6px 14px;
  font-size: 12px;
  color: var(--muted);
  z-index: 1000;
}

.footer a { color: var(--accent); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

.reset {
  background: var(--accent);
  color: #071a07;
  border: none;
  border-radius: 10px;
  padding: 8px 10px;
  font-weight: 600;
  cursor: pointer;
}

.count {
  margin-left: 4px;
  color: var(--muted);
  font-size: 13px;
}

/* Leaflet overrides for dark theme */
.leaflet-container {
  background: #0e0f14;
}

.leaflet-control-zoom a {
  background: var(--panel);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.12);
}

.leaflet-popup-content-wrapper, .leaflet-popup-tip {
  background: #10131a;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.12);
}

.badge {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 12px;
  color: var(--text);
}

/* Colored marker dots */
.marker-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--dot, #ccc);
  border: 2px solid rgba(0,0,0,0.6);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.15), 0 1px 6px rgba(0,0,0,0.6);
  display: inline-block;
}

.legend {
  padding: 8px 10px;
  background: var(--panel, #15151f);
  color: var(--text, #e8e8f0);
  border-radius: 8px;
  font-size: 0.9rem;
}
.legend-title {
  font-weight: 700;
  margin-bottom: 6px;
}
.legend-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
}
.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}


/* Colored cluster bubbles */
.cluster-icon { border-radius: 50%; }
.cluster-bubble {
  background: var(--c, #aaa);
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.55);
  box-shadow: 0 2px 10px rgba(0,0,0,0.6), inset 0 0 0 2px rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center;
}
.cluster-bubble span {
  color: #000; font-weight: 800; text-shadow: 0 1px 0 rgba(255,255,255,0.4);
}

.search-label { min-width: 240px; }
@media (max-width: 840px) {
  .search-label { min-width: 160px; }
}
