/**
 * 动态线条背景 - 模仿参考网站效果
 */

.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
}

/* Canvas容器 */
.animated-bg canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* 备用CSS动画背景（如果Canvas不支持） */
.animated-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.3;
}

.animated-lines::before,
.animated-lines::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background-image: 
        linear-gradient(90deg, transparent 0%, transparent 49.5%, rgba(99, 102, 241, 0.15) 49.5%, rgba(99, 102, 241, 0.15) 50.5%, transparent 50.5%, transparent 100%),
        linear-gradient(0deg, transparent 0%, transparent 49.5%, rgba(139, 92, 246, 0.1) 49.5%, rgba(139, 92, 246, 0.1) 50.5%, transparent 50.5%, transparent 100%);
    background-size: 100px 100px;
    animation: moveGrid 20s linear infinite;
}

.animated-lines::after {
    background-size: 150px 150px;
    animation: moveGrid 30s linear infinite reverse;
    opacity: 0.5;
}

@keyframes moveGrid {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(100px, 100px);
    }
}

/* 光点效果 */
.light-dots {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.light-dot {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #6366f1;
    border-radius: 50%;
    box-shadow: 0 0 10px #6366f1;
    animation: float 15s ease-in-out infinite;
}

.light-dot:nth-child(2n) {
    background: #8b5cf6;
    box-shadow: 0 0 10px #8b5cf6;
    animation-duration: 20s;
}

.light-dot:nth-child(3n) {
    background: #22c55e;
    box-shadow: 0 0 10px #22c55e;
    animation-duration: 25s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.5;
    }
    25% {
        transform: translate(50px, -30px) scale(1.2);
        opacity: 0.8;
    }
    50% {
        transform: translate(-30px, -60px) scale(0.8);
        opacity: 0.6;
    }
    75% {
        transform: translate(-50px, -30px) scale(1.1);
        opacity: 0.7;
    }
}

/* 响应式 */
@media (max-width: 768px) {
    .animated-lines::before,
    .animated-lines::after {
        background-size: 50px 50px;
    }
    
    .light-dot {
        width: 3px;
        height: 3px;
    }
}
