/* ============================================================
   ScriptVault · Argent Core 风格主题
   薄荷青 + 紫罗兰 + 暖橙 · 噪点 + 光晕球 · 玻璃渐变描边
   ============================================================ */

:root {
  --bg: #05060a;
  --bg-2: #080b12;
  --panel: rgba(12, 16, 28, 0.78);
  --panel-2: rgba(15, 20, 35, 0.92);
  --line: rgba(114, 255, 226, 0.16);
  --text: #edf3ff;
  --muted: rgba(237, 243, 255, 0.68);
  --accent: #72ffe2;          /* 薄荷青 */
  --accent-2: #8a7dff;        /* 紫罗兰 */
  --accent-3: #ff9b6b;        /* 暖橙 */
  --ok: #72ffe2;
  --warn: #ff9b6b;
  --bad: #ff6b81;
  --shadow: 0 0 0 1px rgba(114, 255, 226, 0.14), 0 24px 80px rgba(0, 0, 0, 0.55);
  --radius: 28px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: "Space Grotesk", "Inter", "PingFang SC", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, "SF Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(114, 255, 226, 0.14), transparent 32%),
    radial-gradient(circle at 82% 14%, rgba(138, 125, 255, 0.18), transparent 28%),
    radial-gradient(circle at 70% 82%, rgba(255, 155, 107, 0.10), transparent 22%),
    linear-gradient(180deg, #05060a 0%, #080b12 52%, #05060a 100%);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
::selection { background: rgba(114, 255, 226, 0.28); color: #fff; }

/* ============ 背景特效 ============ */
.noise {
  position: fixed; inset: 0;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: screen;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}
.orb {
  position: fixed;
  filter: blur(34px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
  animation: float 14s ease-in-out infinite;
}
.orb-1 { width: 280px; height: 280px; left: -90px; top: 110px; background: rgba(114, 255, 226, 0.20); }
.orb-2 { width: 240px; height: 240px; right: -60px; top: 220px; background: rgba(138, 125, 255, 0.18); animation-delay: -4s; }
.orb-3 { width: 220px; height: 220px; right: 16%; bottom: 8%; background: rgba(255, 155, 107, 0.12); animation-delay: -8s; }
@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, -18px, 0) scale(1.05); }
}

/* ============ 顶栏 ============ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(20px, 4vw, 44px);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  background: linear-gradient(180deg, rgba(5, 6, 10, 0.82), rgba(5, 6, 10, 0.42));
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(114, 255, 226, 0.18), rgba(138, 125, 255, 0.16));
  border: 1px solid rgba(114, 255, 226, 0.24);
  box-shadow: 0 0 22px rgba(114, 255, 226, 0.24);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--accent);
}
.brand strong { display: block; font-family: var(--display); font-size: 1rem; letter-spacing: .3px; }
.brand span { display: block; color: var(--muted); font-size: 0.78rem; margin-top: 2px; }

.nav { display: flex; align-items: center; gap: 24px; color: var(--muted); flex-wrap: wrap; }
.nav a { position: relative; font-weight: 500; transition: color 180ms ease; }
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -8px;
  width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 220ms ease;
}
.nav a:hover { color: var(--text); }
.nav a:hover::after { transform: scaleX(1); }
.nav a.active { color: var(--text); }
.nav a.active::after { transform: scaleX(1); }

.topbar-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ============ 主区 ============ */
main {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 30px 0 80px;
}
.page-head { margin-bottom: 30px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--accent);
  background: rgba(114, 255, 226, 0.08);
  border: 1px solid rgba(114, 255, 226, 0.16);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 600;
}
.display {
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 14px 0 10px;
  font-weight: 700;
}
.lead { color: var(--muted); font-size: 0.98rem; max-width: 60ch; }

.section { margin-bottom: 26px; }

