:root {
  --primary: #4a69bd;
  --primary-hover: #3c5599;
  --bg-color: #f1f2f6;
  --card-bg: #ffffff;
  --text-main: #2f3542;
  --text-muted: #747d8c;
  --success: #2ed573;
  --error: #ff4757;
  --border: #dfe4ea;
  --answered: #70a1ff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-color);
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.hidden {
  display: none !important;
}

header {
  background: var(--card-bg);
  padding: 15px 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}
header h1 {
  font-size: 1.5em;
  color: var(--primary);
}
#header-stats {
  font-weight: bold;
  color: var(--primary);
  background: #f8faff;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--primary);
  font-size: 0.95em;
}

#upload-screen {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--bg-color);
  overflow-y: auto;
  padding: 40px;
}
.upload-container {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.upload-card {
  background: var(--card-bg);
  padding: 40px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border: 2px dashed #ced6e0;
  cursor: pointer;
  transition: 0.3s;
}
.upload-card:hover {
  border-color: var(--primary);
  background: rgba(74, 105, 189, 0.02);
  transform: translateY(-3px);
}
.upload-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-weight: bold;
  font-size: 0.9em;
}
.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
  margin: 0 15px;
}

.url-card {
  background: var(--card-bg);
  padding: 35px 40px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border);
}
.url-card h3 {
  margin-bottom: 20px;
  color: var(--text-main);
  font-size: 1.2em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.input-group {
  display: flex;
  gap: 10px;
}
.input-group input {
  flex: 1;
  padding: 12px 20px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1em;
  outline: none;
  transition: 0.3s;
  -webkit-user-select: text;
  user-select: text;
}
.input-group input:focus {
  border-color: var(--primary);
}
.input-group button {
  padding: 0 25px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1em;
  cursor: pointer;
  transition: 0.2s;
}
.input-group button:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(74, 105, 189, 0.2);
}

#app-container {
  flex: 1;
  display: flex;
  height: calc(100vh - 60px);
}
#sidebar {
  width: 280px;
  background: var(--card-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 5;
}
.sidebar-header {
  padding: 15px;
  border-bottom: 1px solid var(--border);
  font-weight: bold;
  text-align: center;
}
.nav-grid {
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: 40px;
  gap: 10px;
  overflow-y: auto;
  flex: 1;
  align-content: start;
}
.nav-btn {
  width: 100%;
  height: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-weight: bold;
  color: var(--text-muted);
  transition: 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
}
.nav-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.nav-btn.active {
  box-shadow: 0 0 0 2px var(--primary);
  transform: scale(1.1);
  z-index: 2;
  border-color: var(--primary);
  color: var(--primary);
}
.nav-btn.status-answered {
  background: var(--answered);
  color: white;
  border-color: var(--answered);
}
.nav-btn.status-correct {
  background: var(--success);
  color: white;
  border-color: var(--success);
}
.nav-btn.status-incorrect {
  background: var(--error);
  color: white;
  border-color: var(--error);
}
.sidebar-footer {
  padding: 15px;
  border-top: 1px solid var(--border);
}
.legend-area {
  font-size: 0.8em;
  color: #747d8c;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-around;
}
.btn-finish {
  width: 100%;
  padding: 12px;
  background: #f1f2f6;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
  color: var(--text-main);
}
.btn-finish:hover {
  background: #dfe4ea;
}
.btn-finish.submit-mode {
  background: var(--primary);
  color: white;
}
.btn-finish.submit-mode:hover {
  background: var(--primary-hover);
}

#main-content {
  flex: 1;
  padding: 40px 60px;
  overflow-y: auto;
  background: var(--bg-color);
}
.question-card {
  background: var(--card-bg);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.02);
  margin: 0 auto;
  position: relative;
  width: 100%;
  max-width: 900px;
  font-size: 16px;
  transition:
    font-size 0.2s ease,
    max-width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.review-badge {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  background: #f39c12;
  color: white;
  padding: 5px 20px;
  border-radius: 0 0 10px 10px;
  font-weight: bold;
  font-size: 0.9em;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* --- 题目头部排版与美化 --- */
.question-header {
  margin-bottom: 30px;
  font-size: 1.25em;
  line-height: 1.8;
}

#q-number {
  font-weight: 800;
  color: var(--primary);
  margin-right: 4px;
}

