﻿.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    /* display is controlled by JavaScript, not CSS */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

    .loading-overlay.show {
        opacity: 1;
    }

.loading-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Smooth Modern Spinner - GPU Accelerated */
.spinner-gradient {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    position: relative;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

    .spinner-gradient::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        border: 6px solid rgba(255, 255, 255, 0.2);
        transform: translateZ(0);
    }

    .spinner-gradient::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        border: 6px solid transparent;
        border-top-color: #ffffff;
        border-right-color: #ffffff;
        animation: smoothSpin 0.7s linear infinite;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }

.loading-text {
    color: #ffffff;
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: 1px;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

@keyframes smoothSpin {
    0% {
        transform: rotate(0deg) translateZ(0);
    }
    100% {
        transform: rotate(360deg) translateZ(0);
    }
}

/* Force hardware acceleration */
.spinner-gradient,
.spinner-gradient::before,
.spinner-gradient::after {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
}
