/* ==========================================================================
   播放页（vod/play）专属。参考站播放页进不去（对方防护会导走），使用者 2026-11-19 定案 Q4(A)：
     沿用底稿 tp57 的结构、视觉换成深色橘：版心宽、紧贴顶栏：左播放器（黑、16:9）＋右栏 315（#22212f、跟播放器一样高）——
     右栏只放「猜你喜欢」横图小卡、自己捲动；
     播放器下方片名列：片名白字 24 ＋ 橘色集名、右侧一排灰色图示工具钮 → 资讯条 → 两行简介 → 面包屑 → 播放列表（整宽）→ 评论。
   DOM 里片名列排在播放器前面（h1 要比右栏的 h2 先出现），画面上用 order 排到下方。
   ========================================================================== */

.play-main { padding-bottom: 0; }

/* 播放带：背景横跨整个视窗、内容（播放器＋右栏、片名列、播放列表）留在 1200 版心（2026-11-25 使用者要求，照底稿 tp53：
   当初 tp53 先放宽到 1600，同日改回「跟下面一致」，只留背景满版）。背景＝本片海报放大模糊压暗、往下淡进页底，
   跟详情页一样从页顶开始垫在透明顶栏底下（.play-main 不让位，改由 .play-stage 自己 padding-top）。
   裁切模糊边缘交给 .play-stage-bg 自己 overflow:hidden，不放在 .play-stage 上——那会把分享、报错这类浮层一起裁掉。 */
