/**
 * Copyright (c) 2014 The xterm.js authors. All rights reserved.
 * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
 * https://github.com/chjj/term.js
 * @license MIT
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * Originally forked from (with the author's permission):
 *   Fabrice Bellard's javascript vt100 for jslinux:
 *   http://bellard.org/jslinux/
 *   Copyright (c) 2011 Fabrice Bellard
 *   The original design remains. The terminal itself
 *   has been extended to include xterm CSI codes, among
 *   other features.
 */.xterm{cursor:text;position:relative;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:5}.xterm .xterm-helper-textarea{padding:0;border:0;margin:0;position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-5;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;inset:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm .xterm-scroll-area{visibility:hidden}.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{position:absolute;inset:0;z-index:10;color:transparent;pointer-events:none}.xterm .xterm-accessibility-tree:not(.debug) *::selection{color:transparent}.xterm .xterm-accessibility-tree{user-select:text;white-space:pre}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{text-decoration:double underline}.xterm-underline-3{text-decoration:wavy underline}.xterm-underline-4{text-decoration:dotted underline}.xterm-underline-5{text-decoration:dashed underline}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:overline underline}.xterm-overline.xterm-underline-2{text-decoration:overline double underline}.xterm-overline.xterm-underline-3{text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;position:absolute;top:0;right:0;pointer-events:none}.xterm-decoration-top{z-index:2;position:relative}:root{--bg: #0d0d0d;--bg1: #161616;--bg2: #1e1e1e;--border: #2d2d2d;--fg: #d4d4d4;--fg2: #888;--accent: #569cd6;--green: #6a9955;--yellow: #d7ba7d;--red: #f44747;--font: "Cascadia Code", "Fira Code", "JetBrains Mono", monospace}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{height:100%;background:var(--bg);color:var(--fg);font-family:var(--font);font-size:14px;overflow:hidden}#app{display:flex;flex-direction:column;height:100vh}#header{display:flex;align-items:center;justify-content:space-between;padding:8px 16px;border-bottom:1px solid var(--border);background:var(--bg1);flex-shrink:0}#header-left{display:flex;align-items:baseline;gap:16px}#header-left h1{font-size:16px;color:var(--accent)}#header-left p{font-size:12px;color:var(--fg2)}#header-right{display:flex;align-items:center;gap:16px}#source-link{color:var(--fg2);text-decoration:none;font-size:12px}#source-link:hover{color:var(--fg)}#status-badge{font-size:11px;padding:2px 8px;border:1px solid var(--border)}.status-running{color:var(--green);border-color:var(--green)!important}.status-exited{color:var(--yellow);border-color:var(--yellow)!important}.status-error{color:var(--red);border-color:var(--red)!important}.status-loading{color:var(--fg2)}#main{display:grid;grid-template-columns:240px 1fr 220px;grid-template-rows:1fr;flex:1;overflow:hidden}.pane-title{font-size:12px;color:var(--accent);padding:6px 10px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;flex-shrink:0;background:var(--bg1)}#examples-pane{display:flex;flex-direction:column;border-right:1px solid var(--border);overflow:hidden}#examples-list{flex:1;overflow-y:auto;padding:8px;display:flex;flex-direction:column;gap:8px}#examples-list::-webkit-scrollbar{width:6px}#examples-list::-webkit-scrollbar-track{background:var(--bg)}#examples-list::-webkit-scrollbar-thumb{background:var(--border)}.example-card{background:var(--bg2);border:1px solid var(--border);padding:8px;display:flex;flex-direction:column;gap:4px}.example-card:hover{border-color:#444}.example-title{font-size:12px;color:var(--fg);font-weight:700}.example-desc{font-size:11px;color:var(--fg2);line-height:1.4}.example-script{font-size:10px;color:var(--green);background:var(--bg);padding:6px;overflow-x:auto;white-space:pre;max-height:80px;overflow-y:auto;border:1px solid var(--border);line-height:1.5}.example-run-btn{align-self:flex-start;background:none;border:1px solid var(--border);color:var(--fg2);font-family:var(--font);font-size:11px;padding:2px 8px;cursor:pointer;margin-top:2px}.example-run-btn:hover{color:var(--fg);border-color:var(--accent)}.vfs-tag{color:var(--yellow);font-size:10px;font-weight:400}#terminal-pane{display:flex;flex-direction:column;min-height:0;overflow:hidden;border-right:1px solid var(--border)}#terminal-wrap{flex:1;min-height:0;overflow:hidden}#terminal{width:100%;height:100%}#terminal-footer{display:flex;align-items:center;justify-content:space-between;padding:4px 10px;border-top:1px solid var(--border);background:var(--bg1);font-size:11px;flex-shrink:0;min-height:26px}#restart-hint{color:var(--fg2)}#restart-btn{background:none;border:1px solid var(--border);color:var(--fg2);font-family:var(--font);font-size:11px;padding:2px 8px;cursor:pointer}#restart-btn:hover{color:var(--fg);border-color:var(--accent)}.hidden{display:none!important}#right-pane{display:flex;flex-direction:column;overflow:hidden}#vfs-section{display:flex;flex-direction:column;border-bottom:1px solid var(--border);overflow:hidden}#info-section{display:flex;flex-direction:column;flex:1;overflow:hidden}#right-pane .pane-title button{background:none;border:1px solid var(--border);color:var(--fg2);font-family:var(--font);font-size:10px;padding:1px 6px;cursor:pointer}#right-pane .pane-title button:hover{color:var(--fg)}#vfs-tree{flex:1;overflow-y:auto;padding:6px 0;font-size:12px}#vfs-tree::-webkit-scrollbar{width:6px}#vfs-tree::-webkit-scrollbar-track{background:var(--bg)}#vfs-tree::-webkit-scrollbar-thumb{background:var(--border)}#commands-info{flex:1;overflow-y:auto;padding:8px;display:flex;flex-direction:column;gap:8px}#commands-info::-webkit-scrollbar{width:6px}#commands-info::-webkit-scrollbar-track{background:var(--bg)}#commands-info::-webkit-scrollbar-thumb{background:var(--border)}.cmd-group{display:flex;flex-direction:column;gap:3px}.cmd-group-label{font-size:10px;color:var(--accent);text-transform:uppercase;letter-spacing:.05em}.cmd-list{font-size:10px;color:var(--fg2);line-height:1.6;word-break:break-word}.info-link{color:var(--fg2);text-decoration:none}.info-link:hover{color:var(--fg)}.vfs-row{display:flex;align-items:center;gap:4px;padding:1px 4px;line-height:1.6;white-space:nowrap}.vfs-icon{color:var(--fg2);font-size:10px;min-width:10px}.vfs-dir{color:var(--accent)}.vfs-file{color:var(--fg)}.vfs-size{color:var(--fg2);font-size:10px;margin-left:auto;padding-left:8px}.vfs-empty{color:var(--fg2);padding:8px 10px;font-size:12px}#loading-overlay{position:fixed;inset:0;background:var(--bg);display:flex;align-items:center;justify-content:center;z-index:100;transition:opacity .3s}#loading-content{display:flex;flex-direction:column;align-items:center;gap:16px;width:320px}#loading-title{font-size:24px;color:var(--accent)}#loading-msg{font-size:13px;color:var(--fg2)}#loading-bar{width:100%;height:2px;background:var(--border)}#loading-progress{height:100%;width:0%;background:var(--accent);transition:width .2s}@media (max-width: 900px){#main{grid-template-columns:1fr;grid-template-rows:auto 1fr auto}#examples-pane{border-right:none;border-bottom:1px solid var(--border);max-height:200px}#right-pane{border-left:none;border-top:1px solid var(--border);max-height:220px}#vfs-section{max-height:120px}}
