/* 酷炫动画样式 */

/* ========== 鼠标跟随光效 ========== */
.mouse-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(30, 136, 229, 0.15) 0%, transparent 70%);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    transition: opacity 0.3s;
}

/* ========== 渐变动画背景 ========== */
.gradient-bg {
    background: linear-gradient(-45deg, #1E88E5, #0D47A1, #42A5F5, #1976D2);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ========== 滚动进入动画 ========== */
.fade-in,
.slide-up,
.slide-left,
.slide-right,
.zoom-in {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.animate-in {
    opacity: 1;
}

.slide-up {
    transform: translateY(50px);
}

.slide-up.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.slide-left {
    transform: translateX(-50px);
}

.slide-left.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.slide-right {
    transform: translateX(50px);
}

.slide-right.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.zoom-in {
    transform: scale(0.8);
}

.zoom-in.animate-in {
    opacity: 1;
    transform: scale(1);
}

/* ========== 3D卡片效果 ========== */
.card,
.advantage-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
}

.card:hover,
.advantage-card:hover {
    box-shadow: 0 20px 40px rgba(30, 136, 229, 0.3);
}

/* 产品卡片禁用3D效果 */
.product-card {
    transform-style: flat !important;
}

/* ========== 发光边框效果 ========== */
.glow-border {
    position: relative;
    overflow: hidden;
}

.glow-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #1E88E5, #42A5F5, #1E88E5);
    background-size: 400%;
    border-radius: inherit;
    z-index: -1;
    animation: glowRotate 3s linear infinite;
    opacity: 0;
    transition: opacity 0.3s;
}

.glow-border:hover::before {
    opacity: 1;
}

@keyframes glowRotate {
    0% { background-position: 0% 50%; }
    100% { background-position: 400% 50%; }
}

/* ========== 脉冲动画 ========== */
.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* ========== 浮动动画 ========== */
.float {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ========== 闪烁效果 ========== */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* ========== 霓虹文字效果 ========== */
.neon-text {
    color: #fff;
    text-shadow: 
        0 0 5px #1E88E5,
        0 0 10px #1E88E5,
        0 0 20px #1E88E5,
        0 0 40px #42A5F5,
        0 0 80px #42A5F5;
    animation: neonFlicker 1.5s infinite alternate;
}

@keyframes neonFlicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        text-shadow: 
            0 0 5px #1E88E5,
            0 0 10px #1E88E5,
            0 0 20px #1E88E5,
            0 0 40px #42A5F5,
            0 0 80px #42A5F5;
    }
    20%, 24%, 55% {
        text-shadow: none;
    }
}

/* ========== 数字滚动容器 ========== */
.counter {
    font-size: var(--font-size-3xl);
    font-weight: bold;
    color: var(--primary-color);
    font-variant-numeric: tabular-nums;
}

/* ========== 加载动画 ========== */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(30, 136, 229, 0.1);
    border-top-color: #1E88E5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========== 波纹效果 ========== */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    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;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* ========== 玻璃态效果 ========== */
.glass-effect {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ========== 渐变文字 ========== */
.gradient-text {
    background: linear-gradient(45deg, #1E88E5, #42A5F5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========== 响应式调整 ========== */
@media (max-width: 767px) {
    .mouse-glow {
        display: none;
    }
    
    #particle-canvas {
        opacity: 0.5;
    }
    
    .neon-text {
        font-size: var(--font-size-xl);
    }
}

/* ========== 性能优化 ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
