Files
2026-09-11 07:15:51 +08:00

217 lines
7.5 KiB
CSS
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* GameParlor 全局样式 — 深色主题 + 霓虹蓝 */
/* 注:Tailwind 工具类由 tailwind.min.js (Play CDN) 运行时注入;本文件仅定义组件类与基础样式 */
:root {
--bg: #0f0f11;
--bg-soft: #16161a;
--bg-card: #1c1c22;
--border: #2a2a33;
--accent: #00d4ff;
--accent-dim: rgba(0, 212, 255, 0.15);
--text: #e8e8ed;
--text-dim: #9a9aa5;
--text-faint: #6b6b78;
--success: #34d399;
--danger: #f87171;
--warning: #fbbf24;
}
* { box-sizing: border-box; }
html, body {
margin: 0;
padding: 0;
background: var(--bg);
color: var(--text);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a2a33; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #3a3a45; }
.card {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 14px;
transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card-hover:hover {
transform: translateY(-3px);
box-shadow: 0 10px 30px rgba(0, 0, 0, .4), 0 0 0 1px rgba(0, 212, 255, .15);
border-color: rgba(0, 212, 255, .3);
}
.btn {
display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
padding: .55rem 1.1rem;
border-radius: 10px;
font-size: .875rem; font-weight: 500;
border: 1px solid transparent;
cursor: pointer;
transition: transform .1s ease, background .2s ease, border-color .2s ease, opacity .2s ease;
user-select: none;
}
.btn:active { transform: scale(0.95); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #06242b; }
.btn-primary:hover:not(:disabled) { background: #33ddff; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: rgba(248, 113, 113, .12); color: var(--danger); border-color: rgba(248, 113, 113, .3); }
.btn-danger:hover:not(:disabled) { background: rgba(248, 113, 113, .22); }
.input, .select, .textarea {
width: 100%;
background: var(--bg-soft);
border: 1px solid var(--border);
border-radius: 10px;
padding: .55rem .8rem;
color: var(--text);
font-size: .875rem;
transition: border-color .2s ease, box-shadow .2s ease;
}
.input:focus, .select:focus, .textarea:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 3px var(--accent-dim);
}
.label { font-size: .8rem; color: var(--text-dim); margin-bottom: .35rem; display: block; }
.badge {
display: inline-flex; align-items: center;
padding: .15rem .55rem;
border-radius: 999px;
font-size: .72rem; font-weight: 600;
}
.badge-accent { background: var(--accent-dim); color: var(--accent); }
.badge-success { background: rgba(52, 211, 153, .12); color: var(--success); }
.badge-danger { background: rgba(248, 113, 113, .12); color: var(--danger); }
.badge-warning { background: rgba(251, 191, 36, .12); color: var(--warning); }
.remark { font-size: .75rem; color: var(--text-faint); }
.mono { font-family: "JetBrains Mono", "Fira Code", "Cascadia Code", Consolas, monospace; }
/* 页面淡入(仅用 opacity:transform 会成为 position:fixed 后代的包含块,导致弹窗越界) */
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
.page-fade { animation: fadeIn .35s ease both; }
/* Alpine 初始化前隐藏 x-cloak 元素(避免弹窗闪现) */
[x-cloak] { display: none !important; }
/* 顶部导航布局(纯 CSS,不依赖 Tailwind 运行时) */
.gp-header {
position: sticky; top: 0; z-index: 50;
background: rgba(15, 15, 17, .85);
backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px);
border-bottom: 1px solid var(--border);
}
.gp-header-inner {
max-width: 80rem; margin: 0 auto; padding: 0 1rem;
min-height: 3.5rem;
display: flex; align-items: center; gap: 1.5rem;
}
.gp-brand { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1rem; flex: none; }
.gp-logo {
width: 1.75rem; height: 1.75rem; border-radius: .5rem;
background: var(--accent); color: #06242b;
display: flex; align-items: center; justify-content: center; font-size: .875rem;
}
.gp-nav { display: flex; align-items: center; gap: .15rem; margin: 0; padding: 0; list-style: none; }
.gp-nav a {
display: inline-block; padding: .375rem .75rem; border-radius: .5rem;
font-size: .875rem; color: var(--text-dim);
white-space: nowrap; cursor: pointer;
transition: color .2s ease, background .2s ease;
}
.gp-nav a:hover { color: #fff; background: rgba(255, 255, 255, .04); }
.gp-nav a.is-active { background: var(--accent-dim); color: var(--accent); }
.gp-nav-desktop { display: none; }
.gp-nav-mobile {
gap: .25rem; padding: .35rem .75rem .5rem;
max-width: 80rem; margin: 0 auto;
overflow-x: auto; flex-wrap: nowrap;
}
.gp-nav-mobile a { font-size: .75rem; padding: .3rem .6rem; flex: none; }
@media (min-width: 768px) {
.gp-nav-desktop { display: flex; }
.gp-nav-mobile { display: none; }
}
.gp-userbar { margin-left: auto; display: flex; align-items: center; gap: .75rem; font-size: .875rem; flex: none; }
.gp-user-meta { display: none; align-items: center; gap: .75rem; color: var(--text-dim); }
.gp-username { color: var(--accent); }
.gp-logout { padding: .25rem .6rem; font-size: .75rem; }
@media (min-width: 640px) {
.gp-user-meta { display: flex; }
}
/* 页面内容容器 */
.gp-page {
max-width: 80rem;
width: 100%;
margin: 0 auto;
padding: 1.5rem 1rem 2rem;
}
/* Toast */
@keyframes toastIn {
from { opacity: 0; transform: translateY(-10px) scale(.98); }
to { opacity: 1; transform: translateY(0) scale(1); }
}
.toast {
position: fixed; top: 1.2rem; left: 50%; transform: translateX(-50%);
z-index: 9999;
padding: .7rem 1.2rem;
border-radius: 10px;
font-size: .875rem;
box-shadow: 0 8px 30px rgba(0,0,0,.5);
animation: toastIn .25s ease both;
}
.toast-success { background: rgba(52, 211, 153, .15); color: var(--success); border: 1px solid rgba(52, 211, 153, .35); }
.toast-error { background: rgba(248, 113, 113, .15); color: var(--danger); border: 1px solid rgba(248, 113, 113, .35); }
/* 倒计时颜色渐变 */
.countdown { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
/* 表格 */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: .7rem .8rem; text-align: left; border-bottom: 1px solid var(--border); font-size: .85rem; }
.table th { color: var(--text-dim); font-weight: 500; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.table tr:hover td { background: rgba(255,255,255,.02); }
/* 模态遮罩(fixed 相对视口:祖先不得残留非 none 的 transform) */
.modal-mask {
position: fixed; inset: 0; background: rgba(0,0,0,.6);
backdrop-filter: blur(4px);
z-index: 1000;
display: flex; align-items: center; justify-content: center;
padding: 1rem;
overflow-y: auto;
animation: fadeIn .2s ease both;
}
.modal {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 16px;
padding: 1.4rem;
width: 100%; max-width: 480px;
max-height: calc(100vh - 2rem); overflow-y: auto;
margin: auto;
}
/* 移动端适配 */
@media (max-width: 640px) {
.btn { padding: .5rem .85rem; font-size: .8rem; }
}