/* ========================================
   ОСНОВНЫЕ СТИЛИ ИНТЕРФЕЙСА - PREMIUM
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    background: #0a0a0a;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background 0.6s ease;
}

/* Темный теплый фон с легким grain эффектом */
body {
    background: #0e1116;
    transition: background 0.6s ease;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.04;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="2" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23n)"/></svg>');
}

/* Режим ночи для всей страницы */
body.night-mode {
    background: #0e1116;
}

/* Загрузочный экран - с пульсирующим прогресс-баром */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #0e1116;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
    opacity: 1;
    transition: opacity 0.6s ease;
}

.loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-container {
    text-align: center;
}

.loading-title {
    font-size: 18px;
    font-weight: 300;
    color: #ffffff;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 24px;
    opacity: 0.9;
}

.loading-progress {
    width: 200px;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
    margin: 0 auto;
}

.loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    width: 0%;
    transition: width 0.3s ease;
}

/* Пульсация прогресс-бара после заполнения */
@keyframes progressPulse {
    0%, 100% {
        opacity: 0.5;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    }
    50% {
        opacity: 1;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    }
}

.loading-progress-bar.pulsing {
    animation: progressPulse 1.5s ease-in-out infinite;
}

/* ========================================
   ОСНОВНОЙ КОНТЕНТ
   ======================================== */

#main-content {
    opacity: 0;
    visibility: hidden;
    transition: all 0.6s ease;
}

#main-content.loaded {
    opacity: 1;
    visibility: visible;
}

#body_frame {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

#centrer1 {
    position: absolute;
    background: center/cover no-repeat;
    transition: all 0.6s ease-in-out, filter 0.6s ease;
}

body.night-mode #centrer1 {
    transition: all 0.6s ease-in-out;
}

.resizable {
    position: absolute;
}

/* ========================================
   SVG ОБЛАСТИ ЗДАНИЙ - С НЕОНОВОЙ ПОДСВЕТКОЙ
   ======================================== */

.buildings-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.buildings-svg * {
    pointer-events: auto;
}

.building-area {
    transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    cursor: pointer;
    opacity: 0;
    fill: transparent;
    stroke: none;
    stroke-width: 0;
    filter: drop-shadow(0 0 0px transparent);
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    outline: none;
}

/* Неоновая подсветка с 5 слоями и максимальным радиусом 40px */
.building-area[data-building="A"].highlight {
    opacity: 1;
    fill: rgba(181, 105, 62, 0.02);
    stroke: rgba(181, 105, 62, 0.8);
    stroke-width: 2px;
    filter: drop-shadow(0 0 2px rgba(181, 105, 62, 0.9))
            drop-shadow(0 0 5px rgba(181, 105, 62, 0.7))
            drop-shadow(0 0 10px rgba(181, 105, 62, 0.5))
            drop-shadow(0 0 20px rgba(181, 105, 62, 0.3))
            drop-shadow(0 0 40px rgba(181, 105, 62, 0.2));
    animation: neonPulseA 3s ease-in-out infinite;
}

.building-area[data-building="B"].highlight {
    opacity: 1;
    fill: rgba(212, 180, 131, 0.05);  /* Прозрачная заливка сохранена */
    stroke: rgba(212, 180, 131, 0.8);
    stroke-width: 2px;
    filter: drop-shadow(0 0 3px rgba(212, 180, 131, 0.9))
            drop-shadow(0 0 12px rgba(212, 180, 131, 0.5))
            drop-shadow(0 0 30px rgba(212, 180, 131, 0.25));
    animation: neonPulseB 3s ease-in-out infinite;
    will-change: filter;
    transform: translateZ(0);
}

.building-area[data-building="C"].highlight {
    opacity: 1;
    fill: rgba(212, 163, 115, 0.02);
    stroke: rgba(212, 163, 115, 0.8);
    stroke-width: 2px;
    filter: drop-shadow(0 0 2px rgba(212, 163, 115, 0.9))
            drop-shadow(0 0 5px rgba(212, 163, 115, 0.7))
            drop-shadow(0 0 10px rgba(212, 163, 115, 0.5))
            drop-shadow(0 0 20px rgba(212, 163, 115, 0.3))
            drop-shadow(0 0 40px rgba(212, 163, 115, 0.2));
    animation: neonPulseC 3s ease-in-out infinite;
}

.building-area[data-building="D"].highlight {
    opacity: 1;
    fill: rgba(227, 197, 143, 0.02);
    stroke: rgba(227, 197, 143, 0.8);
    stroke-width: 2px;
    filter: drop-shadow(0 0 2px rgba(227, 197, 143, 0.9))
            drop-shadow(0 0 5px rgba(227, 197, 143, 0.7))
            drop-shadow(0 0 10px rgba(227, 197, 143, 0.5))
            drop-shadow(0 0 20px rgba(227, 197, 143, 0.3))
            drop-shadow(0 0 40px rgba(227, 197, 143, 0.2));
    animation: neonPulseD 3s ease-in-out infinite;
}

/* Анимации неонового пульсирования */
@keyframes neonPulseA {
    0%, 100% {
        filter: drop-shadow(0 0 2px rgba(181, 105, 62, 0.9))
                drop-shadow(0 0 5px rgba(181, 105, 62, 0.7))
                drop-shadow(0 0 10px rgba(181, 105, 62, 0.5))
                drop-shadow(0 0 20px rgba(181, 105, 62, 0.3))
                drop-shadow(0 0 40px rgba(181, 105, 62, 0.2));
    }
    50% {
        filter: drop-shadow(0 0 3px rgba(181, 105, 62, 1))
                drop-shadow(0 0 7px rgba(181, 105, 62, 0.8))
                drop-shadow(0 0 15px rgba(181, 105, 62, 0.6))
                drop-shadow(0 0 25px rgba(181, 105, 62, 0.4))
                drop-shadow(0 0 40px rgba(181, 105, 62, 0.3));
    }
}

