/* ============================================================
   福利资源馆 · 独立站样式
   ============================================================ */

:root {
  --bg: #0b0f17;
  --bg-soft: #111726;
  --panel: #151c2c;
  --panel-2: #1a2233;
  --line: #232d42;
  --line-soft: #1c2436;
  --text: #eef2fb;
  --text-2: #9aa7c2;
  --text-3: #67748f;
  --accent: #f7b955;
  --accent-2: #ff8a4c;
  --accent-soft: rgba(247, 185, 85, 0.14);
  --ok: #38d39f;
  --err: #ff6b6b;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.75);
  --max: 1180px;
}

html[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-soft: #eef1f8;
  --panel: #ffffff;
  --panel-2: #f4f6fc;
  --line: #e1e6f0;
  --line-soft: #eef1f7;
  --text: #161c2b;
  --text-2: #5a6579;
  --text-3: #8c96a8;
  --accent: #d98a1e;
  --accent-2: #e8672e;
  --accent-soft: rgba(217, 138, 30, 0.13);
  --shadow: 0 18px 44px -22px rgba(38, 50, 76, 0.35);
}

* { box-sizing: border-box; }

/* hidden 属性优先级最高, 防止被 display 规则覆盖 */
[hidden] { display: none !important; }

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background .3s, color .3s;
}

a { color: inherit; text-decoration: none; }

/* ---------- 背景装饰 ---------- */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% -10%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% -10%, #000 0%, transparent 72%);
  opacity: .55;
}
.bg-glow {
  position: fixed;
  top: -220px; left: 50%;
  width: 780px; height: 620px;
  transform: translateX(-50%);
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle, rgba(247, 185, 85, .18), transparent 62%);
  filter: blur(10px);
}
html[data-theme="light"] .bg-glow { background: radial-gradient(circle, rgba(217, 138, 30, .16), transparent 62%); }

.app {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 22px 60px;
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  gap: 14px;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-logo {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border-radius: 13px;
  color: var(--accent);
  background: linear-gradient(150deg, var(--accent-soft), transparent);
  border: 1px solid var(--line);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 17px; font-weight: 800; letter-spacing: .2px; }
.brand-text i { font-size: 10.5px; font-style: normal; color: var(--text-3); letter-spacing: 1.6px; text-transform: uppercase; }

.header-right { display: flex; align-items: center; gap: 10px; }

.theme-btn {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text-2);
  cursor: pointer;
  transition: .2s;
}
.theme-btn:hover { color: var(--accent); border-color: var(--accent); }
.theme-btn [data-ico] { display: none; }
html[data-theme="dark"] .theme-btn [data-ico="dark"],
html:not([data-theme="light"]) .theme-btn [data-ico="dark"] { display: block; }
html[data-theme="light"] .theme-btn [data-ico="light"] { display: block; }

.btn-ask {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 0 17px; height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: .2s;
}
.btn-ask svg { color: var(--accent); }
.btn-ask:hover { border-color: var(--accent); transform: translateY(-1px); }
.btn-ask.solid {
  border: none;
  color: #201404;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 30px -12px var(--accent);
}
.btn-ask.solid:hover { filter: brightness(1.06); }
.btn-ask.full { width: 100%; justify-content: center; padding: 13px; font-size: 15px; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 46px 0 26px; }
.hero-tag {
  display: inline-block;
  font-size: 12px; font-weight: 600; letter-spacing: 1.5px;
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  margin-bottom: 20px;
}
.hero-title {
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 800;
  letter-spacing: -1px;
  margin: 0 0 16px;
  line-height: 1.08;
}
.hero-title .grad {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  max-width: 620px;
  margin: 0 auto 30px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-2);
}

/* ---------- Search (页头搜索见文件末尾「页头图标 / 搜索」) ---------- */

.hero-stats {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-top: 20px;
  font-size: 13px; color: var(--text-3);
}
.hero-stats b { color: var(--text); font-weight: 700; }
.hero-stats .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); }

/* ---------- Notice ---------- */
.notice {
  display: flex; align-items: center; gap: 9px;
  max-width: 760px;
  margin: 30px auto 0;
  padding: 12px 16px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-2);
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
}
.notice svg { flex: none; color: var(--text-3); }

