* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f5f6f8; color: #222; font-size: 15px; }
.container { max-width: 480px; margin: 0 auto; padding: 12px; }
a { color: inherit; }
.topbar { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; gap: 6px; }
.brand { font-weight: 700; color: #e04e2e; text-decoration: none; font-size: 15px; flex-shrink: 0; }
.topbar nav { white-space: nowrap; }
.topbar nav a { color: #555; text-decoration: none; margin-left: 9px; font-size: 13px; }
.topbar nav a.on { color: #e04e2e; font-weight: 600; }
.topbar .user { color: #888; font-size: 12px; margin-left: 8px; max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.card { background: #fff; border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.section-title { font-size: 16px; font-weight: 700; margin: 16px 0 10px; }
.notice { background: #fffbe6; border: 1px solid #ffe58f; border-radius: 8px; padding: 8px 10px; font-size: 13px; color: #8a6d00; margin-bottom: 12px; }
.notice-roll { position: relative; padding: 8px 34px 8px 10px; cursor: pointer; }
.notice-roll .notice-item { display: none; align-items: center; gap: 6px; }
.notice-roll .notice-item.on { display: flex; }
.notice-roll .notice-tag { flex: none; background: #e04e2e; color: #fff; font-size: 11px; line-height: 1; padding: 3px 6px; border-radius: 3px; }
.notice-roll .notice-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-dots { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); display: flex; gap: 4px; }
.notice-dots .dot { width: 5px; height: 5px; border-radius: 50%; background: #d9b25c; cursor: pointer; }
.notice-dots .dot.on { background: #e04e2e; }
.banner-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; padding-bottom: 4px; }
.banner-track img { width: 100%; max-width: 456px; border-radius: 10px; scroll-snap-align: center; display: block; }
.cat-row { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chip { background: #fff; border: 1px solid #eee; border-radius: 16px; padding: 5px 12px; font-size: 13px; color: #555; text-decoration: none; }
.cat-chip.on { background: #e04e2e; border-color: #e04e2e; color: #fff; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.v-card { padding: 0; overflow: hidden; }
.v-card .cover { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; background: #eee; }
.v-card .v-info { padding: 8px 10px; }
.v-card .v-title { display: block; font-size: 14px; font-weight: 600; color: #222; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v-meta { color: #999; font-size: 12px; margin-top: 4px; }
.v-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.price { color: #e04e2e; font-weight: 700; }
.sales { color: #999; font-size: 12px; }
.list-v { display: flex; gap: 10px; }
.list-v img { width: 120px; height: 68px; border-radius: 8px; object-fit: cover; background: #eee; }
.list-v .v-title { font-size: 15px; }
.pager { display: flex; justify-content: space-between; align-items: center; margin: 12px 0; }
.pager a { background: #fff; border: 1px solid #eee; border-radius: 8px; padding: 6px 14px; text-decoration: none; color: #555; }
.pager a.disabled { opacity: 0.4; pointer-events: none; }
.pager .page-info { color: #888; font-size: 13px; }
/* 充值页（.balance-box/.balance-num/.notice 上面已有定义，不重复） */
.rc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rc-opt { border: 1px solid #eee; border-radius: 10px; padding: 12px; text-align: center; cursor: pointer; }
.rc-opt.on { border-color: #e04e2e; background: #fff5f2; }
.rc-amt { font-size: 18px; font-weight: 700; color: #222; }
.rc-opt.on .rc-amt { color: #e04e2e; }
.rc-bonus { font-size: 11px; color: #e04e2e; margin-top: 2px; }
.rc-custom { display: flex; align-items: center; gap: 6px; border: 1px solid #ddd; border-radius: 10px; padding: 10px 12px; margin-top: 10px; }
.rc-custom span { color: #999; }
.rc-custom input { flex: 1; border: none; outline: none; font-size: 15px; background: transparent; }
.rc-pay { display: flex; gap: 10px; }
.rc-pay-opt { flex: 1; border: 1px solid #eee; border-radius: 10px; padding: 12px; text-align: center; cursor: pointer; font-size: 14px; }
.rc-pay-opt.on { border-color: #e04e2e; background: #fff5f2; color: #e04e2e; }
.rc-pay-opt input { display: none; }
/* 不可选的支付方式：微信内支付宝走不通，灰掉而不是让用户点进去撞墙 */
.rc-pay-opt.off { opacity: .45; cursor: not-allowed; background: #fafafa; }
.rc-pay-opt.off.on { border-color: #eee; background: #fafafa; color: #999; }
.rc-pay-note { color: #999; font-size: 12px; margin-top: 8px; }
.rc-result-icon { font-size: 40px; margin-bottom: 8px; }
/* 成功后有两个按钮（返回课程 / 返回我的），排一行；只有一个时自动居中 */
#rcActions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.search-bar { display: flex; gap: 8px; margin-bottom: 12px; }
.search-bar input, .form input, .form select { flex: 1; border: 1px solid #ddd; border-radius: 8px; padding: 8px 10px; font-size: 14px; background: #fff; }
.search-bar button, .btn { background: #e04e2e; color: #fff; border: none; border-radius: 8px; padding: 8px 16px; font-size: 14px; }
.btn.block { display: block; width: 100%; text-align: center; }
.btn.gray { background: #999; }
.btn-outline { background: #fff; color: #e04e2e; border: 1px solid #e04e2e; }
.form { display: flex; flex-direction: column; gap: 12px; }
.form label { font-size: 13px; color: #666; }
.form .err { color: #e04e2e; font-size: 13px; display: none; }
.detail-cover { width: 100%; border-radius: 10px; }
.detail-title { font-size: 18px; font-weight: 700; margin: 12px 0 6px; }
.detail-meta { color: #999; font-size: 13px; }
.chapter-list { list-style: none; }
.chapter-list li { display: flex; justify-content: space-between; align-items: center; padding: 10px 4px; border-bottom: 1px solid #f0f0f0; font-size: 14px; cursor: pointer; }
.chapter-list li:hover span:first-child { color: #e04e2e; }
.chapter-list li .free-tag { background: #e6f7e6; color: #389e0d; font-size: 11px; border-radius: 4px; padding: 1px 5px; margin-left: 6px; }
.chapter-list li .ch-dur { color: #999; font-size: 12px; }
.step-item { display: flex; gap: 10px; margin-bottom: 12px; }
.step-item img { width: 90px; height: 60px; border-radius: 8px; object-fit: cover; background: #eee; }
.step-item .step-t { font-size: 14px; font-weight: 600; }
.step-item .step-d { font-size: 13px; color: #666; margin-top: 4px; }
.player-wrap { position: relative; background: #000; border-radius: 10px; overflow: hidden; }
.player-wrap video { width: 100%; display: block; }
.try-mask { position: absolute; inset: 0; background: rgba(0,0,0,0.75); color: #fff; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; }
.try-mask .hint { font-size: 14px; }
.article-body { line-height: 1.8; font-size: 15px; word-break: break-word; }
.article-body img { max-width: 100%; border-radius: 8px; }
.article-body table { border-collapse: collapse; width: 100%; }
.article-body td, .article-body th { border: 1px solid #ddd; padding: 6px; }
.balance-box { display: flex; justify-content: space-between; align-items: center; }
.balance-num { font-size: 22px; font-weight: 700; color: #e04e2e; }
.tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.tabs .tab { flex: 1; text-align: center; background: #fff; border: 1px solid #eee; border-radius: 8px; padding: 8px 0; font-size: 14px; color: #555; text-decoration: none; }
.tabs .tab.on { background: #e04e2e; color: #fff; border-color: #e04e2e; }
.log-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f0f0f0; font-size: 13px; }
.log-row .in { color: #389e0d; }
.log-row .out { color: #e04e2e; }
/* 订单列表：状态徽章 + 末行去掉分隔线（最后一行下面是按钮或卡片边缘） */
.order-item .order-state { color: #888; font-size: 12px; white-space: nowrap; }
.order-item .log-row:last-of-type { border-bottom: none; }
.buy-bar { position: sticky; bottom: 0; background: #fff; border-top: 1px solid #eee; padding: 10px 12px; display: flex; align-items: center; gap: 10px; }
.footer { text-align: center; color: #bbb; font-size: 12px; padding: 20px 0 30px; }

/* 步骤图片放大遮罩 */
.lightbox-mask { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 9999; cursor: zoom-out; }
.lightbox-big { width: 96vw; height: 96vh; background-size: contain; background-repeat: no-repeat; background-position: center; border-radius: 4px; }

/* 步骤图片防下载：透明防护层阻断右键另存/拖拽/长按保存 */
.step-img-wrap { position: relative; display: inline-block; line-height: 0; font-size: 0; flex: 0 0 auto; }
.step-shield { position: absolute; inset: 0; cursor: zoom-in; }
.step-img { -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }
