/* PreferShop H5 —— 业务组件样式（深色主题，配合 app.css） */

/* 按钮别名 */
.btn.sm { padding: 8px 14px; font-size: 13px; }
.btn.big { padding: 15px 18px; font-size: 16px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn.primary.block, .btn.ghost.block { margin-top: 8px; }
.btn.orange { color: #221200; }

.muted { color: var(--muted); }
.bold { font-weight: 800; }
.mt12 { margin-top: 12px; }
.pad { padding: 6px 2px 12px; }
.center { text-align: center; }

/* 顶部 */
.home-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; position: sticky; top: 0; z-index: 20; background: rgba(0,0,0,0.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.home-brand { display: flex; align-items: center; gap: 8px; }
.home-brand img { width: 30px; height: 30px; object-fit: contain; }
.brand-name { font-weight: 800; letter-spacing: 0.5px; }

/* 首页 banner */
.home-body { padding: 0 0 12px; }
.hero-banner { position: relative; height: 150px; margin: 4px 14px 12px; border-radius: var(--radius); overflow: hidden; }
.hero-banner img { width: 100%; height: 100%; object-fit: cover; }
.hero-tint { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,0.82), rgba(0,0,0,0.15)); }
.hero-text { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); }
.hero-title { font-size: 24px; font-weight: 900; letter-spacing: 0.5px; }
.hero-sub { color: var(--text-2); font-size: 13px; margin-top: 4px; }

/* 快捷入口 */
.quick-row { display: flex; gap: 8px; padding: 0 14px 6px; }
.quick-item { flex: 1; background: var(--card); border-radius: var(--radius-sm); padding: 12px 4px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; }
.quick-item .ico { width: 22px; height: 22px; color: var(--pink); }

/* 分类区块 */
.cate-block { margin: 12px 0; }
.cate-head { display: flex; align-items: center; justify-content: space-between; padding: 0 14px 8px; }
.cate-title { font-size: 16px; font-weight: 800; }
.cate-more { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 2px; }
.cate-more .ico { width: 14px; height: 14px; }

