:root {
  color-scheme: dark;
  --bg: #080713;
  --card: rgba(22, 18, 42, 0.78);
  --card-strong: rgba(34, 26, 62, 0.92);
  --text: #fbf7ff;
  --muted: #c9bddb;
  --line: rgba(255, 255, 255, 0.14);
  --accent: #d9a7ff;
  --accent-strong: #ffcf70;
  --violet: #7c4dff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 8%, rgba(124, 77, 255, 0.32), transparent 34%),
    radial-gradient(circle at 88% 18%, rgba(255, 207, 112, 0.18), transparent 26%),
    linear-gradient(145deg, #080713 0%, #15112a 50%, #070510 100%);
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: '';
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.62) 0 1px, transparent 1px),
    radial-gradient(circle, rgba(255, 255, 255, 0.35) 0 1px, transparent 1px);
  background-position: 0 0, 26px 42px;
  background-size: 90px 90px, 130px 130px;
  opacity: 0.28;
}

button,
input,
a {
  font: inherit;
}

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

.hidden {
  display: none !important;
}

.app-shell,
.forecast-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 760px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 16px 36px;
  display: grid;
  align-items: center;
}

.forecast-shell,
.legal-shell {
  align-items: start;
  gap: 18px;
}

.hero-card,
.quiz-card,
.calc-card,
.form-card,
.portal-card,
.forecast-hero,
.forecast-block,
.restart-card,
.legal-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(145deg, var(--card), rgba(12, 10, 27, 0.84));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-card,
.quiz-card,
.calc-card,
.form-card,
.portal-card {
  padding: 28px 20px;
}

.hero-card {
  min-height: 560px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

h1 {
  font-size: clamp(36px, 11vw, 62px);
}

h2 {
  font-size: clamp(28px, 8vw, 44px);
}

.hero-text,
.muted,
.forecast-block p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.62;
}

.hero-text {
  margin: 18px 0 26px;
}

.small-note {
  margin: 14px 0 0;
  color: rgba(251, 247, 255, 0.58);
  font-size: 13px;
}

.primary-button,
.secondary-button {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 800;
  transition: transform 0.18s ease, filter 0.18s ease, opacity 0.18s ease;
}

.primary-button {
  color: #171020;
  background: linear-gradient(135deg, #ffdf91, #d9a7ff 54%, #9f8cff);
  box-shadow: 0 16px 42px rgba(217, 167, 255, 0.32);
}

.secondary-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid var(--line);
}

.primary-button:active,
.secondary-button:active,
.answer-button:active {
  transform: scale(0.98);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: wait;
  opacity: 0.64;
}

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(2px);
  opacity: 0.76;
}

.orb-one {
  width: 220px;
  height: 220px;
  top: 42px;
  right: -74px;
  background: radial-gradient(circle, rgba(217, 167, 255, 0.9), transparent 66%);
}

.orb-two {
  width: 170px;
  height: 170px;
  top: 118px;
  left: -58px;
  background: radial-gradient(circle, rgba(255, 207, 112, 0.72), transparent 68%);
}

.quiz-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.progress-bar {
  height: 8px;
  margin: 14px 0 28px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-strong), var(--accent), var(--violet));
  transition: width 0.28s ease;
}

.question-block h2 {
  margin-bottom: 22px;
}

.answers-grid {
  display: grid;
  gap: 10px;
}

.answer-button {
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  background: rgba(255, 255, 255, 0.07);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.answer-button.selected,
.answer-button:hover {
  border-color: rgba(255, 207, 112, 0.7);
  background: rgba(255, 207, 112, 0.13);
}

.zodiac-wheel {
  width: 168px;
  height: 168px;
  margin: 0 auto 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(217, 167, 255, 0.2), transparent 66%);
  animation: spin 13s linear infinite;
}

.zodiac-wheel span {
  grid-area: 1 / 1;
  color: var(--accent-strong);
  font-size: 34px;
}

.zodiac-wheel span:nth-child(2) {
  transform: translateY(-54px);
}

.zodiac-wheel span:nth-child(3) {
  transform: translate(48px, 34px);
}

.calc-card,
.portal-card {
  text-align: center;
}

.calc-lines {
  display: grid;
  gap: 9px;
  margin: 26px 0 18px;
}

.calc-lines span {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.34), transparent);
  animation: shimmer 2.1s ease-in-out infinite;
}

.calc-lines span:nth-child(2) {
  animation-delay: 0.18s;
}

