/* ============================================================
   视频信息独立模块 (/video) 播放器样式 —— 抖音精选风格
   自包含，不依赖 bbs/forum.css；与主流短视频平台一致。
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body { font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif; background: #161823; color: #fff; -webkit-font-smoothing: antialiased; overflow: hidden; }
a { text-decoration: none; color: inherit; }
img, video { display: block; }
input, button, textarea { font-family: inherit; }

/* ---------- 抖音式视频流 ---------- */
.fm-video-page { position: fixed; inset: 0; background: #000; overflow: hidden; z-index: 999; }
.fm-video-feed { height: 100%; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; }
.fm-video-feed::-webkit-scrollbar { display: none; }
.fm-vslide { height: 100%; width: 100%; scroll-snap-align: start; scroll-snap-stop: always; position: relative; }
.fm-vslide video { width: 100%; height: 100%; object-fit: cover; }
.fm-v-overlay { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 90px 40px 22px; background: linear-gradient(transparent, rgba(0,0,0,.7)); color: #fff; }
.fm-v-author { font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.fm-v-author .fm-v-avatar { width: 36px; height: 36px; border-radius: 50%; background: #e60012; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; margin-right: 10px; vertical-align: middle; }
.fm-v-title { font-size: 15px; line-height: 1.5; }
.fm-v-side { position: absolute; right: 14px; bottom: 90px; display: flex; flex-direction: column; align-items: center; z-index: 5; }
.fm-v-action { color: #fff; text-align: center; margin-bottom: 22px; cursor: pointer; }
.fm-v-action .fm-va-i { font-size: 34px; line-height: 1; }
.fm-v-action .fm-va-n { font-size: 12px; margin-top: 4px; }
.fm-v-action.liked .fm-va-i { color: #ff2d55; }
.fm-v-play-mask { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.fm-v-play-mask .fm-va-play { font-size: 70px; color: rgba(255,255,255,.85); }
.fm-v-top { position: fixed; top: 0; left: 0; right: 0; height: 50px; display: flex; align-items: center; padding: 0 16px; z-index: 20; background: linear-gradient(rgba(0,0,0,.5), transparent); }
.fm-v-top .fm-v-back { color: #fff; font-size: 22px; cursor: pointer; margin-right: 16px; }
.fm-v-top .fm-v-name { display: none !important; color: #fff; font-size: 17px; font-weight: 700; letter-spacing: 1px; }
.fm-v-up-hint { position: fixed; right: 16px; top: 60%; color: rgba(255,255,255,.55); font-size: 26px; z-index: 6; animation: fmvBounce 1.6s infinite; }
.fm-v-sound { position: fixed; right: 16px; top: 62px; z-index: 21; width: 46px; height: 46px; border-radius: 50%; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; color: #fff; cursor: pointer; font-size: 22px; border: 1px solid rgba(255,255,255,.22); }
.fm-v-sound:active { background: rgba(230,0,18,.8); }
.fm-share-mask { position: fixed; inset: 0; z-index: 40; display: none; }
.fm-share-mask.show { display: block; }
.fm-share-maskbg { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.fm-share-sheet { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 16px 16px 0 0; padding: 20px 16px 18px; color: #222; box-shadow: 0 -6px 24px rgba(0,0,0,.25); }
.fm-share-title { text-align: center; font-size: 15px; color: #333; padding-bottom: 16px; }
.fm-share-grid { display: flex; justify-content: space-around; }
.fm-share-item { display: flex; flex-direction: column; align-items: center; cursor: pointer; }
.fm-share-ic { width: 52px; height: 52px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; }
.fm-share-ic.wx { background: #07c160; }
.fm-share-ic.dy { background: #161823; }
.fm-share-ic.cp { background: #8a93a6; }
.fm-share-item:active .fm-share-ic { opacity: .8; }
.fm-share-t { font-size: 12px; color: #555; margin-top: 8px; }
.fm-share-qrbox { display: flex; flex-direction: column; align-items: center; margin-top: 16px; }
.fm-share-qrtip { font-size: 13px; color: #555; margin-bottom: 10px; }
.fm-share-qr { display: block; }
.fm-share-qr img, .fm-share-qr canvas { display: block; width: 168px; height: 168px; }
.fm-share-wxguide { display: none; font-size: 13px; color: #e60012; margin: 6px 0 10px; }
.fm-share-link { width: 86%; box-sizing: border-box; text-align: center; border: 1px solid #eee; border-radius: 6px; padding: 9px 10px; margin-top: 10px; font-size: 12px; color: #666; background: #fafafa; word-break: break-all; -webkit-user-select: text; user-select: text; outline: none; }
.fm-share-cancel { margin-top: 14px; text-align: center; font-size: 15px; color: #666; padding-top: 14px; border-top: 1px solid #eee; cursor: pointer; }
.fm-share-toast { position: fixed; left: 50%; top: 50%; transform: translate(-50%,-50%); background: rgba(0,0,0,.82); color: #fff; padding: 12px 20px; border-radius: 8px; font-size: 14px; z-index: 60; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: 82%; text-align: center; }
.fm-share-toast.show { opacity: 1; }
@keyframes fmvBounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.fm-v-loading { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; color: #aaa; }

/* 提示 toast */
.fm-toast { position: fixed; left: 50%; top: 30%; transform: translateX(-50%); background: rgba(0,0,0,.8); color: #fff; padding: 12px 24px; border-radius: 6px; z-index: 9999; font-size: 14px; display: none; }

/* ---------- 视频右侧：关注/评论/收藏/唱片（抖音式） ---------- */
.fm-v-cover { position: absolute; inset: 0; background-position: center; background-size: cover; }
.fm-v-content { font-size: 13px; opacity: .92; margin-top: 6px; line-height: 1.5; max-height: 72px; overflow: hidden; }
.fm-v-side { bottom: 84px; }
.fm-v-action .fm-va-i { display: flex; align-items: center; justify-content: center; }
.fm-v-action svg { width: 36px; height: 36px; fill: #fff; display: block; }

/* 头像 + 关注加号 */
.fm-v-avatarbox { position: relative; width: 48px; height: 48px; margin-bottom: 16px; cursor: pointer; }
.fm-v-avatarbox .fm-v-avatar { width: 48px; height: 48px; border-radius: 50%; border: 2px solid #fff; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px; overflow: hidden; }
.fm-v-add { position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); width: 20px; height: 20px; border-radius: 50%; background: #fe2c55; color: #fff; font-size: 17px; line-height: 19px; text-align: center; font-weight: 700; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.fm-v-add.followed { background: #b8b8b8; font-size: 13px; line-height: 20px; }

/* 收藏星标高亮 */
.fm-v-action.favored .fm-va-i { color: #ffd400; }

/* 底部旋转黑胶碟片 + 加号 */
.fm-v-disc { position: absolute; right: 15px; bottom: 16px; width: 58px; height: 58px; border-radius: 50%; z-index: 6; display: block; text-decoration: none;
  background: radial-gradient(circle at 50% 50%, #0d0d0d 0 24%, #343434 25% 31%, #0d0d0d 32% 52%, #1e1e1e 53% 58%, #0d0d0d 59% 100%);
  box-shadow: 0 0 0 8px rgba(0,0,0,.22); animation: fmvSpin 7s linear infinite; }
.fm-v-disc-core { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.fm-v-disc-add { position: absolute; left: -7px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 50%; background: #fe2c55; color: #fff; font-size: 18px; line-height: 22px; text-align: center; }
@keyframes fmvSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ---------- 评论底部弹层 ---------- */
.fm-cmt-mask { position: fixed; inset: 0; z-index: 45; display: none; }
.fm-cmt-mask.show { display: block; }
.fm-cmt-maskbg { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.fm-cmt-sheet { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 16px 16px 0 0; color: #222; max-height: 72vh; display: flex; flex-direction: column; }
.fm-cmt-hd { position: relative; display: flex; align-items: center; justify-content: center; padding: 14px 16px; border-bottom: 1px solid #f0f0f0; }
.fm-cmt-title { font-size: 15px; color: #333; }
.fm-cmt-title b { font-weight: 700; color: #fe2c55; }
.fm-cmt-close { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 26px; color: #999; cursor: pointer; line-height: 1; }
.fm-cmt-list { overflow-y: auto; padding: 4px 16px; flex: 1; min-height: 200px; max-height: 52vh; }
.fm-cmt-empty { color: #aaa; font-size: 13px; text-align: center; padding: 44px 0; }
.fm-cmt-item { display: flex; padding: 14px 0; border-bottom: 1px solid #f5f5f5; }
.fm-cmt-avatar { width: 38px; height: 38px; border-radius: 50%; color: #fff; flex: 0 0 38px; display: flex; align-items: center; justify-content: center; font-size: 16px; margin-right: 10px; }
.fm-cmt-body { flex: 1; min-width: 0; }
.fm-cmt-name { font-size: 13px; color: #777; }
.fm-cmt-time { color: #bbb; font-size: 12px; margin-left: 8px; }
.fm-cmt-text { font-size: 15px; color: #222; margin-top: 4px; line-height: 1.5; word-break: break-all; }
.fm-cmt-bar { display: flex; align-items: center; padding: 10px 12px; border-top: 1px solid #f0f0f0; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
.fm-cmt-bar input { flex: 1; height: 38px; border: 1px solid #eee; border-radius: 19px; padding: 0 16px; font-size: 14px; outline: none; }
.fm-cmt-bar button { margin-left: 10px; height: 38px; padding: 0 22px; border: none; border-radius: 19px; background: #fe2c55; color: #fff; font-size: 14px; }
.fm-cmt-bar button:active { opacity: .85; }

/* ---------- 视频页顶部频道栏 + 底部标签栏（抖音式，后台可配置） ---------- */
.fm-v-nav { flex: 1; display: flex; align-items: center; min-width: 0; }
.fm-v-oldname, .fm-v-oldhint { display: none !important; }

/* 顶部 */
.fm-vn-ico { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; position: relative; cursor: pointer; flex: 0 0 auto; }
.fm-vn-hamburger { margin-right: 12px; }
.fm-vn-more { margin: 0 10px 0 4px; }
.fm-vn-tabs { flex: 1; min-width: 0; display: flex; align-items: center; gap: 20px; overflow-x: auto; overflow-y: hidden; white-space: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.fm-vn-tabs::-webkit-scrollbar { display: none; }
.fm-vn-tab, .fm-vn-tab a { display: inline-block; }
.fm-vn-tab { position: relative; color: rgba(255,255,255,.72); font-size: 15px; padding: 4px 0; line-height: 1.2; }
.fm-vn-tab.on { color: #fff; font-weight: 700; font-size: 17px; }
.fm-vn-tab.on::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); bottom: -4px; width: 18px; height: 3px; border-radius: 2px; background: #fff; }
.fm-v-nav a, .fm-v-tabbar a { text-decoration: none; color: inherit; }
.fm-vn-tab.fm-v-ph, .fm-vn-search.fm-v-ph { cursor: pointer; }

/* 红色角标 */
.fm-v-badge { position: absolute; top: -6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #fe2c55; color: #fff; font-size: 10px; line-height: 16px; text-align: center; font-style: normal; box-sizing: border-box; }
.fm-vn-hamburger .fm-v-badge { left: 14px; }

/* 底部标签栏 */
.fm-v-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: 54px; padding-bottom: env(safe-area-inset-bottom); display: flex; align-items: center; justify-content: space-around; background: rgba(0,0,0,.94); border-top: 1px solid rgba(255,255,255,.08); }
.fm-v-go, .fm-v-ph { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #ffffff; cursor: pointer; }
.fm-vt-n { color: #ffffff; }
.fm-vt-ic, .fm-v-tabbar svg { color: #ffffff; }
.fm-vt-item { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.fm-vt-ic { display: flex; align-items: center; justify-content: center; }
.fm-vt-n { font-size: 11px; line-height: 1; margin-top: 3px; }
.fm-v-go.on { color: #fff; }
.fm-v-go.on .fm-vt-n { font-weight: 700; }
.fm-v-go.on .fm-vt-item { color: #fff; }
.fm-vt-item .fm-v-badge { top: -4px; right: -8px; }
.fm-vt-plus { position: relative; top: -7px; width: 46px; height: 30px; border-radius: 9px; background: linear-gradient(90deg,#20e5ff 0 46%,#fe2c55 54% 100%); display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.fm-vt-plus i { width: 40px; height: 26px; border-radius: 7px; background: #fff; color: #111; font-style: normal; font-weight: 700; font-size: 22px; line-height: 24px; text-align: center; }

/* 左侧分类抽屉 */
.fm-v-drawer-mask { position: fixed; inset: 0; z-index: 50; display: none; }
.fm-v-drawer-mask.show { display: block; }
.fm-v-drawer-bg { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.fm-v-drawer { position: absolute; left: 0; top: 0; bottom: 0; width: 72%; max-width: 300px; background: #161823; color: #fff; transform: translateX(-100%); transition: transform .25s ease; overflow-y: auto; }
.fm-v-drawer-mask.show .fm-v-drawer { transform: translateX(0); }
.fm-v-drawer-hd { padding: 20px 20px 16px; font-size: 17px; font-weight: 700; border-bottom: 1px solid rgba(255,255,255,.08); }
.fm-v-drawer-list a { display: flex; align-items: center; gap: 12px; padding: 15px 20px; color: #e6e6e6; font-size: 15px; }
.fm-v-drawer-list a:active { background: rgba(255,255,255,.06); }
.fm-v-drawer-list .fm-vd-dot { width: 7px; height: 7px; border-radius: 50%; background: #fe2c55; flex: 0 0 7px; }

/* 底部标签栏避让：右侧操作栏与唱片、视频信息上移 */
.fm-v-side { bottom: 110px !important; }
.fm-v-disc { bottom: 68px; }
.fm-v-overlay { padding-bottom: 86px; }
/* ================= Douyin jingxuan standalone video stage ================= */
.fm-video-page {
  background: #161823;
  --sw: min(100vw, calc(100vh * 9 / 16));
}
.fm-video-feed {
  width: var(--sw);
  margin-left: auto;
  margin-right: auto;
  background: #000;
}
.fm-v-top { height: 56px; }
.fm-vn-tab { font-size: 16px; letter-spacing: .5px; }
.fm-vn-tab.on { font-size: 19px; }
.fm-v-action { user-select: none; -webkit-user-select: none; }
.fm-v-action .fm-va-i { filter: drop-shadow(0 1px 4px rgba(0,0,0,.6)); }
.fm-v-action .fm-va-n { text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.fm-v-title, .fm-v-author, .fm-v-content { text-shadow: 0 1px 6px rgba(0,0,0,.55); }
.fm-v-prog { position: absolute; left: 14px; right: 72px; bottom: 62px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.22); z-index: 7; overflow: hidden; pointer-events: none; }
.fm-v-prog i { display: block; height: 100%; width: 0; background: rgba(255,255,255,.92); border-radius: 3px; }
@media (min-aspect-ratio: 9/16) and (min-width: 480px) {
  .fm-video-feed {
    height: calc(100% - 24px);
    top: 12px;
    position: relative;
    border-radius: 14px;
    overflow-x: hidden;
    overflow-y: scroll;
    border: 1px solid rgba(255,255,255,.07);
    box-shadow: 0 14px 60px rgba(0,0,0,.62);
  }
  .fm-vslide video { object-fit: contain; }
  .fm-v-cover { background-size: contain; }
  .fm-v-top { left: 0; right: 0; top: 12px; width: var(--sw); margin-left: auto; margin-right: auto; border-radius: 14px 14px 0 0; }
  .fm-v-tabbar { left: 0; right: 0; bottom: 12px; width: var(--sw); margin-left: auto; margin-right: auto; border-radius: 0 0 14px 14px; }
  .fm-v-sound { right: calc((100vw - var(--sw))/2 + 12px); }
  .fm-v-up-hint { right: calc((100vw - var(--sw))/2 + 14px); }
  .fm-cmt-sheet, .fm-share-sheet { width: var(--sw); bottom: 12px; margin-left: auto; margin-right: auto; border-radius: 16px 16px 16px 16px; }
}

/* ============================================================
   Professional standalone video platform polish (/video)
   ============================================================ */
.fm-v-top .fm-v-name { display: inline-flex !important; align-items: center; gap: 8px; color: #fff; font-size: 18px; font-weight: 800; letter-spacing: 1px; margin-right: 18px; white-space: nowrap; text-shadow: 0 1px 6px rgba(0,0,0,.55); }
.fm-v-logo { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, #fe2c55 0%, #ff5c3a 55%, #20e5ff 100%); color: #fff; font-size: 11px; font-style: normal; box-shadow: 0 2px 10px rgba(254,44,85,.45); }
.fm-v-top .fm-v-back { font-size: 26px; width: 28px; text-align: center; line-height: 1; flex: 0 0 auto; }
.fm-v-nav { flex: 1; }
.fm-vn-tabs { gap: 24px; }
/* desktop: center the stage tabs with the stage column */
@media (min-aspect-ratio: 9/16) and (min-width: 480px) {
  .fm-v-top { padding: 0 18px; }
  .fm-v-name { font-size: 19px; }
}
/* narrow phones: compact brand so tabs keep room */
@media (max-width: 479px) {
  .fm-v-top .fm-v-name { font-size: 16px; margin-right: 12px; }
  .fm-v-logo { width: 22px; height: 22px; border-radius: 6px; }
  .fm-vn-tabs { gap: 18px; }
}
/* cinematic side curtains on ultrawide */
@media (min-width: 1100px) {
  .fm-video-page { background: radial-gradient(circle at 50% 30%, #1c1f2b 0%, #101219 55%, #0b0c11 100%); }
}

/* hide-hint-marker: hide the bounce-up arrow, it overlaps the right action rail */
.fm-v-up-hint { display: none !important; }
