* { box-sizing: border-box; }

body {
    margin: 0;
    height: 100vh;
    overflow: hidden;
    font-family: Segoe UI, sans-serif;
    background: #1e1e1e;
    color: white;
}

.topbar {
    height: 50px;
    background: #0078d7;
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 10px;
    font-weight: bold;
}

.topbar button,
.projectbar button {
    padding: 6px 10px;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

.topbar input {
    padding: 6px;
    border: none;
    outline: none;
    font-weight: bold;
    min-width: 180px;
}

.container {
    display: flex;
    height: calc(100vh - 50px);
    width: 100% !important;
    padding: 0px !important;
    max-width: 100% !important;
}

.editor {
    max-width: calc(100% - 310px);
    width: calc(100% - 310px);
}

.editor-panel {
    width: 50%;
    flex: 1;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #333;
}

.output-panel {
    width: 50%;
    flex: 1;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #333;
}

.project-panel {
    width: 310px;
    background: #252526;
    display: flex;
    flex-direction: column;
}

.project-title {
    padding: 10px;
    font-weight: bold;
    background: #2d2d30;
    border-bottom: 1px solid #333;
}

.projectbar {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-bottom: 1px solid #333;
}

.project-tree {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
    font-family: Consolas, monospace;
    font-size: 14px;
}

.tree-item {
    padding: 4px 6px;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    border-radius: 3px;
}

.tree-item:hover { background: #333; }
.tree-item.active { background: #0078d7; }
.folder { font-weight: bold; color: #dcdcaa; }
.folder-children { margin-left: 16px; }

#editor { flex: 1; }

#output {
    flex: 1;
    background: #111;
    padding: 10px;
    overflow-y: auto;
    font-family: Consolas, monospace;
}

.panel-label {
    height: 28px;
    background: #2d2d30;
    padding: 5px 10px;
    font-size: 13px;
    border-bottom: 1px solid #333;
}

.stdout { color: #dcdcaa; }
.stderr { color: #f48771; }
.status { margin-left: auto; font-size: 12px; opacity: 0.9; }

.context-menu {
    position: fixed;
    z-index: 9999;
    min-width: 210px;
    background: #2d2d30;
    border: 1px solid #555;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    display: none;
    font-size: 13px;
}

.context-menu-item {
    padding: 8px 10px;
    cursor: pointer;
    color: white;
}

.context-menu-item:hover { background: #0078d7; }
.context-menu-separator { height: 1px; background: #555; margin: 4px 0; }
.context-menu-danger:hover { background: #c42b1c; }