:root{--bg-primary:#0f172a;--bg-secondary:#1e293b;--bg-tertiary:#162032;--bg-hover:#263349;--bg-active:#2d3f57;--border:#2a3547;--border-light:#334155;--text-primary:#f1f5f9;--text-secondary:#94a3b8;--text-muted:#64748b;--accent:#3b82f6;--accent-hover:#2563eb;--accent-dim:#3b82f626;--green:#22c55e;--yellow:#f59e0b;--red:#ef4444;--toolbar-h:42px;--tabbar-h:34px;--statusbar-h:24px;--sidebar-w:200px;--panel-h:220px;--font-ui:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;--font-mono:"Fira Code", "Cascadia Code", "JetBrains Mono", Consolas, "Courier New", monospace;--radius:6px;--shadow:0 4px 16px #0006;--shadow-sm:0 2px 8px #0000004d}[data-theme=light]{--bg-primary:#f8fafc;--bg-secondary:#fff;--bg-tertiary:#f1f5f9;--bg-hover:#e2e8f0;--bg-active:#cbd5e1;--border:#e2e8f0;--border-light:#cbd5e1;--text-primary:#0f172a;--text-secondary:#475569;--text-muted:#94a3b8;--accent:#2563eb;--accent-hover:#1d4ed8;--accent-dim:#2563eb1a;--green:#16a34a;--yellow:#d97706;--red:#dc2626}*,:before,:after{box-sizing:border-box;margin:0;padding:0}html,body,#root{width:100%;height:100%;font-family:var(--font-ui);background:var(--bg-primary);color:var(--text-primary);font-size:13px;overflow:hidden}button{font-family:var(--font-ui);cursor:pointer}input,textarea{font-family:var(--font-ui)}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:var(--border-light);border-radius:4px}::-webkit-scrollbar-thumb:hover{background:var(--text-muted)}.app{flex-direction:column;width:100%;height:100%;display:flex;overflow:hidden}.toolbar{height:var(--toolbar-h);background:var(--bg-secondary);border-bottom:1px solid var(--border);-webkit-user-select:none;user-select:none;flex-shrink:0;align-items:center;gap:4px;padding:0 10px;display:flex}.toolbar-brand{letter-spacing:.5px;color:var(--text-primary);white-space:nowrap;align-items:center;gap:7px;margin-right:10px;font-size:14px;font-weight:700;display:flex}.toolbar-brand .brand-icon{font-family:var(--font-mono);color:var(--green);font-size:15px;font-weight:900}.toolbar-divider{background:var(--border);flex-shrink:0;width:1px;height:20px;margin:0 4px}.toolbar-spacer{flex:1}.toolbar-group{align-items:center;gap:2px;display:flex}.tb-btn{border-radius:var(--radius);color:var(--text-secondary);white-space:nowrap;background:0 0;border:none;align-items:center;gap:5px;height:28px;padding:4px 9px;font-size:12px;font-weight:500;transition:background .12s,color .12s;display:flex}.tb-btn:hover{background:var(--bg-hover);color:var(--text-primary)}.tb-btn.active{background:var(--accent-dim);color:var(--accent)}.tb-btn .tb-icon{font-size:14px;line-height:1}.tb-btn-primary{background:var(--accent);color:#fff;font-weight:600}.tb-btn-primary:hover{background:var(--accent-hover);color:#fff}.editor-layout{flex:1;display:flex;overflow:hidden}.sidebar{width:var(--sidebar-w);background:var(--bg-tertiary);border-right:1px solid var(--border);flex-direction:column;flex-shrink:0;transition:width .18s;display:flex;overflow:hidden}.sidebar.collapsed{border-right:none;width:0}.sidebar-header{letter-spacing:.8px;text-transform:uppercase;color:var(--text-muted);border-bottom:1px solid var(--border);flex-shrink:0;justify-content:space-between;align-items:center;height:32px;padding:6px 10px;font-size:10px;font-weight:700;display:flex}.sidebar-actions{gap:2px;display:flex}.sidebar-icon-btn{width:22px;height:22px;color:var(--text-muted);cursor:pointer;background:0 0;border:none;border-radius:4px;justify-content:center;align-items:center;padding:0;font-size:15px;line-height:1;transition:background .1s,color .1s;display:flex}.sidebar-icon-btn:hover{background:var(--bg-hover);color:var(--text-primary)}.file-list{flex:1;padding:4px 0;overflow-y:auto}.file-item{cursor:pointer;color:var(--text-secondary);-webkit-user-select:none;user-select:none;border-radius:0;align-items:center;gap:6px;padding:5px 10px;font-size:12px;transition:background .1s,color .1s;display:flex;position:relative}.file-item:hover{background:var(--bg-hover);color:var(--text-primary)}.file-item.active{background:var(--accent-dim);color:var(--accent)}.file-item .file-icon{flex-shrink:0;font-size:13px}.file-item .file-name{text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}.file-item .file-modified-dot{background:var(--yellow);border-radius:50%;flex-shrink:0;width:6px;height:6px}.file-item .file-delete{opacity:0;width:18px;height:18px;color:var(--text-muted);cursor:pointer;background:0 0;border:none;border-radius:3px;flex-shrink:0;justify-content:center;align-items:center;padding:0;font-size:13px;line-height:1;transition:background .1s,color .1s;display:flex}.file-item:hover .file-delete{opacity:1}.file-item .file-delete:hover{color:var(--red);background:#ef444426}.new-file-row{align-items:center;gap:6px;padding:5px 10px;display:flex}.new-file-input{background:var(--bg-secondary);border:1px solid var(--accent);color:var(--text-primary);border-radius:4px;outline:none;flex:1;padding:3px 6px;font-size:12px}.new-file-input:focus{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-dim)}.editor-container{flex-direction:column;flex:1;min-width:0;display:flex;overflow:hidden}.tab-bar{background:var(--bg-primary);border-bottom:1px solid var(--border);height:var(--tabbar-h);scrollbar-width:none;flex-shrink:0;align-items:flex-end;display:flex;overflow:auto hidden}.tab-bar::-webkit-scrollbar{display:none}.tab-item{border-top:2px solid #0000;border-right:1px solid var(--border);cursor:pointer;height:32px;color:var(--text-secondary);white-space:nowrap;-webkit-user-select:none;user-select:none;background:0 0;flex-shrink:0;align-items:center;gap:5px;padding:0 10px;font-size:12px;transition:background .1s,color .1s;display:flex;position:relative}.tab-item:hover{background:var(--bg-hover);color:var(--text-primary)}.tab-item.active{background:var(--bg-secondary);color:var(--text-primary);border-top-color:var(--accent)}.tab-modified{background:var(--yellow);border-radius:50%;flex-shrink:0;width:7px;height:7px;display:inline-block}.tab-name{text-overflow:ellipsis;white-space:nowrap;max-width:130px;overflow:hidden}.tab-close{width:18px;height:18px;color:var(--text-muted);cursor:pointer;background:0 0;border:none;border-radius:3px;flex-shrink:0;justify-content:center;align-items:center;padding:0;font-size:14px;line-height:1;transition:background .1s,color .1s;display:flex}.tab-close:hover{color:var(--red);background:#ef444426}.editor-area{flex-direction:column;flex:1;min-height:0;display:flex;overflow:hidden}.editor-wrapper{flex:1;position:relative;overflow:hidden}.editor-empty{height:100%;color:var(--text-muted);-webkit-user-select:none;user-select:none;flex-direction:column;justify-content:center;align-items:center;gap:12px;display:flex}.editor-empty .empty-icon{opacity:.4;font-size:48px}.editor-empty p{font-size:13px}.editor-empty kbd{border:1px solid var(--border);font-size:11px;font-family:var(--font-mono);background:var(--bg-secondary);color:var(--text-secondary);border-radius:4px;padding:2px 6px;display:inline-block}.split-view{flex:1;display:flex;overflow:hidden}.split-divider{background:var(--border);cursor:col-resize;flex-shrink:0;width:5px;transition:background .15s;position:relative}.split-divider:hover,.split-divider:active{background:var(--accent)}.split-divider:after{content:"";background:var(--text-muted);opacity:.5;border-radius:1px;width:1px;height:40px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.bottom-panel{border-top:1px solid var(--border);background:var(--bg-secondary);height:var(--panel-h);flex-direction:column;flex-shrink:0;transition:height .18s;display:flex;overflow:hidden}.bottom-panel.collapsed{border-top:none;height:0}.panel-tabs{border-bottom:1px solid var(--border);background:var(--bg-primary);flex-shrink:0;align-items:center;gap:2px;height:30px;padding:0 8px;display:flex}.panel-tab{color:var(--text-muted);cursor:pointer;background:0 0;border:none;border-radius:4px;height:24px;padding:3px 10px;font-size:11px;font-weight:500;transition:background .1s,color .1s}.panel-tab:hover{color:var(--text-primary)}.panel-tab.active{background:var(--accent-dim);color:var(--accent)}.panel-tab-spacer{flex:1}.panel-close-btn{width:22px;height:22px;color:var(--text-muted);cursor:pointer;background:0 0;border:none;border-radius:4px;justify-content:center;align-items:center;font-size:16px;display:flex}.panel-close-btn:hover{color:var(--text-primary);background:var(--bg-hover)}.panel-body{flex:1;overflow:hidden}.preview-iframe{background:#fff;border:none;width:100%;height:100%}.console-output{height:100%;font-family:var(--font-mono);color:var(--text-secondary);padding:6px 10px;font-size:12px;line-height:1.6;overflow-y:auto}.console-line{white-space:pre-wrap;word-break:break-all;padding:1px 0}.console-line.log{color:var(--text-secondary)}.console-line.info{color:#60a5fa}.console-line.warn{color:var(--yellow)}.console-line.error{color:var(--red)}.status-bar{height:var(--statusbar-h);background:var(--accent);color:#ffffffe6;-webkit-user-select:none;user-select:none;flex-shrink:0;align-items:center;gap:0;padding:0 10px;font-size:11px;display:flex}[data-theme=light] .status-bar{background:var(--accent);color:#fff}.status-item{cursor:pointer;white-space:nowrap;border-radius:0;align-items:center;height:100%;padding:0 8px;transition:background .1s;display:flex}.status-item:hover{background:#00000026}.status-sep{background:#ffffff40;flex-shrink:0;width:1px;height:14px}.status-spacer{flex:1}.modal-overlay{z-index:1000;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);background:#0009;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.modal{background:var(--bg-secondary);border:1px solid var(--border);box-shadow:var(--shadow);border-radius:10px;width:90%;min-width:320px;max-width:480px;padding:24px}.modal h2{color:var(--text-primary);margin-bottom:16px;font-size:15px;font-weight:700}.modal input{background:var(--bg-primary);border:1px solid var(--border-light);border-radius:var(--radius);width:100%;color:var(--text-primary);outline:none;margin-bottom:12px;padding:8px 10px;font-size:13px}.modal input:focus{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-dim)}.modal-actions{justify-content:flex-end;gap:8px;display:flex}.modal-btn{border-radius:var(--radius);cursor:pointer;border:none;padding:6px 16px;font-size:13px;font-weight:500;transition:background .1s}.modal-btn-primary{background:var(--accent);color:#fff}.modal-btn-primary:hover{background:var(--accent-hover)}.modal-btn-secondary{background:var(--bg-hover);color:var(--text-primary)}.modal-btn-secondary:hover{background:var(--bg-active)}.toast-container{z-index:2000;pointer-events:none;flex-direction:column;gap:6px;display:flex;position:fixed;bottom:40px;left:50%;transform:translate(-50%)}.toast{background:var(--bg-secondary);border:1px solid var(--border);color:var(--text-primary);box-shadow:var(--shadow);white-space:nowrap;border-radius:8px;padding:8px 16px;font-size:12px;animation:.2s toastIn}.toast.success{border-left:3px solid var(--green)}.toast.error{border-left:3px solid var(--red)}.toast.info{border-left:3px solid var(--accent)}@keyframes toastIn{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.drop-overlay{border:3px dashed var(--accent);z-index:500;pointer-events:none;background:#3b82f626;border-radius:10px;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.drop-overlay span{color:var(--accent);background:var(--bg-secondary);box-shadow:var(--shadow);border-radius:8px;padding:14px 28px;font-size:20px;font-weight:600}@media (width<=600px){:root{--sidebar-w:0px;--panel-h:180px}.sidebar,.toolbar-brand .brand-label,.tb-btn .tb-label{display:none}.tb-btn{padding:4px 6px}.status-item.status-encoding,.status-item.status-size{display:none}}@media (width<=400px){.toolbar-divider,.status-item.status-spaces{display:none}}
