*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: #f7f9ff;
  background: #050816;
}

body {
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1120px;
  margin: 24px auto;
  padding: 24px 20px 28px;
  border-radius: 24px;
  backdrop-filter: blur(28px);
  background: radial-gradient(circle at top left, #1b2440 0, rgba(5, 8, 22, 0.92) 55%);
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (min-width: 960px) {
  .page {
    margin: 40px auto;
    padding: 28px 32px 32px;
  }
}

.bg-gradient {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 10% 0%, rgba(102, 126, 234, 0.55) 0, transparent 50%),
    radial-gradient(circle at 100% 0%, rgba(118, 75, 162, 0.6) 0, transparent 50%),
    radial-gradient(circle at 50% 100%, rgba(0, 210, 255, 0.36) 0, transparent 60%);
  opacity: 0.85;
  pointer-events: none;
  z-index: 0;
}

.bg-orbit {
  position: fixed;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0.4;
  mix-blend-mode: screen;
  pointer-events: none;
  animation: orbit 26s linear infinite;
}

.bg-orbit--one {
  width: 520px;
  height: 520px;
  top: -160px;
  right: -120px;
}

.bg-orbit--two {
  width: 420px;
  height: 420px;
  bottom: -120px;
  left: -80px;
  animation-duration: 32s;
}

@keyframes orbit {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: conic-gradient(from 160deg, #60efff, #0061ff, #b721ff, #60efff);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 10px 25px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.12);
}

.logo-mark__img {
  width: 70%;
  height: 70%;
  object-fit: contain;
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.logo-title {
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.03em;
}

.logo-subtitle {
  font-size: 12px;
  color: rgba(235, 238, 255, 0.76);
}

.header__info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.header__label {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(23, 32, 68, 0.92);
  border: 1px solid rgba(111, 134, 255, 0.5);
  color: #e3e6ff;
}

.header__status {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(10, 219, 101, 0.1);
  border: 1px solid rgba(10, 219, 101, 0.55);
  color: #6bffb4;
}

@media (max-width: 600px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
  }
}

.quiz {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 14px 16px;
  border-radius: 20px;
  background: linear-gradient(
      135deg,
      rgba(22, 30, 66, 0.9),
      rgba(11, 18, 44, 0.96)
    );
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

@media (min-width: 960px) {
  .quiz {
    padding: 22px 22px 24px;
    gap: 24px;
  }
}

.quiz__top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 4px;
}

.quiz__step-indicator {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-size: 14px;
  color: rgba(228, 232, 255, 0.78);
}

.quiz__step-current {
  font-weight: 600;
  font-size: 16px;
  color: #ffffff;
}

.quiz__progress {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.quiz__progress-bar {
  width: 33%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #60efff, #0061ff, #b721ff);
  box-shadow: 0 0 16px rgba(90, 123, 255, 0.9);
  transform-origin: left;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.quiz-screen {
  display: none;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.6fr);
  gap: 16px;
  align-items: center;
  animation: fadeIn 0.35s ease-out;
}

.quiz-screen--active {
  display: grid;
}

.quiz-screen[data-step="1"] {
  min-height: 60vh;
}

.quiz-screen[data-step="1"] .quiz-screen__content {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 0;
  margin-top: -10px;
}

.quiz-screen[data-step="1"] .quiz-screen__title {
  margin-bottom: 10px;
}

.quiz-screen[data-step="1"] .quiz-screen__subtitle {
  margin-bottom: 18px;
}

/* Если высота окна небольшая (например, масштаб 150% на ноутбуке),
   уменьшаем размеры шрифта и сдвигаем контент чуть вверх,
   чтобы кнопка "Продолжить" оставалась в зоне видимости */
@media (max-height: 700px) {
  body {
    align-items: flex-start;
  }

  .page {
    margin: 12px auto;
    padding: 16px 16px 18px;
  }

  .quiz {
    padding: 14px 14px 16px;
  }

  .quiz-screen[data-step="1"] {
    min-height: auto;
  }

  .quiz-screen[data-step="1"] .quiz-screen__content {
    justify-content: flex-start;
  }

  .quiz-screen[data-step="1"] .quiz-screen__title {
    font-size: 20px;
    margin-bottom: 8px;
  }

  .quiz-screen[data-step="1"] .quiz-screen__subtitle {
    font-size: 13px;
    margin-bottom: 14px;
  }

  .quiz-screen[data-step="1"] .btn--primary {
    margin-top: 4px;
  }
}

@media (max-width: 880px) {
  .quiz-screen {
    grid-template-columns: minmax(0, 1fr);
  }

  /* На первом экране скрываем правый визуальный блок на мобильных,
     чтобы кнопка "Продолжить" всегда была в зоне видимости */
  .quiz-screen[data-step="1"] .quiz-screen__visual {
    display: none;
  }

  .quiz-screen[data-step="1"] .quiz-screen__content {
    padding-bottom: 8px;
  }
}

/* Дополнительно уплотняем первый экран на мобильных,
   чтобы заголовок и кнопка лучше помещались по высоте */
@media (max-width: 600px) {
  .quiz-screen[data-step="1"] .quiz-screen__content {
    padding-top: 0;
    margin-top: -16px;
  }

  .quiz-screen[data-step="1"] .quiz-screen__title {
    font-size: 17px;
    margin-bottom: 4px;
  }

  .quiz-screen[data-step="1"] .quiz-screen__subtitle {
    font-size: 11px;
    margin-bottom: 8px;
  }

  .quiz-screen[data-step="1"] .btn--primary {
    padding: 8px 16px;
  }
}

/* Общая оптимизация под мобильные устройства,
   чтобы шаги квиза и кнопки лучше помещались по высоте */
@media (max-width: 600px) {
  body {
    display: block; /* убираем flex, чтобы страница нормально скроллилась */
    margin: 0;
  }

  .page {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 12px 8px 16px;
    border-radius: 0;
  }

  .quiz {
    padding: 8px 6px 12px;
    max-height: none;       /* даём контенту полноценную высоту */
    overflow-y: visible;    /* прокрутка будет у всей страницы */
  }

  .quiz__top {
    margin-bottom: 2px;
  }

  .quiz-screen__title--md {
    margin-bottom: 2px;
  }

  .quiz-screen__subtitle--sm {
    margin-bottom: 4px;
  }

  .quiz__nav {
    margin-top: 8px;
  }

  .option-card {
    padding: 8px 9px;
  }

  .quiz-options {
    gap: 4px;
  }
}

.quiz-screen__content {
  position: relative;
  z-index: 1;
}

.quiz-screen__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quiz-screen__title {
  font-size: clamp(22px, 2.7vw, 28px);
  line-height: 1.25;
  letter-spacing: 0.01em;
  margin: 0 0 8px;
}

.quiz-screen__title--md {
  font-size: clamp(22px, 2.4vw, 26px);
}

.quiz-screen__subtitle {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(224, 228, 255, 0.78);
}

.quiz-screen__subtitle--sm {
  margin-bottom: 18px;
}

.quiz-screen__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(13, 22, 59, 0.96);
  border: 1px solid rgba(97, 112, 255, 0.7);
  color: rgba(214, 221, 255, 0.9);
  font-size: 12px;
  margin-bottom: 12px;
}

.quiz__nav {
  margin-top: 10px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  border: none;
  outline: none;
  cursor: pointer;
  border-radius: 99px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 11px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition:
    background 0.22s ease-out,
    transform 0.18s ease-out,
    box-shadow 0.18s ease-out,
    opacity 0.18s ease-out;
}

.btn--primary {
  background: linear-gradient(135deg, #60efff, #0061ff);
  color: #050816;
  box-shadow:
    0 10px 25px rgba(0, 97, 255, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

.btn--primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow:
    0 16px 32px rgba(0, 97, 255, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}

.btn--primary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow:
    0 8px 18px rgba(0, 97, 255, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}

.btn--primary:disabled {
  opacity: 0.45;
  cursor: default;
  box-shadow: none;
}

.btn--ghost {
  background: rgba(11, 19, 51, 0.85);
  color: rgba(229, 234, 255, 0.9);
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.btn--ghost:hover {
  background: rgba(21, 32, 84, 0.95);
  transform: translateY(-1px);
}

.btn--telegram {
  padding-inline: 24px;
  background: radial-gradient(circle at 0 0, #2af598 0, #009efd 40%, #5445ff 100%);
  color: #050816;
  font-weight: 600;
  box-shadow:
    0 10px 28px rgba(0, 158, 253, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.12);
  text-decoration: none;
}

.btn--telegram:hover {
  transform: translateY(-1px);
  box-shadow:
    0 16px 34px rgba(0, 158, 253, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.16);
}

.btn__icon {
  font-size: 18px;
}

.option-card {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 16px;
  background: radial-gradient(circle at 0 0, rgba(109, 120, 255, 0.16), transparent 55%),
    rgba(16, 25, 66, 0.9);
  border: 1px solid rgba(124, 143, 255, 0.3);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.18s ease-out,
    box-shadow 0.18s ease-out,
    border-color 0.18s ease-out,
    background 0.18s ease-out;
}

.option-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid transparent;
  background: radial-gradient(circle at 0 0, rgba(96, 239, 255, 0.6), transparent 70%)
    border-box;
  mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.2s ease-out;
  pointer-events: none;
}

.option-card__icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: radial-gradient(circle at 0 0, rgba(96, 239, 255, 0.55), transparent 75%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.option-card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.option-card__title {
  font-size: 14px;
  font-weight: 600;
}

.option-card__text {
  font-size: 13px;
  color: rgba(218, 224, 255, 0.86);
}

.option-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.6);
  border-color: rgba(141, 162, 255, 0.7);
}

.option-card--selected,
.option-card:focus-visible {
  outline: none;
  background: radial-gradient(circle at 0 0, rgba(96, 239, 255, 0.2), transparent 60%),
    rgba(15, 28, 82, 0.94);
  border-color: rgba(96, 239, 255, 0.9);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.7),
    0 0 18px rgba(96, 239, 255, 0.5);
}

.option-card--selected::after {
  opacity: 1;
}

.quiz-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.quiz-options--wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 720px) {
  .quiz-options--wide {
    grid-template-columns: minmax(0, 1fr);
  }
}

.card-3d {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 4 / 5;
  transform-style: preserve-3d;
  animation: cardFloat 6s ease-in-out infinite;
}

.card-3d__layer {
  position: absolute;
  inset: 0;
  border-radius: 26px;
}

.card-3d__layer--back {
  transform: translate3d(18px, 22px, -40px);
  background: radial-gradient(circle at 0 0, #60efff 0, transparent 50%),
    radial-gradient(circle at 100% 100%, #b721ff 0, transparent 55%),
    rgba(6, 13, 46, 0.98);
  opacity: 0.6;
  filter: blur(1px);
}

.card-3d__layer--front {
  transform: translate3d(0, 0, 30px);
  background: linear-gradient(145deg, #10172f, #121946);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-3d__badge {
  align-self: flex-start;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #60efff, #0061ff);
  color: #050816;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.9);
}

.card-3d__icon-wrap {
  margin-top: 18px;
  display: flex;
  justify-content: center;
}

.card-3d__icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.85));
}

.card-3d__lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
}

.card-3d__lines span {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(96, 239, 255, 0.9), rgba(183, 33, 255, 0.8));
  opacity: 0.85;
}

.card-3d__lines span:nth-child(2) {
  width: 82%;
  opacity: 0.7;
}

.card-3d__lines span:nth-child(3) {
  width: 64%;
  opacity: 0.6;
}

.card-3d__sum {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: rgba(212, 219, 255, 0.85);
}

.card-3d__sum strong {
  font-size: 15px;
  color: #ffffff;
}

@keyframes cardFloat {
  0%,
  100% {
    transform: translateY(0) rotateX(10deg) rotateY(-10deg);
  }
  50% {
    transform: translateY(-10px) rotateX(6deg) rotateY(-4deg);
  }
}

.contact-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: radial-gradient(circle at 0 0, rgba(96, 239, 255, 0.14), transparent 60%),
    rgba(13, 23, 64, 0.96);
  border: 1px solid rgba(120, 142, 255, 0.45);
}

.contact-card__info {
  flex: 1 1 220px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-card__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(192, 206, 255, 0.86);
}

.contact-card__title {
  font-size: 16px;
  font-weight: 600;
}

.contact-card__text {
  font-size: 13px;
  color: rgba(211, 221, 255, 0.8);
}

.contact-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.contact-actions__btn {
  padding-inline: 18px;
}

.quiz-summary {
  margin-top: 18px;
  font-size: 13px;
  color: rgba(199, 210, 255, 0.9);
}

.quiz-summary__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(10, 219, 101, 0.16);
  border: 1px solid rgba(10, 219, 101, 0.7);
  font-size: 12px;
  color: #8df6c4;
  margin-right: 6px;
}

.footer {
  display: flex;
  justify-content: center;
  font-size: 12px;
  color: rgba(188, 198, 245, 0.8);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

