/* Base layout */
html, body, #map {
  height: 100%;
  margin: 0;
  background: #000;
  font-family: "Arial", sans-serif;
}

/* Global scrollbar */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(120, 120, 120, 0.7) rgba(0, 0, 0, 0.25);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 12px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(120, 120, 120, 0.7), rgba(70, 70, 70, 0.85));
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.35),
    inset 0 -1px 2px rgba(0, 0, 0, 0.35);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(150, 150, 150, 0.8), rgba(80, 80, 80, 0.95));
  box-shadow:
    inset 0 1px 3px rgba(255, 255, 255, 0.45),
    inset 0 -1px 3px rgba(0, 0, 0, 0.4);
}

.node-tooltip {
  font-size: 12px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 4px 8px;
  white-space: nowrap;
}

.node-label {
  position: absolute;
  color: #fff;
  font-size: 11px;
  text-shadow: 0 0 2px #000;
  pointer-events: none;
  white-space: nowrap;
  transform: translate(-50%, 0);
  z-index: 500;
  opacity: 0.9;
  transition: opacity 0.3s ease, font-size 0.3s ease;
}

.zone-label {
  color: #fff;
  font-weight: bold;
  text-shadow: 0 0 2px #000;
  font-size: 13px;
  opacity: 0.8;
  transition: opacity 0.3s ease, font-size 0.3s ease;
  pointer-events: none;
  display: none;
}

.leaflet-tooltip.zone-label {
  background: transparent;
  border: none;
  box-shadow: none;
  pointer-events: none;
}

/* Разрешаем клики по названиям в подсказках */
.leaflet-tooltip {
  pointer-events: auto;
}

.outer-stroke {
  stroke: #000;
  stroke-width: 2;
}

.highlighted-connection {
  stroke: #fff !important;
  stroke-opacity: 1 !important;
  stroke-width: 2 !important;
  transition: all 0.3s ease;
}

.dimmed-connection {
  stroke-opacity: 0.2 !important;
  transition: all 0.3s ease;
}

.highlighted-node {
  opacity: 1 !important;
  stroke: #fff !important;
  stroke-width: 2 !important;
  transition: all 0.3s ease;
}

.dimmed-node {
  opacity: 0.2 !important;
  transition: all 0.3s ease;
}

.faded-element {
  transition: opacity 0.3s ease;
}

.hidden-element {
  opacity: 0 !important;
  pointer-events: none !important;
}

#map.darkened {
  transition: filter 1.5s ease;
  filter: brightness(0.2) contrast(1.25) blur(2.5px);
}

/* Toggle filter button */
#toggle-filter {
  position: absolute;
  top: 25px;
  right: 25px;
  z-index: 11000;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 10px 16px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.4s ease;
  font-size: 14px;
}

#toggle-filter:hover {
  background: rgba(255, 255, 255, 0.25);
}

#toggle-filter.hidden {
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
}

/* Filter panel */
.filter-container {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 280px;
  padding: 20px;
  border-radius: 20px 0 0 20px;
  background: rgba(20, 20, 20, 0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.4);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  font-family: "Inter", sans-serif;
  z-index: 10000;
  transform: translateX(100%);
  transition: transform 0.45s cubic-bezier(0.25, 1, 0.3, 1);
  display: none;
}

.filter-container.visible {
  transform: translateX(0);
}

.filter-header {
  position: relative;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  text-align: center;
  color: #fff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.close-filter {
  position: absolute;
  top: -4px;
  right: 6px;
  font-size: 24px;
  cursor: pointer;
  color: #fff;
  transition: all 0.3s ease;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
}

.close-filter:hover {
  color: #fff;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.9),
    0 0 25px rgba(255, 255, 255, 0.6),
    0 0 40px rgba(255, 255, 255, 0.4);
  transform: rotate(90deg);
}

  .filter-group {
    margin-bottom: 15px;
  }
  
  .filter-group-title {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(160, 200, 230, 0.35);
    background:
      linear-gradient(135deg, rgba(30, 34, 42, 0.95), rgba(12, 14, 18, 0.95));
    color: #e6f0ff;
    font-weight: 600;
    letter-spacing: 0.2px;
    box-shadow:
      0 0 14px rgba(120, 180, 255, 0.16),
      inset 0 0 10px rgba(255, 255, 255, 0.05);
    cursor: pointer;
  }
  
  .filter-group-title::before {
    content: "▸";
    font-size: 12px;
    margin-right: 10px;
    color: rgba(180, 220, 255, 0.85);
    transition: transform 0.25s ease;
  }

  .filter-group.collapsed .filter-group-title::before {
    transform: rotate(-90deg);
  }

.filter-group.collapsed .filter-options {
  display: none;
}

.filter-options {
  display: block;
}

.filter-option {
  display: flex;
  align-items: center;
  margin: 5px 0;
  padding: 5px;
  border-radius: 4px;
  transition: background 0.2s;
}

