:root {
    --bg-color: #1a1d21;
    --sidebar-bg: #23272e;
    --editor-bg: #16181c;
    --border-color: #3a5260;
    --text-color: #c8d3f5;
    --accent-color-yellow: #ffc700;
    --accent-color-blue: #0095ff;
    --accent-color-blue-active: #40a9ff;
}

body, html {
    margin: 0; padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    height: 100%;
    overflow: hidden;
}

#app-container { display: flex; height: 100vh; }
#sidebar { width: 250px; background-color: var(--sidebar-bg); border-right: 1px solid var(--border-color); display: flex; flex-direction: column;}
#main-content { flex-grow: 1; display: flex; flex-direction: column; }

/* Splitter styles */
.gutter { background-color: #2b303b; }
.gutter.gutter-horizontal { cursor: col-resize; }
.gutter.gutter-vertical { cursor: row-resize; }

#project-files-container { padding: 10px; flex-grow: 1; overflow-y: auto; }
#file-explorer .file, #file-explorer .dir { padding: 4px 8px; cursor: pointer; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#file-explorer .file:hover { background-color: var(--accent-color-blue); }
#file-explorer .dir { font-weight: bold; }

#editor-container { flex-grow: 1; display: flex; flex-direction: column; position: relative; }
#file-viewer-header { padding: 10px; background-color: var(--sidebar-bg); border-bottom: 1px solid var(--border-color); font-family: monospace; }
#code-editor { flex-grow: 1; border: none; }
#save-btn { position: absolute; bottom: 15px; right: 15px; width: auto; padding: 8px 16px; z-index: 10; background-color: var(--accent-color-blue); cursor: pointer; border: none; color: white; border-radius: 4px; }

#chat-container { display: flex; flex-direction: column; border-top: 1px solid var(--border-color); }
#chat-messages { flex-grow: 1; padding: 10px; overflow-y: auto; }
#chat-messages .message { margin-bottom: 10px; padding: 8px 12px; border-radius: 6px; white-space: pre-wrap; max-width: 90%; line-height: 1.5; }
#chat-messages .user { background-color: #2a2d31; align-self: flex-end; }
#chat-messages .ai { background-color: #3a3d41; align-self: flex-start; }
#chat-messages .system { background-color: transparent; color: #888; font-family: monospace; font-size: 0.9em; text-align: center; max-width: 100%;}
pre { background: #1e1e1e; padding: 10px; border-radius: 5px; white-space: pre-wrap; word-wrap: break-word; }

#chat-input-area { padding: 10px; border-top: 1px solid var(--border-color); }
.settings-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 10px; }
input, select, textarea, button { background-color: #3c3c3c; color: var(--text-color); border: 1px solid var(--border-color); border-radius: 4px; padding: 8px; width: 100%; box-sizing: border-box; }
#user-prompt { height: 60px; resize: vertical; }

/* --- ADDED/MODIFIED STYLES --- */
#chat-controls {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

#mode-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    flex-grow: 1; /* Allow mode buttons to take up available space */
}

#send-btn {
    flex-basis: 120px; /* Give the send button a fixed width */
    background-color: var(--accent-color-yellow);
    color: #1a1d21;
    font-weight: bold;
    cursor: pointer;
    border: none;
}

#send-btn:hover {
    filter: brightness(1.1);
}

.mode-btn { background-color: var(--accent-color-blue); cursor: pointer; border: none; }
.mode-btn:hover { background-color: var(--accent-color-blue-active); }
.mode-btn.active {
    background-color: var(--accent-color-yellow);
    color: #1a1d21;
    font-weight: bold;
    box-shadow: 0 0 8px var(--accent-color-yellow);
}
/* --- END OF CHANGES --- */

/* Debug Panel */
#debug-panel { position: fixed; bottom: 0; left: 0; width: 100%; height: 300px; background-color: #0c0d0e; border-top: 2px solid var(--accent-color-yellow); z-index: 100; display: none; flex-direction: column; padding: 10px; box-sizing: border-box; }
#debug-panel h3 { margin: 0 0 10px 0; color: var(--accent-color-yellow); }
#debug-log { flex-grow: 1; overflow-y: auto; font-family: monospace; font-size: 12px; white-space: pre; color: #aaa; }
#debug-toggle { position: fixed; bottom: 10px; left: 10px; z-index: 101; background: var(--accent-color-yellow); color: black; border: none; border-radius: 50%; width: 40px; height: 40px; cursor: pointer; font-size: 18px; }
