:root {
  --page: #080014;
  --surface: rgba(18, 5, 44, 0.92);
  --surface-strong: #150535;
  --ink: #f7f3ff;
  --muted: #c7b8df;
  --line: rgba(126, 255, 0, 0.38);
  --green: #7dff00;
  --green-dark: #4eb600;
  --green-soft: rgba(126, 255, 0, 0.12);
  --purple: #8f2bea;
  --purple-dark: #2a075b;
  --purple-soft: rgba(143, 43, 234, 0.2);
  --gold: #f5d56a;
  --danger: #ff6b89;
  --success: #7dff00;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.48);
  --glow: 0 0 22px rgba(126, 255, 0, 0.36);
  --radius: 8px;
}

body {
  background:
    radial-gradient(circle at 18px 24px, rgba(126, 255, 0, 0.34) 0 1px, transparent 2px),
    radial-gradient(circle at 92px 76px, rgba(143, 43, 234, 0.5) 0 1px, transparent 2px),
    linear-gradient(135deg, #080014 0%, #13042f 42%, #05000c 100%);
  background-size: 120px 120px, 180px 180px, auto;
  color: var(--ink);
  font-family:
    Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

.page {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  padding: 16px;
  position: relative;
}

.page::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(126, 255, 0, 0.05), transparent 26%, rgba(143, 43, 234, 0.08) 74%, transparent),
    repeating-linear-gradient(135deg, transparent 0 34px, rgba(255, 255, 255, 0.025) 35px 36px);
  content: "";
  pointer-events: none;
}

.topbar,
.footer,
.app {
  width: min(100%, 960px);
  margin-inline: auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 8px 0 18px;
}

.developer-contacts {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.contact-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(126, 255, 0, 0.5);
  border-radius: var(--radius);
  background: rgba(11, 2, 28, 0.78);
  color: var(--ink);
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 800;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.contact-button:hover {
  border-color: var(--green);
  color: var(--green);
  box-shadow: var(--glow);
  transform: translateY(-1px);
}

.app {
  display: grid;
  flex: 1;
  align-items: center;
  padding: 8px 0 18px;
}

.screen {
  position: relative;
  overflow: hidden;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(28, 8, 62, 0.95), rgba(9, 1, 25, 0.94)),
    var(--surface);
  box-shadow: var(--shadow);
}

