/* ============================================= */
/* СТИЛИ ДЛЯ MAP.PHP - ПРЕФИКС map_style- */
/* ============================================= */

/* 1. Сначала сбрасываем всё */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body, #map {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Кнопка меню с яркой, динамичной анимацией */
.map_style-fab {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 1000;
  width: 60px;
  height: 60px;
  border: none;
  border-radius: 50%;
  background: radial-gradient(circle at center, #ffffff 40%, #d4f9ff 100%);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.5), 0 0 40px rgba(0, 255, 255, 0.25) inset;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  animation: map_style-fabPulse 2s infinite ease-in-out, map_style-fabWiggle 3.5s infinite ease-in-out;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.map_style-fab:hover {
  transform: scale(1.15) rotate(5deg);
  box-shadow: 0 0 40px rgba(0, 255, 255, 0.9), 0 0 60px rgba(0, 255, 255, 0.4) inset;
}

/* Логотип внутри */
.map_style-fab-logo {
  width: 70%;
  height: 70%;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.9));
  animation: map_style-fabGlow 1.8s infinite alternate ease-in-out;
}

/* Пульсация свечения */
@keyframes map_style-fabPulse {
  0% { box-shadow: 0 0 10px rgba(0, 255, 255, 0.4); }
  50% { box-shadow: 0 0 35px rgba(0, 255, 255, 0.9); }
  100% { box-shadow: 0 0 10px rgba(0, 255, 255, 0.4); }
}

/* Активное свечение логотипа */
@keyframes map_style-fabGlow {
  0% { filter: drop-shadow(0 0 4px rgba(0,255,255,0.4)); }
  50% { filter: drop-shadow(0 0 14px rgba(0,255,255,1)); }
  100% { filter: drop-shadow(0 0 4px rgba(0,255,255,0.4)); }
}

/* Заметное "качание" в стороны */
@keyframes map_style-fabWiggle {
  0%, 100% { transform: rotate(0deg); }
  10% { transform: rotate(10deg); }
  20% { transform: rotate(-10deg); }
  30% { transform: rotate(6deg); }
  40% { transform: rotate(-6deg); }
  50% { transform: rotate(3deg); }
  60% { transform: rotate(-3deg); }
  70% { transform: rotate(1deg); }
  80%, 90% { transform: rotate(0deg); }
}

/* Выдвижная панель */
.map_style-drawer {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: min(380px, 92vw);
  background: #fff;
  transform: translateX(-100%);
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  box-shadow: 20px 0 40px rgba(0,0,0,.18);
  overflow: hidden;
  will-change: transform;
}

.map_style-drawer.open {
  transform: translateX(0);
}

.map_style-drawer-header {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  background: #fff;
  position: relative;
}

.map_style-drawer-title {
  font-weight: 700;
  font-size: 18px;
  color: #333;
  margin-left: 10px;
}

.map_style-drawer-close {
  margin-left: auto;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: background 0.2s;
}

.map_style-drawer-close:hover {
  background: rgba(0,0,0,.05);
}

.map_style-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.map_style-drawer-auth-buttons {
  display: flex;
  gap: 10px;
  padding: 16px;
}

.map_style-auth-btn {
  flex: 1;
  padding: 10px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  font-family: 'Inter', sans-serif;
}

/* Вход - бирюзовая */
.map_style-auth-login {
  background: #0ea5a4;
  color: #fff;
  border-color: #0ea5a4;
}

.map_style-auth-login:hover {
  background: #fff;
  color: #0ea5a4;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(14,165,164,0.3);
}

/* Регистрация - белая */
.map_style-auth-register {
  background: #fff;
  color: #0ea5a4;
  border-color: #0ea5a4;
}

.map_style-auth-register:hover {
  background: #0ea5a4;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(14,165,164,0.3);
}

/* Отдельный стиль только для модалок авторизации */
.map_style-auth-modal {
  width: 400px;
  max-width: 90%;
  padding: 20px 24px;
  border-radius: 14px;
  background: #f9fafb;
  box-shadow: 0 12px 32px rgba(0,0,0,0.25);
  z-index: 1250;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.95);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(.2,.8,.2,1);
}

.map_style-auth-modal.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.map_style-auth-modal h2 {
  color: #0ea5a4;
  font-size: 20px;
  margin-bottom: 16px;
}

.map_style-auth-modal input {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
}

.map_style-auth-modal button {
  width: 100%;
  padding: 10px;
  background: #0ea5a4;
  color: #fff;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.map_style-auth-modal button:hover {
  background: #14b8a6;
  transform: translateY(-2px);
}

/* Крестик закрытия */
.map_style-auth-modal .close {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 22px;
  color: #475569;
  cursor: pointer;
}

/* Кнопка Выйти */
.map_style-logout-btn {
  display: inline-block;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 10px;
  background-color: #0ea5a4;
  color: #fff;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.map_style-logout-btn:hover {
  background: #fff;
  color: #0ea5a4;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(14,165,164,0.3);
}

/* Контейнер модалки */
.map_style-register-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 400px;
  max-width: 90%;
  padding: 0;
  z-index: 1250;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(.2,.8,.2,1);
}

/* Появление */
.map_style-register-modal.show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

/* Заголовок */
.map_style-register-modal .modal-content h2 {
  color: #0ea5a4;
  font-size: 20px;
  margin-bottom: 16px;
}

/* Инпуты */
.map_style-register-modal .modal-content input {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
}

/* Кнопка */
.map_style-register-modal .modal-content button {
  width: 100%;
  padding: 10px;
  background: #0ea5a4;
  color: #fff;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.map_style-register-modal .modal-content button:hover {
  background: #14b8a6;
  transform: translateY(-2px);
}

