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

body {
  height: 100vh;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, #111, #000);
  cursor: grab;
  user-select: none;
}

body:active {
  cursor: grabbing;
}

.viewport {
  width: 100%;
  height: 100%;
  perspective: 2400px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.scene {
  width: 800px;
  height: 800px;
  perspective: 2400px;
}

.cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.4s ease-out;
}

.small-cube {
  position: absolute;
  width: 160px;
  height: 160px;
  transform-style: preserve-3d;
  left: 50%;
  top: 50%;
  margin-left: -80px;
  margin-top: -80px;
}

.face {
  position: absolute;
  width: 160px;
  height: 160px;
  /* Branco com leve gradiente para dar volume */
  background: linear-gradient(135deg, #f8f8f8, #e0e0e0, #d0d0d0);
  border: 3px solid #444;               /* borda escura para contraste */
  box-shadow: 
    inset 0 0 40px rgba(0,0,0,0.4),      /* sombra interna suave */
    inset 10px 10px 25px rgba(0,0,0,0.3), /* chanfro escuro */
    inset -10px -10px 25px rgba(255,255,255,0.6), /* luz branca oposta */
    0 0 20px rgba(0,0,0,0.6);            /* sombra externa */
  backface-visibility: hidden;
}

.face::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.35) 0%,
    rgba(255,255,255,0.15) 40%,
    transparent 65%
  );
  pointer-events: none;
  border-radius: 2px;
}

/* Posicionamento das faces */
.front  { transform: translateZ(80px); }
.back   { transform: rotateY(180deg) translateZ(80px); }
.right  { transform: rotateY( 90deg) translateZ(80px); }
.left   { transform: rotateY(-90deg) translateZ(80px); }
.top    { transform: rotateX( 90deg) translateZ(80px); }
.bottom { transform: rotateX(-90deg) translateZ(80px); }