/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #000000;
    overflow: hidden;
}

/* Карта и тайлы */
#map,
.leaflet-container {
    width: 100vw;
    height: 100vh;
    background-color: #000000;
}
.leaflet-tile-pane {
    filter: contrast(1.05) saturate(1.1);
}
.minecraft-map-image {
    image-rendering: crisp-edges;
    image-rendering: -moz-crisp-edges;
    image-rendering: pixelated;
}

/* Контейнер для названия улицы */
.street-label {
  background-color: rgba(40, 40, 40, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  padding: 4px 8px;
  color: #e0e0e0;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  font-size: 12px;
  font-weight: 500;
  transform: translate(-50%, -50%);
  pointer-events: none;
  user-select: none;
}

/* Обёртка divIcon — сбрасываем масштабирование */
.leaflet-marker-icon.street-label-icon {
  background: none !important;
  border: none !important;
}


/* Поиск */
.search-container {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background-color: rgba(30, 30, 30, 0.95);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    width: 320px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.search-input {
    width: 100%;
    padding: 15px 20px;
    border: none;
    outline: none;
    font-size: 16px;
    background-color: transparent;
    color: #f0f0f0;
}
.search-input::placeholder { color: #888; }
.search-results {
    max-height: 300px;
    overflow-y: auto;
    background-color: rgba(25, 25, 25, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: none;
}
.search-result-item {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s ease;
}
.search-result-item:hover { background-color: rgba(255, 255, 255, 0.1); }
.search-result-type {
    font-size: 12px;
    color: #aaa;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
}

/* Контролы */
.leaflet-control-zoom {
    background-color: rgba(30, 30, 30, 0.9);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.leaflet-control-zoom a {
    background-color: transparent;
    border: none;
    color: #e0e0e0;
    width: 40px;
    height: 40px;
    line-height: 38px;
    font-size: 18px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s ease;
}
.leaflet-control-zoom a:hover { background-color: rgba(255, 255, 255, 0.15); color: #fff; }
.leaflet-control-zoom-in { border-radius: 12px 12px 0 0; }
.leaflet-control-zoom-out { border-radius: 0 0 12px 12px; }

/* Подписи улиц (Tooltip) */
.leaflet-tooltip.street-label {
    position: relative;
    z-index: 1001;
    background-color: rgba(40, 40, 40, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    color: #e0e0e0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    white-space: nowrap;
}
.leaflet-tooltip.street-label .leaflet-tooltip-tip {
    display: none; /* убираем стрелку */
}
@supports (backdrop-filter: blur(10px)) {
    .leaflet-tooltip.street-label {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        background-color: rgba(40, 40, 40, 0.85);
    }
}

/* Маркеры */
.city-marker { background-color: #ea4335; border: 2px solid rgba(255,255,255,0.8); border-radius: 50%; width:18px; height:18px; box-shadow:0 3px 8px rgba(0,0,0,0.4); }
.building-marker { background-color:#4285f4; border:2px solid rgba(255,255,255,0.8); border-radius:3px; width:14px; height:14px; box-shadow:0 3px 8px rgba(0,0,0,0.4); }
.structure-marker, .nature-marker, .park-marker { background-color:#34a853; border:2px solid rgba(255,255,255,0.8); border-radius:50%; width:12px; height:12px; box-shadow:0 3px 8px rgba(0,0,0,0.4); }
.landmark-marker { background-color:#fbbc05; border:2px solid rgba(255,255,255,0.8); border-radius:50%; width:14px; height:14px; box-shadow:0 3px 8px rgba(0,0,0,0.4); }
.business-marker { background-color:#9aa0a6; border:2px solid rgba(255,255,255,0.8); border-radius:3px; width:12px; height:12px; box-shadow:0 3px 8px rgba(0,0,0,0.4); }

/* Попапы */
.leaflet-popup-content-wrapper {
    background-color: rgba(30, 30, 30, 0.95);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
@supports (backdrop-filter: blur(15px)) {
    .leaflet-popup-content-wrapper {
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        background-color: rgba(30, 30, 30, 0.85);
    }
}
.leaflet-popup-content { margin:16px; font-size:14px; line-height:1.4; min-width:200px; color:#e0e0e0; }
.leaflet-popup-content h3 { margin-bottom:8px; color:#fff; font-size:16px; font-weight:500; }
.leaflet-popup-content p { margin:0; color:#bbb; }
.leaflet-popup-tip { background-color: rgba(30,30,30,0.95); border:none; box-shadow:0 4px 16px rgba(0,0,0,0.3); }
.leaflet-popup-close-button { color:#aaa; font-size:20px; font-weight:300; padding:8px; transition: color 0.2s ease; }
.leaflet-popup-close-button:hover { color:#fff; }

/* Координаты */
.coordinates {
    position:absolute; bottom:20px; left:20px; z-index:1000;
    background-color: rgba(30,30,30,0.9);
    color:#e0e0e0; padding:8px 12px;
    border-radius:6px; font-size:12px; font-family:monospace;
    box-shadow:0 3px 12px rgba(0,0,0,0.4);
    border:1px solid rgba(255,255,255,0.1);
    display:none;
}
@supports (backdrop-filter: blur(10px)) {
    .coordinates {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        background-color: rgba(30,30,30,0.8);
    }
}

/* Контекстное меню */
.context-menu {
    position:absolute; background-color: rgba(25,25,25,0.95);
    border:1px solid rgba(255,255,255,0.1); border-radius:8px;
    padding:8px 0; z-index:10000; display:none;
    box-shadow:0 8px 32px rgba(0,0,0,0.5); min-width:160px;
}
@supports (backdrop-filter: blur(15px)) {
    .context-menu {
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        background-color: rgba(25,25,25,0.85);
    }
}
.context-menu-item { padding:10px 16px; cursor:pointer; font-size:14px; color:#e0e0e0; transition: background 0.2s ease; }
.context-menu-item:hover { background-color: rgba(255,255,255,0.1); }

/* Скроллбар */
.search-results::-webkit-scrollbar { width:6px; }
.search-results::-webkit-scrollbar-track { background-color: rgba(255,255,255,0.05); }
.search-results::-webkit-scrollbar-thumb { background-color: rgba(255,255,255,0.2); border-radius:3px; }
.search-results::-webkit-scrollbar-thumb:hover { background-color: rgba(255,255,255,0.3); }

/* Мобильные */
@media (max-width:768px) {
    .search-container { width:90%; max-width:320px; }
    .coordinates { bottom:10px; left:10px; font-size:10px; padding:6px 8px; }
}
