/* Card Entrance Animation */
.phrase-card {
    animation: bounceUp 0.4s ease backwards;
}

@keyframes bounceUp {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Audio Button Spin */
.audio-btn.btn-play.state-loading svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Waveform Animation */
.waveform-bar {
    animation: wave 0.5s ease-in-out infinite alternate;
}

.waveform-bar:nth-child(1) {
    height: 6px;
    animation-delay: 0s;
}

.waveform-bar:nth-child(2) {
    height: 16px;
    animation-delay: 0.1s;
}

.waveform-bar:nth-child(3) {
    height: 10px;
    animation-delay: 0.2s;
}

.waveform-bar:nth-child(4) {
    height: 20px;
    animation-delay: 0.05s;
}

.waveform-bar:nth-child(5) {
    height: 12px;
    animation-delay: 0.15s;
}

@keyframes wave {
    from {
        transform: scaleY(0.3);
    }

    to {
        transform: scaleY(1);
    }
}

/* Loading Dot Bounce */
.loading::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    margin-left: 12px;
    animation: bounce 0.6s infinite alternate;
    vertical-align: middle;
}

@keyframes bounce {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-6px);
    }
}