@keyframes neonPulseB {
    0%, 100% {
        filter: drop-shadow(0 0 3px rgba(212, 180, 131, 0.9))
                drop-shadow(0 0 12px rgba(212, 180, 131, 0.5))
                drop-shadow(0 0 30px rgba(212, 180, 131, 0.25));
    }
    50% {
        filter: drop-shadow(0 0 4px rgba(212, 180, 131, 1))
                drop-shadow(0 0 15px rgba(212, 180, 131, 0.6))
                drop-shadow(0 0 35px rgba(212, 180, 131, 0.3));
    }
}

@keyframes neonPulseC {
    0%, 100% {
        filter: drop-shadow(0 0 2px rgba(212, 163, 115, 0.9))
                drop-shadow(0 0 5px rgba(212, 163, 115, 0.7))
                drop-shadow(0 0 10px rgba(212, 163, 115, 0.5))
                drop-shadow(0 0 20px rgba(212, 163, 115, 0.3))
                drop-shadow(0 0 40px rgba(212, 163, 115, 0.2));
    }
    50% {
        filter: drop-shadow(0 0 3px rgba(212, 163, 115, 1))
                drop-shadow(0 0 7px rgba(212, 163, 115, 0.8))
                drop-shadow(0 0 15px rgba(212, 163, 115, 0.6))
                drop-shadow(0 0 25px rgba(212, 163, 115, 0.4))
                drop-shadow(0 0 40px rgba(212, 163, 115, 0.3));
    }
}

@keyframes neonPulseD {
    0%, 100% {
        filter: drop-shadow(0 0 2px rgba(208, 155, 62, 0.9))
                drop-shadow(0 0 5px rgba(208, 155, 62, 0.7))
                drop-shadow(0 0 10px rgba(208, 155, 62, 0.5))
                drop-shadow(0 0 20px rgba(208, 155, 62, 0.3))
                drop-shadow(0 0 40px rgba(208, 155, 62, 0.2));
    }
    50% {
        filter: drop-shadow(0 0 3px rgba(208, 155, 62, 1))
                drop-shadow(0 0 7px rgba(208, 155, 62, 0.8))
                drop-shadow(0 0 15px rgba(208, 155, 62, 0.6))
                drop-shadow(0 0 25px rgba(208, 155, 62, 0.4))
                drop-shadow(0 0 40px rgba(208, 155, 62, 0.3));
    }
}

/* Ночной режим - такие же параметры */
body.night-mode .building-area[data-building="A"].highlight {
    fill: rgba(181, 105, 62, 0.02);
    stroke: rgba(181, 105, 62, 0.8);
    stroke-width: 2px;
    filter: drop-shadow(0 0 2px rgba(181, 105, 62, 0.9))
            drop-shadow(0 0 5px rgba(181, 105, 62, 0.7))
            drop-shadow(0 0 10px rgba(181, 105, 62, 0.5))
            drop-shadow(0 0 20px rgba(181, 105, 62, 0.3))
            drop-shadow(0 0 40px rgba(181, 105, 62, 0.2));
}

body.night-mode .building-area[data-building="B"].highlight {
    opacity: 1;
    fill: rgba(212, 180, 131, 0.05);  /* Прозрачная заливка сохранена */
    stroke: rgba(212, 180, 131, 0.8);
    stroke-width: 2px;
    filter: drop-shadow(0 0 3px rgba(212, 180, 131, 0.9))
            drop-shadow(0 0 12px rgba(212, 180, 131, 0.5))
            drop-shadow(0 0 30px rgba(212, 180, 131, 0.25));
}

body.night-mode .building-area[data-building="C"].highlight {
    fill: rgba(212, 163, 115, 0.02);
    stroke: rgba(212, 163, 115, 0.8);
    stroke-width: 2px;
    filter: drop-shadow(0 0 2px rgba(212, 163, 115, 0.9))
            drop-shadow(0 0 5px rgba(212, 163, 115, 0.7))
            drop-shadow(0 0 10px rgba(212, 163, 115, 0.5))
            drop-shadow(0 0 20px rgba(212, 163, 115, 0.3))
            drop-shadow(0 0 40px rgba(212, 163, 115, 0.2));
}

body.night-mode .building-area[data-building="D"].highlight {
    fill: rgba(208, 155, 62, 0.02);
    stroke: rgba(208, 155, 62, 0.8);
    stroke-width: 2px;
    filter: drop-shadow(0 0 2px rgba(208, 155, 62, 0.9))
            drop-shadow(0 0 5px rgba(208, 155, 62, 0.7))
            drop-shadow(0 0 10px rgba(208, 155, 62, 0.5))
            drop-shadow(0 0 20px rgba(208, 155, 62, 0.3))
            drop-shadow(0 0 40px rgba(208, 155, 62, 0.2));
}

.building-area:hover {
    filter: brightness(1.3) saturate(1.3);
}

/* ========================================
   ПЕРЕКЛЮЧАТЕЛЬ ДЕНЬ/НОЧЬ - ИСПРАВЛЕННЫЙ
   ======================================== */

