/* ============================================
   试卷列表页 - 特有样式
   ============================================ */

body {
  font-family: var(--font-serif);
  background: #f5f5f0;
}

.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: background 0.3s, border-color 0.3s;
}

.top-bar-inner {
  width: 100%;
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.top-bar-left {
  flex: 1;
}

.site-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin: 0;
  letter-spacing: 2px;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.top-bar .theme-toggle {
  padding: 6px 12px;
  border: 1px solid var(--text-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
}

.top-bar .theme-toggle:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
}

.login-btn {
  padding: 6px 16px;
  border: 1px solid var(--text-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s;
}

.login-btn:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
}

.user-profile-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  text-decoration: none;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s;
}

.user-profile-link:hover {
  opacity: 0.8;
}

.user-area {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.login-btn {
  padding: 6px 14px;
  background: var(--text-primary);
  color: var(--bg-primary);
  border: none;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: opacity 0.2s;
}

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

.user-info {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s;
}

.user-info:hover {
  background: var(--bg-hover);
}

.mini-avatar {
  font-size: 1.2rem;
}

.user-name {
  font-size: 0.85rem;
  color: var(--text-primary);
}

.user-arrow {
  font-size: 0.6rem;
  color: var(--text-muted);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 160px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 200;
}

.user-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  padding: 10px 16px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: background 0.2s;
}

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

.dropdown-item.logout {
  color: #dc2626;
}

.dropdown-item.logout:hover {
  background: rgba(220, 38, 38, 0.1);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 6px 0;
}

/* ============================================
   页面头部
   ============================================ */
.header {
  text-align: center;
  padding: 40px 20px 30px;
  background: #fff;
  border-bottom: 2px solid #000;
}

.header h1 {
  font-size: 2rem;
  font-weight: bold;
  letter-spacing: 4px;
}

.header p {
  color: #666;
  margin-top: 8px;
  font-size: 0.95rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 86px 20px 30px;
}

/* ============================================
   一级分类
   ============================================ */
.level1-bar {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 2px solid #000;
}

.level1-btn {
  padding: 12px 32px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  font-weight: bold;
  position: relative;
  transition: all 0.2s;
}

.level1-btn:hover {
  background: #f0f0f0;
}

.level1-btn.active {
  background: #000;
  color: #fff;
}

/* ============================================
   二级分类：年份
   ============================================ */
.level2-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: nowrap;
  padding-left: 4px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
  cursor: grab;
}
.level2-bar:active {
  cursor: grabbing;
}

.level2-btn {
  padding: 6px 14px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.level2-btn:hover {
  border-color: #000;
}

.level2-btn.active {
  background: #000;
  color: #fff;
  border-color: #000;
}

/* ============================================
   试卷卡片网格
   ============================================ */
.exam-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.exam-row-spacer {
  grid-column: 1 / -1;
  height: 0;
}



.exam-card {
  background: #fff;
  border: 1px solid #ddd;
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.exam-card:hover {
  border-color: #000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.exam-download-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
  opacity: 0.6;
}

.exam-card:has(.new-badge) .exam-download-btn {
  right: 60px;
}

.exam-download-btn:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.05);
}

.exam-year {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 4px;
}

.exam-title {
  font-size: 1.15rem;
  font-weight: bold;
  margin-bottom: 12px;
}

.exam-meta {
  display: flex;
  gap: 12px;
  font-size: 0.85rem;
  color: #666;
}

.exam-tag {
  display: inline-block;
  padding: 2px 8px;
  background: #f0f0f0;
  font-size: 0.8rem;
}

.exam-stats {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #eee;
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: #666;
}

.new-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #000;
  color: #fff;
  padding: 2px 8px;
  font-size: 0.75rem;
}

.exam-type-tag {
  display: inline-block;
  padding: 2px 8px;
  background: #000;
  color: #fff;
  font-size: 0.75rem;
  margin-bottom: 8px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  font-size: 1rem;
  grid-column: 1 / -1;
}

/* ============================================
   搜索栏（内联展开式）
   ============================================ */
