/* Fondamentale: il contenitore deve essere un riferimento */
.video-container {
    position: relative;
    display: block;
    width: 100%;
}

/* Wrapper centrato */
.loader-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 999; /* Numero altissimo per stare sopra a tutto */
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    background: rgba(0, 0, 0, 0.2); /* Leggera ombra per far risaltare il bianco */
}

/* Quando attivato dal JS */
.is-loading .loader-wrapper {
    opacity: 1;
    visibility: visible;
}

/* Lo Spinner bianco */
.loader-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top: 5px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

/* Testo Loading */
.loading-text {
    color: #ffffff !important;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Effetto immagine quando carica */
.is-loading img {
    filter: brightness(0.3) blur(5px) !important;
}

.is-loading .play-button {
    display: none;
}
/* Lo Spinner Colorato */
.loader-spinner {
    width: 50px;
    height: 50px;
    /* Bordo di base semitrasparente */
    border: 5px solid rgba(255, 255, 255, 0.1); 
    
    /* COLORE DELLO SPINNER: puoi cambiare #00d2ff con il tuo colore */
    border-top: 5px solid #00d2ff; 
    border-right: 5px solid #3a7bd5; /* Effetto sfumato sui bordi */
    
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    margin-bottom: 15px;
    
    /* Effetto bagliore (Glow) */
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
}

/* La Scritta Loading colorata (opzionale) */
.loading-text {
    color: #00d2ff !important; /* Stesso colore dello spinner */
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 5px rgba(255, 0, 68, 0.3);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
/* AGGIUNGI QUESTO AL TUO CSS ESISTENTE */
#video-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95); /* Nero profondo */
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 2s ease, visibility 4s ease;
}

#video-overlay.active {
    opacity: 1;
    visibility: visible;
}

#video-wrapper {
    width: 90%;
    max-width: 1000px;
}

#video-wrapper video {
    width: 100%;
    box-shadow: 0 0 50px rgba(0,0,0,1);
}
/* Il sipario nero che copre tutto il sito */
#page-curtain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 10000; /* Sopra a tutto */
    opacity: 0;
    visibility: hidden;
    transition: opacity 6s ease; /* Qui regoli la durata della sfumatura */
}

/* Quando il sipario è attivo */
#page-curtain.active {
    opacity: 0.1;
    visibility: visible;
}