/* ============================================================
   V3 · 壁纸云盘
   参照 nsthwj.cn 的资源库形态：列表 + 卡片 + 侧边筛选 + 分享区
   浅蓝白配色，信息密度高
   ============================================================ */
body.v3 {
  --ink: #16202c;
  --ink-2: #3d4a5a;
  --ink-3: #6b7889;
  --ink-4: #9aa6b5;
  --line: #e3e8ef;
  --line-2: #eef2f7;
  --bg: #ffffff;
  --bg-2: #f5f8fb;
  --bg-3: #eef3f8;
  --brand: #1e6fd9;
  --accent: #ff7a2f;
  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(22,32,44,.05);
  --shadow: 0 3px 12px rgba(22,32,44,.07);
  --shadow-lg: 0 18px 44px rgba(22,32,44,.12);
}

body.v3 { background: var(--bg); color: var(--ink); }

/* ---------- 顶栏 ---------- */
.hd {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.hd-in { display: flex; align-items: center; gap: 22px; height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.logo-ic {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), #4a9bf5); color: #fff;
  box-shadow: 0 3px 10px rgba(30,111,217,.28);
}
.logo-tx { display: flex; flex-direction: column; line-height: 1.2; }
.logo-tx b { font-size: 15px; font-weight: 700; }
.logo-tx i { font-style: normal; font-size: 10.5px; color: var(--ink-4); letter-spacing: .1em; }

.hd-search {
  flex: 1; max-width: 420px; display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 8px; background: var(--bg-2);
  border: 1px solid var(--line); color: var(--ink-4); transition: all .2s;
}
.hd-search:focus-within { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(30,111,217,.09); }
.hd-search input { flex: 1; border: none; background: none; outline: none; font-size: 13.5px; color: var(--ink); }
.hd-search input::placeholder { color: var(--ink-4); }
.hd-search kbd {
  font-size: 11px; padding: 1px 6px; border-radius: 4px;
  background: #fff; border: 1px solid var(--line); color: var(--ink-4);
  font-family: inherit;
}
.hd-right { display: flex; gap: 20px; margin-left: auto; }
.hd-nav { font-size: 14px; color: var(--ink-3); position: relative; padding: 6px 0; transition: color .2s; }
.hd-nav:hover { color: var(--ink); }
.hd-nav.on { color: var(--brand); font-weight: 600; }
.hd-nav.on::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px; background: var(--brand); border-radius: 2px;
}

/* ---------- 横幅 ---------- */
.hd-banner {
  background: linear-gradient(120deg, #0f2f5c, #1e6fd9 55%, #3f9bf7);
  color: #fff; padding: 38px 0; position: relative; overflow: hidden;
}
.hd-banner::after {
  content: ''; position: absolute; right: -60px; top: -80px;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.12), transparent 68%);
}
.bn-in { display: flex; align-items: center; gap: 40px; position: relative; z-index: 1; flex-wrap: wrap; }
.bn-l { flex: 1; min-width: 300px; }
.bn-l h1 { font-size: 30px; margin: 0 0 10px; font-weight: 700; }
.bn-l p { margin: 0 0 16px; font-size: 14.5px; opacity: .88; max-width: 560px; line-height: 1.7; }
.bn-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.bn-tags .tg {
  padding: 4px 12px; border-radius: 100px; font-size: 12.5px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.2);
}
.bn-r { display: flex; gap: 34px; flex-wrap: wrap; }
.bn-r .s b { display: block; font-size: 26px; font-weight: 700; line-height: 1.2; }
.bn-r .s span { font-size: 12px; opacity: .75; }

/* ---------- 排行 ---------- */
.rank { padding: 40px 0; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.rk-head { margin-bottom: 20px; }
.rk-head h2 { font-size: 20px; margin: 0 0 4px; font-weight: 700; }
.rk-head p { font-size: 13px; color: var(--ink-3); margin: 0; }
.rk-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 12px; }

.rk {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  transition: all .2s;
}
.rk:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); }
.rk .rk-ic {
  width: 38px; height: 38px; border-radius: 9px; flex: 0 0 38px;
  display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff;
}
.rk .rk-b { flex: 1; min-width: 0; }
.rk .rk-b b { display: block; font-size: 13.5px; }
.rk .rk-b span { font-size: 11.5px; color: var(--ink-4); }
.rk .rk-n { font-size: 12px; color: var(--ink-4); white-space: nowrap; }

