/* ============================================================
   传播学原理教学网站 · 样式表
   ============================================================ */

/* ---- 主题变量 ---- */
:root {
  /* 主色板 */
  --c-blue: #185FA5;
  --c-blue-light: #E6F1FB;
  --c-blue-bg: #B5D4F4;
  --c-teal: #0F6E56;
  --c-teal-light: #E1F5EE;
  --c-teal-bg: #9FE1CB;
  --c-purple: #534AB7;
  --c-purple-light: #EEEDFE;
  --c-purple-bg: #CECBF6;
  --c-amber: #854F0B;
  --c-amber-light: #FAEEDA;
  --c-amber-bg: #FAC775;
  --c-coral: #993C1D;
  --c-coral-light: #FAECE7;
  --c-coral-bg: #F5C4B3;

  /* 语义色 */
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8F7F4;
  --bg-tertiary: #F0EEE8;
  --bg-card: #FFFFFF;
  --text-primary: #1A1A1A;
  --text-secondary: #555555;
  --text-tertiary: #888888;
  --border-color: #E2E0D8;
  --border-strong: #C8C5BC;
  --accent: #185FA5;
  --success: #0F6E56;
  --warning: #854F0B;
  --danger: #993C1D;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --sidebar-w: 280px;
  --font-sans: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-serif: 'Noto Serif SC', 'Source Han Serif SC', Georgia, serif;
}

/* 深色模式 */
[data-theme="dark"] {
  --bg-primary: #1A1A1E;
  --bg-secondary: #232328;
  --bg-tertiary: #2A2A2F;
  --bg-card: #232328;
  --text-primary: #E8E8E8;
  --text-secondary: #A8A8A8;
  --text-tertiary: #707070;
  --border-color: #3A3A3F;
  --border-strong: #4A4A4F;
  --shadow: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.4);
}

/* ---- 基础重置 ---- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.8;
  font-size: 15px;
  transition: background 0.3s, color 0.3s;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--c-blue); }

/* ---- 阅读进度条 ---- */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--c-blue), var(--c-teal), var(--c-purple));
  z-index: 1000;
  transition: width 0.1s ease;
  border-radius: 0 2px 2px 0;
}

/* ---- 顶部栏 ---- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 60px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 20px;
  z-index: 900;
  box-shadow: var(--shadow);
}

.topbar-left { display: flex; align-items: center; gap: 12px; }

.topbar-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text-primary);
  padding: 6px;
  border-radius: var(--radius);
  transition: background 0.2s;
}
.topbar-menu-btn:hover { background: var(--bg-tertiary); }

.topbar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 17px;
  color: var(--text-primary);
}
.topbar-logo .logo-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--c-blue), var(--c-teal));
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 16px; font-weight: 700;
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 搜索框 */
.search-box {
  position: relative;
  width: 260px;
}
.search-box input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.search-box input:focus {
  border-color: var(--accent);
  background: var(--bg-primary);
}
.search-box .search-icon {
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  font-size: 16px;
  pointer-events: none;
}
.search-results {
  position: absolute;
  top: 42px; left: 0; right: 0;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 400px;
  overflow-y: auto;
  display: none;
  z-index: 100;
}
.search-results.active { display: block; }
.search-result-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.15s;
}
.search-result-item:hover { background: var(--bg-tertiary); }
.search-result-item:last-child { border-bottom: none; }
.search-result-item .sr-title {
  font-size: 13px; font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.search-result-item .sr-desc {
  font-size: 12px; color: var(--text-tertiary);
}

/* 主题切换按钮 */
.theme-toggle {
  width: 36px; height: 36px;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  background: var(--bg-tertiary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-primary);
  transition: all 0.2s;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--accent); }

/* ---- 侧边栏 ---- */
.sidebar {
  position: fixed;
  top: 60px;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-primary);
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  z-index: 800;
  transition: transform 0.3s ease;
}

.sidebar-section {
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
}
.sidebar-section:last-child { border-bottom: none; }

.sidebar-label {
  padding: 0 20px;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-tertiary);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 14px;
  transition: all 0.15s;
  position: relative;
  border-left: 3px solid transparent;
}
.nav-item:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}
.nav-item.active {
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 600;
  border-left-color: var(--accent);
}
.nav-item .nav-num {
  width: 24px; height: 24px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  flex-shrink: 0;
  transition: all 0.15s;
}

