/* ===== CSS Variables ===== */
:root {
  --primary: #1a7f8e;
  --primary-dark: #146577;
  --primary-light: #e0f4f7;
  --primary-lighter: #f0f9fa;
  --accent: #e8703a;
  --accent-light: #fdf0e8;
  --success: #2d9a3f;
  --success-light: #e8f7ea;
  --warning: #d48806;
  --warning-light: #fff7e0;
  --danger: #d44b4b;
  --danger-light: #fce8e8;
  --info: #1890b5;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --radius: 8px;
  --radius-sm: 4px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.03);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  --mono: "SF Mono", "Cascadia Code", Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--gray-100);
  color: var(--gray-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===== Login Page ===== */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a7f8e 0%, #146577 50%, #0d4d5a 100%);
  position: relative;
  overflow: hidden;
}
.login-wrapper::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  top: -200px; right: -100px;
}
.login-wrapper::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  bottom: -150px; left: -80px;
}
.login-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  padding: 40px;
  width: 400px;
  max-width: 90vw;
  position: relative;
  z-index: 1;
}
.login-logo {
  text-align: center;
  margin-bottom: 32px;
}
.login-logo .icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 12px;
  color: #fff;
}
.login-logo .logo-img {
  width: 80px; height: 80px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  padding: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  margin-bottom: 12px;
}
.login-logo h1 { font-size: 20px; color: var(--gray-800); }
.login-logo p { font-size: 13px; color: var(--gray-500); margin-top: 4px; }
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 6px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font);
  transition: all 0.2s;
  background: #fff;
  color: var(--gray-800);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,127,142,0.12);
}
.form-textarea { min-height: 80px; resize: vertical; }
.login-hint {
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 20px;
  border: 1px solid var(--gray-200);
}
.login-hint code { color: var(--primary); font-family: var(--mono); font-size: 12px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #d05e2a; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #258537; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c04040; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #b87705; }
.btn-outline { background: #fff; color: var(--gray-700); border: 1px solid var(--gray-300); }
.btn-outline:hover { background: var(--gray-50); border-color: var(--gray-400); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 16px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== App Layout ===== */
.app-layout {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 220px;
  background: var(--gray-900);
  color: #fff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
}
.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-header .logo-icon {
  width: 36px; height: 36px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.sidebar-header h2 { font-size: 14px; font-weight: 600; }
.sidebar-header p { font-size: 11px; color: var(--gray-400); }
.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
}
.sidebar-nav .nav-section {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--gray-500);
  padding: 12px 12px 6px;
  letter-spacing: 0.05em;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: var(--gray-300);
  text-decoration: none;
  border-radius: var(--radius);
  font-size: 14px;
  transition: all 0.15s;
  cursor: pointer;
}
.sidebar-nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.sidebar-nav a.active { background: var(--primary); color: #fff; }
.sidebar-nav a .nav-icon { font-size: 16px; width: 20px; text-align: center; }
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.sidebar-user .avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}
.sidebar-user .user-info { font-size: 13px; }
.sidebar-user .user-info .name { font-weight: 600; color: #fff; }
.sidebar-user .user-info .role { font-size: 11px; color: var(--gray-400); }

.main-content {
  flex: 1;
  margin-left: 220px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.content-header {
  background: #fff;
  padding: 16px 28px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}
.content-header h1 { font-size: 18px; font-weight: 700; }
.content-header .actions { display: flex; gap: 8px; }
.content-body {
  padding: 24px 28px;
  flex: 1;
}

/* ===== Cards & Stats ===== */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 20px;
}
.card-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.15s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-card .stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.stat-card .stat-info .stat-value { font-size: 26px; font-weight: 800; color: var(--gray-800); }
.stat-card .stat-label { font-size: 13px; color: var(--gray-500); }

/* ===== Tables ===== */
.table-wrapper { overflow-x: auto; }
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.data-table th {
  background: var(--gray-50);
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  color: var(--gray-600);
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
  font-size: 13px;
}
table.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--gray-100);
}
table.data-table tr:hover td { background: var(--gray-50); }
table.data-table tr:last-child td { border-bottom: none; }

/* ===== Badges & Tags ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-primary { background: var(--primary-light); color: var(--primary-dark); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }

/* ===== Filters Bar ===== */
.filters-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 20px;
}
.filters-bar .form-group { margin-bottom: 0; }
.filters-bar .form-group .form-input,
.filters-bar .form-group .form-select { min-width: 140px; }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 520px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 { font-size: 17px; font-weight: 700; }
.modal-close { cursor: pointer; font-size: 22px; color: var(--gray-400); background: none; border: none; padding: 0; width: 28px; height: 28px; }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--gray-200); display: flex; justify-content: flex-end; gap: 8px; }