.search-bar-inline {
  flex-shrink: 0;
  margin-left: auto;
  position: relative;
}

.search-bar-inline .search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0;
  max-width: none;
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  transition:
    width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.2s ease,
    background 0.2s ease;
  overflow: hidden;
}

.search-bar-inline .search-input-wrap.expanded {
  width: 380px;
  border-color: #ccc;
  background: #fff;
}

.search-bar-inline .search-input-wrap.expanded:focus-within {
  border-color: #000;
}

#searchIconBtn {
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #333;
  cursor: pointer;
  z-index: 2;
  transition: color 0.2s;
}

.search-bar-inline .search-input-wrap.expanded #searchIconBtn {
  left: 8px;
  pointer-events: none;
  color: #888;
}

.search-input {
  width: 100%;
  height: 100%;
  padding: 0 32px 0 36px;
  font-size: 14px;
  border: none;
  background: transparent;
  color: #000;
  outline: none;
  opacity: 0;
  transition: opacity 0.2s ease 0.1s;
  cursor: pointer;
}

.search-bar-inline .search-input-wrap.expanded .search-input {
  opacity: 1;
  cursor: text;
}

.search-clear {
  position: absolute;
  right: 8px;
  width: 20px;
  height: 20px;
  border: none;
  background: #e0e0e0;
  border-radius: 50%;
  color: #666;
  font-size: 11px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 2;
}

.search-clear.visible {
  display: flex;
}

.search-clear:hover {
  background: #ccc;
}

.search-history-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 100;
  display: none;
  overflow: hidden;
}

.search-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
}

.search-history-label {
  font-size: 0.85rem;
  color: #666;
  font-weight: 500;
}

.search-history-clear {
  font-size: 0.75rem;
  color: #999;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
}

.search-history-clear:hover {
  color: #dc3545;
}

.search-history-list {
  max-height: 200px;
  overflow-y: auto;
}

.search-history-item {
  padding: 10px 12px;
  font-size: 0.9rem;
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.search-history-item:hover {
  background: #f5f5f5;
}

.search-history-keyword {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-history-delete {
  background: none;
  border: none;
  color: #999;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}

.search-history-item:hover .search-history-delete {
  opacity: 1;
}

.search-history-delete:hover {
  color: #dc3545;
  background: rgba(220, 53, 69, 0.1);
}

/* ============================================
   搜索结果区域
   ============================================ */
.search-results {
  margin-top: 20px;
}

.search-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px 16px;
  border-bottom: 1px solid #ddd;
  margin-bottom: 20px;
}

.search-results-title {
  font-size: 18px;
  font-weight: 600;
  color: #000;
  margin: 0;
}

.search-create-paper-btn {
  padding: 6px 16px;
  font-size: 13px;
  border: 1px solid #000;
  border-radius: 4px;
  background: #000;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
  margin-right: -690px;
}

.search-create-paper-btn:hover {
  background: #333;
}

.search-close-btn {
  padding: 6px 16px;
  font-size: 13px;
  border: 1px solid #000;
  border-radius: 4px;
  background: #fff;
  color: #000;
  cursor: pointer;
  transition: all 0.2s;
}

.search-close-btn:hover {
  background: #000;
  color: #fff;
}

/* 搜索加载 */
.search-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  min-height: 200px;
}

.search-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e0e0e0;
  border-top-color: #000;
  border-radius: 50%;
  animation: search-spin 0.8s linear infinite;
}

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

.search-loading-text {
  margin-top: 16px;
  font-size: 14px;
  color: #666;
}

/* ============================================
   搜索结果卡片（修复草稿模式按钮位置）
   ============================================ */
.result-question-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin: 0 16px 20px;
  padding: 20px;
  transition: border-color 0.2s ease;
  position: relative;
}

.result-question-card:hover {
  border-color: #000;
}

/* 修复：草稿模式按钮 - 放在右上角答案按钮左侧 */
.result-draft-toggle {
  position: absolute;
  top: 16px;
  right: 100px;
  padding: 4px 12px;
  font-size: 12px;
  border: 1px solid #000;
  border-radius: 4px;
  background: #fff;
  color: #000;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
  z-index: 10;
}