/* ---------- Grid ---------- */
.grid-section { margin-top: 44px; }
.grid-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 20px;
}
.grid-head h2 { font-size: 20px; font-weight: 700; margin: 0; }
.grid-hint { font-size: 12.5px; color: var(--text-3); }

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
  min-height: 160px;
}

/* ---------- Card ---------- */
.res-card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .22s, border-color .22s, box-shadow .22s;
}
.res-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  box-shadow: var(--shadow);
}
.res-cover {
  position: relative;
  height: 130px;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, var(--panel-2), var(--bg-soft));
  color: var(--text-3);
  overflow: hidden;
}
.res-cover img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.res-cover .cover-fallback { opacity: .5; }

.res-body { display: flex; flex-direction: column; flex: 1; padding: 14px 15px 15px; gap: 8px; }
.res-title {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.res-desc {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-2);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.res-meta { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 6px; }
.res-date { font-size: 11.5px; color: var(--text-3); }
.res-actions { display: flex; gap: 8px; }

.res-btn {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 600;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text-2);
  cursor: pointer;
  font-family: inherit;
  transition: .18s;
  white-space: nowrap;
}
.res-btn:hover { color: var(--text); border-color: var(--text-3); }
.res-btn.primary {
  border: none;
  color: #201404;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.res-btn.primary:hover { filter: brightness(1.06); }

/* ---------- Skeleton ---------- */
.sk {
  height: 236px;
  border-radius: var(--radius);
  background: linear-gradient(100deg, var(--panel) 30%, var(--panel-2) 50%, var(--panel) 70%);
  background-size: 220% 100%;
  animation: shimmer 1.3s infinite linear;
  border: 1px solid var(--line-soft);
}
@keyframes shimmer { 0% { background-position: 140% 0; } 100% { background-position: -40% 0; } }

/* ---------- Empty ---------- */
.empty {
  text-align: center;
  padding: 60px 20px;
}
.empty-ico { color: var(--text-3); opacity: .5; margin-bottom: 16px; }
.empty h3 { font-size: 17px; margin: 0 0 8px; }
.empty p { font-size: 13.5px; color: var(--text-2); margin: 0 0 20px; }
.hidden { display: none !important; }

/* ---------- Pager ---------- */
.pager {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin-top: 34px;
}
.pager-btn {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text-2);
  cursor: pointer;
  transition: .18s;
}
.pager-btn:hover:not(:disabled) { color: var(--text); border-color: var(--accent); }
.pager-btn:disabled { opacity: .35; cursor: not-allowed; }
.pager-info { font-size: 13.5px; color: var(--text-2); }
.pager-input {
  width: 46px;
  text-align: center;
  font-family: inherit;
  font-size: 13.5px;
  padding: 7px 4px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  margin: 0 3px;
}
.pager-input:focus { outline: none; border-color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 70px;
  padding-top: 26px;
  border-top: 1px solid var(--line-soft);
  text-align: center;
}
.footer-row {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 13px; color: var(--text-2);
  margin-bottom: 12px;
}
.footer-row b { color: var(--text); }
.footer-row .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); }
.footer-note { max-width: 640px; margin: 0 auto; font-size: 11.5px; line-height: 1.7; color: var(--text-3); }

