/* ==================== 设计令牌(Design Tokens) ==================== */
:root {
  /* 主色系 */
  --primary: #1a3a6b;
  --primary-light: #2a5298;
  --primary-dark: #0f2444;
  --primary-bg: #e8f0fe;
  --primary-border: #b8d4fe;

  /* 强调色 */
  --accent: #d4a843;
  --accent-light: #f0d68a;
  --accent-bg: #fef9e7;

  /* 语义色 */
  --success: #27ae60;
  --success-bg: #e6f9ee;
  --warning: #f39c12;
  --warning-bg: #fef3e2;
  --danger: #e74c3c;
  --danger-bg: #fde8e8;
  --info: #3498db;
  --info-bg: #e8f4fd;

  /* 中性色 */
  --white: #ffffff;
  --bg: #f5f7fa;
  --bg-card: #ffffff;
  --bg-hover: #f8f9fb;
  --text: #2c3e50;
  --text-light: #7f8c8d;
  --text-muted: #bdc3c7;
  --border: #e8ecf1;
  --border-light: #f0f2f5;

  /* 圆角 */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-round: 50%;

  /* 阴影 */
  --shadow-sm: 0 1px 4px rgba(26,58,107,0.06);
  --shadow: 0 2px 12px rgba(26,58,107,0.08);
  --shadow-lg: 0 8px 30px rgba(26,58,107,0.12);
  --shadow-xl: 0 12px 40px rgba(26,58,107,0.16);

  /* 间距 */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 20px;
  --space-xxl: 24px;
  --space-xxxl: 32px;

  /* 字体 */
  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-md: 15px;
  --text-lg: 16px;
  --text-xl: 18px;
  --text-xxl: 20px;
  --text-xxxl: 24px;
  --text-hero: 28px;

  /* 过渡 */
  --transition: all 0.2s ease;
  --transition-slow: all 0.3s ease;

  /* 布局 */
  --navbar-height: 56px;
  --max-width: 1200px;
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
}

input {
  font-family: inherit;
  outline: none;
}

ul, ol {
  list-style: none;
}

/* ==================== 导航栏 ==================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1000;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-brand {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text);
  transition: var(--transition);
}

.nav-link:hover {
  background: var(--bg);
  color: var(--primary);
}

.nav-link.active {
  background: var(--primary);
  color: var(--white);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-role {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--accent-light);
  color: var(--primary);
  font-weight: 600;
}

.user-name {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

.btn-login {
  padding: 12px 28px;           /* 统一：6px20px → 12px28px */
  border-radius: 16px;             /* 统一大圆角 */
  background: var(--primary);
  color: var(--white);
  font-size: 16px;                /* 增大：14px → 16px */
  font-weight: 600;               /* 加粗：500 → 600 */
  transition: var(--transition);
}

.btn-login:hover {
  background: var(--primary-light);
}

.btn-logout {
  padding: 4px 12px;
  border-radius: 6px;
  background: transparent;
  color: var(--text-light);
  font-size: 13px;
  transition: var(--transition);
}

.btn-logout:hover {
  background: #fde8e8;
  color: var(--danger);
}

/* ==================== 主内容区 ==================== */
.page-container {
  margin-top: var(--navbar-height);
  min-height: calc(100vh - var(--navbar-height));
}

.page {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.page-header {
  padding: 16px 20px 0;
  margin-bottom: 24px;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-dark);
}

.page-desc {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 4px;
}

/* ==================== 卡片 ==================== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-dark);
}

.card-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ==================== 按钮系统 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px 28px;           /* 增大：10px24px → 12px28px */
  border-radius: 16px;             /* 统一大圆角，参照知识点分类按钮 */
  font-size: 16px;                /* 统一：15px → 16px */
  font-weight: 600;               /* 加粗：500 → 600，更醒目 */
  transition: var(--transition);
  cursor: pointer;
  border: none;
  text-align: center;
  line-height: 1.4;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-light);
  box-shadow: var(--shadow-sm);
}

.btn-primary:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  box-shadow: none;
}

.btn-warning {
  background: var(--accent);
  color: var(--white);
}

.btn-warning:hover {
  background: #c49a3a;
  box-shadow: var(--shadow-sm);
}

.btn-warning:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
}

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

.btn-secondary:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-accent {
  background: var(--accent);
  color: var(--white);
}

.btn-accent:hover {
  opacity: 0.9;
  filter: brightness(1.05);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
}

.btn-danger:hover {
  opacity: 0.85;
}

.btn-success {
  background: var(--success);
  color: var(--white);
}

.btn-success:hover {
  opacity: 0.9;
}

.btn-sm {
  padding: 12px 28px;           /* 统一为标准按钮大小 */
  font-size: 16px;                /* 统一为标准按钮大小 */
  border-radius: 16px;             /* 统一为标准按钮圆角 */
}

.btn-lg {
  padding: 12px 32px;
  font-size: var(--text-lg);
}

.btn-block {
  width: 100%;
}

/* 讲授按钮（答题页题目底部，白底蓝边风格，与 .btn-secondary 一致） */
.btn-lecture {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 12px 28px;
  background: var(--white);
  color: var(--primary);
  font-size: 16px;
  font-weight: 600;
  border: 1px solid var(--primary);
  border-radius: 16px;
  cursor: pointer;
  transition: var(--transition);
  margin: 20px 0 0;
}

.btn-lecture:hover {
  background: var(--primary);
  color: var(--white);
}

/* ==================== 表单 ==================== */
.form-group {
  margin-bottom: 16px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-input {
  width: 100%;
  box-sizing: border-box;
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,58,107,0.1);
}

.form-input::placeholder {
  color: var(--text-muted);
}