/* 章节颜色 */
.nav-item[data-color="blue"] .nav-num { background: var(--c-blue-light); color: var(--c-blue); }
.nav-item[data-color="teal"] .nav-num { background: var(--c-teal-light); color: var(--c-teal); }
.nav-item[data-color="purple"] .nav-num { background: var(--c-purple-light); color: var(--c-purple); }
.nav-item[data-color="amber"] .nav-num { background: var(--c-amber-light); color: var(--c-amber); }
.nav-item[data-color="coral"] .nav-num { background: var(--c-coral-light); color: var(--c-coral); }

.nav-item.active[data-color="blue"] .nav-num { background: var(--c-blue); color: white; }
.nav-item.active[data-color="teal"] .nav-num { background: var(--c-teal); color: white; }
.nav-item.active[data-color="purple"] .nav-num { background: var(--c-purple); color: white; }
.nav-item.active[data-color="amber"] .nav-num { background: var(--c-amber); color: white; }
.nav-item.active[data-color="coral"] .nav-num { background: var(--c-coral); color: white; }

.nav-item .nav-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- 主内容区 ---- */
.main-content {
  margin-left: var(--sidebar-w);
  margin-top: 60px;
  padding: 0;
  min-height: calc(100vh - 60px);
}

/* ---- Hero 区域 ---- */
.hero {
  padding: 60px 48px 48px;
  background: linear-gradient(135deg, var(--c-blue) 0%, var(--c-teal) 100%);
  color: white;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%; right: -10%;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -30%; right: 10%;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.hero-content { position: relative; z-index: 1; max-width: 720px; }
.hero-badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(255,255,255,0.2);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 16px;
  backdrop-filter: blur(10px);
}
.hero h1 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
  line-height: 1.3;
}
.hero .subtitle {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 16px;
  font-family: var(--font-serif);
  font-style: italic;
}
.hero .desc {
  font-size: 15px;
  opacity: 0.85;
  line-height: 1.7;
  margin-bottom: 24px;
}
.hero-meta {
  display: flex;
  gap: 24px;
  font-size: 13px;
  opacity: 0.9;
}
.hero-meta span { display: flex; align-items: center; gap: 6px; }

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 24px;
}
.hero-stat {
  text-align: center;
}
.hero-stat .num {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
}
.hero-stat .label {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 4px;
}

/* ---- 章节容器 ---- */
.chapter {
  padding: 48px;
  border-bottom: 1px solid var(--border-color);
  scroll-margin-top: 60px;
}
.chapter:last-child { border-bottom: none; }

.chapter-header {
  margin-bottom: 32px;
}
.chapter-header .ch-number {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}
.chapter-header .ch-number[data-color="blue"] { background: var(--c-blue-light); color: var(--c-blue); }
.chapter-header .ch-number[data-color="teal"] { background: var(--c-teal-light); color: var(--c-teal); }
.chapter-header .ch-number[data-color="purple"] { background: var(--c-purple-light); color: var(--c-purple); }
.chapter-header .ch-number[data-color="amber"] { background: var(--c-amber-light); color: var(--c-amber); }
.chapter-header .ch-number[data-color="coral"] { background: var(--c-coral-light); color: var(--c-coral); }

.chapter-header h2 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
}
.chapter-header .ch-subtitle {
  font-size: 14px;
  color: var(--text-tertiary);
  font-family: var(--font-serif);
  font-style: italic;
  margin-bottom: 12px;
}
.chapter-header .ch-summary {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
}

/* ---- 知识点卡片 ---- */
.kp-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.kp-card:hover { box-shadow: var(--shadow); }

.kp-header {
  padding: 16px 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background 0.15s;
  user-select: none;
}
.kp-header:hover { background: var(--bg-tertiary); }

.kp-header .kp-icon {
  width: 28px; height: 28px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  transition: all 0.15s;
}
.kp-header .kp-icon[data-color="blue"] { background: var(--c-blue-light); color: var(--c-blue); }
.kp-header .kp-icon[data-color="teal"] { background: var(--c-teal-light); color: var(--c-teal); }
.kp-header .kp-icon[data-color="purple"] { background: var(--c-purple-light); color: var(--c-purple); }
.kp-header .kp-icon[data-color="amber"] { background: var(--c-amber-light); color: var(--c-amber); }
.kp-header .kp-icon[data-color="coral"] { background: var(--c-coral-light); color: var(--c-coral); }

