/* Animazioni e transizioni */

/* Fade in per caricamento card */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.zone-card {
    animation: fadeInUp 0.4s ease forwards;
}

.zone-card:nth-child(1) { animation-delay: 0.05s; }
.zone-card:nth-child(2) { animation-delay: 0.1s; }
.zone-card:nth-child(3) { animation-delay: 0.15s; }
.zone-card:nth-child(4) { animation-delay: 0.2s; }
.zone-card:nth-child(5) { animation-delay: 0.25s; }

/* Pulse per accent attivo */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 8px var(--accent-glow); }
    50% { box-shadow: 0 0 20px var(--accent-glow); }
}

.zone-card.active {
    animation: fadeInUp 0.4s ease forwards;
}

/* Transizione cambio temperatura */
.zone-temp {
    transition: color var(--transition-normal);
}

/* Spinner caricamento */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 40px auto;
}

/* Flash conferma azione */
@keyframes flash-success {
    0% { background: rgba(34, 197, 94, 0.3); }
    100% { background: transparent; }
}

.flash {
    animation: flash-success 0.5s ease;
}
