/* 万象秘笈资源 —— 上下结构
   造型：顶部站名 → 居中大标题与搜索 → 清单面板（电脑两列卡片 / 手机单列）→ 意见建议区
   光效：顶部白光 + 细网格 + 实体按钮光影 + 卡片扫光 + 二维码浮层投影
   固定一套配色；仅系统字体，无外部依赖，离线可用 */

:root {
  --bg: #e9edf5;
  --ink: #172038;
  --ink-2: #4c5872;
  --muted: #7c879d;
  --line: rgba(23, 32, 56, .13);
  --line-soft: rgba(23, 32, 56, .07);
  --accent: #3a5bd9;
  --accent-deep: #2f4fc4;
  --on-accent: #ffffff;
  --glass: rgba(255, 255, 255, .55);
  --glass-strong: rgba(255, 255, 255, .86);
  --highlight: rgba(255, 255, 255, .92);
  --sheen: rgba(255, 255, 255, .8);
  --ok: #12a05c;
  --warn: #b8720c;
  --blur: 20px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* 光效层：一束顶部白光 + 左下冷光 + 极淡细网格 */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(1100px 460px at 62% -14%, rgba(255, 255, 255, .9), transparent 72%),
    radial-gradient(760px 520px at 4% 104%, rgba(120, 158, 255, .18), transparent 70%),
    linear-gradient(rgba(23, 32, 56, .032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 32, 56, .032) 1px, transparent 1px);
  background-size: auto, auto, 46px 46px, 46px 46px;
}

a { color: inherit; }
button, input { font-family: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ===== 顶栏 ===== */
.topbar {
  position: sticky; top: 0; z-index: 30;
  height: 62px; padding: 0 clamp(18px, 4vw, 44px);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(150%);
  backdrop-filter: blur(var(--blur)) saturate(150%);
  border-bottom: 1px solid var(--highlight);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .45), 0 6px 26px rgba(30, 50, 100, .05);
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.mark { width: 30px; height: 30px; flex: 0 0 auto; }
.brand strong { font-size: 15px; font-weight: 650; letter-spacing: .01em; white-space: nowrap; }
.top-right { display: flex; align-items: center; gap: 16px; flex: 0 0 auto; }
.net { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--ink-2); }
.dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 3px rgba(18, 160, 92, .14); flex: 0 0 auto;
}
.dot.is-offline { background: var(--warn); box-shadow: 0 0 0 3px rgba(184, 114, 12, .14); }
.install {
  height: 34px; display: flex; align-items: center; gap: 7px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--glass-strong); color: var(--ink);
  font-size: 12px; font-weight: 600; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}
.install:hover { border-color: var(--accent); }
.install svg { width: 14px; height: 14px; flex: 0 0 auto; }

/* ===== 上部：标题与搜索 ===== */
.wrap {
  position: relative; z-index: 1;
  max-width: 1160px; margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 40px) 64px;
}
.hero { text-align: center; padding: clamp(46px, 7vw, 86px) 0 clamp(32px, 4.5vw, 52px); }
.eyebrow {
  margin: 0 0 20px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  font: 650 10px/1 var(--mono); letter-spacing: .26em; color: var(--muted);
}
.eyebrow::before, .eyebrow::after { content: ""; width: 28px; height: 1px; background: var(--line); }
.display {
  margin: 0;
  font-size: clamp(40px, 6.4vw, 78px);
  line-height: 1.06; font-weight: 650; letter-spacing: -.055em;
  text-shadow: 0 1px 0 var(--highlight);
}
.display .period { color: var(--accent); }

.search-box {
  display: flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 15px;
  margin: clamp(28px, 3.5vw, 40px) auto 0; max-width: 560px;
  background: var(--glass-strong); border: 1px solid var(--highlight); border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 10px 28px rgba(30, 50, 100, .10);
  -webkit-backdrop-filter: blur(var(--blur)); backdrop-filter: blur(var(--blur));
  transition: border-color .2s ease, box-shadow .2s ease;
}
.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: inset 0 1px 0 #fff, 0 0 0 3px rgba(58, 91, 217, .13), 0 10px 28px rgba(30, 50, 100, .10);
}
.search-ico { width: 18px; height: 18px; fill: var(--muted); flex: 0 0 auto; }
.search-box input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font-size: 14.5px; color: var(--ink);
}
.search-box input::placeholder { color: var(--muted); }
.search-box input::-webkit-search-cancel-button { display: none; }
.search-box kbd {
  font: 500 10.5px var(--mono); color: var(--muted);
  border: 1px solid var(--line); border-radius: 4px; padding: 2px 6px; background: #fff;
}
.clear-btn {
  width: 22px; height: 22px; border: 0; border-radius: 50%;
  background: rgba(58, 91, 217, .1); color: var(--ink-2);
  font-size: 15px; line-height: 1; cursor: pointer; flex: 0 0 auto;
}