/* ============ 统计卡 ============ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}
.stat-card {
  position: relative;
  padding: 20px 22px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}
.stat-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0.7;
}
.stat-card.violet::before { background: linear-gradient(90deg, var(--accent-2), transparent); }
.stat-card.orange::before { background: linear-gradient(90deg, var(--accent-3), transparent); }
.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(114, 255, 226, 0.26);
  box-shadow: 0 0 0 1px rgba(114, 255, 226, 0.1), 0 0 26px rgba(114, 255, 226, 0.07);
}
.stat-card .n {
  display: block;
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.stat-card.violet .n { color: var(--accent-2); }
.stat-card.orange .n { color: var(--accent-3); }
.stat-card .l { color: var(--muted); font-size: 0.82rem; letter-spacing: .4px; margin-top: 2px; }
.stat-card .s-icon { position: absolute; right: 18px; top: 18px; font-size: 20px; opacity: .5; }

/* ============ 面板（玻璃渐变描边） ============ */
.panel {
  position: relative;
  background: linear-gradient(180deg, rgba(14, 18, 31, 0.82), rgba(10, 14, 24, 0.74));
  border: 1px solid rgba(114, 255, 226, 0.14);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 26px;
  margin-bottom: 22px;
  overflow: hidden;
}
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(114, 255, 226, 0.5), transparent 30%, rgba(138, 125, 255, 0.3), transparent 70%, rgba(255, 155, 107, 0.2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.65;
}
.panel-title {
  font-family: var(--display);
  font-size: 1.12rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.panel-title::before {
  content: "";
  width: 6px; height: 16px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 10px rgba(114, 255, 226, 0.6);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.panel-head .panel-title { margin-bottom: 0; }

/* ============ 按钮（胶囊 + 发光扫光） ============ */
.btn, .pill, .tab, .modal-tab, .modal-close {
  border: 1px solid rgba(114, 255, 226, 0.22);
  border-radius: 999px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  overflow: hidden;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(114, 255, 226, 0.22);
  border-radius: 999px;
  text-decoration: none;
}
.btn-primary { background: linear-gradient(135deg, rgba(114, 255, 226, 0.18), rgba(114, 255, 226, 0.08)); }
.btn-violet { background: linear-gradient(135deg, rgba(138, 125, 255, 0.2), rgba(138, 125, 255, 0.08)); }
.btn-danger { background: linear-gradient(135deg, rgba(255, 107, 129, 0.16), rgba(255, 107, 129, 0.06)); border-color: rgba(255, 107, 129, 0.28); }
.btn-warn { background: linear-gradient(135deg, rgba(255, 155, 107, 0.18), rgba(255, 155, 107, 0.08)); border-color: rgba(255, 155, 107, 0.3); }
.btn-ghost { background: rgba(255, 255, 255, 0.03); }
.glow-button { box-shadow: 0 0 0 1px rgba(114, 255, 226, 0.14), 0 0 18px rgba(114, 255, 226, 0.08); }
.glow-button::after {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(120deg, transparent, rgba(114, 255, 226, 0.32), transparent);
  transform: translateX(-120%);
  opacity: 0.7;
  pointer-events: none;
}
.glow-button:hover::after { animation: shimmer 900ms ease; }
.btn:hover, .pill:hover, .tab:hover, .modal-tab:hover, .modal-close:hover {
  transform: translateY(-2px);
  border-color: rgba(114, 255, 226, 0.45);
}
.btn:active { transform: translateY(0) scale(0.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }
.btn.mini { min-height: 34px; padding: 0 14px; font-size: 0.84rem; border-radius: 12px; }
.btn.copied { background: rgba(114, 255, 226, 0.22); border-color: rgba(114, 255, 226, 0.5); box-shadow: 0 0 20px rgba(114, 255, 226, 0.2); }
.btn.copied::after { display: none; }
.pill {
  padding: 10px 18px;
  background: rgba(114, 255, 226, 0.08);
  box-shadow: 0 0 24px rgba(114, 255, 226, 0.08);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}
.pill.ghost { background: rgba(255, 255, 255, 0.03); }
@keyframes shimmer {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}
@keyframes clickPop {
  0% { transform: scale(1); }
  50% { transform: scale(0.96); }
  100% { transform: scale(1); }
}
.glow-button.clicked { animation: clickPop 260ms ease; }

/* ============ 表单 ============ */
.form-card { display: grid; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
label { display: grid; gap: 8px; }
label > span {
  color: rgba(237, 243, 255, 0.78);
  font-size: 0.86rem;
  font-weight: 500;
}
input, select, textarea {
  width: 100%;
  color: var(--text);
  background: rgba(6, 9, 18, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 12px 14px;
  outline: none;
  font-family: inherit;
  font-size: 0.94rem;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(114, 255, 226, 0.3);
  box-shadow: 0 0 0 3px rgba(114, 255, 226, 0.08);
}
textarea { resize: vertical; min-height: 120px; font-family: var(--mono); font-size: 0.84rem; line-height: 1.6; }
input[type="checkbox"] { width: auto; accent-color: var(--accent); }
.helper { color: var(--muted); font-size: 0.88rem; line-height: 1.75; }

.dropzone {
  border: 2px dashed rgba(114, 255, 226, 0.3);
  border-radius: 18px;
  padding: 22px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 200ms ease;
  background: rgba(114, 255, 226, 0.03);
}
.dropzone:hover, .dropzone.drag {
  border-color: var(--accent);
  background: rgba(114, 255, 226, 0.07);
  box-shadow: 0 0 24px rgba(114, 255, 226, 0.12);
}
.dropzone .big { font-size: 24px; display: block; margin-bottom: 6px; }

/* ============ 表格 ============ */
.tbl-wrap {
  overflow-x: auto;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(5, 7, 12, 0.5);
}
.tbl { width: 100%; border-collapse: collapse; min-width: 760px; }
.tbl th {
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  white-space: nowrap;
}
.tbl td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}
.tbl tbody tr { transition: background 180ms ease; animation: rowIn 420ms ease backwards; }
.tbl tbody tr:hover { background: rgba(114, 255, 226, 0.045); box-shadow: inset 2px 0 0 var(--accent); }
.tbl tbody tr:last-child td { border-bottom: none; }
@keyframes rowIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.mono { font-family: var(--mono); font-size: 0.82rem; }
.muted { color: var(--muted); }
.op-group { display: flex; gap: 8px; flex-wrap: wrap; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.right { float: right; }

/* ============ 标签 ============ */
.tag, .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  white-space: nowrap;
}
.tag.ok, .chip-live { color: var(--ok); border-color: rgba(114, 255, 226, 0.26); background: rgba(114, 255, 226, 0.07); box-shadow: 0 0 16px rgba(114, 255, 226, 0.08); }
.tag.warn { color: var(--warn); border-color: rgba(255, 155, 107, 0.28); background: rgba(255, 155, 107, 0.07); }
.tag.bad { color: var(--bad); border-color: rgba(255, 107, 129, 0.28); background: rgba(255, 107, 129, 0.07); }
.tag.acc { color: var(--accent-2); border-color: rgba(138, 125, 255, 0.3); background: rgba(138, 125, 255, 0.08); }
.tag.grad {
  background: linear-gradient(135deg, rgba(114, 255, 226, 0.2), rgba(138, 125, 255, 0.2));
  color: var(--text);
  border-color: rgba(114, 255, 226, 0.3);
}
.chip-live { animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { opacity: .85; }
  50% { opacity: 1; box-shadow: 0 0 22px rgba(114, 255, 226, 0.16); }
}

/* ============ Key 生成结果 ============ */
.gen-result { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.gen-result .chip {
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 7px 12px;
  color: var(--accent);
  border-color: rgba(114, 255, 226, 0.24);
  background: rgba(114, 255, 226, 0.06);
  cursor: pointer;
  animation: rowIn 400ms ease backwards;
  transition: all 180ms ease;
}
.gen-result .chip:hover { box-shadow: 0 0 16px rgba(114, 255, 226, 0.22); transform: translateY(-2px); }

/* ============ 活动流 ============ */
.feed { display: grid; gap: 10px; }
.feed-item {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color 180ms ease, background 180ms ease;
}
.feed-item:hover { border-color: rgba(114, 255, 226, 0.22); background: rgba(114, 255, 226, 0.04); }
.feed-item .feed-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 4px; }
.feed-item strong { font-family: var(--display); font-size: 0.95rem; }
.feed-item small { color: var(--muted); font-size: 0.78rem; font-family: var(--mono); }
.feed-item span { color: var(--muted); font-size: 0.88rem; line-height: 1.6; }

/* ============ 代码块 ============ */
.codeblock {
  margin: 0;
  padding: 18px;
  min-height: 140px;
  border-radius: 20px;
  white-space: pre-wrap;
  word-break: break-word;
  background: linear-gradient(180deg, rgba(3, 7, 15, 0.92), rgba(11, 15, 28, 0.94));
  border: 1px solid rgba(114, 255, 226, 0.12);
  color: #dffdf6;
  font-family: var(--mono);
  font-size: 0.84rem;
  line-height: 1.7;
  overflow-x: auto;
}
pre.code {
  margin: 0;
  padding: 18px;
  border-radius: 20px;
  white-space: pre-wrap;
  word-break: break-word;
  background: linear-gradient(180deg, rgba(3, 7, 15, 0.92), rgba(11, 15, 28, 0.94));
  border: 1px solid rgba(114, 255, 226, 0.12);
  color: #dffdf6;
  font-family: var(--mono);
  font-size: 0.84rem;
  line-height: 1.7;
  overflow: auto;
  max-height: 420px;
}
code.inline {
  background: rgba(114, 255, 226, 0.08);
  border: 1px solid rgba(114, 255, 226, 0.18);
  border-radius: 6px;
  padding: 1px 7px;
  font-family: var(--mono);
  font-size: 0.82em;
  color: #a5f3e0;
}
.load-code {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(180deg, rgba(3, 7, 15, 0.92), rgba(11, 15, 28, 0.94));
  border: 1px solid rgba(114, 255, 226, 0.24);
  border-radius: 16px;
  padding: 14px 16px;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: #dffdf6;
  overflow-x: auto;
  white-space: nowrap;
  box-shadow: 0 0 20px rgba(114, 255, 226, 0.08);
}
.load-code .glow { color: var(--accent-2); text-shadow: 0 0 10px rgba(138, 125, 255, 0.6); }
.endpoint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.8rem;
  background: rgba(3, 7, 15, 0.8);
  border: 1px solid rgba(114, 255, 226, 0.18);
  border-radius: 12px;
  padding: 10px 14px;
  margin: 4px 0;
  color: #dffdf6;
  cursor: pointer;
  transition: all 200ms ease;
  max-width: 100%;
  overflow-x: auto;
  white-space: nowrap;
}
.endpoint:hover { border-color: rgba(114, 255, 226, 0.45); box-shadow: 0 0 16px rgba(114, 255, 226, 0.12); }
.endpoint .m { color: var(--muted); }

/* ============ 文档 ============ */
.doc h3 {
  font-size: 1.02rem;
  margin: 26px 0 12px;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  letter-spacing: .3px;
}
.doc h3::before {
  content: "";
  width: 26px; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(114, 255, 226, 0.6);
}
.doc h4 { font-size: 0.96rem; margin: 18px 0 8px; color: var(--accent-2); }
.doc p { margin: 9px 0; color: rgba(237, 243, 255, 0.8); }
.doc ul { margin: 8px 0 8px 22px; color: rgba(237, 243, 255, 0.8); }
.doc li { margin: 5px 0; }
.doc li::marker { color: var(--accent); }
.doc .warn-box {
  border-left: 3px solid var(--accent-3);
  background: rgba(255, 155, 107, 0.07);
  border-radius: 0 14px 14px 0;
  padding: 12px 16px;
  margin: 14px 0;
  color: #ffd9c2;
  font-size: 0.9rem;
}

/* ============ 弹窗 ============ */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 40;
}
.modal.open { display: flex; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 4, 8, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal-card {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  padding: 26px 28px;
  background: linear-gradient(180deg, rgba(16, 21, 36, 0.97), rgba(9, 13, 23, 0.97));
  border: 1px solid rgba(114, 255, 226, 0.18);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 260ms cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
  border-radius: 999px;
  border: 1px solid rgba(114, 255, 226, 0.22);
  font-size: 1.2rem;
  line-height: 1;
}
.modal-head h3 {
  font-family: var(--display);
  font-size: 1.6rem;
  margin: 10px 0 6px;
  letter-spacing: -0.02em;
}
.modal-head p { color: var(--muted); font-size: 0.9rem; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

/* ============ Toast（底部居中） ============ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(24px);
  opacity: 0;
  pointer-events: none;
  z-index: 50;
  min-width: min(92vw, 540px);
  max-width: min(92vw, 640px);
  padding: 14px 20px;
  border-radius: 18px;
  background: rgba(9, 13, 23, 0.96);
  border: 1px solid rgba(114, 255, 226, 0.18);
  box-shadow: var(--shadow);
  transition: opacity 220ms ease, transform 220ms ease;
  font-size: 0.92rem;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { border-color: rgba(255, 107, 129, 0.35); }
.toast.ok { border-color: rgba(114, 255, 226, 0.3); }

/* ============ 进场动画 ============ */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 650ms ease, transform 650ms ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }
.empty { color: var(--muted); padding: 34px; text-align: center; }
.empty .big { font-size: 30px; display: block; margin-bottom: 10px; filter: drop-shadow(0 0 14px rgba(114, 255, 226, 0.4)); }

/* ============ 滚动条 ============ */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.03); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, rgba(114, 255, 226, 0.35), rgba(138, 125, 255, 0.35)); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, rgba(114, 255, 226, 0.6), rgba(138, 125, 255, 0.6)); }

