/* 1. Stato iniziale: nascondi TUTTI gli elementi che hanno una classe di animazione */
[class*="star-animation-"] {
    opacity: 0;
    visibility: hidden;
}

/* 2. Definisci le animazioni (keyframes) */

/* Animazioni Base */
@keyframes star-reveal-1 { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
@keyframes star-reveal-2 { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }
@keyframes star-slide-up-1 { from { opacity: 0; transform: translateY(100px); } to { opacity: 1; transform: translateY(0); } }
@keyframes star-fade-in-1 { from { opacity: 0; } to { opacity: 1; } }

/* NUOVE Animazioni Complesse */
@keyframes star-zoom-rotate {
    from { opacity: 0; transform: scale(0.5) rotate(-15deg); }
    to { opacity: 1; transform: scale(1) rotate(0deg); }
}
@keyframes star-slide-left {
    from { opacity: 0; transform: translateX(-100px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes star-slide-right {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes star-blur-in {
    from { opacity: 0; filter: blur(15px); transform: scale(1.1); }
    to { opacity: 1; filter: blur(0); transform: scale(1); }
}
@keyframes star-flip-in-3d {
    from { opacity: 0; transform: perspective(1000px) rotateX(-90deg); }
    to { opacity: 1; transform: perspective(1000px) rotateX(0deg); }
}
@keyframes star-clip-reveal {
    from { opacity: 0; clip-path: inset(0 100% 0 0); }
    to { opacity: 1; clip-path: inset(0 0 0 0); }
}

/* 3. Quando il JS aggiunge la classe .star-animate, esegui l'animazione */
.star-animate {
    visibility: visible;
    animation-fill-mode: forwards;
}

/* Applicazione Animazioni Base */
.star-animate.star-animation-reveal-style-1 { animation-name: star-reveal-1; animation-duration: 1s; animation-timing-function: ease-out; }
.star-animate.star-animation-reveal-style-2 { animation-name: star-reveal-2; animation-duration: 1s; animation-timing-function: ease-out; }
.star-animate.star-animation-slide-up-style-1 { animation-name: star-slide-up-1; animation-duration: 0.8s; animation-timing-function: ease-in-out; }
.star-animate.star-animation-fade-in-style-1 { animation-name: star-fade-in-1; animation-duration: 1.2s; animation-timing-function: ease-in; }

/* Applicazione NUOVE Animazioni Complesse */
.star-animate.star-animation-zoom-rotate-1 { animation-name: star-zoom-rotate; animation-duration: 1.2s; animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.star-animate.star-animation-slide-left-1 { animation-name: star-slide-left; animation-duration: 1s; animation-timing-function: ease-out; }
.star-animate.star-animation-slide-right-1 { animation-name: star-slide-right; animation-duration: 1s; animation-timing-function: ease-out; }
.star-animate.star-animation-blur-in-1 { animation-name: star-blur-in; animation-duration: 1.2s; animation-timing-function: ease-out; }
.star-animate.star-animation-flip-in-3d { animation-name: star-flip-in-3d; animation-duration: 1s; animation-timing-function: ease-out; }
.star-animate.star-animation-clip-reveal-1 { animation-name: star-clip-reveal; animation-duration: 1.5s; animation-timing-function: ease-in-out; }