832 lines
12 KiB
CSS
832 lines
12 KiB
CSS
:root {
|
|
--bg: #f4f6f8;
|
|
--surface: #ffffff;
|
|
--surface-soft: #f8fafc;
|
|
--border: #dde2e8;
|
|
--text: #111827;
|
|
--muted: #5f6b7a;
|
|
--primary: #1f2937;
|
|
--primary-strong: #0f172a;
|
|
--success: #16a34a;
|
|
--danger: #b91c1c;
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
font-family: "Manrope", "Segoe UI", sans-serif;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
}
|
|
|
|
.site-shell {
|
|
min-height: 100vh;
|
|
}
|
|
|
|
.topbar {
|
|
border-bottom: 1px solid var(--border);
|
|
background: var(--surface);
|
|
}
|
|
|
|
.topbar-inner {
|
|
max-width: 1000px;
|
|
margin: 0 auto;
|
|
min-height: 64px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 12px;
|
|
padding: 0 20px;
|
|
}
|
|
|
|
.brand {
|
|
color: var(--text);
|
|
text-decoration: none;
|
|
font-weight: 700;
|
|
font-size: 1.1rem;
|
|
}
|
|
|
|
.topnav {
|
|
display: flex;
|
|
gap: 8px;
|
|
}
|
|
|
|
.topnav a {
|
|
text-decoration: none;
|
|
color: var(--muted);
|
|
padding: 8px 12px;
|
|
border: 1px solid transparent;
|
|
border-radius: 4px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.topnav a:hover,
|
|
.topnav a.active {
|
|
color: var(--text);
|
|
background: var(--surface-soft);
|
|
border-color: var(--border);
|
|
}
|
|
|
|
.profile-pill {
|
|
border: 1px solid var(--border);
|
|
background: var(--surface-soft);
|
|
padding: 7px 10px;
|
|
font-size: 0.9rem;
|
|
color: var(--muted);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.quick-join-form {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.quick-join-form input {
|
|
width: 116px;
|
|
border: 1px solid var(--border);
|
|
border-radius: 4px;
|
|
padding: 9px 10px;
|
|
font: inherit;
|
|
text-transform: uppercase;
|
|
background: var(--surface);
|
|
}
|
|
|
|
.home-join {
|
|
margin-top: 10px;
|
|
}
|
|
|
|
.page-wrap {
|
|
max-width: 1000px;
|
|
margin: 0 auto;
|
|
padding: 24px 20px 30px;
|
|
}
|
|
|
|
h1,
|
|
h2,
|
|
h3 {
|
|
margin: 0;
|
|
}
|
|
|
|
h1 {
|
|
margin-bottom: 12px;
|
|
font-size: clamp(1.6rem, 3vw, 2.1rem);
|
|
}
|
|
|
|
h2 {
|
|
margin-bottom: 10px;
|
|
font-size: 1.25rem;
|
|
}
|
|
|
|
h3 {
|
|
margin: 14px 0 0;
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.panel {
|
|
border: 1px solid var(--border);
|
|
background: var(--surface);
|
|
border-radius: 8px;
|
|
padding: 16px;
|
|
}
|
|
|
|
.cta-row {
|
|
margin-top: 18px;
|
|
display: flex;
|
|
gap: 10px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.btn {
|
|
font: inherit;
|
|
border: 1px solid var(--border);
|
|
background: var(--surface);
|
|
color: var(--text);
|
|
padding: 9px 14px;
|
|
border-radius: 4px;
|
|
text-decoration: none;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.btn-primary {
|
|
background: var(--primary);
|
|
border-color: var(--primary);
|
|
color: #ffffff;
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background: var(--primary-strong);
|
|
border-color: var(--primary-strong);
|
|
}
|
|
|
|
.btn-secondary:hover {
|
|
background: var(--surface-soft);
|
|
}
|
|
|
|
.queue-layout {
|
|
display: grid;
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.play-layout {
|
|
display: grid;
|
|
grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
|
|
gap: 14px;
|
|
}
|
|
|
|
.chip-row {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
margin-top: 10px;
|
|
}
|
|
|
|
.chip {
|
|
border: 1px solid var(--border);
|
|
background: var(--surface-soft);
|
|
color: var(--text);
|
|
border-radius: 4px;
|
|
padding: 7px 11px;
|
|
font: inherit;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.chip.active,
|
|
.chip:hover {
|
|
border-color: #b7c0cb;
|
|
background: #eef2f6;
|
|
}
|
|
|
|
.search-form {
|
|
display: flex;
|
|
gap: 10px;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.search-form input {
|
|
flex: 1;
|
|
min-width: 0;
|
|
border: 1px solid var(--border);
|
|
border-radius: 4px;
|
|
padding: 9px 12px;
|
|
font: inherit;
|
|
}
|
|
|
|
.friends-section,
|
|
.friends-search-panel {
|
|
margin-top: 14px;
|
|
}
|
|
|
|
.friends-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
|
|
.friend-card {
|
|
border: 1px solid var(--border);
|
|
border-radius: 6px;
|
|
background: var(--surface-soft);
|
|
padding: 10px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 10px;
|
|
}
|
|
|
|
.friend-main {
|
|
min-width: 0;
|
|
}
|
|
|
|
.friend-username {
|
|
font-weight: 600;
|
|
}
|
|
|
|
.friend-status {
|
|
font-size: 0.9rem;
|
|
color: var(--muted);
|
|
}
|
|
|
|
.status-online {
|
|
color: var(--success);
|
|
}
|
|
|
|
.status-offline {
|
|
color: var(--muted);
|
|
}
|
|
|
|
.friend-actions {
|
|
display: flex;
|
|
gap: 8px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.friend-note,
|
|
.muted {
|
|
color: var(--muted);
|
|
}
|
|
|
|
.join-row {
|
|
margin-top: 8px;
|
|
display: flex;
|
|
gap: 8px;
|
|
}
|
|
|
|
.join-row input {
|
|
flex: 1;
|
|
min-width: 0;
|
|
border: 1px solid var(--border);
|
|
border-radius: 4px;
|
|
padding: 9px 10px;
|
|
font: inherit;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.play-meta {
|
|
margin-top: 12px;
|
|
}
|
|
|
|
.play-meta p {
|
|
margin: 0 0 6px;
|
|
}
|
|
|
|
.board-panel {
|
|
display: grid;
|
|
place-items: center;
|
|
}
|
|
|
|
#chess-canvas {
|
|
width: min(100%, 640px);
|
|
height: auto;
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
background: #fefefe;
|
|
}
|
|
|
|
.flash-stack {
|
|
margin-bottom: 14px;
|
|
display: grid;
|
|
gap: 8px;
|
|
}
|
|
|
|
.flash {
|
|
border: 1px solid var(--border);
|
|
background: var(--surface);
|
|
border-radius: 6px;
|
|
padding: 10px 12px;
|
|
color: var(--text);
|
|
}
|
|
|
|
.flash.success {
|
|
border-color: #b7dfc3;
|
|
background: #ecfdf3;
|
|
}
|
|
|
|
.flash.error {
|
|
border-color: #f0c2c2;
|
|
background: #fef2f2;
|
|
color: var(--danger);
|
|
}
|
|
|
|
@media (max-width: 700px) {
|
|
.topbar-inner {
|
|
min-height: auto;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
padding: 10px 14px;
|
|
}
|
|
|
|
.topnav {
|
|
width: 100%;
|
|
order: 3;
|
|
}
|
|
|
|
.topnav a {
|
|
flex: 1;
|
|
text-align: center;
|
|
}
|
|
|
|
.quick-join-form {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.quick-join-form input {
|
|
flex: 1;
|
|
min-width: 0;
|
|
width: auto;
|
|
}
|
|
|
|
.page-wrap {
|
|
padding: 16px 14px 24px;
|
|
}
|
|
|
|
.search-form {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.play-layout {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.game-stage {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.join-row {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.friend-card {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
}
|
|
}
|
|
|
|
.hidden {
|
|
display: none !important;
|
|
}
|
|
|
|
.play-page {
|
|
display: grid;
|
|
gap: 14px;
|
|
}
|
|
|
|
.code-badge {
|
|
margin-top: 6px;
|
|
display: inline-block;
|
|
font-size: 1.5rem;
|
|
font-weight: 700;
|
|
letter-spacing: 0.08em;
|
|
border: 1px dashed var(--border);
|
|
border-radius: 8px;
|
|
padding: 10px 14px;
|
|
background: var(--surface-soft);
|
|
}
|
|
|
|
.waiting-meta {
|
|
margin-top: 10px;
|
|
}
|
|
|
|
.waiting-meta p {
|
|
margin: 0 0 6px;
|
|
}
|
|
|
|
.game-stage {
|
|
display: grid;
|
|
grid-template-columns: minmax(0, 1fr) 300px;
|
|
gap: 14px;
|
|
}
|
|
|
|
.game-sidebar p {
|
|
margin: 0 0 8px;
|
|
}
|
|
|
|
.captured-row {
|
|
min-height: 28px;
|
|
border: 1px solid var(--border);
|
|
border-radius: 6px;
|
|
background: var(--surface-soft);
|
|
padding: 6px 8px;
|
|
font-size: 1.15rem;
|
|
}
|
|
|
|
.fen-box {
|
|
width: 100%;
|
|
min-height: 94px;
|
|
border: 1px solid var(--border);
|
|
border-radius: 6px;
|
|
background: var(--surface-soft);
|
|
color: var(--text);
|
|
font:
|
|
0.85rem/1.3 ui-monospace,
|
|
SFMono-Regular,
|
|
Menlo,
|
|
Consolas,
|
|
monospace;
|
|
padding: 8px;
|
|
resize: vertical;
|
|
}
|
|
|
|
.play-modal {
|
|
position: fixed;
|
|
inset: 0;
|
|
background: rgba(15, 23, 42, 0.42);
|
|
display: grid;
|
|
place-items: center;
|
|
z-index: 30;
|
|
padding: 16px;
|
|
}
|
|
|
|
.play-modal-card {
|
|
width: min(440px, 100%);
|
|
border: 1px solid var(--border);
|
|
background: var(--surface);
|
|
border-radius: 10px;
|
|
padding: 14px;
|
|
}
|
|
|
|
@media (max-width: 980px) {
|
|
.game-stage {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
}
|
|
|
|
.captured-piece {
|
|
width: 20px;
|
|
height: 20px;
|
|
object-fit: contain;
|
|
margin-right: 3px;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.player-strip {
|
|
width: min(100%, 640px);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 10px;
|
|
border-radius: 8px;
|
|
padding: 8px 10px;
|
|
}
|
|
|
|
.player-main {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
min-width: 0;
|
|
}
|
|
|
|
.player-name {
|
|
font-weight: 700;
|
|
}
|
|
|
|
.player-time {
|
|
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.player-meta {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
min-width: 0;
|
|
}
|
|
|
|
.capture-strip {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
min-height: 24px;
|
|
}
|
|
|
|
.material-pill {
|
|
border: 1px solid var(--border);
|
|
background: var(--surface);
|
|
border-radius: 999px;
|
|
padding: 2px 8px;
|
|
font-size: 0.85rem;
|
|
min-width: 36px;
|
|
text-align: center;
|
|
}
|
|
|
|
.move-list-wrap {
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
overflow: hidden;
|
|
background: var(--surface-soft);
|
|
max-height: calc(100vh - 500px);
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.move-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
|
|
.move-table th,
|
|
.move-table td {
|
|
text-align: left;
|
|
padding: 8px 10px;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
|
|
.move-table thead th {
|
|
background: #eef2f6;
|
|
font-size: 0.85rem;
|
|
color: var(--muted);
|
|
position: sticky;
|
|
top: 0;
|
|
}
|
|
|
|
.move-table tbody tr:last-child td {
|
|
border-bottom: 0;
|
|
}
|
|
|
|
.move-table td:first-child,
|
|
.move-table th:first-child {
|
|
width: 48px;
|
|
color: var(--muted);
|
|
}
|
|
|
|
.games-page {
|
|
display: grid;
|
|
gap: 14px;
|
|
}
|
|
|
|
.games-header {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: space-between;
|
|
gap: 12px;
|
|
}
|
|
|
|
.games-header p {
|
|
margin: 6px 0 0;
|
|
}
|
|
|
|
.games-header-actions {
|
|
margin-top: 0;
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
.games-list {
|
|
display: grid;
|
|
gap: 10px;
|
|
}
|
|
|
|
.game-card {
|
|
display: grid;
|
|
gap: 10px;
|
|
text-decoration: none;
|
|
color: inherit;
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
padding: 14px;
|
|
background: var(--surface-soft);
|
|
}
|
|
|
|
.game-card:hover {
|
|
border-color: #b7c0cb;
|
|
background: #eef2f6;
|
|
}
|
|
|
|
.game-card-main {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: space-between;
|
|
gap: 12px;
|
|
}
|
|
|
|
.game-card-label {
|
|
margin: 0;
|
|
color: var(--muted);
|
|
font-size: 0.85rem;
|
|
}
|
|
|
|
.game-card-title {
|
|
margin: 4px 0 0;
|
|
font-size: 1.1rem;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.game-card-meta {
|
|
display: flex;
|
|
gap: 0;
|
|
flex-wrap: wrap;
|
|
color: var(--muted);
|
|
font-size: 0.95rem;
|
|
}
|
|
|
|
.game-card-meta span {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.game-card-meta span + span::before {
|
|
content: "|";
|
|
margin: 0 10px;
|
|
color: #9aa3af;
|
|
}
|
|
|
|
.result-badge {
|
|
border: 1px solid currentColor;
|
|
border-radius: 6px;
|
|
padding: 6px 10px;
|
|
font-size: 0.85rem;
|
|
font-weight: 700;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.04em;
|
|
}
|
|
|
|
.result-win {
|
|
background: #ecfdf3;
|
|
color: var(--success);
|
|
}
|
|
|
|
.result-loss {
|
|
background: #fef2f2;
|
|
color: var(--danger);
|
|
}
|
|
|
|
.result-draw {
|
|
background: #eef2f6;
|
|
color: var(--primary);
|
|
}
|
|
|
|
.empty-state {
|
|
text-align: center;
|
|
padding: 24px 14px;
|
|
}
|
|
|
|
.empty-state p {
|
|
margin: 8px 0 0;
|
|
}
|
|
|
|
.game-detail-layout {
|
|
display: grid;
|
|
grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
|
|
gap: 14px;
|
|
}
|
|
|
|
.game-summary {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: space-between;
|
|
gap: 14px;
|
|
}
|
|
|
|
.game-summary-copy {
|
|
min-width: 0;
|
|
}
|
|
|
|
.game-summary-label {
|
|
margin: 0;
|
|
color: var(--muted);
|
|
font-size: 0.85rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.04em;
|
|
}
|
|
|
|
.game-summary-title {
|
|
margin: 4px 0 0;
|
|
font-size: 2rem;
|
|
line-height: 1;
|
|
text-transform: capitalize;
|
|
}
|
|
|
|
.game-summary-meta {
|
|
margin-top: 14px;
|
|
border-top: 1px solid var(--border);
|
|
}
|
|
|
|
.game-meta-row {
|
|
display: flex;
|
|
align-items: baseline;
|
|
justify-content: space-between;
|
|
gap: 16px;
|
|
padding: 10px 0;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
|
|
.game-meta-key {
|
|
color: var(--muted);
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.game-meta-value {
|
|
text-align: right;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.history-board {
|
|
margin-top: 14px;
|
|
width: min(100%, 420px);
|
|
aspect-ratio: 1 / 1;
|
|
display: grid;
|
|
grid-template-columns: repeat(8, 1fr);
|
|
grid-template-rows: repeat(8, minmax(0, 1fr));
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
overflow: hidden;
|
|
background: #d2b48c;
|
|
}
|
|
|
|
.history-square {
|
|
display: grid;
|
|
place-items: center;
|
|
min-width: 0;
|
|
min-height: 0;
|
|
aspect-ratio: 1 / 1;
|
|
}
|
|
|
|
.history-square-light {
|
|
background: #f6e7cf;
|
|
}
|
|
|
|
.history-square-dark {
|
|
background: #b18155;
|
|
}
|
|
|
|
.history-square img {
|
|
width: 82%;
|
|
height: 82%;
|
|
object-fit: contain;
|
|
}
|
|
|
|
#chess-canvas {
|
|
width: min(100%, 640px);
|
|
aspect-ratio: 1 / 1;
|
|
height: auto;
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
background: #fefefe;
|
|
}
|
|
|
|
@media (max-width: 700px) {
|
|
.player-strip {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
}
|
|
|
|
.games-header {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.games-header-actions {
|
|
width: 100%;
|
|
justify-content: flex-start;
|
|
}
|
|
|
|
.game-card-main {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.game-summary {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.game-summary-title {
|
|
font-size: 1.7rem;
|
|
}
|
|
|
|
.game-meta-row {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
gap: 4px;
|
|
}
|
|
|
|
.game-meta-value {
|
|
text-align: left;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 900px) {
|
|
.game-detail-layout {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
}
|