Files
forma-engine/engine/player.css
T

158 lines
2.4 KiB
CSS

* {
box-sizing: border-box;
}
html,
body {
width: 100%;
height: 100%;
margin: 0;
overflow: hidden;
background: #dcd9d0;
font-family: system-ui, sans-serif;
}
#game {
display: block;
width: 100%;
height: 100%;
touch-action: none;
}
#game-ui {
position: fixed;
inset: 0;
pointer-events: none;
color: #f5f4df;
}
.loading {
position: absolute;
inset: 0;
display: grid;
place-items: center;
color: #6b7859;
}
button {
pointer-events: auto;
border: 1px solid #f4f4dc66;
border-radius: 6px;
padding: 10px 15px;
background: #eff1e4de;
color: #556646;
cursor: pointer;
font: 12px system-ui;
}
.hud {
position: absolute;
left: 24px;
right: 24px;
top: 24px;
display: flex;
justify-content: space-between;
align-items: start;
}
.hud > div {
display: flex;
flex-direction: column;
gap: 6px;
background: #3e5235d9;
border: 1px solid #a0b08466;
border-radius: 7px;
padding: 15px 19px;
}
.hud strong {
font-size: 19px;
font-weight: 500;
}
.hud small {
font-size: 10px;
color: #c6d2ad;
}
.touch {
display: none;
position: absolute;
left: 30px;
right: 30px;
bottom: max(28px, env(safe-area-inset-bottom));
align-items: center;
justify-content: space-between;
}
#stick {
width: 112px;
height: 112px;
pointer-events: auto;
touch-action: none;
border: 2px solid #fff6;
border-radius: 50%;
background: #334b3355;
display: flex;
align-items: center;
justify-content: center;
}
#stick i {
width: 48px;
height: 48px;
border-radius: 50%;
background: #fffa;
}
.actions button {
touch-action: none;
width: 85px;
height: 85px;
border: 2px solid #fff6;
border-radius: 50%;
background: #a6775cc4;
color: white;
font-size: 24px;
padding: 0;
}
#error {
position: absolute;
left: 20px;
right: 20px;
bottom: 10px;
max-height: 150px;
overflow: auto;
background: #80553deb;
padding: 13px;
border-radius: 6px;
font: 11px monospace;
}
#error[hidden] {
display: none;
}
@media (pointer: coarse), (max-width: 760px) {
.touch {
display: flex;
}
.hud {
top: 15px;
left: 15px;
right: 15px;
}
.hud strong {
font-size: 16px;
}
.hud small {
display: none;
}
.hud > div {
padding: 12px;
}
.hud button {
font-size: 10px;
padding: 10px;
}
}
@media (prefers-reduced-motion: reduce) {
* {
transition: none !important;
}
}
.hud nav,
.actions {
display: flex;
gap: 10px;
}
.hud nav {
pointer-events: auto;
}