html {
  height: 100%;
  background: #010a1d;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: none;
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  background: transparent;
  position: relative;
  z-index: 1;
  overscroll-behavior: none;
}

:root {
  --bg: #050816;
  --fg: #f6fbff;
  --accent: #34d399; /* soft emerald */
  --accent-soft: rgba(52, 211, 153, 0.14);
  --danger: #fb7185; /* soft rose */
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  overflow-x: hidden;
  color: var(--fg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  scroll-behavior: smooth;
  background: transparent;
  overscroll-behavior: none;
}

/* Ocean background layer - scrolls with content */
.ocean-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100vh;
  z-index: -1;
  background: linear-gradient(
    to bottom,
    #0096c7 0%,
    #0077b6 15%,
    #023e8a 30%,
    #022b5c 45%,
    #011a3a 60%,
    #010a1d 80%,
    #010a1d 100%
  );
  background-attachment: scroll;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  animation: gentleWave 20s ease-in-out infinite alternate;
}

.page-content {
  max-width: 880px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3.5rem;
}

.content-section {
  margin-bottom: 2.5rem;
}

.content-section h2 {
  font-size: 1.25rem;
  margin: 0 0 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e0f2fe;
}

.content-section p {
  margin: 0 0 1rem;
  font-size: 0.98rem;
  line-height: 1.6;
  opacity: 0.9;
}

.content-section ul {
  margin: 0 0 1rem 1.2rem;
  padding: 0;
  font-size: 0.96rem;
  line-height: 1.6;
  opacity: 0.9;
}

.content-section li {
  margin-bottom: 0.4rem;
}

.content-section--cta {
  text-align: center;
  margin-top: 3rem;
}

.content-cta-text {
  margin: 0 0 1.4rem;
}

.content-cta {
  margin-top: 0.3rem;
}

.game-mode-selection {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.mode-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.5rem 2rem;
  border-radius: 1.5rem;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
  border: 2px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  color: var(--fg);
  transition: all 0.3s ease;
  cursor: pointer;
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.mode-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4), 0 0 30px rgba(52, 211, 153, 0.2);
}

.mode-card--game {
  /* Make the trivia card interactive: full opacity and clickable */
  opacity: 1;
  cursor: pointer;
  transition: all 0.25s ease;
}

.mode-card--game:hover {
  /* Match the generic mode-card hover so it doesn't look disabled */
  transform: translateY(-8px);
  border-color: var(--accent);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4), 0 0 30px rgba(52, 211, 153, 0.2);
}

.mode-icon {
  margin-bottom: 1.5rem;
  padding: 1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #38bdf8);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mode-card--game .mode-icon {
  /* Use the same vibrant accent gradient as the other cards so the icon isn't greyed out */
  background: linear-gradient(135deg, var(--accent), #38bdf8);
}

.mode-icon svg {
  color: #021014;
}

.mode-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: var(--fg);
  letter-spacing: 0.02em;
}

.mode-card--map .mode-title {
  color: var(--accent);
}

.mode-description {
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.85;
  margin: 0;
  max-width: 280px;
}

/* Hero / landing section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1.5rem 4.5rem;
  background: transparent; /* let the global ocean background show through */
  overflow: hidden;
}

.hero-inner {
  max-width: 760px;
  text-align: left;
  position: relative;
  z-index: 2;
}

.hero-background {
  position: absolute; /* fixed to viewport; motion is independent of scroll */
  inset: 0;
  overflow: hidden;
  z-index: 0; /* behind content */
  pointer-events: none;
}

.fish-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1; /* above bubbles, below content */
}

.bubble-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100%;
  pointer-events: none;
  z-index: 1; /* above background, below content */
}

/* Bubbles: rise from bottom of the screen to the top */
.bubble {
  position: fixed; /* fixed to viewport; motion is independent of scroll */
  bottom: -20px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(226, 243, 255, 0.7);
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.9), transparent 60%);
  box-shadow: 0 0 12px rgba(148, 197, 255, 0.45);
  opacity: 0;
  animation: bubble-rise linear infinite;
  will-change: transform, opacity;
}

.bubble-1 { left: 15%; width: 14px; height: 14px; animation-duration: 18s; animation-delay: 0s; }
.bubble-2 { left: 35%; width: 10px; height: 10px; animation-duration: 14s; animation-delay: 3s; }
.bubble-3 { left: 55%; width: 18px; height: 18px; animation-duration: 20s; animation-delay: 6s; }
.bubble-4 { left: 72%; width: 12px; height: 12px; animation-duration: 16s; animation-delay: 2s; }
.bubble-5 { left: 88%; width: 9px; height: 9px; animation-duration: 13s; animation-delay: 5s; }
.bubble-6 { left: 5%; width: 11px; height: 11px; animation-duration: 17s; animation-delay: 8s; }

