/* Reset margins and make the map take up 100% of the viewport */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body,
html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #121212;
}

#map {
  width: 100%;
  height: 100%;
  background: #1a1a1a;
}
/* Add this to style.css */
.leaflet-tile-pane {
  filter: brightness(0.6) invert(1) contrast(3) hue-rotate(300deg) saturate(0.3);
}
/* Base custom marker badge */
.custom-marker {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

/* State 1: Active (Ready to visit - Neon pulse) */
.custom-marker.active {
  background: #080808;
  color: #c8ff01;
  border-color: #c8ff01;
  box-shadow: 0 0 16px rgba(200, 255, 1, 0.6);
  animation: marker-pulse 2s infinite;
}

/* State 2: Locked (Cannot click yet) */
.custom-marker.locked {
  background: #1e1e1e;
  color: #555555;
  border-color: #333333;
  opacity: 0.55;
  cursor: not-allowed;
}

/* State 3: Completed (Already visited) */
.custom-marker.completed {
  background: #c8ff01;
  color: #080808;
  border-color: #c8ff01;
}

/* Pulse animation for the active target */
@keyframes marker-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(200, 255, 1, 0.7);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(200, 255, 1, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(200, 255, 1, 0);
  }
}
/* Modal Backdrop Overlay */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000; /* Above Leaflet map layers */
  padding: 20px;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}

.modal-backdrop.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Modal Card Panel */
.modal-card {
  position: relative;
  background: #0d0d0d;
  border: 1px solid #262626;
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  padding: 28px;
  color: #f0f0f0;
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.8),
    0 0 20px rgba(200, 255, 1, 0.05);
  transform: translateY(0);
  transition: transform 0.25s ease;
}

.modal-backdrop.hidden .modal-card {
  transform: translateY(16px);
}

/* Close icon */
.close-icon {
  position: absolute;
  top: 18px;
  right: 20px;
  background: none;
  border: none;
  color: #777;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

.close-icon:hover {
  color: #fff;
}

/* Header Elements */
.step-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #c8ff01;
  background: rgba(200, 255, 1, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
  margin-bottom: 12px;
}

#modal-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
  color: #ffffff;
}

.subtitle {
  font-size: 13px;
  color: #888;
  margin-bottom: 18px;
}

/* Body Content */
.modal-body p {
  font-size: 15px;
  line-height: 1.6;
  color: #cccccc;
  margin-bottom: 24px;
}

/* Primary Action Button */
.primary-btn {
  width: 100%;
  background: #c8ff01;
  color: #080808;
  border: none;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
}

.primary-btn:hover {
  background: #d6ff33;
  box-shadow: 0 0 15px rgba(200, 255, 1, 0.4);
}
/* Route Polylines */
.journey-route {
  stroke: #c8ff01;
  stroke-width: 3.5;
  stroke-dasharray: 8, 8;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(200, 255, 1, 0.7));
  animation: dash-animation 20s linear infinite;
}

/* Subtle animation to give life to the path */
@keyframes dash-animation {
  to {
    stroke-dashoffset: -1000;
  }
}
/* Top HUD Bar */
.hud-header {
  position: fixed;
  top: 20px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  pointer-events: none; /* Allows clicking on the map around the HUD */
}

.hud-info {
  background: rgba(13, 13, 13, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid #262626;
  padding: 10px 16px;
  border-radius: 10px;
  pointer-events: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.hud-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #c8ff01;
  display: block;
}

#hud-progress-text {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  margin-top: 2px;
}

/* Reset Button */
.hud-reset-btn {
  background: rgba(13, 13, 13, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid #262626;
  color: #888888;
  font-size: 12px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.2s ease;
}

.hud-reset-btn:hover {
  color: #ff4d4d;
  border-color: #ff4d4d;
}
/* ==========================================================================
   Modern Editorial Intro Overlay (No Containers / Borderless)
   ========================================================================== */
.intro-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 8, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.6s ease;
}

.intro-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-wrapper {
  max-width: 860px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Clean editorial left alignment */
}

/* Meta Tag & Counter */
.intro-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.intro-tag {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #c8ff01;
}

.intro-counter {
  font-size: 13px;
  font-weight: 500;
  color: #666666;
  font-feature-settings: "tnum";
  letter-spacing: 1px;
}

