body{
  margin:0;
  font-family:'Segoe UI', sans-serif;
  background:linear-gradient(135deg,#ff9a9e,#fad0c4);
  text-align:center;
  color:white;
}

/* 🎁 START SCREEN */

.start-screen{
  height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}

.start-screen h1{
  background:white;
  color:#ff4b6e;
  padding:20px 30px;
  border-radius:30px;
  animation:pulse 1.5s infinite;
}

@keyframes pulse{
  0%{transform:scale(1);}
  50%{transform:scale(1.1);}
  100%{transform:scale(1);}
}

/* 🌸 MAIN CONTENT */

.main{
  display:none;
  padding:30px;
}

.title{
  font-size:2.5em;
  margin-top:20px;
}

.message{
  font-size:1.2em;
  margin:20px;
  line-height:1.6;
}

/* 🖼️ FLIP GALLERY */

.flip-gallery{
  position:relative;
  width:220px;
  height:360px;
  margin:30px auto;
}

.card{
  position:absolute;
  width:100%;
  height:100%;
  border-radius:20px;
  overflow:visible;
  cursor:pointer;
  transform:scale(0.9);
  opacity:0;
  transition:0.6s;
}

.card img{
  width:100%;
  height:360px;
  object-fit:cover;
  border-radius:20px;
}

.card.active{
  transform:scale(1);
  opacity:1;
  z-index:2;
  animation:flipIn 0.6s ease;
}

@keyframes flipIn{
  from{ transform:rotateY(90deg); opacity:0; }
  to{ transform:rotateY(0deg); opacity:1; }
}

/* 🎥 VIDEO MODAL */

.video-modal{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.85);
  justify-content:center;
  align-items:center;
  z-index:3000;
  backdrop-filter:blur(6px);
  animation:fadeIn 0.6s ease;
}

.video-modal video{
  width:auto;
  height:auto;
  max-width:350px;
  border-radius:25px;
  box-shadow:0 0 60px rgba(255,75,110,0.35);
  animation:zoomVideo 0.5s ease;
}
#finalVideo{
  width:95%;
  max-width:900px;
  border-radius:30px;
}
.photo-caption{
  margin-top: 10px;
  font-size: 18px;
  color: rgb(77, 14, 177);
  text-align: center;
  opacity: 0.8;
  transition: 0.4s;
}

/* Active photo caption glow */
.card.active .photo-caption{
  opacity: 1;
  transform: scale(1.05);
}
/* ❌ CLOSE BUTTON */

.close{
  position:absolute;
  top:20px;
  right:25px;
  font-size:26px;
  background:white;
  color:#ff4b6e;
  width:40px;
  height:40px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow:0 0 20px rgba(255,75,110,0.4);
  transition:0.3s;
}

.close:hover{
  transform:scale(1.15) rotate(90deg);
}

/* 💌 LETTER MODAL */

.letter-modal{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.7);
  justify-content:center;
  align-items:center;
  z-index:2500;
  animation:fadeIn 0.5s ease;
}

.letter-box{
  background:white;
  color:#333;
  width:90%;
  max-width:500px;
  max-height:80vh;
  padding:25px;
  border-radius:25px;
  text-align:center;
  overflow-y:auto;
  box-shadow:0 0 40px rgba(255,75,110,0.35);
  animation:zoomVideo 0.4s ease;
}

.letter-box h2{
  color:#ff4b6e;
  animation:heartbeat 1.5s infinite;
}

#typedText{
  font-size:20px;
  line-height:1.6;
  margin-top:15px;
  animation:fadeIn 1s ease;
}

/* ✅ FINISH BUTTON */

.finish-btn{
  margin-top:20px;
  padding:8px 18px;
  border-radius:20px;
  border:none;
  background:#ff4d6d;
  color:white;
  cursor:pointer;
  font-size:16px;
  box-shadow:0 0 15px rgba(255,77,109,0.4);
  transition:0.3s;
}

.finish-btn:hover{
  transform:scale(1.1);
}

