/* ========================================
   OMNI-MAN CHAOS PAGE STYLES
======================================== */

body {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    background: #000;
    cursor: crosshair;
}

/* ========================================
   VIDEO CONTAINER (Updated for HTML5 video)
======================================== */
.video-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 450px;
    border: 3px solid #ff0000;
    border-radius: 15px;
    box-shadow: 
        0 0 30px rgba(255, 0, 0, 0.6),
        0 0 60px rgba(255, 0, 0, 0.3),
        inset 0 0 20px rgba(255, 0, 0, 0.2);
    animation: rotate-video 10s linear infinite, pulse-glow 3s ease-in-out infinite;
    transition: all 0.3s ease;
    z-index: 10;
    overflow: hidden;
}

.video-container:hover {
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 
        0 0 50px rgba(255, 0, 0, 0.8),
        0 0 100px rgba(255, 0, 0, 0.5),
        inset 0 0 30px rgba(255, 0, 0, 0.3);
    animation: chaos-shake 0.1s infinite, rotate-video 10s linear infinite, pulse-glow 1s ease-in-out infinite;
}

#omni-video {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
}

/* ========================================
   CHAOS ANIMATIONS
======================================== */
@keyframes rotate-video {
    0% { transform: translate(-50%, -50%) rotateZ(0deg); }
    100% { transform: translate(-50%, -50%) rotateZ(360deg); }
}

@keyframes chaos-shake {
    0% { transform: translate(-50%, -50%) scale(1.05) rotateZ(0deg) translateX(0px); }
    25% { transform: translate(-50%, -50%) scale(1.05) rotateZ(1deg) translateX(-2px); }
    50% { transform: translate(-50%, -50%) scale(1.05) rotateZ(-1deg) translateX(2px); }
    75% { transform: translate(-50%, -50%) scale(1.05) rotateZ(1deg) translateX(-1px); }
    100% { transform: translate(-50%, -50%) scale(1.05) rotateZ(0deg) translateX(0px); }
}

@keyframes pulse-glow {
    0% { 
        box-shadow: 
            0 0 30px rgba(255, 0, 0, 0.6),
            0 0 60px rgba(255, 0, 0, 0.3);
    }
    50% { 
        box-shadow: 
            0 0 50px rgba(255, 0, 0, 0.9),
            0 0 100px rgba(255, 0, 0, 0.6),
            0 0 150px rgba(255, 100, 100, 0.3);
    }
    100% { 
        box-shadow: 
            0 0 30px rgba(255, 0, 0, 0.6),
            0 0 60px rgba(255, 0, 0, 0.3);
    }
}

/* ========================================
   FLASH OVERLAY EFFECT (Enhanced)
======================================== */
.flash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0);
    z-index: 9999;
    pointer-events: none;
    transition: background 0.05s ease;
}

.flash-overlay.flash-active {
    background: rgba(255, 255, 255, 1);
    animation: mega-flash-effect 2s ease-out forwards;
}

@keyframes mega-flash-effect {
    0% { 
        background: rgba(255, 255, 255, 1);
        filter: brightness(10) contrast(2);
    }
    10% { 
        background: rgba(255, 255, 0, 0.9);
        filter: brightness(8) contrast(1.5);
    }
    30% { 
        background: rgba(255, 100, 100, 0.7);
        filter: brightness(5) contrast(1.2);
    }
    60% { 
        background: rgba(255, 255, 255, 0.5);
        filter: brightness(2) contrast(1);
    }
    100% { 
        background: rgba(255, 255, 255, 0);
        filter: brightness(1) contrast(1);
    }
}

/* ========================================
   OMNI-MAN APPEARANCE (Enhanced with Cycling)
======================================== */
.omni-man {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    z-index: 10000;
    opacity: 0;
    text-align: center;
    pointer-events: none;
}

.omni-man.omni-active {
    animation: omni-chaos-appear 4s ease-out forwards;
}

#omni-image {
    width: 400px;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(255, 0, 0, 0.8));
    margin-bottom: 20px;
    border-radius: 10px;
    animation: image-chaos 0.5s ease-in-out infinite alternate;
}

.omni-text {
    font-family: 'Arial Black', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    color: #ff0000;
    text-shadow: 
        3px 3px 0px #000,
        -3px -3px 0px #000,
        3px -3px 0px #000,
        -3px 3px 0px #000,
        0 0 20px rgba(255, 0, 0, 0.8);
    letter-spacing: 3px;
    animation: text-chaos 0.3s ease-in-out infinite alternate;
}

/* ========================================
   CHAOS OMNI-MAN ANIMATIONS
======================================== */
@keyframes omni-chaos-appear {
    0% { 
        opacity: 0;
        transform: translate(-50%, -50%) scale(0) rotateZ(-180deg);
        filter: hue-rotate(0deg);
    }
    15% { 
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(0.3) rotateZ(-90deg);
        filter: hue-rotate(90deg);
    }
    30% { 
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(0.7) rotateZ(-45deg);
        filter: hue-rotate(180deg);
    }
    50% { 
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotateZ(0deg);
        filter: hue-rotate(270deg);
    }
    75% { 
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.3) rotateZ(15deg);
        filter: hue-rotate(360deg);
    }
    90% { 
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.7) rotateZ(-5deg);
        filter: hue-rotate(0deg);
    }
    100% { 
        opacity: 1;
        transform: translate(-50%, -50%) scale(2.2) rotateZ(0deg);
        filter: hue-rotate(0deg);
    }
}

@keyframes image-chaos {
    0% { 
        filter: drop-shadow(0 0 20px rgba(255, 0, 0, 0.8)) brightness(1) contrast(1);
        transform: rotateZ(0deg);
    }
    100% { 
        filter: drop-shadow(0 0 40px rgba(255, 255, 0, 1)) brightness(1.3) contrast(1.5);
        transform: rotateZ(2deg);
    }
}

@keyframes text-chaos {
    0% { 
        color: #ff0000;
        transform: scale(1) rotateZ(0deg);
        text-shadow: 
            3px 3px 0px #000,
            -3px -3px 0px #000,
            3px -3px 0px #000,
            -3px 3px 0px #000,
            0 0 20px rgba(255, 0, 0, 0.8);
    }
    100% { 
        color: #ffff00;
        transform: scale(1.1) rotateZ(1deg);
        text-shadow: 
            4px 4px 0px #000,
            -4px -4px 0px #000,
            4px -4px 0px #000,
            -4px 4px 0px #000,
            0 0 40px rgba(255, 255, 0, 1);
    }
}

/* ========================================
   MOBILE RESPONSIVENESS
======================================== */
@media (max-width: 768px) {
    .video-container {
        width: 90vw;
        height: 50vw;
    }
    
    #omni-image {
        width: 250px;
        max-height: 250px;
    }
    
    .omni-text {
        font-size: 2rem;
    }
}