@import "https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Inter:wght@400;500;600;700;800&display=swap";:root{--bg-body:#111214;--bg-card:#1c1d21;--bg-input:#26272c;--bg-hover:#31333a;--border-subtle:#ffffff0a;--border-focus:#ffffff26;--text-primary:#fdfdfd;--text-secondary:#9ca3af;--text-muted:#6b7280;--brand:#fff;--brand-hover:#f3f4f6;--brand-text:#111214;--success:#34d399;--success-bg:#34d3991a;--error:#f87171;--error-bg:#f871711a;--radius-card:24px;--radius-btn:12px;--radius-pill:9999px;--shadow-soft:0 8px 32px #0006;--shadow-float:0 16px 48px #00000080,0 4px 16px #0000004d}:root[data-theme=light]{--bg-body:#f4f5f7;--bg-card:#fff;--bg-input:#f3f4f6;--bg-hover:#e5e7eb;--border-subtle:#0000000a;--border-focus:#0000001a;--text-primary:#111827;--text-secondary:#4b5563;--text-muted:#9ca3af;--brand:#111827;--brand-hover:#1f2937;--brand-text:#fff;--success:#059669;--success-bg:#0596691a;--error:#dc2626;--error-bg:#dc26261a;--shadow-soft:0 8px 32px #0000000a;--shadow-float:0 16px 48px #0000000f,0 4px 16px #00000008}body{background-color:var(--bg-body);color:var(--text-primary);-webkit-font-smoothing:antialiased;width:100vw;height:100vh;margin:0;padding:0;font-family:Inter,system-ui,-apple-system,sans-serif;transition:background-color .4s,color .4s;overflow:hidden}.app-container{box-sizing:border-box;flex-direction:column;gap:16px;height:100vh;padding:16px 24px 24px;display:flex}.header{flex-shrink:0;justify-content:space-between;align-items:center;height:64px;display:flex}.logo{color:var(--text-primary);-webkit-user-select:none;user-select:none;align-items:center;display:flex}.logo-title{letter-spacing:-.5px;font-size:1.25rem;font-weight:800}.controls{align-items:center;gap:12px;display:flex}.icon-btn,.story-mode-btn{background:var(--bg-card);border:1px solid var(--border-subtle);color:var(--text-secondary);border-radius:var(--radius-pill);cursor:pointer;box-shadow:var(--shadow-soft);align-items:center;gap:8px;padding:8px 16px;font-size:.9rem;font-weight:600;transition:all .2s cubic-bezier(.16,1,.3,1);display:flex}.icon-btn.theme-btn{padding:8px}.icon-btn:hover,.story-mode-btn:hover{background:var(--bg-hover);color:var(--text-primary);box-shadow:var(--shadow-float);transform:translateY(-2px)}.zoom-controls{border-radius:var(--radius-pill);background:0 0;border:1px solid #0000;align-items:center;height:32px;transition:all .2s;display:flex;overflow:hidden}.zoom-controls:hover{background:var(--bg-card);border-color:var(--border-subtle);box-shadow:var(--shadow-soft)}.zoom-controls button{color:var(--text-secondary);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;height:100%;padding:0 10px;transition:all .15s;display:flex}.zoom-controls button:hover{background:var(--bg-hover);color:var(--text-primary)}.zoom-divider{background:var(--border-subtle);width:1px;height:16px}.custom-dropdown-container{display:inline-block;position:relative}.lang-select-btn{background:var(--bg-card);border:1px solid var(--border-subtle);border-radius:var(--radius-pill);height:40px;box-shadow:var(--shadow-soft);cursor:pointer;color:var(--text-primary);align-items:center;gap:8px;padding:0 16px 0 20px;font-family:Inter,sans-serif;font-size:.9rem;font-weight:600;transition:all .2s;display:flex}.lang-select-btn:hover{background:var(--bg-hover)}.lang-btn-text{margin-right:6px}.select-chevron{color:var(--text-secondary);transition:transform .2s}.select-chevron.open{transform:rotate(180deg)}.dropdown-overlay{z-index:90;position:fixed;inset:0}.dropdown-menu{background:var(--bg-card);border:1px solid var(--border-subtle);min-width:200px;box-shadow:var(--shadow-float);z-index:100;border-radius:16px;flex-direction:column;gap:4px;padding:8px;display:flex;position:absolute;top:calc(100% + 8px);right:0}.dropdown-item{color:var(--text-primary);cursor:pointer;background:0 0;border:none;border-radius:10px;align-items:center;gap:12px;padding:10px 16px;font-family:Inter,sans-serif;font-size:.9rem;font-weight:500;transition:all .2s;display:flex}.dropdown-item:hover{background:var(--bg-hover)}.dropdown-item.active{background:var(--bg-input);font-weight:700}.lang-dot{border-radius:50%;flex-shrink:0;width:8px;height:8px}.run-btn{background:var(--brand);color:var(--brand-text);border-radius:var(--radius-pill);cursor:pointer;height:40px;box-shadow:var(--shadow-soft);border:none;align-items:center;gap:8px;padding:0 24px;font-family:Inter,sans-serif;font-size:.95rem;font-weight:700;transition:all .3s cubic-bezier(.16,1,.3,1);display:flex}.run-btn:hover:not(:disabled){background:var(--brand-hover);box-shadow:var(--shadow-float);transform:translateY(-2px)}.run-btn:disabled{background:var(--bg-input);color:var(--text-muted);cursor:not-allowed;box-shadow:none;transform:none}.run-btn .spinner{animation:1s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.workspace{flex:1;display:flex;overflow:hidden}.editor-panel,.io-panel{background:var(--bg-card);border-radius:var(--radius-card);box-shadow:var(--shadow-float);flex-direction:column;transition:all .3s;display:flex;position:relative;overflow:hidden}.resize-gutter{cursor:col-resize;-webkit-user-select:none;user-select:none;flex-shrink:0;justify-content:center;align-items:center;width:24px;transition:background .3s;display:flex}.gutter-pill{background:var(--border-subtle);opacity:0;border-radius:4px;width:4px;height:32px;transition:all .2s cubic-bezier(.16,1,.3,1)}.resize-gutter:hover .gutter-pill,.resize-gutter.dragging .gutter-pill{opacity:1;background:var(--brand);height:48px;box-shadow:0 0 12px var(--brand)}.io-panel{flex:1;min-width:320px}.panel-header-row,.io-tabs{border-bottom:1px solid var(--border-subtle);background:0 0;flex-shrink:0;align-items:center;height:56px;padding:0 24px;display:flex}.panel-header-row{justify-content:space-between}.editor-tab{height:100%;color:var(--text-primary);align-items:center;gap:12px;font-family:Inter,sans-serif;font-size:1rem;font-weight:700;display:flex}.file-meta{color:var(--text-secondary);background:var(--bg-input);border-radius:var(--radius-pill);padding:2px 8px;font-family:JetBrains Mono,monospace;font-size:.7rem}.editor-actions{gap:8px;display:flex}.editor-actions .icon-btn{box-shadow:none;background:0 0;border-color:#0000;padding:6px 12px;font-size:.8rem}.editor-actions .icon-btn:hover{background:var(--bg-hover);border-color:var(--border-subtle)}.copy-btn .copied-text{color:var(--success)}.io-tabs{gap:16px;padding:0 24px}.io-tab{color:var(--text-secondary);cursor:pointer;background:0 0;border:none;align-items:center;gap:8px;height:100%;padding:0 4px;font-size:.95rem;font-weight:600;transition:all .2s;display:flex;position:relative}.io-tab:hover,.io-tab.active{color:var(--text-primary)}.tab-status-pill{border-radius:var(--radius-pill);align-items:center;gap:6px;padding:4px 10px;font-size:.75rem;font-weight:700;display:inline-flex}.tab-status-pill.success{background:var(--success-bg);color:var(--success)}.tab-status-pill.error{background:var(--error-bg);color:var(--error)}.status-dot{background:currentColor;border-radius:50%;width:6px;height:6px;display:inline-block}.io-section{flex-direction:column;flex:1;min-height:0;display:flex}.result-metrics{border-bottom:1px solid var(--border-subtle);background:#00000005;flex-wrap:wrap;flex-shrink:0;align-items:center;gap:16px;padding:16px 24px;display:flex}:root[data-theme=dark] .result-metrics{background:#ffffff03}.metric-badge{border-radius:var(--radius-pill);align-items:center;gap:6px;padding:4px 10px;font-size:.8rem;font-weight:700;display:inline-flex}.metric-badge.success{background:var(--success-bg);color:var(--success)}.metric-badge.error{background:var(--error-bg);color:var(--error)}.metric-item{align-items:center;gap:8px;font-size:.85rem;display:flex}.metric-label{color:var(--text-secondary);font-weight:500}.metric-value{color:var(--text-primary);font-family:JetBrains Mono,monospace;font-weight:600}.metric-value.success{color:var(--success)}.metric-value.error{color:var(--error)}.custom-input,.output-terminal{color:var(--text-primary);resize:none;box-sizing:border-box;background:0 0;border:none;outline:none;flex:1;width:100%;padding:24px;font-family:JetBrains Mono,monospace;font-size:.9rem;line-height:1.7}.custom-input::placeholder{color:var(--text-muted)}.output-terminal.error{color:var(--error)}.status-bar{color:var(--text-secondary);-webkit-user-select:none;user-select:none;flex-shrink:0;justify-content:space-between;align-items:center;padding:0 12px;font-family:Inter,sans-serif;font-size:.8rem;font-weight:500;display:flex}.status-left,.status-right{align-items:center;gap:16px;display:flex}.status-item{align-items:center;gap:8px;display:flex}.status-divider{background:var(--border-subtle);border-radius:50%;width:4px;height:4px}.status-dot.online{background:var(--success);width:8px;height:8px;box-shadow:0 0 12px var(--success);border-radius:50%}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{border:2px solid var(--bg-card);background:#96969633;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:#96969666}.story-modal-overlay{-webkit-backdrop-filter:blur(12px);z-index:1000;background:#0006;justify-content:center;align-items:center;padding:40px;animation:.4s cubic-bezier(.16,1,.3,1) modalFadeIn;display:flex;position:fixed;inset:0}@keyframes modalFadeIn{0%{opacity:0}to{opacity:1}}.story-modal-container{background:var(--bg-card);width:100%;max-width:1100px;height:85vh;box-shadow:var(--shadow-float);border-radius:32px;flex-direction:column;animation:.5s cubic-bezier(.16,1,.3,1) modalSlideUp;display:flex;overflow:hidden}@keyframes modalSlideUp{0%{opacity:0;transform:translateY(40px)scale(.98)}to{opacity:1;transform:translateY(0)scale(1)}}.story-header{border-bottom:1px solid var(--border-subtle);flex-shrink:0;justify-content:space-between;align-items:center;padding:32px 48px;display:flex}.story-header-title-group{align-items:center;gap:16px;display:flex}.story-icon-wrapper{background:var(--brand);width:48px;height:48px;color:var(--brand-text);box-shadow:var(--shadow-soft);border-radius:16px;justify-content:center;align-items:center;display:flex}.story-title{color:var(--text-primary);letter-spacing:-.5px;margin:0;font-size:1.5rem;font-weight:700}.story-close-btn{background:var(--bg-input);color:var(--text-secondary);cursor:pointer;border:none;border-radius:50%;justify-content:center;align-items:center;width:40px;height:40px;transition:all .2s;display:flex}.story-close-btn:hover{background:var(--bg-hover);color:var(--text-primary);transform:rotate(90deg)}.story-chapters-nav{border-bottom:1px solid var(--border-subtle);background:var(--bg-card);gap:40px;padding:0 48px;display:flex}.chapter-tab{color:var(--text-secondary);cursor:pointer;background:0 0;border:none;flex-direction:column;align-items:flex-start;gap:4px;padding:24px 0;font-size:1rem;font-weight:600;transition:color .3s;display:flex;position:relative}.chapter-tab:hover{color:var(--text-primary)}.chapter-tab.active{color:var(--brand)}.chapter-tab.active:after{content:"";background:var(--brand);border-radius:3px 3px 0 0;width:100%;height:3px;position:absolute;bottom:0;left:0}.chapter-badge{text-transform:uppercase;letter-spacing:1px;color:var(--text-muted);font-size:.75rem;font-weight:700}.chapter-tab.active .chapter-badge{color:var(--brand)}.story-content-area{flex:1;align-items:flex-start;padding:48px;display:flex;overflow-y:auto}.story-chapter-card{align-items:flex-start;gap:64px;width:100%;display:flex}.chapter-story-left{flex:1}.chapter-main-title{color:var(--text-primary);letter-spacing:-.5px;margin:0 0 24px;font-size:2.25rem;font-weight:800;line-height:1.2}.chapter-narrative{color:var(--text-secondary);margin-bottom:40px;font-size:1.1rem;line-height:1.7}.chapter-highlights{flex-direction:column;gap:24px;display:flex}.highlight-item{align-items:flex-start;gap:16px;display:flex}.highlight-icon{background:var(--bg-input);width:32px;height:32px;color:var(--brand);border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;display:flex}.highlight-text-container{flex-direction:column;gap:4px;display:flex}.highlight-title{color:var(--text-primary);font-size:.95rem;font-weight:700}.highlight-desc{color:var(--text-secondary);font-size:.9rem;line-height:1.5}.chapter-story-right{background:var(--bg-input);box-shadow:var(--shadow-soft);border-radius:24px;flex:1;padding:32px;position:relative;overflow:hidden}.visual-header{border-bottom:1px solid var(--border-subtle);justify-content:space-between;align-items:center;margin-bottom:24px;padding-bottom:16px;display:flex}.visual-title{color:var(--text-primary);align-items:center;gap:8px;font-size:1.1rem;font-weight:700;display:flex}.speedup-badge{background:var(--success-bg);color:var(--success);border-radius:var(--radius-pill);padding:6px 12px;font-size:.75rem;font-weight:700}.latency-meter{background:var(--bg-card);box-shadow:var(--shadow-soft);border-radius:12px;justify-content:space-between;align-items:center;margin-bottom:16px;padding:16px;display:flex}.latency-label{color:var(--text-secondary);text-transform:uppercase;letter-spacing:.5px;font-size:.8rem;font-weight:600}.latency-value{color:var(--brand);font-family:JetBrains Mono,monospace;font-size:1.5rem;font-weight:800}.code-block-visual{background:var(--bg-card);color:var(--text-primary);box-shadow:var(--shadow-soft);border-radius:12px;padding:20px;font-family:JetBrains Mono,monospace;font-size:.85rem;line-height:1.6}.code-block-visual .keyword,.code-block-visual .string{color:var(--success)}.code-block-visual .comment{color:var(--text-muted)}.code-block-visual .prop{color:var(--text-secondary)}.interactive-slider-box{background:var(--bg-card);box-shadow:var(--shadow-soft);border-radius:12px;margin-bottom:16px;padding:24px}.slider-header{color:var(--text-primary);justify-content:space-between;margin-bottom:16px;font-weight:600;display:flex}.custom-slider{width:100%;accent-color:var(--brand);margin-bottom:12px}.comparison-container{flex-direction:column;gap:20px;margin-bottom:24px;display:flex}.bar-row{flex-direction:column;gap:8px;display:flex}.bar-label-group{color:var(--text-primary);justify-content:space-between;font-size:.9rem;font-weight:600;display:flex}.bar-track{background:var(--bg-card);border-radius:6px;width:100%;height:12px;overflow:hidden;box-shadow:inset 0 2px 4px #0000000d}.bar-fill{border-radius:6px;height:100%}.bar-fill.cold{background:var(--error);width:100%;animation:2s ease-out forwards loadBar}.bar-fill.warm{background:var(--success);width:10%;animation:.5s ease-out forwards loadBar}@keyframes loadBar{0%{width:0}}.security-grid{grid-template-columns:1fr 1fr;gap:16px;display:grid}.sec-card{background:var(--bg-card);box-shadow:var(--shadow-soft);border-radius:12px;padding:20px}.sec-card-title{color:var(--text-secondary);text-transform:uppercase;margin-bottom:8px;font-size:.8rem;font-weight:700}.sec-card-val{color:var(--text-primary);margin-bottom:4px;font-size:1.25rem;font-weight:800}.sec-card-desc{color:var(--text-muted);font-size:.8rem}.story-footer{background:var(--bg-input);border-top:1px solid var(--border-subtle);flex-shrink:0;justify-content:space-between;align-items:center;padding:24px 48px;display:flex}.story-footer-left{color:var(--text-secondary);align-items:center;gap:16px;font-size:.9rem;font-weight:500;display:flex}.footer-sim-controls{align-items:center;gap:12px;display:flex}.sim-play-btn{background:var(--brand);color:var(--brand-text);border-radius:var(--radius-pill);cursor:pointer;border:none;align-items:center;gap:8px;padding:8px 16px;font-size:.9rem;font-weight:700;transition:all .2s;display:flex}.sim-play-btn:hover:not(:disabled){box-shadow:var(--shadow-soft);transform:translateY(-2px)}.sim-play-btn:disabled{opacity:.6;cursor:not-allowed}.sim-mode-toggle{background:var(--bg-card);border-radius:var(--radius-pill);border:1px solid var(--border-subtle);padding:4px;display:flex}.sim-mode-btn{color:var(--text-secondary);border-radius:var(--radius-pill);cursor:pointer;background:0 0;border:none;padding:4px 12px;font-size:.85rem;font-weight:600;transition:all .2s}.sim-mode-btn.active{background:var(--bg-hover);color:var(--text-primary)}.story-nav-btns{gap:12px;display:flex}.story-btn{background:var(--bg-card);color:var(--text-primary);border:1px solid var(--border-subtle);border-radius:var(--radius-pill);cursor:pointer;box-shadow:var(--shadow-soft);padding:10px 24px;font-size:.95rem;font-weight:700;transition:all .2s}.story-btn:hover:not(:disabled){background:var(--bg-hover);transform:translateY(-2px)}.story-btn:disabled{opacity:.5;cursor:not-allowed;box-shadow:none}.story-btn.primary{background:var(--brand);color:var(--brand-text);border:none}.story-btn.primary:hover{background:var(--brand-hover)}
