body {
    padding: 0;
    margin: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}
#challenge31 ul{
    width: 50px;
    height: 50px;
    position: relative;
    display: flex;
    list-style-type: none;
    justify-content: center;
    padding: 0;
    animation: 2s ease-in-out infinite rotate-ul;
}
#challenge31 ul li{
    width: 80%;
    height: 80%;
    position: absolute;
    border-radius: 50%;
    background-color: #ff5e65;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: 0.5s;
}
#challenge31 ul .cover {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    background-color: #0090e9;
    border-radius: 5px;
    z-index: 3;
}

#challenge31 ul li:nth-child(1) {
    animation: 2s linear infinite ball-1-animation, linear 4s infinite color-change-balls;
}

#challenge31 ul li:nth-child(2) {
    animation: 2s linear infinite ball-2-animation, linear 4s infinite color-change-balls;
}

#challenge31 ul li:nth-child(3) {
    animation: 2s linear infinite ball-3-animation, linear 4s infinite color-change-balls;
}

#challenge31 ul li:nth-child(4) {
    animation: 2s linear infinite ball-4-animation, linear 4s infinite color-change-balls;
}

@keyframes rotate-ul {
    from {
        transform: rotate(0);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes ball-1-animation {
    0% {
        transform: translate(-50%, -50%);
    }
    50% {
        transform: translate(-50%, -300%);
    }
    80%, 90%, 100% {
        transform: translate(-50%, -50%);
    }
}

@keyframes ball-2-animation {
    0% {
        transform: translate(-50%, -50%);
    }
    50% {
        transform: translate(-50%, 200%);
    }
    80%, 90%, 100% {
        transform: translate(-50%, -50%);
    }
}

@keyframes ball-3-animation {
    0% {
        transform: translate(-50%, -50%);
    }
    50% {
        transform: translate(-300%, -50%);
    }
    80%, 90%, 100% {
        transform: translate(-50%, -50%);
    }
}

@keyframes ball-4-animation {
    0% {
        transform: translate(-50%, -50%);
    }
    50% {
        transform: translate(200%, -50%);
    }
    80%, 90%, 100% {
        transform: translate(-50%, -50%);
    }
}
@keyframes color-change-balls {
    0% {
        background-color: #5eefff;
    }
    25% {
        background-color: #2bfe20;
    }
    50% {
        background-color: #ffbf5e;
    }
    75% {
        background-color: #ff4ef6;
    }
    100% {
        background-color: #5eefff;
    }
}