@keyframes bubble-rise {
  0% {
    transform: translateY(0) scale(0.9);
    opacity: 0;
  }
  5% {
    opacity: 0.8;
  }
  95% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(calc(-100vh - 20px)) scale(1.15);
    opacity: 0;
  }
}

/* GIF fish that swim freely (JS-driven) */
.gif-fish {
  position: fixed; /* fixed to viewport; motion is independent of scroll */
  top: 0;
  left: 0;
  width: 260px;
  max-width: 40vw;
  height: 150px;
  background-image: url("./image/Adobe Express - file.png");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  pointer-events: none;
  opacity: 0.95;
  will-change: transform;
  transform-origin: 50% 50%;
}

.gif-fish--shrimp {
  background-image: url("./image/pngtree-sea-pink-shrimp-png-image_10213945.png");
  width: 180px;
  height: 110px;
}

.gif-fish--grey {
  background-image: url("./image/grayfish.png");
}

.gif-fish--orange {
  background-image: url("./image/orangefish.png");
  width: 85px;
  height: 50px;
}

.gif-fish--plastic-bag {
  background-image: url("./image/pngimg.com - plastic_bag_PNG4.png");
  width: 90px;
  height: 100px;
  opacity: 0.8;
}

/* Fish */
.fish {
  position: absolute;
  width: 46px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8, #34d399);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.7);
  transform-origin: center;
  animation: fish-swim linear infinite;
}

.fish::after {
  content: "";
  position: absolute;
  right: -12px;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.2));
  transform: translateY(-50%) rotate(35deg);
}

.fish::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #0f172a;
  transform: translateY(-50%);
}

.fish-1 { top: 30%; left: -60px; animation-duration: 32s; animation-delay: 0s; }
.fish-2 { top: 55%; left: -80px; animation-duration: 26s; animation-delay: 5s; }
.fish-3 { top: 70%; left: -50px; animation-duration: 30s; animation-delay: 9s; }

@keyframes gentleWave {
  0% {
    background-position: 0% 0%;
  }
  50% {
    background-position: 0% 2%;
  }
  100% {
    background-position: 0% 0%;
  }
}

@keyframes fish-swim {
  0% {
    transform: translateX(0) translateY(0);
  }
  50% {
    transform: translateX(60vw) translateY(-4px);
  }
  100% {
    transform: translateX(105vw) translateY(2px);
  }
}

/* Floating plastic & trash */
.trash {
  position: absolute;
  width: 26px;
  height: 18px;
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.9), rgba(148, 163, 184, 0.6));
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.9);
  opacity: 0.85;
  animation: trash-drift linear infinite;
}

.trash::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 3px;
  border: 1px dashed rgba(15, 23, 42, 0.4);
}

.trash-1 { top: 68%; left: 18%; animation-duration: 22s; animation-delay: 0s; }
.trash-2 { top: 42%; left: 62%; width: 30px; height: 20px; animation-duration: 28s; animation-delay: 4s; }
.trash-3 { top: 78%; left: 78%; width: 22px; height: 16px; animation-duration: 24s; animation-delay: 7s; }
.trash-4 { top: 50%; left: 8%; width: 28px; height: 20px; animation-duration: 30s; animation-delay: 10s; }

@keyframes trash-drift {
  0% {
    transform: translate3d(0, 0, 0) rotate(-4deg);
  }
  50% {
    transform: translate3d(12px, -10px, 0) rotate(6deg);
  }
  100% {
    transform: translate3d(22px, 0px, 0) rotate(-3deg);
  }
}