.day-night-toggle {
    position: fixed;
    top: 20px;
    right: 40px;
    z-index: 1500;
    width: 72px;
    height: 36px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-radius: 36px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.day-night-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.day-night-toggle.night-mode {
    background: linear-gradient(135deg, rgba(20, 20, 35, 0.4) 0%, rgba(40, 40, 70, 0.3) 100%);
    border-color: rgba(100, 120, 255, 0.15);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(100, 120, 255, 0.05);
}

.toggle-slider {
    position: absolute;
    top: 50%;
    left: 4px;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform: translateY(-50%);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* ИСПРАВЛЕНИЕ: правильный отступ в ночном режиме */
.day-night-toggle.night-mode .toggle-slider {
    transform: translateX(36px) translateY(-50%);
    left: 4px;
    background: linear-gradient(135deg, #2a2a3e 0%, #1e1e2e 100%);
}

/* Минималистичное солнце - SVG с лучами */
.sun-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    opacity: 1;
    transition: all 0.4s ease;
}

.day-night-toggle.night-mode .sun-icon {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(180deg) scale(0.5);
}

.sun-icon svg {
    width: 100%;
    height: 100%;
    animation: sunRotation 30s linear infinite;
}

.sun-icon svg circle {
    fill: #FFC107;
}

.sun-icon svg line {
    stroke: #FFC107;
    stroke-width: 2;
    stroke-linecap: round;
}

@keyframes sunRotation {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Минималистичная луна */
.moon-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-180deg) scale(0.5);
    width: 14px;
    height: 14px;
    opacity: 0;
    transition: all 0.4s ease;
}

.day-night-toggle.night-mode .moon-icon {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
}

.moon-icon svg {
    width: 100%;
    height: 100%;
    fill: #b8b8d0;
}

/* Фоновый градиент для индикации состояния */
.toggle-bg-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 36px;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.toggle-bg-gradient.day {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 165, 0, 0.05) 100%);
}