textarea.form-input {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

/* ==================== 标签系统 ==================== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 2px 10px;
  border-radius: 10px;
  font-size: var(--text-xs);
  font-weight: 500;
  line-height: 1.4;
}

.tag-blue {
  background: var(--primary-bg);
  color: var(--primary);
}

.tag-green {
  background: var(--success-bg);
  color: var(--success);
}

.tag-orange {
  background: var(--warning-bg);
  color: var(--warning);
}

.tag-red {
  background: var(--danger-bg);
  color: var(--danger);
}

.tag-accent {
  background: var(--accent-bg);
  color: var(--accent);
}

/* ==================== 登录弹窗 ==================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 400px;
  max-width: 90vw;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  color: var(--text-light);
  background: none;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text);
}

.modal-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary-dark);
  text-align: center;
  margin-bottom: 24px;
}

.login-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.login-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-size: 14px;
  color: var(--text-light);
  background: none;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.login-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.login-panel {
  display: none;
}

.login-panel.active {
  display: block;
}

.btn-code {
  padding: 10px 16px;
  background: var(--bg);
  color: var(--primary);
  border-radius: var(--radius);
  font-size: 13px;
  white-space: nowrap;
  transition: var(--transition);
}

.btn-code:hover {
  background: var(--border);
}

.btn-code:disabled {
  color: var(--text-muted);
  cursor: not-allowed;
}

.wechat-placeholder {
  text-align: center;
  padding: 30px 0;
}

.wechat-icon {
  margin-bottom: 16px;
}

.wechat-text {
  font-size: 16px;
  color: var(--text);
  margin-bottom: 8px;
}

.wechat-hint {
  font-size: 13px;
  color: var(--text-muted);
}

/* ==================== 首页 ==================== */
.home-hero {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
  border-radius: var(--radius-lg);
  padding: 40px 30px;
  color: var(--white);
  text-align: center;
  margin-bottom: 24px;
}

.home-hero h1 {
  font-size: var(--text-hero);
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.home-hero p {
  font-size: var(--text-md);
  opacity: 0.9;
  margin-bottom: 24px;
}

.home-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-xxl);
  margin-bottom: 24px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent-light);
}

.stat-label {
  font-size: var(--text-sm);
  opacity: 0.8;
  margin-top: var(--space-xs);
}

.home-modules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.home-module-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.home-module-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.home-module-card .module-icon {
  font-size: 36px;
  margin-bottom: var(--space-md);
}

.home-module-card .module-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: var(--space-xs);
}

.home-module-card .module-desc {
  font-size: var(--text-sm);
  color: var(--text-light);
}

/* ==================== 专题列表 ==================== */
.subject-tabs-bar {
  display: flex;
  gap: 0;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  -webkit-overflow-scrolling: touch;
  flex-shrink: 0;
}

.subject-tab-item {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 8px;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  position: relative;
}

.subject-tab-item:hover {
  background: var(--bg);
}

.subject-tab-item.active {
  background: #f0f5ff;
  border-bottom-color: var(--primary);
}

.subject-tab-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.subject-tab-item.active .subject-tab-icon {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(26,58,107,0.3);
}

.subject-tab-count {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.subject-tab-item.active .subject-tab-count {
  color: var(--primary);
  font-weight: 600;
}

.subject-tab-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-light);
}

.subject-tab-item.active .subject-tab-name {
  color: var(--primary);
  font-weight: 600;
}

.subject-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-xxl);
  box-shadow: var(--shadow);
  margin-bottom: var(--space-xl);
}

.subject-page-name {
  font-size: var(--text-xxl);
  font-weight: 700;
  color: var(--primary-dark);
}

.subject-page-progress {
  font-size: var(--text-base);
  color: var(--text-light);
  margin-top: var(--space-xs);
}

.subject-section {
  margin-bottom: 28px;
}

.subject-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 2px solid var(--primary);
}

.subject-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  font-weight: 700;
}

.subject-name {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--primary-dark);
}

.subject-count {
  font-size: var(--text-sm);
  color: var(--text-light);
  margin-left: auto;
}

.topic-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

.topic-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: var(--space-lg) var(--space-xl);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  cursor: pointer;
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.topic-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
  border-left-color: var(--primary);
}

.topic-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.topic-index {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-round);
  background: var(--bg);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 600;
  flex-shrink: 0;
}

.topic-item.completed .topic-index {
  background: var(--success);
  color: var(--white);
}

.topic-info {
  flex: 1;
  min-width: 0;
}

.topic-name {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-xs);
}

.topic-desc {
  font-size: var(--text-sm);
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topic-status {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.topic-arrow {
  color: var(--text-muted);
  font-size: var(--text-lg);
}

/* ==================== 讲授页 ==================== */
.lecture-layout {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  padding: 0 20px;            /* 新增：与 page-header 的 20px 左padding 对齐 */
}

.lecture-tabs {
  display: flex;
  gap: 0;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.lecture-tab {
  flex: 1;
  padding: var(--space-lg) var(--space-xl);
  text-align: center;
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-light);
  background: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.lecture-tab.active {
  background: var(--primary);
  color: var(--white);
}

.lecture-content {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow);
  line-height: var(--leading-relaxed, 1.8);
  font-size: var(--text-base);
}

.lecture-content h3 {
  font-size: var(--text-xl);
  color: var(--primary-dark);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border);
}

.lecture-content p {
  margin-bottom: var(--space-md);
}

.lecture-content .highlight {
  background: var(--accent-bg);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-weight: 500;
}

.lecture-content .law-ref {
  background: var(--primary-bg);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  color: var(--primary);
  font-size: var(--text-sm);
}

.lecture-edit-area {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow);
}

.lecture-edit-area textarea {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: var(--text-sm);
  line-height: var(--leading-normal, 1.6);
}

.lecture-nav {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-xl);
}

/* ==================== 答题页 ==================== */
.exam-header {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-xl);
  box-shadow: var(--shadow);
  margin-bottom: var(--space-xl);
}

/* ==================== 答题页 v18 - 题目列表模式 ==================== */
.exam-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: 0;                  /* 修正：无padding，让 card 内容在 20px 处与返回按钮对齐 */
  align-items: flex-start;     /* 防止按钮被拉伸为全宽 */
}

.exam-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-xl);   /* 增加左右padding，文字不再贴边 */
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}
.exam-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}
.exam-card.status-pass {
  border-left: 4px solid var(--success);
}
.exam-card.status-fail {
  border-left: 4px solid var(--danger);
}
.exam-card.status-todo {
  border-left: 4px solid var(--border);
}

.exam-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
}

.exam-card-title {
  font-size: var(--text-md);
  font-weight: 500;
  color: var(--text);
  margin-bottom: var(--space-sm);
  line-height: 1.6;              /* 增大行高，更舒服 */
  display: -webkit-box;
  -webkit-line-clamp: 2;         /* 最多显示2行 */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.exam-card-status {
  font-size: var(--text-sm);
  color: var(--text-light);
}

.exam-card-footer {
  display: flex;
  gap: var(--space-lg);
  font-size: var(--text-sm);
  color: var(--text-light);
  padding-top: var(--space-sm);  /* 与标题间距 */
}

.exam-question-detail {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow);
  margin-bottom: var(--space-xl);
}

.result-brief {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow);
  margin-bottom: var(--space-xl);
}

