/* Dungeon Journal Animation Keyframes */

/* =============================================
   FADE & ENTRANCE ANIMATIONS
   ============================================= */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* =============================================
   DICE LOGO ANIMATION
   ============================================= */

@keyframes diceSpin {
    0%   { transform: translateY(0px) rotate(0deg); }
    25%  { transform: translateY(-8px) rotate(5deg); }
    50%  { transform: translateY(-4px) rotate(0deg); }
    75%  { transform: translateY(-10px) rotate(-4deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

/* =============================================
   GLITTER / SPARKLE ANIMATIONS
   ============================================= */

@keyframes sparkle {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: scale(1);
    }
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 1;
    }
}

@keyframes glow {
    0%, 100% {
        filter: drop-shadow(0 0 0px rgba(212, 175, 55, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.8));
    }
}

/* =============================================
   HOVER & INTERACTIVE ANIMATIONS
   ============================================= */

@keyframes buttonPulse {
    0% {
        box-shadow: 0 0 0px rgba(212, 175, 55, 0.4);
    }
    50% {
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
    }
    100% {
        box-shadow: 0 0 0px rgba(212, 175, 55, 0.4);
    }
}

@keyframes cardHover {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-4px);
    }
}

/* =============================================
   PARALLAX & SCROLL ANIMATIONS
   ============================================= */

@keyframes parallaxFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes parallaxBg {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 0 100px;
    }
}

/* =============================================
   TEXT ANIMATIONS
   ============================================= */

@keyframes textShadowFlicker {
    0%, 100% {
        text-shadow:
            0 0 10px rgba(212, 175, 55, 0.3),
            0 0 20px rgba(212, 175, 55, 0.1);
    }
    50% {
        text-shadow:
            0 0 20px rgba(212, 175, 55, 0.5),
            0 0 40px rgba(212, 175, 55, 0.2);
    }
}

/* =============================================
   TRANSITION UTILITIES
   ============================================= */

.transition-smooth {
    transition: all 0.3s ease;
}

.transition-fast {
    transition: all 0.15s ease;
}

.transition-slow {
    transition: all 0.6s ease;
}

/* =============================================
   MEDIA QUERY: REDUCED MOTION
   ============================================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
