/* 模拟考试样式 */
.paper-description,.grading-note { line-height:1.8;color:#667085;margin:12px 0; }
.paper-select-label { display:block;text-align:left;margin:18px 0 8px;color:#344054; }
.paper-select { width:100%;padding:12px;border:1px solid #cdd5ea;border-radius:8px;background:white;font-size:15px; }
.active-paper-title { color:#475467;line-height:1.8;margin-bottom:12px; }
.answer-sheet { background:white;border:1px solid #e1e6ee;border-radius:12px;padding:16px;margin-bottom:18px; }
.answer-sheet summary { cursor:pointer;color:#5664ce; }
.answer-sheet p { color:#667085;font-size:12px;margin-top:12px; }
.answer-sheet-grid { display:grid;grid-template-columns:repeat(auto-fill,minmax(38px,1fr));gap:8px;margin-top:14px; }
.answer-sheet-grid button { border:1px solid transparent;border-radius:7px;min-height:36px;background:#f2f4f7;color:#475467;cursor:pointer; }
.answer-sheet-grid button.answered { background:#7471dc;color:white; }
.answer-sheet-grid button.current { border:2px solid #5146b9; }
.btn-start-exam:disabled { opacity:.5;cursor:wait; }
.manual-grading { margin:24px 0;text-align:left; }
.manual-grading p { line-height:1.7;color:#667085;margin:10px 0; }
.manual-grade-row { border:1px solid #e1e6ee;border-radius:10px;padding:16px;margin:12px 0; }
.manual-grade-row audio { display:block;width:100%;margin:12px 0; }
.manual-grade-row select { padding:8px 14px;border:1px solid #cdd5ea;border-radius:8px;margin:12px 0 0; }
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  background: #f5f7fa;
  color: #333;
}

.exam-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 头部 */
.exam-header {
  background: white;
  padding: 20px 40px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.back-btn {
  color: #666;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
}

.back-btn:hover {
  color: #667eea;
}

.exam-header h1 {
  font-size: 1.8em;
  color: #333;
}

.timer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: #f5f7fa;
  border-radius: 20px;
}

.timer-label {
  font-size: 14px;
  color: #666;
}

.timer-value {
  font-size: 24px;
  font-weight: bold;
  color: #667eea;
  font-family: 'Courier New', monospace;
}

/* 准备页 */
.prepare-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.prepare-card {
  background: white;
  border-radius: 20px;
  padding: 50px;
  max-width: 700px;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.prepare-card h2 {
  font-size: 2em;
  margin-bottom: 30px;
  color: #333;
  text-align: center;
}

.exam-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 10px;
}

.info-label {
  font-size: 14px;
  color: #999;
}

.info-value {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.exam-rules {
  background: #e3f2fd;
  padding: 25px;
  border-radius: 10px;
  margin-bottom: 30px;
}

.exam-rules h3 {
  font-size: 1.2em;
  margin-bottom: 15px;
  color: #1976d2;
}

.exam-rules ul {
  list-style: none;
}

.exam-rules li {
  padding: 8px 0;
  padding-left: 25px;
  position: relative;
  color: #555;
}

.exam-rules li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #1976d2;
  font-weight: bold;
}

.btn-start-exam {
  width: 100%;
  padding: 18px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(102,126,234,0.3);
}

.btn-start-exam:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102,126,234,0.4);
}

/* 考试页 */
.exam-page {
  flex: 1;
  padding: 30px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.progress-bar {
  background: white;
  border-radius: 20px;
  padding: 15px 25px;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.progress-fill {
  flex: 1;
  height: 8px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 10px;
  transition: width 0.3s;
}

.progress-text {
  font-weight: 600;
  color: #667eea;
  min-width: 60px;
  text-align: right;
}

.question-container {
  background: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f5f7fa;
}

.question-number {
  font-size: 18px;
  color: #666;
}

.question-number strong {
  color: #667eea;
  font-size: 20px;
}

.question-type {
  background: #e3f2fd;
  color: #1976d2;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}

.question-content {
  margin-bottom: 30px;
}

.question-content h3 {
  font-size: 1.4em;
  line-height: 1.8;
  color: #333;
  margin-bottom: 20px;
}

.btn-audio {
  background: #667eea;
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.3s;
}

.btn-audio:hover {
  background: #5568d3;
  transform: scale(1.05);
}

/* 选项 */
.exam-options {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 30px;
}

.exam-option {
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  padding: 18px 25px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 16px;
}

.exam-option:hover {
  background: #e3f2fd;
  border-color: #90caf9;
  transform: translateX(5px);
}

.exam-option.selected {
  background: #667eea;
  border-color: #667eea;
  color: white;
  font-weight: 500;
}

/* 录音区域 */
.exam-recording {
  text-align: center;
  padding: 40px 20px;
  background: #f8f9fa;
  border-radius: 15px;
  margin-bottom: 30px;
}

.recording-hint {
  margin-bottom: 25px;
}

.recording-hint p {
  color: #666;
  font-size: 15px;
}

.btn-record {
  background: white;
  border: 3px solid #667eea;
  padding: 20px 40px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 16px;
  color: #667eea;
  font-weight: 600;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.btn-record:hover {
  background: #667eea;
  color: white;
  transform: scale(1.05);
}

.btn-record.recording {
  background: #f44336;
  border-color: #f44336;
  color: white;
  animation: pulse-recording 1.5s infinite;
}

@keyframes pulse-recording {
  0%, 100% { box-shadow: 0 0 0 0 rgba(244,67,54,0.7); }
  50% { box-shadow: 0 0 0 15px rgba(244,67,54,0); }
}

.record-icon {
  font-size: 24px;
}

.recording-timer {
  margin-top: 20px;
  font-size: 18px;
  color: #f44336;
  font-weight: 600;
}

#examAudioPlayback {
  margin-top: 20px;
  width: 100%;
  max-width: 400px;
}

/* 考试操作按钮 */
.exam-actions {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
}

.btn-secondary {
  background: white;
  color: #667eea;
  border: 2px solid #667eea;
  padding: 12px 30px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
}

.btn-secondary:hover {
  background: #667eea;
  color: white;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(102,126,234,0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102,126,234,0.4);
}

/* 结果页 */
.result-page {
  flex: 1;
  padding: 40px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-card {
  background: white;
  border-radius: 20px;
  padding: 50px;
  max-width: 800px;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.result-score {
  text-align: center;
  margin-bottom: 40px;
}

.score-circle {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
  box-shadow: 0 10px 30px rgba(102,126,234,0.3);
}

.score-value {
  font-size: 4em;
  font-weight: bold;
  color: white;
}

.score-label {
  font-size: 1.2em;
  color: white;
  opacity: 0.9;
}

#resultTitle {
  font-size: 2em;
  margin-bottom: 10px;
  color: #333;
}

#resultSubtitle {
  font-size: 1.1em;
  color: #666;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.stat-box {
  text-align: center;
  padding: 25px;
  background: #f8f9fa;
  border-radius: 15px;
}

.stat-number {
  font-size: 2.5em;
  font-weight: bold;
  color: #667eea;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  color: #666;
}

.analysis-section,
.suggestions-section {
  margin-bottom: 30px;
}

.analysis-section h3,
.suggestions-section h3 {
  font-size: 1.3em;
  margin-bottom: 15px;
  color: #333;
}

.weakness-list,
.suggestions-list {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
}

.weakness-item,
.suggestion-item {
  padding: 12px 0;
  border-bottom: 1px solid #e9ecef;
  color: #555;
}

.weakness-item:last-child,
.suggestion-item:last-child {
  border-bottom: none;
}

.result-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
}

/* 响应式 */
@media (max-width: 768px) {
  .exam-actions { flex-wrap:wrap; }
  .exam-actions button { flex:1 1 135px;min-height:44px; }
  .exam-header,.header-left { flex-wrap:wrap;gap:10px; }
  .question-container,.result-card,.prepare-card { min-width:0;max-width:100%; }
  .exam-option,.question-content,.manual-grade-row { overflow-wrap:anywhere; }
  .paper-select,.manual-grade-row select { font-size:16px;max-width:100%; }
  audio { max-width:100%; }
  .exam-header {
    padding: 15px 20px;
  }

  .exam-header h1 {
    font-size: 1.3em;
  }

  .prepare-card {
    padding: 30px 20px;
  }

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

  .question-container {
    padding: 25px 20px;
  }

  .result-stats {
    grid-template-columns: 1fr;
  }

  .result-actions {
    flex-direction: column;
  }

  .result-card {
    padding: 30px 20px;
  }
}
