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

body {
  font-family: "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
  /* Green gradient background */
  background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
  min-height: 100vh;
  padding: 20px;
}

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

header {
  text-align: center;
  margin-bottom: 20px;
}

header h1 {
  color: white;
  font-size: 24px;
  margin-bottom: 15px;
}

.progress-container {
  padding: 0 20px;
}

.progress-bar {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  height: 8px;
  overflow: hidden;
}

.progress-fill {
  background: white;
  height: 100%;
  width: 0;
  transition: width 0.3s ease;
}

.screen {
  background: white;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.screen.hidden {
  display: none;
}

/* Start Screen */
.start-content {
  text-align: center;
}

.start-content .icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.description {
  color: #666;
  line-height: 1.8;
  margin-bottom: 25px;
}

.info-box {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 15px;
}

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

.info-label {
  display: block;
  font-size: 12px;
  color: #888;
  margin-bottom: 5px;
}

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

/* Buttons */
.btn {
  padding: 14px 32px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}

.btn.primary {
  /* Green gradient for primary buttons */
  background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
  color: white;
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(76, 175, 80, 0.4);
}

.btn.hidden {
  display: none;
}

/* Question Screen */
.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

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

.level-badge {
  /* Green gradient for badges */
  background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: bold;
}

.timer-badge {
  background: #f8f9fa;
  color: #333;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: bold;
  min-width: 60px;
  text-align: center;
  transition: all 0.3s;
}

.timer-badge.warning {
  background: #ffebee;
  color: #c62828;
  animation: pulse 0.5s infinite alternate;
}

@keyframes pulse {
  from { transform: scale(1); }
  to { transform: scale(1.05); }
}

.question-content {
  text-align: center;
}

.word-card {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 25px;
}

.word-label {
  font-size: 14px;
  color: #888;
  margin-bottom: 15px;
}

.english-word {
  font-size: 36px;
  font-weight: bold;
  color: #333;
  font-family: Georgia, serif;
}

.options-container {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.option-btn {
  width: 100%;
  padding: 16px 20px;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 16px;
  color: #333;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.option-btn:hover:not(:disabled) {
  border-color: #4caf50;
  background: #f8f9ff;
}

.option-btn:disabled {
  cursor: default;
}

.option-btn.correct {
  background: #e8f5e9;
  border-color: #4caf50;
  color: #2e7d32;
}

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

.feedback-area {
  padding: 15px 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  text-align: left;
}

.feedback-area.hidden {
  display: none;
}

.feedback-area.correct {
  background: #e8f5e9;
  color: #2e7d32;
}

.feedback-area.incorrect {
  background: #ffebee;
  color: #c62828;
}

/* Result Screen */
.result-content {
  text-align: center;
}

.result-header {
  margin-bottom: 25px;
}

.result-icon {
  font-size: 56px;
  margin-bottom: 10px;
}

.result-header h2 {
  font-size: 22px;
  color: #333;
}

.vocabulary-result {
  /* Green gradient for result card */
  background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
  color: white;
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 25px;
}

.vocabulary-label {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 10px;
}

.vocabulary-number {
  font-size: 48px;
  font-weight: bold;
  line-height: 1.2;
}

.vocabulary-unit {
  font-size: 24px;
  font-weight: normal;
  margin-left: 5px;
}

.level-description {
  margin-top: 15px;
  font-size: 14px;
  opacity: 0.9;
}

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

.stat-card {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 15px 10px;
}

.stat-value {
  font-size: 20px;
  font-weight: bold;
  color: #333;
}

.stat-label {
  font-size: 12px;
  color: #888;
  margin-top: 5px;
}

.chart-container {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
}

.chart-container h3 {
  font-size: 14px;
  color: #666;
  margin-bottom: 15px;
}

#levelChart {
  width: 100%;
  max-width: 400px;
  height: auto;
}

.chart-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
  font-size: 12px;
  color: #666;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.correct {
  background: #4caf50;
}

.dot.incorrect {
  background: #f44336;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 25px;
  flex-wrap: wrap;
}

.share-btn {
  background-color: #000;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* Responsive */
@media (max-width: 480px) {
  .screen {
    padding: 20px;
  }

  .english-word {
    font-size: 28px;
  }

  .vocabulary-number {
    font-size: 36px;
  }

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

  .info-box {
    flex-direction: column;
  }
}