/* ZERAR ESTILOS */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  height: 100vh;
  width: 100vw;
  background-color: #E6E5E3;
  font-family: Arial, sans-serif;
  overflow: hidden;
  position: relative;
}

/* ===== EFEITO DE PÉTALAS (CSS PURO) ===== */
#petalas-container {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  overflow: hidden; z-index: 0; pointer-events: none;
}
.petala {
  position: absolute; top: -10%; width: 15px; height: 15px;
  background-color: rgba(200, 162, 200, 0.35); /* Transparente */
  border-radius: 150% 0 150% 0;
  animation: cairPetala linear infinite;
}
@keyframes cairPetala {
  0% { opacity: 0; transform: translateY(0px) rotate(0deg); }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { opacity: 0; transform: translateY(110vh) rotate(360deg); }
}

/* ===== LOGO ===== */
.logo {
  position: absolute; top: 15px; left: 40px; width: 160px; z-index: 20;
}

/* ===== TÍTULO ===== */
.titulo {
  position: absolute; top: 30px; left: 50%; transform: translateX(-50%);
  width: 80%; z-index: 1; pointer-events: none;
  text-align: center; font-family: 'Playfair Display', serif;
  font-size: 1.9rem; font-weight: 500; font-style: normal; line-height: 1.3;
  color: #8E6FAF; text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
@media (max-width: 768px) {
  .titulo { top: 80px; font-size: 1.4rem; width: 90%; }
}

/* ===== CONTAINER CANTO DIREITO (Botões não encavalados) ===== */
.bottom-right-container {
  position: fixed; 
  bottom: 30px; 
  right: 30px;
  display: flex; 
  flex-direction: column; 
  align-items: flex-end;
  gap: 15px; 
  z-index: 9998;
  pointer-events: none; /* Caixa invisível */
}
.bottom-right-container > * { pointer-events: auto; } /* Botões clicáveis */

/* ===== BOTÃO FLUTUANTE PRINCIPAL ===== */
.cta-flutuante {
  /* Força a entrar na fila */
  position: relative !important; 
  bottom: auto !important; 
  right: auto !important;
  
  background-color: #8E6FAF; color: white; border: none;
  padding: 12px 24px; border-radius: 50px; font-size: 1rem;
  font-weight: bold; font-family: inherit;
  box-shadow: 0 4px 15px rgba(142, 111, 175, 0.4);
  cursor: pointer; z-index: 9999;
  display: flex; align-items: center; gap: 8px;
  transition: transform 0.2s, background-color 0.3s;
  animation: flutuarBtn 3s ease-in-out infinite;
}
.cta-flutuante:hover { background-color: #7A5F98; transform: scale(1.05); }
.cta-flutuante.enviado {
  background: linear-gradient(45deg, #DAA520, #FFD700);
  border: 2px solid #FFF; box-shadow: 0 4px 15px rgba(218, 165, 32, 0.5);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.cta-flutuante.enviado:hover { background: linear-gradient(45deg, #B8860B, #DAA520); }
@keyframes flutuarBtn {
  0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } 
}

/* LINK INSPIRE-SE */
.btn-inspire {
  background: rgba(255, 255, 255, 0.95); border: 2px solid #fff;
  color: #8E6FAF; padding: 10px 20px; border-radius: 20px;
  font-size: 0.9rem; font-weight: bold; cursor: pointer;
  text-decoration: none; box-shadow: 0 4px 10px rgba(142, 111, 175, 0.2);
  transition: all 0.2s; display: inline-block; white-space: nowrap;
}
.btn-inspire:hover { background: #fff; transform: scale(1.05); color: #DAA520; }

/* CONTADOR */
.contador {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, 0.95); border: 2px solid #fff;
  padding: 10px 18px; border-radius: 50px;
  box-shadow: 0 8px 25px rgba(142, 111, 175, 0.3);
  color: #8E6FAF; font-weight: bold; font-size: 1rem;
  cursor: default; transition: transform 0.2s;
}
.contador.pulsar {
  animation: puloContador 0.5s ease-in-out; color: #fff; background-color: #8E6FAF;
}
@keyframes puloContador {
  0% { transform: scale(1); } 50% { transform: scale(1.3); } 100% { transform: scale(1); }
}

/* ===== ÁRVORE E CARTINHAS ===== */
.container-arvore {
  position: absolute; bottom: 0; left: 50%; width: 100%; height: 100%;
  pointer-events: none; display: flex; align-items: flex-end; justify-content: center;
  transform-origin: bottom center;
  animation: ventoNaArvore 5s ease-in-out infinite alternate;
  z-index: 2; 
}
@keyframes ventoNaArvore {
  from { transform: translateX(-50%) rotate(0deg); }
  to { transform: translateX(-50%) rotate(1deg); } 
}
.arvore {
  height: 85vh; width: auto; max-width: 95vw; object-fit: contain; z-index: 1;
}

.cartinha-desejo {
  position: absolute; width: 45px; height: 35px;
  background-image: url("assets/cartinha.png"); background-size: contain;
  background-repeat: no-repeat; cursor: pointer; z-index: 12;
  pointer-events: auto;
  
  /* CORREÇÃO: "all" garante que o scale (tamanho) também seja animado suavemente */
  transition: all 2.5s ease-in-out;
  
  animation: balanco 4s ease-in-out infinite alternate;
}
.cartinha-desejo:hover { z-index: 10000 !important; }

/* ESTILO DA MINHA CARTINHA */
.cartinha-desejo.minha-cartinha {
  filter: drop-shadow(0 0 10px #FFD700) brightness(1.2); z-index: 100;
}

/* ESTILO QUANDO ESTÁ VOANDO */
.cartinha-desejo.viajando {
  z-index: 99999 !important; 
  filter: drop-shadow(0 0 20px #FFD700) brightness(1.5); 
}

@keyframes balanco { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }

.cartinha-desejo .tooltip {
  display: none; position: absolute; bottom: 45px; left: 50%;
  transform: translateX(-50%); background: #ffffff; color: #555;
  padding: 15px; border-radius: 15px; width: 220px; font-size: 0.9rem;
  line-height: 1.4; box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  z-index: 10001; text-align: center; pointer-events: none;
}
.cartinha-desejo .tooltip::after {
  content: ""; position: absolute; top: 100%; left: 50%; margin-left: -8px;
  border-width: 8px; border-style: solid;
  border-color: #ffffff transparent transparent transparent;
}
.cartinha-desejo:hover .tooltip { display: block; }

/* ===== MODAL ===== */
.overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(92, 75, 112, 0.6); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; z-index: 10000;
}
.modal {
  background: #F7F6F4; width: 90%; max-width: 400px; border-radius: 25px;
  padding: 30px 20px; position: relative; text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}
.modal h2 { color: #8E6FAF; font-size: 1.4rem; margin-bottom: 15px; }
.modal input, .modal textarea {
  width: 100%; border: 2px solid #E0D6EC; background: #fff;
  border-radius: 15px; padding: 10px; margin-bottom: 10px;
  font-family: inherit; outline: none; transition: all 0.3s ease;
}
.modal input:focus, .modal textarea:focus { 
  border-color: #FFC107; box-shadow: 0 0 12px rgba(255, 215, 0, 0.6); 
}
.modal textarea { height: 90px; resize: none; }
.contador-visual {
  text-align: right; font-size: 0.8rem; color: #999;
  margin-top: -5px; margin-bottom: 15px; margin-right: 5px;
}
.contador-visual.limite { color: #D32F2F; font-weight: bold; }
.btn-enviar {
  background: #8E6FAF; color: #fff; border: none; border-radius: 25px;
  padding: 12px; width: 100%; cursor: pointer; font-weight: bold;
}
.fechar {
  position: absolute; top: 15px; right: 20px; background: none;
  border: none; font-size: 2rem; color: #C0B3D1; cursor: pointer; line-height: 1;
}
.termos-privacidade {
  display: flex; align-items: flex-start; gap: 10px; margin-bottom: 15px;
  text-align: left; font-size: 0.85rem; color: #666;
}
.termos-privacidade input { width: auto !important; margin-top: 3px; cursor: pointer; box-shadow: none; }
.termos-privacidade label { cursor: pointer; line-height: 1.3; }

/* RESPONSIVO */
@media (max-width: 768px) {
  .logo { width: 110px; left: 20px; top: 15px; }
  .titulo { width: 90%; font-size: 1.1rem; top: 150px; }
  .arvore { height: 90vh; }
  .bottom-right-container { bottom: 20px; right: 20px; gap: 10px; }
  .cta-flutuante { padding: 10px 20px; font-size: 0.95rem; }
  .btn-inspire { font-size: 0.8rem; padding: 8px 15px; }
  .contador { padding: 8px 15px; font-size: 0.9rem; }
}

@media (max-width: 768px) {
  /* ... mantenha o que já existe aqui dentro ... */

  /* CORREÇÃO DO POSICIONAMENTO DA CARTINHA NO MOBILE */
  .cartinha-desejo {
    /* Como a árvore diminuiu, empurramos as cartas para baixo */
    margin-top: 15vh !important; 
    
    /* Opcional: Deixar a cartinha um pouquinho menor no celular para não cobrir tudo */
    transform: scale(0.8) !important; 
  }
}