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

:root {
  --black: #111;
  --white: #fff;
  --gray: #888;
  --light: #f2f2f2;
  --accent: #111;
  --radius: 12px;
  --font-main: 'Noto Sans JP', sans-serif;
  --font-mono: 'Space Mono', monospace;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--white);
  color: var(--black);
  font-family: var(--font-main);
}

#app {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ── SCREENS ── */
.screen {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  animation: fadeIn 0.3s ease;
}

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

/* ── START SCREEN ── */
.start-title {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.15em;
  color: var(--gray);
  margin-bottom: 12px;
  text-transform: uppercase;
}

.start-icon {
  font-size: 56px;
  margin-bottom: 16px;
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.start-heading {
  font-size: 26px;
  font-weight: 700;
  text-align: center;
  line-height: 1.4;
  margin-bottom: 10px;
}

.start-sub {
  font-size: 13px;
  color: var(--gray);
  text-align: center;
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 300px;
}

.btn-primary {
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: 14px 40px;
  font-size: 16px;
  font-family: var(--font-main);
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary:active {
  opacity: 0.75;
}

/* ── QUIZ SCREEN ── */
.quiz-screen {
  justify-content: flex-start;
  padding-top: 0;
  gap: 0;
}

.quiz-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 8px;
  flex-shrink: 0;
}

.quiz-progress-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gray);
}

.quiz-score {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--black);
  font-weight: 700;
}

.progress-bar-wrap {
  width: 100%;
  height: 3px;
  background: var(--light);
  flex-shrink: 0;
}

.progress-bar-fill {
  height: 3px;
  background: var(--black);
  transition: width 0.4s ease;
}

.quiz-body {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 20px 20px 12px;
  overflow: hidden;
}

.category-tag {
  display: inline-block;
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  color: var(--gray);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.question-text {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 6px;
  flex-shrink: 0;
}

.hint-area {
  font-size: 13px;
  color: var(--gray);
  line-height: 1.6;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  overflow: hidden;
  justify-content: center;
}

.option-btn {
  width: 100%;
  background: var(--light);
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 14px;
  font-family: var(--font-main);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
  color: var(--black);
}

.option-btn:active:not(:disabled) {
  background: #e0e0e0;
}

.option-btn.correct {
  background: #e6f9ec;
  border-color: #2ecc71;
  color: #0a6e35;
}

.option-btn.wrong {
  background: #fde8e8;
  border-color: #e74c3c;
  color: #8b1a1a;
}

.option-btn.reveal {
  background: #e6f9ec;
  border-color: #2ecc71;
  color: #0a6e35;
}

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

/* ── RESULT PANEL ── */
.result-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--light);
  padding: 16px 20px 24px;
  animation: slideUp 0.3s ease;
  z-index: 10;
}

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

.result-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.result-label.ok  { color: #2ecc71; }
.result-label.ng  { color: #e74c3c; }

.result-fact {
  font-size: 13px;
  line-height: 1.7;
  color: var(--black);
  margin-bottom: 16px;
}

.result-fact strong {
  font-weight: 700;
}

.btn-next {
  width: 100%;
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-main);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.15s;
}

.btn-next:active { opacity: 0.75; }

/* ── FINISH SCREEN ── */
.finish-score-ring {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid var(--black);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  position: relative;
}

.finish-score-num {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
}

.finish-score-denom {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--gray);
}

.finish-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  text-align: center;
}

.finish-msg {
  font-size: 13px;
  color: var(--gray);
  line-height: 1.7;
  text-align: center;
  max-width: 280px;
  margin-bottom: 32px;
}

.finish-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 300px;
}

.btn-secondary {
  background: var(--white);
  color: var(--black);
  border: 2px solid var(--black);
  border-radius: var(--radius);
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-main);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s;
}

.btn-secondary:active { background: var(--light); }

/* ── CURIOSITY METER ── */
.curiosity-meter {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px 12px;
  flex-shrink: 0;
}

.meter-label {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--gray);
  white-space: nowrap;
}

.meter-bar-bg {
  flex: 1;
  height: 4px;
  background: var(--light);
  border-radius: 2px;
  overflow: hidden;
}

.meter-bar-fill {
  height: 4px;
  background: var(--black);
  border-radius: 2px;
  transition: width 0.6s cubic-bezier(.34,1.56,.64,1);
}

.meter-emoji {
  font-size: 14px;
}