html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#map {
  width: 100%;
  height: 100%;
  z-index: 0;
}

#menu {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1100;
  background: rgba(10, 12, 20, 0.90);
  padding: 0;
  border-radius: 16px;
  box-shadow: 
    0 0 0 1px rgba(254, 255, 177, 0.1),
    0 20px 50px -12px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  font-size: 14px;
  line-height: 1.4;
  max-width: 320px;
  overflow: hidden;
  border: 1px solid rgba(254, 255, 177, 0.2);
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

#menu:hover {
  background: rgba(10, 12, 20, 0.95);
  border-color: rgba(254, 255, 177, 0.3);
  box-shadow: 
    0 0 0 1px rgba(254, 255, 177, 0.15),
    0 24px 60px rgba(0, 0, 0, 0.8);
}

#menu-header {
  background: rgba(254, 255, 177, 0.08);
  border-bottom: 1px solid rgba(254, 255, 177, 0.15);
  color: #f9fafb;
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

#menu-header:hover {
  background: rgba(254, 255, 177, 0.12);
  border-bottom-color: rgba(254, 255, 177, 0.22);
}

#menu-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: linear-gradient(135deg, #feffb1, #fffa5f);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

#menu-toggle {
  font-size: 20px;
  transition: transform 0.3s ease;
  line-height: 1;
  color: #feffb1;
}

#menu-toggle.collapsed {
  transform: rotate(-90deg);
}

#menu-content {
  max-height: 70vh;
  overflow-y: auto;
  overflow-x: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  padding: 12px 16px;
  color: #f9fafb;
}

#menu-content.collapsed {
  max-height: 0;
  opacity: 0;
  padding: 0 16px;
  overflow: hidden;
}

#menu-content::-webkit-scrollbar {
  width: 8px;
}

#menu-content::-webkit-scrollbar-track {
  background: rgba(254, 255, 177, 0.05);
  border-radius: 4px;
}

#menu-content::-webkit-scrollbar-thumb {
  background: rgba(254, 255, 177, 0.2);
  border-radius: 4px;
}

#menu-content::-webkit-scrollbar-thumb:hover {
  background: rgba(254, 255, 177, 0.3);
}

#menu label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  color: #e5e7eb;
}

#menu label:hover {
  background: rgba(254, 255, 177, 0.08);
  color: #f9fafb;
}

#menu input[type="checkbox"] {
  cursor: pointer;
  width: 16px;
  height: 16px;
  accent-color: #feffb1;
}

#menu img {
  vertical-align: middle;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

.actions {
  margin-top: 12px;
  margin-bottom: 8px;
  display: flex;
  gap: 8px;
}

.actions button {
  flex: 1;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(254, 255, 177, 0.25);
  background: rgba(254, 255, 177, 0.08);
  border-radius: 999px;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  color: #feffb1;
  position: relative;
  overflow: hidden;
}

.actions button:hover {
  background: rgba(254, 255, 177, 0.15);
  border-color: rgba(254, 255, 177, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.actions button:active {
  transform: translateY(0);
}

#alert-type-list {
  margin-top: 12px;
  border-top: 1px solid rgba(254, 255, 177, 0.15);
  padding-top: 12px;
}

#alert-count {
  font-size: 12px;
  color: #b0b5c1;
  font-weight: 500;
}

.legend {
  background: rgba(10, 12, 20, 0.90);
  padding: 14px;
  font-size: 13px;
  border-radius: 16px;
  position: absolute;
  bottom: 20px;
  left: 20px;
  z-index: 1000;
  border: 1px solid rgba(254, 255, 177, 0.2);
  box-shadow: 
    0 0 0 1px rgba(254, 255, 177, 0.1),
    0 20px 50px -12px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  max-width: 260px;
  color: #f9fafb;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.legend:hover {
  background: rgba(10, 12, 20, 0.95);
  border-color: rgba(254, 255, 177, 0.3);
  box-shadow: 
    0 0 0 1px rgba(254, 255, 177, 0.15),
    0 24px 60px rgba(0, 0, 0, 0.8);
}

.legend b {
  background: linear-gradient(135deg, #feffb1, #fffa5f);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 15px;
  font-weight: 700;
}

/* Leaflet Zoom Control - Position bottom-left */
.leaflet-top.leaflet-left {
  top: auto !important;
  bottom: 20px;
  left: 20px;
}

/* Marker Cluster Styling (same-icon clusters) */
.cluster-wrapper {
  background: transparent;
}
.cluster-same-icon {
  position: relative;
  width: 32px;
  height: 32px;
  display: inline-block;
}
.cluster-same-icon img {
  width: 32px;
  height: 32px;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.35));
}
.cluster-same-icon .cluster-count {
  position: absolute;
  right: -4px;
  bottom: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: linear-gradient(135deg, #feffb1, #fffa5f);
  color: #0a0c14;
  border-radius: 10px;
  border: 2px solid rgba(254, 255, 177, 0.5);
  font-size: 12px;
  line-height: 16px;
  text-align: center;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Marker Icon Filter (subtle shadow) */
.marker-icon-8B0000,
.marker-icon-FF4500,
.marker-icon-FFD700,
.marker-icon-87CEEB,
.marker-icon-A020F0,
.marker-icon-696969 {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}