/* 全屏视频流（放映厅）：TikTok / 抖音式竖向滚动 */
:root {
  --ff-bg: #08080a;
  --ff-red: #ff3b4f;
  --ff-red-deep: #c3122e;
}

* { box-sizing: border-box; }

html, body.ff-body {
  margin: 0;
  height: 100%;
  background: var(--ff-bg);
  color: #fff;
  font: 14px/1.6 -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  overscroll-behavior: none;
}

body.ff-body {
  overflow: hidden;
}

/* 顶部悬浮条 */
.ff-top {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .55), transparent);
  pointer-events: none;
}
.ff-top > * { pointer-events: auto; }
.ff-brand img { height: 34px; width: auto; display: block; }
.ff-top__right { display: flex; gap: 8px; align-items: center; }
.ff-chip {
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 12px;
  color: rgba(255, 255, 255, .82);
  background: rgba(255, 255, 255, .1);
  text-decoration: none;
  backdrop-filter: blur(6px);
}
.ff-chip:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.ff-chip--pri { background: linear-gradient(90deg, var(--ff-red), var(--ff-red-deep)); color: #fff; font-weight: 600; }
.ff-chip--me { color: #fff; background: rgba(240, 38, 60, .22); border: 1px solid rgba(240, 38, 60, .45); }

/* 滚动容器 */
.ff-track {
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.ff-track::-webkit-scrollbar { display: none; }

.ff-item {
  position: relative;
  height: 100vh;
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
}

.ff-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.ff-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .45) 0%, transparent 22%, transparent 58%, rgba(0, 0, 0, .78) 100%);
}

/* 左下信息 */
.ff-info {
  position: absolute;
  left: 16px;
  right: 92px;
  bottom: 34px;
  z-index: 4;
  pointer-events: none;
}
.ff-info > * { pointer-events: auto; }
.ff-score {
  display: inline-block;
  font-size: 12px;
  color: #ff8a95;
  background: rgba(0, 0, 0, .38);
  border-radius: 999px;
  padding: 2px 9px;
  margin-bottom: 8px;
}
.ff-title {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
}
.ff-desc {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .78);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
}
.ff-more {
  display: inline-block;
  font-size: 12px;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .35);
  padding-bottom: 1px;
}

/* 右侧操作栏 */
.ff-acts {
  position: absolute;
  right: 12px;
  bottom: 40px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
}
.ff-act {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 52px;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .7);
}
.ff-act svg {
  width: 30px;
  height: 30px;
  fill: rgba(255, 255, 255, .92);
  stroke: none;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .5));
  transition: transform .15s ease;
}
.ff-act:active svg { transform: scale(.88); }
.ff-act.is-on svg { fill: var(--ff-red); }
.ff-act.is-on { color: var(--ff-red); }
.ff-act--tip svg { fill: none; stroke: rgba(255, 255, 255, .92); stroke-width: 2; }

/* 播放/暂停 */
.ff-playicon {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  z-index: 4;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, .42);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s ease;
  backdrop-filter: blur(2px);
}
.ff-item.is-paused .ff-playicon { opacity: 1; }

.ff-loading {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  color: rgba(255, 255, 255, .6);
  z-index: 3;
  opacity: 0;
  transition: opacity .2s;
}
.ff-item.is-loading .ff-loading { opacity: 1; }

/* 计数与提示 */
.ff-counter {
  position: fixed;
  right: 14px;
  top: 62px;
  z-index: 20;
  font-size: 12px;
  color: rgba(255, 255, 255, .55);
  background: rgba(0, 0, 0, .35);
  border-radius: 999px;
  padding: 3px 10px;
}
.ff-counter b { color: #fff; }
.ff-hint {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 20;
  font-size: 11px;
  color: rgba(255, 255, 255, .38);
  pointer-events: none;
  transition: opacity .4s;
}
.ff-hint.is-hidden { opacity: 0; }

/* 抽屉面板 */
.ff-sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.ff-sheet[hidden] { display: none; }
.ff-sheet__mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(2px);
}
.ff-sheet__panel {
  position: relative;
  width: min(560px, 100%);
  max-height: 78vh;
  display: flex;
  flex-direction: column;
  background: #16161a;
  border-radius: 18px 18px 0 0;
  border: 1px solid rgba(255, 255, 255, .08);
  border-bottom: 0;
  padding: 16px 18px calc(16px + env(safe-area-inset-bottom));
  animation: ff-up .22s ease;
}
.ff-sheet__panel--share { max-height: 88vh; }
@keyframes ff-up { from { transform: translateY(24px); opacity: .6 } to { transform: none; opacity: 1 } }
.ff-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.ff-sheet__head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.ff-sheet__head h3 span { color: rgba(255, 255, 255, .45); font-weight: 400; font-size: 13px; }
.ff-sheet__close {
  border: 0;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 13px;
}

