:root {
  --bg-top: #1a082b;
  --bg-mid: #0d0015;
  --bg-bottom: #000000;
  --panel: rgba(255, 255, 255, 0.05);
  --panel-hover: rgba(255, 255, 255, 0.1);
  --panel-border: rgba(255, 255, 255, 0.1);
  --panel-border-strong: rgba(246, 51, 154, 0.3);
  --text-main: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.5);
  --text-faint: rgba(255, 255, 255, 0.38);
  --accent: #f6339a;
  --accent-strong: #ff5f9c;
  --accent-glow: rgba(246, 51, 154, 0.38);
  --shadow-main: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --radius-lg: 16px;
  --radius-xl: 24px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text-main);
  background:
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 50%, var(--bg-bottom) 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  display: none;
}

.background-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(110px);
  pointer-events: none;
}

.background-orb-primary {
  top: 15%;
  left: 50%;
  width: 31.25rem;
  height: 31.25rem;
  transform: translateX(-50%);
  background: rgba(246, 51, 154, 0.15);
  filter: blur(120px);
}

.background-orb-secondary {
  right: 10%;
  bottom: 20%;
  width: 18.75rem;
  height: 18.75rem;
  background: rgba(172, 75, 255, 0.15);
  filter: blur(100px);
}

.background-orb-tertiary {
  left: 5%;
  top: 60%;
  width: 15.625rem;
  height: 15.625rem;
  background: rgba(225, 42, 251, 0.1);
  filter: blur(80px);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 0.7rem 0.9rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
}

.brand-icon {
  width: 1.45rem;
  height: 1.45rem;
  flex-shrink: 0;
}

.brand-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.page-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem 2rem;
}

.quiz-shell {
  width: min(100%, 28rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.progress-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 0.75rem;
  margin-bottom: 1.5rem;
}

.progress-dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.progress-dot.is-active {
  background: var(--accent);
  transform: none;
}

.screen {
  width: 100%;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
}

.screen.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.screen-title {
  margin: 0 0 2rem;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
}

#question-screen .screen-title {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  font-weight: 700;
  line-height: 1.25;
}

#loading-screen .screen-title {
  margin-bottom: 0.25rem;
  font-size: 1.25rem;
}

.screen-subtitle {
  margin: 0 0 2rem;
  text-align: center;
  color: var(--text-soft);
  font-size: 0.875rem;
  line-height: 1.4;
}

#loading-screen .screen-subtitle {
  margin-bottom: 1.8rem;
}

.options-grid {
  display: grid;
  gap: 0.75rem;
  width: 100%;
}

.options-grid.is-two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.option-button {
  position: relative;
  width: 100%;
  min-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  background: var(--panel);
  color: var(--text-main);
  font-size: 0.9375rem;
  font-weight: 400;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow-main);
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.option-button::before {
  display: none;
}

.option-button::after {
  display: none;
  pointer-events: none;
}

.option-button.is-centered {
  justify-content: center;
  text-align: center;
}

.option-button:hover {
  transform: none;
  background: var(--panel-hover);
  border-color: var(--panel-border-strong);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.option-button:active,
.option-button.is-picked {
  transform: scale(0.97);
}

.option-button:focus-visible,
.result-button:focus-visible {
  outline: 2px solid rgba(255, 95, 156, 0.9);
  outline-offset: 2px;
}

.option-icon {
  min-width: 1.125rem;
  font-size: 1.125rem;
  line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  flex-shrink: 0;
  filter: none;
  position: relative;
  z-index: 1;
}

.option-label {
  display: block;
  line-height: 1.3;
  position: relative;
  z-index: 1;
}

.loading-mark {
  width: 5rem;
  height: 5rem;
  margin: 0 auto 1.5rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(246, 51, 154, 0.2);
  color: #fb64b6;
}

.loading-spinner {
  width: 2.35rem;
  height: 2.35rem;
  animation: slow-spin 1.7s linear infinite;
}

.loading-steps {
  display: grid;
  gap: 1rem;
  width: min(100%, 20rem);
  margin: 0 auto 2rem;
}

.loading-step {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text-faint);
  font-size: 0.875rem;
  transition: color 180ms ease, transform 180ms ease;
}

.loading-step.is-done {
  color: var(--text-main);
  transform: translateX(2px);
}

.loading-step-icon {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background-color 180ms ease, border-color 180ms ease;
}

.loading-step-icon::before {
  content: "";
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.25);
}

.loading-step.is-done .loading-step-icon {
  background: var(--accent);
  border-color: transparent;
}

.loading-step.is-done .loading-step-icon::before {
  width: 0.85rem;
  height: 0.6rem;
  border-radius: 0;
  border: 0;
  border-bottom: 2px solid white;
  border-left: 2px solid white;
  transform: rotate(-45deg) translate(1px, -1px);
}

.loading-bar {
  width: 100%;
  max-width: 20rem;
  height: 0.375rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: none;
  margin: 0 auto;
}

.loading-bar-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent) 0%, #ff667f 100%);
  box-shadow: none;
}

.loading-percentage {
  margin: 0.5rem 0 0;
  text-align: center;
  color: var(--text-faint);
  font-size: 0.75rem;
}

.result-card {
  width: 100%;
  max-width: 308px;
  margin: 0 auto;
  padding: 1.65rem 1.05rem 1.05rem;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.028)),
    rgba(48, 20, 53, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.result-icon-wrap {
  position: relative;
  margin-bottom: 1rem;
}

.result-icon {
  width: 3.25rem;
  height: 3.25rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff3aa5 0%, #f6339a 100%);
  color: white;
  box-shadow: 0 10px 24px rgba(246, 51, 154, 0.24);
}

.result-icon svg {
  width: 1.45rem;
  height: 1.45rem;
}

.result-badge {
  position: absolute;
  top: -0.15rem;
  right: -0.25rem;
  width: 1.15rem;
  height: 1.15rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #ff3aa5;
  border: 2px solid #1a082b;
  color: white;
  font-size: 0.62rem;
  font-weight: 700;
}

.result-title {
  max-width: 14ch;
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.result-copy {
  max-width: 22ch;
  margin: 0 0 1.2rem;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.83rem;
  line-height: 1.45;
}

.result-button {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.95rem;
  padding: 0.9rem 1.2rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #f6339a 0%, #ff2357 100%);
  box-shadow:
    0 10px 26px rgba(246, 51, 154, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  color: white;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.result-button:hover {
  transform: translateY(-1px);
  box-shadow:
    0 14px 30px rgba(246, 51, 154, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.noscript-message {
  position: fixed;
  inset-inline: 1rem;
  bottom: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.72);
  color: white;
  text-align: center;
  font-size: 0.9rem;
}

@keyframes slow-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 640px) {
  body {
    overflow: auto;
  }

  .page-shell {
    min-height: 100svh;
    align-items: flex-start;
    padding-top: 8rem;
  }

  #question-screen .screen-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
  }

  .option-button {
    font-size: 0.9375rem;
    padding-inline: 1.25rem;
  }
}
