:root {
  --bg: #07080b;
  --panel: rgba(18, 19, 25, 0.78);
  --panel-solid: #121319;
  --panel-strong: rgba(255, 255, 255, 0.08);
  --text: #f8f4ed;
  --muted: #b9b5ad;
  --line: rgba(255, 255, 255, 0.16);
  --pink: #fa0061;
  --cyan: #4bddff;
  --amber: #ffc247;
  --green: #86e36f;
  --shadow: rgba(0, 0, 0, 0.42);
  --mx: 50%;
  --my: 50%;
  --shift-x: 0px;
  --shift-y: 0px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

.page {
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% -20%, rgba(75, 221, 255, 0.14), transparent 34%),
    linear-gradient(180deg, #07080b 0%, #101116 100%);
}

.topbar {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(16px, 4vw, 56px);
  background: rgba(7, 8, 11, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 800;
}

.brand img {
  display: block;
  width: 106px;
  height: auto;
}

.brand span {
  padding-top: 3px;
  color: var(--cyan);
}

.topbar__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  background: linear-gradient(135deg, #ff0b68, #d500ff);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(250, 0, 97, 0.28);
}

.hero {
  position: relative;
  min-height: 94svh;
  padding: 98px clamp(16px, 4vw, 56px) 44px;
  display: flex;
  align-items: center;
  isolation: isolate;
}

.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: auto 0 0;
  height: 22vh;
  background: linear-gradient(180deg, transparent, var(--bg));
  pointer-events: none;
}

.hero__photo {
  position: absolute;
  z-index: -4;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% center;
  transform: translate3d(var(--shift-x), var(--shift-y), 0) scale(1.04);
  filter: saturate(1.08) contrast(1.04);
  transition: transform 240ms ease;
}

.energy-canvas {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  mix-blend-mode: screen;
  opacity: 0.72;
  pointer-events: none;
}

.hero__shade {
  position: absolute;
  z-index: -3;
  inset: 0;
  background:
    radial-gradient(circle at var(--mx) var(--my), rgba(250, 0, 97, 0.22), transparent 28%),
    linear-gradient(90deg, rgba(7, 8, 11, 0.98) 0%, rgba(7, 8, 11, 0.92) 34%, rgba(7, 8, 11, 0.56) 66%, rgba(7, 8, 11, 0.86) 100%),
    linear-gradient(180deg, rgba(7, 8, 11, 0.24) 0%, rgba(7, 8, 11, 0.42) 58%, rgba(7, 8, 11, 1) 100%);
  pointer-events: none;
}

.hero__content {
  width: min(1160px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 500px);
  gap: clamp(28px, 6vw, 74px);
  align-items: center;
}

.hero__copy {
  max-width: 650px;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1 {
  margin: 0;
  max-width: 650px;
  font-size: clamp(56px, 7vw, 94px);
  line-height: 0.94;
  text-shadow: 0 18px 58px rgba(0, 0, 0, 0.46);
}

h1 span {
  display: block;
}

.lead {
  margin: 26px 0 0;
  max-width: 530px;
  color: #fff7ee;
  font-size: clamp(20px, 3vw, 30px);
  line-height: 1.18;
  font-weight: 800;
  text-shadow: 0 12px 42px rgba(0, 0, 0, 0.46);
}

.notice {
  margin: 22px 0 0;
  max-width: 530px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.test-panel {
  position: relative;
  width: 100%;
  min-height: 504px;
  padding: clamp(20px, 3vw, 30px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
    var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  box-shadow: 0 30px 86px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(22px);
  overflow: hidden;
}

.test-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.08) 38%, transparent 58%);
  transform: translateX(-130%);
  animation: panel-scan 8s ease-in-out infinite;
  pointer-events: none;
}

.test-panel__head {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.test-panel h2 {
  margin: 0;
  font-size: clamp(24px, 3.2vw, 34px);
  line-height: 1.02;
}

.progress-count {
  flex: 0 0 auto;
  min-width: 58px;
  padding: 8px 10px;
  color: var(--text);
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.signal-strip {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin: 22px 0 16px;
}

.signal-strip span {
  height: 4px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  animation: signal 1.8s ease-in-out infinite;
}

.signal-strip span:nth-child(2) {
  animation-delay: 120ms;
}

.signal-strip span:nth-child(3) {
  animation-delay: 240ms;
}

.signal-strip span:nth-child(4) {
  animation-delay: 360ms;
}

.signal-strip span:nth-child(5) {
  animation-delay: 480ms;
}

.signal-strip span:nth-child(6) {
  animation-delay: 600ms;
}

.progress {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 8px;
  margin: 0 0 26px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--pink), var(--cyan));
  border-radius: inherit;
  box-shadow: 0 0 22px rgba(75, 221, 255, 0.5);
  transition: width 360ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.quiz-stage {
  position: relative;
  z-index: 1;
  min-height: 330px;
  display: flex;
  flex-direction: column;
}

.start-state,
.result-state {
  min-height: 330px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.metric-row span {
  min-height: 78px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px;
  color: var(--text);
  text-align: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric-row strong {
  font-size: 17px;
}

.metric-row small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.calibration {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.calibration span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 22px rgba(134, 227, 111, 0.72);
  animation: pulse-dot 1.3s ease-in-out infinite;
}

.calibration p {
  margin: 0;
}

.primary-btn,
.secondary-btn,
.answer-btn {
  width: 100%;
  border-radius: 8px;
  transition: transform 170ms ease, border-color 170ms ease, background 170ms ease, box-shadow 170ms ease;
}

.primary-btn {
  position: relative;
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  color: white;
  font-size: 17px;
  font-weight: 900;
  background: linear-gradient(135deg, #ff0b68, #f000a8 52%, #00c8ff);
  background-size: 160% 160%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 18px 42px rgba(250, 0, 97, 0.32);
  overflow: hidden;
  animation: button-flow 5.4s ease infinite;
}

.primary-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.24) 42%, transparent 58%);
  transform: translateX(-120%);
  transition: transform 420ms ease;
}

.primary-btn:hover::after {
  transform: translateX(120%);
}

.primary-btn span {
  position: relative;
  z-index: 1;
  font-size: 26px;
  line-height: 1;
}

.secondary-btn {
  min-height: 48px;
  padding: 0 18px;
  color: var(--text);
  font-weight: 800;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
}

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

.answer-btn:hover {
  border-color: rgba(75, 221, 255, 0.42);
  box-shadow: inset 0 0 0 1px rgba(75, 221, 255, 0.08), 0 14px 30px rgba(0, 0, 0, 0.18);
}

.question {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: stage-in 280ms ease both;
}

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

.answer-btn {
  position: relative;
  min-height: 58px;
  padding: 14px 16px 14px 46px;
  color: var(--text);
  text-align: left;
  line-height: 1.25;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
}

.answer-btn::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 50%;
  width: 12px;
  height: 12px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  transform: translateY(-50%);
  transition: background 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
}

.answer-btn.is-selected {
  background: rgba(250, 0, 97, 0.2);
  border-color: rgba(250, 0, 97, 0.74);
  box-shadow: 0 0 30px rgba(250, 0, 97, 0.2);
}

.answer-btn.is-selected::before {
  background: var(--pink);
  border-color: var(--pink);
  box-shadow: 0 0 20px rgba(250, 0, 97, 0.72);
}

.result-state {
  animation: stage-in 340ms ease both;
}

.result-name {
  margin: 0;
  color: var(--text);
  font-size: clamp(30px, 5vw, 48px);
  line-height: 0.98;
}

.result-copy {
  margin: 12px 0 0;
  color: #efe8df;
  font-size: 18px;
  line-height: 1.4;
}

.trait-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.trait-list li {
  padding: 8px 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.luck-modal {
  width: min(440px, calc(100% - 28px));
  padding: 0;
  color: var(--text);
  background: transparent;
  border: 0;
}

.luck-modal::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
}

.luck-modal__box {
  position: relative;
  padding: 28px;
  background:
    radial-gradient(circle at 80% 0%, rgba(75, 221, 255, 0.18), transparent 34%),
    radial-gradient(circle at 0% 100%, rgba(250, 0, 97, 0.24), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)),
    var(--panel-solid);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  box-shadow: 0 32px 92px rgba(0, 0, 0, 0.56);
  overflow: hidden;
}

