/* ============================================
   PREMIUM VALENTINE EXPERIENCE - STYLES
   ============================================ */

/* CSS Variables - Design System */
:root {
    /* Colors */
    --bg1: #0a0a0f;
    --bg2: #1a1a2e;
    --bg3: #2d1b3d;
    --accent: #ff6b9d;
    --accent-light: #ff8fb3;
    --accent-dark: #e55a8a;
    --text: #ffffff;
    --text-muted: #b8b8c8;
    --text-dark: #6b6b7a;
    --card: rgba(255, 255, 255, 0.1);
    --card-hover: rgba(255, 255, 255, 0.15);
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-glow: rgba(255, 107, 157, 0.3);
    
    /* Typography */
    --font-primary: 'Cormorant Garamond', 'Georgia', serif;
    --font-secondary: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Transitions */
    --transition-fast: 200ms ease;
    --transition-normal: 400ms ease;
    --transition-slow: 800ms ease;
    
    /* Effects */
    --blur-sm: blur(10px);
    --blur-md: blur(20px);
    --blur-lg: blur(40px);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: auto; /* Изменено на auto для мгновенных переходов между сценами */
}

body {
    font-family: var(--font-secondary);
    background: var(--bg1);
    color: var(--text);
    margin: 0;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Main Container */
.main-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
}

/* Scene Base Styles */
.scene {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
    overflow: hidden;
}

.scene.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    z-index: 10;
}

.scene-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    width: 100%;
    text-align: center;
    padding: var(--spacing-lg) var(--spacing-md);
}

/* Поднимаем контент сцены 3 выше фона */
#scene-3 .scene-content {
    position: relative !important;
    z-index: 2 !important;
}

/* Progress Indicator */
.progress-indicator {
    position: fixed;
    top: var(--spacing-md);
    right: var(--spacing-md);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}

.progress-indicator:hover {
    opacity: 1;
}

.progress-text {
    font-family: var(--font-secondary);
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.progress-dots {
    display: flex;
    gap: 0.5rem;
}

.progress-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    opacity: 0.3;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.progress-dot.active {
    opacity: 1;
    background: var(--accent);
    transform: scale(1.2);
}

/* Scene Navigation */
.scene-navigation {
    display: none !important; /* Навигация удалена */
}

.nav-button {
    padding: var(--spacing-sm) var(--spacing-lg);
    font-family: var(--font-secondary);
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid var(--glass-border);
    border-radius: 50px;
    background: var(--glass);
    backdrop-filter: var(--blur-md);
    color: var(--text);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.nav-button:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 8px 32px var(--shadow-glow);
    background: var(--card-hover);
}

.nav-button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.nav-button span {
    font-size: 1.25rem;
}

/* Sound Toggle */
.sound-toggle {
    position: fixed;
    top: var(--spacing-md);
    left: var(--spacing-md);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--glass);
    backdrop-filter: var(--blur-md);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: var(--text);
    font-family: var(--font-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    opacity: 0;
    visibility: hidden;
}

.sound-toggle.visible {
    opacity: 1;
    visibility: visible;
}

.sound-toggle:hover {
    background: var(--card-hover);
    transform: translateY(-2px);
}

.sound-icon {
    font-size: 1.125rem;
}

/* ============================================
   SCENE 1: Атмосфера / Вход
   ============================================ */

#scene-1 {
    background: linear-gradient(135deg, var(--bg1) 0%, var(--bg2) 50%, var(--bg3) 100%);
}

.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.particle {
    position: absolute;
    pointer-events: none;
    user-select: none;
}

.particle.heart {
    color: var(--accent);
    font-size: 1.5rem;
    animation: float 8s infinite ease-in-out;
}

.particle.dust {
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: float 12s infinite ease-in-out;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(20px) rotate(360deg);
        opacity: 0;
    }
}

.text-reveal {
    margin-bottom: var(--spacing-lg);
}

.reveal-line {
    display: block;
    font-family: var(--font-primary);
    font-size: clamp(1.5rem, 5vw, 3rem);
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: var(--spacing-md);
    opacity: 0;
    transform: translateY(30px);
}

.hint-text {
    font-family: var(--font-secondary);
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
    font-style: italic;
    opacity: 0;
}

/* ============================================
   SCENE 2: Тайна
   ============================================ */

.diary-scene {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    padding: var(--spacing-lg);
}

.typewriter-container {
    margin-bottom: var(--spacing-lg);
    min-height: 200px;
}

.typewriter-text {
    font-family: var(--font-primary);
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    line-height: 1.8;
    color: var(--text);
    text-align: left;
    max-width: 700px;
    margin: 0 auto;
}

.typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background: var(--accent);
    margin-left: 4px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.memory-card-container {
    display: flex;
    justify-content: center;
    margin: var(--spacing-lg) 0;
    perspective: 1000px;
}

.memory-card {
    width: 280px;
    height: 200px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform var(--transition-normal);
    cursor: pointer;
}

.memory-card.flipped {
    transform: rotateY(180deg);
}

.memory-card-front,
.memory-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass);
    backdrop-filter: var(--blur-md);
    border: 2px solid var(--glass-border);
    box-shadow: 0 8px 32px var(--shadow);
}

.memory-card-back {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
}

.card-content {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 500;
    text-align: center;
    padding: var(--spacing-md);
}

/* ============================================
   SCENE 3: Галерея
   ============================================ */

/* ============================================
   SCENE 3: POLAROID GALLERY
   ============================================ */

#scene-3 {
    background: #0a0a0a !important;
    position: relative !important;
    overflow: visible !important; /* Изменено на visible, чтобы фото не обрезались */
}

/* Background layer with hearts */
.scene3-bg {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 0 !important;
    pointer-events: none !important;
    overflow: hidden !important;
    /* Тестовый градиент для отладки */
    background: radial-gradient(circle at 30% 30%, rgba(255, 0, 150, 0.20), transparent 55%), 
                radial-gradient(circle at 70% 60%, rgba(255, 80, 120, 0.14), transparent 60%);
}

/* Film grain overlay */
.film-grain-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.15'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
    opacity: 0.3;
    mix-blend-mode: overlay;
}

/* Heart element */
.bg-heart {
    position: absolute;
    width: 40px;
    height: 40px;
    opacity: 0;
    filter: blur(10px);
    -webkit-filter: blur(10px);
    will-change: transform, opacity;
    z-index: 0;
}

/* Heart shape via inline SVG */
.bg-heart::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23ff6b9d' d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.6;
}

/* Different sizes */
.bg-heart.size-small {
    width: 30px;
    height: 30px;
    filter: blur(6px);
    -webkit-filter: blur(6px);
}

.bg-heart.size-medium {
    width: 50px;
    height: 50px;
    filter: blur(10px);
    -webkit-filter: blur(10px);
}

.bg-heart.size-large {
    width: 70px;
    height: 70px;
    filter: blur(14px);
    -webkit-filter: blur(14px);
}

/* Different opacity levels */
.bg-heart.opacity-low {
    opacity: 0.06;
}

.bg-heart.opacity-medium {
    opacity: 0.10;
}

.bg-heart.opacity-high {
    opacity: 0.14;
}

/* Vignette effect - затемнение по краям */
.scene3-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(10, 10, 10, 0.3) 70%, rgba(10, 10, 10, 0.6) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Тестовый текст для отладки (можно удалить после проверки) */
.scene3-bg::before {
    content: 'BG OK';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.2);
    z-index: 2;
    pointer-events: none;
    font-family: Arial, sans-serif;
}

/* Animation keyframes for hearts */
@keyframes heartFloat {
    0% {
        opacity: 0;
        transform: translateY(100vh) translateX(0) scale(0.5);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-20vh) translateX(30px) scale(1);
    }
}

@keyframes heartFloatLeft {
    0% {
        opacity: 0;
        transform: translateY(100vh) translateX(0) scale(0.5);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-20vh) translateX(-30px) scale(1);
    }
}

@keyframes heartFloatRight {
    0% {
        opacity: 0;
        transform: translateY(100vh) translateX(0) scale(0.5);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-20vh) translateX(50px) scale(1);
    }
}

.polaroid-gallery {
    position: relative;
    z-index: 2;
}

.gallery-scene h2 {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 6vw, 3.5rem);
    margin-bottom: var(--spacing-xl);
    font-weight: 400;
    color: #fff;
    text-align: center;
}

/* Polaroid container */
.polaroid-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 2rem;
    padding: 2rem;
    /* Убрано max-height, чтобы фото не обрезались */
    max-width: 1400px;
    margin: 0 auto;
    overflow: visible; /* Изменено на visible, чтобы фото не обрезались */
}

/* Polaroid photo */
.polaroid-photo {
    position: relative;
    width: 280px;
    height: auto; /* Изменено на auto, чтобы контейнер подстраивался под фото */
    min-height: 340px; /* Минимальная высота для сохранения дизайна */
    background: #fff;
    padding: 12px 12px 50px 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transform-origin: center center;
    opacity: 0;
    will-change: transform, opacity;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: visible; /* Изменено на visible, чтобы фото не обрезались */
}

