/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f0f0;
    min-height: 100vh;
    overflow: hidden;
}

.container {
    position: relative;
    height: 100vh;
    width: 100vw;
}

/* Заголовок */
.header {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    text-align: center;
    pointer-events: none;
}

.header h1 {
    color: #333;
    font-size: 1.8em;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
    font-weight: 700;
}

.header p {
    color: #555;
    font-size: 0.9em;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

/* Карта на весь экран */
.map-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Стили для Leaflet */
#map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Кастомные маркеры Leaflet */
.custom-marker {
    background: transparent !important;
    border: none !important;
}

/* Стили для popup Leaflet */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-content {
    margin: 12px;
    line-height: 1.4;
}

.leaflet-popup-tip {
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Стили для контролов Leaflet */
.leaflet-control-zoom {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.leaflet-control-zoom a {
    background: white;
    color: #667eea;
    border: none;
    font-weight: bold;
    font-size: 18px;
}

.leaflet-control-zoom a:hover {
    background: #667eea;
    color: white;
}

/* Стили для attribution - скрываем */
.leaflet-control-attribution {
    display: none !important;
}

/* Дополнительное скрытие всех элементов атрибуции */
.leaflet-control-container .leaflet-control-attribution {
    display: none !important;
}

/* Скрываем любые элементы с текстом атрибуции */
[class*="attribution"] {
    display: none !important;
}

/* Стили для locate control */
.leaflet-control-locate {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.leaflet-control-locate a {
    background: white;
    color: #667eea;
    border: none;
}

.leaflet-control-locate a:hover {
    background: #667eea;
    color: white;
}

/* Стили для поиска */
.search-control {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
}

#searchInput {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
    width: 200px;
    color: #333;
}

#searchInput:focus {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    background: rgba(255, 255, 255, 1);
}

#searchBtn {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: #333;
}

#searchBtn:hover {
    background: rgba(255, 255, 255, 1);
    border-color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#searchBtn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}


/* Контейнер для кнопок управления картой */
.map-controls {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
}

/* Стили для кнопок управления картой */
.map-control {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: #333;
}

.map-control:hover {
    background: rgba(255, 255, 255, 1);
    border-color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.map-control:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Специфичные стили для кнопок управления */
#locationBtn, #zoomInBtn, #zoomOutBtn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: inherit;
    cursor: pointer;
    font-weight: bold;
}

#zoomInBtn, #zoomOutBtn {
    font-size: 20px;
    font-weight: 300;
}

/* Стили для кнопок зума */
.leaflet-control-zoom {
    position: static !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
}

.leaflet-control-zoom a {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    backdrop-filter: blur(10px) !important;
    transition: all 0.2s ease !important;
    width: 44px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    color: #333 !important;
    text-decoration: none !important;
    margin: 0 !important;
}

.leaflet-control-zoom a:hover {
    background: rgba(255, 255, 255, 1) !important;
    border-color: #667eea !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.leaflet-control-zoom a:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
}

/* Кнопки управления фильтрами */
.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.btn-apply {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    flex: 1;
}

.btn-apply:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-reset {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    flex: 1;
}

.btn-reset:hover {
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

/* Плашка под логотип */
.logo-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    z-index: -1;
}

