/* Splash Screen - 8º São João da ASCULP */
/* Cenário animado temático de São João */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.splash-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 9999;
    animation: splashFadeOut 0.8s ease-in-out 4.5s forwards;
}

/* BACKGROUND PRINCIPAL */
.splash-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        #0a0a2a 0%,
        #1a0a2a 20%,
        #2a0a2a 40%,
        #1a2a1a 60%,
        #0a2a1a 80%,
        #0a0a2a 100%);
    overflow: hidden;
}

/* ========== FOGUEIRA ANIMADA ========== */
.fire-container {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 150px;
    z-index: 10;
}

.fire-flame {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 40px;
    height: 80px;
    background: linear-gradient(0deg, #ff6600, #ffcc00, #ff3300);
    border-radius: 50% 50% 20% 20%;
    transform-origin: bottom;
    animation: flameFlicker 0.3s infinite alternate;
}

.flame-1 {
    width: 50px;
    height: 100px;
    margin-left: -25px;
    animation-duration: 0.2s;
    background: linear-gradient(0deg, #ff4400, #ff8800, #ffcc00);
}

.flame-2 {
    width: 35px;
    height: 70px;
    margin-left: -45px;
    animation-duration: 0.25s;
    animation-delay: 0.05s;
}

.flame-3 {
    width: 35px;
    height: 75px;
    margin-left: 10px;
    animation-duration: 0.22s;
    animation-delay: 0.1s;
}

.fire-logs {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 15px;
    background: #8B4513;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.fire-logs::before,
.fire-logs::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 10px;
    background: #A0522D;
    border-radius: 5px;
}

.fire-logs::before {
    transform: rotate(30deg);
    top: -5px;
    left: 5px;
}

.fire-logs::after {
    transform: rotate(-30deg);
    top: -5px;
    right: 5px;
}

@keyframes flameFlicker {
    0% {
        transform: scaleY(1) translateY(0);
        opacity: 0.8;
    }
    100% {
        transform: scaleY(1.15) translateY(-5px);
        opacity: 1;
    }
}

/* ========== BALÕES SUBINDO ========== */
.balloons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.balloon {
    position: absolute;
    font-size: 2rem;
    animation: balloonRise 8s linear infinite;
    opacity: 0.7;
}

.balloon-1 {
    left: 10%;
    animation-duration: 6s;
    animation-delay: 0s;
}

.balloon-2 {
    left: 25%;
    animation-duration: 8s;
    animation-delay: 2s;
    font-size: 1.8rem;
}

.balloon-3 {
    left: 50%;
    animation-duration: 7s;
    animation-delay: 1s;
    font-size: 2.2rem;
}

.balloon-4 {
    left: 70%;
    animation-duration: 9s;
    animation-delay: 3s;
    font-size: 1.6rem;
}

.balloon-5 {
    left: 85%;
    animation-duration: 6.5s;
    animation-delay: 0.5s;
    font-size: 2rem;
}

@keyframes balloonRise {
    0% {
        bottom: -50px;
        transform: translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        bottom: 100%;
        transform: translateX(20px) rotate(10deg);
        opacity: 0;
    }
}

/* ========== BANDEIRINHAS ========== */
.bandeirinhas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    pointer-events: none;
    z-index: 8;
}

.bandeira-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 10px 0;
    animation: bandeiraWave 2s ease-in-out infinite;
}

.bandeira {
    width: 40px;
    height: 25px;
    clip-path: polygon(0% 0%, 100% 0%, 80% 100%, 20% 100%);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    animation: bandeiraFlap 1.5s ease-in-out infinite;
}

@keyframes bandeiraWave {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(3px);
    }
}

@keyframes bandeiraFlap {
    0%, 100% {
        transform: skewX(0deg);
    }
    50% {
        transform: skewX(5deg);
    }
}

/* ========== FOGOS DE ARTIFÍCIO ========== */
.fireworks {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9;
}

.firework {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    animation: fireworkExplode 2s ease-out infinite;
}

.firework-1 {
    top: 20%;
    left: 15%;
    animation-delay: 0s;
    box-shadow: 0 0 5px #ff0000, 0 0 10px #ff6600;
}

.firework-2 {
    top: 15%;
    right: 20%;
    animation-delay: 1s;
    box-shadow: 0 0 5px #00ff00, 0 0 10px #44ff44;
}

.firework-3 {
    top: 30%;
    left: 40%;
    animation-delay: 2s;
    box-shadow: 0 0 5px #ff00ff, 0 0 10px #ff44ff;
}

.firework-4 {
    top: 25%;
    right: 45%;
    animation-delay: 3s;
    box-shadow: 0 0 5px #ffff00, 0 0 10px #ffcc00;
}

@keyframes fireworkExplode {
    0% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 5px currentColor;
    }
    50% {
        transform: scale(20);
        opacity: 0.8;
    }
    100% {
        transform: scale(40);
        opacity: 0;
    }
}

