:root {
--bg: #ffffff;
--fg: #1a1a1a;
--muted: #6b7280;
--panel: #f6f7f9;
--border: #e2e5ea;
--edge: #cbd2dc;
--edge-strong: #4b5563;
--dir: #475569;
--file: #2563eb;
--func: #16a34a;
--type: #d97706;
--var: #9333ea;
--ext: #64748b;
--accent: #ef4444;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #0f1115;
--fg: #e6e8eb;
--muted: #9aa4b2;
--panel: #171a21;
--border: #262b36;
--edge: #333c4a;
--edge-strong: #94a3b8;
--dir: #94a3b8;
}
}
* {
box-sizing: border-box;
}
[hidden] {
display: none !important;
}
html,
body {
margin: 0;
height: 100%;
background: var(--bg);
color: var(--fg);
font: 13px/1.4 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
#app {
display: flex;
flex-direction: column;
height: 100%;
}
.btn-toggle-left {
padding: 2px 7px;
font-size: 13px;
line-height: 1;
font-family: inherit;
display: inline-flex;
align-items: center;
justify-content: center;
border: none;
background: none;
color: var(--fg);
cursor: pointer;
}
.btn-toggle-left svg {
width: 16px;
height: 16px;
display: block;
}
#workbench {
flex: 1;
display: flex;
flex-direction: row;
overflow: hidden;
position: relative;
min-height: 0;
}
#leftPane {
position: absolute;
top: 12px;
left: 12px;
bottom: 12px;
width: 320px;
min-width: 240px;
max-width: 480px;
display: flex;
flex-direction: column;
background: var(--panel);
border: 1px solid var(--border);
border-radius: 6px;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
overflow: hidden;
z-index: 10;
}
#leftPane.collapsed {
bottom: auto;
width: auto;
min-width: 0;
max-width: calc(100% - 24px);
flex: none;
border-radius: 999px;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}
#leftPane.collapsed .sidebar-body {
display: none;
}
.sidebar-header {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 12px;
border-bottom: 1px solid var(--border);
}
#leftPane.collapsed .sidebar-header {
border-bottom: none;
padding: 6px 14px 6px 10px;
}
.project-name {
font-size: 13px;
font-weight: 600;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 240px;
}
.sidebar-body {
flex: 1;
display: flex;
flex-direction: row;
overflow: hidden;
min-height: 0;
}
.icon-rail {
display: flex;
flex-direction: column;
width: 40px;
flex-shrink: 0;
border-right: 1px solid var(--border);
background: var(--panel);
}
.rail-btn {
padding: 10px 0;
display: flex;
align-items: center;
justify-content: center;
background: none;
border: none;
border-left: 2px solid transparent;
color: var(--muted);
cursor: pointer;
}
.rail-btn svg {
width: 18px;
height: 18px;
display: block;
}
.rail-btn:hover {
color: var(--fg);
}
.rail-btn.active {
color: var(--fg);
border-left-color: var(--file);
background: var(--bg);
}
.sidebar-panel-content {
flex: 1;
overflow-y: auto;
overflow-x: hidden;
display: flex;
flex-direction: column;
min-height: 0;
}
.sidebar-panel {
flex: 1;
min-height: 0;
}
.sidebar-panel-content,
.code-lines {
scrollbar-width: thin;
scrollbar-color: transparent transparent;
}
.sidebar-panel-content:hover,
.code-lines:hover {
scrollbar-color: var(--muted) transparent;
}
.sidebar-panel-content::-webkit-scrollbar,
.code-lines::-webkit-scrollbar {
width: 8px;
}
.sidebar-panel-content::-webkit-scrollbar-thumb,
.code-lines::-webkit-scrollbar-thumb {
background: transparent;
border-radius: 8px;
}
.sidebar-panel-content:hover::-webkit-scrollbar-thumb,
.code-lines:hover::-webkit-scrollbar-thumb {
background: var(--muted);
}
#filtersView {
display: flex;
flex-direction: column;
gap: 10px;
padding: 10px 12px;
font-size: 12px;
}
#filtersView .stat {
color: var(--muted);
}
#filtersView label {
display: inline-flex;
gap: 6px;
align-items: center;
cursor: pointer;
}
#filtersView button {
align-self: flex-start;
padding: 3px 10px;
border: 1px solid var(--border);
border-radius: 5px;
background: var(--bg);
color: var(--fg);
cursor: pointer;
}
#filtersView button:hover {
border-color: var(--edge-strong);
}
#filtersView #focusCtl {
display: flex;
flex-wrap: wrap;
gap: 6px;
align-items: center;
color: var(--muted);
}
#filtersView #focusCtl button {
padding: 1px 8px;
}
#filtersView #focusLabel {
color: var(--fg);
font-weight: 600;
max-width: 220px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
#treeView {
display: flex;
flex-direction: column;
min-height: 0;
}
.tree-search-bar {
position: sticky;
top: 0;
z-index: 2;
background: var(--panel);
padding: 8px;
border-bottom: 1px solid var(--border);
flex-shrink: 0;
}
.tree-search-bar input[type=search] {
width: 100%;
padding: 5px 9px;
border: 1px solid var(--border);
border-radius: 8px;
background: var(--bg);
color: var(--fg);
font: inherit;
}
.tree-list {
padding: 6px;
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
font-size: 11px;
line-height: 1.4;
}
.tree-node {
margin: 1px 0;
}
.tree-row {
display: flex;
align-items: center;
gap: 5px;
min-height: 22px;
padding: 2px 6px;
border-radius: 6px;
cursor: pointer;
user-select: none;
color: var(--fg);
white-space: nowrap;
}
.tree-row:hover {
background: var(--border);
}
.tree-row.active {
background: var(--border);
font-weight: 600;
color: var(--file);
box-shadow: inset 2px 0 0 var(--file);
}
.tree-caret {
display: inline-block;
width: 10px;
font-size: 9px;
color: var(--muted);
text-align: center;
flex-shrink: 0;
}
.tree-icon {
width: 14px;
height: 14px;
flex-shrink: 0;
color: var(--dir);
}
.tree-file .tree-icon {
color: var(--muted);
}
.tree-row.active .tree-icon {
color: var(--file);
}
.tree-name {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tree-folder > .tree-row .tree-name {
font-weight: 600;
}
.tree-children {
margin-left: 9px;
padding-left: 8px;
border-left: 1px solid var(--border);
}
.tree-children.collapsed {
display: none;
}
#codeView {
background: var(--bg);
display: flex;
flex-direction: column;
flex: 1;
min-height: 0;
}
.code-bar {
padding: 4px 8px;
border-bottom: 1px solid var(--border);
background: var(--panel);
display: flex;
justify-content: space-between;
align-items: center;
font-size: 11px;
gap: 6px;
}
#codePath {
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-weight: 600;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: var(--fg);
}
#codeLine {
font-size: 10px;
color: var(--muted);
white-space: nowrap;
}
.code-lines {
flex: 1;
overflow: auto;
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
font-size: 11px;
line-height: 1.45;
padding: 4px 0;
tab-size: 4;
}
.code-empty {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
height: 100%;
padding: 24px;
text-align: center;
color: var(--muted);
font-family: inherit;
}
.code-row {
display: flex;
min-width: 100%;
}
.code-row:hover {
background: rgba(140, 140, 140, 0.08);
}
.code-num {
width: 38px;
min-width: 38px;
text-align: right;
padding-right: 8px;
color: var(--muted);
user-select: none;
border-right: 1px solid var(--border);
}
.code-text {
padding-left: 8px;
white-space: pre;
flex: 1;
}
.code-row.highlight-def {
background: rgba(37, 99, 235, 0.16);
border-left: 3px solid var(--file);
}
.code-row.highlight-call {
background: rgba(239, 68, 68, 0.18);
border-left: 3px solid var(--accent);
}
#stage {
flex: 1;
overflow: hidden;
position: relative;
}
#scene {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
display: block;
cursor: grab;
touch-action: none;
}
#scene:active {
cursor: grabbing;
}
#sidePanel {
position: absolute;
top: 10px;
right: 10px;
width: 232px;
max-height: calc(100% - 20px);
overflow: auto;
background: var(--panel);
border: 1px solid var(--border);
border-radius: 8px;
padding: 10px 12px;
font-size: 12px;
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
}
#sidePanel h2 {
font-size: 12px;
margin: 0 24px 2px 0;
word-break: break-all;
}
#sidePanel .sp-kind {
color: var(--muted);
font-size: 10px;
text-transform: uppercase;
letter-spacing: .04em;
}
#sidePanel .sp-group {
margin-top: 9px;
color: var(--muted);
font-size: 10px;
text-transform: uppercase;
letter-spacing: .04em;
}
#sidePanel .row {
display: block;
width: 100%;
text-align: left;
border: 0;
background: none;
color: var(--fg);
font: inherit;
padding: 3px 4px;
border-radius: 4px;
cursor: pointer;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
#sidePanel .row:hover {
background: var(--border);
}
#sidePanel .sp-close {
position: absolute;
top: 6px;
right: 8px;
border: 0;
background: none;
color: var(--muted);
cursor: pointer;
font-size: 16px;
line-height: 1;
}
#sidePanel .sp-dump {
display: flex;
flex-direction: column;
gap: 6px;
margin-top: 6px;
}
#sidePanel .sp-dump label {
display: flex;
justify-content: space-between;
align-items: center;
gap: 8px;
font-size: 11px;
color: var(--muted);
}
#sidePanel .sp-dump input {
width: 120px;
padding: 2px 6px;
border: 1px solid var(--border);
border-radius: 4px;
background: var(--bg);
color: var(--fg);
font: inherit;
}
#sidePanel .sp-btn {
align-self: flex-start;
padding: 3px 10px;
border: 1px solid var(--border);
border-radius: 5px;
background: var(--bg);
color: var(--fg);
cursor: pointer;
font: inherit;
}
#sidePanel .sp-btn:hover {
border-color: var(--edge-strong);
}
#sidePanel .sp-dump-result {
font-size: 11px;
color: var(--muted);
word-break: break-all;
min-height: 1em;
}
#sidePanel .sp-dump-result.ok {
color: var(--func);
}
#sidePanel .sp-dump-result.err {
color: var(--accent);
}
.legend {
position: absolute;
right: 10px;
bottom: 10px;
background: var(--panel);
border: 1px solid var(--border);
border-radius: 6px;
padding: 8px 10px;
pointer-events: none;
}
.legend div {
display: flex;
align-items: center;
gap: 6px;
margin: 2px 0;
color: var(--muted);
}
.dot {
width: 9px;
height: 9px;
border-radius: 50%;
display: inline-block;
}
.dot.sq {
border-radius: 2px;
}
#status {
position: absolute;
left: 10px;
bottom: 10px;
color: var(--muted);
background: var(--panel);
border: 1px solid var(--border);
border-radius: 6px;
padding: 4px 8px;
font-size: 11px;
opacity: 0;
transition: opacity .3s ease;
pointer-events: none;
}
#status.show {
opacity: 1;
}
.graph-tooltip {
position: absolute;
pointer-events: none;
background: var(--panel);
color: var(--fg);
border: 1px solid var(--border);
border-radius: 6px;
padding: 6px 10px;
font-size: 11px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
display: none;
z-index: 100;
max-width: 320px;
word-break: break-all;
line-height: 1.4;
}
.graph-tooltip .tt-title {
font-weight: 600;
margin-bottom: 2px;
display: flex;
align-items: center;
gap: 6px;
}
.graph-tooltip .tt-kind {
font-size: 10px;
text-transform: uppercase;
padding: 1px 4px;
border-radius: 3px;
background: var(--border);
}
.graph-tooltip .tt-path {
color: var(--muted);
}
.graph-tooltip .tt-meta {
color: var(--muted);
font-size: 10px;
margin-top: 2px;
}
.ctx-menu {
position: absolute;
z-index: 110;
min-width: 180px;
max-width: 260px;
background: var(--panel);
border: 1px solid var(--border);
border-radius: 8px;
padding: 6px;
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
font-size: 12px;
}
.ctx-menu-title {
padding: 3px 6px 6px;
font-weight: 600;
color: var(--fg);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
border-bottom: 1px solid var(--border);
margin-bottom: 4px;
}
.ctx-menu-label {
padding: 6px 6px 2px;
color: var(--muted);
font-size: 10px;
text-transform: uppercase;
letter-spacing: .04em;
}
.ctx-menu button {
display: block;
width: 100%;
text-align: left;
border: 0;
background: none;
color: var(--fg);
font: inherit;
padding: 5px 6px;
border-radius: 4px;
cursor: pointer;
}
.ctx-menu button:hover {
background: var(--border);
}