:root {
  --rosa: #ff7aa2;
  --rosa-claro: #ffd0dd;
  --rosa-suave: #fff0f4;
  --vinho: #b23a5e;
  --dourado: #e7a13d;
  --texto: #5a3540;
  --branco: #fffafc;
  --sombra: 0 18px 45px rgba(178, 58, 94, 0.18);
  --raio: 26px;
}

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

html, body { height: 100%; }

body {
  min-height: 100dvh;
  font-family: "Poppins", system-ui, -apple-system, sans-serif;
  color: var(--texto);
  background:
    radial-gradient(circle at 20% 15%, #ffe3ec 0%, transparent 55%),
    radial-gradient(circle at 85% 80%, #ffd9e6 0%, transparent 55%),
    linear-gradient(160deg, #fff5f8 0%, #ffe9f1 45%, #ffdfeb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 18px;
  overflow-x: hidden;
  position: relative;
}

/* ---------- corações flutuando no fundo ---------- */
.hearts-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.hearts-bg span {
  position: absolute;
  bottom: -40px;
  font-size: var(--size, 22px);
  opacity: 0;
  animation: floatUp var(--dur, 14s) linear infinite;
  animation-delay: var(--delay, 0s);
  will-change: transform, opacity;
}
@keyframes floatUp {
  0%   { transform: translateY(0) rotate(0deg) scale(0.6); opacity: 0; }
  10%  { opacity: 0.55; }
  90%  { opacity: 0.5; }
  100% { transform: translateY(-110vh) rotate(360deg) scale(1); opacity: 0; }
}

/* ---------- card principal ---------- */
.stage {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 480px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--raio);
  box-shadow: var(--sombra);
  padding: 38px 28px 34px;
  text-align: center;
  animation: cardIn 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* troca de tela */
.fade-swap { animation: fadeSwap 0.45s ease both; }
@keyframes fadeSwap {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- tipografia ---------- */
.script {
  font-family: "Dancing Script", cursive;
  color: var(--vinho);
  line-height: 1.1;
}
h1.script { font-size: clamp(2rem, 8vw, 2.8rem); margin-bottom: 10px; }
h2.script { font-size: clamp(1.7rem, 7vw, 2.3rem); margin-bottom: 18px; }

.passo {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rosa);
  font-weight: 600;
  margin-bottom: 14px;
}

.pergunta {
  font-size: clamp(1.1rem, 4.6vw, 1.35rem);
  font-weight: 500;
  line-height: 1.45;
  margin-bottom: 26px;
  color: var(--texto);
}

.subtitulo { font-size: 1.02rem; font-weight: 300; margin-bottom: 28px; color: var(--vinho); }

/* ---------- progresso (pontinhos) ---------- */
.progress {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 22px;
}
.progress .dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--rosa-claro);
  transition: all 0.35s ease;
}
.progress .dot.done { background: var(--rosa); }
.progress .dot.now { background: var(--vinho); transform: scale(1.35); }

/* ---------- opções (botões de escolha) ---------- */
.opcoes { display: flex; flex-direction: column; gap: 12px; }
.opcao {
  font-family: inherit;
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--vinho);
  background: var(--branco);
  border: 2px solid var(--rosa-claro);
  border-radius: 16px;
  padding: 15px 18px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.opcao:hover { transform: translateY(-2px); border-color: var(--rosa); box-shadow: 0 8px 20px rgba(255, 122, 162, 0.25); }
.opcao:active { transform: scale(0.98); }
.opcao.errou { animation: shake 0.4s; border-color: #f3a; background: #fff0f4; }
.opcao.acertou { border-color: var(--rosa); background: #ffe6ee; }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%,60% { transform: translateX(-7px); }
  40%,80% { transform: translateX(7px); }
}

/* ---------- input de texto ---------- */
.campo {
  width: 100%;
  font-family: inherit;
  font-size: 1.05rem;
  text-align: center;
  color: var(--vinho);
  background: var(--branco);
  border: 2px solid var(--rosa-claro);
  border-radius: 16px;
  padding: 15px 16px;
  margin-bottom: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.campo:focus { border-color: var(--rosa); box-shadow: 0 0 0 4px rgba(255, 122, 162, 0.18); }
.dica { font-size: 0.9rem; color: var(--rosa); margin-bottom: 18px; font-weight: 300; }

/* ---------- botão principal ---------- */
.btn {
  font-family: inherit;
  font-size: 1.08rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--rosa) 0%, var(--vinho) 100%);
  border: none;
  border-radius: 50px;
  padding: 15px 34px;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(178, 58, 94, 0.32);
  transition: transform 0.18s ease, box-shadow 0.2s ease;
  margin-top: 6px;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(178, 58, 94, 0.4); }
.btn:active { transform: scale(0.97); }

.feedback {
  min-height: 1.4em;
  margin-top: 16px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--vinho);
}

/* ---------- corações pra escolher ---------- */
.coracoes { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }
.coracao {
  font-size: 2.6rem;
  background: none;
  border: none;
  cursor: pointer;
  filter: drop-shadow(0 6px 10px rgba(178, 58, 94, 0.25));
  transition: transform 0.2s ease;
  animation: beat 1.6s ease-in-out infinite;
}
.coracao:nth-child(2) { animation-delay: 0.2s; }
.coracao:nth-child(3) { animation-delay: 0.4s; }
.coracao:nth-child(4) { animation-delay: 0.6s; }
.coracao:hover { transform: scale(1.25); }
@keyframes beat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

/* ---------- tela final ---------- */
.final-msg p {
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.6;
  margin-bottom: 14px;
  color: var(--texto);
}
.frase-final {
  font-family: "Dancing Script", cursive;
  font-size: 1.6rem;
  color: var(--vinho);
  margin: 18px 0 6px;
}
.assinatura { font-size: 0.95rem; color: var(--rosa); font-weight: 500; }

.galeria { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 20px 0 6px; }
.galeria img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: var(--sombra);
}

/* ---------- botão de música ---------- */
.music-toggle {
  position: fixed;
  top: 16px; right: 16px;
  z-index: 5;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 6px 16px rgba(178, 58, 94, 0.2);
  font-size: 1.2rem;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

/* ---------- confete ---------- */
.confetti {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

@media (max-width: 380px) {
  .stage { padding: 30px 20px 28px; }
  .coracao { font-size: 2.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
