/* ------------------------------------------ */
/* ESTILOS GENERALES | GENERAL STYLES */
body {
    background-color: #222034;
    background-image: url('../assets/stars.svg');
    background-repeat: no-repeat;
    background-size: cover;
}

/* Contenedor principal centrado */
.main {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 90vh;
}

/* ------------------------------------------ */
/* SOL, PLANETAS Y ASTEROIDES | SOLAR SYSTEM */

/* Sol | Sun */
#sun {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
}

#sun img {
    width: 100%;
    height: auto;
}

/* Mercurio | Mercury */
#mercury {
    position: absolute;
    width: 80px;
    height: 80px;
    animation: rotation 2.5s infinite linear;
}

#mercury img {
    width: 10px;
    height: 10px;
    animation: counterRotation 2.5s infinite linear;
}

/* Venus | Venus */
#venus {
    position: absolute;
    width: 130px;
    height: 130px;
    animation: rotation 6.5s infinite linear;
}

#venus img {
    width: 15px;
    height: 15px;
    animation: counterRotation 6.5s infinite linear;
}

/* Tierra | Earth */
#earth {
    position: absolute;
    width: 180px;
    height: 180px;
    animation: rotation 10s infinite linear;
}

#earth img {
    width: 20px;
    height: 20px;
    animation: counterRotation 10s infinite linear;
}

/* Marte | Mars */
#mars {
    position: absolute;
    width: 230px;
    height: 230px;
    animation: rotation 18.8s infinite linear;
}

#mars img {
    width: 15px;
    height: 15px;
    animation: counterRotation 18.8s infinite linear;
}

/* Cinturón de asteroides | Asteroid Belt */
#asteroids {
    position: absolute;
    width: 440px;
    height: 440px;
}

#asteroids img {
    width: 100%;
    height: auto;
    animation: counterRotation2 260s infinite linear;
}

/* Júpiter | Jupiter */
#jupiter {
    position: absolute;
    width: 360px;
    height: 360px;
    animation: rotation 118.7s infinite linear;
}

#jupiter img {
    width: 30px;
    height: 30px;
    animation: counterRotation 118.7s infinite linear;
}

/* Saturno | Saturn */
#saturn {
    position: absolute;
    width: 410px;
    height: 410px;
    animation: rotation 294.8s infinite linear;
}

#saturn img {
    width: 40px;
    height: 25px;
    animation: counterRotation 294.8s infinite linear;
}

/* Urano | Uranus */
#uranus {
    position: absolute;
    width: 460px;
    height: 460px;
    animation: rotation 840.4s infinite linear;
}

#uranus img {
    width: 20px;
    height: 20px;
    animation: counterRotation 840.4s infinite linear;
}

/* Neptuno | Neptune */
#neptune {
    position: absolute;
    width: 510px;
    height: 510px;
    animation: rotation 45.2s infinite linear;
}

#neptune img {
    width: 17.5px;
    height: 17.5px;
    animation: counterRotation 45.2s infinite linear;
}

/* ------------------------------------------ */
/* ANIMACIONES | ANIMATIONS */
/* Rotación horaria | Clockwise rotation */
@keyframes rotation {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Rotación antihoraria | Counterclockwise rotation */
@keyframes counterRotation {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(-360deg);
    }
}

/* Rotación inversa especial (asteroides) |  Special reverse rotation (asteroids) */
@keyframes counterRotation2 {
    from {
        transform: rotate(-360deg);
    }
    to {
        transform: rotate(0deg);
    }
}

/* ------------------------------------------ */
/* RESPONSIVE DESIGN */
/* Dispositivos pequeños (móviles) | Small devices (mobiles) */
@media (max-width: 600px) {
    .main {
        height: 100vh;
        transform: scale(0.5);
    }

    #sun {
        width: 40px;
        height: 40px;
    }

    #sun img {
        width: 100%;
    }

    #mercury, #venus, #earth, #mars,
    #asteroids, #jupiter, #saturn,
    #uranus, #neptune {
        transform-origin: center center;
    }
}

/* Dispositivos medianos (tabletas) | Medium devices (tablets) */
@media (min-width: 601px) and (max-width: 1024px) {
    .main {
        height: 100vh;
        transform: scale(0.7);
    }

    #sun {
        width: 50px;
        height: 50px;
    }
}

/* Dispositivos grandes (laptops y monitores) | Large devices (laptops and monitors) */
@media (min-width: 1025px) {
    .main {
        height: 90vh;
        transform: scale(1);
    }

    #sun {
        width: 60px;
        height: 60px;
    }
}
