/* ============================================================
   极光游戏库 · 网盘中转页  pan.css
   依赖 style.css（设计变量、按钮等），在其之后引入
   ============================================================ */

/* ---------- 1. 页面容器（比首页窄，给两侧悬浮广告留出空间） ---------- */
.pan-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 28px 0 0;
}

/* ---------- 2. 主卡片 ---------- */
.pan {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-2);
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* 2.1 头部：图标 + 游戏名 + 下载项名 + 属性
   2026-10-16：改为居中排版（图标居中在上，文字与标签全部居中） */
.pan__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 28px 26px;
  border-bottom: 1px solid var(--line);
}
.pan__glyph {
  width: 60px; height: 60px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 30px;
  flex-shrink: 0;
  border: 1px solid var(--line-2);
}
.pan__titles { min-width: 0; width: 100%; }
.pan__game {
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 4px;
}
.pan__game a { color: var(--text-3); }
.pan__game a:hover { color: var(--text); }
.pan__name {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.pan__chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-top: 10px;
}
.pan__chips span {
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--brand-soft);
  border: 1px solid var(--line-2);
  font-size: 12px;
  color: var(--text-2);
}

/* 2.2 提取码区（旧版：提取码固定在卡片正中时用的容器）
   2026-10-16 起提取码改成独立的 .pan-code-panel 随机落位，
   这里暂时没有元素使用，但样式保留 —— 想恢复旧版（提取码固定在卡片里）
   就把 pan.js 的 cardHTML() 里贴回这段结构即可。 */
.pan__code-block {
  padding: 26px 26px 24px;
  text-align: center;
  background: linear-gradient(180deg, transparent, rgba(124, 92, 255, 0.06));
}
.pan__code-label {
  font-size: 13px;
  color: var(--text-3);
  letter-spacing: 0.16em;
  margin-bottom: 12px;
}
.pan__code-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.pan__code {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px 14px 24px;
  border-radius: 16px;
  border: 1px dashed var(--line-2);
  background: rgba(6, 7, 12, 0.45);
}
.pan__code b {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--text);
}
.pan__copy {
  width: 38px; height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 17px;
  background: var(--brand-soft);
  border: 1px solid var(--line-2);
  color: var(--text);
  transition: transform 0.25s var(--ease), background 0.25s, color 0.25s;
}
.pan__copy:hover { transform: translateY(-2px); background: var(--brand); color: #fff; border-color: transparent; }
.pan__code-hint {
  font-size: 12.5px;
  color: var(--text-3);
  margin-top: 12px;
}
.pan__code-hint code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--brand-soft);
  border: 1px solid var(--line-2);
}

/* 2.3 主按钮 */
.pan__cta {
  padding: 0 26px 26px;
  text-align: center;
}
.pan__cta .btn {
  width: 100%;
  max-width: 420px;
  padding: 16px 28px;
  font-size: 16px;
  border-radius: 15px;
}

/* 网盘链接原文：让用户能直接看到 / 复制链接本身 */
.pan__url {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.pan__url-label {
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.1em;
  flex-shrink: 0;
}
.pan__url-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--text-2);
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(6, 7, 12, 0.4);
  border: 1px solid var(--line);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pan__copy--sm {
  width: 28px; height: 28px;
  border-radius: 8px;
  font-size: 13px;
  flex-shrink: 0;
}

/* ---------- 2.3b 提取码 / 网盘链接的「迷你浅灰按钮」落点 ----------
   2026-10-16：不再直接显示链接和提取码的文本，改成两个**迷你浅灰按钮**，
   由 pan.js 随机塞进广告位附近各种"不端正"的角落 ——
   广告上面 / 下面 / 偏左 / 偏右 / 贴着左右侧边悬浮广告的侧面 / 浮在底部广告条上方。
     · 「百度网盘链接」→ 新标签页直达网盘
     · 「提取码」      → 复制到剪贴板 + 提示「提取码已复制」
   横排 / 竖排：贴在**横幅**广告旁边时是横的，贴在**左右竖幅**广告旁边时自动变竖排
   （见下面的 2.3c 小节）。 */
.pan-anchor { margin: 22px 0; }
.pan-anchor:empty { display: none; }   /* 没被选中的落点不占任何空间 */

.pan-btn-row {
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;   /* pan.js 会随机覆盖成 flex-start / center / flex-end */
}
/* 贴边悬浮的落点：贴在左右侧边广告的侧面 / 浮在底部广告条上方 */
.pan-btn-row--fixed {
  position: fixed;
  z-index: 78;               /* 低于广告悬浮层的 80，不遮住广告 */
  margin: 0;
}

