/* ==========================================================================
 * streamers.css — 主播页（streamers.html）
 * 复用 chat.css 的配色变量与 .btn / .ctop，只写这一页特有的布局。
 * ========================================================================== */

/* ---------- 页面滚动 ----------
 * Discover 是长列表，**必须正常滚动**。
 * ⚠ 本页复用 chat.css 的 body.chat 类，而那边桌面媒体查询里有
 *   body.chat{height:100%;overflow:hidden}（聊天页要视频框吃满首屏）。
 *   若不在这里解掉，照片超过一屏就永远滚不到 —— 表现为「只能看第一屏」。
 *   这里选择器权重更高，且 streamers.css 在 chat.css 之后加载，双保险。 */
body.chat.streamers { height: auto; min-height: 100%; overflow: visible; }

.stm {
  flex: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 30px 20px 64px;
}

.stm__hd { margin-bottom: 20px; }
.stm__hd h1 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 900; letter-spacing: -.02em; }
.stm__hd p { margin: 8px 0 0; color: var(--soft); font-size: 15px; max-width: 62ch; }

/* 页面说明（放在网格末尾，不是标题下面）：
 * 作用有两个 —— 给访客一句「这页怎么用」，给不执行 JS 的爬虫一段可引用的正文。
 * 刻意做得比正文小一号、压暗、和上面的网格用一条细线隔开，
 * 让人一眼看出这是页脚说明，而不是漏到前台的注释。 */
.stm__note {
  margin-top: 28px; padding-top: 14px;
  border-top: 1px solid var(--line);
  max-width: 100%;
}
.stm__noteH {
  margin: 0 0 8px; font-size: 12px; font-weight: 800;
  letter-spacing: .09em; text-transform: uppercase; color: var(--soft);
}
.stm__note p { margin: 0; font-size: 14px; line-height: 1.75; color: var(--soft); max-width: 72ch; }
.stm__note a {
  color: var(--primary); text-decoration: underline; text-underline-offset: 2px;
  font-weight: 600;
}
.stm__note a:hover { color: #fff; }

.stm__bar { display: flex; align-items: center; margin-bottom: 14px; }
.stm__count {
  display: inline-flex; align-items: center; gap: 8px;
  height: 30px; padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line);
  color: var(--soft); font-size: 12.5px; font-weight: 700;
}
/* Free / Premium 信息 chips：数据由 JS 按 items 实时统计（非写死数字） */
.stm__stats { display: inline-flex; align-items: center; gap: 6px; }
.stm__stat {
  display: inline-flex; align-items: center; gap: 4px;
  height: 30px; padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line);
  font-size: 12px; font-weight: 700; color: var(--soft);
  white-space: nowrap;
}
.stm__stat--free { color: #34D399; border-color: rgba(52, 211, 153, .32); background: rgba(52, 211, 153, .08); }
.stm__stat--prem { color: #FFC53D; border-color: rgba(255, 197, 61, .32); background: rgba(255, 197, 61, .08); }

/* ---------- 照片墙网格 ----------
 * 显式断点（需求）：
 *   >1400px  7 列（宽屏）
 *   1101-1400 6 列（桌面默认）
 *   768-1100  4 列（平板横屏）
 *   641-767   3 列（平板竖屏 / 大手机横屏）
 *   ≤640      2 列（手机 375/390/430，无横向滚动）
 * 卡片 3:4 竖版（.pcard__ph aspect-ratio），gap 桌面 14 / 移动 12，圆角 12。 */
.stm__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

/* ---------- 骨架屏（首帧渲染前的加载占位） ----------
 * JS 在 render 前向网格注入 .skel 卡片；render 完成后整格替换，骨架自然消失。 */
.stm__grid.is-loading { gap: 14px; }
.skel {
  position: relative;
  display: block;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #1C1E24;
}
.skel__ph { display: block; aspect-ratio: 3 / 4; background: #1C1E24; }
.skel__ft {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 34px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .55));
}
.skel__ph::before, .skel__ft::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .05) 50%, transparent 70%);
  background-size: 220% 100%;
  animation: stmShimmer 1.3s ease-in-out infinite;
}
@keyframes stmShimmer {
  0% { background-position: 130% 0; }
  100% { background-position: -130% 0; }
}

