* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Dancing Script', cursive;
}

body {
  background: #8b0000;
  height: 100vh;
  overflow: hidden;
  color: #fff;
}

/* 💌 Intro */
#intro {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#envelope {
  width: 320px; /* BIGGER envelope */
  cursor: pointer;
  transition: transform 0.6s ease;
}

/* 💗 Envelope opening */
#envelope.open {
  transform: scale(1.15) rotateX(20deg);
  filter: drop-shadow(0 0 20px rgba(255,182,193,0.8));
}


#envelope:hover {
  transform: scale(1.1);
}

#open-text {
  margin-top: 18px;
  font-size: 2rem;
  opacity: 0.9;
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

/* 💖 Hearts canvas */
#stars {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
}

/* 🌸 Gallery */
.hidden {
  display: none;
}

#gallery {
  height: 100vh;
  background: linear-gradient(
    to bottom,
    #ffd6e8,
    #ffb6c1
  );
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* 🌸 Subtle vignette effect */
#photo {
  position: relative;
}

#photo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  box-shadow: inset 0 0 80px rgba(0,0,0,0.35);
  pointer-events: none;
}

/* 📦 Slide container */
#slide {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
}


/* 🌸 DESKTOP (default) */
#gallery img {
  max-width: 70%;
  max-height: 70%;
  border-radius: 16px;
  box-shadow: 0 0 35px rgba(255,255,255,0.4);
  animation: fadeZoom 5s ease forwards;
  transform-origin: center center;
}

#message {
  margin-top: 18px;
  font-size: 1.7rem;
  text-align: center;
  max-width: 80%;
  padding: 10px 16px;
  color: #8b0033;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 12px;
  backdrop-filter: blur(6px);
}




/* 🌸 Ken Burns zoom */
@keyframes fadeZoom {
  from {
    opacity: 0;
    transform: scale(1);
  }
  to {
    opacity: 1;
    transform: scale(1.1);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 💍 Final screen */
#final {
  display: none;
  height: 100vh;
  background: radial-gradient(circle, #ffd6e8, #8b0000);
  color: white;
  text-align: center;
  justify-content: center;
  align-items: center;
  font-size: 3rem;
  padding: 20px;
  text-shadow: 0 0 25px rgba(255,255,255,0.6);
}


/* 📱 Mobile responsiveness */
@media (max-width: 768px) {

   #gallery {
    justify-content: center;
    padding: 24px 0;
  }

   #gallery img {
    max-height: 42vh;
  }

  #message {
    font-size: 1.6rem;
    margin-top: 16px;
  }

  #final {
    font-size: 2.2rem;
  }
  #envelope {
  width: 300px;   /* feels bold & intentional */
  }

#open-text {
  font-size: 1.8rem;
  }
}


/* 💞 Heartbeat animation */
@keyframes heartbeat {
  0% {
    transform: scale(1);
  }
  14% {
    transform: scale(1.08);
  }
  28% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.12);
  }
  70% {
    transform: scale(1);
  }
}
@keyframes fadeZoom {
  from {
    opacity: 0;
    transform: scale(1);
  }
  to {
    opacity: 1;
    transform: scale(1.08); /* slightly reduced for safety */
  }
}


/* Apply heartbeat to final text */
#final {
  animation: heartbeat 2.2s infinite;
}