.filter-options .search-pill {
  margin-top: 10px;
}

.filter-option:hover {
  background: rgba(255, 255, 255, 0.1);
}

.filter-option input {
  margin-right: 8px;
}

.filter-option .color-indicator {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 8px;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.filter-option.expandable {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 0;
  margin-left: 0;
}

.category-block {
  margin-bottom: 10px;
}

.category-block .filter-option input {
  margin-right: 8px;
}

.expandable {
  justify-content: space-between;
  user-select: none;
}

.expand-arrow {
  margin-left: auto;
  transition: transform 0.3s ease;
  font-size: 20px;
  opacity: 0.7;
}

.category-block.open .expand-arrow {
  transform: rotate(180deg);
}

.sub-filter-group {
  margin-left: 18px;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  margin-top: 6px;
  margin-bottom: 10px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: all 0.4s ease;
}

.sub-filter-group.open {
  max-height: 500px;
  opacity: 1;
}

.filter-container::-webkit-scrollbar {
  width: 8px;
}

.filter-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.35);
}

.filter-container::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(160, 160, 160, 0.5));
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.35),
    inset 0 -1px 2px rgba(0, 0, 0, 0.35);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.filter-container::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(180, 180, 180, 0.7));
  box-shadow:
    inset 0 1px 3px rgba(255, 255, 255, 0.45),
    inset 0 -1px 3px rgba(0, 0, 0, 0.4);
}

.filter-container {
  scrollbar-width: thin;
  scrollbar-color: rgba(200, 200, 200, 0.6) rgba(255, 255, 255, 0.05);
}

.filter-presets {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin: 18px 10px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
}

.filter-presets button {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.95em;
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.25s ease;
  cursor: pointer;
}

.filter-presets button:hover {
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.filter-presets button:active {
  transform: scale(0.98);
  background: rgba(255, 255, 255, 0.25);
}

.eye-btn {
  margin-left: 4px;
  cursor: pointer;
  border: none;
  background: transparent;
  font-size: 1.1em;
  transition: transform 0.1s ease, color 0.2s;
}

.eye-btn:hover {
  transform: scale(1.2);
}

.eye-btn.active {
  color: #ffd966;
}

.search-box {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  
  .search-pill {
    width: 100%;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid rgba(160, 180, 200, 0.7);
    background: linear-gradient(135deg, rgba(35, 38, 45, 0.95), rgba(15, 17, 22, 0.95));
    color: #e8f2ff;
    font-size: 15px;
    letter-spacing: 0.2px;
    cursor: pointer;
    box-shadow:
      0 0 14px rgba(160, 200, 255, 0.25),
      0 0 34px rgba(110, 170, 255, 0.2),
      inset 0 0 12px rgba(255, 255, 255, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  }
  
  .search-pill:hover {
    transform: translateY(-1px);
    box-shadow:
      0 0 18px rgba(170, 210, 255, 0.35),
      0 0 44px rgba(120, 190, 255, 0.28),
      inset 0 0 16px rgba(255, 255, 255, 0.12);
    filter: saturate(1.05);
  }
  
  .search-pill:active {
    transform: translateY(0);
  }

  #searchResults {
    margin-top: 20px;
    padding: 10px;
    border-top: 1px solid #ccc;
}

  .result-item {
    margin-bottom: 15px;
  }

  .search-modal .search-modal-content {
    width: 520px;
    max-width: 92%;
    background:
      radial-gradient(circle at 15% 15%, rgba(120, 140, 170, 0.35), rgba(15, 17, 22, 0.98)),
      linear-gradient(160deg, rgba(28, 32, 40, 0.95), rgba(10, 12, 16, 0.98));
    border: 1px solid rgba(170, 200, 220, 0.45);
    box-shadow:
      0 0 30px rgba(140, 190, 255, 0.25),
      0 0 60px rgba(90, 150, 255, 0.2),
      inset 0 0 30px rgba(255, 255, 255, 0.06);
  }
  
  .search-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }
  
  .search-modal-header h2 {
    margin: 0;
    font-size: 22px;
    color: #e9f2ff;
    text-shadow: 0 0 12px rgba(120, 180, 255, 0.45);
  }
  
  .search-close-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(160, 200, 230, 0.35);
    color: #e6f0ff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 0 14px rgba(120, 180, 255, 0.25);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  }
  
  .search-close-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: scale(1.05);
    box-shadow: 0 0 18px rgba(140, 200, 255, 0.35);
  }
  
  .search-modal-body {
    padding: 20px 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .search-row {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .search-input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 999px;
    border: 1px solid rgba(160, 200, 230, 0.45);
    background: rgba(12, 14, 18, 0.65);
    color: #e9f2ff;
    font-size: 16px;
    outline: none;
    box-shadow:
      inset 0 0 10px rgba(255, 255, 255, 0.08),
      0 0 16px rgba(120, 180, 255, 0.2);
  }

  .search-find-btn {
    padding: 12px 16px;
    border-radius: 999px;
    border: 1px solid rgba(160, 200, 230, 0.45);
    background: linear-gradient(135deg, rgba(24, 28, 36, 0.95), rgba(12, 14, 18, 0.95));
    color: #e9f2ff;
    font-size: 14px;
    letter-spacing: 0.2px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow:
      0 0 14px rgba(120, 180, 255, 0.18),
      inset 0 0 8px rgba(255, 255, 255, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .search-find-btn:hover {
    transform: translateY(-1px);
    box-shadow:
      0 0 18px rgba(140, 200, 255, 0.28),
      inset 0 0 12px rgba(255, 255, 255, 0.08);
  }

  .search-suggestions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 260px;
    overflow-y: auto;
    padding-right: 4px;
  }
  
  .search-suggestions::-webkit-scrollbar {
    width: 8px;
  }
  
  .search-suggestions::-webkit-scrollbar-track {
    background: rgba(20, 24, 30, 0.6);
    border-radius: 999px;
  }
  
  .search-suggestions::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(180, 210, 240, 0.7), rgba(90, 140, 200, 0.8));
    border-radius: 999px;
    box-shadow: 0 0 10px rgba(120, 180, 255, 0.35);
  }
  
  .search-suggestions {
    scrollbar-width: thin;
    scrollbar-color: rgba(120, 180, 255, 0.65) rgba(20, 24, 30, 0.6);
  }

  .search-suggestion {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(140, 180, 210, 0.25);
    background: rgba(18, 22, 28, 0.85);
    color: #e4efff;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  }

  .search-suggestion:hover,
  .search-suggestion.is-active {
    transform: translateY(-1px);
    border-color: rgba(170, 210, 255, 0.6);
    box-shadow: 0 0 14px rgba(120, 180, 255, 0.22);
  }

  .search-suggestion-name {
    font-size: 14px;
    font-weight: 600;
  }

  .search-suggestion-meta {
    font-size: 12px;
    color: rgba(190, 220, 255, 0.7);
  }
  
  .search-input::placeholder {
    color: rgba(210, 230, 255, 0.7);
  }
  
  .search-hint {
    margin: 0;
    font-size: 13px;
    color: rgba(210, 230, 255, 0.7);
  }

  .search-history {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 4px;
  }

  .search-history-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(190, 220, 255, 0.6);
  }

  .search-history-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .search-history-item {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(120, 170, 220, 0.3);
    background: rgba(16, 20, 26, 0.85);
    color: rgba(220, 235, 255, 0.85);
    font-size: 12px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .search-history-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 12px rgba(120, 180, 255, 0.2);
  }