/* ---------- 主体 ---------- */
.lib { padding: 32px 0 70px; }
.lib-in { display: grid; grid-template-columns: 200px 1fr; gap: 28px; align-items: start; }
.side { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 18px; }
.side-box h3 {
  font-size: 11px; letter-spacing: .14em; color: var(--ink-4);
  margin: 0 0 9px; text-transform: uppercase; font-weight: 700;
}
.side-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; text-align: left; padding: 7px 10px; border-radius: 7px;
  font-size: 13.5px; color: var(--ink-2); transition: all .16s;
}
.side-item:hover { background: var(--bg-2); }
.side-item.on { background: rgba(30,111,217,.09); color: var(--brand); font-weight: 600; }
.side-item .n { font-size: 11.5px; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.sel {
  width: 100%; padding: 8px 10px; border-radius: 8px; font-size: 13px;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--ink-2);
  outline: none; cursor: pointer;
}
.sel:focus { border-color: var(--brand); }

.main-hd { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.main-tabs { display: flex; gap: 4px; background: var(--bg-2); padding: 3px; border-radius: 9px; }
.mt {
  padding: 6px 15px; border-radius: 7px; font-size: 13.5px; color: var(--ink-3);
  transition: all .16s;
}
.mt:hover { color: var(--ink); }
.mt.on { background: #fff; color: var(--brand); font-weight: 600; box-shadow: var(--shadow-sm); }
.main-n { margin-left: auto; font-size: 12.5px; color: var(--ink-4); }

/* 资源卡片 */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 14px; }
.rc {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; cursor: zoom-in; transition: all .22s;
  display: flex; flex-direction: column;
}
.rc:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-3px); }
.rc-thumb { position: relative; aspect-ratio: 3/4; background: var(--bg-3); overflow: hidden; }
.rc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rc-badges { position: absolute; top: 7px; left: 7px; right: 7px; display: flex; gap: 5px; }
.bdg {
  padding: 2px 7px; border-radius: 5px; font-size: 10.5px; font-weight: 600;
  background: rgba(22,32,44,.72); color: #fff; backdrop-filter: blur(4px);
}
.bdg.blue { background: var(--brand); }
.bdg.orange { background: var(--accent); }
.rc-bd { padding: 9px 11px 11px; }
.rc-name {
  font-size: 12px; color: var(--ink-2); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; margin-bottom: 5px;
}
.rc-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.rc-tag {
  font-size: 10.5px; padding: 1.5px 6px; border-radius: 4px;
  background: var(--bg-2); color: var(--ink-4); border: 1px solid var(--line-2);
}
.rc-tag.pwd { background: rgba(30,111,217,.08); color: var(--brand); border-color: transparent; font-family: ui-monospace, Menlo, monospace; letter-spacing: .1em; }

/* 合集卡片 */
.colcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.cc {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: all .22s;
}
.cc:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.cc-hd {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border-bottom: 1px solid var(--line-2);
}
.cc-hd .ic {
  width: 32px; height: 32px; border-radius: 8px; flex: 0 0 32px;
  display: grid; place-items: center; font-size: 11.5px; font-weight: 700;
  background: linear-gradient(135deg, var(--brand), #4a9bf5); color: #fff;
}
.cc-hd .tx { flex: 1; min-width: 0; }
.cc-hd .tx b { display: block; font-size: 13.5px; }
.cc-hd .tx span { font-size: 11.5px; color: var(--ink-4); }
.cc-thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; background: var(--line-2); }
.cc-thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.cc-thumbs .mt-t {
  aspect-ratio: 1; display: grid; place-items: center; background: var(--bg-3);
  font-size: 11px; color: var(--ink-4); font-weight: 600;
}
.cc-ft { padding: 12px 14px; }