/* ============ 登录页 ============ */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  z-index: 2;
}
.auth-card {
  position: relative;
  width: min(440px, 100%);
  padding: 38px 36px 30px;
  background: linear-gradient(180deg, rgba(14, 18, 31, 0.9), rgba(10, 14, 24, 0.92));
  border: 1px solid rgba(114, 255, 226, 0.18);
  border-radius: 30px;
  box-shadow: var(--shadow);
  text-align: center;
  animation: modalIn 420ms cubic-bezier(.2, .9, .3, 1.15);
}
.auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(114, 255, 226, 0.6), transparent 30%, rgba(138, 125, 255, 0.4), transparent 70%, rgba(255, 155, 107, 0.25));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.8;
}
.auth-logo {
  width: 62px; height: 62px;
  margin: 0 auto 14px;
  border-radius: 18px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(114, 255, 226, 0.2), rgba(138, 125, 255, 0.18));
  border: 1px solid rgba(114, 255, 226, 0.3);
  box-shadow: 0 0 28px rgba(114, 255, 226, 0.28);
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--accent);
  animation: pulse 2.6s ease-in-out infinite;
}
.auth-title { font-family: var(--display); font-size: 1.9rem; font-weight: 700; letter-spacing: -.02em; }
.auth-sub { color: var(--muted); font-size: 0.88rem; margin: 6px 0 24px; }
.auth-card form { text-align: left; }
.auth-card input { margin-bottom: 14px; text-align: center; }
.auth-card .btn { width: 100%; min-height: 50px; font-size: 0.95rem; letter-spacing: 2px; }
.err-box {
  display: none;
  color: var(--bad);
  background: rgba(255, 107, 129, 0.08);
  border: 1px solid rgba(255, 107, 129, 0.3);
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 0.86rem;
  margin-bottom: 14px;
  text-align: center;
}
.err-box.show { display: block; animation: shake 400ms ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); } 75% { transform: translateX(6px); }
}
.auth-hint { color: var(--muted); font-size: 0.8rem; margin-top: 18px; text-align: center; opacity: .85; }

