/* QwQ·API站 全局样式 - 深色玻璃拟态现代风 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Noto+Sans+SC:wght@400;500;700;900&display=swap');
:root {
  --bg: #0a0e1a;
  --bg-2: #0f1424;
  --surface: rgba(255,255,255,0.04);
  --surface-2: rgba(255,255,255,0.06);
  --surface-hover: rgba(255,255,255,0.09);
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.15);
  --text: #e8edf7;
  --text-muted: #8a93ad;
  --text-dim: #5e6680;
  --primary: #6366f1;
  --primary-2: #818cf8;
  --accent: #06b6d4;
  --accent-2: #22d3ee;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #8b5cf6;
  --grad: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  --grad-soft: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(6,182,212,0.15));
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 40px rgba(99,102,241,0.25);
  --maxw: 1240px;
}
[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-2: #ffffff;
  --surface: rgba(255,255,255,0.85);
  --surface-2: #f1f2f7;
  --surface-hover: #e9ebf3;
  --border: rgba(0,0,0,0.08);
  --border-strong: rgba(0,0,0,0.15);
  --text: #1f2335;
  --text-muted: #5a6078;
  --text-dim: #8b92a8;
  --grad: linear-gradient(135deg, #4f46e5 0%, #0891b2 100%);
  --grad-soft: linear-gradient(135deg, rgba(79,70,229,0.12), rgba(8,145,178,0.12));
  --shadow: 0 8px 32px rgba(0,0,0,0.1);
  --shadow-glow: 0 0 40px rgba(79,70,229,0.18);
}
[data-theme="light"] .bg-grid {
  background-image:
    linear-gradient(rgba(79,70,229,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,70,229,0.06) 1px, transparent 1px);
}
[data-theme="light"] .code-body,
[data-theme="light"] .code-block,
[data-theme="light"] .debug-result {
  color: #1f2335;
  background: rgba(0,0,0,0.04);
}
[data-theme="light"] .topbar {
  background: rgba(246,247,251,0.96);
}
[data-theme="light"] .user-dropdown {
  background: rgba(255,255,255,0.98);
}
[data-theme="light"] .code-card,
[data-theme="light"] .mini-stat,
[data-theme="light"] .footer,
[data-theme="light"] .code-head,
[data-theme="light"] .code-foot {
  background: var(--surface-2);
  color: var(--text);
}
[data-theme="light"] .code-body {
  color: var(--text);
  background: rgba(0,0,0,0.03);
}
[data-theme="light"] .code-block,
[data-theme="light"] .debug-result {
  color: var(--text);
  background: rgba(0,0,0,0.03);
}
[data-theme="light"] .help-box code,
[data-theme="light"] .info-table code,
[data-theme="light"] .param-table code,
[data-theme="light"] .key-code {
  background: rgba(0,0,0,0.08);
  color: var(--primary);
}
[data-theme="light"] .bg-glow {
  opacity: 0.35;
}
[data-theme="light"] .auth-alert-error { color: #991b1b; }
[data-theme="light"] .auth-alert-success { color: #166534; }
[data-theme="light"] .nav.show { background: rgba(246,247,251,0.98); }
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter','Noto Sans SC','PingFang SC','Microsoft YaHei','Segoe UI',system-ui,-apple-system,sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
code, pre { font-family: 'JetBrains Mono','Cascadia Code','Consolas',monospace; }
a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-2); }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* 背景装饰 */
.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background-image: 
    linear-gradient(rgba(99,102,241,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,0.04) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 30%, transparent 75%);
}
.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: 
    radial-gradient(ellipse 600px 400px at 15% 5%, rgba(99,102,241,0.18), transparent 60%),
    radial-gradient(ellipse 700px 500px at 85% 15%, rgba(6,182,212,0.15), transparent 60%),
    radial-gradient(ellipse 500px 400px at 50% 90%, rgba(139,92,246,0.12), transparent 60%);
}

