/* Splash Screen Styles - Christmas Theme 🎄 */

/* Garantir que body e html não tenham bordas ou margens */
html, body {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    outline: none !important;
}

/* Remover pace loader durante splash */
body.splash-active .pace,
body.splash-active .pace-progress {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

body.splash-active {
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: none !important;
    outline: none !important;
}

#splash-screen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    /* Gradiente natalino mágico */
    background: linear-gradient(135deg, 
        #C41E3A 0%,      /* Vermelho Natal */
        #165B33 25%,     /* Verde Pinheiro */
        #FFD700 50%,     /* Dourado */
        #C41E3A 75%,     /* Vermelho Natal */
        #165B33 100%     /* Verde Pinheiro */
    );
    background-size: 400% 400%;
    animation: christmasGradient 10s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999 !important;
    transition: opacity 0.3s ease-out;
    overflow: hidden;
}

/* Animação do gradiente natalino */
@keyframes christmasGradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Elementos decorativos natalinos flutuantes - Topo */
#splash-screen::before {
    content: '🎄 ⭐ 🎁 ❄️ 🔔 🎄 ⭐ 🎁 ❄️ 🔔 🎄 ⭐ 🎁 ❄️ 🔔';
    position: absolute;
    top: -50px;
    left: 0;
    width: 200%;
    font-size: 60px;
    opacity: 0.35;
    animation: floatChristmas 25s linear infinite;
    white-space: nowrap;
}

/* Elementos decorativos natalinos flutuantes - Base */
#splash-screen::after {
    content: '🎅 🤶 ⛄ 🦌 🎁 🎅 🤶 ⛄ 🦌 🎁 🎅 🤶 ⛄ 🦌 🎁';
    position: absolute;
    bottom: -50px;
    right: 0;
    width: 200%;
    font-size: 60px;
    opacity: 0.35;
    animation: floatChristmasReverse 30s linear infinite;
    white-space: nowrap;
}

@keyframes floatChristmas {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes floatChristmasReverse {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}

#splash-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* Container de neve caindo */
.snowflakes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.snowflake {
    position: absolute;
    top: -10%;
    color: white;
    font-size: 2em;
    font-family: Arial, sans-serif;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
    animation: fall linear infinite;
    opacity: 0.9;
}

@keyframes fall {
    0% {
        top: -10%;
        opacity: 0.9;
    }
    100% {
        top: 100%;
        opacity: 0.4;
    }
}

/* Criar múltiplos elementos natalinos com delays diferentes - Distribuídos uniformemente */
.snowflake:nth-child(1) { left: 3%; animation-duration: 2s; animation-delay: 0s; font-size: 2.4em; }
.snowflake:nth-child(2) { left: 11%; animation-duration: 2.5s; animation-delay: 0s; font-size: 1.6em; }
.snowflake:nth-child(3) { left: 19%; animation-duration: 3s; animation-delay: 0s; font-size: 2em; }
.snowflake:nth-child(4) { left: 27%; animation-duration: 2.2s; animation-delay: 0s; font-size: 2.6em; }
.snowflake:nth-child(5) { left: 35%; animation-duration: 2.8s; animation-delay: 0s; font-size: 1.8em; }
.snowflake:nth-child(6) { left: 43%; animation-duration: 2.5s; animation-delay: 0.1s; font-size: 2.2em; }
.snowflake:nth-child(7) { left: 51%; animation-duration: 3.2s; animation-delay: 0s; font-size: 1.4em; }
.snowflake:nth-child(8) { left: 59%; animation-duration: 2.4s; animation-delay: 0.1s; font-size: 2.8em; }
.snowflake:nth-child(9) { left: 67%; animation-duration: 2.9s; animation-delay: 0s; font-size: 1.7em; }
.snowflake:nth-child(10) { left: 75%; animation-duration: 2.6s; animation-delay: 0.1s; font-size: 2.3em; }
.snowflake:nth-child(11) { left: 83%; animation-duration: 2.1s; animation-delay: 0s; font-size: 1.9em; }
.snowflake:nth-child(12) { left: 91%; animation-duration: 3.1s; animation-delay: 0.1s; font-size: 2.5em; }
.snowflake:nth-child(13) { left: 7%; animation-duration: 2.4s; animation-delay: 0s; font-size: 1.76em; }
.snowflake:nth-child(14) { left: 15%; animation-duration: 2.8s; animation-delay: 0.1s; font-size: 2.1em; }
.snowflake:nth-child(15) { left: 23%; animation-duration: 2.7s; animation-delay: 0s; font-size: 1.84em; }
.snowflake:nth-child(16) { left: 31%; animation-duration: 2.3s; animation-delay: 0s; font-size: 2.7em; }
.snowflake:nth-child(17) { left: 39%; animation-duration: 2.9s; animation-delay: 0.1s; font-size: 1.5em; }
.snowflake:nth-child(18) { left: 47%; animation-duration: 2.6s; animation-delay: 0s; font-size: 2.2em; }
.snowflake:nth-child(19) { left: 55%; animation-duration: 2.2s; animation-delay: 0.1s; font-size: 1.65em; }
.snowflake:nth-child(20) { left: 63%; animation-duration: 3s; animation-delay: 0s; font-size: 2.4em; }
.snowflake:nth-child(21) { left: 71%; animation-duration: 2.4s; animation-delay: 0.1s; font-size: 1.95em; }
.snowflake:nth-child(22) { left: 79%; animation-duration: 2.8s; animation-delay: 0s; font-size: 2.6em; }
.snowflake:nth-child(23) { left: 87%; animation-duration: 2.6s; animation-delay: 0s; font-size: 1.55em; }
.snowflake:nth-child(24) { left: 95%; animation-duration: 2.1s; animation-delay: 0.1s; font-size: 2.3em; }
.snowflake:nth-child(25) { left: 99%; animation-duration: 3.2s; animation-delay: 0.1s; font-size: 1.85em; }

#splash-screen .splash-content {
    text-align: center;
    animation: fadeInUp 0.6s ease-out;
    position: relative;
    z-index: 2;
    padding: 0;
}

#splash-screen .splash-logo {
    width: 180px;
    height: auto;
    max-width: 90%;
    animation: christmasBounce 1.2s ease-in-out infinite;
    filter: drop-shadow(0 10px 35px rgba(255, 215, 0, 0.4));
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes christmasBounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    25% {
        transform: translateY(-15px) scale(1.05);
    }
    50% {
        transform: translateY(-8px) scale(1.02);
    }
    75% {
        transform: translateY(-12px) scale(1.03);
    }
}

/* Loading bar natalino */
#splash-screen .splash-loader {
    margin-top: 40px;
    width: 200px;
    max-width: 80%;
}

#splash-screen .progress-bar {
    width: 100%;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 10px rgba(255, 215, 0, 0.3);
}

#splash-screen .progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, 
        #C41E3A 0%,      /* Vermelho Natal */
        #FFD700 25%,     /* Dourado */
        #165B33 50%,     /* Verde */
        #FFD700 75%,     /* Dourado */
        #C41E3A 100%     /* Vermelho Natal */
    );
    background-size: 200% 100%;
    border-radius: 10px;
    animation: loading 1.5s ease-in-out infinite, christmasColorShift 3s linear infinite;
    width: 70%;
    position: relative;
    box-shadow: 0 2px 15px rgba(255, 215, 0, 0.6);
}

#splash-screen .progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.6) 50%, 
        transparent 100%
    );
    animation: shimmer 1s infinite;
}

@keyframes christmasColorShift {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

@keyframes loading {
    0% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(50%);
    }
    100% {
        transform: translateX(-100%);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}
