/* ---- Cài đặt cơ bản ---- */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ---- Header Toolbar ---- */
.toolbar {
    display: flex;
    align-items: center;
    padding: 5px 10px;
    background-color: #3c3c3c;
    color: white;
    border-bottom: 1px solid #2a2a2a;
    flex-shrink: 0; /* Không co lại */
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-right: 20px;
}

.toolbar button, .toolbar select {
    background-color: #555;
    color: white;
    border: 1px solid #666;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}
.toolbar button:hover {
    background-color: #6a6a6a;
}
#compile-btn {
    background-color: #007acc;
    font-weight: bold;
}
#compile-btn:disabled {
    background-color: #555;
    cursor: not-allowed;
}

/* ---- Main Content Area ---- */
.main-container {
    display: flex;
    flex-grow: 1; /* Chiếm hết không gian còn lại */
    overflow: hidden;
}

.editor-pane, .pdf-pane {
    flex: 1;
    overflow: auto;
    height: 100%;
}
.editor-pane {
    display: flex;
}
#monaco-editor {
    width: 100%;
    height: 100%;
}
.pdf-pane {
    background-color: #525659;
}
#pdf-preview {
    width: 100%;
    height: 100%;
    border: none;
}
.error-log {
    white-space: pre-wrap;
    font-family: "Courier New", Courier, monospace;
    color: #ffcccc;
    background-color: #1e1e1e;
    padding: 20px;
    height: 100%;
    box-sizing: border-box;
}

.resizer {
    width: 5px;
    background-color: #333;
    cursor: col-resize;
    flex-shrink: 0;
}

/* ---- Footer Panel ---- */
.footer-panel {
    background-color: #252526;
    color: #ccc;
    border-top: 1px solid #333;
    flex-shrink: 0;
    transition: all 0.2s ease-in-out;
}
.footer-handle {
    padding: 5px 10px;
    background-color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
}
.footer-handle span {
    font-weight: bold;
    margin-right: auto;
}
.footer-content {
    display: none; /* Mặc định ẩn */
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}
.footer-panel.expanded .footer-content {
    display: flex;
}
.helper-group {
    display: flex;
    align-items: center;
    gap: 5px;
}
.helper-group-title {
    font-weight: bold;
    font-size: 13px;
    margin-right: 5px;
}
.helper-btn {
    background-color: #444;
    border: 1px solid #555;
    color: #ddd;
    border-radius: 3px;
    padding: 4px 8px;
    cursor: pointer;
}
.helper-btn:hover {
    background-color: #5a5a5a;
}

/* ... (toàn bộ CSS cũ của bạn) ... */

/* ================== STYLE CHO MODAL ================== */
.modal {
    display: none; /* Mặc định ẩn */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fefefe;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 500px;
}

.modal-content header {
    padding: 15px;
    font-size: 1.2em;
    font-weight: bold;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-button {
    cursor: pointer;
    font-size: 1.5em;
    color: #aaa;
}
.close-button:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.modal-body label {
    display: flex;
    align-items: center;
    gap: 10px;
}
.modal-body select, .modal-body input {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.modal-body button {
    padding: 10px;
    font-size: 1em;
    background-color: #007acc;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.generated-id {
    display: none; /* Hiện ra sau khi tạo ID */
}
