/* Loading Screen */
body.loading {
    overflow: hidden;
    height: 100vh;
}

#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0B0E13;
    /* Fallback for var(--bg-primary) */
    background-color: var(--bg-primary);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 2;
}

.loader-logo {
    width: 120px;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(255, 107, 53, 0.3));
    animation: pulseLogo 2s infinite ease-in-out;
}

.loading-bar {
    width: 180px;
    height: 2px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.loading-progress {
    width: 0%;
    height: 100%;
    background: var(--accent-gradient);
    position: absolute;
    left: 0;
    top: 0;
    animation: loadProgress 2.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes pulseLogo {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
        filter: drop-shadow(0 0 20px rgba(255, 107, 53, 0.3));
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
        filter: drop-shadow(0 0 30px rgba(255, 107, 53, 0.5));
    }
}

@keyframes loadProgress {
    0% {
        width: 0%;
    }

    50% {
        width: 70%;
    }

    100% {
        width: 100%;
    }
}