/*--------------------------------------------------------------
Forge Fire Animation - Temporary Demo Background
--------------------------------------------------------------*/

/* Animated forge fire background */
.hero-video-container.demo-mode {
    background: linear-gradient(
        180deg,
        #2A4A4A 0%,
        #8B4513 50%,
        #FF6B1A 100%
    );
    animation: forgeGlow 3s ease-in-out infinite alternate;
}

@keyframes forgeGlow {
    0% {
        background: linear-gradient(
            180deg,
            #2A4A4A 0%,
            #8B4513 50%,
            #FF6B1A 100%
        );
    }
    100% {
        background: linear-gradient(
            180deg,
            #1a2a2a 0%,
            #FF6B1A 50%,
            #D4AF37 100%
        );
    }
}

/* Animated fire particles - only show in demo mode */
.hero-video-container:not(.demo-mode) .fire-particles,
.hero-video-container:not(.demo-mode) .heat-wave {
    display: none;
}

.fire-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    bottom: -20px;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, #FFD700, #FF6B1A);
    border-radius: 50%;
    opacity: 0;
    animation: float-up 4s ease-in infinite;
    box-shadow: 0 0 10px #FF6B1A, 0 0 20px #FFD700;
}

/* Create multiple particles with different delays */
.particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 3s; }
.particle:nth-child(2) { left: 20%; animation-delay: 0.5s; animation-duration: 4s; }
.particle:nth-child(3) { left: 30%; animation-delay: 1s; animation-duration: 3.5s; }
.particle:nth-child(4) { left: 40%; animation-delay: 1.5s; animation-duration: 4.5s; }
.particle:nth-child(5) { left: 50%; animation-delay: 2s; animation-duration: 3s; }
.particle:nth-child(6) { left: 60%; animation-delay: 2.5s; animation-duration: 4s; }
.particle:nth-child(7) { left: 70%; animation-delay: 3s; animation-duration: 3.5s; }
.particle:nth-child(8) { left: 80%; animation-delay: 3.5s; animation-duration: 4.5s; }
.particle:nth-child(9) { left: 90%; animation-delay: 1.2s; animation-duration: 3.8s; }
.particle:nth-child(10) { left: 15%; animation-delay: 2.7s; animation-duration: 4.2s; }
.particle:nth-child(11) { left: 25%; animation-delay: 0.8s; animation-duration: 3.3s; }
.particle:nth-child(12) { left: 35%; animation-delay: 1.9s; animation-duration: 4.7s; }
.particle:nth-child(13) { left: 45%; animation-delay: 0.3s; animation-duration: 3.9s; }
.particle:nth-child(14) { left: 55%; animation-delay: 2.3s; animation-duration: 4.1s; }
.particle:nth-child(15) { left: 65%; animation-delay: 1.4s; animation-duration: 3.6s; }
.particle:nth-child(16) { left: 75%; animation-delay: 0.9s; animation-duration: 4.4s; }
.particle:nth-child(17) { left: 85%; animation-delay: 2.9s; animation-duration: 3.2s; }
.particle:nth-child(18) { left: 95%; animation-delay: 1.7s; animation-duration: 4.6s; }
.particle:nth-child(19) { left: 5%; animation-delay: 3.2s; animation-duration: 3.7s; }
.particle:nth-child(20) { left: 50%; animation-delay: 0.1s; animation-duration: 4.3s; }

@keyframes float-up {
    0% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    50% {
        opacity: 1;
        transform: translateY(-400px) translateX(20px) scale(1.5);
    }
    100% {
        transform: translateY(-800px) translateX(-20px) scale(0.5);
        opacity: 0;
    }
}

/* Glowing embers effect */
.ember {
    position: absolute;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, #FFD700, #FF6B1A);
    border-radius: 50%;
    box-shadow: 0 0 20px #FF6B1A, 0 0 40px #FFD700;
    animation: ember-glow 2s ease-in-out infinite alternate;
}

.ember:nth-child(odd) { animation-duration: 1.5s; }
.ember:nth-child(even) { animation-duration: 2.5s; }

@keyframes ember-glow {
    0% {
        opacity: 0.3;
        transform: scale(1);
    }
    100% {
        opacity: 1;
        transform: scale(1.5);
    }
}

/* Position embers randomly */
.ember:nth-of-type(21) { top: 60%; left: 12%; animation-delay: 0s; }
.ember:nth-of-type(22) { top: 70%; left: 28%; animation-delay: 0.3s; }
.ember:nth-of-type(23) { top: 65%; left: 45%; animation-delay: 0.6s; }
.ember:nth-of-type(24) { top: 75%; left: 62%; animation-delay: 0.9s; }
.ember:nth-of-type(25) { top: 68%; left: 78%; animation-delay: 1.2s; }
.ember:nth-of-type(26) { top: 72%; left: 88%; animation-delay: 1.5s; }
.ember:nth-of-type(27) { top: 80%; left: 18%; animation-delay: 1.8s; }
.ember:nth-of-type(28) { top: 85%; left: 38%; animation-delay: 2.1s; }
.ember:nth-of-type(29) { top: 78%; left: 52%; animation-delay: 0.4s; }
.ember:nth-of-type(30) { top: 82%; left: 72%; animation-delay: 1.1s; }

/* Heat wave effect */
.heat-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(
        to top,
        rgba(255, 107, 26, 0.4) 0%,
        rgba(212, 175, 55, 0.2) 50%,
        transparent 100%
    );
    animation: heat-shimmer 2s ease-in-out infinite;
}

@keyframes heat-shimmer {
    0%, 100% {
        transform: translateY(0) scaleY(1);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-20px) scaleY(1.1);
        opacity: 0.8;
    }
}

/* Disable animations on mobile for performance */
@media screen and (max-width: 768px) {
    .particle,
    .ember {
        display: none;
    }
    
    .hero-video-container.demo-mode {
        animation: none;
        background: linear-gradient(
            180deg,
            #2A4A4A 0%,
            #8B4513 50%,
            #FF6B1A 100%
        );
    }
}