.kp-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}

.kp-toggle {
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-tertiary);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.kp-card.expanded .kp-toggle { transform: rotate(180deg); }

.kp-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.kp-card.expanded .kp-body { max-height: 5000px; }

.kp-body-inner {
  padding: 0 24px 24px;
  border-top: 1px solid var(--border-color);
}

/* ---- 内容块 ---- */
.block { margin-top: 20px; }
.block:first-child { margin-top: 20px; }

/* 定义块 */
.block-definition {
  padding: 16px 20px;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
}
.block-definition .def-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 6px;
}
.block-definition .def-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-primary);
}

/* 段落 */
.block-paragraph {
  font-size: 14px;
  line-height: 1.9;
  color: var(--text-secondary);
}

/* 要点列表 */
.block-keypoints {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 16px 20px 16px 44px;
}
.block-keypoints .kp-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-tertiary);
  margin-bottom: 8px;
  margin-left: -24px;
}
.block-keypoints ul {
  list-style: none;
  padding: 0;
}
.block-keypoints li {
  position: relative;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
  padding: 4px 0;
}
.block-keypoints li::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 13px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* 比较表格 */
.block-comparison {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}
.block-comparison table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.block-comparison th {
  background: var(--bg-tertiary);
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}
.block-comparison td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  vertical-align: top;
}
.block-comparison tr:last-child td { border-bottom: none; }
.block-comparison tr:hover td { background: var(--bg-secondary); }
.block-comparison td:first-child { font-weight: 600; color: var(--text-primary); }

/* 时间线 */
.block-timeline {
  position: relative;
  padding-left: 28px;
}
.block-timeline::before {
  content: '';
  position: absolute;
  left: 8px; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--border-color);
}
.tl-item {
  position: relative;
  padding-bottom: 24px;
}
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 4px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--accent);
  z-index: 1;
}
.tl-item .tl-period {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}
.tl-item .tl-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.tl-item .tl-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* 理论卡片 */
.block-theorycards {
  display: grid;
  gap: 16px;
}
.theory-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 16px 20px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.theory-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.theory-card .tc-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.theory-card .tc-theorist {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}
.theory-card .tc-field {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 12px;
  background: var(--bg-tertiary);
  color: var(--text-tertiary);
  font-weight: 600;
}
.theory-card .tc-contribution {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 8px;
}
.theory-card .tc-work {
  font-size: 12px;
  color: var(--text-tertiary);
  font-style: italic;
  padding-top: 8px;
  border-top: 1px dashed var(--border-color);
}

/* 提示框 */
.block-note {
  padding: 14px 18px;
  background: var(--c-amber-light);
  border-radius: var(--radius);
  border-left: 3px solid var(--c-amber);
}
[data-theme="dark"] .block-note {
  background: rgba(133,79,11,0.15);
}
.block-note .note-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--c-amber);
  margin-bottom: 6px;
}
.block-note .note-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---- 测验区域 ---- */
.quiz-section {
  margin-top: 40px;
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}
.quiz-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.quiz-header .quiz-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--c-teal-light);
  color: var(--c-teal);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  font-weight: 700;
}
.quiz-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.quiz-item {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}
.quiz-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.quiz-question {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  gap: 8px;
}
.quiz-question .q-num {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-tertiary);
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.quiz-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
  font-size: 14px;
  color: var(--text-secondary);
}
.quiz-option:hover {
  border-color: var(--accent);
  background: var(--bg-tertiary);
}
.quiz-option .option-letter {
  width: 22px; height: 22px;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
  transition: all 0.15s;
}
.quiz-option.correct {
  border-color: var(--success);
  background: var(--c-teal-light);
  color: var(--success);
}
.quiz-option.correct .option-letter {
  background: var(--success);
  color: white;
  border-color: var(--success);
}
.quiz-option.incorrect {
  border-color: var(--danger);
  background: var(--c-coral-light);
  color: var(--danger);
}
.quiz-option.incorrect .option-letter {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

.quiz-explanation {
  margin-top: 10px;
  padding: 10px 14px;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-secondary);
  display: none;
  line-height: 1.7;
}
.quiz-explanation.show { display: block; }
.quiz-explanation .exp-label {
  font-weight: 700;
  color: var(--accent);
}

