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

body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: linear-gradient(135deg, #1e3c72, #2a5298);
  font-family: Arial, sans-serif;
  overflow: hidden;
}

/* 3D Cube Container */
.cube-container {
  perspective: 1000px;
  width: 200px;
  height: 200px;
}

.cube {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: rotateCube 8s infinite linear;
  transition: transform 0.5s ease;
}

.cube:hover {
  transform: rotateX(360deg) rotateY(360deg);
}

.cube div {
  position: absolute;
  width: 200px;
  height: 200px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  color: white;
  text-transform: uppercase;
  font-weight: bold;
}

/* Assigning unique colors to each face */
.front { 
  transform: translateZ(100px); 
  background-color: #ff6f61; /* Coral */
}
.back { 
  transform: rotateY(180deg) translateZ(100px); 
  background-color: #6b5b95; /* Purple */
}
.right { 
  transform: rotateY(90deg) translateZ(100px); 
  background-color: #88b04b; /* Green */
}
.left { 
  transform: rotateY(-90deg) translateZ(100px); 
  background-color: #f7cac9; /* Pink */
}
.top { 
  transform: rotateX(90deg) translateZ(100px); 
  background-color: #92a8d1; /* Blue */
}
.bottom { 
  transform: rotateX(-90deg) translateZ(100px); 
  background-color: #ffb347; /* Orange */
}

/* Animation for cube rotation */
@keyframes rotateCube {
  from {
    transform: rotateX(0deg) rotateY(0deg);
  }
  to {
    transform: rotateX(360deg) rotateY(360deg);
  }
}

