:root {
  color-scheme: dark;
  --bg: #0c0812;
  --surface: rgba(28, 19, 39, 0.88);
  --surface-strong: #21172d;
  --line: rgba(255, 255, 255, 0.1);
  --text: #fbf7ff;
  --muted: #aa9eb8;
  --purple: #9c74ff;
  --purple-light: #c8adff;
  --rose: #ff789e;
  --gold: #ffcf7d;
  --danger: #ff7785;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -10%, rgba(111, 62, 163, 0.28), transparent 35%),
    linear-gradient(180deg, #100a19 0%, var(--bg) 65%);
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--purple-light);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.page-glow {
  position: fixed;
  z-index: 0;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.18;
  pointer-events: none;
}

.page-glow--top {
  top: -120px;
  right: -100px;
  background: var(--purple);
}

.page-glow--bottom {
  bottom: -140px;
  left: -120px;
  background: var(--rose);
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 480px);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(20, 13, 30, 0.92), rgba(10, 7, 15, 0.97));
  box-shadow: var(--shadow);
}

.mini-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 42px 1fr 72px;
  align-items: center;
  min-height: 66px;
  padding: max(8px, env(safe-area-inset-top)) 14px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(14, 9, 21, 0.74);
  backdrop-filter: blur(18px);
}

.icon-button {
  grid-column: 1;
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.icon-button svg,
.primary-button svg,
.quiz-footer svg {
  width: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mini-bar__brand {
  grid-column: 2;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-width: 0;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.mini-bar__brand img {
  width: 23px;
  height: 23px;
}

.mini-capsule {
  grid-column: 3;
  display: flex;
  height: 34px;
  gap: 9px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.mini-capsule span {
  margin-top: -7px;
  font-size: 16px;
  letter-spacing: 1px;
}

.mini-capsule i {
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px #16101f;
  background: rgba(255, 255, 255, 0.75);
}

.app-main {
  min-height: calc(100svh - 66px);
}

.screen {
  display: none;
  min-height: calc(100svh - 66px);
  padding: 34px 24px max(30px, env(safe-area-inset-bottom));
}

.screen--active {
  display: flex;
  animation: screen-in 360ms ease both;
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-screen {
  flex-direction: column;
  align-items: stretch;
  padding-top: 46px;
  text-align: center;
}

.eyebrow {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 0 0 14px;
  color: var(--purple-light);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.19em;
}

.eyebrow > span {
  display: inline-block;
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--purple-light));
}

.eyebrow > span:last-child {
  background: linear-gradient(90deg, var(--purple-light), transparent);
}

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

.hero-copy .eyebrow {
  justify-content: center;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(38px, 10.5vw, 52px);
  line-height: 1.13;
  letter-spacing: -0.065em;
}

.hero-copy h1 em {
  color: transparent;
  background: linear-gradient(120deg, #fbf7ff 0%, var(--purple-light) 48%, var(--rose) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  font-style: normal;
}

.hero-description,
.section-description {
  max-width: 350px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.energy-orbit {
  position: relative;
  display: grid;
  width: 230px;
  height: 230px;
  margin: 34px auto 28px;
  place-items: center;
}

.energy-orbit::before {
  position: absolute;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(151, 97, 255, 0.3);
  filter: blur(35px);
  content: "";
}

.orbit {
  position: absolute;
  border: 1px solid rgba(197, 169, 255, 0.2);
  border-radius: 50%;
}

.orbit--outer {
  inset: 7px;
  border-style: dashed;
  animation: orbit-spin 26s linear infinite;
}

.orbit--inner {
  inset: 37px;
  box-shadow: 0 0 30px rgba(156, 116, 255, 0.08);
}

@keyframes orbit-spin {
  to {
    transform: rotate(360deg);
  }
}

.orbit-label {
  position: absolute;
  padding: 6px 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: #d8cbea;
  background: rgba(27, 18, 38, 0.88);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  font-size: 11px;
}

.orbit-label--one {
  top: 13px;
  left: 24px;
}

.orbit-label--two {
  top: 58px;
  right: -1px;
}

.orbit-label--three {
  right: 8px;
  bottom: 24px;
}

.energy-core {
  position: relative;
  display: flex;
  width: 122px;
  height: 122px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(215, 193, 255, 0.22);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(83, 54, 119, 0.83), rgba(24, 17, 34, 0.96));
  box-shadow: inset 0 0 22px rgba(255, 255, 255, 0.05), 0 16px 40px rgba(0, 0, 0, 0.28);
}

.energy-core img {
  position: absolute;
  top: 16px;
  width: 24px;
  opacity: 0.72;
}

.energy-core strong {
  margin-top: 15px;
  font-family: Georgia, serif;
  font-size: 38px;
  line-height: 1;
}

.energy-core small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1px 1fr 1px 1fr;
  align-items: center;
  margin: 0 6px 24px;
  padding: 16px 4px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.feature-row div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.feature-row strong {
  color: #eee4ff;
  font-size: 15px;
}

.feature-row span {
  color: var(--muted);
  font-size: 10px;
}

.feature-row i {
  width: 1px;
  height: 23px;
  background: var(--line);
}

.primary-button,
.secondary-button {
  display: flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease, border-color 160ms ease;
}

.primary-button {
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  background: linear-gradient(115deg, #7249d8, #a05fe9 55%, #c45ba6);
  box-shadow: 0 13px 30px rgba(112, 65, 196, 0.3), inset 0 1px rgba(255, 255, 255, 0.18);
  font-weight: 750;
}

.primary-button:hover,
.secondary-button:hover {
  filter: brightness(1.08);
}

.primary-button:active,
.secondary-button:active,
.option-button:active {
  transform: scale(0.985);
}

.primary-button:disabled {
  cursor: wait;
  filter: saturate(0.5);
  opacity: 0.72;
}

.fine-print {
  margin: 13px 0 0;
  color: #786e83;
  font-size: 10px;
  text-align: center;
}

.access-screen {
  flex-direction: column;
  justify-content: center;
  padding-bottom: 86px;
  text-align: center;
}

.access-mark {
  display: grid;
  width: 74px;
  height: 74px;
  margin: 0 auto 24px;
  place-items: center;
  border: 1px solid rgba(199, 171, 255, 0.23);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(95, 59, 141, 0.58), rgba(34, 23, 48, 0.9));
  box-shadow: 0 20px 50px rgba(83, 43, 139, 0.3);
  transform: rotate(-4deg);
}

.access-mark img {
  width: 42px;
  transform: rotate(4deg);
}

.access-screen h2 {
  margin: 0;
  font-size: 32px;
  letter-spacing: -0.04em;
}

.access-screen form {
  margin-top: 32px;
  text-align: left;
}

.access-screen label {
  display: block;
  margin: 0 0 9px 4px;
  color: #bcb1c9;
  font-size: 12px;
  font-weight: 700;
}

.code-input-wrap {
  position: relative;
}

.code-input-wrap input {
  width: 100%;
  height: 58px;
  padding: 0 50px 0 17px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  font-size: 17px;
  letter-spacing: 0.12em;
  transition: border-color 160ms ease, background 160ms ease;
}

.code-input-wrap input::placeholder {
  color: #71677c;
  font-size: 14px;
  letter-spacing: 0;
}

.code-input-wrap input:focus {
  border-color: rgba(179, 137, 255, 0.68);
  background: rgba(255, 255, 255, 0.075);
}

.code-input-wrap svg {
  position: absolute;
  top: 18px;
  right: 17px;
  width: 22px;
  fill: none;
  stroke: #9485a3;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.field-error {
  min-height: 20px;
  margin: 6px 4px 8px;
  color: var(--danger);
  font-size: 11px;
}

.demo-note {
  margin-top: 20px;
  padding: 13px 15px;
  border: 1px solid rgba(255, 207, 125, 0.14);
  border-radius: 14px;
  color: #978b9f;
  background: rgba(255, 207, 125, 0.045);
  font-size: 11px;
  line-height: 1.55;
}

.demo-note span {
  color: var(--gold);
  font-weight: 800;
}

.demo-note p {
  margin: 4px 0 0;
}

.demo-note button {
  padding: 0;
  border: 0;
  color: #dac7ff;
  background: transparent;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}

.quiz-screen {
  flex-direction: column;
  padding-top: 28px;
}

.progress-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}

.progress-meta strong {
  color: #82758c;
  font-size: 12px;
}

.progress-meta b {
  color: var(--purple-light);
  font-size: 20px;
}

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

.progress-track span {
  display: block;
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--purple), var(--rose));
  box-shadow: 0 0 12px rgba(180, 112, 255, 0.65);
  transition: width 300ms ease;
}

.question-card {
  margin-top: 42px;
}

.question-dimension {
  display: inline-flex;
  margin: 0 0 22px;
  padding: 6px 10px;
  border: 1px solid rgba(177, 136, 255, 0.2);
  border-radius: 999px;
  color: var(--purple-light);
  background: rgba(156, 116, 255, 0.08);
  font-size: 10px;
  font-weight: 750;
}

.question-kicker {
  margin: 0 0 8px;
  color: #756a80;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.question-card h2 {
  min-height: 74px;
  margin: 0 0 30px;
  font-size: clamp(23px, 6vw, 29px);
  line-height: 1.48;
  letter-spacing: -0.035em;
}

.option-list {
  display: grid;
  gap: 12px;
}

.option-button {
  display: grid;
  grid-template-columns: 32px 1fr 22px;
  gap: 11px;
  align-items: center;
  width: 100%;
  min-height: 65px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: #ddd5e7;
  background: rgba(255, 255, 255, 0.035);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.option-button:hover {
  border-color: rgba(190, 151, 255, 0.34);
  background: rgba(156, 116, 255, 0.075);
}

.option-button--selected {
  border-color: rgba(193, 156, 255, 0.65);
  color: white;
  background: linear-gradient(105deg, rgba(116, 73, 180, 0.28), rgba(168, 79, 146, 0.16));
}

.option-letter {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  color: #9f92ac;
  font-size: 11px;
  font-weight: 800;
}

.option-button--selected .option-letter {
  border-color: transparent;
  color: #171020;
  background: var(--purple-light);
}

.option-check {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  font-size: 10px;
}

.option-button--selected .option-check {
  border-color: var(--purple-light);
  color: var(--purple-light);
}

.quiz-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 36px;
  color: #6f6579;
  font-size: 9px;
}

.text-button {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 8px 0;
  border: 0;
  color: #aaa0b4;
  background: transparent;
  font-size: 12px;
  cursor: pointer;
}

.text-button svg {
  width: 16px;
}

.result-screen {
  flex-direction: column;
  padding-top: 34px;
}

.result-heading {
  text-align: center;
}

.result-heading > span {
  display: grid;
  width: 46px;
  height: 46px;
  margin: 0 auto 13px;
  place-items: center;
  border: 1px solid rgba(255, 207, 125, 0.25);
  border-radius: 50%;
  color: var(--gold);
  background: rgba(255, 207, 125, 0.08);
  box-shadow: 0 0 24px rgba(255, 207, 125, 0.12);
  font-size: 22px;
}

.result-heading p {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
}

.result-heading h2 {
  margin: 0;
  color: transparent;
  background: linear-gradient(115deg, #fff, var(--purple-light) 55%, #ff9db9);
  -webkit-background-clip: text;
  background-clip: text;
  font-size: 34px;
  letter-spacing: -0.05em;
}

.result-tags {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 12px;
}

.result-tags span {
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: #b8a9c8;
  background: rgba(255, 255, 255, 0.035);
  font-size: 10px;
}

.radar-card {
  margin-top: 30px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 38%, rgba(132, 83, 210, 0.13), transparent 40%),
    rgba(255, 255, 255, 0.028);
}

.radar-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.radar-title div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.radar-title span {
  font-size: 13px;
  font-weight: 750;
}

.radar-title small {
  color: #776b82;
  font-size: 8px;
  letter-spacing: 0.12em;
}

.radar-title strong {
  color: var(--purple-light);
  font-family: Georgia, serif;
  font-size: 22px;
}

.radar-chart {
  display: block;
  width: min(100%, 310px);
  margin: 1px auto 4px;
  overflow: visible;
}

.radar-grid polygon,
.radar-grid path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.09);
  stroke-width: 1;
}

