/** CONTENITORE ANIMAZIONI **/

.animation-container {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    perspective: 1200px;
    transform-style: preserve-3d;
    overflow: hidden;
}


/** cherry-leaves **/

.leaves-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    perspective: 900px;
    transform-style: preserve-3d; /* AGGIUNTO: fondamentale per Chrome */
}

.cherry-leaves {
    position: absolute;
    top: -5%;
    background: radial-gradient(
            ellipse at top,
            #FFB7D5 0%,
            #FFC9E0 70%,
            #FFE4F0 100%
    );
    border-radius: 50% 50% 50% 0;
    opacity: 0.85;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    will-change: transform; /* AGGIUNTO: migliora le performance */
}

@keyframes leafMotion {
    0%   { transform: translateX(0) translateY(0) translateZ(0) rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
    25%  { transform: translateX(5vw) translateY(25vh) translateZ(50px) rotateX(90deg) rotateY(45deg) rotateZ(30deg); }
    50%  { transform: translateX(-5vw) translateY(50vh) translateZ(-50px) rotateX(180deg) rotateY(90deg) rotateZ(60deg); }
    75%  { transform: translateX(5vw) translateY(75vh) translateZ(50px) rotateX(270deg) rotateY(135deg) rotateZ(90deg); }
    100% { transform: translateX(0) translateY(100vh) translateZ(0) rotateX(360deg) rotateY(360deg) rotateZ(120deg); }
}

.cherry-leaves:nth-child(1)  { left: 5%;  width: 0.8%; height: 1.3%; animation: leafMotion 12s linear infinite 0s;  }
.cherry-leaves:nth-child(2)  { left: 15%; width: 1.2%; height: 1.9%; animation: leafMotion 14s linear infinite 2s; }
.cherry-leaves:nth-child(3)  { left: 25%; width: 0.9%; height: 1.4%; animation: leafMotion 10s linear infinite 4s; }
.cherry-leaves:nth-child(4)  { left: 35%; width: 1.1%; height: 1.7%; animation: leafMotion 13s linear infinite 1s; }
.cherry-leaves:nth-child(5)  { left: 45%; width: 1%;   height: 1.6%; animation: leafMotion 11s linear infinite 3s; }
.cherry-leaves:nth-child(6)  { left: 55%; width: 0.8%; height: 1.3%; animation: leafMotion 15s linear infinite 5s; }
.cherry-leaves:nth-child(7)  { left: 65%; width: 1.2%; height: 1.9%; animation: leafMotion 12s linear infinite 2s; }
.cherry-leaves:nth-child(8)  { left: 75%; width: 0.9%; height: 1.4%; animation: leafMotion 14s linear infinite 6s; }
.cherry-leaves:nth-child(9)  { left: 85%; width: 1.1%; height: 1.8%; animation: leafMotion 10s linear infinite 1s; }
.cherry-leaves:nth-child(10) { left: 95%; width: 1%;   height: 1.6%; animation: leafMotion 13s linear infinite 4s; }
.cherry-leaves:nth-child(11) { left: 8%;  width: 0.9%; height: 1.4%; animation: leafMotion 11s linear infinite 7s; }
.cherry-leaves:nth-child(12) { left: 18%; width: 1.2%; height: 1.9%; animation: leafMotion 15s linear infinite 3s; }
.cherry-leaves:nth-child(13) { left: 28%; width: 0.8%; height: 1.3%; animation: leafMotion 12s linear infinite 8s; }
.cherry-leaves:nth-child(14) { left: 38%; width: 1.1%; height: 1.7%; animation: leafMotion 14s linear infinite 2s; }
.cherry-leaves:nth-child(15) { left: 48%; width: 1%;   height: 1.6%; animation: leafMotion 10s linear infinite 5s; }
.cherry-leaves:nth-child(16) { left: 58%; width: 0.9%; height: 1.5%; animation: leafMotion 13s linear infinite 1s; }
.cherry-leaves:nth-child(17) { left: 68%; width: 1.2%; height: 1.9%; animation: leafMotion 11s linear infinite 6s; }
.cherry-leaves:nth-child(18) { left: 78%; width: 0.8%; height: 1.3%; animation: leafMotion 15s linear infinite 4s; }
.cherry-leaves:nth-child(19) { left: 88%; width: 1.1%; height: 1.7%; animation: leafMotion 12s linear infinite 7s; }
.cherry-leaves:nth-child(20) { left: 98%; width: 1%;   height: 1.6%; animation: leafMotion 14s linear infinite 3s; }
.cherry-leaves:nth-child(21) { left: 12%; width: 0.9%; height: 1.4%; animation: leafMotion 12s linear infinite 2s; }
.cherry-leaves:nth-child(22) { left: 22%; width: 1.1%; height: 1.7%; animation: leafMotion 13s linear infinite 5s; }
.cherry-leaves:nth-child(23) { left: 32%; width: 0.8%; height: 1.3%; animation: leafMotion 11s linear infinite 1s; }
.cherry-leaves:nth-child(24) { left: 42%; width: 1%;   height: 1.6%; animation: leafMotion 14s linear infinite 4s; }
.cherry-leaves:nth-child(25) { left: 52%; width: 1.2%; height: 1.9%; animation: leafMotion 10s linear infinite 3s; }
.cherry-leaves:nth-child(26) { left: 62%; width: 0.9%; height: 1.5%; animation: leafMotion 12s linear infinite 6s; }
.cherry-leaves:nth-child(27) { left: 72%; width: 1%;   height: 1.6%; animation: leafMotion 15s linear infinite 2s; }
.cherry-leaves:nth-child(28) { left: 82%; width: 0.8%; height: 1.3%; animation: leafMotion 13s linear infinite 5s; }
.cherry-leaves:nth-child(29) { left: 92%; width: 1.1%; height: 1.8%; animation: leafMotion 11s linear infinite 1s; }
.cherry-leaves:nth-child(30) { left: 5%;  width: 1%;   height: 1.6%; animation: leafMotion 14s linear infinite 3s; }
.cherry-leaves:nth-child(31) { left: 14%; width: 0.8%; height: 1.3%; animation: leafMotion 12s linear infinite 7s; }
.cherry-leaves:nth-child(32) { left: 24%; width: 1.2%; height: 1.9%; animation: leafMotion 13s linear infinite 2s; }
.cherry-leaves:nth-child(33) { left: 34%; width: 0.9%; height: 1.4%; animation: leafMotion 10s linear infinite 6s; }
.cherry-leaves:nth-child(34) { left: 44%; width: 1.1%; height: 1.7%; animation: leafMotion 14s linear infinite 1s; }
.cherry-leaves:nth-child(35) { left: 54%; width: 1%;   height: 1.6%; animation: leafMotion 12s linear infinite 4s; }
.cherry-leaves:nth-child(36) { left: 64%; width: 0.8%; height: 1.3%; animation: leafMotion 15s linear infinite 5s; }
.cherry-leaves:nth-child(37) { left: 74%; width: 1.2%; height: 1.9%; animation: leafMotion 11s linear infinite 3s; }
.cherry-leaves:nth-child(38) { left: 84%; width: 0.9%; height: 1.5%; animation: leafMotion 13s linear infinite 6s; }
.cherry-leaves:nth-child(39) { left: 94%; width: 1%;   height: 1.6%; animation: leafMotion 12s linear infinite 2s; }
.cherry-leaves:nth-child(40) { left: 8%;  width: 1.1%; height: 1.7%; animation: leafMotion 14s linear infinite 5s; }

/** FOGLIE AUTUNNALI **/

.autumn-leaves {
    position: absolute;
    top: -5%;
    background: radial-gradient(
            ellipse at top,
            #d0b288 0%,
            #b68b4d 70%,
            #ef8d19 100%
    );
    border-radius: 50% 50% 50% 0;
    opacity: 0.85;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    will-change: transform;
}

.autumn-leaves:nth-child(1)  { left: 5%;  width: 0.8%; height: 1.3%; animation: leafMotion 12s linear infinite 0s;  }
.autumn-leaves:nth-child(2)  { left: 15%; width: 1.2%; height: 1.9%; animation: leafMotion 14s linear infinite 2s; }
.autumn-leaves:nth-child(3)  { left: 25%; width: 0.9%; height: 1.4%; animation: leafMotion 10s linear infinite 4s; }
.autumn-leaves:nth-child(4)  { left: 35%; width: 1.1%; height: 1.7%; animation: leafMotion 13s linear infinite 1s; }
.autumn-leaves:nth-child(5)  { left: 45%; width: 1%;   height: 1.6%; animation: leafMotion 11s linear infinite 3s; }
.autumn-leaves:nth-child(6)  { left: 55%; width: 0.8%; height: 1.3%; animation: leafMotion 15s linear infinite 5s; }
.autumn-leaves:nth-child(7)  { left: 65%; width: 1.2%; height: 1.9%; animation: leafMotion 12s linear infinite 2s; }
.autumn-leaves:nth-child(8)  { left: 75%; width: 0.9%; height: 1.4%; animation: leafMotion 14s linear infinite 6s; }
.autumn-leaves:nth-child(9)  { left: 85%; width: 1.1%; height: 1.8%; animation: leafMotion 10s linear infinite 1s; }
.autumn-leaves:nth-child(10) { left: 95%; width: 1%;   height: 1.6%; animation: leafMotion 13s linear infinite 4s; }
.autumn-leaves:nth-child(11) { left: 8%;  width: 0.9%; height: 1.4%; animation: leafMotion 11s linear infinite 7s; }
.autumn-leaves:nth-child(12) { left: 18%; width: 1.2%; height: 1.9%; animation: leafMotion 15s linear infinite 3s; }
.autumn-leaves:nth-child(13) { left: 28%; width: 0.8%; height: 1.3%; animation: leafMotion 12s linear infinite 8s; }
.autumn-leaves:nth-child(14) { left: 38%; width: 1.1%; height: 1.7%; animation: leafMotion 14s linear infinite 2s; }
.autumn-leaves:nth-child(15) { left: 48%; width: 1%;   height: 1.6%; animation: leafMotion 10s linear infinite 5s; }
.autumn-leaves:nth-child(16) { left: 58%; width: 0.9%; height: 1.5%; animation: leafMotion 13s linear infinite 1s; }
.autumn-leaves:nth-child(17) { left: 68%; width: 1.2%; height: 1.9%; animation: leafMotion 11s linear infinite 6s; }
.autumn-leaves:nth-child(18) { left: 78%; width: 0.8%; height: 1.3%; animation: leafMotion 15s linear infinite 4s; }
.autumn-leaves:nth-child(19) { left: 88%; width: 1.1%; height: 1.7%; animation: leafMotion 12s linear infinite 7s; }
.autumn-leaves:nth-child(20) { left: 98%; width: 1%;   height: 1.6%; animation: leafMotion 14s linear infinite 3s; }
.autumn-leaves:nth-child(21) { left: 12%; width: 0.9%; height: 1.4%; animation: leafMotion 12s linear infinite 2s; }
.autumn-leaves:nth-child(22) { left: 22%; width: 1.1%; height: 1.7%; animation: leafMotion 13s linear infinite 5s; }
.autumn-leaves:nth-child(23) { left: 32%; width: 0.8%; height: 1.3%; animation: leafMotion 11s linear infinite 1s; }
.autumn-leaves:nth-child(24) { left: 42%; width: 1%;   height: 1.6%; animation: leafMotion 14s linear infinite 4s; }
.autumn-leaves:nth-child(25) { left: 52%; width: 1.2%; height: 1.9%; animation: leafMotion 10s linear infinite 3s; }
.autumn-leaves:nth-child(26) { left: 62%; width: 0.9%; height: 1.5%; animation: leafMotion 12s linear infinite 6s; }
.autumn-leaves:nth-child(27) { left: 72%; width: 1%;   height: 1.6%; animation: leafMotion 15s linear infinite 2s; }
.autumn-leaves:nth-child(28) { left: 82%; width: 0.8%; height: 1.3%; animation: leafMotion 13s linear infinite 5s; }
.autumn-leaves:nth-child(29) { left: 92%; width: 1.1%; height: 1.8%; animation: leafMotion 11s linear infinite 1s; }
.autumn-leaves:nth-child(30) { left: 5%;  width: 1%;   height: 1.6%; animation: leafMotion 14s linear infinite 3s; }
.autumn-leaves:nth-child(31) { left: 14%; width: 0.8%; height: 1.3%; animation: leafMotion 12s linear infinite 7s; }
.autumn-leaves:nth-child(32) { left: 24%; width: 1.2%; height: 1.9%; animation: leafMotion 13s linear infinite 2s; }
.autumn-leaves:nth-child(33) { left: 34%; width: 0.9%; height: 1.4%; animation: leafMotion 10s linear infinite 6s; }
.autumn-leaves:nth-child(34) { left: 44%; width: 1.1%; height: 1.7%; animation: leafMotion 14s linear infinite 1s; }
.autumn-leaves:nth-child(35) { left: 54%; width: 1%;   height: 1.6%; animation: leafMotion 12s linear infinite 4s; }
.autumn-leaves:nth-child(36) { left: 64%; width: 0.8%; height: 1.3%; animation: leafMotion 15s linear infinite 5s; }
.autumn-leaves:nth-child(37) { left: 74%; width: 1.2%; height: 1.9%; animation: leafMotion 11s linear infinite 3s; }
.autumn-leaves:nth-child(38) { left: 84%; width: 0.9%; height: 1.5%; animation: leafMotion 13s linear infinite 6s; }
.autumn-leaves:nth-child(39) { left: 94%; width: 1%;   height: 1.6%; animation: leafMotion 12s linear infinite 2s; }
.autumn-leaves:nth-child(40) { left: 8%;  width: 1.1%; height: 1.7%; animation: leafMotion 14s linear infinite 5s; }

/** BAGLIORE LANTERNA **/

.glow-effect {
    position: absolute;
    width: 150px;
    height: 150px;
    margin: 50px auto;
}

.glow-effect.left {
    top: 72%;
    left: 62%;
}

.glow-effect.right {
    top: 72%;
    left: 33%;
}

@media (max-width: 767px) {
    .glow-effect.left {
        top: 75%;
        left: -14%;
    }

    .glow-effect.right {
        top: 75%;
        right: -74%;
    }
}

/* Bagliore centrale */
.glow-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: radial-gradient(circle,
    rgba(255, 220, 120, 1) 0%,
    rgba(255, 180, 80, 0.8) 40%,
    transparent 70%);
    border-radius: 50%;
    animation: pulseCore 2s ease-in-out infinite;
    box-shadow:
            0 0 20px rgba(255, 200, 100, 0.8),
            0 0 40px rgba(255, 180, 80, 0.6),
            0 0 60px rgba(255, 160, 60, 0.4);
}

