/* Animazioni aggiuntive per il layout accattivante */

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes glow-pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 102, 204, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 102, 204, 0.6);
    }
}

@keyframes text-glow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    }
    50% {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    }
}

@keyframes card-entrance {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes skill-bar-fill {
    0% {
        width: 0%;
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

/* Utilità per animazioni */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-card-entrance {
    animation: card-entrance 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.glow-effect:hover {
    animation: glow-pulse 2s infinite;
}

.text-glow {
    animation: text-glow 3s ease-in-out infinite;
}

/* Micro-animazioni per UX migliorata */
.micro-bounce:hover {
    animation: bounce 0.6s ease;
}

.micro-shake:hover {
    animation: shake 0.5s ease-in-out;
}

/* Animazioni per loading states */
@keyframes skeleton-loading {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s infinite;
}

/* Hover states avanzati */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-8px) scale(1.02);
}

.hover-rotate {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-rotate:hover {
    transform: rotate(5deg) scale(1.05);
}

/* Effetti di luce */
.light-ray::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.light-ray:hover::before {
    left: 100%;
}

/* Particelle animate */
.particles-bg {
    position: relative;
    overflow: hidden;
}

.particles-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="white" opacity="0.1"/><circle cx="80" cy="40" r="1" fill="white" opacity="0.2"/><circle cx="40" cy="80" r="1.5" fill="white" opacity="0.15"/></svg>');
    animation: float 10s linear infinite;
}