body {
    margin: 0;
    overflow: hidden;
    background-color: #111;
    color: #eee;
    font-family: sans-serif;
    font-size: 12px;
}

#log-overlay {
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: 400px;
    height: 200px;
    background-color: rgba(0, 0, 0, 0.7);
    border: 1px solid #444;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    pointer-events: none;
    pointer-events: auto;
}

#log-header {
    background-color: #333;
    padding: 2px 4px;
    font-size: 1em;
    font-weight: bold;
    border-bottom: 1px solid #444;
    cursor: move;
}

#log-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 2px;
    font-family: monospace;
    font-size: 0.9em;
    white-space: pre-wrap;
}

.log-info {
    color: #eee;
}

.log-warn {
    color: #fc0;
}

.log-error {
    color: #f33;
}

.log-debug {
    color: #888;
}

/* GUI Menu */
/* GUI Sidebar */
#gui-sidebar {
    position: absolute;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    background-color: rgba(30, 30, 30, 0.95);
    border-right: 1px solid #444;
    padding: 2px;
    /* Ultra compact */
    box-sizing: border-box;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    z-index: 10;
}

#gui-resizer {
    position: absolute;
    top: 0;
    left: 250px;
    width: 5px;
    height: 100vh;
    background-color: #222;
    border-left: 1px solid #444;
    border-right: 1px solid #444;
    cursor: col-resize;
    z-index: 11;
}

#gui-resizer:hover {
    background-color: #555;
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 255px;
    width: calc(100vw - 255px);
    height: 100vh;
    display: block;
}

.gui-section {
    margin-bottom: 4px;
    /* Ultra compact */
    padding-bottom: 2px;
    border-bottom: 1px solid #444;
}

.gui-section-title {
    font-weight: bold;
    margin-bottom: 2px;
    color: #aaa;
    font-size: 0.9em;
    text-transform: uppercase;
}

.gui-row {
    display: flex;
    align-items: center;
    margin-bottom: 2px;
}

.gui-btn {
    background: #444;
    color: #eee;
    border: 1px solid #555;
    padding: 1px 6px;
    /* Ultra compact */
    margin-right: 2px;
    margin-bottom: 2px;
    cursor: pointer;
    font-size: 1em;
    border-radius: 2px;
    flex-grow: 1;
    text-align: center;
}

.gui-btn:hover {
    background: #555;
}

.gui-btn:active {
    background: #333;
}

.gui-input {
    background: #333;
    color: #eee;
    border: 1px solid #555;
    padding: 1px 3px;
    width: 100%;
    box-sizing: border-box;
    font-size: 1em;
}

.gui-checkbox-label {
    display: flex;
    align-items: center;
    font-size: 1em;
    cursor: pointer;
}

.gui-checkbox-label input {
    margin-right: 4px;
}

.gui-textarea {
    background: #333;
    color: #eee;
    border: 1px solid #555;
    padding: 2px;
    font-family: monospace;
    font-size: 0.9em;
    white-space: pre;
    overflow-x: auto;
}

.gui-log-output {
    background: #111;
    color: #0f0;
    font-family: monospace;
    font-size: 0.9em;
    height: 100px;
    overflow-y: auto;
    padding: 2px;
    border: 1px solid #444;
    margin-top: 2px;
    white-space: pre;
    overflow-x: auto;
}

/* Selection Box */
.selection-box {
    position: fixed;
    border: 1px solid rgba(255, 255, 0, 0.8);
    background-color: rgba(255, 255, 0, 0.2);
    display: none;
    pointer-events: none;
    z-index: 1000;
    top: 0;
    left: 0;
    will-change: transform, width, height;
}

#help-overlay {
    position: absolute;
    top: 50px;
    right: 10px;
    width: 300px;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid #555;
    padding: 8px;
    display: none;
    font-size: 1em;
    line-height: 1.2em;
}

#help-overlay h3 {
    margin-top: 0;
    border-bottom: 1px solid #444;
    padding-bottom: 4px;
    margin-bottom: 4px;
}

#help-overlay kbd {
    background: #444;
    padding: 1px 3px;
    border-radius: 2px;
    font-family: monospace;
}