/* ==========================================================================
   detail.css — 内容件：面板 · 礼包行 · 视频卡 · 问答 · 键值表 · 活动项 ·
                步骤 · 空态 · 锚点导航 · 分页
   依赖：tokens.css / base.css / components.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   面板
   -------------------------------------------------------------------------- */
.panel {
  background: var(--bg-3);
  box-shadow: inset 0 0 0 1px var(--line);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  margin-bottom: var(--sp-4);
}
.panel > h2 {
  font-size: 17px;
  margin-bottom: var(--sp-3);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
}
.panel > h2::before {
  content: "";
  width: 4px;
  height: 15px;
  background: var(--acc-400);
  border-radius: 2px;
  flex: none;
}
.panel > h2 .more { margin-left: auto; font-size: 13px; font-weight: 400; color: var(--txt-3); }
.panel > h2 .more:hover { color: var(--acc-400); }
.panel p { color: var(--txt-2); }
.panel .panel-note { font-size: 13px; color: var(--txt-3); margin-top: var(--sp-3); line-height: 1.8; }

/* --------------------------------------------------------------------------
   礼包行
   -------------------------------------------------------------------------- */
.gift-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.gift-row:last-child { border-bottom: 0; padding-bottom: 0; }
.gift-row .ico {
  width: 48px;
  height: 48px;
  border-radius: var(--r-icon);
  object-fit: cover;
  flex: none;
  background: var(--bg-4);
}
.gift-row .gr-main { flex: 1 1 160px; min-width: 0; }
/* 列表模式（礼包中心/首页）的主行是游戏名 —— 要能点进详情页 */
.gift-row .gr-ico { flex: none; display: block; }
.gift-row .gr-name > a { color: var(--txt-1); }
.gift-row .gr-name > a:hover { color: var(--acc-400); }
.gift-row .gr-name {
  font-size: 14.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.gift-row .gr-gift { font-size: 13px; color: var(--txt-2); margin-top: 3px; }
.gift-row .gr-type { display: inline-block; margin-left: 6px; font-size: 11.5px; color: var(--cool-300); }
.gift-row .gc-row { display: flex; align-items: center; gap: var(--sp-2); flex: 0 1 auto; }
.gift-row .gr-hint { flex-basis: 100%; }

.gc {
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: .06em;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  background: rgba(255, 176, 32, .12);
  color: var(--acc-300);
  user-select: all;
  word-break: break-all;
}
.gc.is-plain { background: none; color: var(--txt-3); box-shadow: inset 0 0 0 1px var(--line); }
.gc.is-manual { background: rgba(46, 230, 176, .12); color: var(--ok-400); }
.gr-hint { font-size: 12.5px; color: var(--txt-3); margin-top: var(--sp-2); }

@media (max-width: 599px) {
  .gift-row .gc-row { flex-basis: 100%; }
  .gift-row .btn-copy { flex: 1 1 auto; min-height: 40px; }
}

/* --------------------------------------------------------------------------
   视频卡（facade：首屏零视频字节）
   -------------------------------------------------------------------------- */
.vcard {
  border-radius: var(--r-lg);
  background: var(--bg-0);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}
.vcard-facade {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: none;
  overflow: hidden;
}
.vcard-bg {
  position: absolute;
  inset: -18%;
  /* background-image 由行内 style 给：走 CSS 自定义属性时，Chromium 会按
     样式表所在目录（/assets/css/）解析相对地址，导致路径被拼成 /assets/assets/… */
  background-size: cover;
  background-position: center;
  filter: blur(18px) saturate(1.1);
  transform: scale(1.6);
  opacity: .5;
}
.vcard-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 12, 17, .25), rgba(10, 12, 17, .78));
}
.vcard-play {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--grad-cta);
  box-shadow: var(--glow-acc);
}
.vcard-play::after {
  content: "";
  position: absolute;
  left: 52%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent var(--acc-ink);
}
.vcard-label {
  position: absolute;
  left: var(--sp-3);
  bottom: var(--sp-3);
  font-size: 12.5px;
  color: var(--txt-1);
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: rgba(10, 12, 17, .72);
}
.vcard video { width: 100%; aspect-ratio: 16 / 9; background: #000; transition: opacity var(--dur-3) var(--ease-out); }
.vcard video.is-loading { opacity: 0; }
.vcard > .spinner,
.vcard .vcard-facade + .spinner { margin: var(--sp-7) auto; }
.spinner {
  display: block;
  width: 34px;
  height: 34px;
  margin: 0 auto;
  border: 3px solid var(--line);
  border-top-color: var(--acc-400);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; border-top-color: var(--line-strong); }
}
.vcard-err {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-7) var(--sp-4);
  color: var(--txt-2);
  font-size: 13.5px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   问答 / 键值表 / 活动项 / 步骤
   -------------------------------------------------------------------------- */