/* Модальное окно результатов поиска */
.search-results-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.search-results-content {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    animation: slideIn 0.3s ease;
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.search-results-header h3 {
    margin: 0;
    font-size: 18px;
}

.close-search-results {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.close-search-results:hover {
    background: rgba(255, 255, 255, 0.2);
}

.search-results-list {
    max-height: 60vh;
    overflow-y: auto;
    padding: 10px;
}

.search-result-item {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin-bottom: 5px;
}

.search-result-item:hover {
    background: #f8f9fa;
    transform: translateX(5px);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
    font-size: 14px;
}

.search-result-type {
    font-size: 12px;
    color: #666;
    text-transform: capitalize;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Анимация пульсации для маркера поиска */
@keyframes pulse {
    0% {
        box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(255, 107, 107, 0.8);
    }
    100% {
        box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
    }
}

/* Сообщение о выборе места */
.location-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    text-align: center;
    max-width: 300px;
    animation: fadeIn 0.3s ease;
}

.location-message h3 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 1.2em;
}

.location-message p {
    margin: 0;
    color: #666;
    font-size: 0.9em;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Уведомления */
.notification {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.notification button {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification button:hover {
    opacity: 0.8;
}

/* Стили для уровней подготовки */
.skill-level-container {
    margin-top: 10px;
}

.skill-level-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.skill-level-item {
    position: relative;
}

.skill-level-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.skill-level-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 60px;
    justify-content: center;
}

.skill-level-label:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateY(-1px);
}

.skill-level-item input[type="checkbox"]:checked + .skill-level-label {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.skill-emoji {
    font-size: 20px;
    margin-bottom: 4px;
    display: block;
}

.skill-text {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
}

/* Мобильные стили для уровней подготовки */
@media (max-width: 768px) {
    .skill-level-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .skill-level-label {
        padding: 10px 6px;
        min-height: 55px;
    }
    
    .skill-emoji {
        font-size: 18px;
    }
    
    .skill-text {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .skill-level-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 4px;
    }
    
    .skill-level-label {
        padding: 8px 4px;
        min-height: 50px;
    }
    
    .skill-emoji {
        font-size: 16px;
    }
    
    .skill-text {
        font-size: 10px;
    }
}

/* Плавающие элементы управления */
.floating-controls {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1000;
}

.floating-controls > * {
    pointer-events: auto;
}

/* Кнопка фильтров */
.filter-toggle {
    position: absolute;
    top: 100px;
    left: 20px;
}

.btn-filter {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border: 2px solid #667eea;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.btn-filter:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

/* Панель фильтров */
.filter-panel {
    position: absolute;
    top: 60px;
    left: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(15px);
    padding: 20px;
    min-width: 300px;
    max-width: 350px;
    max-height: 70vh;
    overflow-y: auto;
    display: none;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.filter-panel.active,
.filter-panel.show {
    display: block;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-content h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.2em;
    text-align: center;
}

/* Кнопка добавления события */
/* Круглая кнопка добавления события */
.btn-add-circle {
    position: absolute;
    bottom: 120px;
    right: 10px;
    width: 34px;
    height: 34px;
    background: white;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    color: #667eea;
    z-index: 400;
    transition: all 0.2s ease;
    padding: 0;
}

.btn-add-circle:hover {
    background: #667eea;
    color: white;
    border-color: rgba(0, 0, 0, 0.3);
}

.btn-add-circle:active {
    transform: scale(0.95);
}

/* Кнопка поиска */
.btn-search-circle {
    position: absolute;
    bottom: 200px;
    right: 10px;
    width: 34px;
    height: 34px;
    background: white;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: #667eea;
    z-index: 400;
    transition: all 0.2s ease;
    padding: 0;
}

.btn-search-circle:hover {
    background: #667eea;
    color: white;
    border-color: rgba(0, 0, 0, 0.3);
}

.btn-search-circle:active {
    transform: scale(0.95);
}

/* Панель поиска */
.search-panel {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 100px);
    max-width: 400px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    padding: 10px;
    z-index: 1000;
    display: flex;
    gap: 10px;
}

.search-panel input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px 15px;
    font-size: 14px;
    outline: none;
}

.search-panel input:focus {
    border-color: #667eea;
}

.search-close-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s ease;
}

.search-close-btn:hover {
    background: #ff5252;
}

/* Панель событий */
.events-panel {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(102, 126, 234, 0.2);
    overflow: hidden;
    transition: all 0.3s ease;
}

.events-panel.collapsed {
    max-height: 60px;
    overflow: hidden;
}

.events-panel.collapsed .events-content {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: all 0.3s ease;
}

.events-panel.collapsed .events-header {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
}

.events-panel.collapsed .events-header h3 {
    margin: 0;
    text-align: center;
}

.events-content {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.events-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(102, 126, 234, 0.1);
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
}

.events-header h3 {
    color: #333;
    font-size: 1.1em;
    margin: 0;
}

.btn-toggle {
    background: none;
    border: none;
    font-size: 1.2em;
    color: #667eea;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.btn-toggle:hover {
    background: rgba(102, 126, 234, 0.1);
}

.events-content {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
}

.events-content.collapsed {
    display: none;
}

/* Фильтры */
.filter-group {
    margin-bottom: 20px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.9em;
}

.sport-filters, .skill-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sport-filter, .skill-filter {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    padding: 8px 16px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85em;
    font-weight: 500;
    user-select: none;
}

.sport-filter:hover, .skill-filter:hover {
    background: #e9ecef;
    border-color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.sport-filter.active, .skill-filter.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Фильтр по времени */
.filter-group select {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9em;
    background: white;
    transition: border-color 0.3s ease;
}

.filter-group select:focus {
    outline: none;
    border-color: #667eea;
}

/* Слайдер */
.slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
}

#radiusValue {
    display: block;
    text-align: center;
    margin-top: 10px;
    font-weight: 600;
    color: #667eea;
}

/* Кнопки */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
    margin-bottom: 20px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

/* Список событий */
.events-list {
    margin-top: 20px;
}

.events-list h3 {
    margin-bottom: 15px;
    color: #333;
}

.event-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.event-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.event-sport {
    font-weight: 600;
    color: #667eea;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.event-time {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.event-location {
    color: #888;
    font-size: 0.85em;
}

/* Карта */
.map-container {
    flex: 1;
    position: relative;
}

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

/* Информационная панель */
.info-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    max-width: 300px;
    z-index: 1000;
}

