* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --bg: #f4f6fb; --card: #ffffff; --ink: #1b2140; --muted: #7b829e;
  --brand: #4b50d8; --brand2: #13b8a6; --accent: #ff5c7a; --gold: #f4b23f;
  --line: #e6e9f4; --green: #17a36a; --red: #e5484d;
  --radius: 16px; --shadow: 0 6px 24px rgba(28, 39, 90, .07);
}
html, body { height: 100%; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.6;
}
#app { max-width: 520px; margin: 0 auto; min-height: 100%; padding-bottom: 74px; position: relative; }
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 15px; color: var(--ink); }

/* 顶部 */
.topbar { position: sticky; top: 0; z-index: 30; background: linear-gradient(135deg, #2b2f66, #4b50d8); color: #fff; padding: 14px 16px 12px; }
.topbar .brand { display: flex; align-items: center; gap: 10px; }
.topbar .logo { width: 46px; height: 34px; object-fit: contain; flex: none; }
.topbar .name { font-size: 18px; font-weight: 700; letter-spacing: .5px; }
.topbar .notice { margin-top: 8px; font-size: 12px; opacity: .92; display: flex; align-items: center; gap: 6px; }
.topbar .notice .dot { width: 6px; height: 6px; border-radius: 50%; background: #ffd166; flex: none; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .2; } }

/* 底部导航 */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 520px; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); display: flex; z-index: 40; padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); }
.tabbar .tab { flex: 1; text-align: center; font-size: 11px; color: var(--muted); padding: 4px 0; }
.tabbar .tab .ic { display: block; margin: 0 auto 2px; width: 22px; height: 22px; }
.tabbar .tab.on { color: var(--brand); font-weight: 600; }

/* 通用 */
.page { padding: 14px 14px 20px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px; }
.card h3 { font-size: 15px; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.card h3::before { content: ""; width: 4px; height: 14px; border-radius: 2px; background: linear-gradient(180deg, var(--brand), var(--brand2)); }
.sec-title { display: flex; justify-content: space-between; align-items: center; margin: 18px 2px 10px; }
.sec-title b { font-size: 16px; }
.sec-title span { font-size: 12px; color: var(--muted); }
.muted { color: var(--muted); font-size: 12px; }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; font-size: 13px; }

