/* ===== 数文知识 前台样式 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { background: #e9edf2; }
body { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif; color: #333; font-size: 14px; }
a { text-decoration: none; color: inherit; }
img { display: block; }
input, textarea, select, button { font-family: inherit; outline: none; border: none; background: none; }
button { cursor: pointer; }

.app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: #f5f6f8; position: relative; padding-bottom: 64px; }
.app.no-pad { padding-bottom: 0; }
.app.has-buybar { padding-bottom: 130px; }

/* ===== 底部导航 ===== */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; background: #fff; display: flex; border-top: 1px solid #ececec; z-index: 50; padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { flex: 1; text-align: center; padding: 6px 0 7px; color: #9aa0a6; font-size: 11px; }
.tabbar a svg { width: 22px; height: 22px; display: block; margin: 0 auto 3px; }
.tabbar a.active { color: #2e8cf0; }

/* ===== 首页头部：banner图自适应 + 宣传文字 ===== */
.page-head { position: relative; background: linear-gradient(180deg, #cfe9fc 0, #e8f4fe 100%); }
.hero-bg { display: block; width: 100%; height: auto; }
.hero-txt { display: none; }
.hero-desc { margin: 3vw 4vw 1vw; color: #4a5866; font-size: 3.9vw; line-height: 1.85; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }

/* ===== 公告条 ===== */
.notice { display: flex; align-items: center; background: #fff; border-radius: 12px; margin: 10px 10px 0; padding: 12px 14px; box-shadow: 0 1px 4px rgba(20,60,120,.06); overflow: hidden; }
.notice svg { width: 18px; height: 18px; flex-shrink: 0; margin-right: 9px; }
.notice-clip { flex: 1; overflow: hidden; }
.notice-txt { display: inline-block; white-space: nowrap; color: #444; font-size: 14px; padding-left: 100%; animation: marquee 18s linear infinite; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }

/* ===== 双Tab + 搜索面板 ===== */
.tab-panel { margin: 10px 12px 0; background: linear-gradient(180deg, #e3eefb 0%, #eef6ff 100%); border-radius: 16px; padding: 20px 10px; }
.tabs { display: flex; }
.tab-item { flex: 1; text-align: center; font-size: 21px; color: #8a94a0; padding: 12px 0; position: relative; line-height: 1.2; }
.tab-item.active { color: #1a4b9c; font-weight: 700; }
.tab-item.active::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); bottom: 6px; width: 36px; height: 3px; background: #2e6bd8; border-radius: 3px; }

.home-search { display: flex; align-items: center; background: #fff; border-radius: 21px; padding: 4px 4px 4px 14px; box-shadow: 0 2px 8px rgba(30,90,170,.06); }
.home-search svg { width: 16px; height: 16px; flex-shrink: 0; color: #9aa4af; margin-right: 9px; }
.home-search input { flex: 1; min-width: 0; font-size: 15px; color: #333; }
.home-search input::placeholder { color: #b6bec7; }
.home-search button { flex-shrink: 0; background: linear-gradient(90deg, #2f9df5, #1f7bf6); color: #fff; border-radius: 21px; padding: 7px 16px; font-size: 13px; font-weight: 500; }

.list-wrap { padding-top: 10px; }

/* 套餐卡片（小一档） */
.p-card { position: relative; display: block; background: #fff; border-radius: 12px; padding: 10px 12px 11px; margin: 0 12px 10px; box-shadow: 0 2px 8px rgba(20,60,120,.05); }
.p-seal { position: absolute; right: 10px; top: 10px; width: 48px; height: 48px; opacity: .95; }
.p-seal svg { width: 100%; height: 100%; }
.p-title { font-size: 18px; font-weight: 700; color: #111; line-height: 1.4; padding-right: 64px; }
.p-time { margin-top: 8px; font-size: 13px; color: #9aa4af; }
.p-row { display: flex; align-items: center; margin-top: 10px; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 4px 8px; border-radius: 6px; margin-right: 8px; white-space: nowrap; }
.badge svg { width: 11px; height: 11px; }
.badge.audit { color: #e8930c; background: #fdf3e7; }
.badge.real { color: #2f8ef6; background: #e3f1fd; }
.p-price { margin-left: auto; color: #e5353b; font-size: 22px; font-weight: 700; font-family: "DIN Alternate", Arial, sans-serif; }
.p-price small { font-size: 15px; font-weight: 600; margin-right: 2px; }

/* 历史战绩卡片（一天一卡：日期大标题 + 查看按钮） */
.h-card { background: #fff; border-radius: 14px; padding: 20px 20px 18px; margin: 0 14px 18px; box-shadow: 0 1px 4px rgba(20,60,120,.04); }
.h-top { display: flex; align-items: center; justify-content: space-between; }
.h-date { font-size: 19px; font-weight: 700; color: #111; }
.h-view { border: 1.5px solid #2e8cf0; color: #2e8cf0; border-radius: 20px; padding: 8px 24px; font-size: 15px; background: #fff; }
.h-time { margin-top: 12px; font-size: 13px; color: #555; }
/* 今日最新发布提醒条（仅今天有发布时显示在今日最后一篇之后） */
.today-tip { background: #f03e3e; color: #fff; text-align: center; font-weight: 700; font-size: 14px; line-height: 1.4; letter-spacing: 1px; border-radius: 8px; padding: 7px 0; margin: 0 14px 18px; }

/* ===== 首页弹窗 ===== */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 34px; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 330px; padding: 22px 18px 18px; max-height: 78vh; display: flex; flex-direction: column; }
.modal h3 { text-align: center; font-size: 17px; color: #111; }
.modal .m-body { margin-top: 14px; font-size: 13.5px; line-height: 1.75; color: #333; white-space: pre-wrap; overflow-y: auto; }
.modal .m-time { color: #9aa4af; font-size: 12px; margin-top: 12px; }
.modal .m-btn { margin-top: 14px; background: linear-gradient(90deg, #3fa4ff, #1f7bf6); color: #fff; border-radius: 22px; padding: 11px 0; text-align: center; font-size: 16px; flex-shrink: 0; }

/* ===== 子页顶部导航 ===== */
.pnav { position: sticky; top: 0; background: #fff; display: flex; align-items: center; height: 46px; z-index: 20; border-bottom: 1px solid #f0f0f0; }
.pnav .back { padding: 0 14px; height: 100%; display: flex; align-items: center; }
.pnav .back svg { width: 20px; height: 20px; }
.pnav .ttl { flex: 1; text-align: center; font-size: 16px; font-weight: 600; color: #222; }
.pnav .rlink { padding: 0 14px; color: #2e8cf0; font-size: 14px; }
.pnav .ttl.with-r { margin-right: 0; }

/* 悬浮返回 */
.fab-back { position: fixed; right: 14px; bottom: 120px; width: 46px; height: 46px; border-radius: 50%; background: #3b8ff3; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; box-shadow: 0 4px 12px rgba(59,143,243,.45); z-index: 60; }

/* ===== 我的页面 ===== */
.me-hero { background: linear-gradient(180deg, #d3e8fc 0%, #e9f4fe 55%, #f5f7fa 100%); padding: 30px 16px 22px; text-align: center; }
.me-avatar { width: 88px; height: 88px; border-radius: 50%; overflow: hidden; margin: 0 auto; background: #dfe6ee; border: 3px solid #fff; box-shadow: 0 4px 14px rgba(30,90,160,.18); }
.me-avatar img { width: 100%; height: 100%; object-fit: cover; }
.me-name { font-size: 18px; font-weight: 600; color: #1c1c1c; margin-top: 13px; }
.me-id { display: inline-block; margin-top: 9px; font-size: 11px; color: #6aa5dd; background: #e3f1fd; border-radius: 11px; padding: 4px 14px; }

.wallet { margin: 8px 12px 0; background: linear-gradient(100deg, #58a8ff 0%, #3f8ef6 55%, #3b83f2 100%); border-radius: 14px; color: #fff; padding: 20px 18px 18px; box-shadow: 0 6px 16px rgba(63,150,245,.32); position: relative; overflow: hidden; }
.wallet::before { content: ''; position: absolute; right: -46px; top: -120px; width: 240px; height: 190px; border-radius: 0 0 50% 50%; background: rgba(255,255,255,.1); transform: rotate(-8deg); }
.wallet::after { content: ''; position: absolute; right: -60px; top: -60px; width: 130px; height: 130px; border-radius: 50%; background: rgba(255,255,255,.09); }
.wallet .w-amount { font-size: 16px; font-weight: 500; position: relative; z-index: 1; }
.wallet .w-amount b { font-size: 28px; font-weight: 700; margin-left: 6px; }
.wallet .w-label { margin-top: 12px; font-size: 13px; opacity: .96; display: flex; align-items: center; gap: 5px; position: relative; z-index: 1; }
.wallet .w-label svg { width: 17px; height: 17px; }
.wallet .w-recharge { position: absolute; right: 14px; bottom: 18px; border: 1px solid rgba(255,255,255,.95); border-radius: 18px; padding: 8px 18px; font-size: 14px; color: #fff; background: rgba(255,255,255,.12); z-index: 1; }

.more-title { padding: 24px 16px 4px; font-size: 16px; font-weight: 700; color: #1c1c1c; }
.more-card { background: #fff; margin: 12px 12px; border-radius: 14px; display: flex; padding: 22px 0 19px; box-shadow: 0 1px 4px rgba(40,80,140,.04); }
.more-card a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 9px; color: #1f1f1f; font-size: 13px; }
.more-card a svg { width: 27px; height: 27px; color: #1a1a1a; }

/* ===== 知识币明细 ===== */
.coin-hero { background: linear-gradient(115deg, #2f9df5, #62b9ff); color: #fff; padding: 24px 22px 30px; }
.coin-hero .cl { font-size: 14px; opacity: .92; }
.coin-hero .cv { font-size: 36px; font-weight: 700; margin-top: 14px; }
.coin-item { background: #fff; border-radius: 12px; margin: 10px 12px; padding: 14px 16px; display: flex; align-items: center; }
.coin-item .ci-l { flex: 1; }
.coin-item .ci-r { text-align: right; }
.coin-item .ci-remark { font-size: 14px; color: #222; }
.coin-item .ci-time { font-size: 12px; color: #9aa4af; margin-top: 6px; }
.coin-item .ci-amt { font-size: 16px; font-weight: 700; }
.coin-item .ci-amt.in { color: #2bb356; }
.coin-item .ci-amt.out { color: #e64c3c; }
.coin-item .ci-bal { font-size: 11px; color: #9aa4af; margin-top: 5px; }

/* ===== 空状态 ===== */
.empty { text-align: center; padding: 70px 0 40px; }
.empty p { color: #a5aeb8; font-size: 14px; margin-top: 6px; letter-spacing: 1px; }

/* ===== 充值页 ===== */
.rg-hero { margin: 12px; background: linear-gradient(115deg, #ffe25e 0%, #ffd21e 100%); border-radius: 14px; padding: 18px 18px 20px; position: relative; overflow: hidden; }
.rg-hero .rl { font-size: 13px; color: #6d6d6d; }
.rg-hero .rv { margin-top: 14px; font-size: 30px; font-weight: 800; color: #333; }
.rg-hero .rv span { font-size: 14px; font-weight: 600; color: #555; margin-left: 6px; }
.rg-coins { position: absolute; right: 12px; top: 12px; width: 92px; height: 66px; }

.rg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 12px; }
.rg-item { background: #fafbfc; border: 1.5px solid #e9ecf0; border-radius: 10px; padding: 12px 14px 12px; position: relative; overflow: hidden; text-align: left; }
.rg-item .rc { font-size: 14px; color: #333; }
.rg-item .rm { margin-top: 6px; font-size: 23px; font-weight: 700; color: #222; }
.rg-item .rm small { font-size: 13px; font-weight: 600; margin-left: 2px; }
.rg-item.sel { border-color: #f2c400; background: #fffbe9; }
.rg-item .check { position: absolute; right: -1px; bottom: -1px; width: 22px; height: 22px; background: #f2c400; color: #fff; font-size: 13px; display: none; align-items: center; justify-content: center; border-radius: 10px 0 8px 0; }
.rg-item.sel .check { display: flex; }
.rg-item.custom .rc { font-size: 15px; font-weight: 700; color: #555; }
.rg-item.custom .rm { font-size: 12px; font-weight: 400; color: #9aa4af; margin-top: 8px; }
.rg-item.custom input { width: 100%; margin-top: 4px; border-bottom: 1px solid #e0e4e9; padding: 4px 2px; font-size: 16px; font-weight: 700; color: #222; }

.rg-tip { margin: 20px 16px 90px; font-size: 13px; color: #98a2ad; line-height: 1.85; }
.rg-tip b { display: block; color: #333; font-size: 14px; margin-bottom: 6px; }
.rg-btn { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); width: calc(100% - 56px); max-width: 424px; background: #2c2c34; color: #fff; border-radius: 26px; padding: 14px 0; text-align: center; font-size: 16px; z-index: 50; }

/* ===== 投诉表单 ===== */
.form-card { background: #fff; border-radius: 12px; margin: 12px; padding: 16px; }
.f-head { display: flex; align-items: center; }
.f-label { font-size: 14px; color: #333; }
.f-label .req { color: #e64c3c; margin-right: 2px; }
.f-count { margin-left: auto; color: #c0c8d0; font-size: 12px; }
.f-sub { color: #b6bec7; font-size: 11px; margin-left: 6px; }
.f-input { width: 100%; margin-top: 12px; background: #f7f8fa; border: 1px solid #eef0f3; border-radius: 8px; padding: 13px 12px; font-size: 14px; color: #333; }
.f-input::placeholder, .f-area::placeholder { color: #c0c8d0; }
.f-area { width: 100%; min-height: 150px; resize: none; line-height: 1.7; }
.f-select { appearance: none; -webkit-appearance: none; position: relative; }
.sel-wrap { position: relative; }
.sel-wrap::after { content: ''; position: absolute; right: 14px; top: 50%; margin-top: -8px; width: 8px; height: 8px; border-right: 1.5px solid #b6bec7; border-bottom: 1.5px solid #b6bec7; transform: rotate(45deg) translateY(-50%); }
.up-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.up-box { width: 74px; height: 74px; border: 1px dashed #d3dae1; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #c2cad3; font-size: 30px; font-weight: 300; }
.up-th { position: relative; width: 74px; height: 74px; border-radius: 8px; overflow: hidden; }
.up-th img { width: 100%; height: 100%; object-fit: cover; }
.up-th .del { position: absolute; right: 0; top: 0; width: 18px; height: 18px; background: rgba(0,0,0,.5); color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; border-radius: 0 0 0 8px; }
.submit-btn { display: block; margin: 22px 12px 50px; background: linear-gradient(90deg, #3fa4ff, #1f7bf6); color: #fff; border-radius: 24px; padding: 13px 0; text-align: center; font-size: 16px; width: calc(100% - 24px); }

/* ===== 订单页 ===== */
.search-bar { display: flex; align-items: center; background: #fff; border-radius: 22px; padding: 5px 5px 5px 14px; margin: 12px; box-shadow: 0 1px 4px rgba(20,60,120,.05); }
.search-bar svg { width: 16px; height: 16px; flex-shrink: 0; margin-right: 8px; }
.search-bar input { flex: 1; font-size: 14px; color: #333; min-width: 0; }
.search-bar input::placeholder { color: #b6bec7; }
.s-btn { background: linear-gradient(90deg, #3fa4ff, #1f7bf6); color: #fff; border-radius: 18px; padding: 8px 20px; font-size: 14px; flex-shrink: 0; }
.o-card { background: #fff; border-radius: 12px; margin: 0 12px 12px; padding: 15px 16px; }
.o-top { display: flex; align-items: flex-start; }
.o-title { flex: 1; font-size: 15px; font-weight: 600; color: #222; line-height: 1.5; }
.o-status { font-size: 12px; color: #2bb356; margin-left: 8px; padding-top: 2px; }
.o-row { display: flex; justify-content: space-between; margin-top: 10px; font-size: 12px; color: #9aa4af; }
.o-row .amt { color: #e64c3c; font-weight: 600; }

/* ===== 文章详情 ===== */
.a-card { background: #fff; border-radius: 12px; margin: 12px; padding: 18px 16px; }
.a-title { font-size: 18px; font-weight: 700; color: #111; line-height: 1.5; }
.a-meta { margin-top: 10px; font-size: 12px; color: #9aa4af; }
.a-badges { display: flex; align-items: center; margin-top: 12px; }
.a-price { margin-left: auto; color: #e64c3c; font-size: 22px; font-weight: 700; }
.a-price small { font-size: 13px; margin-right: 1px; }
.a-div { height: 1px; background: #f0f2f5; margin: 16px 0; }
.a-content { font-size: 15px; line-height: 1.95; color: #333; white-space: pre-wrap; word-break: break-word; }
/* 打赏解锁付费内容大卡（仿参考站：标题条 + 大灰锁居中） */
.unlock-card { margin: 12px 12px 0; background: #fff; border-radius: 12px; overflow: hidden; }
.unlock-card .u-hd { text-align: center; font-size: 15px; font-weight: 700; color: #222; padding: 11px 0; border-bottom: 1px solid #f0f2f5; letter-spacing: 1px; }
.unlock-card .u-bd { padding: 6px 0 10px; display: flex; align-items: center; justify-content: center; color: #c9cdd4; }
.unlock-card .u-bd svg { width: 48px; height: 48px; }
.buy-bar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; background: #fff; padding: 10px 28px calc(12px + env(safe-area-inset-bottom)); box-shadow: 0 -2px 12px rgba(0,0,0,.06); display: flex; align-items: center; gap: 12px; z-index: 50; }
.buy-bar .b-info { font-size: 16px; color: #222; font-weight: 600; line-height: 1.3; }
.buy-bar .b-info b { color: #222; font-size: 16px; }
.buy-bar .b-info .b-coins { display: block; margin-top: 3px; font-size: 11px; color: #e5353b; font-weight: 600; }
.buy-btn { flex-shrink: 0; margin-left: auto; background: linear-gradient(90deg, #3fa4ff, #1f7bf6); color: #fff; border-radius: 22px; padding: 12px 34px; font-size: 15px; }
.buy-btn:disabled { opacity: .5; }

/* ===== 通用 ===== */
.toast { position: fixed; top: 44%; left: 50%; transform: translate(-50%, -50%); background: rgba(20,20,30,.8); color: #fff; padding: 11px 20px; border-radius: 8px; font-size: 14px; z-index: 300; max-width: 78%; text-align: center; line-height: 1.5; }
.center-tip { text-align: center; color: #9aa4af; font-size: 13px; padding: 30px 0 10px; }
.stat-row { display: flex; justify-content: space-between; align-items: center; padding: 2px 16px 12px; font-size: 13px; }
.stat-row .red { color: #e64c3c; }
.stat-row .sort { color: #2e8cf0; }
.page-login-tip { margin: 40px 16px; background: #fff; border-radius: 12px; padding: 30px 20px; text-align: center; }
.page-login-tip .btn { display: inline-block; margin-top: 18px; background: linear-gradient(90deg, #3fa4ff, #1f7bf6); color: #fff; border-radius: 20px; padding: 9px 34px; font-size: 14px; }

/* ===== 支付提示页（联系微信联系人充值） ===== */
.pay-nav { background: linear-gradient(90deg, #3fa4ff, #1f7bf6); display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; color: #fff; position: relative; }
.pay-nav .back { color: #fff; }
.pay-nav .ttl { position: absolute; left: 50%; transform: translateX(-50%); font-size: 16px; font-weight: 600; }
.pay-tip-card { margin: 12px 12px 0; background: #fff; border-radius: 14px; padding: 48px 20px 26px; }
.pay-tip-card .pt-txt { text-align: left; font-size: 30px; font-weight: 800; color: #111; line-height: 1.55; letter-spacing: 1px; }
.pay-tip-card .pt-wx { margin: 10px 0 0 2px; }
.pay-tip-card .pt-wx img { width: 56px; height: 56px; border-radius: 13px; display: block; }
.pay-btn-card { margin: 12px 12px 20px; background: #fff; border-radius: 14px; padding: 34px 26px; }
.pt-btn { display: block; background: linear-gradient(90deg, #2bb24c, #07c160); color: #fff; text-align: center; border-radius: 24px; padding: 13px 0; font-size: 15px; font-weight: 600; text-decoration: none; }

/* ===== 详情页：往期记录 / 免责声明 ===== */
.fr-sec { background: #fff; border-radius: 14px; margin: 12px 12px 0; padding: 14px 14px 6px; }
.fr-hd { display: flex; align-items: center; gap: 7px; font-size: 16px; font-weight: 700; color: #222; margin-bottom: 10px; }
.fr-dot { width: 4px; height: 16px; border-radius: 2px; background: #2f7bff; }
.fr-item { display: flex; align-items: center; gap: 8px; padding: 11px 2px; border-top: 1px solid #f2f4f7; }
.fr-tt { flex: 1; font-size: 13.5px; color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-tag { flex: none; font-size: 11px; color: #e5353b; border: 1px solid #e5353b; border-radius: 4px; padding: 1px 6px; }
.fr-empty { font-size: 13px; color: #9aa4af; padding: 6px 0 10px; }
.fr-txt { font-size: 12.5px; line-height: 1.8; color: #8a939c; padding-bottom: 10px; }

/* ===== 详情页：免费声明 / 付费内容条 / 往期记录 ===== */
.a-freenote { font-size: 13px; line-height: 1.75; color: #222; margin-top: 10px; }
.a-freenote b { color: #e5353b; }
.sec-hd { margin: 14px 12px 0; background: #fff; border-bottom: 1px solid #f0f2f5; border-radius: 12px 12px 0 0; text-align: center; font-size: 15px; font-weight: 700; color: #222; padding: 12px 0; letter-spacing: 1px; }
.sec-body { margin: 0 12px; background: #fff; border-radius: 0 0 12px 12px; padding: 18px 14px; font-size: 15px; line-height: 1.9; color: #222; word-break: break-all; }
.rec-item { display: block; padding: 14px; border-bottom: 1px solid #f0f2f5; }
.rec-item:last-child { border-bottom: none; }
.rec-hd { display: flex; align-items: center; gap: 10px; }
.rec-red { flex: none; width: 36px; height: 22px; border-radius: 11px; background: #e5353b; color: #fff; font-size: 12px; font-style: normal; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.rec-red.rec-black { background: #3a3a3a; }
.rec-tt { font-size: 16px; font-weight: 800; color: #111; }
.rec-body { margin-top: 10px; color: #d0342c; font-size: 15px; font-weight: 700; line-height: 1.8; }
.fab-round { position: fixed; right: 12px; top: 62%; z-index: 50; width: 52px; height: 52px; border-radius: 50%; background: #3b82f6; color: #fff; font-size: 14px; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(59,130,246,.4); }
