/* =======================================================================
   membership.css - 会员与试用系统（付费墙 / 状态标签 / 会员介绍页 / FAQ）
   风格：B端工作台，浅灰底 #F8F9FC + 白卡 + 12px 圆角 + 品牌紫 #7B5CFF + 金色点缀
   ======================================================================= */
:root {
  --mbs-purple: #7B5CFF;
  --mbs-purple-dark: #6845F5;
  --mbs-purple-soft: #F1EDFF;
  --mbs-blue: #4F6BFF;
  --mbs-gold: #F5B942;
  --mbs-gold-soft: #FFF6E3;
  --mbs-bg: #F8F9FC;
  --mbs-text: #1A1A2E;
  --mbs-sub: #6B7280;
  --mbs-muted: #9CA3AF;
  --mbs-border: #ECEEF5;
  --mbs-danger: #FF6B4A;
  --mbs-radius: 12px;
}

/* ---------- v94：反滥用威慑提示（付费墙底部） ---------- */
.mbs-warn-row {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  margin: 12px 0 2px; padding: 8px 10px;
  background: #FFF6E3; border: 1px solid #FBE3B0; border-radius: 10px;
  font-size: 12px; color: #92610B; line-height: 1.6; text-align: center;
  white-space: nowrap; letter-spacing: -.2px;
}
.mbs-warn-ico { font-size: 12px; }

