/* ========== 学练页面样式 ========== */
.practice-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px 18px;
  background: var(--primary-light);
  border-radius: var(--radius);
}

.practice-progress {
  font-weight: 600;
  font-size: 0.95rem;
}

.practice-timer {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.practice-timer.warning {
  color: var(--danger);
  animation: blink 1s infinite;
}

@keyframes blink {
  50% { opacity: 0.5; }
}

.question-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 16px;
}

.question-meta {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.question-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
}

.tag-subject { background: #e3f2fd; color: #1565c0; }
.tag-type-single { background: #e8f5e9; color: #2e7d32; }
.tag-type-multiple { background: #fff3e0; color: #e65100; }
.tag-type-judge { background: #f3e5f5; color: #7b1fa2; }
.tag-type-fill { background: #e0f7fa; color: #006064; }
.tag-diff-easy { background: #e8f5e9; color: #2e7d32; }
.tag-diff-medium { background: #fff8e1; color: #f57f17; }
.tag-diff-hard { background: #ffebee; color: #c62828; }

.question-content {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 20px;
  padding: 16px;
  background: #fafbfc;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--primary);
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  background: #fff;
}

.option-item:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.option-item.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  font-weight: 600;
}

.option-item.correct {
  border-color: var(--success);
  background: var(--success-light);
}

.option-item.wrong {
  border-color: var(--danger);
  background: var(--danger-light);
}

.option-letter {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg);
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.option-item.selected .option-letter {
  background: var(--primary);
  color: #fff;
}

.option-item.correct .option-letter {
  background: var(--success);
  color: #fff;
}

.option-item.wrong .option-letter {
  background: var(--danger);
  color: #fff;
}

.option-text {
  line-height: 1.5;
  padding-top: 2px;
}

.fill-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
}

.fill-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.judge-options {
  display: flex;
  gap: 16px;
}

.judge-btn {
  flex: 1;
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  transition: var(--transition);
  text-align: center;
}

.judge-btn:hover { border-color: var(--primary); }
.judge-btn.selected { border-color: var(--primary); background: var(--primary); color: #fff; }

.practice-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.explanation-box {
  margin-top: 16px;
  padding: 14px 18px;
  background: #fef7e0;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--warning);
  font-size: 0.9rem;
  display: none;
}

.explanation-box.show {
  display: block;
}

.explanation-box .exp-label {
  font-weight: 700;
  margin-bottom: 4px;
}

/* ========== 暗色模式适配 ========== */
[data-theme="dark"] .question-content {
  background: #2a2a40;
  color: var(--text);
}
[data-theme="dark"] .option-item {
  background: var(--bg-input);
}
[data-theme="dark"] .option-item:hover {
  background: #333350;
}
[data-theme="dark"] .option-item.selected {
  background: #1e3a5f;
}
[data-theme="dark"] .option-item.correct {
  background: #1a3a2a;
}
[data-theme="dark"] .option-item.wrong {
  background: #3a1a1a;
}
[data-theme="dark"] .judge-btn {
  background: var(--bg-input);
  color: var(--text);
}
[data-theme="dark"] .judge-btn.selected {
  background: var(--primary);
  color: #000;
}
[data-theme="dark"] .fill-input {
  background: var(--bg-input);
  color: var(--text);
}
[data-theme="dark"] .explanation-box {
  background: #2a2a1a;
  color: var(--text);
}
[data-theme="dark"] .tag-subject { background: #1a2a4a; color: #7ab8f5; }
[data-theme="dark"] .tag-type-single { background: #1a2a1a; color: #6ad87a; }
[data-theme="dark"] .tag-type-multiple { background: #2a1a0a; color: #ffa040; }
[data-theme="dark"] .tag-type-judge { background: #2a1a2a; color: #c080d0; }
[data-theme="dark"] .tag-type-fill { background: #1a2a2a; color: #50c8d0; }
[data-theme="dark"] .tag-diff-easy { background: #1a2a1a; color: #6ad87a; }
[data-theme="dark"] .tag-diff-medium { background: #2a2a0a; color: #ffb830; }
[data-theme="dark"] .tag-diff-hard { background: #2a1a1a; color: #e06060; }
[data-theme="dark"] .practice-header {
  background: #1a2a4a;
}
[data-theme="dark"] .option-letter {
  background: #3a3a52;
  color: var(--text);
}
