/* ===========================================================
   漫境 AiReelToon · 竖屏追剧播放器样式（共享）
   =========================================================== */

/* body 播放器打开时隐藏页面滚动 */
body.pl-open { overflow: hidden; }

.player {
  position: fixed; inset: 0; z-index: 120; background: #000;
  display: none; flex-direction: column;
}
.player.on { display: flex; }
.pl-stage { position: relative; flex: 1; overflow: hidden; background: #000; }

/* 每集一屏，纵向滚动吸附 */
.pl-scroll { position: absolute; inset: 0; overflow-y: scroll; scroll-snap-type: y mandatory; -webkit-overflow-scrolling: touch; }
.pl-scroll::-webkit-scrollbar { display: none; }
.pl-slide { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; }
.pl-slide .bgimg { position: absolute; inset: 0; }
.pl-slide .bgimg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.5) 0%, rgba(0,0,0,.05) 25%, rgba(0,0,0,.1) 55%, rgba(0,0,0,.86) 100%);
}
/* 中心「播放中」提示 */
.pl-center {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  font-size: 54px; opacity: .9; pointer-events: none;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: .28; transform: translate(-50%,-50%) scale(.9);} 50% { opacity: .75; transform: translate(-50%,-50%) scale(1);} }

/* ── 真实视频层 ── */
.pl-slide .pl-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; background: #000; z-index: 1;
  opacity: 0; transition: opacity .35s ease;
}
.pl-slide .pl-video.ready { opacity: 1; }
/* 装载失败时隐藏视频层，露出下方渐变占位 */
.pl-slide .pl-video.pl-video-fail { display: none; }

/* 视频上方的暗角，保证文字可读（压在视频层之上） */
.pl-slide .pl-video ~ .pl-prog,
.pl-slide .pl-video ~ .pl-info,
.pl-slide .pl-video ~ .pl-acts,
.pl-slide .pl-video ~ .pl-playpulse { z-index: 2; }

/* 视频就绪后，隐藏原来的中心脉冲提示（改用点击暂停提示） */
.pl-slide:has(.pl-video.ready) .pl-playpulse { opacity: 0; pointer-events: none; }