.toggle-bg-gradient.night {
    background: linear-gradient(90deg, rgba(100, 120, 255, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
}

.day-night-toggle:not(.night-mode) .toggle-bg-gradient.day {
    opacity: 1;
}

.day-night-toggle.night-mode .toggle-bg-gradient.night {
    opacity: 1;
}

.building-point {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    z-index: 100;
    
    /* Усиленный стеклянный эффект с градиентом */
    background: linear-gradient(
        135deg,
        rgba(146, 168, 154, 0.65),  /* Увеличена непрозрачность */
        rgba(134, 156, 142, 0.45)
    );
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    
    /* Зеленоватая рамка */
    border: 1.5px solid rgba(146, 168, 154, 0.5);
    
    /* Обновленные тени с зеленым оттенком */
    box-shadow: 
        0 0 0 1px rgba(146, 168, 154, 0.25),
        0 0 15px rgba(134, 156, 142, 0.4),
        0 0 30px rgba(122, 144, 130, 0.25),
        0 4px 16px rgba(0, 0, 0, 0.25),
        inset 0 1px 1px rgba(182, 204, 190, 0.5);
    
    transition: transform 0.2s ease-out, 
                opacity 0.2s ease-out,
                background 0.2s ease-out,
                border-color 0.2s ease-out,
                box-shadow 0.2s ease-out;
    
    opacity: 0;
    transform: scale(0.8);
    
    /* Отключаем системное выделение */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    outline: none;
}

/* При hover точка становится прозрачной */
.building-point:hover,
.building-point.svg-hover,
.building-point.active-card {
    z-index: 90000 !important;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

/* Приглушенные точки в ночном режиме */
body.night-mode .building-point {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
}

.building-point.loaded {
    opacity: 1;
    transform: scale(1);
    transform: scale3d(1, 1, 1);
    animation: livePulse var(--pulse-duration, 3s) linear infinite;
    animation-delay: var(--pulse-delay, 0s);
}

@keyframes livePulse {
    0%, 100% {
        transform: scale3d(1, 1, 1);
    }
    50% {
        transform: scale3d(1.04, 1.04, 1);
    }
}

/* Мягкое кольцо пульсации */
.building-point.loaded::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(146, 168, 154, 0.9);  /* Толще и ярче */
    opacity: 0;
    transform: scale3d(1, 1, 1);
    animation: glowRing var(--pulse-duration, 3s) linear infinite;
    animation-delay: var(--pulse-delay, 0s);
    pointer-events: none;
    
    /* Добавляем свечение для кольца */
    box-shadow: 
        0 0 10px rgba(146, 168, 154, 0.5),
        inset 0 0 10px rgba(146, 168, 154, 0.3);
}

@keyframes glowRing {
    0%, 100% {
        transform: scale3d(1, 1, 1);
        opacity: 0;
        border-width: 2px;
    }
    25% {
        opacity: 0.6;  /* Увеличена видимость в начале */
        border-width: 2px;
    }
    50% {
        transform: scale3d(1.5, 1.5, 1);  /* Немного больше масштаб */
        opacity: 0.4;  /* Более заметная прозрачность */
        border-width: 1.5px;
    }
    75% {
        transform: scale3d(1.7, 1.7, 1);
        opacity: 0.2;
        border-width: 1px;
    }
}

.building-point:hover {
    transform: scale3d(1.05, 1.05, 1);
    animation: none;
}

.building-point:hover::before {
    animation: none;
    opacity: 0;
}

.point-text {
    display: block;
    pointer-events: none;
    visibility: visible;
    opacity: 1;
    transition: opacity 0.1s ease, visibility 0s linear 0.1s;
}

.building-point:hover .point-text,
.building-point.svg-hover .point-text,
.building-point.active-card .point-text {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: none;
}

/* ========================================
   КАРТОЧКА ИНФОРМАЦИИ С ЭФФЕКТОМ БЛИКА
   ======================================== */

/* Десктопная версия - карточки внутри точек */
@media (min-width: 769px) {
    .point-card {
        position: absolute;
        width: 320px;
        min-height: 140px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.6);
        transform-origin: center;
        pointer-events: none;
        
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 16px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
        overflow: hidden;
        
        opacity: 0;
        visibility: hidden;
        z-index: 99999 !important;
        
        will-change: transform, opacity;
        transition:
            transform 260ms cubic-bezier(.2,.8,.2,1),
            opacity 200ms linear,
            visibility 0s linear 200ms,
            background 200ms ease,
            border 200ms ease,
            box-shadow 200ms ease;
        contain: layout paint;
    }
}

/* Мобильная версия - единая карточка для всех зданий */
@media (max-width: 768px) {
    /* Скрываем все карточки внутри точек */
    .building-point .point-card {
        display: none !important;
    }
    
    /* Единая мобильная карточка-оверлей */
    .mobile-card-overlay {
        position: fixed;
        inset: 0;
        z-index: 99990;
        pointer-events: none;
        display: flex;
        align-items: flex-end;
    }
    
    .mobile-card-overlay.active {
        pointer-events: auto;
    }
    
    /* Затемнение фона */
    .mobile-card-backdrop {
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0);
        transition: background 0.3s ease;
    }
    
    .mobile-card-overlay.active .mobile-card-backdrop {
        background: rgba(0, 0, 0, 0.4);
    }
    
    /* Сама карточка */
    .mobile-point-card {
        position: relative;
        width: 100%;
        min-height: 200px;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(0px) saturate(150%);
        -webkit-backdrop-filter: blur(0px) saturate(150%);
        border-radius: 24px 24px 0 0;
        border: 1px solid rgba(255, 255, 255, 0.4);
        border-bottom: none;
        box-shadow: 
            0 -10px 40px rgba(0, 0, 0, 0.1),
            0 0 1px rgba(255, 255, 255, 0.6) inset,
            0 1px 2px rgba(255, 255, 255, 0.3) inset;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1;
        overflow: hidden;
        padding-bottom: 45px; /* Добавляем место для надписи внизу */
    }
    
    body.night-mode .mobile-point-card {
        background: rgba(30, 30, 40, 0.9);
        backdrop-filter: blur(0px) saturate(150%);
        -webkit-backdrop-filter: blur(0px) saturate(150%);
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-bottom: none;
        box-shadow: 
            0 -10px 40px rgba(0, 0, 0, 0.25),
            0 0 1px rgba(255, 255, 255, 0.1) inset,
            0 1px 2px rgba(255, 255, 255, 0.05) inset;
    }
    
    .mobile-card-overlay.active .mobile-point-card {
        transform: translateY(0);
    }
    
    /* ЭФФЕКТ ЛИНЗОВОГО БЛИКА для мобильной карточки */
    .mobile-point-card::after {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.3s ease;
        border-radius: 24px 24px 0 0;
        z-index: 1;
        
        /* Дневной режим - чистый белый блик без желтого оттенка */
        background: linear-gradient(
            135deg,
            transparent 35%,
            rgba(255, 255, 255, 0.7) 45%,
            rgba(255, 255, 255, 0.5) 50%,
            rgba(255, 255, 255, 0.4) 55%,
            rgba(255, 255, 255, 0.3) 60%,
            transparent 70%
        );
    }
    
    /* Ночной режим - более приглушенный холодный голубоватый блик */
    body.night-mode .mobile-point-card::after {
		background: linear-gradient(
			135deg,
			transparent 40%,
			rgba(147, 197, 253, 0.03) 50%,
			transparent 70%
		);
    }
    
    /* Активируем анимацию блика при открытии карточки */
    .mobile-card-overlay.active .mobile-point-card::after {
        opacity: 1;
        animation: lensFlare 3s ease-in-out infinite;
        animation-delay: 0.5s;
    }
    
    /* Акцентная полоса сверху (динамическая) */
    .mobile-point-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: var(--mobile-accent-color, #B5693E);
        opacity: 0;
        transform: scaleX(0);
        transform-origin: left;
        transition: all 0.3s ease;
        transition-delay: 0.2s;
        z-index: 3;
    }
    
    .mobile-card-overlay.active .mobile-point-card::before {
        opacity: 1;
        transform: scaleX(1);
    }
    
    /* Индикатор для закрытия */
    .mobile-card-handle {
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 36px;
        height: 4px;
        background: rgba(0, 0, 0, 0.2);
        border-radius: 2px;
        z-index: 4;
    }
    
    body.night-mode .mobile-card-handle {
        background: rgba(255, 255, 255, 0.2);
    }
    
    /* Контент мобильной карточки */
    .mobile-card-content {
        position: relative;
        z-index: 2;
        padding: 28px 24px 24px;
        opacity: 0;
        transition: opacity 160ms ease 120ms;
    }
    
    .mobile-card-overlay.active .mobile-card-content {
        opacity: 1;
    }
    
    .mobile-card-title {
        font-size: 16px;
        font-weight: 600;
        color: #0a0a0a;
        margin-bottom: 4px;
        letter-spacing: -0.3px;
        text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    }
    
    body.night-mode .mobile-card-title {
        color: #ffffff;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }
    
    .mobile-card-subtitle {
        font-size: 13px;
        font-weight: 400;
        color: #4b5563;
        margin-bottom: 20px;
        letter-spacing: 0.1px;
    }
    
    body.night-mode .mobile-card-subtitle {
        color: #9ca3af;
    }
    
    .mobile-card-info-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .mobile-info-item {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .mobile-info-icon {
        width: 32px;
        height: 32px;
        border-radius: 8px;
        background: color-mix(in srgb, var(--mobile-accent-color, #B5693E) 12%, white);
        border: 1px solid color-mix(in srgb, var(--mobile-accent-color, #B5693E) 15%, transparent);
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    }
    
    body.night-mode .mobile-info-icon {
        background: color-mix(in srgb, var(--mobile-accent-color, #B5693E) 20%, rgba(0, 0, 0, 0.3));
        border: 1px solid color-mix(in srgb, var(--mobile-accent-color, #B5693E) 30%, transparent);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    }
    
    .mobile-info-icon svg {
        width: 16px;
        height: 16px;
        stroke: var(--mobile-accent-color, #B5693E);
        stroke-width: 2;
        fill: none;
    }
    
    .mobile-info-details {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }
    
    .mobile-info-label {
        font-size: 11px;
        font-weight: 600;
        color: #6b7280;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    body.night-mode .mobile-info-label {
        color: #9ca3af;
    }
    
    .mobile-info-value {
        font-size: 14px;
        font-weight: 600;
        color: #0a0a0a;
    }
    
    body.night-mode .mobile-info-value {
        color: #f3f4f6;
    }
}

/* Специальное позиционирование для зданий A, C и D */
.building-point[data-building="A"] .point-card {
    transform: translate(-50%, calc(-50% - 20px)) scale(0.6);
}

.building-point[data-building="C"] .point-card {
    transform: translate(-50%, calc(-50% + 20px)) scale(0.6);
}

.building-point[data-building="D"] .point-card {
    transform: translate(-50%, calc(-50% - 40px)) scale(0.6);
}

/* Развернутое состояние карточки - только для десктопа */
@media (min-width: 769px) {
    .building-point:hover .point-card,
    .building-point.svg-hover .point-card,
    .building-point.active-card .point-card {
        opacity: 1;
        visibility: visible;
        transform: translate(-50%, -50%) scale(1);
        pointer-events: auto;
        
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid rgba(255, 255, 255, 0.4);
        box-shadow: 
            0 10px 40px rgba(0, 0, 0, 0.1),
            0 0 1px rgba(255, 255, 255, 0.6) inset,
            0 1px 2px rgba(255, 255, 255, 0.3) inset;
        
        transition:
            transform 280ms cubic-bezier(.2,.8,.2,1),
            opacity 200ms linear,
            visibility 0s linear,
            background 200ms ease,
            border 200ms ease,
            box-shadow 200ms ease;
    }

    /* Корректируем transform для зданий A, C и D при раскрытии */
    .building-point[data-building="A"]:hover .point-card,
    .building-point[data-building="A"].svg-hover .point-card,
    .building-point[data-building="A"].active-card .point-card {
        transform: translate(-50%, calc(-50% - 20px)) scale(1);
    }
    
    .building-point[data-building="C"]:hover .point-card,
    .building-point[data-building="C"].svg-hover .point-card,
    .building-point[data-building="C"].active-card .point-card {
        transform: translate(-50%, calc(-50% + 20px)) scale(1);
    }

    .building-point[data-building="D"]:hover .point-card,
    .building-point[data-building="D"].svg-hover .point-card,
    .building-point[data-building="D"].active-card .point-card {
        transform: translate(-50%, calc(-50% - 40px)) scale(1);
    }

    /* Темная карточка в ночном режиме */
    body.night-mode .building-point:hover .point-card,
    body.night-mode .building-point.svg-hover .point-card,
    body.night-mode .building-point.active-card .point-card {
        background: rgba(30, 30, 40, 0.9);
        border: 1px solid rgba(255, 255, 255, 0.15);
        box-shadow: 
            0 10px 40px rgba(0, 0, 0, 0.25),
            0 0 1px rgba(255, 255, 255, 0.1) inset,
            0 1px 2px rgba(255, 255, 255, 0.05) inset;
    }
}

/* ЭФФЕКТ ЛИНЗОВОГО БЛИКА */
.point-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 16px;
    z-index: 1;
    
    /* Дневной режим - чистый белый блик без желтого оттенка */
    background: linear-gradient(
        135deg,
        transparent 35%,
        rgba(255, 255, 255, 0.7) 45%,
        rgba(255, 255, 255, 0.5) 50%,
        rgba(255, 255, 255, 0.4) 55%,
        rgba(255, 255, 255, 0.3) 60%,
        transparent 70%
    );
}

/* Ночной режим - более приглушенный холодный голубоватый блик */
body.night-mode .point-card::after {
	background: linear-gradient(
		135deg,
		transparent 40%,
		rgba(147, 197, 253, 0.03) 50%,
		transparent 70%
	);
}

/* Активируем анимацию блика при раскрытии карточки */
.building-point:hover .point-card::after,
.building-point.svg-hover .point-card::after,
.building-point.active-card .point-card::after {
    opacity: 1;
    animation: lensFlare 3s ease-in-out infinite;
    animation-delay: 0.5s;
}

/* Анимация движения блика слева направо */
@keyframes lensFlare {
    0% {
        left: -100%;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    50% {
        left: 100%;
        opacity: 1;
    }
    51% {
        opacity: 0;
    }
    100% {
        left: 100%;
        opacity: 0;
    }
}

/* Акцентная полоса */
.point-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-color);
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: all 0.3s ease;
    transition-delay: 0.2s;
    z-index: 3;
}

.building-point:hover .point-card::before,
.building-point.svg-hover .point-card::before,
.building-point.active-card .point-card::before {
    opacity: 1;
    transform: scaleX(1);
}

/* Контент карточки */
.card-content {
    position: relative;
    z-index: 2;
    padding: 24px;
    opacity: 0;
    transform: none !important;
    transition: opacity 160ms ease 120ms;
}

.building-point:hover .card-content,
.building-point.svg-hover .card-content,
.building-point.active-card .card-content {
    opacity: 1;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #0a0a0a;
    margin-bottom: 4px;
    letter-spacing: -0.3px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

body.night-mode .card-title {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.card-subtitle {
    font-size: 13px;
    font-weight: 400;
    color: #4b5563;
    margin-bottom: 20px;
    letter-spacing: 0.1px;
}

body.night-mode .card-subtitle {
    color: #9ca3af;
}

.card-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--accent-color) 12%, white);
    border: 1px solid color-mix(in srgb, var(--accent-color) 15%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

body.night-mode .info-icon {
    background: color-mix(in srgb, var(--accent-color) 20%, rgba(0, 0, 0, 0.3));
    border: 1px solid color-mix(in srgb, var(--accent-color) 30%, transparent);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.info-icon svg {
    width: 16px;
    height: 16px;
    stroke: var(--accent-color);
    stroke-width: 2;
    fill: none;
}

.info-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.info-label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.night-mode .info-label {
    color: #9ca3af;
}

.info-value {
    font-size: 14px;
    font-weight: 600;
    color: #0a0a0a;
}

body.night-mode .info-value {
    color: #f3f4f6;
}

/* Цветовая схема зданий 
.building-point[data-building="A"] {
    --accent-color: #B5693E;
    --accent-rgb: 181, 105, 62;
}

.building-point[data-building="B"] {
    --accent-color: #D4B483;
    --accent-rgb: 212, 180, 131;
}

.building-point[data-building="C"] {
    --accent-color: #D4A373;
    --accent-rgb: 212, 163, 115;
}

.building-point[data-building="D"] {
    --accent-color: #E3C58F;
    --accent-rgb: 227, 197, 143;
}
*/

.building-point[data-building="A"] {
    --accent-color: #B5693E;
    --accent-rgb: 181, 105, 62;
}

.building-point[data-building="B"] {
    --accent-color: #B5693E;
    --accent-rgb: 181, 105, 62;
}

.building-point[data-building="C"] {
    --accent-color: #B5693E;
    --accent-rgb: 181, 105, 62;
}

.building-point[data-building="D"] {
    --accent-color: #B5693E;
    --accent-rgb: 181, 105, 62;
}

/* ========================================
   УКАЗАТЕЛИ МЕТРО
   ======================================== */

.metro-indicator {
    position: fixed;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 500;
    opacity: 0;
    animation: fadeInIndicator 0.6s ease forwards;
    animation-delay: 0.8s;
}

@keyframes fadeInIndicator {
    to {
        opacity: 1;
    }
}

.metro-indicator.top-left {
    top: 25px;
    left: 40px;
    flex-direction: row-reverse;
}

.metro-indicator.bottom-right {
    bottom: 25px;
    right: 40px;
    flex-direction: row;
}

.metro-arrow {
    width: 24px;
    height: 24px;
    position: relative;
    animation: arrowPulse 2s ease-in-out infinite;
}

/* Стрелка для D2 (верхний левый) */
.metro-indicator.top-left .metro-arrow {
    animation: arrowPulseUp 2s ease-in-out infinite;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.6))
            drop-shadow(0 0 6px rgba(255, 255, 255, 0.4))
            drop-shadow(0 0 12px rgba(255, 255, 255, 0.2));
}

.metro-indicator.top-left .metro-arrow svg {
    stroke: rgba(255, 255, 255, 0.9);
}

@keyframes arrowPulseUp {
    0%, 100% {
        transform: translateY(0);
        filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.6))
                drop-shadow(0 0 6px rgba(255, 255, 255, 0.4))
                drop-shadow(0 0 12px rgba(255, 255, 255, 0.2));
    }
    50% {
        transform: translateY(-3px);
        filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.8))
                drop-shadow(0 0 8px rgba(255, 255, 255, 0.5))
                drop-shadow(0 0 16px rgba(255, 255, 255, 0.3));
    }
}

/* Стрелка для Метро (нижний правый) */
.metro-indicator.bottom-right .metro-arrow {
    transform: rotate(90deg);
    animation: arrowPulseRight 2s ease-in-out infinite;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.6))
            drop-shadow(0 0 6px rgba(255, 255, 255, 0.4))
            drop-shadow(0 0 12px rgba(255, 255, 255, 0.2));
}

.metro-indicator.bottom-right .metro-arrow svg {
    stroke: rgba(255, 255, 255, 0.9);
}

@keyframes arrowPulseRight {
    0%, 100% {
        transform: rotate(90deg) translateY(0);
        filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.6))
                drop-shadow(0 0 6px rgba(255, 255, 255, 0.4))
                drop-shadow(0 0 12px rgba(255, 255, 255, 0.2));
    }
    50% {
        transform: rotate(90deg) translateY(-3px);
        filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.8))
                drop-shadow(0 0 8px rgba(255, 255, 255, 0.5))
                drop-shadow(0 0 16px rgba(255, 255, 255, 0.3));
    }
}

