/* Cubo Mágico 3D - Styles */

.game-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.game-stats {
  display: flex;
  gap: 30px;
  margin-bottom: 20px;
}

.stat-box {
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 20px;
  border-radius: 16px;
  border: 1px solid var(--card-border);
  text-align: center;
}

.stat-box .label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-box strong {
  font-size: 24px;
  color: #fff;
}

/* 3D STAGE */
.cube-stage {
  perspective: 1500px;
  width: 100%;
  max-width: 400px;
  height: 400px;
  margin: 20px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  touch-action: none;
}

.cube-container {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: grab;
}

.cube-container:active {
  cursor: grabbing;
}

.cube {
  position: relative;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
}

/* CUBIE (Small individual cubes) */
.cubie {
  position: absolute;
  width: 50px;
  height: 50px;
  left: -25px; /* Offset half width */
  top: -25px;  /* Offset half height */
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
}

.face {
  position: absolute;
  width: 50px;
  height: 50px;
  border: 2px solid rgba(0, 0, 0, 0.4);
  border-radius: 6px;
  background: #111; /* Internal faces are dark */
  box-sizing: border-box;
}

/* Stickers */
.sticker {
  width: 100%;
  height: 100%;
  border-radius: 4px;
}

/* Colors with Premium Gradients */
.color-U { background: radial-gradient(circle at center, #ffffff, #e2e8f0); } /* White */
.color-D { background: radial-gradient(circle at center, #fbbf24, #d97706); } /* Yellow */
.color-F { background: radial-gradient(circle at center, #ef4444, #991b1b); } /* Red */
.color-B { background: radial-gradient(circle at center, #f97316, #c2410c); } /* Orange */
.color-L { background: radial-gradient(circle at center, #3b82f6, #1d4ed8); } /* Blue */
.color-R { background: radial-gradient(circle at center, #22c55e, #15803d); } /* Green */

/* Cubie faces positioning */
.face.front  { transform: rotateY(  0deg) translateZ(25px); }
.face.back   { transform: rotateY(180deg) translateZ(25px); }
.face.right  { transform: rotateY( 90deg) translateZ(25px); }
.face.left   { transform: rotateY(-90deg) translateZ(25px); }
.face.top    { transform: rotateX( 90deg) translateZ(25px); }
.face.bottom { transform: rotateX(-90deg) translateZ(25px); }

/* CONTROLS */
.game-controls {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: 400px;
}

.rotation-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.btn-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rotation-buttons button {
  width: 45px;
  height: 45px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
}

.rotation-buttons button:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.1);
}

.action-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.action-buttons button {
  padding: 12px 24px;
  border-radius: 100px;
  font-weight: 700;
  letter-spacing: 1px;
}

.instruction-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 24px;
  text-align: center;
}

.instruction-card .icon {
  font-size: 32px;
  margin-bottom: 16px;
}

.instruction-card h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.instruction-card p {
  font-size: 14px;
  color: var(--muted);
}
