/* ============================================================
   羽轩 API 开放平台 · 自研玻璃拟态 UI（无第三方组件 / 纯 CSS）
   前台 + 后台共用
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; overflow-x: hidden; }

:root {
  --bg: #05060c;
  --fg: #eef0f8;
  --muted: #a6abc4;
  --dim: #71768d;
  --line: rgba(255,255,255,.08);
  --line2: rgba(255,255,255,.15);
  --glass: rgba(19,21,33,.60);
  --glass2: rgba(30,33,50,.48);
  --accent: #5b8dff;
  --accent2: #8b5cf6;
  --cyan: #22d3ee;
  --ok: #34d399;
  --warn: #fbbf24;
  --err: #fb7185;
  --r-lg: 24px; --r-md: 18px; --r-sm: 12px;
  --sh: 0 22px 55px -20px rgba(0,0,0,.85);
  --grad: linear-gradient(135deg, #5b8dff, #8b5cf6 55%, #22d3ee);
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
/* 极光背景 */
body::before {
  content: ""; position: fixed; inset: -25%; z-index: -2; pointer-events: none;
  filter: blur(72px); opacity: .5;
  background:
    radial-gradient(38% 38% at 12% 18%, rgba(91,141,255,.65), transparent 70%),
    radial-gradient(34% 34% at 88% 8%, rgba(139,92,246,.55), transparent 70%),
    radial-gradient(40% 40% at 72% 88%, rgba(34,211,238,.36), transparent 70%),
    radial-gradient(34% 34% at 18% 92%, rgba(52,211,153,.26), transparent 70%);
  animation: aurora 26s ease-in-out infinite alternate;
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(130% 90% at 50% -15%, transparent 40%, rgba(5,6,12,.72) 82%);
}
@keyframes aurora {
  0%   { transform: translate3d(-3%,-2%,0) scale(1); }
  50%  { transform: translate3d(3%,2%,0) scale(1.09); }
  100% { transform: translate3d(-2%,3%,0) scale(1.04); }
}
@media (prefers-reduced-motion: reduce) { body::before { animation: none; } }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: rgba(91,141,255,.35); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 9px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.24); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 布局 ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 20px 16px 96px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap-flex { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.hide { display: none !important; }
.center { text-align: center; }

/* ---------- 玻璃面板 ---------- */
.glass {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: var(--sh), inset 0 1px 0 rgba(255,255,255,.09);
}
.glass::before { /* 顶部高光 */
  content: ""; position: absolute; inset: 0 0 auto; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  opacity: .6; pointer-events: none;
}
.glass-2 {
  background: var(--glass2); border: 1px solid var(--line); border-radius: var(--r-md);
  backdrop-filter: blur(14px) saturate(150%); -webkit-backdrop-filter: blur(14px) saturate(150%);
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 18px; border-bottom: 1px solid var(--line);
  background: rgba(6,7,13,.7); backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand .logo { width: 36px; height: 36px; border-radius: 11px; object-fit: cover; box-shadow: 0 6px 18px rgba(91,141,255,.45); }
.brand h1 { font-size: 15.5px; margin: 0; font-weight: 700; letter-spacing: .3px; white-space: nowrap; }
.brand .sub { font-size: 11px; color: var(--dim); margin-left: 6px; font-weight: 500; letter-spacing: .5px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a, .nav button {
  border: 1px solid transparent; background: transparent; color: var(--muted);
  font-size: 12.5px; padding: 8px 13px; border-radius: 11px; cursor: pointer; transition: .2s; font-family: inherit;
}
.nav a:hover, .nav button:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav a.on { color: #fff; background: rgba(91,141,255,.22); border-color: rgba(91,141,255,.45); box-shadow: 0 6px 18px -8px rgba(91,141,255,.9); }

/* 后台顶部导航：移动端不换行，改为单行横向滑动 */
.navscroll {
  flex-wrap: nowrap; gap: 8px; margin-bottom: 16px;
  overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; -ms-overflow-style: none; padding-bottom: 2px;
  overscroll-behavior-x: contain;
}
.navscroll::-webkit-scrollbar { display: none; }
.navscroll > * { flex: 0 0 auto; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  border: 1px solid var(--line2); background: rgba(255,255,255,.06); color: var(--fg);
  font-size: 13px; padding: 10px 16px; border-radius: 13px; cursor: pointer;
  transition: transform .12s, background .2s, box-shadow .2s, border-color .2s;
  font-weight: 550; font-family: inherit; white-space: nowrap;
}
.btn:hover { background: rgba(255,255,255,.12); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn.blue, .btn.primary {
  background: var(--grad); border-color: transparent; color: #fff;
  box-shadow: 0 10px 26px -10px rgba(91,141,255,.95);
}
.btn.blue:hover, .btn.primary:hover { filter: brightness(1.08); box-shadow: 0 14px 30px -10px rgba(91,141,255,1); }
.btn.ghost { background: transparent; }
.btn.danger { background: rgba(251,113,133,.15); border-color: rgba(251,113,133,.4); color: #ffb3bd; }
.btn.danger:hover { background: rgba(251,113,133,.25); }
.btn.ok { background: rgba(52,211,153,.15); border-color: rgba(52,211,153,.4); color: #7bf0c0; }
.btn.ok:hover { background: rgba(52,211,153,.25); }
.btn.sm { padding: 6px 11px; font-size: 12px; border-radius: 10px; }
.btn.lg { padding: 12px 22px; font-size: 14px; border-radius: 14px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- 表单 ---------- */
.input, .select, .textarea {
  width: 100%; background: rgba(0,0,0,.30); border: 1px solid var(--line); color: var(--fg);
  border-radius: 13px; padding: 11px 14px; font-size: 13px; outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s; font-family: inherit;
}
.input::placeholder, .textarea::placeholder { color: #5c6076; }
.input:focus, .select:focus, .textarea:focus {
  border-color: rgba(91,141,255,.7); background: rgba(0,0,0,.42);
  box-shadow: 0 0 0 3.5px rgba(91,141,255,.16);
}
.textarea { min-height: 96px; resize: vertical; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.6; }
.select {
  appearance: none; cursor: pointer; padding-right: 36px;
  background-image: linear-gradient(45deg,transparent 50%,#8f95ad 50%), linear-gradient(135deg,#8f95ad 50%,transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
label.field { display: block; margin-bottom: 13px; }
label.field > span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
label.field > span .req { color: var(--err); margin-left: 3px; }

/* ---------- 药丸标签 ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line2);
  color: var(--muted); background: rgba(255,255,255,.05); letter-spacing: .3px; white-space: nowrap;
}
.pill.get    { color: #7bf0c0; border-color: rgba(52,211,153,.42); background: rgba(52,211,153,.13); }
.pill.post   { color: #9dc0ff; border-color: rgba(91,141,255,.45); background: rgba(91,141,255,.15); }
.pill.put    { color: #ffd98a; border-color: rgba(251,191,36,.42); background: rgba(251,191,36,.13); }
.pill.delete { color: #ffb3bd; border-color: rgba(251,113,133,.42); background: rgba(251,113,133,.14); }
.pill.patch  { color: #cfaeff; border-color: rgba(139,92,246,.45); background: rgba(139,92,246,.16); }
.pill.solid  { background: var(--grad); color: #fff; border-color: transparent; }

/* ---------- 分区标题 ---------- */
.sec { display: flex; align-items: center; gap: 10px; margin: 26px 2px 13px; font-size: 12.5px; color: var(--dim); letter-spacing: 1.2px; font-weight: 600; }
.sec b { color: #d9dceb; font-weight: 650; }
.sec span { font-weight: 400; letter-spacing: .2px; }
.sec::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(255,255,255,.18), transparent); }

/* ---------- 头图 ---------- */
.hero {
  position: relative; overflow: hidden; padding: 26px 28px; border-radius: var(--r-lg);
  border: 1px solid rgba(255,255,255,.13);
  background: linear-gradient(135deg, rgba(91,141,255,.34), rgba(139,92,246,.24) 52%, rgba(34,211,238,.20));
  box-shadow: var(--sh), inset 0 1px 0 rgba(255,255,255,.18);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(460px 200px at 88% -20%, rgba(255,255,255,.22), transparent 62%);
}
.hero::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 45%; height: 100%; pointer-events: none;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.16), transparent);
  animation: sheen 7s ease-in-out infinite;
}
@keyframes sheen { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.hero-t { position: relative; font-size: 23px; font-weight: 760; letter-spacing: .4px; }
.hero-s { position: relative; font-size: 13px; color: #cdd4ee; margin-top: 7px; }
.hero-chips { position: relative; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.hero-chips span {
  font-size: 11.5px; padding: 5px 12px; border-radius: 999px;
  background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.16); color: #eef1ff;
  backdrop-filter: blur(6px);
}

/* ---------- 统计卡 ---------- */
.stat { padding: 16px 18px; min-width: 150px; transition: .22s; }
.stat:hover { border-color: rgba(91,141,255,.45); transform: translateY(-2px); }
.stat-l { font-size: 11.5px; color: var(--dim); letter-spacing: .4px; font-weight: 500; }
.stat-v { font-size: 27px; font-weight: 760; line-height: 1.2; margin-top: 3px; }

/* ---------- 筛选（双标签栏） ---------- */
.filter-box { padding: 14px 16px; }
.fgroup { display: flex; align-items: center; gap: 10px; }
.fgroup + .fgroup { margin-top: 12px; }
.fgroup .fg-label { font-size: 11.5px; color: var(--dim); min-width: 62px; flex-shrink: 0; letter-spacing: .5px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.chip {
  border: 1px solid var(--line2); background: rgba(255,255,255,.05); color: var(--muted);
  padding: 8px 16px; border-radius: 999px; font-size: 12.5px; cursor: pointer;
  transition: transform .14s, background .2s, box-shadow .2s, color .2s, border-color .2s;
  font-family: inherit; font-weight: 550; position: relative; overflow: hidden;
}
.chip:hover { color: #fff; border-color: rgba(91,141,255,.55); transform: translateY(-1px); }
.chip:active { transform: scale(.96); }
.chip.on {
  color: #fff; border-color: transparent; background: var(--grad);
  box-shadow: 0 10px 24px -10px rgba(91,141,255,1);
}
@media (max-width: 560px) {
  .fgroup { align-items: flex-start; }
  .fgroup .fg-label { min-width: 52px; padding-top: 9px; }
  .chip { padding: 7px 13px; font-size: 12px; }
}

/* ---------- 接口列表卡片 ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.api-card {
  display: block; padding: 17px 18px; border-radius: var(--r-md); cursor: pointer;
  transition: transform .2s, border-color .2s, box-shadow .2s; position: relative; overflow: hidden;
}
.api-card::after { /* 左侧渐变条 */
  content: ""; position: absolute; left: 0; top: 16%; bottom: 16%; width: 3px; border-radius: 0 4px 4px 0;
  background: var(--grad); opacity: 0; transition: opacity .2s;
}
.api-card:hover { transform: translateY(-3px); border-color: rgba(91,141,255,.5); box-shadow: 0 26px 55px -20px rgba(91,141,255,.5), var(--sh); }
.api-card:hover::after { opacity: 1; }
.api-card h3 { margin: 0 0 7px; font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 650; }
.api-card p { margin: 0 0 12px; font-size: 12.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 36px; }
.api-card .meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--dim); }

/* 分页 */
.pager { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 20px; flex-wrap: wrap; }
.pager button {
  min-width: 36px; height: 36px; padding: 0 11px; border-radius: 11px; cursor: pointer;
  border: 1px solid var(--line2); background: rgba(255,255,255,.05); color: var(--muted);
  font-size: 13px; transition: .18s; font-family: inherit;
}
.pager button:hover:not(:disabled) { color: #fff; border-color: rgba(91,141,255,.5); }
.pager button.on { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 8px 20px -8px rgba(91,141,255,1); }
.pager button:disabled { opacity: .4; cursor: not-allowed; }
.pager .pg-info { font-size: 12px; color: var(--dim); margin-left: 6px; }

/* ---------- 表格 ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 12px 13px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { color: var(--dim); font-weight: 600; font-size: 12px; letter-spacing: .4px; white-space: nowrap; }
.table tbody tr { transition: background .16s; }
.table tbody tr:hover td { background: rgba(255,255,255,.035); }
.table tbody tr:last-child td { border-bottom: 0; }
/* 后台管理表格：单元格不折行，靠 .tbl-scroll 横向滑动（前台参数表保持折行） */
section[id^="v-"] .tbl-scroll .table td { white-space: nowrap; }
.table .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.tbl-scroll { overflow-x: auto; border-radius: var(--r-md); }

/* ---------- 代码块 ---------- */
.code {
  position: relative; background: rgba(0,0,0,.46); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 14px; overflow: auto;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.68;
  white-space: pre; color: #d9dded;
}
.code .copy { position: absolute; top: 9px; right: 9px; }
pre.json { margin: 0; }
.k { color: #9dc0ff; } .s { color: #7bf0c0; } .n { color: #ffd98a; } .b { color: #cfaeff; }
.md code { background: rgba(255,255,255,.08); padding: 1px 6px; border-radius: 6px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
.md a { color: var(--accent); }

/* ---------- Tab（小分段器） ---------- */
.tabs { display: inline-flex; gap: 4px; background: rgba(0,0,0,.28); padding: 4px; border-radius: 13px; border: 1px solid var(--line); flex-wrap: wrap; }
.tabs button {
  border: 0; background: transparent; color: var(--muted); font-size: 12.5px; padding: 8px 14px;
  border-radius: 10px; cursor: pointer; transition: .18s; font-family: inherit; font-weight: 550;
}
.tabs button:hover { color: #fff; }
.tabs button.on { background: var(--grad); color: #fff; box-shadow: 0 6px 16px -6px rgba(91,141,255,1); }

/* ---------- 提示 / 状态 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%) translateY(20px); z-index: 200;
  background: rgba(20,22,33,.95); border: 1px solid var(--line2); color: #fff;
  padding: 12px 20px; border-radius: 14px; font-size: 13px; opacity: 0; transition: .28s;
  backdrop-filter: blur(16px); pointer-events: none; max-width: 90vw; box-shadow: var(--sh);
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { border-color: rgba(251,113,133,.55); }
.toast.ok { border-color: rgba(52,211,153,.55); }
.empty { text-align: center; color: var(--dim); padding: 46px 16px; font-size: 13px; }

/* ---------- 表单弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(4,5,10,.62);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.modal-mask.on { opacity: 1; pointer-events: auto; }
.modal {
  width: 100%; max-width: 470px; max-height: 88vh; display: flex; flex-direction: column;
  background: var(--glass); border: 1px solid var(--line2); border-radius: var(--r-lg);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.75);
  backdrop-filter: blur(26px) saturate(165%); -webkit-backdrop-filter: blur(26px) saturate(165%);
  transform: translateY(16px) scale(.98); transition: transform .22s;
}
.modal-mask.on .modal { transform: none; }
.modal .m-head { display: flex; align-items: center; gap: 9px; padding: 15px 16px 12px; border-bottom: 1px solid var(--line); }
.modal .m-head > i { color: var(--accent); }
.modal .m-head b { font-size: 15px; }
.modal .m-head .m-x { margin-left: auto; width: 32px; height: 32px; }
.modal .m-body { padding: 16px 16px 0; overflow-y: auto; }
.modal .m-body label.field:last-child { margin-bottom: 16px; }
.modal label.field > span .req { font-style: normal; }
.modal .m-hint { font-size: 11.5px; color: var(--dim); margin-top: 5px; }
.modal .m-err {
  display: none; margin: 0 16px 12px; padding: 9px 12px; border-radius: 11px; font-size: 12.5px;
  background: rgba(251,113,133,.14); border: 1px solid rgba(251,113,133,.4); color: #ffb3bd;
}
.modal .m-err.on { display: block; }
.modal .m-foot { display: flex; gap: 10px; padding: 0 16px 16px; }
.modal .m-foot .btn { flex: 1; }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none !important; }
html[data-theme="light"] .modal .m-err { color: #c62f47; }
@media (max-width: 720px) {
  .modal-mask { padding: 0; align-items: flex-end; }
  .modal { max-width: none; max-height: 92vh; border-radius: 18px 18px 0 0; }
  .modal .m-foot { padding-bottom: 20px; }
}
.loading { text-align: center; color: var(--dim); padding: 34px; font-size: 13px; }
.spinner { width: 22px; height: 22px; border: 2px solid rgba(255,255,255,.18); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 骨架屏 */
.skel { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.skel .sk { height: 118px; border-radius: var(--r-md); background: linear-gradient(100deg, rgba(255,255,255,.04) 30%, rgba(255,255,255,.09) 50%, rgba(255,255,255,.04) 70%); background-size: 220% 100%; animation: sk 1.3s linear infinite; }
@keyframes sk { to { background-position: -120% 0; } }

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
  .wrap { padding: 14px 12px 84px; }
  .brand h1 { font-size: 14.5px; } .brand .sub { display: none; }
  .grid, .skel { grid-template-columns: 1fr; }
  .topbar { padding: 10px 12px; gap: 8px; }
  .hero { padding: 22px 20px; } .hero-t { font-size: 20px; }
  .hide-sm { display: none !important; }
  .sec { margin: 22px 2px 11px; }

  /* 顶栏：强制单行，导航不换行 */
  .topbar { flex-wrap: nowrap; }
  .topbar > .row { flex-shrink: 0; }
  .nav { flex-wrap: nowrap; gap: 2px; }
  .nav a, .nav button { padding: 7px 10px; font-size: 12px; }
  .btn.sm { padding: 8px 10px; }

  /* 后台导航条：贴边横滑，可点按 */
  .navscroll { margin-left: -12px; margin-right: -12px; padding-left: 12px; padding-right: 12px; }

  /* 筛选栏：手机端每个控件独占一行，不再挤压 */
  .wrap .row.wrap-flex > .input,
  .wrap .row.wrap-flex > .select { flex: 1 1 100%; width: auto !important; min-width: 0 !important; }
  .wrap .row.wrap-flex > .btn { flex: 1 1 auto; }
}

/* ---------- 页脚 ---------- */
.footer { text-align: center; color: var(--dim); font-size: 12px; padding: 34px 10px 8px; line-height: 1.9; }
.footer a { color: var(--muted); }
.footer a:hover { color: #fff; }

/* ============================================================
   图标（Font Awesome CDN）：统一间距，避免与文字打架
   ============================================================ */
.hero-chips i, .chip i, .pill i { margin-right: 5px; }
.btn i, .nav i { margin-right: 5px; }
.btn.icon-only i, .btn.sm.icon-only i { margin-right: 0; }
.sec i { margin-right: 5px; opacity: .9; }
.api-card .meta i { margin-right: 3px; opacity: .8; }
.empty i { font-size: 26px; display: block; margin-bottom: 10px; opacity: .5; }
.icon-btn {
  width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 11px; border: 1px solid var(--line2); background: rgba(255,255,255,.06);
  color: var(--muted); cursor: pointer; transition: .2s; font-size: 14px; flex-shrink: 0;
}
.icon-btn:hover { color: var(--fg); border-color: rgba(91,141,255,.5); transform: translateY(-1px); }
/* 图标按钮处于 .nav 内时：清掉 .nav button 的 padding/font-size 与图标右侧间距，保证图标真正居中 */
.nav .icon-btn { padding: 0; font-size: 14.5px; }
.icon-btn i { margin-right: 0; }
/* 月亮图标是弯月，几何居中也会看着偏左下，微调做光学居中 */
.icon-btn i.fa-moon { transform: translate(1px, -0.7px); }

/* ============================================================
   友情链接页
   ============================================================ */
.two-col { display: grid; grid-template-columns: 1.06fr .94fr; gap: 16px; align-items: start; }
@media (max-width: 880px) { .two-col { grid-template-columns: 1fr; } }
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.link-card { display: flex; align-items: center; gap: 13px; padding: 15px 16px; border-radius: var(--r-md); transition: transform .2s, border-color .2s, box-shadow .2s; }
.link-card:hover { transform: translateY(-3px); border-color: rgba(91,141,255,.5); box-shadow: 0 24px 50px -22px rgba(91,141,255,.55); }
.link-card .ic {
  width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--accent);
  background: rgba(255,255,255,.08); border: 1px solid var(--line2);
}
.link-card .ic img { width: 100%; height: 100%; object-fit: cover; }
.link-card .nm { font-size: 14.5px; font-weight: 650; display: flex; align-items: center; gap: 7px; }
.link-card .ds { font-size: 12.5px; color: var(--muted); margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 34px; }
.link-card .go { font-size: 11.5px; color: var(--dim); margin-top: 6px; }
.rule-list { list-style: none; padding: 0; margin: 0 0 4px; }
.rule-list li { display: flex; gap: 9px; font-size: 13px; color: var(--muted); line-height: 1.75; padding: 5px 0; }
.rule-list li i { color: var(--ok); margin-top: 5px; flex-shrink: 0; }
.mark { font-size: 12.5px; color: var(--dim); text-align: center; margin-top: 10px; }

/* ============================================================
   日间主题（data-theme="light"）
   ============================================================ */
html[data-theme="light"] {
  --bg: #edf1fa;
  --fg: #161a29;
  --muted: #545c79;
  --dim: #7e859d;
  --line: rgba(22,32,64,.10);
  --line2: rgba(22,32,64,.16);
  --glass: rgba(255,255,255,.76);
  --glass2: rgba(255,255,255,.62);
  --sh: 0 20px 46px -24px rgba(40,60,130,.32);
}
html[data-theme="light"] body::before { opacity: .55; }
html[data-theme="light"] body::after { background: radial-gradient(130% 90% at 50% -15%, transparent 40%, rgba(237,241,250,.82) 84%); }
html[data-theme="light"] .glass { box-shadow: var(--sh), inset 0 1px 0 rgba(255,255,255,.9); }
html[data-theme="light"] .glass::before { background: linear-gradient(90deg, transparent, rgba(255,255,255,.9), transparent); }
html[data-theme="light"] .topbar { background: rgba(255,255,255,.74); }
html[data-theme="light"] .nav a:hover, html[data-theme="light"] .nav button:hover { color: var(--fg); background: rgba(20,30,60,.06); }
html[data-theme="light"] .nav a.on { color: #fff; background: var(--grad); border-color: transparent; }
html[data-theme="light"] .icon-btn { background: rgba(20,30,60,.05); }
html[data-theme="light"] .icon-btn:hover { color: var(--fg); }
html[data-theme="light"] .btn { background: rgba(20,30,60,.05); }
html[data-theme="light"] .btn:hover { background: rgba(20,30,60,.1); }
html[data-theme="light"] .btn.blue, html[data-theme="light"] .btn.primary { background: var(--grad); }
html[data-theme="light"] .input, html[data-theme="light"] .textarea { background: rgba(255,255,255,.9); }
/* .select 専用 background-color，否则会干掉下拉箭头（background-image） */
html[data-theme="light"] .select { background-color: rgba(255,255,255,.9); }
html[data-theme="light"] .input::placeholder, html[data-theme="light"] .textarea::placeholder { color: #9aa1b8; }
html[data-theme="light"] .input:focus, html[data-theme="light"] .textarea:focus { background: #fff; }
html[data-theme="light"] .select:focus { background-color: #fff; }
html[data-theme="light"] .hero { background: linear-gradient(135deg, rgba(91,141,255,.28), rgba(139,92,246,.18) 52%, rgba(34,211,238,.16)); border-color: rgba(255,255,255,.65); }
html[data-theme="light"] .hero-s { color: #39436a; }
html[data-theme="light"] .hero-chips span { background: rgba(255,255,255,.6); border-color: rgba(255,255,255,.8); color: #232a45; }
html[data-theme="light"] .stat:hover { border-color: rgba(91,141,255,.5); }
html[data-theme="light"] .pill { background: rgba(20,30,60,.05); }
html[data-theme="light"] .chip { background: rgba(255,255,255,.75); }
html[data-theme="light"] .chip:hover { color: var(--fg); }
html[data-theme="light"] .chip.on { color: #fff; }
html[data-theme="light"] .tabs { background: rgba(255,255,255,.72); }
html[data-theme="light"] .tabs button:hover { color: var(--fg); }
html[data-theme="light"] .tabs button.on { color: #fff; }
html[data-theme="light"] .code { background: #f5f7fe; color: #1b2034; border-color: rgba(22,32,64,.13); }
html[data-theme="light"] .k { color: #2b5cd9; } html[data-theme="light"] .s { color: #0d8a5f; }
html[data-theme="light"] .n { color: #b26b00; } html[data-theme="light"] .b { color: #7b3fd4; }
html[data-theme="light"] .md code { background: rgba(20,30,60,.07); }
html[data-theme="light"] .table tbody tr:hover td { background: rgba(20,30,60,.035); }
html[data-theme="light"] .pager button { background: rgba(255,255,255,.75); }
html[data-theme="light"] .pager button:hover:not(:disabled) { color: var(--fg); }
html[data-theme="light"] .toast { background: rgba(255,255,255,.97); color: var(--fg); }
html[data-theme="light"] .skel .sk { background: linear-gradient(100deg, rgba(20,30,60,.05) 30%, rgba(20,30,60,.11) 50%, rgba(20,30,60,.05) 70%); background-size: 220% 100%; }
html[data-theme="light"] .api-card:hover { box-shadow: 0 26px 55px -22px rgba(91,141,255,.5), var(--sh); }
html[data-theme="light"] .link-card .ic { background: rgba(20,30,60,.05); }
html[data-theme="light"] .footer a:hover { color: var(--fg); }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(20,30,60,.18); }
html[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: rgba(20,30,60,.3); }
/* 修正：暗色专属硬编码色在日间主题下的可读性 */
html[data-theme="light"] .sec b { color: #232a45; }
html[data-theme="light"] .sec::after { background: linear-gradient(90deg, rgba(20,30,60,.14), transparent); }
html[data-theme="light"] .chip.on { background: var(--grad); border-color: transparent; color: #fff; }
html[data-theme="light"] .tabs button.on { background: var(--grad); border-color: transparent; color: #fff; }
html[data-theme="light"] .pager button.on { background: var(--grad); border-color: transparent; color: #fff; }
html[data-theme="light"] .md, html[data-theme="light"] .md p, html[data-theme="light"] .md li { color: var(--fg); }
html[data-theme="light"] .empty, html[data-theme="light"] .loading, html[data-theme="light"] .mark { color: #6b7290; }
html[data-theme="light"] .spinner { border-color: rgba(20,30,60,.15); border-top-color: var(--accent); }
html[data-theme="light"] .link-card .go { color: #6b7290; }
html[data-theme="light"] .glass-2 { background: rgba(255,255,255,.62); }
/* 后台专用组件的日间修正 */
html[data-theme="light"] .subcard { background: rgba(255,255,255,.55); }
html[data-theme="light"] .sticky-bar { background: rgba(255,255,255,.92); }
html[data-theme="light"] .chart .bar:hover::after { color: #fff; }
html[data-theme="light"] .x-btn { color: #d63a4c; }
html[data-theme="light"] .captcha { background: rgba(20,30,60,.06); }
/* 日间：彩色按钮/标签用深一度文字，避免浅底浅字 */
html[data-theme="light"] .btn.ok { background: rgba(16,185,129,.13); border-color: rgba(16,185,129,.38); color: #0b7a55; }
html[data-theme="light"] .btn.ok:hover { background: rgba(16,185,129,.22); }
html[data-theme="light"] .btn.danger { background: rgba(251,113,133,.14); border-color: rgba(251,113,133,.45); color: #c62f47; }
html[data-theme="light"] .btn.danger:hover { background: rgba(251,113,133,.24); }
html[data-theme="light"] .pill.get { color: #0b7a55; }
html[data-theme="light"] .pill.post { color: #2b5cd9; }
html[data-theme="light"] .pill.put { color: #9a6a00; }
html[data-theme="light"] .pill.delete { color: #c62f47; }
html[data-theme="light"] .pill.patch { color: #6b3fbe; }

/* ============================================================
   手机端适配（放文件末尾，确保覆盖前面同名规则）
   ============================================================ */
@media (max-width: 720px) {
  .icon-btn { width: 34px; height: 34px; }
  .topbar { flex-wrap: nowrap; }
  .nav { flex-wrap: nowrap; }
  .brand h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .navscroll { margin-left: -12px; margin-right: -12px; padding-left: 12px; padding-right: 12px; }
  .wrap .row.wrap-flex > .input,
  .wrap .row.wrap-flex > .select { flex: 1 1 100%; width: auto !important; min-width: 0 !important; }
  .wrap .row.wrap-flex > .btn { flex: 1 1 auto; }
  /* 表格：手机端横向滑动，不再把短文本挤成竖排 */
  .tbl-scroll { margin: 0 -2px; }
  .table th, .table td { padding: 10px 11px; }
}

/* ============================================================
   用户中心 / 计费相关
   ============================================================ */
.grid.two { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.glass.pad { padding: 18px 20px; }
.ct { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 700; margin: 0 0 14px; color: #dfe3f2; }
.ct i { color: var(--accent); }
.stats-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.stat-v.sm { font-size: 15px; font-weight: 620; margin-top: 8px; }
.tip-line { margin-top: 12px; font-size: 12px; color: var(--dim); }
.tip-line a { color: var(--accent); text-decoration: none; }
.tip-line a:hover { text-decoration: underline; }
.muted-note { font-size: 12px; color: var(--dim); line-height: 1.7; }
.muted-note i { color: var(--accent); margin-right: 3px; }
.field .opt { font-size: 11px; color: var(--dim); font-style: normal; margin-left: 5px; }
.field .req { color: #ff8fa0; font-style: normal; margin-left: 3px; }
.ubal { background: var(--grad); color: #fff; border-radius: 999px; padding: 1px 7px; font-size: 11px; margin-left: 5px; }

/* 密钥列表 */
.key-list { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.key-row {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
  border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04);
  border-radius: 12px; padding: 12px 14px;
}
.kr-main { min-width: 0; flex: 1 1 260px; }
.kr-name { font-size: 13px; font-weight: 650; color: #dfe3f2; margin-bottom: 6px; }
.kr-val { display: block; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px;
  color: #9dc0ff; word-break: break-all; background: rgba(91,141,255,.1);
  border: 1px solid rgba(91,141,255,.25); border-radius: 8px; padding: 6px 9px; }
.kr-meta { font-size: 11.5px; color: var(--dim); margin-top: 7px; }
.kr-act { display: flex; flex-wrap: wrap; gap: 7px; }

/* 表格数值/状态 */
.table td.plus { color: #7bf0c0; font-weight: 650; }
.table td.minus { color: #ffb3bd; font-weight: 650; }
.code.okc { color: #7bf0c0; border-color: rgba(52,211,153,.4); background: rgba(52,211,153,.12); }
.code.badc { color: #ffb3bd; border-color: rgba(251,113,133,.4); background: rgba(251,113,133,.12); }

/* 计费提示条 */
.price-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(251,191,36,.4);
  background: rgba(251,191,36,.12); color: #ffd98a; }
.price-tag.free { border-color: rgba(52,211,153,.4); background: rgba(52,211,153,.12); color: #7bf0c0; }
.paywall { border: 1px solid rgba(251,191,36,.32); background: rgba(251,191,36,.08); border-radius: 12px;
  padding: 11px 14px; font-size: 12.5px; color: #ffd98a; line-height: 1.75; }
.paywall a { color: var(--accent); }

html[data-theme="light"] .ct { color: #232a45; }
html[data-theme="light"] .kr-name { color: #232a45; }
html[data-theme="light"] .kr-val { color: #2b57c8; background: rgba(91,141,255,.1); }
html[data-theme="light"] .key-row { border-color: rgba(20,30,60,.12); background: rgba(255,255,255,.72); }
html[data-theme="light"] .paywall { color: #8a5a00; border-color: rgba(198,140,0,.35); background: rgba(251,191,36,.14); }
html[data-theme="light"] .price-tag { color: #8a5a00; }
html[data-theme="light"] .price-tag.free { color: #0f7a55; }
html[data-theme="light"] .table td.plus { color: #0f7a55; }
html[data-theme="light"] .table td.minus { color: #c62f47; }
html[data-theme="light"] .code.okc { color: #0f7a55; }
html[data-theme="light"] .code.badc { color: #c62f47; }
html[data-theme="light"] .ubal { color: #fff; }

@media (max-width: 720px) {
  .glass.pad { padding: 15px 15px; }
  .key-row { padding: 11px 12px; }
  .kr-act { width: 100%; }
  .kr-act .btn { flex: 1 1 auto; }
}

.show-sm { display: none; }
.nav a { white-space: nowrap; }
@media (max-width: 720px) {
  .show-sm { display: inline; }
  .nav a .ubal { font-size: 10.5px; padding: 0 6px; }
}
