/* 高级科技特效增强 */

/* 网格背景效果 */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 123, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 123, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

/* 悬浮粒子效果 */
.particle {
    position: fixed;
    width: 4px;
    height: 4px;
    background: rgba(0, 212, 255, 0.6);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    animation: float 15s infinite;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.8);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0;
    }
}

/* 卡片脉冲效果 */
@keyframes pulse {
    0%, 100% {
        box-shadow: 
            0 8px 32px rgba(0, 0, 0, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    50% {
        box-shadow: 
            0 8px 32px rgba(0, 123, 255, 0.3),
            0 0 20px rgba(0, 212, 255, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
}

/* 文字发光效果 */
@keyframes textGlow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    }
    50% {
        text-shadow: 
            0 0 20px rgba(0, 212, 255, 0.8),
            0 0 30px rgba(0, 212, 255, 0.6),
            0 0 40px rgba(0, 212, 255, 0.4);
    }
}

.card-text h3 {
    animation: textGlow 3s ease-in-out infinite;
}

/* 边框流光效果 */
@keyframes borderFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(0, 123, 255, 0.3) 40%,
        rgba(138, 43, 226, 0.3) 50%,
        rgba(0, 255, 255, 0.3) 60%,
        transparent 70%
    );
    background-size: 200% 200%;
    border-radius: 16px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s;
    animation: borderFlow 3s linear infinite;
}

.card:hover::after {
    opacity: 1;
}

/* 按钮波纹效果 */
.custom-button {
    position: relative;
    overflow: hidden;
}

.custom-button::after {
    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, height 0.6s;
}

.custom-button:active::after {
    width: 200px;
    height: 200px;
}

/* 数据流效果 */
@keyframes dataFlow {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(100%);
        opacity: 0;
    }
}

.divider::before {
    animation: dataFlow 2s ease-in-out infinite;
}

.divider::after {
    animation: dataFlow 2s ease-in-out infinite;
    animation-delay: 1s;
}

/* 鼠标跟随光效 */
.cursor-glow {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.4) 0%, transparent 70%);
    pointer-events: none;
    z-index: 9998;
    transition: transform 0.1s ease;
    mix-blend-mode: screen;
}

/* 卡片图片发光 */
.card img {
    position: relative;
}

.card img::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: inherit;
    filter: blur(15px);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: -1;
}

.card:hover img::after {
    opacity: 0.6;
}

/* 科技线条装饰 */
.tech-line {
    position: relative;
    padding-left: 15px;
}

.tech-line::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(0, 123, 255, 0.8) 20%,
        rgba(138, 43, 226, 0.8) 50%,
        rgba(0, 255, 255, 0.8) 80%,
        transparent 100%
    );
    border-radius: 2px;
    animation: lineGlow 2s ease-in-out infinite;
}

@keyframes lineGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
    }
    50% {
        box-shadow: 0 0 15px rgba(0, 212, 255, 0.8);
    }
}

/* 响应式优化 */
@media (max-width: 768px) {
    body::after {
        background-size: 30px 30px;
    }
    
    .particle {
        width: 3px;
        height: 3px;
    }
}

/* 性能优化 - 减少不必要的动画 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
