Files

340 lines
21 KiB
CSS

:root {
--bg: #10131b;
--panel: #171b25;
--panel-raised: #1d2230;
--panel-soft: #141822;
--line: #2a3040;
--line-strong: #3a4256;
--text: #e9edf5;
--text-soft: #a6b0c5;
--text-dim: #707b92;
--mint: #67d8b2;
--mint-deep: #1c876d;
--violet: #9d8cff;
--gold: #e7bf68;
--red: #ef7180;
--orange: #e59a55;
--blue: #70a9ff;
--shadow: 0 18px 50px rgb(0 0 0 / 24%);
--radius: 14px;
--font: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
margin: 0;
overflow: hidden;
background:
radial-gradient(circle at 54% 0%, rgb(90 69 144 / 13%), transparent 36%),
var(--bg);
color: var(--text);
font-family: var(--font);
font-size: 14px;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
outline: 2px solid var(--mint);
outline-offset: 2px;
}
.app { height: 100%; display: grid; grid-template-rows: 68px minmax(0, 1fr); }
.topbar {
display: flex;
align-items: center;
gap: 24px;
padding: 0 18px;
border-bottom: 1px solid var(--line);
background: rgb(18 22 31 / 94%);
backdrop-filter: blur(18px);
z-index: 20;
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 260px; }
.brand-mark {
width: 36px;
height: 36px;
display: grid;
place-items: center;
border: 1px solid rgb(103 216 178 / 45%);
border-radius: 11px;
color: var(--mint);
background: linear-gradient(145deg, rgb(103 216 178 / 16%), rgb(157 140 255 / 8%));
box-shadow: inset 0 0 22px rgb(103 216 178 / 8%);
font-size: 20px;
}
.brand div { display: grid; gap: 2px; }
.brand strong { font-size: 15px; letter-spacing: .04em; }
.brand span:last-child { color: var(--text-dim); font-size: 11px; }
.top-stats { display: flex; align-items: center; gap: 16px; color: var(--text-dim); white-space: nowrap; }
.top-stats span { padding-left: 15px; border-left: 1px solid var(--line); font-size: 12px; }
.top-stats b { color: var(--text); font-size: 14px; margin-right: 3px; }
.toolbar { margin-left: auto; display: flex; gap: 7px; align-items: center; }
.button, .icon-button {
border: 1px solid var(--line-strong);
border-radius: 9px;
background: var(--panel-raised);
cursor: pointer;
transition: border-color .15s ease, background .15s ease, transform .15s ease, opacity .15s ease;
}
.button { min-height: 34px; padding: 0 12px; font-weight: 600; font-size: 12px; }
.button:hover:not(:disabled), .icon-button:hover:not(:disabled) { border-color: #566077; background: #242a3a; }
.button:active:not(:disabled), .icon-button:active:not(:disabled) { transform: translateY(1px); }
.button:disabled { opacity: .35; cursor: default; }
.button.ghost { background: transparent; color: var(--text-soft); }
.button.primary { border-color: #52c7a1; background: var(--mint); color: #10221d; box-shadow: 0 7px 22px rgb(103 216 178 / 14%); }
.button.primary:hover:not(:disabled) { background: #79e5c0; border-color: #79e5c0; }
.button.compact { min-height: 30px; padding: 0 10px; }
.issue-button.has-errors { border-color: rgb(239 113 128 / 55%); color: #ff9aa6; }
.issue-button.has-warnings:not(.has-errors) { border-color: rgb(229 154 85 / 55%); color: #efb078; }
.icon-button { width: 34px; height: 34px; font-size: 20px; display: grid; place-items: center; }
.save-state { display: inline-flex; align-items: center; gap: 7px; color: var(--text-dim); margin-right: 3px; font-size: 12px; white-space: nowrap; }
.save-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-dim); }
.save-state.saved i { background: var(--mint); box-shadow: 0 0 10px rgb(103 216 178 / 65%); }
.save-state.dirty { color: var(--gold); }
.save-state.dirty i { background: var(--gold); }
.save-state.offline { color: var(--orange); }
.save-state.offline i { background: var(--orange); }
.save-state.loading i { animation: pulse 1s infinite alternate; }
@keyframes pulse { to { opacity: .25; } }
.workspace {
min-height: 0;
display: grid;
grid-template-columns: 292px minmax(500px, 1fr) 390px;
gap: 1px;
background: var(--line);
}
.panel { min-width: 0; min-height: 0; background: var(--panel); }
.catalog, .inspector { display: flex; flex-direction: column; }
.panel-heading { min-height: 76px; padding: 17px 16px 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-heading h1, .panel-heading h2, .graph-title h2 { margin: 3px 0 0; font-size: 17px; line-height: 1.2; }
.eyebrow { display: block; color: var(--text-dim); text-transform: uppercase; font-size: 10px; letter-spacing: .16em; font-weight: 700; }
.type-tabs { margin: 0 13px 12px; padding: 3px; display: grid; grid-template-columns: repeat(3, 1fr); border-radius: 10px; background: var(--panel-soft); border: 1px solid var(--line); }
.type-tabs button, .segmented button, .issue-filter button {
border: 0;
border-radius: 7px;
color: var(--text-dim);
background: transparent;
cursor: pointer;
}
.type-tabs button { padding: 8px 4px; font-size: 12px; font-weight: 600; }
.type-tabs button span { margin-left: 3px; font-size: 10px; opacity: .7; }
.type-tabs button.active, .segmented button.active, .issue-filter button.active { background: #292f3f; color: var(--text); box-shadow: 0 2px 8px rgb(0 0 0 / 18%); }
.search-box { margin: 0 13px 10px; height: 38px; display: grid; grid-template-columns: 24px 1fr auto; align-items: center; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel-soft); color: var(--text-dim); }
.search-box:focus-within { border-color: var(--mint-deep); }
.search-box input { min-width: 0; border: 0; outline: 0; color: var(--text); background: transparent; }
.search-box input::placeholder { color: #5f687c; }
.search-box kbd { border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; color: var(--text-dim); background: var(--panel-raised); font-size: 10px; }
.catalog-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 13px 10px; }
.catalog-filters label { display: grid; gap: 4px; color: var(--text-dim); font-size: 10px; }
select, input[type="text"], input[type="number"], textarea {
width: 100%;
color: var(--text);
border: 1px solid var(--line-strong);
border-radius: 8px;
background: var(--panel-soft);
}
select, input[type="text"], input[type="number"] { height: 34px; padding: 0 9px; }
textarea { min-height: 76px; padding: 9px; line-height: 1.5; resize: vertical; }
select { padding-right: 24px; }
.catalog-filters select { height: 32px; border-color: var(--line); font-size: 11px; }
.catalog-summary { padding: 1px 15px 9px; color: var(--text-dim); font-size: 11px; }
.entity-list { min-height: 0; overflow: auto; padding: 0 8px 18px; scrollbar-color: #3b4355 transparent; }
.stage-group-label { position: sticky; top: 0; z-index: 2; padding: 11px 8px 7px; color: var(--text-dim); background: linear-gradient(var(--panel) 72%, transparent); font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.entity-row { width: 100%; border: 1px solid transparent; border-radius: 9px; padding: 9px 9px 8px; display: grid; grid-template-columns: 27px 1fr auto; gap: 8px; align-items: center; text-align: left; background: transparent; cursor: pointer; }
.entity-row:hover { background: #1d2230; }
.entity-row.active { border-color: rgb(103 216 178 / 32%); background: linear-gradient(90deg, rgb(103 216 178 / 11%), rgb(103 216 178 / 3%)); }
.entity-icon { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 7px; color: var(--mint); background: rgb(103 216 178 / 9%); font-size: 12px; }
.entity-row[data-type="recipes"] .entity-icon { color: var(--violet); background: rgb(157 140 255 / 10%); }
.entity-row[data-type="machines"] .entity-icon { color: var(--gold); background: rgb(231 191 104 / 10%); }
.entity-copy { min-width: 0; display: grid; gap: 2px; }
.entity-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.entity-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-dim); font-size: 10px; font-family: Consolas, monospace; }
.entity-meta { max-width: 65px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-dim); font-size: 9px; }
.list-empty { padding: 36px 15px; text-align: center; color: var(--text-dim); line-height: 1.6; }
.graph-panel { display: grid; grid-template-rows: auto minmax(0, 1fr) 42px; background: #121620; }
.graph-header { min-height: 76px; padding: 15px 18px 12px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); background: var(--panel); }
.graph-title { min-width: 0; }
.graph-title h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.graph-title p { margin: 4px 0 0; color: var(--text-dim); font-size: 11px; }
.graph-controls { display: flex; align-items: center; gap: 8px; }
.segmented { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-soft); }
.segmented button { min-width: 48px; padding: 6px 8px; font-size: 11px; }
.depth-control { display: flex; align-items: center; gap: 6px; color: var(--text-dim); font-size: 11px; }
.depth-control select { width: 50px; height: 30px; border-color: var(--line); }
.depth-control.is-disabled { opacity: .35; pointer-events: none; }
.graph-stage {
position: relative;
min-height: 0;
overflow: hidden;
background-color: #11151e;
background-image:
linear-gradient(rgb(255 255 255 / 2.3%) 1px, transparent 1px),
linear-gradient(90deg, rgb(255 255 255 / 2.3%) 1px, transparent 1px),
radial-gradient(circle at 50% 45%, rgb(103 216 178 / 4%), transparent 42%);
background-size: 28px 28px, 28px 28px, 100% 100%;
}
#recipeGraph { width: 100%; height: 100%; display: block; cursor: grab; user-select: none; }
#recipeGraph.dragging { cursor: grabbing; }
.stage-band rect { fill: rgb(255 255 255 / 1.6%); stroke: rgb(255 255 255 / 4%); }
.stage-band text { fill: #606b81; font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.graph-edge { fill: none; stroke: #68748e; stroke-width: 1.4; opacity: .7; }
.graph-edge.output { stroke: #50cda7; marker-end: url(#arrowOutput); }
.graph-edge.catalyst, .graph-edge.state { stroke: var(--gold); stroke-dasharray: 5 4; }
.graph-edge.fluid { stroke: var(--blue); }
.graph-edge.machine { stroke: var(--gold); stroke-dasharray: 3 4; }
.graph-edge.consumed { marker-end: url(#arrowInput); }
.edge-label { fill: #77839a; font-size: 9px; paint-order: stroke; stroke: #11151e; stroke-width: 4px; }
.graph-node { cursor: pointer; }
.graph-node rect { stroke-width: 1; filter: drop-shadow(0 6px 8px rgb(0 0 0 / 18%)); }
.graph-node.item rect { fill: #1a2530; stroke: #355366; }
.graph-node.recipe rect { fill: #242035; stroke: #594f81; }
.graph-node.machine rect { fill: #2b261c; stroke: #665535; }
.graph-node.selected rect { stroke: var(--mint); stroke-width: 2.2; filter: drop-shadow(0 0 8px rgb(103 216 178 / 30%)); }
.graph-node text { pointer-events: none; }
.node-label { fill: #edf1f8; font-size: 12px; font-weight: 650; }
.node-subtitle { fill: #8490a7; font-size: 9px; }
.node-glyph { fill: var(--mint); font-size: 11px; }
.graph-node.recipe .node-glyph { fill: var(--violet); }
.graph-node.machine .node-glyph { fill: var(--gold); }
.graph-empty { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: var(--text-dim); pointer-events: none; }
.graph-empty[hidden] { display: none; }
.graph-empty span { color: var(--mint); font-size: 28px; }
.graph-empty strong { margin-top: 7px; color: var(--text-soft); }
.graph-empty p { margin: 5px 0 0; font-size: 11px; }
.zoom-tools { position: absolute; right: 14px; bottom: 14px; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: rgb(23 27 37 / 92%); box-shadow: var(--shadow); }
.zoom-tools button { width: 32px; height: 30px; border: 0; background: transparent; cursor: pointer; font-size: 17px; }
.zoom-tools button:hover { background: #272d3c; }
.zoom-tools output { min-width: 48px; padding: 0 5px; color: var(--text-dim); text-align: center; font-size: 10px; }
.graph-legend { position: absolute; left: 14px; bottom: 14px; display: flex; gap: 12px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--text-dim); background: rgb(23 27 37 / 90%); font-size: 9px; }
.graph-legend span { display: flex; align-items: center; gap: 5px; }
.graph-legend i { width: 13px; height: 7px; border: 1px solid #355366; border-radius: 2px; background: #1a2530; }
.graph-legend .legend-recipe { border-color: #594f81; background: #242035; }
.graph-legend .legend-catalyst { height: 0; border: 0; border-top: 1px dashed var(--gold); background: none; }
.graph-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 16px; border-top: 1px solid var(--line); color: var(--text-dim); background: var(--panel); font-size: 10px; }
#routeSummary { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.graph-hint { white-space: nowrap; }
.inspector-heading { border-bottom: 1px solid var(--line); }
.inspector-heading h2 { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entity-kind { flex: none; padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--text-dim); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.inspector-content { min-height: 0; overflow: auto; padding: 14px 14px 80px; scrollbar-color: #3b4355 transparent; }
.empty-inspector { display: grid; place-items: center; gap: 9px; padding: 80px 24px; text-align: center; color: var(--text-dim); line-height: 1.55; }
.empty-inspector span { color: var(--violet); font-size: 25px; }
.inspector-section { margin-bottom: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel-soft); }
.section-title { margin: 0 0 11px; display: flex; align-items: center; justify-content: space-between; color: var(--text-soft); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; }
.section-title button { border: 0; color: var(--mint); background: transparent; cursor: pointer; font-size: 11px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-field { min-width: 0; display: grid; align-content: start; gap: 5px; }
.form-field.full { grid-column: 1 / -1; }
.form-field > span { color: var(--text-dim); font-size: 10px; }
.field-help { color: #657088; font-size: 9px; line-height: 1.4; }
.id-field { font-family: Consolas, monospace; font-size: 11px; }
.checkbox-field { display: flex; align-items: center; gap: 7px; min-height: 34px; padding-top: 15px; color: var(--text-soft); font-size: 11px; }
.checkbox-field input { accent-color: var(--mint); }
.io-row { margin-bottom: 8px; padding: 9px; border: 1px solid var(--line); border-radius: 9px; background: #181d28; }
.io-row:last-child { margin-bottom: 0; }
.io-main { display: grid; grid-template-columns: minmax(0, 1fr) 74px 82px 28px; gap: 6px; align-items: center; }
.io-row.output .io-main { grid-template-columns: minmax(0, 1fr) 74px 28px; }
.io-extra { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 7px; }
.io-extra label { display: grid; gap: 3px; color: var(--text-dim); font-size: 8px; }
.io-row select, .io-row input { height: 30px; font-size: 10px; }
.row-delete { width: 28px; height: 28px; border: 0; border-radius: 6px; color: var(--red); background: rgb(239 113 128 / 8%); cursor: pointer; }
.row-delete:hover { background: rgb(239 113 128 / 16%); }
.inline-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.inline-stats div { padding: 9px; border-radius: 8px; background: #181d28; }
.inline-stats strong, .inline-stats span { display: block; }
.inline-stats strong { color: var(--text); font-size: 13px; }
.inline-stats span { margin-top: 3px; color: var(--text-dim); font-size: 8px; }
.dependency-links { display: flex; flex-wrap: wrap; gap: 5px; }
.dependency-links button { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--text-soft); background: #1b202c; cursor: pointer; font-size: 9px; }
.dependency-links button:hover { border-color: var(--mint-deep); color: var(--mint); }
.inspector-actions { display: flex; gap: 7px; }
.inspector-actions .danger { margin-left: auto; border-color: rgb(239 113 128 / 35%); color: #f48c99; }
.help-link { width: 100%; margin-top: 2px; color: var(--text-dim); border: 0; background: transparent; cursor: pointer; font-size: 10px; }
.help-link:hover { color: var(--mint); }
dialog { padding: 0; color: var(--text); border: 1px solid var(--line-strong); border-radius: 15px; background: var(--panel); box-shadow: 0 30px 100px rgb(0 0 0 / 55%); }
dialog::backdrop { background: rgb(6 8 12 / 72%); backdrop-filter: blur(4px); }
.issues-dialog { width: min(720px, calc(100vw - 32px)); max-height: min(760px, calc(100vh - 32px)); }
.help-dialog { width: min(620px, calc(100vw - 32px)); }
.dialog-shell { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; max-height: inherit; }
.dialog-shell > header { padding: 19px 20px 15px; display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.dialog-shell > header h2 { margin: 3px 0 0; font-size: 18px; }
.dialog-shell > header p { margin: 6px 0 0; color: var(--text-dim); font-size: 11px; }
.dialog-shell > footer { min-height: 58px; padding: 10px 18px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-top: 1px solid var(--line); color: var(--text-dim); font-size: 10px; }
.issue-filter { padding: 10px 18px; display: flex; gap: 7px; border-bottom: 1px solid var(--line); }
.issue-filter button { padding: 6px 11px; font-size: 10px; }
.issue-list { min-height: 170px; overflow: auto; padding: 9px 11px 15px; }
.issue-row { width: 100%; margin-bottom: 5px; padding: 10px; display: grid; grid-template-columns: 9px 1fr auto; gap: 10px; align-items: start; text-align: left; border: 1px solid transparent; border-radius: 9px; color: var(--text-soft); background: transparent; cursor: pointer; }
.issue-row:hover { border-color: var(--line); background: var(--panel-raised); }
.issue-dot { width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: var(--blue); }
.issue-row.error .issue-dot { background: var(--red); }
.issue-row.warning .issue-dot { background: var(--orange); }
.issue-copy { display: grid; gap: 3px; }
.issue-copy strong { color: var(--text); font-size: 11px; font-weight: 600; }
.issue-copy small, .issue-code { color: var(--text-dim); font-size: 9px; font-family: Consolas, monospace; }
.no-issues { padding: 45px 20px; text-align: center; color: var(--mint); }
.help-content { padding: 17px 22px 23px; overflow: auto; }
.help-content dl { display: grid; grid-template-columns: 70px 1fr; gap: 12px 16px; margin: 0; }
.help-content dt { color: var(--mint); font-weight: 700; }
.help-content dd { margin: 0; color: var(--text-soft); line-height: 1.55; }
.toast-stack { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: grid; gap: 8px; pointer-events: none; }
.toast { width: min(360px, calc(100vw - 36px)); padding: 11px 13px; border: 1px solid var(--line-strong); border-left: 3px solid var(--mint); border-radius: 9px; color: var(--text-soft); background: rgb(29 34 48 / 96%); box-shadow: var(--shadow); animation: toast-in .18s ease-out; }
.toast.error { border-left-color: var(--red); }
.toast.warning { border-left-color: var(--orange); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } }
@media (max-width: 1220px) {
.workspace { grid-template-columns: 255px minmax(430px, 1fr) 340px; }
.top-stats { display: none; }
.brand { min-width: 220px; }
.toolbar .button.ghost:nth-of-type(3), .toolbar .button.ghost:nth-of-type(4) { display: none; }
}
@media (max-width: 930px) {
body { overflow: auto; }
.app { min-height: 100%; height: auto; grid-template-rows: auto auto; }
.topbar { min-height: 66px; flex-wrap: wrap; padding-block: 10px; }
.brand { flex: 1; }
.save-state { display: none; }
.workspace { min-height: calc(100vh - 66px); grid-template-columns: 245px minmax(0, 1fr); grid-template-rows: minmax(520px, 64vh) minmax(520px, 64vh); }
.catalog { grid-row: 1 / span 2; }
.inspector { grid-column: 2; min-height: 520px; border-top: 1px solid var(--line); }
.graph-controls { flex-wrap: wrap; justify-content: flex-end; }
}
@media (max-width: 680px) {
.topbar { position: sticky; top: 0; }
.brand span:last-child { display: none; }
.brand { min-width: 0; }
.toolbar .button.ghost { display: none; }
.workspace { display: block; }
.catalog, .graph-panel, .inspector { min-height: 620px; overflow: hidden; }
.catalog { height: 70vh; }
.graph-panel { height: 78vh; }
.inspector { height: 78vh; }
.graph-header { align-items: flex-start; }
.graph-title p, .graph-hint { display: none; }
.graph-controls .compact { display: none; }
.inspector-heading h2 { max-width: 220px; }
}