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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

#game-container {
  width: 100%;
  max-width: 900px;
  min-height: 600px;
}

.screen {
  display: none;
  animation: fadeIn 0.5s ease-in;
}

.screen.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 开始界面 */
#start-screen {
  background: white;
  border-radius: 20px;
  padding: 60px 40px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.title-wrapper {
  margin-bottom: 40px;
}

.game-title {
  font-size: 48px;
  color: #667eea;
  margin-bottom: 10px;
  font-weight: 700;
}

.game-subtitle {
  font-size: 28px;
  color: #764ba2;
  font-weight: 600;
}

.start-info {
  margin: 40px 0;
  padding: 30px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: 15px;
}

.start-info p {
  font-size: 18px;
  color: #333;
  margin: 15px 0;
  line-height: 1.6;
}

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

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
}

/* 游戏界面 */
#game-screen {
  background: white;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.game-header {
  margin-bottom: 30px;
}

.score-panel {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
}

.stat {
  text-align: center;
}

.stat .label {
  display: block;
  font-size: 14px;
  color: #666;
  margin-bottom: 5px;
}

.stat .value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: #667eea;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  transition: width 0.5s ease;
  width: 0%;
}

.question-card {
  background: #f8f9fa;
  border-radius: 15px;
  padding: 30px;
  min-height: 400px;
}

.category-badge {
  display: inline-block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
}

.question-title {
  font-size: 20px;
  color: #333;
  margin-bottom: 20px;
  line-height: 1.6;
}

.question-content {
  font-size: 16px;
  color: #555;
  margin-bottom: 25px;
  line-height: 1.8;
  white-space: pre-line;
}

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

.option-btn {
  background: white;
  border: 2px solid #e0e0e0;
  padding: 18px 25px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  font-size: 16px;
  color: #333;
  font-weight: 500;
}

.option-btn:hover {
  border-color: #667eea;
  background: #f0f4ff;
  transform: translateX(5px);
}

.option-btn.selected {
  border-color: #667eea;
  background: #667eea;
  color: white;
}

.option-btn.correct {
  border-color: #4caf50;
  background: #4caf50;
  color: white;
}

.option-btn.incorrect {
  border-color: #f44336;
  background: #f44336;
  color: white;
}

.option-btn:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.feedback {
  margin-top: 25px;
  padding: 20px;
  border-radius: 12px;
  font-size: 16px;
  line-height: 1.6;
  display: none;
}

.feedback.show {
  display: block;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.feedback.correct {
  background: #e8f5e9;
  border: 2px solid #4caf50;
  color: #2e7d32;
}

.feedback.incorrect {
  background: #ffebee;
  border: 2px solid #f44336;
  color: #c62828;
}

/* 结束界面 */
#end-screen {
  background: white;
  border-radius: 20px;
  padding: 50px 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.result-card {
  max-width: 600px;
  margin: 0 auto;
}

.result-title {
  font-size: 36px;
  color: #667eea;
  margin-bottom: 40px;
  font-weight: 700;
}

.result-stats {
  display: flex;
  justify-content: space-around;
  margin-bottom: 40px;
  padding: 30px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: 15px;
}

.result-item {
  text-align: center;
}

.result-label {
  display: block;
  font-size: 16px;
  color: #666;
  margin-bottom: 10px;
}

.result-value {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: #667eea;
}

.performance-message {
  font-size: 20px;
  color: #333;
  margin-bottom: 30px;
  padding: 20px;
  background: #fff3cd;
  border-radius: 10px;
  font-weight: 600;
}

@media (max-width: 768px) {
  .game-title {
    font-size: 32px;
  }

  .game-subtitle {
    font-size: 20px;
  }

  .start-info p {
    font-size: 16px;
  }

  .question-title {
    font-size: 18px;
  }

  .result-stats {
    flex-direction: column;
    gap: 20px;
  }
}