/* Category colors */
.type-1 {
  background-color: rgba(185, 107, 255, 0.2);
  color: #b96bff;
}

.type-2 {
  background-color: rgba(107, 255, 154, 0.2);
  color: #6bff9a;
}

.type-3 {
  background-color: rgba(255, 216, 107, 0.2);
  color: #ffd86b;
}

.type-4 {
  background-color: rgba(107, 193, 255, 0.2);
  color: #6bc1ff;
}

/* Custom zoom controls */
.custom-zoom {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 12000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  user-select: none;
  transition: transform 0.18s ease, opacity 0.18s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif;
  pointer-events: auto;
}

.custom-zoom button {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: none;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 2px 8px rgba(0, 0, 0, 0.35);
  transition: transform 0.12s ease, background 0.12s ease, opacity 0.12s ease;
  pointer-events: auto;
}

.custom-zoom * {
  pointer-events: auto;
}

.custom-zoom button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.06);
}

.custom-zoom button:active {
  transform: translateY(0);
}

.custom-zoom button.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  background: rgba(255, 255, 255, 0.01);
}

.custom-zoom .zoom-icon {
  font-weight: 600;
  font-size: 20px;
}

.custom-zoom .label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  margin-top: 4px;
  opacity: 0.9;
}

/* Loader (text) */
.loader-wrapper {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 180px;
  height: 180px;
  font-family: "Inter", sans-serif;
  font-size: 1.2em;
  font-weight: 300;
  color: white;
  border-radius: 50%;
  background-color: transparent;
  user-select: none;
  z-index: 9999;
}

.loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background-color: transparent;
  animation: loader-rotate 2s linear infinite;
  z-index: 0;
}

.loader-letter {
  display: inline-block;
  opacity: 0.4;
  transform: translateY(0);
  animation: loader-letter-anim 2s infinite;
  z-index: 1;
  border-radius: 50ch;
  border: none;
}

/* Loader (3D rings) */
.loader-container {
  position: absolute;
  top: 24%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  display: none;
  width: 150px;
  height: 150px;
  perspective: 800px;
  transform-style: preserve-3d;
}

