/**
 * TOCHKA Cinema UI & OLED Depth v38.2
 * [cite: 2026-03-02] — Синхронизация с Atmos Core & GPS Sync.
 */

/* 1. OLED NIGHT FILTER & MAP CANVAS */
#app-main-map {
    background: #000; /* Глубокий черный фон для предотвращения засветов при загрузке */
}

/* 2. CINEMA MARKERS — Новое поколение одиночных точек */
.cinema-marker {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.marker-content {
    position: relative;
    width: 100%;
    height: 100%;
    background: rgba(28, 28, 30, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Бейдж дистанции на маркерах */
.marker-dist {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ffffff;
    color: #000000;
    font-size: 9px;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 7px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 5;
    pointer-events: none;
}

/* 3. CINEMA CLUSTERS — Группы точек */
.cinema-cluster {
    width: 48px;
    height: 48px;
    background: rgba(28, 28, 30, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
    position: relative;
}

.cluster-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 20px var(--cluster-color, #007AFF);
    opacity: 0.5;
    animation: clusterPulse 2.5s infinite ease-in-out;
}

.cluster-count {
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Динамические цвета (CSS Variables) для категорий и кластеров */
.cat-food { --cluster-color: #FF9500; }
.cat-sport { --cluster-color: #34C759; }
.cat-culture { --cluster-color: #AF52DE; }
.cat-education { --cluster-color: #5856D6; }
.cat-games { --cluster-color: #FF2D55; }
.cat-social { --cluster-color: #007AFF; }
.cat-volunteering { --cluster-color: #5AC8FA; }
.cat-travel { --cluster-color: #FFCC00; }
.cat-default { --cluster-color: #8E8E93; }

/* Применение цвета к бордерам одиночных маркеров */
.cinema-marker.cat-food .marker-content { border-color: rgba(255, 149, 0, 0.4); }
.cinema-marker.cat-sport .marker-content { border-color: rgba(52, 199, 89, 0.4); }

/* 4. SILVER GLASS HERO (Шторка модального окна) */
.js-sheet-hero, .js-sheet-img-container {
    position: relative;
    width: 100%;
    height: 280px;
    background: #000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Эффект глубокого погружения обложки */
.main-modal-img, .sheet-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    animation: fadeInHero 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.cover-blur-edge {
    position: absolute;
    bottom: -1px; /* Устранение микро-щели */
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, #1c1c1e 15%, transparent 100%);
    z-index: 2;
}

/* SVG Placeholder Engine */
.svg-placeholder-inline {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #2c2c2e 0%, #0a0a0a 100%);
}

.dynamic-placeholder-icon {
    width: 64px;
    height: 64px;
    filter: drop-shadow(0 0 20px rgba(255,255,255,0.15));
    margin-bottom: 16px;
    opacity: 0.6;
}

.placeholder-cat-name {
    color: rgba(255,255,255,0.3);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* 5. ANIMATIONS */
@keyframes fadeInHero {
    from { opacity: 0; transform: scale(1.1) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes clusterPulse {
    0% { transform: scale(0.95); opacity: 0.4; }
    50% { transform: scale(1.05); opacity: 0.6; }
    100% { transform: scale(0.95); opacity: 0.4; }
}

/* 6. INTERACTIVE MODE — Плавное скрытие интерфейса */
body.map-interacting .app-header,
body.map-interacting .tabbar, 
body.map-interacting .bottom-nav,
body.map-interacting .fab-main {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.95);
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

/* Очистка старых артефактов */
.js-sheet-hero::before, .js-sheet-hero::after {
    display: none !important;
}

/* 7. BOOST ANIMATION */
.cinema-marker.is-boost .marker-content {
    border-color: #FFD700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.cinema-marker.is-boost::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 14px;
    border: 2px solid #FFD700;
    animation: boostRipple 2s infinite;
}

@keyframes boostRipple {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.8); opacity: 0; }
}