.cube-container {
  width: 50px;
  height: 50px;
  margin: 5px auto;
  perspective: 1000px;
            transition: all 2s ease-in-out;
}

.cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  animation: rotate 28s infinite linear;
}

.cube-container:hover {
    transform: scale(1.7);
}

.cube-face {
  position: absolute;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* opacity: 0.9; */
  /* border: 2px solid rgba(255, 255, 255, 0.3); */
  font-size: 24px;
  font-weight: bold;
  color: white;
  background-size: cover;
  background-position: center;
}

.cube-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Position each face */
.front {
  transform: translateZ(25px);
}

.back {
  transform: rotateY(180deg) translateZ(25px);
}

.right {
  transform: rotateY(90deg) translateZ(25px);
}

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

.top {
  transform: rotateX(90deg) translateZ(25px);
}

.bottom {
  transform: rotateX(-90deg) translateZ(25px);
}

/* Animation */
@keyframes rotate {
  from {
    transform: rotateX(0deg) rotateY(0deg);
  }
  to {
    transform: rotateX(360deg) rotateY(360deg);
  }
}