.polaroid-photo:hover {
    transform: scale(1.05) translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.polaroid-photo img {
    width: 100%;
    height: auto; /* Сохраняет пропорции */
    object-fit: contain; /* Показывает фото полностью без обрезки */
    display: block;
    /* Убрано flex: 1, чтобы фото не растягивалось и не обрезалось */
    min-height: 0; /* Позволяет элементу сжиматься */
    max-width: 100%; /* Ограничиваем максимальную ширину */
}

/* Случайные повороты для polaroid */
.polaroid-photo:nth-child(odd) {
    transform: rotate(-2deg);
}

.polaroid-photo:nth-child(even) {
    transform: rotate(2deg);
}

.polaroid-photo:nth-child(3n) {
    transform: rotate(-1deg);
}

.polaroid-photo:nth-child(4n) {
    transform: rotate(3deg);
}

.polaroid-photo:nth-child(5n) {
    transform: rotate(-3deg);
}

/* Последняя фотография (с поросятами) - особый стиль */
.polaroid-photo.is-last {
    transform: rotate(0deg) !important;
}

/* Адаптивность */
@media (max-width: 768px) {
    .polaroid-container {
        gap: 1.5rem;
        padding: 1rem;
    }
    
    .polaroid-photo {
        width: 220px;
        min-height: 270px; /* Изменено на min-height */
        padding: 10px 10px 40px 10px;
    }
    
    /* Уменьшаем количество сердечек на мобилках */
    .scene3-bg .bg-heart:nth-child(n+11) {
        display: none;
    }
}

/* Gallery Modal - для увеличенного просмотра */
.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.gallery-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    z-index: 2;
    max-width: 85vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.modal-close {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 1.8rem;
    font-weight: 300;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 3;
}

.modal-close:hover {
    transform: scale(1.1) rotate(90deg);
    background: rgba(255, 255, 255, 0.3);
}

.modal-image {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 12px;
    display: block;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.modal-caption {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 700px;
    width: 100%;
}

.modal-title {
    color: #fff;
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: 500;
    text-align: center;
    margin: 0;
    padding: 0;
}

.modal-text {
    color: rgba(255, 255, 255, 0.9);
    font-family: var(--font-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: center;
    margin: 0;
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    white-space: pre-line;
}

.modal-caption {
    margin-top: var(--spacing-md);
    font-family: var(--font-primary);
    font-size: 1.25rem;
    color: var(--text);
    text-align: center;
}

/* ============================================
   SCENE 4: Кино-момент
   ============================================ */

#scene-4 {
    background: #000000;
    overflow: hidden;
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Затемнённый и размытый фон вокруг видео */
.cinema-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1; /* Ниже контента */
    pointer-events: none;
}

/* Film grain эффект */
.film-noise {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.015) 0px,
            transparent 0.5px,
            transparent 1px,
            rgba(255, 255, 255, 0.015) 1.5px
        ),
        repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.015) 0px,
            transparent 0.5px,
            transparent 1px,
            rgba(255, 255, 255, 0.015) 1.5px
        );
    opacity: 0.08;
    z-index: 10; /* Поверх всего, но прозрачный и не мешает */
    pointer-events: none;
    animation: film-grain 0.2s steps(6) infinite;
    mix-blend-mode: overlay;
}

@keyframes film-grain {
    0%, 100% {
        transform: translate(0, 0);
        opacity: 0.06;
    }
    25% {
        transform: translate(-1px, -1px);
        opacity: 0.08;
    }
    50% {
        transform: translate(1px, 1px);
        opacity: 0.1;
    }
    75% {
        transform: translate(-1px, 1px);
        opacity: 0.08;
    }
}

.cinema-scene {
    position: relative;
    z-index: 5; /* Выше оверлеев */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--spacing-md);
    width: 100%;
    max-width: 100%;
    visibility: visible !important;
    opacity: 1 !important;
}

.cinema-intro {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    opacity: 0;
    transform: translateY(15px);
    position: relative;
    z-index: 6;
}

.cinema-intro.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.cinema-text {
    font-family: var(--font-primary);
    font-size: clamp(1.25rem, 3vw, 2rem);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 1.5px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.9);
    line-height: 1.6;
    font-style: italic;
}

/* Контейнер для видео с letterbox эффектом */
.video-container {
    position: relative;
    width: 67.5%; /* 65-70% как указано */
    max-width: min(900px, 90vw);
    max-height: 60vh;
    margin: 0 auto;
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1), transform 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 6; /* Выше оверлеев */
    /* Letterbox эффект через padding */
    padding: 12vh 0;
    box-sizing: content-box;
    overflow: hidden;
    visibility: visible !important;
}

.video-container.visible {
    opacity: 1;
    transform: scale(1);
}

/* Cinematic zoom-in анимация во время воспроизведения */
.video-container.playing {
    animation: cinematic-zoom 30s ease-out forwards;
}

