/* 推荐流首页（.fd）和追剧页（.fw），站点配置 [home] style = "feed"。共用部件在 app.css。 */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: #000; color: var(--ink, #f2f2f2); }
body { font: 14px/1.5 "Plus Jakarta Sans", "Sukhumvit Set", "Noto Sans Thai", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { display: block; }

/* ---------- 推荐流 ---------- */
.fd { position: relative; max-width: 520px; height: 100vh; height: 100dvh; margin: 0 auto; overflow: hidden; background: #000; }
.fd-list { height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.fd-list::-webkit-scrollbar { display: none; }
.fd-item { position: relative; height: 100vh; height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; }
.fd-stage { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: #000; cursor: pointer; }
.fd-stage > img, .fd-stage > picture img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.fd-stage::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none;
  background: linear-gradient(rgba(0,0,0,.5), rgba(0,0,0,0) 15%, rgba(0,0,0,0) 52%, rgba(0,0,0,.82) 86%); }
.fd-video { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; object-fit: contain; background: transparent; opacity: 0; transition: opacity .3s; }
/* 播放时封面退到后面当模糊底（横版成片上下不留黑边） */
.fd-stage > img { transition: filter .4s; }
.fd-item.playing .fd-stage > img, .fd-item.paused .fd-stage > img { filter: blur(24px) brightness(.45); transform: scale(1.1); }
.fd-item.playing .fd-video, .fd-item.paused .fd-video { opacity: 1; }
.fd-item.paused .fd-stage::before { content: ""; position: absolute; left: 50%; top: 45%; z-index: 2; width: 0; height: 0; transform: translate(-40%, -50%);
  border: 22px solid transparent; border-left: 36px solid rgba(255,255,255,.85); border-right: 0; }
.fd-noart { display: flex; align-items: center; justify-content: center; height: 100%; padding: 30px; text-align: center;
  font-size: 26px; font-weight: 800; background: var(--surface-2, #1a1a1a); }
.fd-top { position: absolute; top: 0; left: 0; right: 0; z-index: 10; display: flex; justify-content: center;
  padding: calc(14px + env(safe-area-inset-top)) 16px 10px; pointer-events: none; }
.fd-tabs { display: flex; gap: 26px; font-size: 17px; font-weight: 500; pointer-events: auto; }
.fd-tabs a { color: rgba(255,255,255,.62); text-decoration: none; }
.fd-tabs b { position: relative; color: #fff; font-weight: 700; }
.fd-tabs b::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 18px; height: 3px; margin-left: -9px; border-radius: 2px; background: #fff; }
.fd-search { position: absolute; right: 16px; top: calc(14px + env(safe-area-inset-top)); color: #fff; pointer-events: auto; }
.fd .ap-side { bottom: calc(196px + env(safe-area-inset-bottom)); }
.fd .ap-info { bottom: calc(146px + env(safe-area-inset-bottom)); }
.fd .ap-prog { bottom: calc(119px + env(safe-area-inset-bottom)); }
.fd .ap-bar { bottom: calc(76px + env(safe-area-inset-bottom)); }
.fd-empty { margin: 45vh 24px 0; text-align: center; color: var(--muted, #a3a3a3); }

/* ---------- 追剧 ---------- */
.fw { max-width: 520px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; padding-bottom: calc(80px + env(safe-area-inset-bottom)); background: #000; }
.fw-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(18px + env(safe-area-inset-top)) 16px 0; }
.fd-lang { position: absolute; left: 14px; top: calc(10px + env(safe-area-inset-top)); pointer-events: auto; }
.fd-lang .ap-lang > div { left: 0; right: auto; }
.fd-lang .ap-lang summary { background: rgba(0,0,0,.3); }
.fw-top h1 { margin: 0; font-size: 24px; font-weight: 900; }
.fw-tabs { display: flex; gap: 22px; padding: 12px 16px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.fw-tabs button { padding: 0 0 9px; border: 0; background: none; color: var(--faint, #6e6e6e); font: inherit; font-size: 15px; cursor: pointer; }
.fw-tabs button.on { color: var(--ink, #f2f2f2); font-weight: 700; box-shadow: inset 0 -2px 0 var(--ink, #f2f2f2); }
.fw-wait { height: 200px; }
.fw-empty { padding: 80px 24px; text-align: center; color: var(--muted, #a3a3a3); }
.fw-empty a { display: inline-block; margin-top: 12px; padding: 9px 20px; border-radius: 8px; background: var(--ink, #f2f2f2); color: #000;
  font-weight: 700; text-decoration: none; }
.fw-resume { position: relative; display: block; height: 150px; margin: 16px 16px 0; border-radius: 10px; overflow: hidden; text-decoration: none; }
.fw-resume img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.fw-resume::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: linear-gradient(90deg, rgba(0,0,0,.88) 30%, rgba(0,0,0,.2)); }
.fw-resume div { position: absolute; left: 16px; top: 16px; bottom: 16px; z-index: 1; display: flex; flex-direction: column; width: 64%; }
.fw-resume small { color: var(--muted, #a3a3a3); font-size: 12px; }
.fw-resume h3 { margin: 2px 0 0; font-size: 19px; font-weight: 900; line-height: 1.3; }
.fw-resume p { margin: 0; font-size: 12.5px; color: rgba(255,255,255,.75); }
.fw-go { margin-top: auto; align-self: flex-start; display: flex; align-items: center; gap: 5px; padding: 7px 16px; border-radius: 6px;
  background: #fff; color: #000; font-weight: 700; font-size: 13.5px; }
.fw-resume > i { position: absolute; left: 0; bottom: 0; z-index: 1; height: 3px; background: var(--accent, #ff3b6b); }
.fw-list { display: grid; gap: 16px; padding: 18px 16px 0; }
.fw-item { display: flex; gap: 12px; align-items: stretch; text-decoration: none; }
.fw-cover { flex: none; width: 72px; height: 100px; border-radius: 6px; overflow: hidden; background: var(--surface, #111); }
.fw-cover img { width: 100%; height: 100%; object-fit: cover; }
.fw-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.fw-text strong { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fw-text small { font-size: 12.5px; color: var(--muted, #a3a3a3); }
.fw-text i { margin-top: auto; height: 3px; border-radius: 2px; background: var(--surface-3, #262626); }
.fw-text i b { display: block; height: 100%; border-radius: 2px; background: var(--ink, #f2f2f2); }
.fw-btn { align-self: center; flex: none; padding: 6px 14px; border-radius: 6px; background: var(--surface-2, #1a1a1a); font-size: 13px; font-weight: 700; }

/* ---------- 会员中心 /membership ---------- */
.mb { max-width: 520px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; padding-bottom: calc(90px + env(safe-area-inset-bottom)); background: #000; }
.mb-state { margin: 16px 16px 0; padding: 18px 16px; border-radius: 10px; background: var(--surface, #111); }
.mb-state h2 { margin: 0; font-size: 18px; }
.mb-state p { margin: 4px 0 0; font-size: 13px; color: var(--muted, #a3a3a3); }
.mb-state.is-member { box-shadow: inset 0 0 0 1.5px var(--accent, #ff3b6b); }
.mb-state a { display: inline-block; margin-top: 12px; padding: 8px 16px; border-radius: 6px; background: #fff; color: #000; font-weight: 700; text-decoration: none; }
.mb-buy { padding: 4px 16px 0; }
.mb-login { margin-top: 18px; }
.mb-login p { margin: 0 0 10px; font-size: 13px; color: var(--muted, #a3a3a3); }
.mb-login input { width: 100%; height: 46px; padding: 0 14px; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; background: var(--surface-2, #1a1a1a);
  color: var(--ink, #f2f2f2); font: inherit; font-size: 15px; }
.mb-code { margin-top: 10px; }
.mb-login .ap-paygo { margin-top: 12px; }
.mb-nets { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.mb-nets p { width: 100%; margin: 0 0 2px; font-size: 13px; color: var(--muted, #a3a3a3); }
.mb-nets button { flex: 1; min-width: 140px; padding: 10px 12px; border: 0; border-radius: 8px; background: var(--surface-2, #1a1a1a); color: var(--ink, #f2f2f2);
  font: inherit; font-size: 13.5px; cursor: pointer; }
.mb-nets button.on { outline: 1.5px solid var(--accent, #ff3b6b); outline-offset: -1.5px; }
.mb-pay { margin: 16px 16px 0; padding: 18px 16px; border-radius: 10px; background: var(--surface, #111); }
.mb-pay h2 { margin: 0; font-size: 18px; }
.mb-pay .mb-net { margin: 2px 0 12px; font-size: 13px; color: var(--accent, #ff3b6b); font-weight: 700; }
.mb-pay label { display: block; margin-top: 12px; font-size: 12px; color: var(--muted, #a3a3a3); }
.mb-row { display: flex; align-items: center; gap: 8px; margin-top: 4px; padding: 10px 12px; border-radius: 8px; background: var(--surface-2, #1a1a1a); }
.mb-amount { font-size: 26px; font-weight: 900; letter-spacing: .01em; }
.mb-row span { color: var(--muted, #a3a3a3); font-weight: 700; }
.mb-row code { flex: 1; min-width: 0; font-size: 13px; word-break: break-all; }
.mb-copybtn { margin-left: auto; flex: none; padding: 6px 12px; border: 0; border-radius: 6px; background: #fff; color: #000; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.mb-warn { margin: 8px 0 0; font-size: 12px; color: #ffb37a; }
.mb-qr { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 14px; }
.mb-qr img { width: 180px; height: 180px; border-radius: 8px; background: #fff; }
.mb-qr small { font-size: 12px; color: var(--muted, #a3a3a3); }
.mb-left { margin: 14px 0 0; text-align: center; font-weight: 700; }
.mb-waiting { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 6px 0 0; font-size: 12.5px; color: var(--muted, #a3a3a3); text-align: center; }
.mb-waiting i { flex: none; width: 12px; height: 12px; border: 2px solid var(--muted, #a3a3a3); border-top-color: transparent; border-radius: 50%; animation: mb-spin .9s linear infinite; }
@keyframes mb-spin { to { transform: rotate(360deg); } }
.mb-pay[hidden], .mb-nets[hidden] { display: none; }
.mb-pay .ap-paygo { margin-top: 16px; }

/* 第一次来的操作提示（点一下关掉，以后不再出现） */
.fd-coach { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 25; display: grid; place-items: center; background: rgba(0,0,0,.86); }
.fd-coach[hidden] { display: none; }
.fd-coach > div { width: calc(100vw - 48px); max-width: 300px; display: grid; gap: 18px; }
.fd-coach p { line-height: 1.35; }
.fd-coach p { display: flex; align-items: center; gap: 14px; margin: 0; font-size: 15.5px; font-weight: 600; color: #fff; }
.fd-coach svg { flex: none; width: 30px; height: 30px; }
.fd-coach p:first-child svg { animation: fd-swipe 1.4s ease-in-out infinite; }
@keyframes fd-swipe { 0%, 100% { transform: translateY(6px); opacity: .5; } 50% { transform: translateY(-6px); opacity: 1; } }
.fd-coach button { margin-top: 8px; height: 46px; border: 0; border-radius: 99px; background: #fff; color: #000; font: inherit; font-size: 15px;
  font-weight: 700; cursor: pointer; }
.fd:has(.fd-coach:not([hidden])) .ap-unmute { display: none; }
