/**
 * 文武传媒 - 高级动画CSS
 * 关键词：产品拍摄, 短视频代拍, 文武传媒, 电商短视频拍摄公司
 */

/* ==================== 基础动画类 ==================== */
.animate-fade-up {
    animation: fadeUp 0.8s ease forwards;
}

.animate-fade-down {
    animation: fadeDown 0.8s ease forwards;
}

.animate-fade-left {
    animation: fadeLeft 0.8s ease forwards;
}

.animate-fade-right {
    animation: fadeRight 0.8s ease forwards;
}

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

.animate-rotate {
    animation: rotate 0.8s ease forwards;
}

.animate-bounce-in {
    animation: bounceIn 0.8s ease forwards;
}

.animate-flip {
    animation: flip 0.8s ease forwards;
}

/* ==================== 关键帧动画 ==================== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

@keyframes rotate {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0.5);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes flip {
    from {
        opacity: 0;
        transform: perspective(400px) rotateY(90deg);
    }
    to {
        opacity: 1;
        transform: perspective(400px) rotateY(0);
    }
}

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

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

/* ==================== 脉冲动画 ==================== */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

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

/* ==================== 渐变文字动画 ==================== */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-text {
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899, #3b82f6);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease infinite;
}

/* ==================== 光晕效果 ==================== */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(59, 130, 246, 0.5),
                    0 0 10px rgba(59, 130, 246, 0.3),
                    0 0 15px rgba(59, 130, 246, 0.1);
    }
    50% {
        box-shadow: 0 0 10px rgba(59, 130, 246, 0.8),
                    0 0 20px rgba(59, 130, 246, 0.5),
                    0 0 30px rgba(59, 130, 246, 0.3);
    }
}

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

/* ==================== 波纹效果 ==================== */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: rippleAnimation 0.6s ease-out;
    pointer-events: none;
}

@keyframes rippleAnimation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ==================== 导航栏滚动效果 ==================== */
.nav-scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
    backdrop-filter: blur(20px) !important;
}

/* ==================== 卡片悬停效果 ==================== */
.card-hover {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ==================== 图片缩放效果 ==================== */
.img-zoom {
    overflow: hidden;
}

.img-zoom img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.img-zoom:hover img {
    transform: scale(1.1);
}

/* ==================== 按钮发光效果 ==================== */
.btn-glow {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.btn-glow:hover::before {
    width: 300px;
    height: 300px;
}

/* ==================== 加载动画 ==================== */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* ==================== 统计数字样式 ==================== */
.stat-number {
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

/* ==================== 分割线动画 ==================== */
@keyframes lineGrow {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

.line-grow {
    animation: lineGrow 1s ease forwards;
}

/* ==================== 旋转图标 ==================== */
@keyframes spinSlow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.spin-slow {
    animation: spinSlow 8s linear infinite;
}

/* ==================== 模糊进入效果 ==================== */
@keyframes blurIn {
    from {
        opacity: 0;
        filter: blur(10px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}

.animate-blur-in {
    animation: blurIn 1s ease forwards;
}

/* ==================== 弹性效果 ==================== */
@keyframes elastic {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

.animate-elastic {
    animation: elastic 0.8s ease forwards;
}

/* ==================== 滑入效果 ==================== */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* ==================== 3D透视效果 ==================== */
.perspective-1000 {
    perspective: 1000px;
}

.preserve-3d {
    transform-style: preserve-3d;
}

/* ==================== 延迟动画类 ==================== */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }
.delay-600 { animation-delay: 600ms; }
.delay-700 { animation-delay: 700ms; }
.delay-800 { animation-delay: 800ms; }

/* ==================== 响应式调整 ==================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
