.stage {
  margin: 100px auto;
  width: 200px;
  perspective: 500px;
  position: fixed;
}

.cube {
  position: relative;
  transform-style: preserve-3d;
}

.stage-1 {
  left: 23%;
  top: -3%;
}

.stage-1 .cube {
  width: 160px;
  height: 160px;
  animation: mixedRotation 28s linear infinite;
  transition: 2s;
}

.stage-2 {
  left: 80%;
  top: 3%;
}

.stage-2 .cube {
  width: 380px;
  height: 380px;
  animation: mixedRotation-2 28s linear infinite;
  transition: 1s;
}

.stage-3 {
  left: 30%;
  bottom: 10%;
}

.stage-3 .cube {
  width: 80px;
  height: 80px;
  animation: mixedRotation-3 28s linear infinite;
  transition: 2s;
}

.stage-4 {
  left: 60%;
  bottom: -5%;
}

.stage-4 .cube {
  width: 240px;
  height: 240px;
  animation: mixedRotation-4 28s linear infinite;
  transition: 4s;
}

/* .cube:hover {
  animation: mixedRotation 2s linear infinite;
} */

.panel {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0.2;
  width: 100%;
  height: 150%;
  border-top: 4px solid #999;
  border-bottom: 4px solid #999;
  box-sizing: border-box;
  font-family: Impact;
  font-size: 62px;
  color: #fff;
  text-align: center;
}

.front {
  transform: translateZ(100px);
  transition: 1s;
}

.back {
  transform: translateZ(-100px) rotateX(180deg);
  transition: 1s;
}

.left {
  left: -100px;
  transform: rotateY(-90deg);
}

.right {
  left: auto;
  right: -100px;
  transform: rotateY(90deg);
}

.top {
  top: -100px;
  transform: rotateX(90deg);
}

.bottom {
  top: auto;
  bottom: -100px;
  transform: rotateX(-90deg);
}

.cube > *:nth-child(1) {
  background-color: hsl(90deg 90% 70%/60%);
}

.cube > *:nth-child(2) {
  background-color: hsl(90deg 90% 70%/60%);
}

.cube > *:nth-child(3) {
  background-color: hsl(90deg 90% 70%/60%);
}

.cube > *:nth-child(4) {
  background-color: hsl(90deg 90% 70%/60%);
}

.cube > *:nth-child(5) {
  background-color: hsl(90deg 90% 70%/60%);
}

.cube > *:nth-child(6) {
  background-color: hsl(90deg 90% 70%/60%);
}

/* .cube > *:nth-child(1) {
  background-color: hsl(90deg 90% 70%/60%);
}

.cube > *:nth-child(2) {
  background-color: hsl(180deg 90% 70%/60%);
}

.cube > *:nth-child(3) {
  background-color: hsl(0deg 90% 70%/60%);
}

.cube > *:nth-child(4) {
  background-color: hsla(320, 100%, 92%, 0.6);
}

.cube > *:nth-child(5) {
  background-color: hsla(30, 100%, 97%, 0.6);
}

.cube > *:nth-child(6) {
  background-color: hsl(240deg 90% 70%/60%);
} */

@keyframes mixedRotation {
  0% {
    transform: rotateX(0deg) rotateY(0deg) scale(1);
  }
  100% {
    transform: rotateX(360deg) rotateY(360deg) scale(1);
  }
}

@keyframes mixedRotation-2 {
  0% {
    transform: rotateX(360deg) rotateY(360deg);
  }
  100% {
    transform: rotateX(0deg) rotateY(0deg);
  }
}

@keyframes mixedRotation-3 {
  0% {
    transform: rotateX(0deg) rotateY(0deg);
  }
  100% {
    transform: rotateX(360deg) rotateY(360deg);
  }
}

@keyframes mixedRotation-4 {
  0% {
    transform: rotateX(360deg) rotateY(360deg);
  }
  100% {
    transform: rotateX(0deg) rotateY(0deg);
  }
}
