/**
 * CINEMA PREMIERE THEME
 * 
 * Layout Philosophy: The cinema screen is a centered focal point.
 * We frame the workspace in theatrical drapes and vintage filmstrips,
 * overlaying a subtle projector light beam and marquee chasing lights.
 */

/* ============================================
   1. BACKGROUND & CURTAIN FRAME
   ============================================ */

body.theme-cinema {
    background-color: #050505;
    background-image:
        radial-gradient(circle at 50% 20%, rgba(var(--color-secondary-rgb), 0.18) 0%, transparent 70%),
        radial-gradient(circle at center, #0e0e0e 0%, #030303 100%);
    --z-particles-back: 15;
    --z-particles-mid: 25;
    --z-particles-front: 55;
}

/* Main Screen Frame */
body.theme-cinema .theme-frame {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 1;
    border: none;
    padding: 0;
    box-shadow: none;
    outline: none;
    background: transparent;
    z-index: 5;
}

/* Base style for all frame rails: The Velvet Curtains & Stage */
body.theme-cinema .frame-rail {
    position: absolute;
    z-index: 10;
    pointer-events: none;
    box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.7);
}

/* Horizontal Rails */
body.theme-cinema .rail-top {
    height: 85px;
    left: 0;
    right: 0;
    top: 0;
    background-color: var(--color-secondary);
    background-image: repeating-linear-gradient(90deg,
            rgba(0, 0, 0, 0.8) 0px,
            rgba(0, 0, 0, 0.45) 20px,
            rgba(0, 0, 0, 0.15) 40px,
            rgba(255, 255, 255, 0.08) 60px,
            rgba(0, 0, 0, 0.15) 80px,
            rgba(0, 0, 0, 0.45) 100px,
            rgba(0, 0, 0, 0.8) 120px);
    background-size: 120px 100%;
    border-bottom: 4px solid var(--color-accent);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.8);
    /* Scalloped drapery loops */
    clip-path: polygon(0% 0%, 100% 0%,
            100% 70%,
            97.5% 90%, 95% 70%,
            92.5% 90%, 90% 70%,
            87.5% 90%, 85% 70%,
            82.5% 90%, 80% 70%,
            77.5% 90%, 75% 70%,
            72.5% 90%, 70% 70%,
            67.5% 90%, 65% 70%,
            62.5% 90%, 60% 70%,
            57.5% 90%, 55% 70%,
            52.5% 90%, 50% 70%,
            47.5% 90%, 45% 70%,
            42.5% 90%, 40% 70%,
            37.5% 90%, 35% 70%,
            32.5% 90%, 30% 70%,
            27.5% 90%, 25% 70%,
            22.5% 90%, 20% 70%,
            17.5% 90%, 15% 70%,
            12.5% 90%, 10% 70%,
            7.5% 90%, 5% 70%,
            2.5% 90%, 0% 70%);
}