.result-favorite-btn {
  position: absolute;
  top: 16px;
  right: 200px;
  padding: 4px;
  font-size: 16px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  color: #999;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.result-favorite-btn:hover {
  color: #f59e0b;
  transform: scale(1.1);
}

.result-favorite-btn.active {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
}

.result-answer-toggle {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 4px 12px;
  font-size: 12px;
  border: 1px solid #000;
  border-radius: 4px;
  background: #fff;
  color: #000;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
  z-index: 10;
}

.result-answer-toggle:hover,
.result-draft-toggle:hover,
.result-answer-toggle.active {
  background: #000;
  color: #fff;
}

.result-question-source {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  padding-right: 180px; /* 为两个按钮留出空间 */
}

.result-source-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 12px;
  border-radius: 4px;
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
}

.result-source-badge.exam-name {
  border-color: #000;
  background: #000;
  color: #fff;
}

.result-question-content {
  font-size: 15px;
  line-height: 1.7;
  color: #000;
  margin-bottom: 12px;
}

.result-question-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
  margin-top: 12px;
}

.result-option {
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 4px;
  background: #f5f5f5;
  color: #000;
  border: 1px solid transparent;
}

.result-question-card.answer-visible .result-option[data-correct="true"] {
  background: #000;
  color: #fff;
  font-weight: 500;
}

