/* ============================================================
   Tarot Místico — Tema (idêntico ao React/Tailwind original)
   ============================================================ */
:root {
  --bg: #1a0a2e;
  --bg-deep: #0f0620;
  --card: #2a1547;
  --card-2: #20103a;
  --fg: #f4ecff;
  --muted: #b9a7d6;
  --primary: #d4af37;
  --primary-glow: #e8c45c;
  --primary-fg: #1a0a2e;
  --border: rgba(212, 175, 55, 0.3);
  --destructive: #e26464;
  --radius: 1rem;
  --radius-lg: 1.25rem;

  --gradient-mystic: linear-gradient(135deg, #1a0a2e, #0f0620);
  --gradient-gold: linear-gradient(135deg, var(--primary), var(--primary-glow));
  --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.5);
  --shadow-gold: 0 0 30px rgba(212, 175, 55, 0.4);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
*, *::before, *::after { border-color: var(--border); }

html { font-family: 'Lato', system-ui, sans-serif; -webkit-text-size-adjust: 100%; }
body {
  background: var(--gradient-mystic);
  color: var(--fg);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea {
  font: inherit; color: inherit; width: 100%;
  background: rgba(40, 16, 74, 0.5);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.875rem 1rem;
  outline: none;
  transition: border-color 0.2s;
}
input:focus, textarea:focus { border-color: var(--primary); }
textarea { resize: none; min-height: 120px; }

h1, h2, h3, h4 { font-family: 'Cinzel', serif; letter-spacing: 0.02em; line-height: 1.2; }

/* ===== Layout ===== */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1rem; }
.container-sm { max-width: 640px; margin: 0 auto; padding: 0 1rem; }
.container-md { max-width: 800px; margin: 0 auto; padding: 0 1rem; }
.section { padding: 3rem 0; }
.text-center { text-align: center; }
.relative { position: relative; }
.z10 { position: relative; z-index: 10; }

/* ===== Starfield ===== */
.starfield {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, white, transparent),
    radial-gradient(1px 1px at 60% 70%, white, transparent),
    radial-gradient(1.5px 1.5px at 50% 50%, white, transparent),
    radial-gradient(1px 1px at 80% 10%, white, transparent),
    radial-gradient(1px 1px at 10% 80%, white, transparent),
    radial-gradient(1.5px 1.5px at 90% 60%, white, transparent),
    radial-gradient(1px 1px at 30% 90%, white, transparent),
    radial-gradient(1px 1px at 70% 20%, white, transparent),
    radial-gradient(1.5px 1.5px at 40% 40%, #d4af37, transparent),
    radial-gradient(1px 1px at 15% 55%, #d4af37, transparent);
  animation: twinkle 4s ease-in-out infinite;
  opacity: 0.6;
}
@keyframes twinkle { 0%, 100% { opacity: 0.2; } 50% { opacity: 1; } }

/* ===== Tipografia helpers ===== */
.text-gradient-gold {
  background: var(--gradient-gold);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.font-display { font-family: 'Cinzel', serif; }
.uppercase { text-transform: uppercase; }
.tracking { letter-spacing: 0.2em; }
.tracking-wide { letter-spacing: 0.15em; }
.muted { color: var(--muted); }
.gold { color: var(--primary); }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }

/* ===== Botões ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem; padding: 0.875rem 1.5rem;
  border-radius: 999px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  font-size: 0.875rem; transition: all 0.2s;
  border: none; cursor: pointer;
}
.btn-primary {
  background: var(--gradient-gold);
  color: var(--primary-fg);
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
}
.btn-primary:hover { transform: scale(1.02); box-shadow: 0 0 50px rgba(212, 175, 55, 0.6); }
.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: var(--primary-fg); }
.btn-ghost {
  background: transparent; border: 1px solid var(--border); color: var(--primary);
}
.btn-ghost:hover { background: rgba(212, 175, 55, 0.1); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }
.btn-lg { padding: 1.125rem 2rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* ===== Cards ===== */
.card {
  background: rgba(40, 16, 74, 0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.card-strong { background: rgba(40, 16, 74, 0.6); box-shadow: var(--shadow-card); }
.card-feature {
  border-color: rgba(212, 175, 55, 0.7);
  box-shadow: 0 0 40px rgba(212, 175, 55, 0.25);
}

/* ===== Hero icon ===== */
.icon-circle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.4);
  background: rgba(40, 16, 74, 0.4);
  color: var(--primary);
  animation: glow-pulse 2.5s ease-in-out infinite;
}
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(212, 175, 55, 0.3); }
  50% { box-shadow: 0 0 40px rgba(212, 175, 55, 0.7); }
}
.glow-gold { animation: glow-pulse 2.5s ease-in-out infinite; }