.sphere-core {
  position: absolute;
  width: 60px;
  height: 60px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 40% 40%, #00eaff, #0066ff);
  border-radius: 50%;
  box-shadow: 0 0 25px rgba(0, 234, 255, 0.5);
  animation: pulse 2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2px solid rgba(0, 234, 255, 0.7);
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(0, 234, 255, 0.3);
  transform-style: preserve-3d;
}

.ring-1 {
  animation: rotateX 2.5s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

.ring-2 {
  animation: rotateY 2s cubic-bezier(0.55, 0, 0.45, 1) infinite;
  width: 120px;
  height: 120px;
  top: 15px;
  left: 15px;
  border-color: rgba(0, 234, 255, 0.5);
}

.ring-3 {
  animation: rotateXY 3s cubic-bezier(0.7, 0, 0.3, 1) infinite;
  width: 90px;
  height: 90px;
  top: 30px;
  left: 30px;
  border-color: rgba(0, 234, 255, 0.3);
}

/* Modal */
.modal {
    display: flex;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: translateY(6px);
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease, visibility 0s linear 0.35s;
  }
  
  .modal.show {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.35s ease, transform 0.35s ease;
  }

  .modal-content {
    background-color: #222;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  color: #eee;
  width: 700px;
  max-width: 90%;
  max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.98);
    transition: transform 0.35s ease;
  }

  .modal.show .modal-content {
    transform: scale(1);
  }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: rgba(22, 22, 22, 0.28);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px 20px 0 0;
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.3px;
}

.modal-header h2 {
  margin: 0;
  font-size: 22px;
  color: #fff;
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.copy-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(160, 200, 230, 0.35);
  color: #e9f2ff;
  cursor: pointer;
  font-size: 16px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  line-height: 1;
  box-shadow: 0 0 10px rgba(120, 180, 255, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, width 0.2s ease, color 0.2s ease;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(140, 200, 255, 0.3);
}

.copy-btn.copied {
  border-color: rgba(140, 220, 180, 0.7);
  box-shadow: 0 0 14px rgba(120, 220, 170, 0.35);
  color: #5cff8f;
  width: 130px;
}

.close-btn {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 20px;
  transition: opacity 0.2s ease;
}

.close-btn:hover {
  opacity: 0.8;
  color: #ff4d4d;
}

.close-feedback-modal {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 20px;
  transition: opacity 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.close-feedback-modal:hover {
  opacity: 0.8;
  color: #ff4d4d;
}

.feedback-help {
  font-size: 16px;
  opacity: 0.75;
}

.feedback-close-icon {
  font-size: 20px;
  line-height: 1;
}

/* Image carousel */
.image-carousel {
  position: relative;
  width: 100%;
  height: 320px;
  min-height: 300px;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.carousel-inner {
  display: flex;
  transition: transform 0.45s ease;
  height: 100%;
}

.carousel-inner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  user-select: none;
  pointer-events: none;
}

.carousel-item {
  min-width: 100%;
  height: 100%;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

.carousel-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.08), rgba(0,0,0,0.5));
  backdrop-filter: blur(6px);
  transition: opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
  z-index: 15;
}

.carousel-loader.show {
  opacity: 1;
}

.carousel-spinner {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.25);
  border-top-color: #7ce7ff;
  box-shadow: 0 0 18px rgba(124,231,255,0.6);
  animation: carousel-spin 1s linear infinite;
}

@keyframes carousel-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 40px;
  padding: 0 10px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.85);
  user-select: none;
  transition: 0.25s;
  opacity: 0;
}

.image-carousel:hover .carousel-control {
  opacity: 1;
}

.carousel-control.prev {
  left: 10px;
}

.carousel-control.next {
  right: 10px;
}

.carousel-control:hover {
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

.carousel-indicators {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 10;
}

.carousel-indicator,
.carousel-indicators div {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s;
}

.carousel-indicator.active,
.carousel-indicators .active {
  background: #fff;
  transform: scale(1.2);
}

/* Zoom overlay */
.zoom-view {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999999;
}

.zoom-image {
  width: 90%;
  height: 90%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
}

#formulaZoomContent {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  color: #fff;
}

#formulaZoomContent * {
  color: #fff;
}

#formulaZoomContent svg {
  fill: #fff;
}

#formulaZoomContent .formula-line,
#formulaZoomContent .variable-line {
  margin: 4px 0;
}

/* Transition to home */
.map-transition-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at center, rgba(20, 24, 32, 0.1) 0%, rgba(0, 0, 0, 0.55) 40%, rgba(0, 0, 0, 0.9) 75%, #000 100%),
    radial-gradient(circle at 0% 0%, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.65) 35%, rgba(0, 0, 0, 0) 65%),
    radial-gradient(circle at 100% 0%, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.65) 35%, rgba(0, 0, 0, 0) 65%),
    radial-gradient(circle at 0% 100%, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.65) 35%, rgba(0, 0, 0, 0) 65%),
    radial-gradient(circle at 100% 100%, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.65) 35%, rgba(0, 0, 0, 0) 65%);
  transition: opacity 0.45s ease;
  z-index: 9999;
  overflow: hidden;
}

