@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800&family=Amiri:wght@700&display=swap');

:root {
  --bg: #0c0a18;
  --bg2: #171329;
  --card: rgba(255, 255, 255, 0.055);
  --card-strong: rgba(255, 255, 255, 0.09);
  --border: rgba(212, 175, 55, 0.22);
  --border-soft: rgba(255, 255, 255, 0.1);
  --gold: #d4af37;
  --gold-soft: #ecd99a;
  --text: #f3efff;
  --muted: #b3acd6;
  --danger: #ff8080;
  --success: #7fe3b5;
  --radius: 18px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Tajawal", "system-ui", sans-serif;
  line-height: 1.7;
  min-height: 100%;
}

body {
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(212, 175, 55, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(130, 90, 220, 0.15), transparent),
    var(--bg2);
  background-attachment: fixed;
}

img { max-width: 100%; display: block; }

.container {
  max-width: 880px;
  margin-inline: auto;
  padding-inline: 20px;
}

/* ---------- Header ---------- */
.site-header {
  padding-block: 22px;
  text-align: center;
}
.logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gold-soft);
  letter-spacing: 1px;
  text-decoration: none;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: 50px 70px;
  overflow: hidden;
  border-radius: 0 0 36px 36px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.55;
  filter: saturate(1.1);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(12,10,24,0.35) 0%, rgba(12,10,24,0.75) 55%, var(--bg) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  margin: 0 0 14px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--gold-soft), #fff6df 50%, var(--gold-soft));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.subtitle {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 540px;
  margin: 0 auto 36px;
}

/* ---------- Form card ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 28px;
  backdrop-filter: blur(6px);
}
.form-card {
  max-width: 460px;
  margin: 0 auto;
  text-align: start;
}
.field { margin-bottom: 16px; }
.field label {
  display: block;
  margin-bottom: 8px;
  color: var(--gold-soft);
  font-weight: 500;
  font-size: 0.95rem;
}
.field input {
  width: 100%;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color .2s, background .2s;
}
.field input:focus {
  border-color: var(--gold);
  background: rgba(255,255,255,0.07);
}
.field input::placeholder { color: #7c75a0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  border-radius: 12px;
  border: none;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, opacity .15s;
}
.btn-gold {
  background: linear-gradient(90deg, #d4af37, #f3dd9a);
  color: #241b05;
  box-shadow: 0 8px 24px -8px rgba(212,175,55,0.6);
}
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 10px 28px -8px rgba(212,175,55,0.75); }
.btn-gold:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-outline {
  background: transparent;
  color: var(--gold-soft);
  border: 1px solid var(--border);
}
.btn-outline:hover { background: rgba(212,175,55,0.08); }
.btn-small { width: auto; padding: 9px 16px; font-size: 0.92rem; }

.error-msg {
  color: var(--danger);
  background: rgba(255,100,100,0.08);
  border: 1px solid rgba(255,100,100,0.3);
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 0.92rem;
  display: none;
}
.error-msg.show { display: block; }

/* ---------- How it works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-block: 50px;
}
.step {
  text-align: center;
  padding: 20px 12px;
}
.step .num {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--gold-soft);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  font-weight: 700;
}
.step p { color: var(--muted); font-size: 0.92rem; margin: 0; }
.step h3 { margin: 0 0 6px; font-size: 1rem; }

@media (max-width: 640px) {
  .steps { grid-template-columns: 1fr; gap: 24px; }
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  color: #9b94c4;
  font-size: 0.8rem;
  padding: 30px 16px 50px;
  line-height: 1.9;
}
.site-footer a { color: #b3acdc; }
.disclaimer {
  max-width: 560px;
  margin: 0 auto 10px;
  color: #a39cca;
}

/* ---------- Report page ---------- */
.report-wrap { padding-block: 40px 60px; }
.loading-box {
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
}
.spinner {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.12);
  border-top-color: var(--gold);
  margin: 0 auto 18px;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.result-head {
  text-align: center;
  margin-bottom: 28px;
}
.symbol-big { font-size: 3.4rem; margin-bottom: 6px; }
.archetype-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--gold-soft);
  margin: 0 0 6px;
}
.keyword-badge {
  display: inline-block;
  padding: 5px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--gold-soft);
  font-size: 0.85rem;
  margin-bottom: 4px;
}
.name-line { color: var(--muted); font-size: 0.95rem; margin-top: 10px; }

.teaser-card {
  margin-bottom: 22px;
}
.teaser-text { font-size: 1.08rem; margin: 0 0 18px; }
.listen-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(212,175,55,0.1);
  border: 1px solid var(--border);
  color: var(--gold-soft);
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.92rem;
}
.listen-btn:hover { background: rgba(212,175,55,0.18); }

.lock-section {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-soft);
}
.lock-blur {
  padding: 26px;
  filter: blur(6px);
  user-select: none;
  pointer-events: none;
}
.lock-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12,10,24,0.55), rgba(12,10,24,0.92));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  gap: 14px;
}
.lock-icon { font-size: 2.2rem; }
.lock-overlay h3 { margin: 0; font-size: 1.2rem; }
.lock-overlay p { color: var(--muted); margin: 0; max-width: 360px; font-size: 0.92rem; }
.price-tag {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gold-soft);
}
.price-tag span { font-size: 1rem; color: var(--muted); font-weight: 400; }

.full-report section { margin-bottom: 24px; }
.full-report h3 {
  color: var(--gold-soft);
  font-size: 1.1rem;
  margin: 0 0 10px;
  display: flex; align-items: center; gap: 8px;
}
.full-report ul { margin: 0; padding-inline-start: 22px; }
.full-report li { margin-bottom: 8px; }
.closing-box {
  background: rgba(212,175,55,0.07);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  font-weight: 500;
  color: var(--gold-soft);
  text-align: center;
}

.receipt-box {
  margin-top: 26px;
  border-top: 1px dashed var(--border-soft);
  padding-top: 16px;
  font-size: 0.85rem;
  color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: center;
}
.receipt-box b { color: var(--text); }

.banner {
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 0.95rem;
  text-align: center;
}
.banner.success { background: rgba(127,227,181,0.1); border: 1px solid rgba(127,227,181,0.35); color: var(--success); }
.banner.warn { background: rgba(255,185,80,0.1); border: 1px solid rgba(255,185,80,0.35); color: #ffc987; }

.actions-row {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.actions-row .btn { width: auto; flex: 1; min-width: 160px; }

bdi, .ltr { unicode-bidi: isolate; }

.back-link {
  display: inline-block;
  margin-top: 26px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}
.back-link:hover { color: var(--gold-soft); }

@media print {
  .site-header, .site-footer, .listen-btn, .back-link, .actions-row { display: none !important; }
  body { background: #fff; color: #000; }
  .card { border-color: #ccc; background: #fff; }
}
