:root {
    --coloreBG: #000;
    --orbsColor: radial-gradient(#D9C7FB 22%,#300D75 66%,#FFFFFF 97%);
    --sfumatura: 0 0 5px #fff, 0 0 10px #fff, 0 0 20px #fff;
}

.start-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.anim-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.linea_start {
    position: absolute;
    width: 0;
    height: 4px;
    background-color: #ffffff;
    border-radius: 2px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    animation: allungamento 1.8s ease-in-out forwards;
}

@keyframes allungamento {
    0% {
        width: 0;
    }
    100% {
        width: 800px;
    }
}

.obrs {
    position: absolute;
    width: 0px;
    height: 0px;
    border-radius: 50%;
    background: var(--orbsColor);
    top: 50%;
    left: 50%;
    transform: translate(-50%, 40%);
    filter: blur(100px);
    opacity: 0;
    z-index: 1;
    transition: all 1.2s ease-out;
}

.obrs.active {
    width: 600px;
    height: 600px;
    opacity: 0.7;
    filter: blur(180px);
}

/* Animazione di dissolvenza dell'orb prima della scomparsa */
.obrs.fade-out {
    opacity: 0;
    transition: opacity 0.8s ease-out;
}

/* Versione animata in synchronia con la macchina */
.obrs1 {
    animation: orbPulsante 1.8s ease-out forwards;
    animation-delay: 1.8s;
}

@keyframes orbPulsante {
    0% {
        width: 0px;
        height: 0px;
        opacity: 0;
        filter: blur(80px);
    }
    50% {
        width: 500px;
        height: 500px;
        opacity: 0.8;
        filter: blur(160px);
    }
    100% {
        width: 600px;
        height: 600px;
        opacity: 0.7;
        filter: blur(200px);
    }
}

.anim-car {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 180px;  
    transform: translate(-400px, -65%);
    opacity: 0;
    z-index: 3;
    animation: scorrimento 1.8s ease-out forwards;
    animation-delay: 1.8s;
}

@keyframes scorrimento {
    0% {
        transform: translate(-400px, -65%);
        opacity: 0;
    }
    0.1% {
        opacity: 1;
    }
    10%{
        transform: translate(-400px, -65%);
        opacity: 1;
    }
    100% {
        transform: translate(240px, -65%);
        opacity: 1;
    }
}

.anim-car img {
    width: 100%;
    height: auto;
    display: block;
}

/* Per schermi più piccoli di 860px, ridimensiona proporzionalmente */
@media (max-width: 860px) {
    @keyframes allungamento {
        0% {
            width: 0;
        }
        100% {
            width: 85vw;
        }
    }
    
    .anim-car {
        width: 18vw;
    }
    
    @keyframes scorrimento {
        0% {
            transform: translate(calc(-42.5vw), -65%);
            opacity: 0;
        }
        1% {
            opacity: 1;
        }
        100% {
            transform: translate(calc(42.5vw - 18vw), -65%);
            opacity: 1;
        }
    }
    
    @keyframes orbPulsante {
        0% {
            width: 0px;
            height: 0px;
            opacity: 0;
        }
        50% {
            width: 60vw;
            height: 60vw;
            opacity: 0.8;
        }
        100% {
            width: 70vw;
            height: 70vw;
            opacity: 0.7;
        }
    }
}

/* Classi per il contenuto principale */
.main-content {
    transition: opacity 1s ease;
}

.hidden {
    opacity: 0;
    visibility: hidden;
}

.main-content:not(.hidden) {
    opacity: 1;
    visibility: visible;
}