/* 动画样式文件 */
/* 基础动画设置 */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slide-in-left {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slide-in-right {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* 背景装饰动画 - 深度优化 */
@keyframes halo-float {
    0%, 100% {
        transform: translateY(-50%) scale(1) rotate(0deg);
        opacity: 0.9;
    }
    25% {
        transform: translateY(-50%) scale(1.05) rotate(1deg);
        opacity: 0.95;
    }
    50% {
        transform: translateY(-50%) scale(1.1) rotate(0deg);
        opacity: 1;
    }
    75% {
        transform: translateY(-50%) scale(1.05) rotate(-1deg);
        opacity: 0.95;
    }
}

@keyframes circle-float-1 {
    0%, 100% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0.8;
    }
    33% {
        transform: translateY(-15px) translateX(10px) scale(1.1);
        opacity: 1;
    }
    66% {
        transform: translateY(-8px) translateX(-5px) scale(0.95);
        opacity: 0.9;
    }
}

@keyframes circle-float-2 {
    0%, 100% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0.7;
    }
    33% {
        transform: translateY(-20px) translateX(-8px) scale(1.15);
        opacity: 0.9;
    }
    66% {
        transform: translateY(-12px) translateX(12px) scale(0.9);
        opacity: 0.8;
    }
}

@keyframes circle-float-3 {
    0%, 100% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0.6;
    }
    33% {
        transform: translateY(-18px) translateX(15px) scale(1.2);
        opacity: 0.8;
    }
    66% {
        transform: translateY(-10px) translateX(-10px) scale(0.85);
        opacity: 0.7;
    }
}

@keyframes gentle-float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-8px) scale(1.02);
    }
}

@keyframes halo-pulse {
    0%, 100% {
        transform: translateY(-50%) scale(1);
        opacity: 0.9;
    }
    50% {
        transform: translateY(-50%) scale(1.1);
        opacity: 0.7;
    }
}

/* 新增：背景粒子动画 */
@keyframes particle-float {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(100px) rotate(360deg);
        opacity: 0;
    }
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1) rotate(180deg);
    }
}

/* 新增：更多灵动动画 */
@keyframes bounce-gentle {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes rotate-slow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.05);
        filter: brightness(1.2);
    }
}

@keyframes wave-float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-5px) rotate(1deg);
    }
    50% {
        transform: translateY(-10px) rotate(0deg);
    }
    75% {
        transform: translateY(-5px) rotate(-1deg);
    }
}

@keyframes shimmer-slow {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* 防止页面加载时闪烁的初始状态 */
.animate-fade-in-up,
.animate-slide-in-left,
.animate-slide-in-right,
.animate-scale-in {
    opacity: 0;
    transform: translateY(30px);
}

/* 页面加载完成前隐藏所有动画元素 */
body:not(.loaded) .animate-fade-in-up,
body:not(.loaded) .animate-slide-in-left,
body:not(.loaded) .animate-slide-in-right,
body:not(.loaded) .animate-scale-in {
    opacity: 0 !important;
    transform: translateY(30px) !important;
}

/* 页面加载完成后显示动画元素 */
body.loaded .animate-fade-in-up,
body.loaded .animate-slide-in-left,
body.loaded .animate-slide-in-right,
body.loaded .animate-scale-in {
    opacity: 1;
    transform: translateY(0);
}

/* 背景装饰元素初始状态 - 防止闪烁 */
.halo,
.circle,
.particle,
.sparkle {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 页面加载完成后显示背景装饰元素 */
body.loaded .halo,
body.loaded .circle,
body.loaded .particle,
body.loaded .sparkle {
    opacity: 1;
}

/* 动画类 - 延迟启动防止闪烁 */
.animate-fade-in-up {
    animation: fade-in-up 0.8s ease-out forwards;
    animation-delay: 0.1s;
}

.animate-slide-in-left {
    animation: slide-in-left 0.8s ease-out forwards;
    animation-delay: 0.1s;
}

.animate-slide-in-right {
    animation: slide-in-right 0.8s ease-out forwards;
    animation-delay: 0.1s;
}

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

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

.animate-circle-float-1 {
    animation: circle-float-1 6s ease-in-out infinite;
}

.animate-circle-float-2 {
    animation: circle-float-2 7s ease-in-out infinite;
}

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

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

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

/* 新增：粒子动画类 */
.animate-particle-float {
    animation: particle-float 15s linear infinite;
    animation-delay: 0s;
}

.animate-sparkle {
    animation: sparkle 2s ease-in-out infinite;
    animation-delay: 0s;
}

/* 新增：更多灵动动画类 */
.animate-bounce-gentle {
    animation: bounce-gentle 3s ease-in-out infinite;
}

.animate-rotate-slow {
    animation: rotate-slow 20s linear infinite;
}

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

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

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

/* 新增：圆圈跳动进入页面动画 */
@keyframes circle-bounce-in {
    0% {
        opacity: 0;
        transform: scale(0) translateY(100px);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.2) translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.animate-circle-bounce-in {
    animation: circle-bounce-in 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

/* 为不同圆圈设置不同的延迟 */
.circle-1 {
    animation-delay: 0.2s;
}

.circle-2 {
    animation-delay: 0.4s;
}

.circle-3 {
    animation-delay: 0.6s;
}

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

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

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

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

/* 特色图标悬停效果 */
.feature-icon {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-icon:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* 流程步骤悬停效果 */
.process-step {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.process-step:hover .process-number {
    transform: scale(1.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

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

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

.member-card:hover .member-photo::before {
    animation: shimmer 1.5s infinite;
}

/* 案例悬停效果 */
.case-item {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.case-item:hover {
    transform: translateX(8px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* 按钮悬停效果 */
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* 强制启用动画 - 确保在Cloudflare Pages中运行 */
* {
    animation-play-state: running !important;
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    .animate-halo-float,
    .animate-circle-float-1,
    .animate-circle-float-2,
    .animate-circle-float-3,
    .animate-gentle-float,
    .animate-halo-pulse,
    .animate-particle-float,
    .animate-sparkle,
    .animate-bounce-gentle,
    .animate-rotate-slow,
    .animate-pulse-glow,
    .animate-wave-float,
    .animate-shimmer-slow {
        animation: none !important;
    }
    
    .hover-lift:hover,
    .card:hover,
    .feature-icon:hover,
    .process-step:hover .process-number,
    .member-card:hover,
    .case-item:hover,
    .btn:hover {
        transform: none !important;
    }
}

