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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow-x: hidden;
    background: #000;
    color: #fff;
    -webkit-overflow-scrolling: touch;
    cursor: none;
}

/* Кастомный курсор */
.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid #ffb3c1;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 99999;
    transition: transform 0.15s ease, opacity 0.15s ease;
    mix-blend-mode: difference;
}

.custom-cursor.click {
    transform: scale(0.8);
}

/* Показываем обычный курсор в модальном окне */
.modal-overlay,
.modal-overlay * {
    cursor: auto !important;
}

/* Сердечки за курсором */
.heart-trail {
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    font-size: 20px;
    animation: floatHeart 1.2s ease-out forwards;
    user-select: none;
}

@keyframes floatHeart {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(-80px) scale(0.6) rotate(10deg);
    }
}

/* Начальный экран с сердцем */
.intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #000 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

.intro-screen.active {
    opacity: 1;
    pointer-events: all;
}

.intro-screen.hide {
    opacity: 0;
    pointer-events: none;
}

.heart-container {
    animation: heartBeat 1.5s ease-in-out infinite;
    transition: all 2.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.heart-container.shrink {
    animation: none;
    transform: scale(0.15) translateY(-50vh);
    opacity: 0.2;
}

.heart {
    width: 150px;
    height: 150px;
    fill: #ff4d6d;
    filter: drop-shadow(0 0 30px rgba(255, 77, 109, 0.8));
    animation: heartPulse 1.5s ease-in-out infinite;
}

.heart-container.shrink .heart {
    animation: none;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    10% { transform: scale(1.1); }
    20% { transform: scale(1); }
    30% { transform: scale(1.15); }
    40% { transform: scale(1); }
}

@keyframes heartPulse {
    0%, 100% { filter: drop-shadow(0 0 30px rgba(255, 77, 109, 0.8)); }
    50% { filter: drop-shadow(0 0 50px rgba(255, 77, 109, 1)); }
}

/* Экран "Нажмите чтобы продолжить" */
.continue-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 15vh;
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.2s ease;
    background: transparent;
}

.continue-screen.active {
    opacity: 1;
    pointer-events: all;
}

.continue-text {
    font-size: 28px;
    color: #ffb3c1;
    text-align: center;
    padding: 0;
    border: none;
    cursor: pointer;
    animation: gentlePulse 2.5s ease-in-out infinite;
    font-weight: 300;
    letter-spacing: 1px;
    text-shadow: 0 0 20px rgba(255, 179, 193, 0.5);
}

@keyframes gentlePulse {
    0%, 100% {
        opacity: 0.7;
        transform: scale(1);
        text-shadow: 0 0 20px rgba(255, 179, 193, 0.5);
    }
    50% {
        opacity: 1;
        transform: scale(1.02);
        text-shadow: 0 0 30px rgba(255, 179, 193, 0.8);
    }
}

/* Основной контент */
.main-content {
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.5s ease;
}

.main-content.active {
    opacity: 1;
    pointer-events: all;
    animation: contentFadeIn 1.5s ease;
}

@keyframes contentFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Индикатор прогресса */
.progress-indicator {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 100;
    padding: 15px 25px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 30px;
}

.progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.4s ease;
    cursor: pointer;
}

.progress-dot.active {
    background: #ffb3c1;
    box-shadow: 0 0 15px rgba(255, 179, 193, 0.8);
    transform: scale(1.3);
}

/* Контейнер ступеней */
.stages-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.stages-container::-webkit-scrollbar {
    display: none;
}

/* Ступени */
.stage {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    overflow: hidden;
}

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

.stage-content, .game-content {
    position: relative;
    z-index: 10;
    max-width: 600px;
    padding: 40px 30px;
    text-align: center;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    border-radius: 30px;
    margin: 0 20px;
    animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stage-title {
    font-size: 32px;
    margin-bottom: 25px;
    color: #ffb3c1;
    font-weight: 600;
}

.stage-text {
    font-size: 18px;
    line-height: 1.8;
    color: #fff;
    margin-bottom: 30px;
}

/* Фото сетка */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 30px;
}

