/* ============================================================
   Destino Revelado - A Inicial do Seu Amor
   Design System - Místico, Moderno, Mobile-First
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700&family=Inter:wght@300;400;500;600;700&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400;1,600&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --roxo-escuro: #2D1B4E;
  --roxo-medio: #4A2870;
  --roxo-claro: #7B4FA6;
  --rosa: #C84B8A;
  --rosa-claro: #E87AAB;
  --dourado: #D4AF37;
  --dourado-claro: #F0D060;
  --creme: #FFF5E6;
  --branco: #FFFFFF;
  --texto-claro: rgba(255,255,255,0.9);
  --texto-suave: rgba(255,255,255,0.6);

  --grad-mistico: linear-gradient(135deg, #1A0A2E 0%, #2D1B4E 40%, #4A1B6B 70%, #6B1B4A 100%);
  --grad-rosa-dourado: linear-gradient(135deg, #C84B8A 0%, #D4AF37 100%);
  --grad-cta: linear-gradient(135deg, #E84B9A 0%, #C84B8A 50%, #A83B7A 100%);
  --grad-dourado: linear-gradient(135deg, #B8952A 0%, #D4AF37 50%, #F0D060 100%);

  --sombra-roxo: 0 20px 60px rgba(45, 27, 78, 0.8);
  --sombra-rosa: 0 8px 30px rgba(200, 75, 138, 0.4);
  --sombra-dourado: 0 8px 30px rgba(212, 175, 55, 0.4);
  --sombra-card: 0 4px 20px rgba(0, 0, 0, 0.3);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--grad-mistico);
  min-height: 100vh;
  color: var(--texto-claro);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* ── Partículas de fundo ────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(212,175,55,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 80% 10%, rgba(200,75,138,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 50% 60%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 10% 80%, rgba(212,175,55,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 90% 70%, rgba(200,75,138,0.4) 0%, transparent 100%),
    radial-gradient(2px 2px at 35% 15%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(2px 2px at 70% 85%, rgba(212,175,55,0.3) 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
  animation: twinkle 4s ease-in-out infinite alternate;
}

@keyframes twinkle {
  0% { opacity: 0.6; }
  100% { opacity: 1; }
}

/* ── Layout principal ──────────────────────────────────────── */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Tipografia ────────────────────────────────────────────── */
h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  line-height: 1.2;
}

.text-display {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
}

.text-gradient {
  background: var(--grad-rosa-dourado);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-dourado {
  color: var(--dourado);
}

/* ── Botões ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 32px;
  border: none;
  border-radius: var(--radius-full);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  opacity: 0;
  transition: var(--transition);
}

.btn:hover::before { opacity: 1; }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--grad-cta);
  color: white;
  box-shadow: var(--sombra-rosa);
  width: 100%;
  font-size: 1.1rem;
  padding: 18px 32px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(200, 75, 138, 0.6);
}

.btn-gold {
  background: var(--grad-dourado);
  color: var(--roxo-escuro);
  box-shadow: var(--sombra-dourado);
  width: 100%;
  font-size: 1.1rem;
  padding: 18px 32px;
  font-weight: 700;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(212, 175, 55, 0.6);
}

.btn-ghost {
  background: rgba(255,255,255,0.08);
  color: var(--texto-claro);
  border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.3);
}

/* ── Cards & Containers ─────────────────────────────────────── */
.card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  padding: 24px;
}

.card-rosa {
  background: rgba(200, 75, 138, 0.1);
  border-color: rgba(200, 75, 138, 0.3);
}

.card-dourado {
  background: rgba(212, 175, 55, 0.08);
  border-color: rgba(212, 175, 55, 0.25);
}

/* ── Barra de Progresso ─────────────────────────────────────── */
.progress-bar-container {
  padding: 16px 20px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26, 10, 46, 0.8);
  backdrop-filter: blur(10px);
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.8rem;
  color: var(--texto-suave);
}

.progress-bar-track {
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--grad-rosa-dourado);
  border-radius: var(--radius-full);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
}

/* ── Inputs ─────────────────────────────────────────────────── */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--dourado);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.input-field {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  transition: var(--transition);
  outline: none;
  width: 100%;
}

.input-field:focus {
  border-color: var(--rosa);
  background: rgba(200, 75, 138, 0.1);
  box-shadow: 0 0 0 3px rgba(200, 75, 138, 0.2);
}

.input-field::placeholder {
  color: rgba(255,255,255,0.3);
}

.input-initial {
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 700;
  padding: 20px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--dourado);
}

/* ── Opções do Quiz ──────────────────────────────────────────── */
.option-grid {
  display: grid;
  gap: 12px;
}

.option-grid-2 {
  grid-template-columns: 1fr 1fr;
}