body.theme-cinema .rail-bottom {
    height: 30px;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #151515;
    background-image:
        linear-gradient(180deg, #252525 0%, #0d0d0d 100%),
        repeating-linear-gradient(90deg, transparent, transparent 40px, rgba(255, 255, 255, 0.02) 40px, rgba(255, 255, 255, 0.02) 42px);
    border-top: 3px solid #2d2d2d;
    box-shadow: inset 0 8px 15px rgba(0, 0, 0, 0.9);
}

/* Vertical Rails - Heavy Side Curtains */
body.theme-cinema .rail-left,
body.theme-cinema .rail-right {
    width: 115px;
    top: 0;
    bottom: 0;
    background-color: var(--color-secondary);
    background-image: repeating-linear-gradient(90deg,
            rgba(0, 0, 0, 0.8) 0px,
            rgba(0, 0, 0, 0.5) 10px,
            rgba(0, 0, 0, 0.15) 20px,
            rgba(255, 255, 255, 0.08) 35px,
            rgba(0, 0, 0, 0.15) 50px,
            rgba(0, 0, 0, 0.5) 60px,
            rgba(0, 0, 0, 0.8) 70px);
    background-size: 70px 100%;
}

body.theme-cinema .rail-left {
    left: 0;
    box-shadow: 12px 0 25px rgba(0, 0, 0, 0.85), inset -5px 0 15px rgba(0, 0, 0, 0.5);
}

body.theme-cinema .rail-right {
    right: 0;
    box-shadow: -12px 0 25px rgba(0, 0, 0, 0.85), inset 5px 0 15px rgba(0, 0, 0, 0.5);
}

/* Hide Frame Toggle */
body.border-hidden.theme-cinema .theme-frame,
body.border-hidden.theme-cinema .theme-texture {
    opacity: 0 !important;
    pointer-events: none;
}


/* ============================================
   2. FILMSTRIP SPROCKETS
   ============================================ */

/* Inner Screen Frame with Filmstrips */
body.theme-cinema .theme-frame-inner {
    position: absolute;
    top: 85px;
    bottom: 30px;
    left: 115px;
    right: 115px;
    border: 6px solid #141414;
    box-shadow:
        inset 0 0 50px rgba(0, 0, 0, 0.95),
        0 0 15px rgba(0, 0, 0, 0.8);
    z-index: 4;
}

/* Sprocket holes along the sides of the screen */
body.theme-cinema .theme-frame-inner::before,
body.theme-cinema .theme-frame-inner::after {
    content: '';
    position: absolute;
    top: 15px;
    bottom: 15px;
    width: 12px;
    background-image: repeating-linear-gradient(to bottom,
            #090909 0px,
            #090909 12px,
            transparent 12px,
            transparent 28px);
    background-size: 100% 28px;
    opacity: 0.45;
    z-index: 5;
    border-radius: 2px;
}

body.theme-cinema .theme-frame-inner::before {
    left: 10px;
    border-left: 2px solid #000;
    border-right: 2px solid #000;
}

body.theme-cinema .theme-frame-inner::after {
    right: 10px;
    border-left: 2px solid #000;
    border-right: 2px solid #000;
}


/* ============================================
   3. TYPOGRAPHY
   ============================================ */

body.theme-cinema .hosts-title {
    font-family: var(--font-heading);
    color: #ffffff;
    font-size: calc(3.0rem * var(--host-text-size) * var(--host-scale-base) * var(--dynamic-scale));
    letter-spacing: 0.05em;
    font-weight: normal;
    text-transform: none;
    text-shadow:
        0 4px 12px rgba(0, 0, 0, 0.95),
        0 0 10px rgba(var(--color-secondary-rgb), 0.35);
}

body.theme-cinema .hosts-list {
    padding: 0;
}

body.theme-cinema .hosts-list span {
    font-family: var(--font-primary);
    color: #e5e5e5;
    font-size: calc(1.9rem * var(--host-text-size) * var(--host-scale-base) * var(--dynamic-scale));
    font-weight: 500;
    letter-spacing: 0.06em;
    text-shadow: 0 3px 8px rgba(0, 0, 0, 0.95);
}

body.theme-cinema .event-title {
    font-family: var(--font-display);
    color: var(--color-accent);
    /* Marquee Gold */
    font-size: 4.2rem;
    font-weight: normal;
    letter-spacing: 0.05em;
    line-height: 1.05;
    margin: 10px 0 5px 0;
    text-shadow:
        0 -1px 0 rgba(255, 255, 255, 0.45),
        0 4px 15px rgba(0, 0, 0, 0.95),
        0 0 15px rgba(var(--color-secondary-rgb), 0.3),
        0 0 25px rgba(var(--color-accent-rgb), 0.35);
    animation: titleLightGlow 3s infinite alternate ease-in-out;
}

@keyframes titleLightGlow {
    0% {
        text-shadow:
            0 -1px 0 rgba(255, 255, 255, 0.4),
            0 4px 15px rgba(0, 0, 0, 0.95),
            0 0 12px rgba(var(--color-secondary-rgb), 0.25),
            0 0 20px rgba(var(--color-accent-rgb), 0.25);
    }

    100% {
        text-shadow:
            0 -1px 0 rgba(255, 255, 255, 0.65),
            0 4px 15px rgba(0, 0, 0, 0.95),
            0 0 20px rgba(var(--color-secondary-rgb), 0.5),
            0 0 35px rgba(var(--color-accent-rgb), 0.55),
            0 0 60px rgba(var(--color-accent-rgb), 0.25);
    }
}

body.theme-cinema .event-top-label,
body.theme-cinema .event-subtitle {
    font-family: var(--font-heading);
    font-weight: normal;
    color: #ffffff;
    font-size: 2.1rem;
    letter-spacing: 0.03em;
    text-shadow:
        0 3px 8px rgba(0, 0, 0, 0.95),
        0 0 8px rgba(var(--color-secondary-rgb), 0.3);
    text-transform: none !important;
}

body.theme-cinema .event-top-label {
    margin-bottom: -8px;
}

body.theme-cinema .event-date {
    font-family: var(--font-primary);
    color: #b3b3b3;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    text-shadow: 0 3px 8px rgba(0, 0, 0, 0.95);
    margin-top: 8px;
}

/* Custom Text Banner Mode */
body.theme-cinema .logo-text-custom {
    color: #ffffff;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: normal;
    letter-spacing: 0.08em;
    text-shadow: 0 3px 8px rgba(0, 0, 0, 0.95);
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
}


/* ============================================
   4. MARQUEE BOXES & LAYOUT
   ============================================ */

body.theme-cinema .content-wrapper {
    background: transparent;
    padding: var(--inset-v) var(--inset-h);
    height: 100vh;
    box-sizing: border-box;
}

body.theme-cinema .main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    z-index: 20;
}

