#map {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  transition: left 0.3s ease;
  filter: saturate(1.1) contrast(1.05);
  background-color: #050505;
}

/* Map feature styles */
.maplibregl-popup {
  max-width: 300px !important;
  z-index: 2 !important;
}

.maplibregl-popup-content {
  background: linear-gradient(145deg, #2d2d2d 0%, #1a1a1a 100%) !important;
  color: #e0e0e0 !important;
  border-radius: 10px !important;
  padding: 15px !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(5px) !important;
}

.maplibregl-popup-close-button {
  color: #e0e0e0 !important;
  font-size: 16px !important;
  padding: 5px 8px !important;
  border-radius: 50% !important;
  background: rgba(0, 0, 0, 0.2) !important;
  right: 5px !important;
  top: 5px !important;
  transition: all 0.2s ease !important;
}

.maplibregl-popup-close-button:hover {
  background: rgba(255, 107, 107, 0.4) !important;
  color: white !important;
}

.maplibregl-popup-tip {
  border-top-color: #2d2d2d !important;
  border-bottom-color: #2d2d2d !important;
}

/* Enhanced location name display */
#selected-location {
  color: #ff5252;
  font-weight: 600;
  text-shadow: 0 0 10px rgba(255, 82, 82, 0.3);
  transition: color 0.3s;
}

/* Enhanced map controls */
.maplibregl-ctrl-group {
  background-color: rgba(30, 30, 30, 0.85) !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
}

.maplibregl-ctrl button {
  background-color: transparent !important;
}

.maplibregl-ctrl button:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon,
.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon,
.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon {
  filter: invert(1) brightness(1.2) !important;
}

/* Better attribution styling */
.maplibregl-ctrl-attrib {
  background-color: rgba(30, 30, 30, 0.7) !important;
  border-radius: 5px 0 0 0 !important;
  padding: 4px 8px !important;
  font-size: 10px !important;
}

.maplibregl-ctrl-attrib a {
  color: #bbb !important;
  text-decoration: none !important;
}

.maplibregl-ctrl-attrib a:hover {
  color: #fff !important;
  text-decoration: underline !important;
}

/* Scale control styling */
.maplibregl-ctrl-scale {
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  border-top: none !important;
  color: white !important;
  background-color: rgba(0, 0, 0, 0.6) !important;
  padding: 2px 6px !important;
  font-size: 10px !important;
  border-radius: 0 0 3px 3px !important;
}

/* Pitch control styling */
.maplibregl-ctrl-pitch-up,
.maplibregl-ctrl-pitch-down,
.maplibregl-ctrl-pitch-reset {
  width: 29px !important;
  height: 29px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  border: none !important;
  border-radius: 0 !important;
  background-color: transparent !important;
  padding: 0 !important;
}

.maplibregl-ctrl-pitch-up:hover,
.maplibregl-ctrl-pitch-down:hover,
.maplibregl-ctrl-pitch-reset:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Map wrapper for when panel is open */
#map.panel-open {
  width: calc(100% - 30vw);
}

/* Add map loading indicator */
.map-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 15px 20px;
  border-radius: 10px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
}

.map-loading span {
  margin-top: 10px;
  font-size: 14px;
}

.toggle-city-viz-control {
    background: none;
    border: none;
    width: 29px;
    height: 29px;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.toggle-city-viz-control:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Add a separator line between controls */
.maplibregl-ctrl-group > button + button {
    border-top: 1px solid #ddd;
}

/* Time Travel Effects */
.time-travel-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.5s ease-out;
}

.time-travel-overlay.fade-out {
  opacity: 0;
}

.time-vortex {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 255, 255, 0) 0%,
    rgba(30, 144, 255, 0.2) 30%,
    rgba(70, 130, 180, 0.4) 70%,
    rgba(0, 0, 139, 0.7) 100%
  );
  transform: translate(-50%, -50%);
  animation: vortex-expand 2s cubic-bezier(0.215, 0.610, 0.355, 1.000) forwards;
  box-shadow: 0 0 100px 50px rgba(173, 216, 230, 0.5);
  opacity: 0.7;
  backdrop-filter: blur(5px);
}

@keyframes vortex-expand {
  0% {
    width: 0;
    height: 0;
    transform: translate(-50%, -50%) rotate(0deg);
  }
  70% {
    width: 300%;
    height: 300%;
    transform: translate(-50%, -50%) rotate(360deg);
  }
  100% {
    width: 300%;
    height: 300%;
    transform: translate(-50%, -50%) rotate(720deg);
    opacity: 0;
  }
}

.time-ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.8);
  transform: translate(-50%, -50%);
  animation: ripple-expand 2.5s cubic-bezier(0, 0, 0.2, 1) forwards;
}

@keyframes ripple-expand {
  0% {
    width: 10px;
    height: 10px;
    opacity: 1;
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.8);
  }
  100% {
    width: 500px;
    height: 500px;
    opacity: 0;
    box-shadow: 0 0 0 rgba(0, 191, 255, 0);
  }
}



@keyframes text-appear {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
  40% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
  }
  80% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1);
  }
}