/* Big Typography */
.intro-body {
  min-height: 220px; /* Prevents layout shifting during transitions */
}

.intro-title {
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-bottom: 20px;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.intro-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 400;
  line-height: 1.6;
  color: #a0a0a0;
  max-width: 680px;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}
.intro-sub {
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  font-weight: 400;
  line-height: 1.6;
  color: #888888;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

/* Hide seamlessly when empty so there is no layout jump */
.intro-sub:empty {
  display: none;
}
/* Numeric & Segmented Indicators Below Text */
.intro-indicators {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 36px 0 40px;
}

.intro-seg {
  height: 3px;
  width: 32px;
  background: #222222;
  border-radius: 2px;
  transition: all 0.35s ease;
}

.intro-seg.active {
  width: 56px;
  background: #c8ff01;
  box-shadow: 0 0 12px rgba(200, 255, 1, 0.6);
}

/* Minimalist Navigation Buttons */
.intro-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-btn {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  transition: all 0.2s ease;
}

.prev-btn {
  color: #555555;
}

.prev-btn:hover:not(:disabled) {
  color: #ffffff;
}

.prev-btn:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

.next-btn {
  color: #c8ff01;
  position: relative;
}

.next-btn::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: #c8ff01;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
  box-shadow: 0 0 8px #c8ff01;
}

.next-btn:hover::after {
  transform: scaleX(1);
}

.next-btn:hover {
  text-shadow: 0 0 10px rgba(200, 255, 1, 0.5);
}

.arrow {
  transition: transform 0.2s ease;
}

.next-btn:hover .arrow {
  transform: translateX(4px);
}

.prev-btn:hover:not(:disabled) .arrow {
  transform: translateX(-4px);
}
/* ==========================================================================
   Modal Multi-Page Stepper Styles
   ========================================================================== */
.modal-card {
  background: #111111;
  border: 1px solid #262626;
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  padding: 32px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.8),
    0 0 30px rgba(200, 255, 1, 0.05);
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid #222222;
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.modal-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #c8ff01;
  text-transform: uppercase;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-top: 4px;
}

.modal-subtitle {
  font-size: 0.9rem;
  color: #777777;
  margin-top: 2px;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: #777777;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}

.modal-close-btn:hover {
  color: #ffffff;
}

/* Stepper Body */
.modal-body {
  min-height: 140px;
}

.modal-page-counter {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #555555;
  text-transform: uppercase;
}

.modal-page-heading {
  font-size: 1.2rem;
  font-weight: 600;
  color: #ffffff;
  margin: 10px 0 8px;
  transition:
    opacity 0.2s,
    transform 0.2s;
}

.modal-page-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #cccccc;
  margin-bottom: 8px;
  transition:
    opacity 0.2s,
    transform 0.2s;
}

.modal-page-sub {
  font-size: 0.85rem;
  line-height: 1.5;
  color: #888888;
  transition:
    opacity 0.2s,
    transform 0.2s;
}

/* Modal Dots Indicator */
.modal-dots {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0 24px;
}

.modal-dot {
  height: 3px;
  width: 20px;
  background: #262626;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.modal-dot.active {
  width: 36px;
  background: #c8ff01;
  box-shadow: 0 0 8px rgba(200, 255, 1, 0.5);
}

/* Modal Footer & Buttons */
.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.modal-nav-btn {
  background: transparent;
  border: none;
  color: #666666;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.modal-nav-btn:hover:not(:disabled) {
  color: #ffffff;
}

.modal-nav-btn:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

.modal-action-btn {
  background: #c8ff01;
  color: #080808;
  border: none;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.5px;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}

.modal-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(200, 255, 1, 0.4);
}
/* Keep the modal inside the visible viewport */
.modal-backdrop {
  overflow: hidden;
  padding: 16px;
}

