/* ==========================================================================
   播放页（vod/play）专属。2026-11-09 使用者要求：播放带横跨整个视窗（底色＝海报模糊压暗，同详情页），
     里面「播放器＋右栏猜你喜欢」（版式同 tp49），播放器＋右栏跟下方面板同宽（版心 1170）→
     信息面板（面包屑 → 片名 16＋「· 第N集」、右侧一排 #444 工具方钮 → 资讯条 → 两行简介）→
     播放列表面板（widget/playlist，样式在 main.css）→ 评论。（原本下方的猜你喜欢卡片网格移进右栏）
   ========================================================================== */

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

/* ---------- 播放带（横跨整个视窗；宽度用父层 100%，不用 100vw） ---------- */
.play-stage {
    --play-aside-w: 320px;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 0 0 var(--section-gap);   /* 上方不留：播放器直接接在顶栏下（2026-11-09 使用者：顶栏和播放器之间空白太多） */
    margin-bottom: var(--section-gap);
    background: var(--bg-base);
}
.play-stage-bg {
    position: absolute;
    inset: -60px;
    z-index: -1;
    background-color: var(--bg-elevated);
    background-repeat: no-repeat;
    background-position: center 30%;
    background-size: cover;
    filter: blur(28px) brightness(0.45) saturate(1.3);
    pointer-events: none;
}
.play-stage::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.35) 80%, var(--bg-base) 100%);
}
.play-stage-inner {
    max-width: calc(var(--content-max) + var(--page-pad) * 2);   /* 跟下方信息面板同宽（2026-11-09 使用者要求；原本最宽 1600） */
    margin: 0 auto;
    padding: 0 var(--page-pad);
}
/* 播放器决定高度，右栏 position:absolute 脱离高度计算、自己捲动（§17.30，同 tp49） */
.play-box {
    position: relative;
    overflow: hidden;
    border-radius: 0 0 var(--radius) var(--radius);   /* 上缘贴顶栏，只留下方圆角 */
    background: var(--bg-panel);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
/* position＋z-index 0 自成一个疊層：播放器内部元素常带很大的 z-index，不圈住会盖过固定顶栏（捲动时实测） */
.player-wrap {
    position: relative;
    z-index: 0;
    width: calc(100% - var(--play-aside-w));
    overflow: hidden;
    background: #000;
}

/* ---------- 右栏「猜你喜欢」（widget/play_related_item）：左 16:9 横图＋片名／地区年份／备注 ---------- */
.play-aside {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: var(--play-aside-w);
    display: flex;
    flex-direction: column;
    padding: 0 0 10px;
}
.pa-related-hd {
    flex-shrink: 0;
    height: 36px;   /* 跟左边「正在播放」提示条同高、同一条线 */
    padding: 0 15px;
    font-size: 16px;
    line-height: 36px;
    color: var(--text-title);
}
.pa-related-list {
    flex: 1;
    min-height: 0;
    margin: 0;
    padding: 4px 5px 0;
    list-style: none;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--bg-card) transparent;
}
.pa-related-list::-webkit-scrollbar { width: 4px; background-color: transparent; }
.pa-related-list::-webkit-scrollbar-thumb { background-color: var(--bg-card); border-radius: 2px; }
.pa-related-item { display: flex; min-width: 0; }
.pa-ri-link {
    flex: 1;
    min-width: 0;
    display: flex;
    gap: 10px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    color: var(--text-1);
}
.pa-ri-link:hover { background: var(--bg-card); color: var(--active); }
.pa-ri-thumb {
    position: relative;
    flex-shrink: 0;
    width: 45%;
    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; }