/* 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  background: rgba(10,14,26,0.96);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 8px; }
.brand-logo-img {
  display: block; border-radius: 8px; flex-shrink: 0;
  box-shadow: 0 3px 12px rgba(99,102,241,0.35);
  filter: drop-shadow(0 0 8px rgba(99,102,241,0.4));
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-size: 16px; font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-ver { font-size: 9px; color: var(--text-muted); letter-spacing: .5px; }
.nav { display: flex; gap: 3px; }
.nav-toggle, .theme-toggle {
  width: 32px; height: 32px; border-radius: 7px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  font-size: 14px; align-items: center; justify-content: center;
}
.nav-toggle { display: none; }
.theme-toggle { display: inline-flex; position: relative; z-index: 10; }
.theme-toggle .theme-icon { line-height: 1; }
.nav a {
  padding: 6px 11px; border-radius: 7px; font-size: 13px; color: var(--text-muted);
  transition: all .2s;
}
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a.active { color: var(--text); background: var(--grad-soft); }

/* Tab 标签栏 */
.tab-bar {
  display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap;
  border-bottom: 1px solid var(--border); padding-bottom: 12px;
}
.tab-bar .tab {
  padding: 6px 12px; border-radius: 8px; font-size: 13px;
  color: var(--text-muted); background: var(--surface); border: 1px solid var(--border);
  transition: all .2s;
}
.tab-bar .tab:hover { color: var(--text); background: var(--surface-hover); }
.tab-bar .tab.active { color: #fff; background: var(--grad); border-color: transparent; }

.topbar-right { display: flex; align-items: center; gap: 10px; }
.user-menu { position: relative; }
.user-btn {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  transition: all .2s;
}
.user-btn:hover { background: var(--surface-hover); }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--grad);
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #fff;
}
.uname { font-size: 13px; }
.caret { font-size: 10px; color: var(--text-muted); }
.user-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 160px;
  background: rgba(15,20,36,0.95); backdrop-filter: blur(16px);
  border: 1px solid var(--border-strong); border-radius: 12px; padding: 6px;
  box-shadow: var(--shadow); display: none;
}
.user-dropdown.show { display: block; animation: fade .15s; }
.user-dropdown a, .dropdown-action { display: block; width: 100%; padding: 9px 12px; border-radius: 8px; font-size: 13px; color: var(--text-muted); text-align: left; }
.user-dropdown a:hover, .dropdown-action:hover { background: var(--surface); color: var(--text); }
.user-dropdown form { margin: 0; }
.caret { display: inline-flex; align-items: center; }
@keyframes fade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 7px 14px; border-radius: 8px; font-size: 13px; font-weight: 600;
  transition: all .2s; border: 1px solid transparent; white-space: nowrap;
}
.btn-lg { padding: 9px 18px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 4px 20px rgba(99,102,241,0.35); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 28px rgba(99,102,241,0.5); color: #fff; }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-hover); border-color: var(--border-strong); color: var(--text); }
.btn-mini { padding: 5px 10px; font-size: 12px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface); }
.btn-mini:hover { background: var(--surface-hover); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.4); }

/* Flash 提示 */
.flash {
  max-width: var(--maxw); margin: 16px auto 0; padding: 12px 18px;
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 10px;
  display: flex; justify-content: space-between; align-items: center; font-size: 14px;
  backdrop-filter: blur(12px);
}
.flash-success { border-left: 3px solid var(--success); }
.flash-error { border-left: 3px solid var(--danger); }
.flash-info { border-left: 3px solid var(--accent); }
.flash-close { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; color: var(--text-muted); }
.flash-close:hover { background: var(--surface-hover); color: var(--text); }

/* 站点公告 */
.announcement-banner {
  background: var(--grad-soft);
  border-bottom: 1px solid rgba(99,102,241,0.25);
}
.announcement-inner {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 24px; font-size: 13px;
}
.announcement-tag {
  flex-shrink: 0;
  padding: 2px 8px; border-radius: 5px;
  background: var(--grad); color: #fff; font-size: 11px; font-weight: 700;
}
.announcement-body { flex: 1; color: var(--text); }
.announcement-body a { color: var(--accent-2); text-decoration: underline; }
.announcement-close {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 18px; line-height: 1;
  transition: all .2s;
}
.announcement-close:hover { background: var(--surface-hover); color: var(--text); }

/* 主体 */
.main { min-height: calc(100vh - 56px - 220px); }