/* 核心修复：强制将 markdown 生成的第一个段落与题号同行显示 */
#q-text {
  display: inline;
}
#q-text > p:first-child {
  display: inline;
}

/* 题型标签 - 渐变高颜值的胶囊设计 */
.q-type-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 12px;
  border-radius: 20px; /* 圆润的胶囊形状 */
  font-size: 0.65em;
  font-weight: bold;
  margin: 0 10px 0 0;
  vertical-align: 3px; /* 向上微调，与中文字体底端对齐 */
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.12); /* 立体阴影 */
  letter-spacing: 1px;
  color: white;
}

/* 为三种题型配置不同的现代感渐变色 */
.q-type-tag.sc {
  background: linear-gradient(
    135deg,
    #667eea 0%,
    #764ba2 100%
  ); /* 单选：高贵紫蓝渐变 */
}
.q-type-tag.mc {
  background: linear-gradient(
    135deg,
    #ff416c 0%,
    #ff4b2b 100%
  ); /* 多选：活力橙红渐变 */
}
.q-type-tag.tf {
  background: linear-gradient(
    135deg,
    #11998e 0%,
    #38ef7d 100%
  ); /* 判断：清新翠绿渐变 */
}

/* 专属标签样式 */
.q-type-tag {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75em;
  margin-left: 10px;
  vertical-align: middle;
  display: inline-block;
  font-weight: bold;
}
.q-type-tag.sc {
  background: #e1f5fe;
  color: #0288d1;
  border: 1px solid #b3e5fc;
}
.q-type-tag.mc {
  background: #fff3e0;
  color: #f57c00;
  border: 1px solid #ffe0b2;
}
.q-type-tag.tf {
  background: #e8f5e9;
  color: #388e3c;
  border: 1px solid #c8e6c9;
}

#options-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}
.option-label {
  display: flex;
  align-items: stretch;
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
  overflow: hidden;
  background: #fff;
  min-height: 60px;
  font-size: 1em;
}
.option-label:hover:not(.disabled) {
  border-color: var(--primary);
  background: #f8faff;
}
.opt-prefix {
  padding: 15px;
  background: #f1f2f6;
  font-weight: bold;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  border-right: 1px solid var(--border);
  transition: 0.2s;
  font-size: 1.1em;
}
.opt-content {
  padding: 15px;
  flex: 1;
  display: flex;
  align-items: center;
  word-break: break-word;
}
input[type='radio'],
input[type='checkbox'] {
  display: none;
}

.option-label.selected {
  border-color: var(--primary);
  box-shadow: 0 4px 10px rgba(74, 105, 189, 0.1);
}
.option-label.selected .opt-prefix {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.option-label.correct {
  border-color: var(--success) !important;
  background: rgba(46, 213, 115, 0.05);
}
.option-label.correct .opt-prefix {
  background: var(--success) !important;
  color: white;
  border-color: var(--success);
}
.option-label.incorrect {
  border-color: var(--error) !important;
  background: rgba(255, 71, 87, 0.05);
}
.option-label.incorrect .opt-prefix {
  background: var(--error) !important;
  color: white;
  border-color: var(--error);
}
.option-label.disabled {
  cursor: default;
}

/* Markdown 样式适配 */
.question-header img,
.opt-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 10px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: block;
}
pre {
  background: #2d3436;
  color: #f8f8f2;
  padding: 15px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 15px 0;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9em;
  -webkit-user-select: text;
  user-select: text;
}
code {
  background: #dfe4ea;
  color: #e84118;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', Courier, monospace;
  -webkit-user-select: text;
  user-select: text;
}
pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}
.opt-content p,
.question-header p {
  margin: 0;
}

.action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
.action-buttons-group {
  display: flex;
  gap: 15px;
  position: relative;
}
.btn-main {
  padding: 12px 30px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1em;
  cursor: pointer;
  transition: 0.2s;
  font-weight: bold;
}
.btn-main:hover {
  background: var(--primary-hover);
}
.btn-secondary {
  padding: 12px 30px;
  background: var(--card-bg);
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 6px;
  font-size: 1em;
  cursor: pointer;
  transition: 0.2s;
  font-weight: bold;
}
.btn-secondary:hover {
  background: #f8faff;
}
.feedback-text {
  font-weight: bold;
  font-size: 1.1em;
}
.feedback-text.correct {
  color: var(--success);
}
.feedback-text.incorrect {
  color: var(--error);
}

