:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  --ink: #182039;
  --muted: #68708a;
  --primary: #6558e8;
  --primary-dark: #5145d0;
  --accent: #ffd65a;
  --surface: rgba(255, 255, 255, 0.96);
  --line: #e6e8f3;
  --success: #15845d;
  --success-soft: #e9f8f1;
  --danger: #cb3d57;
  --danger-soft: #fff0f3;
  --shadow: 0 24px 70px rgba(35, 38, 92, 0.14);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: #f6f7ff;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 214, 90, 0.26), transparent 24rem),
    radial-gradient(circle at 92% 90%, rgba(101, 88, 232, 0.2), transparent 26rem),
    #f6f7ff;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.page-shell {
  width: min(100% - 28px, 760px);
  margin: 0 auto;
  padding: 22px 0 36px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px 4px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.brand__mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  font-size: 21px;
  border-radius: 11px;
  background: var(--primary);
  box-shadow: 0 8px 18px rgba(101, 88, 232, 0.3);
}

.card {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 5vw, 44px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.intro {
  display: grid;
  min-height: min(680px, calc(100vh - 100px));
  place-items: center;
  text-align: center;
}

.intro__content {
  position: relative;
  z-index: 1;
  max-width: 620px;
}

.intro__decoration {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.intro__decoration--one {
  top: -80px;
  right: -60px;
  width: 230px;
  height: 230px;
  background: rgba(101, 88, 232, 0.1);
}

.intro__decoration--two {
  bottom: -95px;
  left: -70px;
  width: 250px;
  height: 250px;
  background: rgba(255, 214, 90, 0.2);
}

.eyebrow {
  display: inline-flex;
  margin: 0 0 18px;
  padding: 9px 14px;
  color: #4e43bd;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  background: #efedff;
}

.intro h1,
.result h1 {
  margin: 0;
  font-size: clamp(34px, 7vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.intro__copy {
  max-width: 560px;
  margin: 22px auto 30px;
  color: var(--muted);
  font-size: clamp(17px, 3vw, 20px);
  line-height: 1.55;
}

.primary-button,
.next-button,
.restart-button {
  min-height: 56px;
  padding: 15px 24px;
  cursor: pointer;
  border: 0;
  border-radius: 16px;
  font-weight: 850;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.primary-button,
.next-button {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 13px 26px rgba(101, 88, 232, 0.28);
}

.primary-button {
  width: min(100%, 360px);
  font-size: 18px;
}

.primary-button:hover,
.next-button:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.primary-button:active,
.next-button:active,
.restart-button:active {
  transform: translateY(0);
}

.quiz {
  min-height: 650px;
}

.quiz__topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 11px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.progress {
  height: 9px;
  overflow: hidden;
  margin-bottom: 22px;
  border-radius: 999px;
  background: #ebeaf7;
}

.progress span {
  display: block;
  width: 10%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #9b6cf2);
  transition: width 260ms ease;
}

.question-media {
  display: grid;
  width: 100%;
  min-height: 220px;
  max-height: 360px;
  aspect-ratio: 16 / 9;
  margin: 0 0 24px;
  overflow: hidden;
  place-items: center;
  border-radius: 20px;
  background: #11152a;
}

.question-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 1;
  transition: opacity 150ms ease;
}

.question-media img.is-loading {
  opacity: 0.25;
}

.question-title {
  margin: 0 0 20px;
  font-size: clamp(24px, 5vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

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

.answer {
  display: flex;
  min-height: 64px;
  align-items: center;
  gap: 11px;
  padding: 13px 16px;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: #fff;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease;
}

.answer:hover:not(:disabled) {
  border-color: #a8a1f2;
  transform: translateY(-2px);
}

.answer:disabled {
  cursor: default;
}

.answer__letter {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  font-weight: 900;
  border-radius: 10px;
  background: #f0effb;
}

.answer__text {
  font-weight: 720;
  line-height: 1.25;
}

.answer.is-correct {
  color: #0e6e4d;
  border-color: #55bb91;
  background: var(--success-soft);
}

.answer.is-correct .answer__letter {
  color: #fff;
  background: var(--success);
}

.answer.is-wrong {
  color: #a7253e;
  border-color: #ed92a4;
  background: var(--danger-soft);
}

.answer.is-wrong .answer__letter {
  color: #fff;
  background: var(--danger);
}

.feedback {
  min-height: 28px;
  margin: 17px 0 0;
  font-size: 16px;
  font-weight: 800;
}

.feedback.is-correct {
  color: var(--success);
}

.feedback.is-wrong {
  color: var(--danger);
}

.next-button {
  width: 100%;
  margin-top: 10px;
  font-size: 17px;
}

.result {
  text-align: center;
}

.result__badge {
  display: grid;
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  place-items: center;
  color: #fff;
  font-size: 36px;
  font-weight: 900;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 13px 30px rgba(21, 132, 93, 0.25);
}

.result h1 {
  font-size: clamp(34px, 7vw, 54px);
}

.result__score {
  margin: 8px 0 24px;
  color: var(--primary);
  font-size: clamp(62px, 16vw, 108px);
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.06em;
}

.result__text {
  max-width: 620px;
  margin: 0 auto 14px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.result__text--strong {
  color: var(--ink);
  font-weight: 750;
}

.apps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0 24px;
}

.app-card {
  display: flex;
  min-width: 0;
  padding: 12px 10px 14px;
  color: var(--ink);
  text-decoration: none;
  flex-direction: column;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.app-card:hover {
  border-color: #b5aff0;
  box-shadow: 0 12px 25px rgba(44, 42, 92, 0.12);
  transform: translateY(-3px);
}

.app-card img {
  display: block;
  width: min(100%, 112px);
  height: auto;
  margin-bottom: 10px;
  border-radius: 22%;
}

.app-card span {
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.2;
}

.app-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.restart-button {
  color: var(--primary-dark);
  border: 2px solid #d7d3fa;
  background: #f5f3ff;
}

.restart-button:hover {
  background: #ebe8ff;
}

button:focus-visible,
a:focus-visible {
  outline: 4px solid rgba(101, 88, 232, 0.28);
  outline-offset: 3px;
}

@media (max-width: 590px) {
  .page-shell {
    width: min(100% - 18px, 760px);
    padding-top: 12px;
  }

  .brand {
    margin-bottom: 10px;
  }

  .card {
    padding: 20px 16px 24px;
    border-radius: 22px;
  }

  .intro {
    min-height: calc(100vh - 76px);
  }

  .answers {
    grid-template-columns: 1fr;
  }

  .question-media {
    min-height: 190px;
    margin-bottom: 20px;
  }

  .apps {
    gap: 8px;
  }

  .app-card {
    padding: 9px 6px 12px;
    border-radius: 14px;
  }

  .app-card img {
    width: min(100%, 88px);
    border-radius: 19px;
  }

  .app-card span {
    font-size: 12px;
  }
}

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