body {
    background-color: #0d1117;
    color: #c9d1d9;
    font-family: 'Courier New', Courier, monospace;
    display: flex;
    flex-direction: row;
    height: 100vh;
    margin: 0;
    overflow: hidden;
}

/* PANEL IZQUIERDO: Blockly */
#panel-izquierdo {
    width: 50%;
    display: flex;
    flex-direction: column;
    border-right: 2px solid #30363d;
    background-color: #161b22;
}

#blockly-container {
    flex-grow: 1;
    position: relative;
}

.barra-herramientas {
    padding: 15px;
    background-color: #0d1117;
    border-bottom: 1px solid #30363d;
    display: flex;
    gap: 10px;
}

/* PANEL DERECHO: Motor Phaser */
#panel-derecho {
    width: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #010409;
    position: relative;
}

#game-container {
    border: 2px solid #30363d;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(46, 160, 67, 0.15);
    overflow: hidden;
}

button {
    background-color: #238636;
    color: #ffffff;
    border: 1px solid #2ea043;
    padding: 12px 20px;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    cursor: pointer;
    border-radius: 6px;
    transition: 0.2s;
}

button:hover {
    background-color: #2ea043;
}

button:disabled {
    background-color: #444;
    color: #888;
    border-color: #555;
    cursor: not-allowed;
}

/* El div #consola fue removido según la nueva disposición */

/* Estilos del Tooltip/Globito del personaje */
.tooltip {
    font-family: Arial, sans-serif;
    font-size: 14px;
    background-color: white;
    color: black;
    padding: 5px 10px;
    border-radius: 10px;
    border: 2px solid black;
}

/* ==========================================
   ESTILOS PERSONALIZADOS DE BLOCKLY
   ========================================== */

/* Forzar fondo del espacio de trabajo para que coincida con el estilo */
.blocklySvg {
    background-color: #f5f5f5 !important;
}

/* Arreglar el fondo y contraste del Toolbox */
.blocklyToolboxDiv {
    background-color: #30363d !important;
    /* Fondo oscuro acorde al diseño */
}

.blocklyTreeLabel {
    color: #ffffff !important;
    /* Letras blancas para contraste */
    font-family: 'Courier New', Courier, monospace;
    /* Opcional: tipografía */
}

.blocklyTreeRow:hover {
    background-color: #444c56 !important;
    /* Efecto hover en el menú */
}


/* ==========================================
   MODAL DE RESULTADOS
   ========================================== */
#modal-resultado {
    display: none;
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(1, 4, 9, 0.85);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

#modal-content {
    background-color: #161b22;
    border: 2px solid #30363d;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    max-width: 80%;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
}

#modal-titulo {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 15px;
    font-family: 'Courier New', Courier, monospace;
}

#modal-mensaje {
    font-size: 18px;
    margin-bottom: 20px;
    color: #c9d1d9;
    white-space: pre-line; /* Respeta los saltos de línea */
}