:root {
  --bg: #03080f;
  --panel: rgba(9, 18, 31, 0.72);
  --panel-strong: rgba(12, 24, 40, 0.88);
  --line: rgba(145, 173, 205, 0.22);
  --line-strong: rgba(36, 166, 255, 0.68);
  --text: #f7fbff;
  --muted: #8190a3;
  --muted-strong: #b6bfcb;
  --accent: #28a6ff;
  --accent-2: #ff7a1a;
  --danger: #ff6159;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 12px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 20% 18%, rgba(36, 166, 255, 0.13), transparent 32rem),
    radial-gradient(circle at 85% 20%, rgba(255, 122, 26, 0.08), transparent 28rem),
    linear-gradient(140deg, #03080f 0%, #071426 50%, #02050a 100%);
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at center, black, transparent 74%);
}

button,
input,
a {
  font: inherit;
}

.app {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.screen {
  display: none;
  min-height: 100vh;
  padding: 32px;
}

.screen.is-active {
  display: grid;
}

.intro,
.success,
.analysis {
  place-items: center;
  text-align: center;
}

.intro__content,
.success__content,
.analysis__content {
  width: min(760px, 100%);
}

.brand {
  margin: 0 0 18px;
  color: var(--accent);
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: clamp(1.8rem, 4.4vw, 2.7rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand span {
  color: var(--text);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 26px;
  margin: 0 0 18px;
  padding: 4px 16px;
  border: 1px solid rgba(40, 166, 255, 0.5);
  border-radius: 999px;
  color: #8bd2ff;
  background: rgba(40, 166, 255, 0.09);
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.pill span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent-2);
  box-shadow: 0 0 18px rgba(255, 122, 26, 0.8);
}

h1,
h2 {
  margin: 0;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-weight: 900;
  line-height: 0.94;
  text-transform: uppercase;
}

h1 {
  max-width: 780px;
  margin: 0 auto;
  font-size: clamp(3.2rem, 8.6vw, 6rem);
  line-height: 0.91;
  text-wrap: balance;
}

h1 strong,
.required {
  color: var(--accent);
  font-style: normal;
}

.intro__lead,
.success p {
  margin: 18px auto 0;
  max-width: 620px;
  color: var(--muted-strong);
  font-size: clamp(0.96rem, 1.6vw, 1.12rem);
  font-weight: 600;
  line-height: 1.5;
}

.intro__lead b {
  color: var(--text);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 28px auto 24px;
}

.stats div {
  min-width: 0;
}

.stats strong {
  display: block;
  color: var(--accent);
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: clamp(2rem, 4.3vw, 2.9rem);
  font-weight: 900;
}

.stats span {
  display: block;
  color: #667386;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.button {
  display: inline-grid;
  place-items: center;
  min-width: 156px;
  min-height: 56px;
  padding: 0 30px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 1.08rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #126ef0);
  box-shadow: 0 18px 42px rgba(18, 110, 240, 0.24);
}

.button--primary:hover {
  box-shadow: 0 20px 54px rgba(40, 166, 255, 0.32);
}

.button--ghost {
  min-width: auto;
  min-height: auto;
  padding: 12px 0;
  color: #8d98a8;
  background: transparent;
  box-shadow: none;
}

.microcopy {
  margin: 12px 0 0;
  color: #4f5c6c;
  font-size: 0.9rem;
  font-weight: 700;
}

.form-screen {
  align-items: center;
  padding: clamp(26px, 7vw, 72px);
}

.progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 260ms ease;
}

.form-card {
  width: min(960px, 100%);
  margin: 0 auto;
}

.question-number {
  margin: 0 0 16px;
  color: var(--accent);
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.question-head h2 {
  max-width: 900px;
  font-size: clamp(1.85rem, 4.8vw, 3.05rem);
  line-height: 1.03;
  text-wrap: balance;
}

.question-help {
  min-height: 1.6rem;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 700;
}

.answer-area {
  margin-top: 28px;
}

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

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

.answer-list--two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.option {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 12px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted-strong);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
  cursor: pointer;
  font-weight: 800;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.option:hover,
.option.is-selected {
  border-color: var(--line-strong);
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(40, 166, 255, 0.15), rgba(255, 122, 26, 0.06)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.018));
}

.option:hover {
  transform: translateY(-1px);
}

.option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option__key,
.checkbox-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-right: 16px;
  border: 1px solid rgba(182, 191, 203, 0.34);
  border-radius: 7px;
  color: #8d98a8;
  font-size: 0.8rem;
  font-weight: 900;
}

.checkbox-mark {
  border-radius: 6px;
}

.option.is-selected .checkbox-mark::after {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--accent);
  content: "";
}

.input-row {
  display: flex;
  gap: 12px;
}

.field,
.country-select {
  width: 100%;
  min-height: 68px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(5, 12, 21, 0.74);
  outline: none;
  box-shadow: 0 0 0 4px rgba(40, 166, 255, 0.08);
  font-size: 1.08rem;
  font-weight: 700;
}

.field {
  padding: 0 22px;
}

.field::placeholder {
  color: rgba(182, 191, 203, 0.36);
}

.country-select {
  flex: 0 0 118px;
  padding: 0 14px;
  appearance: none;
}

.error-message {
  min-height: 1.4rem;
  margin: 14px 0 0;
  color: var(--danger);
  font-size: 0.94rem;
  font-weight: 800;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 30px;
}

.success__content,
.analysis__content {
  padding: 54px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.success h2,
.analysis h2 {
  font-size: clamp(3.2rem, 8vw, 5.6rem);
}

.success .button {
  margin-top: 34px;
}

.result-link {
  display: none;
}

.instagram-link {
  display: none;
}

.result-note {
  margin-top: 22px !important;
  color: var(--muted);
  font-size: 0.98rem !important;
  line-height: 1.5 !important;
}

.analysis-loader {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 34px 0 6px;
}

.analysis-loader span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--accent);
  animation: pulse 900ms ease-in-out infinite;
}

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

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

.analysis-line {
  min-height: 3.4em;
  transition: opacity 180ms ease;
}

.analysis-line.is-changing {
  opacity: 0.25;
}

.analysis-progress {
  width: min(520px, 100%);
  height: 5px;
  margin: 26px auto 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.analysis-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 700ms ease;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }

  50% {
    opacity: 1;
    transform: translateY(-8px);
  }
}

@media (max-width: 760px) {
  .screen {
    padding: 22px 16px;
  }

  .intro {
    align-items: start;
    padding-top: 28px;
  }

  .intro__content {
    text-align: left;
  }

  .brand {
    margin-bottom: 14px;
  }

  h1 {
    font-size: clamp(2.65rem, 12.8vw, 4.25rem);
  }

  .intro__lead {
    margin-left: 0;
    font-size: 0.94rem;
  }

  .stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 22px 0 20px;
  }

  .stats div {
    display: block;
    padding-bottom: 0;
    border-bottom: 0;
  }

  .stats span {
    text-align: center;
    font-size: 0.64rem;
  }

  .form-screen {
    align-items: start;
    padding: 54px 16px 28px;
  }

  .question-head h2 {
    font-size: clamp(1.9rem, 9vw, 2.7rem);
  }

  .answer-grid,
  .answer-list--two-columns {
    grid-template-columns: 1fr;
  }

  .input-row,
  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .country-select {
    flex-basis: auto;
  }

  .button {
    width: 100%;
  }

  .button--ghost {
    width: auto;
    align-self: flex-start;
  }

  .success__content,
  .analysis__content {
    padding: 28px 20px;
  }
}

@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;
  }
}
