body {
    margin: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: black;
    overflow: hidden;
}

.container{
    font-size: 10px;
    width: 40em;
    height: 40em;
    position: relative;
}

.sun{
    position: absolute;
    top: 15em;
    left: 15em;
    width: 10em;
    height: 10em;
    background-color: yellow;
    border-radius: 50%;
    box-shadow: 0 0 3em white;
    background-image: url('sunPic.jpg');
    background-size:auto;
    background-position: center;
    z-index: 3;
    
}

.earth,.moon,.mars{
    position: absolute;
    border-style: solid;
    border-color: white transparent transparent transparent;
    border-width: 0.1em 0.1em 0 0;
    border-radius: 50%;
    z-index: 2;
}

.earth{
    top: 4em;
    left: 4em;
    width: 32em;
    height: 32em;
    animation: orbit 36.5s linear infinite;
}

.moon{
    top: 0;
    right: 0;
    width: 8em;
    height: 8em;
    animation: orbit 2.7s linear infinite;
}

.mars{
    top: 11em;
    right: 11em;
    width: 18em;
    height: 18em;
    animation: orbit 68.7s linear infinite;
}

.earth::before,
.moon::before,
.mars::before{
    content: "";
    position: absolute;
    border-radius: 50%;
}


.earth::before{
    top: 2.8em;
    right: 2.8em;
    width: 3em;
    height: 3em;
    background-color: aqua;
    background-image: url('earth.png');
    background-size: cover;
    background-position: center;
    border-radius: 50%;
}

.moon::before{
    top: 0.8em;
    right: 0.2em;
    width: 1.2em;
    height: 1.2em;
    background-color: silver;
    background-image: url('moonPicture.png');
    background-size: cover;
    background-position: center;
    border-radius: 50%;
}

.mars::before{
    top: 1.5em;
    right: 1.5em;
    width: 2em;
    height: 2em;
    background-color: red;
    background-image: url('mars.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 50%;
}

@keyframes orbit{
    to{
        transform: rotate(360deg);
    }
}

.star{
    position:fixed;
    background-color: white;
    border-radius: 50%;
}

.planet-name{
    display: none;
    position: absolute;
    color: white;
    font-size: 1.2em;
}

.sun:hover::after, .earth:hover::after, .moon:hover::after, .mars:hover::after{
    content: attr(data-name);
    position: absolute;
    color: white;
    font-size: 1.2em;
    top: -1.5em;
    left: 50%;
    transform: translateX(-50%);
}