/**
 * FONDS ANIMÉS MAGNIFIQUES - BLEU MARINE
 * Inspirés des launchers KOF Ultimate Online
 */

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body.animated-bg {
    background: linear-gradient(
        135deg,
        #0a1628 0%,
        #162447 15%,
        #1f4068 30%,
        #1b1b2f 50%,
        #162447 70%,
        #0a1628 100%
    ) !important;
    background-size: 400% 400% !important;
    animation: gradientFlow 20s ease infinite !important;
    position: relative;
    overflow-x: hidden;
}

/* Particules scintillantes */
body.animated-bg::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(100, 150, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(138, 43, 226, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(70, 130, 255, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 60% 70%, rgba(160, 100, 255, 0.08) 0%, transparent 50%);
    animation: particlesFloat 15s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes particlesFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-30px) scale(1.1);
        opacity: 1;
    }
}

/* Étoiles scintillantes */
body.animated-bg::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent),
        radial-gradient(2px 2px at 90% 60%, white, transparent),
        radial-gradient(1px 1px at 33% 85%, white, transparent);
    background-size: 200% 200%;
    animation: starsShimmer 8s ease-in-out infinite;
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

@keyframes starsShimmer {
    0%, 100% {
        opacity: 0.3;
        background-position: 0% 0%;
    }
    50% {
        opacity: 0.6;
        background-position: 100% 100%;
    }
}

/* Z-index pour contenus */
.container, .section-category, .card, nav, header, footer,
.btn, h1, h2, h3, h4, h5, h6, p, a, button {
    position: relative;
    z-index: 10;
}
