﻿/* Animated Background - Adjusted Fix */

.background-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background-color: #0a0c10;
    display: flex;
    justify-content: center;
    align-items: center;
    /* El scroll lo maneja el login.css en el body, pero esto asegura compatibilidad */
    overflow-x: hidden;
}

/* CAMBIO CLAVE: position: fixed 
   Esto asegura que los orbes siempre cubran el 100% de la ventana visible,
   incluso si haces scroll hacia abajo. Ya no saldrá la línea negra.
*/
.effects-container {
    position: fixed; /* Antes era absolute */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.noise-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.04;
    z-index: 2;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    z-index: 1;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    animation-iteration-count: infinite;
}

/* Orb 1 - Cyan */
.orb-1 {
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, #00d4ff, transparent 70%);
    top: -20%;
    left: -20%;
    animation: moveOrb1 20s infinite alternate;
}

/* Orb 2 - Indigo */
.orb-2 {
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, #4f46e5, transparent 70%);
    bottom: -10%;
    right: -10%;
    animation: moveOrb2 25s infinite alternate-reverse;
}

/* Orb 3 - Blue */
.orb-3 {
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, #2563eb, transparent 70%);
    top: 40%;
    left: 30%;
    opacity: 0.4;
    animation: pulseOrb 15s infinite ease-in-out;
}

/* Keyframes */
@keyframes moveOrb1 {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(10vw, 10vh) scale(1.1);
    }
}

@keyframes moveOrb2 {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(-10vw, -10vh) scale(1.2);
    }
}

@keyframes pulseOrb {
    0% {
        transform: scale(1) translate(0, 0);
        opacity: 0.4;
    }

    50% {
        transform: scale(1.5) translate(5vw, -5vw);
        opacity: 0.6;
    }

    100% {
        transform: scale(1) translate(0, 0);
        opacity: 0.4;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .orb-1 {
        width: 80vw;
        height: 80vw;
    }

    .orb-2 {
        width: 70vw;
        height: 70vw;
    }

    .orb-3 {
        width: 60vw;
        height: 60vw;
    }
}