/* 商品网格 */
.goods-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0 14px; }
.goods-card { background: var(--card); border-radius: var(--radius-sm); overflow: hidden; }
.goods-cover { aspect-ratio: 1; overflow: hidden; background: var(--card-2); }
.goods-cover img { width: 100%; height: 100%; object-fit: cover; }
.goods-name { font-size: 13px; line-height: 1.35; margin: 8px 10px 4px; height: 35px; overflow: hidden; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.goods-price { font-size: 15px; font-weight: 800; color: var(--pink); margin: 0 10px 10px; }

/* 详情 */
.detail-swipe { display: flex; overflow-x: auto; gap: 6px; padding: 6px 14px; }
.detail-swipe img { width: 100%; max-width: 340px; border-radius: var(--radius-sm); flex: none; }
.detail-card { margin: 10px 14px; background: var(--card); border-radius: var(--radius); padding: 16px; }
.detail-name { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.detail-price { font-size: 24px; font-weight: 900; color: var(--pink); }
.detail-price b { font-size: 28px; }
.detail-return { margin-top: 8px; font-size: 13px; color: var(--green); }
.detail-desc { margin-top: 12px; color: var(--text-2); font-size: 14px; white-space: pre-wrap; }

/* 底部购买栏 */
.buybar { position: fixed; left: 0; right: 0; bottom: 0; max-width: 520px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: var(--card-2); border-top: 1px solid var(--line); z-index: 40; }
.buybar[hidden] { display: none; }
.buy-price { flex: 1; }
.buy-price .muted { display: block; font-size: 11px; }
.buy-price b { font-size: 20px; color: var(--pink); }
.buybar .btn { min-width: 120px; }

/* 抢单 */
.orders-top { padding: 12px 14px 4px; }
.stats-card { background: var(--card); border-radius: var(--radius); padding: 16px; }
.stat-main { text-align: center; margin-bottom: 12px; }
.stat-label { color: var(--muted); font-size: 12px; }
.stat-value { font-size: 32px; font-weight: 900; color: var(--pink); }
.stat-row { display: flex; border-top: 1px solid var(--line); padding-top: 12px; }
.stat { flex: 1; text-align: center; }
.stat-num { font-size: 18px; font-weight: 800; }
.stat-l { color: var(--muted); font-size: 11px; margin-top: 2px; }
.orders-top .btn.big { margin-top: 12px; }

/* 通用 */
.section-title { font-size: 15px; font-weight: 800; margin: 16px 14px 8px; }

/* 订单行 */
.order-row { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: var(--radius-sm); padding: 10px; margin: 8px 14px; }
.order-img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex: none; }
.order-info { flex: 1; min-width: 0; }
.order-name { font-size: 13px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.order-meta { display: flex; gap: 8px; font-size: 11px; margin-top: 4px; }
.order-meta .reward { color: var(--green); }
.order-side { text-align: right; }
.order-amount { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.badge.ok { color: var(--green); font-size: 12px; }

/* 钱包 */
.wallet-card { margin: 12px 14px; background: linear-gradient(135deg, #2a1030, #1a0a20); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.wallet-label { color: var(--muted); font-size: 12px; }
.wallet-amount { font-size: 32px; font-weight: 900; color: var(--pink); margin: 4px 0 12px; }
.wallet-actions { display: flex; gap: 10px; }
.wallet-actions .btn { flex: 1; text-align: center; }

.mini-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0 14px; }
.mini { background: var(--card); border-radius: var(--radius-sm); padding: 14px; }
.mini-num { font-size: 18px; font-weight: 800; }
.mini-l { color: var(--muted); font-size: 11px; margin-top: 2px; }

.cell-link { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: var(--radius-sm); padding: 14px; margin: 8px 14px; font-size: 14px; }
.cell-link span { flex: 1; }
.cell-link .ico:first-child { width: 20px; height: 20px; color: var(--pink); }
.cell-link .ico:last-child { width: 16px; height: 16px; color: var(--muted); }
.menu-list { margin-top: 6px; }

/* 表单卡片 */
.form-card { margin: 12px 14px; background: var(--card); border-radius: var(--radius); padding: 16px; }
.form-title { font-size: 13px; color: var(--muted); margin: 12px 0 6px; }
.form-title:first-child { margin-top: 0; }

.input { width: 100%; background: var(--card-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 15px; margin-bottom: 10px; color: var(--text); outline: none; }
.input:focus { border-color: rgba(255, 45, 120, 0.6); }

.tip { color: var(--muted); font-size: 12px; margin-top: 10px; line-height: 1.5; }
.tip.center { text-align: center; }

/* 方式选择 */
.method-row { display: flex; gap: 8px; margin-bottom: 6px; }
.method { flex: 1; text-align: center; padding: 12px 6px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 13px; color: var(--text-2); cursor: pointer; }
.method.on { border-color: var(--pink); color: var(--pink); background: rgba(255, 45, 120, 0.08); }

/* 金额快捷 */
.amount-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chip { padding: 8px 12px; border: 1px solid var(--line); border-radius: 20px; background: var(--card-2); font-size: 13px; cursor: pointer; }
.chip:active { border-color: var(--pink); color: var(--pink); }

/* 提现费率 */
.fee-row { display: flex; gap: 8px; margin: 10px 0; }
.fee { flex: 1; background: var(--card-2); border-radius: var(--radius-sm); padding: 10px; text-align: center; font-size: 14px; font-weight: 700; }
.fee .muted { display: block; font-size: 11px; font-weight: 400; }

/* 地址框 */
.addr-box { display: flex; align-items: flex-start; gap: 8px; background: var(--card-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 6px; }
.addr-text { flex: 1; word-break: break-all; font-size: 13px; color: var(--text-2); }
.big-amount { font-size: 28px; font-weight: 900; color: var(--pink); }

/* 记录 */
.rec-row { display: flex; align-items: center; justify-content: space-between; background: var(--card); border-radius: var(--radius-sm); padding: 12px 14px; margin: 6px 14px; }
.rec-name { font-size: 14px; font-weight: 600; }
.rec-date { font-size: 11px; }
.rec-side { text-align: right; }
.rec-amount { font-size: 15px; font-weight: 700; }
.rec-amount.in { color: var(--green); }
.rec-amount.out { color: var(--pink); }
.rec-status { font-size: 11px; }

/* 登录 */
.login-hero { text-align: center; padding: 48px 0 16px; }
.login-hero img { height: 64px; margin: 0 auto; }
.login-title { font-size: 22px; font-weight: 900; margin-top: 12px; }
.login-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.link-center { display: block; text-align: center; color: var(--pink); font-size: 14px; margin-top: 14px; }

/* 个人 */
.profile-card { display: flex; align-items: center; gap: 12px; margin: 12px 14px; background: var(--card); border-radius: var(--radius); padding: 16px; }
.avatar { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; }
.profile-info { flex: 1; }
.profile-name { font-size: 17px; font-weight: 800; }
.profile-uid { font-size: 12px; }

/* 邀请 */
.invite-hero { text-align: center; padding: 32px 20px 8px; }
.invite-title { font-size: 22px; font-weight: 900; background: linear-gradient(180deg, #ff5c8a, #ff2d78); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.invite-sub { color: var(--muted); font-size: 13px; margin-top: 6px; }
.invite-row { display: flex; gap: 10px; margin-bottom: 6px; }
.invite-cell { flex: 1; background: var(--card-2); border-radius: var(--radius-sm); padding: 12px; text-align: center; }
.invite-cell .big { font-size: 18px; font-weight: 800; }

/* 上传 */
.upload-box { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px; border: 1px dashed var(--line); border-radius: var(--radius-sm); color: var(--muted); font-size: 13px; margin-bottom: 6px; cursor: pointer; }
.upload-box .ico { width: 26px; height: 26px; }
.upload-box img { max-height: 120px; border-radius: 8px; }

/* 地址卡片 */
.addr-card { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: var(--radius-sm); padding: 12px 14px; margin: 8px 14px; }
.addr-main { flex: 1; }
.addr-name { font-weight: 700; font-size: 14px; }
.addr-body { color: var(--text-2); font-size: 13px; margin-top: 4px; }
.addr-actions { display: flex; flex-direction: column; gap: 6px; }

/* 客服 */
.service-hero { text-align: center; padding: 36px 0 16px; color: var(--muted); }
.service-hero .ico { width: 40px; height: 40px; margin: 0 auto 10px; color: var(--pink); }

.service-top { text-align: center; padding: 30px 0 16px; }
.service-icon { width: 58px; height: 58px; border-radius: 18px; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; background: rgba(255, 45, 120, 0.12); border: 1px solid rgba(255, 45, 120, 0.35); box-shadow: 0 0 30px rgba(255, 45, 120, 0.25); }
.service-icon .ico { width: 28px; height: 28px; color: var(--pink); }
.service-title { font-size: 20px; font-weight: 900; }
.service-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }

.support-card { margin: 0 14px 14px; background: var(--card); border-radius: var(--radius); overflow: hidden; }
.support-row { display: flex; align-items: center; gap: 12px; padding: 16px 14px; border-bottom: 1px solid var(--line); }
.support-row:last-child { border-bottom: 0; }
.support-row .ico:last-child { width: 16px; height: 16px; color: var(--muted); }
.sup-ico { width: 34px; height: 34px; border-radius: 10px; background: var(--card-2); display: flex; align-items: center; justify-content: center; flex: none; }
.sup-ico .ico { width: 18px; height: 18px; color: var(--pink); }
.sup-info { flex: 1; min-width: 0; }
.sup-info b { display: block; font-size: 14px; font-weight: 700; }
.sup-info span { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.faq-card { margin: 0 14px 14px; background: var(--card); border-radius: var(--radius); overflow: hidden; }
.faq-title { padding: 16px 14px 8px; font-size: 15px; font-weight: 800; }
.faq-row { display: flex; align-items: center; justify-content: space-between; padding: 14px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--text-2); }
.faq-row em { font-style: normal; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; }

/* 规则 */
.rules-img { width: 100%; }

/* ================= 短剧模块 ================= */
.home-drama { padding: 12px 0 0; }

.drama-search { display: flex; gap: 8px; padding: 0 14px 10px; }
.drama-search-input { flex: 1; background: var(--card-2); border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; font-size: 14px; outline: none; color: var(--text); }
.drama-search-input:focus { border-color: rgba(255, 45, 120, 0.6); }
.drama-search-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--pink-grad); color: #fff; display: flex; align-items: center; justify-content: center; }
.drama-search-btn .ico { width: 18px; height: 18px; }

.drama-sort { display: flex; gap: 16px; padding: 0 14px 8px; align-items: center; }
.drama-sort button { background: none; border: 0; color: var(--muted); font-size: 14px; padding: 4px 0; position: relative; }
.drama-sort button.on { color: var(--text); font-weight: 800; }
.drama-sort button.on::after { content: ''; position: absolute; left: 50%; bottom: -2px; transform: translateX(-50%); width: 16px; height: 3px; border-radius: 2px; background: var(--pink); }

.drama-chips { display: flex; gap: 8px; padding: 4px 14px 10px; overflow-x: auto; scrollbar-width: none; }
.drama-chips::-webkit-scrollbar { display: none; }
.drama-chip { flex: none; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text-2); font-size: 12.5px; white-space: nowrap; }
.drama-chip.on { background: var(--pink-grad); border-color: transparent; color: #fff; font-weight: 700; }

.drama-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 8px; padding: 0 14px; }
.drama-card { display: block; }
.drama-cover { position: relative; aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; background: var(--card-2); }
.drama-cover img { width: 100%; height: 100%; object-fit: cover; }
.drama-hot { position: absolute; left: 6px; top: 6px; background: var(--pink-grad); color: #fff; font-size: 9px; font-weight: 800; padding: 2px 6px; border-radius: 6px; letter-spacing: 0.5px; }
.drama-play { position: absolute; right: 6px; bottom: 6px; width: 26px; height: 26px; border-radius: 50%; background: rgba(0,0,0,0.45); display: flex; align-items: center; justify-content: center; color: #fff; }
.drama-play .ico { width: 13px; height: 13px; }
.drama-name { font-size: 12px; line-height: 1.3; margin-top: 6px; color: var(--text); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 31px; }
.drama-meta { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); margin-top: 3px; }

.drama-all { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 10px 14px 2px; padding: 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-2); font-size: 13px; }
.drama-all .ico { width: 14px; height: 14px; }

/* 推广 banner */
.promo-banner { position: relative; display: flex; align-items: center; gap: 12px; margin: 14px; padding: 18px 16px; border-radius: var(--radius); overflow: hidden; background: linear-gradient(120deg, #2b0f22, #3a1130 60%, #241021); border: 1px solid rgba(255, 45, 120, 0.25); }
.promo-glow { position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: var(--pink); filter: blur(50px); opacity: 0.45; }
.promo-text { flex: 1; position: relative; z-index: 1; }
.promo-text b { display: block; font-size: 17px; font-weight: 900; }
.promo-text span { display: block; font-size: 12px; color: var(--text-2); margin-top: 3px; }
.promo-cta { position: relative; z-index: 1; background: var(--pink-grad); color: #fff; font-weight: 800; font-size: 13px; padding: 10px 18px; border-radius: 999px; }

.shop-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px 0; }
.shop-head span { font-size: 16px; font-weight: 800; }

/* 短剧详情 */
.drama-hero { display: flex; gap: 12px; margin: 12px 14px; background: var(--card); border-radius: var(--radius); padding: 12px; }
.drama-hero-cover { width: 92px; height: 132px; border-radius: 10px; object-fit: cover; flex: none; }
.drama-hero-info { flex: 1; min-width: 0; }
.drama-hero-title { font-size: 16px; font-weight: 800; line-height: 1.3; }
.drama-hero-meta { display: flex; gap: 10px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.drama-hero-desc { font-size: 12px; color: var(--text-2); margin-top: 8px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }

.drama-player-wrap { margin: 0 14px; background: #000; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.drama-video { width: 100%; display: block; background: #000; aspect-ratio: 9 / 14; max-height: 60vh; object-fit: contain; }
.drama-ep-title { padding: 10px 14px; font-size: 13px; color: var(--text-2); border-top: 1px solid var(--line); }

.ep-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; padding: 0 14px; }
.ep-cell { padding: 10px 0; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--text-2); font-size: 13px; }
.ep-cell.on { background: var(--pink-grad); border-color: transparent; color: #fff; font-weight: 800; }
.ep-cell.locked { opacity: 0.4; border-style: dashed; }

.ep-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 14px 8px; font-size: 15px; font-weight: 800; }
.ep-head .muted { font-size: 11.5px; font-weight: 400; }

/* 推广素材 */
.promo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 0 14px 20px; }
.promo-item { background: var(--card); border-radius: var(--radius-sm); padding: 8px; }
.promo-poster { aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden; background: var(--card-2); }
.promo-poster img { width: 100%; height: 100%; object-fit: cover; }
.promo-name { font-size: 12px; line-height: 1.3; margin: 8px 2px 6px; height: 31px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.promo-item .btn { width: 100%; }
.promo-big { width: 100%; max-height: 320px; object-fit: contain; border-radius: 10px; margin-bottom: 8px; background: var(--card-2); }
.promo-big-name { font-size: 13px; text-align: center; margin-bottom: 10px; color: var(--text-2); }

/* ================= 个人中心（参考样式） ================= */
.acct-head { display: flex; align-items: center; gap: 12px; padding: 16px 14px 12px; }
.acct-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none; }
.acct-main { flex: 1; min-width: 0; }
.acct-name { font-size: 17px; font-weight: 800; }
.acct-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 3px; }
.acct-copy { width: 20px; height: 20px; border: 0; background: none; color: var(--muted); padding: 0; display: flex; align-items: center; }
.acct-copy .ico { width: 13px; height: 13px; }
.acct-gear { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; color: var(--text-2); }
.acct-gear .ico { width: 19px; height: 19px; }

.vip-band { margin: 0 14px 12px; padding: 9px 16px; border-radius: 999px; background: linear-gradient(92deg, #1e3fa8, #2f6bff); color: #fff; font-size: 12.5px; font-weight: 800; letter-spacing: 0.5px; }

.bal-card { margin: 0 14px 12px; background: var(--card); border-radius: var(--radius); overflow: hidden; }
.bal-tabs { display: flex; border-bottom: 1px solid var(--line); }
.bal-tabs a { flex: 1; text-align: center; padding: 12px 0; font-size: 13.5px; color: var(--text-2); }
.bal-tabs a:first-child { border-right: 1px solid var(--line); }
.bal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; }
.bal-l { font-size: 11px; color: var(--muted); }
.bal-v { font-size: 16px; font-weight: 800; margin-top: 3px; }
.bal-v.pink { color: var(--pink); }
.bal-v.orange { color: var(--orange); }
.bal-v.green { color: var(--green); }

.team-row { display: flex; align-items: center; gap: 8px; margin: 0 14px 12px; background: var(--card); border-radius: var(--radius-sm); padding: 14px; font-size: 14px; }
.team-row .team-ico .ico { width: 18px; height: 18px; color: var(--pink); display: block; }
.team-label { flex: 1; font-weight: 600; }
.team-row > .ico:last-child { width: 16px; height: 16px; color: var(--muted); }

.acct-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 14px; }
.acct-cell { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 16px 4px; background: var(--card); border-radius: 12px; font-size: 11.5px; color: var(--text-2); text-align: center; }
.acct-cell .ico { width: 22px; height: 22px; color: var(--pink); }