.result-answer-section {
  display: none;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

.result-answer-section.visible {
  display: block;
}

.result-answer-label {
  font-size: 13px;
  font-weight: 600;
  color: #000;
  margin-bottom: 6px;
  display: block;
}

.result-answer-body {
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  padding-left: 12px;
  border-left: 2px solid #ddd;
}

.result-view-btn {
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid #000;
  border-radius: 4px;
  background: #fff;
  color: #000;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.result-view-btn:hover {
  background: #000;
  color: #fff;
}

.search-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

/* ============================================
   暗色主题适配
   ============================================ */
[data-theme="dark"] body {
  background: #1a1a1a;
}

[data-theme="dark"] .top-bar {
  background: #161b22;
  border-bottom-color: #30363d;
}

[data-theme="dark"] .site-title,
[data-theme="dark"] .user-name {
  color: #e8e8e8;
}

[data-theme="dark"] .login-btn,
[data-theme="dark"] .top-bar .theme-toggle {
  border-color: #8b949e;
  color: #e8e8e8;
}

[data-theme="dark"] .login-btn:hover,
[data-theme="dark"] .top-bar .theme-toggle:hover {
  background: #e8e8e8;
  color: #000;
}

[data-theme="dark"] .mini-avatar {
  background: #30363d;
}

[data-theme="dark"] .user-profile-link {
  color: #e8e8e8;
}

[data-theme="dark"] .dropdown-menu {
  background: #21262d;
  border-color: #30363d;
}

[data-theme="dark"] .dropdown-item {
  color: #e8e8e8;
}

[data-theme="dark"] .dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .dropdown-item.logout-item {
  color: #f87171;
}

[data-theme="dark"] .dropdown-item.logout-item:hover {
  background: rgba(248, 113, 113, 0.15);
}

[data-theme="dark"] .header {
  background: #1a1a1a;
  border-bottom-color: #444;
}

[data-theme="dark"] .header h1,
[data-theme="dark"] .exam-title,
[data-theme="dark"] .result-question-content,
[data-theme="dark"] .search-results-title {
  color: #e8e8e8;
}

[data-theme="dark"] .exam-card,
[data-theme="dark"] .result-question-card {
  background: #222;
  border-color: #444;
}

[data-theme="dark"] .level2-btn {
  background: #222;
  border-color: #555;
  color: #e8e8e8;
}

[data-theme="dark"] .search-input {
  color: #e8e8e8;
}

[data-theme="dark"] .search-bar-inline .search-input-wrap.expanded {
  background: #0d1117;
  border-color: #444;
}

[data-theme="dark"] .result-option {
  background: #333;
  color: #e8e8e8;
}

[data-theme="dark"] .result-answer-body {
  color: #c0c0c0;
  border-left-color: #555;
}

[data-theme="dark"] .search-create-paper-btn {
  background: #fff;
  border-color: #fff;
  color: #000;
}

[data-theme="dark"] .search-create-paper-btn:hover {
  background: #ccc;
}

[data-theme="dark"] .search-close-btn,
[data-theme="dark"] .result-view-btn {
  background: #222;
  border-color: #fff;
  color: #fff;
}

[data-theme="dark"] .search-close-btn:hover,
[data-theme="dark"] .result-view-btn:hover {
  background: #fff;
  color: #000;
}

[data-theme="dark"] .result-source-badge {
  background: #161b22;
  border-color: #444;
  color: #c9d1d9;
}

[data-theme="dark"] .result-source-badge.exam-name {
  background: #fff;
  color: #000;
  border-color: #fff;
}

[data-theme="dark"] .result-answer-toggle {
  background: #161b22;
  border-color: #fff;
  color: #fff;
}

[data-theme="dark"] .result-answer-toggle:hover,
[data-theme="dark"] .result-answer-toggle.active {
  background: #fff;
  color: #000;
}

[data-theme="dark"] .result-draft-toggle {
  background: #161b22;
  border-color: #444;
  color: #c9d1d9;
}

[data-theme="dark"] .result-draft-toggle:hover {
  background: #21262d;
  border-color: #666;
}

[data-theme="dark"] .result-favorite-btn {
  background: rgba(30, 30, 30, 0.8);
}

[data-theme="dark"] .result-favorite-btn.active {
  background: rgba(245, 158, 11, 0.2);
}

/* ============================================
   移动端适配
   ============================================ */
@media screen and (max-width: 768px) {
  .header {
    padding: 24px 16px 20px;
  }

  .header h1 {
    font-size: 1.6rem;
    letter-spacing: 2px;
  }

  .level1-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

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

  .search-bar-inline .search-input-wrap.expanded {
    width: 260px;
  }

  .result-question-source {
    padding-right: 0;
    margin-top: 40px;
  }

  .result-draft-toggle,
  .result-answer-toggle {
    position: static;
    display: inline-block;
    margin-top: 8px;
  }
}

.change-themem-icon {
  padding-right: 10px;
}

.custom-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 4000;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.custom-modal-overlay.active {
  display: flex;
  opacity: 1;
}

.custom-modal {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px 28px;
  min-width: 320px;
  max-width: 90vw;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.custom-modal-overlay.active .custom-modal {
  transform: scale(1);
}

.custom-modal-title {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.custom-modal-body {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.custom-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.custom-modal-btn {
  padding: 8px 18px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
  font-family: inherit;
}

.custom-modal-btn.primary {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
}

/* ---- 二级分类栏：支持水平滚动 ---- */
.level2-bar::-webkit-scrollbar {
  display: none;
}
.level2-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  transition: all 0.2s;
  white-space: nowrap;
}

/* ---- 课后习题卡片排版 ---- */
.hw-card {
  position: relative;
}
.hw-card .exam-type-tag {
  margin-bottom: 12px;
}
.hw-card .hw-section-label {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}
.hw-card .hw-title-main {
  font-size: 1.15rem;
  font-weight: bold;
  margin-bottom: 6px;
  line-height: 1.4;
}
.hw-card .hw-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.hw-card .hw-page-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  font-size: 0.8rem;
  color: #555;
}
.hw-card .hw-exercise-num {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: #000;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 500;
}
.hw-card .exam-meta {
  margin-top: 0;
}
.hw-card .exam-stats {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #eee;
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: #666;
}

/* 暗色主题适配 */
[data-theme="dark"] .level2-btn {
  background: #222;
  border-color: #555;
  color: #e8e8e8;
}
[data-theme="dark"] .hw-card .hw-page-badge {
  background: #333;
  border-color: #555;
  color: #c0c0c0;
}
[data-theme="dark"] .hw-card .hw-section-label {
  color: #999;
}
[data-theme="dark"] .hw-card .exam-stats {
  border-top-color: #444;
}