/* ===== Image Grid (Admin) ===== */
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.image-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.15s;
}
.image-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.image-card .img-preview {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.image-card .img-preview img { width: 100%; height: 100%; object-fit: cover; }
.image-card .img-info { padding: 10px 12px; }
.image-card .img-info .answer { font-size: 13px; font-weight: 600; color: var(--gray-700); }
.image-card .img-info .meta { font-size: 11px; color: var(--gray-500); margin-top: 2px; }

/* ===== Exam Interface ===== */
.exam-wrapper {
  min-height: 100vh;
  background: var(--gray-50);
  display: flex;
  flex-direction: column;
}
.exam-header {
  background: #fff;
  padding: 12px 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}
.exam-header h1 { font-size: 17px; }
.exam-timer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--gray-800);
  background: var(--primary-lighter);
  padding: 6px 16px;
  border-radius: var(--radius);
}
.exam-timer.warning { color: var(--danger); background: var(--danger-light); }
.exam-progress-bar {
  height: 4px;
  background: var(--gray-200);
  position: relative;
}
.exam-progress-bar .fill {
  height: 100%;
  background: var(--primary);
  transition: width 0.3s;
}
.exam-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
}
.exam-question-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  max-width: 720px;
  width: 100%;
  overflow: hidden;
}
.eq-image {
  width: 100%;
  aspect-ratio: 4/3;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.eq-image img { max-width: 100%; max-height: 100%; object-fit: contain; }
.eq-options {
  padding: 20px;
}
.eq-options .option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 15px;
}
.eq-options .option:hover { border-color: var(--primary-light); background: var(--primary-lighter); }
.eq-options .option.selected { border-color: var(--primary); background: var(--primary-light); }
.eq-options .option .opt-label {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  color: var(--gray-600);
}
.eq-options .option.selected .opt-label { background: var(--primary); color: #fff; }
.eq-options .option.correct-answer { border-color: var(--success); background: var(--success-light); }
.eq-options .option.correct-answer .opt-label { background: var(--success); color: #fff; }
.eq-options .option.wrong-answer { border-color: var(--danger); background: var(--danger-light); }
.eq-options .option.wrong-answer .opt-label { background: var(--danger); color: #fff; }

.exam-nav {
  display: flex;
  justify-content: space-between;
  padding: 16px 20px;
  border-top: 1px solid var(--gray-200);
}
.exam-pagination {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0 20px 20px;
}
.exam-pagination .dot {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-300);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  font-weight: 600;
  color: var(--gray-500);
  background: #fff;
  transition: all 0.15s;
}
.exam-pagination .dot:hover { border-color: var(--primary); color: var(--primary); }
.exam-pagination .dot.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.exam-pagination .dot.answered { background: var(--success-light); border-color: var(--success); color: var(--success); }
.exam-pagination .dot.active.answered { background: var(--primary); color: #fff; }

/* ===== Result Screen ===== */
.result-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-50);
}
.result-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  max-width: 480px;
  width: 90%;
  text-align: center;
}
.result-score {
  width: 120px; height: 120px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 42px;
  font-weight: 800;
  border: 8px solid;
}
.result-score.pass { border-color: var(--success); color: var(--success); background: var(--success-light); }
.result-score.fail { border-color: var(--danger); color: var(--danger); background: var(--danger-light); }
.result-card h2 { font-size: 20px; margin-bottom: 8px; }
.result-card .subtitle { font-size: 14px; color: var(--gray-500); margin-bottom: 20px; }
.result-stats { display: flex; justify-content: center; gap: 32px; margin-bottom: 24px; }
.result-stats .stat .val { font-size: 22px; font-weight: 700; }
.result-stats .stat .label { font-size: 12px; color: var(--gray-500); }