@keyframes cinematic-zoom {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.03);
    }
}

/* Film grain поверх видео */
.video-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.02) 0px,
            transparent 0.5px,
            transparent 1px,
            rgba(255, 255, 255, 0.02) 1.5px
        );
    opacity: 0.12;
    pointer-events: none;
    z-index: 2;
    border-radius: 12px;
    animation: film-grain 0.15s steps(8) infinite;
    mix-blend-mode: overlay;
}

.cinema-video {
    width: 100%;
    height: auto;
    max-height: 60vh;
    display: block;
    border-radius: 12px;
    box-shadow: 
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 25px 80px rgba(0, 0, 0, 0.95),
        0 0 200px rgba(0, 0, 0, 0.8);
    background: #000;
    cursor: pointer;
    object-fit: contain;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative;
    z-index: 7; /* Выше всех оверлеев */
    overflow: hidden;
}

/* Дополнительный film grain эффект */
.cinema-video::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, transparent 0%, rgba(255, 255, 255, 0.01) 50%, transparent 100%),
        radial-gradient(circle at 80% 50%, transparent 0%, rgba(255, 255, 255, 0.01) 50%, transparent 100%);
    pointer-events: none;
    z-index: 2;
    opacity: 0.15;
    animation: film-grain 0.18s steps(10) infinite;
    mix-blend-mode: overlay;
}

.cinema-next-wrapper {
    /* Обёртка больше не нужна для позиционирования, но оставляем для структуры */
    display: none; /* Скрываем обёртку, так как кнопка теперь fixed */
}

/* Кнопка "Далее" в сцене 4 - fixed позиционирование */
/* ВАЖНО: кнопка должна быть видна всегда на сцене 4 */
#cinemaNextBtn {
    position: fixed !important;
    left: 50% !important;
    bottom: 50px !important;
    transform: translateX(-50%) !important;
    z-index: 99999 !important; /* Максимальный z-index для видимости поверх всего */
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    width: auto !important;
    min-width: 220px !important;
    padding: 12px 32px !important;
    font-size: 1.2rem !important;
    font-weight: 600 !important;
    background: #ff6b9d !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 2px solid #ff8fb3 !important;
    border-radius: 50px !important;
    color: #fff !important;
    cursor: pointer !important;
    box-shadow: 0 8px 32px rgba(255, 107, 157, 0.6) !important;
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
}

#cinemaNextBtn:hover {
    background: #ff8fb3 !important;
    transform: translateX(-50%) translateY(-2px) !important;
    box-shadow: 0 12px 40px rgba(255, 107, 157, 0.7) !important;
}

/* Скрываем кнопку на всех сценах кроме 4 (через JS, но на всякий случай) */
body:not(:has(#scene-4.active)) #cinemaNextBtn {
    display: none !important;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .video-container {
        width: 90%;
        padding: 8vh 0;
    }
    
    .cinema-text {
        font-size: clamp(1rem, 4vw, 1.5rem);
        padding: 0 var(--spacing-md);
    }
}

/* ============================================
   SCENE 5: Мини-игра
   ============================================ */

.game-scene h2 {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 6vw, 3.5rem);
    margin-bottom: var(--spacing-md);
}

.game-container {
    background: var(--glass);
    backdrop-filter: var(--blur-md);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: var(--spacing-lg);
    margin-top: var(--spacing-md);
}

.game-score {
    display: flex;
    justify-content: space-around;
    margin-bottom: var(--spacing-md);
    font-family: var(--font-secondary);
    font-size: 1.125rem;
    font-weight: 600;
}

.game-area {
    position: relative;
    width: 100%;
    height: 400px;
    background: linear-gradient(180deg, var(--bg2) 0%, var(--bg1) 100%);
    border-radius: 12px;
    overflow: hidden;
    margin: var(--spacing-md) 0;
    cursor: none;
}

.game-basket {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 60px;
    background: var(--accent);
    border-radius: 50% 50% 0 0;
    box-shadow: 0 -4px 16px var(--shadow);
    transition: left 0.1s linear;
    z-index: 10;
}

.game-basket::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 10px;
    right: 10px;
    height: 20px;
    background: var(--accent-light);
    border-radius: 50% 50% 0 0;
}

.game-heart {
    position: absolute;
    font-size: 2rem;
    color: var(--accent);
    pointer-events: none;
    user-select: none;
    filter: drop-shadow(0 2px 4px var(--shadow));
    will-change: transform;
    transition: transform 0.1s linear;
}

.game-instructions {
    margin-top: var(--spacing-md);
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
}

.game-complete {
    margin-top: var(--spacing-md);
    text-align: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all var(--transition-normal);
}

.game-complete.show {
    opacity: 1;
    transform: scale(1);
}