.radar-area {
  fill: rgba(171, 120, 255, 0.25);
  stroke: #b88cff;
  stroke-width: 2;
  filter: drop-shadow(0 0 7px rgba(174, 118, 255, 0.45));
  transition: 600ms ease;
}

.radar-dots circle {
  fill: #eadfff;
  stroke: #9e6fed;
  stroke-width: 3;
}

.radar-labels text {
  fill: #a99db5;
  font-size: 10px;
}

.metric-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.metric-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 8px;
  align-items: center;
  color: #a99eb3;
  font-size: 10px;
}

.metric-item strong {
  color: #ded4ea;
  font-size: 10px;
}

.metric-bar {
  grid-column: 1 / -1;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.metric-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7e55df, #d275c2);
}

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

.result-copy h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.result-copy h3 span {
  display: inline-block;
  width: 4px;
  height: 14px;
  margin-right: 6px;
  border-radius: 999px;
  vertical-align: -2px;
  background: linear-gradient(var(--purple), var(--rose));
}

.result-copy > p,
.advice-card p {
  margin: 0;
  color: #afa4b9;
  font-size: 12px;
  line-height: 1.85;
}

.advice-card {
  margin-top: 16px;
  padding: 15px;
  border: 1px solid rgba(255, 207, 125, 0.13);
  border-radius: 14px;
  background: linear-gradient(105deg, rgba(255, 207, 125, 0.065), rgba(255, 255, 255, 0.025));
}

.advice-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--gold);
  font-size: 11px;
}

.result-actions {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.secondary-button {
  border: 1px solid var(--line);
  color: #c7bdcf;
  background: rgba(255, 255, 255, 0.035);
  font-size: 13px;
  font-weight: 700;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 20px;
  bottom: max(24px, env(safe-area-inset-bottom));
  left: 20px;
  max-width: 400px;
  margin: 0 auto;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  color: #efe8f7;
  background: rgba(36, 25, 48, 0.96);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  font-size: 12px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: 220ms ease;
}

.toast--visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 600px) {
  body {
    padding: 24px 0;
  }

  .app-shell {
    min-height: calc(100vh - 48px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
  }

  .screen {
    min-height: calc(100vh - 114px);
  }
}

@media (max-height: 760px) {
  .home-screen {
    padding-top: 25px;
  }

  .energy-orbit {
    width: 190px;
    height: 190px;
    margin-top: 20px;
    margin-bottom: 18px;
  }

  .energy-core {
    width: 108px;
    height: 108px;
  }

  .orbit--inner {
    inset: 30px;
  }
}

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