/* ========================================
   动画样式库 - 统一动画定义
   使用说明：直接在HTML元素上添加对应的类名即可
   ======================================== */

/* 减少动画对于偏好减少动画的用户 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ========================================
   实际使用的动画定义
   这些动画在项目中实际使用
   ======================================== */

/* 淡入上升动画 - 用于主页公告区域标题 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 卡片滑入动画 - 用于工具卡片 */
@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 标题下划线动画 - 用于主页标题装饰线 */
@keyframes titleUnderline {
    0% {
        width: 0;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        width: 80px;
        opacity: 1;
    }
}

/* 浮动动画 - 用于工具卡片悬停效果 */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

/* 下拉菜单滑入 - 用于高级筛选下拉 */
@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   动画工具类
   ======================================== */

/* 基础动画类 */
.animate-fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

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

.animate-slide-in-left {
    animation: slideInFromLeft 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.animate-slide-in-right {
    animation: slideInFromRight 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.animate-slide-in-top {
    animation: slideInFromTop 0.4s ease-out forwards;
}

.animate-slide-in-bottom {
    animation: slideInFromBottom 0.4s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.animate-card-slide-in {
    animation: cardSlideIn 0.6s ease-out forwards;
}

.animate-title-underline {
    animation: titleUnderline 2s ease-out forwards;
}

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

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

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

.animate-shimmer {
    animation: shimmer 1.5s ease-in-out infinite;
}

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

.animate-dropdown-slide {
    animation: dropdownSlideIn 0.1s ease-out forwards;
}

/* ========================================
   工具类 - 常用样式
   ======================================== */

.glass-effect {
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

.shadow-soft {
    box-shadow: var(--shadow-md);
}

.shadow-strong {
    box-shadow: var(--shadow-xl);
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   过渡效果类
   ======================================== */

.transition-fast {
    transition: all 0.1s ease;
}

.transition-normal {
    transition: all 0.2s ease;
}

.transition-slow {
    transition: all 0.3s ease;
}

.transition-cubic {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.transition-bounce {
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}