.play-main:has(> .play-stage) { padding-top: 0; }
.play-stage {
    --play-aside-w: 315px;
    position: relative;
    isolation: isolate;
    padding-top: var(--topbar-h);
    margin-bottom: var(--section-gap);
}
.play-stage-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}
.play-stage-bg::before,
.play-stage-bg::after { content: ""; position: absolute; }
.play-stage-bg::before {
    inset: -60px;
    background-image: inherit;
    background-color: var(--bg-deep);
    background-repeat: no-repeat;
    background-position: center 30%;
    background-size: cover;
    filter: blur(32px) brightness(0.5) saturate(1.3);
}
/* 上缘压暗给透明顶栏，播放器一带维持海报色，片名列以下渐渐融进页底（播放列表一长就完全是页底色） */
.play-stage-bg::after {
    inset: 0;
    background: linear-gradient(180deg,
        rgba(18, 17, 28, 0.55) 0,
        rgba(41, 40, 56, 0.35) calc(var(--topbar-h) + 120px),
        rgba(41, 40, 56, 0.6) calc(var(--topbar-h) + 560px),
        var(--bg-base) calc(var(--topbar-h) + 900px));
}
.play-stage-bg { background-size: 0 0; }   /* 行内 background-image 只给 ::before 继承用，本体不画 */
.play-stage-inner {
    display: flex;
    flex-direction: column;
    max-width: calc(var(--content-max) + var(--page-pad) * 2);
    margin: 0 auto;
    padding: 0 var(--page-pad);
}
/* 播放器决定高度，右栏 position:absolute 脱离高度计算、自己捲动（§17.30） */
.play-box {
    order: 1;
    position: relative;
    background: #000;
}
/* position＋z-index 0 自成一个疊層：播放器内部元素常带很大的 z-index，不圈住会盖过固定顶栏（捲动时实测） */
.player-wrap {
    position: relative;
    z-index: 0;
    width: calc(100% - var(--play-aside-w));
    overflow: hidden;
    background: #000;
}
/* 提示条：播放器上方一条深色细条、灰字 */
.player-tips {
    height: 32px;
    padding: 0 15px;
    background: #111;
    color: #999;
    font-size: 13px;
    line-height: 32px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.player-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
}
.player-box > iframe,
.player-box > div {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* ---------- 右栏：猜你喜欢（跟播放器一样高，清单自己捲动） ---------- */
.play-aside {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: var(--play-aside-w);
    display: flex;
    flex-direction: column;
    background: var(--player-panel);
}

/* ---------- 播放列表：片名列下方整宽（同 tp53；样式在 main.css，与详情页同一份 widget） ---------- */
.play-stage-inner > .playlist-section {
    order: 3;
    margin: var(--section-gap) 0 0;
}

.pa-related {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.pa-related-hd {
    flex-shrink: 0;
    padding: 18px 20px 10px;
    font-size: 18px;
    font-weight: 400;
    line-height: 26px;
    color: var(--text-title);
}
.pa-related-list {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 2px 14px 14px;
    list-style: none;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--player-scroll) transparent;
}
.play-aside ::-webkit-scrollbar { width: 4px; background-color: transparent; }
.play-aside ::-webkit-scrollbar-thumb { background-color: var(--player-scroll); border-radius: 2px; }
/* 猜你喜欢小卡：横图缩略 112（圆角 5）＋片名 14 #ddd、地区/年份 #999、更新状态橘字；
   滑过整条浅一阶底、片名变 hover 蓝、缩略图微放大。≤1023 改横滑直版海报卡（见下方响应式） */
.pa-related-item { display: flex; min-width: 0; }
.pa-ri-link {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px;
    border-radius: var(--radius);
    color: var(--text-1);
    transition: background-color 0.2s, color 0.2s;
}
.pa-ri-link:hover { background: var(--bg-muted); color: var(--link-hover); }
.pa-ri-thumb {
    position: relative;
    flex-shrink: 0;
    width: 112px;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-elevated) url("../img/load.gif") no-repeat center/cover;
}
.pa-ri-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.pa-ri-link:hover .pa-ri-thumb img { transform: scale(1.06); }
.pa-ri-info { flex: 1; min-width: 0; }
.pa-ri-name { margin: 0 0 3px; font-size: 14px; font-weight: 400; line-height: 20px; color: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pa-ri-meta { margin: 0 0 5px; font-size: 12px; line-height: 16px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pa-ri-remarks { display: inline-block; max-width: 100%; font-size: 12px; line-height: 18px; color: var(--active); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: top; }

/* ---------- 片名列（播放器下方） ---------- */
.play-info-panel {
    order: 2;
    padding: 22px 0 0;
}
.play-info-panel > .art-breadcrumb { order: 3; margin-top: 12px; }
.play-info-panel { display: flex; flex-direction: column; }
.play-info-bar { order: 1; margin: 0; }

/* 片名白字 24/400 ＋ 橘色集名；右侧工具钮（灰色图示＋小字，滑过橘色） */
.play-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 24px; }
.play-vod-title {
    flex: 1 1 260px;
    min-width: 0;
    margin: 0;
    font-size: 24px;
    font-weight: 400;
    line-height: 32px;
    color: #fff;
    overflow-wrap: anywhere;   /* 不含空格的长英文片名不换行，手机版会撑宽（测试机 9698，2026-10-29） */
}
.play-vod-title a { color: inherit; }
.play-vod-title a:hover { color: var(--link-hover); }
.play-cur-ep { margin-left: 8px; font-size: 20px; font-weight: 400; color: var(--active); }   /* 当前集橘字 */

.player-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 20px;
    margin-left: auto;
}
.ptb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 32px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--text-2);
    font-size: 13px;
    line-height: 20px;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.2s;
}
.ptb-btn .mac-icon { font-size: 20px; }
.ptb-btn:hover { color: var(--active); }
.ptb-btn.is-disabled { color: var(--text-disabled); cursor: not-allowed; pointer-events: none; }

/* 资讯条：豆瓣分＝橘色星号＋橘字 15/700（同详情页评分行）；年份／地区／语言／类型各自一块 #22212f 深色小标签（#ddd 字，滑过橘字），
   多值的「/」留在标签里。原本的竖线 .play-tag-divider 改用间距取代（DOM 留着、只隐藏） */
.play-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--text-1); }
/* inline-block 不用 inline-flex：标签里是「文字＋连结＋/」混排，flex 会把每段拆成各自折行的 item（§17.61）；
   类型很多时整块标签可以在宽度内折行，不撑破手机版 */
.play-tag {
    display: inline-block;
    max-width: 100%;
    padding: 0 10px;
    border-radius: var(--radius);
    background: var(--bg-sub);
    color: var(--text-1);
    line-height: 26px;
}
.play-tag a { color: inherit; }
.play-tag a:hover { color: var(--active); }
.play-tag--score {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 26px;
    padding: 0 4px 0 0;
    background: none;
    color: var(--accent);
    font-size: 15px;
    font-weight: 700;
    line-height: 26px;
}
.play-tag--score::before { content: "★"; font-size: 15px; color: var(--accent); }
.play-tag-divider { display: none; }

