/* ============================================
   ESTILOS PARA CUBO 3D INTERACTIVO
   ============================================ */

/* Escena 3D del cubo */
.scene {
    width: 280px;
    height: 280px;
    perspective: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 20;
}

@media (min-width: 768px) {
    .scene { 
        width: 350px; 
        height: 350px; 
    }
}

/* Cubo 3D principal */
.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transform: translateZ(-175px);
    transition: transform 0.1s linear;
    cursor: grab;
}

.cube:active {
    cursor: grabbing;
}

/* Caras del cubo */
.cube__face {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.85);
    border: 2px solid rgba(0, 231, 255, 0.5);
    line-height: 100%;
    color: white;
    text-align: center;
    font-weight: bold;
    font-size: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backface-visibility: visible;
    box-shadow: 0 0 30px rgba(0, 231, 255, 0.15) inset;
    backdrop-filter: blur(8px);
    border-radius: 16px;
}

/* Patrón de cuadrícula en las caras para simular partes de Rubik */
.cube__face::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(0, 231, 255, 0.2) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 231, 255, 0.2) 1px, transparent 1px);
    background-size: 33.33% 33.33%; /* Cuadrícula 3x3 */
    pointer-events: none;
    border-radius: 14px;
    z-index: -1;
}

/* Transformaciones de cada cara del cubo */
.cube__face--front  { 
    transform: rotateY(  0deg) translateZ(140px); 
    border-color: #00e7ff; /* Electric Cyan */
}

.cube__face--right  { 
    transform: rotateY( 90deg) translateZ(140px); 
    border-color: #8b5cf6; /* Purple */
}

.cube__face--back   { 
    transform: rotateY(180deg) translateZ(140px); 
    border-color: #ef4444; /* Red */
}

.cube__face--left   { 
    transform: rotateY(-90deg) translateZ(140px); 
    border-color: #22c55e; /* Green */
}

.cube__face--top    { 
    transform: rotateX( 90deg) translateZ(140px); 
    border-color: #eab308; /* Yellow */
}

.cube__face--bottom { 
    transform: rotateX(-90deg) translateZ(140px); 
    border-color: #f8fafc; /* White/Light */
}

/* Media query para tablets y desktop */
@media (min-width: 768px) {
    .cube__face--front  { transform: rotateY(  0deg) translateZ(175px); }
    .cube__face--right  { transform: rotateY( 90deg) translateZ(175px); }
    .cube__face--back   { transform: rotateY(180deg) translateZ(175px); }
    .cube__face--left   { transform: rotateY(-90deg) translateZ(175px); }
    .cube__face--top    { transform: rotateX( 90deg) translateZ(175px); }
    .cube__face--bottom { transform: rotateX(-90deg) translateZ(175px); }
}

/* Contenedor de iconos en las caras */
.face-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 0 20px rgba(255,255,255,0.05);
}

