/* ===========================
   Vibe Coding 入門教材 - 主樣式
   =========================== */

/* --- CSS 變數 / 主題色 --- */
:root {
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --primary-light: #818cf8;
  --accent: #06b6d4;
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --sidebar-bg: #1e1b4b;
  --sidebar-text: #c7d2fe;
  --sidebar-active: #818cf8;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --code-bg: #0f172a;
  --code-text: #e2e8f0;
  --code-keyword: #818cf8;
  --code-string: #34d399;
  --code-comment: #64748b;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.07);
  --radius: 8px;
  --sidebar-width: 260px;
  --header-height: 60px;
}

/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Segoe UI', 'Microsoft JhengHei', 'PingFang TC', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
}

/* --- 通用工具 --- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===========================
   首頁 Hero
   =========================== */
.hero {
  background: linear-gradient(135deg, var(--sidebar-bg) 0%, #312e81 60%, #1e40af 100%);
  color: #fff;
  padding: 5rem 1.5rem 4rem;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  background: rgba(129, 140, 248, 0.25);
  border: 1px solid var(--primary-light);
  color: var(--primary-light);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.2rem;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero h1 span {
  color: var(--primary-light);
}

.hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  max-width: 600px;
  margin: 0 auto 0.8rem;
}

.hero-meta {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin: 1.5rem 0 2rem;
  flex-wrap: wrap;
}

.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.65);
}

.hero-meta-item svg {
  width: 16px;
  height: 16px;
  opacity: 0.8;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===========================
   按鈕
   =========================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(79,70,229,0.4);
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 20px rgba(79,70,229,0.5);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.4);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.7);
}

.btn-secondary {
  background: var(--bg);
  color: var(--primary);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--primary);
  background: #eef2ff;
}

/* ===========================
   首頁 - 特點區
   =========================== */
.features {
  padding: 4rem 1.5rem;
  background: #fff;
}

.features h2, .chapters-section h2 {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  font-size: 1rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 0.8rem;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ===========================
   首頁 - 章節卡片
   =========================== */
.chapters-section {
  padding: 4rem 1.5rem;
  background: var(--bg);
}

.chapters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.2rem;
  max-width: 1050px;
  margin: 0 auto;
}

.chapter-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  text-decoration: none;
  color: var(--text);
}

.chapter-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
  text-decoration: none;
}

.chapter-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chapter-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
}

.chapter-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  flex: 1;
}

.chapter-card .card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.4rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
}

.tag {
  display: inline-block;
  background: #eef2ff;
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.card-arrow {
  color: var(--primary-light);
  font-size: 1.1rem;
}

/* ===========================
   首頁 - 學習路線
   =========================== */
.roadmap-section {
  padding: 4rem 1.5rem;
  background: #fff;
}

.roadmap-section h2 {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.roadmap {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 600px;
  margin: 2rem auto 0;
  position: relative;
}

.roadmap::before {
  content: '';
  position: absolute;
  left: 28px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.roadmap-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.8rem 0;
  position: relative;
  z-index: 1;
}

.roadmap-dot {
  width: 58px;
  height: 58px;
  min-width: 58px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  box-shadow: 0 0 0 4px var(--bg-card), 0 0 0 6px var(--border);
}

.roadmap-content h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.roadmap-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===========================
   首頁 - CTA 區
   =========================== */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%);
  color: #fff;
  text-align: center;
  padding: 4rem 1.5rem;
}

.cta-section h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.8rem;
}

.cta-section p {
  color: rgba(255,255,255,0.8);
  margin-bottom: 2rem;
  font-size: 1rem;
}

/* ===========================
   頁首 / Header (章節頁用)
   =========================== */
.site-header {
  height: var(--header-height);
  background: var(--sidebar-bg);
  display: flex;
  align-items: center;
  padding: 0 1rem;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.header-logo {
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.01em;
  flex: 1;
}

.header-logo span {
  color: var(--primary-light);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  color: #fff;
  flex-direction: column;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===========================
   章節頁 Layout
   =========================== */
.chapter-layout {
  display: flex;
  min-height: calc(100vh - var(--header-height));
}

/* --- Sidebar --- */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--sidebar-bg);
  padding: 1.5rem 0;
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  flex-shrink: 0;
}