/* Hero */
.hero { padding: 32px 0 24px; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.hero-badge {
  display: inline-block; padding: 5px 12px; background: var(--grad-soft);
  border: 1px solid rgba(99,102,241,0.3); border-radius: 999px;
  font-size: 11px; color: var(--accent-2); margin-bottom: 18px;
}
.hero-title { font-size: 38px; font-weight: 800; line-height: 1.15; letter-spacing: -1px; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-desc { font-size: 15px; color: var(--text-muted); margin: 18px 0 24px; max-width: 520px; line-height: 1.7; }
.hero-actions { display: flex; gap: 12px; margin-bottom: 24px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.hero-tags span {
  padding: 4px 10px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; font-size: 11px; color: var(--text-muted);
}
.code-card {
  background: rgba(15,20,36,0.7); backdrop-filter: blur(14px);
  border: 1px solid var(--border-strong); border-radius: 14px;
  box-shadow: var(--shadow), var(--shadow-glow); overflow: hidden;
}
.code-head {
  display: flex; align-items: center; gap: 7px; padding: 10px 14px;
  background: rgba(0,0,0,0.25); border-bottom: 1px solid var(--border);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.r { background: #ff5f57; } .dot.y { background: #febc2e; } .dot.g { background: #28c840; }
.code-file { font-size: 11px; color: var(--text-muted); margin-left: 5px; }
.code-copy { margin-left: auto; font-size: 11px; color: var(--accent-2); cursor: pointer; padding: 3px 7px; border-radius: 5px; transition: background .2s; }
.code-copy:hover { background: var(--surface); }
.code-body {
  padding: 16px; font-size: 12px; line-height: 1.65; color: #c9d1f0;
  overflow-x: auto; white-space: pre; max-height: 260px;
}
.code-foot { padding: 12px 14px; border-top: 1px solid var(--border); background: rgba(0,0,0,0.2); }
.resp-meter { height: 4px; background: var(--surface); border-radius: 999px; overflow: hidden; margin-bottom: 8px; }
.resp-bar { height: 100%; background: var(--grad); border-radius: 999px; }
.resp-info { display: flex; justify-content: space-between; font-size: 12px; }
.resp-info b { color: var(--text); }
.resp-info span { color: var(--text-muted); }

/* 通用 section */
.section-title { text-align: center; margin-bottom: 32px; }
.section-title h2 { font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.section-title p { color: var(--text-muted); max-width: 680px; margin: 0 auto; font-size: 13px; }

/* 支持区 */
.support { padding: 32px 0 40px; }
.support-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.support-card {
  padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  transition: all .25s;
}
.support-card:hover { border-color: var(--border-strong); background: var(--surface-hover); }
.support-card h3 { font-size: 14px; margin-bottom: 6px; }
.support-card > p { color: var(--text-muted); margin-bottom: 12px; font-size: 12px; }
.support-card ul { list-style: none; }
.support-card li { padding: 6px 0 6px 16px; font-size: 12px; color: var(--text-muted); position: relative; border-bottom: 1px dashed var(--border); }
.support-card li::before { content: ''; position: absolute; left: 1px; top: 13px; width: 6px; height: 3px; border-left: 2px solid var(--success); border-bottom: 2px solid var(--success); transform: rotate(-45deg); }
.support-card li:last-child { border-bottom: none; }

.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mini-stat {
  padding: 14px 10px; background: rgba(15,20,36,0.6); border: 1px solid var(--border);
  border-radius: 12px; text-align: center; backdrop-filter: blur(8px);
}
.mini-stat b { display: block; font-size: 20px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mini-stat span { font-size: 11px; color: var(--text-muted); }

/* 首页统计带 */
.mini-stats-band { padding: 10px 0 40px; }
.mini-stats-band .mini-stats { grid-template-columns: repeat(4, 1fr); }
.support-ic {
  width: 52px; height: 52px; border-radius: 14px; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad-soft); color: var(--accent-2);
}
.support-ic svg { display: block; }
/* 认证页 Logo */
.auth-logo { display: flex; justify-content: center; margin-bottom: 12px; }
.auth-logo .brand-logo-img { box-shadow: 0 8px 32px rgba(99,102,241,0.5); }
.auth-logo-ic { color: var(--accent-2); filter: drop-shadow(0 0 12px rgba(6,182,212,0.4)); }

/* 页面标题 */
.page-head { padding: 24px 0 16px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.page-head h1 { font-size: 26px; font-weight: 800; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.page-head h1 svg { color: var(--accent-2); width: 24px; height: 24px; }
.page-head p { color: var(--text-muted); font-size: 13px; }

/* 列表页 */
.list-layout { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: start; }
.list-sidebar {
  position: sticky; top: 76px; align-self: flex-start; display: flex; flex-direction: column;
  gap: 12px; max-height: calc(100vh - 92px); overflow: hidden;
}
.list-sidebar > .side-card:first-child { flex: 1 1 auto; min-height: 0; }
.list-sidebar > .side-card:last-child { flex: 0 0 auto; }
.side-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.side-title { font-size: 13px; font-weight: 700; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.cat-list, .nav-list { list-style: none; }
.cat-list {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}
.cat-list::-webkit-scrollbar, .rank-list::-webkit-scrollbar { width: 4px; }
.cat-list::-webkit-scrollbar-thumb, .rank-list::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }
.cat-list li a, .nav-list li a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 9px; border-radius: 7px; font-size: 12px; color: var(--text-muted); transition: all .2s;
}
.cat-list li a:hover, .nav-list li a:hover { background: var(--surface); color: var(--text); }
.cat-list li a.active { background: var(--grad-soft); color: var(--accent-2); }
.cat-list li a b { font-size: 10px; color: var(--text-muted); background: var(--surface-2); padding: 1px 6px; border-radius: 999px; }
.rank-list { list-style: none; counter-reset: r; max-height: 200px; overflow-y: auto; padding-right: 4px; }
.rank-list li { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 11px; border-bottom: 1px dashed var(--border); }
.rank-list li:last-child { border: none; }
.rank-no { width: 20px; height: 20px; border-radius: 6px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--text-muted); flex-shrink: 0; }
.rank-1 { background: linear-gradient(135deg,#f59e0b,#ef4444); color: #fff; }
.rank-2 { background: linear-gradient(135deg,#9ca3af,#6b7280); color: #fff; }
.rank-3 { background: linear-gradient(135deg,#d97706,#b45309); color: #fff; }
.rank-name { flex: 1; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-cnt { color: var(--text-muted); font-size: 11px; }

.list-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-tabs { display: flex; gap: 5px; flex-wrap: wrap; }
.filter-tabs a {
  padding: 6px 11px; border-radius: 7px; font-size: 12px; color: var(--text-muted);
  background: var(--surface); border: 1px solid var(--border); transition: all .2s;
}
.filter-tabs a:hover { color: var(--text); }
.filter-tabs a.active { background: var(--grad); color: #fff; border-color: transparent; }
.filter-tabs a b { font-size: 10px; opacity: .8; margin-left: 3px; }
.search-box { display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 3px 5px 3px 10px; }
.search-box input { background: transparent; border: none; outline: none; color: var(--text); font-size: 12px; width: 180px; }
.search-box button { padding: 5px 8px; font-size: 12px; color: var(--text-muted); display: flex; align-items: center; }
.search-box button:hover { color: var(--accent-2); }

.api-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.api-card {
  padding: 10px 12px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; transition: all .25s; display: flex; flex-direction: column; position: relative; overflow: hidden;
}
.api-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--success); transition: width .25s; }
.api-card.status-维护::before { background: var(--danger); }
.api-card.status-收费::before { background: var(--warning); }
.api-card.status-免费::before { background: var(--info); }
.api-card:hover { transform: translateY(-3px); border-color: var(--border-strong); background: var(--surface-hover); }
.api-card:hover::before { width: 6px; }
.api-card-top { display: flex; gap: 6px; margin-bottom: 8px; }
.api-status { font-size: 10px; padding: 2px 7px; border-radius: 5px; font-weight: 600; }
.api-cat { font-size: 10px; padding: 2px 7px; border-radius: 5px; background: var(--surface-2); color: var(--text-muted); }
.s-正常 { background: rgba(16,185,129,0.15); color: var(--success); }
.s-维护 { background: rgba(239,68,68,0.15); color: var(--danger); }
.s-收费 { background: rgba(245,158,11,0.15); color: var(--warning); }
.s-免费 { background: rgba(139,92,246,0.15); color: var(--info); }
.api-name { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.api-desc { font-size: 12px; color: var(--text-muted); flex: 1; margin-bottom: 10px; line-height: 1.5; }
.api-card-foot { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--text-muted); padding-top: 10px; border-top: 1px dashed var(--border); }
.api-calls { display: inline-flex; align-items: center; gap: 4px; }
.api-calls svg { color: var(--text-muted); }
.api-go { color: var(--accent-2); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }

.empty-state { text-align: center; padding: 60px 20px; }
.empty-icon { display: flex; justify-content: center; margin-bottom: 16px; opacity: .5; color: var(--text-muted); }
.empty-state h3 { margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); margin-bottom: 20px; }

/* 文档页 */
.doc-head .doc-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.doc-tags { display: flex; gap: 6px; margin-bottom: 10px; }
.doc-head h1 { font-size: 24px; margin-bottom: 4px; }
.doc-sub { color: var(--text-muted); font-size: 13px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.doc-sub svg { color: var(--text-muted); width: 14px; height: 14px; }
.doc-actions { display: flex; gap: 7px; flex-shrink: 0; }
.doc-actions .btn { padding: 7px 14px; font-size: 12px; }
.doc-layout { display: grid; grid-template-columns: 1fr 210px; gap: 18px; align-items: start; }
.doc-main { display: flex; flex-direction: column; gap: 16px; }
.doc-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.doc-card-title { font-size: 15px; font-weight: 700; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.info-table, .param-table, .data-table { width: 100%; border-collapse: collapse; }
.info-table td { padding: 8px 0; font-size: 13px; border-bottom: 1px solid var(--border); }
.info-table td:first-child { width: 110px; color: var(--text-muted); }
.info-table code, .param-table code, .key-code { background: var(--surface-2); padding: 2px 7px; border-radius: 5px; font-size: 11px; color: var(--accent-2); word-break: break-all; }
.param-table th, .param-table td, .data-table th, .data-table td { padding: 9px 12px; text-align: left; font-size: 12px; border-bottom: 1px solid var(--border); }
.param-table th, .data-table th { color: var(--text-muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.param-table tr:hover td, .data-table tr:hover td { background: var(--surface); }
.req-yes { color: var(--danger); font-weight: 600; font-size: 10px; }
.req-no { color: var(--text-muted); font-size: 10px; }
.code-block { background: rgba(0,0,0,0.35); border: 1px solid var(--border); border-radius: 9px; padding: 13px; font-size: 12px; color: #c9d1f0; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
.code-200 { color: var(--success); } .code-201 { color: var(--success); }
.code-401 { color: var(--warning); } .code-403 { color: var(--warning); }
.code-404 { color: var(--danger); } .code-500 { color: var(--danger); } .code-503 { color: var(--danger); }

.doc-side { position: sticky; top: 76px; align-self: flex-start; display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 92px); overflow: hidden; }
.doc-side > .side-card { flex: 0 0 auto; }
.doc-side .nav-list { max-height: calc(100vh - 280px); overflow-y: auto; padding-right: 4px; }
.debugger { display: flex; flex-direction: column; gap: 12px; }
.debug-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.debug-row { display: flex; flex-direction: column; gap: 4px; }
.debug-row label { font-size: 11px; color: var(--text-muted); }
.debug-row input { background: var(--surface-2); border: 1px solid var(--border); border-radius: 7px; padding: 7px 9px; color: var(--text); font-size: 12px; outline: none; transition: border .2s; min-width: 0; }
.debug-row input:focus { border-color: var(--primary); }
.debug-row input[type="file"] { padding: 5px 7px; }
.debug-row input[type="file"]::file-selector-button { border: 0; border-right: 1px solid var(--border); background: transparent; color: var(--text); font: inherit; margin: -5px 9px -5px -7px; padding: 7px 10px; cursor: pointer; }
.debug-action { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.debug-output-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; }
.debug-output-switch > span { padding: 0 6px; color: var(--text-muted); font-size: 11px; white-space: nowrap; }
.debug-output-switch button { min-height: 28px; padding: 5px 9px; border-radius: 5px; color: var(--text-muted); font-size: 11px; white-space: nowrap; transition: color .2s, background .2s, box-shadow .2s; }
.debug-output-switch button:hover { color: var(--text); background: var(--surface-hover); }
.debug-output-switch button.active { color: #fff; background: var(--grad); box-shadow: 0 2px 10px rgba(99,102,241,0.3); }
.debug-meta { font-size: 11px; color: var(--text-muted); }
.debug-media { background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 12px; }
.debug-media img, .debug-media video { display: block; max-width: 100%; max-height: 480px; margin: 0 auto; border-radius: 7px; background: #000; }
.debug-media a { color: var(--accent-2); font-size: 12px; word-break: break-all; }
.debug-result { background: rgba(0,0,0,0.4); border: 1px solid var(--border); border-radius: 9px; padding: 13px; font-size: 12px; color: #c9d1f0; min-height: 70px; white-space: pre-wrap; word-break: break-all; }

/* 认证页 */
.auth-wrap { display: flex; justify-content: center; padding: 50px 20px; }
.auth-card { width: 100%; max-width: 360px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; padding: 24px; backdrop-filter: blur(14px); box-shadow: var(--shadow); }
.auth-head { text-align: center; margin-bottom: 18px; }
.auth-head h1 { font-size: 18px; margin-bottom: 4px; }
.auth-head p { color: var(--text-muted); font-size: 12px; }
.auth-alert {
  padding: 11px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 16px;
  border: 1px solid var(--border-strong); background: var(--surface-2);
}
.auth-alert-error { border-left: 3px solid var(--danger); color: #fecaca; }
.auth-alert-success { border-left: 3px solid var(--success); color: #a7f3d0; }
.auth-form { display: flex; flex-direction: column; gap: 13px; }
.form-row { display: flex; flex-direction: column; gap: 5px; }
.form-row label { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.form-row input, .form-row select, .form-row textarea {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px;
  padding: 9px 12px; color: var(--text); font-size: 13px; outline: none; transition: all .2s;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }
.pwd-strength { height: 3px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 4px; }
.pwd-strength::after { content: ''; display: block; height: 100%; width: 0; background: var(--danger); transition: all .3s; }
.pwd-strength.weak::after { width: 33%; background: var(--danger); }
.pwd-strength.mid::after { width: 66%; background: var(--warning); }
.pwd-strength.strong::after { width: 100%; background: var(--success); }
.auth-foot { text-align: center; font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.auth-foot a { color: var(--accent-2); font-weight: 600; }

/* Dashboard */
.dash-head { display: flex; align-items: center; gap: 14px; }
.dash-avatar { width: 48px; height: 48px; border-radius: 13px; background: var(--grad); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; color: #fff; }
.dash-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0 24px; }
.dash-stat-card {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; transition: all .2s;
}
.dash-stat-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.stat-ic {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad-soft); color: var(--accent-2);
}
.stat-ic svg { display: block; width: 20px; height: 20px; }
.dash-stat-card b { display: block; font-size: 18px; }
.dash-stat-card span { font-size: 11px; color: var(--text-muted); }
.dash-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 12px; transition: box-shadow .25s, border-color .25s; }
.dash-card:target { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.2), var(--shadow); }
.dash-card h2 { font-size: 15px; margin-bottom: 14px; }
.dash-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.dash-card-head .btn { padding: 7px 14px; font-size: 12px; }
.quick-start { padding-left: 18px; line-height: 2; color: var(--text-muted); font-size: 13px; }
.help-box {
  background: var(--grad-soft); border: 1px solid rgba(99,102,241,0.25);
  border-radius: 10px; padding: 14px 16px; margin-bottom: 18px; font-size: 12px; line-height: 1.8;
}
.help-box b { color: var(--text); display: block; margin-bottom: 6px; font-size: 13px; }
.help-box p { color: var(--text-muted); margin: 0; }
.help-box code {
  background: rgba(0,0,0,0.25); padding: 2px 6px; border-radius: 5px;
  font-family: 'JetBrains Mono','Cascadia Code',monospace; color: var(--accent-2);
}
.quick-start b { color: var(--text); }
.quick-start a { color: var(--accent-2); }
.table-wrap { overflow-x: auto; }
.data-table { background: transparent; }
.key-code { font-size: 11px; }
.copy-btn { color: var(--accent-2); font-size: 11px; cursor: pointer; padding: 2px 6px; border-radius: 4px; border: 0; background: transparent; }
.copy-btn:hover { background: var(--surface); }
.inline-action { display: inline; margin: 0; }
.ua-cell { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.checkbox-row { display: block; }
.checkbox-row label { display: inline-flex; align-items: center; gap: 8px; }
.checkbox-row input { width: auto; }
.reveal-card { opacity: 0; transform: translateY(16px); transition: opacity .45s ease, transform .45s ease; }
.reveal-card.is-visible { opacity: 1; transform: translateY(0); }
.key-type { font-size: 11px; padding: 2px 8px; border-radius: 6px; }
.type-general { background: rgba(16,185,129,0.15); color: var(--success); }
.type-designated { background: rgba(245,158,11,0.15); color: var(--warning); }
.key-status { font-size: 11px; padding: 2px 8px; border-radius: 6px; }
.key-status.on { background: rgba(16,185,129,0.15); color: var(--success); }
.key-status.off { background: rgba(239,68,68,0.15); color: var(--danger); }
.empty-mini { text-align: center; padding: 40px; color: var(--text-muted); font-size: 14px; }
.muted { color: var(--text-muted); font-size: 13px; margin-bottom: 16px; }
.inline-form { display: flex; gap: 10px; align-items: center; }
.new-key-form { background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 10px; padding: 14px; margin-bottom: 16px; }
.inline-form input { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; color: var(--text); outline: none; }

/* Admin 表单 */
.admin-form { display: flex; flex-direction: column; gap: 12px; max-width: 900px; }
.form-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.admin-form textarea { resize: vertical; min-height: 70px; font-family: 'JetBrains Mono','Consolas',monospace; font-size: 12px; }
.bar-wrap { display: flex; align-items: center; gap: 8px; min-width: 160px; }
.bar-fill { height: 5px; background: var(--grad); border-radius: 999px; min-width: 20px; }
.bar-wrap span { font-size: 10px; color: var(--text-muted); white-space: nowrap; }

/* Footer */
.footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 24px 0 18px; background: rgba(0,0,0,0.2); backdrop-filter: blur(10px); }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.footer-desc { color: var(--text-muted); font-size: 12px; line-height: 1.6; margin-bottom: 12px; }
.footer-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.footer-tags span { font-size: 10px; padding: 3px 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; color: var(--text-muted); }
.footer-right { text-align: right; }
.stat-line { margin-bottom: 6px; font-size: 12px; }
.stat-line .stat-label { color: var(--text-muted); margin-right: 8px; }
.stat-line .stat-num { font-size: 16px; font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-line.greeting { color: var(--accent-2); font-size: 12px; margin: 8px 0; }
.footer-copy { font-size: 11px; color: var(--text-dim); margin-top: 8px; }

/* 响应式 */
@media (max-width: 960px) {
  .hero-grid, .list-layout, .doc-layout, .footer-inner { grid-template-columns: 1fr; }
  .api-grid, .dash-grid, .support-grid { grid-template-columns: repeat(2, 1fr); }
  .mini-stats-band .mini-stats { grid-template-columns: repeat(2, 1fr); }
  .list-sidebar, .doc-side { position: static; max-height: none; align-self: stretch; }
  .list-sidebar .cat-list, .doc-side .nav-list { flex: none; overflow: visible; max-height: none; }
  .hero-title { font-size: 34px; }
  .doc-head .doc-head-row { flex-direction: column; align-items: flex-start; gap: 12px; }
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; top: 56px; left: 0; right: 0;
    background: rgba(10,14,26,0.98); border-bottom: 1px solid var(--border);
    padding: 10px 16px; flex-direction: column; gap: 4px; z-index: 99;
  }
  .nav.show { display: flex; }
  .nav a { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .reveal-card { opacity: 1; transform: none; }
}
@media (max-width: 600px) {
  html, body { overflow-x: clip; }
  .container { padding: 0 14px; }
  .topbar-inner { gap: 8px; }
  .topbar-right { gap: 6px; flex-shrink: 0; }
  .brand { min-width: 0; }
  .brand-name { font-size: 14px; white-space: nowrap; }
  .nav { padding: 10px 14px; }

  .api-grid, .dash-grid, .support-grid, .form-grid2, .debug-fields, .mini-stats-band .mini-stats { grid-template-columns: 1fr; }
  .hero-title { font-size: 28px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .page-head { padding: 20px 0 14px; }
  .page-head h1 { font-size: 22px; }

  .flash { margin: 12px 14px 0; padding: 10px 12px; gap: 8px; align-items: flex-start; }
  .flash-close { flex: 0 0 28px; }
  .announcement-inner { padding: 9px 14px; gap: 8px; align-items: flex-start; }
  .announcement-body { line-height: 1.55; }

  .tab-bar { flex-wrap: nowrap; overflow-x: auto; padding: 0 0 10px; margin-bottom: 16px; scrollbar-width: thin; }
  .tab-bar .tab { flex: 0 0 auto; }
  .dash-head { align-items: flex-start; gap: 10px; }
  .dash-head p { line-height: 1.5; }
  .dash-card { padding: 12px; }
  .dash-card-head { gap: 10px; align-items: flex-start; }
  .dash-card-head h2 { min-width: 0; }
  .dash-card-head .btn { flex: 0 0 auto; }
  .inline-form { align-items: stretch; flex-direction: column; }
  .inline-form .btn { width: 100%; }
  .new-key-form { padding: 12px; }
  .empty-mini { padding: 28px 16px; }

  .list-toolbar { align-items: stretch; }
  .filter-tabs { width: 100%; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
  .filter-tabs a { flex: 0 0 auto; }
  .search-box { width: 100%; }
  .search-box input { width: 100%; min-width: 0; }
  .list-sidebar { gap: 12px; }
  .list-sidebar .side-card:last-child { display: none; }

  .doc-head .doc-head-row { gap: 10px; }
  .doc-head h1 { font-size: 21px; line-height: 1.3; }
  .doc-actions { width: 100%; flex-wrap: wrap; }
  .doc-actions .btn { flex: 1 1 calc(50% - 4px); min-width: 0; }
  .doc-actions .btn:first-child { flex-basis: 100%; }
  .doc-card { padding: 12px; overflow-x: auto; scrollbar-width: thin; }
  .doc-card-title { min-width: max-content; }
  .doc-card .info-table { min-width: 500px; }
  .doc-card .param-table { min-width: 440px; }
  .info-table td:first-child { width: 96px; }
  .code-block, .debug-result { max-width: 100%; padding: 11px; font-size: 11px; }
  .debug-action { align-items: stretch; flex-direction: column; gap: 7px; }
  .debug-output-switch { width: 100%; overflow-x: auto; }
  .debug-action .btn { width: 100%; }
  .debug-row input[type="file"] { max-width: 100%; }

  .table-wrap { max-width: 100%; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
  .data-table { min-width: 620px; }
  .data-table th, .data-table td { padding: 9px 10px; }
  .inline-action { white-space: nowrap; }
  .footer-right { text-align: left; }
}

@media (max-width: 420px) {
  .topbar-inner { height: 52px; }
  .nav { top: 52px; }
  .brand-ver, .uname, .caret { display: none; }
  .topbar-right .btn { padding: 7px 9px; font-size: 12px; }
  .user-btn { padding: 4px; }
  .user-dropdown { min-width: 148px; }
  .nav-toggle, .theme-toggle { width: 30px; height: 30px; }
  .page-head h1 { font-size: 20px; }
  .dash-avatar { width: 42px; height: 42px; font-size: 19px; }
  .doc-actions .btn { font-size: 11px; padding: 7px 8px; }
  .doc-card .param-table { min-width: 400px; }
}

@media (max-width: 340px) {
  .container { padding: 0 10px; }
  .brand-name { font-size: 13px; }
  .topbar-right .btn { padding: 6px 7px; }
  .dash-card, .doc-card { padding: 10px; }
}
