/* 题库测试页面专用样式 */

/* 题目容器 */
#question-container {
  margin-bottom: 20px;
}

#question-container h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* 选项列表 */
.options-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

/* 平板及以上设备 (≥768px) */
@media (min-width: 768px) {
  .options-list {
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }
  
  #question-container h3 {
    font-size: 1.4rem;
  }
}

/* 桌面设备 (≥1024px) */
@media (min-width: 1024px) {
  #question-container h3 {
    font-size: 1.5rem;
  }
}

/* 选项项 */
.option-item {
  margin-bottom: 10px;
}

/* 单选框标签 */
.radio-label {
  display: block;
  padding: 15px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--bg-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  font-size: 1rem;
  line-height: 1.4;
}

/* 平板及以上设备字体调整 */
@media (min-width: 768px) {
  .radio-label {
    font-size: 1.1rem;
    padding: 18px;
  }
}

/* 桌面设备字体调整 */
@media (min-width: 1024px) {
  .radio-label {
    font-size: 1.2rem;
    padding: 20px;
  }
}

/* 移动端字体调整 */
@media (max-width: 767px) {
  .radio-label {
    font-size: 1rem;
    padding: 12px 15px;
  }
  
  #question-container h3 {
    font-size: 1.1rem;
  }
}

/* 单选框隐藏 */
.radio-label input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

/* 选项字母 */
.option-letter {
  font-weight: bold;
  margin-right: 8px;
  color: var(--primary-color);
}

/* 悬停效果 */
.radio-label:hover {
  border-color: var(--primary-color);
  background-color: var(--bg-tertiary);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 选中状态 */
.radio-label input:checked + .option-letter,
.radio-label input:checked + .option-letter + span {
  color: var(--primary-color);
}

.radio-label input:checked {
  background-color: var(--primary-color);
}

/* 点击反馈动画 */
.radio-label:active {
  transform: scale(0.98);
  transition: transform 0.1s ease;
}

/* 答案反馈区域 */
.answer-feedback {
  margin-top: 20px;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
  animation: fadeIn 0.3s ease;
}

.answer-feedback.correct {
  background-color: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

.answer-feedback.incorrect {
  background-color: var(--error-bg);
  color: var(--error-text);
  border: 1px solid var(--error-border);
}

/* 按钮区域调整 */
.form-group .btn {
  min-width: 100px;
  margin: 0 5px;
}

#next-question-btn,
#submit-test-btn {
  min-width: 120px;
}

/* 错题回顾样式 */
.wrong-question-item {
  padding: 20px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 20px;
  background-color: var(--bg-secondary);
}

.wrong-question-item h4 {
  margin-bottom: 15px;
  font-size: 1.1rem;
  line-height: 1.4;
}

.wrong-question-item .options-list {
  margin: 15px 0;
}

.radio-label.bg-success-light {
  background-color: var(--success-bg) !important;
  border-color: var(--success-border) !important;
}

.radio-label.bg-error-light {
  background-color: var(--error-bg) !important;
  border-color: var(--error-border) !important;
}

.bg-success-light {
  background-color: var(--success-bg) !important;
  border-color: var(--success-border) !important;
}

.bg-error-light {
  background-color: var(--error-bg) !important;
  border-color: var(--error-border) !important;
}

.text-danger {
  color: #dc3545;
}

.text-success {
  color: #28a745;
}

.float-right {
  float: right;
}

.mt-3 {
  margin-top: 15px;
}

/* 动画效果 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-10px); }
}

/* 响应式调整 */
@media (max-width: 768px) {
  .wrong-question-item {
    padding: 15px;
  }
  
  .wrong-question-item h4 {
    font-size: 1rem;
  }
  
  .form-group .btn {
    min-width: 80px;
    padding: 8px 12px;
    font-size: 0.9rem;
  }
  
  #next-question-btn,
  #submit-test-btn {
    min-width: 100px;
  }
}