:root {
  color-scheme: dark;
  --bg: #080912;
  --panel: rgba(15, 17, 30, 0.78);
  --panel-solid: #10121f;
  --line: rgba(231, 210, 156, 0.2);
  --gold: #d9b96f;
  --gold-strong: #f2d58d;
  --text: #f6f0df;
  --muted: #b7ad98;
  --blue: #6da7c8;
  --wine: #9d5368;
  --green: #7ea17a;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.46);
  font-family: "Noto Serif SC", "Songti SC", "Microsoft YaHei", serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 25% 0%, rgba(109, 167, 200, 0.2), transparent 28rem),
    radial-gradient(circle at 80% 30%, rgba(157, 83, 104, 0.16), transparent 26rem),
    var(--bg);
  color: var(--text);
}

button {
  font: inherit;
}

.app {
  min-height: 100vh;
}

.screen {
  display: none;
  min-height: 100vh;
}

.screen.is-active {
  display: block;
}

.welcome-screen {
  position: relative;
  overflow: hidden;
}

.hero-bg,
.hero-overlay {
  position: fixed;
  inset: 0;
}

.hero-bg {
  background-image: url("./assets/olympus-oracle-hero.png");
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
}

.hero-overlay {
  background:
    linear-gradient(180deg, rgba(8, 9, 18, 0.36), rgba(8, 9, 18, 0.76) 58%, #080912),
    linear-gradient(90deg, rgba(8, 9, 18, 0.74), rgba(8, 9, 18, 0.2));
}

.welcome-content {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 100vh;
  width: min(760px, calc(100% - 40px));
  margin: 0 auto;
  padding: 16vh 0 9vh;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 18px;
  font-size: clamp(4.6rem, 16vw, 9.5rem);
  line-height: 0.92;
  font-weight: 600;
}

.subtitle {
  max-width: 540px;
  color: #efe6d0;
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  line-height: 1.7;
}

.feature-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 26px;
}

.feature-row span,
.tag-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 13px;
  background: rgba(12, 14, 27, 0.54);
  color: #f1dfb3;
  font-size: 0.9rem;
}

.code-panel {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  border: 1px solid rgba(242, 213, 141, 0.26);
  border-radius: 8px;
  padding: 12px 16px;
  background: rgba(6, 7, 14, 0.52);
}

.code-panel span {
  color: var(--muted);
  font-size: 0.88rem;
}

.code-panel strong {
  color: var(--gold-strong);
  font-family: Georgia, serif;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  padding: 0 24px;
  cursor: pointer;
}

.primary-btn,
.secondary-btn {
  width: fit-content;
  background: linear-gradient(135deg, #f3dc9a, #b4873b);
  color: #16100a;
  box-shadow: 0 16px 42px rgba(180, 135, 59, 0.26);
  font-weight: 700;
}

.ghost-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.quiz-screen,
.result-screen {
  width: min(980px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.icon-btn {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
}

.progress-wrap {
  flex: 1;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--muted);
  font-family: Georgia, serif;
  font-size: 0.85rem;
}

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

.progress-fill {
  height: 100%;
  width: 5%;
  background: linear-gradient(90deg, var(--gold), var(--blue));
  transition: width 240ms ease;
}

.quiz-card,
.report-section,
.report-grid article,
.hidden-card,
.oracle-card,
.share-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quiz-card {
  padding: clamp(24px, 5vw, 52px);
}

.quiz-card h2 {
  min-height: 96px;
  margin-bottom: 26px;
  font-size: clamp(1.55rem, 4vw, 2.35rem);
  line-height: 1.45;
}

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

.option-btn {
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  min-height: 68px;
  border: 1px solid rgba(231, 210, 156, 0.18);
  border-radius: 8px;
  padding: 13px 16px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.option-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(242, 213, 141, 0.48);
  background: rgba(242, 213, 141, 0.08);
}

.option-key {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--gold-strong);
  font-family: Georgia, serif;
}

.result-screen {
  display: none;
}

.result-screen.is-active {
  display: block;
}

.result-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  min-height: 380px;
  margin-bottom: 18px;
  border-radius: 0 0 8px 8px;
  padding: 34px;
  background:
    linear-gradient(180deg, rgba(8, 9, 18, 0.12), rgba(8, 9, 18, 0.84)),
    url("./assets/olympus-oracle-hero.png") center/cover;
  box-shadow: var(--shadow);
}

.result-hero h2 {
  margin-bottom: 10px;
  font-family: Georgia, serif;
  font-size: clamp(3.1rem, 12vw, 7rem);
  line-height: 0.9;
}

.result-title {
  color: #efe6d0;
  font-size: 1.2rem;
}

.score-seal {
  display: grid;
  width: 140px;
  aspect-ratio: 1;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(242, 213, 141, 0.52);
  border-radius: 50%;
  background: rgba(8, 9, 18, 0.6);
  text-align: center;
}

.score-seal span {
  display: block;
  color: var(--gold-strong);
  font-family: Georgia, serif;
  font-size: 2.35rem;
}

.score-seal small {
  color: var(--muted);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.report-section,
.report-grid article,
.hidden-card,
.oracle-card,
.share-preview {
  margin-top: 14px;
  padding: clamp(20px, 4vw, 34px);
}

.report-section h3,
.report-grid h3,
.hidden-card h3,
.oracle-card h3 {
  margin-bottom: 14px;
  color: var(--gold-strong);
  font-size: 1.25rem;
}

.report-section p,
.report-grid p,
.hidden-card p,
.oracle-card blockquote {
  color: #e6decc;
  font-size: 1rem;
  line-height: 1.9;
  white-space: pre-line;
}

.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

ul {
  margin: 0;
  padding-left: 20px;
  color: #e6decc;
  line-height: 1.85;
}

.radar-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 26px;
  align-items: center;
}

#radarCanvas {
  width: 100%;
  max-width: 360px;
}

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

.dimension-item {
  display: grid;
  gap: 6px;
}

.dimension-line {
  display: flex;
  justify-content: space-between;
  color: #efe6d0;
}

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

.dimension-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--wine), var(--blue));
}

.hidden-card strong {
  display: block;
  margin-bottom: 12px;
  color: var(--gold-strong);
  font-size: 1.45rem;
}

.oracle-card blockquote {
  margin: 0;
  color: #fff4d4;
  font-size: clamp(1.2rem, 3vw, 1.7rem);
}

.share-preview {
  display: grid;
  gap: 18px;
}

#shareCanvas {
  width: min(360px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  justify-self: center;
  background: #0d0f1b;
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

@media (max-width: 740px) {
  .welcome-content {
    padding-top: 12vh;
    justify-content: flex-end;
  }

  .result-hero,
  .radar-layout,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .result-hero {
    display: grid;
    align-items: end;
    min-height: 440px;
    padding: 24px;
  }

  .score-seal {
    width: 112px;
  }

  .feature-row span,
  .tag-row span {
    font-size: 0.82rem;
  }
}
