:root {
  --bg-deep: #1a1033;
  --bg-mid: #2d1b54;
  --purple: #4a2a7a;
  --gold: #e0b7a0;
  --gold-strong: #d4af37;
  --text-light: #f5eefe;
  --text-muted: #c9bfe0;
  --card-bg: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.14);
  --radius: 18px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 15%, rgba(224, 183, 160, 0.10), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(212, 175, 55, 0.10), transparent 45%),
    linear-gradient(160deg, var(--bg-deep) 0%, var(--bg-mid) 55%, var(--purple) 100%);
  color: var(--text-light);
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 20px 22px 40px;
  position: relative;
}

/* ---------- Mini brand (shown above the top bar on every screen but intro) ---------- */
.mini-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 6px;
}
.mini-logo {
  height: 72px;
  width: auto;
}

/* ---------- Top bar / progress ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 32px;
  margin-bottom: 8px;
}

.back-btn {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  opacity: 0.8;
}
.back-btn:hover { opacity: 1; }

.progress-bar-wrap {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-strong), var(--gold));
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* ---------- Screens ---------- */
#screens {
  flex: 1;
  display: flex;
  align-items: flex-start;
}

/* Intro keeps the classic centered splash look; other screens anchor to the top
   so the mini logo sits in a fixed spot instead of floating in empty space. */
#screen-intro {
  align-self: center;
}

.screen {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  opacity: 0;
}
.screen.active {
  display: flex;
  animation: fadeSlideIn 0.45s ease forwards;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  margin: 0 0 10px;
}

/* ---------- Intro ---------- */
.logo {
  width: 100%;
  max-width: 200px;
  height: auto;
  margin-bottom: 8px;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.35));
}

.intro-title {
  font-family: "Playfair Display", serif;
  font-size: 32px;
  line-height: 1.25;
  margin: 0 0 14px;
}
.intro-title span { color: var(--gold); }

.intro-subtitle {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 28px;
  max-width: 360px;
}

.intro-footnote {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 14px;
  opacity: 0.8;
}

/* ---------- Buttons ---------- */
.btn {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 15px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.btn-primary {
  background: linear-gradient(90deg, var(--gold-strong), var(--gold));
  color: #2a1a0a;
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.28);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(212, 175, 55, 0.38); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }

.btn-large { padding: 16px 34px; font-size: 16px; width: 100%; max-width: 340px; }

.btn-continue { margin-top: 28px; width: 100%; max-width: 340px; padding: 15px 30px; }

/* ---------- Question screen ---------- */
#screen-question { justify-content: flex-start; padding-top: 18px; }

.question-title {
  font-family: "Playfair Display", serif;
  font-size: 25px;
  line-height: 1.3;
  margin: 0 0 8px;
}

.question-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 22px;
}

.question-body {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option {
  width: 100%;
  text-align: left;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-light);
  font-family: "Poppins", sans-serif;
  font-size: 15px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}
.option:hover { border-color: var(--gold); transform: translateY(-1px); }
.option.selected {
  border-color: var(--gold-strong);
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.18), rgba(224, 183, 160, 0.10));
}

.text-input {
  width: 100%;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-light);
  font-family: "Poppins", sans-serif;
  font-size: 16px;
}
.text-input::placeholder { color: var(--text-muted); }
.text-input:focus { outline: none; border-color: var(--gold-strong); }

/* Native date input color-scheme so the picker icon is visible on dark bg */
input[type="date"] { color-scheme: dark; }

/* ---------- Zodiac preview (birthdate question) ---------- */
.zodiac-row {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 20px;
  min-height: 104px;
  margin-bottom: 6px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}
.zodiac-row.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }

.zodiac-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0.5;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.zodiac-item img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.zodiac-item .zodiac-name {
  font-size: 12px;
  color: var(--text-muted);
}

.zodiac-item.current {
  opacity: 1;
  transform: translateY(-6px);
}
.zodiac-item.current img {
  width: 78px;
  height: 78px;
  filter: drop-shadow(0 8px 20px rgba(212, 175, 55, 0.35));
}
.zodiac-item.current .zodiac-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--gold);
}

/* ---------- Loading ---------- */
#screen-loading { gap: 22px; }

.loading-orb {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--gold), var(--purple) 70%);
  box-shadow: 0 0 40px rgba(212, 175, 55, 0.35);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.08); opacity: 1; }
}

.loading-text {
  font-size: 15px;
  color: var(--text-muted);
  min-height: 20px;
}

.loading-bar-wrap {
  width: 100%;
  max-width: 300px;
  height: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  overflow: hidden;
}
.loading-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-strong), var(--gold));
  border-radius: 999px;
}

/* ---------- Result ---------- */
.match-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-bottom: 14px;
}
.match-score-value {
  font-family: "Playfair Display", serif;
  font-size: 44px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  text-shadow: 0 6px 24px rgba(212, 175, 55, 0.35);
}
.match-score-label {
  font-size: 12.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.result-title {
  font-family: "Playfair Display", serif;
  font-size: 22px;
  line-height: 1.3;
  margin: 0 0 20px;
  max-width: 360px;
}

.result-checklist {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 360px;
  text-align: left;
}
.result-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.5px;
  color: var(--text-light);
}
.checklist-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #2a1a0a;
  background: linear-gradient(90deg, var(--gold-strong), var(--gold));
  margin-top: 1px;
}

.result-image-wrap {
  position: relative;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 22px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
}
.result-image {
  width: 100%;
  height: 100%;
  filter: blur(9px) saturate(1.1);
  transform: scale(1.15);
}
.result-lock {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(26, 16, 51, 0.35);
  color: var(--text-light);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.lock-icon { font-size: 22px; }

.result-description {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.6;
  max-width: 360px;
  margin: 0 0 16px;
}

.result-timer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: var(--text-light);
  font-size: 13px;
  margin-bottom: 22px;
}
.result-timer strong { color: var(--gold); font-variant-numeric: tabular-nums; }
.timer-icon { font-size: 15px; }

/* ---------- Responsive ---------- */
@media (max-width: 380px) {
  .intro-title { font-size: 27px; }
  .question-title { font-size: 22px; }
}
