/**
 * RAN Asgard Online - Animation Styles
 * 
 * @author RAN Asgard Team
 * @version 1.0.0
 */

/* ========================================
   Fade Animations
======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animation Classes */
.animate-fadeIn {
    animation: fadeIn 0.8s ease forwards;
    opacity: 0;
}

.animate-fadeInUp {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

.animate-fadeInDown {
    animation: fadeInDown 0.8s ease forwards;
    opacity: 0;
}

.animate-fadeInLeft {
    animation: fadeInLeft 0.8s ease forwards;
    opacity: 0;
}

.animate-fadeInRight {
    animation: fadeInRight 0.8s ease forwards;
    opacity: 0;
}

/* ========================================
   Scale Animations
======================================== */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes pulseSoft {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.animate-scaleIn {
    animation: scaleIn 0.5s ease forwards;
    opacity: 0;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-pulse-soft {
    animation: pulseSoft 2s ease-in-out infinite;
}

/* ========================================
   Bounce Animations
======================================== */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-bounce {
    animation: bounce 1.5s ease infinite;
}

.animate-bounceIn {
    animation: bounceIn 0.6s ease forwards;
    opacity: 0;
}

/* ========================================
   Rotate Animations
======================================== */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes spinSlow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

.animate-spin-slow {
    animation: spinSlow 3s linear infinite;
}

/* ========================================
   Shimmer Effect
======================================== */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.animate-shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
}

/* ========================================
   Glow Animations
======================================== */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(212, 168, 83, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(212, 168, 83, 0.8);
    }
}

@keyframes glowText {
    0%, 100% {
        text-shadow: 0 0 20px rgba(212, 168, 83, 0.4);
    }
    50% {
        text-shadow: 0 0 40px rgba(212, 168, 83, 0.8);
    }
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

.animate-glow-text {
    animation: glowText 2s ease-in-out infinite;
}

/* ========================================
   Float Animation
======================================== */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* ========================================
   Slide Animations
======================================== */
@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@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;
    }
}

.animate-slideInUp {
    animation: slideInUp 0.5s ease forwards;
}

.animate-slideInDown {
    animation: slideInDown 0.5s ease forwards;
}

.animate-slideInLeft {
    animation: slideInLeft 0.5s ease forwards;
}

.animate-slideInRight {
    animation: slideInRight 0.5s ease forwards;
}

/* ========================================
   Shake Animation
======================================== */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.animate-shake {
    animation: shake 0.5s ease-in-out;
}

/* ========================================
   Heartbeat Animation
======================================== */
@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.1);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.1);
    }
    70% {
        transform: scale(1);
    }
}

.animate-heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite;
}

/* ========================================
   Typing Animation
======================================== */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

.animate-typing {
    overflow: hidden;
    border-right: 2px solid var(--gold);
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink 0.75s step-end infinite;
}

/* ========================================
   Intersection Observer Classes
======================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }
.delay-900 { animation-delay: 0.9s; }
.delay-1000 { animation-delay: 1s; }

/* Duration modifiers */
.duration-300 { animation-duration: 0.3s; }
.duration-500 { animation-duration: 0.5s; }
.duration-700 { animation-duration: 0.7s; }
.duration-1000 { animation-duration: 1s; }
