/* ============================================
   AI 学习平台 全局样式 —— 水墨灰文艺风
   暖灰宣纸 · 石板灰墨 · 低饱和留白 · 衬线书香
   ============================================ */
:root {
  --bg: #f0efec;
  --bg-soft: #e5e3df;
  --bg-card: rgba(255, 255, 254, 0.86);
  --bg-card-hover: rgba(255, 255, 255, 0.97);
  --border: rgba(72, 74, 79, 0.17);
  --border-hover: rgba(94, 98, 105, 0.55);
  --text: #383b40;
  --text-soft: #666a72;
  --text-dim: #9c9fa6;
  --primary: #686d75;
  --primary-2: #8d887f;
  --accent: #7e838b;
  --accent-2: #a8a39a;
  --grad: linear-gradient(135deg, #b3aea5 0%, #82878f 48%, #585d65 100%);
  --grad-soft: linear-gradient(135deg, rgba(141,136,127,.15), rgba(104,109,117,.12));
  --shadow: 0 18px 48px -22px rgba(58, 60, 65, 0.3);
  --shadow-glow: 0 0 0 1px rgba(94,98,105,.24), 0 20px 50px -18px rgba(90, 92, 98, .32);
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1200px;
  --nav-h: 68px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", Georgia, "Times New Roman", serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  overflow-x: hidden;
}

::selection {
  background: rgba(141, 136, 127, 0.28);
  color: #4a4638;
}

/* 灰调滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #e7e5e1; }
::-webkit-scrollbar-thumb {
  background: #c3c0ba;
  border-radius: 8px;
  border: 2px solid #e7e5e1;
}
::-webkit-scrollbar-thumb:hover { background: #9c998f; }

/* 背景装饰：暖灰与青灰两抹淡墨晕染 */
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(120px);
  opacity: .28;
  pointer-events: none;
}
body::before {
  width: 520px; height: 520px;
  background: #cfcbc2;
  top: -160px; left: -140px;
}
body::after {
  width: 460px; height: 460px;
  background: #b7bbc0;
  bottom: -180px; right: -120px;
  opacity: .2;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container {
  width: min(var(--maxw), 92%);
  margin: 0 auto;
}

/* ============ 顶部导航 ============ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  background: rgba(240, 239, 236, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.navbar .container {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 800;
  white-space: nowrap;
}
.logo .logo-mark {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: var(--grad);
  display: grid;
  place-items: center;
  font-size: 20px;
  filter: grayscale(.35);
  box-shadow: 0 6px 18px -6px rgba(90, 92, 98, .5);
}
.logo .logo-text b {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nav-links {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.nav-links a {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14.5px;
  color: var(--text-soft);
  transition: all .25s;
}
.nav-links a:hover,
.nav-links a.active {
  color: #474c53;
  background: rgba(104, 109, 117, .13);
}
.nav-toggle {
  display: none;
  margin-left: auto;
  background: rgba(255, 255, 254, .7);
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px; height: 40px;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
}

/* ============ Hero ============ */
.hero {
  padding: calc(var(--nav-h) + 64px) 0 56px;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 48px;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid rgba(130, 135, 143, .38);
  background: var(--grad-soft);
  font-size: 13px;
  color: #5c616a;
  margin-bottom: 22px;
}
.hero-badge .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(126, 131, 139, .8);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}
.hero h1 {
  font-size: clamp(30px, 4.6vw, 52px);
  line-height: 1.28;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 20px;
}
.hero h1 .grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p.lead {
  font-size: 16.5px;
  color: var(--text-soft);
  max-width: 540px;
  margin-bottom: 30px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  gap: 36px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.hero-stats .stat b {
  display: block;
  font-size: 28px;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-stats .stat span { font-size: 13.5px; color: var(--text-dim); }

.hero-visual {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.hero-visual img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
}
.hero-visual::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(240,239,236,0) 55%, rgba(240,239,236,.9));
}
.hero-visual .float-tag {
  position: absolute;
  z-index: 2;
  background: rgba(253, 253, 252, .94);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  color: var(--text-soft);
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  filter: grayscale(.7);
  box-shadow: 0 10px 26px -12px rgba(58, 60, 65, .35);
  animation: floaty 4s ease-in-out infinite;
}
.hero-visual .float-tag.t1 { top: 18px; left: 18px; }
.hero-visual .float-tag.t2 { bottom: 22px; right: 18px; animation-delay: 1.4s; }
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