/* ---- 回到顶部 ---- */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  color: var(--text-primary);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  z-index: 700;
}
.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
}
.back-to-top:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---- 遮罩（移动端） ---- */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 750;
}
.overlay.active { display: block; }

/* ---- 页脚 ---- */
.footer {
  padding: 32px 48px;
  text-align: center;
  font-size: 13px;
  color: var(--text-tertiary);
  border-top: 1px solid var(--border-color);
  background: var(--bg-primary);
}
.footer a { color: var(--accent); }

/* ---- 响应式 ---- */
@media (max-width: 1024px) {
  .search-box { width: 200px; }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 260px; }

  .topbar-menu-btn { display: flex; }
  .search-box { width: 160px; }

  .sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }

  .main-content { margin-left: 0; }

  .hero { padding: 40px 24px 32px; }
  .hero h1 { font-size: 26px; }
  .hero .subtitle { font-size: 15px; }
  .hero .desc { font-size: 14px; }
  .hero-stats { gap: 20px; }
  .hero-stat .num { font-size: 26px; }

  .chapter { padding: 32px 20px; }
  .chapter-header h2 { font-size: 22px; }
  .chapter-header .ch-summary { font-size: 13px; padding: 14px; }

  .kp-header { padding: 14px 16px; }
  .kp-body-inner { padding: 0 16px 20px; }

  .quiz-section { padding: 20px 16px; }

  .footer { padding: 24px 20px; }

  .back-to-top { bottom: 20px; right: 20px; }
}

@media (max-width: 480px) {
  .search-box { display: none; }
  .hero h1 { font-size: 22px; }
  .hero-stats { flex-wrap: wrap; gap: 16px; }
  .chapter-header h2 { font-size: 20px; }

  .block-comparison { font-size: 12px; }
  .block-comparison th, .block-comparison td { padding: 8px 10px; }
}

/* ---- 动画 ---- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.chapter { animation: fadeInUp 0.4s ease; }

/* 滚动条美化 */
.sidebar::-webkit-scrollbar,
.search-results::-webkit-scrollbar {
  width: 6px;
}
.sidebar::-webkit-scrollbar-track,
.search-results::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar::-webkit-scrollbar-thumb,
.search-results::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 3px;
}

/* ============================================================
   用户认证 & 个人中心 样式
   ============================================================ */

/* ---- 用户按钮 ---- */
.user-area {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px 0 8px;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  background: var(--bg-tertiary);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  color: var(--text-primary);
  transition: all 0.2s;
}
.user-btn:hover {
  border-color: var(--accent);
  background: var(--bg-primary);
}
.user-btn .user-btn-icon {
  font-size: 14px;
  color: var(--text-tertiary);
}
.user-btn.logged-in {
  background: linear-gradient(135deg, var(--c-blue-light), var(--c-teal-light));
  border-color: transparent;
}
.user-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-blue), var(--c-teal));
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.user-name {
  font-weight: 600;
  font-size: 13px;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- 侧边栏进度标记 ---- */
.nav-progress-dot {
  margin-left: auto;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border-color);
  flex-shrink: 0;
  transition: all 0.3s;
}
.nav-progress-dot.partial {
  background: var(--c-amber);
}
.nav-progress-dot.done {
  background: var(--success);
}
.nav-progress-dot.done::after {
  content: '\2713';
  color: white;
  font-size: 6px;
  font-weight: 700;
}

/* ---- 模态框通用 ---- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal-overlay.active {
  display: flex;
}
.modal-box {
  position: relative;
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.25s ease;
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--bg-tertiary);
  cursor: pointer;
  font-size: 20px;
  color: var(--text-tertiary);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  z-index: 10;
}
.modal-close:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ---- 登录/注册框 ---- */
.auth-box {
  width: 100%;
  max-width: 400px;
  padding: 36px 32px 28px;
  text-align: center;
}
.auth-logo {
  margin-bottom: 16px;
}
.auth-logo-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--c-blue), var(--c-teal));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  font-weight: 700;
}
.auth-box h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.auth-subtitle {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 24px;
}
.auth-form {
  text-align: left;
}
.auth-field {
  margin-bottom: 16px;
}
.auth-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.auth-field input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.auth-field input:focus {
  border-color: var(--accent);
  background: var(--bg-primary);
}
.auth-error {
  display: none;
  padding: 8px 12px;
  margin-bottom: 12px;
  background: var(--c-coral-light);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--danger);
}
[data-theme="dark"] .auth-error {
  background: rgba(153,60,29,0.15);
}
.auth-submit {
  width: 100%;
  height: 42px;
  border: none;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--c-blue), var(--c-teal));
  color: white;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}