.photo-item {
    aspect-ratio: 1;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.photo-item:hover {
    transform: scale(1.05);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Фон 1: Рассвет */
.sunrise {
    background: linear-gradient(to bottom,
        #0a0e27 0%,
        #1a1f3a 10%,
        #2d1b4e 20%,
        #4a2c5c 30%,
        #7a3d6f 40%,
        #b85080 50%,
        #e8647c 60%,
        #ff8b6d 70%,
        #ffb080 80%,
        #ffd4a3 90%,
        #ffe9c2 100%
    );
}

.sun {
    position: absolute;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle,
        #ffffff 0%,
        #fff9e6 15%,
        #ffe4b5 25%,
        #ffd700 40%,
        #ffb347 55%,
        #ff8c42 70%,
        rgba(255, 140, 66, 0.6) 85%,
        transparent 100%
    );
    border-radius: 50%;
    animation: sunriseGlow 4s ease-in-out infinite;
    box-shadow:
        0 0 80px rgba(255, 215, 0, 0.8),
        0 0 120px rgba(255, 165, 0, 0.6),
        0 0 180px rgba(255, 140, 0, 0.4);
}

@keyframes sunriseGlow {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
        box-shadow:
            0 0 80px rgba(255, 215, 0, 0.8),
            0 0 120px rgba(255, 165, 0, 0.6),
            0 0 180px rgba(255, 140, 0, 0.4);
    }
    50% {
        transform: translateX(-50%) translateY(-8px);
        box-shadow:
            0 0 100px rgba(255, 215, 0, 1),
            0 0 150px rgba(255, 165, 0, 0.8),
            0 0 220px rgba(255, 140, 0, 0.6);
    }
}

.rays {
    position: absolute;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: 500px;
    pointer-events: none;
}

.rays::before,
.rays::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 235, 150, 0.4) 20%,
        rgba(255, 220, 100, 0.8) 40%,
        rgba(255, 200, 80, 1) 50%,
        rgba(255, 220, 100, 0.8) 60%,
        rgba(255, 235, 150, 0.4) 80%,
        transparent 100%
    );
    box-shadow: 0 0 30px rgba(255, 215, 100, 0.5);
    animation: rotateRays 20s linear infinite;
    transform-origin: center;
    border-radius: 50%;
}

.rays::after {
    transform: rotate(60deg);
    animation-delay: -6.66s;
}

@keyframes rotateRays {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Фон 2: День */
.daytime {
    background: linear-gradient(to bottom,
        #1e5a9a 0%,
        #2872b8 15%,
        #4a90e2 30%,
        #6ba8e8 45%,
        #8dc1ef 60%,
        #b0d8f5 75%,
        #d4effc 90%,
        #e8f7ff 100%
    );
}

.bright {
    position: absolute;
    top: 12%;
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    height: 160px;
    background: radial-gradient(circle,
        #ffffff 0%,
        #fffef0 20%,
        #fffacd 35%,
        #ffeb3b 50%,
        rgba(255, 235, 59, 0.7) 70%,
        rgba(255, 235, 59, 0.3) 85%,
        transparent 100%
    );
    border-radius: 50%;
    animation: sunShine 5s ease-in-out infinite;
    box-shadow:
        0 0 100px rgba(255, 250, 150, 0.9),
        0 0 150px rgba(255, 235, 59, 0.7),
        0 0 200px rgba(255, 235, 59, 0.4);
}

@keyframes sunShine {
    0%, 100% {
        box-shadow:
            0 0 100px rgba(255, 250, 150, 0.9),
            0 0 150px rgba(255, 235, 59, 0.7),
            0 0 200px rgba(255, 235, 59, 0.4);
    }
    50% {
        box-shadow:
            0 0 120px rgba(255, 250, 150, 1),
            0 0 180px rgba(255, 235, 59, 0.9),
            0 0 240px rgba(255, 235, 59, 0.6);
    }
}

.cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 100px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 -5px 20px rgba(200, 220, 240, 0.3);
}