/* ============ 按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .25s;
  font-family: inherit;
}
.btn-primary {
  background: var(--grad);
  color: #fbfaf8;
  box-shadow: 0 10px 26px -9px rgba(90, 92, 98, .6);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 15px 32px -9px rgba(90, 92, 98, .7); }
.btn-ghost {
  background: rgba(255, 255, 254, .6);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--border-hover); background: rgba(104, 109, 117, .1); }

/* ============ 通用区块 ============ */
.section { padding: 64px 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 34px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-size: clamp(23px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: 1px;
}
.section-head h2 .bar {
  display: inline-block;
  width: 34px; height: 5px;
  border-radius: 4px;
  background: var(--grad);
  margin-right: 12px;
  vertical-align: middle;
}
.section-head p { color: var(--text-soft); font-size: 15px; margin-top: 6px; }

/* 分类卡片 */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}
.cat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 18px;
  cursor: pointer;
  transition: all .3s;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 26px -18px rgba(58, 60, 65, .28);
}
.cat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad-soft);
  opacity: 0;
  transition: opacity .3s;
}
.cat-card:hover { transform: translateY(-5px); border-color: var(--border-hover); box-shadow: var(--shadow-glow); }
.cat-card:hover::before { opacity: 1; }
.cat-card .cat-icon {
  font-size: 30px;
  margin-bottom: 14px;
  position: relative;
  filter: grayscale(.65);
  transition: filter .3s;
}
.cat-card:hover .cat-icon { filter: grayscale(0); }
.cat-card h3 { font-size: 16.5px; margin-bottom: 6px; position: relative; }
.cat-card p { font-size: 13px; color: var(--text-dim); position: relative; }
.cat-card .cat-count {
  position: absolute;
  top: 16px; right: 16px;
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(141, 136, 127, .16);
  color: #6e695f;
}

/* ============ 搜索 & 筛选 ============ */
.toolbar {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
}
.search-box {
  flex: 1;
  min-width: 240px;
  position: relative;
}
.search-box input {
  width: 100%;
  padding: 13px 18px 13px 46px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 14.5px;
  outline: none;
  transition: all .25s;
  font-family: inherit;
}
.search-box input::placeholder { color: var(--text-dim); }
.search-box input:focus { border-color: var(--border-hover); box-shadow: 0 0 0 3px rgba(104, 109, 117, .15); }
.search-box .s-icon {
  position: absolute;
  left: 18px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 15px;
}
.filter-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-soft);
  font-size: 13.5px;
  cursor: pointer;
  transition: all .22s;
  white-space: nowrap;
  font-family: inherit;
}
.chip:hover { border-color: var(--border-hover); color: #474c53; }
.chip.active {
  background: var(--grad);
  border-color: transparent;
  color: #fbfaf8;
  box-shadow: 0 8px 20px -8px rgba(90, 92, 98, .65);
}

/* ============ 课程卡片网格 ============ */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 22px;
}
.course-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all .3s;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 28px -20px rgba(58, 60, 65, .28);
}
.course-card::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s;
}
.course-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-glow);
}
.course-card:hover::after { transform: scaleX(1); }
.course-card .cc-top { display: flex; align-items: center; gap: 14px; }
.course-card .cc-icon {
  width: 52px; height: 52px;
  flex-shrink: 0;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 26px;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  filter: grayscale(.6);
  transition: filter .3s;
}
.course-card:hover .cc-icon { filter: grayscale(0); }
.course-card .cc-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.course-card h3 { font-size: 17.5px; line-height: 1.45; }
.course-card .cc-desc {
  font-size: 13.8px;
  color: var(--text-soft);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.course-card .cc-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}
.course-card .cc-go {
  font-size: 13.5px;
  color: #5c616a;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap .25s;
}
.course-card:hover .cc-go { gap: 11px; }

