/* ============================================================
   盘 Hub · 扩展样式
   在 盘搜Hub 原有 style.css 之上补充：
   - 验证码弹层（字母数字 / 滑块拼图）
   - 转存进度浮层
   - 资源页 PC/移动端差异块
   ============================================================ */

/* ---------- 兜底：hidden 属性必须真的隐藏 ----------
   本文件大量用 display:flex / inline-flex 做布局，而 HTML 的 `hidden` 属性
   只是 UA 样式 `[hidden]{display:none}`，**作者样式优先级更高**，会被直接盖掉：
   结果是「带 hidden 的弹层一进页面就常驻显示」（验证码弹层、转存进度浮层都中招）。
   这条 !important 规则是根治手段，别删。 */
[hidden] { display: none !important; }

/* ---------- 弹层 ---------- */
.ph-modal-mask {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(15, 23, 42, .45);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.ph-modal {
  width: 100%; max-width: 360px;
  background: #fff; border-radius: 16px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .28);
  padding: 18px 18px 16px;
  animation: phPop .18s ease-out;
}
@keyframes phPop { from { transform: scale(.94); opacity: 0 } to { transform: scale(1); opacity: 1 } }
.ph-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 16px; font-weight: 700; color: var(--text);
}
.ph-modal-close {
  width: 30px; height: 30px; border-radius: 9px; color: var(--muted);
  font-size: 15px;
}
.ph-modal-close:hover { background: #f3f4f6; color: var(--text); }
.ph-modal-tip {
  font-size: 12.5px; color: var(--muted); margin: 6px 0 14px; line-height: 1.55;
}
.ph-modal-foot {
  display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px;
}
.ph-captcha-body { min-height: 118px; }
/* 加载中 / 加载失败：一定要把原因显示出来，不能只留一个空白弹层 */
.ph-cap-note { padding: 26px 0; text-align: center; color: #94a3b8; font-size: 13px; }
.ph-cap-note.ph-cap-err { padding: 18px 0 6px; color: #ef4444; font-weight: 600; }

/* ---------- 字母数字验证码 ---------- */
.ph-cap-row { display: flex; align-items: center; gap: 10px; }
.ph-cap-img {
  flex: 1; height: 52px; border-radius: 10px; border: 1px solid var(--line);
  object-fit: cover; background: #f8fafc;
}
.ph-cap-refresh {
  width: 40px; height: 52px; border-radius: 10px; border: 1px solid var(--line);
  font-size: 19px; color: var(--text-2); background: #fff;
}
.ph-cap-refresh:hover { color: var(--primary); border-color: var(--primary); }
.ph-cap-input {
  width: 100%; height: 46px; margin-top: 12px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 10px;
  font-size: 18px; letter-spacing: 7px; text-align: center; text-transform: uppercase;
}
.ph-cap-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ph-cap-hint { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* ---------- 滑块拼图 ---------- */
.ph-slider {
  position: relative; width: 100%; max-width: 320px; margin: 0 auto;
  border-radius: 12px; overflow: hidden; line-height: 0;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .12);
  user-select: none; touch-action: none;
}
.ph-slider-bg { width: 100%; display: block; }
.ph-slider-piece {
  position: absolute; width: 50px; height: 50px; left: 0;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .45));
  cursor: grab;
}
.ph-slider-track {
  position: relative; height: 44px; margin-top: 12px;
  background: #f1f5f9; border-radius: 999px; border: 1px solid var(--line);
}
.ph-slider-thumb {
  position: absolute; top: 3px; left: 0; width: 60px; height: 36px;
  background: var(--grad-accent); color: #fff; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; letter-spacing: 1px; cursor: grab;
  box-shadow: 0 3px 10px rgba(37, 99, 235, .35);
}
.ph-slider-thumb:active { cursor: grabbing; }

/* ---------- 转存进度浮层 ---------- */
.ph-busy-box {
  position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%);
  z-index: 990; display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 18px; border-radius: 999px;
  background: rgba(17, 24, 39, .92); color: #fff; font-size: 13px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .3);
  max-width: 88vw;
}
.ph-spin {
  width: 14px; height: 14px; border-radius: 50%; flex: none;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff;
  animation: phSpin .7s linear infinite;
}
@keyframes phSpin { to { transform: rotate(360deg) } }

/* ---------- 进度条状态 ----------
   检索途中用「不确定进度」的流光动画，宽度停在中间（绝不满格）。
   注意 transition:none —— style.css 给 .progress-bar i 设了 width 1.2s 过渡，
   从满格退回中间时会先卡在 100% 一秒多，正是「明明还在搜却显示 100%」的观感来源。 */
