body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.envelope {
  width: 220px;
  height: 160px;
  position: relative;
  background: #fef2f2;
  cursor: pointer;
  border: 3px solid #fca5a5;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  border-radius: 10px;
}

.envelope:hover {
  transform: scale(1.05);
}

.flap {
  position: absolute;
  width: 100%;
  height: 50%;
  background: #fca5a5;
  top: 0;
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
  transition: transform 0.6s ease;
  transform-origin: top;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.envelope.open .flap {
  transform: rotateX(180deg);
}

.invitation-img {
  display: none;
  margin-top: 20px;
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  max-width: 90%;
}

.envelope.open + .invitation-img {
  display: block;
  animation: fadeIn 1s ease-in-out forwards;
}

@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}