.metro-arrow svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.3s ease;
}

/* Ночной режим - белые стрелки с белым свечением */
body.night-mode .metro-indicator.top-left .metro-arrow {
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.5))
            drop-shadow(0 0 6px rgba(255, 255, 255, 0.3))
            drop-shadow(0 0 12px rgba(255, 255, 255, 0.15));
}

body.night-mode .metro-indicator.top-left .metro-arrow svg {
    stroke: rgba(255, 255, 255, 0.8);
}

body.night-mode .metro-indicator.bottom-right .metro-arrow {
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.5))
            drop-shadow(0 0 6px rgba(255, 255, 255, 0.3))
            drop-shadow(0 0 12px rgba(255, 255, 255, 0.15));
}

body.night-mode .metro-indicator.bottom-right .metro-arrow svg {
    stroke: rgba(255, 255, 255, 0.8);
}

/* Усиление неонового эффекта при наведении в ночном режиме */
body.night-mode .metro-indicator.top-left:hover .metro-arrow {
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.7))
            drop-shadow(0 0 10px rgba(255, 255, 255, 0.5))
            drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
}

body.night-mode .metro-indicator.bottom-right:hover .metro-arrow {
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.7))
            drop-shadow(0 0 10px rgba(255, 255, 255, 0.5))
            drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
}

