
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.877); /* Dark translucent background */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Ensure it's above all other content */
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Visible state for the loading overlay */
.loading-overlay.active {
    visibility: visible;
    opacity: 1;
}

/* Spinner styles */
.spinner {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(255, 255, 255, 0.3); /* Light transparent border */
    border-top: 4px solid white; /* Accent color */
    border-radius: 50%;
    animation: spin 0.5s linear infinite; /* Smooth spinning animation */
}

/* Text below spinner */
.loading-text {
    color: white;
    margin-top: 20px;
    font-size: 1.2em;
    text-align: center;
    animation: fadeIn 1s ease-in-out infinite alternate;
}

/* Spinner animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Fade-in animation for the text */
@keyframes fadeIn {
    from {
        opacity: 0.5;
    }
    to {
        opacity: 1;
    }
}