.screen::before {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(143, 43, 234, 0.35);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.screen::after {
  position: absolute;
  top: 12px;
  right: 16px;
  color: rgba(126, 255, 0, 0.38);
  content: "✦";
  font-size: 28px;
  line-height: 1;
  text-shadow: 0 0 18px rgba(126, 255, 0, 0.65);
  animation: starPulse 1.8s ease-in-out infinite;
}

.screen--start,
.screen--quiz,
.screen--result {
  padding: 22px;
}

.kicker {
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.visually-hidden {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.title {
  max-width: 740px;
  margin-top: 10px;
  font-size: 32px;
  line-height: 1.12;
}

.lead {
  max-width: 680px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 17px;
}

.summary-strip {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.summary-item {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  border-top: 1px solid rgba(126, 255, 0, 0.26);
  color: var(--ink);
  font-weight: 700;
}

.summary-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 14px rgba(126, 255, 0, 0.76);
}

.start-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 12px 18px;
  font-weight: 800;
  text-align: center;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.button:focus-visible,
.option-button:focus-visible,
.field-input:focus-visible,
.guide-logo-link:focus-visible,
.contact-button:focus-visible {
  outline: 3px solid rgba(126, 255, 0, 0.34);
  outline-offset: 3px;
}

.button--primary {
  border-color: rgba(126, 255, 0, 0.65);
  background: linear-gradient(135deg, var(--green), #b9ff4b);
  color: #13042f;
  box-shadow: 0 0 22px rgba(126, 255, 0, 0.28);
}

.button--primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #b9ff4b, var(--green));
  box-shadow: 0 0 30px rgba(126, 255, 0, 0.48);
  transform: translateY(-2px);
}

.button--primary:disabled {
  border-color: rgba(199, 184, 223, 0.24);
  background: rgba(199, 184, 223, 0.2);
  color: rgba(247, 243, 255, 0.5);
  box-shadow: none;
}

.button--ghost {
  border-color: rgba(143, 43, 234, 0.52);
  background: rgba(11, 2, 28, 0.72);
  color: var(--ink);
}

.button--ghost:hover {
  border-color: var(--green);
  color: var(--green);
}

.magic-guide {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.guide-heading {
  max-width: 820px;
  margin-inline: auto;
  color: var(--green);
  font-size: 25px;
  font-weight: 900;
  line-height: 1.14;
  text-align: center;
  text-shadow:
    0 0 14px rgba(126, 255, 0, 0.5),
    0 0 28px rgba(143, 43, 234, 0.36);
}

.magic-guide-body {
  display: grid;
  align-items: end;
  gap: 14px;
}

.guide-logo-link {
  display: inline-flex;
  width: min(58vw, 220px);
  justify-self: center;
  border-radius: var(--radius);
  filter: drop-shadow(0 0 18px rgba(126, 255, 0, 0.42));
  transform: translateY(8px);
  transition:
    filter 160ms ease,
    transform 160ms ease;
}

.guide-logo-link:hover {
  filter: drop-shadow(0 0 28px rgba(126, 255, 0, 0.68));
  transform: translateY(5px);
}

.guide-logo {
  width: 100%;
  max-height: 190px;
  object-fit: contain;
}

.speech-bubble {
  position: relative;
  min-height: 118px;
  border: 1px solid rgba(126, 255, 0, 0.56);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(143, 43, 234, 0.2), rgba(10, 1, 28, 0.96)),
    rgba(12, 1, 32, 0.94);
  box-shadow:
    inset 0 0 22px rgba(143, 43, 234, 0.24),
    0 0 34px rgba(126, 255, 0, 0.22);
  padding: 18px;
  animation: bubbleReveal 240ms ease-out both;
}

.speech-bubble::before {
  position: absolute;
  bottom: -12px;
  left: 50%;
  width: 22px;
  height: 22px;
  border-right: 1px solid rgba(126, 255, 0, 0.56);
  border-bottom: 1px solid rgba(126, 255, 0, 0.56);
  background: rgba(10, 1, 28, 0.96);
  content: "";
  transform: translateX(-50%) rotate(45deg);
}

.typed-text {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.46;
  min-height: 4.4em;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.typed-text::after {
  display: inline-block;
  width: 0.65ch;
  color: var(--green);
  content: "|";
  text-shadow: 0 0 12px rgba(126, 255, 0, 0.8);
  animation: cursorBlink 650ms steps(2, start) infinite;
}

.typed-text.is-complete::after {
  opacity: 0;
}

.quiz-top {
  display: grid;
  gap: 10px;
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.progress-track {
  overflow: hidden;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(126, 255, 0, 0.18);
  background: rgba(6, 0, 18, 0.8);
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--purple), var(--green));
  box-shadow: 0 0 18px rgba(126, 255, 0, 0.55);
  transition: width 180ms ease;
}

.question {
  margin-top: 22px;
}

.question-title {
  font-size: 25px;
  line-height: 1.2;
}

.question-hint {
  margin-top: 8px;
  color: var(--muted);
}

.option-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  list-style: none;
}

.option-button {
  display: grid;
  width: 100%;
  min-height: 58px;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(126, 255, 0, 0.24);
  border-radius: var(--radius);
  background: rgba(19, 4, 47, 0.82);
  color: var(--ink);
  padding: 14px;
  text-align: left;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.option-button:hover {
  border-color: var(--green);
  box-shadow:
    0 0 20px rgba(126, 255, 0, 0.18),
    inset 0 0 18px rgba(143, 43, 234, 0.2);
  transform: translateY(-1px);
}

.option-button.is-selected {
  border-color: var(--green);
  background: linear-gradient(135deg, rgba(126, 255, 0, 0.18), rgba(143, 43, 234, 0.24));
  box-shadow: 0 0 24px rgba(126, 255, 0, 0.24);
}

.option-indicator {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(199, 184, 223, 0.72);
  border-radius: 50%;
  background: rgba(6, 0, 18, 0.9);
}

.option-button.is-selected .option-indicator {
  border: 6px solid var(--green);
  box-shadow: 0 0 12px rgba(126, 255, 0, 0.78);
}

.option-label {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 750;
}

.quiz-actions,
.result-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 22px;
}

.choice-hint {
  min-height: 22px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid rgba(126, 255, 0, 0.36);
  background: var(--purple-soft);
  color: var(--green);
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 800;
}

.result-title {
  margin-top: 12px;
  font-size: 30px;
  line-height: 1.16;
}

.result-short {
  max-width: 720px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 17px;
}

.result-blocks {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.result-block {
  border-top: 1px solid rgba(126, 255, 0, 0.26);
  padding-top: 14px;
}

.result-block h2 {
  font-size: 16px;
  line-height: 1.25;
}

.result-block p {
  margin-top: 6px;
  color: var(--muted);
}

.step-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding-left: 20px;
}

.step-list li {
  color: var(--muted);
}

.lead-zone {
  margin-top: 26px;
  border-top: 1px solid rgba(126, 255, 0, 0.3);
  padding-top: 22px;
}

.lead-zone h2 {
  font-size: 22px;
  line-height: 1.2;
}

.lead-zone p {
  margin-top: 8px;
  color: var(--muted);
}

.request-note {
  max-width: 640px;
  white-space: pre-line;
}

.lead-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.field {
  display: grid;
  gap: 7px;
}

.field-label {
  font-weight: 800;
}

.field-input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(126, 255, 0, 0.3);
  border-radius: var(--radius);
  background: rgba(6, 0, 18, 0.78);
  color: var(--ink);
  padding: 12px 13px;
}

.field-input[aria-invalid="true"] {
  border-color: var(--danger);
}

.field-error {
  min-height: 18px;
  color: var(--danger);
  font-size: 13px;
}

.form-note {
  max-width: 640px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 13px;
}

.fallback-contacts {
  margin-top: 16px;
  border-left: 4px solid var(--green);
  padding-left: 14px;
}

.fallback-contacts h3 {
  font-size: 16px;
}

.fallback-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  list-style: none;
}

.fallback-list a {
  color: var(--green);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.footer {
  padding: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

@keyframes bubbleReveal {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes cursorBlink {
  50% {
    opacity: 0;
  }
}

@keyframes starPulse {
  50% {
    opacity: 0.35;
    transform: scale(0.82) rotate(18deg);
  }
}
