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

html, body {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    background-color: #0f0f14;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Existing Page Content Container */
body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    z-index: 1;
}

.container img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    display: block;
}

.content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    max-width: 100%;
}

/* Gold Glowing "Visit Website" Button */
.visit-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    background: linear-gradient(135deg, #d4af37 0%, #aa7c11 100%);
    color: #0f0f14;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-decoration: none;
    border-radius: 30px;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.visit-btn:hover {
    transform: translateY(-3px) scale(1.04);
    background: linear-gradient(135deg, #f5e6ab 0%, #d4af37 100%);
    box-shadow: 0 12px 32px rgba(212, 175, 55, 0.65);
    color: #000;
}

.visit-btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* ==========================================================================
   Theatre Red Curtain Loader Overlay (Image-Width Frame & Slow Opening)
   ========================================================================== */

.curtain-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    overflow: hidden;
    pointer-events: auto;
    display: flex;
    /* CSS Variables for precise image width calculation */
    --curtain-open-left: -40vw;
    --curtain-open-right: 40vw;
}

/* Dark Stage Backdrop Overlay */
.curtain-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.95) 100%);
    opacity: 1;
    transition: opacity 3.8s cubic-bezier(0.65, 0, 0.35, 1);
    z-index: 1;
    pointer-events: none;
}

.curtain-loader.is-opening .curtain-backdrop {
    opacity: 0;
}

/* Curtain Panels Base Styling */
.curtain-panel {
    position: absolute;
    top: 0;
    width: 50vw;
    height: 100vh;
    background-color: #8b0000;
    z-index: 2;
    /* Slow & Smooth Opening Transition (3.8s) */
    transition: transform 3.8s cubic-bezier(0.65, 0, 0.35, 1);
    will-change: transform;
    cursor: pointer;
}

/* Left Curtain Panel */
.curtain-left {
    left: 0;
    transform-origin: left center;
    background-image:
        /* Inner center split shadow */
        linear-gradient(270deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.3) 10%, transparent 30%),
        /* Top drape depth gradient */
        linear-gradient(180deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.15) 25%, transparent 60%, rgba(0, 0, 0, 0.6) 100%),
        /* Realistic vertical fabric folds and velvet highlights */
        repeating-linear-gradient(
            90deg,
            #8b0000 0px,
            #a60505 12px,
            #b80d0d 22px,
            #8b0000 35px,
            #610000 50px,
            #400000 68px,
            #610000 82px,
            #8b0000 95px
        );
    box-shadow: inset -20px 0 35px rgba(0, 0, 0, 0.85), 10px 0 25px rgba(0, 0, 0, 0.6);
}

/* Right Curtain Panel */
.curtain-right {
    right: 0;
    transform-origin: right center;
    background-image:
        /* Inner center split shadow */
        linear-gradient(90deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.3) 10%, transparent 30%),
        /* Top drape depth gradient */
        linear-gradient(180deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.15) 25%, transparent 60%, rgba(0, 0, 0, 0.6) 100%),
        /* Realistic vertical fabric folds and velvet highlights */
        repeating-linear-gradient(
            90deg,
            #8b0000 0px,
            #610000 13px,
            #400000 27px,
            #610000 45px,
            #8b0000 60px,
            #b80d0d 73px,
            #a60505 83px,
            #8b0000 95px
        );
    box-shadow: inset 20px 0 35px rgba(0, 0, 0, 0.85), -10px 0 25px rgba(0, 0, 0, 0.6);
}

/* Top Valance Stage Shadow Overlay */
.curtain-loader::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.85) 0%, transparent 100%);
    z-index: 3;
    pointer-events: none;
    transition: opacity 2.5s ease-in-out;
}

.curtain-loader.is-opening::before {
    opacity: 0.5;
}

/* Opening Movements calculated dynamically to match exact image width */
.curtain-loader.is-opening .curtain-left {
    transform: translateX(var(--curtain-open-left));
}