/* ============ 页脚 ============ */
.footer {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0 44px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  color: var(--muted);
  font-size: 0.86rem;
}
.footer strong { display: block; color: var(--text); margin-bottom: 4px; font-family: var(--display); }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a:hover { color: var(--text); }

/* ============ 移动端 / 触屏适配 ============ */
body, button, input, select, textarea, a, .btn, .pill, .tab {
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 980px) {
  .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .topbar {
    flex-wrap: wrap;
    padding: 12px 16px;
    gap: 12px;
  }
  .topbar-actions { flex-wrap: wrap; }
  .nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px 20px;
    padding-top: 4px;
    overflow-x: auto;
  }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  main { padding: 22px 16px 60px; }
  .page-head { margin-bottom: 20px; }
  .panel { padding: 18px; border-radius: 22px; }
  .btn { min-height: 48px; }          /* 触屏按钮更大 */
  .btn.mini { min-height: 38px; }
  input, select, textarea { font-size: 16px; }  /* 防 iOS 聚焦缩放 */
}

/* 小屏：表格转卡片（需要 td 带 data-label） */
@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; }
  .tbl-wrap { border: none; background: transparent; border-radius: 0; }
  .tbl { min-width: 0; }
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tbody tr {
    margin-bottom: 14px;
    padding: 8px 0;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(12, 16, 28, 0.6);
    box-shadow: var(--shadow);
  }
  .tbl tbody tr:hover { box-shadow: inset 2px 0 0 var(--accent), var(--shadow); }
  .tbl td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 9px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    text-align: right;
  }
  .tbl td:last-child { border-bottom: none; }
  .tbl td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    flex-shrink: 0;
    text-align: left;
  }
  .tbl td .op-group { justify-content: flex-end; }
  .tbl td .key-chip { max-width: 100%; overflow-x: auto; white-space: nowrap; }
}

@media (max-width: 480px) {
  .hero-copy, .hero-panel { padding: 24px 20px; }
  .metric { padding: 12px 10px; }
  .stat-card { padding: 16px 16px; }
  .stat-card .n { font-size: 1.6rem; }
  .modal .box { padding: 22px 18px; }
  .toast { font-size: 0.84rem; padding: 12px 16px; }
  .feed-item { padding: 12px 14px; }
}