/* §17.33：「简介：」标签包进裁切容器；§17.34：只用 line-clamp，不叠字元截断 */
.play-desc { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; }
.play-desc-text {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 14px;
    line-height: 24px;
    color: var(--text-2);
    display: -webkit-box;
    -webkit-line-clamp: 2;       /* 两行收合（tp26 使用者 2026-09-23 指定，沿用） */
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.play-desc.is-open .play-desc-text { -webkit-line-clamp: unset; overflow: visible; }
.play-desc-more { display: flex; align-items: center; flex-shrink: 0; height: 24px; padding: 0; border: 0; background: none; color: var(--text-dim); cursor: pointer; }
.play-desc-more[hidden] { display: none; }   /* tp43 A9：display:flex 会盖掉 [hidden]，短简介也出现展开钮 */
.play-desc-more:hover { color: var(--link-hover); }
.play-desc-more .mac-icon { font-size: 16px; transition: transform 0.2s; }
.play-desc.is-open .play-desc-more .mac-icon { transform: rotate(180deg); }

/* ---------- 下方（评论） ---------- */
.play-bottom-inner {
    max-width: calc(var(--content-max) + var(--page-pad) * 2);
    margin: 0 auto;
    padding: 0 var(--page-pad);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1199px) {
    .play-stage { --play-aside-w: 280px; }
    .pa-ri-thumb { width: 96px; }
    .pa-related-list { padding: 2px 10px 10px; }
}
/* ≤1023：右栏放不下（播放器会被挤到 450 宽）。.play-box 摊平，顺序＝播放器 → 片名列 → 播放列表 → 猜你喜欢（横滑直版小卡） */
@media (max-width: 1023px) {
    .play-stage-inner .play-box { display: contents; }
    .player-wrap { order: 1; width: 100%; }
    .play-info-panel { order: 2; }
    .play-stage-inner > .playlist-section { order: 3; }
    .play-aside { order: 4; position: static; width: 100%; padding: 0; background: none; }
    .pa-related { flex: none; min-height: 0; margin-top: var(--section-gap); }
    .pa-related-hd { margin-bottom: 14px; padding: 0 0 10px; border-bottom: 1px solid var(--border); font-size: 20px; line-height: 28px; }
    /* 横滑直版海报卡：海报圆角 5、下面片名＋更新状态；上下补内距，阴影不被横滑裁掉 */
    .pa-related-list { flex-direction: row; gap: 10px; overflow-x: auto; overflow-y: hidden; margin: -4px 0 -8px; padding: 4px 2px 8px; scrollbar-width: none; }
    .pa-related-list::-webkit-scrollbar { display: none; }
    .pa-related-item { flex: 0 0 116px; }
    .pa-ri-link { flex-direction: column; align-items: stretch; gap: 0; padding: 0; }
    .pa-ri-link:hover { background: none; }
    .pa-ri-thumb { width: 100%; aspect-ratio: var(--poster-ratio); }
    .pa-ri-info { padding: 7px 0 0; }
    .pa-ri-meta { display: none; }
    .pa-ri-name { margin-bottom: 4px; font-size: 13px; }
}
@media (max-width: 767px) {
    .play-stage-inner { padding: 0; }
    .play-info-panel,
    .play-stage-inner > .playlist-section,
    .play-aside { padding-left: var(--page-pad); padding-right: var(--page-pad); }
    .play-info-panel { padding-top: 14px; }
    .play-aside { padding-top: 0; }
    .player-tips { height: 28px; padding: 0 var(--hdr-x); font-size: 12px; line-height: 28px; }
    .play-vod-title { font-size: 19px; line-height: 26px; }
    .play-cur-ep { font-size: 16px; }
    /* 工具钮：一排平均分配，片名在上 */
    .player-toolbar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; width: 100%; margin-left: 0; }
    .ptb-btn { flex-direction: column; gap: 2px; height: 46px; font-size: 11px; }
    .ptb-btn .mac-icon { font-size: 20px; }
    .play-tags { gap: 6px; font-size: 12px; }
    .play-tag { line-height: 24px; }
    .play-tag--score { height: 24px; line-height: 24px; }
    .play-tag { padding: 0 10px; }
}
