:root {
  color-scheme: dark;
  --bg-ink: #050913;
  --bg-night: #0d1630;
  --panel: rgba(9, 16, 33, 0.74);
  --panel-strong: rgba(12, 20, 39, 0.9);
  --panel-soft: rgba(255, 255, 255, 0.04);
  --line: rgba(243, 207, 121, 0.18);
  --line-strong: rgba(243, 207, 121, 0.34);
  --gold: #f3cf79;
  --gold-hot: #ffdca2;
  --mist: #ced7ed;
  --text: #f7f0dc;
  --muted: #98a7c7;
  --blue: #89b8ff;
  --rose: #cc6e8b;
  --glow: 0 28px 90px rgba(0, 0, 0, 0.48);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  font-family:
    "Avenir Next",
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    sans-serif;
  background:
    radial-gradient(circle at top, rgba(73, 104, 188, 0.22), transparent 34%),
    radial-gradient(circle at 80% 20%, rgba(204, 110, 139, 0.16), transparent 24%),
    linear-gradient(160deg, #04070f 0%, #0a1430 52%, #100d22 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background-image:
    radial-gradient(circle at 14% 20%, rgba(255, 255, 255, 0.85) 0 1px, transparent 1.6px),
    radial-gradient(circle at 80% 26%, rgba(255, 255, 255, 0.55) 0 1px, transparent 1.7px),
    radial-gradient(circle at 68% 74%, rgba(255, 255, 255, 0.42) 0 1px, transparent 1.6px),
    radial-gradient(circle at 28% 80%, rgba(255, 255, 255, 0.24) 0 1px, transparent 1.4px),
    radial-gradient(circle at 48% 48%, rgba(255, 255, 255, 0.18) 0 1px, transparent 1.2px);
  background-size: 360px 360px;
  opacity: 0.38;
}

body::after {
  background:
    linear-gradient(transparent 0%, rgba(255, 255, 255, 0.018) 50%, transparent 100%),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 84px,
      rgba(255, 255, 255, 0.02) 85px,
      rgba(255, 255, 255, 0.02) 86px
    );
  mix-blend-mode: screen;
  opacity: 0.22;
}

.backdrop,
.starfield,
.quiz-aura,
.result-sky {
  pointer-events: none;
}

.backdrop {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.32;
}

.backdrop-left {
  top: -10rem;
  left: -8rem;
  width: 34rem;
  height: 34rem;
  background: rgba(71, 105, 176, 0.48);
}

.backdrop-mid {
  top: 18rem;
  right: 22%;
  width: 20rem;
  height: 20rem;
  background: rgba(243, 207, 121, 0.14);
}

.backdrop-right {
  right: -10rem;
  bottom: -12rem;
  width: 34rem;
  height: 34rem;
  background: rgba(170, 89, 140, 0.28);
}

.starfield {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 10% 30%, rgba(255, 255, 255, 0.5) 0 1px, transparent 1.8px),
    radial-gradient(circle at 74% 18%, rgba(255, 255, 255, 0.52) 0 1px, transparent 1.8px),
    radial-gradient(circle at 66% 68%, rgba(255, 255, 255, 0.45) 0 1px, transparent 1.8px);
  background-size: 420px 420px;
  opacity: 0.24;
  animation: drift 18s linear infinite;
}

.page-shell {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 72px;
}

.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(9, 18, 35, 0.9), rgba(7, 13, 26, 0.82)),
    var(--panel);
  box-shadow: var(--glow);
  backdrop-filter: blur(24px);
}

.panel::before,
.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.panel::before {
  background:
    linear-gradient(135deg, rgba(243, 207, 121, 0.12), transparent 20%),
    linear-gradient(330deg, rgba(137, 184, 255, 0.08), transparent 24%);
}

.panel::after {
  inset: 1px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.hero,
.quiz,
.result {
  padding: 40px;
  animation: panel-rise 720ms ease both;
}

.eyebrow,
.info-kicker,
.question-tone,
.result-label {
  margin: 0;
  color: var(--gold);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1,
.quiz h2,
.result h2,
.question-card h3,
.ranking-header h3 {
  margin: 0;
  font-family:
    "Baskerville",
    "Palatino Linotype",
    "Songti SC",
    "STSong",
    serif;
  font-weight: 600;
}

.hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 28px;
  align-items: stretch;
}

.hero-copyblock {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

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

.badge {
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(243, 207, 121, 0.14);
  color: var(--mist);
  font-size: 0.92rem;
}

.hero h1 {
  max-width: 11ch;
  font-size: clamp(3.2rem, 5.4vw, 6rem);
  line-height: 0.94;
  text-wrap: balance;
}

.hero-copy {
  max-width: 58rem;
  margin: 20px 0 0;
  color: var(--mist);
  line-height: 1.9;
  font-size: 1.06rem;
}

.oracle-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  padding: 24px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top, rgba(243, 207, 121, 0.1), transparent 46%),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(243, 207, 121, 0.14);
}

