:root {
  --bg: #05080e;
  --bg-soft: #080d15;
  --panel: #0a111c;
  --panel-2: #0d1622;
  --line: #1a2434;
  --line-soft: #131c29;
  --text: #e6edf7;
  --muted: #8b9bb4;
  --muted-2: #64748b;
  --cyan: #22d3ee;
  --cyan-soft: #67e8f9;
  --blue: #3b82f6;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
}

[data-theme="light"] {
  --bg: #f5f8fc;
  --bg-soft: #ffffff;
  --panel: #ffffff;
  --panel-2: #f1f5fb;
  --line: #dbe4ef;
  --line-soft: #e8eef7;
  --text: #0d1520;
  --muted: #5a6a80;
  --muted-2: #8494a8;
  --shadow: 0 14px 40px rgba(16, 38, 70, .10);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background:
    radial-gradient(900px 460px at 12% -8%, rgba(34, 211, 238, .10), transparent 60%),
    radial-gradient(700px 420px at 92% 4%, rgba(59, 130, 246, .08), transparent 62%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--cyan-soft); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ---------------- header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  max-width: 1120px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 14px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo-mark {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(160deg, rgba(34, 211, 238, .18), rgba(34, 211, 238, .02));
  border: 1px solid rgba(34, 211, 238, .35);
  box-shadow: inset 0 0 18px rgba(34, 211, 238, .18), 0 0 22px rgba(34, 211, 238, .10);
}
.logo-mark svg { width: 22px; height: 22px; color: var(--cyan); }
.brand-name { font-weight: 800; letter-spacing: .14em; font-size: 15px; }
.header-nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav-link {
  background: none; border: 0; color: var(--muted); font-size: 14px;
  padding: 7px 12px; border-radius: 999px;
}
.nav-link:hover { color: var(--text); background: rgba(148, 163, 184, .08); }
.nav-link.active { color: var(--cyan-soft); background: rgba(34, 211, 238, .10); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
  color: var(--muted);
}
.icon-btn:hover { color: var(--text); border-color: #2d3b4f; }
.avatar-btn {
  width: 36px; height: 36px; border-radius: 50%; overflow: hidden;
  border: 1px solid #2d3b4f; background: linear-gradient(150deg, #1e293b, #0f172a);
  display: grid; place-items: center; color: var(--cyan-soft); font-weight: 700; font-size: 13px;
  padding: 0;
}
.menu-btn { display: none; }

/* ---------------- layout ---------------- */
main { max-width: 1120px; margin: 0 auto; padding: 34px 20px 70px; }
.section { margin-top: 26px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, .28);
  background: rgba(34, 211, 238, .07);
  color: var(--cyan-soft);
  font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
}
.h1 { font-size: clamp(30px, 5vw, 52px); line-height: 1.12; font-weight: 800; letter-spacing: -.02em; margin: 16px 0 14px; }
.lead { color: var(--muted); max-width: 700px; margin: 0 0 22px; font-size: 15.5px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }

/* ---------------- search ---------------- */
.search-card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.tab {
  background: transparent; border: 1px solid transparent; color: var(--muted);
  padding: 7px 14px; border-radius: 999px; font-size: 13px;
}
.tab.active { color: var(--cyan-soft); border-color: rgba(34, 211, 238, .35); background: rgba(34, 211, 238, .08); }
.search-row { display: grid; grid-template-columns: 1fr; gap: 10px; }
.search-row .btn-primary { width: 100%; }
.search-input {
  flex: 1; height: 52px; padding: 0 16px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px;
  color: var(--text); font-size: 14.5px; outline: none;
}
.search-input:focus { border-color: rgba(34, 211, 238, .55); box-shadow: 0 0 0 3px rgba(34, 211, 238, .10); }
.btn {
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  border-radius: 12px; padding: 0 18px; height: 44px; font-size: 14px;
}
.btn:hover { border-color: #2d3b4f; }
.btn-primary {
  border: 1px solid rgba(34, 211, 238, .5);
  background: linear-gradient(100deg, #22d3ee, #3b82f6);
  color: #04121b; font-weight: 700;
  box-shadow: 0 10px 30px rgba(34, 211, 238, .22);
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; filter: none; }
.btn-lg { height: 52px; width: 100%; font-size: 15px; border-radius: 12px; }
.btn-ghost { background: transparent; }
.btn-danger { border-color: rgba(248, 113, 113, .35); color: #fca5a5; background: rgba(248, 113, 113, .06); }
.docs-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; color: var(--muted); font-size: 12.5px; }

/* ---------------- panels / stats ---------------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-title { font-size: 15px; font-weight: 700; white-space: nowrap; }
.status-dot { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-size: 12px; }
.status-dot i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); display: inline-block; }

.stats-panel { margin-top: 22px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-soft); border-radius: 12px; overflow: hidden; }
.stat { background: var(--panel); padding: 14px 16px; }
.stat-label { color: var(--muted); font-size: 12px; }
.stat-value { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
.stat-value span { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 3px; }

/* ---------------- hot list ---------------- */
.hot-panel { margin-top: 22px; }
.hot-row {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  background: transparent; border: 0; border-top: 1px solid var(--line-soft);
  padding: 11px 2px; color: var(--text); font-size: 13.5px;
}
.hot-row:first-of-type { border-top: 0; }
.hot-row:hover { background: rgba(148, 163, 184, .05); }
.hot-idx { width: 20px; color: var(--muted-2); font-weight: 700; font-size: 12px; }
.hot-q { flex: 1; font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hot-count { color: var(--muted-2); font-size: 12px; }

/* ---------------- features ---------------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feature { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.feature h3 { margin: 10px 0 6px; font-size: 14.5px; }
.feature p { margin: 0; color: var(--muted); font-size: 13px; }
.feature-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(34, 211, 238, .08); border: 1px solid rgba(34, 211, 238, .25); color: var(--cyan); font-size: 15px; }

/* ---------------- forms ---------------- */
.auth-wrap { max-width: 460px; margin: 40px auto 0; }
.form-field { margin-bottom: 14px; }
.form-field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.input {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 11px;
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--text); outline: none; font-size: 14px;
}
.input:focus { border-color: rgba(34, 211, 238, .55); }
textarea.input { height: auto; padding: 12px 14px; min-height: 110px; resize: vertical; line-height: 1.6; }
.form-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 13px; }

/* ---------------- account ---------------- */
.account-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.profile-card { display: flex; flex-direction: column; gap: 14px; }
.profile-top { display: flex; align-items: center; gap: 14px; }
.big-avatar {
  width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center;
  background: linear-gradient(150deg, #1e293b, #0b1220);
  border: 1px solid #2d3b4f; color: var(--cyan-soft);
  font-weight: 800; font-size: 22px; position: relative;
}
.id-badge { position: absolute; right: -6px; bottom: -6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #0b1220; border: 1px solid rgba(34, 211, 238, .5); color: var(--cyan); font-size: 11px; }
.profile-name { font-size: 19px; font-weight: 800; }
.profile-sub { color: var(--muted-2); font-size: 12px; letter-spacing: .06em; }
.meta-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line-soft); background: var(--panel-2); border-radius: 11px; font-size: 13.5px; }
.meta-row .k { color: var(--muted); }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid rgba(52, 211, 153, .3); color: var(--green); background: rgba(52, 211, 153, .08); }
.tag.warn { color: var(--amber); border-color: rgba(251, 191, 36, .3); background: rgba(251, 191, 36, .08); }
.points-value { font-size: 40px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.points-value span { font-size: 13px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.key-box { display: flex; gap: 8px; align-items: center; }
.key-box code { flex: 1; font-size: 12.5px; padding: 10px 12px; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--line); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tabbar { display: flex; gap: 8px; border-bottom: 1px solid var(--line-soft); margin: 22px 0 0; }
.tabbar button { background: none; border: 0; color: var(--muted); padding: 10px 4px; margin-right: 16px; font-size: 13.5px; border-bottom: 2px solid transparent; }
.tabbar button.active { color: var(--cyan-soft); border-color: var(--cyan); }

/* ---------------- table ---------------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; color: var(--muted-2); font-weight: 600; font-size: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
tr:hover td { background: rgba(148, 163, 184, .05); }
.td-mono { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--cyan-soft); font-size: 12.5px; }
.td-title { max-width: 340px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { padding: 30px; text-align: center; color: var(--muted-2); font-size: 13px; }
.chip { display: inline-block; padding: 2px 7px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); font-size: 11px; margin: 0 4px 4px 0; }

/* ---------------- result ---------------- */
.result-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.result-query { font-size: 26px; font-weight: 800; letter-spacing: -.01em; word-break: break-all; }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 18px; }
.summary-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.summary-card .k { color: var(--muted); font-size: 12px; }
.summary-card .v { font-size: 22px; font-weight: 800; margin-top: 3px; }
.notice-bar { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 11px; background: rgba(34, 211, 238, .06); border: 1px solid rgba(34, 211, 238, .18); color: var(--muted); font-size: 12.5px; margin-top: 16px; }

/* loading */
.loading-wrap { padding: 60px 0; text-align: center; }
.spinner { width: 42px; height: 42px; margin: 0 auto 18px; border-radius: 50%; border: 2px solid rgba(34, 211, 238, .18); border-top-color: var(--cyan); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
progress { appearance: none; width: 100%; height: 4px; border-radius: 999px; background: rgba(148, 163, 184, .15); }
progress::-webkit-progress-bar { background: rgba(148, 163, 184, .15); border-radius: 999px; }
progress::-webkit-progress-value { background: linear-gradient(90deg, var(--cyan), var(--blue)); border-radius: 999px; }

/* ---------------- modal ---------------- */
.modal-mask { position: fixed; inset: 0; background: rgba(3, 7, 13, .72); backdrop-filter: blur(6px); z-index: 60; display: grid; place-items: center; padding: 20px; }
.modal { width: min(460px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: var(--shadow); }
.modal h3 { margin: 0 0 6px; font-size: 17px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--panel-2); border: 1px solid var(--line); color: var(--text); padding: 10px 18px; border-radius: 10px; font-size: 13px; z-index: 80; box-shadow: var(--shadow); }
.toast.err { border-color: rgba(248, 113, 113, .45); color: #fca5a5; }
.toast.ok { border-color: rgba(52, 211, 153, .45); color: #86efac; }

/* ---------------- docs / notice ---------------- */
.doc h2 { font-size: 19px; margin: 26px 0 10px; }
.doc h3 { font-size: 15px; margin: 18px 0 8px; }
.doc p, .doc li { color: var(--muted); font-size: 13.5px; }
.doc code { font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--panel-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; font-size: 12.5px; color: var(--cyan-soft); }
.doc pre { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 14px; overflow-x: auto; font-size: 12.5px; line-height: 1.7; color: var(--muted); }
.notice-item { padding: 16px 0; border-top: 1px solid var(--line-soft); }
.notice-item:first-child { border-top: 0; }
.notice-item h3 { margin: 0 0 6px; font-size: 14.5px; }
.notice-item p { margin: 0; color: var(--muted); font-size: 13px; white-space: pre-wrap; }

.footer { border-top: 1px solid var(--line-soft); margin-top: 50px; padding: 22px 20px 40px; color: var(--muted-2); font-size: 12px; }
.footer-inner { max-width: 1120px; margin: 0 auto; display: flex; gap: 14px; justify-content: space-between; flex-wrap: wrap; }

/* ---------------- admin ---------------- */
.admin-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.admin-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.code-cell { font-size: 12px; color: var(--cyan-soft); font-family: ui-monospace, Menlo, Consolas, monospace; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { background: var(--panel-2); border: 0; color: var(--muted); padding: 8px 14px; font-size: 12.5px; }
.seg button.active { background: rgba(34, 211, 238, .12); color: var(--cyan-soft); }

@media (max-width: 860px) {
  .feature-grid, .summary-grid, .admin-grid { grid-template-columns: repeat(2, 1fr); }
  table { min-width: 860px; }
  .header-nav { display: none; }
  .menu-btn { display: grid; }
  .header-nav.open {
    display: flex; position: absolute; top: 62px; right: 16px; left: 16px;
    flex-direction: column; gap: 2px; padding: 8px;
    background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  }
  .header-nav.open .nav-link { text-align: left; border-radius: 8px; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-value { font-size: 20px; }
}

@media (max-width: 620px) {
  .search-row { flex-direction: column; }
  .summary-grid, .admin-grid { grid-template-columns: 1fr 1fr; }
  .stat { padding: 12px; }
  .h1 { font-size: 30px; }
  .hot-q { font-size: 12px; }
}

.footer-admin{color:var(--muted);text-decoration:none;border-bottom:1px dashed transparent}
.footer-admin:hover{color:var(--accent);border-bottom-color:var(--accent)}
