:root {
  --sun-glow: #ffe4a3;
  --sky-deep: #0a6e8f;
  --water: #1fa2b8;
  --water-light: #6fd4c9;
  --sand: #f2d9a8;
  --sand-light: #f8ecce;
  --sea-deep: #0a5c73;
  --ink: #1c3d4a;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  font-family: "Nunito Sans", system-ui, sans-serif;
  color: var(--ink);
}

body {
  display: flex;
  flex-direction: column;
}

#header {
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  padding: 16px 24px 26px;
  background: radial-gradient(circle at 12% 20%, var(--sun-glow) 0%, rgba(255, 228, 163, 0) 40%),
    linear-gradient(115deg, var(--sky-deep) 0%, var(--water) 40%, var(--water-light) 70%, var(--sand) 100%);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  z-index: 1000;
}

.header-content {
  position: relative;
  z-index: 1;
}

#header h1 {
  margin: 0;
  font-family: "Baloo 2", "Nunito Sans", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(24px, 4vw, 36px);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

#header p {
  margin: 2px 0 0;
  font-size: 14px;
  font-weight: 600;
  opacity: 0.95;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.header-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: 26px;
  display: block;
}

.header-wave path {
  fill: var(--sand-light);
}

#map {
  flex: 1 1 auto;
  min-height: 0;
}

.flag-icon svg {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}

#legend {
  position: absolute;
  right: 16px;
  bottom: 24px;
  z-index: 900;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  font-size: 13px;
  font-weight: 600;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  white-space: nowrap;
}

.source-link {
  display: block;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 11px;
  font-weight: 600;
  color: var(--sea-deep);
  text-decoration: none;
}

.source-link:hover {
  text-decoration: underline;
}

.legend-item .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
  flex: 0 0 auto;
}

.leaflet-popup-content-wrapper {
  border-radius: 12px;
}

.leaflet-popup-content {
  font-family: "Nunito Sans", system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.5;
}

.leaflet-popup-content strong {
  font-family: "Baloo 2", "Nunito Sans", system-ui, sans-serif;
  font-size: 15px;
  color: var(--sea-deep);
}