.result-brief-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.score-badge {
  font-size: var(--text-xxxl);
  font-weight: 700;
}
.score-badge.pass {
  color: var(--success);
}
.score-badge.fail {
  color: var(--danger);
}

@media (max-width: 640px) {
  .exam-card { padding: var(--space-md) var(--space-lg); }
  .exam-question-detail { padding: var(--space-lg); }
  .result-brief { padding: var(--space-lg); }
}

.progress-bar {
  flex: 1;
  height: var(--space-sm);
  background: var(--bg);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-sm);
  transition: width 0.4s ease;
}

.progress-text {
  font-size: var(--text-sm);
  color: var(--text-light);
  white-space: nowrap;
}

.exam-question {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow);
  margin-bottom: var(--space-xl);
}

.question-number {
  font-size: var(--text-sm);
  color: var(--primary);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.question-text {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed, 1.8);
  color: var(--text);
  margin-bottom: var(--space-lg);
}

.question-type {
  display: inline-block;
  margin-bottom: var(--space-md);
}

.answer-area {
  margin-top: var(--space-md);
}

.answer-textarea {
  width: 100%;
  min-height: 200px;
  padding: var(--space-lg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: var(--text-base);
  line-height: var(--leading-normal, 1.6);
  resize: vertical;
  transition: var(--transition);
  font-family: inherit;
}

.answer-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,58,107,0.1);
  outline: none;
}

.exam-actions {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
}

/* ==================== 多小问：题干 & 小问导航 ==================== */
.exam-stem {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-lg) var(--space-xl);
  margin-bottom: var(--space-xl);
}

.stem-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-sm);
}

.stem-content {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed, 1.8);
  color: var(--text);
}

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* 管理端小问卡片 */
.question-block {
  margin-bottom: 0;
}

/* ==================== 多小问结果展示 ==================== */
.multi-result-summary {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow);
  margin-bottom: var(--space-xl);
  border-left: 4px solid var(--primary);
}

.multi-result-summary .result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 单小问结果卡片 */
.question-result-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow);
  margin-bottom: var(--space-lg);
  border: 1px solid var(--border);
}

.qr-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: var(--space-md);
  margin-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
  gap: var(--space-md);
}

.qr-title {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text);
  flex: 1;
  line-height: var(--leading-normal, 1.6);
}

.qr-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.qr-section {
  font-size: var(--text-base);
  line-height: var(--leading-normal, 1.6);
  color: var(--text);
}

.qr-section strong {
  color: var(--primary-dark);
}

/* 答案解析 */
.answer-result {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow);
  margin-bottom: var(--space-xl);
  border-left: 4px solid var(--primary);
}

.answer-result .result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.score-badge {
  font-size: var(--text-xxl);
  font-weight: 700;
  color: var(--primary);
}

.score-badge.pass {
  color: var(--success);
}

.score-badge.fail {
  color: var(--danger);
}

.standard-answer {
  margin-bottom: var(--space-lg);
}

.standard-answer h4 {
  font-size: var(--text-sm);
  color: var(--text-light);
  margin-bottom: var(--space-sm);
}

.standard-answer .answer-content {
  padding: var(--space-md);
  background: var(--bg);
  border-radius: var(--radius);
  font-size: var(--text-base);
  line-height: var(--leading-normal, 1.6);
}

.ai-comment {
  padding: var(--space-md);
  background: var(--primary-bg);
  border-radius: var(--radius);
  font-size: var(--text-base);
  line-height: var(--leading-normal, 1.6);
}

.ai-comment h4 {
  font-size: var(--text-sm);
  color: var(--primary);
  margin-bottom: var(--space-sm);
}

/* 详细批改结果 */
.ai-comment-card {
  background: var(--primary-bg);
  border-radius: var(--radius);
  padding: var(--space-lg) var(--space-xl);
  margin: var(--space-lg) 0;
  border-left: 4px solid var(--primary);
}
.ai-comment-title {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--primary);
  margin-bottom: var(--space-sm);
}
.ai-comment-body {
  font-size: var(--text-base);
  line-height: var(--leading-normal, 1.6);
  color: var(--text);
  white-space: pre-wrap;
}

.question-results-list {
  margin-top: var(--space-lg);
}

.question-result-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow);
  margin-bottom: var(--space-lg);
  border: 1px solid var(--border);
}

.question-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: var(--space-md);
  margin-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
}

.question-result-num {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text);
}

.question-result-section {
  margin-top: var(--space-md);
}

.question-result-section .section-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.question-result-section .section-body {
  font-size: var(--text-base);
  line-height: var(--leading-normal, 1.6);
  color: var(--text);
  white-space: pre-wrap;
}

.question-result-section .section-body.law-ref {
  background: var(--primary-bg);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  color: var(--text-light);
}

.hit-points-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.hit-point-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius);
  font-size: var(--text-base);
}

.hit-point-item.hit {
  background: var(--success-bg);
}

.hit-point-item.miss {
  background: var(--danger-bg);
}

.hit-point-item .hit-icon {
  font-size: var(--text-base);
  flex-shrink: 0;
  margin-top: var(--space-xs);
}

.hit-point-item .hit-name {
  flex: 1;
  color: var(--text);
}

.hit-point-item .hit-exp {
  font-size: var(--text-sm);
  color: var(--text-light);
  margin-left: var(--space-md);
}

/* 批改结果页 - 各类答案区域 */
.question-result-body .section-body.user-answer {
  background: var(--bg);
  border: 1px dashed var(--border);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius);
  font-size: var(--text-base);
  line-height: var(--leading-normal, 1.6);
  color: var(--text);
  min-height: 40px;
}

.question-result-body .section-body.ref-answer {
  background: var(--success-bg);
  border: 1px solid var(--success);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius);
  font-size: var(--text-base);
  line-height: var(--leading-normal, 1.6);
  color: var(--text);
  min-height: 40px;
}

.question-result-body .section-body.law-article {
  background: var(--accent-bg);
  border: 1px solid var(--accent);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  line-height: var(--leading-normal, 1.6);
  color: var(--text);
  font-family: "Noto Serif SC", "SimSun", "KaiTi", serif;
  min-height: 40px;
}

/* ==================== 成绩分析 ==================== */
.analysis-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.analysis-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow);
  text-align: center;
}

.analysis-card .card-value {
  font-size: var(--text-xxxl);
  font-weight: 700;
  color: var(--primary);
}

.analysis-card .card-label {
  font-size: var(--text-sm);
  color: var(--text-light);
  margin-top: var(--space-xs);
}