/* ---------- 照片卡 ---------- */
.pcard {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #23252C;
  color: #fff;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.pcard:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0, 0, 0, .45); }
/* 触屏/点击按下反馈：轻微下沉 + 压暗，避免“点了没反应” */
.pcard:active { transform: scale(.97); filter: brightness(.92); }
.pcard:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.pcard__ph {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  background: #23252C;
  overflow: hidden;
}
.pcard__img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: filter .28s ease, transform .28s ease, opacity .25s ease;
}
/* 加载失败占位：图片置灰隐藏，容器显示破图符号（不展示原图、不留白格） */
.pcard.is-broken .pcard__img { opacity: .12; filter: grayscale(1); }
.pcard.is-broken .pcard__ph { background: #20222A; }
.pcard.is-broken .pcard__ph::after {
  content: '';
  position: absolute; inset: 0; margin: auto;
  width: 34px; height: 26px;
  border: 1.5px solid rgba(255, 255, 255, .22);
  border-radius: 4px;
  background:
    linear-gradient(135deg, transparent 43%, rgba(255, 255, 255, .22) 44%, rgba(255, 255, 255, .22) 52%, transparent 53%);
}

/* 未解锁：高斯模糊。放大一点点是为了把模糊产生的透明边缘推出可视区。
 *
 * ⚠ 模糊必须「彻底」：11px 时还能看出人形轮廓（客户反馈「等于没挡」）。
 *   现在 20px + 压暗 + 降饱和，只剩色块；悬停也不再偷偷变清晰 ——
 *   付费墙就是付费墙，不能因为鼠标移上去就漏一版半清晰的图。
 *   聊天页主播条（chat.css 的 .lv.is-locked）用同一个强度。 */
.pcard.is-locked .pcard__img {
  filter: blur(20px) saturate(.85) brightness(.7);
  transform: scale(1.16);
}
.pcard.is-locked:hover .pcard__img { filter: blur(20px) saturate(.85) brightness(.72); }

/* 解锁浮层：价格 + 「点击解锁」压在照片中下部 */
/* 付费遮罩：统一深色（去掉中间透光的彩色渐变），锁图标 + 价格 + 提示 */
.pcard__lock {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px;
  padding: 0 8px;
  text-align: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, .42) 50%, rgba(0, 0, 0, .78) 100%);
  pointer-events: none;
}
/* 锁定图标：随价格一起展示（JS 注入 icons.lock） */
.pcard__lockIcon {
  display: inline-flex;
  width: 20px; height: 20px;
  color: #FFC53D;
  margin-bottom: 2px;
  opacity: .95;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .8));
}
.pcard__price {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 19px; font-weight: 900; line-height: 1;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .75);
}
.pcard__price svg {
  width: 17px; height: 17px;
  color: #FFC53D;
  fill: #FFC53D; stroke: #FFC53D;
}
.pcard__price i {
  font-size: 10.5px; font-weight: 700; font-style: normal;
  opacity: .75; margin-left: 1px;
}
.pcard__tap {
  font-size: 10.5px; font-weight: 600;
  color: rgba(255, 255, 255, .82);
  text-shadow: 0 1px 5px rgba(0, 0, 0, .8);
}

/* 免费照片的角标 */
.pcard__free {
  position: absolute; right: 6px; top: 6px;
  padding: 2px 7px; border-radius: 999px;
  background: rgba(34, 197, 94, .9);
  color: #04270f; font-size: 10px; font-weight: 800;
}