.pan-btn {
  position: relative;          /* 给下面的触屏隐形热区当定位基准 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* ★★ 想整体缩放按钮，只改下面这一个 font-size 就够了（其余尺寸都是 em，会跟着缩） ★★
     当前 10px：
       横排 → 提取码 47×19px / 百度网盘链接 77×19px
       竖排 → 提取码 19×47px / 百度网盘链接 19×77px
     面积约等于改造前 190×46px 大按钮的 1/6。 */
  font-size: 10px;
  padding: 0.25em 0.75em;
  border-radius: 0.7em;
  gap: 0.4em;
  line-height: 1.2;
  font-weight: 700;
  white-space: nowrap;
  /* 浅灰配色（2026-10-16 改，原为浅黄）。深灰字 + 浅灰底 + 一道边框，
     深色主题下是浅色块，浅色主题下靠边框和字色也立得住。 */
  color: #343a45;
  background: linear-gradient(180deg, #f3f5f8, #d9dee6);
  border: 1px solid #bfc6d1;
  box-shadow: 0 2px 8px rgba(158, 168, 184, 0.32);
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s;
}
.pan-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(158, 168, 184, 0.55);
  filter: brightness(1.05);
}
.pan-btn:active { transform: translateY(0); }

/* ---------- 2.3c 竖排形态：落在「垂直广告位」旁边时 ----------
   左右两侧的悬浮竖幅广告（160×600）是竖的，横着的小按钮贴在它旁边会显得很别扭。
   所以 pan.js 给侧边落点（sideLeft / sideRight）的容器加上 --vertical 类，
   按钮改成中文竖排（writing-mode: vertical-rl，汉字天然正立、自上而下读）。
   注意 padding 要左右互换：竖排后"行内方向"变成上下，所以要「上下多留、左右少留」。 */
.pan-btn-row--vertical .pan-btn {
  writing-mode: vertical-rl;   /* 汉字自上而下正立排列 */
  text-orientation: upright;   /* 标点/数字也保持正立，不躺倒 */
  padding: 0.75em 0.25em;      /* 与横排的 0.25em 0.75em 刚好互换 */
}

/* 按钮缩到 19px 高之后，触屏上太难点中。
   这里给触摸设备加一圈「隐形热区」：视觉尺寸完全不变，只是手指好按。
   桌面端不加 —— 避免热区抢走旁边广告的点击。 */
@media (pointer: coarse) {
  .pan-btn::before {
    content: '';
    position: absolute;
    top: -10px; right: -12px; bottom: -10px; left: -12px;
  }
}

/* 旧版：提取码 / 网盘链接的纯文本样式。
   2026-10-16 已按需求改成上面的小黄按钮，这里暂时没有元素使用，样式保留备查。 */
.pan-plain {
  margin: 0;
  text-align: center;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--text-2);
}
.pan-plain__k {
  font-size: 12.5px;
  color: var(--text-3);
  letter-spacing: 0.1em;
  margin-right: 10px;
}
.pan-plain__v {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
  user-select: all;   /* 点一下自动全选，方便复制（外观仍是纯文本） */
}
.pan-plain__v--url {
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-2);
  word-break: break-all;
}

/* 旧版：提取码面板（带方框 + 复制按钮的那种）。
   2026-10-16 已按需求改成纯文本，这里暂时没有元素使用，样式保留备查。 */
.pan-code-panel {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-2);
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  padding: 26px 26px 24px;
  text-align: center;
  overflow: hidden;
}
.pan-code-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--brand-3));
}
.pan-code-panel .pan__cta { padding: 0; margin-top: 18px; }
.pan-code-panel .ad-slot--inCard { padding: 0; margin: 18px 0 0; }
.pan-code-panel .ad-slot--inCard.ad-slot--empty { padding: 16px; margin: 18px 0 0; }

/* 右下角「提取码」跳转按钮：只在提取码不在视野内时出现 */
.pan-find {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 70;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  border: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 10px 30px rgba(124, 92, 255, 0.45);
  transition: transform 0.25s var(--ease);
}
.pan-find:hover { transform: translateY(-2px); }
.pan-find[hidden] { display: none; }
/* 手机端底部有悬浮广告条时，往上让一让 */
body.has-float-bottom .pan-find { bottom: 74px; }

/* 2.4 三步提示 */
.pan__steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 24px 26px 26px;
}
.pan__step {
  display: flex;
  gap: 9px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--text-2);
  align-items: flex-start;
  line-height: 1.55;
}
.pan__step i {
  font-style: normal;
  font-weight: 800;
  font-size: 11px;
  color: var(--brand-2);
  flex-shrink: 0;
  padding-top: 2px;
}

