:root {
  --bg-deep: #070d2b;
  --bg-purple: #24103d;
  --surface: rgba(255, 255, 255, 0.075);
  --surface-strong: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.16);
  --text: #fcf9ff;
  --muted: #d7cfe4;
  --accent: #f17fc2;
  --focus: #ffb8df;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  max-width: 100%;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

html {
  color-scheme: dark;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.42) 0 1px, transparent 1.5px),
    radial-gradient(circle at 84% 18%, rgba(255, 255, 255, 0.28) 0 1px, transparent 1.5px),
    radial-gradient(circle at 72% 62%, rgba(255, 255, 255, 0.2) 0 1px, transparent 1.5px),
    linear-gradient(145deg, var(--bg-deep), var(--bg-purple));
  background-attachment: fixed;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

.container {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 20px 16px;
}

.intro {
  text-align: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: #e7b3ff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

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

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 9vw, 38px);
  line-height: 1.08;
}

.intro > p:last-child {
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 16px;
}

.hero-image {
  display: block;
  width: 100%;
  max-width: 420px;
  height: clamp(170px, 52vw, 220px);
  max-height: 240px;
  margin: 20px auto;
  border: 1px solid var(--border);
  border-radius: 18px;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.form-card,
.result,
.loading {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.result-route-loading {
  display: block;
  margin-top: 18px;
  text-align: center;
}

.loading-symbols {
  margin: 10px 0;
  color: #e8b8ff;
  font-size: 30px;
  text-align: center;
}

.loading-fallback {
  margin-top: 14px;
  text-align: center;
}

.loading-fallback[hidden] {
  display: none;
}

.result-page-header {
  margin-bottom: 12px;
  text-align: center;
}

.result-page-header h1 {
  font-size: clamp(30px, 9vw, 36px);
}

.new-test-link {
  margin: 20px 0 0;
  text-align: center;
}

.new-test-link a {
  color: #e6c3ff;
}

.missing-analysis {
  margin-top: 18px;
  text-align: center;
}

.link-button {
  display: block;
  text-decoration: none;
}

.form-card {
  padding: 20px 16px;
}

.form-heading h2 {
  margin: 0;
  font-size: 25px;
}

.form-heading p {
  margin: 2px 0 16px;
  color: var(--muted);
}

.form-note {
  margin: 10px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 16px;
}

.form-error {
  margin-top: 10px;
  color: #ffc1d6;
  font-size: 16px;
  text-align: center;
}

.form-error:empty {
  display: none;
}

.field {
  width: 100%;
  margin-top: 14px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}

input,
select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 50px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 11px;
  color: var(--text);
  background: rgba(8, 10, 36, 0.72);
  font-size: 16px;
}

select {
  padding-right: 38px;
}

select option {
  color: #151125;
  background: #fff;
}

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

.error {
  min-height: 0;
  margin-top: 5px;
  color: #ffc1d6;
  font-size: 16px;
}

.error:empty {
  display: none;
}

button {
  min-height: 50px;
  border-radius: 12px;
  cursor: pointer;
}

.primary {
  width: 100%;
  margin-top: 20px;
  padding: 13px 16px;
  border: 0;
  color: #fff;
  background: linear-gradient(100deg, #8d55e9, #ec5fac);
  box-shadow: 0 8px 24px rgba(225, 83, 167, 0.22);
  font-size: 17px;
  font-weight: 800;
}

.primary:hover {
  filter: brightness(1.08);
}

.loading {
  display: none;
  margin-top: 18px;
  padding: 24px 18px;
}

.loading h2 {
  margin: 3px 0 6px;
  font-size: 23px;
  text-align: center;
}

.loading-kicker { margin: 0; color: #e7b3ff; font-size: 13px; font-weight: 800; letter-spacing: .09em; text-align: center; text-transform: uppercase; }
.analysis-detail { min-height: 50px; margin: 0 auto 18px; color: var(--muted); text-align: center; }
.loading-orbit { display: flex; width: 118px; height: 56px; align-items: center; justify-content: space-between; margin: 0 auto 12px; padding: 0 13px; border: 1px solid rgba(231,179,255,.28); border-radius: 999px; background: rgba(8,10,36,.45); color: #e8b8ff; font-size: 27px; box-shadow: 0 0 28px rgba(180,124,255,.16); animation: analysisPulse 1.8s ease-in-out infinite; }
.orbit-heart { color: #f17fc2; font-size: 15px; }
.progress-meta { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; color: var(--muted); font-size: 14px; }
.progress-meta strong { color: #fff; }

.analysis-progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #b47cff, #ff77bd);
  box-shadow: 0 0 14px rgba(255,119,189,.45);
  transition: width .8s cubic-bezier(.22,.8,.35,1);
}

.analysis-steps { display: grid; gap: 11px; margin: 20px 0 0; padding: 0; list-style: none; }
.analysis-steps li { display: flex; align-items: center; gap: 10px; color: rgba(215,207,228,.62); font-size: 14px; transition: color .25s ease, transform .25s ease; }
.step-icon { display: grid; width: 26px; height: 26px; flex: 0 0 26px; place-items: center; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; font-size: 12px; font-weight: 800; }
.analysis-steps li.active { color: #fff; transform: translateX(3px); }
.analysis-steps li.active .step-icon { border-color: #f17fc2; background: rgba(241,127,194,.16); box-shadow: 0 0 12px rgba(241,127,194,.25); }
.analysis-steps li.complete { color: #c9ffe4; }
.analysis-steps li.complete .step-icon { border-color: rgba(111,220,166,.5); color: transparent; background: rgba(68,181,126,.18); }
.analysis-steps li.complete .step-icon::after { content: "✓"; color: #a9f0ce; }
.analysis-complete .loading-orbit { animation: none; border-color: rgba(111,220,166,.5); box-shadow: 0 0 28px rgba(68,181,126,.2); }
@keyframes analysisPulse { 50% { transform: scale(1.04); box-shadow: 0 0 34px rgba(180,124,255,.28); } }

.result {
  display: none;
  margin-top: 18px;
  padding: 20px 16px;
}

.result-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.identity,
.emotional-phrase {
  margin: 0;
}

.identity {
  font-weight: 700;
}

.emotional-phrase {
  color: var(--muted);
}

.score-circle {
  display: flex;
  width: 140px;
  height: 140px;
  align-items: center;
  justify-content: center;
  border: 5px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}

.score-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.score-num {
  font-size: 28px;
}

.range-title {
  margin: 0;
  font-size: 23px;
}

.result-content,
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.result-content {
  margin-top: 18px;
}

.bars,
.result-card {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(5, 8, 31, 0.32);
}

.bars h3,
.result-card h4 {
  margin: 0 0 10px;
}

.result-card p,
.result-card ul {
  margin-bottom: 0;
}

.bar-row + .bar-row {
  margin-top: 13px;
}

.bar-label {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.bar-label span {
  flex: 0 0 auto;
}

.bar-track {
  height: 10px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #8a5bff);
  transition: width 600ms ease;
}

.bar-fill.risk-bar {
  background: linear-gradient(90deg, #d58b55, #e05f80);
}

.direct-answers h3 {
  margin: 0 0 14px;
}

.direct-answer + .direct-answer {
  margin-top: 14px;
}

.direct-answer h4,
.direct-answer p {
  margin: 0;
}

.direct-answer p {
  margin-top: 3px;
  color: var(--muted);
}

.accordions {
  display: grid;
  gap: 10px;
}

.paywall {
  padding: 20px 16px;
  border: 1px solid rgba(238, 131, 202, 0.38);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(137, 71, 185, 0.2), rgba(6, 9, 35, 0.45));
}

.paywall h3,
.paywall p {
  margin-top: 0;
}

.lock-icon {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 24px;
}

.unlock-list {
  margin: 16px 0;
  padding: 0;
  list-style: none;
}

.unlock-list li {
  position: relative;
  padding-left: 25px;
}

.unlock-list li + li {
  margin-top: 7px;
}

.unlock-list li::before {
  position: absolute;
  left: 0;
  content: "✓";
  color: #a9f0ce;
  font-weight: 800;
}

.premium-previews {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.locked-preview {
  position: relative;
  overflow: hidden;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 11px;
  background: rgba(6, 9, 35, 0.4);
}

.locked-preview h4,
.locked-preview p {
  margin: 0;
}

.locked-preview p {
  margin-top: 4px;
}

.locked-preview span {
  display: block;
  margin-top: 8px;
  color: #eab6d9;
  font-weight: 700;
}

.locked-preview::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 26px;
  content: "";
  background: linear-gradient(transparent, rgba(15, 9, 37, 0.98));
  pointer-events: none;
}

.offer {
  padding-top: 4px;
  text-align: center;
}

.pix-email-label {
  display: block;
  margin: 16px 0 7px;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  text-align: left;
}

.pix-email {
  width: 100%;
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  color: var(--text);
  background: rgba(5, 8, 31, 0.62);
  font: inherit;
  font-size: 16px;
}

.pix-email-help {
  margin: 6px 0 14px;
  color: var(--muted);
  font-size: 12px;
  text-align: left;
}

.price {
  margin-bottom: 2px;
  color: #fff;
  font-size: 30px;
  font-weight: 900;
}

.secure-note,
.symbolic-note {
  color: var(--muted);
  font-size: 16px;
}

.offer-compliance {
  margin: 14px 0 0;
  color: rgba(215, 207, 228, 0.68);
  font-size: 11px;
  line-height: 1.4;
}

.unlocked-label {
  padding: 12px;
  border-radius: 10px;
  color: #c9ffe4;
  background: rgba(68, 181, 126, 0.16);
  font-weight: 800;
  text-align: center;
}

.sticky-unlock {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  display: flex;
  min-height: 64px;
  max-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px max(12px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  border-top: 1px solid var(--border);
  background: rgba(8, 9, 31, 0.97);
}

.sticky-unlock[hidden] {
  display: none;
}

body.has-sticky {
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}

body.pix-modal-open {
  overflow: hidden;
}

.pix-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  overflow-y: auto;
  place-items: center;
  padding: 12px;
  background: rgba(4, 4, 18, 0.82);
}

.pix-modal[hidden] {
  display: none;
}

.pix-modal-panel {
  width: min(480px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #11132f;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.65);
  text-align: center;
}

.pix-modal-panel h2 {
  margin: 0 0 8px;
}

.pix-modal-panel p {
  font-size: 16px;
}

.pix-value,
.pix-instruction {
  margin: 8px 0;
}

.pix-mobile {
  display: none;
}

.pix-qr-code {
  display: block;
  width: min(240px, 100%);
  height: auto;
  margin: 14px auto;
  border-radius: 8px;
  background: #fff;
}

.pix-copy-code {
  display: block;
  width: 100%;
  min-height: 76px;
  padding: 10px;
  overflow-wrap: anywhere;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9px;
  color: var(--text);
  background: rgba(5, 8, 31, 0.72);
  font-size: 16px;
  resize: none;
}

.pix-copy-button {
  width: 100%;
  margin-top: 10px;
}

.pix-wait-note {
  color: var(--muted);
}

.pix-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 14px 0;
  color: #e8dcff;
  font-size: 16px;
  font-weight: 800;
}

.pix-spinner {
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #e6c3ff;
  border-radius: 50%;
  animation: pix-spin 0.8s linear infinite;
}

.pix-spinner[hidden] {
  display: none;
}

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

.pix-test-mode {
  margin: 8px 0;
  color: rgba(215, 207, 228, 0.7);
  font-size: 12px !important;
}

.pix-close {
  width: auto;
  min-height: 42px;
  padding: 8px 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  background: transparent;
}

.sticky-unlock button {
  width: auto;
  min-height: 44px;
  padding: 8px 14px;
  border: 0;
  color: #fff;
  background: linear-gradient(100deg, #8d55e9, #ec5fac);
  font-weight: 800;
}

.cookie-banner {
  position: fixed;
  right: 10px;
  bottom: 10px;
  left: 10px;
  z-index: 80;
  width: auto;
  max-width: 390px;
  margin: 0 auto;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #11132f;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner p {
  margin: 0 0 9px;
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
}

.cookie-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin: 0;
}

.cookie-actions button {
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 13px;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  margin-top: 14px;
}

.legal-links a,
.cookie-banner a {
  color: #e6c3ff;
}

.result-accordion {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(5, 8, 31, 0.32);
}

.result-accordion summary {
  padding: 15px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.accordion-content {
  padding: 0 15px 15px;
}

.accordion-content p {
  margin: 0;
  color: var(--muted);
}

.accordion-content p + p {
  margin-top: 12px;
}

.share-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  margin-top: 14px;
}

.secondary {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--text);
  background: var(--surface-strong);
  font-weight: 700;
}

.disclaimer {
  padding: 22px 2px 4px;
  color: var(--muted);
  text-align: center;
}

.disclaimer p {
  margin: 0;
  font-size: 16px;
}

.disclaimer .legal-note {
  color: rgba(215, 207, 228, 0.62);
  font-size: 10px;
  line-height: 1.35;
}

@media (min-width: 600px) {
  .container {
    padding-top: 32px;
    padding-bottom: 32px;
  }

  .form-card,
  .result {
    padding: 24px;
  }

  .share-actions {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 599px) {
  .pix-desktop {
    display: none;
  }

  .pix-mobile {
    display: block;
  }

  .pix-modal-panel {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