.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 100px;
    box-shadow: inset 0 -5px 20px rgba(200, 220, 240, 0.2);
}

.cloud1 {
    width: 140px;
    height: 50px;
    top: 18%;
    left: 8%;
    animation: float1 25s ease-in-out infinite;
}

.cloud1::before {
    width: 60px;
    height: 60px;
    top: -30px;
    left: 20px;
}

.cloud1::after {
    width: 70px;
    height: 50px;
    top: -25px;
    right: 20px;
}

.cloud2 {
    width: 120px;
    height: 45px;
    top: 32%;
    right: 10%;
    animation: float2 30s ease-in-out infinite;
}

.cloud2::before {
    width: 55px;
    height: 55px;
    top: -28px;
    left: 22px;
}

.cloud2::after {
    width: 65px;
    height: 45px;
    top: -22px;
    right: 22px;
}

.cloud3 {
    width: 100px;
    height: 40px;
    top: 52%;
    left: 15%;
    animation: float3 27s ease-in-out infinite;
}

.cloud3::before {
    width: 48px;
    height: 48px;
    top: -24px;
    left: 18px;
}

.cloud3::after {
    width: 58px;
    height: 38px;
    top: -19px;
    right: 18px;
}

@keyframes float1 {
    0%, 100% { transform: translateX(0) translateY(0); }
    50% { transform: translateX(50px) translateY(-20px); }
}

@keyframes float2 {
    0%, 100% { transform: translateX(0) translateY(0); }
    50% { transform: translateX(-60px) translateY(25px); }
}

@keyframes float3 {
    0%, 100% { transform: translateX(0) translateY(0); }
    50% { transform: translateX(40px) translateY(-30px); }
}

/* Фон 3: Гроза */
.storm {
    background: linear-gradient(to bottom,
        #0d0d1a 0%,
        #1a1a2e 15%,
        #252640 30%,
        #2d3147 45%,
        #353d52 60%,
        #3d485e 75%,
        #455469 90%,
        #4d5f75 100%
    );
}

/* Серые грозовые облака */
.dark-clouds {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.storm-cloud {
    position: absolute;
    background: linear-gradient(to bottom,
        rgba(60, 65, 80, 0.95) 0%,
        rgba(45, 50, 65, 0.98) 50%,
        rgba(30, 35, 50, 1) 100%
    );
    border-radius: 50%;
    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.5),
        inset 0 -10px 30px rgba(20, 25, 40, 0.7);
}

.storm-cloud::before,
.storm-cloud::after {
    content: '';
    position: absolute;
    background: linear-gradient(to bottom,
        rgba(55, 60, 75, 0.95),
        rgba(40, 45, 60, 0.98)
    );
    border-radius: 50%;
    box-shadow: inset 0 -8px 25px rgba(20, 25, 40, 0.6);
}

.storm-cloud1 {
    width: 180px;
    height: 70px;
    top: 10%;
    left: 5%;
    animation: cloudDrift1 35s ease-in-out infinite;
}

.storm-cloud1::before {
    width: 80px;
    height: 80px;
    top: -40px;
    left: 25px;
}

.storm-cloud1::after {
    width: 95px;
    height: 70px;
    top: -35px;
    right: 25px;
}

.storm-cloud2 {
    width: 200px;
    height: 80px;
    top: 15%;
    right: 8%;
    animation: cloudDrift2 40s ease-in-out infinite;
}

.storm-cloud2::before {
    width: 90px;
    height: 90px;
    top: -45px;
    left: 30px;
}

.storm-cloud2::after {
    width: 105px;
    height: 75px;
    top: -38px;
    right: 30px;
}

.storm-cloud3 {
    width: 160px;
    height: 65px;
    top: 25%;
    left: 35%;
    animation: cloudDrift3 38s ease-in-out infinite;
}

.storm-cloud3::before {
    width: 75px;
    height: 75px;
    top: -38px;
    left: 22px;
}

