Update: more science and kid friendly
This commit is contained in:
+457
-126
@@ -1,164 +1,495 @@
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
:root {
|
||||
--bg: oklch(98% 0.005 250);
|
||||
--surface: oklch(100% 0 0);
|
||||
--fg: oklch(22% 0.02 240);
|
||||
--muted: oklch(50% 0.018 240);
|
||||
--border: oklch(90% 0.008 240);
|
||||
--accent: oklch(58% 0.16 145);
|
||||
|
||||
--font-display: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', system-ui, sans-serif;
|
||||
--font-body: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', system-ui, sans-serif;
|
||||
--font-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, Menlo, monospace;
|
||||
|
||||
--cell-a: oklch(58% 0.16 145);
|
||||
--cell-b: oklch(72% 0.14 170);
|
||||
--cell-glow: color-mix(in oklch, var(--cell-a), white 38%);
|
||||
--grid: color-mix(in oklch, var(--border), var(--fg) 8%);
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
|
||||
body {
|
||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||
background: linear-gradient(135deg, #1a2a6c, #b21f1f, #1a2a6c);
|
||||
color: white;
|
||||
min-height: 100vh;
|
||||
padding: 20px;
|
||||
margin: 0;
|
||||
min-height: 100vh;
|
||||
background:
|
||||
radial-gradient(circle at 16% 12%, color-mix(in oklch, var(--accent), transparent 84%), transparent 30rem),
|
||||
linear-gradient(135deg, color-mix(in oklch, var(--bg), white 60%), var(--bg));
|
||||
color: var(--fg);
|
||||
font-family: var(--font-body);
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
button, input { font: inherit; }
|
||||
|
||||
.page {
|
||||
width: min(1440px, calc(100% - 32px));
|
||||
margin: 0 auto;
|
||||
padding: 24px 0 48px;
|
||||
}
|
||||
|
||||
header {
|
||||
margin-bottom: 20px;
|
||||
padding: 20px;
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
border-radius: 15px;
|
||||
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
|
||||
backdrop-filter: blur(10px);
|
||||
.topbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
padding: 14px 16px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 18px;
|
||||
background: color-mix(in oklch, var(--surface), transparent 12%);
|
||||
box-shadow: 0 18px 50px color-mix(in oklch, var(--fg), transparent 92%);
|
||||
backdrop-filter: blur(18px);
|
||||
}
|
||||
|
||||
.brand {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.mark {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
border: 1px solid color-mix(in oklch, var(--accent), var(--border) 45%);
|
||||
border-radius: 13px;
|
||||
background: color-mix(in oklch, var(--accent), white 86%);
|
||||
color: var(--fg);
|
||||
font-family: var(--font-mono);
|
||||
font-weight: 800;
|
||||
box-shadow: 0 0 0 5px color-mix(in oklch, var(--accent), transparent 88%);
|
||||
}
|
||||
|
||||
.brand strong {
|
||||
display: block;
|
||||
font-family: var(--font-display);
|
||||
font-size: 17px;
|
||||
letter-spacing: -0.02em;
|
||||
}
|
||||
|
||||
.brand span {
|
||||
display: block;
|
||||
color: var(--muted);
|
||||
font-size: 13px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.status-pill {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
min-height: 38px;
|
||||
padding: 8px 12px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 999px;
|
||||
background: var(--surface);
|
||||
color: var(--muted);
|
||||
font-family: var(--font-mono);
|
||||
font-size: 12px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.dot {
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
border-radius: 999px;
|
||||
background: var(--accent);
|
||||
box-shadow: 0 0 0 5px color-mix(in oklch, var(--accent), transparent 82%);
|
||||
}
|
||||
|
||||
.hero {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 0.95fr) minmax(390px, 1.35fr);
|
||||
gap: 22px;
|
||||
align-items: stretch;
|
||||
margin-top: 22px;
|
||||
}
|
||||
|
||||
.intro,
|
||||
.lab-card,
|
||||
.panel,
|
||||
.prompt-card {
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 22px;
|
||||
background: color-mix(in oklch, var(--surface), transparent 4%);
|
||||
box-shadow: 0 24px 60px color-mix(in oklch, var(--fg), transparent 93%);
|
||||
}
|
||||
|
||||
.intro {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
min-height: 580px;
|
||||
padding: clamp(24px, 4vw, 42px);
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.intro::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset-inline-end: -110px;
|
||||
inset-block-end: -120px;
|
||||
width: 290px;
|
||||
height: 290px;
|
||||
border: 1px dashed color-mix(in oklch, var(--accent), transparent 40%);
|
||||
border-radius: 50%;
|
||||
opacity: 0.55;
|
||||
}
|
||||
|
||||
.eyebrow {
|
||||
display: inline-flex;
|
||||
width: fit-content;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 7px 10px;
|
||||
border: 1px solid color-mix(in oklch, var(--accent), var(--border) 45%);
|
||||
border-radius: 999px;
|
||||
color: color-mix(in oklch, var(--accent), var(--fg) 18%);
|
||||
font-family: var(--font-mono);
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.08em;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 2.5rem;
|
||||
margin-bottom: 10px;
|
||||
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
|
||||
max-width: 780px;
|
||||
margin: 24px 0 18px;
|
||||
font-family: var(--font-display);
|
||||
font-size: clamp(42px, 7vw, 86px);
|
||||
line-height: 0.96;
|
||||
letter-spacing: -0.045em;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 1.1rem;
|
||||
opacity: 0.9;
|
||||
.lede {
|
||||
max-width: 54ch;
|
||||
margin: 0;
|
||||
color: var(--muted);
|
||||
font-size: clamp(17px, 1.5vw, 20px);
|
||||
line-height: 1.55;
|
||||
text-wrap: pretty;
|
||||
}
|
||||
|
||||
.stats-panel {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 20px;
|
||||
margin-bottom: 20px;
|
||||
padding: 15px;
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
border-radius: 15px;
|
||||
font-size: 1.1rem;
|
||||
.rules {
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
margin-top: 32px;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
color: var(--fg);
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.rules li {
|
||||
display: grid;
|
||||
grid-template-columns: 36px 1fr;
|
||||
gap: 12px;
|
||||
align-items: start;
|
||||
padding: 14px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 16px;
|
||||
background: color-mix(in oklch, var(--bg), var(--surface) 48%);
|
||||
}
|
||||
|
||||
.rules b {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border-radius: 12px;
|
||||
background: color-mix(in oklch, var(--accent), white 84%);
|
||||
color: color-mix(in oklch, var(--accent), black 30%);
|
||||
font-family: var(--font-mono);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.rules span {
|
||||
color: var(--muted);
|
||||
line-height: 1.45;
|
||||
}
|
||||
|
||||
.lab-card {
|
||||
padding: clamp(14px, 2vw, 22px);
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.board-shell {
|
||||
display: grid;
|
||||
gap: 14px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.board-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.board-title {
|
||||
margin: 0;
|
||||
font-size: 15px;
|
||||
color: var(--muted);
|
||||
font-family: var(--font-mono);
|
||||
}
|
||||
|
||||
.canvas-wrap {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
min-height: 450px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 18px;
|
||||
background:
|
||||
linear-gradient(90deg, color-mix(in oklch, var(--grid), transparent 45%) 1px, transparent 1px),
|
||||
linear-gradient(color-mix(in oklch, var(--grid), transparent 45%) 1px, transparent 1px),
|
||||
color-mix(in oklch, var(--surface), var(--bg) 34%);
|
||||
background-size: 28px 28px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.canvas-wrap::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 10px;
|
||||
border: 1px dashed color-mix(in oklch, var(--accent), transparent 70%);
|
||||
border-radius: 14px;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
canvas {
|
||||
width: min(100%, 820px);
|
||||
height: auto;
|
||||
max-height: 70vh;
|
||||
aspect-ratio: 1.333;
|
||||
border-radius: 14px;
|
||||
background: color-mix(in oklch, var(--surface), var(--bg) 26%);
|
||||
cursor: crosshair;
|
||||
touch-action: manipulation;
|
||||
}
|
||||
|
||||
.caption {
|
||||
margin: 0;
|
||||
color: var(--muted);
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.dashboard {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1.15fr;
|
||||
gap: 22px;
|
||||
margin-top: 22px;
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
.panel {
|
||||
padding: 18px;
|
||||
}
|
||||
|
||||
.panel h2,
|
||||
.prompt-card h2 {
|
||||
margin: 0 0 12px;
|
||||
font-size: clamp(22px, 2.4vw, 34px);
|
||||
line-height: 1.06;
|
||||
letter-spacing: -0.03em;
|
||||
}
|
||||
|
||||
.control-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 10px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.button {
|
||||
min-height: 48px;
|
||||
padding: 12px 14px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 14px;
|
||||
background: var(--surface);
|
||||
color: var(--fg);
|
||||
font-weight: 750;
|
||||
cursor: pointer;
|
||||
transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
|
||||
}
|
||||
|
||||
.button:hover { transform: translateY(-1px); border-color: color-mix(in oklch, var(--accent), var(--border) 40%); }
|
||||
.button:active { transform: translateY(0); }
|
||||
|
||||
.button.primary {
|
||||
background: color-mix(in oklch, var(--accent), white 82%);
|
||||
border-color: color-mix(in oklch, var(--accent), var(--border) 22%);
|
||||
color: color-mix(in oklch, var(--fg), var(--accent) 22%);
|
||||
}
|
||||
|
||||
.theme-row {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
gap: 10px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.theme {
|
||||
min-height: 76px;
|
||||
padding: 10px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 14px;
|
||||
background: var(--surface);
|
||||
cursor: pointer;
|
||||
text-align: start;
|
||||
}
|
||||
|
||||
.theme[aria-pressed="true"] {
|
||||
border-color: var(--accent);
|
||||
box-shadow: inset 0 0 0 1px var(--accent);
|
||||
}
|
||||
|
||||
.swatches {
|
||||
display: flex;
|
||||
gap: 5px;
|
||||
margin-bottom: 9px;
|
||||
}
|
||||
|
||||
.swatches i {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
border-radius: 6px;
|
||||
border: 1px solid color-mix(in oklch, var(--border), var(--fg) 12%);
|
||||
}
|
||||
|
||||
.swatch-sprout-a { background: oklch(58% 0.16 145); }
|
||||
.swatch-sprout-b { background: oklch(72% 0.14 170); }
|
||||
.swatch-nebula-a { background: oklch(60% 0.18 285); }
|
||||
.swatch-nebula-b { background: oklch(70% 0.14 235); }
|
||||
.swatch-sunny-a { background: oklch(70% 0.15 65); }
|
||||
.swatch-sunny-b { background: oklch(74% 0.12 35); }
|
||||
|
||||
.theme strong { display: block; font-size: 13px; }
|
||||
.theme span { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
|
||||
|
||||
.slider-row {
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
margin-top: 16px;
|
||||
padding: 14px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 14px;
|
||||
background: color-mix(in oklch, var(--bg), var(--surface) 56%);
|
||||
}
|
||||
|
||||
.slider-row label {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
color: var(--muted);
|
||||
font-family: var(--font-mono);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
input[type="range"] {
|
||||
width: 100%;
|
||||
accent-color: var(--accent);
|
||||
}
|
||||
|
||||
.stats-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.stat {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
min-height: 98px;
|
||||
padding: 14px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 16px;
|
||||
background: var(--surface);
|
||||
}
|
||||
|
||||
.stat-label {
|
||||
font-weight: 600;
|
||||
margin-bottom: 5px;
|
||||
color: #4facfe;
|
||||
.stat span {
|
||||
display: block;
|
||||
color: var(--muted);
|
||||
font-size: 12px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.06em;
|
||||
}
|
||||
|
||||
.controls {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 15px;
|
||||
margin-bottom: 30px;
|
||||
padding: 20px;
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
border-radius: 15px;
|
||||
.stat strong {
|
||||
display: block;
|
||||
margin-top: 12px;
|
||||
font-family: var(--font-mono);
|
||||
font-size: clamp(24px, 3vw, 40px);
|
||||
line-height: 1;
|
||||
letter-spacing: -0.04em;
|
||||
}
|
||||
|
||||
button {
|
||||
padding: 12px 24px;
|
||||
font-size: 1rem;
|
||||
background: rgba(255, 255, 255, 0.15);
|
||||
color: white;
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
border-radius: 50px;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
backdrop-filter: blur(5px);
|
||||
.prompt-card {
|
||||
margin-top: 10px;
|
||||
padding: 18px;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background: rgba(255, 255, 255, 0.25);
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
|
||||
.prompt-list {
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
padding: 0;
|
||||
margin: 14px 0 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
button:active {
|
||||
transform: translateY(0);
|
||||
.prompt-list li {
|
||||
padding: 14px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 14px;
|
||||
background: color-mix(in oklch, var(--bg), white 50%);
|
||||
color: var(--muted);
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.speed-control {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
padding: 10px 20px;
|
||||
border-radius: 50px;
|
||||
.prompt-list strong {
|
||||
color: var(--fg);
|
||||
}
|
||||
|
||||
.speed-control label {
|
||||
font-weight: 500;
|
||||
.explain {
|
||||
margin: 14px 0 0;
|
||||
padding: 14px;
|
||||
border-inline-start: 4px solid var(--accent);
|
||||
border-radius: 12px;
|
||||
background: color-mix(in oklch, var(--accent), white 90%);
|
||||
color: color-mix(in oklch, var(--fg), var(--accent) 15%);
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.speed-control input {
|
||||
width: 150px;
|
||||
@media (max-width: 1020px) {
|
||||
.hero,
|
||||
.dashboard { grid-template-columns: 1fr; }
|
||||
.intro { min-height: auto; }
|
||||
.canvas-wrap { min-height: 360px; }
|
||||
}
|
||||
|
||||
.canvas-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-bottom: 30px;
|
||||
@media (max-width: 680px) {
|
||||
.page { width: min(100% - 20px, 1440px); padding-top: 10px; }
|
||||
.topbar { align-items: flex-start; border-radius: 16px; }
|
||||
.status-pill { display: none; }
|
||||
.intro, .lab-card, .panel, .prompt-card { border-radius: 18px; }
|
||||
.control-grid, .theme-row, .stats-grid { grid-template-columns: 1fr; }
|
||||
.canvas-wrap { min-height: 260px; }
|
||||
h1 { font-size: clamp(38px, 13vw, 58px); }
|
||||
}
|
||||
|
||||
#gameCanvas {
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
*, *::before, *::after { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
|
||||
}
|
||||
|
||||
.presets {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 15px;
|
||||
padding: 20px;
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
border-radius: 15px;
|
||||
}
|
||||
|
||||
.presets button {
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.presets button:hover {
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.controls, .presets {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
button {
|
||||
width: 100%;
|
||||
max-width: 300px;
|
||||
}
|
||||
|
||||
.speed-control {
|
||||
width: 100%;
|
||||
max-width: 300px;
|
||||
}
|
||||
|
||||
.stats-panel {
|
||||
gap: 10px;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user