/* ===== 动画效果集合 ===== */

/* 1. 渐变背景动画 */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animated-gradient {
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

/* 2. 浮动动画 */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* 3. 脉冲动画 */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

/* 4. 淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-in;
}

/* 5. 淡入向上动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

/* 6. 淡入向左动画 */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in-left {
    opacity: 0;
    animation: fadeInLeft 0.8s ease forwards;
}

/* 7. 淡入向右动画 */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in-right {
    opacity: 0;
    animation: fadeInRight 0.8s ease forwards;
}

/* 8. 缩放动画 */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.scale-in {
    opacity: 0;
    animation: scaleIn 0.6s ease forwards;
}

/* 9. 旋转动画 */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.rotate-animation {
    animation: rotate 2s linear infinite;
}

/* 10. 弹跳动画 */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-30px);
    }
    60% {
        transform: translateY(-15px);
    }
}

.bounce-animation {
    animation: bounce 2s ease infinite;
}

/* 11. 闪烁动画 */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* 12. 打字机效果 */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

.typewriter {
    overflow: hidden;
    border-right: 2px solid;
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink 0.75s step-end infinite;
}

/* 13. 数字滚动效果容器 */
.counter {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* 14. 卡片3D翻转效果 */
@keyframes flipInX {
    from {
        transform: perspective(400px) rotateX(90deg);
        opacity: 0;
    }
    to {
        transform: perspective(400px) rotateX(0);
        opacity: 1;
    }
}

.flip-in-x {
    animation: flipInX 0.8s ease forwards;
}

/* 15. 加载动画 */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loader {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

/* 16. 波浪动画 */
@keyframes wave {
    0% {
        transform: translateX(0) translateZ(0) scaleY(1);
    }
    50% {
        transform: translateX(-25%) translateZ(0) scaleY(0.55);
    }
    100% {
        transform: translateX(-50%) translateZ(0) scaleY(1);
    }
}

.wave {
    animation: wave 5s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;
}

/* 17. 粒子漂浮效果 */
@keyframes particleFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: translateY(-100px) rotate(180deg);
        opacity: 0;
    }
}

.particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: particleFloat 4s ease-in-out infinite;
}

/* 18. 边框动画 */
@keyframes borderGlow {
    0%, 100% {
        box-shadow: 0 0 5px var(--primary-color);
    }
    50% {
        box-shadow: 0 0 20px var(--primary-color), 0 0 30px var(--primary-color);
    }
}

.border-glow {
    animation: borderGlow 2s ease-in-out infinite;
}

/* 19. 渐变文字动画 */
@keyframes gradientText {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-text {
    background: linear-gradient(90deg, #cc0000, #ff6b6b, #cc0000);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientText 3s linear infinite;
}

/* 20. 滚动进度条 */
@keyframes progressFill {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

.progress-bar {
    height: 4px;
    background: var(--primary-color);
    animation: progressFill 2s ease forwards;
}

/* ===== 交互动画类 ===== */

/* 悬停放大效果 */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* 悬停上浮效果 */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* 悬停发光效果 */
.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(204, 0, 0, 0.5);
}

/* 悬停旋转效果 */
.hover-rotate {
    transition: transform 0.5s ease;
}

.hover-rotate:hover {
    transform: rotate(360deg);
}

/* 悬停变色效果 */
.hover-color {
    transition: color 0.3s ease, background-color 0.3s ease;
}

.hover-color:hover {
    color: var(--primary-color);
}

/* ===== 组合动画 ===== */

/* 卡片入场动画 */
.card-enter {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
    animation: cardEnter 0.6s ease forwards;
}

@keyframes cardEnter {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 延迟类 */
.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}

.delay-600 {
    animation-delay: 0.6s;
}

.delay-700 {
    animation-delay: 0.7s;
}

.delay-800 {
    animation-delay: 0.8s;
}

/* ===== 背景装饰动画 ===== */

/* 圆形装饰 */
.circle-decoration {
    position: absolute;
    border-radius: 50%;
    background: rgba(204, 0, 0, 0.1);
    animation: float 6s ease-in-out infinite;
}

/* 线条装饰 */
.line-decoration {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    animation: shimmer 3s infinite;
}

/* 光晕效果 */
.glow-effect {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(204, 0, 0, 0.2) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

/* ===== 原网站的动画效果 ===== */

/* 视频背景容器 */
.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.video-background video {
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

/* 图片懒加载 */
.lazy-image {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.lazy-image.loaded {
    opacity: 1;
}

/* 视差效果 */
.parallax {
    will-change: transform;
    transition: transform 0.1s ease-out;
}

/* 卡片悬停提升效果 - 原网站主要效果 */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* 按钮脉冲效果 - 原网站按钮效果 */
.btn-pulse {
    animation: btnPulse 2s infinite;
}

@keyframes btnPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(255, 193, 7, 0);
    }
}

/* 滑动显示效果 */
.slide-in-left {
    opacity: 0;
    transform: translateX(-100px);
}

.slide-in-left.animate {
    animation: slideInLeft 0.8s ease-out forwards;
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    opacity: 0;
    transform: translateX(100px);
}

.slide-in-right.animate {
    animation: slideInRight 0.8s ease-out forwards;
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 缩放淡入效果 */
.scale-fade-in {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scale-fade-in.animate {
    opacity: 1;
    transform: scale(1);
}

/* 旋转淡入效果 */
.rotate-fade-in {
    opacity: 0;
    transform: rotate(-10deg);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.rotate-fade-in.animate {
    opacity: 1;
    transform: rotate(0);
}

/* 滚动进度指示器 */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: var(--primary-color);
    z-index: 9999;
    transition: width 0.1s ease-out;
}

/* 装饰性浮动元素 */
.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.floating-shapes::before,
.floating-shapes::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(204, 0, 0, 0.1);
    animation: float 8s ease-in-out infinite;
}

.floating-shapes::before {
    width: 200px;
    height: 200px;
    top: 20%;
    left: 10%;
}

.floating-shapes::after {
    width: 150px;
    height: 150px;
    bottom: 20%;
    right: 10%;
    animation-delay: -4s;
}

/* 数字滚动动画 */
.counter-animate {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.counter-animate.animate {
    opacity: 1;
    transform: translateY(0);
}

/* 加载旋转动画 */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 193, 7, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