.complete-message {
    font-family: var(--font-primary);
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: var(--spacing-md);
}

/* ============================================
   SCENE 6: Нарастание эмоций
   ============================================ */

#scene-6 {
    background: linear-gradient(135deg, var(--bg3) 0%, var(--bg2) 50%, var(--bg1) 100%);
    position: relative;
    overflow: hidden;
    height: 100vh;
    min-height: 100vh;
    max-height: 100vh;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

#scene-6.active {
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
}

/* Размытый и мягкий фон */
#scene-6::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(255, 107, 157, 0.05) 0%, transparent 70%);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 1;
    pointer-events: none;
}

/* Canvas для линии за курсором */
.cursor-trail-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5; /* Выше фотографий (z-index: 1), но ниже карточек (z-index: 10) */
    opacity: 0;
    transition: opacity 0.3s ease;
    background: transparent !important; /* ВАЖНО: никакого фона */
}

.cursor-trail-canvas.active {
    opacity: 1;
    background: transparent !important; /* ВАЖНО: никакого фона даже когда активен */
}

/* Фоновый слой с фотографиями воспоминаний */
.memories-background {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    overflow: visible !important;
    z-index: 1 !important;
    pointer-events: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
    inset: 0;
    background: transparent !important;
}

/* Принудительно показываем контейнер на активной сцене 6 */
#scene-6.active .memories-background {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* ============================================
   ЛЕТЯЩИЕ ФОТОГРАФИИ
   ============================================ */
.flying-photo {
    position: fixed !important;
    object-fit: cover !important;
    border-radius: 8px !important;
    opacity: 0.25 !important;
    filter: blur(4px) !important;
    -webkit-filter: blur(4px) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
    pointer-events: none !important;
    z-index: 1 !important;
    visibility: visible !important;
    display: block !important;
    will-change: transform, opacity;
}

/* Анимация падения фотографий */
@keyframes photo-fall {
    from {
        transform: translateY(-200px) translateX(0) rotate(0deg);
        opacity: 0;
    }
    5% {
        opacity: 0.25;
    }
    95% {
        opacity: 0.25;
    }
    to {
        transform: translateY(calc(100vh + 200px)) translateX(0) rotate(5deg);
        opacity: 0;
    }
}

/* Вариации анимации для разных фотографий */
.flying-photo:nth-child(odd) {
    animation-name: photo-fall-left !important;
}

.flying-photo:nth-child(even) {
    animation-name: photo-fall-right !important;
}

@keyframes photo-fall-left {
    from {
        transform: translateY(-200px) translateX(-30px) rotate(-5deg);
        opacity: 0;
    }
    5% {
        opacity: 0.25;
    }
    95% {
        opacity: 0.25;
    }
    to {
        transform: translateY(calc(100vh + 200px)) translateX(-50px) rotate(3deg);
        opacity: 0;
    }
}

@keyframes photo-fall-right {
    from {
        transform: translateY(-200px) translateX(30px) rotate(5deg);
        opacity: 0;
    }
    5% {
        opacity: 0.25;
    }
    95% {
        opacity: 0.25;
    }
    to {
        transform: translateY(calc(100vh + 200px)) translateX(50px) rotate(-3deg);
        opacity: 0;
    }
}


.bokeh-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.bokeh-circle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 107, 157, 0.2) 0%, transparent 70%);
    animation: bokeh-float 20s infinite ease-in-out;
}

@keyframes bokeh-float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translate(100px, -100px) scale(1.5);
        opacity: 0.6;
    }
}

.reasons-scene {
    position: relative;
    z-index: 10 !important;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 1 !important;
    visibility: visible !important;
}

.reasons-scene h2 {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 6vw, 3.5rem);
    margin-bottom: var(--spacing-lg);
    position: relative;
    z-index: 10;
    opacity: 1 !important;
    visibility: visible !important;
    color: var(--text) !important;
}

/* Принудительно показываем заголовок на активной сцене 6 */
#scene-6.active .reasons-scene h2 {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

.reasons-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
    position: relative;
    z-index: 10;
    opacity: 1 !important;
    visibility: visible !important;
}

.reason-card {
    background: var(--glass);
    backdrop-filter: var(--blur-md);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: var(--spacing-md);
    text-align: left;
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 16px var(--shadow);
    position: relative;
    z-index: 10;
    min-height: 100px;
    visibility: visible !important;
    display: block !important;
}

.reason-card.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Fallback: если карточки не анимируются, показываем их через 1 секунду */
#scene-6.active .reason-card {
    animation: fadeInCard 0.5s ease-out 1s forwards;
}

/* Принудительно показываем карточки на активной сцене 6 */
#scene-6.active .reason-card {
    opacity: 1 !important;
    transform: translateY(0) !important;
    visibility: visible !important;
}