/* ---------- Modal base ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  padding: 20px;
  background: rgba(4, 7, 13, .7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-close {
  position: absolute; top: 14px; right: 14px;
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text-2);
  cursor: pointer;
  z-index: 2;
  transition: .18s;
}
.modal-close:hover { color: var(--text); border-color: var(--err); }

/* ---------- QR modal ---------- */
.qr-card {
  position: relative;
  display: grid;
  grid-template-columns: 300px 300px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  animation: pop .24s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.qr-left { padding: 30px 26px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.qr-kicker { font-size: 11px; letter-spacing: 1.4px; color: var(--accent); font-weight: 700; text-transform: uppercase; }
.qr-title { font-size: 17px; font-weight: 700; margin: 8px 0 20px; }
.qr-box {
  width: 190px; height: 190px;
  display: grid; place-items: center;
  background: #fff;
  border-radius: 14px;
  padding: 12px;
}
.qr-box svg { width: 100%; height: 100%; display: block; }
.qr-fallback { font-size: 12px; color: #333; text-align: center; line-height: 1.5; }
.qr-name { font-size: 13px; font-weight: 600; color: var(--text-2); margin-top: 16px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qr-tip { font-size: 11.5px; color: var(--text-3); margin-top: 8px; }
.qr-right { background: var(--bg-soft); border-left: 1px solid var(--line-soft); display: grid; place-items: center; padding: 16px; }
.qr-right img { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; }

/* ---------- Ask modal ---------- */
.ask-card {
  position: relative;
  width: min(460px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 30px 28px 26px;
  box-shadow: var(--shadow);
  animation: pop .24s cubic-bezier(.2,.9,.3,1.2);
}
.ask-head { text-align: center; margin-bottom: 22px; }
.ask-emoji { font-size: 34px; line-height: 1; margin-bottom: 10px; }
.ask-head h3 { font-size: 20px; margin: 0 0 8px; }
.ask-head p { font-size: 13px; color: var(--text-2); margin: 0; line-height: 1.6; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.field span i { color: var(--accent-2); font-style: normal; }
.field input, .field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 14px;
  transition: .18s;
  resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: var(--panel); }
.ask-foot { text-align: center; font-size: 12px; color: var(--text-3); margin: 14px 0 0; }
.ask-foot b { color: var(--accent); }

/* ---------- Toast ---------- */
.toast-wrap {
  position: fixed; left: 50%; bottom: 30px;
  transform: translateX(-50%);
  z-index: 90;
  display: flex; flex-direction: column; gap: 8px;
  align-items: center;
}
.toast {
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: pop .2s ease;
  max-width: 90vw;
}
.toast.ok { border-color: color-mix(in srgb, var(--ok) 55%, var(--line)); }
.toast.ok::before { content: '✓ '; color: var(--ok); }
.toast.err { border-color: color-mix(in srgb, var(--err) 55%, var(--line)); }
.toast.err::before { content: '! '; color: var(--err); }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .app { padding: 0 15px 46px; }
  .hero { padding: 30px 0 18px; }
  .hero-sub { font-size: 14px; }
  .resource-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .res-cover { height: 108px; }
  .res-body { padding: 11px 12px 12px; gap: 6px; }
  .res-title { font-size: 13px; }
  .res-actions { width: 100%; }
  .res-btn { flex: 1; justify-content: center; }
  .res-date { display: none; }
  .qr-card { grid-template-columns: 1fr; width: min(340px, 100%); }
  .qr-right { display: none; }
  .brand-text i { display: none; }
  .btn-ask span { display: none; }
  .btn-ask { padding: 0 13px; }
  .btn-ask.full span, .btn-ask.solid span { display: inline; }
  .admin-bar { align-items: stretch; }
  .admin-bar-tools { width: 100%; }
  .admin-input { flex: 1 1 auto; min-width: 0; }
  .admin-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .ac-banner { height: 96px; }
  .ac-name { font-size: 13px; }
  .ac-foot { flex-wrap: wrap; }
  .mini-btn { flex: 1 1 42%; }
  .edit-card { padding: 22px 18px 18px; }
}

/* ============================================================
   管理端 (admin.html)
   ============================================================ */
.muted { color: var(--text-3); font-size: 13px; font-weight: 500; }

/* ---- 登录 / 初始化 ---- */
.panel-card {
  width: min(420px, 100%);
  margin: 34px auto 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 32px 30px 28px;
  box-shadow: var(--shadow);
  animation: pop .24s cubic-bezier(.2,.9,.3,1.2);
}
.panel-head { text-align: center; margin-bottom: 22px; }
.panel-head h2 { font-size: 21px; margin: 0 0 8px; }
.panel-head p { font-size: 13px; color: var(--text-2); margin: 0; line-height: 1.6; }
.panel-foot { text-align: center; font-size: 12.5px; color: var(--err); margin: 14px 0 0; min-height: 16px; }

/* ---- 顶部工具条 ---- */
.admin-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  margin: 6px 0 20px;
}
.admin-bar-title { display: flex; align-items: baseline; gap: 10px; }
.admin-bar-title h1 { font-size: 22px; margin: 0; letter-spacing: -.3px; }
.admin-bar-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-input {
  height: 42px; min-width: 180px;
  font-family: inherit; font-size: 14px; color: var(--text);
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 0 14px;
  transition: .18s;
}
.admin-input::placeholder { color: var(--text-3); }
.admin-input:focus { outline: none; border-color: var(--accent); }
.admin-input.select {
  min-width: 120px; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239aa7c2' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

/* ---- 资源卡片 ---- */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.admin-card {
  display: flex; flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  transition: transform .18s, border-color .18s;
}
.admin-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-2px); }
.admin-card[data-status="off"] { opacity: .62; }
.ac-banner {
  position: relative; height: 118px; overflow: hidden;
  background: linear-gradient(135deg, var(--panel-2), var(--bg-soft));
}
.ac-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ac-fallback { display: grid; place-items: center; height: 100%; color: var(--text-3); }
.status-pill {
  position: absolute; top: 10px; left: 10px;
  font-size: 11px; font-weight: 700; letter-spacing: .3px;
  padding: 4px 10px; border-radius: 999px;
}
.status-pill.on { color: #06331f; background: color-mix(in srgb, var(--ok) 82%, #000 3%); }
.status-pill.off { color: var(--text); background: color-mix(in srgb, #64748b 62%, transparent); }
.ac-body { padding: 13px 15px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ac-name {
  font-size: 15px; font-weight: 700; margin: 0; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ac-url { font-size: 12px; color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-url:hover { text-decoration: underline; }
.ac-desc {
  font-size: 12.5px; color: var(--text-2); margin: 0; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ac-date { font-size: 11.5px; color: var(--text-3); margin-top: auto; padding-top: 4px; }
.ac-foot { display: flex; gap: 8px; padding: 11px 13px; border-top: 1px solid var(--line-soft); }
.mini-btn {
  flex: 1; height: 34px;
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--text-2);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px;
  cursor: pointer; transition: .16s;
}
.mini-btn:hover { color: var(--text); border-color: var(--accent); }
.mini-btn.danger:hover { color: #fff; background: var(--err); border-color: var(--err); }

.admin-sk { height: 250px; border-radius: 18px; }
.admin-empty { grid-column: 1 / -1; text-align: center; padding: 64px 20px; color: var(--text-2); }
.admin-empty p { margin: 0; }

/* ---- 编辑弹窗 ---- */
.edit-card {
  position: relative;
  width: min(520px, 100%);
  max-height: 92vh; overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px 28px 24px;
  box-shadow: var(--shadow);
  animation: pop .24s cubic-bezier(.2,.9,.3,1.2);
}
.edit-heading { font-size: 19px; margin: 0 0 18px; }

/* ---- 快速解析 ---- */
.parse-box {
  background: var(--panel-2);
  border: 1px dashed color-mix(in srgb, var(--accent) 48%, var(--line));
  border-radius: 14px;
  padding: 13px 14px;
  margin-bottom: 18px;
}
.parse-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 9px; }
.parse-title { font-size: 13px; font-weight: 700; color: var(--accent); }
.parse-sub { font-size: 11.5px; color: var(--text-3); }
.parse-box textarea {
  width: 100%; font-family: inherit; font-size: 13px; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; resize: vertical; line-height: 1.5;
}
.parse-box textarea:focus { outline: none; border-color: var(--accent); }
.parse-hint { font-size: 12px; color: var(--text-3); margin-top: 9px; min-height: 16px; line-height: 1.55; }
.parse-hint b { color: var(--text); font-weight: 700; }
.parse-hint.ok { color: var(--ok); }
.parse-hint.ok b { color: var(--ok); }
.parse-hint.warn { color: var(--accent); }
.parse-hint.err { color: var(--err); }
.parse-hint span { color: var(--err); }

.edit-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

/* ---- Tabs ---- */
.admin-tabs { display: flex; gap: 8px; margin: 4px 0 18px; }
.tab {
  position: relative;
  height: 38px; padding: 0 18px;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--text-2);
  background: var(--panel); border: 1px solid var(--line); border-radius: 11px;
  cursor: pointer; transition: .16s;
}
.tab:hover { color: var(--text); border-color: var(--accent); }
.tab.active { color: #201404; background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; }
.tab-badge {
  display: inline-block; min-width: 18px; height: 18px; line-height: 18px;
  margin-left: 4px; padding: 0 6px; border-radius: 999px;
  font-size: 11px; font-weight: 700; color: #fff; background: var(--err);
  vertical-align: middle;
}
.tab.active .tab-badge { color: #b42318; background: #fff; }

/* ---- 选择 ---- */
.bulk-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); cursor: pointer; user-select: none; }
.bulk-check input { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }
.card-check {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  display: grid; place-items: center; width: 24px; height: 24px;
  background: rgba(0, 0, 0, .35); border-radius: 7px; cursor: pointer;
}
.card-check input { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }

/* ---- 求资源列表 ---- */
.req-list { display: flex; flex-direction: column; gap: 10px; }
.req-item {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 16px;
}
.req-item:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.req-main { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.req-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.req-name { font-size: 15px; font-weight: 700; }
.req-pill { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.req-pill.pending { color: #8a5a00; background: color-mix(in srgb, var(--accent) 26%, transparent); }
.req-pill.added { color: #0a5c40; background: color-mix(in srgb, var(--ok) 26%, transparent); }
.req-pill.ignored { color: var(--text-2); background: var(--panel-2); border: 1px solid var(--line); }
.req-pill.vis { color: #0a5c40; background: color-mix(in srgb, var(--ok) 18%, transparent); }
.req-pill.novis { color: var(--text-3); background: var(--panel-2); border: 1px solid var(--line); }
.req-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); }
.req-meta .req-note { max-width: 460px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.req-meta .req-time { color: var(--text-3); }
.req-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.req-actions .mini-btn { flex: 0 0 auto; padding: 0 12px; height: 32px; }
.mini-select {
  height: 32px; padding: 0 26px 0 10px;
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--text-2);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px;
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239aa7c2' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
}
.req-empty, .bulk-empty { text-align: center; padding: 44px 20px; color: var(--text-3); font-size: 13.5px; }

/* ---- 批量解析 ---- */
.bulk-tip { font-size: 12.5px; color: var(--text-2); line-height: 1.6; margin: 0 0 14px; }
.bulk-tip b { color: var(--accent); }
#bulk-input {
  width: 100%; font-family: inherit; font-size: 13px; color: var(--text);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; resize: vertical; line-height: 1.55;
}
#bulk-input:focus { outline: none; border-color: var(--accent); }
.bulk-actions { display: flex; justify-content: flex-end; margin: 12px 0; }
.bulk-preview { display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow-y: auto; }
.bulk-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel-2); border: 1px solid var(--line-soft);
  border-radius: 10px; padding: 9px 12px;
}
.bulk-item-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.bulk-item-title { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bulk-item-url { font-size: 11.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bulk-provider { flex-shrink: 0; font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 3px 8px; border-radius: 999px; }
.bulk-remove {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 7px;
  border: 1px solid var(--line); background: transparent; color: var(--text-3);
  font-size: 16px; line-height: 1; cursor: pointer; transition: .16s;
}
.bulk-remove:hover { color: #fff; background: var(--err); border-color: var(--err); }
.bulk-count { margin-right: auto; }

@media (max-width: 720px) {
  .req-item { flex-direction: column; align-items: stretch; }
  .req-actions { flex-wrap: wrap; }
  .req-actions .mini-btn { flex: 1 1 auto; }
  .req-meta .req-note { max-width: 100%; }
  .admin-tabs { overflow-x: auto; }
}

/* ---- 前端: 求资源墙 ---- */
.req-board { margin-top: 40px; }
.req-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.req-chip {
  max-width: 100%;
  height: 38px; padding: 0 16px;
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--text-2);
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
  cursor: pointer; transition: .16s;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.req-chip:hover { color: var(--text); border-color: var(--accent); transform: translateY(-1px); }

/* ================= 页头图标 / 搜索 ================= */
.icon-btn {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text-2);
  cursor: pointer; text-decoration: none;
  position: relative;
  transition: .18s;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }

a.btn-ask { text-decoration: none; }
.ask-btn { position: relative; }
.ask-btn .bell-dot {
  position: absolute; top: -4px; right: -4px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--err);
  box-shadow: 0 0 0 2px var(--bg);
  animation: dot-pulse 1.6s infinite;
}
@keyframes dot-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.25); } }

.hsearch {
  display: flex; align-items: center; gap: 7px;
  height: 40px; padding: 0;
  border-radius: 12px;
  border: 1px solid transparent;
  background: var(--panel);
  width: 0; opacity: 0; overflow: hidden;
  pointer-events: none;
  transition: width .22s ease, opacity .18s ease, padding .22s ease, border-color .18s ease, box-shadow .18s ease;
}
.hsearch.open {
  width: 224px; opacity: 1; pointer-events: auto;
  padding: 0 12px;
  border-color: var(--line);
}
.hsearch:focus-within {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.hsearch-ico { flex: none; color: var(--text-3); }
.hsearch input {
  width: 100%; min-width: 0; padding: 0;
  border: none; outline: none; background: transparent;
  color: var(--text); font: inherit; font-size: 14px; line-height: 1.4;
}
.hsearch input::placeholder { color: var(--text-3); }
.hsearch input::-webkit-search-cancel-button,
.hsearch input::-webkit-search-decoration,
.hsearch input::-webkit-search-results-button,
.hsearch input::-webkit-search-results-decoration { -webkit-appearance: none; appearance: none; }
.hsearch-clear {
  flex: none; display: grid; place-items: center;
  width: 22px; height: 22px; border-radius: 7px;
  border: none; background: var(--panel-2); color: var(--text-2); cursor: pointer;
}
.hsearch-clear:hover { color: var(--text); }

.hero-stats a, .hero-ask { color: var(--accent); text-decoration: none; font-weight: 600; }
.hero-stats a:hover { text-decoration: underline; }

/* ================= 管理端: 数据概览 ================= */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 4px 0 18px; }
.stat-card {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 18px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
}
.stat-num { font-size: 26px; font-weight: 800; line-height: 1.1; }
.stat-label { font-size: 12.5px; color: var(--text-3); }
.stat-card.accent {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: linear-gradient(150deg, var(--accent-soft), var(--panel));
}
.stat-card.accent .stat-num { color: var(--accent); }

/* 管理端: 求资源回复 */
.req-reply {
  margin-top: 10px; padding: 10px 12px; border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
}
.req-reply b { font-size: 12px; color: var(--accent); }
.req-reply p { margin: 4px 0 0; font-size: 13px; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.req-unread {
  font-size: 10px; font-weight: 700; color: #fff; background: var(--err);
  padding: 1px 7px; border-radius: 999px; margin-left: 4px; vertical-align: middle;
}

@media (max-width: 720px) {
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
}

/* ================= 求资源页 ================= */
.req-hero .btn-ask { margin-top: 6px; }
.req-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.wall-item {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 16px;
  transition: .16s;
}
.wall-item:hover { border-color: color-mix(in srgb, var(--accent) 42%, var(--line)); transform: translateY(-2px); }
.wall-item-title { font-size: 15px; font-weight: 700; word-break: break-word; }
.wall-item-note { margin: 7px 0 0; font-size: 13px; color: var(--text-2); line-height: 1.55; word-break: break-word; }
.wall-item-meta { margin-top: 10px; font-size: 11.5px; color: var(--text-3); }

.my-item {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px;
}
.my-item.has-reply { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.my-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.my-title { font-size: 15px; font-weight: 700; word-break: break-word; }
.my-status { flex: none; font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.my-status.pending { color: #8a5a00; background: color-mix(in srgb, var(--accent) 26%, transparent); }
.my-status.added { color: #0a5c40; background: color-mix(in srgb, var(--ok) 24%, transparent); }
.my-status.ignored { color: var(--text-2); background: var(--panel-2); border: 1px solid var(--line); }
.my-reply {
  margin-top: 12px; padding: 12px 14px; border-radius: 11px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
}
.my-reply b { font-size: 12px; color: var(--accent); }
.my-reply p { margin: 5px 0 0; font-size: 13.5px; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.my-reply-time { display: block; margin-top: 6px; font-size: 11.5px; color: var(--text-3); }
.my-wait { margin-top: 10px; font-size: 12.5px; color: var(--text-3); }

@media (max-width: 560px) {
  .site-header.searching .brand { display: none; }
  .site-header.searching .ask-btn,
  .site-header.searching .theme-btn { display: none; }
  .hsearch.open { flex: 1; width: 150px; }
  .site-header.searching .hsearch.open { width: auto; }
}

@media (max-width: 480px) {
  .hsearch.open { width: 150px; }
  .brand-text i { display: none; }
}

