/* Стили для карты - адаптированные из index2 */
.map-page {
    background: #2c3e50;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.map-page h1 {
    color: #ecf0f1;
    font-size: 24px;
    margin-bottom: 15px;
    text-align: center;
}

.map-main-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 20px;
    margin-top: 20px;
}

.map-wrapper {
    height: 700px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
}

#map {
    width: 100%;
    height: 100%;
}

.map-sidebar {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.search-section {
    background: #34495e;
    padding: 15px;
    border-radius: 8px;
}

.search-hint-v1 {
    margin-bottom: 10px;
}

.search-hint-v1 details {
    background: #2c3e50;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.search-hint-v1 summary {
    cursor: pointer;
    color: #3498db;
    font-weight: 500;
}

.search-hint {
    font-size: 12px;
    color: #95a5a6;
    margin-top: 5px;
    padding: 8px;
    background: #2c3e50;
    border-radius: 4px;
    line-height: 1.4;
}

.search-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#searchMarkers {
    padding: 10px 12px;
    border: 1px solid #34495e;
    border-radius: 4px;
    background: #2c3e50;
    color: #ecf0f1;
    font-size: 14px;
}

#searchMarkers::placeholder {
    color: #95a5a6;
}

.map-select {
    padding: 8px 12px;
    background: #2c3e50;
    color: #ecf0f1;
    border: 1px solid #34495e;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.map-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
    text-align: center;
}

.map-btn:hover {
    background: #2980b9;
}

.btn-danger {
    background: #e74c3c;
}

.btn-danger:hover {
    background: #c0392b;
}

#searchBtn {
    width: 100%;
}

.map-controls-sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #34495e;
    padding: 15px;
    border-radius: 8px;
}

.map-controls-sidebar .map-btn {
    width: 100%;
}

.markers-section {
    background: #34495e;
    padding: 15px;
    border-radius: 8px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.markers-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.markers-header h3 {
    color: #ecf0f1;
    margin: 0;
    font-size: 16px;
}

.sort-controls {
    display: flex;
    gap: 5px;
}

.sort-btn {
    background: #7f8c8d;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    min-width: 40px;
}

.sort-btn:hover {
    background: #95a5a6;
}

.markers-list {
    flex-grow: 1;
    max-height: 300px;
    overflow-y: auto;
    background: #2c3e50;
    border-radius: 5px;
    padding: 10px;
}

/* Стили для элементов списка меток */
.marker-item {
    background: #34495e;
    padding: 8px 10px;
    margin-bottom: 8px;
    border-radius: 4px;
    border-left: 3px solid #3498db;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.marker-item:hover {
    background: #3c5061;
}

.marker-info {
    flex-grow: 1;
}

.marker-name {
    color: #ecf0f1;
    font-weight: 500;
    margin-bottom: 3px;
}

.marker-coords {
    color: #95a5a6;
    font-size: 12px;
}

.marker-actions {
    display: flex;
    gap: 5px;
}

.marker-btn {
    background: none;
    border: none;
    color: #95a5a6;
    cursor: pointer;
    padding: 3px 5px;
    font-size: 14px;
}

.marker-btn:hover {
    color: #ecf0f1;
}

.map-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.support-info {
    background: #34495e;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.support-text {
    color: #ecf0f1;
    margin-bottom: 10px;
    font-weight: 500;
}

.support-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.support-links a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
}

.support-links a:hover {
    color: #2980b9;
}

.support-links svg {
    width: 18px;
    height: 18px;
}

.guide-button {
    display: block;
    text-align: center;
    padding: 12px;
    background: #2ecc71;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.3s;
    font-size: 14px;
}