@keyframes fadeInCard {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reason-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 32px var(--shadow-glow);
    border-color: var(--accent);
}

.reason-title {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--accent);
}

.reason-text {
    font-family: var(--font-secondary);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.final-line {
    font-family: var(--font-primary);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-top: var(--spacing-lg);
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--transition-slow);
    position: relative;
    z-index: 10;
}

/* Принудительно показываем финальную строку на активной сцене 6 */
#scene-6.active .final-line.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
    visibility: visible !important;
}

.final-line.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   SCENE 7: Вопрос
   ============================================ */

.question-scene {
    padding: var(--spacing-xl) var(--spacing-md);
}

.big-question {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 7vw, 4rem);
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: var(--spacing-xl);
    background: linear-gradient(135deg, var(--text) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.answer-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    max-width: 500px;
    margin: 0 auto;
}

.answer-btn {
    padding: var(--spacing-md) var(--spacing-lg);
    font-family: var(--font-secondary);
    font-size: 1.125rem;
    font-weight: 600;
    border: 2px solid var(--glass-border);
    border-radius: 50px;
    background: var(--glass);
    backdrop-filter: var(--blur-md);
    color: var(--text);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.answer-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.answer-btn:hover::before {
    width: 300px;
    height: 300px;
}

.answer-btn:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 8px 32px var(--shadow-glow);
}

.answer-btn.yes-btn:hover {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
}

.answer-btn.shy-btn:hover {
    background: linear-gradient(135deg, #ffb3d9 0%, #ff8fb3 100%);
}

.answer-btn.think-btn:hover {
    background: linear-gradient(135deg, var(--card-hover) 0%, var(--glass) 100%);
}

.answer-btn.no-btn:hover {
    background: linear-gradient(135deg, rgba(255, 100, 100, 0.2) 0%, rgba(255, 150, 150, 0.2) 100%);
    border-color: rgba(255, 100, 100, 0.5);
}

/* Сообщение об ошибке */
.error-message {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-md);
    background: rgba(255, 50, 50, 0.1);
    border: 2px solid rgba(255, 100, 100, 0.3);
    border-radius: 12px;
    backdrop-filter: var(--blur-md);
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
    transition: all 0.3s ease;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.error-message.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: all;
}

.error-message.minimized {
    opacity: 0.5;
    transform: scale(0.95);
    padding: var(--spacing-sm);
}

.error-title {
    font-family: var(--font-secondary);
    font-size: 1.25rem;
    font-weight: 700;
    color: #ff6b6b;
    margin-bottom: var(--spacing-xs);
}

.error-text {
    font-family: var(--font-secondary);
    font-size: 1rem;
    color: var(--text);
    margin-bottom: var(--spacing-xs);
    line-height: 1.5;
}

.error-hint {
    font-family: var(--font-secondary);
    font-size: 0.875rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Shake анимация для кнопки "Нет" */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

.answer-btn.shaking {
    animation: shake 0.5s ease-in-out;
}

.effects-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.confetti-heart {
    position: absolute;
    font-size: 1.5rem;
    color: var(--accent);
    pointer-events: none;
    user-select: none;
    animation: confetti-fall 3s ease-out forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-50px) rotate(0deg) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg) scale(0.5);
        opacity: 0;
    }
}

/* ============================================
   ENDING SCREEN
   ============================================ */

.ending-scene {
    background: var(--bg1);
}

.ending-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.3;
    z-index: 1;
}

.ending-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(10, 10, 15, 0.7) 0%, rgba(10, 10, 15, 0.9) 100%);
}

.ending-content {
    position: relative;
    z-index: 2;
    max-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    /* Скрытие скроллбаров */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

/* Скрытие скроллбаров в WebKit браузерах */
.ending-content::-webkit-scrollbar {
    display: none;
}

.ending-message {
    font-family: var(--font-primary);
    font-size: clamp(1.5rem, 5vw, 3rem);
    line-height: 1.4;
    margin-bottom: var(--spacing-xl);
    opacity: 0;
    transform: translateY(30px);
}

.ending-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    max-width: 400px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(30px);
}

/* ============================================
   CONTRACT STYLES
   ============================================ */

.contract-container {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-lg);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    overflow-x: hidden;
    /* Скрытие скроллбаров */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

/* Скрытие скроллбаров в WebKit браузерах */
.contract-container::-webkit-scrollbar {
    display: none;
}

.contract-title {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 5vw, 3rem);
    text-align: center;
    margin-bottom: var(--spacing-xl);
    color: var(--text);
}

