/* Variables para la animación */
:root {
    --estrella-color: #fff;
    --duracion-fondo: 40s;
    --duracion-estrellas: 100s;
}

body {
    margin: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000010; /* Color base muy oscuro */
}

/* --- CONTENIDO y LOGO --- */
.contenido {
    text-align: center;
    z-index: 10; /* La capa más frontal */
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    position: relative;
}

.logo-central {
    max-width: 80%;
    max-height: 80vh;
    display: block;
    margin: auto;
    animation: flotarLogo 5s ease-in-out infinite alternate;
}

@keyframes flotarLogo {
    0% {
        transform: translateY(0px);
    }
    100% {
        transform: translateY(-20px);
    }
}

/* --- 1. FONDO GALÁCTICO CAMBIANTE (COLOR BASE) --- */

.fondo-galactico {
    position: fixed;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        #0a011d,      /* Azul/Púrpura muy oscuro */
        #3a0f5a,      /* Púrpura */
        #1d5948,      /* Verde oscuro */
        #5a1a3a,      /* Magenta */
        #0a011d
    );
    background-size: 400% 400%;
    animation: cambioFondo var(--duracion-fondo) ease infinite;
    z-index: -2; /* Elevado a -2 para que esté debajo de la galaxia-overlay */
}

@keyframes cambioFondo {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* --- 2. CAPA DE IMAGEN DE GALAXIA TRASLÚCIDA (ACTUALIZADA) --- */

.galaxia-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* Ruta de tu imagen de galaxia */
    background: url('Andromeda_portada.jpg') no-repeat center center; 
    
    background-size: cover;
    opacity: 0.4; /* AJUSTADO: Menos traslúcido (anteriormente 0.15) */
    
    /* CAMBIO CLAVE: mix-blend-mode ahora en "multiply" o "overlay" o "color-burn" 
       para que la imagen esté SOBRE el color. "screen" la ponía debajo del color. */
    mix-blend-mode: multiply; /* Experimenta con 'overlay', 'hard-light', 'color-burn' */
    
    /* Eliminada la animación de giro */
    /* animation: moverGalaxia 120s linear infinite; */ 
    
    z-index: -1; /* Elevado a -1 para que esté sobre el fondo cambiante, pero debajo de las estrellas */
}

/* @keyframes moverGalaxia fue eliminado */

/* --- 3. CAPAS DE ESTRELLAS (BOX-SHADOWS) --- */
.estrellas {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 1px;
    height: 1px;
    background: transparent;
    border-radius: 50%; 
    z-index: 0; /* Elevado a 0 para que esté sobre la galaxia y el fondo */
}

/* Estrellas más cercanas y rápidas */
.estrellas1 {
    box-shadow: 
        10vw 10vh 2px 2px var(--estrella-color),
        -5vw 30vh 1px 1px var(--estrella-color),
        7vw -9vh 3px 1px var(--estrella-color),
        -50vw -10vh 1px 1px var(--estrella-color),
        80vw 90vh 2px 2px var(--estrella-color),
        40vw 50vh 2px 1px #ccc,
        -10vw 20vh 1px 1px #fff; 
    animation: moverEstrellas var(--duracion-estrellas) linear infinite;
    transform: scale(1.0);
}

/* Estrellas intermedias */
.estrellas2 {
    box-shadow: 
        20vw 50vh 1px 1px var(--estrella-color),
        -15vw 60vh 1px 1px var(--estrella-color),
        90vw -40vh 0px 0px var(--estrella-color),
        -70vw -20vh 1px 1px var(--estrella-color),
        30vw 10vh 0px 0px var(--estrella-color),
        -40vw 70vh 0px 0px #eee,
        60vw -10vh 1px 0px #fff;
    animation: moverEstrellas calc(var(--duracion-estrellas) * 1.5) linear infinite reverse;
    transform: scale(1.0);
}

/* Estrellas lejanas y lentas */
.estrellas3 {
    box-shadow: 
        40vw 30vh 0px 0px var(--estrella-color),
        -30vw 90vh 0px 0px var(--estrella-color),
        10vw -80vh 0px 0px var(--estrella-color),
        -90vw -50vh 0px 0px var(--estrella-color),
        50vw 20vh 0px 0px var(--estrella-color),
        10vw 40vh 0px 0px #ddd,
        -50vw -60vh 0px 0px #fff;
    animation: moverEstrellas calc(var(--duracion-estrellas) * 2) linear infinite; 
    transform: scale(1.0);
}

/* Animación de movimiento para todas las capas de estrellas */
@keyframes moverEstrellas {
    0% {
        transform: scale(1) translate(-50%, -50%); 
    }
    100% {
        transform: scale(1.2) translate(10vw, 10vh);
    }
}