/**
 * XVaultPro Portal - Animations
 * Modern animations for the portal redesign
 */

/* ==================================================
   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(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==================================================
   LOGO ANIMATIONS
================================================== */

@keyframes vaultDialRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes vaultPulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

@keyframes ringPulse1 {
    0%, 100% {
        opacity: 0.2;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.02);
    }
}

@keyframes ringPulse2 {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.03);
    }
}

@keyframes ringPulse3 {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.01);
    }
}

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

/* ==================================================
   CARD ANIMATIONS
================================================== */

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

@keyframes cardGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
    }
    50% {
        box-shadow: 0 0 40px rgba(16, 185, 129, 0.4);
    }
}

@keyframes cardGlowPro {
    0%, 100% {
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
    }
    50% {
        box-shadow: 0 0 40px rgba(16, 185, 129, 0.5);
    }
}

@keyframes cardGlowEnterprise {
    0%, 100% {
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
    }
    50% {
        box-shadow: 0 0 40px rgba(139, 92, 246, 0.4);
    }
}

/* ==================================================
   SUCCESS ANIMATIONS
================================================== */

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

@keyframes successCheckmark {
    0% {
        stroke-dashoffset: 100;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes successRing {
    0% {
        stroke-dashoffset: 283;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
}

/* ==================================================
   BUTTON ANIMATIONS
================================================== */

@keyframes buttonShine {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes buttonPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
}

/* ==================================================
   LOADING ANIMATIONS
================================================== */

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

@keyframes dotPulse {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ==================================================
   UTILITY CLASSES
================================================== */

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fade-in-scale {
    animation: fadeInScale 0.5s ease-out forwards;
}

.animate-card-entrance {
    animation: cardEntrance 0.6s ease-out forwards;
}

.animate-success-pop {
    animation: successPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

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

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

/* Staggered 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; }

/* Initial state for animations */
.animate-on-load {
    opacity: 0;
}
