body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background: rgb(252, 207, 225);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Dancing Script', cursive;
}

.container {
  height: 73vh;
  display: grid;
  place-items: center;
  color: white;
}

 .envelope-wrapper {
  background: #f5edd1;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.2);
  width: 300px;
  height: 230px;

}

 .envelope {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 1;
}

 .envelope::before {
  content: "";
  position: absolute;
  top: 0;
  z-index: 2;
  border-top: 130px solid #ecdeb8;
  border-right: 150px solid transparent;
  border-left: 150px solid transparent;
  transform-origin: top;
  transition: all 0.5s ease-in-out 0.7s;
}

.envelope::after {
  content: "";
  position: absolute;
  z-index: 2;
  width: 0px;
  height: 0px;
  border-top: 130px solid transparent;
  border-right: 150px solid #e6cfa7;
  border-bottom: 100px solid #e6cfa7;
  border-left: 150px solid #e6cfa7;
}

.envelope .letter {
  position: absolute;
  right: 20%;
  bottom: 0;
  width: 52%;
  height: 80%;
  background: #fff;
  text-align: center;
  transition: all 1s ease-in-out;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
  padding: 10px;
  z-index: 1;
  overflow: hidden;
}

.envelope .letter .content img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.heart {
  position: absolute;
  top: 51%;
  left: 50%;
  width: 15px;
  height: 15px;
  background: rgb(252, 8, 81);
  z-index: 4;
  transform: translate(-50%, -20%) rotate(45deg);
  transition: transform 0.5s ease-in-out 1s;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.heart:before,
.heart:after {
  content: "";
  position: absolute;
  width: 15px;
  height: 15px;
  background-color: rgb(252, 8, 81);
  border-radius: 50%;
}

.heart:before {
  top: -7.5px;
}

.heart:after {
  right: 7.5px;
}

.flap .envelope:before {
  transform: rotateX(180deg);
  z-index: 0;
}

.flap .envelope .letter {
  bottom: 100px;
  transform: scale(1.5);
  transition-delay: 1s;
}

.flap .heart {
  transform: rotate(90deg);
  transition-delay: 0.4s;
}

@media (max-width: 600px) {

 
  .header_text {
    font-size: 1.2rem;
    text-align: center;
    padding: 0 10px;
  }

  .letter {
    transform: scale(1.1);
  }

  .envelope .letter {
    right: 24%;
    bottom: 8%;
    width: 50%;
    height: 75%;
  }

  
}


