/* Tiyatro Perdesi Animasyon Stilleri - Gerçekçi Versiyon */

#curtainSection {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    overflow: hidden;
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.3);
}

/* Perdeler */
.curtain {
    position: absolute;
    top: -5%;
    width: 51%;
    height: 110%;
    z-index: 10000;
    overflow: hidden;
    filter: drop-shadow(0 0 30px rgba(0, 0, 0, 0.7));
}

/* Sol Perde - Başlangıçta tam kapalı (ekranın ortasında) */
.curtain-left {
    left: 0;
    transform-origin: right center;
    transform: translateX(0);
}

/* Sağ Perde - Başlangıçta tam kapalı (ekranın ortasında) */
.curtain-right {
    right: 0;
    transform-origin: left center;
    transform: translateX(0);
}

/* Perde Kumaşı */
.curtain-fabric {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(
            90deg,
            #660000 0%,
            #8B0000 5%,
            #A52A2A 10%,
            #DC143C 15%,
            #B22222 20%,
            #DC143C 25%,
            #A52A2A 30%,
            #8B0000 35%,
            #660000 40%,
            #8B0000 45%,
            #A52A2A 50%,
            #DC143C 55%,
            #B22222 60%,
            #DC143C 65%,
            #A52A2A 70%,
            #8B0000 75%,
            #660000 80%,
            #8B0000 85%,
            #A52A2A 90%,
            #DC143C 95%,
            #8B0000 100%
        );
    background-size: 60px 100%;
    animation: subtleSway 3s ease-in-out infinite;
}

.curtain-left .curtain-fabric {
    box-shadow: 
        inset -30px 0 60px rgba(0, 0, 0, 0.6),
        inset 10px 0 40px rgba(255, 255, 255, 0.1);
}

.curtain-right .curtain-fabric {
    box-shadow: 
        inset 30px 0 60px rgba(0, 0, 0, 0.6),
        inset -10px 0 40px rgba(255, 255, 255, 0.1);
}

/* Dalga Efekti Katmanı */
.curtain-wave {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 50%, transparent 40%, rgba(0, 0, 0, 0.3) 100%),
        radial-gradient(ellipse at 50% 30%, transparent 30%, rgba(0, 0, 0, 0.2) 100%),
        radial-gradient(ellipse at 70% 70%, transparent 35%, rgba(0, 0, 0, 0.25) 100%);
    animation: waveMotion 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 2;
}

.curtain-right .curtain-wave {
    animation: waveMotionReverse 4.5s ease-in-out infinite;
}

/* Dalgalanma Animasyonları */
@keyframes waveMotion {
    0%, 100% {
        transform: translateY(0) scaleY(1);
        opacity: 0.8;
    }
    25% {
        transform: translateY(-15px) scaleY(1.02);
        opacity: 0.9;
    }
    50% {
        transform: translateY(0) scaleY(0.98);
        opacity: 0.85;
    }
    75% {
        transform: translateY(15px) scaleY(1.01);
        opacity: 0.9;
    }
}

@keyframes waveMotionReverse {
    0%, 100% {
        transform: translateY(0) scaleY(1);
        opacity: 0.8;
    }
    25% {
        transform: translateY(15px) scaleY(0.98);
        opacity: 0.9;
    }
    50% {
        transform: translateY(0) scaleY(1.02);
        opacity: 0.85;
    }
    75% {
        transform: translateY(-15px) scaleY(1.01);
        opacity: 0.9;
    }
}

@keyframes subtleSway {
    0%, 100% {
        transform: translateX(0) skewY(0deg);
    }
    25% {
        transform: translateX(-3px) skewY(0.3deg);
    }
    50% {
        transform: translateX(0) skewY(0deg);
    }
    75% {
        transform: translateX(3px) skewY(-0.3deg);
    }
}

/* Perde Kıvrımları - 3D Efekt */
.curtain-fabric::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        90deg,
        transparent 0px,
        rgba(0, 0, 0, 0.4) 20px,
        transparent 22px,
        rgba(255, 255, 255, 0.05) 25px,
        transparent 28px,
        rgba(0, 0, 0, 0.3) 48px,
        transparent 50px,
        rgba(255, 255, 255, 0.08) 53px,
        transparent 56px
    );
    animation: fabricFold 5s ease-in-out infinite;
}

@keyframes fabricFold {
    0%, 100% {
        opacity: 1;
        transform: scaleX(1);
    }
    50% {
        opacity: 0.9;
        transform: scaleX(1.01);
    }
}

/* Perde Üst Süsleme */
.curtain::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(
        180deg,
        #4A0000 0%,
        #660000 50%,
        transparent 100%
    );
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

/* Popup İçerik */
.popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: white;
    border-radius: 25px;
    padding: 50px 40px;
    box-shadow: 
        0 30px 90px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    z-index: 10001;
    max-width: 550px;
    width: 90%;
    opacity: 0;
    text-align: center;
}

/* Popup İçeriği */
.popup-inner h1 {
    color: #DC143C;
    font-size: 2.2rem;
    margin-bottom: 20px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: popupBounce 0.6s ease-out;
}

@keyframes popupBounce {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.popup-inner p {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 35px;
    line-height: 1.6;
}

/* Detayları Gör Butonu */
.details-btn {
    background: linear-gradient(135deg, #DC143C, #B22222);
    color: white;
    border: none;
    padding: 18px 50px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 8px 20px rgba(220, 20, 60, 0.4),
        inset 0 -3px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.details-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;
}

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

.details-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 12px 30px rgba(220, 20, 60, 0.5),
        inset 0 -3px 10px rgba(0, 0, 0, 0.3);
        color: #fff !important;
}

.details-btn:active {
    transform: translateY(-1px) scale(1.02);
}

/* Kapatma Butonu */
.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    font-size: 2.5rem;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border-radius: 50%;
}

.close-btn:hover {
    color: #DC143C;
    background: rgba(220, 20, 60, 0.1);
    transform: rotate(90deg) scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    .popup-inner h1 {
        font-size: 1.6rem;
    }
    
    .popup-inner p {
        font-size: 1rem;
    }
    
    .details-btn {
        padding: 15px 35px;
        font-size: 1rem;
    }
    
    .popup-content {
        padding: 40px 25px;
    }
    
    .curtain {
        width: 60%;
    }
}

@media (max-width: 480px) {
    .curtain {
        width: 65%;
    }
}
