/* ==========================================================================
   Aventura en Español - Custom Styles & Keyframes
   ========================================================================== */

@keyframes pulse-border {
    0% {
        border-color: rgba(239, 68, 68, 1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        border-color: rgba(239, 68, 68, 0.3);
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
    100% {
        border-color: rgba(239, 68, 68, 1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.missing-image-fallback {
    border: 3px dashed #ef4444;
    animation: pulse-border 1.5s infinite;
    background-color: #fef2f2;
    color: #dc2626;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Fredoka', sans-serif;
    text-align: center;
    padding: 8px;
}

/* 3D Flip Card Utilities */
.perspective-1000 {
    perspective: 1000px;
}

.transform-style-3d {
    transform-style: preserve-3d;
}

.backface-hidden {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.rotate-y-180 {
    transform: rotateY(180deg);
}

/* Confetti & Particle Fall Animation */
@keyframes confetti-fall {
    0% {
        transform: translateY(0) rotate(0deg) scale(0.8);
        opacity: 1;
    }
    80% {
        opacity: 0.9;
    }
    100% {
        transform: translateY(105vh) translateX(calc(var(--end-x, 0vw) - 50vw)) rotate(720deg) scale(1.1);
        opacity: 0;
    }
}

/* Floating XP Reward Animation */
@keyframes bounce-float {
    0% {
        transform: translateY(0) scale(0.7);
        opacity: 0;
    }
    20% {
        transform: translateY(-25px) scale(1.15);
        opacity: 1;
    }
    80% {
        transform: translateY(-45px) scale(1);
        opacity: 0.9;
    }
    100% {
        transform: translateY(-65px) scale(0.9);
        opacity: 0;
    }
}

.animate-bounce-float {
    animation: bounce-float 1.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Custom Minimal Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}
