* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0c2461 0%, #1e3799 100%);
    color: white;
    overflow-x: hidden;
    width: 100vw;
    height: 100vh;
}

/* Экраны */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    background: linear-gradient(135deg, #0c2461 0%, #1e3799 100%);
}

.screen.active {
    display: flex;
}

/* Загрузочный экран */
#loader {
    background: linear-gradient(135deg, #0c2461 0%, #1e3799 100%);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.loader-content {
    text-align: center;
}

.spinner {
    width: 60px;
    height: 60px;
    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 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-content p {
    font-size: 20px;
    opacity: 0.9;
}

/* Шапка */
.header {
    text-align: center;
    padding: 25px 20px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    z-index: 10;
}

.header h1 {
    font-size: 2.2em;
    margin-bottom: 8px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
    background: linear-gradient(45deg, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header p {
    font-size: 1.1em;
    opacity: 0.9;
}

/* Кнопка назад */
.back-btn {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    border: none;
    outline: none;
    backdrop-filter: blur(10px);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) translateX(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Контейнер карты */
.map-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.map-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(74, 144, 226, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(106, 76, 147, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(65, 105, 225, 0.2) 0%, transparent 50%);
    background-color: #0f2a5f;
}

.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, transparent 98%, rgba(255,255,255,0.1) 100%),
        linear-gradient(0deg, transparent 98%, rgba(255,255,255,0.1) 100%);
    background-size: 50px 50px;
    opacity: 0.3;
}

/* Точки на карте */
.village-points {
    position: relative;
    width: 80%;
    height: 80%;
    max-width: 900px;
    max-height: 600px;
}

.village-point {
    position: absolute;
    width: 60px;
    height: 60px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.3));
}

.village-point:hover {
    transform: scale(1.2);
    filter: drop-shadow(0 8px 25px rgba(255,255,255,0.4));
}

.point-pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    70% {
        transform: scale(1.8);
        opacity: 0;
    }
    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

.point-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, #ff6b6b, #ffa726);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    z-index: 2;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.point-label {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
}

.village-point:hover .point-label {
    opacity: 1;
    transform: translateX(-50%) translateY(5px);
}

/* Легенда карты */
.map-legend {
    position: absolute;
    bottom: 30px;
    left: 30px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.legend-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid white;
}

.village-icon {
    background: linear-gradient(45deg, #ff6b6b, #ffa726);
}

.object-icon {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
}

/* Сетка объектов */
.objects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 25px;
    padding: 30px;
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.object-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.object-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.6s;
}

.object-card:hover::before {
    left: 100%;
}

.object-card:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    border-color: rgba(255,255,255,0.3);
}