.metro-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 8px 14px;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.08),
        0 0 1px rgba(255, 255, 255, 0.5) inset;
}

body.night-mode .metro-info {
    background: rgba(30, 30, 40, 0.7);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.2),
        0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.metro-info:hover {
    background: rgba(255, 255, 255, 0.75);
    transform: translateY(-1px);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.1),
        0 0 1px rgba(255, 255, 255, 0.6) inset;
}

body.night-mode .metro-info:hover {
    background: rgba(30, 30, 40, 0.9);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.25),
        0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.metro-logo {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.metro-logo svg {
    width: 100%;
    height: 100%;
}

.metro-logo.moscow-metro svg {
    width: 26px;
    height: 32px;
}

.metro-logo.d2-line svg {
    width: 36px;
    height: 18px;
}

.metro-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.metro-line {
    font-size: 10px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metro-station {
    font-size: 14px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.85);
    letter-spacing: 0.1px;
}

body.night-mode .metro-station {
    color: rgba(255, 255, 255, 0.9);
}

body.night-mode .metro-line {
    color: rgba(255, 255, 255, 0.5);
}

/* ========================================
   МОБИЛЬНАЯ АДАПТАЦИЯ
   ======================================== */

@media (max-width: 768px) {
    .metro-indicator {
        transform: scale(0.9);
    }
    
    .metro-indicator.top-left {
        top: 13px;
        left: 20px;
    }
    
    .metro-indicator.bottom-right {
        bottom: 13px;
        right: 20px;
    }
    
    .metro-info {
        padding: 6px 10px;
    }
    
    .metro-logo {
        width: 28px;
        height: 28px;
    }
    
    .metro-station {
        font-size: 13px;
    }
    
    .day-night-toggle {
        top: 18px;
        right: 75px;
        width: 60px;
        height: 30px;
    }
    
    .toggle-slider {
        width: 24px;
        height: 24px;
    }
    
    /* ИСПРАВЛЕНИЕ для мобильной версии */
    .day-night-toggle.night-mode .toggle-slider {
        transform: translateX(28px) translateY(-50%);
        left: 4px;
    }
    
    .building-point {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }
    
    /* Отключаем hover эффекты на мобильных */
    .building-point:hover {
        background: rgba(255, 255, 255, 0.12);
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        transform: scale(1);
    }
    
    .building-point:hover .point-text {
        visibility: visible;
        opacity: 1;
    }
    
    .building-point:hover::before {
        animation: none;
        opacity: 0;
    }
    
    .card-title {
        font-size: 14px;
    }
    
    .card-subtitle {
        font-size: 12px;
    }
    
    /* Контент карточки для мобильных */
    .card-content {
        padding: 28px 24px 24px;
    }
}
}

