:root {
  --primary: #fff;
  --bg-color: #ffe4f0;
  --bg-envelope-color: #fce4ec;
  --envelope-tab: #f8bbd0;
  --envelope-cover: #f48fb1;
  --shadow-color: rgba(0, 0, 0, 0.2);
  --txt-color: #444;
  --heart-color: rgb(252, 8, 231);
}

body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background: var(--bg-color);
  font-family: 'Comic Sans MS', cursive, sans-serif;
  overflow-x: hidden;
  position: relative;
}

.container {
  height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.envelope-wrapper {
  background: var(--bg-envelope-color);
  box-shadow: 0 0 40px var(--shadow-color);
  position: relative;
}

.envelope {
  position: relative;
  width: 300px;
  height: 230px;
}

.envelope::before {
  content: "";
  position: absolute;
  top: 0;
  z-index: 2;
  border-top: 130px solid var(--envelope-tab);
  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 var(--envelope-cover);
  border-bottom: 100px solid var(--envelope-cover);
  border-left: 150px solid var(--envelope-cover);
}

.letter {
  position: absolute;
  right: 20%;
  bottom: 0;
  width: 54%;
  height: 80%;
  background: var(--primary);
  text-align: center;
  transition: all 1s ease-in-out;
  box-shadow: 0 0 5px var(--shadow-color);
  padding: 20px 10px;
}

.letter .text {
  font-family: 'Lilita One', cursive;
  font-size: 16px;
  color: var(--txt-color);
  text-align: center;
}

.heart {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 15px;
  height: 15px;
  background: var(--heart-color);
  z-index: 4;
  transform: translate(-50%, -20%) rotate(45deg);
  transition: transform 0.5s ease-in-out 1s;
  box-shadow: 0 1px 6px var(--shadow-color);
}

.heart:before,
.heart:after {
  content: "";
  position: absolute;
  width: 15px;
  height: 15px;
  background-color: var(--heart-color);
  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;
}

.buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 50px;
}

.buttons button {
  font-family: 'Bitcount Prop Single', sans-serif;
  font-size: 1.4rem;
  padding: 12px 28px;
  border: none;
  border-radius: 12px;
  background-color: #ff85a2;
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: background 0.3s;
}

.buttons button:hover {
  background-color: #ff5e94;
}

/* Smooth fade for Continue button */
#continueBtn {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

#continueBtn.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Floating hearts */
.floating-heart {
  position: fixed;
  bottom: 0;
  font-size: 24px;
  animation: floatUp ease-in infinite;
  z-index: 1000;
  opacity: 0.8;
}

@keyframes floatUp {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(-100vh);
    opacity: 0;
  }
}