/* ========== ESTRELAS PISCANDO ========== */
.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: starTwinkle 2s infinite alternate;
}

.star:nth-child(1) { top: 10%; left: 20%; animation-delay: 0s; }
.star:nth-child(2) { top: 25%; left: 80%; animation-delay: 0.3s; width: 3px; height: 3px; }
.star:nth-child(3) { top: 45%; left: 15%; animation-delay: 0.6s; }
.star:nth-child(4) { top: 60%; left: 65%; animation-delay: 0.9s; width: 2px; }
.star:nth-child(5) { top: 75%; left: 35%; animation-delay: 1.2s; width: 3px; }
.star:nth-child(6) { top: 15%; left: 50%; animation-delay: 1.5s; }
.star:nth-child(7) { top: 80%; left: 85%; animation-delay: 1.8s; }
.star:nth-child(8) { top: 40%; left: 45%; animation-delay: 2.1s; width: 2px; }
.star:nth-child(9) { top: 55%; left: 90%; animation-delay: 2.4s; }
.star:nth-child(10) { top: 30%; left: 10%; animation-delay: 2.7s; width: 3px; }

@keyframes starTwinkle {
    0% {
        opacity: 0.2;
        transform: scale(1);
    }
    100% {
        opacity: 1;
        transform: scale(1.5);
    }
}

/* ========== LUAR ========== */
.moon {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, #ffffcc, #ffffee);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(255,255,200,0.5);
    animation: moonGlow 3s ease-in-out infinite alternate;
    z-index: 2;
}

@keyframes moonGlow {
    0% {
        box-shadow: 0 0 10px rgba(255,255,200,0.3);
        transform: scale(1);
    }
    100% {
        box-shadow: 0 0 30px rgba(255,255,200,0.8);
        transform: scale(1.05);
    }
}

/* ========== CONTEÚDO PRINCIPAL (LOGO) ========== */
.splash-content {
    position: relative;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(3px);
}

.logo-wrapper {
    margin-bottom: 30px;
    animation: logoFloat 2s ease-in-out infinite;
}

.splash-logo {
    max-width: 280px;
    width: 80%;
    height: auto;
    filter: drop-shadow(0 0 30px rgba(255,255,255,0.4));
    animation: logoGlow 2s ease-in-out infinite alternate;
}

.splash-title {
    font-size: clamp(1.5rem, 5vw, 2.8rem);
    color: #fff;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.5);
    margin-bottom: 15px;
    font-weight: bold;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #fff, #ffcc00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.splash-subtitle {
    font-size: clamp(0.9rem, 3vw, 1.3rem);
    color: rgba(255,255,255,0.95);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
    margin-bottom: 40px;
}

/* SPINNER PERSONALIZADO */
.custom-spinner {
    display: flex;
    gap: 15px;
    justify-content: center;
    font-size: 1.5rem;
    animation: spinnerRotate 1s linear infinite;
}

.custom-spinner span {
    animation: iconBounce 0.5s ease-in-out infinite alternate;
}

.custom-spinner span:nth-child(1) { animation-delay: 0s; }
.custom-spinner span:nth-child(2) { animation-delay: 0.15s; }
.custom-spinner span:nth-child(3) { animation-delay: 0.3s; }
.custom-spinner span:nth-child(4) { animation-delay: 0.45s; }

@keyframes spinnerRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes iconBounce {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-10px);
    }
}

/* ANIMAÇÕES PRINCIPAIS */
@keyframes splashFadeOut {
    0% {
        opacity: 1;
        visibility: visible;
    }
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

@keyframes logoGlow {
    0% {
        filter: drop-shadow(0 0 10px rgba(255,255,255,0.3));
    }
    100% {
        filter: drop-shadow(0 0 40px rgba(255,255,255,0.7));
    }
}

/* RESPONSIVIDADE */
@media (max-width: 768px) {
    .splash-logo {
        max-width: 200px;
    }
    
    .splash-title {
        font-size: 1.5rem;
    }
    
    .fire-container {
        width: 100px;
        height: 100px;
        bottom: 10px;
    }
    
    .fire-flame {
        width: 25px;
        height: 50px;
    }
    
    .flame-1 {
        width: 35px;
        height: 65px;
    }
    
    .moon {
        width: 40px;
        height: 40px;
        top: 15px;
        right: 15px;
    }
    
    .balloon {
        font-size: 1.2rem;
    }
    
    .bandeira {
        width: 25px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .splash-logo {
        max-width: 150px;
    }
    
    .splash-title {
        font-size: 1.2rem;
    }
    
    .splash-subtitle {
        font-size: 0.8rem;
    }
    
    .custom-spinner {
        font-size: 1rem;
        gap: 10px;
    }
    
    .fire-container {
        transform: translateX(-50%) scale(0.7);
    }
}