.sidebar-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(199, 210, 254, 0.5);
  padding: 0 1.2rem 0.8rem;
}

.sidebar nav ul {
  list-style: none;
}

.sidebar nav ul li a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.2rem;
  color: var(--sidebar-text);
  font-size: 0.88rem;
  border-left: 3px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  text-decoration: none;
}

.sidebar nav ul li a .ch-num {
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(199, 210, 254, 0.4);
  min-width: 20px;
}

.sidebar nav ul li a:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
  text-decoration: none;
}

.sidebar nav ul li a.active {
  background: rgba(129, 140, 248, 0.15);
  color: var(--sidebar-active);
  border-left-color: var(--sidebar-active);
}

.sidebar-home {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem 1rem;
  color: rgba(199, 210, 254, 0.6);
  font-size: 0.82rem;
  text-decoration: none;
  transition: color 0.15s;
}

.sidebar-home:hover {
  color: #fff;
  text-decoration: none;
}

/* --- 主內容 --- */
.chapter-content {
  flex: 1;
  padding: 2.5rem 3rem;
  max-width: 820px;
  min-width: 0;
}

.chapter-tag {
  display: inline-block;
  background: #eef2ff;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.chapter-content h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0.8rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.chapter-intro {
  font-size: 1.05rem;
  color: var(--text-muted);
  border-left: 4px solid var(--primary-light);
  padding-left: 1rem;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

/* ===========================
   章節內容區塊
   =========================== */
.section-block {
  margin-bottom: 2.5rem;
}

.section-block h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

.section-block h2 .section-icon {
  font-size: 1.1rem;
}

.section-block h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 1.2rem 0 0.5rem;
}

.section-block p {
  margin-bottom: 0.8rem;
  line-height: 1.8;
}

.section-block ul, .section-block ol {
  margin: 0.5rem 0 1rem 1.5rem;
}

.section-block li {
  margin-bottom: 0.4rem;
  line-height: 1.7;
}

/* --- 重點摘要 --- */
.key-points {
  background: #eef2ff;
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  margin-bottom: 1.5rem;
}

.key-points h3 {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.7rem;
}

.key-points ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.key-points ul li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
  font-size: 0.92rem;
  color: var(--text);
}

.key-points ul li::before {
  content: '✦';
  color: var(--primary);
  font-size: 0.7rem;
  margin-top: 0.3rem;
  flex-shrink: 0;
}

/* ===========================
   程式碼區塊
   =========================== */
.code-block {
  background: var(--code-bg);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 1.2rem 0;
  box-shadow: var(--shadow-md);
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.code-lang {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}

.copy-btn {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.6);
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}

.copy-btn:hover {
  background: rgba(255,255,255,0.18);
  color: #fff;
}

.copy-btn.copied {
  color: #34d399;
  border-color: #34d399;
}

.code-block pre {
  margin: 0;
  padding: 1.2rem 1.4rem;
  overflow-x: auto;
}

.code-block code {
  font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--code-text);
  background: none;
}

/* 行內 code */
code {
  font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  background: #f1f5f9;
  color: #be185d;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.87em;
}