/* Крестик */
.map_style-register-modal .modal-content .close {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 22px;
  color: #475569;
  cursor: pointer;
}

/* Адаптация под мобильные */
@media (max-width: 768px) {
  .map_style-logout-btn {
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 8px;
  }
}

/* Поиск */
.map_style-search-container {
  padding: 16px;
  border-bottom: 1px solid rgba(0,0,0,.08);
}

.map_style-search-box {
  display: flex;
  align-items: center;
  background: #f5f5f5;
  border-radius: 12px;
  padding: 10px 14px;
  transition: all 0.2s;
}

.map_style-search-box:focus-within {
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
}

.map_style-search-icon {
  margin-right: 10px;
  color: #666;
}

.map_style-search-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 16px;
}

/* Сетка категорий */
.map_style-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 12px;
  padding: 16px;
}

.map_style-category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  cursor: pointer;
  transition: all 0.2s;
}

.map_style-category-item:hover {
  background: #f9f9f9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

.map_style-category-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.map_style-category-name {
  font-size: 12px;
  text-align: center;
  color: #333;
  font-weight: 500;
}

/* Разделитель */
.map_style-divider {
  height: 1px;
  background: rgba(0,0,0,.08);
  margin: 8px 16px;
}

/* Реклама */
.map_style-ad-container {
  margin: 16px;
  padding: 16px;
  background: #f0f7ff;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.06);
  font-family: 'Lora', serif;
}

.map_style-ad-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #333;
}

.map_style-ad-description {
  font-size: 14px;
  color: #666;
  margin-bottom: 12px;
  line-height: 1.4;
}

.map_style-ad-disclaimer {
  font-size: 12px;
  color: #999;
  font-style: italic;
}

/* Затемнение фона */
.map_style-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  backdrop-filter: blur(2px);
  z-index: 1090;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.map_style-backdrop.show {
  display: block;
  opacity: 1;
}

/* Встроенное всплывающее окно (модал) */
.map_style-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: #fff;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  z-index: 1200;
  width: 420px;
  max-width: calc(100% - 32px);
  display: none;
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(.2,.8,.2,1);
}

.map_style-modal.show {
  display: block;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.map_style-modal h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: #111827;
}

.map_style-modal p {
  color: #475569;
  font-size: 14px;
  line-height: 1.35;
}

.map_style-modal .modal-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.map_style-modal .modal-body {
  margin-top: 10px;
}

.map_style-modal .modal-content {
  position: relative;
}

.map_style-btn {
  appearance: none;
  border: 0;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
}

.map_style-btn-close {
  background: #e5e7eb;
  color: #0f172a;
}

.map_style-btn-ok {
  background: #0ea5a4;
  color: #fff;
}

.map_style-sos-btn {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1050;
  width: 56px;
  height: 56px;
  background: #e02424;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  border: none;
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(224,36,36,0.5);
  cursor: pointer;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map_style-sos-ring {
  position: absolute;
  transform: rotate(-90deg);
  pointer-events: none;
}

.map_style-sos-ring circle {
  transition: stroke-dashoffset 0.05s linear;
}

/* Мобильная адаптация для модального */
@media (max-width: 480px) {
  .map_style-modal {
    width: calc(100% - 28px);
    padding: 16px;
    border-radius: 10px;
  }
  
  .map_style-modal h3 {
    font-size: 16px;
  }
  
  .map_style-modal p {
    font-size: 13px;
  }
}

/* Мобильный интерфейс */
.map_style-m-zoomstack, .map_style-m-chips, .map_style-m-search, .map_style-m-tabbar {
  display: none;
}

@media (max-width: 768px) {
  .map_style-fab {
    width: 44px;
    height: 44px;
    font-size: 20px;
    top: 12px;
    left: 12px;
  }
  
  .map_style-m-zoomstack {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: fixed;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
  }
  
  .map_style-m-zoomstack button {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,.12);
    background: #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,.15);
    font-size: 22px;
    font-weight: 700;
  }
  
  .map_style-m-chips {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 120px;
    z-index: 1000;
  }
  
  .map_style-m-chips button {
    flex: 1;
    border: 0;
    background: #fff;
    border-radius: 12px;
    padding: 10px 6px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid rgba(0,0,0,.08);
    color: #0f172a;
    opacity: .85;
  }
  
  .map_style-m-search {
    display: flex;
    gap: 10px;
    background: #fff;
    border-radius: 12px;
    padding: 2px 4px;
    border: 1px solid rgba(0,0,0,.12);
    box-shadow: 0 8px 22px rgba(0,0,0,.15);
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 65px;
    z-index: 1000;
  }
  
  .map_style-m-search input {
    flex: 1;
    border: 0;
    outline: 0;
    font-size: 14px;
    line-height: 1;
  }
  
  /* Мобильная кнопка поиска */
  .map_style-m-search button {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,.1);
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
  }
  
  .map_style-m-search button img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }
  
  .map_style-m-tabbar {
    display: flex;
    gap: 8px;
    justify-content: space-evenly;
    padding: 8px 10px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 16px;
    z-index: 1000;
  }
  
  .map_style-m-tabbar button {
    flex: 1;
    border: 0;
    background: #fff;
    border-radius: 12px;
    padding: 10px 6px;
    box-shadow: 0 6px 18px rgba(0,0,0,.12);
    font-size: 12px;
    font-weight: 700;
    border: 1px solid rgba(0,0,0,.08);
    color: #0f172a;
    opacity: .85;
  }
  
  .map_style-m-tabbar .on {
    background: #e9f6e9;
    border-color: #bfe6c5;
  }
  
  .leaflet-control-zoom {
    display: none !important;
  }
  
  .map_style-sos-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 1050;
    width: 56px;
    height: 56px;
    background: #e02424;
    color: #fff;
    font-weight: 800;
    font-size: 16px;
    border: none;
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(224, 36, 36, 0.5);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
  }
  
  .map_style-sos-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 25px rgba(224, 36, 36, 0.6);
  }
  
  /* Кнопка "Назад" на мобильной (над поиском) */
  .map_style-m-chips .map_style-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background-color: #007aff;
    color: #fff;
    font-weight: 700;
    border-radius: 12px;
    border: none;
    font-size: 14px;
    padding: 8px 12px;
    text-decoration: none;
  }
  
  /* Эффект дыхания/пульсации */
  @keyframes map_style-backPulse {
    0%, 100% {
      transform: scale(1);
      box-shadow: 0 0 10px rgba(0, 122, 255, 0.5);
    }
    50% {
      transform: scale(1.08);
      box-shadow: 0 0 20px rgba(0, 122, 255, 0.8);
    }
  }
  
  /* Легкое увеличение при нажатии */
  .map_style-m-chips .map_style-back-btn:active {
    transform: scale(1.1);
  }
}