.map-transition-overlay::before {
  content: "";
  position: absolute;
  inset: -25%;
  background:
    repeating-radial-gradient(circle, rgba(255, 255, 255, 0.12) 0 1px, rgba(0, 0, 0, 0) 1px 9px);
  opacity: 0;
  transform: scale(0.55);
}

body.is-map-transitioning .map-transition-overlay {
  opacity: 1;
}

body.is-map-transitioning .map-transition-overlay::before {
  opacity: 0.85;
  animation: map-tunnel-zoom 1.1s ease-in forwards;
}

body.is-map-transitioning .map-transition-overlay::after {
  content: "";
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(circle at 0% 0%, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.7) 45%, rgba(0, 0, 0, 0) 70%),
    radial-gradient(circle at 100% 0%, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.7) 45%, rgba(0, 0, 0, 0) 70%),
    radial-gradient(circle at 0% 100%, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.7) 45%, rgba(0, 0, 0, 0) 70%),
    radial-gradient(circle at 100% 100%, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.7) 45%, rgba(0, 0, 0, 0) 70%);
  opacity: 0;
  animation: map-corners-in 0.55s ease-out forwards;
}

body.is-map-transitioning #map,
body.is-map-transitioning .filter-container,
body.is-map-transitioning #toggle-filter,
body.is-map-transitioning .custom-zoom {
  transition: transform 1.1s ease, filter 1.1s ease, opacity 1.1s ease;
  transform: scale(1.08);
  filter: blur(2px) saturate(0.85);
  opacity: 0.15;
  transform-origin: center;
}

@keyframes map-tunnel-zoom {
  0% {
    transform: scale(0.55);
    filter: blur(0);
  }
  65% {
    transform: scale(1.3);
    filter: blur(1px);
  }
  100% {
    transform: scale(1.55);
    opacity: 0;
    filter: blur(2px);
  }
}

@keyframes map-corners-in {
  0% {
    opacity: 0;
    transform: scale(1.2);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.zoom-close {
  position: absolute;
  top: 25px;
  right: 30px;
  font-size: 38px;
  cursor: pointer;
  color: #fff;
  user-select: none;
  transition: 0.25s;
  z-index: 1000000;
}

.zoom-close:hover {
  opacity: 0.6;
}

.zoom-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 20px;
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
  transition: 0.2s;
  opacity: 0;
}

.zoom-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.image-carousel:hover .zoom-btn {
  opacity: 1;
}

/* Formula */
.formula-block {
  position: relative;
  background: rgba(255, 255, 255, 0.08);
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 15px;
}

.formula-zoom {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 10px;
  border-radius: 10px;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  transition: 0.25s ease;
}

.formula-block:hover .formula-zoom {
  opacity: 1;
}

.formula-content {
  font-size: 22px;
  color: #fff;
  text-align: center;
  font-family: "Times New Roman", serif;
}

.zoom-formula {
  font-size: 46px;
  color: #fff;
  text-align: center;
  max-width: 90%;
  line-height: 1.3;
}

.formula-section {
  font-family: "Courier New", Courier, monospace;
  color: #fff;
  font-size: 20px;
  padding: 10px;
  border: 1px solid #fff;
  border-radius: 8px;
  background-color: rgba(0, 0, 0, 0.2);
}

/* Scrollable content */
.item-content {
  padding: 20px;
  overflow-y: scroll;
  background: #1e1e1e;
  border-top: 1px solid #333;
  max-height: 60vh;
}

.item-content::-webkit-scrollbar {
  width: 8px;
}

.item-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
}

.item-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(160, 160, 160, 0.5));
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.35),
    inset 0 -1px 2px rgba(0, 0, 0, 0.35);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.item-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(180, 180, 180, 0.7));
  box-shadow:
    inset 0 1px 3px rgba(255, 255, 255, 0.45),
    inset 0 -1px 3px rgba(0, 0, 0, 0.4);
}

.item-content {
  scrollbar-width: thin;
  scrollbar-color: rgba(200, 200, 200, 0.6) rgba(255, 255, 255, 0.05);
}

/* Additional modal cards */
.additional-modals {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  margin-top: 15px;
}

.additional-modal.feedback-modal {
  cursor: default;
}

.additional-modal.feedback-modal:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: none;
}

.modal-feedback-btn {
  margin-top: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(160, 200, 230, 0.35);
  background: rgba(255, 255, 255, 0.06);
  color: #e6f0ff;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.modal-feedback-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(120, 180, 255, 0.2);
}

.modal-feedback-btn:active {
  transform: translateY(0);
}