.analysis-card.accent .card-value {
  color: var(--accent);
}

.analysis-card.success .card-value {
  color: var(--success);
}

.score-detail-list {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow);
}

.score-detail-item {
  display: flex;
  align-items: center;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-light);
}

.score-detail-item:last-child {
  border-bottom: none;
}

.score-detail-item .item-name {
  flex: 1;
  font-size: var(--text-base);
}

.score-detail-item .item-score {
  width: 60px;
  text-align: center;
  font-weight: 600;
  font-size: var(--text-md);
}

.score-detail-item .item-result {
  width: 60px;
  text-align: right;
}

/* ==================== 答题记录 ==================== */
.history-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.history-stat {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow);
  text-align: center;
}

.history-stat .stat-value {
  font-size: var(--text-xxxl);
  font-weight: 700;
  color: var(--primary);
}

.history-stat .stat-value.success {
  color: var(--success);
}

.history-stat .stat-value.accent {
  color: var(--accent);
}

.history-stat .stat-label {
  font-size: var(--text-sm);
  color: var(--text-light);
  margin-top: var(--space-xs);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.history-group {
  margin-bottom: var(--space-lg);
}

.history-group-title,
.wrong-group-title {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--primary);
  padding: var(--space-sm) 0 var(--space-xs);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-sm);
}

.wrong-group {
  margin-bottom: var(--space-lg);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
  border: none;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: var(--text-base);
  transition: var(--transition);
}
.btn-danger:hover {
  opacity: 0.85;
}
.btn-sm.btn-danger {
  /* 保留红色，大小圆角继承 .btn-sm（标准按钮尺寸） */
}

.history-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

.history-card.pass {
  border-left: 4px solid var(--success);
}

.history-card.fail {
  border-left: 4px solid var(--danger);
}

.history-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg) var(--space-xl);
  cursor: pointer;
  transition: var(--transition);
}

.history-card-header:hover {
  background: var(--bg-hover);
}

.history-card-info {
  flex: 1;
  min-width: 0;
}

.history-card-review {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: var(--space-xs);
}

.history-card-meta {
  font-size: var(--text-sm);
  color: var(--text-light);
  margin-top: var(--space-xs);
}

.history-card-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-shrink: 0;
}

.history-card-score {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--primary);
}

.history-toggle {
  font-size: var(--text-sm);
  color: var(--text-light);
  width: var(--space-xl);
  text-align: center;
}

.history-card-detail {
  padding: var(--space-lg) var(--space-xl);
  border-top: 1px solid var(--border);
  background: var(--bg-hover);
}

.history-detail-questions {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.history-detail-q {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: var(--space-md);
  border: 1px solid var(--border);
}

.hdq-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
}

.hdq-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
}

.hdq-content {
  font-size: var(--text-sm);
  color: var(--text-light);
  line-height: var(--leading-normal, 1.6);
}

.history-detail-section {
  margin-bottom: var(--space-md);
}

.history-detail-section:last-child {
  margin-bottom: 0;
}

.history-detail-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--primary);
  margin-bottom: var(--space-xs);
}

.history-detail-text {
  font-size: var(--text-base);
  line-height: var(--leading-normal, 1.6);
  color: var(--text);
}

/* ==================== 记忆卡片 ==================== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.memory-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.memory-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.memory-card .card-topic {
  font-size: var(--text-xs);
  color: var(--primary);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.memory-card .card-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-sm);
}

.memory-card .card-body {
  font-size: var(--text-sm);
  color: var(--text-light);
  line-height: var(--leading-normal, 1.6);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.memory-card .card-tag {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
}

/* 卡片翻转 */
.memory-card.flipped {
  perspective: 1000px;
}

.memory-card .card-front,
.memory-card .card-back {
  backface-visibility: hidden;
}

/* ==================== 管理员页面 ==================== */
.admin-layout {
  display: flex;
  gap: 0;
  min-height: calc(100vh - var(--navbar-height));
}

.admin-sidebar {
  width: 220px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: var(--space-xl) 0;
  flex-shrink: 0;
}

.admin-menu-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-xl);
  font-size: var(--text-base);
  color: var(--text);
  transition: var(--transition);
  cursor: pointer;
}

.admin-menu-item:hover {
  background: var(--bg-hover);
}

.admin-menu-item.active {
  background: var(--primary);
  color: var(--white);
}

.admin-menu-item .menu-icon {
  width: var(--space-xl);
  text-align: center;
}

.admin-main {
  flex: 1;
  padding: var(--space-xl);
  background: var(--bg);
  overflow-y: auto;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
}

.admin-search {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.admin-search input {
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: var(--text-base);
  width: 260px;
}

.admin-table {
  width: 100%;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.admin-table table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-light);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: var(--space-md) var(--space-lg);
  font-size: var(--text-base);
  border-bottom: 1px solid var(--border-light);
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background: var(--bg-hover);
}

/* ==================== 空状态 ==================== */
.empty-state {
  text-align: center;
  padding: var(--space-xxxl) var(--space-xl);
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: var(--space-lg);
}

.empty-state .empty-title {
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--text-light);
  margin-bottom: var(--space-sm);
}

.empty-state .empty-desc {
  font-size: var(--text-base);
}

/* ==================== 加载动画 ==================== */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xxxl);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: var(--radius-round);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==================== 消息提示 ==================== */
.toast {
  position: fixed;
  top: var(--navbar-height);
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: var(--primary-dark);
  color: var(--white);
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius);
  font-size: var(--text-base);
  z-index: 3000;
  opacity: 0;
  transition: var(--transition);
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  background: var(--success);
}

.toast.error {
  background: var(--danger);
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
  .navbar {
    padding: 0 var(--space-lg);
  }

  .nav-links {
    gap: 0;
  }

  .nav-link {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-sm);
  }

  .page {
    padding: var(--space-lg);
  }

  .home-hero {
    padding: 28px var(--space-lg);
  }

  .home-hero h1 {
    font-size: var(--text-xxl);
  }

  .home-stats {
    gap: var(--space-xl);
  }

  .stat-number {
    font-size: var(--text-xxxl);
  }

  .home-modules {
    grid-template-columns: 1fr 1fr;
  }

  .analysis-summary {
    grid-template-columns: 1fr;
  }

  .modal {
    padding: var(--space-xl) var(--space-lg);
    margin: 0 var(--space-lg);
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  /* 管理员页面移动端适配为上下布局 */
  .admin-layout {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: var(--space-md) 0;
    display: flex;
    overflow-x: auto;
  }

  .admin-menu-item {
    padding: var(--space-md) var(--space-lg);
    white-space: nowrap;
    font-size: var(--text-sm);
  }

  .admin-main {
    padding: var(--space-lg);
  }

  .admin-search input {
    width: 160px;
  }

  .admin-table {
    overflow-x: auto;
  }

  .exam-actions {
    flex-direction: column;
  }
}