.guide-button:hover {
    background: #27ae60;
    color: white;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .map-main-container {
        grid-template-columns: 1fr;
    }
    
    .map-wrapper {
        height: 500px;
    }
    
    .map-sidebar {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .map-page {
        padding: 10px;
    }
    
    .map-main-container {
        gap: 15px;
    }
    
    .markers-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .sort-controls {
        align-self: stretch;
        justify-content: space-between;
    }
    
    .sort-btn {
        flex: 1;
    }
}

/* Стили для скроллбара */
.markers-list::-webkit-scrollbar {
    width: 6px;
}

.markers-list::-webkit-scrollbar-track {
    background: #2c3e50;
    border-radius: 3px;
}

.markers-list::-webkit-scrollbar-thumb {
    background: #34495e;
    border-radius: 3px;
}

.markers-list::-webkit-scrollbar-thumb:hover {
    background: #3c5061;
}

/* Легенда карты */
.map-legend {
    background: #34495e;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.map-legend h4 {
    color: #ecf0f1;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 14px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    color: #bdc3c7;
    font-size: 13px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
    display: inline-block;
}

.legend-color.military { background: #e74c3c; }
.legend-color.hospital { background: #3498db; }
.legend-color.base { background: #2ecc71; }
.legend-color.loot { background: #f39c12; }
.legend-color.quest { background: #9b59b6; }
.legend-color.vehicle { background: #1abc9c; }
.legend-color.safe { background: #27ae60; }
.legend-color.danger { background: #c0392b; }

.map-note {
    background: #2c3e50;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    color: #95a5a6;
    font-size: 12px;
    margin-top: 10px;
}

.map-note i {
    margin-right: 5px;
}

/* Улучшенные стили для списка меток */
.marker-item {
    background: #34495e;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 4px;
    border-left: 4px solid #3498db;
    transition: all 0.3s;
}

.marker-item:hover {
    background: #3c5061;
    transform: translateX(5px);
}

.marker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.marker-name {
    color: #ecf0f1;
    font-weight: 500;
    font-size: 14px;
}

.marker-type {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    background: #2c3e50;
    color: #bdc3c7;
}

.marker-details {
    color: #95a5a6;
    font-size: 12px;
    margin-bottom: 5px;
}

.marker-coords {
    color: #7f8c8d;
    font-size: 11px;
    font-family: monospace;
}

/* Иконки для типов меток */
.marker-type[data-type="military"] { background: #e74c3c; color: white; }
.marker-type[data-type="hospital"] { background: #3498db; color: white; }
.marker-type[data-type="base"] { background: #2ecc71; color: white; }
.marker-type[data-type="loot"] { background: #f39c12; color: white; }
.marker-type[data-type="quest"] { background: #9b59b6; color: white; }

/* Заголовок с количеством */
#markersCount {
    color: #3498db;
    font-weight: normal;
}
/* Добавьте в конец map-styles.css */

/* Стили для маркеров Leaflet */
.leaflet-marker-icon {
    z-index: 1000 !important;
}

/* Попапы */
.leaflet-popup-content {
    font-family: 'Roboto', sans-serif;
    min-width: 200px;
}

.marker-popup h4 {
    margin-top: 0;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 5px;
}

.marker-popup p {
    margin: 5px 0;
    font-size: 14px;
}

/* Карта поверх всего */
.map-wrapper {
    position: relative;
    z-index: 1;
}
/* Добавьте в конец map-styles.css */

/* Улучшенные маркеры */
.custom-marker {
    z-index: 1000;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* Анимация при наведении на метку в списке */
.marker-item {
    cursor: pointer;
    transition: all 0.2s;
}

.marker-item:hover {
    transform: translateX(5px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

/* Подписи координат на карте */
.coord-label {
    pointer-events: none;
}

/* Граница карты */
.map-wrapper {
    border: 2px solid #3498db;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

/* Индикатор загрузки */
.map-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 16px;
    z-index: 1000;
}

/* Контролы Leaflet */
.leaflet-control-container .leaflet-control {
    margin: 10px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.leaflet-control-zoom a {
    background: #2c3e50;
    color: white;
    border-bottom: 1px solid #34495e;
}

.leaflet-control-zoom a:hover {
    background: #34495e;
}

.leaflet-bar a.leaflet-disabled {
    background: #1a252f;
    color: #7f8c8d;
}
/* Добавьте в конец файла */

/* Анимация пульсации для меток */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Улучшенные маркеры */
.custom-marker {
    z-index: 1000 !important;
    transition: transform 0.2s;
}

.custom-marker:hover {
    transform: scale(1.2);
    z-index: 1001 !important;
}

/* Кастомные попапы */
.custom-popup .leaflet-popup-content-wrapper {
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border-left: 4px solid #3498db;
}

.custom-popup .leaflet-popup-tip {
    background: white;
}

/* Индикатор координат */
.coordinate-info {
    pointer-events: none;
}

/* Кнопки сортировки */
.sort-btn.active {
    background: #3498db !important;
    color: white !important;
}

/* Контролы Leaflet */
.leaflet-control-container .leaflet-control {
    margin: 10px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.leaflet-control-zoom a {
    background: #2c3e50;
    color: white;
    border-bottom: 1px solid #34495e;
    font-size: 16px;
    line-height: 26px;
}

.leaflet-control-zoom a:hover {
    background: #34495e;
}

.leaflet-control-zoom-in {
    border-top-left-radius: 6px !important;
    border-top-right-radius: 6px !important;
}

.leaflet-control-zoom-out {
    border-bottom-left-radius: 6px !important;
    border-bottom-right-radius: 6px !important;
}

/* Панель масштаба */
.leaflet-control-scale {
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    padding: 2px 5px;
    border-radius: 3px;
}

/* Стили для списка меток */
.marker-item {
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 8px;
    padding: 12px;
    background: #34495e;
    border-radius: 6px;
    border-left: 4px solid #3498db;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.marker-item:hover {
    background: #3c5061;
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.marker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.marker-name {
    color: #ecf0f1;
    font-weight: 600;
    font-size: 14px;
    flex: 1;
}

.marker-type {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    background: #2c3e50;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.marker-details {
    color: #bdc3c7;
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 8px;
    padding: 8px;
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
}

.marker-coords {
    color: #95a5a6;
    font-size: 11px;
    font-family: 'Courier New', monospace;
    display: flex;
    justify-content: space-between;
}

/* Подсказки (tooltips) */
.leaflet-tooltip {
    background: rgba(0,0,0,0.8);
    color: white;
    border: none;
    border-radius: 3px;
    padding: 5px 10px;
    font-size: 11px;
}

.leaflet-tooltip-top:before {
    border-top-color: rgba(0,0,0,0.8);
}

/* Адаптивность */
@media (max-width: 768px) {
    .coordinate-info {
        display: none; /* Скрываем на мобильных */
    }
    
    .map-main-container {
        grid-template-columns: 1fr;
    }
    
    .map-wrapper {
        height: 400px;
    }
    
    .leaflet-control-container .leaflet-control {
        margin: 5px;
    }
}