#envelope {
  position: relative;
  width: 50vw;
  height: 40vh;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  margin-left: auto;
  margin-right: auto;
  top: 30vh;
  background-color: #BBD1E6;
}

.front {
  position: absolute;
  width: -webkit-fill-available;
  height: -webkit-fill-available;
  z-index: 3;
}

.flap {
  border-left: 25vw solid transparent;
  border-right: 25vw solid transparent;
  border-bottom: 30vh solid transparent;
  /* a little smaller */
  border-top: 30vh solid #BBD1E6;
  
  /* a little larger */
  transform-origin: top;
  pointer-events: none;
  
}

.pocket {
  border-left: 25vw solid #E6EDF7;
  border-right: 25vw solid #E6EDF7;
  border-bottom: 30vh solid #D4E4F3;
  border-top: 20vh solid transparent;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  /* box-shadow: 0px 15px 6px 0px #FFFFFF0D inset; */
  box-shadow: 0px 4px 4px 0px #00000040;
  
}

.letter {
  position: relative;
  background: url('./images/thumb-letter.png');
  background-repeat: no-repeat;
  background-size: cover;
  width: 90%;
  margin-left: auto;
  margin-right: auto;
  height: 100%;
  top: 5%;
  border-radius: 20px;
  box-shadow: 0 2px 26px rgba(0, 0, 0, 0.12);
}
.letter.bg-de{
  background: url('./images/bg-lette-de.jpg');
}
.letter.bg-vi{
  background: url('./images/thiệp\ năm.\ mới\ \ VN-0.jpg');
}
.letter.bg-en{
  background: url('./images/Greeting\ card\ 2024-EN-0.jpg');
}
/* .letter:after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0) 25%, rgba(215, 227, 239, 0.7) 55%, #d7e3ef 100%);
} */

.words {
  position: absolute;
  left: 10%;
  width: 80%;
  height: 14%;
  background-color: #eeeff0;
}

.words.line1 {
  top: 15%;
  width: 20%;
  height: 7%;
}

.words.line2 {
  top: 30%;
}

.words.line3 {
  top: 50%;
}

.words.line4 {
  top: 70%;
}

.open .flap {
  transform: rotateX(180deg);
  transition: transform 0.4s ease, z-index 0.6s;
  z-index: 1;
}

.close .flap {
  transform: rotateX(0deg);
  transition: transform 0.4s 0.6s ease, z-index 1s;
  z-index: 5;
}

.close .letter {
  transform: translateY(0px);
  transition: transform 0.4s ease, z-index 1s;
  z-index: 1;
}

.open .letter {
  transform: translateY(-150px);
  transition: transform 2s 0.6s ease, z-index 0.6s;
  z-index: 2;
}
#open .fa-hand-pointer,#open .icon-cursor{
  font-size: 60px;
  margin-left: 0;
  margin-left: 70px;
  width: 45px;
  margin-top: 0px;
  color: rgb(39, 241, 231);
  -webkit-animation: slideUpIcon 1s linear both, heartbeat 2s ease-in-out infinite both;
  animation: slideUpIcon 1s linear both, heartbeat 2s ease-in-out infinite both;
  animation-delay: 2s;

}
#open .click-me{
  font-weight: 500;
  text-transform: none;
  margin-left: 60px;
  margin-top: 40px;
  padding-top: 20px;
  -webkit-animation: slideUpIcon 1s linear both;
  animation: slideUpIcon 1s linear both;
  animation-delay: 3s;
  font-size: 18px;
  color: rgb(57, 80, 212);
  text-shadow: 0 1px 2px rgb(22, 165, 141);
  width: 200px;
}
.heartbeat {
	-webkit-animation: heartbeat 1.5s ease-in-out infinite both;
	        animation: heartbeat 1.5s ease-in-out infinite both;
          animation-delay: 3s;
}
.hearts {
  position: absolute;
  top: 90px;
  left: 0;
  right: 0;
  z-index: 2;
}

.heart {
  position: absolute;
  bottom: 0;
  right: 10%;
  pointer-events: none;
}

.heart:before,
.heart:after {
  position: absolute;
  content: "";
  left: 50px;
  top: 0;
  width: 50px;
  height: 80px;
  background: #d00000;
  border-radius: 50px 50px 0 0;
  transform: rotate(-45deg);
  transform-origin: 0 100%;
  pointer-events: none;
}

.heart:after {
  left: 0;
  transform: rotate(45deg);
  transform-origin: 100% 100%;
}

.close .heart {
  opacity: 0;
  -webkit-animation: none;
  animation: none;
}

