#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #222; /* Dark background */
    display: none; /* Inizialmente nascosto */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 12000; /* Higher than sidebar/modal/popup */
    color: white;
    font-family: Arial, sans-serif;
    opacity: 1;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#loading-screen.visible {
    display: flex !important;
}

.spinner {
    border: 8px solid rgba(255, 255, 255, 0.3);
    border-top: 8px solid var(--primary-color, #fff); /* Use primary color or fallback to white */
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.progress-bar-container {
    width: 200px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background-color: var(--primary-color, #fff); /* Use primary color */
    border-radius: 5px;
    transition: width 0.3s ease;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.logo {
    margin-bottom: 20px;
}

.footer-logo {
    display: inline-block;
    color: white;
    font-size: 24px;
    font-weight: 300;
    text-transform: capitalize;
    letter-spacing: 1px;
    border: 1px solid var(--primary-color, #ff6600); /* Use primary color */
    padding: 8px 16px;
    background-color: transparent;
}
