/* 播放页与剧集详情页。短剧是 9:16 竖版,播放器宽度锁死,别让它铺满宽屏。 */
.watch-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  max-width: 1060px;
  margin: 0 auto;
}

@media (min-width: 920px) {
  .watch-layout {
    grid-template-columns: 390px 1fr;
    gap: 32px;
    align-items: start;
  }
}

.player-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.player-box {
  position: relative;
  width: 100%;
  max-width: 372px;
  aspect-ratio: 9 / 16;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 18px 48px -18px rgba(0, 0, 0, 0.95);
}

.player-box::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}

.player-controls-bar {
  width: 100%;
  max-width: 372px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.nav-ep-btn {
  flex: 1;
  padding: 9px 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: background 0.18s, border-color 0.18s;
}

.nav-ep-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.nav-ep-btn.disabled { opacity: 0.3; pointer-events: none; }

.ep-counter {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
  padding: 0 4px;
}

/* ---------- 字幕切换 ---------- */
.sub-bar {
  width: 100%;
  max-width: 372px;
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.79rem;
  color: var(--text-dim);
}

.sub-chips { display: flex; gap: 6px; }

.sub-chip {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.sub-chip:hover { color: var(--text); border-color: var(--border-lit); }

.sub-chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ---------- 右栏信息 ---------- */
.info-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.back-link {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.18s;
}

.back-link:hover { color: var(--primary); }

.drama-header h1 {
  font-size: clamp(1.2rem, 2.6vw, 1.45rem);
  font-weight: 800;
  margin-bottom: 10px;
}

.drama-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.drama-synopsis {
  font-size: 0.9rem;
  color: #c9c9d2;
  line-height: 1.65;
}

/* ---------- 选集 ---------- */
.ep-drawer {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.ep-drawer-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.ep-drawer-header h3 { font-size: 0.98rem; font-weight: 700; }

.ep-drawer-hint { font-size: 0.79rem; color: var(--text-dim); }

.ep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
  gap: 7px;
  max-height: 290px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-lit) transparent;
}

.ep-grid::-webkit-scrollbar { width: 6px; }
.ep-grid::-webkit-scrollbar-thumb { background: var(--border-lit); border-radius: 3px; }

.ep-btn {
  aspect-ratio: 1;
  background: var(--bg-elev-2);
  border: 1px solid transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s, color 0.16s, border-color 0.16s;
}

.ep-btn:hover { border-color: var(--primary); color: var(--text); }

.ep-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ---------- 详情页头图 ---------- */
.detail-hero {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 18px;
  margin-bottom: 30px;
}

@media (min-width: 640px) {
  .detail-hero { grid-template-columns: 208px 1fr; gap: 28px; }
}

.detail-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elev);
  box-shadow: 0 14px 34px -14px rgba(0, 0, 0, 0.9);
}

.detail-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.detail-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }

.detail-info { min-width: 0; }

.detail-info h1 {
  font-size: clamp(1.25rem, 3.2vw, 1.7rem);
  font-weight: 800;
  margin-bottom: 10px;
}

.btn-play-hero {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 0 8px 22px -8px rgba(255, 45, 85, 0.8);
  transition: background 0.18s, transform 0.18s;
}

.btn-play-hero:hover { background: var(--primary-hi); transform: translateY(-1px); }

@media (max-width: 680px) {
  .detail-hero { grid-template-columns: 112px 1fr; gap: 14px; }
  .btn-play-hero { width: 100%; justify-content: center; }
}