.storm-cloud3::after {
    width: 85px;
    height: 60px;
    top: -30px;
    right: 22px;
}

.storm-cloud4 {
    width: 170px;
    height: 68px;
    top: 35%;
    left: 12%;
    animation: cloudDrift1 42s ease-in-out infinite;
}

.storm-cloud4::before {
    width: 78px;
    height: 78px;
    top: -39px;
    left: 24px;
}

.storm-cloud4::after {
    width: 88px;
    height: 65px;
    top: -32px;
    right: 24px;
}

.storm-cloud5 {
    width: 190px;
    height: 75px;
    top: 32%;
    right: 15%;
    animation: cloudDrift2 36s ease-in-out infinite;
}

.storm-cloud5::before {
    width: 85px;
    height: 85px;
    top: -42px;
    left: 28px;
}

.storm-cloud5::after {
    width: 98px;
    height: 70px;
    top: -35px;
    right: 28px;
}

@keyframes cloudDrift1 {
    0%, 100% { transform: translateX(0) translateY(0); }
    33% { transform: translateX(20px) translateY(-10px); }
    66% { transform: translateX(-15px) translateY(8px); }
}

@keyframes cloudDrift2 {
    0%, 100% { transform: translateX(0) translateY(0); }
    33% { transform: translateX(-25px) translateY(12px); }
    66% { transform: translateX(18px) translateY(-8px); }
}

@keyframes cloudDrift3 {
    0%, 100% { transform: translateX(0) translateY(0); }
    50% { transform: translateX(15px) translateY(-15px); }
}

/* Дождь из облаков - КРУПНЫЕ КАПЛИ */
.rain-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
}

.rain-drop {
    position: absolute;
    width: 3px;
    height: 25px;
    background: linear-gradient(to bottom,
        rgba(180, 200, 240, 0.3) 0%,
        rgba(180, 200, 240, 0.9) 40%,
        rgba(200, 220, 255, 1) 100%
    );
    border-radius: 0 0 3px 3px;
    animation: rainFall linear infinite;
    opacity: 0.9;
    box-shadow: 0 0 3px rgba(180, 200, 240, 0.5);
}