/* ===== 毛玻璃清单面板 ===== */
.sheet {
  background: var(--glass);
  border: 1px solid var(--highlight); border-radius: 20px;
  -webkit-backdrop-filter: blur(var(--blur)) saturate(150%);
  backdrop-filter: blur(var(--blur)) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 24px 60px rgba(30, 50, 100, .10);
  padding: clamp(22px, 3vw, 34px) clamp(18px, 3vw, 36px) 6px;
  overflow: hidden;
}
.index-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 0 4px 18px;
}
.index-head h2 { margin: 0; font-size: 13.5px; font-weight: 650; letter-spacing: .04em; }
.head-num { font: 500 12px var(--mono); color: var(--muted); margin-left: 8px; }
.head-meta { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* 造型：电脑两列卡片，每张卡片内部仍是目录式信息排布 */
.rows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 2px 0 10px;
}
/* 两类分区：通栏章节条（粗竖条 + 大标题 + 一句说明 + 渐隐细线 + 实体光影），两组之间留白更大 */
.group-head {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 14px;
  margin: 22px 0 2px;
  padding: 13px 16px;
  border: 1px solid var(--highlight); border-radius: 14px;
  background: rgba(255, 255, 255, .66);
  -webkit-backdrop-filter: blur(var(--blur)); backdrop-filter: blur(var(--blur));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 10px 24px rgba(30, 50, 100, .08);
}
.group-head:first-child { margin-top: 0; }
.gh-bar {
  width: 5px; height: 32px; border-radius: 3px; flex: 0 0 auto;
  background: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 4px 12px rgba(58, 91, 217, .38);
}
.gh-text { display: flex; flex-direction: column; min-width: 0; }
.group-head h3 {
  margin: 0; font-size: 19px; font-weight: 650; letter-spacing: -.025em;
  color: var(--ink); white-space: nowrap;
}
.gh-sub { margin-top: 2px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.gh-line { flex: 1 1 auto; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.row {
  position: relative; overflow: hidden;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  grid-template-areas:
    "icon main corner"
    "act  act  act";
  gap: 0 16px;
  padding: 20px 20px 18px;
  border: 1px solid var(--highlight); border-radius: 16px;
  background: rgba(255, 255, 255, .52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 8px 22px rgba(30, 50, 100, .06);
  animation: fadeIn .4s ease both;
  animation-delay: calc(var(--i, 0) * 45ms);
  transition: transform .22s ease, box-shadow .25s ease, background .25s ease;
}
.row::before {
  content: ""; position: absolute; left: 0; top: 18px; bottom: 18px;
  width: 2px; border-radius: 0 2px 2px 0; background: var(--accent);
  opacity: 0; transition: opacity .25s ease;
}
.row::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: linear-gradient(100deg, transparent 25%, var(--sheen) 50%, transparent 75%);
  background-size: 220% 100%; background-position: 180% 0;
}
.row:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, .74);
  box-shadow: inset 0 1px 0 #fff, 0 16px 34px rgba(30, 50, 100, .13);
}
.row:hover::before { opacity: 1; }
.row:hover::after { opacity: .4; animation: sweep .85s ease; }
@keyframes sweep { from { background-position: 180% 0; } to { background-position: -80% 0; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.row-icon {
  grid-area: icon; align-self: start;
  width: 72px; height: 72px; border-radius: 18px; overflow: hidden;
  display: grid; place-items: center;
  background: var(--glass-strong); border: 1px solid var(--highlight);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .98), 0 7px 16px rgba(30, 50, 100, .12);
}
.row-icon img { width: 100%; height: 100%; object-fit: contain; padding: 7px; }
.row-icon .letter {
  width: 100%; height: 100%; display: grid; place-items: center;
  font-size: 30px; font-weight: 650; color: #fff;
  background: hsl(var(--h, 220) 42% 52%);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .18);
}
.row-main { grid-area: main; min-width: 0; }
.row-main .kind {
  display: block; margin: 0 0 5px;
  font: 650 10px/1.2 var(--mono); letter-spacing: .1em; color: var(--accent);
}
.row-main h3 {
  margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -.025em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row-desc {
  margin: 7px 0 0; font-size: 12.8px; line-height: 1.72; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 3.44em;
}
/* 右上角：文件大小 + 上传时间，两行右对齐（次数只记在后台，不对外展示） */
.row-corner {
  grid-area: corner; align-self: start; justify-self: end;
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
  padding-top: 2px; text-align: right; white-space: nowrap;
}
.spec { font: 11px var(--mono); color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.date { font: 11px var(--mono); color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
/* 兜底：老缓存里的旧脚本若还渲染了下载次数，也一律不显示 */
.row-corner .dl-count { display: none; }
.row-actions { grid-area: act; display: flex; gap: 8px; margin-top: 18px; }
.row-actions .btn { flex: 1; }

/* 光效：按钮做成有厚度的实体 */
.btn {
  height: 38px; padding: 0 14px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
  text-decoration: none; cursor: pointer;
  background: var(--glass-strong); color: var(--ink); border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 2px 6px rgba(30, 50, 100, .06);
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn.solid {
  color: var(--on-accent); border: 1px solid var(--accent-deep);
  background: linear-gradient(180deg, #5271e8, var(--accent-deep));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), 0 5px 14px rgba(47, 79, 196, .3);
}
.btn.solid:hover {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .48), 0 7px 20px rgba(47, 79, 196, .42);
}
.btn .ico { width: 13px; height: 13px; opacity: .9; }

/* 空状态 / 骨架 */
.empty { grid-column: 1 / -1; padding: 70px 20px; text-align: center; color: var(--muted); border-bottom: 1px solid var(--line); }
.empty svg { width: 26px; height: 26px; stroke: var(--muted); opacity: .6; }
.empty p { margin: 12px 0 3px; font-size: 14px; color: var(--ink-2); }
.empty span { font-size: 12px; }
.row.skeleton { display: flex; align-items: center; gap: 18px; min-height: 104px; pointer-events: none; }
.row.skeleton span {
  display: block; height: 11px; border-radius: 5px;
  background: linear-gradient(90deg, var(--line-soft), var(--line), var(--line-soft));
  background-size: 200% 100%; animation: shimmer 1.5s linear infinite;
}
.row.skeleton span:nth-child(1) { width: 72px; height: 72px; border-radius: 18px; flex: 0 0 auto; }
.row.skeleton span:nth-child(2) { width: 42%; }
.row.skeleton span:nth-child(3) { width: 15%; margin-left: auto; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.foot {
  padding: 20px 4px 22px; text-align: center;
  font-size: 11px; letter-spacing: .12em; color: var(--muted);
}

/* ===== 意见 / 建议区 ===== */
.feedback {
  position: relative; z-index: 2;
  margin-top: 18px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 28px;
  padding: clamp(24px, 3vw, 34px) clamp(22px, 3vw, 36px);
  background: var(--glass);
  border: 1px solid var(--highlight); border-radius: 20px;
  -webkit-backdrop-filter: blur(var(--blur)) saturate(150%);
  backdrop-filter: blur(var(--blur)) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 20px 48px rgba(30, 50, 100, .09);
}
.fb-kicker { font: 650 10px/1 var(--mono); letter-spacing: .2em; color: var(--accent); }
.fb-head h2 { margin: 11px 0 8px; font-size: clamp(22px, 2.8vw, 30px); font-weight: 650; letter-spacing: -.035em; }
.fb-head p { margin: 0; max-width: 44ch; font-size: 13px; line-height: 1.8; color: var(--ink-2); }
.fb-right { min-width: 0; }
.fb-ways { display: flex; gap: 10px; }
.qr-trigger {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  min-width: 138px; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--glass-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 4px 12px rgba(30, 50, 100, .06);
  cursor: pointer; outline: none;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.qr-trigger:hover, .qr-trigger:focus-visible, .qr-trigger.is-open {
  transform: translateY(-2px); border-color: var(--accent);
  box-shadow: inset 0 1px 0 #fff, 0 10px 24px rgba(47, 79, 196, .18);
}
.qr-face { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 1 1 auto; }
.qr-badge {
  width: 32px; height: 32px; border-radius: 10px; flex: 0 0 auto;
  display: grid; place-items: center;
  color: #fff; font-size: 15px; font-weight: 650;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 3px 8px rgba(30, 50, 100, .16);
}
.qr-badge.wechat { background: linear-gradient(180deg, #3ed17b, #0aa957); }
.qr-badge.qq { background: linear-gradient(180deg, #ff9fb4, #ef6f8e); }
.qr-label { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.qr-label strong { font-size: 13px; font-weight: 650; }
.qr-label small { font-size: 10.5px; color: var(--muted); white-space: nowrap; }

/* 鼠标停留（或键盘聚焦 / 手机点击）时向上浮出二维码 */
.qr-pop {
  position: absolute; bottom: calc(100% + 14px); left: 50%;
  width: 208px; padding: 12px 12px 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 44px rgba(30, 50, 100, .22), inset 0 1px 0 #fff;
  transform: translate(-50%, 8px); opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
  z-index: 40;
}
.qr-pop::after {
  content: ""; position: absolute; top: 100%; left: 50%; margin-left: -7px;
  border: 7px solid transparent; border-top-color: #fff;
  filter: drop-shadow(0 2px 1px rgba(30, 50, 100, .1));
}
.qr-pop img { display: block; width: 100%; height: auto; border-radius: 8px; }
.qr-pop span { display: block; margin-top: 8px; text-align: center; font-size: 10.5px; color: var(--ink-2); }
.qr-trigger:hover .qr-pop,
.qr-trigger:focus-within .qr-pop,
.qr-trigger.is-open .qr-pop {
  opacity: 1; visibility: visible; transform: translate(-50%, 0);
}
.fb-tip { margin: 11px 0 0; text-align: right; font-size: 10.5px; color: var(--muted); }
.tip-mob { display: none; }

/* ===== 平板 / 窄屏：清单改单列，卡片形态不变 ===== */
@media (max-width: 980px) {
  .rows { grid-template-columns: 1fr; }
  .feedback { grid-template-columns: 1fr; gap: 20px; }
  .fb-right { width: 100%; }
  .fb-tip { text-align: left; }
}

/* ===== 手机：单列紧凑卡片 + 二维码点开内联展开 ===== */
@media (max-width: 720px) {
  .topbar { height: 56px; }
  .brand strong { font-size: 14px; }
  .top-right { gap: 11px; }
  .install-text { display: none; }
  .install { padding: 0 9px; }

  .wrap { padding-bottom: 40px; }
  .hero { padding: 38px 0 28px; }
  .eyebrow { font-size: 9px; letter-spacing: .2em; margin-bottom: 16px; }
  .display { font-size: clamp(34px, 9vw, 50px); }
  .search-box { height: 48px; margin-top: 24px; }
  .search-box kbd { display: none; }

  .sheet { border-radius: 16px; padding: 20px 16px 4px; }
  .rows { gap: 12px; }
  .group-head { margin-top: 18px; padding: 11px 13px; gap: 11px; }
  .gh-bar { height: 28px; }
  .group-head h3 { font-size: 16.5px; }
  .gh-sub { font-size: 10.5px; }
  .row {
    grid-template-columns: 60px minmax(0, 1fr);
    grid-template-areas:
      "icon main"
      "act  act";
    gap: 0 12px; padding: 16px 15px 15px;
    border-radius: 14px;
  }
  .row-icon { width: 60px; height: 60px; border-radius: 15px; }
  .row-icon .letter { font-size: 26px; }
  .row-main h3 { font-size: 16.5px; padding-right: 96px; }
  .row-desc { font-size: 12.4px; -webkit-line-clamp: 2; min-height: 3.44em; }
  /* 小屏右上角信息浮在标题右侧，简介仍可占满整行 */
  .row-corner { position: absolute; top: 16px; right: 15px; gap: 5px; padding-top: 0; }
  .row-corner .spec, .row-corner .date { font-size: 10px; }
  .row-actions { margin-top: 16px; }
  .row-actions .btn { height: 44px; font-size: 13px; padding: 0 10px; }

  .feedback { margin-top: 14px; border-radius: 16px; padding: 22px 18px; }
  .fb-ways { flex-direction: column; gap: 10px; }
  .qr-trigger { width: 100%; min-width: 0; }
  /* 小屏不用悬浮，点一下就在按钮下方整行展开，不会超出屏幕 */
  .qr-trigger.is-open { display: block; }
  .qr-face { display: flex; }
  .qr-pop {
    position: static; width: 240px; max-width: 100%; margin: 10px auto 2px;
    transform: none; opacity: 1; visibility: visible; display: none;
    box-shadow: 0 8px 22px rgba(30, 50, 100, .13);
  }
  .qr-pop::after { display: none; }
  /* 桌面浮层靠 translateX(-50%) 定位；手机展开要清掉，否则会往左偏半个身位 */
  .qr-trigger.is-open .qr-pop { display: block; transform: none; left: auto; }
  .tip-desk { display: none; }
  .tip-mob { display: inline; }
}

@media (max-width: 420px) {
  .brand strong { font-size: 13px; }
  .net { font-size: 11px; }
  .display { font-size: clamp(31px, 9.5vw, 42px); }
  .row-actions .btn { height: 44px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}