/* 暂停指示 */
.pl-playpulse {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  font-size: 58px; opacity: .85; pointer-events: none; z-index: 3;
  transition: opacity .2s ease;
  filter: drop-shadow(0 4px 18px rgba(0,0,0,.6));
}
.pl-slide.paused .pl-playpulse { opacity: .95; }
.pl-slide.paused .pl-playpulse::after {
  content: ''; position: absolute; inset: -26px;
  border: 2px solid rgba(255,255,255,.5); border-radius: 50%;
}
.pl-tag-hd { background: var(--brand) !important; color: #fff !important; font-weight: 700; }

/* 假进度条 */
.pl-prog { position: absolute; left: 0; right: 0; top: 0; height: 2.5px; background: rgba(255,255,255,.18); z-index: 4; }
.pl-prog i { display: block; height: 100%; background: var(--brand); width: 0; transition: width .3s linear; }
/* 真实视频进度不做平滑补间，避免回读跳动 */
.pl-slide:has(.pl-video) .pl-prog i { transition: none; }

/* 右侧操作栏 */
.pl-acts {
  position: absolute; right: 12px; bottom: 130px; z-index: 6;
  display: flex; flex-direction: column; gap: 20px; align-items: center;
}
.pl-act { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 10.5px; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.pl-act .b {
  width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 21px; background: rgba(255,255,255,.12); backdrop-filter: blur(8px); transition: .16s;
}
.pl-act:active .b { transform: scale(.9); }
.pl-act.liked .b { background: rgba(255,46,77,.9); }
.pl-act .av { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg,var(--purple),var(--brand)); display: flex; align-items: center; justify-content: center; font-size: 22px; border: 2px solid #fff; }

/* 左下信息 */
.pl-info { position: absolute; left: 16px; right: 84px; bottom: 118px; z-index: 6; }
.pl-title { font-size: 18px; font-weight: 800; margin-bottom: 8px; text-shadow: 0 2px 10px rgba(0,0,0,.7); }
.pl-desc { font-size: 13px; color: #dcdce6; line-height: 1.6; margin-bottom: 12px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pl-tags { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 10px; }
.pl-tag { font-size: 11px; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.16); backdrop-filter: blur(6px); }
.pl-epnum { font-size: 12.5px; color: #cfcfda; }

/* 底部剧集选择条 */
.pl-bottom {
  position: relative; z-index: 8; padding: 12px 14px calc(14px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(0deg, rgba(0,0,0,.94), rgba(0,0,0,.6));
}
.pl-epstrip { display: flex; gap: 8px; overflow-x: auto; }
.pl-epstrip::-webkit-scrollbar { display: none; }
.pl-epbtn {
  flex: 0 0 auto; min-width: 58px; padding: 9px 12px; border-radius: 10px;
  background: rgba(255,255,255,.1); font-size: 12.5px; font-weight: 700; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.pl-epbtn .sub { font-size: 9.5px; opacity: .7; font-weight: 500; }
.pl-epbtn.cur { background: linear-gradient(135deg,var(--brand),var(--brand-2)); }
.pl-epbtn.lock { opacity: .55; }

/* 播放器顶部条 */
.pl-top {
  position: absolute; left: 0; right: 0; top: 0; z-index: 9;
  display: flex; align-items: center; gap: 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 12px;
  background: linear-gradient(180deg, rgba(0,0,0,.72), transparent);
}
.pl-top .bk { font-size: 20px; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; }
.pl-top .ttl { flex: 1; font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-top .coin { display: flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 800; color: var(--gold);
  background: rgba(255,197,61,.16); padding: 5px 11px; border-radius: 999px; }

/* 解锁遮罩 */
.pl-lock {
  position: absolute; inset: 0; z-index: 10; background: rgba(0,0,0,.82); backdrop-filter: blur(6px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; padding: 30px;
}
.pl-lock .lk { font-size: 52px; }
.pl-lock h3 { margin: 0; font-size: 19px; }
.pl-lock p { margin: 0; font-size: 13px; color: var(--txt-2); line-height: 1.7; }
.pl-lock .row { display: flex; gap: 10px; margin-top: 4px; }

/* 评论抽屉 */
.sheet {
  position: fixed; left: 50%; transform: translate(-50%, 100%); bottom: 0;
  width: 100%; max-width: 520px; height: 62vh; z-index: 140;
  background: var(--bg-2); border-radius: 20px 20px 0 0;
  border-top: 1px solid var(--line); display: flex; flex-direction: column;
  transition: transform .3s cubic-bezier(.22,.8,.35,1);
}
.sheet.on { transform: translate(-50%, 0); }
.sheet .hd { display: flex; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.sheet .hd h3 { margin: 0; font-size: 15px; flex: 1; }
.sheet .bd { flex: 1; overflow-y: auto; padding: 8px 18px 20px; }
.cmt { display: flex; gap: 12px; padding: 13px 0; }
.cmt .av { width: 36px; height: 36px; border-radius: 50%; background: var(--bg-3); display: flex; align-items: center; justify-content: center; font-size: 17px; flex: 0 0 auto; }
.cmt .cc { flex: 1; min-width: 0; }
.cmt .un { font-size: 12.5px; color: var(--txt-2); margin-bottom: 5px; }
.cmt .ct { font-size: 13.5px; line-height: 1.6; }
.cmt .cl { font-size: 11.5px; color: var(--txt-3); margin-top: 7px; display: flex; gap: 16px; }
.sheet .ft { padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); display: flex; gap: 10px; }
.sheet .ft input { flex: 1; background: var(--bg-3); border: 1px solid var(--line); border-radius: 999px; padding: 11px 16px; color: #fff; font-size: 13.5px; outline: 0; font-family: inherit; }
.sheet .ft button { padding: 0 18px; border-radius: 999px; background: linear-gradient(135deg,var(--brand),var(--brand-2)); font-size: 13.5px; font-weight: 700; }

/* 网站版：播放器居中竖屏形态（手机全屏，桌面居中竖条） */
@media (min-width: 861px) {
  .player { left: 50%; transform: translateX(-50%); width: 430px; box-shadow: 0 30px 90px rgba(0,0,0,.7); }
  .player .sheet { left: 50%; }
}