/* Feedback form modal */
.feedback-modal-content {
  width: 520px;
  max-width: 92%;
  background:
    radial-gradient(circle at 20% 10%, rgba(120, 150, 190, 0.22), rgba(18, 20, 26, 0.98)),
    linear-gradient(160deg, rgba(30, 34, 42, 0.96), rgba(12, 14, 18, 0.98));
  border: 1px solid rgba(170, 200, 220, 0.35);
  box-shadow:
    0 0 26px rgba(140, 190, 255, 0.2),
    inset 0 0 18px rgba(255, 255, 255, 0.05);
}

.feedback-modal-window {
  z-index: 1002;
}

.feedback-modal-body {
  padding: 18px 20px 22px;
}

.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.feedback-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 420px;
}

.feedback-label {
  font-size: 12px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: rgba(200, 220, 240, 0.7);
}

.feedback-input,
.feedback-textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(150, 190, 220, 0.35);
  background: rgba(10, 12, 16, 0.65);
  color: #e9f2ff;
  font-size: 14px;
  padding: 10px 12px;
  outline: none;
  box-shadow:
    inset 0 0 10px rgba(255, 255, 255, 0.06),
    0 0 12px rgba(120, 180, 255, 0.15);
}

.feedback-textarea {
  resize: vertical;
  min-height: 120px;
}

.feedback-input[readonly] {
  opacity: 0.8;
  cursor: default;
}

.feedback-submit {
  align-self: flex-start;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(160, 200, 230, 0.45);
  background: linear-gradient(135deg, rgba(24, 28, 36, 0.95), rgba(12, 14, 18, 0.95));
  color: #e9f2ff;
  font-size: 14px;
  cursor: pointer;
  box-shadow:
    0 0 14px rgba(120, 180, 255, 0.2),
    inset 0 0 8px rgba(255, 255, 255, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feedback-submit:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 18px rgba(140, 200, 255, 0.3),
    inset 0 0 10px rgba(255, 255, 255, 0.08);
}

.feedback-status {
  min-height: 18px;
  font-size: 13px;
  color: rgba(210, 230, 255, 0.8);
}

.feedback-status.is-success {
  color: #7ff2b5;
}

.feedback-status.is-error {
  color: #ff8f8f;
}

/* Achievement toast */
.achievement-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: linear-gradient(135deg, rgba(30, 34, 42, 0.95), rgba(10, 12, 16, 0.95));
  border: 1px solid rgba(160, 200, 230, 0.35);
  box-shadow:
    0 0 16px rgba(120, 180, 255, 0.2),
    inset 0 0 10px rgba(255, 255, 255, 0.06);
  color: #e9f2ff;
  border-radius: 14px;
  padding: 16px 20px;
  max-width: 320px;
  font-family: "Arial", sans-serif;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 10050;
  pointer-events: none;
}

.achievement-toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.achievement-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.achievement-text {
  font-size: 14px;
  color: rgba(210, 230, 255, 0.8);
}

.achievement-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(160, 200, 230, 0.35);
  background: rgba(255, 255, 255, 0.08);
  object-fit: cover;
  flex-shrink: 0;
}

.achievement-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.additional-modal {
  background: rgba(255, 255, 255, 0.1);
  padding: 15px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  cursor: pointer;
}

.additional-modal:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.additional-modal h3 {
  font-size: 18px;
  font-weight: bold;
  color: #fff;
  margin: 0 0 8px 0;
}

.additional-modal p {
  color: #ddd;
  font-size: 16px;
  line-height: 1.5;
  margin: 0;
}

.formula-explanations-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.formula-explanation-item {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.2);
}

.formula-explanation-header {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 15px;
}

.formula-explanation-index {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
}

.formula-explanation-label {
  font-size: 13px;
  color: rgba(210, 230, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.formula-explanation-text {
  margin-top: 6px;
  font-size: 14px;
  color: #ddd;
  line-height: 1.5;
}

.connection-explanations-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.connection-explanation-item {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.2);
}

.connection-explanation-title {
  font-size: 15px;
  color: #fff;
  font-weight: 600;
  margin-bottom: 6px;
}

.connection-explanation-meta {
  font-size: 13px;
  color: rgba(210, 230, 255, 0.7);
  margin-bottom: 6px;
}

.connection-explanation-text {
  font-size: 14px;
  color: #ddd;
  line-height: 1.5;
  margin: 0;
}

.additional-modal:focus-within {
  border: 2px solid #00eaff;
}

.additional-info {
  margin-top: 15px;
  padding: 15px;
  background: #252525;
  border-radius: 6px;
}

.additional-info h3 {
  margin: 0 0 10px 0;
  color: #6bc1ff;
  font-size: 16px;
}

.additional-info p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #ccc;
}

