/* ============================================
   EFECTO DE FONDO - CIRCUITERÍA ANIMADA
   ============================================ */

/* Contenedor para las líneas animadas */
.circuit-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* Línea horizontal 1 - Cruza de izquierda a derecha */
.circuit-lines::before {
    content: '';
    position: absolute;
    top: 25%;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        transparent 48%,
        var(--neon-blue) 48%,
        var(--neon-blue) 52%,
        transparent 52%,
        transparent 100%
    );
    box-shadow: 0 0 10px var(--neon-blue-glow);
    animation: slideHorizontal1 8s ease-in-out infinite;
    opacity: 0;
}

/* Línea vertical 1 - Cruza de arriba a abajo */
.circuit-lines::after {
    content: '';
    position: absolute;
    top: 0;
    left: 60%;
    width: 2px;
    height: 100%;
    background: linear-gradient(
        180deg,
        transparent 0%,
        transparent 48%,
        var(--neon-blue) 48%,
        var(--neon-blue) 52%,
        transparent 52%,
        transparent 100%
    );
    box-shadow: 0 0 10px var(--neon-blue-glow);
    animation: slideVertical1 10s ease-in-out infinite 2s;
    opacity: 0;
}

/* Líneas adicionales usando pseudo-elementos anidados */
.circuit-line-2 {
    position: fixed;
    top: 65%;
    left: 0;
    width: 100%;
    height: 2px;
    pointer-events: none;
    z-index: 0;
}

.circuit-line-2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        transparent 45%,
        rgba(0, 212, 255, 0.8) 45%,
        rgba(0, 212, 255, 0.8) 55%,
        transparent 55%,
        transparent 100%
    );
    box-shadow: 0 0 8px var(--neon-blue-glow);
    animation: slideHorizontal2 12s ease-in-out infinite 4s;
    opacity: 0;
}

.circuit-line-3 {
    position: fixed;
    top: 0;
    left: 30%;
    width: 2px;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.circuit-line-3::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        transparent 0%,
        transparent 45%,
        rgba(0, 212, 255, 0.7) 45%,
        rgba(0, 212, 255, 0.7) 55%,
        transparent 55%,
        transparent 100%
    );
    box-shadow: 0 0 8px var(--neon-blue-glow);
    animation: slideVertical2 14s ease-in-out infinite 6s;
    opacity: 0;
}

/* Animaciones - Líneas horizontales */
@keyframes slideHorizontal1 {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.4;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes slideHorizontal2 {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateX(-100%);
        opacity: 0;
    }
}

/* Animaciones - Líneas verticales */
@keyframes slideVertical1 {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(100%);
        opacity: 0;
    }
}

@keyframes slideVertical2 {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100%);
        opacity: 0;
    }
}

/* ============================================
   RESPONSIVE - Ajustes para dispositivos móviles
   ============================================ */

@media (max-width: 768px) {
    .circuit-lines::before,
    .circuit-lines::after,
    .circuit-line-2::before,
    .circuit-line-3::before {
        animation-duration: 10s;
    }
}

@media (max-width: 480px) {
    /* En móviles, hacemos las líneas más sutiles */
    .circuit-lines::before,
    .circuit-lines::after {
        height: 1px;
        width: 1px;
    }
    
    .circuit-line-2,
    .circuit-line-3 {
        opacity: 0.7;
    }
}
