/* === Variables & Reset === */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0c0508;
  --surface: #1a0b12;
  --surface2: #241018;
  --border: #3d1a28;
  --pink: #ec4899;
  --pink2: #f472b6;
  --pink-glow: rgba(236,72,153,0.25);
  --text: #fdf2f8;
  --muted: #c49ab0;
  --success: #4ade80;
}

/* === Base === */
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
}

/* === Animations === */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(236,72,153,0.5); }
  50%      { box-shadow: 0 0 0 6px rgba(236,72,153,0); }
}
@keyframes blink {
  0%,100% { opacity: 1; }
  50%     { opacity: 0.15; }
}

/* === Shared Components === */
.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.back-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.logo-sm {
  font-size: 16px;
  font-weight: 800;
  color: var(--pink2);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 22px;
  width: 100%;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(236,72,153,0.1);
  border: 1px solid rgba(236,72,153,0.25);
  border-radius: 99px;
  padding: 7px 16px;
  font-size: 12px;
  color: var(--pink2);
  font-weight: 600;
  letter-spacing: 0.3px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--pink);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.dot-blink {
  width: 7px;
  height: 7px;
  background: var(--pink2);
  border-radius: 50%;
  animation: blink 1s infinite;
}

.cta-btn {
  display: inline-block;
  width: 100%;
  padding: 18px 32px;
  background: linear-gradient(135deg, var(--pink), var(--pink2));
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  border-radius: 16px;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 8px 32px rgba(236,72,153,0.35);
  transition: transform 0.2s, box-shadow 0.2s;
  letter-spacing: -0.2px;
}
.cta-btn:active {
  transform: scale(0.98);
  box-shadow: 0 4px 16px rgba(236,72,153,0.25);
}

.cta-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
}

footer {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

/* === Index Page === */
body.page-index {
  overflow-x: hidden;
}

body.page-index .bg-glow {
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(236,72,153,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(244,114,182,0.08) 0%, transparent 60%);
}

body.page-index .wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

nav {
  display: flex;
  justify-content: center;
  padding: 24px 0 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.logo em { color: var(--pink2); font-style: normal; }

.hero {
  text-align: center;
  padding: 48px 0 40px;
}
.hero h1 {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -1px;
  margin-bottom: 16px;
}
.hero h1 span {
  background: linear-gradient(135deg, var(--pink), var(--pink2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 36px;
}

.stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 36px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 8px 0 40px;
}
.stat { text-align: center; }
.stat-num { font-size: 22px; font-weight: 800; color: var(--pink2); }
.stat-label { font-size: 11px; color: var(--muted); margin-top: 2px; }

.section-title {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 24px;
}
.section-title span { color: var(--pink2); }

.steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 44px;
}
.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.step-num {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--pink), var(--pink2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  flex-shrink: 0;
}
.step-body h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.step-body p  { font-size: 13px; color: var(--muted); line-height: 1.5; }

.testimonials {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 44px;
}
.testi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
}
.testi-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 12px;
}
.testi-text::before { content: '\201C'; color: var(--pink2); font-size: 18px; }
.testi-text::after  { content: '\201D'; color: var(--pink2); font-size: 18px; }
.testi-author { display: flex; align-items: center; gap: 10px; }
.testi-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: linear-gradient(135deg, var(--pink), var(--pink2));
}
.testi-name { font-size: 13px; font-weight: 600; }
.testi-meta { font-size: 11px; color: var(--muted); }
.stars { color: #f59e0b; font-size: 12px; margin-bottom: 2px; }

.bottom-cta {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 24px;
  position: relative;
  overflow: hidden;
}
.bottom-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top, rgba(236,72,153,0.1) 0%, transparent 70%);
  pointer-events: none;
}
.bottom-cta h2 { font-size: 22px; font-weight: 800; margin-bottom: 10px; letter-spacing: -0.5px; }
.bottom-cta p  { font-size: 14px; color: var(--muted); margin-bottom: 24px; line-height: 1.6; }

body.page-index footer { margin-top: 36px; }

/* === Quiz Page === */
body.page-quiz {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 48px;
}

body.page-quiz .bg-glow {
  background: radial-gradient(ellipse 70% 40% at 50% 0%, rgba(236,72,153,0.1) 0%, transparent 70%);
}

.progress-wrap { margin-bottom: 28px; }
.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.progress-bar {
  height: 5px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--pink), var(--pink2));
  border-radius: 99px;
  transition: width 0.5s cubic-bezier(.4,0,.2,1);
}

.question-block { display: none; }
.question-block.active { display: block; animation: fadeUp 0.3s ease; }

.q-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--pink);
  margin-bottom: 10px;
}
.q-text {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 24px;
}