.modal-card {
  width: min(100%, 520px);
  max-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header, indicators, and controls remain visible */
.modal-header,
.modal-dots,
.modal-footer {
  flex-shrink: 0;
}

/* Only the dialogue content scrolls */
.modal-body {
  flex: 1 1 auto;
  min-height: 0; /* Required for scrolling inside a flex container */
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #c8ff01 #181818;
  padding-right: 8px;
}

.modal-body::-webkit-scrollbar {
  width: 4px;
}

.modal-body::-webkit-scrollbar-track {
  background: #181818;
}

.modal-body::-webkit-scrollbar-thumb {
  background: #c8ff01;
  border-radius: 999px;
}
@media (max-width: 600px) {
  .modal-backdrop {
    align-items: flex-end;
    padding: 8px;
  }

  .modal-card {
    max-height: calc(100dvh - 16px);
    padding: 20px 16px;
    border-radius: 16px;
  }

  .modal-header {
    margin-bottom: 14px;
    padding-bottom: 12px;
  }

  .modal-body {
    padding-right: 6px;
  }

  .modal-dots {
    margin: 14px 0 16px;
  }

  .modal-footer {
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
}
.leaflet-overlay-pane path {
  vector-effect: non-scaling-stroke;
}

.journey-route {
  filter: drop-shadow(0 0 5px rgba(200, 255, 1, 0.8));
}
/* ==========================================================================
   Finale Overlay & Cards
   ========================================================================== */
.finale-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 8, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.4s ease,
    visibility 0.4s ease;
}

.finale-backdrop.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.finale-card {
  width: min(100%, 540px);
  background: #0d0d0d;
  border: 1px solid rgba(200, 255, 1, 0.22);
  box-shadow:
    0 0 40px rgba(0, 0, 0, 0.8),
    0 0 20px rgba(200, 255, 1, 0.06);
  border-radius: 16px;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  animation: finaleSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.finale-card.hidden {
  display: none !important;
}

@keyframes finaleSlideUp {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.finale-tag {
  font-family: monospace;
  font-size: 0.75rem;
  letter-spacing: 2px;
  color: #c8ff01;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.finale-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 10px 0;
  line-height: 1.25;
}

.finale-desc {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.55;
  margin: 0 0 28px 0;
}

/* Option Buttons list */
.finale-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.finale-opt-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #ececec;
  font-size: 0.92rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.finale-opt-btn .opt-num {
  font-family: monospace;
  font-size: 0.8rem;
  color: #c8ff01;
  opacity: 0.8;
  background: rgba(200, 255, 1, 0.08);
  padding: 4px 8px;
  border-radius: 6px;
}

.finale-opt-btn:hover {
  background: #1b1b1b;
  border-color: #c8ff01;
  color: #ffffff;
  transform: translateX(4px);
}

.finale-opt-btn:active {
  transform: scale(0.99);
}

@media (max-width: 600px) {
  .finale-card {
    padding: 24px 20px;
    border-radius: 14px;
  }
  .finale-title {
    font-size: 1.45rem;
  }
  .finale-opt-btn {
    padding: 12px 14px;
    font-size: 0.85rem;
  }
}
/* ==========================================================================
   Calendar & Meal Selection Styling
   ========================================================================== */
.calendar-wrapper {
  background: #121212;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 18px;
}

.calendar-header {
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  color: #c8ff01;
  letter-spacing: 1px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.calendar-grid-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-family: monospace;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 8px;
}

.calendar-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-family: monospace;
  color: #ececec;
  background: #181818;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cal-day:hover:not(.disabled) {
  border-color: #c8ff01;
  background: #222;
  color: #fff;
}

.cal-day.active {
  background: #c8ff01;
  color: #080808;
  font-weight: bold;
  box-shadow: 0 0 12px rgba(200, 255, 1, 0.35);
}

.cal-day.disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

.cal-day.empty {
  background: transparent;
  cursor: default;
}

/* Meal Selector Buttons */
.meal-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.meal-option {
  cursor: pointer;
}

.meal-option input {
  display: none;
}

.meal-box {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #ececec;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.meal-option input:checked + .meal-box {
  border-color: #c8ff01;
  background: rgba(200, 255, 1, 0.1);
  color: #c8ff01;
  font-weight: 600;
}
/* Navigation Row for Back / Action Buttons */
.finale-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Calendar Header & Month Navigation Buttons */
.calendar-header-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.calendar-month-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: #c8ff01;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.cal-nav-btn {
  background: #181818;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ececec;
  font-size: 0.95rem;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cal-nav-btn:hover:not(:disabled) {
  border-color: #c8ff01;
  color: #c8ff01;
  background: #222;
}

.cal-nav-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}
