/* ============================================
   AstralAI – Global Stylesheet
   ============================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #1a1224;
  --gold: #c9a84c;
  --gold-light: #e8c97a;
  --mystic: #7b4fa6;
  --mystic-deep: #3d1f5c;
  --cream: #f5f0e8;
  --muted: rgba(245,240,232,0.5);
  --border: rgba(201,168,76,0.15);
  --r: 16px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Jost', sans-serif;
  background: var(--ink);
  color: var(--cream);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(201,168,76,0.06) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(123,79,166,0.1) 0%, transparent 40%),
    radial-gradient(1px 1px at 15% 20%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 85% 15%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 50% 50%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 30% 70%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 70% 85%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1.5px 1.5px at 60% 10%, rgba(255,255,255,0.6), transparent);
  pointer-events: none;
  z-index: 0;
}

.wrap { position: relative; z-index: 1; }

/* NAV */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
}

.logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--gold);
  text-decoration: none;
}

.logo span { color: var(--cream); }

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a, .nav-links span {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--gold); }

.nav-plan {
  background: rgba(201,168,76,0.15);
  color: var(--gold) !important;
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  font-size: 0.75rem !important;
  border: 1px solid rgba(201,168,76,0.3);
}

.nav-user { color: var(--cream) !important; font-weight: 500 !important; }

.btn-nav {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--ink) !important;
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.82rem !important;
}

.btn-nav-outline {
  border: 1px solid rgba(201,168,76,0.3) !important;
  color: var(--gold) !important;
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  font-size: 0.82rem !important;
}

.nav-mobile-btn {
  display: none;
  background: none;
  border: none;
  color: var(--cream);
  font-size: 1.4rem;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
  background: rgba(26,18,36,0.95);
}

.mobile-menu.open { display: flex; }
.mobile-menu a { color: var(--cream); text-decoration: none; font-size: 1rem; }
.btn-gold-full {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--ink) !important;
  padding: 0.8rem;
  border-radius: 50px;
  text-align: center;
  font-weight: 500;
}

/* HERO */
.hero {
  text-align: center;
  padding: 5rem 2rem 4rem;
  max-width: 700px;
  margin: 0 auto;
}

.moon-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  display: block;
  filter: drop-shadow(0 0 12px rgba(201,168,76,0.4));
}

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
}

.eyebrow::before, .eyebrow::after {
  content: '';
  display: block;
  width: 30px;
  height: 1px;
  background: var(--gold);
  opacity: 0.5;
}

.hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 1.2rem;
}

.hero h1 em { font-style: italic; color: var(--gold); }

.hero p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 480px;
  margin: 0 auto 2.5rem;
  font-weight: 300;
}

.btn-hero {
  display: inline-block;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--ink);
  padding: 1rem 3rem;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  font-family: 'Jost', sans-serif;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s;
}

.btn-hero:hover { opacity: 0.85; transform: translateY(-1px); }

/* CARDS ROW */
.cards-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  padding: 0 1rem 4rem;
  flex-wrap: wrap;
}

.tarot-card {
  width: 90px;
  background: linear-gradient(180deg, var(--mystic-deep) 0%, #2a1540 100%);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 10px;
  padding: 1rem 0.5rem;
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.7rem;
  color: rgba(201,168,76,0.7);
  cursor: pointer;
  transition: transform 0.3s, border-color 0.3s;
  user-select: none;
}

.tarot-card:hover { transform: translateY(-8px); border-color: var(--gold); }
.tarot-card:nth-child(2) { transform: translateY(12px) rotate(-2deg); }
.tarot-card:nth-child(4) { transform: translateY(8px) rotate(1.5deg); }
.tarot-card .symbol { font-size: 2rem; margin-bottom: 0.5rem; display: block; }

/* SECTION */
.section {
  padding: 4rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.4rem;
  font-weight: 300;
  text-align: center;
  margin-bottom: 0.5rem;
}

.section-sub {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 3rem;
  font-weight: 300;
}

/* STEPS */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.step {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(201,168,76,0.12);
  border-radius: var(--r);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: border-color 0.2s;
}

.step:hover { border-color: rgba(201,168,76,0.3); }

.step-num {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  color: var(--gold);
  margin: 0 auto 1rem;
}

.step h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.step p { font-size: 0.85rem; color: var(--muted); line-height: 1.6; font-weight: 300; }

/* DIVIDER */
.divider {
  text-align: center;
  padding: 2rem 0;
  color: rgba(201,168,76,0.3);
  font-size: 1.2rem;
  letter-spacing: 0.5em;
}

/* PRICING */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.plan {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r);
  padding: 2rem 1.75rem;
  position: relative;
  transition: border-color 0.2s, transform 0.2s;
}

.plan:hover { transform: translateY(-4px); }
.plan.featured { border-color: var(--gold); background: rgba(201,168,76,0.06); }

.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.3rem 1rem;
  border-radius: 50px;
  white-space: nowrap;
}