@keyframes rainFall {
    0% {
        transform: translateY(0);
        opacity: 0;
    }
    10% {
        opacity: 0.9;
    }
    90% {
        opacity: 0.9;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* Молнии */
.lightning {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4;
    opacity: 0;
    pointer-events: none;
}

.lightning::before {
    content: '';
    position: absolute;
    top: 12%;
    left: 32%;
    width: 6px;
    height: 40%;
    background: linear-gradient(to bottom,
        #ffffff 0%,
        #f0f8ff 25%,
        #e0f3ff 40%,
        #b3e0ff 60%,
        #7dd3fc 75%,
        rgba(125, 211, 252, 0.5) 90%,
        transparent 100%
    );
    box-shadow:
        0 0 40px #ffffff,
        0 0 80px #b3e0ff,
        0 0 120px #7dd3fc,
        0 0 160px rgba(59, 130, 246, 0.6);
    clip-path: polygon(
        42% 0%,
        48% 22%,
        58% 22%,
        52% 32%,
        68% 32%,
        45% 52%,
        52% 52%,
        28% 100%,
        48% 58%,
        42% 58%,
        48% 38%,
        42% 38%
    );
    animation: lightningFlash 5s ease-in-out infinite;
    filter: brightness(1.5);
}

.lightning::after {
    content: '';
    position: absolute;
    top: 18%;
    right: 28%;
    width: 5px;
    height: 35%;
    background: linear-gradient(to bottom,
        #ffffff 0%,
        #f0f8ff 25%,
        #e0f3ff 40%,
        #b3e0ff 60%,
        #7dd3fc 75%,
        rgba(125, 211, 252, 0.5) 90%,
        transparent 100%
    );
    box-shadow:
        0 0 40px #ffffff,
        0 0 80px #b3e0ff,
        0 0 120px #7dd3fc,
        0 0 160px rgba(59, 130, 246, 0.6);
    clip-path: polygon(
        42% 0%,
        52% 28%,
        62% 28%,
        48% 42%,
        64% 42%,
        38% 68%,
        48% 68%,
        22% 100%,
        52% 72%,
        46% 72%,
        52% 48%,
        42% 48%
    );
    animation: lightningFlash 5s ease-in-out 2.5s infinite;
    filter: brightness(1.5);
}

@keyframes lightningFlash {
    0%, 92%, 100% {
        opacity: 0;
        filter: brightness(1);
    }
    93%, 95%, 97% {
        opacity: 1;
        filter: brightness(3);
    }
    94%, 96% {
        opacity: 0.4;
        filter: brightness(2);
    }
}

/* Фон 4: Закат */
.sunset {
    background: linear-gradient(to bottom,
        #1a0d2e 0%,
        #2e1a47 8%,
        #4a2858 16%,
        #6a3a6a 24%,
        #8d4e7c 32%,
        #b8628e 40%,
        #e0779b 48%,
        #f89d9f 56%,
        #ffb599 64%,
        #ffca95 72%,
        #ffd9a8 80%,
        #ffe8c2 88%,
        #fff5de 96%,
        #fffef5 100%
    );
}

.sunset-sun {
    position: absolute;
    bottom: 18%;
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    height: 220px;
    background: radial-gradient(circle,
        #ffffff 0%,
        #fff8e1 12%,
        #ffe4b5 20%,
        #ffb380 35%,
        #ff8c69 48%,
        #ff6b6b 60%,
        rgba(255, 107, 107, 0.7) 75%,
        rgba(255, 107, 107, 0.4) 88%,
        transparent 100%
    );
    border-radius: 50%;
    animation: sunsetGlow 7s ease-in-out infinite;
    box-shadow:
        0 0 100px rgba(255, 200, 150, 0.9),
        0 0 160px rgba(255, 140, 105, 0.7),
        0 0 240px rgba(255, 107, 107, 0.5);
}

@keyframes sunsetGlow {
    0%, 100% {
        box-shadow:
            0 0 100px rgba(255, 200, 150, 0.9),
            0 0 160px rgba(255, 140, 105, 0.7),
            0 0 240px rgba(255, 107, 107, 0.5);
        transform: translateX(-50%) translateY(0);
    }
    50% {
        box-shadow:
            0 0 120px rgba(255, 200, 150, 1),
            0 0 190px rgba(255, 140, 105, 0.9),
            0 0 280px rgba(255, 107, 107, 0.7);
        transform: translateX(-50%) translateY(-6px);
    }
}

.sunset-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65%;
    background: linear-gradient(to top,
        rgba(230, 180, 180, 0.85) 0%,
        rgba(255, 160, 130, 0.6) 25%,
        rgba(255, 140, 105, 0.4) 50%,
        rgba(255, 107, 107, 0.25) 75%,
        transparent 100%
    );
}

/* Мини-игра - СЕТКА 3x2 */
.game-title {
    font-size: 32px;
    margin-bottom: 35px;
    color: #ffb3c1;
    font-weight: 600;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    max-width: 500px;
    margin: 0 auto 35px;
    padding: 25px;
}

.card {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #ffb3c1 0%, #ff8fa3 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    transform-style: preserve-3d;
    box-shadow: 0 6px 20px rgba(255, 179, 193, 0.4);
}

.card:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 12px 35px rgba(255, 179, 193, 0.6);
}

.card.flipped {
    background: rgba(255, 255, 255, 0.95);
    transform: rotateY(180deg) scale(1.05);
    box-shadow: 0 12px 40px rgba(255, 179, 193, 0.7);
}

.card.matched {
    background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
    pointer-events: none;
    animation: matchAnimation 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 12px 40px rgba(76, 175, 80, 0.7);
}

@keyframes matchAnimation {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.2) rotate(-8deg); }
    50% { transform: scale(1.15); }
    75% { transform: scale(1.2) rotate(8deg); }
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
    border-radius: 20px;
}