.faq-item { padding: var(--sp-3) 0; border-bottom: 1px dashed var(--line); }
.faq-item:last-child { border-bottom: 0; padding-bottom: 0; }
.faq-item h3 { font-size: 15px; margin-bottom: 6px; color: var(--txt-1); }
.faq-item p { color: var(--txt-2); line-height: 1.85; }

.kv {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px var(--sp-4);
}
.kv > div { font-size: 14px; }
.kv dt { color: var(--txt-3); display: inline; }
.kv dd { display: inline; margin-left: 6px; }

.act-item { padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); }
.act-item:last-child { border-bottom: 0; padding-bottom: 0; }
.act-head { display: flex; gap: var(--sp-2); align-items: baseline; flex-wrap: wrap; }
.act-date { font-size: 13px; color: var(--txt-3); font-variant-numeric: tabular-nums; }
.act-title { font-size: 14.5px; font-weight: 600; }
.act-detail > summary {
  cursor: pointer;
  color: var(--acc-400);
  font-size: 13px;
  list-style: none;
  display: inline-block;
  padding: 3px 0;
}
.act-detail > summary::-webkit-details-marker { display: none; }
.act-detail > summary::before { content: "▸ "; }
.act-detail[open] > summary::before { content: "▾ "; }
.act-body {
  margin-top: var(--sp-2);
  padding: var(--sp-3);
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--line);
  border-radius: var(--r-sm);
  color: var(--txt-2);
  font-size: 14px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.act-body p { margin-bottom: var(--sp-2); }
.act-body p:last-child { margin-bottom: 0; }
/* 活动正文里的外链图：宽度自适应，高度由 <img> 上的 width/height 推导比例占位（防跳动） */
.act-body img { display: block; width: 100%; height: auto; border-radius: var(--r-sm); margin: var(--sp-2) 0; }
.act-body table { width: 100%; margin: var(--sp-2) 0; font-size: 13.5px; }
.act-body td, .act-body th { border: 1px solid var(--line); padding: 6px 8px; text-align: left; }

.steps { padding-left: var(--sp-5); list-style: decimal; color: var(--txt-2); line-height: 2; }
.steps li { margin-bottom: var(--sp-1); }

/* --------------------------------------------------------------------------
   空态：任何"没有数据"都必须给出路，不留白屏
   -------------------------------------------------------------------------- */
.empty-box {
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  padding: var(--sp-5) var(--sp-4);
  background: var(--bg-2);
  text-align: center;
}
.empty-box .et { font-size: 15.5px; font-weight: 700; margin-bottom: 6px; }
.empty-box .ed {
  font-size: 13.5px;
  color: var(--txt-2);
  margin-bottom: var(--sp-4);
  line-height: 1.8;
  max-width: var(--w-prose);
  margin-inline: auto;
}
.empty-box .ea { display: flex; gap: var(--sp-2); flex-wrap: wrap; justify-content: center; }

/* --------------------------------------------------------------------------
   详情页锚点导航
   -------------------------------------------------------------------------- */
.anchornav {
  display: flex;
  gap: var(--sp-4);
  overflow-x: auto;
  scrollbar-width: none;
  position: sticky;
  top: var(--h-topbar);
  z-index: var(--z-sticky);
  padding-block: var(--sp-2);
  margin-bottom: var(--sp-4);
  background: rgba(15, 18, 24, .94);
  border-bottom: 1px solid var(--line);
}
.anchornav::-webkit-scrollbar { display: none; }
.anchornav a { white-space: nowrap; font-size: 13.5px; color: var(--txt-2); }
.anchornav a:hover { color: var(--acc-400); }
@media (min-width: 1024px) { .anchornav { top: var(--h-head); } }

/* 锚点跳转后标题短暂高亮（纯 CSS） */
.panel:target > h2,
.sec:target > .sec-head > h2 { color: var(--acc-400); }

/* --------------------------------------------------------------------------
   分页
   -------------------------------------------------------------------------- */
.pager { display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center; margin-top: var(--sp-4); }
.pager a, .pager span {
  min-height: 36px;
  padding: 6px 13px;
  border-radius: var(--r-sm);
  background: var(--bg-3);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 13.5px;
  color: var(--txt-2);
}
.pager a:hover { color: var(--acc-400); box-shadow: inset 0 0 0 1px var(--acc-400); }
.pager .is-on { color: var(--acc-400); box-shadow: inset 0 0 0 1px var(--acc-400); }