.luck-modal__box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.1) 38%, transparent 58%);
  transform: translateX(-130%);
  animation: panel-scan 7s ease-in-out infinite;
  pointer-events: none;
}

.luck-modal__close {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--text);
  font-size: 25px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.luck-modal__close:hover {
  border-color: rgba(75, 221, 255, 0.42);
}

.luck-modal .panel-kicker,
.luck-modal h2,
.luck-modal__text,
.luck-modal__cta {
  position: relative;
  z-index: 1;
}

.luck-modal h2 {
  margin: 0;
  max-width: 330px;
  font-size: clamp(34px, 7vw, 48px);
  line-height: 0.98;
}

.luck-modal__text {
  margin: 16px 0 0;
  color: #efe8df;
  font-size: 17px;
  line-height: 1.42;
  font-weight: 800;
}

.luck-modal__cta {
  margin-top: 24px;
  text-decoration: none;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: reveal 620ms ease forwards;
}

.test-panel.reveal {
  animation-delay: 140ms;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes stage-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes signal {
  0%,
  100% {
    background: rgba(255, 255, 255, 0.14);
  }
  44% {
    background: var(--cyan);
    box-shadow: 0 0 18px rgba(75, 221, 255, 0.64);
  }
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 0.58;
    transform: scale(0.88);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes button-flow {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes panel-scan {
  0%,
  48% {
    transform: translateX(-130%);
  }
  66%,
  100% {
    transform: translateX(130%);
  }
}

@media (max-width: 980px) {
  .hero {
    min-height: auto;
    padding-top: 92px;
  }

  .hero__photo {
    object-position: 58% top;
  }

  .hero__shade {
    background:
      linear-gradient(90deg, rgba(7, 8, 11, 0.95) 0%, rgba(7, 8, 11, 0.76) 62%, rgba(7, 8, 11, 0.5) 100%),
      linear-gradient(180deg, rgba(7, 8, 11, 0.24) 0%, rgba(7, 8, 11, 0.68) 52%, rgba(7, 8, 11, 1) 100%);
  }

  .hero__content {
    grid-template-columns: 1fr;
    align-items: start;
  }

  h1 {
    max-width: 560px;
  }

  .test-panel {
    max-width: 640px;
  }

}

@media (max-width: 620px) {
  .topbar {
    padding: 12px 14px;
  }

  .brand img {
    width: 92px;
  }

  .topbar__action {
    min-height: 36px;
    padding: 0 14px;
  }

  .hero {
    padding: 82px 14px 32px;
  }

  .hero__photo {
    object-position: 58% top;
    opacity: 0.92;
  }

  .hero__shade {
    background:
      linear-gradient(90deg, rgba(7, 8, 11, 0.94) 0%, rgba(7, 8, 11, 0.78) 58%, rgba(7, 8, 11, 0.62) 100%),
      linear-gradient(180deg, rgba(7, 8, 11, 0.12) 0%, rgba(7, 8, 11, 0.72) 43%, rgba(7, 8, 11, 1) 100%);
  }

  .lead {
    max-width: 360px;
  }

  h1 {
    font-size: clamp(46px, 13vw, 54px);
  }

  .notice {
    max-width: 340px;
  }

  .test-panel {
    min-height: 520px;
    padding: 18px;
  }

  .test-panel__head {
    gap: 12px;
  }

  .metric-row,
  .result-actions {
    grid-template-columns: 1fr;
  }

  .metric-row span {
    min-height: 52px;
  }

}

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

  .energy-canvas {
    display: none;
  }

  .hero__photo {
    transform: scale(1.02);
  }
}