/* Warning entity */
.warning-entity {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: none;
  opacity: 0;
  transition: opacity 1.2s ease;
  z-index: 9999;
  pointer-events: none;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  filter: none !important;
  padding: 0;
  overflow: hidden;
}

.warning-core {
  position: absolute;
  left: 50%;
  top: -300px;
  transform: translateX(-50%);
  width: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  opacity: 0;
  transition: top 1.2s ease, opacity 1.2s ease;
}

.eyes {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  width: 100%;
  gap: 22px;
}

.eye {
  width: 110px;
  height: 44px;
  background-color: #ffeb3b;
  border-radius: 50%;
  border: 5px solid #000;
  position: relative;
  overflow: hidden;
  transform-origin: center;
  animation: blink 26s steps(1) infinite;
}


.pupil {
  position: absolute;
  top: 14px;
  left: 34px;
  width: 26px;
  height: 26px;
  background: radial-gradient(circle at 35% 35%, #2a2a2a 0%, #101010 45%, #000 70%);
  border-radius: 50%;
  box-shadow: 0 0 20px 6px rgba(255, 235, 59, 0.8);
  animation: eyeGlow 2s ease-in-out infinite alternate;
  transition: opacity 0.2s ease, transform 0.08s ease-out;
  transform-origin: center;
}

.pupil-dot {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.15) 70%, rgba(255, 255, 255, 0) 100%);
  top: 4px;
  left: 7px;
  box-shadow:
    0 0 6px rgba(255, 255, 255, 0.35),
    0 0 10px rgba(0, 0, 0, 0.35);
}

.eye::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.2) 30%, rgba(58, 48, 48, 0.6) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hand-wave {
  font-size: 120px;
  animation: wave 2s infinite;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.message {
  color: #fff;
  font-size: 18px;
  margin-top: 8px;
  text-shadow: 0 0 10px #000;
  transition: opacity 1.5s ease;
}

.fog {
  position: absolute;
  top: -50px;
  left: -50px;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  filter: blur(25px);
  opacity: 0.4;
  pointer-events: none;
  animation: fogMove 10s ease-in-out infinite alternate;
  z-index: -1;
}

.back-eyes {
  position: fixed;
  inset: 0;
  display: block;
  pointer-events: none;
  z-index: -2;
  opacity: 0.55;
}

.back-eye {
  position: absolute;
  width: 140px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 235, 59, 0.8) 0%, rgba(255, 235, 59, 0.18) 55%, rgba(255, 235, 59, 0) 100%);
  filter: blur(12px);
  box-shadow: 0 0 40px rgba(255, 235, 59, 0.18);
}

.back-eye--left {
  top: 8%;
  left: 8%;
  transform: rotate(-8deg) scale(1.1);
}

.back-eye--right {
  top: 6%;
  right: 10%;
  transform: rotate(10deg) scale(1.05);
}

.back-eye--far {
  top: 28%;
  opacity: 0.55;
  transform: rotate(18deg) scale(0.8);
}

.back-eye--top {
  top: 18%;
  left: 45%;
  transform: rotate(-12deg) scale(0.9);
}

.back-eye--mid {
  top: 48%;
  right: 34%;
  transform: rotate(8deg) scale(1);
}

.back-eye--low {
  top: 72%;
  left: 22%;
  transform: rotate(-18deg) scale(0.95);
}

.back-eye--edge-left {
  top: 58%;
  left: 2%;
  transform: rotate(14deg) scale(0.85);
}

.back-eye--edge-right {
  top: 36%;
  right: 2%;
  transform: rotate(-6deg) scale(0.85);
}

.back-eye--pair-left {
  top: 34%;
  left: 18%;
  transform: rotate(-10deg) scale(0.9);
}

.back-eye--pair-right {
  top: 34%;
  left: 38%;
  transform: rotate(8deg) scale(0.9);
}

.back-eye--deep {
  top: 82%;
  opacity: 0.4;
  transform: rotate(12deg) scale(0.75);
}

.ghost {
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0));
  filter: blur(18px);
  opacity: 0.3;
  z-index: -1;
}

.ghost--one {
  top: -40px;
  left: -60px;
}

.ghost--two {
  bottom: -50px;
  right: -70px;
}

.ghost--three {
  top: 10px;
  right: -90px;
}

.flash {
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0));
  opacity: 0;
  transform: scale(0.7);
  pointer-events: none;
}

.warning-entity.is-flash .flash {
  animation: flashPulse 0.45s ease-out forwards;
}

@keyframes flashPulse {
  0% {
    opacity: 0;
    transform: scale(0.7);
  }
  35% {
    opacity: 0.8;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.2);
  }
}

