:root {
  color-scheme: dark;
  --bg: #07080d;
  --panel: rgba(13, 18, 27, 0.86);
  --panel-strong: rgba(20, 27, 39, 0.96);
  --text: #f8efe2;
  --muted: #b8b0a8;
  --line: rgba(255, 255, 255, 0.14);
  --cyan: #55d8d8;
  --red: #ef5753;
  --gold: #f1c15d;
  --green: #9dd978;
  --violet: #a98cff;
  font-family:
    Inter, "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui,
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

button {
  font: inherit;
}

.app {
  min-height: 100vh;
  overflow: hidden;
}

.hero,
.quiz,
.result {
  min-height: 100vh;
  position: relative;
}

.hero {
  display: grid;
  align-content: center;
  padding: 8vh clamp(18px, 5vw, 72px) 112px;
  background:
    linear-gradient(90deg, rgba(7, 8, 13, 0.9), rgba(7, 8, 13, 0.2) 58%, rgba(7, 8, 13, 0.72)),
    url("assets/hero-ghost.png") center / cover no-repeat;
}

.hero__backdrop,
.result__visual {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 35%, rgba(85, 216, 216, 0.22), transparent 28%),
    radial-gradient(circle at 74% 30%, rgba(239, 87, 83, 0.18), transparent 22%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  max-width: 680px;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 20px;
  font-size: clamp(52px, 9vw, 118px);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero__copy {
  max-width: 560px;
  margin-bottom: 30px;
  color: #efe8dc;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.55;
}

.hero__actions,
.result__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.primary-button,
.ghost-button {
  min-height: 46px;
  border-radius: 8px;
  padding: 0 20px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.primary-button {
  background: var(--red);
  color: white;
  font-weight: 800;
  box-shadow: 0 18px 42px rgba(239, 87, 83, 0.22);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-color: var(--line);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.meta {
  color: var(--muted);
  font-size: 14px;
}

.type-strip {
  position: absolute;
  left: clamp(18px, 5vw, 72px);
  right: clamp(18px, 5vw, 72px);
  bottom: 28px;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
}

.type-strip span {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 10px;
  background: rgba(7, 8, 13, 0.52);
  color: #f9ead7;
  text-align: center;
  font-size: 14px;
  white-space: nowrap;
}

.quiz {
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 24px clamp(16px, 4vw, 56px) 40px;
  background:
    linear-gradient(rgba(7, 8, 13, 0.83), rgba(7, 8, 13, 0.94)),
    url("assets/hero-ghost.png") center / cover fixed no-repeat;
}

.quiz__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.progress {
  width: min(420px, 56vw);
  color: var(--muted);
  font-size: 14px;
}

.progress__bar {
  height: 8px;
  margin-top: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.progress__bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--gold), var(--red));
  transition: width 220ms ease;
}

.question-panel {
  align-self: center;
  width: min(820px, 100%);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(22px, 4vw, 46px);
  background: var(--panel);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(18px);
}

.question-panel__tag {
  color: var(--gold);
  font-size: 14px;
  font-weight: 800;
}

.question-panel h2 {
  margin-bottom: 24px;
  font-size: clamp(27px, 4vw, 46px);
  line-height: 1.15;
  letter-spacing: 0;
}

.answers {
  display: grid;
  gap: 12px;
}

.answer {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.answer:hover {
  border-color: rgba(85, 216, 216, 0.6);
  background: rgba(85, 216, 216, 0.12);
}

.result {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: clamp(20px, 4vw, 52px);
  background:
    linear-gradient(120deg, rgba(7, 8, 13, 0.95), rgba(7, 8, 13, 0.72)),
    url("assets/hero-ghost.png") center / cover fixed no-repeat;
}

.result__content {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  margin: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(22px, 4vw, 44px);
  background: var(--panel-strong);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

.result h2 {
  margin-bottom: 8px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: 0;
}

.result__hero {
  display: grid;
  grid-template-columns: minmax(190px, 280px) minmax(0, 1fr);
  gap: clamp(18px, 4vw, 34px);
  align-items: center;
}

.result-figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(85, 216, 216, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.32);
}

.result-figure img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.result__title {
  margin-bottom: 18px;
  color: var(--gold);
  font-size: 22px;
  font-weight: 800;
}

.result__summary {
  max-width: 760px;
  color: #eee1cf;
  font-size: 18px;
  line-height: 1.6;
}

.boss-card {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 12px;
  align-items: center;
  margin: 26px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}

.boss-card span,
.boss-card small {
  color: var(--muted);
}

.boss-card strong {
  color: var(--red);
  font-size: 42px;
  line-height: 1;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.stat span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.stat strong {
  display: block;
  margin-bottom: 10px;
  font-size: 28px;
}

.meter {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  overflow: hidden;
}

.meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--cyan);
}

.review {
  margin: 26px 0;
  padding: 18px;
  border-radius: 8px;
  background: rgba(85, 216, 216, 0.1);
  border: 1px solid rgba(85, 216, 216, 0.28);
}

.review h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

.review p {
  margin-bottom: 0;
  color: #e5fafa;
  line-height: 1.65;
}

.review-angle {
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.review-angle:first-of-type {
  border-top: 0;
  padding-top: 4px;
}

.review-angle h4 {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 14px;
}

.association-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.association-tags span {
  border: 1px solid rgba(85, 216, 216, 0.34);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(7, 8, 13, 0.32);
  color: #e5fafa;
  font-size: 13px;
}

.related-list {
  display: grid;
  gap: 10px;
}

.related-list p {
  margin: 0;
}

.related-list strong {
  display: inline-block;
  min-width: 78px;
  margin-right: 8px;
  color: var(--text);
}

.is-hidden {
  display: none;
}

@media (max-width: 820px) {
  .hero {
    min-height: 100svh;
    padding-bottom: 156px;
    background-position: center;
  }

  .type-strip,
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quiz__header {
    align-items: stretch;
    flex-direction: column;
  }

  .progress {
    width: 100%;
  }

  .boss-card {
    grid-template-columns: 1fr;
  }

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

  .result-figure {
    width: min(280px, 100%);
  }
}

@media (max-width: 520px) {
  .hero {
    padding-top: 76px;
    align-content: start;
  }

  .hero__actions,
  .result__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .type-strip,
  .stats {
    grid-template-columns: 1fr 1fr;
    left: 16px;
    right: 16px;
    bottom: 16px;
  }

  .type-strip span {
    padding: 10px 6px;
    font-size: 12px;
  }

  .quiz {
    min-height: 100svh;
    padding: 16px;
  }

  .question-panel {
    padding: 20px;
  }
}
