/* ========== Animations ========== */

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Slide Up Animation */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.8s ease-in-out forwards;
}

/* Slide In Left Animation */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-in-out forwards;
}

/* Slide In Right Animation */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.8s ease-in-out forwards;
}

/* Scale Up Animation */
@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.scale-up {
    animation: scaleUp 0.8s ease-in-out forwards;
}

/* Floating Animation */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

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

/* Floating Animation with Delay */
.float-delay-1 {
    animation: float 3s ease-in-out 0.2s infinite;
}

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

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

/* Pulse Animation */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

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

/* Special CTA Pulse Animation */
@keyframes ctaPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(240, 185, 11, 0.7);
    }
    70% {
        transform: scale(1.03);
        box-shadow: 0 0 0 15px rgba(240, 185, 11, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(240, 185, 11, 0);
    }
}

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

/* Rotate Animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.rotate {
    animation: rotate 8s linear infinite;
}

/* Shimmer Animation */
@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }
    100% {
        background-position: 468px 0;
    }
}

.shimmer {
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Shake Animation */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.8s cubic-bezier(.36,.07,.19,.97) both;
}

/* Heartbeat Animation */
@keyframes heartbeat {
    0% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.1);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.1);
    }
    70% {
        transform: scale(1);
    }
}

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

/* Gradient Shift Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-shift {
    background: linear-gradient(-45deg, var(--binance-yellow), var(--binance-yellow-light), var(--binance-yellow-dark), var(--binance-yellow));
    background-size: 400% 400%;
    animation: gradientShift 10s ease infinite;
}

/* Flip Animation */
@keyframes flip {
    0% {
        transform: perspective(400px) rotateY(0);
    }
    100% {
        transform: perspective(400px) rotateY(360deg);
    }
}

.flip {
    animation: flip 2s ease-in-out infinite;
    transform-style: preserve-3d;
}

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

.bounce {
    animation: bounce 2s ease infinite;
}

/* Expand Animation */
@keyframes expand {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.expand {
    animation: expand 2s ease infinite;
}

/* Glow Animation */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(240, 185, 11, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(240, 185, 11, 0.8);
    }
}

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

/* Typing Animation */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

.typing {
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid var(--binance-yellow);
    animation: typing 3.5s steps(40, end), blink-caret .75s step-end infinite;
}

@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: var(--binance-yellow);
    }
}

/* Staggered Animation Delays */
.stagger > *:nth-child(1) {
    animation-delay: 0.1s;
}
.stagger > *:nth-child(2) {
    animation-delay: 0.2s;
}
.stagger > *:nth-child(3) {
    animation-delay: 0.3s;
}
.stagger > *:nth-child(4) {
    animation-delay: 0.4s;
}
.stagger > *:nth-child(5) {
    animation-delay: 0.5s;
}
.stagger > *:nth-child(6) {
    animation-delay: 0.6s;
}

/* Fading Visibility States */
.hidden {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* GSAP-specific CSS hooks */
.gsap-fade-up {
    transform: translateY(30px);
}

.gsap-fade-in {
    /* Animation handled by JS */
}

.gsap-fade-left {
    transform: translateX(-50px);
}

.gsap-fade-right {
    transform: translateX(50px);
}

.gsap-scale {
    transform: scale(0.8);
}