.hero-main-title {
  font-size: clamp(4rem, 8vw, 6rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.5rem;
  text-shadow: 0 0 30px rgba(0, 224, 255, 0.5);
  background: linear-gradient(135deg, var(--accent), #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin: 0 0 1rem;
  font-weight: 600;
}

.hero-subtitle {
  max-width: 30rem;
  margin: 0 0 1.75rem;
  font-size: 0.98rem;
  opacity: 0.85;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #34d399, #38bdf8);
  color: #021014;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.hero-cta:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7);
}

.cta-icon {
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.hero-cta--game {
  background: linear-gradient(135deg, #64748b, #475569);
  opacity: 0.7;
  cursor: not-allowed;
}

.hero-cta--game:hover {
  transform: none;
  filter: none;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

.hero-hint {
  font-size: 0.8rem;
  opacity: 0.75;
}

.map-section {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: #020617;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
  overflow: hidden;
}

.map-section.is-visible {
  opacity: 1;
  transform: scale(1);
}

.scroll-spacer {
  height: 100vh;
}

#app {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

#map {
  width: 100%;
  height: 100vh;
  filter: saturate(1.4) contrast(1.1);
}

.overlay {
  position: absolute;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(5, 8, 22, 0.9), rgba(7, 20, 44, 0.96));
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 0.9rem;
  backdrop-filter: blur(20px);
}

.overlay-title {
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.76rem;
  color: #e1f6ff;
}

.overlay-pill {
  font-size: 0.7rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 224, 255, 0.45);
  background: radial-gradient(circle at top left, rgba(0, 224, 255, 0.25), transparent);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.overlay-sub {
  font-size: 0.68rem;
  opacity: 0.8;
  white-space: nowrap;
}

.legend {
  position: absolute;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1000;
  padding: 0.6rem 0.8rem;
  border-radius: 0.7rem;
  background: radial-gradient(circle at top, rgba(5, 8, 22, 0.95), rgba(3, 9, 25, 0.94));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(22px);
  min-width: 140px;
}

.legend-title {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.4rem;
  color: rgba(229, 244, 255, 0.95);
}

.legend-gradient {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(30, 58, 138, 0.6), rgba(59, 130, 246, 0.7), rgba(6, 182, 212, 0.8), rgba(245, 158, 11, 0.9), rgba(239, 68, 68, 1.0), rgba(220, 38, 127, 1.0));
  margin-bottom: 0.4rem;
  position: relative;
  overflow: hidden;
}

.legend-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.6rem;
  opacity: 0.78;
}

.legend-source {
  margin-top: 0.4rem;
  font-size: 0.52rem;
  opacity: 0.7;
  line-height: 1.3;
}

.status {
  position: absolute;
  left: 1.25rem;
  bottom: 1.25rem;
  z-index: 1000;
  padding: 0.55rem 0.9rem;
  border-radius: 0.8rem;
  background: radial-gradient(circle at top, rgba(5, 8, 22, 0.98), rgba(2, 10, 30, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(18px);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(0, 224, 255, 0.9);
}

.status-text {
  opacity: 0.86;
}

.status-text strong {
  font-weight: 600;
}

.back-button {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 0.8rem;
  background: radial-gradient(circle at top, rgba(5, 8, 22, 0.95), rgba(3, 9, 25, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--fg);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.back-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  color: var(--accent);
}

.back-icon {
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .overlay {
    inset: 0.75rem 0.75rem auto;
    transform: none;
    justify-content: space-between;
    border-radius: 0.85rem;
  }

  .overlay-sub {
    display: none;
  }

  .legend {
    right: 0.75rem;
    bottom: 0.75rem;
  }

  .status {
    left: 0.75rem;
    bottom: 0.75rem;
  }

  .back-button {
    top: 0.75rem;
    left: 0.75rem;
  }

  .game-mode-selection {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
  }

  .mode-card {
    padding: 2rem 1.5rem;
  }

  .mode-title {
    font-size: 1.3rem;
  }

  .mode-description {
    font-size: 0.9rem;
  }
}

.map-section.is-visible {
  opacity: 1;
  transform: scale(1);
  z-index: 900;
}

/* Prevent scrolling on map page and fix map boundaries */
body:has(.map-section.is-visible) {
  overflow: hidden;
  height: 100vh;
}

.map-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 900;
}

#map {
  width: 100%;
  height: 100%;
  position: relative;
}

.overlay,
.back-button {
  pointer-events: auto;
  z-index: 2000;
}

/* Garbage Patch Labels */
.garbage-patch-label {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.patch-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: transparent;
  border: none;
  padding: 0;
  transition: all 0.2s ease;
}

.patch-marker:hover {
  transform: scale(1.05);
}

.patch-name {
  font-size: 11px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.1;
  white-space: nowrap;
  letter-spacing: 0.02em;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8), -1px -1px 2px rgba(0, 0, 0, 0.8), 1px -1px 2px rgba(0, 0, 0, 0.8), -1px 1px 2px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

/* Popup styles */
.patch-popup {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1e293b;
}

.patch-popup h3 {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.patch-popup p {
  margin: 4px 0;
  font-size: 12px;
  line-height: 1.4;
}

.patch-popup strong {
  font-weight: 600;
  color: #374151;
}

/* Enhanced popup styles for detailed information */
.detailed-patch-popup .leaflet-popup-content {
  margin: 8px 12px;
  line-height: 1.4;
}

.patch-details p {
  margin: 6px 0;
  font-size: 11px;
  line-height: 1.3;
}

.patch-details strong {
  font-weight: 600;
  color: #1f2937;
}

/* Heatmap info popup styles */
.heatmap-info-popup .leaflet-popup-content {
  margin: 8px 12px;
  line-height: 1.4;
}

.heatmap-popup h3 {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.pollution-details p {
  margin: 4px 0;
  font-size: 11px;
  line-height: 1.3;
}

.pollution-details strong {
  font-weight: 600;
  color: #374151;
}

/* Pollution level indicators */
.level-low { color: #10b981; font-weight: 600; }
.level-lowmedium { color: #f59e0b; font-weight: 600; }
.level-medium { color: #f97316; font-weight: 600; }
.level-high { color: #ef4444; font-weight: 600; }
.level-veryhigh { color: #dc2626; font-weight: 700; }

.data-note {
  margin-top: 8px;
  padding: 4px 6px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 3px;
  border-left: 2px solid #3b82f6;
}

.data-note small {
  font-size: 9px;
  color: #4b5563;
  font-style: italic;
}

/* Learn More Button */
.learn-more-container {
  margin-top: 12px;
  text-align: center;
  border-top: 1px solid #e5e7eb;
  padding-top: 8px;
}

.learn-more-btn {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.learn-more-btn:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
}

.learn-more-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

/* Learn More Modal */
.learn-more-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.learn-more-modal {
  background: white;
  border-radius: 12px;
  max-width: 800px;
  max-height: 90vh;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from { 
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to { 
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  color: white;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-content {
  padding: 24px;
  max-height: calc(90vh - 80px);
  overflow-y: auto;
}

.modal-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f3f4f6;
}

.modal-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.modal-section h3 {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
}

.modal-section p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: #4b5563;
}

.modal-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 2px solid #e5e7eb;
}

.modal-footer p {
  margin: 0 0 8px 0;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
}

.modal-footer ul {
  margin: 0;
  padding-left: 16px;
  list-style-type: disc;
}

.modal-footer li {
  margin-bottom: 4px;
  font-size: 11px;
}

.modal-footer a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
}

.modal-footer a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* Responsive modal */
@media (max-width: 768px) {
  .learn-more-modal {
    max-width: 95vw;
    margin: 10px;
  }
  
  .modal-header {
    padding: 16px 20px;
  }
  
  .modal-header h2 {
    font-size: 16px;
  }
  
  .modal-content {
    padding: 20px;
  }
}

/* Land-based waste facility markers */
.land-facility-marker {
  background: transparent !important;
  border: none !important;
}

.facility-icon {
  font-size: 18px;
  text-align: center;
  line-height: 24px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  border: 2px solid #374151;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}

.facility-icon:hover {
  transform: scale(1.1);
}

/* Land facility popup styles */
.land-facility-popup .leaflet-popup-content {
  margin: 8px 12px;
  line-height: 1.4;
}

.facility-popup h3 {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.facility-details p {
  margin: 4px 0;
  font-size: 11px;
  line-height: 1.3;
}

.facility-details strong {
  font-weight: 600;
  color: #374151;
}

/* Ocean current visualization styles */
.ocean-current-line {
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.ocean-current-line:hover {
  opacity: 1 !important;
}

.current-arrow {
  background: transparent !important;
  border: none !important;
  pointer-events: none;
}

.arrow-icon {
  font-size: 12px;
  color: #ffffff;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.5));
}

/* Ocean current popup styles */
.ocean-current-popup .leaflet-popup-content {
  margin: 8px 12px;
  line-height: 1.4;
}

.current-popup h3 {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.current-details p {
  margin: 4px 0;
  font-size: 11px;
  line-height: 1.3;
}

.current-details strong {
  font-weight: 600;
  color: #374151;
}

.current-note {
  margin-top: 8px;
  padding: 6px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 4px;
  border-left: 3px solid #3b82f6;
}

.current-note small {
  color: #1e40af;
  font-style: italic;
}

/* Map Options Bar */
.map-options {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: rgba(15, 23, 42, 0.3);
  backdrop-filter: blur(5px);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 1000;
  min-width: 200px;
  opacity: 0.6;
  transition: all 0.3s ease;
}

.map-options:hover {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 1;
  transform: translateY(-2px);
}

.map-options h3 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: #e2e8f0;
  text-align: center;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.map-options:hover h3 {
  opacity: 1;
}

.option-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  text-align: left;
  opacity: 0.8;
}

.map-options:hover .option-btn {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 1;
}

.option-btn:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: rgba(0, 224, 255, 0.3);
  color: #e2e8f0;
  transform: translateY(-1px);
}

.option-btn.active {
  background: linear-gradient(135deg, rgba(0, 224, 255, 0.3), rgba(0, 150, 255, 0.3));
  border-color: rgba(0, 224, 255, 0.6);
  color: #00e0ff;
  box-shadow: 0 0 20px rgba(0, 224, 255, 0.3);
  opacity: 1 !important;
}

.map-options:hover .option-btn.active {
  background: linear-gradient(135deg, rgba(0, 224, 255, 0.2), rgba(0, 150, 255, 0.2));
  border-color: rgba(0, 224, 255, 0.5);
  box-shadow: 0 0 20px rgba(0, 224, 255, 0.2);
}

.option-btn.active:hover {
  background: linear-gradient(135deg, rgba(0, 224, 255, 0.3), rgba(0, 150, 255, 0.3));
  border-color: rgba(0, 224, 255, 0.7);
  transform: translateY(-1px);
}

.btn-icon {
  font-size: 16px;
  line-height: 1;
}

.btn-text {
  font-weight: 600;
}

/* Responsive adjustments for options bar */
@media (max-width: 768px) {
  .map-options {
    bottom: 70px;
    left: 10px;
    right: 10px;
    min-width: auto;
    padding: 10px;
  }
  
  .map-options h3 {
    font-size: 12px;
    margin-bottom: 8px;
  }
  
  .option-buttons {
    flex-direction: row;
    justify-content: space-between;
    gap: 6px;
  }
  
  .option-btn {
    flex: 1;
    padding: 10px 8px;
    font-size: 11px;
    flex-direction: column;
    gap: 4px;
  }
  
  .btn-text {
    font-size: 9px;
    font-weight: 500;
  }
  
  .btn-icon {
    font-size: 16px;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .map-options {
    bottom: 60px;
    left: 5px;
    right: 5px;
    padding: 8px;
  }
  
  .btn-text {
    display: none;
  }
  
  .btn-icon {
    font-size: 18px;
    margin: 0 auto;
  }
  
  .option-btn {
    padding: 8px 4px;
  }
}

/* Enhanced Map Styling */
#map {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: 12px;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(0, 224, 255, 0.1);
  overflow: hidden;
}

.leaflet-tile-pane {
  filter: contrast(1.1) brightness(0.95) saturate(1.05);
  transition: filter 0.3s ease;
}

.leaflet-control-zoom {
  border: none !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
}

.leaflet-control-zoom a {
  background: rgba(15, 23, 42, 0.9) !important;
  border: 1px solid rgba(0, 224, 255, 0.2) !important;
  color: var(--accent) !important;
  backdrop-filter: blur(12px);
  transition: all 0.3s ease !important;
}

.leaflet-control-zoom a:hover {
  background: rgba(0, 224, 255, 0.1) !important;
  border-color: rgba(0, 224, 255, 0.4) !important;
  box-shadow: 0 0 20px rgba(0, 224, 255, 0.3) !important;
}

.leaflet-popup-content-wrapper {
  background: rgba(15, 23, 42, 0.95) !important;
  border: 1px solid rgba(0, 224, 255, 0.3) !important;
  border-radius: 12px !important;
  backdrop-filter: blur(16px) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6) !important;
}

.leaflet-popup-content {
  color: #e2e8f0 !important;
  font-family: inherit !important;
}

.leaflet-popup-tip {
  background: rgba(15, 23, 42, 0.95) !important;
  border: 1px solid rgba(0, 224, 255, 0.3) !important;
}

/* City Search Bar Styles */
.city-search-container {
  position: absolute;
  top: 20px;
  right: 80px;
  z-index: 1000;
  width: 280px;
  max-width: calc(100vw - 40px);
}

.search-input-wrapper {
  position: relative;
}

#city-search-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  color: #e2e8f0;
  font-size: 14px;
  font-family: inherit;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
  outline: none;
}

#city-search-input::placeholder {
  color: rgba(226, 232, 240, 0.6);
}

#city-search-input:focus {
  border-color: rgba(0, 224, 255, 0.5);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 224, 255, 0.3);
  background: rgba(15, 23, 42, 0.98);
}

.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: none;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  max-height: 200px;
  overflow-y: auto;
  display: none;
  z-index: 1001;
}

.search-dropdown.show {
  display: block;
}

.dropdown-item {
  padding: 10px 16px;
  color: #cbd5e1;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background: rgba(0, 224, 255, 0.1);
  color: #e2e8f0;
}

.dropdown-item.highlighted {
  background: rgba(0, 224, 255, 0.15);
  color: #00e0ff;
}

.city-flag {
  font-size: 16px;
  flex-shrink: 0;
}

.city-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.city-name {
  font-weight: 600;
}

.city-country {
  font-size: 11px;
  opacity: 0.7;
}

/* Loading state */
.dropdown-loading {
  padding: 16px;
  text-align: center;
  color: rgba(226, 232, 240, 0.6);
  font-size: 12px;
}

/* No results state */
.dropdown-no-results {
  padding: 16px;
  text-align: center;
  color: rgba(226, 232, 240, 0.6);
  font-size: 12px;
  font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .city-search-container {
    top: 70px;
    right: 15px;
    left: 15px;
    width: auto;
    max-width: calc(100vw - 30px);
  }
  
  #city-search-input {
    padding: 10px 14px;
    font-size: 13px;
  }
  
  .dropdown-item {
    padding: 8px 14px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .city-search-container {
    top: 60px;
    right: 10px;
    left: 10px;
    width: auto;
  }
  
  #city-search-input {
    padding: 8px 12px;
    font-size: 12px;
  }
}

/* AI Enhanced City Popup Styles */
.ai-enhanced-city-popup .leaflet-popup-content-wrapper {
  background: rgba(15, 23, 42, 0.98) !important;
  border: 1px solid rgba(0, 224, 255, 0.4) !important;
  border-radius: 16px !important;
  backdrop-filter: blur(20px) !important;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8) !important;
}

.ai-info-section {
  margin-top: 12px;
  padding: 12px;
  background: rgba(0, 224, 255, 0.05);
  border: 1px solid rgba(0, 224, 255, 0.2);
  border-radius: 8px;
}

.ai-info-section h4 {
  margin: 0 0 8px 0;
  font-size: 13px;
  font-weight: 700;
  color: #00e0ff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-summary {
  font-size: 11px;
  color: #e2e8f0;
  margin: 6px 0 10px 0;
  opacity: 0.8;
}

.learn-more-btn {
  background: linear-gradient(135deg, #00e0ff, #0099cc);
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  justify-content: center;
}

.learn-more-btn:hover {
  background: linear-gradient(135deg, #33e6ff, #00b3e6);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 224, 255, 0.3);
}

.learn-more-btn:active {
  transform: translateY(0);
}

.ai-content {
  font-size: 11px;
  line-height: 1.4;
  color: #e2e8f0;
  margin: 8px 0;
}

.ai-disclaimer {
  margin: 8px 0 0 0 !important;
  font-size: 10px;
  color: rgba(226, 232, 240, 0.7);
  font-style: italic;
}

.city-popup hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin: 12px 0;
}

/* AI Modal Styles */
.ai-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.ai-modal-content {
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(0, 224, 255, 0.4);
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(20px);
}

.ai-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(0, 224, 255, 0.2);
  background: rgba(0, 224, 255, 0.05);
}

.ai-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #00e0ff;
}

.ai-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #e2e8f0;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.ai-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #00e0ff;
}

.ai-modal-body {
  padding: 24px;
  max-height: calc(80vh - 100px);
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.6;
  color: #e2e8f0;
}

.ai-modal-body h4 {
  color: #00e0ff;
  margin: 20px 0 10px 0;
  font-size: 16px;
}

.ai-modal-body ul, .ai-modal-body ol {
  margin: 10px 0;
  padding-left: 20px;
}

.ai-modal-body li {
  margin: 8px 0;
}

.ai-modal-body p {
  margin: 12px 0;
}

/* Mobile responsive modal */
@media (max-width: 768px) {
  .ai-modal {
    padding: 10px;
  }
  
  .ai-modal-content {
    max-height: 90vh;
    border-radius: 12px;
  }
  
  .ai-modal-header {
    padding: 16px 20px;
  }
  
  .ai-modal-header h3 {
    font-size: 16px;
  }
  
  .ai-modal-body {
    padding: 20px;
    font-size: 13px;
    max-height: calc(90vh - 80px);
  }
}
