Files
walkersim/styles.css

587 lines
9.6 KiB
CSS

:root {
color-scheme: dark;
--bg: #15181d;
--panel: #1d222b;
--text: #ecf0f5;
--muted: #a7b1bf;
--accent: #5fb3ff;
--viewport-height: 100dvh;
}
* {
box-sizing: border-box;
}
html,
body {
overflow-x: hidden;
max-width: 100vw;
}
body {
margin: 0;
font-family: Inter, Segoe UI, Roboto, Arial, sans-serif;
background: var(--bg);
color: var(--text);
line-height: 1.4;
min-height: var(--viewport-height);
}
.status-light {
position: fixed;
top: 12px;
right: 12px;
width: 18px;
height: 18px;
border-radius: 4px;
border: 1px solid rgba(215, 239, 255, 0.95);
background: #8cd8ff;
box-shadow:
0 0 8px rgba(129, 210, 255, 0.85),
0 0 20px rgba(102, 196, 255, 0.55);
animation: status-light-flash 1s ease-in-out infinite;
transform: scale(var(--beat-scale, 1));
opacity: var(--beat-opacity, 1);
pointer-events: none;
z-index: 1000;
}
@keyframes status-light-flash {
0%,
100% {
background: #97e2ff;
box-shadow:
0 0 10px rgba(145, 221, 255, 0.9),
0 0 24px rgba(104, 200, 255, 0.6);
filter: brightness(1.15) saturate(1.1);
}
35% {
background: #d8f7ff;
box-shadow:
0 0 24px rgba(216, 247, 255, 0.95),
0 0 42px rgba(146, 218, 255, 0.7);
filter: brightness(1.45) saturate(1.2);
}
70% {
background: #61c9ff;
box-shadow:
0 0 6px rgba(102, 201, 255, 0.8),
0 0 14px rgba(87, 185, 245, 0.45);
filter: brightness(0.88) saturate(0.95);
}
}
.app {
display: grid;
grid-template-columns: 1fr 320px;
height: var(--viewport-height);
max-width: 100vw;
overflow: hidden;
}
/* ── Mobile view toggle (hidden on desktop) ── */
.mobile-view-toggle {
display: none;
}
.views-wrap {
padding: 12px;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 12px;
min-height: 0;
height: 100%;
width: 100%;
max-width: 100%;
min-width: 0;
overflow-x: hidden;
}
.views-wrap.single-view {
grid-template-columns: 1fr;
}
.view-panel {
width: 100%;
max-width: 100%;
min-width: 0;
min-height: 0;
display: flex;
flex-direction: column;
}
.view-panel h2 {
margin: 0 0 8px;
}
.canvas-container {
width: 100%;
max-width: 100%;
height: auto;
min-height: clamp(140px, 24vh, 260px);
background: #0f1116;
border: 1px solid #2a3342;
border-radius: 8px;
overflow: hidden;
position: relative;
flex: 1 1 0%;
margin: 0 auto;
}
#sim-canvas {
width: 100%;
max-width: 100%;
height: 100%;
display: block;
}
.sim-3d {
width: 100%;
max-width: 100%;
height: auto;
background: #0f1116;
border: 1px solid #2a3342;
border-radius: 8px;
min-height: clamp(140px, 24vh, 260px);
overflow: hidden;
flex: 1 1 0%;
margin: 0 auto;
}
.sim-3d canvas {
width: 100%;
max-width: 100%;
height: 100%;
display: block;
}
.panel {
background: var(--panel);
border-left: 1px solid #2a3342;
padding: 16px;
min-width: 0;
overflow-y: auto;
}
#tweakpane-root {
margin-bottom: 12px;
}
.audio-debug {
margin: 0 0 12px;
padding: 8px;
border: 1px solid #2a3342;
border-radius: 8px;
background: #121720;
}
.audio-debug h2 {
margin: 0 0 8px;
font-size: 0.85rem;
color: var(--muted);
}
.audio-debug-meta {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
margin-bottom: 8px;
font-size: 0.78rem;
color: #b8c6d9;
font-variant-numeric: tabular-nums;
}
.beat-flash {
width: 10px;
height: 10px;
border-radius: 2px;
background: #2a3342;
box-shadow: 0 0 0 rgba(140, 216, 255, 0);
transition: background 80ms ease, box-shadow 80ms ease, transform 80ms ease;
}
.beat-flash.active {
background: #d8f7ff;
box-shadow:
0 0 8px rgba(190, 234, 255, 0.85),
0 0 18px rgba(114, 199, 255, 0.6);
transform: scale(1.25);
}
#audio-debug-canvas {
width: 100%;
height: 120px;
display: block;
border: 1px solid #2b3648;
border-radius: 6px;
background: #0a0d13;
}
#tweakpane-root .tp-dfwv {
width: 100%;
}
h1 {
margin: 0 0 14px;
font-size: 1.1rem;
}
h2 {
margin: 12px 0 8px;
font-size: 0.95rem;
}
.settings-section {
margin: 14px 0;
}
.settings-section > summary {
cursor: pointer;
font-size: 0.95rem;
font-weight: 600;
list-style: none;
margin: 0;
}
.settings-section > summary::-webkit-details-marker {
display: none;
}
.settings-section > summary::before {
content: '>';
display: inline-block;
margin-right: 6px;
transform: translateY(-1px);
}
.settings-section[open] > summary::before {
content: 'v';
}
.row {
display: grid;
grid-template-columns: 1fr;
gap: 6px;
margin-bottom: 12px;
}
.row output {
color: var(--muted);
font-variant-numeric: tabular-nums;
}
.buttons {
grid-template-columns: 1fr 1fr;
}
.buttons.single {
grid-template-columns: 1fr;
}
button {
background: #2b3850;
border: 1px solid #3d5274;
color: var(--text);
border-radius: 6px;
padding: 8px 10px;
cursor: pointer;
}
button:hover {
background: #35486a;
}
input[type='range'] {
width: 100%;
}
input[type='text'],
select {
width: 100%;
background: #10141b;
color: var(--text);
border: 1px solid #2f3a4d;
border-radius: 6px;
padding: 8px;
}
.check {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 8px;
}
.diag pre {
margin: 0;
background: #10141b;
border: 1px solid #2a3342;
border-radius: 6px;
padding: 10px;
white-space: pre-wrap;
color: #d4dbe7;
line-height: 1.3;
font-size: 12px;
}
.mujoco-import {
padding: 10px;
border: 1px solid #2a3342;
border-radius: 8px;
background: #141922;
}
.mujoco-import > summary {
margin-bottom: 8px;
}
.mujoco-import:not([open]) {
padding-bottom: 10px;
}
.mujoco-import p {
margin: 0 0 8px;
color: var(--muted);
font-size: 0.86rem;
}
.mujoco-import input[type='file'] {
width: 100%;
margin-bottom: 8px;
}
.mujoco-playback {
margin-top: 10px;
padding-top: 10px;
border-top: 1px solid #2a3342;
}
.mujoco-playback label {
display: block;
margin: 8px 0 4px;
color: var(--muted);
font-size: 0.84rem;
}
.mujoco-playback output {
display: block;
margin-top: 4px;
color: #d4dbe7;
font-size: 0.82rem;
font-variant-numeric: tabular-nums;
}
.mujoco-playback .check {
margin: 0;
justify-content: center;
}
:root[data-mobile-layout='1'] .app {
grid-template-columns: 1fr;
grid-template-rows: minmax(0, 1fr) auto;
}
:root[data-mobile-layout='1'] .panel {
border-left: 0;
border-top: 1px solid #2a3342;
padding: 12px;
}
:root[data-mobile-layout='1'] .views-wrap {
grid-template-columns: 1fr;
min-height: 0;
padding: 8px;
gap: 8px;
}
:root[data-mobile-layout='1'] .mobile-view-toggle {
display: flex;
gap: 0;
border-radius: 8px;
overflow: hidden;
border: 1px solid #3d5274;
margin-bottom: 8px;
}
:root[data-mobile-layout='1'] .toggle-btn {
flex: 1;
padding: 10px 0;
border: none;
border-radius: 0;
background: #1d222b;
color: var(--muted);
font-size: 0.9rem;
font-weight: 600;
cursor: pointer;
transition: background 0.15s, color 0.15s;
min-height: 0;
}
:root[data-mobile-layout='1'] .toggle-btn.active {
background: var(--accent);
color: #111;
}
:root[data-mobile-layout='1'] .views-wrap[data-mobile-view="3d"] #view-2d-panel {
display: none;
}
:root[data-mobile-layout='1'] .views-wrap[data-mobile-view="2d"] #view-3d-panel {
display: none;
}
:root[data-mobile-layout='1'] .view-panel h2 {
display: none;
}
:root[data-mobile-layout='1'] .canvas-container,
:root[data-mobile-layout='1'] .sim-3d {
min-height: clamp(130px, 30vh, 220px);
border-radius: 6px;
}
@media (max-width: 1100px), (hover: none) and (pointer: coarse) {
.app {
grid-template-columns: 1fr;
grid-template-rows: minmax(0, 1fr) auto;
}
.panel {
border-left: 0;
border-top: 1px solid #2a3342;
}
.views-wrap {
grid-template-columns: 1fr;
min-height: 0;
}
.canvas-container,
.sim-3d {
aspect-ratio: auto;
height: auto;
min-height: clamp(140px, 28vh, 240px);
}
}
@media (max-width: 768px), (hover: none) and (pointer: coarse) {
.mobile-view-toggle {
display: flex;
gap: 0;
border-radius: 8px;
overflow: hidden;
border: 1px solid #3d5274;
margin-bottom: 8px;
}
.toggle-btn {
flex: 1;
padding: 10px 0;
border: none;
border-radius: 0;
background: #1d222b;
color: var(--muted);
font-size: 0.9rem;
font-weight: 600;
cursor: pointer;
transition: background 0.15s, color 0.15s;
min-height: 0;
}
.toggle-btn.active {
background: var(--accent);
color: #111;
}
/* Hide the inactive view panel on mobile */
.views-wrap[data-mobile-view="3d"] #view-2d-panel {
display: none;
}
.views-wrap[data-mobile-view="2d"] #view-3d-panel {
display: none;
}
/* Hide h2 titles on mobile (toggle replaces them) */
.view-panel h2 {
display: none;
}
.views-wrap {
padding: 8px;
gap: 8px;
}
.canvas-container,
.sim-3d {
aspect-ratio: auto;
min-height: clamp(130px, 30vh, 220px);
border-radius: 6px;
}
.panel {
padding: 12px;
}
h1 {
font-size: 1rem;
margin-bottom: 10px;
}
h2 {
margin-top: 10px;
font-size: 0.9rem;
}
.row {
margin-bottom: 10px;
}
button,
input[type='text'],
select {
min-height: 40px;
}
}
@media (max-width: 480px) {
.status-light {
top: 8px;
right: 8px;
width: 14px;
height: 14px;
border-radius: 3px;
}
.views-wrap {
padding: 6px;
gap: 6px;
}
.canvas-container,
.sim-3d {
aspect-ratio: auto;
min-height: clamp(120px, 28vh, 190px);
}
.panel {
padding: 10px;
}
#audio-debug-canvas {
height: 96px;
}
.buttons {
grid-template-columns: 1fr;
}
.diag pre {
font-size: 11px;
padding: 8px;
}
}