body.theme-cinema .main-content::before {
    content: '';
    flex: 1.1;
}

body.theme-cinema .main-content::after {
    content: '';
    flex: 3.2;
}

/* Logo Banner Marquee */
body.theme-cinema .logo-banner {
    background-color: #111111;
    border: 4px solid #222222;
    border-radius: 6px;
    padding: 15px 40px;
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.85),
        inset 0 0 15px rgba(0, 0, 0, 0.9);
    position: relative;
    max-width: 720px;
    height: auto;
    min-height: 80px;
    z-index: 100;
    box-sizing: border-box;
    will-change: transform;
}

/* Subtle Glowing Frame */
body.theme-cinema .logo-banner::before,
body.theme-cinema .event-footer::before {
    content: '';
    position: absolute;
    inset: -6px;
    border: 2px solid var(--color-accent);
    border-radius: 6px;
    pointer-events: none;
    z-index: 110;
    box-shadow:
        0 0 10px rgba(var(--color-accent-rgb), 0.25),
        inset 0 0 5px rgba(var(--color-accent-rgb), 0.15);
    animation: marqueeGlow 4s infinite alternate ease-in-out;
}

body.theme-cinema .logo-banner::after,
body.theme-cinema .event-footer::after {
    display: none;
}

@keyframes marqueeGlow {
    0% {
        border-color: rgba(var(--color-accent-rgb), 0.35);
        box-shadow:
            0 0 8px rgba(var(--color-accent-rgb), 0.15),
            inset 0 0 3px rgba(var(--color-accent-rgb), 0.05);
    }

    100% {
        border-color: rgba(var(--color-accent-rgb), 0.85);
        box-shadow:
            0 0 18px rgba(var(--color-accent-rgb), 0.55),
            inset 0 0 8px rgba(var(--color-accent-rgb), 0.25);
    }
}

/* Names Section Readability Backdrop */
body.theme-cinema .hosts-container {
    position: relative;
    z-index: 30;
    margin: 2.2rem auto 0 auto;
    /* padding: 2.0rem 4.0rem; */
    max-width: var(--host-max-width, 850px);
}

body.theme-cinema.logo-hidden .hosts-container {
    max-width: calc(var(--host-max-width, 850px) / 1.1);
}

@media (min-width: 1900px) {
    body.theme-cinema.logo-hidden .hosts-container {
        max-width: calc(1650px / 1.05) !important;
    }
}

/* Adjust layout when date is hidden in Cinema theme */
body.theme-cinema.date-hidden .logo-banner {
    transform: none;
}

@media (min-width: 1400px) and (max-width: 1900px) {
    body.theme-cinema.date-hidden .logo-banner {
        transform: translateY(2.3rem);
    }
}

body.theme-cinema.date-hidden .hosts-container {
    transform: translateY(0.5rem);
}

@media (min-width: 1400px) and (max-width: 1900px) {
    body.theme-cinema.date-hidden .hosts-container {
        transform: translateY(calc(2.3rem + 0.5rem));
    }
}

@media (min-width: 1900px) {
    body.theme-cinema.date-hidden .hosts-container {
        transform: translateY(calc(55px + 0.5rem));
    }
}

body.theme-cinema.date-hidden .hosts-list {
    transform: none;
}

body.theme-cinema.date-hidden .event-footer {
    transform: none;
    padding: 33px 45px 20px 45px;
}

@media (max-width: 1600px) {
    body.theme-cinema.date-hidden .event-footer {
        padding: 22px 30px 12px 30px;
    }
}

body.theme-cinema .hosts-container::before {
    content: '';
    position: absolute;
    inset: 0.5rem;
    opacity: var(--backdrop-opacity, 0.8);
    border-radius: 16px;
    z-index: -1;
    pointer-events: none;
    filter: blur(8px);
    transition: opacity 0.3s ease;
}

/* Event Footer Marquee */
body.theme-cinema .event-footer {
    background-color: #111111;
    border: 4px solid #222222;
    border-radius: 6px;
    padding: 20px 45px;
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.9),
        inset 0 0 15px rgba(0, 0, 0, 0.9);
    position: relative;
    max-width: 820px;
    margin: 0 auto;
    box-sizing: border-box;
    will-change: transform;
}

body.theme-cinema:not(.is-fullscreen) .event-footer {
    top: -2.5rem;
}


/* ============================================
   5. EFFECTS & DUST PARTICLES
   ============================================ */

/* Sweeping Projector Light Beam */
body.theme-cinema .theme-texture {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    /* In front of vignette (1) but behind curtains (5) */
    pointer-events: none;
    overflow: hidden;
}

