body {
    margin: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #1a1a1a;
    overflow: hidden;
    font-family: 'Segoe UI', sans-serif;
}

#toolbar {
    height: 50px;
    background: #2d2d2d;
    border-bottom: 3px solid #000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    z-index: 1000;
    flex-shrink: 0;
}

.tool-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo {
    color: #6da25c;
    font-weight: bold;
    margin-right: 10px;
    font-size: 18px;
}

.divider {
    width: 2px;
    height: 25px;
    background: #444;
    margin: 0 5px;
}

input,
select {
    padding: 6px 10px;
    background: #111;
    color: #0f0;
    border: 1px solid #444;
    font-family: monospace;
    font-size: 14px;
    outline: none;
    border-radius: 4px;
}

button {
    padding: 7px 12px;
    cursor: pointer;
    background: #444;
    border: 2px solid #000;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 11px;
    transition: all 0.2s;
    border-radius: 4px;
}

button:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(1.2);
}

button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.btn-blue {
    background: #3498db;
}

.btn-orange {
    background: #e67e22;
}

.btn-red {
    background: #c0392b;
}

.btn-run {
    background: #2ecc71;
    color: #000;
    min-width: 100px;
}

.btn-step {
    background: #3498db;
}

.btn-purple {
    background: #9b59b6;
    display: none;
}

.btn-stop {
    background: #e74c3c;
}

.btn-gray {
    background: #95a5a6;
    color: #000;
}

#main-wrapper {
    display: flex;
    flex-grow: 1;
    width: 100%;
    height: calc(100vh - 50px);
}

/* ИЗМЕНЕНО: Ширина 40% для редактора кода */
#blocklyDiv {
    width: 40%;
    height: 100%;
    background-image: url('assets/ui_bg.png');
    background-size: 64px;
    image-rendering: pixelated;
}

#resizer {
    width: 12px;
    cursor: col-resize;
    background: #222;
    border-left: 2px solid #000;
    border-right: 2px solid #000;
    z-index: 10;
    flex-shrink: 0;
}

#resizer:hover {
    background: #6da25c;
}

#resize-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    cursor: col-resize;
}

/* Карта занимает оставшиеся 60% */
#canvas-container {
    flex-grow: 1;
    height: 100%;
    position: relative;
    background: #78a7ff;
    overflow: hidden;
}

#console-log {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.85);
    padding: 12px 20px;
    border: 2px solid #555;
    color: #00ff00;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    z-index: 100;
    pointer-events: none;
}

.blocklySelected>.blocklyPath {
    stroke: #fff !important;
    stroke-width: 4px !important;
}

.blocklyBreakpoint>.blocklyPath {
    fill: #640000 !important;
}