Spaces:
Running
Running
Download css/style.css from townbox/motionbricks-playground: direct link, hf CLI and curl.
- Browser
- Download file 15.8 kB
-
https://huggingface.co/spaces/townbox/motionbricks-playground/resolve/main/css/style.css
- Command line
-
hf download hf://spaces/townbox/motionbricks-playground/css/style.css
-
curl -L -o style.css https://huggingface.co/spaces/townbox/motionbricks-playground/resolve/main/css/style.css
15.8 kB
| /* Neutral and borderless, after the Pi Web / Trace tokens: surfaces one step off the canvas, a grey accent, and | |
| hue only for what the model sees (context in violet, targets and generated motion in teal, as in the 3D scene). */ | |
| :root { | |
| --canvas: #0a0a0a; | |
| --glass: rgba(18, 18, 18, 0.8); | |
| --surface-hover: rgba(255, 255, 255, 0.08); | |
| --selected: rgba(255, 255, 255, 0.14); | |
| --elevated: #212121; | |
| --subtle: rgba(255, 255, 255, 0.05); | |
| --line: #2e2e2e; | |
| --ink: #ededed; | |
| --ink-body: #d4d4d4; | |
| --ink-muted: #a3a3a3; | |
| --ink-faint: #8a8a8a; | |
| --accent: #e5e5e5; | |
| --on-accent: #0a0a0a; | |
| --bad: #ff6467; | |
| --scrim: rgba(0, 0, 0, 0.6); | |
| --shadow-pop: 0 12px 36px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.4); | |
| --ctx: #a78bfa; | |
| --tgt: #5eead4; | |
| --sans: Geist, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; | |
| --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; | |
| --gutter: 12px; | |
| color-scheme: dark; | |
| } | |
| * { box-sizing: border-box; } | |
| html, body { margin: 0; height: 100%; overflow: hidden; background: var(--canvas); color: var(--ink-body); font: 13px/20px var(--sans); -webkit-font-smoothing: antialiased; } | |
| #stage, #stage canvas { position: fixed; inset: 0; display: block; touch-action: none; } | |
| button { font: inherit; color: inherit; cursor: pointer; } | |
| :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; } | |
| .glass { background: var(--glass); border-radius: 10px; backdrop-filter: blur(16px) saturate(1.1); -webkit-backdrop-filter: blur(16px) saturate(1.1); } | |
| kbd { font: 500 11px/16px var(--mono); padding: 0 4px; border-radius: 4px; background: var(--subtle); color: var(--ink-muted); } | |
| .icon { display: block; flex: none; } | |
| [data-icon] { display: inline-flex; } | |
| .icon-btn { width: 28px; height: 28px; display: inline-grid; place-items: center; border: 0; border-radius: 6px; background: var(--glass); color: var(--ink-muted); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); transition: background 0.12s, color 0.12s; } | |
| .icon-btn:hover { background: var(--elevated); color: var(--ink); } | |
| .btn { height: 32px; padding: 0 12px; border: 0; border-radius: 6px; background: var(--subtle); color: var(--ink); font-weight: 500; transition: background 0.12s; } | |
| .btn:hover { background: var(--surface-hover); } | |
| /* ------------------------------------------------------------------------------------------- header */ | |
| #title { position: fixed; top: var(--gutter); left: var(--gutter); display: flex; align-items: center; gap: 10px; } | |
| #title .brand { display: flex; align-items: center; gap: 8px; font-size: 15px; line-height: 22px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; } | |
| #title .brand small { font-size: 15px; font-weight: 400; color: var(--ink-muted); } | |
| #title .mark { fill: var(--ink); } | |
| #title .sub { font-size: 12px; line-height: 16px; color: var(--ink-faint); } | |
| #about-open { width: 24px; height: 24px; margin-left: -2px; background: none; color: var(--ink-faint); backdrop-filter: none; -webkit-backdrop-filter: none; } | |
| #about-open:hover { background: var(--subtle); color: var(--ink); } | |
| #title .brand, #title .sub { text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6); } | |
| /* ------------------------------------------------------------------------------------------- stats */ | |
| #stats { position: fixed; top: var(--gutter); right: var(--gutter); display: flex; gap: 20px; padding: 7px 14px; } | |
| #stats > div { display: flex; flex-direction: column; } | |
| #stats label { font-size: 11px; line-height: 16px; color: var(--ink-faint); } | |
| #stats > div > span { display: flex; align-items: center; gap: 6px; font: 500 13px/20px var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; } | |
| #stats .wide { min-width: 168px; } | |
| #stats #state { font-family: var(--sans); } | |
| .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line); transition: background 0.1s, box-shadow 0.1s; } | |
| .dot.on { background: var(--ink); box-shadow: 0 0 8px rgba(255, 255, 255, 0.7); } | |
| /* ------------------------------------------------------------------------------------------- panel */ | |
| #panel { position: fixed; left: var(--gutter); top: 64px; width: 252px; max-height: calc(100% - 64px - 96px); overflow: auto; overscroll-behavior: contain; scrollbar-width: none; padding: 4px 12px 10px; transition: transform 0.22s cubic-bezier(0.2, 0, 0, 1), opacity 0.22s; } | |
| #panel::-webkit-scrollbar { display: none; } | |
| body.panel-collapsed #panel { transform: translateX(calc(-100% - 2 * var(--gutter))); opacity: 0; pointer-events: none; } | |
| #panel h3 { margin: 14px 0 6px; font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-faint); } | |
| #panel > h3:first-child { margin-top: 10px; } | |
| .segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 2px; border-radius: 8px; background: var(--subtle); } | |
| .segmented button { height: 26px; border: 0; border-radius: 6px; background: none; color: var(--ink-muted); font-weight: 500; transition: background 0.12s, color 0.12s; } | |
| .segmented button:hover { color: var(--ink); } | |
| .segmented button.on { background: var(--selected); color: var(--ink); } | |
| .styles { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; } | |
| .styles button { height: 30px; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 8px 0 10px; border: 0; border-radius: 6px; background: var(--subtle); color: var(--ink-body); white-space: nowrap; transition: background 0.12s, color 0.12s; } | |
| .styles button:hover { background: var(--surface-hover); } | |
| .styles button kbd { background: none; padding: 0; color: var(--ink-faint); } | |
| .styles button.on { background: var(--selected); color: var(--ink); font-weight: 500; } | |
| .styles button.on kbd { color: var(--ink-muted); } | |
| .switches label { display: flex; align-items: center; justify-content: space-between; height: 28px; color: var(--ink-body); cursor: pointer; } | |
| .switches input { appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 26px; height: 16px; margin: 0; border-radius: 999px; background: var(--line); cursor: pointer; transition: background 0.15s; } | |
| .switches input::before { content: ''; position: absolute; left: 2px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--ink-muted); transition: transform 0.15s, background 0.15s; } | |
| .switches input:checked { background: var(--accent); } | |
| .switches input:checked::before { transform: translateX(10px); background: var(--on-accent); } | |
| #help summary { display: flex; align-items: center; justify-content: space-between; list-style: none; cursor: pointer; color: var(--ink-faint); } | |
| #help summary::-webkit-details-marker { display: none; } | |
| #help summary [data-icon] { transition: transform 0.15s; } | |
| #help:not([open]) summary [data-icon] { transform: rotate(-90deg); } | |
| /* Trace lines: an icon, what happened, and the details beside it in a quieter voice. */ | |
| .trace .line { display: grid; grid-template-columns: 16px auto minmax(0, 1fr); align-items: center; column-gap: 8px; min-height: 24px; } | |
| .trace .line > [data-icon], .trace .line > .icon { color: var(--ink-faint); } | |
| .trace .t { color: var(--ink-body); white-space: nowrap; } | |
| .trace .d { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--ink-faint); } | |
| #help .line { grid-template-columns: 16px minmax(0, 1fr); grid-template-areas: 'i t' '. d'; align-items: start; padding: 3px 0; } | |
| #help .line > [data-icon] { grid-area: i; margin-top: 2px; } | |
| #help .t { grid-area: t; } | |
| #help .d { grid-area: d; white-space: normal; line-height: 18px; } | |
| #help kbd { font-size: 10.5px; } | |
| /* ------------------------------------------------------------------------------------------- generation log */ | |
| #log { position: fixed; right: var(--gutter); top: 72px; width: 300px; padding: 0 4px; pointer-events: none; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7); } | |
| #log .line { transition: opacity 0.3s; } | |
| #log .t { font-weight: 500; color: var(--ink-muted); } | |
| #log .line:first-child .t { color: var(--ink); } | |
| #log .line:first-child > .icon { color: var(--ink-muted); } | |
| #log .d { font: 11px/16px var(--mono); font-variant-numeric: tabular-nums; } | |
| /* ------------------------------------------------------------------------------------------- timeline */ | |
| #timeline-wrap { position: fixed; left: 50%; bottom: var(--gutter); transform: translateX(-50%); width: min(500px, calc(100% - 2 * var(--gutter))); padding: 9px 14px 13px; } | |
| .tl-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; } | |
| #tl-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 11px/16px var(--mono); color: var(--ink-muted); } | |
| .legend { display: flex; gap: 12px; font-size: 11px; line-height: 16px; color: var(--ink-faint); white-space: nowrap; } | |
| .legend span::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; } | |
| .legend .l-ctx::before { background: var(--ctx); } | |
| .legend .l-tgt::before { background: var(--tgt); } | |
| .legend .l-plan::before { width: 10px; height: 2px; border-radius: 1px; background: var(--tgt); vertical-align: 3px; } | |
| .legend .l-tr::before { width: 4px; height: 4px; border: 1.5px solid var(--tgt); background: none; } | |
| #timeline { position: relative; height: 4px; margin: 9px 0 0 8px; border-radius: 2px; background: var(--line); } | |
| #timeline .ctx { position: absolute; left: -8px; top: 0; width: 5px; height: 4px; border-radius: 2px; background: var(--ctx); } | |
| #timeline .done { position: absolute; left: 0; top: 0; height: 4px; width: var(--play, 0%); border-radius: 2px; background: var(--tgt); opacity: 0.6; } | |
| #timeline .play { position: absolute; top: -4px; left: var(--play, 0%); width: 2px; height: 12px; border-radius: 1px; background: var(--ink); transform: translateX(-1px); } | |
| #timeline .trans { position: absolute; top: -3px; left: var(--trans, 100%); width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--tgt); background: var(--canvas); transform: translateX(-5px); } | |
| #timeline.idle i { display: none; } | |
| /* ------------------------------------------------------------------------------------------- dialogs */ | |
| .dialog { background: var(--elevated); color: var(--ink-body); border: 0; border-radius: 12px; box-shadow: var(--shadow-pop); } | |
| .dialog p { margin: 0 0 12px; font-size: 14px; line-height: 22px; } | |
| .small, .dialog p.small { font-size: 12px; line-height: 18px; color: var(--ink-faint); } | |
| .err { color: var(--bad); } | |
| #loading { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(480px, calc(100% - 32px)); padding: 24px; z-index: 10; transition: opacity 0.4s, transform 0.4s; } | |
| #loading h1 { margin: 0 0 8px; font-size: 22px; line-height: 28px; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); } | |
| #loading h1 span { color: var(--ink-muted); } | |
| #loading > p:first-of-type { margin-bottom: 18px; } | |
| .loadrow { display: grid; grid-template-columns: 112px 1fr 136px; align-items: center; gap: 12px; margin: 10px 0; } | |
| .loadrow b { height: 4px; border-radius: 2px; overflow: hidden; background: var(--line); } | |
| .loadrow i { display: block; height: 100%; width: 0; background: var(--ink); transition: width 0.2s; } | |
| .loadrow em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; font: 11px/16px var(--mono); font-style: normal; color: var(--ink-faint); } | |
| .loadrow.err em { color: var(--bad); } | |
| #loading .small { margin: 18px 0 16px; } | |
| #load-error:empty { display: none; } | |
| body:not(.world-ready) #start { visibility: hidden; } | |
| body.model-ready #loading, body.dismissed #loading { opacity: 0; transform: translate(-50%, -47%); pointer-events: none; } | |
| #about { width: min(460px, calc(100% - 32px)); padding: 20px 20px 8px; } | |
| #about::backdrop { background: var(--scrim); } | |
| #about h2 { margin: 0 0 10px; font-size: 15px; line-height: 22px; font-weight: 600; color: var(--ink); } | |
| #about a { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(229, 229, 229, 0.4); text-underline-offset: 2px; } | |
| #about a:hover { color: #fff; text-decoration-color: currentColor; } | |
| #about-close { position: absolute; top: 14px; right: 14px; background: none; } | |
| #about-close:hover { background: var(--subtle); } | |
| /* ------------------------------------------------------------------------------------------- touch */ | |
| #touch { display: none; } | |
| @media (pointer: coarse) { | |
| #touch { display: block; } | |
| #joystick { position: fixed; left: 16px; bottom: 104px; width: 112px; height: 112px; border-radius: 50%; background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); touch-action: none; } | |
| #knob { position: absolute; left: 34px; top: 34px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, 0.28); } | |
| .touch-buttons { position: fixed; right: 16px; bottom: 104px; display: flex; flex-direction: column; gap: 8px; } | |
| .touch-buttons button { width: 88px; height: 44px; border: 0; border-radius: 10px; background: var(--glass); color: var(--ink); font-weight: 500; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); } | |
| .touch-buttons button:active { background: var(--accent); color: var(--on-accent); } | |
| } | |
| /* ------------------------------------------------------------------------------------------- small screens */ | |
| @media (max-width: 760px) { | |
| :root { --gutter: 8px; } | |
| #title .sub, #stats, #log { display: none; } | |
| #panel { z-index: 15; top: auto; bottom: var(--gutter); left: var(--gutter); right: var(--gutter); width: auto; max-height: 62%; background: rgba(24, 24, 24, 0.94); box-shadow: var(--shadow-pop); } | |
| body.panel-collapsed #panel { transform: translateY(calc(100% + 2 * var(--gutter))); } | |
| .styles { grid-template-columns: 1fr 1fr 1fr; } | |
| .styles button kbd { display: none; } | |
| .switches { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; } | |
| .tl-head { flex-wrap: wrap; row-gap: 2px; } | |
| .loadrow { grid-template-columns: 88px 1fr 104px; } | |
| } | |
| @media (pointer: coarse) { #help .kb { display: none; } } | |
| /* ------------------------------------------------------------------------------------------- capture */ | |
| /* Capture mode: clean frame for video recording. */ | |
| body.capture #panel, body.capture #panel-toggle, body.capture #about-open, body.capture #touch, body.capture #loading { display: none ; } | |
| body.promo #touch, body.promo #loading { display: none ; } | |
| #caption, #card { display: none; } | |
| body.capture #caption { display: block; position: fixed; z-index: 20; left: 50%; bottom: 112px; transform: translateX(-50%); text-align: center; opacity: 0; transition: opacity 0.4s; pointer-events: none; } | |
| body.capture #caption.on { opacity: 1; } | |
| #caption b { display: inline-block; font-size: 30px; line-height: 40px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); padding: 6px 18px; border-radius: 12px; background: rgba(10, 10, 10, 0.66); } | |
| #caption span { display: block; margin-top: 8px; font-size: 18px; line-height: 26px; color: var(--ink-body); text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9); } | |
| body.capture #card { display: flex; position: fixed; inset: 0; z-index: 30; align-items: center; justify-content: center; flex-direction: column; text-align: center; background: radial-gradient(ellipse at center, rgba(10, 10, 10, 0.55), rgba(10, 10, 10, 0.92)); opacity: 0; transition: opacity 0.5s; pointer-events: none; } | |
| body.capture #card.on { opacity: 1; } | |
| #card h1 { font-size: 76px; line-height: 1.1; font-weight: 600; margin: 0; letter-spacing: -0.03em; color: var(--ink); } | |
| #card p { font-size: 28px; line-height: 1.3; color: var(--ink-body); margin: 14px 0 18px; } | |
| #card small { font-size: 16px; color: var(--ink-faint); line-height: 1.6; } | |