/* Media queries */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    max-height: 90vh;
  }

  .image-carousel {
    height: 40vh;
    min-height: 250px;
  }

  .carousel-control {
    width: 40px;
    font-size: 24px;
  }

  .filter-container {
    width: 100%;
    border-radius: 0;
    padding: 16px;
  }

  #toggle-filter {
    top: 16px;
    right: 16px;
  }

  .search-modal .search-modal-content {
    width: 92%;
  }

  .search-row {
    flex-direction: column;
    align-items: stretch;
  }

  .search-find-btn {
    width: 100%;
  }

  .modal-header {
    padding: 12px 16px;
  }

  .item-content {
    padding: 16px;
    max-height: 55vh;
  }

  .custom-zoom {
    top: 12px;
    left: 12px;
  }
}

@media (max-width: 480px) {
  .image-carousel {
    height: 35vh;
    min-height: 200px;
  }

  .modal-header h2 {
    font-size: 18px;
  }

  .modal-actions {
    gap: 6px;
  }

  .copy-btn {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  .achievement-toast {
    right: 16px;
    left: 16px;
    bottom: 16px;
    max-width: none;
  }

  .additional-info h3 {
    font-size: 15px;
  }
}

/* Animations */
@keyframes loader-rotate {
  0% {
    transform: rotate(90deg);
    box-shadow:
      0 10px 20px 0 #fff inset,
      0 20px 30px 0 #ad5fff inset,
      0 60px 60px 0 #471eec inset;
  }
  50% {
    transform: rotate(270deg);
    box-shadow:
      0 10px 20px 0 #fff inset,
      0 20px 10px 0 #d60a47 inset,
      0 40px 60px 0 #311e80 inset;
  }
  100% {
    transform: rotate(450deg);
    box-shadow:
      0 10px 20px 0 #fff inset,
      0 20px 30px 0 #ad5fff inset,
      0 60px 60px 0 #471eec inset;
  }
}

@keyframes loader-letter-anim {
  0%,
  100% {
    opacity: 0.4;
    transform: translateY(0);
  }
  20% {
    opacity: 1;
    transform: scale(1.15);
  }
  40% {
    opacity: 0.7;
    transform: translateY(0);
  }
}

@keyframes rotateX {
  0% {
    transform: rotateX(0deg);
  }
  50% {
    transform: rotateX(180deg);
  }
  100% {
    transform: rotateX(360deg);
  }
}

@keyframes rotateY {
  0% {
    transform: rotateY(0deg);
  }
  50% {
    transform: rotateY(180deg);
  }
  100% {
    transform: rotateY(360deg);
  }
}

@keyframes rotateXY {
  0% {
    transform: rotateX(0deg) rotateY(0deg);
  }
  50% {
    transform: rotateX(90deg) rotateY(180deg);
  }
  100% {
    transform: rotateX(360deg) rotateY(360deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 0 25px rgba(0, 234, 255, 0.5);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 35px rgba(0, 234, 255, 0.7);
  }
}

@keyframes blink {
  0%,
  100% {
    transform: scaleY(1);
  }
  40%,
  60% {
    transform: scaleY(0.12);
  }
}

@keyframes eyeMovement {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(3px);
  }
}

@keyframes wave {
  0%,
  100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(15deg);
  }
}

@keyframes fadeInShadow {
  0% {
    filter: brightness(0) blur(15px);
    opacity: 0;
  }
  50% {
    filter: brightness(0.4) blur(8px);
    opacity: 0.5;
  }
  100% {
    filter: brightness(1) blur(0);
    opacity: 1;
  }
}

@keyframes blinkEyes {
  0%,
  100% {
    opacity: 1;
  }
  40%,
  60% {
    opacity: 0;
  }
}

@keyframes fogMove {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.35;
  }
  50% {
    transform: translate(15px, -10px) scale(1.05);
    opacity: 0.5;
  }
  100% {
    transform: translate(-10px, 10px) scale(0.95);
    opacity: 0.4;
  }
}

/* --- REMOVE BLUE FOCUS OUTLINE FROM LEAFLET POINTS (FULL FIX) --- */
/* Убираем синий фокус/контур у любых SVG */
.leaflet-container svg path,
.leaflet-container svg circle,
.leaflet-container svg g,
.leaflet-container .leaflet-interactive {
  outline: none !important;
}

/* Убираем outline при фокусе */
.leaflet-container svg *:focus,
.leaflet-container svg *:focus-visible,
.leaflet-container .leaflet-interactive:focus,
.leaflet-container .leaflet-interactive:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* Сияющая аура ТОЛЬКО для узлов */
.leaflet-container svg .node-marker.leaflet-interactive:hover {
  stroke: rgba(255,255,255,0.95) !important;
  stroke-width: 3px !important;
  filter: drop-shadow(0 0 4px rgba(255,255,255,0.9));
}

/* === Блок: Нет изображений === */
.no-images-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: white;
  text-align: center;
}

.no-images-emoji {
  font-size: 72px;    /* увеличенный смайлик */
  line-height: 1;
  margin-bottom: 15px;
}

.no-images-text {
  font-size: 20px;
  opacity: 0.9;
  line-height: 1.4;
}