/* Убрать флаг Leaflet */
.leaflet-control-attribution {
  display: none !important;
}

/* Кнопки зума справа по центру, без рамок и скруглений (ПК-версия) */
@media (min-width: 769px) {
  .leaflet-top.leaflet-left {
    top: 50% !important;
    left: auto !important;
    right: 20px !important;
    transform: translateY(-50%);
  }
  
  .leaflet-control-zoom {
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
  }
  
  .leaflet-control-zoom a {
    display: block;
    background: #fff !important;
    color: #333 !important;
    font-weight: bold;
    width: 36px;
    height: 36px;
    line-height: 34px;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0 !important;
    margin-bottom: 10px;
    transition: transform 0.2s, background 0.2s;
  }
  
  .leaflet-control-zoom a:hover {
    transform: scale(1.1);
    background: #f5f5f5 !important;
  }
  
  .leaflet-control-zoom a:last-child {
    margin-bottom: 0;
  }
}

/* Кнопка "Назад" в мобильной панели */
.map_style-m-tabbar .map_style-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-color: #007aff;
  color: #fff;
  font-weight: 700;
  border-radius: 12px;
  border: none;
  font-size: 14px;
  padding: 8px 12px;
  text-decoration: none;
}

/* ПК-версия нижнего меню и поиска */
@media (min-width: 769px) {
  .map_style-pc-search, .map_style-pc-tabbar {
    display: flex;
    gap: 8px;
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
  }
  
  .map_style-pc-search {
    bottom: 80px;
    width: 400px;
    background: #fff;
    padding: 6px 10px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,.12);
    box-shadow: 0 6px 18px rgba(0,0,0,.15);
  }
  
  .map_style-pc-search button {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,.1);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  
  .map_style-pc-search input {
    flex: 1;
    border: 0;
    outline: 0;
    font-size: 14px;
    padding: 6px 8px;
    background: transparent;
  }
  
  .map_style-pc-tabbar {
    bottom: 16px;
    justify-content: center;
    background: #fff;
    padding: 8px 12px;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0,0,0,.15);
    gap: 12px;
  }
  
  .map_style-pc-tabbar button {
    flex: none;
    min-width: 180px;
    max-width: 200px;
    padding: 10px 12px;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border: none;
    background: #f3f4f6;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s;
  }
  
  .map_style-pc-tabbar button:hover {
    background: #e0f2fe;
    transform: translateY(-2px);
  }
  
  .map_style-pc-tabbar .map_style-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background-color: #007aff;
    color: #fff;
    font-weight: 700;
    border-radius: 12px;
    border: none;
    font-size: 14px;
    padding: 8px 20px;
    text-decoration: none;
    white-space: nowrap;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  /* При наведении лёгкое увеличение и усиление тени */
  .map_style-pc-tabbar .map_style-back-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 0 20px rgba(0, 122, 255, 0.8);
  }
  
  /* При нажатии */
  .map_style-pc-tabbar .map_style-back-btn:active {
    transform: scale(1.1);
  }
}

/* Специальная цветовая схема для роли "Исполнитель" */
body.role-executor .map_style-fab {
  background: radial-gradient(circle at center, #d8b4fe 40%, #c084fc 100%) !important;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.5), 0 0 40px rgba(168, 85, 247, 0.25) inset !important;
}

body.role-executor .map_style-pc-tabbar {
  background: #d8b4fe !important;
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.3) !important;
}

body.role-executor .map_style-m-chips button,
body.role-executor .map_style-m-tabbar button {
  background: #d8b4fe !important;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 6px 18px rgba(168, 85, 247, 0.25) !important;
}

@media (max-width: 768px) {
  .map_style-pc-search,
  .map_style-pc-tabbar {
    display: none !important;
  }
}

/* Поиск для неавторизованных пользователей */
body:not(.role-executor):not(.logged-in) .map_style-m-search,
body:not(.role-executor):not(.logged-in) .map_style-pc-search {
  margin-top: 80px;
}

/* Можно подогнать для ПК и мобильных */
@media (max-width: 768px) {
  body:not(.role-executor):not(.logged-in) .map_style-m-search {
    bottom: 20px !important;     /* вместо 65px */
  }
}