/* 气泡提示 */
.skip-bubble {
  position: absolute;
  bottom: calc(100% + 15px);
  right: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 100;
  border: 1px solid var(--border);
  transform-origin: bottom right;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  white-space: nowrap;
}
@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.bubble-arrow {
  position: absolute;
  bottom: -7px;
  right: 40px;
  width: 12px;
  height: 12px;
  background: #fff;
  transform: rotate(45deg);
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
}
.bubble-text {
  font-weight: 500;
  font-size: 0.9em;
  color: var(--text-main);
}
.bubble-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.2s;
}
.bubble-btn.cancel {
  background: #f1f2f6;
  color: var(--text-muted);
}
.bubble-btn.cancel:hover {
  background: #dfe4ea;
}
.bubble-btn.confirm {
  background: #ffa502;
  color: white;
}
.bubble-btn.confirm:hover {
  background: #eccc68;
}

#result-screen {
  text-align: center;
  padding: 100px 20px;
  flex: 1;
}
#result-screen h2 {
  font-size: 2.5em;
  color: var(--primary);
  margin-bottom: 20px;
}
.result-btn-group {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 30px;
}

/* 悬浮设置模块 */
.floating-settings {
  position: fixed;
  bottom: 40px;
  right: 40px;
  z-index: 1000;
}
.settings-btn {
  width: 50px;
  height: 50px;
  background: var(--card-bg);
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  cursor: pointer;
  border: 2px solid var(--border);
  color: var(--text-muted);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.floating-settings:hover .settings-btn {
  transform: rotate(90deg);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 6px 20px rgba(74, 105, 189, 0.25);
}
.settings-menu {
  position: absolute;
  bottom: 65px;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  width: 260px;
  border: 1px solid var(--border);
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px) scale(0.95);
  transform-origin: bottom right;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.floating-settings:hover .settings-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.settings-menu h4 {
  margin-bottom: 15px;
  color: var(--text-main);
  font-size: 1.05em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}
.setting-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.setting-item label {
  font-size: 0.9em;
  font-weight: bold;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#font-size-display {
  color: var(--primary);
  font-size: 1.1em;
}
input[type='range'] {
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
}
input[type='range']:focus {
  outline: none;
}
input[type='range']::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  background: #dfe4ea;
  border-radius: 3px;
}
input[type='range']::-webkit-slider-thumb {
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -7px;
  box-shadow: 0 2px 6px rgba(74, 105, 189, 0.4);
  transition: transform 0.1s;
}
input[type='range']::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

/* 定制全局弹窗 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.modal-box {
  background: #fff;
  border-radius: 16px;
  padding: 30px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  transform: translateY(20px) scale(0.95);
  transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.modal-overlay.active .modal-box {
  transform: translateY(0) scale(1);
}
.modal-icon {
  font-size: 40px;
  margin-bottom: 15px;
}
.modal-title {
  font-size: 1.2em;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--text-main);
}
.modal-desc {
  color: var(--text-muted);
  margin-bottom: 25px;
  line-height: 1.5;
  font-size: 0.95em;
  word-break: break-all;
  white-space: pre-line;
}
.modal-btns {
  display: flex;
  gap: 15px;
  justify-content: center;
}
.modal-btn-single {
  width: 100%;
}
/* --- 全屏登录遮罩层升级版 --- */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(241, 242, 246, 0.4); /* 降低背景色权重，突出 Canvas */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
}
/* 背景 Canvas 铺满遮罩且置于底层 */
#login-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* 登录框主体：加入丝滑切换动画过渡 */
.login-box {
  background: rgba(255, 255, 255, 0.85); /* 登录框本身也带一点半透明 */
  backdrop-filter: blur(10px);
  padding: 35px 40px;
  border-radius: 24px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 20px 50px rgba(74, 105, 189, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.5);

  /* 核心：为结构、透明度变化添加 0.4 秒的缓动动画 */
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  opacity: 1;
  transform: translateY(0) scale(1);
}
/* 当我们在 JS 里给盒子打上这个状态标签时，触发淡出特效 */
.login-box.fade-out {
  opacity: 0;
  transform: translateY(-10px) scale(0.97);
  filter: blur(5px);
}

