/* ==================== CINEMATIC BACKGROUND VISÍVEL E REAL ==================== */

.cinematic-bg {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: -1 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    background:
        radial-gradient(circle at center, rgba(255, 180, 0, 0.22), transparent 35%),
        linear-gradient(135deg, #050505 0%, #160b05 45%, #2a1208 100%) !important;
}

.cinematic-glow {
    position: absolute;
    top: 45%;
    left: 50%;
    width: 700px;
    height: 700px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255, 190, 0, 0.35), transparent 65%);
    filter: blur(20px);
    animation: cinematicPulse 4s ease-in-out infinite;
}

.cinematic-rays {
    position: absolute;
    inset: -20%;
    background: conic-gradient(
        from 0deg,
        transparent,
        rgba(255, 200, 0, 0.08),
        transparent,
        rgba(255, 120, 0, 0.06),
        transparent
    );
    animation: cinematicRotate 35s linear infinite;
}

.cinematic-particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

@keyframes cinematicPulse {
    0%, 100% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.15);
    }
}

@keyframes cinematicRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==================== MEDIEVAL VILLAGE SCENE ==================== */

.village-scene {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        /* Distant mountains */
        radial-gradient(ellipse at 20% 30%, rgba(40, 25, 15, 0.8) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 25%, rgba(35, 20, 12, 0.7) 0%, transparent 45%),
        radial-gradient(ellipse at 50% 20%, rgba(45, 30, 18, 0.6) 0%, transparent 40%),
        
        /* Village silhouettes */
        linear-gradient(180deg, transparent 40%, rgba(20, 15, 10, 0.3) 60%, rgba(15, 10, 8, 0.5) 80%),
        
        /* Ground */
        linear-gradient(180deg, transparent 70%, rgba(25, 18, 12, 0.4) 90%, rgba(20, 12, 8, 0.6) 100%);
    
    animation: slowPan 20s ease-in-out infinite;
}

/* ==================== GOLDEN GLOW CENTRAL ==================== */

.golden-crest {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: 
        radial-gradient(circle, rgba(255, 215, 0, 0.3) 0%, rgba(255, 200, 0, 0.2) 30%, rgba(255, 165, 0, 0.1) 60%, transparent 100%);
    border-radius: 50%;
    animation: glowPulse 4s ease-in-out infinite;
    box-shadow: 
        0 0 80px rgba(255, 215, 0, 0.4),
        0 0 160px rgba(255, 200, 0, 0.3),
        inset 0 0 60px rgba(255, 215, 0, 0.2);
}

.golden-crest::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: 
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8) 0%, rgba(255, 215, 0, 0.6) 20%, rgba(255, 165, 0, 0.4) 50%, transparent 80%);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    animation: crestRotate 15s linear infinite;
}

/* ==================== LIGHT RAYS SUAVES ==================== */

.light-rays {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 50% 50%, transparent 30%, rgba(255, 215, 0, 0.08) 40%, transparent 50%),
        conic-gradient(from 0deg at 50% 50%, transparent 0deg, rgba(255, 200, 0, 0.03) 30deg, transparent 60deg, rgba(255, 180, 0, 0.02) 120deg, transparent 180deg, rgba(255, 200, 0, 0.03) 240deg, transparent 300deg, rgba(255, 180, 0, 0.02) 360deg);
    animation: rayRotate 40s linear infinite;
    opacity: 0.6;
}

/* ==================== PARTÍCULAS COM PROFUNDIDADE ==================== */

.fire-particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

/* Partículas pequenas (lentas, fundo) */
.fire-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.4) 0%, rgba(255, 200, 0, 0.2) 50%, transparent 100%);
    border-radius: 50%;
    animation: particleFloatSlow 20s linear infinite;
}

.fire-particle:nth-child(1) { top: 10%; left: 20%; animation-delay: 0s; }
.fire-particle:nth-child(2) { top: 30%; left: 60%; animation-delay: 2s; }
.fire-particle:nth-child(3) { top: 50%; left: 40%; animation-delay: 4s; }
.fire-particle:nth-child(4) { top: 70%; left: 80%; animation-delay: 6s; }
.fire-particle:nth-child(5) { top: 20%; left: 90%; animation-delay: 8s; }
.fire-particle:nth-child(6) { top: 80%; left: 10%; animation-delay: 10s; }

/* Partículas médias (um pouco mais rápidas, frente) */
.fire-particle:nth-child(7),
.fire-particle:nth-child(8),
.fire-particle:nth-child(9),
.fire-particle:nth-child(10) {
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.7) 0%, rgba(255, 200, 0, 0.4) 50%, transparent 100%);
    animation: particleFloatFast 12s linear infinite;
}

.fire-particle:nth-child(7) { top: 15%; left: 25%; animation-delay: 1s; }
.fire-particle:nth-child(8) { top: 35%; left: 65%; animation-delay: 3s; }
.fire-particle:nth-child(9) { top: 55%; left: 45%; animation-delay: 5s; }
.fire-particle:nth-child(10) { top: 75%; left: 85%; animation-delay: 7s; }

/* ==================== GLOWING EMBERS ==================== */

.glowing-embers {
    position: absolute;
    width: 100%;
    height: 100%;
}

.ember {
    position: absolute;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, rgba(255, 140, 0, 0.8) 0%, rgba(255, 69, 0, 0.4) 50%, transparent 100%);
    border-radius: 50%;
    animation: emberFloat 12s linear infinite;
}

