* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background: #f5f5f5;
  color: #333;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: #fff;
}

.screen {
  min-height: 100vh;
  padding: 20px;
}

.hidden {
  display: none;
}

/* 首页 */
.header {
  text-align: center;
  padding: 20px 0;
  border-bottom: 1px solid #eee;
  margin-bottom: 20px;
}

.header h1 {
  font-size: 24px;
  color: #333;
  margin-bottom: 12px;
}

.title-info {
  font-size: 18px;
  font-weight: 600;
  color: #4a90d9;
  margin-bottom: 10px;
}

.progress-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.progress-bar .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #ddd;
  background: #fff;
  transition: all 0.3s;
}

.progress-bar .dot.filled {
  background: #4a90d9;
  border-color: #4a90d9;
}

.progress-bar .next-title {
  font-size: 13px;
  color: #999;
  margin-left: 8px;
}

/* 关卡网格 */
.level-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.level-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 48px;
  min-width: 48px;
}

.level-cell.completed {
  background: #4a90d9;
  color: #fff;
}

.level-cell.unlocked {
  background: #e8f0fe;
  color: #4a90d9;
  border: 2px solid #4a90d9;
}

.level-cell.locked {
  background: #f5f5f5;
  color: #ccc;
  cursor: not-allowed;
}

/* 答题页 */
.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.back-btn {
  background: none;
  border: none;
  font-size: 16px;
  color: #4a90d9;
  cursor: pointer;
  min-height: 44px;
}

.quiz-progress {
  font-size: 16px;
  color: #999;
}

.quiz-body {
  text-align: center;
}

.question-prompt {
  font-size: 28px;
  font-weight: 700;
  margin: 40px 0;
  color: #333;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.option-btn {
  width: 100%;
  min-height: 56px;
  padding: 14px 20px;
  font-size: 18px;
  border: 2px solid #ddd;
  border-radius: 12px;
  background: #fff;
  color: #333;
  cursor: pointer;
  transition: all 0.2s;
}

.option-btn:active {
  transform: scale(0.98);
}

.option-btn.correct {
  background: #d4edda;
  border-color: #28a745;
  color: #155724;
}

.option-btn.wrong {
  background: #f8d7da;
  border-color: #dc3545;
  color: #721c24;
}

.option-btn.disabled {
  pointer-events: none;
  opacity: 0.6;
}

/* 结果页 */
.result-body {
  text-align: center;
  padding-top: 60px;
}

.result-body h2 {
  font-size: 28px;
  margin-bottom: 20px;
}

.result-score {
  font-size: 48px;
  font-weight: 700;
  color: #4a90d9;
  margin: 20px 0;
}

.result-message {
  font-size: 16px;
  color: #666;
  margin-bottom: 30px;
}

.result-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 20px;
}

.btn {
  min-height: 48px;
  min-width: 120px;
  padding: 12px 24px;
  font-size: 16px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: #4a90d9;
  color: #fff;
}

.btn-secondary {
  background: #e8e8e8;
  color: #333;
}

.btn-text {
  background: none;
  color: #4a90d9;
}

.pass {
  color: #28a745;
}

.fail {
  color: #dc3545;
}
