/* 全国舞蹈老师网 - 前台样式（移动端优先） */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --blue: #2f6bff;
  --red: #ff4d4f;
  --green: #12a676;
  --muted: #999;
  --text: #222;
  --line: #ececf1;
  --page: #f5f6f8;
}
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: var(--page);
  color: var(--text);
  font-size: 14px;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }
input { font-family: inherit; outline: none; border: none; background: none; }

.wrap { max-width: 560px; margin: 0 auto; min-height: 100vh; background: #fff; position: relative; padding-bottom: 76px; }
.wrap.gray { background: var(--page); }

/* ---------- 顶部搜索栏 ---------- */
.searchbar { display: flex; align-items: center; gap: 10px; padding: 12px 14px 6px; }
.searchbox {
  flex: 1; display: flex; align-items: center; gap: 8px;
  border: 2px solid #222; border-radius: 999px; padding: 5px 6px 5px 12px; background: #fff;
}
.searchbox .check { flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%;
  background: #21c463; display: flex; align-items: center; justify-content: center; }
.searchbox input { flex: 1; font-size: 14px; color: var(--text); min-width: 0; }
.searchbox input::placeholder { color: #bbb; }
.searchbox .btn-search { font-size: 14px; color: #111; font-weight: 600; padding: 2px 10px; flex-shrink: 0; }
.iconbtn {
  width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid #222;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: #fff;
}
.iconbtn:active { background: #f2f2f5; }

.sitetitle { display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center; font-size: 19px; font-weight: 700; padding: 8px 0 10px; letter-spacing: 1px; }
.site-logo { width: 34px; height: 34px; border-radius: 8px; }
.sitetitle-bar { border-bottom: 8px solid var(--page); }

/* ---------- 位置导航 ---------- */
.locbar { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px 2px; }
.back-link { color: var(--blue); font-size: 14px; display: flex; align-items: center; visibility: hidden; }
.back-link.show { visibility: visible; }
.crumb { color: #555; font-size: 13px; }
.filter-label { font-size: 12px; color: var(--muted); padding: 6px 14px 2px; }

/* ---------- 筛选选项 ---------- */
.opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px 0; padding: 4px 8px 8px; }
.opt { font-size: 13px; color: #333; text-align: center; padding: 7px 0; border-radius: 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.opt.active { color: var(--blue); font-weight: 700; }
/* 全国洋酒胶囊入口 */
.opt.opt-pill { border: 1px solid #d9dee8; border-radius: 999px; color: #2b3f8f; font-weight: 600; background: #fff; padding: 6px 0; margin: 1px 0; }
.opt.opt-pill.active { color: var(--blue); border-color: var(--blue); }
.divider { border-top: 8px solid var(--page); }

/* ---------- 卡片列表 ---------- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 6px 12px 20px; }
.card { border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 2px 10px rgba(20, 24, 40, .06); position: relative; }
.card:active { transform: scale(.98); }
.card-top { aspect-ratio: 3 / 4; min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.card-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pin-tag { position: absolute; top: 8px; left: 8px; background: var(--red); color: #fff; font-size: 10px; padding: 2px 7px; border-radius: 4px; z-index: 2; }
.card-emoji { font-size: 42px; line-height: 1.15; filter: drop-shadow(0 2px 3px rgba(0,0,0,.08)); }
.card-nick { margin-top: 5px; font-size: 13px; color: #444; font-weight: 500; }
.card-info { padding: 8px 10px 10px; }
.card-title { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.dance-tag { font-size: 11px; color: var(--green); background: #e6f8f0; padding: 2px 8px; border-radius: 4px; }
.views { display: flex; align-items: center; gap: 3px; font-size: 11px; color: var(--muted); }

.state-tip { text-align: center; color: var(--muted); font-size: 13px; padding: 46px 20px; line-height: 1.9; }

/* ---------- 分页 ---------- */
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px 0 4px; }
.pg-btn { border: 1px solid #e5e6eb; background: #fff; color: #333; border-radius: 18px; padding: 8px 16px; font-size: 13px; }
.pg-btn:active { background: #f2f3f5; }
.pg-btn[disabled] { color: #bbb; border-color: #f0f0f0; }
.pg-info { font-size: 12px; color: #969799; }

/* ---------- 详情页 ---------- */
.navrow { display: flex; align-items: center; padding: 8px 14px; position: relative; }
.navrow .back { color: var(--blue); display: flex; align-items: center; }
.navrow .nav-title { position: absolute; left: 50%; transform: translateX(-50%); font-size: 16px; font-weight: 600; }

.detail { padding: 4px 14px 20px; }
.detail h1 { font-size: 24px; font-weight: 700; margin: 8px 0 8px; line-height: 1.35; color: #111; }

.d-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 12px; font-size: 12px; color: #999; }
.d-avatar { width: 26px; height: 26px; border-radius: 50%; background: #ececf1; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.d-item { display: flex; align-items: center; gap: 3px; }

.tag-row { display: flex; gap: 8px; margin: 10px 0 2px; }
.tag-pill { font-size: 11px; padding: 3px 9px; border-radius: 4px; color: #fff; }
.tag-red { background: var(--red); }
.tag-green { background: var(--green); }

.sec-title { display: flex; align-items: center; gap: 12px; color: #8a8a92; font-size: 13px; margin: 24px 0 10px; }
.sec-title::before, .sec-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.kv { font-size: 17px; color: #323233; padding: 5px 0; line-height: 1.6; }
.badge-green { display: inline-block; border: 1px solid var(--green); color: var(--green); background: #fff; font-size: 14px; padding: 1px 10px; border-radius: 4px; vertical-align: -2px; }

.block-label { font-size: 17px; color: #323233; margin: 22px 0 2px; }
.block-text { font-size: 17px; color: #969799; line-height: 1.8; white-space: pre-wrap; word-break: break-all; }
.block-text b { color: #111; }
.copy-hint2 { font-size: 12px; color: #aab; margin-left: 6px; }
#dWechat { cursor: pointer; }

.d-notice { margin-top: 14px; font-size: 13px; color: #f70; font-style: italic; line-height: 1.7; }
.fav-btn { margin-top: 12px; width: 100%; height: 40px; border-radius: 20px; border: 1px solid #f45ba9;
  background: #fff; color: #f45ba9; font-size: 14px; }
.fav-btn.on { background: linear-gradient(90deg, #f45ba9, #8a4fff); border-color: transparent; color: #fff; }

.photo-card { border-radius: 6px; overflow: hidden; margin-top: 10px; background: #eef1f6; }
.photo-card img { width: 100%; display: block; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(14px);
  background: rgba(17, 24, 39, .88); color: #fff; font-size: 13px; padding: 9px 18px; border-radius: 8px;
  opacity: 0; pointer-events: none; transition: .22s; z-index: 60; max-width: 80vw; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 底部导航 ---------- */
.bottomnav { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; z-index: 50;
  padding-bottom: env(safe-area-inset-bottom); }
.nav-inner { max-width: 560px; margin: 0 auto; display: flex; justify-content: space-around; padding: 7px 0; }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 3px; color: #1a1a1a; font-size: 10px; }
.nav-item svg { width: 21px; height: 21px; }
.nav-item.active { color: #1677ff; }
.nav-item:active { color: #1677ff; }

/* ---------- 桌面适配 ---------- */
@media (min-width: 640px) {
  .wrap { box-shadow: 0 0 0 1px #e8e8ee, 0 0 40px rgba(0,0,0,.06); }
  .card-emoji { font-size: 50px; }
  .auth-page, .member-page, .mine-page {
    max-width: 560px; margin: 0 auto; min-height: 100vh;
    box-shadow: 0 0 0 1px #e8e8ee, 0 0 40px rgba(0,0,0,.06);
  }
}

/* ---------- 防止页面左右滑动 ---------- */
body { overflow-x: hidden; overflow-x: clip; }
.page { max-width: 100%; }

/* ---------- 顶部标题栏（登录/注册/会员） ---------- */
.topbar { display: flex; align-items: center; height: 46px; background: #fff; position: sticky; top: 0; z-index: 40; }
.topbar-back { padding: 0 16px; font-size: 26px; line-height: 46px; color: #1677ff; text-decoration: none; }
.topbar-title { position: absolute; left: 50%; transform: translateX(-50%); font-size: 16px; font-weight: 700; color: #111; }

/* ---------- 登录 / 注册 ---------- */
.auth-page { background: #f5f6f8; min-height: 100vh; }
.auth-brand { display: flex; flex-direction: column; align-items: center; padding: 36px 0 26px; }
.auth-logo { width: 74px; height: 74px; border-radius: 18px; }
.auth-name { margin-top: 12px; font-size: 26px; font-weight: 700; color: #8a4fff; letter-spacing: 2px; }
.auth-slogan { margin-top: 4px; font-size: 12px; color: #969799; }
.auth-form { padding: 0 30px; display: flex; flex-direction: column; gap: 14px; }
.auth-input { height: 46px; border: none; border-radius: 12px; background: #fff; padding: 0 16px; font-size: 15px; outline: none; }
.auth-input:focus { box-shadow: 0 0 0 2px #c9b3f7; }
.captcha-row { display: flex; gap: 12px; align-items: center; }
.captcha-input { flex: 1; }
#captchaCanvas { border-radius: 10px; flex-shrink: 0; }
.auth-submit { height: 46px; border: none; border-radius: 23px; background: #1677ff; color: #fff; font-size: 16px; font-weight: 600; }
.auth-submit:active { opacity: .85; }
.auth-links { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 22px; }
.auth-links a { color: #1677ff; font-size: 14px; text-decoration: none; }

/* ---------- 会员中心 ---------- */
.member-page { background: #f5f6f8; min-height: 100vh; padding-bottom: 20px; }
.notice-bar { display: flex; align-items: center; gap: 6px; background: #fdf6e7; color: #d97a00; font-size: 12px; padding: 8px 14px; }
.notice-bar svg { width: 15px; height: 15px; flex-shrink: 0; }
.vip-banner { position: relative; margin: 14px; padding: 24px 20px; border-radius: 16px; overflow: hidden;
  background: linear-gradient(135deg, #8a4fff, #f45ba9); color: #fff; }
.vip-banner-vip { position: absolute; right: -8px; top: -6px; font-size: 92px; font-weight: 800; color: rgba(255,255,255,.16); line-height: 1; }
.vip-banner-title { position: relative; font-size: 21px; font-weight: 700; line-height: 1.5; }
.vip-banner-btn { position: relative; margin-top: 14px; border: none; background: #fff; color: #ff7841; font-size: 14px; font-weight: 600; padding: 8px 16px; border-radius: 18px; }
.vip-section { background: #fff; border-radius: 14px; margin: 0 14px 12px; padding: 16px; }
.vip-section-head { font-size: 17px; font-weight: 700; color: #111; margin-bottom: 14px; }
.vip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vip-cell { display: flex; align-items: center; gap: 10px; background: #f7f2fd; border-radius: 12px; padding: 14px; font-size: 14px; color: #222; }
.vip-ic { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #8a4fff, #f45ba9);
  display: inline-flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.vip-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.vip-plan { position: relative; border: 2px solid #eee; border-radius: 12px; padding: 22px 8px 10px; text-align: center; background: #fff; }
.vip-plan.selected { border-color: #f45ba9; background: #fff5fa; }
.vip-save { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); background: #ff7841; color: #fff; font-size: 10px; padding: 2px 8px; border-radius: 9px; white-space: nowrap; }
.vip-plan-name { font-size: 13px; color: #555; margin-bottom: 4px; }
.vip-plan.selected .vip-plan-name { color: #f45ba9; font-weight: 600; }
.vip-price { font-size: 19px; font-weight: 700; color: #f45ba9; }
.vip-origin { font-size: 11px; color: #aaa; text-decoration: line-through; margin-top: 2px; }
.vip-pay-row { display: flex; align-items: center; gap: 10px; padding: 6px 2px; }
.vip-pay-icon { width: 26px; height: 26px; border-radius: 50%; background: #1677ff; color: #fff; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center; }
.vip-pay-name { flex: 1; font-size: 14px; color: #f45ba9; }
.vip-radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #ddd; display: inline-block; }
.vip-radio.selected { border-color: #f45ba9; background: radial-gradient(circle, #f45ba9 40%, transparent 45%); }
.vip-agree { display: flex; align-items: center; gap: 8px; margin: 14px 18px 0; font-size: 13px; color: #333; }
.vip-check { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #ccc; display: inline-block; flex-shrink: 0; }
.vip-check.selected { border-color: #f45ba9; background: radial-gradient(circle, #f45ba9 45%, transparent 50%); }
.vip-agree a { color: #f45ba9; text-decoration: none; }
.vip-cta-wrap { position: relative; margin: 18px 18px 0; }
.vip-cta-tag { position: absolute; top: -12px; right: 4px; z-index: 2; background: #ff7841; color: #fff; font-size: 12px; padding: 4px 10px; border-radius: 12px 12px 12px 2px; }
.vip-cta { width: 100%; height: 48px; border: none; border-radius: 24px; font-size: 17px; font-weight: 700; color: #fff;
  background: linear-gradient(90deg, #f45ba9, #8a4fff); box-shadow: 0 4px 14px rgba(244,91,169,.35); }
.vip-cta:active { opacity: .88; }
.vip-pad { height: 76px; }

/* ---------- 联系方式付费墙（置顶帖仅会员可见） ---------- */
.contact-lock { padding: 14px 16px 18px; border: 1px solid #eef0f4; border-radius: 10px; background: #f7f8fa; }
.lock-head { display: flex; justify-content: space-between; align-items: center; }
.lock-title { font-size: 15px; font-weight: 700; color: #111; }
.lock-faq { font-size: 12px; color: var(--blue); }
.lock-tip { font-size: 14px; color: #6d6e72; text-align: center; margin: 20px 0 14px; }
.lock-btn { display: block; width: 62%; height: 40px; margin: 0 auto; border: none; border-radius: 20px;
  font-size: 15px; font-weight: 700; color: #fff; background: var(--blue); }
.lock-btn:active { opacity: .88; }

/* ---------- 个人中心 ---------- */
.mine-page { background: #f5f6f8; min-height: 100vh; }
.mine-header { background: #fff; padding: 14px 0 4px; text-align: center; }
.mine-title { font-size: 17px; font-weight: 700; color: #111; }
.mine-user { display: flex; align-items: center; gap: 14px; background: #fff; margin: 10px 0 12px; padding: 18px 18px; }
.mine-avatar { width: 58px; height: 58px; border-radius: 50%; background: #e8e8ee; color: #8e8e93; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; overflow: hidden; }
.mine-avatar svg { width: 34px; height: 34px; }
.mine-avatar.logged { background: linear-gradient(135deg, #8a4fff, #f45ba9); color: #fff; font-size: 24px; font-weight: 700; }
.mine-user-info { flex: 1; min-width: 0; }
.mine-username { font-size: 17px; font-weight: 600; color: #111; }
.mine-account { font-size: 12px; color: #969799; margin-top: 4px; }
.mine-arrow { color: #c8c8cc; font-size: 18px; }
.mine-group { background: #fff; border-radius: 14px; margin: 0 12px 12px; overflow: hidden; }
.mine-row { display: flex; align-items: center; gap: 10px; padding: 15px 16px; font-size: 15px; color: #111; position: relative; }
.mine-row + .mine-row { border-top: 1px solid #f2f2f7; }
.mine-row.center { justify-content: center; color: #111; }
.mine-ic { font-size: 16px; width: 22px; text-align: center; }
.mine-ic.red { color: #ff4d6a; } .mine-ic.blue { color: #1677ff; }
.mine-ic.green { color: #34c759; } .mine-ic.yellow { color: #ffb800; }
.mine-ic.purple { color: #8a4fff; }
.mine-value { margin-left: auto; color: #969799; font-size: 13px; }
.mine-row .mine-arrow { margin-left: auto; }
.mine-row:active { background: #f7f7fa; }
.fav-section { background: #fff; border-radius: 14px; margin: 0 12px 12px; padding: 16px; }
.fav-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; text-decoration: none; }
.fav-item + .fav-item { border-top: 1px solid #f2f2f7; }
.fav-img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.fav-none { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #ede4fb, #ffe4f2); font-size: 24px; }
.fav-info { flex: 1; min-width: 0; }
.fav-title { font-size: 14px; color: #222; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fav-meta { font-size: 12px; color: #969799; margin-top: 6px; }

/* ---------- 弹窗 ---------- */
.dialog-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 80; display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: .2s; }
.dialog-mask.show { opacity: 1; pointer-events: auto; }
.dialog { width: 78%; max-width: 320px; background: #fff; border-radius: 16px; padding: 22px 18px 16px; }
.dialog-title { font-size: 16px; font-weight: 700; color: #111; text-align: center; margin-bottom: 12px; }
.dialog-body { font-size: 14px; color: #555; line-height: 1.7; text-align: center; margin-bottom: 18px; }
.dialog-btns { display: flex; gap: 10px; }
.dlg-btn { flex: 1; height: 40px; border: none; border-radius: 20px; font-size: 14px; background: #f2f3f5; color: #333; }
.dlg-btn.primary { background: linear-gradient(90deg, #f45ba9, #8a4fff); color: #fff; }

/* ---------- 会员状态栏 / 扫码支付弹窗 ---------- */
.vip-status-bar { margin: 10px 12px 0; border-radius: 10px; padding: 10px 14px; font-size: 13px; line-height: 1.6; }
.vip-status-bar.pending { background: #fff7e8; color: #d97a00; }
.vip-status-bar.active { background: #f3ecff; color: #8a4fff; }
.pay-amount { text-align: center; font-size: 16px; font-weight: 700; color: #f45ba9; margin-bottom: 10px; }
.pay-qr { display: block; width: 200px; height: 200px; margin: 0 auto; border: 1px solid #f0f0f5; border-radius: 10px; object-fit: contain; background: #fafafa; }
.pay-tip { margin-top: 10px; text-align: center; font-size: 12px; color: #969799; line-height: 1.7; }
