/* ============================================
   GOUP 挑战关卡样式
   移动端优先 (375px 基准)
   ============================================ */

.challenge-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 600px;
  margin: 0 auto;
  background: #fafafa;
}

/* ─── 大厅 ─── */
.cl-header {
  padding: 22px 16px 12px;
  text-align: center;
}
.cl-title {
  font-size: 24px;
  font-weight: 800;
  color: #333;
  margin: 0 0 4px;
}
.cl-subtitle {
  font-size: 13px;
  color: #999;
  margin: 0;
}

.cl-subjects {
  padding: 0 12px;
}
.cl-subject-block {
  margin-bottom: 20px;
}
.cl-subject-title {
  font-size: 16px;
  font-weight: 700;
  color: #555;
  margin-bottom: 10px;
  padding-left: 4px;
}

.cl-challenges {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ─── 关卡卡片 ─── */
.cl-card {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  border: 2px solid transparent;
}
.cl-card:active {
  transform: scale(0.96);
}
.cl-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.cl-mastered {
  border-color: #FFD700;
}

.cl-locked {
  opacity: 0.5;
  cursor: default;
  filter: grayscale(0.8);
}
.cl-locked:active {
  transform: none;
}

.cl-card-icon {
  font-size: 32px;
  margin-bottom: 6px;
}
.cl-card-name {
  font-size: 14px;
  font-weight: 700;
  color: #333;
  margin-bottom: 4px;
}
.cl-card-meta {
  font-size: 11px;
  color: #999;
  margin-bottom: 4px;
}
.cl-card-best {
  font-size: 12px;
  font-weight: 600;
  color: #FF9800;
  margin-bottom: 8px;
}
.cl-card-btn {
  font-size: 13px;
  color: #fff;
  background: linear-gradient(135deg, #FF9800, #F57C00);
  border-radius: 8px;
  padding: 6px 0;
  font-weight: 600;
}

.cl-locked .cl-card-btn {
  background: #ccc;
}

/* ─── 游戏界面 ─── */
.cl-play-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}
.cl-back-btn {
  background: none;
  border: none;
  font-size: 15px;
  color: #FF5722;
  cursor: pointer;
  padding: 6px 8px;
  font-weight: 500;
  flex-shrink: 0;
}
.cl-progress-bar {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: #eee;
  overflow: hidden;
}
.cl-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #FF9800, #FF5722);
  border-radius: 3px;
  transition: width 0.3s ease;
}
.cl-timer {
  font-size: 14px;
  font-weight: 700;
  color: #333;
  flex-shrink: 0;
  min-width: 56px;
  text-align: right;
}
.cl-timer-urgent {
  color: #EF5350;
  animation: timerPulse 0.5s ease-in-out infinite;
}
@keyframes timerPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* ─── 生命 ─── */
.cl-lives {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: #fff;
}
.cl-heart {
  font-size: 22px;
  transition: all 0.3s ease;
}
.cl-heart-lost {
  filter: grayscale(1);
  opacity: 0.3;
  transform: scale(0.8);
}

/* ─── 题目区 ─── */
.cl-q-num {
  font-size: 13px;
  color: #FF5722;
  font-weight: 600;
  margin-bottom: 12px;
}
.cl-q-text {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  line-height: 1.5;
  margin-bottom: 20px;
  padding: 16px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #eee;
}
.cl-answer-area {
  display: flex;
  gap: 10px;
}
.cl-answer-input {
  flex: 1;
  border: 2px solid #E0E0E0;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 22px;
  text-align: center;
  outline: none;
  transition: border-color 0.2s;
}
.cl-answer-input:focus {
  border-color: #FF9800;
}
.cl-submit-btn {
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.cl-hint-area {
  margin-top: 14px;
  padding: 12px 14px;
  background: #FFF8E1;
  border-radius: 10px;
  font-size: 13px;
  color: #F57F17;
  animation: fadeInUp 0.3s ease;
}

.cl-footer {
  padding: 12px 16px;
  text-align: center;
}
.cl-score {
  font-size: 18px;
  font-weight: 700;
  color: #FF9800;
}

/* ─── 新纪录 ─── */
.cl-new-record {
  font-size: 18px;
  font-weight: 800;
  color: #FFD700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
  animation: recordGlow 0.8s ease-in-out infinite alternate;
}
@keyframes recordGlow {
  0% { text-shadow: 0 0 6px rgba(255,215,0,0.4); }
  100% { text-shadow: 0 0 18px rgba(255,215,0,0.8); }
}

/* ─── 结果页 ─── */
.cl-result-score {
  font-size: 56px;
  font-weight: 800;
  color: #FF9800;
  margin: 8px 0;
}
.cl-result-unit {
  font-size: 18px;
  color: #999;
  font-weight: 400;
}
.cl-result-stats {
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  margin: 16px 0;
  border: 1px solid #eee;
}
.cl-stat-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  color: #666;
}
.cl-stat-row + .cl-stat-row {
  border-top: 1px solid #f0f0f0;
}
.cl-stat-val {
  font-weight: 600;
  color: #333;
}

/* ─── 雷达图 ─── */
.cl-radar {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 16px 0;
}
.cl-radar-labels {
  display: flex;
  justify-content: space-around;
  width: 200px;
  font-size: 11px;
  color: #999;
  margin-top: -20px;
}

/* ─── 答题详情 ─── */
.cl-review-list {
  margin-top: 16px;
}
.cl-review-title {
  font-size: 15px;
  font-weight: 700;
  color: #333;
  margin-bottom: 10px;
}
.cl-review-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 6px;
  font-size: 13px;
  border-bottom: 1px solid #f0f0f0;
  gap: 8px;
}
.cl-review-item span:first-child {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cl-review-item span:last-child {
  flex-shrink: 0;
  font-size: 12px;
}
.cl-review-ok span:last-child {
  color: #4CAF50;
}
.cl-review-err span:last-child {
  color: #EF5350;
}
