/* ── V2 视频播放页 · 腾讯视频详情页风 ── */

/* .rt-page 默认 display:none；加 .active 才显示 */
#page-video-play {
  flex-direction: column;
  height: 100%;
  background: #0a0a0b;
  overflow: hidden;
  color: #fff;
}
#page-video-play.active { display: flex; }

/* ── 顶部 player 16:9 ── */
.vp-stage {
  width: 100%; aspect-ratio: 16/9;
  background: #000; position: relative; flex-shrink: 0;
}
.vp-video { width: 100%; height: 100%; display: block; background: #000; object-fit: contain; }
.vp-back {
  position: absolute;
  top: calc(10px + env(safe-area-inset-top, 0px));
  left: 12px; z-index: 5;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-radius: 50%;
  cursor: pointer;
}
.vp-back:active { transform: scale(0.92); }

.vp-loading {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; z-index: 2;
  color: rgba(255,255,255,0.75); font-size: 13px;
  pointer-events: none;
}
.vp-spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(255,255,255,0.15);
  border-top-color: #fff; border-radius: 50%;
  animation: vpSpin 0.9s linear infinite;
}
@keyframes vpSpin { to { transform: rotate(360deg); } }
.vp-err {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #ef4444; font-size: 13px;
  padding: 30px; text-align: center; z-index: 3;
  background: rgba(0,0,0,0.85);
}
.vp-err__icon { font-size: 36px; margin-bottom: 12px; opacity: 0.7; }
.vp-err__retry {
  margin-top: 14px;
  padding: 7px 22px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 99px;
  color: #fff; font-size: 12px; cursor: pointer;
}

/* ── 滚动主体 ── */
.vp-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 30px; scrollbar-width: none; -ms-overflow-style: none; }
.vp-body::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* ── Tabs (详情/二创/讨论) ── */
.vp-tabs {
  display: flex; align-items: center;
  padding: 14px 16px 10px; gap: 22px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.vp-tab {
  position: relative;
  font-size: 16px; font-weight: 700;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
}
.vp-tab.active { color: #fff; }
.vp-tab.active::after {
  content: ''; position: absolute;
  left: 50%; bottom: -10px;
  transform: translateX(-50%);
  width: 14px; height: 2.5px;
  background: #fff; border-radius: 2px;
}
.vp-tab__count {
  position: absolute;
  top: -8px; right: -22px;
  background: #ef4444; color: #fff;
  font-size: 9px; font-weight: 700;
  padding: 1px 5px;
  border-radius: 99px;
  line-height: 1.3;
}

/* ── 详情卡 ── */
.vp-detail {
  display: flex; gap: 12px;
  padding: 14px 16px 12px;
}
.vp-detail__poster {
  width: 86px; height: 120px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  position: relative;
}
.vp-detail__poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vp-detail__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.vp-detail__title-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.vp-detail__title {
  font-size: 19px; font-weight: 800;
  color: #fff; line-height: 1.2;
  word-break: break-word;
}
.vp-detail__lang {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px;
  background: rgba(255,255,255,0.08);
  border-radius: 5px;
  font-size: 11px; color: rgba(255,255,255,0.7);
}
.vp-detail__meta {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
}
.vp-detail__meta-more {
  color: rgba(255,255,255,0.85);
  margin-left: 2px;
}
.vp-detail__ratings {
  display: flex; align-items: center; gap: 8px;
  margin-top: 2px;
}
.vp-rating {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: rgba(255,255,255,0.65);
}
.vp-rating__badge {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 800;
  padding: 1px 4px; border-radius: 3px; color: #fff;
}
.vp-rating__badge--g { background: #34a853; }
.vp-rating__badge--d { background: #00b51d; }
.vp-rating__score { color: #ffaa00; font-weight: 700; font-size: 12px; }
.vp-detail__rank {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 4px;
  padding: 4px 12px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  font-size: 11px; color: rgba(255,255,255,0.7);
  align-self: flex-start;
}
.vp-detail__rank-fire { color: #ff6b3b; }

/* ── 5 个 action 按钮 ── */
.vp-actions {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 4px 0 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.vp-actions__btn {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 8px 0;
  color: rgba(255,255,255,0.75); font-size: 11px;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.vp-actions__btn:active { transform: scale(0.94); }
.vp-actions__btn svg { width: 22px; height: 22px; stroke-width: 1.8; }

/* ── 相关 / 系列 ── */
.vp-related { padding: 14px 14px 0; }
.vp-related__title {
  font-size: 15px; font-weight: 700;
  color: #fff; margin-bottom: 12px;
}
.vp-related__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.vp-rel-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s;
}
.vp-rel-card:active { transform: scale(0.98); }
.vp-rel-card__thumb {
  width: 100%; aspect-ratio: 16/9;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  position: relative; overflow: hidden;
}
.vp-rel-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vp-rel-card__dur {
  position: absolute; bottom: 5px; right: 5px;
  background: rgba(0,0,0,0.75); color: #fff;
  font-size: 9px; padding: 2px 6px; border-radius: 3px;
}
.vp-rel-card__rating {
  position: absolute; bottom: 5px; right: 5px;
  background: rgba(0,0,0,0.75);
  color: #ffaa00; font-size: 10px; font-weight: 800;
  padding: 2px 6px; border-radius: 3px;
}
.vp-rel-card__playing {
  position: absolute; top: 5px; left: 5px;
  background: linear-gradient(135deg, #ec4899, #a855f7);
  color: #fff; font-size: 9px; font-weight: 700;
  padding: 2px 7px; border-radius: 3px;
}
.vp-rel-card__title {
  padding: 8px 9px 10px;
  font-size: 12px; color: rgba(255,255,255,0.92);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1; -webkit-box-orient: vertical;
  overflow: hidden;
}
.vp-related__empty {
  text-align: center;
  padding: 30px 14px;
  color: rgba(255,255,255,0.35);
  font-size: 12px;
}