.ember:nth-child(1) { left: 20%; animation-delay: 0s; animation-duration: 11s; }
.ember:nth-child(2) { left: 35%; animation-delay: 2s; animation-duration: 13s; }
.ember:nth-child(3) { left: 50%; animation-delay: 4s; animation-duration: 10s; }
.ember:nth-child(4) { left: 65%; animation-delay: 6s; animation-duration: 12s; }
.ember:nth-child(5) { left: 80%; animation-delay: 8s; animation-duration: 14s; }

/* ==================== MAGICAL PARTICLES ==================== */

.magical-particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.magic-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.7) 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    border-radius: 50%;
    animation: magicFloat 15s linear infinite;
}

.magic-particle:nth-child(1) { left: 5%; animation-delay: 0s; animation-duration: 14s; }
.magic-particle:nth-child(2) { left: 15%; animation-delay: 3s; animation-duration: 16s; }
.magic-particle:nth-child(3) { left: 25%; animation-delay: 6s; animation-duration: 13s; }
.magic-particle:nth-child(4) { left: 35%; animation-delay: 9s; animation-duration: 15s; }
.magic-particle:nth-child(5) { left: 45%; animation-delay: 12s; animation-duration: 14s; }
.magic-particle:nth-child(6) { left: 55%; animation-delay: 15s; animation-duration: 16s; }
.magic-particle:nth-child(7) { left: 65%; animation-delay: 18s; animation-duration: 13s; }
.magic-particle:nth-child(8) { left: 75%; animation-delay: 21s; animation-duration: 15s; }
.magic-particle:nth-child(9) { left: 85%; animation-delay: 24s; animation-duration: 14s; }
.magic-particle:nth-child(10) { left: 95%; animation-delay: 27s; animation-duration: 16s; }

/* ==================== ATMOSPHERIC FOG ==================== */

.atmospheric-fog {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 30% 70%, rgba(150, 120, 90, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(120, 100, 80, 0.12) 0%, transparent 45%),
        radial-gradient(ellipse at 50% 90%, rgba(100, 80, 60, 0.1) 0%, transparent 40%);
    animation: fogDrift 25s ease-in-out infinite;
}

/* ==================== ANIMATIONS ==================== */

@keyframes slowPan {
    0%, 100% { transform: scale(1) translateX(0); }
    50% { transform: scale(1.05) translateX(-20px); }
}

@keyframes glowPulse {
    0%, 100% { 
        opacity: 0.6; 
        transform: translate(-50%, -50%) scale(1);
    }
    50% { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1.1);
    }
}

@keyframes crestRotate {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes lightRayRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes slowMove {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes slowMoveReverse {
    0% { transform: translateY(0px); }
    50% { transform: translateY(10px); }
    100% { transform: translateY(0px); }
}

@keyframes particleFloatSlow {
    0% {
        top: 100%;
        opacity: 0;
        transform: translateX(0) scale(0.5);
    }
    25% {
        opacity: 0.4;
        transform: translateX(10px) scale(1);
    }
    50% {
        opacity: 0.6;
        transform: translateX(-10px) scale(1.2);
    }
    75% {
        opacity: 0.3;
        transform: translateX(5px) scale(0.8);
    }
    100% {
        top: -10%;
        opacity: 0;
        transform: translateX(0) scale(0.3);
    }
}

@keyframes particleFloatFast {
    0% {
        top: 100%;
        opacity: 0;
        transform: translateX(0) scale(0.5);
    }
    25% {
        opacity: 0.7;
        transform: translateX(20px) scale(1);
    }
    50% {
        opacity: 0.9;
        transform: translateX(-20px) scale(1.3);
    }
    75% {
        opacity: 0.5;
        transform: translateX(10px) scale(0.8);
    }
    100% {
        top: -10%;
        opacity: 0;
        transform: translateX(0) scale(0.3);
    }
}

@keyframes emberFloat {
    0% {
        bottom: -10px;
        opacity: 0;
        transform: translateX(0) scale(0.3);
    }
    20% {
        opacity: 1;
        transform: translateX(15px) scale(1);
    }
    40% {
        opacity: 0.9;
        transform: translateX(-15px) scale(1.3);
    }
    60% {
        opacity: 0.7;
        transform: translateX(10px) scale(1.1);
    }
    80% {
        opacity: 0.4;
        transform: translateX(-5px) scale(0.9);
    }
    100% {
        bottom: 110%;
        opacity: 0;
        transform: translateX(0) scale(0.3);
    }
}

@keyframes magicFloat {
    0% {
        top: 110%;
        opacity: 0;
        transform: translateX(0) rotate(0deg) scale(0.5);
    }
    25% {
        opacity: 0.8;
        transform: translateX(20px) rotate(90deg) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateX(-20px) rotate(180deg) scale(1.2);
    }
    75% {
        opacity: 0.6;
        transform: translateX(10px) rotate(270deg) scale(0.8);
    }
    100% {
        top: -10%;
        opacity: 0;
        transform: translateX(0) rotate(360deg) scale(0.5);
    }
}

@keyframes fogDrift {
    0%, 100% { 
        opacity: 0.3; 
        transform: translateX(0) scale(1);
    }
    50% { 
        opacity: 0.5; 
        transform: translateX(30px) scale(1.1);
    }
}

/* ==================== RESPONSIVE ADJUSTMENTS ==================== */

@media (max-width: 768px) {
    .golden-crest {
        width: 150px;
        height: 150px;
    }
    
    .golden-crest::before {
        width: 90px;
        height: 90px;
    }
    
    .fire-particle, .ember, .magic-particle {
        width: 2px;
        height: 2px;
    }
}

@media (max-width: 480px) {
    .golden-crest {
        width: 120px;
        height: 120px;
    }
    
    .golden-crest::before {
        width: 70px;
        height: 70px;
    }
}
