.container {
    transform-style: preserve-3d;
    width: 100%;
    height: 500px;
}

#cubeHolder{
    position: absolute;
    top: 50%;
    left: 50%;
    width: 350px;
    height: 350px;
    transform-style: preserve-3d;
    transform: translate(-50%, -120%);
}

#camera-x {
    animation-name: rotateX;
    animation-duration: 30s;
    animation-delay: 0ms;
    animation-iteration-count: infinite;
    animation-direction: alternate;
    transform-style: preserve-3d;
}

#camera-y {
    animation-name: rotateY;
    animation-duration: 60s;
    animation-delay: 0ms;
    animation-iteration-count: infinite;
    animation-direction: alternate;
    transform-style: preserve-3d;
}

#camera-y{
    transform: rotateY(30deg);
}

#camera-z {
    transform-style: preserve-3d;
}

.cube{
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    border-color: rgba(from var(--text-color) r g b / 10%);
    border-width: 3px;
    border-style: solid;
    border-radius: 10px;
}

.container:active .sphereSlice {
}

.container:not(:active) .sphereSlice{
}

.sphereSlice {
    border-color: transparent;
    border-width: 5px;
    animation: sphere 3000ms cubic-bezier(0.215, 0.610, 0.355, 1.000) alternate infinite,
        color 5000ms linear alternate infinite,
        cubeToSphere 60000ms ease-in-out alternate infinite,
        borderStyle 120000ms linear alternate infinite;
    box-shadow: var(--box-shadow-all-inset-main-color);
    transition: 500ms;
}

@keyframes sphere {
    0% {
        transform: scale(0) rotateZ(120deg);
    }

    50% {
        transform: scale(0) rotateZ(240deg);
    }

    100% {
        transform: scale(1) rotateZ(360deg);
    }
}

@keyframes color {
    0% {
        border-color: #f55;
    }

    50% {
        border-color: #55f;
    }

    100% {
        border-color: #5f5;
    }
}

@keyframes rotateY {
    0% {
        transform: rotateY(-360deg);
    }

    100% {
        transform: rotateY(360deg);
    }
}

@keyframes rotateX {
 0% {
        transform: rotateX(150deg);
    }

    100% {
        transform: rotateX(200deg);
    }
}

@keyframes cubeToSphere {
    0% {
        width: 40%;
        height: 40%;
        border-radius: 5px;
    }

    100% {
        width: 70%;
        height: 70%;
        border-radius: 5px;
        border-radius: 100%;
    }
}

@keyframes borderStyle {
    0% {
        border-style: solid;
    }

    100% {
        border-style: dotted;
    }
}