.info-content h4 {
    color: #333;
    margin-bottom: 5px;
}

.info-content p {
    color: #666;
    font-size: 0.9em;
}

/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    overflow-y: auto;
}

.modal.active {
    display: block;
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 12px;
    width: 95%;
    max-width: 600px;
    max-height: 90vh;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
    overflow: hidden;
}

/* Контейнер формы с прокруткой */
.form-container {
    max-height: 70vh;
    overflow-y: auto;
    padding: 0 20px 20px 20px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #333;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

/* Формы */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.coordinates {
    display: flex;
    gap: 10px;
}

.coordinates input {
    flex: 1;
}

/* Стили для чекбоксов уровня подготовки */
.skill-level-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
    font-weight: 500;
}

.checkbox-label:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.1);
}

.checkbox-label input[type="checkbox"]:checked + span,
.checkbox-label:has(input[type="checkbox"]:checked) {
    background: #667eea;
    color: white;
    border-color: #5a6fd8;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 30px;
}

/* Мобильные стили */
@media (max-width: 768px) {
    body {
        font-size: 14px;
        -webkit-text-size-adjust: 100%;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Заголовок остается поверх карты */
    .header {
        position: absolute !important;
        top: 20px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 1000 !important;
        text-align: center !important;
        pointer-events: none !important;
        padding: 0 20px !important;
    }
    
    .header h1 {
        font-size: 1.4em;
        margin-bottom: 3px;
    }
    
    .header p {
        font-size: 0.8em;
    }
    
    /* Кнопка фильтров остается поверх карты */
    .filter-toggle {
        position: absolute !important;
        top: 100px !important;
        left: 20px !important;
        z-index: 1000 !important;
    }
    
    .btn-filter {
        padding: 10px 16px;
        font-size: 0.9em;
        border-radius: 20px;
    }
    
    /* Панель фильтров */
    .filter-panel {
        top: 60px;
        left: 0;
        right: 0;
        min-width: auto;
        max-width: none;
        margin: 0 15px;
        max-height: 60vh;
        border-radius: 12px;
    }
    
    /* Кнопка добавления события */
    .btn-add-circle {
        bottom: 90px !important;
        right: 10px !important;
    }
    
    /* Панель событий */
    .events-panel {
        bottom: 15px;
        left: 15px;
        right: 15px;
        max-width: none;
        border-radius: 12px;
    }
    
    .events-header {
        padding: 12px 15px;
    }
    
    .events-header h3 {
        font-size: 1em;
    }
    
    .events-content {
        max-height: 250px;
        padding: 8px;
    }
    
    /* Модальные окна */
    .modal-content {
        margin: 5% auto;
        width: 95%;
        max-height: 85vh;
        border-radius: 10px;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-header h3 {
        font-size: 1.1em;
    }
    
    .form-container {
        max-height: 60vh;
        padding: 0 15px 15px 15px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group label {
        font-size: 0.9em;
        margin-bottom: 6px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px;
        font-size: 0.9em;
        border-radius: 6px;
    }
    
    .coordinates {
        flex-direction: column;
        gap: 8px;
    }
    
    /* Чекбоксы уровня подготовки */
    .skill-level-filters {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 6px;
    }
    
    .checkbox-label {
        padding: 6px 8px;
        font-size: 0.8em;
        border-radius: 6px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 8px;
        margin-top: 20px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 0.9em;
        border-radius: 8px;
    }
    
    /* События */
    .event-item {
        padding: 12px;
        margin-bottom: 8px;
        border-radius: 6px;
    }
    
    .event-sport {
        font-size: 1em;
        margin-bottom: 4px;
    }
    
    .event-time {
        font-size: 0.8em;
        margin-bottom: 4px;
    }
    
    .event-location {
        font-size: 0.75em;
    }
    
    /* Фильтры */
    .sport-filters, .skill-filters {
        gap: 4px;
    }
    
    .sport-filter, .skill-filter {
        padding: 4px 8px;
        font-size: 0.75em;
        border-radius: 12px;
    }
    
    .filter-group select {
        padding: 6px 10px;
        font-size: 0.85em;
    }
    
    /* Слайдер */
    .slider {
        height: 8px;
    }
    
    .slider::-webkit-slider-thumb {
        width: 24px;
        height: 24px;
    }
    
    .slider::-moz-range-thumb {
        width: 24px;
        height: 24px;
    }
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
    .header {
        top: 15px !important;
        padding: 0 15px !important;
    }
    
    .header h1 {
        font-size: 1.2em;
    }
    
    .header p {
        font-size: 0.75em;
    }
    
    .filter-toggle {
        top: 80px !important;
        left: 15px !important;
    }
    
    .btn-add-circle {
        bottom: 80px !important;
        right: 10px !important;
    }
    
    .events-panel {
        bottom: 10px;
        left: 10px;
        right: 10px;
    }
    
    .filter-panel {
        margin: 0 10px;
    }
    
    .modal-content {
        margin: 2% auto;
        width: 98%;
    }
    
    .skill-level-filters {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    }
}

/* Портретная ориентация */
@media (max-width: 768px) and (orientation: portrait) {
    .events-panel {
        max-height: 40vh;
    }
    
    .events-content {
        max-height: 200px;
    }
}

/* Альбомная ориентация */
@media (max-width: 1024px) and (orientation: landscape) {
    .header {
        top: 5px !important;
    }
    
    .header h1 {
        font-size: 1.2em;
    }
    
    .header p {
        font-size: 0.7em;
    }
    
    .filter-toggle {
        top: 60px !important;
    }
    
    .btn-add-circle {
        bottom: 75px !important;
        right: 10px !important;
    }
    
    .events-panel {
        bottom: 10px;
        max-height: 50vh;
    }
    
    .events-content {
        max-height: 150px;
    }
}

/* Кастомные маркеры для карты */
.custom-marker {
    background: #667eea;
    border: 3px solid white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.custom-marker:hover {
    background: #5a6fd8;
    transform: scale(1.2);
}

/* Анимации загрузки */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Мобильные уведомления */
.mobile-location-message {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.message-content {
    background: white;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    max-width: 350px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.message-content h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.message-content p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.4;
}

.message-content .btn {
    margin: 5px;
    min-width: 100px;
}

.mobile-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: #333;
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 0.9em;
    z-index: 2500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.mobile-notification.show {
    transform: translateX(-50%) translateY(0);
}

.mobile-notification.success {
    background: #4CAF50;
}

.mobile-notification.error {
    background: #f44336;
}

.mobile-notification.warning {
    background: #ff9800;
}

/* Мобильные устройства - дополнительные стили */
.mobile-device {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

    .mobile-device .btn {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    /* Мобильные стили для поиска */
    .search-control {
        right: 15px;
        gap: 6px;
    }
    
    #searchInput {
        width: 150px;
        font-size: 16px; /* Предотвращает зум на iOS */
        padding: 8px 10px;
    }
    
    #searchBtn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    /* Мобильные стили для сообщения о выборе места */
    .location-message {
        margin: 0 20px;
        max-width: calc(100vw - 40px);
        padding: 15px;
    }
    
    .location-message h3 {
        font-size: 1.1em;
    }
    
    .location-message p {
        font-size: 0.85em;
    }

.mobile-device .sport-filter,
.mobile-device .skill-filter {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Улучшения для сенсорного управления */
@media (max-width: 768px) {
    .btn, .sport-filter, .skill-filter, .event-item {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .checkbox-label {
        min-height: 44px;
    }
    
    /* Адаптивные стили для кнопок управления картой */
    .map-controls {
        right: 15px;
        gap: 6px;
    }
    
    .map-control {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    
    #zoomInBtn, #zoomOutBtn {
        font-size: 22px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        min-height: 44px;
    }
    
    .slider {
        min-height: 44px;
        padding: 20px 0;
    }
}

/* =============================
   Стили для модальных окон заявок и чатов
   ============================= */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: #495057;
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #e9ecef;
    color: #495057;
}

.modal-body {
    padding: 24px;
}

/* Стили для заявок */
.application-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    background: #f8f9fa;
    transition: all 0.2s ease;
}

.application-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.application-info {
    margin-bottom: 12px;
}

.application-info div {
    margin-bottom: 4px;
    font-size: 14px;
}

.user-info {
    font-weight: 600;
    color: #495057;
}

.skill-level {
    color: #6c757d;
}

.applied-time {
    color: #6c757d;
    font-size: 12px;
}

.application-actions {
    display: flex;
    gap: 8px;
}

.btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

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

/* Стили для чата */
.chat-modal .modal-content {
    max-width: 800px;
}

.chat-participants {
    margin-bottom: 20px;
}

.chat-participants h4 {
    margin: 0 0 12px 0;
    color: #495057;
    font-size: 16px;
}

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

.participant {
    background: #e9ecef;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 14px;
    color: #495057;
}

.chat-messages {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    background: #f8f9fa;
}

.chat-messages h4 {
    margin: 0 0 16px 0;
    color: #495057;
    font-size: 16px;
}

.messages-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.message {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e9ecef;
}

.message:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

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

.message-user {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.message-time {
    color: #6c757d;
    font-size: 12px;
}

.message-text {
    color: #495057;
    font-size: 14px;
    line-height: 1.4;
}

.no-messages {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 20px;
}

.chat-input {
    display: flex;
    gap: 8px;
}

.chat-input input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
}

.chat-input input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.25);
}

.chat-input button {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.chat-input button:hover {
    background: #5a6fd8;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .modal-content {
        margin: 10px;
        max-height: 90vh;
    }
    
    .modal-header {
        padding: 16px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .application-actions {
        flex-direction: column;
    }
    
    .chat-input {
        flex-direction: column;
    }
    
    .chat-input input,
    .chat-input button {
        width: 100%;
    }
    
    .messages-list {
        max-height: 200px;
    }
}

/* Стили для статуса авторизации */
.auth-status {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    margin: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.auth-loading {
    text-align: center;
    padding: 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.auth-error {
    text-align: center;
    padding: 20px;
}

.qr-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin: 10px 0;
}

.qr-container h3 {
    margin: 0 0 20px 0;
    font-size: 1.2em;
    color: white;
}

.qr-code {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.bot-link {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.bot-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.auth-success {
    text-align: center;
    padding: 20px;
}

.user-info {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
}

.user-info h3 {
    margin: 0 0 10px 0;
    color: white;
    font-size: 1.2em;
}

.user-info p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
}

/* Скрытие основного контента при загрузке */
.loading .map-container,
.loading .floating-controls,
.loading .event-popup {
    opacity: 0.3;
    pointer-events: none;
}

/* Значок авторизации */
.auth-badge {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1001;
}

.badge-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: transform 0.2s ease;
}

.badge-icon:hover {
    transform: scale(1.1);
}

.badge-icon span {
    font-size: 24px;
}

.badge-info {
    position: absolute;
    top: 60px;
    right: 0;
    background: white;
    border-radius: 12px;
    padding: 15px;
    min-width: 250px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.badge-content p {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 14px;
}

.badge-bot-link {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    transition: opacity 0.2s ease;
}

.badge-bot-link:hover {
    opacity: 0.9;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .auth-badge {
        top: 70px;
        right: 10px;
    }
    
    .badge-icon {
        width: 45px;
        height: 45px;
    }
    
    .badge-icon span {
        font-size: 20px;
    }
    
    .badge-info {
        min-width: 220px;
    }
}