/* 底部作者条：圆形头像 + 昵称 */
.pcard__ft {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 6px;
  padding: 16px 8px 7px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .72) 62%);
  pointer-events: none;
}
.pcard__avaimg,
.pcard__avach {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  border-radius: 50%;
  object-fit: cover;
  display: grid; place-items: center;
  font-size: 10.5px; font-weight: 800; color: #fff;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .25);
}
.pcard__name {
  min-width: 0;
  font-size: 11.5px; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .7);
}

/* ---------- 未登录引导 ---------- */
.stm__lock {
  max-width: 520px; margin: 44px auto 0;
  padding: 40px 26px;
  text-align: center;
  border-radius: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.stm__lockIcon {
  width: 62px; height: 62px; margin: 0 auto 18px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(18, 181, 203, .14);
  color: var(--primary);
}
.stm__lockIcon svg { width: 28px; height: 28px; }
.stm__lock h2 { font-size: 20px; font-weight: 800; }
.stm__lock p { margin: 10px 0 22px; color: var(--soft); font-size: 14px; }

.stm__empty { margin: 12px 0 0; color: var(--soft); font-size: 14px; }

/* ============ 网格显式断点 ============
 * >1400px 7 列 / 1101-1400px 6 列（默认）/ 768-1100px 4 列 / 641-767px 3 列 / ≤640px 2 列 */

/* 宽屏：7 列 */
@media (min-width: 1401px) {
  .stm__grid { grid-template-columns: repeat(7, 1fr); }
}

/* 平板（横屏）与中屏笔记本：4 列 */
@media (max-width: 1100px) {
  .stm__grid { grid-template-columns: repeat(4, 1fr); gap: 13px; }
}

/* 平板竖屏 / 大手机横屏：3 列 */
@media (max-width: 767px) {
  .stm__grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
}

/* 手机：固定 2 列（375 / 390 / 430 均两列，无横向滚动） */
@media (max-width: 640px) {
  .stm { padding: 18px 12px 48px; }
  .stm__grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stm__grid.is-loading { gap: 12px; }
  .pcard { border-radius: 12px; }
  .pcard__price { font-size: 16px; }
  .pcard__price svg { width: 14px; height: 14px; }
  .pcard__tap { font-size: 9.5px; }
  .pcard__name { font-size: 10.5px; }
  .pcard__avaimg, .pcard__avach { width: 17px; height: 17px; font-size: 9.5px; }
  .stm__bar { gap: 8px; }
  .stm__stats { flex-wrap: wrap; }
}

/* ================= 性别筛选 =================
   默认「只显示女性」，与聊天页 Live now 主播条同一口径 —— 两处都由
   people.list() 的 opts.gender 控制，不会出现「条里只有女生、墙里全是男女混排」。 */
.stm__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.stm__filters { display: inline-flex; gap: 4px; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.06); }
.stm__f { appearance: none; border: 0; cursor: pointer;
  padding: 7px 15px; border-radius: 999px; font: inherit;
  font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, .68);
  background: transparent; transition: color .15s ease, background .15s ease;
}
/* 隐藏的「全部」按钮必须显式兜底 ——
 * `.stm__f` 里的 display 会不会盖掉 hidden 的默认 display:none？
 * 这里没设 display，所以不会；但同类的 .promo / .nav / .lp__langbar
 * 都踩过这个坑，统一写一条防御，成本极低。 */
