/* 自定义动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 粒子背景动画 */
@keyframes particle-float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 1;
    }
    33% {
        transform: translateY(-20px) rotate(120deg);
        opacity: 0.8;
    }
    66% {
        transform: translateY(-10px) rotate(240deg);
        opacity: 0.6;
    }
}

/* 3D卡片翻转效果 */
@keyframes cardFlip {
    0% {
        transform: rotateY(0);
    }
    50% {
        transform: rotateY(-90deg);
    }
    100% {
        transform: rotateY(0);
    }
}

/* 霓虹灯光效果 */
@keyframes neonGlow {
    0%, 100% {
        text-shadow: 
            0 0 5px #3b82f6,
            0 0 10px #3b82f6,
            0 0 15px #3b82f6,
            0 0 20px #3b82f6;
    }
    50% {
        text-shadow: 
            0 0 10px #8b5cf6,
            0 0 20px #8b5cf6,
            0 0 30px #8b5cf6,
            0 0 40px #8b5cf6;
    }
}

/* 波浪动画 */
@keyframes wave {
    0% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* 数字计数动画 */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #3b82f6, #8b5cf6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #2563eb, #7c3aed);
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 导航栏样式增强 */
nav {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* 卡片悬停效果 */
.hover-lift {
    transition: all 0.3s ease;
}

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

/* 渐变文字效果 */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 毛玻璃效果 */
.glass {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* 按钮发光效果 */
.glow-on-hover {
    position: relative;
    overflow: hidden;
}

.glow-on-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s;
}

.glow-on-hover:hover::before {
    left: 100%;
}

/* 加载动画 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .mobile-menu-open {
        max-height: 300px;
        opacity: 1;
    }
    
    .mobile-menu-closed {
        max-height: 0;
        opacity: 0;
        overflow: hidden;
    }
}

/* 响应式文字大小 */
@media (max-width: 640px) {
    .responsive-text-lg {
        font-size: 2rem;
        line-height: 2.5rem;
    }
    
    .responsive-text-xl {
        font-size: 2.5rem;
        line-height: 3rem;
    }
}

/* 自定义容器 */
.container-custom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* 粒子系统 */
.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: linear-gradient(45deg, #3b82f6, #8b5cf6);
    border-radius: 50%;
    animation: particle-float 6s infinite linear;
    opacity: 0.6;
}

/* 3D卡片效果 */
.card-3d {
    perspective: 1000px;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.card-3d:hover {
    transform: rotateY(10deg) rotateX(10deg) scale(1.05);
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

/* 霓虹按钮效果 */
.neon-btn {
    position: relative;
    background: linear-gradient(45deg, #3b82f6, #8b5cf6);
    border: none;
    border-radius: 12px;
    padding: 16px 32px;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.neon-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.neon-btn:hover::before {
    left: 100%;
}

.neon-btn:hover {
    box-shadow: 
        0 0 20px #3b82f6,
        0 0 40px #3b82f6,
        0 0 60px #3b82f6;
    transform: translateY(-3px);
}

/* 波浪背景效果 */
.wave-bg {
    position: relative;
    overflow: hidden;
}

.wave-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, #3b82f61a, #8b5cf61a);
    animation: wave 3s ease-in-out infinite;
}

/* 数据可视化图表样式 */
.chart-container {
    position: relative;
    height: 300px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 20px;
    overflow: hidden;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 4px;
    width: 0%;
    transition: width 2s ease-in-out;
}

/* 悬浮卡片效果 */
.floating-card {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 30px;
    transition: all 0.3s ease;
}

.floating-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    background: rgba(255, 255, 255, 0.15);
}

/* 发光边框效果 */
.glow-border {
    position: relative;
    border-radius: 20px;
    background: linear-gradient(45deg, #3b82f6, #8b5cf6);
    padding: 2px;
}

.glow-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #3b82f6, #8b5cf6, #3b82f6);
    border-radius: 22px;
    z-index: -1;
    filter: blur(6px);
    opacity: 0;
    transition: opacity 0.3s;
}

.glow-border:hover::before {
    opacity: 1;
}

.glow-content {
    background: white;
    border-radius: 18px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* 文字打字机效果 */
.typewriter-text {
    overflow: hidden;
    border-right: 0.15em solid #3b82f6;
    white-space: nowrap;
    margin: 0 auto;
    letter-spacing: 0.15em;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

/* 渐变遮罩效果 */
.gradient-mask {
    background: linear-gradient(
        135deg,
        rgba(59, 130, 246, 0.1) 0%,
        rgba(139, 92, 246, 0.1) 50%,
        rgba(236, 72, 153, 0.1) 100%
    );
    position: relative;
    overflow: hidden;
}

.gradient-mask::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.gradient-mask:hover::after {
    transform: translateX(100%);
}

/* 网格布局增强 */
.grid-auto-fit {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* 卡片阴影层次 */
.shadow-soft {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.shadow-strong {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* 图标动画 */
.icon-bounce {
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -8px, 0);
    }
    70% {
        transform: translate3d(0, -4px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

/* 加载状态 */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: loading 1.5s infinite;
}

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

/* 打字机效果 */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: #3b82f6;
    }
}

.typewriter {
    overflow: hidden;
    border-right: 0.15em solid #3b82f6;
    white-space: nowrap;
    margin: 0 auto;
    letter-spacing: 0.15em;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

/* 自定义选择样式 */
::selection {
    background: rgba(59, 130, 246, 0.3);
    color: #1e40af;
}

::-moz-selection {
    background: rgba(59, 130, 246, 0.3);
    color: #1e40af;
}

/* 火焰动画效果 */
.flame {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, #ff6b35, #f7931e, #ffd23f);
    opacity: 0.8;
    animation: flame-flicker 2s ease-in-out infinite alternate;
}

.flame-1 {
    width: 20px;
    height: 20px;
    top: 10px;
    left: 20px;
    animation-delay: 0s;
}

.flame-2 {
    width: 15px;
    height: 15px;
    top: 15px;
    left: 35px;
    animation-delay: 0.5s;
}

.flame-3 {
    width: 12px;
    height: 12px;
    top: 8px;
    left: 50px;
    animation-delay: 1s;
}

@keyframes flame-flicker {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.8;
    }
    25% {
        transform: scale(1.1) rotate(5deg);
        opacity: 1;
    }
    50% {
        transform: scale(0.9) rotate(-3deg);
        opacity: 0.6;
    }
    75% {
        transform: scale(1.05) rotate(2deg);
        opacity: 0.9;
    }
}

/* 火焰悬停效果 */
.flame:hover {
    animation: flame-intense 0.5s ease-in-out;
}

@keyframes flame-intense {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
    }
}
