/* ========================================
   HyperLiquidZH 官方网站 - 动画样式
   ======================================== */

/* 滚动动画 - 淡入向上 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 淡出动画 */
@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* 从左向右进入 */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 从右向左进入 */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 缩放进入 */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 旋转进入 */
@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-10deg) scale(0.9);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

/* 脉冲动画 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* 闪烁动画 */
@keyframes blink {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0;
    }
}

/* 浮动动画 */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* 反弹动画 */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

/* 摇晃动画 */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-4px);
    }
    75% {
        transform: translateX(4px);
    }
}

/* 水平滑动 */
@keyframes slide {
    0%, 100% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(0);
    }
}

/* 光效扫过 */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* 颜色渐变动画 */
@keyframes colorShift {
    0%, 100% {
        color: #00d4ff;
    }
    25% {
        color: #7c3aed;
    }
    50% {
        color: #ec4899;
    }
    75% {
        color: #f97316;
    }
}

/* 背景颜色渐变 */
@keyframes backgroundShift {
    0%, 100% {
        background-color: rgba(0, 212, 255, 0.1);
    }
    50% {
        background-color: rgba(124, 58, 237, 0.1);
    }
}

/* 边框闪烁 */
@keyframes borderPulse {
    0%, 100% {
        border-color: rgba(0, 212, 255, 0.3);
    }
    50% {
        border-color: rgba(0, 212, 255, 0.8);
    }
}

/* 数字滚动动画 */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 进度条填充 */
@keyframes progressFill {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* 圆形旋转 */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 脉冲光效 */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 212, 255, 0.6);
    }
}

/* 渐变光效 */
@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* 悬停提升 */
@keyframes hoverLift {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-4px);
    }
}

/* 细微震动 */
@keyframes microShake {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(-1px, -1px);
    }
    50% {
        transform: translate(1px, 1px);
    }
    75% {
        transform: translate(-1px, 1px);
    }
}

/* 旋转文字 */
@keyframes rotateText {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 水波纹动画 */
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* 线性渐变移动 */
@keyframes moveGradient {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* 淡出向下 */
@keyframes fadeOutDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(30px);
    }
}

/* 元素入场 - 左侧 */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 元素入场 - 右侧 */
@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 元素入场 - 上侧 */
@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 元素入场 - 下侧 */
@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 背景漂移 */
@keyframes backgroundDrift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 发光边框 */
@keyframes glowBorder {
    0%, 100% {
        box-shadow: 0 0 5px rgba(0, 212, 255, 0), inset 0 0 5px rgba(0, 212, 255, 0);
    }
    50% {
        box-shadow: 0 0 15px rgba(0, 212, 255, 0.5), inset 0 0 10px rgba(0, 212, 255, 0.2);
    }
}

/* 平面扩展 */
@keyframes expandPlane {
    from {
        transform: scaleX(0);
        opacity: 0;
    }
    to {
        transform: scaleX(1);
        opacity: 1;
    }
}

/* 交替闪烁 */
@keyframes alternateBlink {
    0%, 19%, 21%, 100% {
        color: inherit;
    }
    20% {
        color: transparent;
    }
}

/* 高度变化 */
@keyframes heightShift {
    from {
        max-height: 0;
    }
    to {
        max-height: 500px;
    }
}

/* 不透明度漂移 */
@keyframes opacityDrift {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

/* 多色脉冲 */
@keyframes multiColorPulse {
    0% {
        color: #00d4ff;
        text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    }
    33% {
        color: #7c3aed;
        text-shadow: 0 0 10px rgba(124, 58, 237, 0.5);
    }
    66% {
        color: #ec4899;
        text-shadow: 0 0 10px rgba(236, 72, 153, 0.5);
    }
    100% {
        color: #00d4ff;
        text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    }
}

/* 数据条形动画 */
@keyframes barGrow {
    from {
        height: 0;
        opacity: 0;
    }
    to {
        height: 100%;
        opacity: 1;
    }
}

/* 卡片翻转 */
@keyframes flipCard {
    from {
        transform: rotateY(0deg);
    }
    to {
        transform: rotateY(360deg);
    }
}

/* 按钮按下效果 */
@keyframes buttonPress {
    from {
        transform: scale(1);
    }
    50% {
        transform: scale(0.95);
    }
    to {
        transform: scale(1);
    }
}

/* 应用动画类 */

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

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

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

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

.animate-scale-in {
    animation: scaleIn 0.6s ease-out forwards;
}

.animate-rotate-in {
    animation: rotateIn 0.6s ease-out forwards;
}

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

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

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

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

.animate-shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

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

/* 延迟动画 */

@for $i from 1 through 10 {
    .animate-delay-#{$i * 100}ms {
        animation-delay: $i * 100ms;
    }
}

/* 手动延迟样式 */

.animate-delay-100ms {
    animation-delay: 100ms;
}

.animate-delay-200ms {
    animation-delay: 200ms;
}

.animate-delay-300ms {
    animation-delay: 300ms;
}

.animate-delay-400ms {
    animation-delay: 400ms;
}

.animate-delay-500ms {
    animation-delay: 500ms;
}

.animate-delay-600ms {
    animation-delay: 600ms;
}

.animate-delay-700ms {
    animation-delay: 700ms;
}

.animate-delay-800ms {
    animation-delay: 800ms;
}

.animate-delay-900ms {
    animation-delay: 900ms;
}

.animate-delay-1000ms {
    animation-delay: 1000ms;
}

/* 悬停动画 */

.hover-lift {
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.hover-glow {
    transition: box-shadow 0.3s ease-out;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.hover-scale {
    transition: transform 0.3s ease-out;
}

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

/* 焦点动画 */

.focus-highlight:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.3);
}

/* 响应式动画 */

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

/* 阴影动画 */

.shadow-sm {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.shadow-md {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.shadow-lg {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.shadow-xl {
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
}

.shadow-2xl {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

/* 模糊动画 */

.blur-sm {
    filter: blur(2px);
}

.blur-md {
    filter: blur(4px);
}

.blur-lg {
    filter: blur(8px);
}

/* 亮度动画 */

.brightness-75 {
    filter: brightness(0.75);
}

.brightness-125 {
    filter: brightness(1.25);
}

/* 对比度动画 */

.contrast-75 {
    filter: contrast(0.75);
}

.contrast-125 {
    filter: contrast(1.25);
}

/* 饱和度动画 */

.saturate-50 {
    filter: saturate(0.5);
}

.saturate-150 {
    filter: saturate(1.5);
}

/* 色调动画 */

.hue-90 {
    filter: hue-rotate(90deg);
}

.hue-180 {
    filter: hue-rotate(180deg);
}

/* 反演动画 */

.invert {
    filter: invert(1);
}

/* 灰度动画 */

.grayscale {
    filter: grayscale(1);
}

/* 棕褐色动画 */

.sepia {
    filter: sepia(1);
}

/* 组合动画效果 */

.card-hover {
    transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
}

.card-hover:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15);
}

.button-hover {
    transition: all 0.2s ease-out;
}

.button-hover:hover {
    transform: scale(1.02);
}

.button-hover:active {
    transform: scale(0.98);
}

/* 文字选择动画 */

.text-select {
    user-select: text;
    cursor: text;
}

/* 禁用动画 */

.no-animation {
    animation: none !important;
    transition: none !important;
}

/* 加载动画 */

.loader {
    border: 4px solid rgba(0, 212, 255, 0.1);
    border-radius: 50%;
    border-top: 4px solid #00d4ff;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

/* 脉冲加载 */

.pulse-loader {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #00d4ff, #7c3aed);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}