.object-preview {
    width: 100%;
    height: 180px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    border: 2px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.object-card:hover .object-preview {
    border-color: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

.object-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.object-card h3 {
    font-size: 1.4em;
    margin-bottom: 12px;
    background: linear-gradient(45deg, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.object-card p {
    opacity: 0.8;
    line-height: 1.5;
    font-size: 0.95em;
}

/* Экран объекта */
#objectScreen {
    background: #0c1a3a;
}

.object-header {
    display: flex;
    align-items: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    min-height: 100px;
}

.object-info {
    text-align: center;
    flex: 1;
    margin: 0 100px;
}

.object-info h1 {
    font-size: 2.2em;
    margin-bottom: 8px;
    background: linear-gradient(45deg, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.object-info p {
    font-size: 1.1em;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

.object-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.control-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    padding: 10px 18px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    outline: none;
    backdrop-filter: blur(10px);
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Контейнер 3D */
#canvasContainer {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #0c1a3a;
}

#canvasContainer canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.view-hint {
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 14px;
    opacity: 0.8;
    backdrop-filter: blur(10px);
}

/* Анимации перехода */
.screen {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.screen.active {
    opacity: 1;
    transform: translateY(0);
    overflow: auto;
}

/* Адаптивность */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8em;
    }
    
    .village-point {
        width: 50px;
        height: 50px;
    }
    
    .point-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .map-legend {
        bottom: 15px;
        left: 15px;
        right: 15px;
        flex-direction: column;
        gap: 10px;
    }
    
    .objects-grid {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 20px;
    }
    
    .object-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .object-info {
        margin: 0;
    }
    
    .object-controls {
        position: static;
        justify-content: center;
    }
    
    .back-btn {
        position: static;
        transform: none;
        align-self: flex-start;
        margin-bottom: 10px;
    }
}

/* Исправления для кликабельности */
.village-point {
    z-index: 5;
}

.village-point * {
    pointer-events: none;
}

.village-point {
    pointer-events: auto;
}

/* Улучшение видимости лейблов */
.point-label {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 6;
}

/* Добавляем эти стили в конец файла styles.css */

/* Улучшенная легенда карты */
.map-legend {
    position: absolute;
    bottom: 30px;
    left: 30px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 300px;
    max-height: 400px;
    overflow-y: auto;
}

.legend-main {
    display: flex;
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.legend-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid white;
}

.village-icon {
    background: linear-gradient(45deg, #ff6b6b, #ffa726);
}

.object-icon {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
}

/* Список сёл в легенде */
.villages-list {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 15px;
}

.villages-list h4 {
    margin-bottom: 10px;
    font-size: 14px;
    opacity: 0.9;
}

.legend-village-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 12px;
}

.legend-number {
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.legend-name {
    opacity: 0.9;
}

/* Улучшенные лейблы точек */
.point-label {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-align: center;
    min-width: 120px;
    z-index: 6;
    pointer-events: none;
}

.point-label strong {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
}

.point-label small {
    opacity: 0.8;
    font-weight: normal;
}

.point-number {
    font-weight: bold;
    font-size: 14px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Адаптивность для легенды */
@media (max-width: 768px) {
    .map-legend {
        bottom: 15px;
        left: 15px;
        right: 15px;
        max-width: none;
        max-height: 200px;
    }
    
    .legend-main {
        flex-direction: column;
        gap: 10px;
    }
    
    .villages-list {
        display: none; /* На мобильных скрываем полный список */
    }
}

/* Полоса прокрутки для легенды */
.map-legend::-webkit-scrollbar {
    width: 6px;
}

.map-legend::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.map-legend::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.map-legend::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Добавляем эти стили в конец файла */

/* Контур Агинского района */
.district-outline {
    position: absolute;
    top: 10%;
    left: 15%;
    width: 70%;
    height: 80%;
    /* border: 2px solid rgba(255, 255, 255, 0.3); */
    border-radius: 20px;
    /* background: rgba(255, 255, 255, 0.05); */
    /* backdrop-filter: blur(10px); */
}

.district-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
}

.district-name {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    padding: 8px 20px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    white-space: nowrap;
}

/* Улучшенные карточки объектов */
.object-icon-large {
    font-size: 48px;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.object-type {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    margin-top: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.object-location {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.object-location small {
    opacity: 0.7;
    font-size: 11px;
}

/* Сообщение об отсутствии объектов */
.no-objects {
    text-align: center;
    padding: 60px 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    grid-column: 1 / -1;
}

.no-objects-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.7;
}

.no-objects h3 {
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.9);
}

.no-objects p {
    opacity: 0.7;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
}

/* Улучшенная легенда */
.legend-village-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    font-size: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.legend-village-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

/* Адаптивность для карты района */
@media (max-width: 768px) {
    .district-outline {
        top: 15%;
        left: 10%;
        width: 80%;
        height: 70%;
    }
    
    .district-name {
        top: -25px;
        font-size: 12px;
        padding: 6px 15px;
    }
}

/* Улучшенные точки на карте */
.village-point {
    z-index: 10;
}

.point-label {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

/* Плавные переходы для всех интерактивных элементов */
.village-point,
.object-card,
.legend-village-item,
.back-btn,
.control-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Улучшенный скроллбар */
.map-legend::-webkit-scrollbar {
    width: 8px;
}

.map-legend::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.map-legend::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.map-legend::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Анимация появления карты */
.map-background {
    animation: mapReveal 2s ease-out;
    background-image: url('image.png');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}

@keyframes mapReveal {
    0% {
        opacity: 0;
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Добавляем в конец файла */

/* Карта объектов в селе */
.village-map-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    margin: 20px;
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.village-map-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.8;
}

.village-map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(12, 36, 97, 0.4) 0%, 
        rgba(30, 55, 153, 0.6) 100%);
}

.village-objects-points {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Точки объектов на карте села */
.object-point {
    position: absolute;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.4));
    z-index: 10;
}

.object-point:hover {
    transform: scale(1.3);
    filter: drop-shadow(0 8px 25px rgba(255, 255, 255, 0.5));
}

.object-point-pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    animation: objectPulse 2s infinite;
}

@keyframes objectPulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    70% {
        transform: scale(1.6);
        opacity: 0;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

.object-point-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    z-index: 2;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.object-point-label {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    padding: 10px 15px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    min-width: 120px;
    text-align: center;
    pointer-events: none;
    z-index: 11;
}

.object-point:hover .object-point-label {
    opacity: 1;
    transform: translateX(-50%) translateY(5px);
}

/* Положение карты объектов */
.village-screen-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.village-map-legend {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 5;
}

.map-switcher {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 15px;
    z-index: 5;
}

.map-switch-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.map-switch-btn.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.map-switch-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Адаптивность для карты объектов */
@media (max-width: 768px) {
    .village-map-container {
        margin: 10px;
        border-radius: 15px;
    }
    
    .object-point {
        width: 40px;
        height: 40px;
    }
    
    .object-point-icon {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .village-map-legend {
        bottom: 10px;
        left: 10px;
        right: 10px;
        flex-direction: row;
        justify-content: space-around;
    }
    
    .map-switcher {
        margin: 10px;
    }
}   

/* Кнопка авторства */
.authors-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
    z-index: 100;
}

.authors-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: linear-gradient(135deg, #0c2461 0%, #1e3799 100%);
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-content h2 {
    text-align: center;
    margin-bottom: 25px;
    background: linear-gradient(45deg, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 24px;
}

.authors-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.authors-group,
.authors-lead,
.project-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.authors-info h3 {
    margin-bottom: 10px;
    font-size: 16px;
    color: #a5b4fc;
}

.authors-info p {
    margin: 8px 0;
    line-height: 1.5;
    opacity: 0.9;
}

.authors-group p:first-of-type {
    font-weight: 600;
    color: white;
}

.project-info p {
    font-style: italic;
    opacity: 0.8;
}

/* Адаптивность модального окна */
@media (max-width: 768px) {
    .authors-btn {
        bottom: 10px;
        right: 10px;
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .modal-content {
        padding: 20px;
        margin: 15px;
    }
    
    .modal-content h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .authors-group,
    .authors-lead,
    .project-info {
        padding: 15px;
    }
}