*{
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body{
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #050505;
}

.cube{
  position: relative;
  width: 300px;
  height: 300px;
  transform: rotateX(-25deg);
  transform-style: preserve-3d;
  animation: anim 3s linear infinite;
}

@keyframes anim {
  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(#050505, rgb(235, 23, 16));
  transform: rotateY(calc(90deg * var(--1))) translateZ(150px); 
  /* 300/2 = 150px */
}

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

.top::before{
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 300px;
  height: 300px;
  background: rgb(235, 23, 16);
  transform: translateZ(-380px);
  filter: blur(24px);
  box-shadow: 0 0 120px rgb(235, 23, 16, 0.2),
  0 0 20px rgb(235, 23, 16, 0.4),
  0 0 30px rgb(235, 23, 16, 0.6),
  0 0 40px rgb(235, 23, 16, 0.8),
  0 0 50px rgb(235, 23, 16, 1)
  ;
}