body {
    margin: 0;
    padding: 0;
    overflow: hidden;
  }
  
  .container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-style: preserve-3d;
    transform: translate(-50%, -50%);
    perspective: 1000px;
  }
  
  #cube {
    position: relative;
    width: 200px;
    height: 200px;
    transform-style: preserve-3d;
    animation: cubeAnimation 10s infinite linear;
  }
  
  @keyframes cubeAnimation {
    0% {
      transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }
    100% {
      transform: rotateX(1turn) rotateY(1turn) rotateZ(1turn);
    }
  }
  
  #cube::before,
  #cube::after {
    content: "";
    position: absolute;
    width: 200px;
    height: 200px;
  }
  
  #cube::before {
    background-color: rgba(255, 0, 0, 0.7);
    transform: translateZ(-100px);
  }
  
  #cube::after {
    background-color: rgba(0, 255, 0, 0.7);
    transform: translateZ(100px);
  }
  