.plan-name { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; font-weight: 300; margin-bottom: 0.3rem; }
.plan-desc { font-size: 0.8rem; color: var(--muted); margin-bottom: 1.5rem; font-weight: 300; }

.plan-price { margin-bottom: 1.5rem; }
.plan-price .amount { font-family: 'Cormorant Garamond', serif; font-size: 3rem; font-weight: 300; color: var(--gold); line-height: 1; }
.plan-price .currency { font-size: 1.2rem; color: rgba(201,168,76,0.6); vertical-align: super; }
.plan-price .period { font-size: 0.8rem; color: var(--muted); margin-left: 0.3rem; }

.plan-features { list-style: none; margin-bottom: 2rem; }
.plan-features li {
  font-size: 0.85rem;
  color: rgba(245,240,232,0.65);
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 300;
}
.plan-features li::before { content: '✦'; color: var(--gold); font-size: 0.6rem; flex-shrink: 0; }

/* BUTTONS */
.btn {
  display: block;
  width: 100%;
  padding: 0.85rem;
  border-radius: 50px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  font-family: 'Jost', sans-serif;
  transition: opacity 0.2s, transform 0.15s;
  text-decoration: none;
}

.btn:active { transform: scale(0.98); }
.btn:hover { opacity: 0.85; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold-light)); color: var(--ink); }
.btn-outline { background: transparent; color: var(--gold); border: 1px solid rgba(201,168,76,0.4); }
.btn-full { width: 100%; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.8rem; width: auto; display: inline-block; }
.btn-reading { width: 100%; padding: 1rem; font-size: 1rem; margin-top: 1rem; }

/* TESTIMONIALS */
.testimonials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.testimonial {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--r);
  padding: 1.75rem;
}

.stars { color: var(--gold); font-size: 0.75rem; margin-bottom: 0.8rem; }
.testimonial p { font-size: 0.9rem; color: rgba(245,240,232,0.65); line-height: 1.65; font-style: italic; margin-bottom: 1rem; font-family: 'Cormorant Garamond', serif; font-weight: 300; }
.author { font-size: 0.78rem; color: rgba(245,240,232,0.35); text-transform: uppercase; }

/* CTA */
.cta-section { text-align: center; padding: 5rem 2rem; border-top: 1px solid rgba(201,168,76,0.1); }
.cta-section h2 { font-family: 'Cormorant Garamond', serif; font-size: 2.8rem; font-weight: 300; margin-bottom: 1rem; }
.cta-section p { color: var(--muted); font-size: 0.95rem; margin-bottom: 2rem; }

/* FOOTER */
footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

footer p { font-size: 0.75rem; color: rgba(245,240,232,0.25); }
footer a { font-size: 0.75rem; color: rgba(245,240,232,0.3); text-decoration: none; margin-left: 1.5rem; }
footer a:hover { color: var(--gold); }

/* AUTH PAGES */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  padding: 2rem;
}

.auth-box {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  width: 100%;
  max-width: 420px;
}

.auth-icon { font-size: 2.5rem; text-align: center; margin-bottom: 1rem; display: block; }
.auth-title { font-family: 'Cormorant Garamond', serif; font-size: 2.2rem; font-weight: 300; text-align: center; margin-bottom: 0.5rem; }
.auth-sub { color: var(--muted); font-size: 0.9rem; text-align: center; margin-bottom: 2rem; font-weight: 300; }

.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 0.4rem; letter-spacing: 0.05em; text-transform: uppercase; }
.form-group input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  color: var(--cream);
  font-family: 'Jost', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus { border-color: rgba(201,168,76,0.5); }
.form-group input::placeholder { color: rgba(245,240,232,0.2); }

.auth-switch { text-align: center; margin-top: 1.5rem; font-size: 0.85rem; color: var(--muted); }
.auth-switch a, .auth-terms a { color: var(--gold); text-decoration: none; }
.auth-terms { text-align: center; margin-top: 1rem; font-size: 0.75rem; color: rgba(245,240,232,0.25); }