.auth-submit:hover { opacity: 0.92; }
.auth-submit:active { transform: scale(0.98); }
.auth-switch {
  display: block;
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--accent);
  cursor: pointer;
}
.auth-switch:hover { text-decoration: underline; }

/* ---- 个人中心 ---- */
.dash-box {
  width: 100%;
  max-width: 640px;
  padding: 32px 28px;
}
.dash-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}
.dash-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-blue), var(--c-teal));
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 26px;
  font-weight: 700;
  flex-shrink: 0;
}
.dash-header-info { flex: 1; }
.dash-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.dash-subtitle {
  font-size: 13px;
  color: var(--text-tertiary);
}
.dash-joindate {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* 统计卡片 */
.dash-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.dash-stat-card {
  text-align: center;
  padding: 16px 8px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
}
.dash-stat-card.stat-progress { border-color: var(--c-blue); background: var(--c-blue-light); }
.dash-stat-card.stat-rate { border-color: var(--c-teal); background: var(--c-teal-light); }
.dash-stat-card.stat-quiz { border-color: var(--c-purple); background: var(--c-purple-light); }
.dash-stat-card.stat-score { border-color: var(--c-amber); background: var(--c-amber-light); }
[data-theme="dark"] .dash-stat-card.stat-progress { background: rgba(24,95,165,0.15); }
[data-theme="dark"] .dash-stat-card.stat-rate { background: rgba(15,110,86,0.15); }
[data-theme="dark"] .dash-stat-card.stat-quiz { background: rgba(83,74,183,0.15); }
[data-theme="dark"] .dash-stat-card.stat-score { background: rgba(133,79,11,0.15); }

.dash-stat-main {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}
.dash-stat-sub {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}
.dash-stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 6px;
  font-weight: 600;
}

/* 章节进度列表 */
.dash-section {
  margin-bottom: 24px;
}
.dash-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-color);
}
.dash-chapters {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dash-chapter-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}
.dash-ch-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.dash-ch-num {
  width: 28px; height: 28px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  flex-shrink: 0;
}
.dash-ch-num[data-color="blue"] { background: var(--c-blue-light); color: var(--c-blue); }
.dash-ch-num[data-color="teal"] { background: var(--c-teal-light); color: var(--c-teal); }
.dash-ch-num[data-color="purple"] { background: var(--c-purple-light); color: var(--c-purple); }
.dash-ch-num[data-color="amber"] { background: var(--c-amber-light); color: var(--c-amber); }
.dash-ch-num[data-color="coral"] { background: var(--c-coral-light); color: var(--c-coral); }
.dash-ch-info {
  min-width: 0;
}
.dash-ch-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-ch-sub {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}
.dash-ch-rate {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  flex-shrink: 0;
  width: 40px;
  text-align: right;
}
.dash-ch-bar {
  width: 60px;
  height: 6px;
  border-radius: 3px;
  background: var(--bg-tertiary);
  overflow: hidden;
  flex-shrink: 0;
}
.dash-ch-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--c-blue), var(--c-teal));
  transition: width 0.5s ease;
}

/* 测验成绩列表 */
.dash-quiz-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dash-quiz-item {
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}
.dash-quiz-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.dash-quiz-ch {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}
.dash-quiz-ch[data-color="blue"] { background: var(--c-blue-light); color: var(--c-blue); }
.dash-quiz-ch[data-color="teal"] { background: var(--c-teal-light); color: var(--c-teal); }
.dash-quiz-ch[data-color="purple"] { background: var(--c-purple-light); color: var(--c-purple); }
.dash-quiz-ch[data-color="amber"] { background: var(--c-amber-light); color: var(--c-amber); }
.dash-quiz-ch[data-color="coral"] { background: var(--c-coral-light); color: var(--c-coral); }
.dash-quiz-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}
.dash-quiz-score {
  font-size: 14px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 12px;
}
.dash-quiz-score.good { background: var(--c-teal-light); color: var(--success); }
.dash-quiz-score.ok { background: var(--c-amber-light); color: var(--warning); }
.dash-quiz-score.bad { background: var(--c-coral-light); color: var(--danger); }
.dash-quiz-meta {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 6px;
}
.dash-empty {
  padding: 24px;
  text-align: center;
  font-size: 14px;
  color: var(--text-tertiary);
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius);
}

