/* ── Forex Tutor Academy - Ultra-Premium 3D Preloader ── */

#preloader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fdfdff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    overflow: hidden;
    transition: transform 0.8s cubic-bezier(0.85, 0, 0.15, 1), opacity 0.8s ease-in-out;
    /* Auto-hide after 5s as last resort */
    animation: preloader-auto-hide 0s 5s forwards;
}

@keyframes preloader-auto-hide {
    to {
        display: none;
        visibility: hidden;
        pointer-events: none;
        opacity: 0;
    }
}

#preloader-canvas {
    width: 100%;
    height: 400px;
    max-width: 600px;
    z-index: 10;
}

.preloader-content {
    text-align: center;
    margin-top: -50px;
    z-index: 20;
}

.preloader-brand {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #1a1a2e;
    /* Darker for light background */
    position: relative;
    margin-bottom: 15px;
    background: linear-gradient(90deg, rgba(106, 91, 226, 0) 0%, rgba(106, 91, 226, 1) 50%, rgba(106, 91, 226, 0) 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    animation: metallicWipe 3s linear infinite;
    user-select: none;
}

@keyframes metallicWipe {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.preloader-progress {
    font-family: 'Space Mono', monospace;
    /* Monospace for counter */
    font-size: 16px;
    color: #4338ca;
    /* Darker blue/indigo */
    font-weight: 600;
    letter-spacing: 2px;
}

.preloader-progress span::after {
    content: "%";
}

/* Exit Animation States */
.preloader-exit {
    transform: scale(5) !important;
    opacity: 0 !important;
    pointer-events: none;
}

/* Glassmorphism Hints */
.frosted-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}