/* Alone intermedio */
.glow-middle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: radial-gradient(circle,
    rgba(255, 220, 120, 0.5) 0%,
    rgba(255, 200, 100, 0.3) 30%,
    transparent 60%);
    border-radius: 50%;
    animation: pulseMiddle 2s ease-in-out infinite 0.2s;
}

/* Alone esterno */
.glow-outer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle,
    rgba(255, 220, 120, 0.3) 0%,
    rgba(255, 200, 100, 0.15) 30%,
    transparent 50%);
    border-radius: 50%;
    animation: pulseOuter 2s ease-in-out infinite 0.4s;
}

/* Raggi di luce */
.light-rays {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    background: radial-gradient(circle,
    rgba(255, 230, 150, 0.25) 0%,
    transparent 45%);
    border-radius: 50%;
    animation: flicker 3s ease-in-out infinite;
}

@keyframes pulseCore {
    0%, 100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.15);
    }
}

@keyframes pulseMiddle {
    0%, 100% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

@keyframes pulseOuter {
    0%, 100% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1.25);
    }
}

@keyframes flicker {
    0%, 100% {
        opacity: 0.7;
    }
    25% {
        opacity: 0.9;
    }
    50% {
        opacity: 0.5;
    }
    75% {
        opacity: 0.8;
    }
}

