/* --- ESTILOS PARA EL JUEGO COMPLETO DE DADOS --- */

/* Contenedor Principal */
#full-game-dados {
    background-color: #000;
    position: relative;
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
}

/* Canvas Efecto */
#tech-background {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
    opacity: 0.7;
    pointer-events: none;
}
#tech-background canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Títulos y Textos */
#full-game-dados h2 {
    color: #ffffff;
    position: relative; z-index: 10;
    font-family: 'Poppins', sans-serif;
}

#full-game-dados h2 .text-gradient {
    background-image: linear-gradient(45deg, #ff3d00, #E11D48);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

#full-game-dados .text-muted-foreground {
    color: rgba(255, 255, 255, 0.7) !important;
    position: relative; z-index: 10;
    font-family: 'Poppins', sans-serif;
}

/* --- ESCENA 3D (Juego Completo) --- */
.scene {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem 2.5rem;
    margin: 1.2rem 0;
    perspective: 800px;
    position: relative; z-index: 10;
}

.scene .label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    text-shadow: 0 0 5px rgba(225, 29, 72, 0.5);
    margin-bottom: 0.5rem;
    font-family: 'Poppins', sans-serif;
}

.cube-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

.cube {
    width: 64px;
    height: 64px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 2s cubic-bezier(0.25, 1, 0.5, 1);
}

.face {
    position: absolute;
    width: 64px;
    height: 64px;
    background-color: rgba(255, 255, 255, 0.95);
    border: 1px solid #ddd;
    border-radius: 10px;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    box-shadow: 0 0 12px 2px rgba(255, 255, 255, 0.6);
}

/* Caras específicas - Rutas relativas para portabilidad */
.front  { transform: translateZ(32px); background-image: url('./faces/dice-1.svg'); }
.back   { transform: rotateY(180deg) translateZ(32px); background-image: url('./faces/dice-6.svg'); }
.right  { transform: rotateY(90deg) translateZ(32px); background-image: url('./faces/dice-2.svg'); }
.left   { transform: rotateY(-90deg) translateZ(32px); background-image: url('./faces/dice-5.svg'); }
.top    { transform: rotateX(90deg) translateZ(32px); background-image: url('./faces/dice-3.svg'); }
.bottom { transform: rotateX(-90deg) translateZ(32px); background-image: url('./faces/dice-4.svg'); }

/* --- BOTONES --- */
#full-game-dados .btn-roll,
#result-modal .btn-roll {
    font-family: 'Poppins', sans-serif !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    background: rgba(0, 0, 0, 0.6) !important;
    border: 3px solid #d946ef !important;
    color: #d946ef !important;
    padding: 0.8rem 2.5rem !important;
    border-radius: 50px !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.6rem !important;
    text-decoration: none !important;
    position: relative !important;
    z-index: 10 !important;
    box-shadow: 0 0 15px rgba(217, 70, 239, 0.2) !important;
    margin-top: 1.5rem !important;
    height: auto !important;
    width: auto !important;
}

#full-game-dados .btn-roll:hover,
#result-modal .btn-roll:hover {
    background: linear-gradient(135deg, #c026d3, #e11d48) !important;
    border-color: transparent !important;
    color: white !important;
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 0 30px rgba(217, 70, 239, 0.6) !important;
}

#full-game-dados .btn-roll:disabled {
    border-color: #555 !important;
    color: #888 !important;
    background: rgba(0,0,0,0.8) !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
}

/* Controles de Juego (Volver y Sonido) */
.game-controls {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.btn-back {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.9rem;
    font-family: 'Poppins', sans-serif;
    transition: color 0.3s ease;
}

.btn-back:hover {
    color: white;
}

.btn-sound {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.7);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-sound:hover {
    color: white;
    border-color: white;
    background: rgba(255,255,255,0.1);
}

/* --- MODAL DE RESULTADOS (CONTENIDO ESPECÍFICO) --- */

/* Refuerzo para asegurar que el modal se vea sobre el canvas 3D */
#result-modal {
    z-index: 9999 !important; /* Prioridad máxima */
}

#result-modal .modal-content {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 1rem; /* Añadido padding interno */
    width: 100%;
    max-width: 360px; /* Ligeramente más ancho */
    text-align: center;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    /* Animación de entrada */
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.2s ease;

    /* Scroll si es necesario */
    max-height: 90vh; /* Altura máxima del 90% de la ventana */
    overflow-y: auto; /* Scroll vertical automático */
    scrollbar-width: thin; /* Scrollbar fino para Firefox */
    scrollbar-color: rgba(255,255,255,0.3) transparent;
}

/* Estilo scrollbar Webkit (Chrome, Safari) */
#result-modal .modal-content::-webkit-scrollbar {
    width: 6px;
}
#result-modal .modal-content::-webkit-scrollbar-track {
    background: transparent;
}
#result-modal .modal-content::-webkit-scrollbar-thumb {
    background-color: rgba(255,255,255,0.3);
    border-radius: 20px;
}

#result-modal.active .modal-content {
    transform: scale(1);
    opacity: 1;
}


/* Botón cerrar modal */
#result-modal .btn-close-modal {
    position: absolute;
    top: 0; /* Ajustado para estar dentro del flujo visual si hay scroll */
    right: 0;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.5rem; /* Margen para separarlo del borde */
}

#result-modal .btn-close-modal:hover {
    color: white;
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

.modal-title-challenge {
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 1.5rem 0 1rem 0; /* Margen superior extra para el botón de cerrar */
    width: 100%;
    font-family: 'Poppins', sans-serif;
    color: white;
}

.result-items-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

.result-item {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.8rem 1rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    backdrop-filter: blur(5px);
    width: 100%;
    box-sizing: border-box;
}

.result-item i {
    font-size: 1.3rem;
    color: #d946ef;
    min-width: 24px;
    text-align: center;
}

.result-item span {
    font-size: 1.05rem;
    font-weight: 500;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    color: white;
}

/* Texto resumen rediseñado */
.summary-text {
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    text-shadow: 0 1px 5px rgba(0,0,0,0.5);
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 1.2rem;
    margin-top: 0;
    width: 100%;
    font-family: 'Poppins', sans-serif;
    text-align: center; /* Centrado */
    color: rgba(255, 255, 255, 0.95);
    display: block; /* Bloque normal para texto corrido */
}

/* Estilo para las partes destacadas dentro del texto corrido */
.summary-highlight {
    color: #f472b6; /* Un rosa claro para destacar */
    font-weight: 600;
}

.summary-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
    padding-bottom: 1rem; /* Espacio final */
}

.summary-actions .btn-roll {
    font-size: 1rem;
    padding: 0.9rem 2rem;
    margin-top: 0 !important;
    width: 100% !important;
    background: transparent !important;
    border: 2px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 50px !important;
    color: white !important;
    box-shadow: none !important;
    justify-content: center !important;
}

.summary-actions .btn-roll:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: white !important;
    transform: translateY(-2px) !important;
}