/* 2.5 同游戏的其他下载项 */
.pan__others {
  border-top: 1px solid var(--line);
  padding: 22px 26px 26px;
}
.pan__others-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 14px;
}
.pan__other {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: all 0.28s var(--ease);
}
.pan__other + .pan__other { margin-top: 10px; }
.pan__other:hover { border-color: var(--line-2); background: var(--surface-2); transform: translateX(4px); }
.pan__other-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
  border: 1px solid var(--line-2);
}
.pan__other-info { flex: 1; min-width: 0; }
.pan__other-name { font-size: 14px; font-weight: 600; }
.pan__other-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* ---------- 3. 广告位：通用 ---------- */
.ad-slot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 22px 0;
  border-radius: var(--radius);
  overflow: hidden;
}
/* 占位框样式（只有 ad 代码为空时才出现） */
.ad-slot--empty {
  border: 1px dashed var(--line-2);
  background: repeating-linear-gradient(45deg,
    transparent 0 10px, rgba(124, 92, 255, 0.05) 10px 20px);
}
.ad-slot__ph {
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.06em;
  line-height: 1.7;
  padding: 8px;
}
.ad-slot__ph b { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 2px; }

/* 横幅尺寸 */
.ad-slot--banner { min-height: 90px; }
.ad-slot--inline { min-height: 70px; margin: 20px 0 0; }
.ad-slot--inCard {
  margin: 0;
  padding: 0 26px 26px;
  border: none;
  background: none;
  border-radius: 0;
}
.ad-slot--inCard.ad-slot--empty {
  padding: 18px 26px;
  margin: 0 26px 26px;
  border-radius: var(--radius);
  min-height: 70px;
}

/* ---------- 4. 广告位：悬浮 ---------- */
.ad-float {
  position: fixed;
  z-index: 80;
}
.ad-float--empty { border: 1px dashed var(--line-2); background: rgba(8, 10, 18, 0.6); backdrop-filter: blur(10px); }

/* 左右竖幅：160×600，屏宽 < 1280px 隐藏 */
.ad-float--left,
.ad-float--right {
  top: 50%;
  transform: translateY(-50%);
  width: 160px;
  height: 600px;
  border-radius: var(--radius);
  display: none;
  align-items: center;
  justify-content: center;
}
.ad-float--left { left: 14px; }
.ad-float--right { right: 14px; }

/* 底部悬浮条：屏宽 < 1280px 时出现 */
.ad-float--bottom {
  left: 0; right: 0; bottom: 0;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
}

/* 关闭按钮 */
.ad-float__close {
  position: absolute;
  top: 6px; right: 6px;
  width: 24px; height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  line-height: 1;
  background: rgba(6, 7, 12, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  opacity: 0.75;
  transition: opacity 0.2s, transform 0.2s;
}
.ad-float__close:hover { opacity: 1; transform: scale(1.12); }

/* 底部悬浮条出现时，给页面留出空间，别遮住页脚 */
body.has-float-bottom { padding-bottom: 62px; }

/* ---------- 5. 找不到链接 ---------- */
.pan-missing { text-align: center; padding: 80px 20px; }
.pan-missing__icon { font-size: 56px; margin-bottom: 16px; opacity: 0.75; }
.pan-missing__title { font-size: 22px; font-weight: 800; margin-bottom: 10px; }
.pan-missing__desc { color: var(--text-2); margin-bottom: 24px; }

/* ---------- 6. 响应式 ---------- */
@media (min-width: 1280px) {
  .ad-float--left,
  .ad-float--right { display: flex; }
  .ad-float--bottom { display: none; }
}

@media (max-width: 860px) {
  .pan__steps { grid-template-columns: 1fr; }
  .pan__head { padding: 22px 20px; }
  .pan__glyph { width: 52px; height: 52px; font-size: 26px; border-radius: 15px; }
  .pan__name { font-size: 18px; }
  .pan-code-panel { padding: 22px 20px 20px; }
  .pan-plain { font-size: 13.5px; }
  .pan-plain__v { font-size: 15.5px; }
  .pan-plain__v--url { font-size: 12.5px; }
  .pan__code { padding: 12px 16px 12px 18px; gap: 10px; }
  .pan__code b { font-size: 24px; }
  .pan__cta { padding: 0 20px 22px; }
  .pan__steps { padding: 20px 20px 22px; }
  .pan__others { padding: 20px 20px 22px; }
  .ad-slot--inCard { padding: 0 20px 22px; }
  .ad-slot--inCard.ad-slot--empty { margin: 0 20px 22px; padding: 14px 16px; }
  .ad-slot--banner { min-height: 100px; }
  .pan-find { right: 14px; bottom: 14px; padding: 10px 15px; font-size: 13px; }
  body.has-float-bottom .pan-find { bottom: 72px; }
}