@media (min-width: 769px) {
  body:not(.role-executor):not(.logged-in) .map_style-pc-search {
    bottom: 30px !important;     /* вместо 80px */
  }
}

/* ФИКСИРОВАННЫЙ контейнер */
.map_style-sos-wrapper {
  position: relative;
  width: 50px;
  height: 50px;
  overflow: visible;
}

/* Прежний твой стиль */
.map_style-sos-pulse-icon {
  position: relative;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* АНИМАЦИЯ сердечка */
.map_style-sos-pulse-icon img {
  width: 40px;
  height: 40px;
  position: relative;
  z-index: 2;
  animation: map_style-pulse 1s infinite;
}

@keyframes map_style-pulse {
  0% { transform: scale(1); }
  25% { transform: scale(1.2); }
  50% { transform: scale(1); }
  75% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* АНИМАЦИЯ радиального круга */
.map_style-sos-pulse-icon .pulse {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,0,0,0.3);
  animation: map_style-ring 1.5s infinite;
  z-index: 1;
}

@keyframes map_style-ring {
  0% { transform: scale(1); opacity: 0.7; }
  70% { transform: scale(2.5); opacity: 0; }
  100% { transform: scale(2.5); opacity: 0; }
}

.map_style-premium-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.map_style-premium-toggle input {
  display: none;
}

.map_style-premium-toggle .slider {
  position: relative;
  width: 50px;
  height: 26px;
  background-color: #ccc;
  border-radius: 13px;
  transition: 0.3s;
  flex-shrink: 0;
}

.map_style-premium-toggle .slider::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 2px;
  top: 2px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
}

.map_style-premium-toggle input:checked + .slider::before {
  transform: translateX(24px);
}

.map_style-premium-toggle input:checked + .slider {
  background-color: #4caf50;
}

.map_style-premium-toggle .label-text {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  flex-shrink: 0;
}

.map_style-favorite-star {
  cursor: pointer;
  font-size: 28px;
  transition: all 0.3s ease;
  user-select: none;
}

.map_style-favorite-star:hover {
  transform: scale(1.4) rotate(15deg);
}

.map_style-favorite-star.favorited {
  color: gold !important;
  text-shadow: 0 0 12px gold, 0 0 20px orange;
  animation: map_style-shine 2s infinite;
}

@keyframes map_style-shine {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.5); }
}

/* ВАЖНО: в самом конце добавь это - чтобы твои стили перебивали Leaflet! */
.leaflet-container {
  background: #000 !important;
}

.leaflet-control-zoom a {
  background: #fff !important;
  border: 1px solid rgba(0,0,0,0.2) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.leaflet-control-attribution {
  display: none !important;
}
/* ============================================= */
/*  ПОЛНОЕ И КОРРЕКТНОЕ СКРЫТИЕ МЕНЮ ДЛЯ НЕАВТОРИЗОВАННЫХ  */
/* ============================================= */
body:not(.logged-in) .map_style-pc-tabbar,
body:not(.logged-in) .map_style-m-chips,
body:not(.logged-in) .map_style-m-tabbar {
    display: none !important;
}

/* Опционально: если у тебя где-то ещё есть элементы только для залогиненных */
body:not(.logged-in) .map_style-premium-toggle,
body:not(.logged-in) .map_style-logout-btn,
body:not(.logged-in) .map_style-username {
    display: none !important;
}

.map_style-username {
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

/* Красиво подвинем поиск вверх, когда нет нижнего меню */
@media (max-width: 768px) {
    body:not(.logged-in) .map_style-m-search {
        bottom: 20px !important;     /* вместо 65px */
    }
}

@media (min-width: 769px) {
    body:not(.logged-in) .map_style-pc-search {
        bottom: 30px !important;     /* вместо 80px */
    }
}

/* Стили для кнопок маршрутизации */
.map_style-accept-btn {
  background: #0ea5a4;
  color: #fff;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.map_style-accept-btn:hover {
  background: #14b8a6;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(14,165,164,0.3);
}

.map_style-big-route-btn {
  background: #0078FF;
  color: white;
  padding: 14px 20px;
  border: none;
  border-radius: 16px;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,120,255,0.3);
  transition: all 0.2s ease;
}

.map_style-big-route-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,120,255,0.4);
}

.map_style-route-mode-selector {
  margin-top: 10px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 12px;
  animation: map_style-slideDown 0.3s ease;
}

