main {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #050505;
    width: 99vw;
    height: 98vh;
    position: relative;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
}

main>section:nth-child(1){
    background-color: white;
    position: absolute;
    left: 40%;
    top: 44%;
    margin: auto;
}

.cube {
    position: relative;
    width: 280px;
    height: 280px;
    transform-style: preserve-3d;
    transform: rotateX(-30deg);
    animation: animate 4s linear infinite;
}

@keyframes animate {

    0% {
        transform: rotateX(-30deg) rotateY(0deg);
    }
    100% {
        transform: rotateX(-30deg) rotateY(-360deg);
    }
}

.cube div {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.cube div span {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(#151515, #00ec00);
    transform: rotateY(calc(90deg * var(--i))) translateZ(150px);

}

.top{
    position: absolute;
    top: 0;
    left: 0;
    width: 300px;
    height: 300px;
    background: #222;
    transform: rotateX(90deg) translateZ(150px);
}

.top::before{
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 300px;
    height: 300px;
    background: #0f0;
    transform: translateZ(-300px);
    filter: blur(20px);
    box-shadow: 0 0 120px rgba(0,255,0,0.2),
    0 0 200px rgba(0,255,0,0.4),
    0 0 300px rgba(0,255,0,0.6),
    0 0 400px rgba(0,255,0,0.8),
    0 0 500px rgba(0,255,0,0.1)
}

/*-=====================================================*/
main>section:nth-child(2){
    background-color: white;
    position: absolute;
    left: 125px;
    top: 88px;
}

.cube2 {
    position: relative;
    width: 280px;
    height: 280px;
    transform-style: preserve-3d;
    transform: rotateX(-30deg);
    animation: animate2 4s linear infinite;
}

@keyframes animate2 {

    0% {
        transform: rotateX(-30deg) rotateY(0deg);
    }
    100% {
        transform: rotateX(-30deg) rotateY(360deg);
    }
}

.cube2 div {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.cube2 div span {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(#151515, #0096FF);
    transform: rotateY(calc(90deg * var(--i))) translateZ(150px);

}

.top2{
    position: absolute;
    top: 0;
    left: 0;
    width: 300px;
    height: 300px;
    background: #222;
    transform: rotateX(90deg) translateZ(150px);
}

.top2::before{
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 300px;
    height: 300px;
    background: #0096FF;
    transform: translateZ(-300px);
    filter: blur(20px);
    box-shadow: 0 0 200px rgba(0, 150, 255,0.2),
    0 0 200px rgba(0, 150, 255,0.4),
    0 0 300px rgba(0, 150, 255,0.6),
    0 0 300px rgba(0, 150, 255,0.8),
    0 0 300px rgba(0, 150, 255,0.1)
}


/*-=====================================================*/
main>section:nth-child(3){
    background-color: white;
    position: absolute;
    right: 125px;
    top: 88px;
}

.cube3 {
    position: relative;
    width: 280px;
    height: 280px;
    transform-style: preserve-3d;
    transform: rotateX(-30deg);
    animation: animate2 4s linear infinite;
}

@keyframes animate3 {

    0% {
        transform: rotateX(-30deg) rotateY(0deg);
    }
    100% {
        transform: rotateX(-30deg) rotateY(360deg);
    }
}

.cube3 div {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.cube3 div span {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(#151515,red);
    transform: rotateY(calc(90deg * var(--i))) translateZ(150px);

}

.top3{
    position: absolute;
    top: 0;
    left: 0;
    width: 300px;
    height: 300px;
    background: #222;
    transform: rotateX(90deg) translateZ(150px);
}

.top3::before{
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 300px;
    height: 300px;
    background: red;
    transform: translateZ(-300px);
    filter: blur(20px);
    box-shadow: 0 0 200px rgba(255, 77, 65,0.2),
    0 0 200px rgba(255, 77, 65,0.4),
    0 0 200px rgba(255, 77, 65,0.6),
    0 0 200px rgba(255, 77, 65,0.8),
    0 0 200px rgba(255, 77, 65,0.1)
}

#btn{
    background-color: black;
    width: 12%;
    height: 8%;
    position: absolute;
    bottom: 27px;
    right: 34px;
    margin: auto;
    border: 1px solid #330000;
}