* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --mouse-x: 50%;
    --mouse-y: 50%;
    /* Dynamic variables controlled by JavaScript */
    --ambient-glow: rgba(255, 255, 255, 0.02);
    --flare-shift-x: 0px;
    --flare-shift-y: 0px;
    --flare-scale: 1;
}

body {
    background: #020203;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
}

.cursor {
    width: auto;
    height: auto;
    background: transparent;
    border: none;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    color: #ffffff;
    filter: drop-shadow(0 0 6px #fff) drop-shadow(0 0 15px rgba(0, 140, 255, 0.6));
    will-change: transform, left, top;
    transition: transform 0.03s linear, opacity 0.3s ease;
    opacity: 0;
}

body:hover .cursor {
    opacity: 1;
}

.slider {
    position: relative;
    width: 80%;
    max-width: 1180px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000000;
    box-shadow: 0 60px 180px rgba(0, 0, 0, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.03);
    z-index: 5;
    transition: transform 0.1s ease;
}

.slider img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    filter: contrast(1.05) brightness(0.96) saturate(1.04);
    animation: masterPan 35s infinite alternate ease-in-out;
    will-change: transform, filter;
    transition: filter 0.28s cubic-bezier(0.215, 0.610, 0.355, 1);
}

@keyframes masterPan {
    0% { transform: scale(1.00); }
    100% { transform: scale(1.04); }
}

.slider img.projector-blur {
    filter: blur(22px) brightness(0.15) contrast(0.8);
}

.slider.projector-glitch {
    border-color: rgba(255, 255, 255, 0.15);
}

.slider::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 70%, rgba(0,0,0,0.85) 100%);
    pointer-events: none;
    z-index: 2;
}

/* Updated Typewriter Subtitle Box */
.movie-caption {
    position: absolute;
    bottom: 6%;
    left: 50%;
    transform: translateX(-50%);
    width: 78%;
    text-align: center;
    font-weight: 400;
    font-size: 1.15rem;
    letter-spacing: 0.04em;
    line-height: 1.6;
    color: #f6f6f6;
    text-shadow: 0 2px 3px #000, 0 0 10px rgba(0,0,0,0.95);
    z-index: 10;
    pointer-events: none;
    white-space: pre-wrap;
}

.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.8rem;
    font-weight: 100;
    color: rgba(255, 255, 255, 0.12);
    cursor: none;
    z-index: 15;
    transition: color 0.25s ease, transform 0.25s ease;
    user-select: none;
    padding: 0 15px;
}

.arrow:hover {
    color: #ffffff;
    transform: translateY(-50%) scale(1.12);
}

.arrow.left { left: 8px; }
.arrow.right { right: 8px; }

.side-nav {
    position: fixed;
    left: 45px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 24px;
    z-index: 100;
}

.side-nav a {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.15);
    text-decoration: none;
    letter-spacing: 2px;
    cursor: none;
    transition: color 0.35s ease, transform 0.35s ease;
}

.side-nav a:hover,
.side-nav a.active {
    color: #ffffff;
    transform: translateX(5px);
}

.side-nav a.active {
    animation: theaterPulse 2s infinite ease-in-out;
}

@keyframes theaterPulse {
    0%, 100% { text-shadow: 0 0 5px rgba(255,255,255,0.3), 0 2px 4px #000; }
    50% { text-shadow: 0 0 15px rgba(255,255,255,0.75), 0 2px 4px #000; }
}

.overlay {
    position: fixed;
    top: 40px;
    right: 50px;
    z-index: 10;
}

.title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    letter-spacing: 4px;
    color: rgba(255, 255, 255, 0.65);
    display: flex;
    gap: 12px;
}

.title span:last-child {
    color: rgba(255, 255, 255, 0.12);
}

.index-title-container {
    position: fixed;
    right: 6%;
    top: 50%;
    transform: translateY(-50%);
    text-align: right;
    z-index: 10;
    pointer-events: none;
}

.index-main-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 9.5rem; 
    line-height: 0.83;
    letter-spacing: 4px;
    color: #ffffff;
    text-shadow: 
        -2px 0 0 rgba(255,0,60,0.18), 
        2px 0 0 rgba(0,160,255,0.18), 
        0 25px 50px rgba(0,0,0,0.92);
}

/* Upgraded Dynamic Theater Ambient Room Lighting Layer */
.layer {
    position: fixed;
    inset: -100px;
    background: 
        radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.02) 0%, transparent 55%),
        radial-gradient(circle at center, var(--ambient-glow) 0%, transparent 75%),
        #010102;
    z-index: 1;
    pointer-events: none;
    will-change: transform, background;
    transition: background 0.8s cubic-bezier(0.215, 0.610, 0.355, 1);
}

/* Upgraded Interactive Anamorphic Lens Flare */
.lens-flare {
    position: fixed;
    width: 250%;
    height: 3px;
    left: -75%;
    top: 35%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 110, 255, 0.03) 25%, 
        rgba(255, 255, 255, 0.35) 50%, 
        rgba(0, 110, 255, 0.03) 75%, 
        transparent 100%
    );
    filter: blur(2px) drop-shadow(0 0 8px rgba(0, 140, 255, 0.4));
    pointer-events: none;
    z-index: 3;
    will-change: transform;
    transform: translate(var(--flare-shift-x), var(--flare-shift-y)) scaleY(var(--flare-scale));
    transition: transform 0.15s ease-out;
}

.grain {
    position: fixed;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.045; 
    pointer-events: none;
    z-index: 99;
}

.audio-control-suite {
    position: fixed;
    bottom: 40px;
    left: 45px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.audio-btn, .exit-btn {
    background: transparent;
    border: none;
    font-family: monospace;
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.3);
    cursor: none;
    padding: 5px 0;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
    text-align: left;
}

.audio-btn:hover, .exit-btn:hover {
    color: #ffffff;
    transform: translateX(4px);
}

.audio-btn span::before {
    content: '🔊 ';
    margin-right: 4px;
}

.audio-btn.muted span::before {
    content: '🔇 ';
}

.live-deck-display {
    position: fixed;
    bottom: 40px;
    right: 50px;
    font-family: monospace;
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.3);
    z-index: 10;
    pointer-events: none;
}

body {
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

body.loaded {
    opacity: 1;
}

body.closing {
    opacity: 0;
    pointer-events: none;
}
/* Real mechanical slide change distortion and color shifting */
.lens-distortion-snap img {
    animation: lensSnap 0.25s ease-out;
}