@keyframes map_style-slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.map_style-mode-btn {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.map_style-mode-btn[data-mode="walking"] {
  background: #fff;
  border: 2px solid #4ade80;
  color: #4ade80;
}

.map_style-mode-btn[data-mode="walking"]:hover {
  background: #4ade80;
  color: #fff;
}

.map_style-mode-btn[data-mode="driving"] {
  background: #0078FF;
  color: white;
  border: 2px solid #0078FF;
}

.map_style-mode-btn[data-mode="driving"]:hover {
  background: #0056cc;
  border-color: #0056cc;
}

    /* ============================================= */
    /*  ИСПРАВЛЕНИЯ ДЛЯ ПК-ВЕРСИИ (только для min-width: 769px) */
    /* ============================================= */

    @media (min-width: 769px) {
        /* Кнопка ULTRA - внутри навигационного блока */
        .pc-nav-container .ultra-btn-map {
            position: relative;
            width: 50px;
            height: 50px;
            padding: 0;
            font-family: "SF Pro Display", sans-serif;
            font-weight: 800;
            color: #FFFFFF;
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
            border: 2px solid rgba(102, 126, 234, 0.6);
            border-radius: 50%;
            cursor: pointer;
            overflow: visible;
            text-transform: uppercase;
            transition: all 0.3s ease;
            box-shadow: 
                0 4px 12px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            line-height: 1;
            margin-bottom: 10px;
        }

        .pc-nav-container .ultra-btn-map:hover {
            transform: scale(1.1);
            background: linear-gradient(135deg, #0f3460 0%, #16213e 50%, #1a1a2e 100%);
            border-color: rgba(102, 126, 234, 0.9);
            box-shadow: 
                0 6px 16px rgba(102, 126, 234, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
        }

        .pc-nav-container .ultra-btn-map:active {
            transform: scale(1.05);
        }

        .pc-nav-container .ultra-btn-map .ultra-btn-text {
            position: relative;
            z-index: 2;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
            line-height: 1;
            margin: 0;
            padding: 0;
            letter-spacing: 0.5px;
            font-size: 8px;
            width: 100%;
            height: 100%;
        }
        
        /* PRO элемент рядом с кнопкой */
        .pc-nav-container .ultra-btn-map .ultra-pro-badge {
            position: absolute;
            top: -2px;
            right: -2px;
            width: 16px;
            height: 16px;
            border-radius: 3px;
            background: linear-gradient(135deg, #ff9500 0%, #ff6b00 100%);
            border: 1px solid rgba(255, 255, 255, 0.3);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 7px;
            font-weight: 800;
            color: #000;
            box-shadow: 0 2px 6px rgba(255, 149, 0, 0.4);
            z-index: 1051;
        }

        /* ИСПРАВЛЕННАЯ ПОИСКОВАЯ СТРОКА - компактная и СЛЕВА от ULTRA */
        .pc-search {
            display: flex;
            gap: 8px;
            position: fixed;
            top: 25px;
            right: 80px;
            z-index: 1000;
            width: 300px;
            height: 44px;
            background: #fff;
            padding: 0 12px;
            border-radius: 22px;
            border: 1px solid rgba(0,0,0,.12);
            box-shadow: 0 4px 12px rgba(0,0,0,.15);
            align-items: center;
        }

        .pc-search input {
            flex: 1;
            border: 0;
            outline: 0;
            font-size: 14px;
            padding: 0 8px;
            background: transparent;
            height: 100%;
            line-height: 44px;
        }

        .pc-search button {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            border: 1px solid rgba(0,0,0,.1);
            background: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            padding: 0;
            flex-shrink: 0;
        }
        
        .pc-search button img {
            width: 30px;
            height: 15px;
            object-fit: contain;
        }

        /* Навигационные кнопки справа - с кнопкой ULTRA */
        .pc-nav-buttons {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 1049;
            display: flex;
            flex-direction: column;
            gap: 8px;
            align-items: center;
        }

        .pc-nav-container {
            background: rgba(255, 255, 255, 0.95);
            border-radius: 20px;
            padding: 12px 8px;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
            backdrop-filter: blur(8px);
            border: 1px solid rgba(0, 0, 0, 0.08);
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .pc-nav-btn {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: #fff;
            border: 1px solid #007aff;
            color: #007aff;
            font-size: 18px;
            font-weight: bold;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
            box-shadow: 0 2px 8px rgba(0, 122, 255, 0.15);
        }

        .pc-nav-btn:hover {
            background: #007aff;
            color: #fff;
            transform: scale(1.1);
            box-shadow: 0 3px 12px rgba(0, 122, 255, 0.3);
        }

        /* Специфичные стили для кнопок навигации */
        .pc-nav-loc {
            background: #fff;
            border-color: #007aff;
            color: #007aff;
        }

        .pc-nav-mypos {
            font-size: 16px;
            background: #fff;
            border-color: #34c759;
            color: #34c759;
        }

        /* ============================================= */
        /*  ЛЕВЫЙ НИЖНИЙ УГОЛ - ВСЕ КНОПКИ СТОЛБИКОМ */
        /* ============================================= */
        
        /* Основной контейнер для всех кнопок над FAB */
        .left-bottom-container {
            position: fixed;
            bottom: 80px;
            left: 16px;
            z-index: 1000;
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 12px;
        }

        /* Кнопка Профиль сверху */
        .profile-btn {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background: #fff;
            border: 2px solid #007aff;
            color: #007aff;
            font-size: 14px;
            font-weight: bold;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2);
            transition: all 0.2s ease;
            text-decoration: none;
        }

        .profile-btn:hover {
            background: #007aff;
            color: #fff;
            transform: scale(1.1);
            box-shadow: 0 6px 16px rgba(0, 122, 255, 0.3);
        }

        /* Кнопка Избранное посередине */
        .favorites-btn {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background: #fff;
            border: 2px solid #ff9500;
            color: #ff9500;
            font-size: 14px;
            font-weight: bold;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 12px rgba(255, 149, 0, 0.2);
            transition: all 0.2s ease;
            text-decoration: none;
        }

        .favorites-btn:hover {
            background: #ff9500;
            color: #fff;
            transform: scale(1.1);
            box-shadow: 0 6px 16px rgba(255, 149, 0, 0.3);
        }

        /* Кнопка Назад снизу (перед FAB) */
        .back-left-btn {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background: #fff;
            border: 2px solid #34c759;
            color: #34c759;
            font-size: 14px;
            font-weight: bold;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 12px rgba(52, 199, 89, 0.2);
            transition: all 0.2s ease;
            text-decoration: none;
        }

        .back-left-btn:hover {
            background: #34c759;
            color: #fff;
            transform: scale(1.1);
            box-shadow: 0 6px 16px rgba(52, 199, 89, 0.3);
        }

        /* FAB кнопка меню */
        .map_style-fab {
            position: fixed !important;
            left: 16px !important;
            bottom: 16px !important;
            top: auto !important;
            right: auto !important;
            z-index: 1001;
            width: 64px;
            height: 64px;
            border: 2px solid rgba(255, 215, 0, 0.6);
            border-radius: 50%;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
            box-shadow: 
                0 8px 24px rgba(102, 126, 234, 0.5),
                0 0 0 4px rgba(255, 215, 0, 0.2),
                inset 0 2px 4px rgba(255, 255, 255, 0.3),
                inset 0 -2px 4px rgba(0, 0, 0, 0.2);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            animation: fabPulse 2s infinite ease-in-out, fabWiggle 3.5s infinite ease-in-out;
            transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            overflow: visible;
        }

        .map_style-fab:hover {
            transform: scale(1.2) rotate(8deg);
            box-shadow: 
                0 12px 32px rgba(102, 126, 234, 0.7),
                0 0 0 6px rgba(255, 215, 0, 0.3),
                inset 0 2px 6px rgba(255, 255, 255, 0.4),
                inset 0 -2px 6px rgba(0, 0, 0, 0.3);
            background: linear-gradient(135deg, #764ba2 0%, #f093fb 50%, #667eea 100%);
            border-color: rgba(255, 215, 0, 0.9);
        }

        /* Корона сверху на FAB */
        .fab-crown {
            position: absolute;
            top: -12px;
            left: 50%;
            transform: translateX(-50%);
            font-size: 20px;
            filter: drop-shadow(0 2px 8px rgba(255, 215, 0, 0.8));
            z-index: 1002;
            animation: crownFloat 2s ease-in-out infinite;
        }

        /* Контейнер для логотипов в FAB */
        .fab-logo-container {
            display: flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            width: 100%;
            height: 100%;
            position: relative;
        }

        /* Оригинальный логотип внутри FAB */
        .map_style-fab-logo {
            width: 75%;
            height: 75%;
            object-fit: contain;
            filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
            animation: fabGlow 1.8s infinite alternate ease-in-out;
        }

        /* Логотип PRO внутри FAB - внизу */
        .fab-pro-logo {
            position: absolute;
            bottom: 4px;
            left: 50%;
            transform: translateX(-50%);
            height: 10px;
            width: auto;
            filter: drop-shadow(0 1px 4px rgba(255, 149, 0, 0.8));
            z-index: 2;
        }
        
        /* Переопределение цвета SOS кнопки для ПК */
        .map_style-sos-btn {
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%) !important;
            border: 2px solid rgba(102, 126, 234, 0.6) !important;
            box-shadow: 
                0 4px 12px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
        }
        
        .map_style-sos-btn:hover {
            background: linear-gradient(135deg, #0f3460 0%, #16213e 50%, #1a1a2e 100%) !important;
            border-color: rgba(102, 126, 234, 0.9) !important;
            box-shadow: 
                0 6px 16px rgba(102, 126, 234, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
        }
        
        /* Скрываем мобильную SOS кнопку на ПК */
        .map_style-sos-btn {
            display: none !important;
        }
        
        /* ПК версия нижнего меню */
        .map_style-pc-tabbar {
            display: flex;
            gap: 12px;
            justify-content: center;
            position: fixed;
            left: 50%;
            transform: translateX(-50%);
            bottom: 16px;
            z-index: 1000;
            background: #fff;
            padding: 8px 12px;
            border-radius: 16px;
            box-shadow: 0 6px 20px rgba(0,0,0,.15);
            max-width: 90%;
            width: auto;
        }
        
        .map_style-pc-tabbar button {
            flex: none;
            min-width: 180px;
            max-width: 200px;
            padding: 10px 12px;
            font-size: 13px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            border: none;
            background: #f3f4f6;
            border-radius: 12px;
            cursor: pointer;
            font-weight: 700;
            transition: all 0.2s;
        }
        
        .map_style-pc-tabbar button:hover {
            background: #e0f2fe;
            transform: translateY(-2px);
        }
        
        .map_style-pc-tabbar .map_style-premium-toggle {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            user-select: none;
            white-space: nowrap;
            padding: 8px 12px;
            background: #f3f4f6;
            border-radius: 12px;
        }
        
        /* Скрываем мобильные элементы на ПК */
        .map_style-m-zoomstack,
        .map_style-m-chips,
        .map_style-m-search,
        .map_style-m-tabbar {
            display: none !important;
        }

         .map_style-fab {
        position: fixed !important;
        left: 16px !important;
        bottom: 16px !important;
        top: auto !important;
        right: auto !important;
        z-index: 1001 !important;
        /* остальные стили остаются как есть */
    }
    }

/* ============================================= */
/*  МОБИЛЬНАЯ ВЕРСИЯ (max-width: 768px) */
/* ============================================= */
@media (max-width: 768px) {
    /* Скрываем ПК элементы на мобильных */
    .pc-search,
    .pc-nav-buttons,
    .left-bottom-container,
    .map_style-pc-tabbar,
    .fab-crown,
    .fab-pro-logo {
        display: none !important;
    }
    
    /* Мобильная SOS кнопка */
    .map_style-sos-btn {
        display: flex !important;
        position: fixed;
        bottom: 100px;
        right: 16px;
        z-index: 1000;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
        color: white;
        border: 2px solid rgba(102, 126, 234, 0.6);
        font-weight: bold;
        font-size: 12px;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 
            0 4px 12px rgba(0, 0, 0, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
        transition: all 0.3s ease;
    }
    
    .map_style-sos-btn:hover {
        background: linear-gradient(135deg, #0f3460 0%, #16213e 50%, #1a1a2e 100%);
        border-color: rgba(102, 126, 234, 0.9);
        box-shadow: 
            0 6px 16px rgba(102, 126, 234, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.15);
        transform: scale(1.1);
    }
    
    /* Мобильная FAB кнопка - ТЕПЕРЬ СЛЕВА СВЕРХУ */
    .map_style-fab {
        position: fixed !important;
        left: 16px !important;
        top: 20px !important;
        right: auto !important;
        bottom: auto !important;
        z-index: 1001 !important;
        width: 56px;
        height: 56px;
        border: 2px solid rgba(255, 215, 0, 0.6);
        border-radius: 50%;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
        box-shadow: 
            0 8px 24px rgba(102, 126, 234, 0.5),
            0 0 0 4px rgba(255, 215, 0, 0.2),
            inset 0 2px 4px rgba(255, 255, 255, 0.3),
            inset 0 -2px 4px rgba(0, 0, 0, 0.2);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        animation: fabPulse 2s infinite ease-in-out, fabWiggle 3.5s infinite ease-in-out;
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        overflow: visible;
        padding: 0;
    }
    
    .map_style-fab:hover {
        transform: scale(1.2) rotate(8deg);
        box-shadow: 
            0 12px 32px rgba(102, 126, 234, 0.7),
            0 0 0 6px rgba(255, 215, 0, 0.3),
            inset 0 2px 6px rgba(255, 255, 255, 0.4),
            inset 0 -2px 6px rgba(0, 0, 0, 0.3);
        background: linear-gradient(135deg, #764ba2 0%, #f093fb 50%, #667eea 100%);
        border-color: rgba(255, 215, 0, 0.9);
    }
    
    /* ВАЖНО: Показываем все элементы FAB на мобильных */
    .map_style-fab .fab-crown {
        position: absolute;
        top: -12px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 20px;
        filter: drop-shadow(0 2px 8px rgba(255, 215, 0, 0.8));
        z-index: 1002;
        animation: crownFloat 2s ease-in-out infinite;
        display: block !important;
    }
    
    .map_style-fab .fab-logo-container {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        width: 100%;
        height: 100%;
        position: relative;
    }
    
    .map_style-fab .map_style-fab-logo {
        width: 75% !important;
        height: 75% !important;
        object-fit: contain;
        filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
        animation: fabGlow 1.8s infinite alternate ease-in-out;
        display: block !important;
    }
    
    .map_style-fab .fab-pro-logo {
        position: absolute;
        bottom: 4px;
        left: 50%;
        transform: translateX(-50%);
        height: 10px;
        width: auto;
        filter: drop-shadow(0 1px 4px rgba(255, 149, 0, 0.8));
        z-index: 2;
        display: block !important;
    }
    
    /* Адаптируем остальные элементы */
    .map_style-m-zoomstack {
        position: fixed;
        right: 16px;
        z-index: 1000;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .map_style-m-chips {
        position: fixed;
        right: 16px; 
        z-index: 999;
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding: 8px 0;
    }
    
    .map_style-m-search {
        position: fixed;
        left: 16px;
        right: 16px;
        z-index: 998;
    }
}

    /* ============================================= */
    /*  АНИМАЦИИ (общие для всех экранов) */
    /* ============================================= */

    /* Пульсация свечения FAB */
    @keyframes fabPulse {
        0% { box-shadow: 0 0 10px rgba(0, 255, 255, 0.4); }
        50% { box-shadow: 0 0 35px rgba(0, 255, 255, 0.9); }
        100% { box-shadow: 0 0 10px rgba(0, 255, 255, 0.4); }
    }

    /* Активное свечение логотипа FAB */
    @keyframes fabGlow {
        0% { filter: drop-shadow(0 0 4px rgba(0,255,255,0.4)); }
        50% { filter: drop-shadow(0 0 14px rgba(0,255,255,1)); }
        100% { filter: drop-shadow(0 0 4px rgba(0,255,255,0.4)); }
    }

    /* Заметное "качание" FAB в стороны */
    @keyframes fabWiggle {
        0%, 100% { transform: rotate(0deg); }
        10% { transform: rotate(10deg); }
        20% { transform: rotate(-10deg); }
        30% { transform: rotate(6deg); }
        40% { transform: rotate(-6deg); }
        50% { transform: rotate(3deg); }
        60% { transform: rotate(-3deg); }
        70% { transform: rotate(1deg); }
        80%, 90% { transform: rotate(0deg); }
    }

    /* Анимация короны */
    @keyframes crownFloat {
        0%, 100% { transform: translateX(-50%) translateY(0); }
        50% { transform: translateX(-50%) translateY(-3px); }
    }

    /* Анимация для выбора режима маршрута */
    @keyframes slideDown { 
        from { opacity:0; transform:translateY(-10px); } 
        to { opacity:1; transform:translateY(0); } 
    }

    .route-mode-selector { 
        animation: slideDown 0.3s ease; 
    }
    
    /* Анимация прогресса SOS кнопки */
    .map_style-sos-ring circle {
        transition: stroke-dashoffset 0.3s ease;
    }

    /* ============================================= */
    /*  ПРАВИЛА ДЛЯ СКРЫТИЯ МЕНЮ ДЛЯ НЕАВТОРИЗОВАННЫХ */
    /* ============================================= */
    body:not(.logged-in) .map_style-pc-tabbar,
    body:not(.logged-in) .map_style-m-chips,
    body:not(.logged-in) .map_style-m-tabbar {
        display: none !important;
    }

    /* Поднимаем поиск, когда нет нижнего меню */
    @media (max-width: 768px) {
        body:not(.logged-in) .map_style-m-search {
            bottom: 20px !important;
        }
    }

    @media (min-width: 769px) {
        body:not(.logged-in) .pc-search {
            bottom: 30px !important;
        }
    }

    /* ============================================= */
    /*  ПЕРЕОПРЕДЕЛЕНИЕ ВСЕХ СТИЛЕЙ ДЛЯ FAB */
    /* ============================================= */
    @media (min-width: 769px) {
        .map_style-fab {
            position: fixed !important;
            left: 16px !important;
            bottom: 16px !important;
            top: auto !important;
            right: auto !important;
            z-index: 1001 !important;
        }
    }

    /* ============================================= */
    /*  ULTRA PRO АНИМАЦИОННЫЙ КРУГ (исправленный) */
    /* ============================================= */
   /* ============================================= */
/*  ULTRA PRO АНИМАЦИОННЫЙ КРУГ (ИСПРАВЛЕННЫЙ) */
/* ============================================= */
@media (min-width: 769px) {
    .pc-nav-container .ultra-pro-circle {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 70px; /* Увеличен размер */
        height: 70px; /* Увеличен размер */
        z-index: 1;
        pointer-events: none;
    }
    
    .pc-nav-container .ultra-pro-circle-svg {
        width: 100%;
        height: 100%;
        transform: rotate(-90deg);
    }
    
    .pc-nav-container .ultra-pro-circle-bg {
    fill: none;
    stroke: rgba(102, 126, 234, 0.15);
    stroke-width: 4; /* Увеличенная толщина */
}

.pc-nav-container .ultra-pro-circle-fill {
    fill: none;
    stroke: url(#ultraGradient);
    stroke-width: 4; /* Увеличенная толщина */
    stroke-linecap: round;
    stroke-dasharray: 194.8; /* 2 * π * 31 = ~194.8 */
    stroke-dashoffset: 194.8; /* Начинаем с пустого */
    transition: stroke-dashoffset 0.05s linear;
}
    
    /* Градиент для круга */
    .pc-nav-container .ultra-gradient {
        stop-color: #667eea;
    }
    
    .pc-nav-container .ultra-gradient-2 {
        stop-color: #764ba2;
    }
    
    .pc-nav-container .ultra-gradient-3 {
        stop-color: #f093fb;
    }
    
    /* Обновленные анимации для круга */
    @keyframes ultra-pulse {
        0%, 100% { transform: translate(-50%, -50%) scale(1); }
        50% { transform: translate(-50%, -50%) scale(1.05); }
    }
    
    .ultra-pro-circle.loading {
        animation: ultra-pulse 1s ease-in-out infinite;
    }
    
    /* Класс для кнопки во время загрузки */
    .ultra-btn-map.ultra-loading {
        filter: brightness(1.1);
    }
}

/* ============================================= */
/*  ИСПРАВЛЕНИЯ ДЛЯ ПК-ВЕРСИИ (только для min-width: 769px) */
/* ============================================= */

@media (min-width: 769px) {
    /* ПОИСКОВАЯ СТРОКА - ЦЕНТР СВЕРХУ */
    .pc-search {
        display: flex;
        gap: 8px;
        position: fixed;
        top: 25px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1000;
        width: 500px; /* Увеличим ширину для центрального положения */
        max-width: 60%; /* Ограничим максимальную ширину */
        height: 50px; /* Немного увеличим высоту */
        background: #fff;
        padding: 0 16px;
        border-radius: 25px;
        border: 1px solid rgba(0,0,0,.12);
        box-shadow: 0 6px 20px rgba(0,0,0,.2);
        align-items: center;
        transition: all 0.3s ease;
    }

    .pc-search:hover {
        box-shadow: 0 8px 25px rgba(0,0,0,.25);
        transform: translateX(-50%) translateY(-2px);
    }

    .pc-search input {
        flex: 1;
        border: 0;
        outline: 0;
        font-size: 16px;
        padding: 0 12px;
        background: transparent;
        height: 100%;
        line-height: 50px;
        font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    }

    .pc-search input::placeholder {
        color: #888;
        font-weight: 400;
    }

    .pc-search button {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        border: 1px solid rgba(0,0,0,.1);
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        padding: 0;
        flex-shrink: 0;
        transition: all 0.3s ease;
    }
    
    .pc-search button:hover {
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    }
    
    .pc-search button img {
        width: 24px;
        height: 24px;
        object-fit: contain;
        filter: brightness(0) invert(1); /* Делаем иконку белой */
    }

    /* Навигационные кнопки справа - ОСТАВЛЯЕМ БЕЗ ИЗМЕНЕНИЙ */
    .pc-nav-buttons {
        position: fixed;
        top: 20px;
        right: 20px;
        z-index: 1049;
        display: flex;
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .map_style-m-tabbar {
        display: flex;
        gap: 8px;
        justify-content: space-evenly;
        padding: 8px 10px;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 9px;
        z-index: 1000;
    }
}
@media (max-width: 371px) {
    .map_style-m-tabbar {
        display: flex;
        gap: 8px;
        justify-content: space-evenly;
        padding: 8px 10px;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0px;
        z-index: 1000;
    }
}
@media (max-width: 768px) {
    .map_style-m-chips {
        position: fixed;
        right: 16px;
        z-index: 999;
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding: 3px 0;
    }
}