.cube-container {
  perspective: 800px;
  width: 200px;
  height: 200px;
  margin: 40px auto;
}

.cube {
  position: relative;
  width: 120px;
  height: 120px;
  transform-style: preserve-3d;
  animation: rotateCube 6s infinite linear;
  margin: 40px auto;
}

.cube-face {
  position: absolute;
  width: 120px;
  height: 120px;
  border: 2px solid #333;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: white;
  font-size: 14px;
}

.cube-face.front { background: rgba(255, 107, 107, 0.8); transform: rotateY(0deg) translateZ(60px); }
.cube-face.back { background: rgba(78, 205, 196, 0.8); transform: rotateY(180deg) translateZ(60px); }
.cube-face.right { background: rgba(255, 195, 77, 0.8); transform: rotateY(90deg) translateZ(60px); }
.cube-face.left { background: rgba(196, 77, 255, 0.8); transform: rotateY(-90deg) translateZ(60px); }
.cube-face.top { background: rgba(77, 255, 136, 0.8); transform: rotateX(90deg) translateZ(60px); }
.cube-face.bottom { background: rgba(255, 77, 136, 0.8); transform: rotateX(-90deg) translateZ(60px); }

@keyframes rotateCube {
  from { transform: rotateX(0) rotateY(0); }
  to { transform: rotateX(360deg) rotateY(360deg); }
}