@media (max-width: 480px) {
    .metro-indicator {
        transform: scale(0.8);
    }
    
    .metro-indicator.top-left {
        top: 15px;
        left: 15px;
    }
    
    .metro-indicator.bottom-right {
        bottom: 15px;
        right: 15px;
    }
    
    .metro-info {
        gap: 8px;
        padding: 5px 8px;
    }
    
    .metro-logo {
        width: 24px;
        height: 24px;
    }
    
    .metro-station {
        font-size: 12px;
    }
    
    .metro-line {
        font-size: 9px;
    }
    
    .day-night-toggle {
        top: 18px;
        right: 75px;
        width: 50px;
        height: 26px;
    }
    
    .toggle-slider {
        width: 20px;
        height: 20px;
        left: 3px;
    }
    
    /* ИСПРАВЛЕНИЕ для маленьких экранов */
    .day-night-toggle.night-mode .toggle-slider {
        transform: translateX(23px) translateY(-50%);
        left: 3px;
    }
    
    .building-point {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }
    
    .card-content {
        padding: 20px;
    }
    
    .card-info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* ========================================
   ДОПОЛНЕНИЯ ДЛЯ ПЕРЕХОДОВ НА ЗДАНИЯ
   Добавить в конец файла gplan.css
   ======================================== */

/* Индикация кликабельности карточек на десктопе */
@media (min-width: 769px) {
    .building-point {
        cursor: pointer;
    }
    
    .building-point .point-card {
        cursor: pointer;
    }
    
    /* Эффект при наведении на карточку */
    .building-point:hover .point-card:hover {
        transform: translate(-50%, -50%) scale(1.02);
        box-shadow: 
            0 12px 45px rgba(0, 0, 0, 0.12),
            0 0 2px rgba(255, 255, 255, 0.7) inset,
            0 1px 3px rgba(255, 255, 255, 0.4) inset;
    }
    
    /* Корректировка для зданий с особым позиционированием */
    .building-point[data-building="A"]:hover .point-card:hover {
        transform: translate(-50%, calc(-50% - 20px)) scale(1.02);
    }
    
    .building-point[data-building="C"]:hover .point-card:hover {
        transform: translate(-50%, calc(-50% + 20px)) scale(1.02);
    }
    
    .building-point[data-building="D"]:hover .point-card:hover {
        transform: translate(-50%, calc(-50% - 40px)) scale(1.02);
    }
    
    /* Эффект нажатия */
    .building-point:active {
        transform: scale(0.95);
    }
}

/* Подсказка в мобильной карточке */
.mobile-card-hint {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: rgba(0, 0, 0, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0;
    white-space: nowrap;
    z-index: 3;
    pointer-events: none;  /* Добавлено - не блокирует клики */
    visibility: hidden;     /* Добавлено - полностью скрыто по умолчанию */
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.mobile-card-overlay.active .mobile-card-hint {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.5s ease 0.3s, visibility 0s linear;
}

@keyframes fadeInHint {
    to {
        opacity: 1;
    }
}

body.night-mode .mobile-card-hint {
    color: rgba(255, 255, 255, 0.3);
}

/* Улучшенная анимация для мобильной карточки при тапе */
@media (max-width: 768px) {
    .mobile-point-card {
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                    background 0.2s ease;
    }
    
    .mobile-point-card:active {
        background: rgba(255, 255, 255, 0.95);
        transform: translateY(2px);
    }
    
    body.night-mode .mobile-point-card:active {
        background: rgba(30, 30, 40, 0.95);
    }
}

/* SVG области - визуальный feedback при клике */
.building-area {
    transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.building-area:active {
    opacity: 0.5 !important;
}

/* Анимация затухания при переходе */
#main-content.fade-out {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Индикатор загрузки для перехода (опционально) */
.transition-loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    opacity: 0;
    pointer-events: none;
    z-index: 10000;
}

.transition-loader.active {
    opacity: 1;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ========================================
   КОМПАС - ПРЕМИАЛЬНЫЙ ДИЗАЙН С ДВУМЯ ТЕМАМИ
   Обновлено в стиле навигационного меню
   ======================================== */

.compass-widget {
    position: fixed;
    bottom: 30px;
    left: 40px;
    width: 90px;
    height: 90px;
    z-index: 500;
    opacity: 0;
    transform: translateY(20px);
    animation: compassReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 1.2s;
}

/* Позиционирование */
.compass-widget.bottom-left {
    left: 40px;
    right: auto;
}

.compass-widget.bottom-right {
    left: auto;
    right: 40px;
}

@keyframes compassReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   ДНЕВНАЯ ТЕМА - В СТИЛЕ МЕНЮ
   ======================================== */

/* Основной контейнер - точно как у меню */
.compass-container {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Внутренний контейнер - полностью прозрачный */
.compass-inner-container {
    position: absolute;
    inset: 1px;
    border-radius: 50%;
    background: transparent;
    overflow: hidden;
}

/* Эффект внутреннего свечения - очень легкий */
.compass-inner-container::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(
        circle at 30% 30%,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 50%
    );
    pointer-events: none;
}

/* Декоративные кольца - белые полупрозрачные */
.compass-rings {
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    pointer-events: none;
}

.compass-rings::before {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* SVG компас */
.compass-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-45deg);
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Анимация стрелки */
.compass-needle {
    transform-origin: center;
    animation: needleFloat 6s ease-in-out infinite;
}

@keyframes needleFloat {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(1deg); }
    75% { transform: rotate(-1deg); }
}

/* Северная часть стрелки */
.compass-needle-north {
    fill: url(#compassGradientNorth);
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.15));
}

/* Южная часть стрелки - белая полупрозрачная */
.compass-needle-south {
    fill: rgba(255, 255, 255, 0.3);
}

/* Метки направлений - белые */
.compass-label {
    fill: rgba(255, 255, 255, 0.9);
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

.compass-label.north {
    fill: #ef4444;
    font-size: 13px;
    font-weight: 600;
}

/* Декоративные точки - белые */
.compass-dot {
    fill: rgba(255, 255, 255, 0.25);
}

.compass-dot.major {
    fill: rgba(255, 255, 255, 0.35);
}

/* Центральная точка - белая */
.compass-pivot {
    fill: rgba(255, 255, 255, 0.6);
    filter: none;
}

/* Hover состояние - как у меню */
.compass-widget:hover .compass-container {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.compass-widget:hover .compass-svg {
    transform: rotate(-45deg) scale(1.1);
}

.compass-widget:hover .compass-needle {
    animation-play-state: paused;
}

.compass-widget:hover .compass-needle-north {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

/* ========================================
   НОЧНАЯ ТЕМА
   ======================================== */

body.night-mode .compass-container {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

body.night-mode .compass-inner-container {
    background: transparent;
}

body.night-mode .compass-inner-container::before {
    background: radial-gradient(
        circle at 30% 30%,
        rgba(255, 255, 255, 0.04) 0%,
        transparent 50%
    );
}

/* Кольца - светлые для ночной темы */
body.night-mode .compass-rings {
    border: 1px solid rgba(255, 255, 255, 0.08);
}

body.night-mode .compass-rings::before {
    border: 1px solid rgba(255, 255, 255, 0.04);
}

/* Южная стрелка - светлая в ночном режиме */
body.night-mode .compass-needle-south {
    fill: rgba(255, 255, 255, 0.15);
}

/* Метки - светлые для ночной темы */
body.night-mode .compass-label {
    fill: rgba(255, 255, 255, 0.9);
}

body.night-mode .compass-label.north {
    fill: #ef4444;
}

/* Точки - светлые для ночной темы */
body.night-mode .compass-dot {
    fill: rgba(255, 255, 255, 0.25);
}

body.night-mode .compass-dot.major {
    fill: rgba(255, 255, 255, 0.4);
}

/* Центр - светлый для ночной темы */
body.night-mode .compass-pivot {
    fill: rgba(255, 255, 255, 0.5);
}

/* Hover для ночной темы */
body.night-mode .compass-widget:hover .compass-container {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

body.night-mode .compass-widget:hover .compass-needle-north {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* ========================================
   АНИМАЦИИ
   ======================================== */

/* Вращение при загрузке */
@keyframes compassInitialSpin {
    from { transform: rotate(-45deg) scale(0.8) rotate(-720deg); }
    to { transform: rotate(-45deg) scale(1) rotate(0deg); }
}

.compass-widget.initial-load .compass-svg {
    animation: compassInitialSpin 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Пульсация северной метки */
.compass-pulse {
    transform-origin: 50px 30px;
    animation: northGlow 3s ease-in-out infinite;
}

@keyframes northGlow {
    0%, 100% { 
        opacity: 0; 
        transform: scale(1); 
    }
    50% { 
        opacity: 0.3; 
        transform: scale(1.5); 
    }
}

/* ========================================
   АДАПТИВНОСТЬ
   ======================================== */

/* Планшеты */
@media (max-width: 1024px) {
    .compass-widget {
        width: 80px;
        height: 80px;
    }
}

/* Мобильные устройства */
@media (max-width: 768px) {
    .compass-widget {
        bottom: 70px;
        left: 20px;
        width: 70px;
        height: 70px;
    }
    
    .compass-widget.bottom-left {
        left: 20px;
        right: auto;
    }
    
    .compass-widget.bottom-right {
        left: auto;
        right: 20px;
    }
    
    .compass-label {
        font-size: 10px;
    }
    
    .compass-label.north {
        font-size: 11px;
    }
}

/* Маленькие экраны */
@media (max-width: 480px) {
    .compass-widget {
        bottom: 60px;
        left: 15px;
        width: 60px;
        height: 60px;
    }
    
    .compass-widget.bottom-left {
        left: 15px;
        right: auto;
    }
    
    .compass-widget.bottom-right {
        left: auto;
        right: 15px;
    }
    
    .compass-label {
        font-size: 9px;
        font-weight: 600;
    }
    
    .compass-label.north {
        font-size: 10px;
    }
}