/* ALERT */
.alert {
  padding: 0.8rem 1rem;
  border-radius: 10px;
  margin-bottom: 1.2rem;
  font-size: 0.85rem;
}
.alert-error { background: rgba(220,50,50,0.15); border: 1px solid rgba(220,50,50,0.3); color: #ff9999; }
.alert-success { background: rgba(50,200,100,0.15); border: 1px solid rgba(50,200,100,0.3); color: #99ffcc; }

/* DASHBOARD */
.dashboard {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.stat-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(201,168,76,0.12);
  border-radius: var(--r);
  padding: 1.2rem 1.5rem;
}

.stat-label { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.4rem; }
.stat-value { font-family: 'Cormorant Garamond', serif; font-size: 1.8rem; font-weight: 300; color: var(--gold); }
.upgrade-item { display: flex; align-items: center; justify-content: center; }

.reading-section {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(201,168,76,0.15);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2.5rem;
}

.reading-header { margin-bottom: 1.5rem; }
.reading-header h2 { font-family: 'Cormorant Garamond', serif; font-size: 1.8rem; font-weight: 300; margin-bottom: 0.3rem; }
.reading-header p { font-size: 0.85rem; color: var(--muted); font-weight: 300; }

.spread-selector { display: flex; gap: 0.8rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.spread-btn {
  background: transparent;
  border: 1px solid rgba(201,168,76,0.2);
  color: var(--muted);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: 'Jost', sans-serif;
  transition: all 0.2s;
}
.spread-btn.active { border-color: var(--gold); color: var(--gold); background: rgba(201,168,76,0.1); }

.reading-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  font-size: 0.95rem;
  color: var(--cream);
  font-family: 'Jost', sans-serif;
  font-weight: 300;
  resize: vertical;
  min-height: 100px;
  outline: none;
  transition: border-color 0.2s;
}
.reading-input:focus { border-color: rgba(201,168,76,0.5); }
.reading-input::placeholder { color: rgba(245,240,232,0.2); }

.reading-result {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(201,168,76,0.1);
  animation: fadeIn 0.5s ease;
}

.cards-drawn { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.card-chip {
  background: rgba(123,79,166,0.2);
  border: 1px solid rgba(123,79,166,0.3);
  color: rgba(245,240,232,0.8);
  padding: 0.4rem 0.8rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-family: 'Cormorant Garamond', serif;
}
.card-chip.reversed { opacity: 0.7; }

.reading-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  line-height: 1.8;
  color: rgba(245,240,232,0.85);
  font-weight: 300;
  font-style: italic;
}

.reading-meta { margin-top: 1rem; font-size: 0.8rem; color: var(--muted); }

/* HISTORY */
.history-section h2 { font-family: 'Cormorant Garamond', serif; font-size: 1.8rem; font-weight: 300; margin-bottom: 1.5rem; }
.history-empty { color: var(--muted); font-size: 0.9rem; text-align: center; padding: 2rem; }

.history-item {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--r);
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s;
}
.history-item:hover { border-color: rgba(201,168,76,0.2); }

.history-question { font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; font-weight: 400; margin-bottom: 0.4rem; }
.history-cards { font-size: 0.75rem; color: var(--gold); margin-bottom: 0.4rem; letter-spacing: 0.03em; }
.history-date { font-size: 0.75rem; color: var(--muted); margin-bottom: 0.8rem; }
.history-preview { font-size: 0.85rem; color: rgba(245,240,232,0.5); font-style: italic; font-family: 'Cormorant Garamond', serif; line-height: 1.5; }

/* MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,5,20,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 2rem;
}

.modal {
  background: #1e1430;
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 24px;
  padding: 3rem 2rem;
  max-width: 560px;
  width: 100%;
  position: relative;
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.2rem;
  cursor: pointer;
}

.modal-icon { font-size: 2rem; color: var(--gold); margin-bottom: 1rem; }
.modal-title { font-family: 'Cormorant Garamond', serif; font-size: 2rem; font-weight: 300; margin-bottom: 0.5rem; }
.modal-sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 2rem; }

.modal-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.modal-plan {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 1.5rem 1rem;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.modal-plan:hover { border-color: var(--gold); transform: translateY(-2px); }
.modal-plan.featured { border-color: var(--gold); background: rgba(201,168,76,0.08); }

.modal-plan-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--ink);
  font-size: 0.65rem;
  font-weight: 500;
  padding: 0.2rem 0.8rem;
  border-radius: 50px;
  white-space: nowrap;
}

.modal-plan-name { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; margin-bottom: 0.5rem; }
.modal-plan-price { font-family: 'Cormorant Garamond', serif; font-size: 2.2rem; color: var(--gold); line-height: 1; margin-bottom: 0.5rem; }
.modal-period { font-size: 0.75rem; color: var(--muted); }
.modal-plan-features { font-size: 0.75rem; color: var(--muted); margin-bottom: 1rem; }
.modal-plan-btn {
  background: rgba(201,168,76,0.15);
  border: 1px solid rgba(201,168,76,0.3);
  color: var(--gold);
  padding: 0.5rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-family: 'Jost', sans-serif;
}
.modal-plan.featured .modal-plan-btn {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--ink);
  border: none;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* RESPONSIVE */
@media (max-width: 640px) {
  nav { padding: 1rem 1.5rem; }
  .nav-links { gap: 0.8rem; }
  .nav-links a:not(.btn-nav):not(.btn-nav-outline) { display: none; }
  .nav-mobile-btn { display: block; }
  .hero { padding: 3rem 1.5rem 2rem; }
  .section { padding: 3rem 1.5rem; }
  .dashboard { padding: 1.5rem; }
  .modal-plans { grid-template-columns: 1fr; }
  footer { flex-direction: column; text-align: center; }
  footer a { margin: 0 0.5rem; }
}
