* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", "Yu Gothic UI", Meiryo, sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: #eee;
}

#app {
  width: 100%;
  max-width: 420px;
  padding: 2rem;
  text-align: center;
}

.screen {
  display: none;
  animation: fadeIn 0.4s ease;
}

.screen.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.label {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: #a0aec0;
}

/* 数字表示画面 */
.number {
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #f6e05e;
  text-shadow: 0 0 20px rgba(246, 224, 94, 0.4);
  margin: 2rem 0;
  min-height: 5rem;
}

.countdown {
  font-size: 1.25rem;
  color: #718096;
  margin-top: 1rem;
}

/* 選択画面 */
.choices {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.choice-btn {
  padding: 1rem 1.5rem;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  border: 2px solid #4a5568;
  border-radius: 12px;
  background: rgba(45, 55, 72, 0.6);
  color: #e2e8f0;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.choice-btn:hover {
  background: rgba(74, 85, 104, 0.8);
  border-color: #718096;
  transform: scale(1.02);
}

.choice-btn:disabled {
  cursor: default;
  opacity: 0.7;
}

.choice-btn.correct {
  background: rgba(72, 187, 120, 0.4);
  border-color: #48bb78;
  color: #9ae6b4;
}

.choice-btn.wrong {
  background: rgba(245, 101, 101, 0.4);
  border-color: #f56565;
  color: #feb2b2;
}

.result {
  font-size: 1.25rem;
  margin: 1rem 0;
  min-height: 2rem;
}

.result.correct {
  color: #68d391;
}

.result.wrong {
  color: #fc8181;
}

.btn-retry {
  margin-top: 1.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a2e;
  background: #f6e05e;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn-retry:hover {
  background: #ecc94b;
  transform: scale(1.05);
}
