body {
  margin: 0;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #ffe6eb, #fff5e4);
  font-family: 'Segoe UI', sans-serif;
}

.container {
  perspective: 1000px;
}

.envelope {
  position: relative;
  width: 320px;
  height: 220px;
  background: #f8c8dc;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.6s;
  overflow: visible;
}

/* Tampa do envelope */
.flap {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  background: #f4a6c1;
  clip-path: polygon(0 0, 50% 50%, 100% 0);
  transition: transform 0.6s ease;
  transform-origin: top;
  z-index: 3;
}

/* Carta branca */
.letter {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: #fffafc;
  border-radius: 12px;
  padding: 20px;
  box-sizing: border-box;
  overflow: hidden;
  transition: height 0.6s ease;
  text-align: center;
  z-index: 2;
}

/* Conteúdo da mensagem */
.message {
  opacity: 0;
  transition: opacity 0.4s ease 0.3s;
}

/* Quando abrir */
.envelope.open .flap {
  transform: rotateX(180deg);
  z-index: 1;
}

.envelope.open .letter {
  height: 340px;
}

.envelope.open .message {
  opacity: 1;
}

h2 {
  color: #d46a92;
  margin-bottom: 10px;
}

p {
  font-size: 14px;
  color: #555;
  line-height: 1.5;
}

.assinatura {
  margin-top: 15px;
  font-weight: bold;
  color: #c94f7c;
}

/* ========================= */
/* 🎉 CONFETES FOFINHOS */
/* ========================= */

.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 999;
}

.confetti {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%; /* bolinhas */
  opacity: 0.9;
  animation: cair linear forwards;
}

@keyframes cair {
  0% {
    transform: translateY(-10px) scale(1);
  }
  100% {
    transform: translateY(100vh) scale(0.8);
  }
}