.curtain-loader.is-opening .curtain-right {
    transform: translateX(var(--curtain-open-right));
}

/* ==========================================================================
   Gold Theatre Pull Rope & Tassel
   ========================================================================== */

.curtain-rope-wrapper {
    position: absolute;
    top: 0;
    right: max(25px, calc(50vw - 220px));
    z-index: 99;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: transform 0.4s ease, opacity 1s ease;
    animation: gentleRopeSway 4s ease-in-out infinite alternate;
}

.curtain-rope-wrapper:hover {
    transform: scale(1.08);
}

.curtain-rope-wrapper:hover .rope-label {
    background: rgba(212, 175, 55, 0.95);
    color: #111;
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.9);
}

/* Woven Golden Rope Strand */
.curtain-rope {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rope-strand {
    width: 10px;
    height: clamp(220px, 45vh, 420px);
    background: repeating-linear-gradient(
        45deg,
        #d4af37 0px,
        #f5e6ab 4px,
        #aa7c11 8px,
        #d4af37 12px
    );
    border-radius: 5px;
    box-shadow: 3px 6px 12px rgba(0, 0, 0, 0.6), inset -1px 0 2px rgba(0, 0, 0, 0.4);
}

/* Ornamental Golden Ring */
.rope-ring {
    width: 18px;
    height: 12px;
    background: linear-gradient(135deg, #fff3a8, #d4af37 40%, #7a5c00 100%);
    border-radius: 4px;
    margin-top: -2px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.5);
}

/* Metallic Golden Tassel */
.rope-tassel {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: -2px;
}

.tassel-top {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fff3b3 0%, #d4af37 50%, #6e5200 100%);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.tassel-skirt {
    width: 32px;
    height: 48px;
    margin-top: -6px;
    background: repeating-linear-gradient(
        90deg,
        #aa7c11 0px,
        #ffd700 3px,
        #d4af37 6px,
        #6e5200 9px
    );
    clip-path: polygon(25% 0%, 75% 0%, 100% 100%, 0% 100%);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.6);
}

/* Rope Label Badge */
.rope-label {
    margin-top: 14px;
    padding: 7px 16px;
    background: rgba(0, 0, 0, 0.82);
    color: #d4af37;
    border: 1.5px solid #d4af37;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.7);
    transition: all 0.3s ease;
    animation: labelPulse 2s infinite;
    white-space: nowrap;
}

/* Keyframe Animations for Rope */
@keyframes gentleRopeSway {
    0% { transform: rotate(0deg); }
    50% { transform: rotate(1.2deg); }
    100% { transform: rotate(-1.2deg); }
}

@keyframes labelPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 6px rgba(212, 175, 55, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 16px rgba(212, 175, 55, 0.9); }
}

/* Pull Interaction Animation */
.curtain-rope-wrapper.is-pulled {
    transform: translateY(40px) scale(0.92) !important;
    opacity: 0 !important;
    transition: transform 0.35s cubic-bezier(0.5, 0, 0.5, 1), opacity 0.8s ease 0.2s;
    pointer-events: none !important;
}

.curtain-loader.is-opening .curtain-rope-wrapper {
    opacity: 0;
    pointer-events: none;
}

/* Finished State - Allow user clicks and interactions on page content */
.curtain-loader.is-finished {
    pointer-events: none !important;
}

.curtain-loader.is-finished .curtain-panel,
.curtain-loader.is-finished .curtain-rope-wrapper {
    pointer-events: none !important;
}

/* Mobile Responsiveness Tweak */
@media (max-width: 600px) {
    .container {
        padding: 16px;
    }

    .curtain-rope-wrapper {
        right: 15px;
    }

    .rope-strand {
        height: clamp(160px, 40vh, 300px);
    }

    .rope-label {
        font-size: 0.68rem;
        padding: 5px 12px;
    }
}

/* Accessibility: Support prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .curtain-loader {
        display: none !important;
    }
}
