503 lines
8.5 KiB
CSS
503 lines
8.5 KiB
CSS
:root {
|
|
--bg: #201f1c;
|
|
--panel: #29271f;
|
|
--panel-2: #322f26;
|
|
--line: #4a4536;
|
|
--grid-line: rgba(196, 178, 138, 0.08);
|
|
--ink: #e9e2d2;
|
|
--ink-dim: #a89f8a;
|
|
--accent-source: #7fae6a;
|
|
--accent-storage: #a89f8a;
|
|
--accent-converter: #d9a441;
|
|
--accent-consumer: #c15a4e;
|
|
--edge-color: #8a8a8a;
|
|
--danger: #c15a4e;
|
|
--mono: 'IBM Plex Mono', ui-monospace, monospace;
|
|
--display: 'Space Grotesk', ui-sans-serif, sans-serif;
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
html,
|
|
body,
|
|
#root {
|
|
margin: 0;
|
|
height: 100%;
|
|
background: var(--bg);
|
|
color: var(--ink);
|
|
font-family: var(--mono);
|
|
font-size: 10pt;
|
|
}
|
|
|
|
#app {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100vh;
|
|
}
|
|
|
|
/* ---------------------------------------------------------- top bar --- */
|
|
|
|
.topbar {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 20px;
|
|
padding: 12px 20px;
|
|
background: var(--panel);
|
|
border-bottom: 1px solid var(--line);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.topbar__title {
|
|
font-family: var(--display);
|
|
font-weight: 700;
|
|
font-size: 150%;
|
|
letter-spacing: 0.06em;
|
|
text-transform: uppercase;
|
|
color: var(--ink);
|
|
margin: 0;
|
|
border-right: 1px solid var(--line);
|
|
padding-right: 16px;
|
|
}
|
|
|
|
.topbar__title span {
|
|
display: block;
|
|
font-family: var(--mono);
|
|
font-weight: 400;
|
|
letter-spacing: 0.04em;
|
|
color: var(--ink-dim);
|
|
text-transform: none;
|
|
margin-top: 2px;
|
|
}
|
|
|
|
.tick-counter {
|
|
font-family: var(--mono);
|
|
color: var(--ink-dim);
|
|
background: var(--panel-2);
|
|
border: 1px solid var(--line);
|
|
padding: 6px 12px;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.tick-counter b {
|
|
color: var(--accent-converter);
|
|
}
|
|
|
|
.spacer {
|
|
flex: 1;
|
|
}
|
|
|
|
.btn {
|
|
font-family: var(--mono);
|
|
font-weight: 500;
|
|
letter-spacing: 0.03em;
|
|
border: 1px solid var(--line);
|
|
background: var(--panel-2);
|
|
color: var(--ink);
|
|
padding: 9px 16px;
|
|
border-radius: 3px;
|
|
cursor: pointer;
|
|
transition: border-color 0.12s, transform 0.05s;
|
|
}
|
|
|
|
.btn:hover {
|
|
border-color: var(--ink-dim);
|
|
}
|
|
|
|
.btn:active {
|
|
transform: translateY(1px);
|
|
}
|
|
|
|
.btn:focus-visible {
|
|
outline: 2px solid var(--accent-converter);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
.btn--primary {
|
|
background: var(--accent-converter);
|
|
border-color: var(--accent-converter);
|
|
color: #201f1c;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.btn--primary:hover {
|
|
border-color: #f0c169;
|
|
}
|
|
|
|
.btn--danger {
|
|
background: transparent;
|
|
border-color: var(--danger);
|
|
color: var(--danger);
|
|
margin-top: 14px;
|
|
width: 100%;
|
|
}
|
|
|
|
.btn--danger:hover {
|
|
background: rgba(193, 90, 78, 0.12);
|
|
}
|
|
|
|
.btn--ghost {
|
|
background: transparent;
|
|
border-style: dashed;
|
|
color: var(--ink-dim);
|
|
width: 100%;
|
|
margin-top: 4px;
|
|
}
|
|
|
|
.btn--icon {
|
|
padding: 4px 8px;
|
|
}
|
|
|
|
select {
|
|
font-family: var(--mono);
|
|
background: var(--panel-2);
|
|
color: var(--ink);
|
|
border: 1px solid var(--line);
|
|
border-radius: 3px;
|
|
padding: 8px 10px;
|
|
}
|
|
|
|
/* --------------------------------------------------------------- main --- */
|
|
|
|
.main {
|
|
flex: 1;
|
|
display: flex;
|
|
min-height: 0;
|
|
}
|
|
|
|
/* ------------------------------------------------------------- world --- */
|
|
|
|
.world-wrap {
|
|
flex: 1;
|
|
overflow: auto;
|
|
position: relative;
|
|
background-color: var(--bg);
|
|
background-image:
|
|
linear-gradient(var(--grid-line) 1px, transparent 1px),
|
|
linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
|
|
background-size: 24px 24px;
|
|
}
|
|
|
|
#world {
|
|
position: relative;
|
|
width: 1600px;
|
|
height: 900px;
|
|
}
|
|
|
|
#world>svg {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 1600px;
|
|
height: 900px;
|
|
pointer-events: none;
|
|
}
|
|
|
|
#world>svg line {
|
|
pointer-events: stroke;
|
|
}
|
|
|
|
.node {
|
|
position: absolute;
|
|
background: var(--panel);
|
|
border: 1px solid var(--line);
|
|
border-left: 4px solid var(--accent-storage);
|
|
border-radius: 4px;
|
|
padding: 0.25em 0.5em;
|
|
cursor: grab;
|
|
user-select: none;
|
|
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
|
|
touch-action: none;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.25em;
|
|
}
|
|
|
|
.node:active {
|
|
cursor: grabbing;
|
|
}
|
|
|
|
.node.is-selected {
|
|
border-left-width: 4px;
|
|
outline: 1.5px dashed var(--ink);
|
|
outline-offset: 3px;
|
|
}
|
|
|
|
.node--source {
|
|
border-left-color: var(--accent-source);
|
|
}
|
|
|
|
.node--storage {
|
|
border-left-color: var(--accent-storage);
|
|
}
|
|
|
|
.node--converter {
|
|
border-left-color: var(--accent-converter);
|
|
}
|
|
|
|
.node--consumer {
|
|
border-left-color: var(--accent-consumer);
|
|
}
|
|
|
|
.unit__id {
|
|
font-family: var(--display);
|
|
font-weight: 200;
|
|
color: var(--ink);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.unit__title {
|
|
font-family: var(--display);
|
|
font-weight: 600;
|
|
font-size: 125%;
|
|
color: var(--ink);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.unit__kind {
|
|
letter-spacing: 0.05em;
|
|
text-transform: uppercase;
|
|
color: var(--ink-dim);
|
|
}
|
|
|
|
.unit__resources {
|
|
background: #171613;
|
|
border: 1px solid var(--line);
|
|
border-radius: 3px;
|
|
padding: 4px 6px;
|
|
letter-spacing: 0.02em;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.unit__links {
|
|
background: #171613;
|
|
border: 1px solid var(--line);
|
|
border-radius: 3px;
|
|
padding: 4px 6px;
|
|
letter-spacing: 0.02em;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.unit__converter__progress {
|
|
font-size: 75%;
|
|
background: #171613;
|
|
border: 1px solid var(--line);
|
|
border-radius: 3px;
|
|
padding: 1px 6px;
|
|
letter-spacing: 0.02em;
|
|
white-space: nowrap;
|
|
position: relative;
|
|
overflow: hidden;
|
|
min-height: 10px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.unit__converter__progress_bar {
|
|
position: absolute;
|
|
inset: 0;
|
|
z-index: 1;
|
|
background: linear-gradient(90deg, var(--accent-converter), #f0c169);
|
|
opacity: 0.3;
|
|
transition: width 0.15s ease-out;
|
|
}
|
|
|
|
.unit__converter__progress_info {
|
|
position: relative;
|
|
z-index: 2;
|
|
color: var(--ink);
|
|
}
|
|
|
|
.unit__sockets {
|
|
position: absolute;
|
|
top: 0;
|
|
bottom: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
.unit__sockets--input {
|
|
left: -5px;
|
|
}
|
|
|
|
.unit__sockets--output {
|
|
right: -5px;
|
|
}
|
|
|
|
.unit__socket {
|
|
width: 10px;
|
|
height: 10px;
|
|
border-radius: 50%;
|
|
border: 1.5px solid var(--panel);
|
|
box-shadow: 0 0 0 1px var(--edge-color);
|
|
}
|
|
|
|
/* ------------------------------------------------------------ sidebar --- */
|
|
|
|
.sidebar {
|
|
width: 340px;
|
|
flex-shrink: 0;
|
|
background: var(--panel);
|
|
border-left: 1px solid var(--line);
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.sidebar__section {
|
|
padding: 14px 16px;
|
|
border-bottom: 1px solid var(--line);
|
|
}
|
|
|
|
.sidebar__section--grow {
|
|
flex: 1;
|
|
border-bottom: none;
|
|
}
|
|
|
|
.sidebar__section h4 {
|
|
font-family: var(--display);
|
|
font-size: 11px;
|
|
letter-spacing: 0.08em;
|
|
text-transform: uppercase;
|
|
color: var(--ink-dim);
|
|
margin: 0 0 8px;
|
|
}
|
|
|
|
.sidebar__list {
|
|
list-style: none;
|
|
margin: 0;
|
|
padding: 0;
|
|
max-height: 140px;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.sidebar__list li {
|
|
padding: 6px 8px;
|
|
font-size: 11.5px;
|
|
border-radius: 3px;
|
|
cursor: pointer;
|
|
color: var(--ink-dim);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.sidebar__list li:hover {
|
|
background: var(--panel-2);
|
|
color: var(--ink);
|
|
}
|
|
|
|
.sidebar__list li.is-active {
|
|
background: var(--panel-2);
|
|
color: var(--accent-converter);
|
|
}
|
|
|
|
#sidebar-content {
|
|
padding: 16px 0 0;
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
#sidebar-content h3 {
|
|
font-family: var(--display);
|
|
font-size: 13px;
|
|
color: var(--ink);
|
|
margin: 0 0 14px;
|
|
word-break: break-all;
|
|
}
|
|
|
|
.hint {
|
|
color: var(--ink-dim);
|
|
font-size: 11.5px;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.field {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 5px;
|
|
margin-bottom: 12px;
|
|
font-size: 11px;
|
|
color: var(--ink-dim);
|
|
}
|
|
|
|
.field input,
|
|
.field select {
|
|
font-family: var(--mono);
|
|
font-size: 12px;
|
|
background: var(--panel-2);
|
|
color: var(--ink);
|
|
border: 1px solid var(--line);
|
|
border-radius: 3px;
|
|
padding: 7px 9px;
|
|
width: 100%;
|
|
}
|
|
|
|
.field input:focus-visible,
|
|
.field select:focus-visible {
|
|
outline: 2px solid var(--accent-converter);
|
|
outline-offset: 1px;
|
|
}
|
|
|
|
.coord-row {
|
|
display: flex;
|
|
gap: 8px;
|
|
}
|
|
|
|
.coord-row input {
|
|
width: 50%;
|
|
}
|
|
|
|
.recipe-box {
|
|
border: 1px solid var(--line);
|
|
border-radius: 4px;
|
|
padding: 10px;
|
|
margin-bottom: 12px;
|
|
background: var(--panel-2);
|
|
}
|
|
|
|
.recipe-box__title {
|
|
font-size: 10.5px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.06em;
|
|
color: var(--ink-dim);
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.recipe-row {
|
|
display: flex;
|
|
gap: 6px;
|
|
margin-bottom: 6px;
|
|
align-items: center;
|
|
}
|
|
|
|
.recipe-row select {
|
|
flex: 1.4;
|
|
}
|
|
|
|
.recipe-row input {
|
|
flex: 1;
|
|
}
|
|
|
|
::-webkit-scrollbar {
|
|
width: 9px;
|
|
height: 9px;
|
|
}
|
|
|
|
::-webkit-scrollbar-track {
|
|
background: var(--bg);
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb {
|
|
background: var(--line);
|
|
border-radius: 5px;
|
|
} |