/* ==================== 错题本 ==================== */
.wrong-filters {
  display: flex;
  gap: 0;
  background: var(--white);
  border-radius: var(--radius);
  overflow-x: auto;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  -webkit-overflow-scrolling: touch;
}

.wrong-filter-tab {
  flex-shrink: 0;
  padding: 10px 18px;
  font-size: 13px;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.wrong-filter-tab:hover {
  color: var(--primary);
  background: var(--bg);
}

.wrong-filter-tab.active {
  color: var(--primary);
  font-weight: 600;
  border-bottom-color: var(--primary);
}

.wrong-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wrong-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
  border-left: 4px solid var(--danger);
}

.wrong-card:hover {
  box-shadow: var(--shadow-lg);
}

.wrong-card.reviewed {
  border-left-color: var(--success);
  opacity: 0.85;
}

.wrong-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.wrong-card-id {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

.wrong-card-score {
  font-size: 18px;
  font-weight: 700;
}

.wrong-card-score.fail {
  color: var(--danger);
}

.wrong-card-kp {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.5;
}

.wrong-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.wrong-card-status {
  cursor: pointer;
  transition: var(--transition);
  padding: 2px 8px;
  border-radius: 4px;
}

.wrong-card-status:hover {
  background: var(--bg);
}

/* 错题展开详情 */
.wrong-card-detail {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.wrong-detail-section {
  margin-bottom: 14px;
}

.wrong-detail-section:last-child {
  margin-bottom: 0;
}

.wrong-detail-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 6px;
}

.wrong-detail-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  padding: 10px 14px;
  background: var(--bg);
  border-radius: var(--radius);
}

.wrong-my-answer {
  background: #fef2f2;
  border-left: 3px solid var(--danger);
}

.wrong-correct-answer {
  background: #f0fdf4;
  border-left: 3px solid var(--success);
}

.wrong-memory {
  background: #fffbeb;
  border-left: 3px solid var(--warning);
}

/* ==================== 错题重做 ==================== */
.wrong-original {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.wrong-original-header {
  padding: 10px 16px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--text-secondary);
  user-select: none;
}

.wrong-original-header:hover {
  background: var(--bg-hover);
}

.wrong-original-body {
  padding: 0 16px 16px;
  border-top: 1px solid var(--border);
}

.wrong-card .btn-sm {
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .wrong-filter-tab {
    padding: 8px 14px;
    font-size: 12px;
  }

  .wrong-card {
    padding: 14px 16px;
  }
}

/* ==================== 首页管理员入口 ==================== */
.admin-entry {
  margin-top: 40px;
  text-align: center;
}

.admin-entry-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  color: var(--text-muted);
  font-size: 13px;
}

.admin-entry-divider::before,
.admin-entry-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.admin-entry-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-card);
}

.admin-entry-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #f0f5ff;
}

/* ==================== 法条检索页 ==================== */
.law-page {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--navbar-height));
  overflow: hidden;
}

.law-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: 12px;
  flex-wrap: wrap;
}

.law-toolbar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--primary-dark);
}

.law-toolbar-icon {
  font-size: 18px;
}

.law-toolbar-source {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 4px;
}

.law-toolbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.law-iframe-wrapper {
  flex: 1;
  position: relative;
  background: var(--bg);
  overflow: hidden;
}

.law-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: var(--white);
}

.law-iframe-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background: var(--bg);
}

.law-fallback-content {
  text-align: center;
  padding: 40px 20px;
  max-width: 400px;
}

.law-fallback-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.law-fallback-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.law-fallback-desc {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .law-toolbar {
    padding: 8px 14px;
  }

  .law-toolbar-title {
    font-size: 14px;
  }

  .law-toolbar-source {
    display: none;
  }
}

/* ==================== 管理员专题管理 ==================== */
.admin-subject-tabs {
  display: flex;
  gap: 1px;
  background: var(--white);
  border-radius: var(--radius);
  overflow-x: auto;
  box-shadow: var(--shadow);
  flex-wrap: wrap;
  -webkit-overflow-scrolling: touch;
}

.admin-subject-tab {
  padding: 10px 20px;
  font-size: 14px;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  user-select: none;
}

.admin-subject-tab:hover {
  color: var(--primary);
  background: var(--bg);
}

.admin-subject-tab.active {
  color: var(--primary);
  font-weight: 600;
  border-bottom-color: var(--primary);
  background: #f0f5ff;
}

.admin-subject-tab .tab-count {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--bg);
  color: var(--text-light);
}

.admin-subject-tab.active .tab-count {
  background: var(--primary);
  color: var(--white);
}

.edit-input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 14px;
  color: var(--text);
  transition: var(--transition);
  background: transparent;
}

.edit-input:focus {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 2px rgba(26,58,107,0.08);
}

.edit-id {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 12px;
  color: var(--text-light);
}

.btn-danger-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 8px 16px;
  border-radius: 12px;
  border: 1px solid var(--danger);
  background: transparent;
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1.4;
}

.btn-danger-outline:hover {
  background: var(--danger);
  color: var(--white);
}

/* 拖拽排序 */
.drag-handle {
  cursor: grab;
  color: var(--text-muted);
  font-size: 16px;
  text-align: center;
  user-select: none;
  padding: 4px;
}

.drag-handle:active {
  cursor: grabbing;
}

.topic-drag-row.dragging {
  opacity: 0.4;
  background: #f0f5ff;
}

.topic-drag-row.drag-over {
  border-top: 2px solid var(--primary);
}

.admin-save-bar {
  position: sticky;
  bottom: 0;
  background: var(--white);
  padding: 16px 0;
  margin-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 768px) {
  .admin-subject-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-subject-tab {
    padding: 8px 14px;
    font-size: 13px;
  }

  .admin-save-bar {
    position: static;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    margin-top: 16px;
  }
}

@media (min-width: 1024px) {
  /* PC端优化 */
  .topic-list {
    grid-template-columns: 1fr 1fr;
  }

  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .home-modules {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ==================== 管理员卡片管理 ==================== */
.admin-card-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow);
  margin-bottom: 10px;
  transition: var(--transition);
}

