/* ========== 盘库资源站 · 现代潮流风格 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #070a13;
  --glass: rgba(255,255,255,.055);
  --glass-strong: rgba(18,24,40,.72);
  --stroke: rgba(255,255,255,.09);
  --stroke-strong: rgba(255,255,255,.17);
  --text: #eef2ff;
  --muted: #9aa5c3;
  --cyan: #22d3ee;
  --violet: #8b5cf6;
  --pink: #f472b6;
  --accent: #22d3ee;
  --accent2: #8b5cf6;
  --hot: #ff5c6c;
  --ok: #34d399;
  --grad: linear-gradient(120deg,#22d3ee,#8b5cf6 55%,#f472b6);
  --radius-lg: 22px;
  --radius-md: 14px;
  --shadow-lg: 0 20px 50px -18px rgba(0,0,0,.55);
}
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; width: 100%; }

/* ===== 背景氛围 ===== */
.aurora { position: fixed; border-radius: 50%; filter: blur(90px); opacity: .5; z-index: -2; pointer-events: none; animation: drift 18s ease-in-out infinite alternate; }
.a1 { width: 46vw; height: 46vw; left: -8vw; top: -12vh; background: radial-gradient(circle, rgba(34,211,238,.38), transparent 65%); }
.a2 { width: 38vw; height: 38vw; right: -6vw; top: 22vh; background: radial-gradient(circle, rgba(139,92,246,.42), transparent 65%); animation-delay: -6s; }
.a3 { width: 34vw; height: 34vw; left: 24vw; bottom: -16vh; background: radial-gradient(circle, rgba(244,114,182,.30), transparent 65%); animation-delay: -12s; }
.grain { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .35; background-image: radial-gradient(rgba(255,255,255,.04) 1px, transparent 1px); background-size: 22px 22px; }
@keyframes drift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(4vw,3vh,0) scale(1.15); } }
.glass { backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%); }
.glass-strong { backdrop-filter: blur(28px) saturate(180%); -webkit-backdrop-filter: blur(28px) saturate(180%); }

/* ===== 顶栏 ===== */
.topbar { position: sticky; top: 0; z-index: 20; padding: 16px 0; background: rgba(9,12,22,.66); border-bottom: 1px solid var(--stroke); }
.topbar-inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.logo { font-size: 24px; font-weight: 800; letter-spacing: 1px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 14px rgba(139,92,246,.45)); }

