/* ===== CINEMATIC VISUAL EFFECTS ===== */
/* Advanced film-quality visual effects for professional presentations */

/* Film Grain Effect */
.film-grain {
    position: relative;
    overflow: hidden;
}

.film-grain::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, transparent 50%, rgba(255,255,255,0.1) 50.1%),
        radial-gradient(circle at 80% 20%, transparent 50%, rgba(255,255,255,0.1) 50.1%),
        radial-gradient(circle at 40% 40%, transparent 50%, rgba(255,255,255,0.05) 50.1%);
    background-size: 3px 3px, 5px 5px, 7px 7px;
    animation: filmGrainMove 0.1s infinite linear;
    pointer-events: none;
    z-index: 1;
}

@keyframes filmGrainMove {
    0% { transform: translate(0, 0); }
    25% { transform: translate(-1px, 1px); }
    50% { transform: translate(1px, -1px); }
    75% { transform: translate(-1px, -1px); }
    100% { transform: translate(1px, 1px); }
}

/* Lens Flare Effects */
.lens-flare {
    position: relative;
    overflow: hidden;
}

.lens-flare::after {
    content: '';
    position: absolute;
    top: 20%;
    left: 20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.8) 0%,
        rgba(255, 200, 100, 0.6) 20%,
        rgba(255, 150, 50, 0.4) 40%,
        rgba(255, 100, 0, 0.2) 60%,
        transparent 80%
    );
    border-radius: 50%;
    animation: lensFlareMove 8s infinite ease-in-out;
    pointer-events: none;
    z-index: 2;
}

@keyframes lensFlareMove {
    0%, 100% { 
        transform: translate(0, 0) scale(0.5);
        opacity: 0;
    }
    25% {
        transform: translate(100px, 50px) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translate(200px, 100px) scale(1.2);
        opacity: 1;
    }
    75% {
        transform: translate(300px, 150px) scale(0.8);
        opacity: 0.6;
    }
}

/* Camera Movement Effects */
.camera-pan {
    animation: cameraPan 10s infinite ease-in-out;
    transform-origin: center;
}

@keyframes cameraPan {
    0%, 100% { transform: translateX(0) scale(1); }
    25% { transform: translateX(-20px) scale(1.05); }
    50% { transform: translateX(20px) scale(1.1); }
    75% { transform: translateX(-10px) scale(1.05); }
}

.camera-zoom {
    animation: cameraZoom 6s infinite ease-in-out;
    transform-origin: center;
}

@keyframes cameraZoom {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.3) rotate(2deg); }
}

.camera-shake {
    animation: cameraShake 0.5s infinite;
}

@keyframes cameraShake {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    10% { transform: translate(-2px, -1px) rotate(-0.5deg); }
    20% { transform: translate(2px, 1px) rotate(0.5deg); }
    30% { transform: translate(-1px, 2px) rotate(-0.3deg); }
    40% { transform: translate(1px, -2px) rotate(0.3deg); }
    50% { transform: translate(-2px, 1px) rotate(-0.2deg); }
    60% { transform: translate(2px, -1px) rotate(0.2deg); }
    70% { transform: translate(-1px, -2px) rotate(-0.1deg); }
    80% { transform: translate(1px, 2px) rotate(0.1deg); }
    90% { transform: translate(-1px, -1px) rotate(0deg); }
}

/* Depth of Field Effect */
.depth-of-field {
    position: relative;
    filter: blur(0px);
    transition: filter 2s ease;
}

.depth-of-field:hover {
    filter: blur(3px);
}

.depth-of-field::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60%;
    height: 60%;
    transform: translate(-50%, -50%);
    backdrop-filter: blur(0px);
    border-radius: 50%;
    transition: backdrop-filter 2s ease;
    pointer-events: none;
    z-index: 1;
}

.depth-of-field:hover::before {
    backdrop-filter: blur(8px);
}

/* Color Grading Effects */
.color-grade-warm {
    filter: 
        sepia(0.3) 
        saturate(1.4) 
        hue-rotate(15deg) 
        brightness(1.1) 
        contrast(1.2);
    transition: filter 1s ease;
}

.color-grade-cool {
    filter: 
        sepia(0.2) 
        saturate(1.2) 
        hue-rotate(-15deg) 
        brightness(0.9) 
        contrast(1.3);
    transition: filter 1s ease;
}

.color-grade-vintage {
    filter: 
        sepia(0.8) 
        saturate(0.8) 
        hue-rotate(10deg) 
        brightness(0.95) 
        contrast(1.4);
    transition: filter 1s ease;
}

.color-grade-noir {
    filter: 
        grayscale(1) 
        contrast(1.8) 
        brightness(0.8);
    transition: filter 1s ease;
}

/* Cinematic Vignette */
.cinematic-vignette {
    position: relative;
}

.cinematic-vignette::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        ellipse at center,
        transparent 30%,
        rgba(0, 0, 0, 0.3) 70%,
        rgba(0, 0, 0, 0.8) 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* Cinematic Letterbox */
.letterbox {
    position: relative;
}

.letterbox::before,
.letterbox::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 15%;
    background: #000;
    z-index: 2;
    pointer-events: none;
}

.letterbox::before {
    top: 0;
}

.letterbox::after {
    bottom: 0;
}

/* Cinematic Transitions */
.fade-in-cinematic {
    opacity: 0;
    animation: fadeInCinematic 3s ease-in forwards;
}

@keyframes fadeInCinematic {
    0% { 
        opacity: 0;
        transform: scale(1.1);
        filter: blur(2px);
    }
    100% { 
        opacity: 1;
        transform: scale(1);
        filter: blur(0px);
    }
}

.slide-reveal {
    position: relative;
    overflow: hidden;
}

.slide-reveal::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.8),
        transparent
    );
    animation: slideReveal 2s ease-in-out infinite;
    z-index: 1;
}

@keyframes slideReveal {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Cinematic Glow */
.cinematic-glow {
    position: relative;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
}

.cinematic-glow::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.1),
        transparent,
        rgba(255, 255, 255, 0.1)
    );
    border-radius: inherit;
    animation: cinematicGlow 4s ease-in-out infinite alternate;
    z-index: -1;
}

@keyframes cinematicGlow {
    0% { opacity: 0.3; }
    100% { opacity: 0.8; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .lens-flare::after {
        width: 100px;
        height: 100px;
    }
    
    .camera-pan {
        animation-duration: 8s;
    }
    
    .letterbox::before,
    .letterbox::after {
        height: 10%;
    }
}

@media (max-width: 480px) {
    .film-grain::before {
        background-size: 2px 2px, 3px 3px, 4px 4px;
    }
    
    .camera-shake {
        animation-duration: 0.3s;
    }
    
    .cinematic-glow {
        filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
    }
}

/* Performance Optimizations */
.cinematic-effect {
    will-change: transform, filter, opacity;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .film-grain::before,
    .lens-flare::after,
    .camera-pan,
    .camera-zoom,
    .camera-shake,
    .slide-reveal::before,
    .cinematic-glow::before {
        animation: none;
    }
    
    .depth-of-field,
    .color-grade-warm,
    .color-grade-cool,
    .color-grade-vintage,
    .color-grade-noir {
        transition: none;
    }
}