/* ========================================
   SHADER EFFECTS - Lightning & Fire
   ======================================== */

/* Lightning Flash Background Effect */
.lightning-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    background: radial-gradient(ellipse at top, rgba(200, 220, 255, 0.3) 0%, transparent 70%);
    animation: lightning-flash 8s infinite;
}

@keyframes lightning-flash {
    0%, 89%, 91%, 93%, 100% { opacity: 0; }
    90%, 92% { opacity: 1; }
}

/* Secondary lightning bolt */
.lightning-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 30%;
    width: 40%;
    height: 100%;
    background: radial-gradient(ellipse at top, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    animation: lightning-flash-2 12s infinite 3s;
}

@keyframes lightning-flash-2 {
    0%, 94%, 96%, 100% { opacity: 0; }
    95% { opacity: 1; }
}

/* ========================================
   FIRE EFFECT FOR LOGO
   ======================================== */

.logo-fire-container {
    position: relative;
    display: inline-block;
}

.logo-fire-container img {
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 10px rgba(255, 100, 0, 0.8))
            drop-shadow(0 0 20px rgba(255, 50, 0, 0.6))
            drop-shadow(0 0 30px rgba(255, 0, 0, 0.4));
    animation: fire-glow 2s ease-in-out infinite alternate;
}

@keyframes fire-glow {
    0% {
        filter: drop-shadow(0 0 10px rgba(255, 100, 0, 0.8))
                drop-shadow(0 0 20px rgba(255, 50, 0, 0.6))
                drop-shadow(0 0 30px rgba(255, 0, 0, 0.4));
    }
    50% {
        filter: drop-shadow(0 0 15px rgba(255, 150, 0, 1))
                drop-shadow(0 0 30px rgba(255, 80, 0, 0.8))
                drop-shadow(0 0 45px rgba(255, 30, 0, 0.5));
    }
    100% {
        filter: drop-shadow(0 0 12px rgba(255, 120, 0, 0.9))
                drop-shadow(0 0 25px rgba(255, 60, 0, 0.7))
                drop-shadow(0 0 35px rgba(255, 20, 0, 0.45));
    }
}

/* Fire particles effect */
.fire-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: visible;
}

.fire-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, #ff6600 0%, #ff3300 50%, transparent 100%);
    border-radius: 50%;
    animation: fire-rise 1.5s ease-out infinite;
    opacity: 0;
}

.fire-particle:nth-child(1) { left: 20%; animation-delay: 0s; }
.fire-particle:nth-child(2) { left: 35%; animation-delay: 0.2s; }
.fire-particle:nth-child(3) { left: 50%; animation-delay: 0.4s; }
.fire-particle:nth-child(4) { left: 65%; animation-delay: 0.6s; }
.fire-particle:nth-child(5) { left: 80%; animation-delay: 0.8s; }
.fire-particle:nth-child(6) { left: 25%; animation-delay: 1s; }
.fire-particle:nth-child(7) { left: 45%; animation-delay: 1.2s; }
.fire-particle:nth-child(8) { left: 70%; animation-delay: 1.4s; }

@keyframes fire-rise {
    0% {
        bottom: 10%;
        opacity: 1;
        transform: scale(1) translateX(0);
    }
    50% {
        opacity: 0.8;
    }
    100% {
        bottom: 100%;
        opacity: 0;
        transform: scale(0.3) translateX(20px);
    }
}

/* ========================================
   HEADER STORM EFFECT
   ======================================== */

.storm-header {
    position: relative;
    overflow: hidden;
}

.storm-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 300%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(100, 150, 255, 0.03) 25%,
        rgba(150, 200, 255, 0.05) 50%,
        rgba(100, 150, 255, 0.03) 75%,
        transparent 100%
    );
    animation: storm-sweep 15s linear infinite;
    pointer-events: none;
}

@keyframes storm-sweep {
    0% { transform: translateX(0); }
    100% { transform: translateX(33.33%); }
}

/* Rain effect overlay */
.rain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    background-image: 
        linear-gradient(transparent 0%, transparent 50%, rgba(100, 150, 200, 0.1) 50%, transparent 51%),
        linear-gradient(transparent 0%, transparent 50%, rgba(100, 150, 200, 0.08) 50%, transparent 51%);
    background-size: 3px 80px, 5px 120px;
    animation: rain-fall 0.8s linear infinite;
    opacity: 0.4;
}

@keyframes rain-fall {
    0% { background-position: 0 0, 10px 0; }
    100% { background-position: 0 80px, 10px 120px; }
}

/* ========================================
   EMBER/SPARK FLOATING EFFECT
   ======================================== */

.embers-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9997;
    overflow: hidden;
}

.ember {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, #ff6600 0%, #ff3300 60%, transparent 100%);
    border-radius: 50%;
    animation: ember-float 8s ease-in-out infinite;
    opacity: 0;
}

@keyframes ember-float {
    0% {
        transform: translateY(100vh) translateX(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-20vh) translateX(100px) scale(0.5);
        opacity: 0;
    }
}

/* Generate multiple embers with different positions and delays */
.ember:nth-child(1) { left: 5%; animation-delay: 0s; animation-duration: 10s; }
.ember:nth-child(2) { left: 15%; animation-delay: 1s; animation-duration: 12s; }
.ember:nth-child(3) { left: 25%; animation-delay: 2s; animation-duration: 9s; }
.ember:nth-child(4) { left: 35%; animation-delay: 0.5s; animation-duration: 11s; }
.ember:nth-child(5) { left: 45%; animation-delay: 3s; animation-duration: 8s; }
.ember:nth-child(6) { left: 55%; animation-delay: 1.5s; animation-duration: 13s; }
.ember:nth-child(7) { left: 65%; animation-delay: 2.5s; animation-duration: 10s; }
.ember:nth-child(8) { left: 75%; animation-delay: 0.8s; animation-duration: 9s; }
.ember:nth-child(9) { left: 85%; animation-delay: 3.5s; animation-duration: 11s; }
.ember:nth-child(10) { left: 95%; animation-delay: 1.2s; animation-duration: 12s; }

/* ========================================
   VIGNETTE EFFECT
   ======================================== */

.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9996;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.4) 100%);
}