testspace / frontend /src /index.css
Mayug Maniparambil
Add admin leaderboard, LLM comparison, random puzzles, clearer rules
c52f47a
Raw
History Blame Contribute Delete
16.5 kB
:root {
color: #13231d;
background:
radial-gradient(circle at top left, rgba(235, 242, 168, 0.45), transparent 34%),
radial-gradient(circle at bottom right, rgba(117, 205, 161, 0.28), transparent 28%),
linear-gradient(180deg, #f7f7f0 0%, #ecf2ea 100%);
font-family:
"IBM Plex Sans",
"Avenir Next",
"Segoe UI",
sans-serif;
line-height: 1.4;
font-weight: 400;
font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
* {
box-sizing: border-box;
}
body {
margin: 0;
min-width: 320px;
min-height: 100vh;
}
button,
input,
select,
textarea {
font: inherit;
}
button {
cursor: pointer;
}
a {
color: inherit;
}
.shell {
min-height: 100vh;
padding: 24px;
}
.panel {
border: 1px solid rgba(18, 49, 41, 0.14);
border-radius: 24px;
background: rgba(255, 255, 255, 0.82);
box-shadow:
0 20px 50px rgba(31, 51, 42, 0.08),
inset 0 1px 0 rgba(255, 255, 255, 0.7);
backdrop-filter: blur(18px);
}
.home-layout {
display: grid;
gap: 24px;
max-width: 1100px;
margin: 0 auto;
}
.hero {
padding: 40px;
display: grid;
gap: 16px;
}
.eyebrow {
font-size: 0.78rem;
letter-spacing: 0.14em;
text-transform: uppercase;
color: #42685a;
}
.hero h1 {
margin: 0;
font-family:
"Iowan Old Style",
"Palatino Linotype",
serif;
font-size: clamp(2.4rem, 6vw, 4.8rem);
line-height: 0.95;
max-width: 9ch;
}
.hero p {
margin: 0;
max-width: 65ch;
color: #365145;
font-size: 1.02rem;
}
.hero-grid {
display: grid;
gap: 24px;
}
.card {
padding: 28px;
}
.form-grid {
display: grid;
gap: 18px;
}
.field {
display: grid;
gap: 8px;
}
.field label {
font-size: 0.92rem;
font-weight: 600;
color: #29463b;
}
.field input,
.field select,
.ascii-preview {
width: 100%;
border: 1px solid rgba(28, 55, 45, 0.16);
border-radius: 16px;
background: rgba(255, 255, 255, 0.94);
padding: 14px 16px;
color: #13231d;
}
.puzzle-picker {
display: grid;
gap: 10px;
max-height: 360px;
overflow: auto;
padding-right: 4px;
}
.puzzle-option {
display: grid;
grid-template-columns: auto 44px minmax(0, 1fr);
gap: 12px;
align-items: center;
padding: 14px 16px;
border: 1px solid rgba(28, 55, 45, 0.12);
border-radius: 18px;
background: rgba(255, 255, 255, 0.88);
transition:
border-color 140ms ease,
background 140ms ease,
transform 140ms ease;
}
.puzzle-option:hover {
transform: translateY(-1px);
border-color: rgba(28, 55, 45, 0.22);
}
.puzzle-option.selected {
border-color: rgba(21, 79, 58, 0.42);
background: rgba(220, 239, 229, 0.72);
}
.puzzle-option input {
margin: 0;
}
.puzzle-option-seq {
font-size: 0.88rem;
font-weight: 700;
color: #42685a;
}
.puzzle-option-text {
display: grid;
gap: 2px;
}
.puzzle-option-text span {
color: #46695d;
font-size: 0.88rem;
}
.primary-button,
.secondary-button,
.ghost-button {
border: none;
border-radius: 999px;
padding: 14px 22px;
font-weight: 700;
transition:
transform 140ms ease,
box-shadow 140ms ease,
opacity 140ms ease;
}
.primary-button {
color: #fcfff8;
background: linear-gradient(135deg, #154f3a, #2f7f63);
box-shadow: 0 12px 28px rgba(28, 77, 59, 0.25);
}
.secondary-button {
color: #12362c;
background: #dcefe5;
}
.ghost-button {
color: #285144;
background: transparent;
border: 1px solid rgba(40, 81, 68, 0.18);
}
.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover {
transform: translateY(-1px);
}
.button-row {
display: flex;
gap: 12px;
flex-wrap: wrap;
}
.hint-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: 14px;
}
.hint-box {
padding: 18px;
border-radius: 18px;
background: rgba(18, 54, 44, 0.05);
}
.hint-box strong {
display: block;
margin-bottom: 6px;
}
.admin-button-wrap {
position: fixed;
top: 18px;
right: 18px;
z-index: 1000;
display: flex;
flex-direction: column;
align-items: flex-end;
gap: 8px;
}
.admin-button {
border: 1px solid rgba(18, 49, 41, 0.18);
background: rgba(255, 255, 255, 0.85);
color: #2a4a3d;
padding: 6px 12px;
border-radius: 999px;
font-size: 0.82rem;
font-weight: 500;
backdrop-filter: blur(10px);
cursor: pointer;
}
.admin-button:hover {
border-color: rgba(18, 49, 41, 0.4);
}
.admin-button-on {
background: rgba(34, 145, 92, 0.18);
border-color: rgba(34, 145, 92, 0.45);
color: #145a37;
}
.admin-panel {
background: rgba(255, 255, 255, 0.96);
border: 1px solid rgba(18, 49, 41, 0.18);
border-radius: 14px;
padding: 14px;
width: 280px;
box-shadow: 0 18px 40px rgba(31, 51, 42, 0.16);
display: grid;
gap: 10px;
}
.admin-form {
display: grid;
gap: 8px;
}
.admin-form label {
font-size: 0.78em;
color: #46695d;
font-weight: 500;
}
.admin-form input {
padding: 8px 10px;
border-radius: 8px;
border: 1px solid rgba(18, 49, 41, 0.18);
font-size: 0.9rem;
}
.admin-panel-text {
font-size: 0.88em;
color: #46695d;
}
.admin-panel-error {
font-size: 0.85em;
color: #7f1e1e;
}
.leaderboard-panel {
margin-top: 18px;
padding: 20px 24px;
display: grid;
gap: 14px;
}
.leaderboard-header {
display: flex;
justify-content: space-between;
align-items: flex-end;
gap: 12px;
}
.leaderboard-summary {
font-size: 0.92rem;
color: #46695d;
margin-top: 2px;
}
.leaderboard-toggle {
font-size: 0.82em;
color: #46695d;
display: inline-flex;
align-items: center;
gap: 6px;
}
.leaderboard-empty {
font-size: 0.92em;
color: #5a7568;
font-style: italic;
}
.leaderboard-table-wrap {
overflow-x: auto;
}
.leaderboard-table {
width: 100%;
border-collapse: collapse;
font-size: 0.92rem;
}
.leaderboard-table th,
.leaderboard-table td {
text-align: left;
padding: 8px 10px;
border-bottom: 1px solid rgba(18, 49, 41, 0.08);
}
.leaderboard-table th {
font-size: 0.74em;
letter-spacing: 0.08em;
text-transform: uppercase;
font-weight: 600;
color: #46695d;
}
.leaderboard-table .row-solved td {
background: rgba(34, 145, 92, 0.05);
}
.leaderboard-table .row-unsolved td {
color: #6b7a73;
}
.leaderboard-rank {
width: 36px;
font-variant-numeric: tabular-nums;
}
.leaderboard-time {
font-variant-numeric: tabular-nums;
}
.leaderboard-status {
font-size: 0.82em;
text-transform: uppercase;
letter-spacing: 0.06em;
color: #46695d;
}
.submit-banner {
margin-top: 14px;
padding: 14px 18px;
border-radius: 14px;
font-weight: 500;
font-size: 1.02rem;
text-align: center;
border: 1px solid transparent;
animation: submit-banner-pop 220ms ease-out;
}
.submit-banner-wrong {
background: rgba(204, 142, 41, 0.12);
border-color: rgba(204, 142, 41, 0.32);
color: #8a5a14;
}
.submit-banner-error {
background: rgba(170, 44, 44, 0.1);
border-color: rgba(170, 44, 44, 0.32);
color: #7f1e1e;
}
@keyframes submit-banner-pop {
0% { transform: translateY(-6px); opacity: 0; }
100% { transform: translateY(0); opacity: 1; }
}
.field-hint {
display: block;
margin-top: 6px;
font-size: 0.82em;
color: #5a7568;
line-height: 1.4;
}
.field-hint code {
background: rgba(18, 54, 44, 0.08);
padding: 1px 6px;
border-radius: 6px;
font-size: 0.95em;
}
.rules-box strong {
display: block;
font-size: 0.78em;
letter-spacing: 0.08em;
text-transform: uppercase;
color: #46695d;
margin-bottom: 6px;
}
.rules-box p {
margin: 0;
line-height: 1.5;
}
.tutorial-link {
display: inline-block;
margin-top: 8px;
font-size: 0.85em;
color: #2a6151;
text-decoration: none;
border-bottom: 1px solid rgba(42, 97, 81, 0.3);
}
.tutorial-link:hover {
color: #18402f;
border-bottom-color: rgba(24, 64, 47, 0.65);
}
.play-layout {
max-width: 1400px;
margin: 0 auto;
display: grid;
gap: 18px;
}
.topbar {
padding: 20px 24px;
display: flex;
gap: 16px;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
}
.topbar h1 {
margin: 0;
font-size: 1.4rem;
}
.meta-line {
display: flex;
gap: 10px;
flex-wrap: wrap;
color: #46695d;
font-size: 0.92rem;
}
.meta-pill {
padding: 8px 12px;
border-radius: 999px;
background: rgba(19, 35, 29, 0.06);
}
.play-grid {
display: grid;
grid-template-columns: minmax(0, 1fr) 320px;
gap: 18px;
}
.puzzle-panel {
padding: 24px;
overflow: auto;
}
.sidebar {
padding: 20px;
display: grid;
gap: 18px;
align-content: start;
}
.image-frame {
border-radius: 18px;
overflow: hidden;
border: 1px solid rgba(18, 35, 29, 0.08);
background: #f4f7f1;
}
.image-frame img {
display: block;
width: 100%;
height: auto;
}
.timer {
font-size: clamp(2rem, 5vw, 3.2rem);
font-weight: 800;
letter-spacing: -0.04em;
}
.status-box {
padding: 14px 16px;
border-radius: 18px;
background: rgba(18, 54, 44, 0.06);
color: #23463a;
}
.status-box.error {
background: rgba(170, 44, 44, 0.1);
color: #7f1e1e;
}
.ascii-preview {
min-height: 180px;
font-family:
"SFMono-Regular",
"Menlo",
"Consolas",
monospace;
font-size: 0.8rem;
white-space: pre;
overflow: auto;
}
.compact-preview {
min-height: 0;
}
.editor-stack {
display: grid;
gap: 16px;
}
.puzzle-note {
padding: 12px 14px;
border-radius: 16px;
background: rgba(18, 54, 44, 0.06);
color: #2b5446;
font-size: 0.95rem;
}
.board-grid {
display: inline-grid;
gap: 2px;
padding: 14px;
border-radius: 18px;
background: rgba(17, 35, 29, 0.06);
}
.board-cell,
.board-square,
.board-char {
display: flex;
align-items: center;
justify-content: center;
user-select: none;
}
.board-cell {
width: 38px;
height: 38px;
border-radius: 12px;
border: none;
background: rgba(255, 255, 255, 0.92);
color: #143228;
font-weight: 700;
}
.board-cell.water {
background: rgba(255, 255, 255, 0.58);
color: #4c7567;
}
.board-cell.fixed {
background: linear-gradient(180deg, #fff3ce, #f2df9b);
}
.board-cell.island-cell {
border-radius: 50%;
box-shadow: inset 0 -2px 0 rgba(20, 40, 31, 0.12);
}
.board-cell.bridge-cell {
font-size: 1.1rem;
}
.board-cell.mirror {
background: linear-gradient(180deg, #dbe9ff, #b8d1ff);
}
.board-cell.endpoint-cell {
box-shadow:
inset 0 -2px 0 rgba(20, 40, 31, 0.12),
0 0 0 3px rgba(255, 255, 255, 0.4);
}
.board-square {
width: 44px;
height: 44px;
border-radius: 14px;
border: 1px solid rgba(20, 50, 40, 0.08);
background: rgba(255, 255, 255, 0.92);
font-weight: 700;
}
.board-square.fill {
background: #17352b;
color: #f7fff6;
}
.board-square.empty {
background: #eef2ea;
color: #406257;
}
.board-square.unknown {
background: rgba(255, 255, 255, 0.92);
color: #a9b7b0;
}
.char-board {
display: inline-grid;
gap: 1px;
padding: 14px;
border-radius: 18px;
background: rgba(17, 35, 29, 0.08);
font-family:
"SFMono-Regular",
"Menlo",
"Consolas",
monospace;
}
.board-char {
width: 24px;
height: 24px;
border: none;
border-radius: 6px;
background: transparent;
color: #17362c;
}
.board-char.clickable {
background: rgba(255, 255, 255, 0.85);
}
.pattern-layout {
display: grid;
grid-template-columns: 92px max-content;
gap: 12px;
align-items: end;
width: max-content;
}
.pattern-top-spacer {
min-height: 1px;
}
.pattern-top-clues {
display: grid;
gap: 2px;
align-items: end;
justify-content: start;
}
.pattern-row-pair {
display: contents;
}
.pattern-column-stack {
display: grid;
gap: 4px;
justify-items: center;
align-content: end;
}
.pattern-board {
padding: 10px;
width: max-content;
}
.pattern-clue {
color: #406257;
}
.pattern-row-clue {
display: flex;
justify-content: flex-end;
gap: 6px;
flex-wrap: wrap;
padding-right: 4px;
}
.pattern-clue-pill {
display: inline-flex;
min-width: 28px;
min-height: 22px;
align-items: center;
justify-content: center;
padding: 0 8px;
border-radius: 999px;
background: rgba(18, 54, 44, 0.08);
color: #214338;
font-family:
"SFMono-Regular",
"Menlo",
"Consolas",
monospace;
font-size: 0.86rem;
font-weight: 700;
}
.palette {
display: flex;
gap: 8px;
flex-wrap: wrap;
}
.palette button {
width: 38px;
height: 38px;
border-radius: 999px;
border: 2px solid transparent;
color: #112219;
font-weight: 800;
}
.palette button.active {
border-color: #13231d;
transform: scale(1.05);
}
.erase-swatch {
width: auto;
padding: 0 16px;
background: #eef2ea;
}
.svg-board-shell {
overflow: auto;
padding: 10px;
border-radius: 20px;
background: rgba(17, 35, 29, 0.05);
}
.svg-board {
display: block;
width: min(100%, 760px);
height: auto;
}
.svg-cell-bg,
.galaxy-cell-bg {
fill: rgba(255, 255, 255, 0.84);
}
.galaxy-cell-bg {
stroke: rgba(35, 70, 58, 0.08);
stroke-width: 1.5;
}
.svg-clue-text {
fill: #18392e;
font-size: 22px;
font-weight: 700;
}
.svg-vertex {
fill: #1f4d3c;
}
.svg-hit-target {
cursor: pointer;
}
.svg-hit-line {
stroke: transparent;
stroke-width: 22;
stroke-linecap: round;
}
.svg-line,
.svg-wall {
stroke-linecap: round;
transition:
stroke 120ms ease,
opacity 120ms ease,
stroke-width 120ms ease;
}
.svg-line.active {
stroke: #1f6a4f;
stroke-width: 7;
}
.svg-line.ghost {
stroke: rgba(39, 83, 68, 0.16);
stroke-width: 4;
}
.svg-wall.fixed {
stroke: #28493d;
stroke-width: 5;
}
.svg-wall.active {
stroke: #215b46;
stroke-width: 6;
}
.svg-wall.ghost {
stroke: rgba(39, 83, 68, 0.16);
stroke-width: 4;
}
.svg-xmark {
fill: #7c8e87;
font-size: 21px;
font-weight: 700;
}
.galaxy-dot {
fill: #17352b;
stroke: #f7f7f0;
stroke-width: 3;
}
.undead-legend {
display: inline-flex;
width: fit-content;
padding: 10px 14px;
border-radius: 999px;
background: rgba(18, 54, 44, 0.08);
color: #224639;
font-weight: 600;
}
.undead-grid-wrap {
display: grid;
gap: 10px;
}
.undead-clue-row {
display: grid;
grid-template-columns: 40px repeat(4, 38px) 40px;
gap: 8px;
align-items: center;
}
.undead-clue-box,
.undead-clue-spacer {
display: flex;
align-items: center;
justify-content: center;
min-height: 32px;
color: #46695d;
font-family:
"SFMono-Regular",
"Menlo",
"Consolas",
monospace;
}
.undead-clue-box.side {
font-weight: 700;
}
.undead-cell.monster-cell {
background: rgba(255, 255, 255, 0.96);
}
.done-layout {
max-width: 820px;
margin: 0 auto;
padding-top: 64px;
display: grid;
gap: 18px;
}
.done-card {
padding: 36px;
display: grid;
gap: 16px;
}
.comparison-card {
padding: 28px;
display: grid;
gap: 16px;
}
.comparison-headline {
margin: 0;
font-size: 1.15rem;
font-weight: 600;
line-height: 1.4;
color: #18402f;
}
.comparison-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 16px;
}
.comparison-column {
display: grid;
gap: 10px;
}
.comparison-column-title {
font-size: 0.78em;
letter-spacing: 0.08em;
text-transform: uppercase;
font-weight: 600;
}
.comparison-solved {
color: #1d6b46;
}
.comparison-failed {
color: #7a3a3a;
}
.comparison-list {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.comparison-pill {
display: inline-block;
padding: 4px 10px;
border-radius: 999px;
font-size: 0.88em;
border: 1px solid transparent;
}
.comparison-pill-solved {
background: rgba(34, 145, 92, 0.12);
border-color: rgba(34, 145, 92, 0.28);
color: #145a37;
}
.comparison-pill-failed {
background: rgba(170, 70, 70, 0.1);
border-color: rgba(170, 70, 70, 0.25);
color: #7a3030;
}
.comparison-empty {
font-size: 0.9em;
color: #5a7568;
font-style: italic;
}
.comparison-footnote {
margin: 0;
font-size: 0.82em;
color: #5a7568;
}
.comparison-footnote code {
background: rgba(18, 54, 44, 0.08);
padding: 1px 6px;
border-radius: 6px;
}
@media (max-width: 640px) {
.comparison-grid {
grid-template-columns: 1fr;
}
}
@media (max-width: 980px) {
.play-grid {
grid-template-columns: 1fr;
}
}
@media (max-width: 640px) {
.shell {
padding: 14px;
}
.hero,
.card,
.puzzle-panel,
.sidebar,
.done-card {
padding: 18px;
}
.board-cell {
width: 32px;
height: 32px;
}
.board-square {
width: 38px;
height: 38px;
}
.undead-clue-row {
grid-template-columns: 32px repeat(4, 32px) 32px;
gap: 6px;
}
.board-char {
width: 20px;
height: 20px;
font-size: 0.75rem;
}
}