/* ===== Plans grid ===== */
.plans { display: grid; gap: 1.5rem; max-width: 1000px; margin: 0 auto; }
@media (min-width: 768px) { .plans { grid-template-columns: repeat(3, 1fr); } }
.plan {
  display: flex; flex-direction: column; padding: 1.75rem;
  position: relative; transition: all 0.2s;
}
.plan:hover { background: rgba(40, 16, 74, 0.6); }
.plan-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--gradient-gold); color: var(--primary-fg);
  padding: 4px 14px; border-radius: 999px;
  font-size: 0.625rem; font-weight: 700; letter-spacing: 0.15em;
  text-transform: uppercase;
}
.plan-name { font-family: 'Cinzel', serif; font-size: 1.25rem; color: var(--primary); }
.plan-price {
  font-family: 'Cinzel', serif; font-size: 2.25rem;
  margin: 1rem 0; background: var(--gradient-gold);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.plan-list { list-style: none; margin-bottom: 1.5rem; }
.plan-list li {
  display: flex; gap: 0.5rem; align-items: flex-start;
  padding: 0.25rem 0; font-size: 0.875rem;
}
.plan-list li::before { content: "✓"; color: var(--primary); font-weight: bold; }

/* ===== Steps ===== */
.steps { display: grid; gap: 1.5rem; max-width: 900px; margin: 0 auto; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { text-align: center; padding: 2rem; transition: all 0.2s; }
.step:hover { background: rgba(40, 16, 74, 0.5); border-color: rgba(212, 175, 55, 0.6); }
.step-num {
  font-family: 'Cinzel', serif; font-size: 3rem;
  background: var(--gradient-gold);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 1rem;
}

/* ===== Testimonials ===== */
.testimonials { display: grid; gap: 1.5rem; max-width: 1000px; margin: 0 auto; }
@media (min-width: 768px) { .testimonials { grid-template-columns: repeat(3, 1fr); } }
.stars { color: var(--primary); margin-bottom: 0.75rem; letter-spacing: 0.1em; }

/* ===== Forms / Pagamento ===== */
.field { margin-bottom: 1rem; }
.field-label {
  display: block; margin-bottom: 0.375rem;
  font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--muted);
}
.alert-error {
  border: 1px solid rgba(226, 100, 100, 0.4);
  background: rgba(226, 100, 100, 0.1);
  color: var(--destructive);
  padding: 0.75rem 1rem; border-radius: 0.5rem;
  font-size: 0.875rem;
}

/* ===== PIX QR ===== */
.qr-box {
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: var(--radius);
  padding: 1.25rem; text-align: center;
  background: rgba(40, 16, 74, 0.2);
}
.qr-img {
  margin: 0.75rem auto;
  background: white; padding: 0.5rem; border-radius: 0.5rem;
  width: 224px; height: 224px;
}
.pix-code-box {
  background: rgba(40, 16, 74, 0.4);
  border: 1px solid var(--border);
  border-radius: 0.5rem; padding: 0.75rem;
  font-size: 0.75rem; word-break: break-all;
  color: rgba(244, 236, 255, 0.8);
}

/* ===== Card flip (resultado) ===== */
.cards-grid { display: grid; gap: 0.5rem; margin-top: 2rem; }
.cards-grid.three { grid-template-columns: repeat(3, 1fr); }
.cards-grid.one { grid-template-columns: 1fr; max-width: 220px; margin-left: auto; margin-right: auto; }
@media (min-width: 640px) { .cards-grid { gap: 1rem; } }

.tarot-card {
  perspective: 1000px;
  aspect-ratio: 2 / 3;
  width: 100%;
  max-width: 180px;
  margin: 0 auto;
}
.tarot-card-inner {
  position: relative; width: 100%; height: 100%;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}
.tarot-card.flipped .tarot-card-inner { transform: rotateY(180deg); }
.tarot-face {
  position: absolute; inset: 0;
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column;
  align-items: center; justify-content: space-between;
  padding: 0.75rem;
  background: linear-gradient(135deg, var(--card), var(--card-2));
}
.tarot-face.front { justify-content: center; font-size: 3rem; color: var(--primary); }
.tarot-face.back { transform: rotateY(180deg); }
.tarot-card.flipped .tarot-face.back { box-shadow: var(--shadow-gold); }
.tarot-pos {
  font-family: 'Cinzel', serif; font-size: 0.6rem;
  text-transform: uppercase; letter-spacing: 0.15em; color: var(--primary);
}
.tarot-emoji { font-size: 2.5rem; }
.tarot-name {
  font-family: 'Cinzel', serif; font-size: 0.7rem;
  text-align: center; line-height: 1.1;
}
@media (min-width: 640px) {
  .tarot-emoji { font-size: 3.5rem; }
  .tarot-name { font-size: 0.85rem; }
  .tarot-pos { font-size: 0.7rem; }
}

/* ===== Shuffle animation ===== */
.shuffle-deck { position: relative; height: 220px; width: 160px; margin: 0 auto; }
.shuffle-card {
  position: absolute; inset: 0;
  border: 2px solid var(--primary); border-radius: var(--radius);
  background: linear-gradient(135deg, var(--card), var(--card-2));
  box-shadow: var(--shadow-gold);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cinzel', serif; font-size: 2.5rem; color: var(--primary);
  animation: shuffle 0.8s ease-in-out infinite;
}
.shuffle-card:nth-child(2) { animation-delay: 0.15s; }
.shuffle-card:nth-child(3) { animation-delay: 0.3s; }
@keyframes shuffle {
  0% { transform: translateX(0) rotate(0); }
  25% { transform: translateX(-15px) rotate(-8deg); }
  50% { transform: translateX(0) rotate(0); }
  75% { transform: translateX(15px) rotate(8deg); }
  100% { transform: translateX(0) rotate(0); }
}

/* ===== Reading box ===== */
.reading-box {
  margin-top: 2rem;
  border: 1px solid var(--border);
  background: rgba(40, 16, 74, 0.6);
  padding: 1.5rem; border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  animation: fade-in-up 0.6s ease-out both;
}
.reading-text {
  white-space: pre-line;
  font-size: 1rem; line-height: 1.7;
  color: rgba(244, 236, 255, 0.95);
}
@media (min-width: 768px) {
  .reading-box { padding: 2.5rem; }
  .reading-text { font-size: 1.125rem; }
}
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Pill/badge ===== */
.pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 1rem; border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  background: rgba(40, 16, 74, 0.4);
  font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.15em; color: var(--primary);
  backdrop-filter: blur(6px);
}

/* ===== Modal ===== */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.modal {
  background: var(--card); border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: var(--radius-lg);
  padding: 1.5rem; max-width: 440px; width: 100%;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  position: relative; max-height: 90vh; overflow-y: auto;
}
.modal-close {
  position: absolute; top: 0.75rem; right: 0.75rem;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 1.25rem;
}
.modal-close:hover { background: rgba(255,255,255,0.1); color: var(--fg); }

/* ===== Upsells ===== */
.upsell-grid { display: grid; gap: 1rem; max-width: 800px; margin: 0 auto; }
@media (min-width: 768px) { .upsell-grid.two { grid-template-columns: repeat(2, 1fr); } }
.upsell-recommended {
  border: 2px solid var(--primary);
  background: linear-gradient(135deg, rgba(40, 16, 74, 0.7), rgba(20, 8, 50, 0.7));
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.25);
}

/* ===== Utilities ===== */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.hidden { display: none !important; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Responsivo */
@media (max-width: 640px) {
  .text-5xl { font-size: 2.25rem; }
  .text-4xl { font-size: 1.875rem; }
  .text-3xl { font-size: 1.5rem; }
  .section { padding: 2rem 0; }
  .card { padding: 1.25rem; }
}
