/* ===== 自定义动画 ===== */

/* 淡入上升 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 淡入右侧 */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 淡入左侧 */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* 脉冲效果 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

/* 闪烁效果 */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

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

/* 应用动画类 */
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 0.6s ease-out;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.6s ease-out;
}

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

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

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

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

/* 卡片悬停效果 */
.feature-card,
.download-card,
.step-card,
.requirement-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover,
.download-card:hover,
.step-card:hover,
.requirement-card:hover {
    animation: float 3s ease-in-out infinite;
}

/* 按钮点击波纹效果 */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

/* 输入框焦点效果 */
input:focus {
    animation: scaleIn 0.3s ease-out;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(30, 136, 229, 0.3);
    border-radius: 50%;
    border-top-color: #1e88e5;
    animation: spin 1s linear infinite;
}

/* 页面过渡 */
@keyframes pageIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

body {
    animation: pageIn 0.5s ease-out;
}

/* 计数器动画 */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-number {
    animation: countUp 0.8s ease-out;
}

/* 渐进式加载 */
.fade-in-stagger {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.fade-in-stagger:nth-child(1) { animation-delay: 0s; }
.fade-in-stagger:nth-child(2) { animation-delay: 0.1s; }
.fade-in-stagger:nth-child(3) { animation-delay: 0.2s; }
.fade-in-stagger:nth-child(4) { animation-delay: 0.3s; }
.fade-in-stagger:nth-child(5) { animation-delay: 0.4s; }
.fade-in-stagger:nth-child(6) { animation-delay: 0.5s; }