.tag {
  font-size: 11.5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(126, 131, 139, .13);
  border: 1px solid rgba(126, 131, 139, .32);
  color: #5c616a;
}
.tag.level {
  background: rgba(141, 136, 127, .15);
  border-color: rgba(141, 136, 127, .36);
  color: #6b665c;
}
.tag.hours {
  background: rgba(168, 163, 154, .22);
  border-color: rgba(168, 163, 154, .5);
  color: #706c63;
}
.empty-tip {
  grid-column: 1 / -1;
  text-align: center;
  padding: 70px 0;
  color: var(--text-dim);
  font-size: 15px;
}
.empty-tip .big { font-size: 44px; display: block; margin-bottom: 12px; }

/* ============ 学习路径 ============ */
.path-wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}
.path-step {
  text-align: center;
  padding: 0 14px;
  position: relative;
}
.path-step:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -10px; top: 8px;
  font-size: 22px;
  color: var(--primary-2);
  z-index: 2;
}
.path-step .step-num {
  width: 44px; height: 44px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--grad);
  color: #fbfaf8;
  display: grid;
  place-items: center;
  font-weight: 800;
  box-shadow: 0 8px 20px -7px rgba(90, 92, 98, .6);
}
.path-step h4 { font-size: 15.5px; margin-bottom: 6px; }
.path-step p { font-size: 13px; color: var(--text-dim); }

/* ============ 课程详情页 ============ */
.course-hero {
  padding: calc(var(--nav-h) + 44px) 0 36px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(141, 136, 127, .13), transparent);
}
.breadcrumb { font-size: 13.5px; color: var(--text-dim); margin-bottom: 22px; }
.breadcrumb a:hover { color: #5c616a; }
.course-hero-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 26px;
  align-items: center;
}
.course-hero .ch-icon {
  width: 92px; height: 92px;
  border-radius: 24px;
  background: var(--grad-soft);
  border: 1px solid var(--border-hover);
  display: grid;
  place-items: center;
  font-size: 46px;
  filter: grayscale(.55);
  box-shadow: var(--shadow);
}
.course-hero h1 { font-size: clamp(24px, 3.4vw, 36px); margin-bottom: 12px; letter-spacing: 1px; }
.course-hero .ch-desc { color: var(--text-soft); font-size: 15.5px; max-width: 780px; }
.course-hero .ch-tags { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 36px;
  padding: 44px 0 70px;
  align-items: start;
}

/* 手风琴章节 */
.chapter {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
  transition: border-color .25s, box-shadow .25s;
  box-shadow: 0 6px 22px -18px rgba(58, 60, 65, .24);
}
.chapter.open { border-color: var(--border-hover); box-shadow: 0 14px 34px -20px rgba(94, 98, 105, .35); }
.chapter-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 16.5px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.chapter-head .ch-no {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 14px;
  color: #6e695f;
}
.chapter-head .ch-arrow {
  margin-left: auto;
  color: var(--text-dim);
  transition: transform .3s;
  font-size: 14px;
}
.chapter.open .ch-arrow { transform: rotate(180deg); color: var(--primary); }
.chapter-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease;
}
.chapter.open .chapter-body { max-height: 2000px; }
.chapter-inner { padding: 4px 24px 24px 74px; }
.chapter-inner ul { display: flex; flex-direction: column; gap: 12px; }
.chapter-inner li {
  position: relative;
  padding-left: 22px;
  color: var(--text-soft);
  font-size: 14.8px;
}
.chapter-inner li::before {
  content: "";
  position: absolute;
  left: 2px; top: 10px;
  width: 8px; height: 8px;
  border-radius: 3px;
  background: var(--grad);
  transform: rotate(45deg);
}
.chapter-inner li b { color: var(--text); }

