* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Lato', sans-serif;
  background: linear-gradient(135deg, #FFF0F5 0%, #FFE4EC 50%, #FFF0F5 100%);
  color: #2D2D2D;
  min-height: 100vh;
  overflow-x: hidden;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px 20px;
}

.hero { text-align: center; margin-bottom: 12px; }
.subtitle { font-family: 'Lato', sans-serif; font-size: 0.85rem; color: #D81B60; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 4px; }

.title { font-family: 'Great Vibes', cursive; font-size: 3rem; color: #E91E7B; line-height: 1; }
.name { font-family: 'Playfair Display', serif; font-size: 1.8rem; color: #C2185B; margin-top: 2px; }
.countdown-section { margin-bottom: 20px; }
.countdown-label { font-family: 'Playfair Display', serif; text-align: center; color: #C2185B; font-size: 1.3rem; margin-bottom: 10px; }

.info-text { display: flex; flex-direction: column; gap: 2px; }
.info-text span { color: #888; font-size: 0.9rem; }

.photo-section { text-align: center; margin-bottom: 10px; }
.carousel { overflow: hidden; margin: 0 auto; max-width: 520px; border-radius: 16px; }
.carousel-track { display: flex; gap: 10px; animation: marquee 20s linear infinite; width: max-content; }
.photo { width: 160px; height: 210px; object-fit: cover; border-radius: 14px; border: 3px solid #F8BBD0; box-shadow: 0 4px 16px rgba(233, 30, 123, 0.15); flex-shrink: 0; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.info-section { display: flex; flex-direction: column; gap: 12px; margin-bottom: 30px; }

.info-card { background: #FFFAFA; border: 1px solid #F8BBD0; border-radius: 20px; padding: 16px 20px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; box-shadow: 0 2px 12px rgba(233, 30, 123, 0.08); }
.info-icon { font-size: 1.5rem; }
.info-card strong { color: #C2185B; }
.section-title { font-family: 'Playfair Display', serif; text-align: center; color: #D81B60; font-size: 1.4rem; margin-bottom: 16px; }

.countdown { display: flex; justify-content: center; gap: 10px; margin-bottom: 0; }
.time-box { background: linear-gradient(135deg, #E91E7B, #D81B60); border: none; border-radius: 16px; padding: 12px 10px; min-width: 68px; text-align: center; box-shadow: 0 4px 20px rgba(233, 30, 123, 0.25); }
.time-box span { display: block; font-size: 1.8rem; font-weight: 700; color: #fff; }
.time-box small { color: rgba(255,255,255,0.85); font-size: 0.75rem; text-transform: uppercase; }
.form-section { margin-bottom: 30px; }

.form-section input,
.form-section textarea,
.form-section select {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #F8BBD0;
  border-radius: 12px;
  font-family: 'Lato', sans-serif;
  font-size: 1rem;
  margin-bottom: 12px;
  background: #FFFAFA;
  transition: border-color 0.3s ease;
  outline: none;
  appearance: none;
}

.form-section input:focus,
.form-section textarea:focus,
.form-section select:focus { border-color: #E91E7B; }

.form-desc { text-align: center; color: #888; font-size: 0.95rem; margin-bottom: 18px; }
.field-label { display: block; font-weight: 600; color: #C2185B; margin-bottom: 6px; font-size: 0.95rem; }
.acomp-input { margin-top: 4px; }

.btn {
  width: 100%;
  padding: 16px;
  background: #E91E7B;
  color: #fff;
  border: none;
  border-radius: 30px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.3s ease, background 0.3s ease;
}

.btn:hover { background: #C2185B; transform: scale(1.03); }

.feedback {
  text-align: center; margin-top: 16px;
  padding: 14px; border-radius: 12px;
  font-weight: 600;
}
.feedback.success { background: #f0fff0; color: #2e7d32; border: 1px solid #a5d6a7; }
.feedback.error { background: #fff0f0; color: #c62828; border: 1px solid #ef9a9a; }
.hidden { display: none; }

/* === Modal de Confirmação === */
.modal-overlay {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.4s ease;
  backdrop-filter: blur(4px);
}
.modal-overlay.show {
  opacity: 1;
}
.modal-overlay.hidden {
  display: none;
}

.modal-card {
  background: linear-gradient(145deg, #FFF0F5, #FFFFFF);
  border-radius: 24px;
  padding: 40px 32px;
  text-align: center;
  max-width: 380px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(233, 30, 123, 0.3);
  transform: scale(0.7) translateY(30px);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-overlay.show .modal-card {
  transform: scale(1) translateY(0);
}

.modal-check-circle {
  margin: 0 auto 20px;
  width: 72px; height: 72px;
}

.modal-checkmark {
  width: 72px; height: 72px;
}
.modal-checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 2;
  stroke-miterlimit: 10;
  stroke: #4CAF50;
  animation: modalCircle 0.6s ease-in-out 0.3s forwards;
}
.modal-checkmark-check {
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  stroke: #4CAF50;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: modalCheck 0.4s ease-in-out 0.7s forwards;
}

@keyframes modalCircle {
  to { stroke-dashoffset: 0; }
}
@keyframes modalCheck {
  to { stroke-dashoffset: 0; }
}

.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: #C2185B;
  margin-bottom: 8px;
}
.modal-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #E91E7B;
  margin-bottom: 6px;
}
.modal-msg {
  color: #888;
  font-size: 0.95rem;
  margin-bottom: 16px;
}
.modal-hearts {
  font-size: 1.8rem;
  margin-bottom: 20px;
  animation: pulse 1.5s ease-in-out infinite;
}
.modal-btn {
  padding: 12px 40px;
  background: #E91E7B;
  color: #fff;
  border: none;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.3s ease, background 0.3s ease;
}
.modal-btn:hover {
  background: #C2185B;
  transform: scale(1.05);
}

/* Animação do botão ao enviar */
.btn.sending {
  background: #F8BBD0;
  pointer-events: none;
  position: relative;
  overflow: hidden;
}
.btn.sending::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: shimmer 1.2s infinite;
}

/* === Mapa === */
.mapa-section {
  margin-top: 12px;
}
.mapa-container {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(233, 30, 123, 0.12);
  border: 2px solid #F8BBD0;
}
.mapa-container iframe {
  display: block;
}
.btn-mapa {
  display: block;
  text-align: center;
  margin-top: 12px;
  padding: 14px 24px;
  background: linear-gradient(135deg, #E91E7B, #D81B60);
  color: #fff;
  text-decoration: none;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(233, 30, 123, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.btn-mapa:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 24px rgba(233, 30, 123, 0.35);
}

/* === Envelope de Abertura === */
.envelope-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #FFF0F5 0%, #FFE4EC 50%, #FFF0F5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.envelope-overlay.aberto {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.envelope-wrapper {
  text-align: center;
  animation: float 3s ease-in-out infinite;
}

.envelope-titulo {
  font-family: 'Great Vibes', cursive;
  font-size: 2rem;
  color: #C2185B;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeIn 1s ease-out 0.3s forwards;
}

.envelope {
  position: relative;
  width: 320px;
  height: 220px;
  margin: 0 auto;
  perspective: 800px;
}

/* Corpo do envelope */
.envelope-body {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 180px;
  background: linear-gradient(145deg, #f5e6ea, #eedce2);
  border-radius: 4px 4px 12px 12px;
  box-shadow:
    0 8px 32px rgba(194, 24, 91, 0.15),
    inset 0 -2px 6px rgba(194, 24, 91, 0.06);
  overflow: hidden;
  z-index: 1;
}

/* Decoração interna do envelope - triângulos laterais */
.envelope-body::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 0;
  border-top: 90px solid rgba(194, 24, 91, 0.08);
  border-right: 160px solid transparent;
  border-left: 0 solid transparent;
}
.envelope-body::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 0; height: 0;
  border-top: 90px solid rgba(194, 24, 91, 0.08);
  border-left: 160px solid transparent;
  border-right: 0 solid transparent;
}

/* Borda decorativa inferior */
.envelope-borda {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, #E91E7B, #F8BBD0, #E91E7B, #F8BBD0, #E91E7B);
  border-radius: 0 0 12px 12px;
  z-index: 3;
}

/* Selo / lacre decorativo */
.envelope-selo {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #E91E7B, #C2185B);
  border-radius: 50%;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 3px 12px rgba(233, 30, 123, 0.4);
  transition: transform 0.4s ease;
}

.envelope.animando .envelope-selo {
  transform: translateX(-50%) scale(0);
}

/* Aba superior do envelope */
.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-left: 160px solid transparent;
  border-right: 160px solid transparent;
  border-top: 110px solid #e8cdd4;
  z-index: 4;
  transform-origin: top center;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 2px 4px rgba(194, 24, 91, 0.1));
}

.envelope-flap::after {
  content: '';
  position: absolute;
  top: -110px;
  left: -160px;
  width: 0;
  height: 0;
  border-left: 160px solid transparent;
  border-right: 160px solid transparent;
  border-top: 110px solid transparent;
  border-bottom: 0;
  filter: brightness(0.96);
}

.envelope.animando .envelope-flap {
  transform: rotateX(180deg);
}

/* Carta dentro do envelope */
.envelope-carta {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  bottom: 30px;
  background: #fff;
  border-radius: 8px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  z-index: 2;
  transform: translateY(0);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}

.envelope.animando .envelope-carta {
  transform: translateY(-80px);
}

.envelope-icone {
  font-size: 1.6rem;
  margin-bottom: 6px;
}

.envelope-texto {
  font-family: 'Lato', sans-serif;
  color: #999;
  font-size: 0.85rem;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.envelope-nome {
  font-family: 'Playfair Display', serif;
  color: #C2185B;
  font-size: 1.3rem;
  font-weight: 600;
}

.envelope-btn {
  margin-top: 28px;
  padding: 16px 44px;
  background: linear-gradient(135deg, #E91E7B, #C2185B);
  color: #fff;
  border: none;
  border-radius: 30px;
  font-family: 'Lato', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(233, 30, 123, 0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  letter-spacing: 0.5px;
  opacity: 0;
  animation: fadeIn 0.8s ease-out 0.8s forwards, pulse 2.5s ease-in-out 1.6s infinite;
}

.envelope-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 32px rgba(233, 30, 123, 0.45);
}

footer {
  text-align: center; color: #D81B60;
  font-family: 'Playfair Display', serif; font-size: 1.1rem;
}

#confetti-canvas {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 9999;
}
