body {
  font-family: Arial, sans-serif;
  background: linear-gradient(to right, #17db75, hsl(198, 33%, 69%));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  margin: 0;
}

h1 {
  color: #fff;
  margin-bottom: 20px;
}

.scene {
  width: 150px;
  height: 150px;
  perspective: 600px;
  margin-bottom: 20px;
}

.dice {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.face {
  position: absolute;
  width: 150px;
  height: 150px;
  background: #fff;
  border: 2px solid #333;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  justify-items: center;
  align-items: center;
}

/* Position each face in 3D space */
.front  { transform: rotateY(0deg) translateZ(75px); }
.back   { transform: rotateY(180deg) translateZ(75px); }
.right  { transform: rotateY(90deg) translateZ(75px); }
.left   { transform: rotateY(-90deg) translateZ(75px); }
.top    { transform: rotateX(90deg) translateZ(75px); }
.bottom { transform: rotateX(-90deg) translateZ(75px); }

/* Dot style */
.dot {
  width: 20px;
  height: 20px;
  background: #333;
  border-radius: 50%;
}

/* Button */
button {
  padding: 10px 20px;
  font-size: 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: #4facfe;
  color: white;
  transition: 0.3s;
}

button:hover {
  background: #00c6fb;
}

#result {
  font-size: 20px;
  color: #fff;
  margin-bottom: 15px;
}