/* 口语测评页面样式 - 移动端优先响应式 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f5f7fa;
  color: #333;
  min-height: 100vh;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px 80px;
}

/* 顶部导航 */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #e8e8e8;
  margin-bottom: 16px;
  background: #fff;
  margin: 0 -16px;
  padding: 12px 16px;
}

.top-bar .back-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #4a90d9;
  text-decoration: none;
  font-size: 15px;
}

.top-bar h1 {
  font-size: 17px;
  font-weight: 600;
}

.top-bar .user-info {
  font-size: 13px;
  color: #888;
}

/* 需要登录提示 */
.login-required {
  text-align: center;
  padding: 60px 20px;
}

.login-required p {
  color: #666;
  margin-bottom: 16px;
  font-size: 15px;
}

/* 主标签页导航 */
.assessment-tabs {
  display: flex;
  background: #fff;
  border-radius: 8px;
  margin: 16px 0;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.assessment-tabs a {
  flex: 1;
  text-align: center;
  padding: 12px 8px;
  text-decoration: none;
  color: #666;
  font-size: 14px;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.assessment-tabs a.active {
  color: #4a90d9;
  border-bottom-color: #4a90d9;
  font-weight: 600;
}

/* 区块面板 */
.panel {
  display: none;
  background: #fff;
  border-radius: 8px;
  padding: 20px 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.panel.active {
  display: block;
}

.panel h2 {
  font-size: 16px;
  margin-bottom: 16px;
  color: #333;
}

.panel h3 {
  font-size: 15px;
  margin-bottom: 12px;
  color: #444;
}

/* 按钮 */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.btn-primary {
  background: #4a90d9;
  color: #fff;
}

.btn-primary:hover {
  background: #3a7bc8;
}

.btn-primary:disabled {
  background: #b0c4de;
  cursor: not-allowed;
}

.btn-secondary {
  background: #f0f0f0;
  color: #666;
}

.btn-secondary:hover {
  background: #e0e0e0;
}

.btn-danger {
  background: #ff6b6b;
  color: #fff;
}

.btn-small {
  padding: 6px 14px;
  font-size: 13px;
}

.btn-block {
  display: block;
  width: 100%;
}

/* 表单 */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 14px;
  color: #555;
  margin-bottom: 6px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  border-color: #4a90d9;
}

/* 学生列表 */
.student-list {
  list-style: none;
}

.student-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.student-item:hover,
.student-item.selected {
  border-color: #4a90d9;
  background: #f0f6ff;
}

.student-item .info {
  font-size: 15px;
}

.student-item .info .age {
  color: #888;
  font-size: 13px;
  margin-left: 8px;
}

.student-item .check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: transparent;
}

.student-item.selected .check {
  border-color: #4a90d9;
  background: #4a90d9;
  color: #fff;
}

/* 添加学生表单 */
.add-student-form {
  display: none;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 6px;
  margin-top: 12px;
}

.add-student-form.show {
  display: block;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group {
  flex: 1;
}

/* 测评区域 */
.test-area {
  display: none;
}

.test-area.active {
  display: block;
}

/* 题目区域 */
.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.question-progress {
  font-size: 14px;
  color: #888;
}

.question-type-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.question-type-tag.basic {
  background: #e8f5e9;
  color: #2e7d32;
}

.question-type-tag.life {
  background: #e3f2fd;
  color: #1565c0;
}

.question-type-tag.describe {
  background: #fff3e0;
  color: #e65100;
}

.question-type-tag.scenario {
  background: #fce4ec;
  color: #c62828;
}

.question-text {
  font-size: 18px;
  line-height: 1.6;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 8px;
  min-height: 80px;
}

.question-hint {
  font-size: 13px;
  color: #888;
  margin-bottom: 16px;
  padding: 0 4px;
}

/* 场景图片卡片 */
.scene-card {
  border-radius: 12px;
  padding: 24px 16px 16px;
  margin-bottom: 12px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.scene-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.scene-item {
  font-size: 36px;
  display: inline-block;
  animation: sceneFloat 3s ease-in-out infinite;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.scene-item:nth-child(2) { animation-delay: 0.3s; }
.scene-item:nth-child(3) { animation-delay: 0.6s; }
.scene-item:nth-child(4) { animation-delay: 0.9s; }
.scene-item:nth-child(5) { animation-delay: 1.2s; }
.scene-item:nth-child(6) { animation-delay: 1.5s; }

@keyframes sceneFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.scene-label {
  font-size: 14px;
  color: rgba(255,255,255,0.9);
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* 真实场景图片 */
.scene-card-img {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.scene-img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 300px;
  object-fit: cover;
}

/* 录音区域 */
.recording-area {
  text-align: center;
  padding: 24px 0;
}

.record-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid #4a90d9;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  transition: all 0.3s;
  position: relative;
}

.record-btn .mic-icon {
  width: 32px;
  height: 32px;
  fill: #4a90d9;
}

.record-btn.recording {
  border-color: #ff4444;
  background: #fff0f0;
  animation: pulse 1.5s infinite;
}

.record-btn.recording .mic-icon {
  fill: #ff4444;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,68,68,0.4); }
  70% { box-shadow: 0 0 0 15px rgba(255,68,68,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,68,68,0); }
}

.record-status {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.record-timer {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

/* 音量条 */
.volume-bar-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 30px;
  margin-bottom: 16px;
}

.volume-bar {
  width: 4px;
  height: 6px;
  background: #4a90d9;
  border-radius: 2px;
  transition: height 0.1s;
}

/* ISE 分数显示 */
.ise-score-display {
  display: none;
  background: #f0f6ff;
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
}

.ise-score-display.show {
  display: block;
}

.ise-score-row {
  display: flex;
  justify-content: space-around;
  text-align: center;
}

.ise-score-item {
  flex: 1;
}

.ise-score-item .value {
  font-size: 22px;
  font-weight: 700;
  color: #4a90d9;
}

.ise-score-item .label {
  font-size: 12px;
  color: #888;
  margin-top: 4px;
}

/* 题目操作按钮 */
.question-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.question-actions .btn {
  flex: 1;
}

/* 加载状态 */
.loading {
  text-align: center;
  padding: 40px 20px;
}

.loading .spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e8e8e8;
  border-top-color: #4a90d9;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading p {
  color: #888;
  font-size: 14px;
}

/* 报告区域 */
.report-section {
  margin-bottom: 24px;
}

.total-score {
  text-align: center;
  padding: 24px 0;
}

.total-score .score-value {
  font-size: 56px;
  font-weight: 700;
  color: #4a90d9;
}

.total-score .score-label {
  font-size: 14px;
  color: #888;
}

/* 雷达图容器 */
.radar-chart-container {
  text-align: center;
  margin: 20px 0;
}

.radar-chart-container canvas {
  max-width: 280px;
  max-height: 280px;
}

/* 报告文本 */
.report-text {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  line-height: 1.8;
  font-size: 14px;
}

.report-text h4 {
  font-size: 15px;
  margin-bottom: 8px;
  color: #333;
}

.encouragement-text {
  background: #fff8e1;
  border-radius: 8px;
  padding: 16px;
  font-style: italic;
  color: #6d4c00;
  line-height: 1.6;
  font-size: 14px;
}

/* 历史列表 */
.history-list {
  list-style: none;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 12px;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.history-item:hover {
  background: #f8f9fa;
}

.history-item .left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.history-item .student-name {
  font-size: 15px;
  font-weight: 500;
}

.history-item .date {
  font-size: 12px;
  color: #888;
}

.history-item .score {
  font-size: 24px;
  font-weight: 700;
  color: #4a90d9;
}

/* 成长趋势图 */
.growth-chart-container {
  margin: 20px 0;
}

.growth-chart-container canvas {
  width: 100%;
  height: 250px;
}

.growth-student-select {
  margin-bottom: 16px;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #888;
}

.empty-state p {
  font-size: 14px;
}

/* 提示消息 */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
}

/* 响应式 */
@media (min-width: 480px) {
  .container {
    padding: 0 24px 80px;
  }

  .question-text {
    font-size: 20px;
    padding: 24px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }

  .assessment-tabs a {
    font-size: 15px;
    padding: 14px 12px;
  }
}
