body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg,#ffe6ec 0%, #ffd1e0 100%);
  font-family: "Helvetica Neue", Arial, sans-serif;
}

.card-custom {
  width: 100%;
  max-width: 520px;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  text-align: center;
  background: rgba(255,255,255,0.95);
  position: relative;
  overflow: hidden;
}

.envelope-wrap {
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 800px;
  margin-bottom: 10px;
}

.envelope {
  width: 150px;
  height: 150px;
  transition: transform 700ms cubic-bezier(.2,.8,.2,1), opacity 400ms ease;
  transform-origin: 50% 40%;
  will-change: transform, opacity;
}

.envelope.opening {
  transform: translateY(-40px) rotateX(-55deg) scale(.95);
  opacity: 0;
}

.letter-content {
  opacity: 0;
  transform: scale(.96) translateY(10px);
  transition: all 520ms cubic-bezier(.2,.9,.3,1);
  color: #6b0f35;
  line-height: 1.5;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  font-size: 16px;
}

.letter-content.show {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.envelope {
  width: 150px;
  height: 150px;
  transition: transform 700ms cubic-bezier(.2,.8,.2,1), opacity 400ms ease;
  transform-origin: 50% 40%;
  will-change: transform, opacity;
  object-fit: contain;
}

.envelope.opened {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 350px; /* biar nggak terlalu besar keluar card */
  opacity: 1;
  transform: scale(1);
}

.card-custom {
  position: relative;
  padding-bottom: 70px; /* kasih ruang buat tombol */
}

#btn {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
}

.letter-content {
  opacity: 0;
  transform: scale(.96) translateY(10px);
  transition: all 520ms cubic-bezier(.2,.9,.3,1);
  color: #6b0f35;
  line-height: 1.6;
  padding: 15px;
  font-size: 16px;
  margin-top: 20px;   /* jarak antara gambar dan teks */
  text-align: center;
}


h1 {
  font-size: 1.6rem;
  color: #c72b5c;
  margin-bottom: 8px;
}

.falling-flower {
  position: fixed;
  top: -50px;
  font-size: 28px;        /* kalau pakai emoji 🌹 */
  pointer-events: none;
  animation: fall linear forwards;
  z-index: 9999;
}

@keyframes fall {
  to {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}

