/* Splash Screen Styles pour SunuTerrain */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

.splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Logo container avec animation */
.splash-logo-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 30px;
    animation: logoEntry 1.5s ease-out;
}

.splash-logo-bg {
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.splash-logo-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, #1DB954, #4ade80, #22c55e, #1DB954);
    animation: rotate 3s linear infinite;
    z-index: -1;
}

.splash-logo-bg::after {
    content: '';
    position: absolute;
    inset: 3px;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 17px;
    z-index: 0;
}

.splash-logo-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    z-index: 1;
    position: relative;
    animation: logoGlow 2s ease-in-out infinite alternate;
}

/* Texte principal */
.splash-brand-text {
    color: white;
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    animation: textSlideUp 1s ease-out 0.5s both;
}

.splash-brand-subtitle {
    color: #9ca3af;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 40px;
    animation: textSlideUp 1s ease-out 0.7s both;
}

/* Barre de progression */
.splash-progress-container {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 20px;
    animation: progressEntry 1s ease-out 0.9s both;
}

.splash-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #1DB954, #4ade80);
    border-radius: 2px;
    width: 0%;
    animation: progressFill 2.5s ease-out 1.2s forwards;
    position: relative;
}

.splash-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShine 1.5s ease-in-out infinite;
}

/* Texte de chargement */
.splash-loading-text {
    color: #9ca3af;
    font-size: 0.8rem;
    font-weight: 500;
    animation: loadingPulse 1.5s ease-in-out infinite;
}

/* Particules d'arrière-plan */
.splash-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.splash-particle {
    position: absolute;
    background: #1DB954;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.splash-particle:nth-child(1) {
    width: 4px;
    height: 4px;
    left: 10%;
    animation-delay: 0s;
}

.splash-particle:nth-child(2) {
    width: 6px;
    height: 6px;
    left: 80%;
    animation-delay: 1s;
}

.splash-particle:nth-child(3) {
    width: 3px;
    height: 3px;
    left: 60%;
    animation-delay: 2s;
}

.splash-particle:nth-child(4) {
    width: 5px;
    height: 5px;
    left: 30%;
    animation-delay: 3s;
}

.splash-particle:nth-child(5) {
    width: 4px;
    height: 4px;
    left: 90%;
    animation-delay: 4s;
}

/* Animations */
@keyframes logoEntry {
    0% {
        transform: scale(0.3) rotate(-180deg);
        opacity: 0;
    }

    50% {
        transform: scale(1.1) rotate(-90deg);
        opacity: 0.8;
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes logoGlow {
    0% {
        filter: brightness(1) drop-shadow(0 0 10px rgba(29, 185, 84, 0.3));
    }

    100% {
        filter: brightness(1.2) drop-shadow(0 0 20px rgba(29, 185, 84, 0.6));
    }
}

@keyframes textSlideUp {
    0% {
        transform: translateY(30px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes progressEntry {
    0% {
        transform: scaleX(0);
        opacity: 0;
    }

    100% {
        transform: scaleX(1);
        opacity: 1;
    }
}

@keyframes progressFill {
    0% {
        width: 0%;
    }

    20% {
        width: 30%;
    }

    40% {
        width: 60%;
    }

    70% {
        width: 85%;
    }

    100% {
        width: 100%;
    }
}

@keyframes progressShine {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(200%);
    }
}

@keyframes loadingPulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }

    10%,
    90% {
        opacity: 0.1;
    }

    50% {
        transform: translateY(-10px) rotate(180deg);
        opacity: 0.3;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .splash-brand-text {
        font-size: 2rem;
    }

    .splash-logo-container {
        width: 100px;
        height: 100px;
    }

    .splash-logo-img {
        width: 60px;
        height: 60px;
    }
}