* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg-start: #0f0f12;
  --bg-end: #161620;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.14);
  --text-primary: #f5f2ff;
  --text-secondary: rgba(219, 214, 243, 0.76);
  --accent-start: #9f6bff;
  --accent-end: #d4af37;
  --accent-strong: #f1d37a;
  --danger: #ff6b6b;
  --shadow: rgba(12, 10, 26, 0.55);
  --transition: 280ms ease;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text-primary);
  background: radial-gradient(circle at 20% 10%, rgba(102, 73, 171, 0.18), transparent 65%),
    linear-gradient(160deg, var(--bg-start), var(--bg-end));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 32px 20px 64px;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(244, 206, 123, 0.12), transparent 55%),
    radial-gradient(circle at 10% 85%, rgba(128, 90, 213, 0.18), transparent 55%);
  filter: blur(65px);
  opacity: 0.8;
  pointer-events: none;
  z-index: -2;
}

.background-aurora {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 10%, rgba(152, 103, 242, 0.2), transparent 55%),
    radial-gradient(circle at 70% 75%, rgba(212, 175, 55, 0.12), transparent 60%);
  backdrop-filter: blur(80px);
  pointer-events: none;
  z-index: -1;
  opacity: 0.75;
}

.site-header {
  width: min(1080px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  margin-bottom: 32px;
  border-radius: 20px;
  background: rgba(18, 18, 28, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 40px rgba(7, 6, 18, 0.4);
  position: sticky;
  top: 16px;
  z-index: 5;
}

.brand {
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-flex;
  gap: 4px;
  align-items: center;
  color: var(--accent-strong);
}

.brand span {
  color: var(--accent-start);
  text-shadow: 0 0 12px rgba(159, 107, 255, 0.6);
}

.site-nav {
  display: flex;
  gap: 16px;
}

.nav-link {
  position: relative;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 999px;
  transition: var(--transition);
  background: linear-gradient(135deg, rgba(159, 107, 255, 0.18), rgba(244, 206, 123, 0.12));
  border: 1px solid rgba(159, 107, 255, 0.4);
  box-shadow: 0 0 0 rgba(159, 107, 255, 0.45);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--accent-strong);
  box-shadow: 0 0 18px rgba(159, 107, 255, 0.55);
}

#app {
  width: min(680px, 100%);
  display: grid;
  gap: 28px;
}

.screen {
  display: none;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  padding: clamp(28px, 5vw, 40px);
  backdrop-filter: blur(24px);
  box-shadow: 0 24px 50px var(--shadow);
  text-align: center;
  opacity: 0;
  transform: translateY(12px);
}

.screen.active {
  display: block;
  animation: screenFade 600ms ease forwards;
}

@keyframes screenFade {
  0% {
    opacity: 0;
    transform: translateY(16px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

h1,
h2 {
  margin: 0 0 18px;
  font-weight: 600;
  text-shadow: 0 0 18px rgba(159, 107, 255, 0.55), 0 0 32px rgba(244, 206, 123, 0.35);
}

h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  letter-spacing: 0.06em;
}

h2 {
  font-size: clamp(1.35rem, 4vw, 1.9rem);
}

p {
  margin: 0 0 18px;
  line-height: 1.7;
  color: var(--text-secondary);
  font-size: 1rem;
}

.start-subtitle {
  font-style: italic;
  color: rgba(241, 211, 122, 0.85);
}

.question-card h2 {
  color: var(--text-primary);
}

.question-progress {
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: rgba(229, 222, 255, 0.76);
  text-transform: uppercase;
  margin-bottom: 18px;
}

.answers {
  display: grid;
  gap: 14px;
}

button,
#result-link {
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  border: none;
  color: #0b0915;
  padding: 14px 22px;
  margin: 8px 0;
  border-radius: 16px;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  box-shadow: 0 0 0 rgba(159, 107, 255, 0.4);
}

button:hover,
#result-link:hover,
button:focus-visible,
#result-link:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 35px rgba(159, 107, 255, 0.35);
  filter: saturate(110%);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
  transform: none;
}

button.ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

button.ghost:hover,
button.ghost:focus-visible {
  color: var(--accent-strong);
  border-color: rgba(241, 211, 122, 0.6);
  transform: none;
  box-shadow: 0 0 18px rgba(241, 211, 122, 0.35);
}

#btn-start {
  animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
  0%,
  100% {
    box-shadow: 0 0 18px rgba(159, 107, 255, 0.38);
  }
  50% {
    box-shadow: 0 0 28px rgba(241, 211, 122, 0.55);
  }
}

.answer {
  width: 100%;
}

.result-stats {
  font-size: 0.95rem;
  color: rgba(229, 222, 255, 0.7);
}

a {
  color: var(--accent-strong);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

.consent-overlay,
.consent-blocker {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(6, 5, 12, 0.82);
  backdrop-filter: blur(20px);
  z-index: 50;
  transition: opacity var(--transition), visibility var(--transition);
}

.consent-overlay.hidden,
.consent-blocker.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.consent-modal {
  width: min(480px, 100%);
  background: rgba(28, 26, 44, 0.65);
  border: 1px solid rgba(241, 211, 122, 0.18);
  border-radius: 24px;
  padding: clamp(28px, 5vw, 36px);
  backdrop-filter: blur(28px);
  box-shadow: 0 24px 60px rgba(10, 6, 22, 0.55);
  text-align: center;
  animation: modalIn 400ms ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.consent-modal p {
  color: var(--text-secondary);
}

.consent-checkbox {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  margin: 18px 0 8px;
  color: var(--text-primary);
}

.consent-checkbox input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent-start);
}

.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

#btn-consent-continue[disabled] {
  background: linear-gradient(135deg, rgba(159, 107, 255, 0.4), rgba(212, 175, 55, 0.35));
  color: rgba(17, 13, 30, 0.65);
}

#consent-blocker {
  text-align: center;
}

@media (max-width: 768px) {
  body {
    padding: 20px 14px 48px;
  }

  .site-header {
    padding: 14px 18px;
    margin-bottom: 24px;
    position: static;
  }

  #app {
    gap: 22px;
  }

  .screen {
    border-radius: 24px;
    padding: clamp(24px, 6vw, 32px);
  }
}

@media (max-width: 520px) {
  h1 {
    font-size: clamp(1.8rem, 8vw, 2.2rem);
  }

  h2 {
    font-size: clamp(1.2rem, 6vw, 1.6rem);
  }

  button,
  #result-link {
    font-size: 0.95rem;
    min-height: 48px;
    padding: 12px 18px;
  }

  .consent-actions {
    flex-direction: column;
  }
}

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