.stm__f[hidden] { display: none; }
.stm__f:hover { color: #fff; }
.stm__f.is-on { background: var(--primary); color: #fff; }
.stm__f:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ================= 女性直播推广条 ================= */

/* ⚠ 这条规则必须放在下面 `.promo { display: flex }` **之后**。
 * 浏览器给 [hidden] 的默认样式是 `display: none`，但**作者样式表里的
 * `display:flex` 优先级更高，会把它盖掉** —— 于是 `promo.hidden = true`
 * 完全不起作用，页面底部就出现一个「有边框、没标题、人数 0、箭头点不动」
 * 的空壳条（用户截图里的问题）。凡是「用 hidden 属性控制显隐 + CSS 里有
 * display」的元素，都必须补一条 [hidden] 规则。 */
.promo[hidden] { display: none; }

/* 推广区：紧凑化（padding/gap/字号/头像/按钮整体收敛，移动端再压缩） */
.promo {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; margin-bottom: 14px;
  border-radius: 14px; text-decoration: none;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(255, 199, 44, .14), transparent 60%),
    linear-gradient(180deg, #191A21, #14151B);
  border: 1px solid rgba(255, 199, 44, .32);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .34);
  color: #fff; transition: border-color .18s ease, transform .18s ease;
}
.promo:hover { border-color: rgba(255, 199, 44, .62); transform: translateY(-2px); }
.promo:focus-visible { outline: 2px solid #FFC72C; outline-offset: 3px; }

/* 三个头像叠成一排（经典「重叠头像」样式，暗示是很多人而不是三个人） */
.promo__faces { display: flex; flex: none; padding-left: 4px; }
.promo__face {
  position: relative;                /* 绿点要相对它定位 */
  width: 36px; height: 36px; border-radius: 50%; overflow: hidden;
  margin-left: -10px; border: 2px solid #17181D;
  background: #2A2C34; flex: none;
}
.promo__face:first-child { margin-left: 0; }
.promo__face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.promo__face span {
  width: 100%; height: 100%; display: grid; place-items: center;
  font-size: 13px; font-weight: 800; color: #fff;
}
/* 最后一个头像带一个绿点 = 在线 */
.promo__face--live::after {
  content: ''; position: absolute; right: 1px; bottom: 1px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #22C55E; border: 2px solid #17181D;
}

.promo__txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 auto; }
.promo__title { font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.promo__meta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: rgba(255, 255, 255, .7);
}
.promo__meta .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22C55E; box-shadow: 0 0 0 3px rgba(34, 197, 94, .22);
}
.promo__meta b { color: #fff; font-variant-numeric: tabular-nums; }

.promo__cta {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: 999px;
  background: #FFC72C; color: #191A11;
  font-size: 13.5px; font-weight: 800; white-space: nowrap;
  transition: filter .15s ease;
}
.promo__cta:hover { filter: brightness(1.06); }
.promo__cta::after { content: '→'; font-size: 14px; line-height: 1; }

/* 窄屏：紧凑堆叠，CTA 撑满一行（无横向滚动） */
@media (max-width: 640px) {
  .promo { flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
  .promo__txt { flex: 1 1 auto; min-width: 0; }
  .promo__cta { flex: 1 1 100%; justify-content: center; padding: 8px 13px; font-size: 12.5px; }
  .promo__face { width: 32px; height: 32px; margin-left: -9px; }
  .promo__meta { font-size: 11.5px; }
}

/* ================= 解锁确认弹窗 =================
 * 点击付费照片 → 先弹窗预览（模糊图，未授权不展示原图）并确认消耗钻石；
 * 确认后才调用 auth.unlock() 扣钻；未确认不扣、不展示原图。
 * 交互复用 vip 弹窗模式（mask + box + .is-on + Esc 关闭 + focus）。 */
.uc {
  position: fixed; inset: 0; z-index: 600;
  display: none; align-items: center; justify-content: center;
  padding: 16px;
}
.uc.is-on { display: flex; }
.uc__mask { position: absolute; inset: 0; background: rgba(0, 0, 0, .66); }
.uc__box {
  position: relative;
  width: min(420px, 100%);
  max-height: 92vh; overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .55);
}
.uc__hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.uc__title { margin: 0; font-size: 17px; font-weight: 800; }
.uc__close {
  flex: none; width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .07); color: rgba(255, 255, 255, .78);
  cursor: pointer; font: inherit;
}
.uc__close:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.uc__close svg { width: 17px; height: 17px; }
.uc__ph {
  display: block; width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 12px; overflow: hidden;
  background: #23252C;
  position: relative;
}
.uc__ph img { width: 100%; height: 100%; object-fit: cover; display: block; filter: blur(18px) saturate(.85) brightness(.75); transform: scale(1.14); }
.uc__ph .uc__lock {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: #FFC53D;
}
.uc__ph .uc__lock svg { width: 30px; height: 30px; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .8)); }
.uc__info { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.uc__cost {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 16px; font-weight: 900;
}
.uc__cost svg { width: 17px; height: 17px; color: #FFC53D; fill: #FFC53D; stroke: #FFC53D; }
.uc__bal { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.uc__balLbl { font-size: 11.5px; color: var(--soft); letter-spacing: .02em; }
.uc__balVal { display: inline-flex; align-items: center; gap: 4px; font-size: 15px; font-weight: 800; }
.uc__balVal svg { width: 15px; height: 15px; color: #FFC53D; fill: #FFC53D; stroke: #FFC53D; }
.uc__need { font-size: 12px; color: #F87171; }
.uc__acts { display: flex; gap: 10px; margin-top: 18px; }
.uc__btn {
  flex: 1; padding: 12px 14px;
  border: 0; border-radius: 12px;
  font: inherit; font-size: 14px; font-weight: 800; cursor: pointer;
  transition: filter .15s ease;
}
.uc__btn--ok { background: var(--primary); color: #fff; }
.uc__btn--ok:hover { filter: brightness(1.08); }
.uc__btn--ok[disabled] { background: #3A3E4A; color: rgba(255, 255, 255, .4); cursor: not-allowed; }
.uc__btn--ghost { background: rgba(255, 255, 255, .06); color: rgba(255, 255, 255, .8); }
.uc__btn--ghost:hover { background: rgba(255, 255, 255, .12); }
.uc__name { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; font-weight: 700; }
.uc__name img, .uc__name span.av { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; }
.uc__nick { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc__cost i { font-style: normal; font-size: 12px; color: var(--soft); margin-left: -2px; }
.uc__bal { margin-top: 12px; }
.uc__hint { margin: 12px 0 0; font-size: 12.5px; color: var(--soft); line-height: 1.5; }

/* ================= 免费照片高清预览 lightbox ================= */
.up {
  position: fixed; inset: 0; z-index: 610;
  display: none; align-items: center; justify-content: center;
  padding: 18px;
  background: rgba(0, 0, 0, .88);
}
.up.is-on { display: flex; }
.up__box {
  position: relative;
  width: min(720px, 100%);
  max-height: 94vh;
  display: flex; flex-direction: column;
  gap: 10px;
}
.up__imgwrap {
  flex: 1 1 auto; min-height: 0;
  display: grid; place-items: center;
  border-radius: 14px; overflow: hidden;
  background: #14151B;
}
.up__imgwrap img {
  max-width: 100%; max-height: 78vh;
  width: auto; height: auto;
  object-fit: contain;
  border-radius: 10px;
  display: block;
}
.up__ft {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.up__name { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 700; font-size: 14px; }
.up__name img, .up__name span.av {
  width: 22px; height: 22px; border-radius: 50%; object-fit: cover;
  display: grid; place-items: center; font-size: 10px; font-weight: 800; color: #fff;
}
.up__close {
  flex: none; width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer;
}
.up__close:hover { background: rgba(255, 255, 255, .16); }
.up__close svg { width: 18px; height: 18px; }

/* 手机：弹窗贴边、预览图略降高，保证 375/390/430 完整显示 */
@media (max-width: 640px) {
  .uc { padding: 10px; }
  .uc__box { padding: 16px; border-radius: 14px; }
  .up { padding: 10px; }
  .up__imgwrap img { max-height: 72vh; }
}
