Restyle frontend with dark retro console theme
This commit is contained in:
284
styles.css
284
styles.css
@@ -1,17 +1,20 @@
|
||||
:root {
|
||||
color-scheme: light;
|
||||
--ink: #161616;
|
||||
--muted: #62635f;
|
||||
--paper: #f9f6ee;
|
||||
--panel: #fffdfa;
|
||||
--line: #252525;
|
||||
--grid: #d9d1bf;
|
||||
--x: #cb3d3d;
|
||||
--o: #216e8d;
|
||||
--x-soft: #ffe1df;
|
||||
--o-soft: #d9f1f8;
|
||||
--focus: #6750a4;
|
||||
--shadow: 0 20px 50px rgba(30, 25, 15, 0.12);
|
||||
color-scheme: dark;
|
||||
--bg: #07090d;
|
||||
--panel: #0d121a;
|
||||
--panel-2: #111923;
|
||||
--cell: #0a0f16;
|
||||
--line: #26384b;
|
||||
--line-bright: #61d6ff;
|
||||
--text: #d9f7ff;
|
||||
--muted: #7e9aa8;
|
||||
--x: #ff5f8f;
|
||||
--o: #47e5bc;
|
||||
--warn: #ffd166;
|
||||
--ok: #7cff6b;
|
||||
--bad: #ff6b6b;
|
||||
--focus: #f7f052;
|
||||
--shadow: 0 0 0 1px rgba(97, 214, 255, 0.18), 0 18px 48px rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
* {
|
||||
@@ -21,13 +24,30 @@
|
||||
body {
|
||||
margin: 0;
|
||||
min-height: 100vh;
|
||||
color: var(--ink);
|
||||
color: var(--text);
|
||||
background:
|
||||
linear-gradient(rgba(22, 22, 22, 0.035) 1px, transparent 1px),
|
||||
linear-gradient(90deg, rgba(22, 22, 22, 0.035) 1px, transparent 1px),
|
||||
var(--paper);
|
||||
background-size: 32px 32px;
|
||||
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
||||
linear-gradient(rgba(97, 214, 255, 0.04) 1px, transparent 1px),
|
||||
linear-gradient(90deg, rgba(97, 214, 255, 0.035) 1px, transparent 1px),
|
||||
radial-gradient(circle at 50% 0%, rgba(71, 229, 188, 0.12), transparent 30rem),
|
||||
var(--bg);
|
||||
background-size: 24px 24px, 24px 24px, auto, auto;
|
||||
font-family: "Cascadia Mono", Consolas, "Courier New", monospace;
|
||||
}
|
||||
|
||||
body::before {
|
||||
content: "";
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
pointer-events: none;
|
||||
background: repeating-linear-gradient(
|
||||
to bottom,
|
||||
rgba(255, 255, 255, 0.035),
|
||||
rgba(255, 255, 255, 0.035) 1px,
|
||||
transparent 1px,
|
||||
transparent 4px
|
||||
);
|
||||
opacity: 0.22;
|
||||
mix-blend-mode: screen;
|
||||
}
|
||||
|
||||
button {
|
||||
@@ -35,29 +55,29 @@ button {
|
||||
}
|
||||
|
||||
.app {
|
||||
width: min(1120px, calc(100vw - 32px));
|
||||
width: min(920px, calc(100vw - 28px));
|
||||
min-height: 100vh;
|
||||
margin: 0 auto;
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) 320px;
|
||||
gap: 28px;
|
||||
grid-template-columns: minmax(0, 1fr) 260px;
|
||||
gap: 14px;
|
||||
align-items: center;
|
||||
padding: 32px 0;
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
.play-area,
|
||||
.side-panel {
|
||||
background: rgba(255, 253, 250, 0.86);
|
||||
border: 1px solid rgba(37, 37, 37, 0.12);
|
||||
background: linear-gradient(180deg, rgba(17, 25, 35, 0.94), rgba(8, 12, 18, 0.98));
|
||||
border: 1px solid var(--line);
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
|
||||
.play-area {
|
||||
padding: 24px;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.side-panel {
|
||||
padding: 18px;
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.topbar,
|
||||
@@ -66,118 +86,133 @@ button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.eyebrow {
|
||||
margin: 0 0 4px;
|
||||
color: var(--muted);
|
||||
font-size: 0.78rem;
|
||||
font-weight: 800;
|
||||
color: var(--o);
|
||||
font-size: 0.68rem;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
font-size: clamp(2.2rem, 4.8rem, 5rem);
|
||||
line-height: 0.92;
|
||||
color: var(--text);
|
||||
font-size: clamp(1.9rem, 4vw, 3.2rem);
|
||||
line-height: 0.95;
|
||||
text-transform: uppercase;
|
||||
text-shadow: 0 0 12px rgba(97, 214, 255, 0.55);
|
||||
}
|
||||
|
||||
.icon-button {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
width: 46px;
|
||||
height: 32px;
|
||||
display: inline-grid;
|
||||
place-items: center;
|
||||
border: 2px solid var(--line);
|
||||
border-radius: 8px;
|
||||
color: var(--ink);
|
||||
background: var(--panel);
|
||||
border: 1px solid var(--line-bright);
|
||||
border-radius: 2px;
|
||||
color: var(--line-bright);
|
||||
background: #05080d;
|
||||
cursor: pointer;
|
||||
transition: transform 150ms ease, background 150ms ease;
|
||||
font-size: 0.72rem;
|
||||
font-weight: 800;
|
||||
transition: background 120ms ease, color 120ms ease, box-shadow 120ms ease;
|
||||
}
|
||||
|
||||
.icon-button:disabled {
|
||||
opacity: 0.45;
|
||||
opacity: 0.4;
|
||||
cursor: not-allowed;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.icon-button:hover {
|
||||
background: #eee6d6;
|
||||
transform: translateY(-1px);
|
||||
.icon-button:hover:not(:disabled) {
|
||||
color: #061016;
|
||||
background: var(--line-bright);
|
||||
box-shadow: 0 0 18px rgba(97, 214, 255, 0.45);
|
||||
}
|
||||
|
||||
.icon-button:focus-visible,
|
||||
.cell:focus-visible {
|
||||
outline: 3px solid var(--focus);
|
||||
outline: 2px solid var(--focus);
|
||||
outline-offset: 3px;
|
||||
}
|
||||
|
||||
.status-row {
|
||||
margin: 24px 0 18px;
|
||||
margin: 14px 0 10px;
|
||||
}
|
||||
|
||||
.turn-badge {
|
||||
min-width: 104px;
|
||||
padding: 9px 12px;
|
||||
border: 2px solid currentColor;
|
||||
border-radius: 8px;
|
||||
font-weight: 900;
|
||||
min-width: 128px;
|
||||
padding: 7px 9px;
|
||||
border: 1px solid currentColor;
|
||||
border-radius: 2px;
|
||||
font-size: 0.78rem;
|
||||
font-weight: 800;
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.player-x {
|
||||
color: var(--x);
|
||||
background: var(--x-soft);
|
||||
background: rgba(255, 95, 143, 0.08);
|
||||
}
|
||||
|
||||
.player-o {
|
||||
color: var(--o);
|
||||
background: var(--o-soft);
|
||||
background: rgba(71, 229, 188, 0.08);
|
||||
}
|
||||
|
||||
.message {
|
||||
color: var(--muted);
|
||||
font-size: 0.95rem;
|
||||
font-size: 0.78rem;
|
||||
text-align: right;
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
.network-status {
|
||||
margin: 0 0 18px;
|
||||
padding: 10px 12px;
|
||||
border: 1px solid rgba(37, 37, 37, 0.14);
|
||||
border-radius: 8px;
|
||||
margin: 0 0 12px;
|
||||
padding: 8px 10px;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 2px;
|
||||
color: var(--muted);
|
||||
background: var(--panel);
|
||||
background: #070b11;
|
||||
font-size: 0.74rem;
|
||||
font-weight: 800;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.network-status::before {
|
||||
content: "> ";
|
||||
}
|
||||
|
||||
.network-status.paired {
|
||||
color: #31592d;
|
||||
background: #e5f3df;
|
||||
color: var(--ok);
|
||||
border-color: rgba(124, 255, 107, 0.5);
|
||||
}
|
||||
|
||||
.network-status.waiting,
|
||||
.network-status.connecting {
|
||||
color: #665019;
|
||||
background: #fff3c7;
|
||||
color: var(--warn);
|
||||
border-color: rgba(255, 209, 102, 0.5);
|
||||
}
|
||||
|
||||
.network-status.error {
|
||||
color: #8d2525;
|
||||
background: #ffe1df;
|
||||
color: var(--bad);
|
||||
border-color: rgba(255, 107, 107, 0.55);
|
||||
}
|
||||
|
||||
.board {
|
||||
aspect-ratio: 1;
|
||||
width: min(100%, 620px);
|
||||
width: min(100%, 520px);
|
||||
margin: 0 auto;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(5, 1fr);
|
||||
grid-template-rows: repeat(5, 1fr);
|
||||
border: 3px solid var(--line);
|
||||
background: var(--line);
|
||||
gap: 3px;
|
||||
border: 2px solid var(--line-bright);
|
||||
background: var(--line-bright);
|
||||
gap: 2px;
|
||||
box-shadow: 0 0 24px rgba(97, 214, 255, 0.22);
|
||||
}
|
||||
|
||||
.cell {
|
||||
@@ -185,25 +220,26 @@ h1 {
|
||||
border: 0;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
background: var(--panel);
|
||||
color: var(--ink);
|
||||
background: var(--cell);
|
||||
color: var(--text);
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
isolation: isolate;
|
||||
}
|
||||
|
||||
.cell::before {
|
||||
content: "";
|
||||
content: "+";
|
||||
position: absolute;
|
||||
inset: 13%;
|
||||
border: 2px dashed rgba(37, 37, 37, 0.14);
|
||||
border-radius: 50%;
|
||||
opacity: 0;
|
||||
transition: opacity 120ms ease;
|
||||
color: rgba(126, 154, 168, 0.25);
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.cell:hover::before {
|
||||
opacity: 1;
|
||||
.cell:hover:not([disabled]) {
|
||||
background: #101926;
|
||||
}
|
||||
|
||||
.cell:hover:not([disabled])::before {
|
||||
color: var(--line-bright);
|
||||
}
|
||||
|
||||
.cell[disabled] {
|
||||
@@ -213,113 +249,127 @@ h1 {
|
||||
.mark {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
width: 72%;
|
||||
height: 72%;
|
||||
border-radius: 50%;
|
||||
font-size: clamp(2rem, 8vw, 4.4rem);
|
||||
font-weight: 950;
|
||||
width: 80%;
|
||||
height: 80%;
|
||||
font-size: clamp(1.75rem, 6vw, 3.25rem);
|
||||
font-weight: 900;
|
||||
line-height: 1;
|
||||
transform: scale(0.96);
|
||||
animation: pop 180ms ease-out;
|
||||
animation: pop 120ms steps(2, end);
|
||||
}
|
||||
|
||||
.mark-x {
|
||||
color: var(--x);
|
||||
text-shadow: 0 0 12px rgba(255, 95, 143, 0.65);
|
||||
}
|
||||
|
||||
.mark-o {
|
||||
color: var(--o);
|
||||
text-shadow: 0 0 12px rgba(71, 229, 188, 0.65);
|
||||
}
|
||||
|
||||
.cell.captured {
|
||||
animation: capture 360ms ease-out;
|
||||
animation: capture 300ms steps(3, end);
|
||||
}
|
||||
|
||||
.cell.winning {
|
||||
background: #fff0aa;
|
||||
background: #1b2440;
|
||||
box-shadow: inset 0 0 0 3px var(--focus);
|
||||
}
|
||||
|
||||
.score-row {
|
||||
margin-bottom: 16px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.score-box {
|
||||
flex: 1;
|
||||
padding: 14px;
|
||||
border: 1px solid rgba(37, 37, 37, 0.14);
|
||||
border-radius: 8px;
|
||||
background: var(--panel);
|
||||
padding: 9px;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 2px;
|
||||
background: var(--panel-2);
|
||||
}
|
||||
|
||||
.score-label {
|
||||
display: block;
|
||||
color: var(--muted);
|
||||
font-size: 0.76rem;
|
||||
font-size: 0.62rem;
|
||||
font-weight: 800;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.score-box strong {
|
||||
display: block;
|
||||
margin-top: 4px;
|
||||
font-size: 2rem;
|
||||
margin-top: 2px;
|
||||
color: var(--text);
|
||||
font-size: 1.45rem;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.rule-card {
|
||||
padding: 14px;
|
||||
border: 1px solid rgba(37, 37, 37, 0.14);
|
||||
border-radius: 8px;
|
||||
background: #f5efe2;
|
||||
padding: 10px;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 2px;
|
||||
background: #070b11;
|
||||
}
|
||||
|
||||
.rule-card h2 {
|
||||
margin: 0 0 8px;
|
||||
font-size: 1rem;
|
||||
margin: 0 0 7px;
|
||||
color: var(--line-bright);
|
||||
font-size: 0.76rem;
|
||||
}
|
||||
|
||||
.rule-card p {
|
||||
margin: 0;
|
||||
color: var(--muted);
|
||||
font-size: 0.72rem;
|
||||
line-height: 1.45;
|
||||
}
|
||||
|
||||
.move-list {
|
||||
max-height: 320px;
|
||||
margin: 16px 0 0;
|
||||
padding: 0 0 0 24px;
|
||||
max-height: 250px;
|
||||
margin: 10px 0 0;
|
||||
padding: 0;
|
||||
overflow: auto;
|
||||
color: var(--muted);
|
||||
font-size: 0.72rem;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.move-list li {
|
||||
margin-bottom: 8px;
|
||||
padding-left: 4px;
|
||||
margin-bottom: 5px;
|
||||
padding: 5px 7px;
|
||||
border-left: 2px solid var(--line);
|
||||
background: rgba(97, 214, 255, 0.04);
|
||||
}
|
||||
|
||||
.move-list li::before {
|
||||
content: "$ ";
|
||||
color: var(--o);
|
||||
}
|
||||
|
||||
@keyframes pop {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: scale(0.66);
|
||||
transform: scale(0.7);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes capture {
|
||||
35% {
|
||||
background: #202020;
|
||||
background: var(--bad);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 860px) {
|
||||
@media (max-width: 780px) {
|
||||
.app {
|
||||
min-height: auto;
|
||||
grid-template-columns: 1fr;
|
||||
align-items: start;
|
||||
padding: 18px 0;
|
||||
padding: 14px 0;
|
||||
}
|
||||
|
||||
.play-area,
|
||||
.side-panel {
|
||||
padding: 16px;
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.status-row {
|
||||
@@ -332,10 +382,14 @@ h1 {
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 3rem;
|
||||
font-size: 2.2rem;
|
||||
}
|
||||
|
||||
.board {
|
||||
width: min(100%, 430px);
|
||||
}
|
||||
|
||||
.move-list {
|
||||
max-height: 180px;
|
||||
max-height: 150px;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user