.contract-document {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: var(--blur-md);
    border: 2px solid var(--glass-border);
    border-radius: 16px;
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.contract-text {
    font-family: var(--font-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text);
}

.contract-text p {
    margin-bottom: var(--spacing-md);
}

.contract-text ul {
    margin: var(--spacing-md) 0;
    padding-left: var(--spacing-lg);
}

.contract-text li {
    margin-bottom: var(--spacing-sm);
}

/* Выделение важного пункта */
.contract-text li.highlighted-clause {
    font-style: italic;
    text-decoration: underline;
    background: linear-gradient(180deg, transparent 0%, rgba(255, 107, 157, 0.15) 50%, transparent 100%);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-left: 3px solid var(--accent);
    margin: var(--spacing-md) 0;
    font-weight: 500;
}

/* Секция подписи */
.signature-section {
    margin: var(--spacing-xl) 0;
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

#signatureCanvas {
    width: 100%;
    max-width: 400px;
    height: 150px;
    border: 2px dashed var(--glass-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    cursor: crosshair;
    display: block;
    margin: 0 auto var(--spacing-md);
    touch-action: none;
}

#signatureCanvas.signed {
    border-color: var(--accent);
    background: rgba(255, 107, 157, 0.1);
    cursor: default;
}

.signature-controls {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

.signature-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    font-family: var(--font-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    border: 2px solid var(--glass-border);
    border-radius: 8px;
    background: var(--glass);
    backdrop-filter: var(--blur-sm);
    color: var(--text);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.signature-btn:hover:not(:disabled) {
    border-color: var(--accent);
    background: rgba(255, 107, 157, 0.2);
    transform: translateY(-2px);
}

.signature-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.signature-btn.sign-btn:not(:disabled) {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    border-color: var(--accent);
}

.signature-status {
    text-align: center;
    margin-top: var(--spacing-sm);
    font-family: var(--font-secondary);
    font-size: 1rem;
    color: var(--accent);
    min-height: 24px;
}

.signature-status.signed {
    font-weight: 600;
}

/* Секция секретного слова */
.secret-word-section {
    margin: var(--spacing-xl) 0;
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.secret-word-label {
    font-family: var(--font-primary);
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: var(--spacing-md);
    color: var(--text);
    letter-spacing: 2px;
}

.secret-word-options {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

.secret-word-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    font-family: var(--font-secondary);
    font-size: 1rem;
    font-weight: 500;
    border: 2px solid var(--glass-border);
    border-radius: 8px;
    background: var(--glass);
    backdrop-filter: var(--blur-sm);
    color: var(--text);
    cursor: pointer;
    transition: all var(--transition-fast);
    min-width: 120px;
}

.secret-word-btn:hover {
    border-color: var(--accent);
    background: rgba(255, 107, 157, 0.2);
    transform: translateY(-2px);
}

.secret-word-btn.selected {
    border-color: var(--accent);
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: #fff;
}

.secret-word-btn.wrong {
    animation: shake 0.5s ease-in-out;
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.2);
}

.secret-word-status {
    text-align: center;
    font-family: var(--font-secondary);
    font-size: 0.95rem;
    color: var(--text-muted);
    min-height: 24px;
}

.secret-word-status.wrong {
    color: #ff6b6b;
}

.secret-word-status.correct {
    color: var(--accent);
    font-weight: 600;
}

.contract-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    max-width: 400px;
    margin: 0 auto;
}

#confirmContractBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   SCENE 8: Финал + встреча
   ============================================ */

#scene-8 {
    background: var(--bg1);
    position: relative;
    overflow: visible;
    min-height: 100vh;
}

/* Фон с плавающими сердечками */
.scene8-background {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.scene8-heart {
    position: absolute;
    width: 40px;
    height: 40px;
    opacity: 0;
    filter: blur(6px);
    -webkit-filter: blur(6px);
    will-change: transform, opacity;
}

.scene8-heart::before {
    content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ff6b9d'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E");
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 107, 157, 0.3);
}

.scene8-heart.size-small { width: 30px; height: 30px; filter: blur(4px); }
.scene8-heart.size-medium { width: 50px; height: 50px; filter: blur(8px); }
.scene8-heart.size-large { width: 70px; height: 70px; filter: blur(12px); }

.scene8-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-md);
    max-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    /* Скрытие скроллбаров */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

/* Скрытие скроллбаров в WebKit браузерах */
.scene8-content::-webkit-scrollbar {
    display: none;
}