/* 操作按钮 */
.dash-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}
.dash-btn {
  flex: 1;
  height: 42px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}
.dash-btn:hover { border-color: var(--accent); }
.dash-btn-warn:hover { border-color: var(--warning); color: var(--warning); }
.dash-btn-logout:hover { border-color: var(--danger); color: var(--danger); }

/* ============================================================
   管理员专属样式
   ============================================================ */

/* 管理员按钮标识 */
.user-btn.admin-btn {
  background: linear-gradient(135deg, var(--c-purple), var(--c-blue));
  border-color: transparent;
  color: white;
}
.user-btn.admin-btn:hover {
  opacity: 0.92;
}
.user-avatar.admin-avatar {
  background: linear-gradient(135deg, var(--c-purple), var(--c-coral));
}
.admin-badge {
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(255,255,255,0.25);
  color: white;
  flex-shrink: 0;
}

/* 登录框管理员提示 */
.auth-admin-hint {
  display: none;
  margin-top: 14px;
  padding: 10px 14px;
  background: var(--c-blue-light);
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}
[data-theme="dark"] .auth-admin-hint {
  background: rgba(24,95,165,0.12);
}
.auth-admin-hint .hint-icon {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

/* 管理员面板头部 */
.dash-header.admin-header {
  flex-wrap: wrap;
}
.admin-avatar-lg {
  background: linear-gradient(135deg, var(--c-purple), var(--c-coral)) !important;
}

/* 管理员查看学生模式 */
.dash-back-bar {
  margin-bottom: 16px;
}
.dash-back-btn {
  padding: 6px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}
.dash-back-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.dash-view-badge {
  display: inline-block;
  padding: 4px 12px;
  margin-bottom: 16px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  background: var(--c-purple-light);
  color: var(--c-purple);
}
[data-theme="dark"] .dash-view-badge {
  background: rgba(83,74,183,0.15);
}

/* 学生列表表格 */
.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 680px;
}
.admin-table th {
  background: var(--bg-tertiary);
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
  font-size: 12px;
}
.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg-secondary); }

/* 学生信息单元格 */
.admin-student-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-student-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-blue), var(--c-teal));
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.admin-student-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
}
.admin-student-username {
  font-size: 12px;
  color: var(--text-tertiary);
}

.admin-cell-date {
  font-size: 12px;
  white-space: nowrap;
  color: var(--text-tertiary);
}

/* 迷你进度条 */
.admin-progress-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-mini-bar {
  width: 60px;
  height: 6px;
  border-radius: 3px;
  background: var(--bg-tertiary);
  overflow: hidden;
  flex-shrink: 0;
}
.admin-mini-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--c-blue), var(--c-teal));
  transition: width 0.4s ease;
}
.admin-progress-text {
  font-size: 12px;
  white-space: nowrap;
  color: var(--text-secondary);
}

/* 成绩标签 */
.admin-score-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
}
.admin-score-tag.good { background: var(--c-teal-light); color: var(--success); }
.admin-score-tag.ok { background: var(--c-amber-light); color: var(--warning); }
.admin-score-tag.bad { background: var(--c-coral-light); color: var(--danger); }
.admin-score-tag.none { background: var(--bg-tertiary); color: var(--text-tertiary); }
[data-theme="dark"] .admin-score-tag.good { background: rgba(15,110,86,0.15); }
[data-theme="dark"] .admin-score-tag.ok { background: rgba(133,79,11,0.15); }
[data-theme="dark"] .admin-score-tag.bad { background: rgba(153,60,29,0.15); }

/* 操作按钮 */
.admin-action-btn {
  padding: 5px 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  margin-right: 6px;
}
.admin-action-btn:hover { border-color: var(--accent); }
.admin-view-btn:hover { border-color: var(--accent); color: var(--accent); }
.admin-delete-btn:hover { border-color: var(--danger); color: var(--danger); }

