/* Effetto bolle per GenIApp - Integrato nel design esistente */

.bubbles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 999999;
    overflow: hidden;
    pointer-events: none;
}

.bubbles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.bubble {
    position: absolute;
    bottom: -120px;
    border-radius: 50%;
    opacity: 0.8;
    animation: rise 12s infinite ease-in;
    /* Colore base - verrà sovrascritto per ogni bolla */
    background: #f1742b60;
    backdrop-filter: blur(1px);
}

/* Variazioni per ogni bolla con dimensioni e posizioni diverse */
.bubble:nth-child(1) {
    width: 35px;
    height: 35px;
    left: 8%;
    animation-duration: 10s;
    animation-delay: 0s;
    background: #f1742b60;
}

.bubble:nth-child(2) {
    width: 20px;
    height: 20px;
    left: 18%;
    animation-duration: 7s;
    animation-delay: 1.5s;
    background: #59549860;
}

.bubble:nth-child(3) {
    width: 45px;
    height: 45px;
    left: 32%;
    animation-duration: 9s;
    animation-delay: 3s;
    background: #f1742b60;
}

.bubble:nth-child(4) {
    width: 70px;
    height: 70px;
    left: 48%;
    animation-duration: 13s;
    animation-delay: 0.5s;
    background: #59549860;
}

.bubble:nth-child(5) {
    width: 30px;
    height: 30px;
    left: 58%;
    animation-duration: 8s;
    animation-delay: 2s;
    background: #f1742b60;
}

.bubble:nth-child(6) {
    width: 40px;
    height: 40px;
    left: 68%;
    animation-duration: 11s;
    animation-delay: 4s;
    background: #59549860;
}

.bubble:nth-child(7) {
    width: 80px;
    height: 80px;
    left: 75%;
    animation-duration: 14s;
    animation-delay: 1s;
    background: #f1742b60;
}

.bubble:nth-child(8) {
    width: 25px;
    height: 25px;
    left: 82%;
    animation-duration: 6s;
    animation-delay: 3.5s;
    background: #59549860;
}

.bubble:nth-child(9) {
    width: 15px;
    height: 15px;
    left: 88%;
    animation-duration: 5s;
    animation-delay: 2.5s;
    background: #f1742b60;
}

.bubble:nth-child(10) {
    width: 85px;
    height: 85px;
    left: 22%;
    animation-duration: 12s;
    animation-delay: 5s;
    background: #59549860;
}

.bubble:nth-child(11) {
    width: 28px;
    height: 28px;
    left: 42%;
    animation-duration: 7.5s;
    animation-delay: 1.8s;
    background: #f1742b60;
}

.bubble:nth-child(12) {
    width: 55px;
    height: 55px;
    left: 62%;
    animation-duration: 10.5s;
    animation-delay: 3.2s;
    background: #59549860;
}

/* Animazione per far salire le bolle */
@keyframes rise {
    0% {
        bottom: -120px;
        transform: translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.4;
    }
    25% {
        transform: translateX(15px) rotate(45deg);
    }
    50% {
        transform: translateX(-25px) rotate(180deg);
        opacity: 0.3;
    }
    75% {
        transform: translateX(35px) rotate(270deg);
    }
    90% {
        opacity: 0.1;
    }
    100% {
        bottom: calc(100vh + 100px);
        transform: translateX(-15px) rotate(360deg);
        opacity: 0;
    }
}

/* Responsive: ottimizza per mobile */
@media (max-width: 768px) {
    .bubbles-container {
        height: 100vh;
        height: 100dvh; /* Usa dynamic viewport height per mobile */
    }
    
    .bubble:nth-child(n+10) {
        display: none; /* Nascondi solo le ultime 3 bolle invece di 6 */
    }
    
    .bubble {
        animation-duration: 10s; /* Rallenta leggermente per essere più visibili */
        opacity: 0.9; /* Aumenta opacità su mobile */
    }
    
    /* Rendi le bolle leggermente più grandi su mobile */
    .bubble:nth-child(1), .bubble:nth-child(3), .bubble:nth-child(5) {
        transform: scale(1.2);
    }
}

/* Riduce movimento per utenti che preferiscono meno animazioni */
@media (prefers-reduced-motion: reduce) {
    .bubble {
        animation-duration: 20s;
        opacity: 0.2;
    }
}

/* Le bolle ora sono sopra tutto con mix-blend-mode per integrarsi */