.calc-lines span:nth-child(3) {
  animation-delay: 0.36s;
}

form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 18px;
  outline: 0;
  padding: 0 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

input:focus {
  border-color: rgba(217, 167, 255, 0.8);
  box-shadow: 0 0 0 4px rgba(217, 167, 255, 0.12);
}

.form-error {
  min-height: 20px;
  margin: 0;
  color: #ffb3bd;
  font-size: 14px;
}

.portal {
  width: 190px;
  height: 190px;
  margin: 0 auto 26px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #ffdf91, #d9a7ff, #7c4dff, #ffdf91);
  filter: drop-shadow(0 0 36px rgba(217, 167, 255, 0.42));
  animation: portal 2.8s ease-in-out infinite;
}

.forecast-hero,
.forecast-block,
.restart-card,
.legal-card {
  padding: 22px 18px;
}

.forecast-layout {
  display: grid;
  gap: 14px;
}

.forecast-block p:last-child {
  margin-bottom: 0;
}

.ad-slot {
  overflow: hidden;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 28px;
  color: #171020;
  background: #ffffff;
  box-shadow: 0 20px 64px rgba(0, 0, 0, 0.34);
  display: block;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.ad-slot:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 74px rgba(0, 0, 0, 0.4);
}

.ad-slot:active {
  transform: scale(0.99);
}

.ad-video-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  background:
    radial-gradient(circle at 22% 18%, rgba(124, 77, 255, 0.28), transparent 34%),
    radial-gradient(circle at 82% 18%, rgba(255, 207, 112, 0.32), transparent 26%),
    linear-gradient(135deg, #1b1234, #070510 58%, #2a1a45);
}

.ad-video {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ad-video-wrap:not(.has-video) .ad-video {
  opacity: 0;
}

.ad-video-fallback {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 22px;
  color: rgba(255, 255, 255, 0.88);
  text-align: center;
  font-size: clamp(22px, 7vw, 42px);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.ad-video-wrap.has-video .ad-video-fallback {
  display: none;
}

.ad-text {
  margin: 14px 6px 4px;
  color: #171020;
  font-size: clamp(17px, 4.6vw, 22px);
  font-weight: 900;
  line-height: 1.3;
}

.consent-note a,
.legal-card a,
.site-footer a {
  color: var(--accent-strong);
  text-decoration: none;
}

.consent-note a:hover,
.legal-card a:hover,
.site-footer a:hover {
  text-decoration: underline;
}

.site-footer {
  position: relative;
  z-index: 1;
  width: min(100%, 860px);
  margin: -18px auto 0;
  padding: 0 16px 28px;
  color: rgba(251, 247, 255, 0.58);
  text-align: center;
  font-size: 13px;
}

.site-footer p {
  margin: 0 0 12px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 16px;
}

.legal-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 860px);
  min-height: auto;
  margin: 0 auto;
  padding: 22px 16px 36px;
  display: grid;
}

.legal-card {
  overflow: visible;
}

.legal-card h1 {
  margin-bottom: 10px;
}

.legal-card h2 {
  margin: 30px 0 10px;
  font-size: clamp(23px, 6vw, 34px);
}

.legal-card p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.legal-card p:last-child {
  margin-bottom: 0;
}

.legal-updated {
  margin-top: 0;
  color: rgba(251, 247, 255, 0.58) !important;
  font-size: 14px !important;
}

.contact-list {
  display: grid;
  gap: 12px;
  margin: 26px 0;
}

.contact-list div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
}

.contact-list span {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact-list p,
.contact-list a {
  margin: 0;
  font-size: 16px;
}

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

@keyframes shimmer {
  0%, 100% {
    opacity: 0.28;
    transform: translateX(-4px);
  }
  50% {
    opacity: 1;
    transform: translateX(4px);
  }
}

@keyframes portal {
  0%, 100% {
    transform: scale(0.92) rotate(0deg);
    opacity: 0.84;
  }
  50% {
    transform: scale(1.04) rotate(60deg);
    opacity: 1;
  }
}

@media (min-width: 680px) {
  .app-shell,
  .forecast-shell {
    padding: 36px 24px 54px;
  }

  .hero-card,
  .quiz-card,
  .calc-card,
  .form-card,
  .portal-card,
  .forecast-hero,
  .forecast-block,
  .restart-card,
  .legal-card {
    padding: 34px;
    border-radius: 34px;
  }

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