.login-box h2 {
  font-size: 1.5em;
  color: var(--primary);
  margin-bottom: 5px;
  text-align: center;
}

.login-subtitle {
  font-size: 0.85em;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 25px;
}

.login-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.login-input-group label {
  font-size: 0.8em;
  font-weight: bold;
  color: var(--text-main);
  letter-spacing: 0.5px;
}

.login-input-group input {
  padding: 11px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.95em;
  outline: none;
  background: rgba(255, 255, 255, 0.8);
  transition: 0.2s;
  -webkit-user-select: text;
  user-select: text;
}

.login-input-group input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(74, 105, 189, 0.15);
}

/* --- 新增：验证码模块排版 --- */
.captcha-container {
  display: flex;
  gap: 12px;
  align-items: center;
}

.captcha-container input {
  flex: 1;
}

#captcha-img {
  background: #f1f2f6;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: 0.2s;
}

#captcha-img:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.login-btn-area {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
}

.login-btn-area button {
  width: 100%;
  padding: 12px;
  font-size: 0.95em;
  border-radius: 10px;
}

/* 强制保证全局定制弹窗在最顶层 */
.modal-overlay {
  z-index: 100000 !important;
}

@keyframes loginPop {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-box h2 {
  font-size: 1.6em;
  color: var(--primary);
  margin-bottom: 5px;
  text-align: center;
}

.login-subtitle {
  font-size: 0.9em;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 30px;
}

.login-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.login-input-group label {
  font-size: 0.85em;
  font-weight: bold;
  color: var(--text-main);
}

.login-input-group input {
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1em;
  outline: none;
  transition: 0.2s;
  -webkit-user-select: text;
  user-select: text; /* 确保输入框可以正常输入 */
}

.login-input-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74, 105, 189, 0.1);
}

.login-btn-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.login-btn-area button {
  width: 100%;
  padding: 12px;
  font-size: 1em;
}
/* --- 联动升级的头部排版 --- */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-welcome {
  font-size: 0.95em;
  color: var(--text-main);
  background: #f1f2f6;
  padding: 6px 14px;
  border-radius: 8px;
  font-weight: 500;
  border: 1px solid var(--border);
}

/* 高颜值退出登录按钮 */
.btn-logout {
  padding: 8px 16px;
  background: #ffffff;
  color: var(--error);
  border: 1px solid var(--error);
  border-radius: 8px;
  font-size: 0.9em;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-logout:hover {
  background: var(--error);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(255, 71, 87, 0.2);
  transform: translateY(-1px);
}
/* 核心修复：强制让全局定制弹窗的层级高过登录遮罩层 */
.modal-overlay {
  z-index: 100000 !important; /* 比登录遮罩的 99999 还要大，确保居于最顶层 */
}

/* --- 答题卡分类分区样式 --- */
.sidebar-section {
  margin-bottom: 25px;
}

.section-title {
  font-size: 0.85em;
  color: var(--text-muted);
  background: #f1f2f6;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 12px;
  font-weight: bold;
  letter-spacing: 0.5px;
  border-left: 3px solid var(--primary);
}

/* 微调网格，让它在分区内表现更紧凑 */
.nav-grid {
  padding: 0 !important;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: 38px;
  gap: 8px;
  overflow: hidden;
}
/* --- 彻底修复答题卡激活挤压换行 Bug --- */
.nav-grid {
  display: grid;
  grid-template-columns: repeat(
    5,
    1fr
  ) !important; /* 强制死锁 5 列，绝对不换行 */
  gap: 10px !important;
  width: 100%;
}

.nav-btn {
  width: 100% !important; /* 宽度百分百平分格子 */
  height: 36px !important;
  box-sizing: border-box !important;
}

/* 重新优雅重塑激活高光，抛弃粗暴的 scale 缩放，改用柔和的内嵌阴影或边框 */
.nav-btn.active {
  transform: none !important; /* 彻底移除缩放，防止挤爆邻近格子 */
  border: 2px solid var(--primary) !important;
  color: var(--primary) !important;
  font-weight: 800 !important;
  background-color: rgba(74, 105, 189, 0.08) !important; /* 淡淡的底色高光 */
  box-shadow: inset 0 0 4px rgba(74, 105, 189, 0.2) !important;
}