/* 评论 */
.ff-comments {
  flex: 1;
  overflow-y: auto;
  min-height: 120px;
  max-height: 44vh;
  padding-right: 4px;
}
.ff-comment {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}
.ff-comment__avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex: none;
  background: linear-gradient(135deg, #ff3b4f, #c3122e);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}
.ff-comment__body { min-width: 0; }
.ff-comment__meta { font-size: 11px; color: rgba(255, 255, 255, .4); margin-bottom: 2px; }
.ff-comment__text { font-size: 13px; color: rgba(255, 255, 255, .86); word-break: break-word; }
.ff-comment-empty { text-align: center; color: rgba(255, 255, 255, .35); font-size: 12px; padding: 28px 0; }
.ff-comment-form {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, .07);
}
.ff-comment-form input {
  flex: 1;
  padding: 10px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: #0f0f11;
  color: #fff;
  font: inherit;
  outline: none;
}
.ff-comment-form input:focus { border-color: rgba(240, 38, 60, .6); }
.ff-comment-form button {
  padding: 0 18px;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(90deg, var(--ff-red), var(--ff-red-deep));
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.ff-comment-login { text-align: center; padding: 14px 0; font-size: 13px; }
.ff-comment-login a { color: var(--ff-red); }

/* 分享海报 */
.ff-poster-wrap {
  display: flex;
  justify-content: center;
  padding: 4px 0 12px;
}
#ffPoster {
  width: min(300px, 66vw);
  height: auto;
  border-radius: 14px;
  box-shadow: 0 16px 40px -18px rgba(0, 0, 0, .8);
  background: #0b0b0c;
}
.ff-share-acts { display: flex; gap: 10px; }
.ff-btn {
  flex: 1;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .06);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.ff-btn--pri { background: linear-gradient(90deg, var(--ff-red), var(--ff-red-deep)); border-color: transparent; }
.ff-share-tip { font-size: 11px; color: rgba(255, 255, 255, .4); margin: 12px 0 0; line-height: 1.7; }
.ff-share-tip b { color: var(--ff-red); }
.ff-share-tip a { color: var(--ff-red); }

/* 打赏 */
.ff-tip-balance { font-size: 13px; color: rgba(255, 255, 255, .6); margin-bottom: 12px; }
.ff-tip-balance b { color: var(--ff-red); font-size: 17px; }
.ff-tip-opts { display: flex; gap: 10px; }

/* toast */
.ff-toast {
  position: fixed;
  left: 50%;
  top: 12%;
  transform: translateX(-50%) translateY(-8px);
  z-index: 90;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .82);
  border: 1px solid rgba(255, 255, 255, .12);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  max-width: 80vw;
  text-align: center;
}
.ff-toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 桌面端：居中竖屏播放区 */
@media (min-width: 900px) {
  .ff-track {
    scroll-snap-type: y mandatory;
  }
  .ff-item {
    max-width: 520px;
    margin: 0 auto;
    height: 100vh;
    height: 100dvh;
  }
  .ff-item::before,
  .ff-item::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: calc((100vw - 520px) / 2);
    background: #08080a;
    z-index: 2;
    pointer-events: none;
  }
  .ff-item::before { left: calc((520px - 100vw) / 2); }
  .ff-item::after { right: calc((520px - 100vw) / 2); }
  .ff-top { max-width: 520px; margin: 0 auto; }
  .ff-counter { right: calc((100vw - 520px) / 2 + 14px); }
}