body.theme-cinema .theme-texture::after {
    content: '';
    position: absolute;
    top: -15%;
    left: 15%;
    width: 140vw;
    height: 140vh;
    background: conic-gradient(from 130deg at 15% 0%,
            transparent 0deg,
            rgba(255, 255, 230, 0.02) 12deg,
            rgba(255, 255, 230, 0.07) 22deg,
            rgba(255, 255, 230, 0.02) 32deg,
            transparent 45deg);
    pointer-events: none;
    z-index: 2;
    mix-blend-mode: screen;
    animation: projectorBeamSweep 22s ease-in-out infinite alternate;
    transform-origin: 15% 0%;
    will-change: transform;
}

@keyframes projectorBeamSweep {
    0% {
        transform: rotate(-6deg);
    }

    100% {
        transform: rotate(6deg);
    }
}

/* Subtle Acoustic Micro-Perforated Screen Texture */
body.theme-cinema .theme-texture::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 8px 8px;
    opacity: 0.45;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 1;
}

/* Dust particles catching the light beam */
body.theme-cinema .petal {
    opacity: 0.35;
    mix-blend-mode: screen;
    filter: blur(0.5px);
}

body.theme-cinema .petal.is-blurred {
    filter: blur(2.5px);
    opacity: 0.2;
}

/* Popcorn particles floating in the light beam */
body.theme-cinema .petal--popcorn {
    clip-path: none !important;
    -webkit-clip-path: none !important;
    border-radius: 0 !important;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 6 C12 5, 8 8, 9 13 C5 13, 3 17, 5 21 C7 24, 11 24, 12 23 C14 26, 19 26, 21 23 C25 23, 27 20, 26 16 C26 12, 23 11, 21 11 C21 7, 18 5, 16 6 Z' fill='%23FFFDF0'/%3E%3Cpath d='M14 9 C11 9, 9 11, 10 14 C12 16, 17 15, 18 13 C18 11, 16 9, 14 9 Z' fill='%23FFD700' opacity='0.8'/%3E%3Cpath d='M15 14 C14 14, 13 15, 13 16 C14 17, 16 17, 17 16 C17 15, 16 14, 15 14 Z' fill='%23D2691E'/%3E%3C/svg%3E") no-repeat center/contain !important;
    opacity: 0.85 !important;
    mix-blend-mode: normal !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45)) !important;
}

body.theme-cinema .petal--popcorn.is-blurred {
    filter: blur(1.5px) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)) !important;
    opacity: 0.5 !important;
}

body.is-sliding.theme-cinema .hosts-container::before {
    filter: none;
    transition: none;
}


/* ============================================
   6. RESPONSIVENESS & SCALING
   ============================================ */

@media (max-width: 1600px) {
    body.theme-cinema .content-wrapper {
        padding: 85px 105px 30px 105px !important;
    }

    body.theme-cinema .theme-frame {
        padding: 0;
    }

    body.theme-cinema .rail-top {
        height: 80px;
    }

    body.theme-cinema .theme-frame-inner {
        top: 70px;
        left: 85px;
        right: 85px;
    }

    body.theme-cinema .rail-left,
    body.theme-cinema .rail-right {
        width: 85px;
    }

    body.theme-cinema .logo-banner {
        scale: 0.85 !important;
        margin-top: 1rem;
    }

    body.theme-cinema .hosts-container {
        padding: 0;
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
    }

    body.theme-cinema .hosts-title {
        font-size: calc(2.6rem * var(--host-text-size) * var(--host-scale-base) * var(--dynamic-scale));
    }

    body.theme-cinema .hosts-list span {
        font-size: calc(1.65rem * var(--host-text-size) * var(--host-scale-base) * var(--dynamic-scale));
    }

    body.theme-cinema .event-footer {
        scale: 0.9;
        top: -3rem !important;
        padding: 12px 30px;
    }

    body.theme-cinema .event-title {
        font-size: 3.2rem;
    }
}

@media (min-width: 1801px) {
    body.theme-cinema .main-content {
        max-width: 1650px !important;
    }

    body.theme-cinema .logo-banner {
        scale: 1.15;
        transform-origin: top center;
        margin-top: 2.5rem;
    }

    body.theme-cinema .hosts-container {
        --host-max-width: 1250px;
        margin-top: 0.5rem;
        max-width: 1650px !important;
        margin-bottom: 2.5rem;
    }

    body.theme-cinema.logo-hidden .hosts-container {
        max-width: calc(1650px / 1.1) !important;
    }

    body.theme-cinema .hosts-list {
        max-width: 1650px !important;
    }

    body.theme-cinema .hosts-list span {
        font-size: calc(2.0rem * var(--host-text-size) * var(--host-scale-base) * var(--dynamic-scale));
    }

    body.theme-cinema .event-footer {
        scale: 1.15;
        transform-origin: bottom center;
        margin-bottom: 1.5rem;
    }
}