:root {
  --bg: #0e0f16; --panel: #171924; --panel2: #1f2231; --line: #2a2e42;
  --text: #eceef6; --muted: #8d93ad; --accent: #ffb020; --accent-ink: #231a05;
  --blue: #6c8cff; --green: #3ecf8e; --red: #ff5d6c; --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.6 -apple-system, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .right { text-align: right; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }

/* 顶栏 */
.top { position: sticky; top: 0; z-index: 20; background: rgba(14,15,22,.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 6px; height: 58px; }
.logo { font-weight: 800; font-size: 20px; letter-spacing: .5px; margin-right: 14px; }
.logo b { color: var(--accent); }
.nav { display: flex; gap: 2px; overflow-x: auto; flex: 1; scrollbar-width: none; }
.nav a { padding: 7px 12px; border-radius: 9px; color: var(--muted); white-space: nowrap; }
.nav a:hover { color: var(--text); background: var(--panel); }
.nav a.on { color: var(--text); background: var(--panel2); }
.who { display: flex; align-items: center; gap: 8px; white-space: nowrap; }

/* 按钮与表单 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--panel2); color: var(--text);
  padding: 8px 16px; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #3d4363; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--red); } .btn.sm { padding: 4px 10px; font-size: 13px; border-radius: 8px; } .btn.lg { padding: 12px 26px; font-size: 16px; }
input, textarea, select { width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 10px 12px; font: inherit; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; min-height: 110px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }

/* 卡片与面板 */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel + .panel { margin-top: 16px; }
.panel h2 { font-size: 17px; margin-bottom: 12px; }
.section { padding-top: 28px; padding-bottom: 28px; }
.hero { padding: 44px 0 26px; }
.hero h1 { font-size: clamp(26px, 5vw, 42px); letter-spacing: .5px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { color: var(--muted); max-width: 620px; margin: 12px 0 20px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 16px; scrollbar-width: none; }
.tab { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font: inherit; white-space: nowrap; }
.tab.on { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .15s, border-color .15s; display: block; }
.card:hover { transform: translateY(-3px); border-color: #3d4363; }
.cover { aspect-ratio: 16/10; display: grid; place-items: center; font-size: 46px; font-weight: 800; color: rgba(255,255,255,.92); position: relative; text-shadow: 0 2px 12px rgba(0,0,0,.25); }
.card .body { padding: 12px 14px 14px; }
.card h3 { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 12.5px; margin-top: 6px; gap: 8px; }
.card .meta span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { display: inline-block; font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: var(--panel2); color: var(--muted); border: 1px solid var(--line); font-weight: 600; }
.badge.ai { color: var(--blue); border-color: rgba(108,140,255,.4); } .badge.dev { color: var(--green); border-color: rgba(62,207,142,.4); }
.badge.hot { color: var(--accent); border-color: rgba(255,176,32,.45); } .badge.red { color: var(--red); border-color: rgba(255,93,108,.4); }
.cover .badge { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.45); text-shadow: none; }
.empty { text-align: center; color: var(--muted); padding: 48px 16px; border: 1px dashed var(--line); border-radius: var(--radius); }

/* 游戏播放 */
.stage { background: #000; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/10; max-height: 76vh; width: 100%; position: relative; }
.stage iframe { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.stage:fullscreen { border: 0; border-radius: 0; max-height: none; }
@media (max-width: 640px) { .stage { aspect-ratio: 9/14; } }
.loading { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted); background: var(--panel); padding: 20px; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.9s linear infinite; margin: 0 auto 14px; }
@keyframes spin { to { transform: rotate(360deg); } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel2); color: var(--muted); cursor: pointer; font: inherit; font-size: 13px; }
.chip:hover { color: var(--text); }
.two { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px; align-items: start; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }

/* 表格与数据 */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
th { color: var(--muted); font-weight: 500; font-size: 13px; }
td.wrap-cell { white-space: normal; min-width: 200px; max-width: 360px; }
td .btn + .btn { margin-left: 6px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat .n { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-size: 13px; }
.stat.accent .n { color: var(--accent); }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 10px;
  font-weight: 600; z-index: 99; box-shadow: 0 8px 30px rgba(0,0,0,.4); max-width: 90vw; }
.toast.err { background: var(--red); color: #fff; }
.auth { max-width: 400px; margin: 60px auto; }
footer { color: var(--muted); font-size: 13px; text-align: center; padding: 36px 16px; }