.a1 {
  left: 20%;
  transform: scale(0.6);
  opacity: 1;
  -webkit-animation: slideUp 4s linear 1, sideSway 2s linear 4 alternate;
  -moz-animation: slideUp 4s linear 1, sideSway 2s linear 4 alternate;
  -webkit-animation-fill-mode: forwards;
  animation-fill-mode: forwards;
  -webkit-animation-delay: 0.7s;
  animation-delay: 0.7s;
}

.a2 {
  left: 55%;
  transform: scale(1);
  opacity: 1;
  -webkit-animation: slideUp 5s linear 1, sideSway 4s ease-in-out 2 alternate;
  -moz-animation: slideUp 5s linear 1, sideSway 4s ease-in-out 2 alternate;
  -webkit-animation-fill-mode: forwards;
  animation-fill-mode: forwards;
  -webkit-animation-delay: 0.7s;
  animation-delay: 0.7s;
}

.a3 {
  left: 10%;
  transform: scale(0.8);
  opacity: 1;
  -webkit-animation: slideUp 7s linear 1, sideSway 2s ease-in-out 6 alternate;
  -moz-animation: slideUp 7s linear 1, sideSway 2s ease-in-out 6 alternate;
  -webkit-animation-fill-mode: forwards;
  animation-fill-mode: forwards;
  -webkit-animation-delay: 0.7s;
  animation-delay: 0.7s;
}
@-webkit-keyframes slideUpIcon {
  0% {
    transform: scale(1);
  }

  100% {
    transform: scale(1.2);
  }
}
@keyframes slideUpIcon {
  0% {
    opacity: 0;
    margin-top: 0;
  }

  100% {
    opacity: 1;
    margin-top: -20px;
  }
}
@-webkit-keyframes heartbeat {
  from {
    -webkit-transform: scale(1);
            transform: scale(1);
    -webkit-transform-origin: center center;
            transform-origin: center center;
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  10% {
    -webkit-transform: scale(0.91);
            transform: scale(0.91);
    -webkit-animation-timing-function: ease-in;
            animation-timing-function: ease-in;
  }
  17% {
    -webkit-transform: scale(0.98);
            transform: scale(0.98);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  33% {
    -webkit-transform: scale(0.87);
            transform: scale(0.87);
    -webkit-animation-timing-function: ease-in;
            animation-timing-function: ease-in;
  }
  100% {
    -webkit-transform: scale(1);
            transform: scale(1);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
}
@keyframes heartbeat {
  from {
    -webkit-transform: scale(1);
            transform: scale(1);
    -webkit-transform-origin: center center;
            transform-origin: center center;
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  10% {
    -webkit-transform: scale(0.91);
            transform: scale(0.91);
    -webkit-animation-timing-function: ease-in;
            animation-timing-function: ease-in;
  }
  17% {
    -webkit-transform: scale(0.98);
            transform: scale(0.98);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  33% {
    -webkit-transform: scale(0.87);
            transform: scale(0.87);
    -webkit-animation-timing-function: ease-in;
            animation-timing-function: ease-in;
  }
 100% {
    -webkit-transform: scale(1);
            transform: scale(1);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
}
@-webkit-keyframes slideUp {
  0% {
    top: 0;
  }

  100% {
    top: -600px;
  }
}

@keyframes slideUp {
  0% {
    top: 0;
  }

  100% {
    top: -600px;
  }
}

@-webkit-keyframes sideSway {
  0% {
    margin-left: 0px;
  }

  100% {
    margin-left: 50px;
  }
}

@keyframes sideSway {
  0% {
    margin-left: 0px;
  }

  100% {
    margin-left: 50px;
  }
}

body {
  background: url('./images/bg-hpny-2025.png');
  background-repeat: no-repeat;
  background-size: cover;
  padding: 0;
  margin: 0;
  font-family: 'Roboto',sans-serif;
  overflow: hidden;
}

.envlope-wrapper {
  height: 100vh;
}

.reset {
  text-align: center;
}

.reset button {
  font-weight: 800;
  font-style: normal;
  transition: all 0.1s linear;
  -webkit-appearance: none;
  background-color: transparent;
  border: 0;
  /* color: #0077b2; */
  display: inline-block;
  font-size: 14px;
  text-transform: uppercase;
  margin: auto;
  padding: 0;
  line-height: 1em;
  text-decoration: none;
  /* min-width: 120px; */
  cursor: pointer;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  width: 5vw;
  height: 100px;
  z-index: 99;
}

/*   
  .reset button:hover {
    background-color: #0077b2;
    color: #fff;
  } */
.img-open {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: .5s;
  margin-top: 10vh;
}

.img-open:hover {
  transform: scale(1.2);

}

.isOpen {
  display: none !important;
}

.modal-video {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 99999999;
}
.modal-video .modal-content{
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.801);
}
.modal-video.show {
  display: block;
  width: 100vw;
  height: 100vh;
  overflow: auto;
}
.video-popup{
  width: 100vw;
  max-height: calc(100vh);
  height: 100%;
}
.slide-top {
  -webkit-animation: slide-top 1.5s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
  animation: slide-top 1.5s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
}

.vibrate-1 {
  -webkit-animation: vibrate-1 1s linear infinite both;
  animation: vibrate-1 1s linear infinite both;
  animation-delay: 2s;
}
.text-conguration{
  color: white;
  position: absolute;
  left: 0;
  right: 0;
  top: 20vh;
  width: 100%;
  text-align: center;
  font-weight: bold;
  font-size: 30px;
}
@-webkit-keyframes slide-top {
  0% {
    -webkit-transform: translateY(-50px);
    transform: translateY(-50px);
    opacity: .5;
  }

  100% {
    -webkit-transform: translateY(0);
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slide-top {
  0% {
    -webkit-transform: translateY(-50px);
    transform: translateY(-50px);
    opacity: .5;
  }

  100% {
    -webkit-transform: translateY(0);
    transform: translateY(0);
    opacity: 1;
  }
}

@-webkit-keyframes vibrate-1 {
  0% {
    -webkit-transform: translate(0);
    transform: translate(0);
  }

  20% {
    -webkit-transform: translate(-2px, 2px);
    transform: translate(-2px, 2px);
  }

  40% {
    -webkit-transform: translate(-2px, -2px);
    transform: translate(-2px, -2px);
  }

  60% {
    -webkit-transform: translate(2px, 2px);
    transform: translate(2px, 2px);
  }

  80% {
    -webkit-transform: translate(2px, -2px);
    transform: translate(2px, -2px);
  }

  100% {
    -webkit-transform: translate(0);
    transform: translate(0);
  }
}

@keyframes vibrate-1 {
  0% {
    -webkit-transform: translate(0);
    transform: translate(0);
  }

  20% {
    -webkit-transform: translate(-2px, 2px);
    transform: translate(-2px, 2px);
  }

  40% {
    -webkit-transform: translate(-2px, -2px);
    transform: translate(-2px, -2px);
  }

  60% {
    -webkit-transform: translate(2px, 2px);
    transform: translate(2px, 2px);
  }

  80% {
    -webkit-transform: translate(2px, -2px);
    transform: translate(2px, -2px);
  }

  100% {
    -webkit-transform: translate(0);
    transform: translate(0);
  }
}
.type {
  background: -webkit-linear-gradient(25deg, #eee, #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid;
  animation: type 2s steps(30) 2s 1 normal both, cursor 3s step-end infinite;
  margin: auto;
}

@keyframes type {
  from {
    width: 0;
  }

  to {
    width: 100%;
  }
}

@keyframes cursor {
  50% {
    border-color: transparent;
  }
}
@media (max-width: 1000px) {
  .flap {
    border-left: 90px solid transparent;
    border-right: 90px solid transparent;
    border-bottom: 90px solid transparent;
    border-top: 150px solid #BBD1E6;
  }
  #envelope{
    width: 60vw;
    height: 30vh;
    top: 30vh;
  }
  body{
    background-size: cover;
  }
  .type{
    white-space: normal;
    animation: unset;
  }
  .text-conguration{
    font-size: 24px;
  }
  .reset button {
    width: 50%;
    /* margin: 0 auto; */
  }
  .img-open{
    margin-top: 0vh;
  }
  .letter{
    height: 80%;
  }
  .pocket{
    border-left: 30vw solid #E6EDF7;
    border-right: 30vw solid #E6EDF7;
    border-bottom: 30vw solid #D4E4F3;
    border-top: 10vw;
  }
}
@media (max-width: 650px){
  .flap {
    border-top: 115px solid #BBD1E6;
  }
  #envelope{
    top: 40vh;
  }
  .img-open{
    margin-top: 3vh;
  }
  .reset button {
    margin: auto;
  }
  .pocket{
    border-left: 30vw solid #E6EDF7;
    border-right: 30vw solid #E6EDF7;
    border-bottom: 50vw solid #D4E4F3;
    border-top: 10vw;
  }
}
@media (max-width: 375px) {
  #envelope{
    width: 60vw;
    margin: auto;
  }
  .flap{
    border-top: 40vw solid #BBD1E6;
  }
  .pocket{
    border-left: 30vw solid #E6EDF7;
    border-right: 30vw solid #E6EDF7;
    border-bottom: 30vw solid #D4E4F3;
    border-top: 10vw;
  }
}