.pa-ri-info { flex: 1; min-width: 0; padding-top: 2px; }
.pa-ri-name { margin: 0 0 4px; font-size: 14px; line-height: 20px; color: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pa-ri-meta { margin: 0 0 2px; font-size: 12px; line-height: 18px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pa-ri-remarks { display: block; max-width: 100%; font-size: 12px; line-height: 18px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 提示条：面板底色、12px 灰字，跟黑色影片区分开 */
.player-tips {
    height: 36px;
    padding: 0 15px;
    background: var(--bg-panel);
    color: var(--text-dim);
    font-size: 13px;
    line-height: 36px;
    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-bottom-inner {
    max-width: calc(var(--content-max) + var(--page-pad) * 2);
    margin: 0 auto;
    padding: 0 var(--page-pad);
}
/* 信息面板、播放列表面板：#333 圆角面板（猜你喜欢是 .section、评论是 .detail-section，main.css 已是面板） */
.play-info-panel,
.play-content > .playlist-section {
    margin-bottom: var(--section-gap);
    padding: var(--panel-pad);
    border-radius: var(--radius);
    background: var(--bg-panel);
}
.play-content > .section { width: 100%; max-width: none; }
.play-info-panel > .art-breadcrumb { margin-bottom: 12px; }

/* 片名 16 ＋「· 第N集」；右侧工具钮（参考站「接口／收藏／刷新／全屏／上集／下集」一排 #444 方钮） */
.play-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 20px; }
.play-vod-title {
    flex: 1 1 260px;
    min-width: 0;
    margin: 0;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    color: var(--text-title);
    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: 4px; font-size: inherit; font-weight: 400; color: var(--text-1); }
.play-cur-ep::before { content: "· "; }

.player-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-left: auto;
}
.ptb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 64px;
    height: 32px;
    padding: 0 12px;
    border: 0;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-1);
    font-size: 14px;
    line-height: 20px;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.2s;
}
.ptb-btn .mac-icon { display: none; }
.ptb-btn:hover { color: var(--active); }
/* 停用（已是第一集／最后一集）：参考站 #666 字 */
.ptb-btn.is-disabled { color: var(--text-disabled); cursor: not-allowed; pointer-events: none; }

/* 资讯条：分数金字＋年份 · 地区 · 语言 · 类型 */
.play-info-bar { margin: 0; }
.play-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; margin-top: 10px; font-size: 13px; color: var(--text-dim); }
.play-tag + .play-tag::before { content: "·"; margin: 0 8px; color: var(--text-dim); }
.play-tag a { color: var(--text-1); }
.play-tag a:hover { color: var(--link-hover); }
.play-tag--score { color: var(--accent); font-size: 14px; font-weight: 400; }
.play-tag-divider { display: inline-block; width: 1px; height: 12px; margin: 0 10px; background: var(--border); }

/* §17.33：「简介：」标签包进裁切容器；§17.34：只用 line-clamp，不叠字元截断 */
.play-desc { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; }
.play-desc-text {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 14px;
    line-height: 22px;
    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: 22px; padding: 0; border: 0; background: none; color: var(--text-1); 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); }

/* ---------- 响应式 ---------- */
@media (max-width: 1199px) {
    .play-stage { --play-aside-w: 280px; }
}
/* ≤1023：右栏放不下（播放器会被挤到 450 宽），改排在播放器下方、横向滑动的直版小卡（同 tp49 手机） */
@media (max-width: 1023px) {
    .player-wrap { width: 100%; }
    .play-aside { position: static; width: 100%; padding: 0 0 12px; }
    .pa-related-hd { height: auto; padding: 12px var(--panel-pad-x) 8px; line-height: 22px; }
    .pa-related-list { display: flex; gap: 10px; overflow-x: auto; overflow-y: hidden; padding: 0 var(--panel-pad-x); scrollbar-width: none; }
    .pa-related-list::-webkit-scrollbar { display: none; }
    .pa-related-item { flex: 0 0 110px; }
    .pa-ri-link { flex-direction: column; gap: 6px; padding: 0; }
    .pa-ri-link:hover { background: none; }
    .pa-ri-thumb { width: 100%; aspect-ratio: var(--poster-ratio); }
    .pa-ri-meta { display: none; }
    .pa-ri-name { margin-bottom: 2px; font-size: 13px; }
}
@media (max-width: 767px) {
    .play-stage { padding: 0 0 4px; margin-bottom: var(--section-gap); }
    .play-stage-inner { padding: 0; }
    .play-box { border-radius: 0; box-shadow: none; }
    .player-tips { height: 30px; padding: 0 var(--hdr-x); font-size: 12px; line-height: 30px; }
    /* 工具钮：一排四个、等宽，片名在上 */
    .player-toolbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; width: 100%; margin-left: 0; }
    .ptb-btn { min-width: 0; padding: 0 4px; font-size: 13px; }
}