/* Mobile Tab Bar */
.mobile-tabbar {
  display: flex;
  background: #fff;
  border-top: 1px solid var(--gray-200);
  box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
  position: sticky;
  bottom: 0;
  z-index: 10;
}
.mobile-tabbar .tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
  cursor: pointer;
  color: var(--gray-400);
  transition: color 0.2s;
}
.mobile-tabbar .tab-item.active { color: var(--primary); }
.mobile-tabbar .tab-icon { font-size: 22px; line-height: 1; margin-bottom: 2px; }
.mobile-tabbar .tab-label { font-size: 11px; }
.exam-wrapper .content-body { padding-bottom: 60px !important; }

/* ===== Charts (CSS bars) ===== */
.bar-chart { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: flex; align-items: center; gap: 12px; }
.bar-row .bar-label { width: 100px; text-align: right; font-size: 13px; color: var(--gray-600); flex-shrink: 0; }
.bar-row .bar-track { flex: 1; height: 24px; background: var(--gray-100); border-radius: var(--radius-sm); overflow: hidden; position: relative; }
.bar-row .bar-fill { height: 100%; border-radius: var(--radius-sm); transition: width 0.5s; display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; font-size: 12px; font-weight: 600; color: #fff; }
.bar-row .bar-value { width: 50px; font-size: 13px; font-weight: 600; color: var(--gray-700); flex-shrink: 0; }

.donut-chart { display: flex; align-items: center; gap: 24px; }
.donut-chart svg { flex-shrink: 0; }
.donut-legend { display: flex; flex-direction: column; gap: 8px; }
.donut-legend .legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.donut-legend .legend-color { width: 12px; height: 12px; border-radius: 3px; }

/* ===== Misc ===== */
.empty-state { text-align: center; padding: 40px; color: var(--gray-400); }
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }
.toast {
  position: fixed;
  top: 20px; right: 20px;
  background: var(--gray-800);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 300;
  font-size: 14px;
  animation: slideIn 0.3s ease;
  max-width: 400px;
}
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.hidden { display: none !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-20 { margin-bottom: 20px; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.flex { display: flex; } .flex-col { flex-direction: column; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.text-sm { font-size: 13px; } .text-xs { font-size: 12px; } .text-lg { font-size: 18px; }
.text-gray { color: var(--gray-500); } .text-danger { color: var(--danger); } .text-success { color: var(--success); }
.font-bold { font-weight: 700; } .font-semibold { font-weight: 600; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.2s; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .content-body { padding: 16px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .image-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .filters-bar { flex-direction: column; align-items: stretch; }
  .filters-bar .form-group { width: 100%; }
  .result-stats { gap: 16px; }
  .menu-toggle { display: flex !important; }
}
.menu-toggle {
  display: none;
  background: none; border: none; font-size: 22px; cursor: pointer; color: var(--gray-700);
}

/* ===== Study Module (专项学习) ===== */
.study-img-box {
  position: relative;
  text-align: center;
  margin-bottom: 16px;
  cursor: zoom-in;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--gray-200);
  background: #000;
}
.study-img-box img {
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
.study-img-box:hover img { opacity: 0.92; }
.study-zoom-hint {
  position: absolute;
  bottom: 8px; right: 8px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 12px;
  pointer-events: none;
}

/* ===== Fullscreen Image Viewer ===== */
.img-viewer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  animation: fadeIn 0.2s ease;
}
.img-viewer-overlay img {
  max-width: 94vw;
  max-height: 94vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.img-viewer-close {
  position: fixed;
  top: 16px; right: 20px;
  color: #fff;
  font-size: 30px;
  cursor: pointer;
  z-index: 401;
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ===== Category Chips (Study) ===== */
.cat-chips-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}
.cat-chip {
  padding: 6px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--gray-300);
  background: var(--white);
  color: var(--gray-700);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.cat-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.cat-chip-active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  font-weight: 600;
}
.cat-chip-active:hover {
  color: var(--white);
}

/* ===== Mock Exam (模拟考核答题区) ===== */
.mock-exam {
  max-width: 780px;
  margin: 0 auto;
}
.mock-exam .exam-question-card {
  background: #fff;
  border-radius: var(--radius-lg, 12px);
  box-shadow: var(--shadow);
  padding: 20px;
}
.mock-exam .exam-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  background: #fff;
  border-radius: var(--radius, 8px);
  padding: 12px 16px;
  box-shadow: var(--shadow);
}
.mock-exam .exam-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
  justify-content: center;
}
