/* =====================================================
   SproutSong Premium Loader – FIXED
===================================================== */

html,
body {
    margin: 0;
    padding: 0;
    background-color: #ffffff; /* MUST match loader */
    overflow-x: hidden;
}

/* Loader wrapper */
.app-loader {
    position: fixed;
    inset: 0; /* top, right, bottom, left = 0 */
    width: 100%;
    height: 100%;
    background-color: #ffffff; /* match body bg */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;

    /* Performance + visual stability */
    will-change: opacity;
    transform: translateZ(0);

    transition:
        opacity 0.5s ease,
        visibility 0.5s ease;
}

/* Fade-out state */
.app-loader.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Inner content */
.loader-content {
    text-align: center;
}

/* Logo / icon animation */
.loader-icon {
    width: 330px;
    height: auto;
    margin-bottom: 20px;
    animation: pulseLoader 2s infinite ease-in-out;
}

/* Icon pulse */
@keyframes pulseLoader {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
    100% {
        transform: scale(0.95);
        opacity: 0.8;
    }
}

/* Loader text */
.loader-text {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    color: #4a6cf7;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    animation: textFade 2s infinite ease-in-out;
}

/* Text fade */
@keyframes textFade {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}
