:root {
  --bg: #04101b;
  --card: rgba(10, 30, 46, 0.72);
  --line: rgba(148, 205, 224, 0.16);
  --text: #eaf6fb;
  --muted: #8aa9b8;
  --cyan: #67e8f9;
  --warm: #ff9a5c;
  --warm-2: #ffc46b;
  --correct: #4ade80;
  --wrong: #fb7185;
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  color-scheme: dark;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  background:
    radial-gradient(900px 600px at 88% -12%, rgba(255, 154, 92, 0.2), transparent 62%),
    radial-gradient(820px 620px at -12% 18%, rgba(34, 211, 238, 0.14), transparent 58%),
    linear-gradient(180deg, #071b2b 0%, #04101b 46%, #02080e 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 72%);
  pointer-events: none;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(100% - 32px, 760px);
  margin: 0 auto;
  padding: clamp(28px, 6vw, 52px) 0 40px;
}

.masthead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.kicker {
  margin: 0 0 6px;
  color: var(--warm);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
}

h1 {
  margin: 0;
  font-size: clamp(24px, 4.6vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.score {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 72px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.score span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.score strong {
  color: var(--warm-2);
  font-size: 24px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.progress {
  height: 6px;
  margin-top: 28px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.progress__bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--warm));
  transition: width 0.35s ease;
}

.meta {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.card {
  margin-top: 18px;
  padding: clamp(22px, 4.5vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(14px);
  animation: rise 0.4s ease both;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--warm);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warm);
  box-shadow: 0 0 12px var(--warm);
}

.question {
  margin: 0 0 22px;
  font-size: clamp(19px, 3vw, 24px);
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: -0.01em;
}

.options {
  display: grid;
  gap: 10px;
}

.option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.option:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(103, 232, 249, 0.5);
  background: rgba(103, 232, 249, 0.07);
}

.option:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.option:disabled {
  cursor: default;
}

.option__letter {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.option__text {
  font-size: 15px;
  line-height: 1.5;
}

.option.correct {
  border-color: rgba(74, 222, 128, 0.65);
  background: rgba(74, 222, 128, 0.12);
}

.option.correct .option__letter {
  border-color: transparent;
  background: var(--correct);
  color: #052e16;
}

.option.wrong {
  border-color: rgba(251, 113, 133, 0.65);
  background: rgba(251, 113, 133, 0.1);
}

.option.wrong .option__letter {
  border-color: transparent;
  background: var(--wrong);
  color: #4c0519;
}

.feedback {
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 3px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  animation: fade 0.25s ease both;
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.feedback.is-correct {
  border-left-color: var(--correct);
}

.feedback.is-wrong {
  border-left-color: var(--wrong);
}

.feedback__title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
}

.feedback.is-correct .feedback__title {
  color: var(--correct);
}

.feedback.is-wrong .feedback__title {
  color: var(--wrong);
}

.feedback__text {
  margin: 0;
  color: #b9cfd9;
  font-size: 13.5px;
  line-height: 1.65;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 20px;
  padding: 13px 18px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--warm), var(--warm-2));
  color: #2a1206;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease, background 0.15s ease,
    color 0.15s ease;
}

.btn:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.btn:focus-visible {
  outline: 2px solid var(--warm-2);
  outline-offset: 3px;
}

.btn:disabled {
  background: rgba(255, 255, 255, 0.06);
  color: #5f7b89;
  cursor: not-allowed;
}

.result {
  text-align: center;
}

.result .eyebrow {
  justify-content: center;
}

.result h2 {
  margin: 4px 0 10px;
  font-size: clamp(22px, 4vw, 30px);
  line-height: 1.4;
}

.result h2 span {
  color: var(--warm-2);
  font-variant-numeric: tabular-nums;
}

.result__comment {
  max-width: 28em;
  margin: 0 auto;
  color: var(--muted);
  font-size: 14px;
}

.result .btn {
  max-width: 240px;
  margin-top: 26px;
}

.hint {
  margin: 20px 0 0;
  color: #6f8b99;
  font-size: 12px;
  text-align: center;
}

@media (max-width: 560px) {
  .masthead {
    gap: 12px;
  }

  .tagline {
    display: none;
  }

  .score {
    min-width: 62px;
    padding: 7px 10px;
  }

  .score strong {
    font-size: 20px;
  }

  .option {
    gap: 11px;
    padding: 12px 13px;
  }

  .option__text {
    font-size: 14px;
  }

  .hint {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
