/* 直播详情页（type=zb）：沿用视频页的深色沉浸风格（顶栏、底栏、作者、关注都复用 video.css）
   和视频页不同的是页面可以上下滚：播放区固定 16:9 在上，下面是主播、标题、公告和评论 */

body.lv-page { height: auto; min-height: 100%; overflow: auto; background: #0B0B0C; }
html.vd body.lv-page { overflow-y: auto; }
.lv { padding: calc(48px + env(safe-area-inset-top)) 0 calc(var(--vd-act-h) + env(safe-area-inset-bottom) + 8px); }
.lv .vd-tip { position: fixed; }

/* 顶栏在直播页不浮在画面上，给一个实底，滚动时不会和内容叠在一起 */
.lv-page .vd-bar { background: #0B0B0C; pointer-events: auto; }

/* ===== 播放区 ===== */
.lv-player { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.lv-cover { position: absolute; inset: -30px; background: center / cover no-repeat; filter: blur(26px) brightness(.5) saturate(1.15); transform: scale(1.08); }
/* 封面原比例居中，不裁；背后垫的是同一张图的模糊放大 */
.lv-still { position: absolute; left: 0; top: 50%; width: 100%; height: auto; max-height: 100%; object-fit: contain; transform: translateY(-50%); }
/* 未开始 / 暂停 / 已结束：封面压暗，提示文字压在上面看得清 */
.lv-player.is-off .lv-still { filter: brightness(.55); }
/* 直播中：video 没有 poster，出画面前是透明的，露出下面的封面；出画面后盖住 */
.lv-player video { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: contain; background: transparent; }
.lv-player .vd-state { top: 50%; }
.lv-player.paused .vd-play { display: grid; animation: vdPop .18s ease; }
.lv-player.waiting .vd-spin { display: block; }
.lv-player.failed .vd-err { display: block; }
.lv-player.failed .vd-play, .lv-player.failed .vd-spin { display: none; }

/* 未开始 / 暂停 / 已结束：封面压暗 + 居中提示 */
.lv-tip { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  /* 封面不再模糊：提示后面垫一圈居中的暗色晕染，压在封面文字上也看得清 */
  background: radial-gradient(ellipse 62% 58% at 50% 50%, rgba(0, 0, 0, .62), rgba(0, 0, 0, 0) 100%);
  color: var(--vd-ink-2); text-align: center; }
.lv-tip svg { width: 44px; height: 44px; margin-bottom: 4px; color: var(--vd-ink-2); }
.lv-tip b { font-size: 16px; font-weight: 600; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.lv-tip span { font-size: 13px; color: var(--vd-ink-2); text-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
/* 已结束：不放图标，只用文字，字号放大一点撑住画面 */
.lv-tip-end { gap: 8px; }
.lv-tip-end b { font-size: 18px; letter-spacing: 1px; }

/* 左上角状态角标：直播中红底 + 呼吸点；其余灰底 */
.lv-badge { position: absolute; left: 10px; top: 10px; z-index: 2; display: flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px; border-radius: 4px; background: rgba(0, 0, 0, .5); color: #fff; font-size: 12px; font-weight: 600; }
.lv-badge i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .7); }
.lv-badge.s4 { background: var(--brand); }
.lv-badge.s4 i { background: #fff; animation: lvBreath 1.2s ease-in-out infinite; }
@keyframes lvBreath { 50% { opacity: .25; transform: scale(.7); } }
/* 观看人数：跟在角标右边 */
.lv-num { position: absolute; left: 10px; top: 10px; z-index: 1; display: flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px 0 calc(var(--badge-w, 64px) + 6px); border-radius: 4px; background: rgba(0, 0, 0, .45);
  color: var(--vd-ink-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.lv-num svg { width: 13px; height: 13px; }
.lv-num em { font-style: normal; }

/* 开声音 / 全屏 */
.lv-unmute { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 2; display: flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px; border-radius: 15px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 13px; white-space: nowrap;
  animation: lvFadeIn .3s ease; }
.lv-unmute svg { flex: none; width: 16px; height: 16px; }
/* 5 秒后缩成左下角的小喇叭：直接切换，不做宽度过渡（过渡中途文字会和图标叠在一起） */
.lv-unmute.mini { left: 10px; bottom: 10px; transform: none; width: 34px; height: 34px; padding: 0; border-radius: 50%; justify-content: center; font-size: 0; gap: 0; }
@keyframes lvFadeIn { from { opacity: 0; } }
.lv-full { position: absolute; right: 8px; bottom: 8px; z-index: 2; height: 30px; display: flex; align-items: center; gap: 4px;
  padding: 0 11px 0 9px; border-radius: 15px; background: rgba(0, 0, 0, .5); color: #fff; font-size: 12px; }
.lv-full svg { width: 15px; height: 15px; }
/* 全屏（安卓锁横屏后）：播放区撑满屏幕，比例交给视频自己 */
.lv-player:fullscreen { aspect-ratio: auto; width: 100%; height: 100%; }
.lv-player:-webkit-full-screen { aspect-ratio: auto; width: 100%; height: 100%; }
.lv-player:fullscreen .lv-full, .lv-player:-webkit-full-screen .lv-full { display: none; }

/* ===== 主播 / 标题 / 公告 ===== */
.lv-body { padding: 14px 16px 0; }
.lv-by { display: flex; align-items: center; gap: 10px; }
.lv-by .vd-author { flex: 1; min-width: 0; }
.lv-by .vd-ava { width: 38px; height: 38px; }
.lv-author-t { display: flex; flex-direction: column; min-width: 0; }
.lv-author-t .vd-name { max-width: 100%; text-shadow: none; }
.lv-author-t small { font-size: 12px; color: var(--vd-ink-3); font-variant-numeric: tabular-nums; }
.lv-by .vd-follow { height: 28px; padding: 0 12px 0 9px; border-radius: 14px; font-size: 13px; }
.lv-by .vd-follow.on { padding: 0 12px; }

.lv-title { margin-top: 14px; font-size: 19px; font-weight: 700; line-height: 1.45; color: #fff; }
.lv-meta { margin-top: 6px; font-size: 13px; color: var(--vd-ink-3); }

.lv-h { font-size: 14px; font-weight: 600; color: #fff; }
.lv-h span { margin-left: 4px; font-weight: 400; color: var(--vd-ink-3); }
.lv-notice { margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: rgba(255, 255, 255, .06); }
.lv-notice p:last-child { margin-top: 6px; font-size: 14px; line-height: 1.7; color: #F5B25C; }
.lv-rule { margin-top: 10px; font-size: 12px; line-height: 1.6; color: var(--vd-ink-3); }

/* ===== 评论（深色） ===== */
.lv-cmt { margin-top: 20px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .08); }
.lv-cmt-list { margin-top: 4px; }
.lv-cmt-item { display: flex; gap: 10px; padding: 12px 0; }
.lv-cmt-item + .lv-cmt-item { border-top: 1px solid rgba(255, 255, 255, .06); }
.lv-cmt-ava { flex: none; width: 32px; height: 32px; border-radius: 50%; overflow: hidden; background: rgba(255, 255, 255, .12);
  display: grid; place-items: center; font-size: 13px; color: var(--vd-ink-2); }
.lv-cmt-ava img { width: 100%; height: 100%; object-fit: cover; }
.lv-cmt-main { flex: 1; min-width: 0; }
.lv-cmt-nick { font-size: 13px; color: var(--vd-ink-3); }
.lv-cmt-msg { margin-top: 4px; font-size: 15px; line-height: 1.6; color: var(--vd-ink); word-break: break-word; }
.lv-cmt-when { margin-top: 6px; font-size: 12px; color: var(--vd-ink-3); }
.lv-empty { display: block; width: 100%; padding: 28px 0 20px; text-align: center; font-size: 13px; color: var(--vd-ink-3); }

/* 底栏：直播页没有「评论」按钮，点赞 / 分享平分右侧 */
.lv-page .vd-act .vd-btn { min-width: 56px; }
.lv-page .vd-act.act-pure .vd-btn { flex: 1; }

/* ===== 竖屏直播（screen_type=1）：画面铺满整屏，信息叠在下方，同视频页竖版 ===== */
body.lv-v { height: 100%; overflow: hidden; background: #000; }
body.lv-v .lv { position: fixed; inset: 0; padding: 0; }
/* 顶栏回到视频页的浮层样式：透明渐变，压在画面上 */
body.lv-v .vd-bar { background: linear-gradient(180deg, rgba(0, 0, 0, .45), rgba(0, 0, 0, 0)); pointer-events: none; }
body.lv-v .vd-bar > * { pointer-events: auto; }

body.lv-v .lv-player { position: absolute; inset: 0 0 calc(var(--vd-act-h) + env(safe-area-inset-bottom)); aspect-ratio: auto; }
body.lv-v .lv-player video { object-fit: cover; }
/* 竖屏的横版封面：放在中部偏上（下方留给主播信息和评论），上下边缘羽化，和模糊背景自然接上 */
body.lv-v .lv-still { top: 40%; -webkit-mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent); }
body.lv-v .lv-cover { filter: blur(32px) brightness(.4) saturate(1.2); }
/* 画面比例离屏幕差太多（如平板、横着拿）时不裁，完整显示 */
@media (min-aspect-ratio: 3 / 4) { body.lv-v .lv-player video { object-fit: contain; } }
/* 角标挪到顶栏下面，避开返回键 */
body.lv-v .lv-badge, body.lv-v .lv-num { top: calc(54px + env(safe-area-inset-top)); left: 12px; }
body.lv-v .lv-full { display: none; }
body.lv-v .lv-unmute { bottom: auto; top: calc(90px + env(safe-area-inset-top)); }
body.lv-v .lv-unmute.mini { left: auto; right: 12px; top: calc(54px + env(safe-area-inset-top)); width: 30px; height: 30px; }

/* 下方信息层：渐变压暗，评论在最上（弹幕式），主播和标题在下 */
.lvv-info { position: absolute; left: 0; right: 0; bottom: calc(var(--vd-act-h) + env(safe-area-inset-bottom)); z-index: 3;
  padding: 80px 16px 14px; background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .6) 55%); pointer-events: none; }
.lvv-info > * { pointer-events: auto; }
.lvv-info .lv-by .vd-ava { width: 34px; height: 34px; border: 1px solid rgba(255, 255, 255, .6); }
.lvv-info .vd-name { text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.lvv-title { margin-top: 10px; font-size: 15px; line-height: 1.55; text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lvv-notice { margin-top: 6px; font-size: 13px; line-height: 1.6; color: #F5B25C;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lvv-notice b { margin-right: 6px; padding: 1px 5px; border-radius: 3px; background: rgba(245, 178, 92, .2); font-size: 11px; font-weight: 600; }

/* 弹幕式评论：最多露 5 行，顶部淡出，新的在最下面 */
.lvv-cmts { width: 76%; margin-bottom: 12px; }
.lvv-cmt-list { max-height: 158px; overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 28px); mask-image: linear-gradient(180deg, transparent 0, #000 28px); }
.lvv-cmt-list::-webkit-scrollbar { display: none; }
.lvv-cmt { width: fit-content; max-width: 100%; margin-top: 5px; padding: 4px 9px; border-radius: 12px; background: rgba(0, 0, 0, .32);
  font-size: 13px; line-height: 1.5; color: #fff; word-break: break-word; }
.lvv-cmt b { font-weight: 400; color: #A8D8FF; }
.lvv-sys { color: #F5B25C; }
