39321-vm/assets/css/custom.css
2026-03-25 17:19:10 +00:00

577 lines
10 KiB
CSS

:root {
--bg: #0b0d12;
--bg-elevated: #12161d;
--surface: #161b22;
--surface-strong: #1d242d;
--surface-soft: #11161d;
--border: #27303a;
--border-strong: #37424f;
--text: #edf1f5;
--muted: #98a2ad;
--accent: #d2b062;
--accent-soft: rgba(210, 176, 98, 0.12);
--success: #79c08f;
--danger: #e37979;
--shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
--radius-sm: 8px;
--radius-md: 12px;
--radius-lg: 16px;
--spacing-1: 0.25rem;
--spacing-2: 0.5rem;
--spacing-3: 0.75rem;
--spacing-4: 1rem;
--spacing-5: 1.5rem;
--spacing-6: 2rem;
}
html,
body {
min-height: 100%;
}
body.tetris-body {
margin: 0;
background-color: var(--bg);
color: var(--text);
font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
letter-spacing: -0.01em;
}
::selection {
background: rgba(210, 176, 98, 0.24);
}
.page-shell {
min-height: 100vh;
}
.app-header {
position: sticky;
top: 0;
z-index: 20;
backdrop-filter: blur(14px);
background: rgba(11, 13, 18, 0.92);
}
.eyebrow,
.panel-label {
font-size: 0.72rem;
letter-spacing: 0.14em;
text-transform: uppercase;
color: var(--muted);
}
.app-title {
font-size: clamp(1.4rem, 2vw, 1.9rem);
font-weight: 700;
color: var(--text);
}
.status-badge {
border: 1px solid var(--border);
background: var(--surface-strong) !important;
color: var(--text);
padding: 0.55rem 0.75rem;
font-weight: 600;
}
.control-btn {
min-width: 92px;
}
.status-badge.state-ready {
background: rgba(39, 48, 58, 0.9) !important;
}
.status-badge.state-playing {
background: rgba(210, 176, 98, 0.16) !important;
color: #f3e6c8;
border-color: rgba(210, 176, 98, 0.5);
}
.status-badge.state-paused {
background: rgba(122, 141, 182, 0.16) !important;
color: #d3deef;
border-color: rgba(122, 141, 182, 0.4);
}
.status-badge.state-game-over {
background: rgba(203, 125, 125, 0.16) !important;
color: #f3d6d6;
border-color: rgba(203, 125, 125, 0.4);
}
.panel {
background: rgba(18, 22, 29, 0.96);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
box-shadow: var(--shadow);
padding: var(--spacing-5);
}
.compact-panel {
padding: 1.1rem;
}
.panel-header {
margin-bottom: 1rem;
}
.panel-title {
font-size: 1.05rem;
font-weight: 650;
margin: 0;
}
.panel-inline-stats {
color: var(--muted);
}
.inline-chip {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 0.75rem;
border: 1px solid var(--border);
border-radius: 999px;
background: rgba(17, 22, 29, 0.72);
font-size: 0.85rem;
}
.board-layout {
display: grid;
gap: 1rem;
}
.board-frame {
position: relative;
border-radius: var(--radius-lg);
overflow: hidden;
border: 1px solid var(--border-strong);
background: #0e1218;
}
#tetris-board {
display: block;
width: auto;
max-width: 100%;
height: min(60vh, 560px);
aspect-ratio: 1 / 2;
margin-inline: auto;
background: transparent;
}
.board-overlay {
position: absolute;
inset: 0;
display: grid;
place-items: center;
padding: 1.5rem;
text-align: center;
background: rgba(11, 13, 18, 0.82);
color: var(--text);
transition: opacity 180ms ease, visibility 180ms ease;
}
.board-overlay.hidden {
opacity: 0;
visibility: hidden;
pointer-events: none;
}
.overlay-label {
font-size: 0.8rem;
text-transform: uppercase;
letter-spacing: 0.16em;
color: var(--accent);
}
.overlay-title {
font-size: clamp(1.4rem, 4vw, 2.1rem);
font-weight: 700;
}
.overlay-copy {
color: var(--muted);
max-width: 34rem;
}
.stats-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 0.9rem;
}
.stat-card,
.history-detail,
.preview-wrap {
border: 1px solid var(--border);
border-radius: var(--radius-md);
background: rgba(14, 18, 24, 0.92);
}
.stat-card {
padding: 1rem;
}
.stat-label,
.summary-label,
.history-detail-header,
.detail-grid dt {
display: block;
color: var(--muted);
font-size: 0.78rem;
text-transform: uppercase;
letter-spacing: 0.08em;
}
.stat-value {
display: block;
margin-top: 0.25rem;
font-size: clamp(1.2rem, 2vw, 1.55rem);
font-weight: 700;
}
.preview-wrap {
padding: 0.75rem;
display: flex;
justify-content: center;
align-items: center;
min-height: 176px;
}
#next-piece {
width: 144px;
height: 144px;
}
.multiplayer-block .form-control {
background: var(--surface-soft);
border-color: var(--border);
color: var(--text);
}
.multiplayer-block .form-control:focus {
background: var(--surface-soft);
border-color: var(--accent);
box-shadow: 0 0 0 0.2rem rgba(210, 176, 98, 0.15);
}
.room-code-card {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.75rem;
padding: 0.75rem 0.9rem;
border: 1px dashed var(--border-strong);
border-radius: var(--radius-md);
background: rgba(14, 18, 24, 0.6);
}
.room-code-label {
display: block;
color: var(--muted);
font-size: 0.7rem;
text-transform: uppercase;
letter-spacing: 0.16em;
}
.room-code-value {
font-size: 1.1rem;
font-weight: 700;
letter-spacing: 0.2em;
}
.room-status .status-badge {
font-size: 0.75rem;
}
.opponent-wrap {
display: grid;
gap: 0.75rem;
}
#opponent-board {
width: 100%;
max-width: 240px;
height: auto;
margin: 0 auto;
aspect-ratio: 1 / 2;
border: 1px solid var(--border-strong);
border-radius: var(--radius-md);
background: #0e1218;
}
.opponent-name {
font-weight: 600;
}
.detail-grid {
display: grid;
gap: 0.9rem;
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.detail-grid.compact {
gap: 0.75rem;
}
.detail-grid .full {
grid-column: 1 / -1;
}
.detail-grid dd {
margin: 0.28rem 0 0;
font-size: 1rem;
font-weight: 600;
}
.controls-list {
display: grid;
gap: 0.7rem;
}
.controls-list li {
display: flex;
justify-content: space-between;
align-items: center;
gap: 0.75rem;
color: var(--text);
font-size: 0.92rem;
padding-bottom: 0.65rem;
border-bottom: 1px solid rgba(39, 48, 58, 0.7);
}
.controls-list li:last-child {
padding-bottom: 0;
border-bottom: 0;
}
kbd {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 2rem;
padding: 0.28rem 0.5rem;
margin-left: 0.35rem;
border-radius: var(--radius-sm);
border: 1px solid var(--border-strong);
background: var(--surface-soft);
color: var(--text);
font-size: 0.78rem;
font-family: inherit;
box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}
.empty-state {
padding: 0.95rem 1rem;
border: 1px dashed var(--border-strong);
border-radius: var(--radius-md);
color: var(--muted);
background: rgba(14, 18, 24, 0.5);
font-size: 0.92rem;
}
.history-list {
display: grid;
gap: 0.75rem;
}
.history-item {
width: 100%;
text-align: left;
border: 1px solid var(--border);
border-radius: var(--radius-md);
background: rgba(14, 18, 24, 0.88);
padding: 0.9rem 1rem;
color: var(--text);
transition: border-color 140ms ease, transform 140ms ease, background-color 140ms ease;
}
.history-item:hover,
.history-item:focus-visible {
border-color: var(--accent);
background: rgba(17, 22, 29, 1);
transform: translateY(-1px);
outline: none;
}
.history-item.active {
border-color: var(--accent);
background: rgba(210, 176, 98, 0.08);
}
.history-topline,
.history-subline {
display: flex;
justify-content: space-between;
gap: 0.75rem;
}
.history-score {
font-weight: 700;
}
.history-meta,
.history-date {
color: var(--muted);
font-size: 0.82rem;
}
.history-detail {
margin-top: 0.85rem;
padding: 0.95rem 1rem;
}
.summary-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 1rem;
margin-bottom: 1rem;
}
.summary-grid strong {
display: block;
margin-top: 0.25rem;
font-size: 1.3rem;
}
.modal-copy,
.toast-body,
.text-secondary {
color: var(--muted) !important;
}
.btn-light {
background: #f5f7f8;
border-color: #f5f7f8;
}
.btn-outline-light {
border-color: var(--border-strong);
color: var(--text);
}
.btn-outline-light:hover,
.btn-outline-light:focus-visible {
background: var(--surface-strong);
border-color: var(--accent);
color: var(--text);
}
.btn:focus-visible,
.history-item:focus-visible {
box-shadow: 0 0 0 0.2rem rgba(210, 176, 98, 0.18);
}
.toast,
.modal-content {
border-radius: var(--radius-md);
}
@media (max-width: 991.98px) {
.app-header {
position: static;
}
.panel {
padding: 1rem;
}
}
@media (max-width: 575.98px) {
#tetris-board {
height: min(52vh, 460px);
}
.stats-grid,
.detail-grid,
.summary-grid {
grid-template-columns: 1fr 1fr;
}
.controls-list li {
align-items: flex-start;
flex-direction: column;
}
.history-topline,
.history-subline {
flex-direction: column;
gap: 0.2rem;
}
}
.field-help {
color: var(--bs-secondary-color);
font-size: 0.78rem;
line-height: 1.4;
}
.scoreboard-list {
display: grid;
gap: 0.75rem;
}
.scoreboard-item {
display: grid;
grid-template-columns: auto 1fr;
gap: 0.875rem;
align-items: start;
padding: 0.9rem 1rem;
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 14px;
background: rgba(255, 255, 255, 0.03);
}
.scoreboard-rank {
min-width: 2.75rem;
padding: 0.35rem 0.55rem;
border-radius: 999px;
background: rgba(210, 176, 98, 0.14);
color: #d2b062;
font-size: 0.82rem;
font-weight: 700;
text-align: center;
}
.scoreboard-item-body {
min-width: 0;
}
.scoreboard-topline {
display: flex;
justify-content: space-between;
gap: 0.75rem;
align-items: center;
margin-bottom: 0.3rem;
}
.scoreboard-name,
.scoreboard-score {
color: #f8f9fa;
}
.scoreboard-score {
white-space: nowrap;
font-weight: 700;
}
.scoreboard-meta {
color: var(--bs-secondary-color);
font-size: 0.82rem;
line-height: 1.45;
}
@media (max-width: 575.98px) {
.scoreboard-item {
grid-template-columns: 1fr;
}
.scoreboard-topline {
flex-direction: column;
align-items: flex-start;
}
}