/* ========================================
   FADEN LOADING SCREEN - GLOBAL STYLES
   ======================================== */

/* Loading Screen Overlay with Animated Background */
#faden-loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
    overflow: hidden;
}

/* Hide all content while loading screen is active */
body:has(#faden-loading-screen:not(.hidden))>*:not(#faden-loading-screen) {
    visibility: hidden !important;
}

/* Animated Blue Gradient Background - Light Mode */
#faden-loading-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(79, 70, 229, 0.1), transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(139, 92, 246, 0.1), transparent 50%);
    animation: gradientShift 8s ease-in-out infinite;
    z-index: 0;
}

html.dark #faden-loading-screen {
    background-color: #0b0b0b;
}

/* Animated Blue Gradient Background - Dark Mode */
html.dark #faden-loading-screen::before {
    background:
        radial-gradient(circle at 20% 50%, rgba(79, 70, 229, 0.08), transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(139, 92, 246, 0.08), transparent 50%);
}

@keyframes gradientShift {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }

    50% {
        transform: translate(10px, 10px) scale(1.05);
        opacity: 0.8;
    }
}

/* Hide loading screen */
#faden-loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Loader Container - Centered */
.faden-loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

/* Bouncing Balls Container */
.faden-loader {
    width: 60px;
    display: flex;
    justify-content: space-evenly;
    align-items: flex-end;
    height: 40px;
}

/* Individual Ball Styling - White */
.ball {
    list-style: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ffffff;
}

/* Dark Mode Ball Color - Same White */
html.dark .ball {
    background-color: #ffffff;
}

/* Ball 1 Animation - 1.5s */
.ball:nth-child(1) {
    animation: bounce-1 1.5s ease-in-out infinite;
}

@keyframes bounce-1 {
    50% {
        transform: translateY(-18px);
        background-color: #7c3aed;
    }
}

/* Ball 2 Animation - 1.5s */
.ball:nth-child(2) {
    animation: bounce-2 1.5s ease-in-out 0.2s infinite;
}

@keyframes bounce-2 {
    50% {
        transform: translateY(-18px);
        background-color: #7c3aed;
    }
}

/* Ball 3 Animation - 1.5s */
.ball:nth-child(3) {
    animation: bounce-3 1.5s ease-in-out 0.4s infinite;
}

@keyframes bounce-3 {
    50% {
        transform: translateY(-18px);
        background-color: #7c3aed;
    }
}

/* FADEN Branding Text with Animation */
.faden-brand-text {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.05em;
    color: #1a1a1a;
    margin-top: 0.5rem;
    animation: fadeInPulse 2s ease-in-out infinite;
}

html.dark .faden-brand-text {
    color: #ffffff;
}

/* FADEN Text Animation - Fade In + Subtle Pulse */
@keyframes fadeInPulse {
    0% {
        opacity: 0.6;
        transform: scale(0.98);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0.6;
        transform: scale(0.98);
    }
}