/* ✨ AFTER LETTER SCREEN */

.after-letter{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.55);
  display:none;
  justify-content:center;
  align-items:center;
  flex-direction:column;
  z-index:2600;
  backdrop-filter:blur(6px);
  animation:fadeIn 0.8s ease;
}

#finalLine{
  font-size:20px;
  color:rgb(245, 240, 240);
  margin-bottom:20px;
  animation:glowText 1.5s ease-in-out infinite alternate;
}

/* 🌑 FADE SCREEN */

.fade-screen{
  position:fixed;
  inset:0;
  background:black;
  opacity:0;
  pointer-events:none;
  z-index:2400;
  transition:opacity 1.5s ease;
}

.fade-screen.show{
  opacity:1;
}

/* 💖 HEART BURST */

.heart-burst{
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:2700;
  overflow:hidden;
}

.heart-burst span{
  position:absolute;
  font-size:24px;
  animation:burst 1.8s ease-out forwards;
}

/* 🎬 FINAL SECTION */

.final{
  margin-top:40px;
  font-size:1.3em;
}

/* 🔘 BUTTON */

.open-letter-btn{
  margin-top:15px;
  padding:10px 20px;
  border:none;
  border-radius:25px;
  background:white;
  color:#ff4b6e;
  font-size:16px;
  cursor:pointer;
  transition:0.3s;
}

.open-letter-btn:hover{
  transform:scale(1.1);
}

/* ✨ ANIMATIONS */

@keyframes fadeIn{
  from{opacity:0;}
  to{opacity:1;}
}

@keyframes zoomVideo{
  from{
    transform:scale(0.7);
    opacity:0;
  }
  to{
    transform:scale(1);
    opacity:1;
  }
}

@keyframes glowText{
  from{ text-shadow: 0 0 10px rgba(255,75,110,0.3); }
  to{ text-shadow: 0 0 25px rgba(255,75,110,0.8); }
}

@keyframes heartbeat{
  0%{ transform:scale(1); }
  50%{ transform:scale(1.05); }
  100%{ transform:scale(1); }
}

@keyframes burst{
  0%{
    transform: scale(0.5) translateY(0);
    opacity:1;
  }
  100%{
    transform: scale(1.5) translateY(-200px);
    opacity:0;
  }
}
.video-caption{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 35px;

  display: flex;
  justify-content: center;
  pointer-events: none;

  opacity: 0;
  transition: opacity 0.5s ease, bottom 0.5s ease;
}

/* 💖 Bubble */
.video-caption span{
  background: linear-gradient(135deg, rgba(255,75,110,0.9), rgba(255,120,150,0.8));
  padding: 12px 26px;
  border-radius: 30px;

  font-size: 18px;
  font-weight: 500;
  color: white;

  max-width: 82%;
  text-align: center;

  backdrop-filter: blur(10px);
  box-shadow: 0 0 25px rgba(255,75,110,0.35);

  transform: scale(0.7);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

/* ✨ Visible */
.video-caption.show{
  opacity: 1;
  bottom: 55px;
}

.video-caption.show span{
  transform: scale(1);
  animation: captionFloat 3s ease-in-out infinite,
             captionGlow 1.5s ease-in-out infinite alternate;
}

@keyframes captionFloat{
  0%{ transform: scale(1) translateY(0); }
  50%{ transform: scale(1.03) translateY(-4px); }
  100%{ transform: scale(1) translateY(0); }
}

@keyframes captionGlow{
  from{ box-shadow: 0 0 15px rgba(255,75,110,0.35); }
  to{ box-shadow: 0 0 35px rgba(255,75,110,0.85); }
}
.caption-hearts{
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 3100;
}

.caption-hearts span{
  position: absolute;
  font-size: 22px;
  animation: heartFloat 1.8s ease-out forwards;
  opacity: 0;
}

@keyframes heartFloat{
  0%{
    transform: translateY(0) scale(0.6);
    opacity: 1;
  }
  100%{
    transform: translateY(-120px) scale(1.4);
    opacity: 0;
  }
}