* { box-sizing: border-box; }

html, body { width: 100%; height: 100%; margin: 0; }

body {
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #18202f;
}

button { font: inherit; }

.container { width: 100%; height: 100%; display: flex; overflow: hidden; }

.left {
    width: 280px;
    min-width: 280px;
    height: 100%;
    background: #f8fafc;
    border-right: 1px solid #dfe4ec;
    display: flex;
    flex-direction: column;
    box-shadow: 5px 0 18px rgba(22, 34, 51, 0.06);
    position: relative;
    z-index: 2;
}

.toolbar-header {
    min-height: 76px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border-bottom: 1px solid #e6eaf0;
}

.toolbar-header h1 { font-size: 15px; line-height: 1.2; margin: 0 0 3px; font-weight: 700; letter-spacing: -0.01em; }
.toolbar-header p { font-size: 11px; color: #8992a3; margin: 0; }

.app-mark { width: 38px; height: 38px; border-radius: 11px; background: #5668e8; position: relative; box-shadow: 0 6px 14px rgba(86, 104, 232, .25); }
.app-mark span { width: 7px; height: 7px; position: absolute; background: white; border-radius: 2px; }
.app-mark span:nth-child(1) { left: 8px; top: 8px; }
.app-mark span:nth-child(2) { right: 8px; top: 8px; }
.app-mark span:nth-child(3) { left: 15px; bottom: 8px; }
.app-mark::before, .app-mark::after { content: ""; position: absolute; background: rgba(255,255,255,.65); height: 1px; transform-origin: left; }
.app-mark::before { width: 15px; left: 11px; top: 12px; }
.app-mark::after { width: 13px; left: 11px; top: 15px; transform: rotate(57deg); }

.toolbar-scroll { flex: 1; overflow-y: auto; padding: 4px 16px 20px; }
.tool-section { padding: 16px 0; border-bottom: 1px solid #e5e9ef; }
.tool-section:last-child { border-bottom: 0; }
.tool-section h2 { margin: 0 0 10px; color: #7c8698; font-size: 10px; line-height: 1; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }

.block-list { display: grid; gap: 6px; }
.block-tool {
    width: 100%; min-height: 40px; padding: 6px 10px; border: 1px solid transparent; border-radius: 9px;
    display: grid; grid-template-columns: 28px 1fr 20px; align-items: center; gap: 9px;
    background: transparent; color: #313b4c; text-align: left; font-size: 12px; font-weight: 600; cursor: pointer;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.block-tool:hover { background: #fff; border-color: #dfe4ec; box-shadow: 0 3px 10px rgba(31, 42, 59, .05); transform: translateX(2px); }
.block-tool:focus-visible, .tool-button:focus-visible, .icon-button:focus-visible, .zoom-label:focus-visible { outline: 3px solid rgba(86, 104, 232, .23); outline-offset: 1px; }
.add-icon { color: #a0a8b6; font-size: 17px; font-weight: 400; text-align: right; }
.block-tool:hover .add-icon { color: #5668e8; }

.block-icon { width: 26px; height: 20px; display: grid; place-items: center; border: 2px solid #6f7ff0; background: #eef0ff; color: #5668e8; font-size: 9px; font-weight: 800; }
.block-icon--read { border-radius: 10px; }
.block-icon--expression { border-radius: 4px; }
.block-icon--decision { width: 19px; height: 19px; margin-left: 3px; transform: rotate(45deg); border-radius: 3px; }
.block-icon--write { transform: skew(-13deg); border-radius: 3px; }
.block-icon--intersection { width: 20px; height: 20px; margin-left: 3px; border-radius: 50%; position: relative; }
.block-icon--intersection::before, .block-icon--intersection::after { content: ""; position: absolute; background: #6f7ff0; }
.block-icon--intersection::before { width: 2px; height: 24px; left: 7px; top: -4px; }
.block-icon--intersection::after { width: 24px; height: 2px; left: -4px; top: 7px; }

.button-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.button-grid--execution { grid-template-columns: 1fr 1fr; }
.tool-button {
    min-height: 36px; padding: 7px 9px; border: 1px solid #dce1e9; border-radius: 8px; background: #fff;
    color: #3d4757; display: flex; align-items: center; justify-content: center; gap: 7px;
    font-size: 11px; font-weight: 650; cursor: pointer; box-shadow: 0 1px 2px rgba(23, 32, 47, .04);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.tool-button:hover:not(:disabled) { border-color: #bfc7d5; box-shadow: 0 3px 8px rgba(23, 32, 47, .08); transform: translateY(-1px); }
.tool-button--primary { background: #5668e8; border-color: #5668e8; color: white; box-shadow: 0 4px 10px rgba(86, 104, 232, .22); }
.tool-button--primary:hover:not(:disabled) { border-color: #4859d5; background: #4f60dd; }
.tool-button--danger { color: #d34b57; }
.tool-button:disabled, .icon-button:disabled, .zoom-label:disabled { opacity: .42; cursor: not-allowed; box-shadow: none; }
.control-icon { width: 15px; font-size: 11px; line-height: 1; text-align: center; }

.segmented-control { height: 36px; display: grid; grid-template-columns: 38px 1fr 38px; border: 1px solid #dce1e9; border-radius: 8px; overflow: hidden; background: #fff; margin-bottom: 8px; }
.segmented-control button { border: 0; background: #fff; color: #414b5c; cursor: pointer; }
.segmented-control button:hover { background: #f1f3f7; }
.icon-button { font-size: 19px; }
.zoom-label { border-left: 1px solid #e1e5ec !important; border-right: 1px solid #e1e5ec !important; font-size: 10px; font-weight: 650; }
.align-grid .tool-button { padding-left: 6px; padding-right: 6px; }
.align-icon { width: 17px; height: 14px; position: relative; display: inline-block; background: linear-gradient(#778196,#778196) center/1px 100% no-repeat; }
.align-icon::before, .align-icon::after { content: ""; position: absolute; height: 3px; background: #778196; border-radius: 1px; }
.align-icon::before { width: 13px; top: 2px; left: 2px; }
.align-icon::after { width: 9px; bottom: 2px; left: 4px; }
.align-icon--horizontal { transform: rotate(90deg); }

.output-panel {
    position: fixed;
    right: 22px;
    top: 22px;
    z-index: 4;
    width: min(420px, calc(100vw - 324px));
    padding: 14px;
    border: 1px solid rgba(208, 215, 225, .9);
    border-radius: 12px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 12px 32px rgba(23, 32, 47, .14);
    backdrop-filter: blur(10px);
    min-width: 280px;
    min-height: 145px;
    display: flex;
    flex-direction: column;
    transition: width .2s ease, bottom .2s ease, box-shadow .2s ease;
}
.output-resize-handle {
    position: absolute;
    touch-action: none;
    z-index: 2;
}
.output-resize-handle--n { top: -5px; left: 10px; right: 10px; height: 10px; cursor: ns-resize; }
.output-resize-handle--e { top: 10px; right: -5px; bottom: 10px; width: 10px; cursor: ew-resize; }
.output-resize-handle--s { bottom: -5px; left: 10px; right: 10px; height: 10px; cursor: ns-resize; }
.output-resize-handle--w { top: 10px; left: -5px; bottom: 10px; width: 10px; cursor: ew-resize; }
.output-resize-handle--ne { top: -6px; right: -6px; width: 16px; height: 16px; cursor: nesw-resize; }
.output-resize-handle--se { right: -6px; bottom: -6px; width: 16px; height: 16px; cursor: nwse-resize; }
.output-resize-handle--sw { bottom: -6px; left: -6px; width: 16px; height: 16px; cursor: nesw-resize; }
.output-resize-handle--nw { top: -6px; left: -6px; width: 16px; height: 16px; cursor: nwse-resize; }
body.output-resizing, body.output-moving { user-select: none; }
body.output-resizing .output-panel { transition: bottom .2s ease, box-shadow .2s ease; }
.output-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; cursor: move; touch-action: none; }
.output-title { display: flex; align-items: center; gap: 8px; }
.output-heading h2 { margin: 0; color: #313b4c; font-size: 12px; line-height: 1; font-weight: 700; }
.output-terminal-icon { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 7px; background: #eef0ff; color: #5668e8; font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.output-status { display: flex; align-items: center; gap: 7px; color: #8992a3; font-size: 10px; font-weight: 600; }
.status-dot { width: 7px; height: 7px; background: #38b876; border-radius: 50%; box-shadow: 0 0 0 3px rgba(56,184,118,.12); }
.div_output { flex: 1; min-height: 82px; max-height: 190px; overflow: auto; padding: 11px; border: 1px solid #dce1e9; border-radius: 8px; background: #f8fafc; color: #273243; font: 11px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
.output-placeholder { color: #a0a8b6; font-family: Inter, ui-sans-serif, sans-serif; }
body.output-running .output-panel,
body.output-stepping .output-panel {
    bottom: 22px;
    width: min(560px, calc(100vw - 324px));
    display: flex;
    flex-direction: column;
    box-shadow: 0 16px 42px rgba(23, 32, 47, .18);
}
body.output-running .div_output,
body.output-stepping .div_output {
    flex: 1;
    min-height: 0;
    max-height: none;
}
.output-panel.output-user-adjusted { right: auto; bottom: auto !important; transition: box-shadow .2s ease; }
.output-panel.output-user-adjusted .div_output { max-height: none; }
body.output-running .status-dot { animation: output-pulse 1.2s ease-in-out infinite; }
@keyframes output-pulse { 50% { opacity: .45; transform: scale(.8); } }
.right {
    flex: 1;
    min-width: 0;
    height:100%;
    background:rgb(255, 255, 255);
    overflow:scroll;
    position: relative;
}

@media (max-width: 700px) {
    .left { width: 240px; min-width: 240px; }
    .output-panel { right: 14px; top: 14px; width: calc(100vw - 282px); }
    body.output-running .output-panel,
    body.output-stepping .output-panel { bottom: 14px; width: calc(100vw - 282px); }
}

.gfx_holder {
    width:2000;
    height:2000;
    position: relative;
    background:rgb(228, 228, 228);
    border:1px solid green;
}

.flowchartInfo {
    height: auto;
    width: auto;
    background-color: aqua;
}

.output_value {
    background: #e9f8ef;
    border: 1px solid #a8dfbf;
    border-radius: 4px;
    padding: 1px 4px;
}