.admin-card-item:hover {
  box-shadow: var(--shadow-lg);
}

.admin-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.admin-card-title {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-card-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.admin-card-body {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.6;
}

/* 筛选栏 */
.filter-bar {
  margin-bottom: 20px;
}

.filter-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.filter-tag {
  padding: 4px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--white);
  font-size: 12px;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
}

.filter-tag:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-tag.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.tag-gray {
  background: #e5e7eb !important;
  color: #6b7280 !important;
}

/* ==================== 知识点导航 ==================== */
/* 知识点导航标题 */
.kp-nav-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 0 4px;
}
.kp-nav-header-icon {
  font-size: 18px;
}
.kp-nav-header-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.5px;
}

.kp-nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.kp-nav-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--white);
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  text-align: left;
  min-height: 48px;
}

.kp-nav-item:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #f0f5ff;
}

.kp-nav-item.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(26,58,107,0.25);
}

.kp-nav-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(26,58,107,0.1);
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.kp-nav-item.active .kp-nav-num {
  background: rgba(255,255,255,0.3);
  color: var(--white);
}

.kp-nav-name {
  font-weight: 600;
  line-height: 1.5;
  flex: 1;
  word-break: break-all;
}

.kp-nav-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 12px;
  opacity: 0;
  transition: var(--transition);
  flex-shrink: 0;
  margin-top: 2px;
}

.kp-nav-item:hover .kp-nav-edit {
  opacity: 0.6;
}

.kp-nav-item:hover .kp-nav-edit:hover {
  opacity: 1;
  background: rgba(26,58,107,0.1);
}

.kp-nav-item.active .kp-nav-edit:hover {
  background: rgba(255,255,255,0.2);
}

.kp-nav-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--accent);
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-dark);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(212,168,67,0.3);
}

.kp-nav-add:hover {
  background: #e6c34a;
  box-shadow: 0 4px 14px rgba(212,168,67,0.45);
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .kp-nav {
    grid-template-columns: 1fr;
  }
}

/* ==================== 讲授管理栏 ==================== */
.lecture-admin-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

/* ==================== TinyMCE 编辑器容器 ==================== */
.tinymce-editor-wrapper {
  min-height: 300px;
}

.tinymce-editor-wrapper .tox-tinymce {
  border-radius: var(--radius);
  border-color: var(--border);
  font-family: inherit;
}

