39315-vm/assets/css/custom.css
2026-03-25 15:17:29 +00:00

1074 lines
21 KiB
CSS

:root {
color-scheme: dark;
--bg: #060b16;
--surface: rgba(11, 20, 34, 0.84);
--surface-2: rgba(16, 30, 49, 0.92);
--surface-3: rgba(21, 44, 72, 0.96);
--border: rgba(120, 214, 255, 0.14);
--border-strong: rgba(133, 242, 255, 0.34);
--text: #f3f8ff;
--muted: #97add0;
--accent: #7cf6ff;
--accent-strong: #ffffff;
--success: #73f0a6;
--danger: #ff7d8f;
--shadow: 0 30px 80px rgba(1, 6, 16, 0.52);
--radius-sm: 10px;
--radius-md: 14px;
--radius-lg: 18px;
}
* {
box-sizing: border-box;
}
html {
scroll-behavior: smooth;
}
body.tetris-app {
margin: 0;
min-height: 100vh;
background: var(--bg);
color: var(--text);
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
letter-spacing: -0.01em;
}
body.tetris-app::selection {
background: rgba(219, 228, 240, 0.22);
}
.site-header,
.hero-section,
footer {
background: rgba(8, 10, 13, 0.92);
}
.py-lg-6 {
padding-top: 5rem !important;
padding-bottom: 5rem !important;
}
.navbar-brand,
.letter-spacing-1 {
letter-spacing: 0.08em;
text-transform: uppercase;
font-size: 0.9rem;
}
.navbar-dark,
.navbar-dark .nav-link,
.footer-link {
color: var(--text);
}
.nav-link,
.footer-link {
text-decoration: none;
opacity: 0.78;
}
.nav-link:hover,
.nav-link:focus,
.footer-link:hover,
.footer-link:focus,
.table-link:hover,
.table-link:focus {
opacity: 1;
color: var(--accent-strong);
}
.btn {
border-radius: var(--radius-sm);
padding: 0.7rem 1rem;
font-weight: 600;
box-shadow: none !important;
}
.btn-light {
background: var(--accent);
color: #0e1013;
border-color: var(--accent);
}
.btn-light:hover,
.btn-light:focus {
background: var(--accent-strong);
color: #080a0d;
}
.btn-outline-light {
border-color: var(--border-strong);
color: var(--text);
}
.btn-outline-light:hover,
.btn-outline-light:focus {
background: rgba(255, 255, 255, 0.08);
border-color: rgba(255, 255, 255, 0.22);
color: var(--text);
}
.hero-section .lead,
.text-secondary,
.form-text,
.tiny-muted,
.recent-run .tiny-muted,
.table .tiny-muted {
color: var(--muted) !important;
}
.eyebrow {
display: inline-flex;
align-items: center;
gap: 0.5rem;
text-transform: uppercase;
font-size: 0.72rem;
letter-spacing: 0.12em;
color: #c4ccd5;
}
.soft-panel,
.metric-card,
.recent-run,
.empty-state,
.board-shell,
.run-summary,
.toast,
.control-btn,
.score-chip {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius-md);
box-shadow: var(--shadow);
}
.hero-panel,
.soft-panel {
background: rgba(18, 22, 27, 0.94);
}
.metric-card {
padding: 1rem;
display: flex;
flex-direction: column;
gap: 0.35rem;
min-height: 100%;
}
.metric-card.compact {
padding: 0.9rem;
}
.metric-label {
color: var(--muted);
font-size: 0.76rem;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.metric-value {
font-size: clamp(1.2rem, 2vw, 1.6rem);
font-weight: 700;
}
.status-text {
font-size: 1rem;
}
.score-chip {
padding: 0.9rem 1rem;
min-width: 112px;
}
.score-chip-lg {
min-width: 160px;
}
.score-chip-label {
display: block;
text-transform: uppercase;
letter-spacing: 0.08em;
font-size: 0.72rem;
color: var(--muted);
margin-bottom: 0.35rem;
}
.score-chip strong {
font-size: 1.45rem;
}
.game-layout {
display: grid;
grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
gap: 1rem;
align-items: start;
}
.board-shell {
padding: 0.85rem;
width: fit-content;
background: #0f1318;
}
.board-shell {
position: relative;
overflow: hidden;
}
.board-start-overlay {
position: absolute;
inset: 0.85rem;
display: flex;
align-items: center;
justify-content: center;
background: rgba(9, 11, 13, 0.72);
backdrop-filter: blur(3px);
border-radius: 10px;
transition: opacity 0.2s ease, visibility 0.2s ease;
}
.board-start-overlay.is-hidden {
opacity: 0;
visibility: hidden;
pointer-events: none;
}
.board-start-card {
display: grid;
gap: 0.75rem;
text-align: center;
justify-items: center;
padding: 1.25rem;
min-width: 200px;
background: rgba(18, 22, 27, 0.92);
border: 1px solid var(--border);
border-radius: var(--radius-md);
box-shadow: var(--shadow);
}
#tetris-board,
#next-piece {
display: block;
background: #090b0d;
border-radius: 8px;
}
#tetris-board {
width: min(100%, 300px);
height: auto;
border: 1px solid rgba(255, 255, 255, 0.06);
}
#next-piece {
width: 100%;
max-width: 120px;
height: auto;
margin: 0 auto;
border: 1px solid rgba(255, 255, 255, 0.06);
}
.board-sidebar {
display: grid;
gap: 0.9rem;
}
.next-preview-card {
align-items: stretch;
}
.keycaps {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
}
.keycaps span {
border: 1px solid var(--border);
border-radius: 999px;
padding: 0.4rem 0.75rem;
font-size: 0.8rem;
color: var(--muted);
background: rgba(255, 255, 255, 0.03);
}
.mobile-controls {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 0.75rem;
}
.control-btn {
min-height: 56px;
color: var(--text);
font-weight: 700;
font-size: 1rem;
padding: 0.75rem 1rem;
border: 1px solid var(--border-strong);
touch-action: manipulation;
}
.control-btn:hover,
.control-btn:focus-visible {
background: var(--surface-2);
outline: none;
}
.control-btn:active {
transform: translateY(1px);
}
.control-btn-wide {
grid-column: span 3;
}
.control-btn.accent {
background: var(--accent);
color: #0b0d10;
}
.control-btn.accent:hover,
.control-btn.accent:focus-visible {
background: var(--accent-strong);
}
.run-summary {
padding: 1rem;
color: var(--text);
}
.form-control-dark {
background: var(--surface-2);
border-color: var(--border-strong);
color: var(--text);
border-radius: 10px;
padding: 0.8rem 0.9rem;
}
.form-control-dark:focus {
background: var(--surface-2);
border-color: rgba(255, 255, 255, 0.28);
color: var(--text);
}
.form-control-dark::placeholder {
color: #728093;
}
.rule-list,
.detail-list {
display: grid;
gap: 0.8rem;
}
.rule-item {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
padding: 0.8rem 0;
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
color: var(--muted);
}
.rule-item:last-child {
border-bottom: 0;
padding-bottom: 0;
}
.rule-item strong {
color: var(--text);
}
.leaderboard-table {
--bs-table-bg: transparent;
--bs-table-color: var(--text);
--bs-table-border-color: rgba(255, 255, 255, 0.08);
--bs-table-hover-bg: rgba(255, 255, 255, 0.03);
margin-bottom: 0;
}
.table-link {
color: var(--accent);
text-decoration: none;
}
.recent-runs {
min-height: 100%;
}
.recent-run {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
padding: 1rem;
text-decoration: none;
color: inherit;
transition: border-color 0.2s ease, transform 0.2s ease;
}
.recent-run:hover,
.recent-run:focus {
border-color: rgba(255, 255, 255, 0.2);
transform: translateY(-1px);
}
.empty-state {
padding: 1.25rem;
}
.empty-state.compact {
min-height: 132px;
display: flex;
align-items: center;
}
.soft-alert,
.toast {
color: var(--text);
background: rgba(24, 29, 36, 0.96);
border-color: var(--border-strong);
}
.toast {
min-width: 280px;
}
.toast .toast-header {
background: rgba(255, 255, 255, 0.03);
color: var(--text);
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.toast .btn-close {
filter: invert(1) grayscale(1);
}
.detail-list {
margin: 0;
padding-left: 1.25rem;
color: var(--muted);
}
.detail-list li + li {
margin-top: 0.65rem;
}
@media (max-width: 1199.98px) {
.game-layout {
grid-template-columns: 1fr;
}
.board-shell {
width: 100%;
display: flex;
justify-content: center;
}
}
@media (max-width: 767.98px) {
.py-lg-6 {
padding-top: 3.75rem !important;
padding-bottom: 3.75rem !important;
}
.display-5 {
font-size: 2.3rem;
}
.mobile-controls {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.control-btn-wide {
grid-column: span 2;
}
.score-chip,
.score-chip-lg {
min-width: 0;
}
}
.page-shell {
width: min(100% - 1.5rem, 1440px);
margin: 0 auto;
}
.game-topbar {
position: sticky;
top: 0;
z-index: 20;
background: rgba(8, 10, 13, 0.92);
backdrop-filter: blur(14px);
}
.game-page {
min-height: calc(100vh - 72px);
}
.board-panel {
background: linear-gradient(180deg, rgba(24, 29, 36, 0.98) 0%, rgba(14, 18, 22, 0.98) 100%);
}
.focus-layout {
grid-template-columns: minmax(0, 1fr) 260px;
gap: 1.25rem;
align-items: start;
}
.board-stage {
display: flex;
flex-direction: column;
gap: 1rem;
}
.board-shell-large {
width: 100%;
max-width: 480px;
padding: 1rem;
}
#tetris-board {
width: min(100%, 420px);
max-height: calc(100vh - 220px);
}
.sidebar-stack {
display: grid;
gap: 0.9rem;
}
.quick-stats {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 0.9rem;
}
.soft-subpanel {
background: rgba(255, 255, 255, 0.03);
border: 1px solid var(--border);
border-radius: var(--radius-md);
}
.compact-keycaps {
gap: 0.45rem;
}
.compact-keycaps span {
font-size: 0.76rem;
padding: 0.38rem 0.65rem;
}
.leaderboard-compact .table th,
.leaderboard-compact .table td {
padding-top: 0.65rem;
padding-bottom: 0.65rem;
}
.sticky-column {
position: sticky;
top: 88px;
}
@media (max-width: 1199.98px) {
.sticky-column {
position: static;
}
.focus-layout {
grid-template-columns: 1fr;
}
.board-shell-large {
max-width: 420px;
}
}
@media (max-width: 767.98px) {
.page-shell {
width: min(100% - 1rem, 1440px);
}
.board-shell-large {
padding: 0.7rem;
}
#tetris-board {
width: min(100%, 340px);
max-height: none;
}
.quick-stats {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
/* vivid arcade refresh */
body.tetris-app {
position: relative;
background:
radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 26%),
radial-gradient(circle at 82% 18%, rgba(59, 130, 246, 0.16), transparent 22%),
radial-gradient(circle at 50% 100%, rgba(249, 115, 22, 0.12), transparent 30%),
linear-gradient(180deg, #071120 0%, #050913 52%, #04070f 100%);
}
body.tetris-app::before,
body.tetris-app::after {
content: '';
position: fixed;
width: 26rem;
height: 26rem;
border-radius: 999px;
filter: blur(80px);
pointer-events: none;
opacity: 0.32;
z-index: 0;
}
body.tetris-app::before {
top: -9rem;
left: -8rem;
background: rgba(34, 211, 238, 0.28);
}
body.tetris-app::after {
right: -10rem;
bottom: -10rem;
background: rgba(249, 115, 22, 0.22);
}
.game-topbar,
.game-page {
position: relative;
z-index: 1;
}
.game-topbar {
background: rgba(6, 11, 21, 0.76);
backdrop-filter: blur(18px);
border-color: rgba(124, 246, 255, 0.12) !important;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}
.navbar-brand {
background: linear-gradient(90deg, #ffffff 0%, #7cf6ff 45%, #60a5fa 100%);
-webkit-background-clip: text;
background-clip: text;
color: transparent !important;
text-shadow: 0 0 22px rgba(124, 246, 255, 0.18);
}
.btn-light {
background: linear-gradient(135deg, #7cf6ff 0%, #60a5fa 100%);
border-color: rgba(124, 246, 255, 0.55);
color: #04111c;
box-shadow: 0 14px 30px rgba(64, 179, 255, 0.28) !important;
}
.btn-light:hover,
.btn-light:focus {
background: linear-gradient(135deg, #b4fbff 0%, #7cc7ff 100%);
border-color: rgba(180, 251, 255, 0.75);
color: #03101a;
transform: translateY(-1px);
}
.btn-outline-light {
background: rgba(255, 255, 255, 0.03);
border-color: rgba(124, 246, 255, 0.2);
}
.btn-outline-light:hover,
.btn-outline-light:focus {
background: rgba(124, 246, 255, 0.1);
border-color: rgba(124, 246, 255, 0.42);
}
.soft-panel,
.metric-card,
.recent-run,
.empty-state,
.board-shell,
.run-summary,
.toast,
.control-btn,
.score-chip {
background:
linear-gradient(180deg, rgba(13, 24, 40, 0.92) 0%, rgba(8, 15, 27, 0.92) 100%),
rgba(8, 15, 27, 0.92);
border-color: rgba(124, 246, 255, 0.12);
box-shadow: 0 22px 60px rgba(2, 9, 20, 0.46);
}
.board-panel {
position: relative;
overflow: hidden;
background:
radial-gradient(circle at top right, rgba(124, 246, 255, 0.1), transparent 24%),
radial-gradient(circle at bottom left, rgba(249, 115, 22, 0.08), transparent 20%),
linear-gradient(180deg, rgba(10, 20, 37, 0.96) 0%, rgba(5, 11, 20, 0.96) 100%);
}
.board-panel::before {
content: '';
position: absolute;
inset: 0;
pointer-events: none;
background: linear-gradient(135deg, rgba(124, 246, 255, 0.05), transparent 38%, rgba(96, 165, 250, 0.06) 100%);
}
.board-shell,
.board-shell-large {
background:
linear-gradient(180deg, rgba(7, 15, 28, 0.98) 0%, rgba(5, 10, 20, 0.98) 100%);
border: 1px solid rgba(124, 246, 255, 0.18);
box-shadow:
inset 0 1px 0 rgba(255, 255, 255, 0.06),
0 0 0 1px rgba(124, 246, 255, 0.08),
0 30px 80px rgba(3, 10, 22, 0.55);
}
.board-shell::before {
content: '';
position: absolute;
inset: 0;
border-radius: inherit;
pointer-events: none;
background: linear-gradient(180deg, rgba(124, 246, 255, 0.06), transparent 22%, transparent 80%, rgba(249, 115, 22, 0.05));
}
#tetris-board,
#next-piece {
border: 1px solid rgba(124, 246, 255, 0.18);
box-shadow:
inset 0 0 0 1px rgba(255, 255, 255, 0.03),
0 0 24px rgba(56, 189, 248, 0.1);
}
.board-start-overlay {
background: linear-gradient(180deg, rgba(4, 9, 18, 0.5) 0%, rgba(4, 9, 18, 0.78) 100%);
backdrop-filter: blur(10px);
}
.board-start-card {
min-width: 220px;
background: linear-gradient(180deg, rgba(16, 29, 48, 0.96) 0%, rgba(8, 17, 31, 0.98) 100%);
border-color: rgba(124, 246, 255, 0.24);
box-shadow: 0 20px 45px rgba(2, 10, 22, 0.52), 0 0 24px rgba(56, 189, 248, 0.14);
}
.metric-card {
position: relative;
overflow: hidden;
background: linear-gradient(180deg, rgba(13, 25, 42, 0.96) 0%, rgba(8, 17, 30, 0.96) 100%);
}
.metric-card::after {
content: '';
position: absolute;
inset: 0 auto auto 0;
width: 100%;
height: 2px;
background: linear-gradient(90deg, rgba(124, 246, 255, 0.75), rgba(96, 165, 250, 0.12));
opacity: 0.65;
}
.next-preview-card {
border-color: rgba(124, 246, 255, 0.26);
}
.quick-stats .metric-card:nth-child(1) {
border-color: rgba(34, 211, 238, 0.3);
box-shadow: 0 20px 50px rgba(34, 211, 238, 0.1);
}
.quick-stats .metric-card:nth-child(2) {
border-color: rgba(96, 165, 250, 0.3);
box-shadow: 0 20px 50px rgba(96, 165, 250, 0.1);
}
.quick-stats .metric-card:nth-child(3) {
border-color: rgba(52, 211, 153, 0.28);
box-shadow: 0 20px 50px rgba(52, 211, 153, 0.1);
}
.quick-stats .metric-card:nth-child(4) {
border-color: rgba(249, 115, 22, 0.28);
box-shadow: 0 20px 50px rgba(249, 115, 22, 0.1);
}
.metric-value {
color: #f8fbff;
text-shadow: 0 0 20px rgba(124, 246, 255, 0.08);
}
.status-text {
color: #ffd39d;
}
.score-chip {
background: linear-gradient(180deg, rgba(12, 24, 40, 0.96) 0%, rgba(8, 17, 30, 0.96) 100%);
border-color: rgba(124, 246, 255, 0.22);
}
.soft-subpanel {
background: linear-gradient(180deg, rgba(10, 19, 34, 0.86) 0%, rgba(7, 14, 26, 0.9) 100%);
border-color: rgba(124, 246, 255, 0.12);
}
.keycaps span {
background: rgba(124, 246, 255, 0.06);
border-color: rgba(124, 246, 255, 0.16);
color: #d7ecff;
}
.mobile-controls {
gap: 0.85rem;
}
.control-btn {
background: linear-gradient(180deg, rgba(16, 31, 50, 0.96) 0%, rgba(10, 20, 35, 0.96) 100%);
border-color: rgba(124, 246, 255, 0.18);
box-shadow: 0 12px 30px rgba(2, 10, 22, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.control-btn:hover,
.control-btn:focus-visible {
background: linear-gradient(180deg, rgba(23, 45, 74, 1) 0%, rgba(12, 24, 42, 1) 100%);
border-color: rgba(124, 246, 255, 0.34);
transform: translateY(-2px);
}
.control-btn:active {
transform: translateY(1px);
}
.control-btn.accent {
background: linear-gradient(135deg, rgba(249, 115, 22, 0.96) 0%, rgba(251, 191, 36, 0.96) 100%);
border-color: rgba(251, 191, 36, 0.45);
color: #1e1204;
box-shadow: 0 16px 30px rgba(249, 115, 22, 0.22);
}
.control-btn.accent:hover,
.control-btn.accent:focus-visible {
background: linear-gradient(135deg, rgba(251, 146, 60, 1) 0%, rgba(253, 224, 71, 1) 100%);
}
.soft-alert {
background: linear-gradient(180deg, rgba(16, 29, 48, 0.94) 0%, rgba(8, 18, 31, 0.96) 100%);
border-color: rgba(124, 246, 255, 0.16);
}
.badge.text-bg-dark {
background: rgba(124, 246, 255, 0.08) !important;
color: #dff9ff !important;
}
.form-control-dark,
.form-control {
background: rgba(7, 14, 26, 0.92);
border-color: rgba(124, 246, 255, 0.14);
color: var(--text);
}
.form-control-dark:focus,
.form-control:focus {
background: rgba(9, 18, 31, 0.96);
border-color: rgba(124, 246, 255, 0.4);
color: var(--text);
box-shadow: 0 0 0 0.2rem rgba(56, 189, 248, 0.12);
}
.table {
--bs-table-bg: transparent;
--bs-table-color: var(--text);
--bs-table-border-color: rgba(124, 246, 255, 0.1);
}
@media (max-width: 767.98px) {
body.tetris-app::before,
body.tetris-app::after {
width: 16rem;
height: 16rem;
filter: blur(56px);
opacity: 0.22;
}
}
.leaderboard-meta {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.75rem;
}
.online-status {
display: inline-flex;
align-items: center;
gap: 0.45rem;
}
.online-dot {
width: 0.55rem;
height: 0.55rem;
border-radius: 999px;
background: #4ade80;
box-shadow: 0 0 0.8rem rgba(74, 222, 128, 0.65);
flex: 0 0 auto;
}
.recent-feed {
display: grid;
gap: 0.75rem;
}
.recent-item {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
padding: 0.85rem 0.95rem;
border-radius: 12px;
border: 1px solid rgba(255, 255, 255, 0.08);
background: rgba(255, 255, 255, 0.03);
color: inherit;
text-decoration: none;
transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.recent-item:hover,
.recent-item:focus {
transform: translateY(-1px);
border-color: rgba(255, 255, 255, 0.18);
background: rgba(255, 255, 255, 0.05);
}
.recent-item strong {
display: block;
color: var(--text);
}
.recent-item-meta {
color: var(--muted);
font-size: 0.84rem;
margin-top: 0.2rem;
}
/* multiplayer lobby */
.room-intro {
line-height: 1.55;
}
.room-actions {
display: flex;
gap: 0.75rem;
}
.room-code-input {
text-transform: uppercase;
letter-spacing: 0.12em;
}
.room-empty-state {
margin-bottom: 0;
}
.room-state-card {
padding: 1rem;
border: 1px solid rgba(124, 246, 255, 0.16);
border-radius: var(--radius-md);
background: linear-gradient(180deg, rgba(12, 24, 41, 0.94) 0%, rgba(8, 16, 29, 0.96) 100%);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.room-code-display {
margin-top: 0.35rem;
font-size: 1.7rem;
font-weight: 800;
line-height: 1;
letter-spacing: 0.18em;
color: var(--accent);
text-transform: uppercase;
}
.room-status-badge {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 96px;
padding: 0.45rem 0.7rem;
border-radius: 999px;
font-size: 0.76rem;
letter-spacing: 0.08em;
text-transform: uppercase;
border: 1px solid rgba(255, 255, 255, 0.1);
}
.room-status-waiting {
color: #ffe4a8;
background: rgba(250, 204, 21, 0.12);
border-color: rgba(250, 204, 21, 0.26);
}
.room-status-ready {
color: #c9ffe0;
background: rgba(34, 197, 94, 0.14);
border-color: rgba(34, 197, 94, 0.28);
}
.room-player-list {
display: grid;
gap: 0.7rem;
}
.room-player-line {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
padding: 0.75rem 0.9rem;
border-radius: 12px;
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(124, 246, 255, 0.08);
}
.room-player-line strong {
text-align: right;
}
.room-meta-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 0.75rem;
}
.room-meta-value {
font-size: 1rem;
}
.room-message {
margin: 0;
color: var(--muted);
line-height: 1.55;
}
@media (max-width: 575.98px) {
.room-meta-grid {
grid-template-columns: 1fr;
}
.room-code-display {
font-size: 1.35rem;
letter-spacing: 0.14em;
}
}