.oracle-ring {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(243, 207, 121, 0.12), transparent 35%),
    radial-gradient(circle at center, rgba(137, 184, 255, 0.1), transparent 62%);
}

.oracle-ring::before,
.oracle-ring::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  inset: 12%;
  border: 1px solid rgba(243, 207, 121, 0.2);
  box-shadow: inset 0 0 36px rgba(243, 207, 121, 0.06);
}

.oracle-ring::after {
  inset: 2.5%;
  border-style: dashed;
  border-color: rgba(137, 184, 255, 0.22);
  animation: spin 18s linear infinite;
}

.oracle-core {
  position: relative;
  display: grid;
  place-items: center;
  width: 42%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.18), transparent 32%),
    rgba(10, 20, 36, 0.86);
  border: 1px solid rgba(243, 207, 121, 0.24);
  text-align: center;
}

.oracle-core-label {
  font-size: 0.72rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.oracle-core strong {
  font-family:
    "Baskerville",
    "Palatino Linotype",
    "Songti SC",
    serif;
  font-size: 1.6rem;
  font-weight: 600;
}

.ring-text {
  position: absolute;
  width: 76%;
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ring-text-top {
  top: 15%;
}

.ring-text-bottom {
  bottom: 15%;
}

.oracle-stack {
  display: grid;
  gap: 12px;
}

.oracle-chip,
.info-card,
.result-card,
.ranking-card {
  position: relative;
  z-index: 1;
  padding: 20px 22px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(243, 207, 121, 0.12);
}

.oracle-chip strong,
.info-card h2 {
  display: block;
  margin: 0;
  font-family:
    "Iowan Old Style",
    "Palatino Linotype",
    "Songti SC",
    serif;
  font-size: 1.18rem;
  font-weight: 600;
}

.oracle-chip span,
.info-card p,
.result-card p,
.ranking-row p {
  display: block;
  margin: 8px 0 0;
  color: var(--mist);
  line-height: 1.76;
}

.hero-grid,
.result-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  align-items: center;
  margin-top: 30px;
}

.primary-btn,
.secondary-btn,
.answer-btn {
  position: relative;
  border: 0;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    opacity 180ms ease;
}

.primary-btn,
.secondary-btn {
  min-height: 54px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  font-family:
    "Avenir Next",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
}

.primary-btn {
  color: #1c180f;
  background: linear-gradient(135deg, #ffe29d 0%, #e3b257 100%);
  box-shadow: 0 16px 36px rgba(227, 178, 87, 0.26);
}

.secondary-btn {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(243, 207, 121, 0.18);
}

.primary-btn:hover,
.secondary-btn:hover,
.answer-btn:hover {
  transform: translateY(-2px);
}

.secondary-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.primary-btn:focus-visible,
.secondary-btn:focus-visible,
.answer-btn:focus-visible {
  outline: 2px solid rgba(255, 220, 162, 0.92);
  outline-offset: 3px;
}

.note {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.hidden {
  display: none;
}

.quiz,
.result {
  margin-top: 18px;
}

.quiz-aura,
.result-sky {
  position: absolute;
  inset: auto;
  border-radius: 50%;
  filter: blur(24px);
  opacity: 0.8;
}

.quiz-aura {
  top: -7rem;
  right: -5rem;
  width: 20rem;
  height: 20rem;
  background: radial-gradient(circle, rgba(137, 184, 255, 0.16), transparent 66%);
}

.result-sky {
  top: -9rem;
  left: -2rem;
  width: 26rem;
  height: 26rem;
  background: radial-gradient(circle, rgba(243, 207, 121, 0.16), transparent 68%);
}

.quiz-topline,
.result-head,
.ranking-header {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

.quiz h2 {
  margin-top: 8px;
  font-size: clamp(2.1rem, 3.6vw, 3.2rem);
}

.quiz-top-meta {
  display: flex;
  gap: 12px;
  align-items: center;
}

.progress-label {
  color: var(--mist);
  font-size: 0.98rem;
}

.nav-btn {
  min-height: 46px;
  padding: 0 18px;
}

.progress-track {
  position: relative;
  z-index: 1;
  height: 12px;
  margin-top: 22px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.progress-fill {
  position: relative;
  height: 100%;
  width: 10%;
  border-radius: inherit;
  background: linear-gradient(90deg, #85b7ff 0%, #f5d68a 100%);
  box-shadow: 0 0 28px rgba(133, 183, 255, 0.2);
  transition: width 280ms ease;
}

.progress-spark {
  position: absolute;
  top: 50%;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0));
  transform: translateY(-50%);
}

.question-card {
  position: relative;
  z-index: 1;
  margin-top: 24px;
  padding: 30px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(12, 24, 43, 0.84), rgba(7, 15, 30, 0.74)),
    var(--panel);
  border: 1px solid rgba(243, 207, 121, 0.14);
}

.question-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.question-hint,
.quiz-counter-pill {
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(243, 207, 121, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--mist);
  font-size: 0.92rem;
}

.question-card h3 {
  margin-top: 16px;
  font-size: clamp(1.82rem, 2.4vw, 2.55rem);
  line-height: 1.34;
}

.answers {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 28px;
}

.answer-btn {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  align-items: start;
  min-height: 124px;
  padding: 18px;
  border-radius: 20px;
  text-align: left;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(243, 207, 121, 0.12);
  font: inherit;
  line-height: 1.7;
}

.answer-btn:hover {
  border-color: rgba(243, 207, 121, 0.3);
  background:
    linear-gradient(180deg, rgba(243, 207, 121, 0.12), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.04);
}

.answer-btn.is-selected {
  border-color: rgba(243, 207, 121, 0.4);
  background:
    linear-gradient(180deg, rgba(243, 207, 121, 0.18), rgba(137, 184, 255, 0.08)),
    rgba(255, 255, 255, 0.06);
  box-shadow: 0 18px 40px rgba(18, 31, 58, 0.38);
}

.answer-index {
  display: grid;
  place-items: center;
  width: 56px;
  aspect-ratio: 1;
  border-radius: 16px;
  border: 1px solid rgba(243, 207, 121, 0.18);
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.18), transparent 36%),
    rgba(10, 18, 34, 0.82);
  color: var(--gold-hot);
  font-family:
    "Baskerville",
    "Palatino Linotype",
    "Songti SC",
    serif;
  font-size: 1.18rem;
  font-weight: 700;
}

.answer-copy strong {
  display: block;
  font-size: 1.02rem;
  font-weight: 700;
}

.answer-copy span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.92rem;
}

