/* 学员端样式（浅色主题，适配 PC + 手机） */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; background: #f5f6f8; color: #2b2f36; font-size: 15px; }
.hidden { display: none !important; }
.btn { padding: 9px 18px; border: 1px solid #d5d9e0; background: #fff; border-radius: 9px; cursor: pointer; font-size: 14px; }
.btn.primary { background: #2563eb; border-color: #2563eb; color: #fff; width: 100%; }
.btn.small { padding: 5px 12px; font-size: 13px; width: auto; }

/* 登录 */
.login-wrap { display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 20px; }
.login-card { background: #fff; padding: 36px; border-radius: 14px; box-shadow: 0 4px 24px rgba(0,0,0,.08); width: 380px; max-width: 100%; }
.login-card h2 { margin-bottom: 20px; text-align: center; }
.login-card input { width: 100%; padding: 11px 13px; margin-bottom: 13px; border: 1px solid #d5d9e0; border-radius: 9px; font-size: 14px; }
.tabs { display: flex; gap: 6px; margin-bottom: 18px; }
.tab { flex: 1; padding: 9px; border: none; background: #eef0f3; border-radius: 9px; cursor: pointer; font-size: 14px; }
.tab.active { background: #2563eb; color: #fff; }
.msg { color: #d64545; margin-top: 10px; min-height: 18px; font-size: 13px; }

/* 顶部栏 */
.topbar { display: flex; align-items: center; gap: 14px; padding: 12px 22px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.06); position: sticky; top: 0; z-index: 10; }
.brand { font-weight: bold; font-size: 16px; }

main { max-width: 860px; margin: 0 auto; padding: 22px 16px 60px; }

/* 训练营卡片 */
.camp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.camp-card { background: #fff; border-radius: 12px; padding: 20px; cursor: pointer; box-shadow: 0 1px 5px rgba(0,0,0,.06); transition: box-shadow .15s; }
.camp-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.camp-card h3 { margin-bottom: 8px; }
.desc { color: #7a8190; font-size: 13px; margin-bottom: 10px; }
.meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.progress-row { display: flex; align-items: center; gap: 8px; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 12px; }
.tag.green { background: #dcfce7; color: #15803d; }
.tag.gray { background: #e5e7eb; color: #555; }
.tag.blue { background: #dbeafe; color: #1d4ed8; }
.tag.orange { background: #ffedd5; color: #c2410c; }
.tag.red { background: #fee2e2; color: #b91c1c; }
.progress-bar { height: 7px; background: #e5e7eb; border-radius: 4px; overflow: hidden; flex: 1; }
.progress-bar i { display: block; height: 100%; background: #2563eb; }

/* 目录：训练营总览头 */
.camp-hero { background: #fff; border-radius: 14px; padding: 22px 24px; margin-bottom: 18px; box-shadow: 0 1px 6px rgba(0,0,0,.06); display: flex; gap: 16px; align-items: flex-start; }
.camp-hero .btn { flex-shrink: 0; margin-top: 4px; }
.hero-body { flex: 1; min-width: 0; }
.hero-body h1 { font-size: 20px; margin-bottom: 6px; }
.hero-stats { margin-top: 14px; }
.hero-progress { display: flex; align-items: center; gap: 12px; }
.hero-progress .progress-bar { height: 9px; }
.hero-num { font-size: 15px; font-weight: bold; color: #2563eb; min-width: 42px; }
.hero-meta { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* 目录：章节卡片 */
.card { background: #fff; border-radius: 12px; padding: 0; margin-bottom: 16px; box-shadow: 0 1px 5px rgba(0,0,0,.06); overflow: hidden; }
.chapter-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: #f8f9fb; border-bottom: 1px solid #eef0f3; }
.ch-index { width: 34px; height: 34px; border-radius: 9px; background: #2563eb; color: #fff; font-weight: bold; font-size: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ch-info { flex: 1; min-width: 0; }
.ch-info h3 { font-size: 15px; }
.ch-sub { font-size: 12px; color: #7a8190; }
.ch-bar { width: 90px; height: 6px; background: #e5e7eb; border-radius: 3px; overflow: hidden; flex-shrink: 0; }
.ch-bar i { display: block; height: 100%; background: #22c55e; border-radius: 3px; }

/* 目录：课时行 */
.lesson-list { padding: 6px 10px 10px; }
.lesson-row { display: flex; align-items: center; gap: 12px; padding: 11px 10px; border-radius: 10px; cursor: pointer; transition: background .12s; }
.lesson-row:hover { background: #f0f4ff; }
.lesson-row.st-locked { cursor: not-allowed; }
.lesson-row.st-locked:hover { background: transparent; }
.lesson-row.st-wait { cursor: not-allowed; opacity: .68; }
.lesson-row.st-wait:hover { background: transparent; }

/* 序号/状态徽标（纯 CSS，不再用 emoji） */
.l-badge { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: bold; }
.l-badge.num { background: #eef1f5; color: #5b6472; border: 1px solid #dfe3ea; }
.lesson-row.st-doing .l-badge.num { background: #dbeafe; color: #1d4ed8; border-color: #bfdbfe; }
.l-badge.ok { background: #dcfce7; color: #15803d; font-size: 15px; }
.l-badge.lock { background: #fff4e5; position: relative; }
.l-badge.lock::after { content: ""; width: 10px; height: 8px; border: 1.6px solid #c2410c; border-bottom: none; border-radius: 4px 4px 0 0; display: block; margin-top: -6px; }
.l-badge.lock::before { content: ""; position: absolute; width: 12px; height: 9px; background: #c2410c; border-radius: 2px; bottom: 7px; }

.l-main { flex: 1; min-width: 0; }
.l-title { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.l-meta { font-size: 12px; color: #7a8190; margin-top: 4px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.l-strong { color: #c2410c; font-weight: 500; }
.lesson-row.st-doing .l-strong { color: #1d4ed8; }
.l-progress { height: 4px; background: #e5e7eb; border-radius: 2px; margin-top: 6px; max-width: 240px; overflow: hidden; }
.l-progress i { display: block; height: 100%; background: #2563eb; border-radius: 2px; }

/* 右侧操作区 */
.l-side { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.detail-link { border: none; background: none; color: #2563eb; font-size: 12px; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.detail-link:hover { background: #eef2ff; }
.pill { padding: 5px 14px; border-radius: 16px; font-size: 12px; white-space: nowrap; }
.pill-green { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.pill-blue { background: #fff; color: #1d4ed8; border: 1px solid #93c5fd; }
.pill-blue-solid { background: #2563eb; color: #fff; border: 1px solid #2563eb; }
.pill-orange { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.pill-gray { background: #f3f4f6; color: #6b7280; border: 1px solid #e5e7eb; }
.pill-red { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* 学习页：上半视频 + 下方图文详情（整页滚动） */
.player-layer { position: fixed; inset: 0; background: #f5f6f8; z-index: 50; display: flex; flex-direction: column; }
.player-head { display: flex; align-items: center; gap: 14px; padding: 10px 18px; background: #fff; color: #2b2f36; box-shadow: 0 1px 4px rgba(0,0,0,.08); z-index: 2; }
#pl-title { font-weight: bold; font-size: 15px; }
.player-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.player-body { position: relative; background: #000; width: min(1100px, 100%); margin: 0 auto; aspect-ratio: 16 / 9; max-height: 62vh; }
.player-body video { width: 100%; height: 100%; object-fit: contain; }
.lesson-detail { width: min(1100px, 100%); margin: 0 auto; background: #fff; min-height: 200px; padding: 18px 24px 40px; }
.lesson-detail h3 { font-size: 16px; margin-bottom: 6px; }
#watermark-layer { position: absolute; left: 12%; top: 20%; color: rgba(255,255,255,.38); font-size: 15px; pointer-events: none; white-space: nowrap; text-shadow: 0 0 3px rgba(0,0,0,.4); z-index: 5; transition: left 1s, top 1s; }
#preview-mask { position: absolute; inset: 0; background: rgba(0,0,0,.85); color: #fff; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 20px; line-height: 2; z-index: 6; }
#big-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 7; background: rgba(37,99,235,.92); color: #fff; font-size: 18px; padding: 14px 30px; border-radius: 40px; cursor: pointer; user-select: none; box-shadow: 0 4px 20px rgba(0,0,0,.5); }
#big-play:hover { background: rgba(37,99,235,1); }
video::-internal-media-controls-download-button { display: none; }
video::-webkit-media-controls-enclosure { overflow: hidden; }

/* 图文详情弹层 */
.detail-layer { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 80; display: flex; align-items: center; justify-content: center; padding: 20px; }
.detail-box { background: #fff; border-radius: 14px; width: 720px; max-width: 100%; max-height: 85vh; display: flex; flex-direction: column; overflow: hidden; }
.detail-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid #eef0f3; }
.rich-content { padding: 18px 22px 26px; overflow: auto; font-size: 15px; line-height: 1.8; word-break: break-word; }
.rich-content h1, .rich-content h2 { font-size: 19px; margin: 14px 0 8px; }
.rich-content h3, .rich-content h4 { font-size: 16px; margin: 12px 0 6px; }
.rich-content p { margin: 8px 0; }
.rich-content img { max-width: 100%; border-radius: 8px; }
.rich-content ul, .rich-content ol { padding-left: 24px; margin: 8px 0; }
.rich-content blockquote { border-left: 3px solid #93b4f8; margin: 10px 0; padding: 6px 14px; color: #555; background: #f6f8fc; border-radius: 0 8px 8px 0; }
.rich-content a { color: #2563eb; }
.rich-content table { border-collapse: collapse; margin: 10px 0; }
.rich-content td, .rich-content th { border: 1px solid #d5d9e0; padding: 6px 10px; }

/* 目录里的详情按钮（新版为文字链接） */
.lesson-row .detail-link { flex-shrink: 0; }

/* 复制限制轻提示 */
#copy-toast { position: fixed; left: 50%; bottom: 48px; transform: translateX(-50%) translateY(16px); background: rgba(30,34,42,.92); color: #fff; font-size: 13px; padding: 10px 20px; border-radius: 10px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 200; box-shadow: 0 6px 20px rgba(0,0,0,.25); max-width: 80vw; }
#copy-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 微信扫码登录 / 绑定微信 */
.wx-qr-box { width: 200px; height: 200px; margin: 12px auto; border: 1px solid #eef0f3; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #f8fafc; overflow: hidden; }
.wx-qr-box img { width: 190px; height: 190px; object-fit: cover; }
.wx-qr-box #wx-qr-tip, .wx-qr-box #bind-qr-tip { font-size: 13px; color: #7a8190; padding: 8px; text-align: center; line-height: 1.7; }
#wx-status, #bind-status { min-height: 18px; }
.wx-hint { font-size: 12px; color: #98a0ad; line-height: 1.7; margin: 10px 0 0; text-align: center; }
button:disabled { opacity: .5; cursor: not-allowed; }