/** NEVE **/

.snow {
    position: absolute;
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    animation: fall linear infinite, sway ease-in-out infinite;
    opacity: 0.9;
}

@keyframes fall {
    from {
        top: -10%;
    }
    to {
        top: 100%;
    }
}


@keyframes sway {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(100px);
    }
}

/* Variazioni di dimensione per i fiocchi */
.snow:nth-child(3n) {
    width: 8px;
    height: 8px;
}
.snow:nth-child(5n) {
    width: 12px;
    height: 12px;
}
.snow:nth-child(7n) {
    width: 6px;
    height: 6px;
    opacity: 0.7;
}

/* Posizioni e timing diversi per ogni fiocco */
.snow:nth-child(1) { left: 10%; animation-duration: 12s, 4s; animation-delay: 0s, 0s; }
.snow:nth-child(2) { left: 20%; animation-duration: 15s, 5s; animation-delay: 2s, 0s; }
.snow:nth-child(3) { left: 30%; animation-duration: 10s, 3s; animation-delay: 4s, 0s; }
.snow:nth-child(4) { left: 40%; animation-duration: 13s, 4.5s; animation-delay: 1s, 0s; }
.snow:nth-child(5) { left: 50%; animation-duration: 11s, 3.5s; animation-delay: 3s, 0s; }
.snow:nth-child(6) { left: 60%; animation-duration: 14s, 5.5s; animation-delay: 5s, 0s; }
.snow:nth-child(7) { left: 70%; animation-duration: 12s, 4s; animation-delay: 2.5s, 0s; }
.snow:nth-child(8) { left: 80%; animation-duration: 16s, 6s; animation-delay: 4.5s, 0s; }
.snow:nth-child(9) { left: 90%; animation-duration: 13s, 4.5s; animation-delay: 1.5s, 0s; }
.snow:nth-child(10) { left: 15%; animation-duration: 11s, 3.5s; animation-delay: 6s, 0s; }
.snow:nth-child(11) { left: 25%; animation-duration: 14s, 5s; animation-delay: 3.5s, 0s; }
.snow:nth-child(12) { left: 35%; animation-duration: 12s, 4s; animation-delay: 5.5s, 0s; }
.snow:nth-child(13) { left: 45%; animation-duration: 15s, 5.5s; animation-delay: 2s, 0s; }
.snow:nth-child(14) { left: 55%; animation-duration: 10s, 3s; animation-delay: 4s, 0s; }
.snow:nth-child(15) { left: 65%; animation-duration: 13s, 4.5s; animation-delay: 1s, 0s; }
.snow:nth-child(16) { left: 75%; animation-duration: 11s, 3.5s; animation-delay: 5s, 0s; }
.snow:nth-child(17) { left: 85%; animation-duration: 16s, 6s; animation-delay: 3s, 0s; }
.snow:nth-child(18) { left: 95%; animation-duration: 14s, 5s; animation-delay: 6s, 0s; }
.snow:nth-child(19) { left: 5%; animation-duration: 12s, 4s; animation-delay: 2.5s, 0s; }
.snow:nth-child(20) { left: 8%; animation-duration: 13s, 4.5s; animation-delay: 4.3s, 0s; }
.snow:nth-child(21) { left: 18%; animation-duration: 11s, 3.8s; animation-delay: 6.5s, 0s; }
.snow:nth-child(22) { left: 28%; animation-duration: 14s, 5.2s; animation-delay: 3.2s, 0s; }
.snow:nth-child(23) { left: 38%; animation-duration: 12s, 4.6s; animation-delay: 5.8s, 0s; }
.snow:nth-child(24) { left: 48%; animation-duration: 15s, 5.7s; animation-delay: 2.2s, 0s; }
.snow:nth-child(25) { left: 58%; animation-duration: 10s, 3.1s; animation-delay: 4.8s, 0s; }
.snow:nth-child(26) { left: 68%; animation-duration: 13s, 4.9s; animation-delay: 1.2s, 0s; }
.snow:nth-child(27) { left: 78%; animation-duration: 11s, 3.3s; animation-delay: 5.3s, 0s; }
.snow:nth-child(28) { left: 88%; animation-duration: 16s, 6.8s; animation-delay: 3.1s, 0s; }
.snow:nth-child(29) { left: 98%; animation-duration: 14s, 5.9s; animation-delay: 6.7s, 0s; }
.snow:nth-child(30) { left: 5%; animation-duration: 12s, 4.5s; animation-delay: 2.2s, 0s; }