/* ---------- 1. 状态标签 ---------- */
.mbs-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  line-height: 18px;
  vertical-align: middle;
  white-space: nowrap;
  border: 1px solid transparent;
}
.mbs-badge.mbs-unlocked { background: #E9F9F0; color: #0E9F6E; border-color: #C6F0DC; }
.mbs-badge.mbs-trial    { background: #EEF2FF; color: #4F6BFF; border-color: #DCE3FF; }
.mbs-badge.mbs-usedup   { background: #FFF1EC; color: #FF6B4A; border-color: #FFD9CC; }

/* 工具页标题旁的状态标签（大一号） */
.mbs-page-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  vertical-align: middle;
}
.mbs-page-status.mbs-unlocked { background: #E9F9F0; color: #0E9F6E; }
.mbs-page-status.mbs-trial    { background: #EEF2FF; color: #4F6BFF; }
.mbs-page-status.mbs-usedup   { background: #FFF1EC; color: #FF6B4A; }

/* 页脚额度提示 */
.mbs-footer-tip {
  margin-top: 10px;
  font-size: 12px;
  color: #9CA3AF;
  line-height: 1.6;
}

/* ---------- 2. 付费墙弹窗 ---------- */
.mbs-mask {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, .55);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
  overflow-y: auto;
}
.mbs-mask[hidden] { display: none; }

.mbs-modal {
  width: 100%;
  max-width: 520px;
  min-width: 0;
  background: #fff;
  border-radius: var(--mbs-radius);
  box-shadow: 0 24px 60px rgba(23, 43, 99, .22);
  overflow: hidden;
  animation: mbs-pop .22s ease-out;
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  overflow-wrap: anywhere;
}
.mbs-modal * { min-width: 0; }
@keyframes mbs-pop {
  from { transform: translateY(14px) scale(.98); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.mbs-modal-head {
  padding: 20px 22px 16px;
  background: linear-gradient(135deg, #7B5CFF 0%, #4F6BFF 100%);
  color: #fff;
  position: relative;
}
.mbs-modal-head h3 { font-size: 19px; font-weight: 700; margin: 0 0 6px; letter-spacing: .3px; }
.mbs-modal-head p { font-size: 13px; opacity: .92; margin: 0; line-height: 1.6; padding-right: 28px; }
.mbs-modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.mbs-modal-close:hover { background: rgba(255, 255, 255, .32); }

.mbs-modal-body { padding: 18px 22px 4px; overflow-y: auto; }

.mbs-plan-list { display: flex; flex-direction: column; gap: 10px; }
.mbs-plan {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--mbs-border);
  border-radius: 10px;
  background: #FCFCFF;
  transition: all .18s;
}
.mbs-plan.active { border-color: var(--mbs-purple); background: var(--mbs-purple-soft); }
.mbs-plan-tag {
  flex: none;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: var(--mbs-gold-soft);
  color: #B7791F;
}
.mbs-plan-name { flex: 1; font-size: 14px; font-weight: 600; color: var(--mbs-text); }
.mbs-plan-name small { display: block; font-weight: 400; font-size: 12px; color: var(--mbs-sub); margin-top: 2px; }
.mbs-plan-price { font-size: 17px; font-weight: 700; color: var(--mbs-purple); white-space: nowrap; }
.mbs-plan-price.free { color: #0E9F6E; }

.mbs-section-title {
  margin: 18px 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--mbs-text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.mbs-section-title::before {
  content: '';
  width: 3px; height: 13px;
  border-radius: 2px;
  background: linear-gradient(180deg, #7B5CFF, #4F6BFF);
}

.mbs-pay-row { display: flex; gap: 14px; align-items: flex-start; }
.mbs-pay-box { flex: 1 1 0; min-width: 0; text-align: center; }
.mbs-pay-img {
  width: 100%;
  max-width: min(190px, 40vw);
  height: auto;
  object-fit: contain;
  border: 1px solid var(--mbs-border);
  border-radius: 10px;
  background: #fff;
  padding: 6px;
  box-sizing: border-box;
}
.mbs-pay-label { font-size: 12px; color: var(--mbs-sub); margin-top: 6px; }

.mbs-tip {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--mbs-gold-soft);
  border: 1px solid #F5E1B0;
  border-radius: 10px;
  font-size: 12.5px;
  color: #8A5A12;
  line-height: 1.7;
}
.mbs-tip b { color: #B7791F; }

.mbs-copy-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.mbs-kefu-row {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 12px;
  padding: 12px 14px;
  background: #F8F9FC;
  border: 1px solid var(--mbs-border);
  border-radius: 12px;
}
.mbs-kefu-qr {
  width: 96px;
  height: 96px;
  flex: 0 0 96px;
  object-fit: contain;
  border: 1px solid var(--mbs-border);
  border-radius: 8px;
  background: #fff;
}
.mbs-kefu-info { flex: 1 1 0; min-width: 0; text-align: left; }
.mbs-kefu-label { font-size: 12px; color: var(--mbs-sub); margin-bottom: 4px; }
.mbs-kefu-info .mbs-copy-row { margin-top: 0; }
.mbs-kefu-info .mbs-wechat-id { font-size: 18px; }

/* —— 客服咨询弹窗（扫码添加微信咨询） —— */
.mbs-consult-card {
  position: relative;
  width: 100%;
  max-width: 340px;
  background: #fff;
  border-radius: 16px;
  padding: 26px 22px 22px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(23, 43, 99, .22);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  animation: mbs-pop .22s ease-out;
}
.mbs-consult-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: #111;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.mbs-consult-ico { line-height: 0; margin-bottom: 8px; }
.mbs-consult-title { font-size: 19px; font-weight: 800; color: #111; margin-bottom: 16px; }
.mbs-consult-qrbox {
  background: #EAF7EF;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
}
.mbs-consult-qrbox img {
  width: 100%;
  max-width: 250px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #fff;
  border-radius: 10px;
  display: block;
  margin: 0 auto;
}
.mbs-consult-qr-fallback {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #6B7280;
  background: #fff;
  border-radius: 10px;
}
.mbs-consult-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #07C160;
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 11px 30px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.mbs-consult-copy:active { transform: scale(.97); }
.mbs-consult-tips {
  margin-top: 14px;
  padding: 12px 14px;
  background: #F7F8FA;
  border-radius: 12px;
  text-align: left;
  font-size: 13px;
  color: #374151;
}
.mbs-consult-tips div { margin: 3px 0; }
.mbs-wechat-id {
  flex: 1;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--mbs-text);
  padding: 8px 12px;
  background: #F3F4F8;
  border-radius: 8px;
  text-align: center;
}

.mbs-fold { margin-top: 12px; border: 1px solid var(--mbs-border); border-radius: 10px; overflow: hidden; }
.mbs-fold-head {
  padding: 11px 14px;
  font-size: 13px;
  color: var(--mbs-purple);
  font-weight: 600;
  cursor: pointer;
  background: #FAFAFF;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
.mbs-fold-head span.arrow { transition: transform .22s; font-size: 12px; }
.mbs-fold.open .mbs-fold-head span.arrow { transform: rotate(180deg); }
.mbs-fold-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .28s ease;
}
.mbs-fold.open .mbs-fold-body { max-height: 300px; }
.mbs-fold-inner { padding: 14px; display: flex; gap: 8px; }
.mbs-fold-inner input {
  flex: 1;
  height: 42px;
  border: 1px solid var(--mbs-border);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  outline: none;
  letter-spacing: 1px;
}
.mbs-fold-inner input:focus { border-color: var(--mbs-purple); }

.mbs-modal-foot { padding: 14px 22px 20px; }
.mbs-btn-ghost {
  width: 100%;
  height: 44px;
  border: 1px solid var(--mbs-border);
  background: #fff;
  color: var(--mbs-sub);
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
}
.mbs-btn-ghost:hover { background: #F7F8FC; }

/* 通用按钮 */
.mbs-btn {
  height: 42px;
  padding: 0 18px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #7B5CFF 0%, #4F6BFF 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .12s, box-shadow .18s;
}
.mbs-btn:hover { box-shadow: 0 8px 20px rgba(123, 92, 255, .3); }
.mbs-btn:active { transform: scale(.98); }
.mbs-btn.mbs-btn-gold { background: linear-gradient(135deg, #F7C948 0%, #F5A623 100%); }
.mbs-btn.mbs-btn-outline { background: #fff; color: var(--mbs-purple); border: 1.5px solid var(--mbs-purple); }
.mbs-btn-block { width: 100%; }

/* ---------- 3. 会员介绍页（全屏覆盖层） ---------- */
#mbs-page {
  position: fixed;
  inset: 0;
  background: var(--mbs-bg);
  z-index: 9990;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#mbs-page[hidden] { display: none; }

.mbs-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: #fff;
  border-bottom: 1px solid var(--mbs-border);
}
.mbs-topbar b { font-size: 16px; color: var(--mbs-text); }
.mbs-back {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--mbs-border);
  background: #fff;
  border-radius: 8px;
  font-size: 13px;
  color: var(--mbs-sub);
  cursor: pointer;
}

.mbs-wrap { max-width: 1080px; margin: 0 auto; padding: 24px 18px 60px; }

.mbs-hero { text-align: center; margin-bottom: 22px; }
.mbs-hero h1 {
  font-size: 27px;
  font-weight: 800;
  color: var(--mbs-text);
  margin-bottom: 8px;
  background: linear-gradient(135deg, #7B5CFF 0%, #4F6BFF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.mbs-hero p { font-size: 14px; color: var(--mbs-sub); line-height: 1.7; }

/* 当前会员状态卡 */
.mbs-status-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--mbs-radius);
  background: linear-gradient(135deg, #7B5CFF 0%, #4F6BFF 100%);
  color: #fff;
  margin-bottom: 22px;
  box-shadow: 0 10px 26px rgba(123, 92, 255, .24);
}
.mbs-status-card.free { background: linear-gradient(135deg, #8B93A7 0%, #6B7280 100%); box-shadow: none; }
.mbs-status-crown { font-size: 30px; }
.mbs-status-main { flex: 1; }
.mbs-status-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.mbs-status-sub { font-size: 13px; opacity: .9; line-height: 1.6; }

/* 定价卡片 */
.mbs-price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 26px;
}
.mbs-price-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--mbs-border);
  border-radius: var(--mbs-radius);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  transition: transform .16s, box-shadow .2s;
}
.mbs-price-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(23, 43, 99, .1); }
.mbs-price-card.hot { border-color: var(--mbs-purple); box-shadow: 0 8px 24px rgba(123, 92, 255, .16); }
.mbs-price-card.gold { border-color: #F5D9A0; }
.mbs-pc-tag {
  position: absolute;
  top: -11px; left: 50%;
  transform: translateX(-50%);
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #7B5CFF, #4F6BFF);
  white-space: nowrap;
}
.mbs-price-card.gold .mbs-pc-tag { background: linear-gradient(135deg, #F7C948, #F5A623); }
.mbs-pc-name { font-size: 15px; font-weight: 700; color: var(--mbs-text); margin-bottom: 10px; }
.mbs-pc-price { font-size: 32px; font-weight: 800; color: var(--mbs-purple); line-height: 1; margin-bottom: 4px; }
.mbs-pc-price small { font-size: 14px; font-weight: 500; color: var(--mbs-sub); }
.mbs-pc-desc { font-size: 13px; color: var(--mbs-sub); margin-bottom: 14px; }
.mbs-pc-feats { list-style: none; margin: 0 0 18px; padding: 0; flex: 1; }
.mbs-pc-feats li { font-size: 12.5px; color: #4B5563; padding: 4px 0 4px 18px; position: relative; }
.mbs-pc-feats li::before { content: '✓'; position: absolute; left: 0; color: #0E9F6E; font-weight: 700; }

/* 功能对比表 */
.mbs-sec-title { font-size: 18px; font-weight: 700; color: var(--mbs-text); margin: 26px 0 6px; }
.mbs-sec-sub { font-size: 13px; color: var(--mbs-sub); margin-bottom: 14px; }
.mbs-table-card {
  background: #fff;
  border: 1px solid var(--mbs-border);
  border-radius: var(--mbs-radius);
  overflow: hidden;
}
.mbs-table-scroll { overflow-x: auto; }
table.mbs-cmp { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
table.mbs-cmp th, table.mbs-cmp td { padding: 12px 14px; text-align: center; border-bottom: 1px solid var(--mbs-border); }
table.mbs-cmp th { background: #F5F6FA; font-weight: 600; color: #374151; font-size: 12.5px; white-space: nowrap; }
table.mbs-cmp td:first-child, table.mbs-cmp th:first-child { text-align: left; color: var(--mbs-text); font-weight: 500; }
table.mbs-cmp tbody tr { transition: background .15s; }
table.mbs-cmp tbody tr:hover { background: #FAFAFF; }
table.mbs-cmp tbody tr:last-child td { border-bottom: none; }
table.mbs-cmp .col-vip { background: #FAF8FF; font-weight: 600; color: #5B3FE0; }
table.mbs-cmp th.col-vip { background: #F1EDFF; }
table.mbs-cmp .free-val { color: var(--mbs-muted); }
table.mbs-cmp .tick { color: #0E9F6E; font-weight: 700; }

/* FAQ */
.mbs-faq { background: #fff; border: 1px solid var(--mbs-border); border-radius: var(--mbs-radius); overflow: hidden; margin-bottom: 24px; }
.mbs-faq-item { border-bottom: 1px solid var(--mbs-border); }
.mbs-faq-item:last-child { border-bottom: none; }
.mbs-faq-q {
  padding: 15px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--mbs-text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  user-select: none;
}
.mbs-faq-q:hover { background: #FAFAFF; }
.mbs-faq-q .ico {
  flex: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--mbs-purple-soft);
  color: var(--mbs-purple);
  font-size: 14px;
  line-height: 20px;
  text-align: center;
  transition: transform .25s;
}
.mbs-faq-item.open .mbs-faq-q .ico { transform: rotate(45deg); }
.mbs-faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
.mbs-faq-item.open .mbs-faq-a { max-height: 340px; }
.mbs-faq-a-inner {
  padding: 0 18px 16px;
  font-size: 13px;
  color: #4B5563;
  line-height: 1.85;
}

/* Toast */
#mbs-toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(26, 26, 46, .92);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s, transform .22s;
}
#mbs-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 4. 移动端自适应 ---------- */
@media (max-width: 860px) {
  .mbs-price-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .mbs-hero h1 { font-size: 22px; }
  .mbs-modal-head { padding: 16px 16px 14px; }
  .mbs-modal-head h3 { font-size: 17px; }
  .mbs-modal-body, .mbs-modal-foot { padding-left: 16px; padding-right: 16px; }
  .mbs-pay-row { gap: 10px; }
  .mbs-status-card { flex-direction: column; align-items: flex-start; }
  .mbs-btn { height: 46px; font-size: 15px; }
  .mbs-fold-inner { flex-direction: column; }
  .mbs-fold-inner input { height: 46px; }
}

/* ===== v85：账号额度明细（免费用户状态卡内） ===== */
.mbs-quota-box {
  margin-top: 12px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 10px;
  padding: 8px 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 18px;
}
.mbs-quota-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 12.5px; line-height: 24px;
}
.mbs-quota-row.zero { opacity: .75; }
.mbs-quota-num { font-variant-numeric: tabular-nums; font-weight: 600; }
.mbs-quota-num .inf { color: #FFE9A8; }
@media (max-width: 640px) { .mbs-quota-box { grid-template-columns: 1fr; } }