/* 按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 12px; padding: 10px 18px; font-size: 14px; font-weight: 600; transition: .15s; }
.btn:active { transform: scale(.97); }
.btn-primary { background: linear-gradient(135deg, var(--brand), #7c6cf0); color: #fff; }
.btn-teal { background: linear-gradient(135deg, #0fa893, var(--brand2)); color: #fff; }
.btn-outline { border: 1px solid var(--line); color: var(--ink); background: #fff; }
.btn-danger { background: #fdecec; color: var(--red); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 9px; }

/* 徽章 */
.badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 11px; color: #fff; font-weight: 600; letter-spacing: 1px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 8px; font-size: 11px; background: #eef0fb; color: #4a5177; margin: 2px 4px 2px 0; }
.tag.gold { background: #fdf3e0; color: #a76a12; }

/* 首页 */
.hero { position: relative; border-radius: var(--radius); overflow: hidden; height: 168px; margin-bottom: 12px; box-shadow: var(--shadow); }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero .mask { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(16,18,46,.72), rgba(16,18,46,.18) 60%, transparent); display: flex; flex-direction: column; justify-content: center; padding: 0 18px; color: #fff; }
.hero .mask b { font-size: 21px; letter-spacing: 1px; }
.hero .mask span { font-size: 12px; opacity: .9; margin-top: 6px; }
.title-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.title-chips::-webkit-scrollbar { display: none; }
.title-chip { flex: none; min-width: 74px; padding: 12px 10px; border-radius: 14px; color: #fff; text-align: center; box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.title-chip b { display: block; font-size: 16px; letter-spacing: 2px; }
.title-chip span { font-size: 10px; opacity: .85; }
.title-chip .chip-badge { display: block; width: 44px; height: 44px; object-fit: contain; margin: 0 auto 6px; border-radius: 11px; }

/* 爵位徽章图 */
.vip-badge { flex: none; width: 56px; height: 56px; object-fit: contain; border-radius: 13px; margin-right: 12px; }
.vip-badge.sm { width: 36px; height: 36px; margin-left: auto; border-radius: 9px; }
.vip-badge.xs { display: inline-block; width: 26px; height: 26px; margin-right: 7px; vertical-align: middle; border-radius: 7px; }
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 6px; }
.pkg-cell { border: 1px solid var(--line); border-radius: 10px; padding: 7px 2px; text-align: center; background: #fafbfe; }
.pkg-cell b { display: block; font-size: 12px; }
.pkg-cell .pc-h { display: block; font-size: 10px; color: var(--muted); margin-top: 1px; }
.pkg-cell span { display: block; font-size: 11px; color: var(--accent); font-weight: 700; margin-top: 2px; }

/* 账号卡片 */
.acct-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.acct-card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.acct-card .img { position: relative; height: 108px; }
.acct-card .img img { width: 100%; height: 100%; object-fit: cover; }
.acct-card .img .tbadge { position: absolute; left: 8px; top: 8px; }
.acct-card .img .img-badges { position: absolute; left: 8px; top: 8px; display: flex; align-items: center; gap: 4px; }
.acct-card .img .img-badges .tbadge { position: static; }
.badge.hot { background: #ff5c7a; }
.acct-card .body { padding: 9px 10px 11px; }
.acct-card .body b { font-size: 13px; display: block; margin-bottom: 3px; }
.acct-card .body .lv { font-size: 11px; color: var(--muted); }
.acct-card .foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 8px; }
.acct-card .foot button { white-space: nowrap; }
.acct-card .foot.mall-foot { flex-wrap: wrap; gap: 6px; }
.acct-card .foot.mall-foot .price { flex: 1 0 100%; }
.acct-card .foot.mall-foot button { flex: 1; white-space: nowrap; padding: 7px 6px; font-size: 12.5px; }
.price { color: var(--accent); font-weight: 700; }
.price small { font-size: 10px; font-weight: 400; color: var(--muted); }
.occupy { position: absolute; inset: 0; background: rgba(20,22,40,.55); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; }

/* 详情页 */
.detail-img { border-radius: var(--radius); overflow: hidden; height: 200px; margin-bottom: 12px; box-shadow: var(--shadow); }
.detail-img img { width: 100%; height: 100%; object-fit: cover; }
.price-line { display: flex; align-items: baseline; gap: 6px; }
.price-line .p { font-size: 24px; font-weight: 800; color: var(--accent); }
.attr-row { display: flex; gap: 6px; flex-wrap: wrap; }
.desc { white-space: pre-line; font-size: 13px; color: #4a5177; }
.buy-bar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 520px; background: #fff; border-top: 1px solid var(--line); padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; z-index: 45; }
.buy-bar .total b { font-size: 19px; color: var(--accent); }

/* 表单 */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; color: #4a5177; margin-bottom: 5px; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; background: #fafbfe; outline: none; }
.field input:focus { border-color: var(--brand); background: #fff; }
.err { color: var(--red); font-size: 12px; margin-top: 4px; }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(14,16,34,.55); z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.modal { background: #fff; width: 100%; max-width: 520px; border-radius: 20px 20px 0 0; max-height: 88vh; display: flex; flex-direction: column; animation: up .22s ease; }
@keyframes up { from { transform: translateY(40px); opacity: .5; } }
.modal .m-head { padding: 15px 16px 10px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal .m-body { padding: 14px 16px; overflow-y: auto; }
.modal .m-foot { padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; gap: 10px; }
.agree-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fafbfe; font-size: 12.5px; color: #4a5177; white-space: pre-line; max-height: 34vh; overflow-y: auto; line-height: 1.8; }
.agree-box .agree-hot { color: var(--red); font-weight: 700; }
.countdown { text-align: center; padding: 10px 0 2px; }
.countdown b { font-size: 26px; color: var(--brand); }

/* 订单 */
.order-card .row { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }
.order-card .row .k { color: var(--muted); }
.status-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.st-pending { background: #fdf3e0; color: #a76a12; }
.st-paid { background: #e6f6f2; color: #0f8a6d; }
.st-in_use { background: #e8ecfb; color: #4b50d8; }
.st-completed { background: #edf2f7; color: #55617c; }
.st-cancelled, .st-expired { background: #f2f3f7; color: #9aa1b5; }
.st-refunded { background: #fdecec; color: #e5484d; }
.cred-box { border: 1px dashed var(--brand); border-radius: 12px; padding: 12px; background: #f6f7ff; margin-top: 10px; }
.cred-box .line { display: flex; justify-content: space-between; align-items: center; font-size: 14px; padding: 4px 0; }
.cred-box .val { font-weight: 700; letter-spacing: .5px; }
.copy-btn { color: var(--brand); font-size: 12px; border: 1px solid #c9cdf2; border-radius: 8px; padding: 2px 8px; }
.count-timer { font-size: 12px; color: var(--muted); text-align: right; }

/* 支付 */
.pay-methods { display: flex; gap: 10px; }
.pay-method { flex: 1; border: 2px solid var(--line); border-radius: 14px; padding: 14px 8px; text-align: center; font-weight: 600; }
.pay-method.on { border-color: var(--brand); background: #f4f5ff; }
.pay-method .pm-ic { width: 34px; height: 34px; border-radius: 50%; margin: 0 auto 6px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 15px; }
.pay-method.wx .pm-ic { background: #07c160; }
.pay-method.ali .pm-ic { background: #1677ff; }
.pkg-money { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pkg-money button { border: 1px solid var(--line); border-radius: 12px; padding: 12px 4px; background: #fafbfe; }
.pkg-money button b { display: block; font-size: 15px; }
.pkg-money button span { font-size: 10px; color: var(--muted); }
.pkg-money button.on { border-color: var(--brand); background: #f4f5ff; }
.custom-amt { margin-top: 12px; }
.stepper-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.busy-tip { margin-top: 10px; background: #fff4f4; border: 1px solid #ffd7d7; color: #b03a3a; font-size: 12.5px; line-height: 1.7; padding: 8px 10px; border-radius: 10px; }
.sr-label { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fafbfe; }
.stepper button { width: 34px; height: 30px; font-size: 17px; line-height: 1; color: var(--brand); background: none; }
.stepper button:disabled { color: #c3c8dc; }
.stepper b { min-width: 44px; text-align: center; font-size: 15px; color: var(--ink); border-left: 1px solid var(--line); border-right: 1px solid var(--line); line-height: 30px; }
.sr-hint { font-size: 12px; color: var(--muted); margin-left: auto; }
.handoff { margin-top: 12px; border: 1px solid #ffd9a0; background: #fff8ec; border-radius: 12px; padding: 12px; }
.handoff b { color: #a76a12; font-size: 14px; }
.handoff p { font-size: 12.5px; color: #8a6a2a; margin-top: 6px; line-height: 1.7; }
.handoff .ho-row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 13px; color: #6b5320; }
.dl-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.dl-card { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); }
.dl-ic { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; flex: none; }
.dl-ic-ph { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #2b2f66, #4b50d8); color: #fff; font-size: 18px; font-weight: 700; }
.dl-body { flex: 1; min-width: 0; }
.dl-body b { display: block; font-size: 14.5px; }
.dl-desc { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-meta { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }
.dl-btn { flex: none; }
.dl-entry { cursor: pointer; }
.custom-amt label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.ca-row { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; background: #fafbfe; }
.ca-row b { font-size: 16px; color: var(--muted); }
.ca-row input { flex: 1; border: none; background: none; font-size: 16px; outline: none; min-width: 0; }
.ca-row .muted { font-size: 11px; white-space: nowrap; }
.qr-wrap { text-align: center; padding: 10px 0; }
.qr-wrap img { width: 200px; height: 200px; }
.qr-wrap .tip { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* 榜单 */
.rank-card { background: linear-gradient(135deg, #2b2f66, #4b50d8); border-radius: var(--radius); color: #fff; padding: 16px; }
.rank-card .rnum { font-size: 34px; font-weight: 800; }
.rank-card .gap { display: flex; justify-content: space-between; margin-top: 10px; font-size: 12.5px; opacity: .95; }
.rank-card .gap b { display: block; font-size: 16px; }
.seg { display: inline-flex; background: #eef0fb; border-radius: 999px; padding: 3px; }
.seg button { padding: 5px 14px; border-radius: 999px; font-size: 13px; color: #4a5177; }
.seg button.on { background: #fff; color: var(--brand); font-weight: 700; box-shadow: 0 2px 6px rgba(0,0,0,.08); }

/* 实名步骤 */
.face-box { text-align: center; padding: 8px 0; }
.face-box .face-ic { width: 74px; height: 74px; border-radius: 50%; background: #eef0fb; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; }
.face-photo { width: 120px; height: 120px; border-radius: 16px; object-fit: cover; margin: 6px auto; display: block; border: 3px solid var(--line); }

/* 维护门 */
.gate { position: fixed; inset: 0; background: linear-gradient(160deg, #20224a, #10122a); z-index: 100; display: flex; align-items: center; justify-content: center; color: #fff; padding: 20px; }
.gate .inner { width: 100%; max-width: 340px; text-align: center; }
.gate h2 { font-size: 20px; margin-bottom: 6px; }
.gate p { font-size: 13px; opacity: .7; margin-bottom: 18px; }
.gate input { width: 100%; border-radius: 12px; padding: 12px 14px; border: none; outline: none; font-size: 15px; margin-bottom: 10px; }
.gate .btn { width: 100%; }

/* 登录页 */
.auth-wrap { padding: 60px 24px; text-align: center; }
.auth-wrap .big-logo { width: 104px; height: 80px; object-fit: contain; display: block; margin: 0 auto 12px; }
.auth-wrap h1 { font-size: 21px; margin-bottom: 6px; }
.auth-wrap .sub { color: var(--muted); font-size: 13px; margin-bottom: 26px; }
.auth-card { text-align: left; }
.demo-hint { background: #f6f7ff; border: 1px dashed #c9cdf2; border-radius: 12px; padding: 10px 12px; font-size: 12.5px; color: #4a5177; margin-top: 14px; }

/* 用户信息 */
.me-head { display: flex; gap: 12px; align-items: center; }
.avatar { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: 0 4px 10px rgba(0,0,0,.12); }
.avatar-ph { width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, #7c6cf0, #13b8a6); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; }
.kv { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid #f0f2f8; font-size: 14px; }
.kv:last-child { border-bottom: none; }
.kv .k { color: #4a5177; }
.kv .v { font-weight: 600; text-align: right; }
.toast { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); background: rgba(20,22,40,.92); color: #fff; font-size: 13px; padding: 9px 18px; border-radius: 999px; z-index: 120; max-width: 90%; }