.progress-bar i.ph-bar-indet {
  transition: none;
  background-image: linear-gradient(90deg,
    #34d399 0%, #10b981 20%, #a7f3d0 40%, #10b981 60%, #34d399 100%);
  background-size: 220% 100%;
  animation: phIndet 1.1s linear infinite;
}
@keyframes phIndet {
  from { background-position: 0 0; }
  to { background-position: -220% 0; }
}
.progress-bar i.ph-bar-err {
  transition: none;
  background: linear-gradient(90deg, #f87171, #dc2626);
}
.ph-retry-wrap { margin-top: 10px; }
.ph-bar-run { animation: phBar 1.4s ease-in-out infinite; }
@keyframes phBar {
  0% { opacity: .55 } 50% { opacity: 1 } 100% { opacity: .55 }
}

/* ---------- 资源页 ---------- */
.ph-verified {
  margin-left: auto; font-size: 11px; font-weight: 600;
  color: #047857; background: var(--green-soft);
  padding: 3px 9px; border-radius: 999px;
}
.ph-passcode {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 4px 0 14px; font-size: 14px; color: var(--text-2);
}
.ph-passcode b { color: var(--primary); letter-spacing: 2px; font-size: 16px; }
.ph-mobile-guide { display: flex; flex-direction: column; gap: 10px; }
.ph-mobile-tip {
  font-size: 13px; color: #047857; background: var(--green-soft);
  border-radius: 10px; padding: 9px 12px; margin-bottom: 2px;
}
.ph-qr-fallback { padding: 10px 0; }
.ph-expire {
  margin-top: 14px; font-size: 12.5px; color: var(--gold);
  background: #fffbeb; border-radius: 10px; padding: 8px 12px; text-align: center;
}
.ph-back { margin-top: 14px; text-align: center; font-size: 13px; color: var(--muted); }
.ph-back a { color: var(--accent); font-weight: 600; }

/* ---------- 详情页 ---------- */
.ph-pan-row {
  width: 100%; text-align: left; display: flex; align-items: center;
  gap: 12px; padding: 14px 16px; background: #fff; border: none;
  border-radius: var(--radius-sm); cursor: pointer;
}
.ph-pan-row:hover { background: var(--accent-soft); }

/* 网盘资源列表（需求 5：信息与「获取资源」分开，不要挤在一起） */
.pan-box .pan-row {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 13px 14px; margin-bottom: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  text-align: left; text-decoration: none; color: inherit;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.pan-box .pan-row:last-child { margin-bottom: 0; }
.pan-box .pan-row:hover {
  border-color: var(--accent); box-shadow: 0 6px 18px rgba(37, 99, 235, .1);
}
.pan-box .pan-row .pan-logo { flex: none; }
.pan-row-info { flex: 1; min-width: 0; }
.pan-row-info .pan-name {
  font-size: 14.5px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pan-row-info .pan-desc { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.pan-box .pan-row .pan-go {
  flex: none; margin-left: auto;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; font-weight: 700; color: var(--accent);
}
/* 需求 5：网盘行里「获取资源」用橙色高亮（含箭头，svg 走 currentColor） */
.pan-box .pan-row .pan-go.pan-ok { color: #f97316; }
.pan-count-tag {
  font-size: 11.5px; font-weight: 600; color: #1d4ed8;
  background: var(--accent-soft); padding: 2px 8px; border-radius: 999px;
}
.pan-row-link { cursor: pointer; }

.ph-body { font-size: 14px; line-height: 1.9; color: var(--text-2); word-break: break-word; }

/* ---------- 顶部 Logo 可换成图片（需求 2）---------- */
.logo.logo-img { display: inline-flex; align-items: center; }
.logo.logo-img img { height: 32px; width: auto; display: block; }
.drawer-head .logo.logo-img img { height: 30px; }

/* ---------- 页脚可自定义（需求 1）---------- */
.footer-custom { font-size: 12.5px; line-height: 1.8; }
.footer-custom a { color: var(--accent); }
.footer-custom .footer-links { display: flex; gap: 14px; justify-content: center; margin-top: 6px; }

/* ---------- PC 二维码：禁止拖动（需求 9）---------- */
/* style.css 把 .qr-img-wrap 写死 216x216，而模板把「扫码提示」也放在这个框里，
   固定高度会把提示挤出框外、叠在下面的 .qr-note 上（线上踩过）。
   这里放开高度、给 img 定尺寸。 */
.qr-img-wrap {
  width: auto; height: auto; min-width: 216px;
}
.qr-img-wrap img.qr-nodrag {
  display: block; width: 196px; height: 196px; margin: 0 auto;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  pointer-events: none;   /* 彻底防拖/防复制到解码站 */
}
.qr-scan-tip {
  margin-top: 12px; font-size: 13px; color: var(--text-2);
  font-weight: 600; text-align: center;
}

/* ---------- 结果项补充 ---------- */
.src-tag.local { background: var(--green-soft); color: #047857; }
.result-link-btn .btn:disabled { opacity: .7; cursor: wait; }
.rank-item { cursor: pointer; }
a.rank-item:hover .rank-name { color: var(--primary); }

/* ---------- 后台 ---------- */
.adm-tag {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
}
.adm-tag.ok { background: var(--green-soft); color: #047857; }
.adm-tag.warn { background: #fffbeb; color: #b45309; }
.adm-tag.err { background: #fef2f2; color: #b91c1c; }
.adm-tag.gray { background: #f1f5f9; color: #475569; }
.adm-tag.blue { background: var(--accent-soft); color: #1d4ed8; }

/* ==========================================================================
   2026-10-15 需求 1/2/3
   ========================================================================== */

/* ---------- 需求 2：热播推荐 / 影视热议榜「只给 SEO 爬虫看」----------
   爬虫不执行 JS，拿到的 HTML 里这两块**还在**（收录不受影响）；
   真人浏览器由 <head> 里那段同步脚本给 <html> 加上 .ph-user 后隐藏。
   ★ 脚本是同步的（body 之前），所以真人这边**不会闪一下**。 */
html.ph-user .seo-only { display: none !important; }

/* ---------- 需求 1：首次访问「访问须知」弹层 ---------- */
.ph-access-mask {
  position: fixed; inset: 0; z-index: 3000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; overflow-y: auto;
  background: rgba(240, 244, 250, .84);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: phAccessFade .2s ease;
}
/* ★ 必须显式写：上面的 display:flex 会盖掉 [hidden] 默认的 display:none */
.ph-access-mask[hidden] { display: none; }
@keyframes phAccessFade { from { opacity: 0 } to { opacity: 1 } }

.ph-access {
  width: 100%; max-width: 620px; background: #fff; border-radius: 20px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .18); overflow: hidden;
  animation: phAccessUp .26s cubic-bezier(.22, .9, .3, 1);
}
@keyframes phAccessUp { from { transform: translateY(14px); opacity: .35 } to { transform: none; opacity: 1 } }

.ph-access-hero {
  padding: 30px 26px 22px; text-align: center;
  background: linear-gradient(180deg, #eef4ff 0%, #f8fbff 62%, #fff 100%);
}
.ph-access-icon {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 20px;
  display: flex; align-items: center; justify-content: center; color: #fff;
  background: linear-gradient(135deg, #4f7cf7, #7c5cf6);
  box-shadow: 0 12px 26px rgba(79, 124, 247, .35);
}
.ph-access-icon svg { width: 32px; height: 32px; }
.ph-access-title { font-size: 24px; font-weight: 800; color: #0f172a; letter-spacing: .5px; }
.ph-access-sub { margin-top: 6px; font-size: 13.5px; color: #94a3b8; }

.ph-access-body {
  margin: 0 22px; padding: 18px 20px; border: 1px solid #e8edf5; border-radius: 14px;
  font-size: 14.5px; line-height: 2; color: #334155;
}
.ph-access-body p + p { margin-top: 12px; }
.ph-access-warn {
  margin-top: 14px; padding: 12px 14px; border-radius: 10px;
  background: #fff8e6; border: 1px solid #ffe6a8;
  color: #b45309; font-size: 13.5px; line-height: 1.9;
}

.ph-access-foot { display: flex; gap: 12px; padding: 20px 22px 24px; }
.ph-access-btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; border-radius: 12px; font-size: 15px; font-weight: 700; cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .18s ease, background .18s ease;
}
.ph-access-btn svg { width: 16px; height: 16px; }
.ph-access-btn:active { transform: translateY(1px); }
.ph-access-btn.ghost { background: #fff; border-color: #e2e8f0; color: #475569; }
.ph-access-btn.ghost:hover { background: #f8fafc; }
.ph-access-btn.primary {
  color: #fff; background: linear-gradient(135deg, #4f7cf7, #7c5cf6);
  box-shadow: 0 10px 22px rgba(79, 124, 247, .3);
}
.ph-access-btn.primary:hover { box-shadow: 0 12px 26px rgba(79, 124, 247, .42); }

@media (max-width: 640px) {
  .ph-access-mask { padding: 14px; align-items: flex-start; }
  .ph-access-hero { padding: 24px 18px 18px; }
  .ph-access-icon { width: 56px; height: 56px; margin-bottom: 12px; }
  .ph-access-icon svg { width: 28px; height: 28px; }
  .ph-access-title { font-size: 21px; }
  .ph-access-body { margin: 0 14px; padding: 15px; font-size: 14px; line-height: 1.95; }
  .ph-access-foot { padding: 16px 14px 18px; gap: 10px; }
  .ph-access-btn { height: 44px; font-size: 13.5px; }
}

/* ---------- 需求 3：详情页「剧情简介」挪到网盘资源下面 ----------
   原来简介塞在 hero（海报右侧），移动端一个 hero 就占满整屏。
   现在 hero 只留「标题 + 标签 + 元信息」，简介单独成块排在网盘资源之后。 */
.detail-intro .intro-text { margin: 0; }