/* 编辑操作栏 */
.lecture-edit-bar {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ==================== 内容查看模式（非编辑） ==================== */
.content-rendered {
  line-height: 1.8;
  font-size: 15px;
  color: var(--text);
}

.content-body {
  padding: 0;
}

.content-body h1 { font-size: 22px; margin: 16px 0 10px; }
.content-body h2 { font-size: 19px; margin: 14px 0 8px; }
.content-body h3 { font-size: 17px; margin: 12px 0 6px; color: var(--primary-dark); }
.content-body h4 { font-size: 15px; margin: 10px 0 6px; }
.content-body p { margin-bottom: 12px; }
.content-body ul, .content-body ol { padding-left: 20px; margin-bottom: 12px; }
.content-body li { margin-bottom: 4px; }
.content-body blockquote {
  border-left: 4px solid var(--primary);
  padding: 10px 16px;
  margin: 12px 0;
  background: #f0f5ff;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.content-body pre {
  background: #f5f7fa;
  padding: 12px 16px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 13px;
}
.content-body img {
  max-width: 100%;
  border-radius: var(--radius);
  margin: 8px 0;
}
.content-body table {
  border-collapse: collapse;
  width: 100%;
  margin: 12px 0;
}
.content-body table td, .content-body table th {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
}
.content-body table th {
  background: var(--bg);
  font-weight: 600;
}
.content-body a { color: var(--primary); text-decoration: underline; }

/* ==================== 答题结果展示 ==================== */
.answer-result {
  margin-top: 20px;
  padding: 0;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.score-badge {
  font-size: 28px;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: 12px;
}

.score-badge.pass {
  background: #e8f5e9;
  color: #2e7d32;
}

.score-badge.fail {
  background: #fef2f2;
  color: #c62828;
}

/* 核心法条 */
.law-reference {
  background: #fef9e7;
  border-left: 4px solid #f39c12;
  padding: 10px 16px;
  margin: 12px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.law-reference h4 {
  font-size: 14px;
  color: #e67e22;
  margin-bottom: 6px;
}

.law-reference div {
  font-size: 14px;
  line-height: 1.6;
}

/* 法条原文 */
.law-article {
  background: #f8fafc;
  border: 1px solid var(--border);
  padding: 12px 16px;
  margin: 12px 0;
  border-radius: var(--radius);
}

.law-article h4 {
  font-size: 14px;
  color: var(--primary);
  margin-bottom: 6px;
}

.law-article .law-text {
  font-size: 13px;
  line-height: 1.8;
  color: var(--text);
  font-family: "Noto Serif SC", "SimSun", "KaiTi", serif;
}

/* AI点评 */
.ai-comment {
  background: #f0f5ff;
  padding: 12px 16px;
  margin: 12px 0;
  border-radius: var(--radius);
}

.ai-comment h4 {
  font-size: 14px;
  color: var(--primary-light);
  margin-bottom: 6px;
}

.ai-comment div {
  font-size: 14px;
  line-height: 1.8;
}

/* 逐点对照详情 */
.hit-points {
  margin: 12px 0;
}

.hit-points h4 {
  font-size: 14px;
  color: var(--primary);
  margin-bottom: 10px;
}

.hp-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hp-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.hp-score {
  margin-left: auto;
  font-size: 14px;
  color: var(--primary-light);
  font-weight: 600;
  white-space: nowrap;
}

.hp-reason {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.6;
  padding-left: 4px;
  border-left: 2px solid var(--border);
}

/* 标准答案 */
.standard-answer {
  background: #e8f5e9;
  padding: 12px 16px;
  margin: 12px 0;
  border-radius: var(--radius);
}

.standard-answer h4 {
  font-size: 14px;
  color: #2e7d32;
  margin-bottom: 6px;
}

.answer-content {
  font-size: 14px;
  line-height: 1.8;
}

/* ==================== 移动端补充适配（2026-05-23） ==================== */
@media (max-width: 768px) {
  /* 全局 */
  body {
    font-size: 14px;
  }

  /* 导航栏：允许横向滚动，防止链接溢出 */
  .navbar {
    padding: 0 10px;
  }
  .nav-left {
    gap: 8px;
  }
  .nav-brand {
    font-size: 16px;
    flex-shrink: 0;
  }
  .nav-links {
    gap: 0;
    overflow-x: auto;
    flex-shrink: 1;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar {
    display: none;
  }
  .nav-link {
    padding: 6px 8px;
    font-size: 12px;
    flex-shrink: 0;
    white-space: nowrap;
  }
  .nav-right {
    gap: 6px;
    flex-shrink: 0;
  }
  .user-name {
    display: none;
  }
  .user-role {
    display: none;
  }
  .btn-login {
    padding: 5px 12px;
    font-size: 12px;
  }
  .btn-logout {
    padding: 3px 8px;
    font-size: 12px;
  }

  /* 页面容器 */
  .page {
    padding: 12px 10px;
  }
  .page-title {
    font-size: 20px;
  }
  .page-desc {
    font-size: 13px;
  }

  /* 卡片 */
  .card {
    padding: 16px 14px;
  }
  .card-title {
    font-size: 15px;
  }

  /* 首页 */
  .home-hero {
    padding: 28px 16px;
    border-radius: var(--radius);
  }
  .home-hero h1 {
    font-size: 22px;
  }
  .home-hero p {
    font-size: 14px;
  }
  .home-stats {
    gap: 16px;
  }
  .stat-number {
    font-size: 24px;
  }
  .home-modules {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .home-module-card {
    padding: 20px 16px;
  }

  /* 专题列表 */
  .subject-tabs-bar {
    margin-bottom: 14px;
  }
  .subject-tab-item {
    padding: 10px 6px;
  }
  .subject-tab-icon {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }
  .subject-tab-name {
    font-size: 11px;
  }
  .subject-page-header {
    padding: 14px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .topic-item {
    padding: 14px 14px;
    gap: 10px;
  }
  .topic-name {
    font-size: 14px;
  }

  /* 讲授页 */
  .lecture-layout {
    gap: 14px;
  }
  .lecture-tabs {
    border-radius: var(--radius);
  }
  .lecture-tab {
    padding: 10px 8px;
    font-size: 13px;
  }
  .lecture-content {
    padding: 18px 14px;
    font-size: 14px;
  }
  .lecture-content h3 {
    font-size: 16px;
  }
  .lecture-edit-area {
    padding: 16px 14px;
  }
  .lecture-nav {
    flex-direction: column;
    gap: 10px;
  }
  .lecture-nav .btn-primary,
  .lecture-nav .btn-secondary {
    width: 100%;
  }

  /* 答题页 */
  .exam-header {
    padding: 14px 14px;
    border-radius: var(--radius);
  }
  .exam-question {
    padding: 18px 14px;
    border-radius: var(--radius);
  }
  .question-text {
    font-size: 14px;
  }
  .answer-textarea {
    min-height: 140px;
    font-size: 14px;
    padding: 12px;
  }
  .exam-actions {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;       /* 防止按钮被拉伸 */
  }

  /* 多小问 */
  .exam-stem {
    padding: 14px 14px;
    border-radius: var(--radius);
  }
  .stem-content {
    font-size: 14px;
  }
  .question-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .multi-result-summary {
    padding: 18px 14px;
    border-radius: var(--radius);
  }
  .question-result-card {
    padding: 16px 14px;
    border-radius: var(--radius);
  }
  .qr-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .qr-title {
    font-size: 14px;
  }

  /* 成绩分析 */
  .analysis-summary {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .analysis-card {
    padding: 16px 12px;
  }
  .analysis-card .card-value {
    font-size: 22px;
  }
  .score-detail-list {
    padding: 16px 14px;
    border-radius: var(--radius);
  }

  /* 答题记录 */
  .history-stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .history-stat {
    padding: 16px 12px;
  }
  .history-stat .stat-value {
    font-size: 22px;
  }
  .history-card-header {
    padding: 12px 14px;
  }
  .history-card-preview {
    font-size: 13px;
  }
  .history-card-detail {
    padding: 14px 14px;
  }
  .history-detail-q {
    padding: 10px 12px;
  }

  /* 错题本 */
  .wrong-filters {
    border-radius: var(--radius);
  }
  .wrong-filter-tab {
    padding: 8px 12px;
    font-size: 12px;
  }
  .wrong-list {
    gap: 10px;
  }
  .wrong-card {
    padding: 14px 14px;
    border-radius: var(--radius);
  }
  .wrong-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .wrong-card-detail {
    padding: 14px 12px;
  }
  .wrong-original-header {
    padding: 8px 12px;
  }
  .wrong-original-body {
    padding: 0 12px 12px;
  }

  /* 记忆卡片 */
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .memory-card {
    padding: 18px 14px;
  }

  /* 法条页 */
  .law-page {
    height: calc(100vh - var(--navbar-height));
  }
  .law-toolbar {
    padding: 8px 12px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .law-toolbar-title {
    font-size: 14px;
  }
  .law-toolbar-source {
    display: none;
  }

  /* 管理员页面 */
  .admin-layout {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
    display: flex;
    overflow-x: auto;
    flex-shrink: 0;
  }
  .admin-menu-item {
    padding: 8px 14px;
    white-space: nowrap;
    font-size: 13px;
    border-bottom: none;
    border-right: 2px solid transparent;
  }
  .admin-menu-item.active {
    border-right-color: var(--primary);
    border-bottom: none;
  }
  .admin-main {
    padding: 14px 12px;
  }
  .admin-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .admin-search {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .admin-search input {
    width: 100%;
  }
  .admin-table {
    overflow-x: auto;
    border-radius: var(--radius);
  }
  .admin-table table {
    min-width: 600px;
  }

  /* 管理员专题管理 */
  .admin-subject-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .admin-subject-tab {
    padding: 8px 12px;
    font-size: 13px;
    white-space: nowrap;
  }
  .admin-save-bar {
    position: static;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    margin-top: 16px;
    flex-direction: column;
    gap: 8px;
  }
  .admin-save-bar .btn-primary {
    width: 100%;
  }

  /* 模态框 */
  .modal {
    padding: 24px 18px;
    margin: 0 10px;
    border-radius: var(--radius);
  }
  .modal-title {
    font-size: 20px;
  }

  /* TinyMCE 编辑器 */
  .tinymce-editor-wrapper {
    min-height: 200px;
  }

  /* 表单 */
  .form-row {
    flex-direction: column;
    gap: 10px;
  }
  textarea.form-input {
    min-height: 100px;
  }

  /* Toast 提示 */
  .toast {
    top: 70px;
    font-size: 13px;
    padding: 8px 18px;
    max-width: 90vw;
  }
}

/* ==================== 系统管理首页 ==================== */
.admin-dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.admin-dashboard-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.admin-dashboard-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(26,54,93,0.12);
  transform: translateY(-2px);
}

.dashboard-card-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.dashboard-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.dashboard-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .admin-dashboard-cards {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .admin-dashboard-card {
    padding: 20px 14px;
  }
  .dashboard-card-icon {
    font-size: 28px;
  }
  .dashboard-card-title {
    font-size: 14px;
  }
}

/* ==================== 首页底部页脚 ==================== */
.home-footer {
  margin-top: 48px;
  padding: 24px 20px;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text-light);
  font-size: 13px;
  line-height: 2;
}

.home-footer a {
  color: var(--text-light);
  transition: var(--transition);
}

.home-footer a:hover {
  color: var(--primary);
}

.footer-links {
  margin-bottom: 4px;
}

.footer-divider {
  margin: 0 10px;
  color: var(--text-muted);
}

.footer-copyright {
  color: var(--text-muted);
}

.footer-icp {
  margin-top: 2px;
}

.footer-icp a {
  color: var(--text-muted);
}

/* ==================== 隐私政策 & 使用条款页面 ==================== */
.policy-content {
  max-width: 800px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  box-shadow: var(--shadow);
  line-height: 1.8;
  font-size: 14px;
  color: var(--text);
}

.policy-section {
  margin-bottom: 28px;
}

.policy-section:last-child {
  margin-bottom: 0;
}

.policy-section h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.policy-section h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-top: 14px;
  margin-bottom: 8px;
}

.policy-section p {
  margin-bottom: 10px;
  text-indent: 2em;
}

.policy-section ul,
.policy-section ol {
  margin: 8px 0 12px 0;
  padding-left: 2em;
}

.policy-section ul {
  list-style: disc;
}

.policy-section ol {
  list-style: decimal;
}

.policy-section li {
  margin-bottom: 6px;
  line-height: 1.7;
}

.policy-section a {
  color: var(--primary);
  text-decoration: underline;
}

/* ==================== 讲授页 - 知识点练习 & 综合考核 ==================== */

.kp-practice-section {
  margin-top: 20px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #f0f5ff 0%, #e8f0fe 100%);
  border: 1px solid #b8d4f0;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.kp-practice-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
}

.kp-practice-hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-light);
  margin-left: 8px;
}

.topic-comprehensive-section {
  margin-top: 28px;
}

.topic-comprehensive-divider {
  text-align: center;
  margin-bottom: 16px;
  position: relative;
}

.topic-comprehensive-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
  z-index: 0;
}

.topic-comprehensive-divider span {
  display: inline-block;
  padding: 6px 20px;
  background: var(--bg);
  border: 1.5px dashed var(--accent);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  position: relative;
  z-index: 1;
}

.topic-comprehensive-body {
  padding: 24px;
  background: linear-gradient(135deg, #fff7e6 0%, #fff2d8 100%);
  border: 1px solid #f0c060;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.topic-comprehensive-info p {
  margin: 0;
  font-size: 15px;
  color: var(--text);
  line-height: 1.7;
}

.topic-comprehensive-info p:first-child {
  font-weight: 600;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .kp-practice-section {
    flex-direction: column;
    text-align: center;
    gap: 12px;
    align-items: center;           /* 防止按钮被拉伸 */
  }
  .kp-practice-header {
    flex-direction: column;
  }
  .topic-comprehensive-body {
    flex-direction: column;
    text-align: center;
    gap: 16px;
    align-items: center;           /* 防止按钮被拉伸 */
  }
}

.policy-section a:hover {
  color: var(--primary-light);
}

@media (max-width: 768px) {
  .policy-content {
    padding: 20px 16px;
    font-size: 13px;
  }

  .home-footer {
    margin-top: 32px;
    padding: 20px 12px;
    font-size: 12px;
  }
}

/* ==================== 法考播客 ==================== */
.audio-podcast {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.audio-podcast-empty {
  border: 2px dashed var(--border);
}

.audio-podcast-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.audio-podcast-icon {
  font-size: 20px;
}

.audio-podcast-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-dark);
}

.audio-podcast-filename {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 4px;
}

.audio-podcast-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-left: 4px;
}

.audio-podcast-player audio {
  width: 100%;
  outline: none;
}

.audio-podcast-admin {
  margin-top: 12px;
  display: flex;
  align-items: center;
}

.audio-upload-label {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ==================== 三段式合并展示 ==================== */
.lecture-content-all {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.lecture-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.lecture-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--primary-lighter, #e8f0fe) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

.lecture-section-icon {
  font-size: 18px;
}

.lecture-section-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary-dark);
}

.lecture-section-body {
  padding: 20px 24px;
  line-height: 1.8;
  font-size: 15px;
}

.lecture-section-body h3 {
  font-size: 18px;
  color: var(--primary-dark);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.lecture-section-body p {
  margin-bottom: 12px;
}

.lecture-section-body .highlight {
  background: #fffbe6;
  padding: 2px 6px;
  border-radius: 4px;
  color: #d48806;
  font-weight: 500;
}

.lecture-section-body .law-ref {
  background: #e8f0fe;
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--primary);
  font-size: 13px;
}

.lecture-section-body .content-body {
  /* TinyMCE rendered content */
}

/* 编辑模式 */
.lecture-edit-all {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lecture-edit-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.lecture-edit-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--primary-lighter, #e8f0fe) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

.lecture-edit-bar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 0;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .audio-podcast {
    padding: 14px 16px;
  }

  .lecture-section-header {
    padding: 10px 16px;
  }

  .lecture-section-body {
    padding: 14px 16px;
    font-size: 14px;
  }

  .lecture-edit-section-header {
    padding: 10px 16px;
  }
}

/* 学科分组标题（答题记录/错题本） */
.history-subject-group,
.wrong-subject-group {
  margin-bottom: 24px;
}

.history-subject-title,
.wrong-subject-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
  padding: 14px 0 8px;
  border-bottom: 2px solid var(--primary-lighter);
  margin-bottom: 8px;
}

/* 首页底部时间戳认证提示 */
.footer-tsa {
  font-size: 12px;
  color: var(--primary);
  margin-top: 4px;
  letter-spacing: 1px;
}

/* 使用条款 - 版权表格 */
.policy-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 14px;
}
.policy-table th,
.policy-table td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
}
.policy-table th {
  background: var(--primary-bg);
  color: var(--primary-dark);
  font-weight: 600;
}