.option-btn {
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  padding: 16px;
  color: var(--texto-claro);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.4;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.option-btn .option-letter {
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(212,175,55,0.15);
  border: 1px solid rgba(212,175,55,0.3);
  color: var(--dourado);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
  margin-top: 1px;
}

.option-btn:hover {
  background: rgba(200, 75, 138, 0.15);
  border-color: rgba(200, 75, 138, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(200, 75, 138, 0.2);
}

.option-btn:hover .option-letter {
  background: var(--rosa);
  border-color: var(--rosa);
  color: white;
}

.option-btn.selected {
  background: rgba(200, 75, 138, 0.25);
  border-color: var(--rosa);
  box-shadow: 0 0 20px rgba(200, 75, 138, 0.3), inset 0 0 10px rgba(200,75,138,0.05);
}

.option-btn.selected .option-letter {
  background: var(--rosa);
  border-color: var(--rosa);
  color: white;
}

/* Opções de imagem */
.option-img-btn {
  flex-direction: column;
  align-items: center;
  padding: 20px 12px;
  text-align: center;
  gap: 12px;
}

.option-img-btn .option-emoji {
  font-size: 2.5rem;
  line-height: 1;
}

.option-img-btn .option-text {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--texto-suave);
}

.option-img-btn:hover .option-text,
.option-img-btn.selected .option-text {
  color: var(--texto-claro);
}

/* ── Animações de transição ──────────────────────────────────── */
.slide-enter {
  animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.slide-exit {
  animation: slideOutLeft 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideInRight {
  from {
    transform: translateX(40px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutLeft {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-40px);
    opacity: 0;
  }
}

.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

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

.pulse-glow {
  animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
  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), 0 0 60px rgba(200,75,138,0.3); }
}

/* Estrelas flutuantes */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(5deg); }
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ── Modal ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 5, 20, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: linear-gradient(180deg, #2D1B4E 0%, #1A0A2E 100%);
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 32px 24px;
  max-height: 92vh;
  overflow-y: auto;
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* ── Preview borrado ─────────────────────────────────────────── */
.result-preview-blurred {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 16px 0;
}

.result-preview-blurred .preview-content {
  filter: blur(6px);
  user-select: none;
  pointer-events: none;
  padding: 20px;
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-md);
}

.result-preview-blurred .preview-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(26, 10, 46, 0.6);
  gap: 8px;
}

.preview-lock {
  font-size: 2rem;
}

.preview-lock-text {
  font-size: 0.85rem;
  color: var(--dourado);
  font-weight: 600;
  text-align: center;
}

/* ── Depoimentos ─────────────────────────────────────────────── */
.testimonial-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(212,175,55,0.15);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
}

.testimonial-stars {
  color: var(--dourado);
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.testimonial-text {
  font-size: 0.9rem;
  color: var(--texto-claro);
  font-style: italic;
  line-height: 1.5;
  margin-bottom: 8px;
}

.testimonial-author {
  font-size: 0.8rem;
  color: var(--rosa-claro);
  font-weight: 600;
}

/* ── Rodapé ──────────────────────────────────────────────────── */
.footer-brand {
  text-align: center;
  padding: 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: auto;
}

.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 0.8rem;
  color: var(--texto-suave);
  letter-spacing: 0.1em;
}

/* ── QR Code container ───────────────────────────────────────── */
.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: white;
  border-radius: var(--radius-lg);
  margin: 16px 0;
}

.qr-image {
  width: 180px;
  height: 180px;
  object-fit: contain;
}

.pix-code-box {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.7rem;
  font-family: monospace;
  word-break: break-all;
  color: var(--dourado);
  margin: 8px 0;
  cursor: pointer;
  transition: var(--transition);
}

.pix-code-box:hover {
  background: rgba(212,175,55,0.1);
}

/* ── Status de pagamento ─────────────────────────────────────── */
.payment-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.9rem;
  padding: 12px;
  border-radius: var(--radius-md);
}

.payment-status.pending {
  background: rgba(212,175,55,0.1);
  color: var(--dourado);
  border: 1px solid rgba(212,175,55,0.2);
}

.payment-status.approved {
  background: rgba(100, 200, 100, 0.1);
  color: #7ddf7d;
  border: 1px solid rgba(100,200,100,0.2);
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(212,175,55,0.3);
  border-top-color: var(--dourado);
  border-radius: 50%;
  animation: spin-slow 0.8s linear infinite;
}

/* ── Resultado final ─────────────────────────────────────────── */
.result-archetype-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px 24px;
  border-radius: var(--radius-xl);
  margin: 24px 0;
  position: relative;
  overflow: hidden;
}

.result-archetype-badge::before {
  content: '';
  position: absolute;
  inset: 0;
  background: inherit;
  filter: blur(20px);
  opacity: 0.3;
  z-index: -1;
}

.result-emoji {
  font-size: 4rem;
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(255,255,255,0.5));
}

.result-element {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}

.result-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 900;
  text-align: center;
  line-height: 1.2;
  color: white;
}

.result-tagline {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-style: italic;
  color: rgba(255,255,255,0.8);
  text-align: center;
}

.result-description {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--texto-claro);
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid rgba(255,255,255,0.08);
  margin: 16px 0;
}

/* ── Utilities ───────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.mt-auto { margin-top: auto; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

.divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 16px 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-rosa {
  background: rgba(200,75,138,0.2);
  border: 1px solid rgba(200,75,138,0.4);
  color: var(--rosa-claro);
}

.badge-dourado {
  background: rgba(212,175,55,0.15);
  border: 1px solid rgba(212,175,55,0.3);
  color: var(--dourado);
}

/* Compartilhar */
.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-full);
  color: white;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  font-family: 'Inter', sans-serif;
}

.share-btn:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-1px);
}

/* ── Responsividade ──────────────────────────────────────────── */
@media (min-width: 481px) {
  .modal-overlay {
    align-items: center;
  }

  .modal-content {
    border-radius: var(--radius-xl);
    margin: 20px;
  }
}

@media (max-width: 360px) {
  .option-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ── Scrollbar personalizada ─────────────────────────────────── */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
}

::-webkit-scrollbar-thumb {
  background: rgba(200,75,138,0.5);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--rosa);
}

/* ── Toast notification ──────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(45,27,78,0.95);
  border: 1px solid rgba(212,175,55,0.4);
  border-radius: var(--radius-full);
  padding: 12px 24px;
  color: var(--dourado);
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 9999;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}
