/* loader.css - Aurabit Premium Loading Screen */

#app-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #0a0a0c;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s;
    height: 100dvh;
    width: 100vw;
}

#app-loader.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.loader-portal {
    width: 30vmin;
    height: 30vmin;
    min-width: 120px;
    min-height: 120px;
    max-width: 200px;
    max-height: 200px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portal-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid transparent;
}

.ring-1 {
    border-top: 2px solid #a855f7;
    animation: spin 2s linear infinite;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
}

.ring-2 {
    width: 80%;
    height: 80%;
    border-bottom: 2px solid #6366f1;
    animation: spin 1.5s linear infinite reverse;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.ring-3 {
    width: 60%;
    height: 60%;
    border-left: 2px solid #ec4899;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.4);
}

.portal-core {
    width: 24px;
    height: 24px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 25px #fff, 0 0 45px #a855f7;
    animation: pulse 1s ease-in-out infinite alternate;
}

@keyframes pulse {
    from {
        transform: scale(0.8);
        opacity: 0.5;
    }

    to {
        transform: scale(1.2);
        opacity: 1;
    }
}

.loader-text {
    font-family: 'Outfit', sans-serif;
    color: white;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    text-align: center;
    opacity: 0.8;
}

.loader-progress-bar {
    width: 180px;
    height: 2px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.loader-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 30%;
    background: linear-gradient(90deg, #a855f7, #6366f1);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
    animation: progress 2s ease-in-out infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes progress {
    0% {
        left: -30%;
        width: 30%;
    }

    50% {
        width: 50%;
    }

    100% {
        left: 100%;
        width: 30%;
    }
}

/* Base style to prevent flickering while components load */
.initial-hide {
    opacity: 0 !important;
    transition: opacity 0.5s ease;
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

.initial-hide.ready {
    opacity: 1 !important;
}