/* 代码块 —— 炭墨夜色，低饱和灰米高亮 */
.block-title {
  font-size: 18px;
  font-weight: 700;
  margin: 38px 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 1px;
}
.block-title::before {
  content: "";
  width: 5px; height: 20px;
  border-radius: 3px;
  background: var(--grad);
}
.code-panel {
  background: #2d2f33;
  border: 1px solid #474a50;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.code-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(233, 230, 222, .1);
  background: rgba(255, 255, 255, .03);
}
.code-bar .dot { width: 11px; height: 11px; border-radius: 50%; }
.code-bar .dot.r { background: #b8a88f; }
.code-bar .dot.y { background: #c9c2a9; }
.code-bar .dot.g { background: #a3ab9d; }
.code-bar .lang { margin-left: 10px; font-size: 12.5px; color: #aaa497; }
.code-bar .copy-btn {
  margin-left: auto;
  background: none;
  border: 1px solid rgba(233, 230, 222, .22);
  color: #ccc7bc;
  padding: 4px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}
.code-bar .copy-btn:hover { border-color: #c6bda8; color: #ded5c0; }
.code-panel pre {
  padding: 20px 22px;
  overflow-x: auto;
  font-size: 13.8px;
  line-height: 1.75;
  font-family: "Cascadia Code", Consolas, "Courier New", monospace;
  color: #e4e1da;
}
.code-panel .cmt { color: #8f8c84; font-style: italic; }
.code-panel .kw { color: #d3c3a2; }
.code-panel .str { color: #b2bca5; }
.code-panel .num { color: #cec3a5; }
.code-panel .fn { color: #c7c1b4; }

/* 应用场景 / 侧栏 */
.app-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.app-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  font-size: 14.5px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all .25s;
}
.app-item:hover { border-color: var(--border-hover); transform: translateY(-3px); box-shadow: 0 12px 28px -16px rgba(94, 98, 105, .4); }
.app-item .a-icon { font-size: 22px; filter: grayscale(.7); transition: filter .3s; }
.app-item:hover .a-icon { filter: grayscale(0); }

.side-card {
  position: sticky;
  top: calc(var(--nav-h) + 20px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 8px 28px -22px rgba(58, 60, 65, .32);
}
.side-card h4 {
  font-size: 15px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.side-outline { display: flex; flex-direction: column; gap: 4px; }
.side-outline a {
  font-size: 13.8px;
  color: var(--text-soft);
  padding: 9px 12px;
  border-radius: 9px;
  border-left: 2px solid transparent;
  transition: all .2s;
  display: flex;
  gap: 9px;
}
.side-outline a:hover { background: rgba(104, 109, 117, .1); color: #474c53; border-left-color: var(--primary); }
.side-outline a .n { color: var(--text-dim); font-size: 12.5px; flex-shrink: 0; }
.side-card .side-tip {
  margin-top: 20px;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--grad-soft);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-soft);
}
.side-card .side-tip b { color: #5d584e; }

.pager {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 36px;
}
.pager a {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  transition: all .25s;
}
.pager a:hover { border-color: var(--border-hover); box-shadow: 0 10px 26px -16px rgba(94, 98, 105, .4); }
.pager a.next { text-align: right; }
.pager .p-label { font-size: 12.5px; color: var(--text-dim); display: block; margin-bottom: 4px; }
.pager .p-name { font-size: 14.5px; font-weight: 600; }

/* ============ 页脚 ============ */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 30px;
  background: rgba(228, 226, 221, .75);
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 32px;
}
.footer h5 { font-size: 15px; margin-bottom: 16px; }
.footer p, .footer a { font-size: 13.8px; color: var(--text-dim); }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a:hover { color: #5c616a; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
}

/* 回到顶部 */
.back-top {
  position: fixed;
  right: 26px; bottom: 26px;
  width: 46px; height: 46px;
  border-radius: 14px;
  background: var(--grad);
  border: none;
  color: #fbfaf8;
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(14px);
  transition: all .3s;
  z-index: 90;
  box-shadow: 0 10px 24px -8px rgba(90, 92, 98, .65);
}
.back-top.show { opacity: 1; transform: translateY(0); }

/* 淡入动画 */
.fade-in { animation: fadeUp .55s ease both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .path-wrap { grid-template-columns: repeat(2, 1fr); gap: 28px 10px; }
  .path-step:not(:last-child)::after { display: none; }
  .detail-layout { grid-template-columns: 1fr; }
  .side-card { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    background: rgba(240, 239, 236, .98);
    border-bottom: 1px solid var(--border);
    padding: 14px 6%;
    gap: 4px;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .course-hero-grid { grid-template-columns: 1fr; justify-items: start; }
  .chapter-inner { padding-left: 24px; }
  .pager { flex-direction: column; }
  .pager a.next { text-align: left; }
}
@media (max-width: 480px) {
  .cat-grid { grid-template-columns: 1fr; }
  .path-wrap { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 22px; }
}
