/* =========================================================================
 * ESTILOS PARA EL "DUELO DEL OCASO DORADO" (VERSIÓN CORREGIDA Y ROBUSTA)
 * MODIFICADO: Ajustado el tamaño de las celdas y el espaciado para
 * igualar el layout del minijuego "Duelo Súper Premio".
 * ========================================================================= */

/* --- 1. ESTILOS BASE DEL MODAL (APLICA A TODAS LAS VISTAS) --- */
.modal--duel-game .modal__content {
    background: #111827; /* Negro/Azul muy oscuro */
    border: 2px solid #f59e0b; /* Borde Dorado/Naranja */
    box-shadow: 0 0 35px rgba(245, 158, 11, 0.5);
    color: #e5e7eb;
    padding: clamp(15px, 4vw, 25px);
    
    /* Por defecto, usamos una sola columna (para móvil vertical si el overlay fallara) */
    display: flex;
    flex-direction: column;
    gap: 20px;
    
    /* Limitamos el tamaño para que se vea bien en vertical */
    width: 90vw;
    max-width: 480px;
    max-height: 90vh;
}

.duel-game-panel {
    text-align: center;
    flex-shrink: 0; /* Evita que se encoja */
}

.duel-game-panel .modal__title {
    font-size: clamp(1.4rem, 5vh, 1.8rem);
    color: #ecc94b; /* Dorado */
    text-shadow: 0 0 10px #ecc94b;
    margin: 0;
}

.duel-game-panel .modal__instructions {
    font-size: clamp(0.9rem, 3vh, 1.1rem);
    color: #fd7e14; /* Naranja */
    margin-top: 1.5vh;
}

.duel-game-grid-area {
    flex-grow: 1; /* Ocupa el espacio restante */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

#budi-duel-game-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* 6 columnas flexibles */
    gap: clamp(8px, 2vw, 12px);
    width: 100%;
}

.duel-cell {
    aspect-ratio: 1 / 1; /* Mantiene las celdas cuadradas */
    background-color: #1f2937;
    border-radius: 6px;
    border: 1px solid rgba(245, 158, 11, 0.2);
    transition: all 0.2s ease;
}

/* --- 2. ESTILOS ESPECÍFICOS PARA VISTA HORIZONTAL (MÓVIL Y ESCRITORIO) --- */
@media (orientation: landscape) {
    .modal--duel-game .modal__content {
        flex-direction: row;
        gap: 25px;
        width: 95vw;
        max-width: 900px;
        padding: clamp(15px, 2vh, 25px);
        height: 80vh;
        align-items: center;
    }

    .duel-game-panel {
        flex: 0 0 35%;
        text-align: left;
    }

    .duel-game-grid-area {
        flex: 1 1 65%;
        padding: 1vh 0;
    }
    
    /* ===== INICIO DE LA MODIFICACIÓN ===== */
    #budi-duel-game-grid {
        grid-template-columns: repeat(6, max-content);
        gap: 1.5vh; /* Ajustado para igualar al otro juego */
        width: auto;
    }

    .duel-cell {
        width: 11vh;  /* Ajustado para igualar al otro juego */
        height: 11vh; /* Ajustado para igualar al otro juego */
    }
    /* ===== FIN DE LA MODIFICACIÓN ===== */
}

/* --- 3. ESTILOS DE INTERACCIÓN --- */
#budi-duel-game-grid.interactive .duel-cell {
    cursor: pointer;
}

#budi-duel-game-grid.interactive .duel-cell:hover {
    border-color: #fde047;
    transform: scale(1.05);
}

.duel-cell.lit {
    background-color: #fde047; /* Dorado */
    transform: scale(1.1);
    box-shadow: 0 0 25px #f59e0b; /* Resplandor Naranja/Dorado */
    border-color: #fff;
}

.duel-cell.correct {
    background-color: #84cc16 !important; /* Verde lima */
    transform: scale(1.05);
    border-color: #bef264;
}

.duel-cell.incorrect {
    background-color: #dc2626 !important; /* Rojo */
    animation: shake-reveal 0.5s ease;
}