.card-front {
    background: linear-gradient(135deg, #ffb3c1 0%, #ff8fa3 100%);
}

.card-back {
    background: rgba(255, 255, 255, 0.95);
    transform: rotateY(180deg);
}

/* Результат игры */
.game-result {
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.game-result.active {
    opacity: 1;
    pointer-events: all;
}

.result-text {
    font-size: 26px;
    color: #ffb3c1;
    margin-bottom: 30px;
    animation: fadeIn 1s ease;
}

.copy-button {
    background: linear-gradient(135deg, #ffb3c1 0%, #ff8fa3 100%);
    color: #fff;
    border: none;
    padding: 20px 55px;
    font-size: 22px;
    border-radius: 35px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(255, 179, 193, 0.5);
}

.copy-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(255, 179, 193, 0.7);
}

.copy-button:active {
    transform: translateY(-2px) scale(0.98);
}

/* Модальное окно */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: linear-gradient(135deg, #ffb3c1 0%, #ff8fa3 100%);
    padding: 55px 45px;
    border-radius: 35px;
    text-align: center;
    max-width: 520px;
    margin: 20px;
    box-shadow: 0 25px 70px rgba(255, 107, 109, 0.7);
    transform: scale(0.8);
    animation: modalPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes modalPop {
    0% {
        transform: scale(0.8) translateY(40px);
        opacity: 0;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.modal-text {
    font-family: 'Georgia', serif;
    font-size: 30px;
    color: #fff;
    line-height: 1.65;
    margin-bottom: 35px;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
}

.modal-close {
    background: rgba(255, 255, 255, 0.95);
    color: #ff8fa3;
    border: none;
    padding: 17px 45px;
    font-size: 19px;
    border-radius: 28px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.25);
}

.modal-close:hover {
    background: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
}

.modal-close:active {
    transform: translateY(0);
}

.copied-message {
    margin-top: 25px;
    font-size: 20px;
    color: #4caf50;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.copied-message.active {
    opacity: 1;
    animation: fadeInScale 0.5s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Адаптация под мобильные */
@media (max-width: 768px) {
    body {
        cursor: auto;
    }

    .custom-cursor {
        display: none;
    }

    .heart {
        width: 120px;
        height: 120px;
    }

    .continue-text {
        font-size: 24px;
    }

    .stage-content, .game-content {
        padding: 35px 25px;
        margin: 0 15px;
    }

    .stage-title {
        font-size: 28px;
    }

    .stage-text {
        font-size: 17px;
    }

    .photo-grid {
        gap: 12px;
    }

    .cards-grid {
        gap: 18px;
        max-width: 100%;
        padding: 20px;
    }

    .card {
        font-size: 38px;
        border-radius: 16px;
    }

    .game-title {
        font-size: 26px;
    }

    .copy-button {
        padding: 17px 45px;
        font-size: 19px;
    }

    .progress-indicator {
        top: 20px;
        padding: 12px 20px;
        gap: 12px;
    }

    .progress-dot {
        width: 10px;
        height: 10px;
    }

    .modal-content {
        padding: 45px 35px;
    }

    .modal-text {
        font-size: 26px;
    }
}

@media (max-width: 430px) {
    .stage-title {
        font-size: 26px;
        margin-bottom: 20px;
    }

    .stage-text {
        font-size: 16px;
        line-height: 1.7;
    }

    .cards-grid {
        gap: 15px;
    }

    .card {
        font-size: 34px;
    }

    .photo-grid {
        gap: 10px;
    }
}

@media (min-width: 1024px) {
    .stage-content, .game-content {
        max-width: 700px;
        padding: 50px 40px;
    }

    .stage-title {
        font-size: 36px;
    }

    .stage-text {
        font-size: 20px;
    }

    .photo-grid {
        gap: 18px;
    }

    .cards-grid {
        max-width: 550px;
        gap: 28px;
    }

    .card {
        font-size: 52px;
    }
}

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