Files
Emil c7e86663d8
MVP checks / mvp (push) Waiting to run
Expand voxel gameplay, lighting, full-height streaming and world imports
Add shared Rust/WASM physics, worker meshing and diagnostics, 64-chunk full-height streaming, atlas texture support, and baseline world import. Document the current implementation and include the supplied in-game lobby screenshot.
2026-09-17 02:10:53 +03:00

603 lines
10 KiB
CSS

:root {
font-family: Inter, "Segoe UI", system-ui, sans-serif;
color: #f0f2ed;
background: #a8c6d0;
font-size: 14px;
--panel: rgba(28, 35, 31, 0.97);
--line: #4a544b;
--muted: #b2beb0;
--accent: #c0d3a9;
}
* {
box-sizing: border-box;
}
html,
body {
margin: 0;
height: 100%;
overflow: hidden;
}
button,
input,
select {
font: inherit;
}
button {
color: inherit;
background: #39453b;
border: 1px solid #5d6a5d;
border-radius: 4px;
padding: 9px 12px;
cursor: pointer;
}
button:hover {
background: #4c5e4a;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
outline: 2px solid #dfefba;
outline-offset: 3px;
}
button:disabled {
opacity: 0.5;
cursor: wait;
}
button.primary {
background: var(--accent);
border-color: var(--accent);
color: #253021;
font-weight: 650;
}
input, select {
background: #202821;
color: #f4f4ef;
border: 1px solid #576255;
border-radius: 4px;
padding: 10px;
width: 100%;
}
input[type="range"] {
padding: 0;
accent-color: #b9ce9e;
}
kbd {
font-size: 10px;
font-family: inherit;
color: #d7dfd3;
border: 1px solid #82907d75;
border-radius: 3px;
padding: 2px 4px;
background: #17231c55;
white-space: nowrap;
}
button kbd {
margin-left: 6px;
}
#world-canvas {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
display: block;
cursor: crosshair;
}
.topbar {
position: absolute;
inset: 22px 24px auto;
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 20px;
pointer-events: none;
text-shadow: 0 1px 4px #213a4380;
}
.identity {
display: flex;
align-items: center;
gap: 12px;
}
.identity > div {
display: flex;
flex-direction: column;
gap: 2px;
}
.identity strong {
font-size: 19px;
letter-spacing: -0.4px;
line-height: 1.15;
}
.world-name {
border: 0;
background: none;
padding: 0;
text-align: left;
font-size: 12px;
color: #e2ece0;
text-shadow: 0 1px 3px #18241d;
pointer-events: auto;
}
.world-name:hover {
background: none;
color: white;
}
#connection {
align-self: center;
font-size: 11px;
color: #edf4e9;
background: #273b2cb5;
padding: 5px 8px;
border-radius: 3px;
margin-left: 10px;
}
#connection.bad {
background: #713e30;
}
nav {
display: flex;
gap: 7px;
pointer-events: auto;
}
nav button {
background: #26362ed6;
border-color: #e0efd333;
box-shadow: 0 2px 8px #1d342615;
font-size: 12px;
}
#menu-button {
padding-inline: 13px;
}
#crosshair {
position: absolute;
left: 50%;
top: 50%;
width: 13px;
height: 13px;
transform: translate(-50%, -50%);
pointer-events: none;
filter: drop-shadow(0 1px 1px #112019);
}
#crosshair:before,
#crosshair:after {
content: "";
position: absolute;
background: #fffdf5b3;
}
#crosshair:before {
left: 6px;
top: 0;
width: 1px;
height: 13px;
}
#crosshair:after {
left: 0;
top: 6px;
width: 13px;
height: 1px;
}
#target-label {
position: absolute;
left: 50%;
top: calc(50% + 28px);
transform: translateX(-50%);
font-size: 11px;
text-shadow: 0 1px 3px #172f21;
pointer-events: none;
opacity: 0.9;
}
footer {
position: absolute;
bottom: 23px;
left: 50%;
transform: translateX(-50%);
text-align: center;
pointer-events: none;
}
#selected-name {
font-size: 12px;
color: #fffdf6;
text-shadow: 0 1px 4px #163622;
margin-bottom: 9px;
min-height: 17px;
}
#hotbar {
display: flex;
gap: 3px;
background: #1b2a22b8;
border: 1px solid #e0e9d633;
padding: 5px;
border-radius: 5px;
pointer-events: auto;
box-shadow: 0 5px 20px #20352730;
}
.slot {
width: 49px;
height: 49px;
position: relative;
padding: 8px;
border: 1px solid #9cac9340;
background: #46513b8c;
border-radius: 2px;
display: grid;
place-items: center;
}
.slot.active {
background: #dce7b82e;
border: 2px solid #e6edbc;
padding: 7px;
}
.slot small {
position: absolute;
left: 3px;
top: 2px;
font-size: 9px;
color: #e8edde;
}
.swatch {
display: block;
width: 26px;
height: 26px;
image-rendering: pixelated;
background: var(--block-color, #aaaaaa);
box-shadow:
inset -6px -5px 0 #0003,
inset 4px 4px 0 #fff2;
transform: rotate(-2deg);
}
#play-hint {
font-size: 11px;
text-shadow: 0 1px 4px #15271c;
margin-top: 9px;
color: #e3e8d7;
white-space: nowrap;
}
.bottom-left {
position: absolute;
left: 24px;
bottom: 25px;
max-width: min(355px, 30vw);
pointer-events: none;
}
#hints {
display: flex;
flex-wrap: wrap;
gap: 7px 11px;
color: #e1e9db;
font-size: 10px;
line-height: 1.7;
text-shadow: 0 1px 3px #25392b;
}
#chat-log {
display: flex;
flex-direction: column;
gap: 4px;
margin-bottom: 14px;
font-size: 12px;
text-shadow: 0 1px 3px #000;
max-height: 180px;
overflow: hidden;
word-break: break-word;
}
#chat-log div {
background: #20332ba6;
padding: 5px 8px;
border-radius: 3px;
width: fit-content;
}
#chat-log .system {
color: #e3dfb5;
}
#chat-form {
pointer-events: auto;
margin-bottom: 10px;
width: min(400px, 80vw);
}
#chat-input {
font-size: 12px;
background: #20352bec;
}
#labels {
position: absolute;
inset: 0;
pointer-events: none;
overflow: hidden;
}
.player-label {
position: absolute;
white-space: nowrap;
font-size: 11px;
background: #203629a8;
padding: 3px 6px;
border-radius: 3px;
transform: translate(-50%, -100%);
}
.panel {
position: absolute;
top: 86px;
right: 24px;
width: 315px;
max-height: calc(100vh - 116px);
overflow: auto;
background: var(--panel);
border: 1px solid #93a38a66;
box-shadow: 0 10px 30px #10281933;
border-radius: 6px;
padding: 20px;
}
.panel-head {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 12px;
margin-bottom: 18px;
}
.panel-head h1 {
font-size: 18px;
font-weight: 650;
margin: 2px 0 0;
letter-spacing: -0.3px;
}
.panel-head button {
background: none;
border: 0;
font-size: 24px;
line-height: 20px;
padding: 0 2px;
color: #b6c4b1;
}
.panel-head p {
margin: 5px 0 0;
}
.panel label {
display: block;
font-size: 12px;
color: #c8d3c2;
margin-bottom: 7px;
}
.muted {
color: var(--muted);
font-size: 12px;
line-height: 1.6;
}
.wide {
display: block;
width: 100%;
margin-top: 10px;
}
.inline {
display: flex;
gap: 6px;
margin-bottom: 20px;
}
.inline input, .inline select {
min-width: 0;
}
.inline button {
font-size: 11px;
padding: 8px;
}
.rule {
border-top: 1px solid var(--line);
margin: 20px 0;
}
.world-row {
display: block;
width: 100%;
text-align: left;
margin-top: 8px;
background: #2c382f;
}
.world-row small {
display: block;
color: var(--muted);
font-size: 11px;
margin-top: 4px;
}
.world-row.current {
border-color: #bacda4;
}
.library {
width: min(610px, calc(100vw - 48px));
padding-bottom: 16px;
}
.library #catalog-search {
position: sticky;
top: 0;
z-index: 1;
}
#catalog-list {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 7px;
max-height: 55vh;
overflow: auto;
}
.catalog-item {
display: flex;
gap: 9px;
align-items: center;
min-width: 0;
text-align: left;
background: #2f3a30;
padding: 10px;
font-size: 11px;
}
.catalog-item .swatch {
flex-shrink: 0;
width: 22px;
height: 22px;
}
.catalog-item > span:last-child {
min-width: 0;
overflow-wrap: anywhere;
}
.catalog-item small {
display: block;
font-size: 9px;
color: #aebca6;
margin-top: 5px;
overflow-wrap: anywhere;
}
.catalog-empty {
grid-column: 1/-1;
color: var(--muted);
padding: 20px 0;
}
.diagnostics dl {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 9px 10px;
font-size: 12px;
margin: 0 0 20px;
}
.diagnostics dt {
color: #aebeaa;
}
.diagnostics dd {
margin: 0;
text-align: right;
font-variant-numeric: tabular-nums;
overflow-wrap: anywhere;
}
#toast {
position: absolute;
top: 90px;
left: 50%;
transform: translateX(-50%);
background: #263a2cf2;
border: 1px solid #b7cba380;
border-radius: 4px;
padding: 11px 16px;
font-size: 13px;
max-width: min(580px, 90vw);
text-align: center;
box-shadow: 0 2px 10px #0002;
}
#toast.error {
background: #633c2ff5;
border-color: #d0a68f;
}
#match {
position: absolute;
top: 92px;
left: 24px;
background: #26392cd6;
border: 1px solid #e2e3c24a;
padding: 12px 16px;
border-radius: 4px;
font-size: 13px;
max-width: 360px;
}
#fatal {
position: absolute;
inset: 30% 20% auto;
background: #312e25ed;
border: 1px solid #d4b696;
padding: 30px;
line-height: 1.6;
border-radius: 5px;
}
body.locked .topbar,
body.locked #hints,
body.locked #play-hint {
opacity: 0.35;
}
body.locked .topbar:hover {
opacity: 1;
}
[hidden] {
display: none !important;
}
@media (max-width: 850px) {
.topbar {
inset: 14px 14px auto;
}
.identity {
gap: 8px;
}
#connection {
margin-left: 1px;
font-size: 10px;
}
nav button {
font-size: 11px;
padding: 9px 8px;
}
nav kbd {
display: none;
}
.bottom-left {
left: 14px;
bottom: 115px;
max-width: 75vw;
}
#hints {
display: none;
}
footer {
bottom: 14px;
}
.panel {
right: 14px;
top: 77px;
max-height: calc(100vh - 94px);
}
.slot {
width: 40px;
height: 44px;
}
#play-hint {
white-space: normal;
width: 360px;
font-size: 10px;
}
#catalog-list {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
@media (max-width: 520px) {
.identity strong {
font-size: 15px;
}
.identity svg {
width: 22px;
}
.topbar {
gap: 6px;
}
#connection {
display: none;
}
#diagnostics-button {
font-size: 0;
}
#diagnostics-button:before {
content: "F3";
font-size: 12px;
}
.slot {
width: 34px;
height: 40px;
padding: 6px;
}
.swatch {
width: 23px;
height: 23px;
}
.library {
width: calc(100vw - 28px);
}
#target-label {
max-width: 90vw;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
#fatal {
inset: 25% 14px auto;
}
}
/* Keep the live readout beside menus, while the world remains interactive. */
#diagnostics { left: 24px; right: auto; }