.camera {
    perspective: 700px;
    perspective-origin: 50% 30%;
    transform: rotateZ(-20deg);
    margin: auto;
}

.cube {
    width: 28rem;
    height: 28rem;
    margin: auto;
    transform-style: preserve-3d;
    position: relative;
    transform: rotateY(0deg);
    animation: spin 10s infinite;
    animation-timing-function: linear;
}

@keyframes spin {
    from {
        transform: rotateY(0);
    }

    to {
        transform: rotateY(360deg);
    }
}

.cube:hover{
    animation-play-state: paused;
}

.box {
    width: 80px;
    height: 80px;
    position: absolute;
    top: calc(50% - 40px);
    left: calc(50% - 40px);  
}

.box img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.box1 {
    background-color: rgba(0, 255, 255, 1);
    transform: rotateY(0deg) translateZ(153px);
}

.box2 {
    background-color: rgba(10, 255, 255, 1);
    transform: rotateY(-30deg) translateZ(153px);
}

.box3 {
    background-color: rgba(20, 255, 255, 1);
    transform: rotateY(-60deg) translateZ(153px);
}

.box4 {
    background-color: rgba(30, 255, 255, 1);
    transform: rotateY(-90deg) translateZ(153px);
}

.box5 {
    background-color: rgba(30, 255, 255, 1);
    transform: rotateY(-120deg) translateZ(153px);
}

.box6 {
    background-color: rgba(40, 255, 255, 1);
    transform: rotateY(-150deg) translateZ(153px);
}

.box7 {
    background-color: rgba(50, 255, 255, 1);
    transform: rotateY(-180deg) translateZ(153px);
}

.box8 {
    background-color: rgba(50, 255, 255, 1);
    transform: rotateY(-210deg) translateZ(153px);
}

.box9 {
    background-color: rgba(60, 255, 255, 1);
    transform: rotateY(-240deg) translateZ(153px);
}

.box10 {
    background-color: rgba(70, 255, 255, 1);
    transform: rotateY(-270deg) translateZ(153px);
}

.box11 {
    background-color: rgba(80, 255, 255, 1);
    transform: rotateY(-300deg) translateZ(153px);
}

.box12 {
    background-color: rgba(90, 255, 255, 1);
    transform: rotateY(-330deg) translateZ(153px);
}

@media screen and (min-width: 768px) {
    .cube {
        width: 30rem;
        height: 30rem;
        margin: auto;
        transform-style: preserve-3d;
        position: relative;
        transform: rotateY(0deg);
        animation: spin 10s infinite;
        animation-timing-function: linear;
    }
}