.quiz-footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-top: 20px;
}

.result-head {
  align-items: flex-start;
}

.result-head h2 {
  margin-top: 6px;
  font-size: clamp(2.5rem, 4.4vw, 4.7rem);
}

.result-subtitle {
  margin: 10px 0 0;
  color: var(--mist);
  font-size: 1.08rem;
}

.score-orb {
  position: relative;
  min-width: 156px;
  padding: 22px 22px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top, rgba(243, 207, 121, 0.2), transparent 58%),
    rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(243, 207, 121, 0.18);
  text-align: center;
}

.score-orb::before {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 30px;
  border: 1px solid rgba(243, 207, 121, 0.08);
}

.score-orb span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.score-orb strong {
  display: block;
  margin-top: 8px;
  color: var(--gold);
  font-family:
    "Baskerville",
    "Palatino Linotype",
    "Songti SC",
    serif;
  font-size: 2.7rem;
}

.result-summary {
  position: relative;
  z-index: 1;
  max-width: 54rem;
  margin: 22px 0 0;
  color: var(--mist);
  font-size: 1.06rem;
  line-height: 1.86;
}

.trait-pills {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.trait-pill {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(243, 207, 121, 0.12);
  background:
    linear-gradient(135deg, rgba(243, 207, 121, 0.12), rgba(137, 184, 255, 0.08)),
    rgba(255, 255, 255, 0.03);
  font-size: 0.94rem;
}

.result-grid {
  margin-top: 22px;
}

.accent-card {
  background:
    linear-gradient(145deg, rgba(243, 207, 121, 0.16), transparent 46%),
    rgba(255, 255, 255, 0.04);
}

.ranking-card {
  margin-top: 22px;
}

.ranking-header h3 {
  margin-top: 8px;
  font-size: 1.66rem;
}

.ranking-list {
  margin-top: 20px;
  display: grid;
  gap: 16px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 140px 1fr 72px;
  gap: 14px;
  align-items: center;
}

.ranking-row strong {
  font-weight: 700;
}

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

.ranking-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #85b7ff 0%, #f3cf79 100%);
}

.result-actions {
  margin-top: 28px;
}

.flash {
  animation: flash 1.8s ease;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(-18px, 14px, 0);
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

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

@keyframes flash {
  0%,
  100% {
    opacity: 1;
  }
  35% {
    opacity: 0.48;
  }
}

@media (max-width: 1020px) {
  .hero-layout,
  .hero-grid,
  .result-grid {
    grid-template-columns: 1fr;
  }

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

  .result-head,
  .quiz-topline,
  .ranking-header,
  .quiz-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .ranking-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    padding: 18px 0 44px;
  }

  .hero,
  .quiz,
  .result {
    padding: 24px;
  }

  .hero h1 {
    max-width: none;
    font-size: clamp(2.6rem, 14vw, 4.2rem);
  }

  .hero-copy,
  .result-summary,
  .info-card p,
  .result-card p,
  .oracle-chip span {
    font-size: 0.98rem;
  }

  .question-card {
    padding: 22px 18px;
  }

  .question-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .question-card h3 {
    font-size: 1.5rem;
  }

  .answer-btn {
    grid-template-columns: 48px 1fr;
    min-height: 110px;
    padding: 16px;
  }

  .answer-index {
    width: 48px;
    border-radius: 14px;
  }

  .quiz-top-meta {
    width: 100%;
    flex-wrap: wrap;
  }

  .nav-btn,
  .primary-btn,
  .secondary-btn {
    width: 100%;
    justify-content: center;
  }

  .score-orb {
    min-width: 100%;
  }
}