/* 簡易語法高亮 */
.hl-tag    { color: #7dd3fc; }
.hl-attr   { color: #fbbf24; }
.hl-val    { color: #34d399; }
.hl-kw     { color: var(--code-keyword); }
.hl-str    { color: #34d399; }
.hl-cmt    { color: var(--code-comment); font-style: italic; }
.hl-fn     { color: #fbbf24; }
.hl-num    { color: #fb923c; }

/* ===========================
   警告 / 提示框
   =========================== */
.callout {
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin: 1.2rem 0;
  border-left: 4px solid;
  display: flex;
  gap: 0.7rem;
}

.callout-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

.callout-body h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.callout-body p, .callout-body ul {
  font-size: 0.88rem;
  margin: 0;
}

.callout-body ul {
  margin-left: 1.2rem;
  margin-top: 0.3rem;
}

.callout.warning {
  background: #fefce8;
  border-color: #f59e0b;
}

.callout.warning .callout-icon { color: #f59e0b; }
.callout.warning .callout-body h4 { color: #92400e; }

.callout.info {
  background: #eff6ff;
  border-color: var(--accent);
}

.callout.info .callout-icon { color: var(--accent); }
.callout.info .callout-body h4 { color: #1e40af; }

.callout.success {
  background: #f0fdf4;
  border-color: #22c55e;
}

.callout.success .callout-icon { color: #22c55e; }
.callout.success .callout-body h4 { color: #166534; }

.callout.error {
  background: #fff1f2;
  border-color: #ef4444;
}

.callout.error .callout-icon { color: #ef4444; }
.callout.error .callout-body h4 { color: #991b1b; }

/* ===========================
   練習題
   =========================== */
.exercises {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.exercises h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.exercise-item {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.2rem;
  margin-bottom: 0.8rem;
  background: #fff;
}

.exercise-item:last-child {
  margin-bottom: 0;
}

.exercise-num {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.exercise-item p {
  margin: 0;
  font-size: 0.92rem;
}

/* ===========================
   常見錯誤
   =========================== */
.errors-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin: 1rem 0;
}

.error-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.error-icon {
  color: #ef4444;
  font-size: 1.1rem;
}

.error-content h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.error-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

/* ===========================
   章節導航按鈕
   =========================== */
.chapter-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  gap: 1rem;
  flex-wrap: wrap;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  border: 2px solid var(--border);
  background: #fff;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  text-decoration: none;
}

.nav-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}

.nav-btn.disabled {
  opacity: 0.35;
  pointer-events: none;
}

.nav-btn-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.6;
  display: block;
  line-height: 1;
  margin-bottom: 0.15rem;
}

.nav-btn-title {
  display: block;
  line-height: 1.2;
}

.nav-btn.prev {
  text-align: left;
}

.nav-btn.next {
  text-align: right;
  margin-left: auto;
}

/* ===========================
   頁尾 Footer
   =========================== */
footer {
  background: var(--sidebar-bg);
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.82rem;
}

footer a {
  color: var(--primary-light);
}

footer a:hover {
  color: #fff;
}

/* ===========================
   首頁 Header / Navbar
   =========================== */
.index-header {
  background: var(--sidebar-bg);
  padding: 0 1.5rem;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.index-header .logo {
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
}

.index-header .logo span {
  color: var(--primary-light);
}

.index-nav {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.index-nav a {
  color: rgba(255,255,255,0.7);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}

.index-nav a:hover {
  color: #fff;
}

/* ===========================
   RWD - 響應式設計
   =========================== */
@media (max-width: 900px) {
  .chapter-content {
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 768px) {
  /* Sidebar 在手機預設隱藏 */
  .sidebar {
    position: fixed;
    left: -100%;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    z-index: 150;
    transition: left 0.3s ease;
    width: var(--sidebar-width);
    box-shadow: 4px 0 20px rgba(0,0,0,0.3);
  }

  .sidebar.open {
    left: 0;
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 140;
    top: var(--header-height);
  }

  .sidebar-overlay.active {
    display: block;
  }

  .hamburger {
    display: flex;
  }

  .chapter-content {
    padding: 1.5rem 1rem;
  }

  .index-nav {
    display: none;
  }

  .hero {
    padding: 3rem 1rem 2.5rem;
  }

  .roadmap::before {
    left: 22px;
  }

  .roadmap-dot {
    width: 46px;
    height: 46px;
    min-width: 46px;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .chapters-grid {
    grid-template-columns: 1fr;
  }

  .chapter-nav {
    flex-direction: column;
  }

  .nav-btn.next {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }

  .nav-btn.prev {
    width: 100%;
    justify-content: center;
  }
}

/* ===========================
   Scrollbar 美化
   =========================== */
.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
}

/* ===========================
   章節進度條
   =========================== */
.progress-bar {
  height: 3px;
  background: var(--border);
  position: sticky;
  top: var(--header-height);
  z-index: 190;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  width: 0%;
  transition: width 0.1s;
}
