/* =====================================================================
 * 知行学堂 · 样式系统
 * 浅色专业风：蓝紫渐变主色 + 柔和阴影 + 大圆角卡片
 * ===================================================================*/
:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --ink: #0f172a;
  --ink2: #475569;
  --dim: #94a3b8;
  --line: #e6eaf2;
  --line2: #f0f3f9;
  --p1: #2563eb;
  --p2: #7c3aed;
  --c1: #06b6d4;
  --ok: #10b981;
  --warn: #f59e0b;
  --err: #ef4444;
  --grad: linear-gradient(135deg, #2563eb, #7c3aed);
  --grad-soft: linear-gradient(135deg, #eef3ff, #f4eeff);
  --r: 14px;
  --r2: 20px;
  --sh: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 28px -14px rgba(16, 24, 40, .16);
  --sh-lg: 0 24px 52px -22px rgba(37, 99, 235, .34);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 15px; line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding-left: 20px; }
input, select, textarea { font-family: inherit; font-size: 14.5px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 22px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--ink2); }
.dim { color: var(--dim); }
.hide { display: none !important; }

/* ---------------- 顶部导航 ---------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-in { display: flex; align-items: center; gap: 26px; height: 66px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17.5px; letter-spacing: .01em; flex: none; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--grad);
  display: grid; place-items: center; color: #fff; font-size: 17px; font-weight: 800;
  box-shadow: 0 6px 16px -6px rgba(37, 99, 235, .7);
}
.nav-links { display: flex; align-items: center; gap: 22px; margin-left: 6px; }
.nav-links a { font-size: 14.5px; color: var(--ink2); font-weight: 500; }
.nav-links a:hover { color: var(--p1); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 18px; border-radius: 11px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font-size: 14.5px; font-weight: 600;
  transition: .18s ease; white-space: nowrap;
}
.btn:hover { border-color: #cfd8e8; transform: translateY(-1px); }
.btn-primary { background: var(--grad); border: none; color: #fff; box-shadow: 0 10px 22px -12px rgba(37, 99, 235, .85); }
.btn-primary:hover { box-shadow: 0 14px 28px -12px rgba(37, 99, 235, .9); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink2); }
.btn-ghost:hover { background: #eef2f9; }
.btn-sm { height: 34px; padding: 0 13px; font-size: 13.5px; border-radius: 9px; }
.btn-lg { height: 48px; padding: 0 26px; font-size: 16px; border-radius: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-danger { color: var(--err); border-color: #fed7d7; }
.btn-danger:hover { background: #fff5f5; }
.nav-burger { display: none; }

/* ---------------- Hero ---------------- */
.hero { position: relative; overflow: hidden; padding: 62px 0 54px; background: linear-gradient(180deg, #eef3ff 0%, #f7f5ff 55%, var(--bg) 100%); }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; filter: blur(70px); pointer-events: none; }
.hero::before { width: 420px; height: 420px; background: rgba(124, 58, 237, .17); top: -160px; right: -80px; }
.hero::after { width: 380px; height: 380px; background: rgba(6, 182, 212, .16); bottom: -220px; left: -100px; }
.hero-in { position: relative; z-index: 2; text-align: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: #fff; border: 1px solid #dbe4f5; font-size: 13px; color: var(--p1); font-weight: 600;
  box-shadow: 0 6px 18px -12px rgba(37, 99, 235, .6);
}
.hero h1 { font-size: 44px; margin: 20px 0 14px; letter-spacing: -.01em; }
.hero-sub { font-size: 16.5px; color: var(--ink2); max-width: 640px; margin: 0 auto; }
.search-bar {
  display: flex; align-items: center; gap: 10px; max-width: 620px; margin: 28px auto 0;
  background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 8px 8px 8px 16px;
  box-shadow: var(--sh);
}
.search-bar svg { flex: none; color: var(--dim); }
.search-bar input { flex: 1; border: none; outline: none; height: 40px; background: transparent; color: var(--ink); min-width: 0; }
.hot-words { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; font-size: 13px; color: var(--dim); }
.hot-words button { border: none; background: #fff; border: 1px solid var(--line); color: var(--ink2); border-radius: 999px; padding: 4px 12px; font-size: 12.5px; }
.hot-words button:hover { color: var(--p1); border-color: #c7d7f8; }
.hero-stats { display: flex; justify-content: center; gap: 46px; margin-top: 38px; flex-wrap: wrap; }
.hero-stats b { display: block; font-size: 27px; font-weight: 800; letter-spacing: -.01em; }
.hero-stats span { font-size: 13px; color: var(--ink2); }

/* ---------------- 区块 ---------------- */
.sec { padding: 64px 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 26px; flex-wrap: wrap; }
.sec-head h2 { font-size: 27px; letter-spacing: -.01em; }
.sec-head p { color: var(--ink2); font-size: 14.5px; margin-top: 7px; }
.sec-more { font-size: 14.5px; color: var(--p1); font-weight: 600; }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.tabs button {
  height: 38px; padding: 0 17px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--ink2); font-size: 14px; font-weight: 600; transition: .16s;
}
.tabs button:hover { border-color: #cfd8e8; color: var(--p1); }
.tabs button.on { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 8px 20px -10px rgba(37, 99, 235, .8); }

/* ---------------- 课程卡片 ---------------- */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(292px, 1fr)); gap: 22px; }
.cc {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r2);
  overflow: hidden; display: flex; flex-direction: column;
  transition: .22s cubic-bezier(.2, .7, .3, 1); cursor: pointer;
}
.cc:hover { transform: translateY(-5px); box-shadow: var(--sh-lg); border-color: #d8e2f8; }
.cc-cover { position: relative; height: 152px; display: grid; place-items: center; overflow: hidden; }
.cc-cover .glyph { font-size: 40px; font-weight: 800; color: rgba(255, 255, 255, .96); letter-spacing: -.02em; text-shadow: 0 4px 16px rgba(0, 0, 0, .18); }
.cc-cover .deco { position: absolute; inset: 0; opacity: .3; background-image: radial-gradient(circle at 22% 28%, #fff 1.5px, transparent 1.6px), radial-gradient(circle at 76% 62%, #fff 1.5px, transparent 1.6px); background-size: 42px 42px, 58px 58px; }
.cc-tag { position: absolute; left: 12px; top: 12px; background: rgba(255, 255, 255, .92); color: #1e293b; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.cc-lv { position: absolute; right: 12px; top: 12px; background: rgba(15, 23, 42, .4); color: #fff; font-size: 11.5px; padding: 4px 9px; border-radius: 999px; backdrop-filter: blur(4px); }
.cc-body { padding: 16px 17px 17px; display: flex; flex-direction: column; flex: 1; }
.cc-title { font-size: 16.5px; font-weight: 700; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 49px; }
.cc-sub { font-size: 13px; color: var(--dim); margin-top: 5px; }
.cc-meta { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; font-size: 12.5px; color: var(--ink2); flex-wrap: wrap; }
.cc-meta .stars { color: #f59e0b; font-weight: 700; }
.cc-teacher { display: flex; align-items: center; gap: 7px; margin-top: 11px; padding-top: 11px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--ink2); }
.cc-price { display: flex; align-items: baseline; gap: 8px; margin-top: 12px; }
.cc-price b { font-size: 21px; font-weight: 800; color: var(--err); letter-spacing: -.01em; }
.cc-price s { font-size: 13px; color: var(--dim); }
.cc-price .free { font-size: 18px; color: var(--ok); font-weight: 800; }
.avatar-sm { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 700; flex: none; }
.loading-box { grid-column: 1 / -1; padding: 60px 0; text-align: center; color: var(--dim); font-size: 14px; }
.empty-box { grid-column: 1 / -1; padding: 56px 20px; text-align: center; color: var(--dim); }
.empty-box b { display: block; font-size: 16px; color: var(--ink2); margin-bottom: 6px; }

/* ---------------- 讲师 ---------------- */
.teacher-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 20px; }
.tc { background: var(--card); border: 1px solid var(--line); border-radius: var(--r2); padding: 22px 20px; transition: .2s; }
.tc:hover { transform: translateY(-4px); box-shadow: var(--sh); }
.avatar { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; color: #fff; font-size: 22px; font-weight: 800; }
.tc-name { font-size: 16.5px; font-weight: 700; margin-top: 14px; }
.tc-title { font-size: 12.5px; color: var(--p1); margin-top: 3px; font-weight: 600; }
.tc-bio { font-size: 13.5px; color: var(--ink2); margin-top: 10px; line-height: 1.85; }
.tc-foot { display: flex; gap: 18px; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line2); font-size: 12.5px; color: var(--dim); }
.tc-foot b { color: var(--ink); font-size: 14px; }

/* ---------------- 学习路径 ---------------- */
.path-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 20px; }
.pc { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r2); padding: 22px; overflow: hidden; }
.pc::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: var(--grad-soft); opacity: .8; }
.pc-top { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pc h3 { font-size: 17px; }
.pc-weeks { font-size: 12px; color: var(--p1); background: #eef3ff; border-radius: 999px; padding: 3px 10px; font-weight: 700; flex: none; }
.pc-desc { font-size: 13.5px; color: var(--ink2); margin-top: 9px; position: relative; }
.pc-steps { margin: 15px 0 0; padding: 0; list-style: none; position: relative; }
.pc-steps li { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; color: var(--ink2); padding: 6px 0; }
.pc-steps i { width: 20px; height: 20px; border-radius: 50%; background: #eef3ff; color: var(--p1); font-size: 11px; font-weight: 800; display: grid; place-items: center; flex: none; font-style: normal; margin-top: 2px; }

/* ---------------- 评价 ---------------- */
.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.rc { background: var(--card); border: 1px solid var(--line); border-radius: var(--r2); padding: 20px; }
.rc-top { display: flex; align-items: center; gap: 11px; }
.rc-name { font-weight: 700; font-size: 14.5px; }
.rc-city { font-size: 12px; color: var(--dim); }
.rc-stars { margin-left: auto; color: #f59e0b; font-size: 13px; letter-spacing: 1px; }
.rc-text { font-size: 14px; color: var(--ink2); line-height: 1.9; margin-top: 13px; }
.rc-course { display: inline-block; margin-top: 13px; font-size: 12px; color: var(--p1); background: #eef3ff; padding: 3px 10px; border-radius: 999px; font-weight: 600; }

/* ---------------- FAQ ---------------- */
.faq-wrap { max-width: 860px; margin: 0 auto; }
.faq { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 12px; overflow: hidden; }
.faq summary { list-style: none; cursor: pointer; padding: 17px 20px; font-size: 15.5px; font-weight: 600; display: flex; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; margin-left: auto; color: var(--dim); font-size: 20px; font-weight: 400; transition: .2s; }
.faq[open] summary::after { transform: rotate(45deg); color: var(--p1); }
.faq p { padding: 0 20px 18px; color: var(--ink2); font-size: 14px; line-height: 1.95; }

/* ---------------- CTA ---------------- */
.cta { background: var(--grad); border-radius: 26px; padding: 44px 40px; color: #fff; position: relative; overflow: hidden; }
.cta::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.cta h2 { font-size: 27px; }
.cta p { margin-top: 10px; opacity: .92; font-size: 15px; max-width: 520px; }
.cta .btn { background: #fff; color: var(--p1); border: none; margin-top: 22px; font-weight: 700; }

/* ---------------- 页脚 ---------------- */
.foot { background: #0f1729; color: #94a3b8; padding: 52px 0 0; margin-top: 20px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }
.foot-brand { font-size: 17px; font-weight: 800; color: #fff; display: flex; align-items: center; gap: 10px; }
.foot-brand .logo-mark { box-shadow: none; }
.foot-desc { font-size: 13.5px; line-height: 1.95; margin-top: 14px; max-width: 320px; }
.foot-col b { display: block; color: #fff; font-size: 14px; margin-bottom: 13px; font-weight: 700; }
.foot-col a, .foot-col span { display: block; font-size: 13.5px; line-height: 2.15; color: #93a0b8; }
.foot-col a:hover { color: #fff; }
.foot-bar { border-top: 1px solid rgba(255, 255, 255, .09); margin-top: 40px; padding: 20px 0 26px; font-size: 12.5px; color: #6b7a94; }
.foot-lic { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.foot-bar .row { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; justify-content: space-between; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }

/* ---------------- 弹窗 ---------------- */
.mask {
  position: fixed; inset: 0; z-index: 90; background: rgba(15, 23, 42, .5);
  backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; pointer-events: none; transition: .2s;
}
.mask.on { opacity: 1; pointer-events: auto; }
.modal {
  background: #fff; border-radius: 22px; width: 100%; max-width: 430px;
  padding: 30px 28px; box-shadow: 0 30px 70px -20px rgba(15, 23, 42, .4);
  transform: translateY(14px) scale(.98); transition: .24s cubic-bezier(.2, .8, .3, 1);
  max-height: 92vh; overflow: auto;
}
.mask.on .modal { transform: none; }
.modal.wide { max-width: 520px; }
.m-title { font-size: 21px; font-weight: 800; }
.m-sub { font-size: 13.5px; color: var(--ink2); margin-top: 7px; }
.m-close { position: absolute; right: 18px; top: 16px; width: 32px; height: 32px; border-radius: 9px; border: none; background: #f2f5fa; color: var(--ink2); font-size: 17px; line-height: 1; }
.m-close:hover { background: #e8edf7; }
.modal-head { position: relative; }
.field { margin-top: 15px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; height: 44px; padding: 0 13px; border: 1px solid var(--line);
  border-radius: 11px; outline: none; background: #fbfcfe; color: var(--ink); transition: .16s;
}
.field textarea { height: auto; padding: 11px 13px; line-height: 1.7; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--p1); background: #fff; box-shadow: 0 0 0 3px rgba(37, 99, 235, .1); }
.m-foot { margin-top: 22px; }
.m-switch { text-align: center; font-size: 13.5px; color: var(--ink2); margin-top: 16px; }
.m-switch button { border: none; background: none; color: var(--p1); font-weight: 700; font-size: 13.5px; padding: 0 2px; }
.m-err { display: none; margin-top: 14px; font-size: 13px; color: var(--err); background: #fff5f5; border: 1px solid #ffe0e0; border-radius: 10px; padding: 10px 12px; line-height: 1.7; }
.m-err.on { display: block; }
.m-tip { font-size: 12.5px; color: var(--dim); margin-top: 12px; line-height: 1.8; }

/* 支付弹窗 */
.pay-box { text-align: center; }
.pay-qr { width: 216px; height: 216px; margin: 18px auto 0; border: 1px solid var(--line); border-radius: 16px; display: grid; place-items: center; background: #fbfcfe; overflow: hidden; }
.pay-qr img { width: 100%; height: 100%; object-fit: contain; }
.pay-amount { font-size: 30px; font-weight: 800; color: var(--err); margin-top: 14px; letter-spacing: -.02em; }
.pay-items { margin-top: 14px; text-align: left; border-top: 1px dashed var(--line); padding-top: 12px; }
.pay-items div { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--ink2); padding: 5px 0; }
.pay-state { margin-top: 16px; font-size: 13.5px; color: var(--ink2); }
.pay-state .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); margin-right: 7px; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.pay-ok { color: var(--ok); font-weight: 700; font-size: 15px; margin-top: 14px; }
.pay-steps { text-align: left; font-size: 13px; color: var(--ink2); line-height: 1.9; background: #f7f9fd; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-top: 14px; }
.pay-steps b { color: var(--err); }
.pay-act { margin-top: 12px; }
.pay-redeem { margin-top: 10px; display: flex; gap: 8px; }
.pay-redeem input { flex: 1; min-width: 0; height: 38px; border: 1px solid var(--line); border-radius: 9px; padding: 0 12px; font-size: 13.5px; outline: none; background: #fff; color: var(--ink); }
.pay-redeem input:focus { border-color: var(--brand, #2563eb); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }

/* ---------------- Toast ---------------- */
#toastBox { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast { background: rgba(15, 23, 42, .93); color: #fff; padding: 11px 20px; border-radius: 12px; font-size: 14px; box-shadow: 0 16px 36px -14px rgba(0, 0, 0, .6); animation: tin .25s; max-width: 82vw; }
.toast.ok { background: #0f9d6b; }
.toast.err { background: #dc2626; }
@keyframes tin { from { opacity: 0; transform: translateY(12px); } }

/* ---------------- 课程详情页 ---------------- */
.cd { padding: 30px 0 64px; }
.crumb { font-size: 13.5px; color: var(--dim); margin-bottom: 20px; }
.crumb a:hover { color: var(--p1); }
.cd-grid { display: grid; grid-template-columns: 1fr 356px; gap: 34px; align-items: start; }
.cd-hero { background: var(--card); border: 1px solid var(--line); border-radius: var(--r2); padding: 28px; }
.cd-title { font-size: 30px; letter-spacing: -.01em; }
.cd-sub { font-size: 15.5px; color: var(--ink2); margin-top: 10px; }
.cd-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 18px; font-size: 13.5px; color: var(--ink2); align-items: center; }
.cd-meta .stars { color: #f59e0b; font-weight: 700; }
.chip { display: inline-block; font-size: 12.5px; background: #f1f5fd; color: var(--p1); border-radius: 999px; padding: 4px 11px; font-weight: 600; }
.player {
  margin-top: 24px; aspect-ratio: 16 / 9; border-radius: var(--r2); background: linear-gradient(135deg, #1e293b, #312e81);
  display: grid; place-items: center; position: relative; overflow: hidden; cursor: pointer;
}
.player .deco { position: absolute; inset: 0; opacity: .22; background-image: radial-gradient(circle at 30% 30%, #fff 1.5px, transparent 1.6px); background-size: 46px 46px; }
.play-btn { width: 70px; height: 70px; border-radius: 50%; background: rgba(255, 255, 255, .94); display: grid; place-items: center; position: relative; box-shadow: 0 14px 34px -12px rgba(0, 0, 0, .6); transition: .2s; }
.player:hover .play-btn { transform: scale(1.07); }
.play-btn::after { content: ""; width: 0; height: 0; border-left: 20px solid var(--p1); border-top: 13px solid transparent; border-bottom: 13px solid transparent; margin-left: 5px; }
.player-note { position: absolute; left: 16px; bottom: 14px; color: rgba(255, 255, 255, .9); font-size: 13px; }
.cd-block { background: var(--card); border: 1px solid var(--line); border-radius: var(--r2); padding: 26px 28px; margin-top: 22px; }
.cd-block h2 { font-size: 20px; margin-bottom: 16px; }
.out-list { list-style: none; padding: 0; display: grid; gap: 12px; }
.out-list li { display: flex; gap: 11px; font-size: 14.5px; color: var(--ink2); line-height: 1.85; }
.out-list li::before { content: "✓"; flex: none; width: 21px; height: 21px; border-radius: 50%; background: #e8f8f1; color: var(--ok); font-size: 12px; font-weight: 800; display: grid; place-items: center; margin-top: 3px; }
.chapter { border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 12px; overflow: hidden; }
.chapter-head { display: flex; align-items: center; gap: 12px; padding: 15px 18px; background: #fafbfe; font-weight: 700; font-size: 15px; }
.chapter-head .num { font-size: 12px; color: var(--p1); background: #eef3ff; padding: 3px 9px; border-radius: 999px; flex: none; }
.chapter-head .cnt { margin-left: auto; font-size: 12.5px; color: var(--dim); font-weight: 500; }
.lesson { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line2); font-size: 14px; }
.lesson:hover { background: #fafcff; }
.lesson .idx { color: var(--dim); font-size: 13px; width: 44px; flex: none; }
.lesson .t { flex: 1; min-width: 0; }
.lesson .free { font-size: 11.5px; color: var(--ok); border: 1px solid #b6e6d2; background: #f0fbf6; border-radius: 999px; padding: 1px 8px; flex: none; font-weight: 700; }
.lesson .lock { font-size: 11.5px; color: var(--dim); flex: none; }
.lesson .time { font-size: 12.5px; color: var(--dim); flex: none; }
.lesson.done .t { color: var(--dim); }
.lesson.done .lock { color: var(--ok); }
/* 侧栏 */
.buy-card { position: sticky; top: 88px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r2); padding: 24px; box-shadow: var(--sh); }
.buy-cover { height: 140px; border-radius: var(--r); display: grid; place-items: center; margin-bottom: 18px; }
.buy-cover span { font-size: 38px; font-weight: 800; color: rgba(255, 255, 255, .96); }
.buy-price { display: flex; align-items: baseline; gap: 10px; }
.buy-price b { font-size: 32px; font-weight: 800; color: var(--err); letter-spacing: -.02em; }
.buy-price s { color: var(--dim); font-size: 14px; }
.buy-price .off { font-size: 12.5px; background: #fff1f0; color: var(--err); border-radius: 6px; padding: 2px 7px; font-weight: 700; }
.buy-list { list-style: none; padding: 0; margin: 18px 0; border-top: 1px dashed var(--line); padding-top: 16px; }
.buy-list li { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink2); padding: 5px 0; }
.buy-list li::before { content: "•"; color: var(--p1); font-weight: 800; }
.buy-note { font-size: 12.5px; color: var(--dim); margin-top: 14px; text-align: center; line-height: 1.8; }
.owned-bar { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ok); background: #f0fbf6; border: 1px solid #cdf0e2; border-radius: 11px; padding: 10px 13px; margin-bottom: 14px; font-weight: 600; }
.t-side { background: var(--card); border: 1px solid var(--line); border-radius: var(--r2); padding: 22px; margin-top: 22px; }
.t-side-head { display: flex; align-items: center; gap: 13px; }
.t-side-name { font-weight: 700; font-size: 16px; }
.t-side-title { font-size: 12.5px; color: var(--p1); margin-top: 2px; }
.t-side-bio { font-size: 13.5px; color: var(--ink2); line-height: 1.9; margin-top: 14px; }

/* ---------------- 学习中心 ---------------- */
.me-head { background: var(--grad); border-radius: 24px; padding: 30px 32px; color: #fff; margin: 26px 0 0; position: relative; overflow: hidden; }
.me-head::after { content: ""; position: absolute; right: -50px; top: -70px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255, 255, 255, .13); }
.me-head h1 { font-size: 25px; }
.me-head p { opacity: .9; font-size: 14px; margin-top: 7px; }
.me-stats { display: flex; gap: 36px; margin-top: 22px; position: relative; }
.me-stats b { font-size: 24px; font-weight: 800; display: block; }
.me-stats span { font-size: 12.5px; opacity: .88; }
.me-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.mc { background: var(--card); border: 1px solid var(--line); border-radius: var(--r2); padding: 20px; }
.mc-top { display: flex; align-items: center; gap: 13px; }
.mc-title { font-size: 15.5px; font-weight: 700; line-height: 1.5; }
.mc-teacher { font-size: 12.5px; color: var(--dim); margin-top: 3px; }
.bar { height: 7px; border-radius: 999px; background: #eef2f9; overflow: hidden; margin-top: 16px; }
.bar i { display: block; height: 100%; background: var(--grad); border-radius: 999px; transition: width .4s; }
.mc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; font-size: 12.5px; color: var(--dim); }
.order-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line2); font-size: 14px; flex-wrap: wrap; }
.order-row:last-child { border-bottom: none; }
.order-no { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; color: var(--dim); }
.badge { font-size: 12px; border-radius: 999px; padding: 3px 10px; font-weight: 700; }
.badge.paid { background: #e8f8f1; color: #0f9d6b; }
.badge.pending { background: #fff7e8; color: #b7791f; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r2); padding: 24px 26px; margin-top: 22px; }
.panel h2 { font-size: 19px; margin-bottom: 14px; }
.tab-row { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tab-row button { border: none; background: none; padding: 11px 4px; margin-right: 20px; font-size: 15px; font-weight: 600; color: var(--dim); border-bottom: 2px solid transparent; }
.tab-row button.on { color: var(--p1); border-bottom-color: var(--p1); }
.empty-note { padding: 46px 20px; text-align: center; color: var(--dim); font-size: 14px; }
.login-ask { padding: 60px 20px; text-align: center; }

/* ---------------- 后台 ---------------- */
.admin-nav { background: #0f1729; color: #cbd5e1; }
.admin-nav .logo { color: #fff; }
.admin-nav .nav-links a { color: #9fb0c8; }
.admin-nav .nav-links a:hover { color: #fff; }
.admin-wrap { padding: 28px 0 60px; }
.card-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r2); padding: 22px 24px; margin-bottom: 20px; }
.card-panel h3 { font-size: 16.5px; margin-bottom: 4px; }
.card-panel .hint { font-size: 13px; color: var(--dim); margin-bottom: 16px; }
.tbl-wrap { overflow-x: auto; margin: 0 -4px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 620px; }
table.tbl th { text-align: left; font-size: 12.5px; color: var(--dim); font-weight: 600; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.tbl td { padding: 12px; border-bottom: 1px solid var(--line2); color: var(--ink2); vertical-align: middle; }
table.tbl tr:hover td { background: #fafcff; }
table.tbl td b { color: var(--ink); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; }
.stat-card b { font-size: 25px; font-weight: 800; display: block; }
.stat-card span { font-size: 12.5px; color: var(--dim); }
.pill { display: inline-block; font-size: 12px; padding: 3px 9px; border-radius: 999px; background: #eef2f9; color: var(--ink2); }
.row-actions { display: flex; gap: 7px; flex-wrap: wrap; }

/* ---------------- 政策页 ---------------- */
.legal { max-width: 860px; margin: 0 auto; padding: 44px 22px 30px; }
.legal h1 { font-size: 28px; }
.legal-meta { color: var(--dim); font-size: 13px; margin: 9px 0 26px; }
.legal h2 { font-size: 18px; margin: 30px 0 10px; padding-left: 12px; border-left: 3px solid var(--p1); }
.legal p, .legal li { color: var(--ink2); font-size: 14.5px; line-height: 2; }
.legal li { margin: 5px 0; }
.legal b { color: var(--ink); }
.legal-box { background: #f8fafd; border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; margin: 16px 0; }
.legal-foot { border-top: 1px solid var(--line); margin-top: 34px; padding-top: 18px; color: var(--dim); font-size: 12.5px; text-align: center; line-height: 2; }

.grad-a { background: linear-gradient(135deg, #4f46e5, #7c3aed); }
.grad-b { background: linear-gradient(135deg, #0891b2, #2563eb); }
.grad-c { background: linear-gradient(135deg, #2563eb, #06b6d4); }
.grad-d { background: linear-gradient(135deg, #db2777, #7c3aed); }
.grad-e { background: linear-gradient(135deg, #f97316, #ef4444); }
.grad-f { background: linear-gradient(135deg, #0ea5e9, #6366f1); }
.grad-g { background: linear-gradient(135deg, #059669, #10b981); }
.grad-h { background: linear-gradient(135deg, #1e40af, #0ea5e9); }
.grad-i { background: linear-gradient(135deg, #9d174d, #db2777); }
.grad-j { background: linear-gradient(135deg, #334155, #6366f1); }
.grad-k { background: linear-gradient(135deg, #0d9488, #22d3ee); }
.grad-l { background: linear-gradient(135deg, #b45309, #f59e0b); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 980px) {
  .cd-grid { grid-template-columns: 1fr; }
  .buy-card { position: static; }
  .hero h1 { font-size: 34px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 780px) {
  .nav-links { display: none; }
  .nav-in { height: 60px; gap: 8px; }
  .logo { font-size: 15px; }
  .logo-mark { width: 30px; height: 30px; font-size: 15px; border-radius: 9px; }
  .nav-right { gap: 7px; }
  .nav-right .btn-sm { height: 32px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
  .nav-burger { display: inline-flex; padding: 0 9px; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
    position: absolute; left: 0; right: 0; top: 60px; background: #fff;
    border-bottom: 1px solid var(--line); padding: 12px 22px 18px; box-shadow: var(--sh);
  }
  .nav-links.open a { padding: 9px 0; width: 100%; font-size: 15.5px; }
  .sec { padding: 44px 0; }
  .hero { padding: 42px 0 38px; }
  .hero h1 { font-size: 24px; overflow-wrap: anywhere; }
  .hero-sub { font-size: 14.5px; }
  .hero-stats { gap: 22px; margin-top: 30px; }
  .hero-stats b { font-size: 20px; }
  .hero-stats span { font-size: 12px; }
  .sec-head h2 { font-size: 22px; }
  .course-grid, .teacher-grid, .path-list, .review-grid, .me-grid { grid-template-columns: 1fr; }
  .cta { padding: 32px 24px; border-radius: 20px; }
  .cta h2 { font-size: 22px; }
  .cd-hero, .cd-block { padding: 20px; }
  .cd-title { font-size: 23px; }
  .me-head { padding: 24px 22px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; gap: 24px; }
}