/** SOLE ESTIVO **/

.sun {
    position: absolute;
    top:0px;
    left:0;
    right:1592px;
    bottom:574px;
    margin: auto;
    width:200px;
    height:200px;
    border-radius:50%;
    background: yellow;
    opacity: 1;
    box-shadow: 0px 0px 40px 15px white;
}

.ray_box {
    position: absolute;
    margin: auto;
    top:0;
    left:0;
    right:0;
    bottom:0;
    width:200px;
    -webkit-animation: ray_anim 120s linear infinite;
    animation: ray_anim 120s linear infinite;
}

.ray {
    background: -webkit-linear-gradient(top, rgba(255,255,255,0) 0%, rgba(255, 255, 255, 0.63) 50%, rgba(255,255,255,0) 100%);
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255, 255, 255, 0.8) 50%, rgba(255,255,255,0) 100%);
    margin-left:30px;
    border-radius:80% 80% 0 0;
    position:absolute;
    opacity:0.6;
}

.ray1 {
    height:480px;
    width:90px;
    -webkit-transform: rotate(180deg);
    top:-490px;
    left: 55px;
}
.ray2 {
    height:280px;
    width:24px;
    -webkit-transform: rotate(220deg);
    top:-270px;
    left: 180px;
}
.ray3 {
    height:480px;
    width:150px;
    -webkit-transform: rotate(250deg);
    top:-250px;
    left: 240px;
}
.ray4 {
    height:340px;
    width:42px;
    -webkit-transform: rotate(305deg);
    top:80px;
    left: 240px;
}
.ray5 {
    height:400px;
    width:90px;
    -webkit-transform: rotate(-15deg);
    top:200px;
    left: 95px;
}
.ray6 {
    height:260px;
    width:150px;
    -webkit-transform: rotate(30deg);
    top:200px;
    left: -90px;
}
.ray7 {
    height:510px;
    width:30px;
    -webkit-transform: rotate(70deg);
    top:-100px;
    left: -90px;
}
.ray8 {
    height:340px;
    width:90px;
    -webkit-transform: rotate(100deg);
    top:-120px;
    left:-230px;
}
.ray9 {
    height:220px;
    width:30px;
    -webkit-transform: rotate(120deg);
    top:-180px;
    left:-150px;
}
.ray10 {
    height:570px;
    width:70px;
    -webkit-transform: rotate(150deg);
    top:-550px;
    left: -150px;
}

@-webkit-keyframes ray_anim {
    0% { -webkit-transform: rotate(0deg); transform: rotate(0deg);}
    100% { -webkit-transform: rotate(360deg); transform: rotate(360deg);}
}

/** FARFALLA **/

.butterfly-container {
    position: absolute;
    top: 570px;
    left: 50%;
    animation: figure8 8s ease-in-out infinite;
}

.butterfly {
    animation: hover 250ms ease-in-out infinite;
    animation-direction: alternate;
    animation-fill-mode: reverse;
    transform-style: preserve-3d;
    transform: scale(0.5) rotateX(50deg) rotateY(20deg) rotateZ(-50deg);
    width: 30px;
    position: relative;
}

.butterfly::before {
    background: #3d3419;
    border-radius: 50%;
    content: '';
    display: block;
    height: 110px;
    left: 50%;
    margin-left: -10px;
    outline: 1px solid transparent;
    position: absolute;
    top: -15px;
    transform: rotatey(100deg);
    width: 20px;
    z-index: 2;
}

.wing {
    background: #888;
    display: block;
    opacity: 0.7;
    outline: 1px solid transparent;
    position: absolute;
    top: 0;
}

.wing:first-child {
    animation: leftflap 250ms cubic-bezier(.48,.01,.54,1) infinite;
    animation-direction: alternate;
    animation-fill-mode: reverse;
    height: 1px;
    left: 0;
    transform: rotateY(-20deg);
    transform-origin: 700% 50%;
    width: 1px;
    z-index: 3;
}

