Add on-device web client
This commit is contained in:
@@ -0,0 +1,125 @@
|
||||
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Inter:wght@400;500;600;700&display=swap");
|
||||
|
||||
:root {
|
||||
color: #e7e7eb;
|
||||
background: #050607;
|
||||
font-family: Inter, system-ui, sans-serif;
|
||||
font-synthesis: none;
|
||||
--muted: #8e9099;
|
||||
--line: #292b30;
|
||||
--panel: #0a0b0d;
|
||||
--color-0: #ff4e53;
|
||||
--color-1: #538df4;
|
||||
--color-2: #74ae52;
|
||||
--color-3: #e8b53b;
|
||||
--color-4: #a463ca;
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
body { margin: 0; min-width: 320px; min-height: 100vh; background: #050607; }
|
||||
button { font: inherit; }
|
||||
button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
|
||||
|
||||
.app-shell { min-height: 100vh; padding-bottom: 24px; background: radial-gradient(circle at 50% -20%, #1d2026 0, #090a0c 34%, #050607 64%); }
|
||||
.topbar { height: 94px; padding: 16px 28px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; background: rgba(5, 6, 7, .9); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 20; }
|
||||
.eyebrow { margin: 0 0 3px; color: var(--muted); font: 500 10px/1 IBM Plex Mono, monospace; letter-spacing: .16em; }
|
||||
h1 { margin: 0; font: 600 25px/1 IBM Plex Mono, monospace; letter-spacing: -.04em; }
|
||||
.topbar__status { display: flex; gap: 12px; align-items: center; min-width: 180px; }
|
||||
.topbar__status div { display: flex; flex-direction: column; gap: 3px; }
|
||||
.topbar__status strong { font: 600 12px/1.2 IBM Plex Mono, monospace; letter-spacing: .08em; }
|
||||
.topbar__status small { color: var(--muted); font: 9px/1.2 IBM Plex Mono, monospace; }
|
||||
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #70c48f; box-shadow: 0 0 16px #70c48f; }
|
||||
.status-dot--pulse { animation: pulse 1s infinite; }
|
||||
@keyframes pulse { 50% { opacity: .25; transform: scale(.75); } }
|
||||
.topbar__actions { justify-self: end; display: flex; gap: 8px; }
|
||||
.text-button, .primary-button { min-height: 38px; padding: 0 16px; border: 1px solid var(--line); color: #ddd; background: transparent; font: 600 10px IBM Plex Mono, monospace; letter-spacing: .08em; cursor: pointer; }
|
||||
.primary-button { background: #ececf0; color: #08090a; border-color: #ececf0; }
|
||||
.text-button:disabled { opacity: .3; cursor: default; }
|
||||
|
||||
.opponent-strip, .control-deck { width: min(1480px, calc(100% - 40px)); margin: 0 auto; display: grid; align-items: center; }
|
||||
.opponent-strip { min-height: 116px; grid-template-columns: 100px 1fr 90px; border-bottom: 1px solid var(--line); }
|
||||
.player-label { display: flex; align-items: baseline; gap: 10px; }
|
||||
.player-label span { color: var(--muted); font: 500 10px IBM Plex Mono, monospace; letter-spacing: .15em; }
|
||||
.player-label b { font: 500 26px IBM Plex Mono, monospace; }
|
||||
.hidden-hand { display: flex; justify-content: center; height: 66px; }
|
||||
.hidden-hand .card { margin-left: -20px; }
|
||||
.hidden-hand .card:first-child { margin-left: 0; }
|
||||
.deck-meter { justify-self: end; display: flex; flex-direction: column; align-items: flex-end; }
|
||||
.deck-meter span { color: var(--muted); font: 9px IBM Plex Mono, monospace; }
|
||||
.deck-meter strong { font: 500 24px IBM Plex Mono, monospace; }
|
||||
|
||||
.board { width: min(1480px, calc(100% - 40px)); min-height: 445px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); }
|
||||
.lane { min-width: 0; border-right: 1px solid var(--line); display: grid; grid-template-rows: 34px 1fr 76px 1fr; background: linear-gradient(180deg, color-mix(in srgb, var(--lane-color) 3%, transparent), transparent 42%); }
|
||||
.lane__header { display: flex; align-items: center; justify-content: center; gap: 7px; color: #bfc0c5; font: 500 9px IBM Plex Mono, monospace; letter-spacing: .12em; border-bottom: 1px solid #181a1e; }
|
||||
.lane__dot { width: 5px; height: 5px; border-radius: 50%; background: var(--lane-color); box-shadow: 0 0 10px var(--lane-color); }
|
||||
.lane__zone { min-height: 118px; padding: 12px; display: flex; justify-content: center; align-items: center; overflow: hidden; }
|
||||
.lane__zone .card { margin-left: -35px; }
|
||||
.lane__zone .card:first-of-type { margin-left: 0; }
|
||||
.lane__zone--opponent { align-items: flex-start; }
|
||||
.lane__zone--mine { align-items: flex-end; }
|
||||
.lane__empty { color: #25272d; font: 600 10px IBM Plex Mono, monospace; }
|
||||
.lane__discard { position: relative; display: flex; align-items: center; justify-content: center; border-top: 1px dashed #202228; border-bottom: 1px dashed #202228; color: #383b43; font: 500 8px IBM Plex Mono, monospace; }
|
||||
.lane__discard b { position: absolute; margin: 0 0 -40px 50px; color: var(--muted); font: 9px IBM Plex Mono, monospace; }
|
||||
|
||||
.card { --card-color: #aaa; position: relative; flex: 0 0 auto; width: 74px; height: 96px; padding: 8px; border: 1px solid color-mix(in srgb, var(--card-color) 80%, #fff); border-radius: 3px; color: #e9e9ed; background: linear-gradient(145deg, color-mix(in srgb, var(--card-color) 10%, #0d0e11), #08090b 60%); box-shadow: 0 8px 20px rgba(0,0,0,.35); text-align: left; cursor: pointer; transition: transform .16s ease, border-color .16s, filter .16s; }
|
||||
button.card:not(:disabled):hover { transform: translateY(-7px); filter: brightness(1.18); z-index: 4; }
|
||||
button.card:disabled { cursor: default; }
|
||||
.card--selected { transform: translateY(-10px); border-width: 2px; box-shadow: 0 0 24px color-mix(in srgb, var(--card-color) 25%, transparent); }
|
||||
.card__color { color: var(--card-color); font: 500 7px IBM Plex Mono, monospace; letter-spacing: .08em; text-transform: uppercase; }
|
||||
.card__value { display: block; margin-top: 11px; font: 500 28px/1 IBM Plex Mono, monospace; }
|
||||
.card__mark { position: absolute; right: 7px; bottom: 7px; color: color-mix(in srgb, var(--card-color) 30%, #15171b); font: 600 22px IBM Plex Mono, monospace; }
|
||||
.card--compact { width: 52px; height: 67px; padding: 5px; cursor: default; }
|
||||
.card--compact .card__value { margin-top: 6px; font-size: 18px; }
|
||||
.card--compact .card__color { display: none; }
|
||||
.card--compact .card__mark { font-size: 13px; }
|
||||
.card--back { width: 48px; height: 64px; display: grid; place-items: center; border-color: #3c3f47; color: #555962; background: repeating-linear-gradient(135deg, #101217, #101217 4px, #0a0b0e 4px, #0a0b0e 8px); cursor: default; }
|
||||
.card__back-mark { font: 600 10px IBM Plex Mono, monospace; letter-spacing: .1em; }
|
||||
.card__count { position: absolute; bottom: 3px; right: 5px; font: 8px IBM Plex Mono, monospace; }
|
||||
|
||||
.control-deck { grid-template-columns: 100px minmax(500px, 1fr) 370px; gap: 20px; min-height: 188px; padding-top: 20px; }
|
||||
.control-deck > .player-label { align-self: start; padding-top: 22px; }
|
||||
.hand { display: flex; align-items: flex-end; justify-content: center; min-width: 0; padding: 18px 4px; }
|
||||
.hand .card { margin-left: -10px; }
|
||||
.hand .card:first-child { margin-left: 0; }
|
||||
.decision-panel { border: 1px solid var(--line); background: rgba(11,12,15,.78); padding: 13px; }
|
||||
.decision-panel__step { display: flex; align-items: center; gap: 9px; }
|
||||
.decision-panel__step span { color: #51545c; font: 9px IBM Plex Mono, monospace; }
|
||||
.decision-panel__step p { margin: 0; color: #b8bac0; font: 500 9px IBM Plex Mono, monospace; letter-spacing: .08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.decision-panel__buttons, .draw-buttons { display: grid; gap: 6px; margin: 9px 0 12px; }
|
||||
.decision-panel__buttons { grid-template-columns: 1fr 1fr; }
|
||||
.draw-buttons { grid-template-columns: 1.4fr repeat(5, 1fr); margin-bottom: 0; }
|
||||
.decision-panel button { height: 34px; border: 1px solid #30323a; color: #bec0c6; background: #111318; font: 600 9px IBM Plex Mono, monospace; cursor: pointer; }
|
||||
.decision-panel button:hover:not(:disabled), .decision-panel button.active { border-color: #bbbcc2; color: #fff; background: #1b1d22; }
|
||||
.decision-panel button:disabled { opacity: .22; cursor: default; }
|
||||
.draw-color span { display: inline-block; width: 5px; height: 5px; margin-right: 4px; border-radius: 50%; }
|
||||
|
||||
.result-overlay { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(0,0,0,.72); backdrop-filter: blur(8px); }
|
||||
.result-card { width: min(430px, calc(100% - 40px)); padding: 42px; border: 1px solid #40434b; background: #090a0c; text-align: center; }
|
||||
.result-card p { color: var(--muted); font: 9px IBM Plex Mono, monospace; letter-spacing: .18em; }
|
||||
.result-card h2 { margin: 14px; font: 600 34px IBM Plex Mono, monospace; }
|
||||
.result-card strong { display: block; margin: 24px; font: 500 26px IBM Plex Mono, monospace; }
|
||||
.result-card i { color: #4c4f57; font-style: normal; }
|
||||
.result-card button { height: 42px; padding: 0 26px; border: 0; background: #eeeef1; color: #090a0c; font: 600 10px IBM Plex Mono, monospace; cursor: pointer; }
|
||||
|
||||
@media (max-width: 960px) {
|
||||
.topbar { grid-template-columns: 1fr auto; }
|
||||
.topbar__status { order: 3; grid-column: 1 / -1; min-width: 0; margin-top: 8px; }
|
||||
.topbar { height: auto; }
|
||||
.board { overflow-x: auto; grid-template-columns: repeat(5, minmax(160px, 1fr)); }
|
||||
.control-deck { grid-template-columns: 70px 1fr; }
|
||||
.decision-panel { grid-column: 1 / -1; }
|
||||
}
|
||||
|
||||
@media (max-width: 620px) {
|
||||
.topbar { padding: 14px; }
|
||||
h1 { font-size: 20px; }
|
||||
.text-button { display: none; }
|
||||
.opponent-strip, .board, .control-deck { width: calc(100% - 20px); }
|
||||
.opponent-strip { grid-template-columns: 70px 1fr 52px; }
|
||||
.hidden-hand .card:nth-child(-n+3) { display: none; }
|
||||
.control-deck { display: block; }
|
||||
.control-deck > .player-label { padding: 10px 0 0; }
|
||||
.hand { justify-content: flex-start; overflow-x: auto; padding: 16px 4px 24px; }
|
||||
.hand .card { margin-left: -5px; }
|
||||
.decision-panel { position: sticky; bottom: 8px; z-index: 10; }
|
||||
}
|
||||
Reference in New Issue
Block a user