.options { display: flex; flex-direction: column; gap: 12px; }
.option {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.option:hover { border-color: var(--pink); background: rgba(236,72,153,0.07); }
.option.selected {
  border-color: var(--pink2);
  background: rgba(236,72,153,0.12);
  box-shadow: 0 0 0 1px var(--pink2);
}
.option.disabled { pointer-events: none; opacity: 0.5; }

.opt-key {
  min-width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
  margin-top: 1px;
}
.option.selected .opt-key {
  background: linear-gradient(135deg, var(--pink), var(--pink2));
  color: #fff;
}

.nav-back { margin-top: 20px; }
.btn-back {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
  padding: 12px 20px;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.btn-back:hover { border-color: var(--pink); color: var(--pink2); }
.btn-back:disabled { opacity: 0.25; cursor: not-allowed; }

#screen-countdown { display: none; text-align: center; }

.countdown-num {
  font-size: 88px;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, var(--pink), var(--pink2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 8px 0 12px;
}
.countdown-label { color: var(--muted); font-size: 14px; margin-bottom: 32px; }

.analyzing-steps { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.analyzing-step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.5s, transform 0.5s;
}
.analyzing-step.show { opacity: 1; transform: translateX(0); }
.step-icon { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; }

body.page-quiz footer { margin-top: 28px; }

/* === Match Page === */
body.page-match {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 60px;
}

body.page-match .bg-glow {
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(236,72,153,0.12) 0%, transparent 65%);
}

body.page-match .top-bar { justify-content: center; }

.match-intro {
  text-align: center;
  margin-bottom: 24px;
  animation: fadeUp 0.5s ease;
}
.match-intro h1 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}
.match-intro h1 span {
  background: linear-gradient(135deg, var(--pink), var(--pink2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.match-intro p { color: var(--muted); font-size: 14px; }

.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 22px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.5s ease 0.1s both;
}
.profile-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top, rgba(236,72,153,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.compat-chip {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(74,222,128,0.12);
  border: 1px solid rgba(74,222,128,0.3);
  border-radius: 99px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--success);
}

.profile-pic-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
  position: relative;
}
.profile-pic {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 3px solid var(--pink2);
  box-shadow: 0 0 28px var(--pink-glow), 0 0 0 6px rgba(236,72,153,0.08);
  object-fit: cover;
}
.online-dot {
  position: absolute;
  bottom: 4px;
  right: calc(50% - 52px);
  width: 16px;
  height: 16px;
  background: var(--success);
  border-radius: 50%;
  border: 2px solid var(--surface);
}

.profile-name { font-size: 22px; font-weight: 800; text-align: center; margin-bottom: 4px; }
.profile-type  { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 14px; }

.profile-tags { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; margin-bottom: 20px; }
.tag {
  background: rgba(236,72,153,0.1);
  border: 1px solid rgba(236,72,153,0.2);
  border-radius: 99px;
  padding: 5px 12px;
  font-size: 12px;
  color: var(--pink2);
}

.compat-section { border-top: 1px solid var(--border); padding-top: 18px; }
.compat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.compat-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.compat-name { font-size: 12px; color: var(--muted); width: 90px; flex-shrink: 0; }
.compat-track {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.compat-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--pink), var(--pink2));
  border-radius: 99px;
  transition: width 1s cubic-bezier(.4,0,.2,1);
}
.compat-pct { font-size: 12px; font-weight: 700; color: var(--pink2); width: 32px; text-align: right; }

.reason-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  animation: fadeUp 0.5s ease 0.2s both;
}
.reason-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--pink);
  margin-bottom: 10px;
}
.reason-text { font-size: 14px; line-height: 1.7; color: var(--muted); }
.reason-text strong { color: var(--text); }

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px 22px;
  margin-bottom: 16px;
  animation: fadeUp 0.5s ease 0.3s both;
}
.contact-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.contact-card p  { font-size: 13px; color: var(--muted); line-height: 1.5; margin-bottom: 20px; }

.phone-wrap {
  display: flex;
  align-items: center;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}
.phone-wrap:focus-within { border-color: var(--pink2); }
.phone-prefix {
  padding: 15px 14px;
  font-size: 14px;
  color: var(--muted);
  border-right: 1px solid var(--border);
  white-space: nowrap;
  background: var(--surface2);
}
.phone-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 16px;
  padding: 15px 14px;
}
.phone-input::placeholder { color: var(--border); }

.btn-submit {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--pink), var(--pink2));
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(236,72,153,0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-submit:active { transform: scale(0.98); box-shadow: 0 3px 12px rgba(236,72,153,0.2); }

.privacy-note { font-size: 11px; color: var(--muted); text-align: center; margin-top: 10px; line-height: 1.5; }

.error-msg { font-size: 12px; color: #f87171; margin-bottom: 8px; display: none; }
.phone-wrap.invalid { border-color: #f87171; }

#screen-success {
  display: none;
  text-align: center;
  animation: fadeUp 0.4s ease;
}
.success-icon    { font-size: 64px; margin-bottom: 20px; }
.success-title   { font-size: 24px; font-weight: 800; margin-bottom: 10px; }
.success-sub     { font-size: 15px; color: var(--muted); line-height: 1.7; margin-bottom: 28px; }
.success-sub strong { color: var(--pink2); }

.retake-link {
  display: inline-block;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
}

body.page-match footer { margin-top: 36px; }