.scene8-title {
    font-family: var(--font-primary);
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    font-weight: 400;
    text-align: center;
    margin-bottom: var(--spacing-md);
    color: var(--text);
    background: linear-gradient(135deg, var(--text) 0%, var(--accent-light) 50%, var(--text) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(255, 107, 157, 0.3);
    position: relative;
}

.scene8-subtitle {
    font-family: var(--font-secondary);
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    text-align: center;
    margin-bottom: var(--spacing-xl);
    color: var(--text-muted);
    line-height: 1.6;
    font-weight: 300;
}

/* Карточка встречи */
.meeting-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: var(--blur-md);
    border: 2px solid var(--glass-border);
    border-radius: 20px;
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.meeting-card-stamp {
    position: absolute;
    top: 20px;
    right: 20px;
    font-family: var(--font-primary);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
    opacity: 0;
    transform: rotate(-45deg);
    text-shadow: 0 2px 10px rgba(255, 107, 157, 0.5);
    z-index: 10;
}

.meeting-card-content {
    position: relative;
    z-index: 1;
}

.meeting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.meeting-label {
    font-family: var(--font-secondary);
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}

.meeting-value {
    font-family: var(--font-primary);
    font-size: 1.25rem;
    color: var(--text);
    font-weight: 400;
}

.meeting-message {
    font-family: var(--font-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text);
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-md);
    background: rgba(255, 107, 157, 0.1);
    border-left: 3px solid var(--accent);
    border-radius: 8px;
    font-style: italic;
}

.meeting-footer {
    font-family: var(--font-primary);
    font-size: 1.3rem;
    text-align: center;
    color: var(--accent);
    margin-top: var(--spacing-lg);
    font-weight: 400;
}

/* Секция с картой */
.map-section {
    margin: var(--spacing-xl) 0;
    text-align: center;
}

.map-iframe {
    width: 100%;
    max-width: 600px;
    height: 300px;
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    margin-bottom: var(--spacing-md);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.map-caption {
    font-family: var(--font-secondary);
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-sm);
}

.map-link-btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-md);
    font-family: var(--font-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    border: 1px solid var(--accent);
    border-radius: 8px;
    transition: all var(--transition-fast);
}

.map-link-btn:hover {
    background: rgba(255, 107, 157, 0.2);
    transform: translateY(-2px);
}

/* Кнопки сцены 8 */
.scene8-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    max-width: 400px;
    margin: var(--spacing-xl) auto 0;
}

.scene8-actions .cta-button {
    width: 100%;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .scene8-heart.size-large {
        display: none;
    }
    
    .meeting-card {
        padding: var(--spacing-md);
    }
    
    .meeting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-xs);
    }
    
    .map-iframe {
        height: 250px;
    }
}

/* ============================================
   BUTTONS
   ============================================ */

.cta-button {
    padding: var(--spacing-sm) var(--spacing-lg);
    font-family: var(--font-secondary);
    font-size: 1.125rem;
    font-weight: 600;
    border: 2px solid var(--glass-border);
    border-radius: 50px;
    background: var(--glass);
    backdrop-filter: var(--blur-md);
    color: var(--text);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    margin-top: var(--spacing-md);
    display: inline-block;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 107, 157, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cta-button:hover::before {
    width: 300px;
    height: 300px;
}

.cta-button:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 8px 32px var(--shadow-glow);
    background: var(--card-hover);
}

.cta-button.primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    border-color: var(--accent);
}

.cta-button.primary:hover {
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
    box-shadow: 0 12px 40px var(--shadow-glow);
}

.cta-button.secondary {
    background: transparent;
    border-color: var(--text-muted);
}

.cta-button.secondary:hover {
    border-color: var(--text);
    background: var(--glass);
}

/* Ripple Effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    :root {
        --spacing-lg: 2rem;
        --spacing-xl: 3rem;
    }
    
    .scene-content {
        padding: var(--spacing-md) var(--spacing-sm);
    }
    
    .progress-indicator {
        top: var(--spacing-sm);
        right: var(--spacing-sm);
    }
    
    .sound-toggle {
        top: var(--spacing-sm);
        left: var(--spacing-sm);
        padding: 0.375rem var(--spacing-xs);
        font-size: 0.75rem;
    }
    
    .memory-card {
        width: 240px;
        height: 180px;
    }
    
    .polaroid-photo {
        width: 220px;
        min-height: 270px; /* Изменено на min-height */
        padding: 10px 10px 40px 10px;
    }
    
    .game-area {
        height: 300px;
    }
    
    .game-basket {
        width: 80px;
        height: 50px;
    }
    
    .reasons-container {
        grid-template-columns: 1fr;
    }
    
    .answer-buttons {
        gap: var(--spacing-sm);
    }
    
    .answer-btn {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .polaroid-photo {
        width: 180px;
        min-height: 220px; /* Изменено на min-height */
        padding: 8px 8px 35px 8px;
    }
    
    .memory-card {
        width: 200px;
        height: 150px;
    }
    
    .card-content {
        font-size: 1.25rem;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.5s ease-in forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