/* 管理员说明框 */
.admin-notice {
  margin-top: 24px;
  padding: 16px 20px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  border-left: 3px solid var(--c-purple);
}
[data-theme="dark"] .admin-notice {
  background: rgba(83,74,183,0.08);
}
.admin-notice-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.admin-notice ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.admin-notice li {
  position: relative;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
  padding-left: 16px;
}
.admin-notice li::before {
  content: '\2022';
  position: absolute;
  left: 4px;
  color: var(--c-purple);
  font-weight: 700;
}

/* ---- 管理员面板响应式 ---- */
@media (max-width: 768px) {
  .admin-table { min-width: 580px; }
  .dash-header.admin-header { gap: 12px; }
  .admin-student-avatar { width: 28px; height: 28px; font-size: 12px; }
  .admin-mini-bar { width: 40px; }
}

@media (max-width: 480px) {
  .admin-table { min-width: 480px; font-size: 12px; }
  .admin-table th, .admin-table td { padding: 8px 10px; }
  .admin-action-btn { padding: 4px 8px; font-size: 11px; }
}

/* ---- 知识点已读标记 ---- */
.kp-card.visited .kp-header h3::after {
  content: '\2713 已学';
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 10px;
  background: var(--c-teal-light);
  color: var(--success);
}

/* ---- 章节测验成绩标记 ---- */
.quiz-section .quiz-result-banner {
  display: none;
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.quiz-section .quiz-result-banner.show { display: block; }
.quiz-result-banner.passed {
  background: var(--c-teal-light);
  color: var(--success);
}
.quiz-result-banner.failed {
  background: var(--c-amber-light);
  color: var(--warning);
}

/* ---- 响应式（新增部分） ---- */
@media (max-width: 768px) {
  .user-btn .user-name { display: none; }
  .user-btn { padding: 0 8px; }

  .dash-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dash-ch-bar { display: none; }
  .dash-ch-rate { width: auto; }

  .auth-box { padding: 28px 20px 20px; }
  .dash-box { padding: 24px 16px; }
}

@media (max-width: 480px) {
  .user-btn { height: 32px; }
  .user-avatar { width: 22px; height: 22px; font-size: 11px; }
  .dash-stats-grid { gap: 8px; }
  .dash-stat-main { font-size: 20px; }
}

/* ==================== 新增：修改密码 & 异步加载样式 ==================== */

/* ---- 修改密码按钮（蓝紫色主色调） ---- */
.dash-btn-primary {
  border-color: var(--c-purple);
  color: var(--c-purple);
  background: var(--c-purple-light);
}
.dash-btn-primary:hover {
  background: var(--c-purple);
  color: #fff;
  border-color: var(--c-purple);
}
[data-theme="dark"] .dash-btn-primary {
  background: rgba(83,74,183,0.15);
}
[data-theme="dark"] .dash-btn-primary:hover {
  background: var(--c-purple);
  color: #fff;
}

/* ---- 管理员头部按钮组 ---- */
.dash-header-btns {
  display: flex;
  gap: 8px;
  align-self: flex-start;
  flex-wrap: wrap;
}
.dash-header-btns .dash-btn {
  padding: 0 16px;
  height: 36px;
  font-size: 13px;
}

/* ---- 管理员重置密码按钮 ---- */
.admin-reset-btn {
  border-color: var(--c-amber);
  color: var(--warning);
}
.admin-reset-btn:hover {
  background: var(--c-amber);
  color: #fff;
  border-color: var(--c-amber);
}
[data-theme="dark"] .admin-reset-btn {
  background: rgba(245,158,11,0.12);
}

/* ---- 异步加载状态 ---- */
.dash-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 16px;
}
.dash-loading p {
  font-size: 14px;
  color: var(--text-secondary);
}
.dash-loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: dash-spin 0.8s linear infinite;
}
@keyframes dash-spin {
  to { transform: rotate(360deg); }
}

/* ---- 加载失败状态 ---- */
.dash-error {
  padding: 40px 20px;
  text-align: center;
  color: var(--danger);
  font-size: 14px;
}

/* ---- 认证模态框提交按钮 disabled 状态 ---- */
.auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---- 管理员面板表格行 hover ---- */
.admin-table tbody tr {
  transition: background 0.15s;
}
.admin-table tbody tr:hover {
  background: var(--bg-tertiary);
}
[data-theme="dark"] .admin-table tbody tr:hover {
  background: rgba(255,255,255,0.03);
}
