/* 沉浸式全屏层：竖向滑更多视频 / 左右切集 / 点击暂停 / 播完自动下一集（全程不跳页） */
.wo {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: #06060a;
  overscroll-behavior: none;
}

.wo[hidden] { display: none; }

body.wo-open { overflow: hidden; }

/* 自家 LOGO 角标（右下，半透明） */
.hg-wm {
  position: absolute;
  right: 72px;
  bottom: 200px;
  z-index: 6;
  pointer-events: none;
  user-select: none;
  opacity: .62;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .6));
}

.hg-wm img {
  display: block;
  height: 55px !important;
  width: auto !important;
  max-width: none !important;
}

/* 详情页播放器里的角标：放右上角，避开原生控件条与画面主体 */
.hg-wm--player {
  right: 14px;
  top: 12px;
  bottom: auto;
  z-index: 3;
  opacity: .62;
}

.hg-wm--player img { height: 65px !important; }

@media (max-width: 380px) {
  .wo-item .hg-wm { right: 66px; bottom: 190px; }
  .wo-item .hg-wm img { height: 44px; }
}

/* 竖向滑动容器 */
.wo-track {
  height: 100%;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

.wo-track::-webkit-scrollbar { display: none; }

.wo-item {
  position: relative;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
  touch-action: pan-y;
}

/* 桌面：居中竖屏一列 */
@media (min-width: 900px) {
  .wo-item {
    max-width: 560px;
    margin: 0 auto;
  }
}

.wo-video {
  position: absolute;
  inset: 0;
}

.wo-video video {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
  background: #000;
  display: block;
}

.wo-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, .5) 0%, transparent 18%, transparent 60%, rgba(0, 0, 0, .84) 100%);
}

/* 播放/暂停提示：规格与首页 .ff-playicon 完全一致
   （用 .wo-item 前缀压过 common.css 的 button:not(.hg-btn){background-color:unset}） */
.wo-item .wo-play {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  z-index: 4;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, .42);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s ease;
  backdrop-filter: blur(2px);
}

.wo-item.is-paused .wo-play { opacity: 1; }

/* 每个 item 的信息 */
.wo-info {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  z-index: 4;
  pointer-events: none;
}

.wo-info h2 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .7);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wo-eprow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, .72);
  pointer-events: auto;
}

.wo-eptag {
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .42);
  border: 1px solid rgba(255, 255, 255, .16);
  white-space: nowrap;
}

/* 固定顶部 */
.wo-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  background: linear-gradient(180deg, rgba(0, 0, 0, .55), transparent);
  pointer-events: none;
}

.wo-top > * { pointer-events: auto; }

@media (min-width: 900px) {
  .wo-top { max-width: 560px; margin: 0 auto; left: 0; right: 0; }
}

.wo-close {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.wo-brand {
  flex: 1;
  min-width: 0;
  color: rgba(255, 255, 255, .82);
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wo-link {
  flex: none;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
}

/* 固定右侧操作 */
.wo-acts {
  position: absolute;
  right: 12px;
  bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.wo-act {
  width: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .7);
}

.wo-act svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: rgba(255, 255, 255, .92);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .5));
}

.wo-act:active svg { transform: scale(.9); }

/* 固定底部进度条（抬高到安全区之上） */
.wo-progress {
  position: absolute;
  left: 0;
  right: 0;
  margin: 0 auto;
  max-width: 560px;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  z-index: 20;
  height: 22px;
  padding-top: 9px;
  display: flex;
  align-items: flex-end;
}

/* 桌面：进度条与右侧操作贴着 560px 的视频列 */
@media (min-width: 900px) {
  .wo-acts {
    right: calc(50% - 280px + 10px);
  }
}

.wo-progress input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  margin: 0;
  background: rgba(255, 255, 255, .3);
  outline: none;
  cursor: pointer;
  transition: height .12s ease;
}

.wo-progress input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 0;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .4);
}

.wo-progress input[type=range]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: #fff;
}

.wo.is-seeking .wo-progress input[type=range] { height: 4px; }
.wo.is-seeking .wo-progress input[type=range]::-webkit-slider-thumb { width: 14px; height: 14px; }

/* 选集抽屉 */
.wo-eps {
  position: fixed;
  inset: 0;
  z-index: 9100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.wo-eps[hidden] { display: none; }

.wo-eps__mask {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(0, 0, 0, .6);
}

.wo-eps__panel {
  position: relative;
  width: min(560px, 100%);
  max-height: 72vh;
  display: flex;
  flex-direction: column;
  background: #16161a;
  border-radius: 18px 18px 0 0;
  border: 1px solid rgba(255, 255, 255, .08);
  border-bottom: 0;
  padding: 14px 16px calc(16px + env(safe-area-inset-bottom, 0px));
}

.wo-eps__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.wo-eps__head span { color: rgba(255, 255, 255, .45); font-weight: 400; font-size: 12px; }

.wo-eps__close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  cursor: pointer;
}

.wo-eps__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 10px;
  overflow-y: auto;
  max-height: 54vh;
}

.wo-ep {
  padding: 12px 6px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .05);
  color: rgba(255, 255, 255, .86);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wo-ep:hover { border-color: rgba(240, 38, 60, .5); background: rgba(240, 38, 60, .12); }

.wo-ep.is-active {
  background: linear-gradient(90deg, #ff3b4f, #c3122e);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}

.wo-toast {
  position: fixed;
  left: 50%;
  top: 14%;
  transform: translateX(-50%) translateY(-8px);
  z-index: 9200;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .85);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  max-width: 80vw;
  text-align: center;
}

.wo-toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 详情页入口按钮 */
.hg-web-play__action--immersive {
  border-color: rgba(240, 38, 60, .45) !important;
  color: #ff5d6d !important;
}

.hg-web-play__action--immersive:hover {
  background: rgba(240, 38, 60, .12) !important;
}
