/* ============================================
   Wynncraft Dashboard - Animations
   Micro-animations and Transitions
   ============================================ */

/* ============================================
   Fade Animations
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn var(--duration-normal) var(--ease-in-out);
}

.fade-in-up {
    animation: fadeInUp var(--duration-normal) var(--ease-in-out);
}

.fade-in-down {
    animation: fadeInDown var(--duration-normal) var(--ease-in-out);
}

/* ============================================
   Pulse Animations
   ============================================ */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
    }

    50% {
        box-shadow: 0 0 30px rgba(212, 175, 55, 0.6);
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

/* ============================================
   Gradient Animations
   ============================================ */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.gradient-animated {
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

/* ============================================
   Floating Animation (for particles)
   ============================================ */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

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

/* ============================================
   Glow Animation
   ============================================ */
@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(212, 175, 55, 0.3),
            0 0 10px rgba(212, 175, 55, 0.2);
    }

    50% {
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.6),
            0 0 30px rgba(212, 175, 55, 0.4);
    }
}

.glow-gold {
    animation: glow 2s ease-in-out infinite;
}

/* ============================================
   Spin Animation (for loading)
   ============================================ */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.spin {
    animation: spin 1s linear infinite;
}

/* ============================================
   Bounce Animation
   ============================================ */
@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.bounce {
    animation: bounce 1s ease-in-out infinite;
}

/* ============================================
   Slide Animations
   ============================================ */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in-left {
    animation: slideInLeft var(--duration-normal) var(--ease-in-out);
}

.slide-in-right {
    animation: slideInRight var(--duration-normal) var(--ease-in-out);
}

/* ============================================
   Scale Animations
   ============================================ */
@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.scale-in {
    animation: scaleIn var(--duration-normal) var(--ease-in-out);
}

/* ============================================
   Loading Spinner (Medieval Style)
   ============================================ */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(212, 175, 55, 0.2);
    border-top-color: var(--gold-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-large {
    width: 60px;
    height: 60px;
    border-width: 6px;
}

/* Medieval Spinner with decorative elements */
.spinner-medieval {
    position: relative;
    width: 50px;
    height: 50px;
}

.spinner-medieval::before,
.spinner-medieval::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: var(--gold-primary);
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

.spinner-medieval::after {
    border-top-color: var(--gold-accent);
    animation-duration: 1s;
    animation-direction: reverse;
}

/* ============================================
   Hover Effects
   ============================================ */
.hover-lift {
    transition: transform var(--duration-normal) var(--ease-in-out);
}

.hover-lift:hover {
    transform: translateY(-4px);
}

.hover-glow {
    transition: box-shadow var(--duration-normal) var(--ease-in-out);
}

.hover-glow:hover {
    box-shadow: var(--glow-gold);
}

.hover-scale {
    transition: transform var(--duration-normal) var(--ease-in-out);
}

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

/* ============================================
   Particle Effect Animation
   ============================================ */
@keyframes particleFloat {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0;
    }
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--gold-accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--gold-accent);
    animation: particleFloat 8s linear infinite;
}

/* ============================================
   Text Shimmer Effect
   ============================================ */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.text-shimmer {
    background: linear-gradient(90deg,
            var(--gold-primary) 0%,
            var(--gold-accent) 50%,
            var(--gold-primary) 100%);
    background-size: 1000px 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

/* ============================================
   Stagger Animation Delays
   ============================================ */
.stagger-1 {
    animation-delay: 0.1s;
}

.stagger-2 {
    animation-delay: 0.2s;
}

.stagger-3 {
    animation-delay: 0.3s;
}

.stagger-4 {
    animation-delay: 0.4s;
}

.stagger-5 {
    animation-delay: 0.5s;
}

/* ============================================
   Transition Utilities
   ============================================ */
.transition-all {
    transition: all var(--duration-normal) var(--ease-in-out);
}

.transition-fast {
    transition: all var(--duration-fast) var(--ease-in-out);
}

.transition-slow {
    transition: all var(--duration-slow) var(--ease-in-out);
}