.wing:last-child {
    animation: rightflap 250ms cubic-bezier(.48,.01,.54,1) infinite;
    animation-direction: alternate;
    animation-fill-mode: reverse;
    right: 0;
    transform: rotateY(200deg);
    z-index: 1;
}

.wing .bit {
    background: dodgerblue;
}

.wing .bit::after {
    background: #5eb8ff;
}

.wing .bit,
.wing .bit::after {
    border-radius: 50%;
    overflow: hidden;
    position: absolute;
    right: 0;
    top: 0;
    transform-origin: 100% 50%;
}

.wing .bit:first-child {
    height: 70px;
    text-align: center;
    top: 15px;
    transform: rotateZ(40deg);
    width: 130px;
}

.wing .bit:first-child::after {
    content: '';
    display: inline-block;
    height: 60px;
    left: -30px;
    top: 5px;
    width: 100px;
}

.wing .bit:last-child {
    height: 55px;
    transform: rotateZ(-40deg);
    width: 100px;
}

.wing .bit:last-child::after {
    content: '';
    display: inline-block;
    height: 45px;
    left: -24px;
    top: 5px;
    width: 60px;
    z-index: 1;
}

@keyframes figure8 {
    0% {
        transform: translate(0, 0) rotateX(0deg) rotateZ(0deg);
    }
    12.5% {
        transform: translate(150px, -150px) rotateX(180deg) rotateZ(180deg);
    }
    25% {
        transform: translate(300px, 0) rotateX(180deg) rotateZ(180deg);
    }
    37.5% {
        transform: translate(150px, 150px) rotateX(0deg) rotateZ(0deg);
    }
    50% {
        transform: translate(0, 0) rotateX(0deg) rotateZ(0deg);
    }
    62.5% {
        transform: translate(-150px, 150px) rotateX(0deg) rotateZ(0deg);
    }
    75% {
        transform: translate(-300px, 0) rotateX(0deg) rotateZ(0deg);
    }
    87.5% {
        transform: translate(-150px, -150px) rotateX(180deg) rotateZ(180deg);
    }
    100% {
        transform: translate(0, 0) rotateX(0deg) rotateZ(0deg);
    }
}

@keyframes hover {
    0% {
        transform: scale(0.5) rotateX(50deg) rotateY(20deg) rotateZ(-50deg) translateZ(0px);
    }
    100% {
        transform: scale(0.5) rotateX(50deg) rotateY(20deg) rotateZ(-50deg) translateZ(-3px);
    }
}

@keyframes leftflap {
    0% {
        transform: rotateY(-20deg);
    }
    100% {
        transform: rotateY(90deg);
    }
}

@keyframes rightflap {
    0% {
        transform: rotateY(200deg);
    }
    100% {
        transform: rotateY(90deg);
    }
}

/** POSIZIONE DEGLI ELEMENTI **/

.cherry-leaves,
.autumn-leaves,
.snow {
    top: -5%;
}