/* 分享区 —— 借鉴 nsthwj.cn */
.share {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px; border-radius: 9px; background: var(--bg-2);
  border: 1px solid var(--line);
}
.share-ic {
  width: 30px; height: 30px; border-radius: 7px; flex: 0 0 30px;
  display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #2b7fff, #1e6fd9);
}
.share-b { flex: 1; min-width: 0; }
.share-b b { display: block; font-size: 12.5px; }
.share-b span { font-size: 11px; color: var(--ink-4); }
.share-a { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }

.pwd-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 9px; border-radius: 6px; font-size: 11.5px;
  background: #fff; border: 1px dashed var(--brand); color: var(--ink-3);
  cursor: pointer; transition: all .18s;
}
.pwd-chip:hover { background: rgba(30,111,217,.06); }
.pwd-chip b { color: var(--brand); font-family: ui-monospace, Menlo, monospace; letter-spacing: .14em; }
.pwd-chip.ok { border-style: solid; border-color: #16a34a; background: #f0fdf4; }
.pwd-chip.ok b { color: #16a34a; }

.btn-go {
  padding: 6px 13px; border-radius: 7px; font-size: 12px; font-weight: 600;
  background: var(--brand); color: #fff; transition: all .2s;
}
.btn-go:hover { filter: brightness(1.08); box-shadow: 0 4px 12px rgba(30,111,217,.3); }

/* ---------- 关于 ---------- */
.about { padding: 46px 0; background: var(--bg-2); border-top: 1px solid var(--line); }
.ab-in { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.about h2 { font-size: 22px; margin: 0 0 10px; }
.about p { font-size: 13.5px; color: var(--ink-3); line-height: 1.8; margin: 0 0 8px; }
.ab-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.ab-card { padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.ab-card b { display: block; font-size: 22px; margin-bottom: 2px; }
.ab-card span { font-size: 12px; color: var(--ink-4); }

/* ---------- 页脚 ---------- */
.ft { padding: 22px 0; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-4); }
.ft-in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ft-r { display: flex; gap: 16px; }
.ft-r a:hover { color: var(--brand); }

/* ---------- 灯箱 ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(10,16,24,.94); backdrop-filter: blur(6px);
  display: none; grid-template-rows: 1fr auto; opacity: 0; transition: opacity .22s;
}
.lightbox.open { display: grid; opacity: 1; }
.lb-stage { display: grid; place-items: center; padding: 54px 76px 16px; min-height: 0; }
.lb-stage img, .lb-stage video {
  max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
.lb-close {
  position: absolute; top: 16px; right: 18px; z-index: 3;
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.12); color: #fff; font-size: 15px;
}
.lb-close:hover { background: rgba(255,255,255,.24); }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.12); color: #fff; font-size: 22px;
}
.lb-nav:hover { background: rgba(255,255,255,.24); }
.lb-prev { left: 16px; } .lb-next { right: 16px; }

.lb-bar {
  padding: 14px 28px 22px; display: flex; align-items: center; gap: 20px;
  flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.1);
}
.lb-meta { flex: 1; min-width: 230px; color: #fff; }
.lb-title { font-size: 14px; font-weight: 600; }
.lb-sub { font-size: 12px; color: rgba(255,255,255,.55); margin-top: 2px; display: flex; gap: 6px; flex-wrap: wrap; }
.lb-sub .sep { opacity: .5; }
.lb-links { margin-top: 5px; font-size: 12px; }
.lb-links a { color: #7fb4ff; }
.lb-links a:hover { text-decoration: underline; }
.lb-netdisk { min-width: 340px; }
body.v3 .netdisk { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.16); }
body.v3 .copy-field { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.22); color: rgba(255,255,255,.75); }
body.v3 .copy-field b { color: #fff; }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .lib-in { grid-template-columns: 1fr; }
  .side { position: static; flex-direction: row; flex-wrap: wrap; gap: 14px; }
  .side-box { flex: 1; min-width: 150px; }
  .ab-in { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 680px) {
  .wrap { padding: 0 16px; }
  .hd-right { display: none; }
  .hd-search { max-width: none; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .colcards { grid-template-columns: 1fr; }
  .lb-stage { padding: 50px 10px 10px; }
  .lb-bar { padding: 12px 16px 18px; }
  .lb-netdisk { min-width: 0; width: 100%; }
  .bn-r { gap: 22px; }
}