/* ===== 搜索框 ===== */
.search-box { flex: 1; min-width: 220px; position: relative; }
.search-box .search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.search-box input { width: 100%; padding: 13px 20px 13px 44px; border-radius: 999px; border: 1px solid var(--stroke); background: rgba(255,255,255,.06); color: var(--text); font-size: 14px; outline: none; transition: all .3s ease; box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.search-box input::placeholder { color: var(--muted); }
.search-box input:focus { border-color: transparent; background: rgba(255,255,255,.09); box-shadow: 0 0 0 3px rgba(34,211,238,.18), 0 0 26px -4px rgba(139,92,246,.5); }

/* ===== 分类胶囊 ===== */
.cats { display: flex; gap: 10px; padding: 22px 16px 6px; flex-wrap: wrap; justify-content: center; }
.cat-btn { padding: 9px 20px; border-radius: 999px; border: 1px solid var(--stroke); background: rgba(255,255,255,.05); color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 600; transition: all .25s ease; }
.cat-btn small { opacity: .65; font-weight: 500; margin-left: 3px; }
.cat-btn:hover { color: var(--text); border-color: var(--stroke-strong); transform: translateY(-2px); box-shadow: 0 8px 20px -10px rgba(139,92,246,.4); }
.cat-btn.active { background: var(--grad); color: #fff; border-color: transparent; font-weight: 700; box-shadow: 0 10px 26px -8px rgba(139,92,246,.7), 0 0 18px -4px rgba(34,211,238,.6); }

/* ===== 工具栏 ===== */
.toolbar { display: flex; justify-content: space-between; align-items: center; padding: 20px 0 14px; gap: 12px; flex-wrap: wrap; }
.result-info { font-size: 13px; color: var(--muted); }
.updated { font-size: 12px; color: var(--muted); }

/* ===== 资源卡片 ===== */
.res-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; padding-bottom: 48px; }
.res-card { position: relative; overflow: hidden; background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.02)); border: 1px solid var(--stroke); border-radius: var(--radius-lg); padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; gap: 14px; transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease; animation: fadeUp .45s ease both; }
.res-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(120px at 30% 0%, rgba(34,211,238,.16), transparent 70%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.res-card:hover { transform: translateY(-5px); border-color: var(--stroke-strong); box-shadow: var(--shadow-lg), 0 0 30px -8px rgba(139,92,246,.45); }
.res-card:hover::before { opacity: 1; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

.res-info { min-width: 0; }
.res-title { font-size: 15px; line-height: 1.55; font-weight: 600; word-break: break-all; }
.res-title .hot { margin-right: 4px; }
.res-meta { font-size: 12px; color: var(--muted); margin-top: 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; background: linear-gradient(120deg, rgba(34,211,238,.16), rgba(139,92,246,.16)); color: #7dd3fc; font-weight: 600; font-size: 11px; border: 1px solid rgba(34,211,238,.25); }
.share-ok { color: var(--ok); font-weight: 600; }
.from-remote { color: var(--pink); font-weight: 500; }

/* ===== 获取按钮 ===== */
.get-btn { position: relative; flex-shrink: 0; padding: 10px 22px; border-radius: 999px; border: none; background: var(--grad); background-size: 200% 100%; color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; transition: all .3s ease; box-shadow: 0 8px 22px -8px rgba(139,92,246,.7); overflow: hidden; }
.get-btn::after { content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.4), transparent); transform: skewX(-20deg); }
.get-btn:hover { background-position: 100% 0; transform: translateY(-2px) scale(1.02); box-shadow: 0 12px 30px -8px rgba(34,211,238,.6); }
.get-btn:hover::after { animation: shimmer 1s ease; }
.get-btn:disabled { opacity: .5; cursor: wait; transform: none; }
@keyframes shimmer { from { left: -120%; } to { left: 160%; } }

/* ===== 空态 ===== */
.empty { text-align: center; padding: 70px 20px; color: var(--muted); font-size: 14px; border: 1px dashed var(--stroke); border-radius: var(--radius-lg); background: rgba(255,255,255,.03); }

/* ===== 弹窗 ===== */
.dialog-mask { position: fixed; inset: 0; background: rgba(5,7,14,.68); display: flex; align-items: center; justify-content: center; z-index: 99; animation: fadeIn .25s ease; }

/* 全部平台失败 → 同关键词候选资源页 */
.fb-mask { position: fixed; inset: 0; background: rgba(5,7,14,.82); display: flex; align-items: center; justify-content: center; z-index: 100; animation: fadeIn .25s ease; }
.fb-panel { width: min(720px, 92vw); max-height: 82vh; display: flex; flex-direction: column; background: linear-gradient(165deg, rgba(255,255,255,.09), rgba(255,255,255,.02)); border: 1px solid var(--stroke); border-radius: var(--radius-lg); padding: 20px 22px; box-shadow: var(--shadow-lg), 0 0 40px -10px rgba(139,92,246,.5); animation: fadeUp .35s ease both; }
.fb-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.fb-title b { font-size: 17px; color: var(--text); display: block; }
.fb-sub { display: block; margin-top: 6px; font-size: 13px; color: var(--text-dim); }
.fb-list { overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding-right: 4px; }
.fb-list .fb-card { animation: fadeUp .45s ease both; }
.fb-list .share-ok { color: var(--accent); font-size: 12px; margin-left: 10px; }
/* 候选卡：可用网盘来源选择 */
.fb-plats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.plat-chip { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--stroke); background: rgba(255,255,255,.05); color: var(--text); font-size: 12px; font-weight: 600; cursor: pointer; transition: all .2s; }
.plat-chip:hover { transform: translateY(-1px); filter: brightness(1.2); }
.plat-chip.plat-quark { color: #7dd3fc; border-color: rgba(34,211,238,.3); }
.plat-chip.plat-baidu { color: #6ee7b7; border-color: rgba(52,211,153,.3); }
.plat-chip.plat-xunlei { color: #c4b5fd; border-color: rgba(139,92,246,.35); }
.plat-chip.plat-uc { color: #fcd34d; border-color: rgba(251,191,36,.3); }
/* 转存成功行内提示 */
.path-ok { color: var(--ok); font-size: 13px; margin-bottom: 10px; }
/* 分享页：打开网盘链接按钮 */
.dialog-row { margin-top: 14px; display: flex; justify-content: flex-end; gap: 10px; }
.dialog { width: min(600px, 94vw); background: linear-gradient(165deg, rgba(24,30,50,.92), rgba(13,17,30,.94)); border: 1px solid var(--stroke-strong); border-radius: 24px; overflow: hidden; box-shadow: 0 30px 80px -20px rgba(0,0,0,.8), 0 0 40px -12px rgba(139,92,246,.4); animation: pop .3s cubic-bezier(.2,.9,.3,1.2); }
@keyframes pop { from { opacity: 0; transform: scale(.92) translateY(12px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.dialog-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--stroke); }
.dialog-head b { font-size: 15px; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dialog-head .close { border: none; background: rgba(255,255,255,.06); color: var(--muted); font-size: 20px; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; line-height: 1; transition: all .2s; }
.dialog-head .close:hover { background: rgba(255,92,108,.2); color: var(--hot); transform: rotate(90deg); }
.dialog-body { padding: 22px; max-height: 74vh; overflow-y: auto; }
.tip { font-size: 13px; color: var(--muted); margin-bottom: 14px; line-height: 1.6; }
.err { color: var(--hot); font-size: 13px; }
.loading { text-align: center; padding: 36px 0; color: var(--muted); font-size: 14px; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.18); border-top-color: var(--cyan); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 分页 ===== */
.pager { display: flex; justify-content: center; padding: 8px 0 40px; }
.pager-inner { display: flex; align-items: center; gap: 14px; }
.page-btn { padding: 9px 22px; border: 1px solid var(--stroke); border-radius: 999px; background: rgba(255,255,255,.05); color: var(--text); cursor: pointer; font-size: 14px; font-weight: 600; transition: all .25s; }
.page-btn:hover:not(:disabled) { border-color: var(--accent); color: #7dd3fc; box-shadow: 0 0 18px -6px rgba(34,211,238,.6); transform: translateY(-1px); }
.page-btn:disabled { opacity: .35; cursor: not-allowed; }
.page-info { font-size: 13px; color: var(--muted); }

/* ===== 二维码 ===== */
.qr-wrap { display: flex; justify-content: center; margin: 16px 0 8px; padding: 12px; background: #fff; border-radius: 18px; box-shadow: 0 10px 30px -12px rgba(0,0,0,.5); }
.qr-hint { text-align: center; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 14px; font-weight: 700; margin-bottom: 12px; }

/* ===== 页脚 ===== */
.foot { margin-top: auto; text-align: center; padding: 22px 16px; color: var(--muted); font-size: 12px; line-height: 1.8; border-top: 1px solid var(--stroke); background: rgba(9,12,22,.6); }
.foot .warn { color: #fbbf24; font-weight: 600; }
.foot-sub { margin-top: 6px; }
.dot { margin: 0 8px; opacity: .45; }
.foot-link { color: #7dd3fc; text-decoration: none; font-weight: 600; }
.foot-link:hover { text-decoration: underline; }
.disclaimer { max-width: 760px; margin: 14px auto 0; padding: 16px 20px; border: 1px solid var(--stroke); border-radius: var(--radius-md); background: rgba(255,255,255,.04); text-align: left; line-height: 1.9; font-size: 12px; color: var(--muted); }
.disclaimer b { font-size: 14px; color: var(--text); }
.disclaimer p { margin: 6px 0; }

/* ===== 多路径弹窗 ===== */
.path-list { display: flex; flex-direction: column; gap: 12px; }
.path-row { border: 1px solid var(--stroke); border-radius: var(--radius-md); padding: 14px 16px; background: rgba(255,255,255,.035); transition: border-color .25s; }
.path-row:hover { border-color: var(--stroke-strong); }
.path-main { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.plat-badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; background: linear-gradient(120deg, rgba(34,211,238,.16), rgba(139,92,246,.16)); color: #7dd3fc; border: 1px solid rgba(34,211,238,.25); flex-shrink: 0; }
.plat-baidu { background: linear-gradient(120deg, rgba(52,211,153,.16), rgba(34,211,238,.14)); color: #6ee7b7; border-color: rgba(52,211,153,.3); }
.plat-xunlei { background: linear-gradient(120deg, rgba(139,92,246,.2), rgba(244,114,182,.14)); color: #c4b5fd; border-color: rgba(139,92,246,.35); }
.plat-uc { background: linear-gradient(120deg, rgba(251,191,36,.16), rgba(244,114,182,.12)); color: #fcd34d; border-color: rgba(251,191,36,.3); }
.path-enc { font-size: 11px; color: var(--muted); font-family: Consolas, monospace; word-break: break-all; background: rgba(255,255,255,.04); padding: 2px 8px; border-radius: 6px; }
.path-side { display: flex; align-items: center; gap: 12px; min-height: 32px; flex-wrap: wrap; }
.path-state { font-size: 12px; color: var(--muted); }
.path-cached { color: var(--ok); font-weight: 600; }
.path-loading { display: inline-flex; align-items: center; color: var(--muted); }
.path-loading .spinner { width: 14px; height: 14px; margin-right: 6px; }
.path-btn { padding: 7px 18px; border-radius: 999px; border: none; background: var(--grad); color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; transition: all .25s; box-shadow: 0 6px 18px -8px rgba(139,92,246,.6); }
.path-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px -6px rgba(34,211,238,.55); }
.path-result { margin-top: 6px; }
.path-result .tip { margin-bottom: 10px; }
.path-result .qr-wrap { margin: 12px 0 8px; }
.path-err { color: var(--hot); font-size: 13px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.path-err .switching { color: var(--cyan, #22d3ee); font-weight: 600; }
.path-err .try-all { color: var(--muted); }
.path-retry { margin-left: auto; padding: 5px 16px; border-radius: 999px; border: 1px solid var(--stroke); background: rgba(255,255,255,.05); color: var(--text); font-size: 12px; cursor: pointer; transition: all .2s; }
.path-retry:hover { border-color: var(--accent); color: #7dd3fc; }

/* ===== 移动端适配 ===== */
@media (max-width: 640px) {
  .topbar-inner { gap: 12px; }
  .logo { font-size: 20px; }
  .cats { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding: 18px 8px 4px; scrollbar-width: none; }
  .cats::-webkit-scrollbar { display: none; }
  .cat-btn { white-space: nowrap; }
  .res-list { grid-template-columns: 1fr; gap: 12px; }
  .res-card { padding: 14px 16px; }
  .get-btn { padding: 9px 18px; }
  .dialog { border-radius: 20px; }
  .toolbar { padding: 14px 0 10px; }
  .dialog-body { padding: 16px; }
}
@media (max-width: 400px) {
  .res-card { flex-direction: column; align-items: stretch; }
  .get-btn { width: 100%; }
}


/* ===== 动态粒子背景 ===== */
#particleCanvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }


/* ===== 中文分享口令区（shareView） ===== */
.code-box { width: 100%; margin: 14px 0 6px; padding: 12px 14px; border-radius: 14px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  text-align: left; box-sizing: border-box; }
.code-label { font-size: 11px; letter-spacing: 1px; color: var(--muted); margin-bottom: 6px; }
.code-text { font-size: 14px; line-height: 1.7; color: var(--text); word-break: break-all;
  user-select: all; -webkit-user-select: all; background: rgba(0,0,0,.25);
  border-radius: 10px; padding: 10px 12px; max-height: 132px; overflow-y: auto; }
.code-btn { margin-top: 10px; padding: 8px 22px; border-radius: 999px; border: none;
  background: var(--grad); color: #fff; font-size: 14px; font-weight: 700; cursor: pointer;
  box-shadow: 0 6px 18px -8px rgba(139,92,246,.6); transition: all .25s; }
.code-btn:hover { opacity: .9; transform: translateY(-1px); }
.code-btn:active { transform: scale(.97); }
.code-tip { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.5; }
