body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  /* Dark background gradient (used for both screens) */
  background: radial-gradient(circle at center, #1b0a2d, #0d0116 80%);
  color: white;
  font-family: "Kalam", cursive;
  /* FIX 1: Remove horizontal scroll on mobile */
  overflow-x: hidden;
  overflow-y: auto; /* Allow vertical scroll naturally */
  position: relative; /* Needed for particle background */
  width: 100vw;
}
html {
  overflow-x: hidden;
}

/* FIX 4: FLOATING HEART BACKGROUND ANIMATION */
.particle-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0; /* Keep behind all content */
}

.particle {
  position: absolute;
  width: 20px;
  height: 20px;
  opacity: 0;
  animation: floatUp 15s linear infinite;
  transform: rotate(0deg);
}

.particle::before {
  content: "🩷"; /* Use a heart emoji */
  font-size: 1em;
  color: #ff6b8b;
  text-shadow: 0 0 5px rgba(255, 107, 139, 0.8);
}

@keyframes floatUp {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}
/* END FLOATING HEART BACKGROUND ANIMATION */

/* Base class for screens to center content */
.screen-container {
  position: absolute;
  width: 100%;
  /* Use min-height: 100vh to ensure it covers the viewport, 
       but allow content to expand beyond that for scrolling (FIX 2) */
  min-height: 100vh;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  /* SMOOTH TRANSITION: 1.0s */
  transition: opacity 1s ease-in-out, visibility 1s;
  padding: 20px;
  box-sizing: border-box;
  z-index: 10; /* Keep content above background */
  max-width: 100%;
}

.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* --- COUNTDOWN STYLES --- */

.countdown-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 250px;
  height: 250px;
  margin: 0 auto 30px;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(181, 23, 158, 0.5), 0 0 40px rgba(114, 9, 183, 0.7),
    inset 0 0 10px rgba(181, 23, 158, 0.5);
  animation: pulseRing 1.5s ease-in-out infinite alternate;
}

@keyframes pulseRing {
  0% {
    box-shadow: 0 0 10px rgba(181, 23, 158, 0.5),
      0 0 40px rgba(114, 9, 183, 0.7), inset 0 0 10px rgba(181, 23, 158, 0.5);
  }
  100% {
    box-shadow: 0 0 20px rgba(247, 37, 133, 0.8),
      0 0 60px rgba(72, 12, 168, 0.9), inset 0 0 15px rgba(247, 37, 133, 0.8);
  }
}

.countdown-number {
  font-size: 8em;
  font-weight: 700;
  background: linear-gradient(45deg, #f72585, #b5179e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
  position: relative;
  bottom: -15px;
}

.fade-out {
  opacity: 0;
  transform: scale(0.7);
}

.countdown-text {
  font-size: 1.6em;
  margin-top: 30px;
  letter-spacing: 1px;
  color: #e0b7f8;
}

/* --- WELCOME/WARNING/PROPOSAL SCREEN GENERAL STYLES --- */

.welcome-icon-wrapper {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background-color: #2c1a40;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px;
  box-shadow: 0 0 5px rgba(247, 37, 133, 0.8), 0 0 25px rgba(72, 12, 168, 0.9);
  animation: pulseRing 1.5s ease-in-out infinite alternate;
}

.welcome-icon {
  width: 80px;
  height: auto;
}
.welcome-icon2 {
  width: 111px;
  height: auto;
}

.main-heading {
  font-size: 3em;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 10px;
  background: linear-gradient(90deg, #e0b7f8, #ff6b8b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 10px rgba(224, 183, 248, 0.3);
}

.sub-text {
  font-size: 1.2em;
  color: #bfa7d1;
  margin-bottom: 20px; /* Changed from 40px to reduce gap */
  letter-spacing: 1px;
}
/* --- Button Group Container (Warning Screen) --- */
.button-group {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}

/* --- Tap Button Styles (General) --- */
.tap-button {
  padding: 15px 40px;
  font-size: 1.2em;
  font-family: "Kalam", cursive;
  font-weight: bold;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  letter-spacing: 1px;
  white-space: nowrap; /* Prevent text wrapping */

  background: linear-gradient(90deg, #ff6b8b, #7209b7);
  color: white;

  box-shadow: 0 4px 15px rgba(114, 9, 183, 0.7),
    inset 0 0 10px rgba(255, 255, 255, 0.2);

  transition: transform 0.2s, box-shadow 0.2s;
}

.tap-button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(114, 9, 183, 0.9);
}

.tap-button:active {
  transform: scale(0.95);
  box-shadow: 0 2px 10px rgba(114, 9, 183, 0.7);
}

/* Specific button colors (Warning Screen) */
.green-button {
  background: linear-gradient(90deg, #4caf50, #2e7d32);
  box-shadow: 0 4px 15px rgba(46, 125, 50, 0.7);
}
.green-button:hover {
  box-shadow: 0 6px 20px rgba(46, 125, 50, 0.9);
}

.red-button {
  background: linear-gradient(90deg, #f44336, #d32f2f);
  box-shadow: 0 4px 15px rgba(211, 47, 47, 0.7);
}
.red-button:hover {
  box-shadow: 0 6px 20px rgba(211, 47, 47, 0.9);
}

/* --- PROPOSAL SCREEN STYLES (Video Pandas) --- */
/* 
.message-wrapper {
    display: flex;
    justify-content: center;
    gap: 100px;
    margin-top: 50px; 
    position: relative;
    width: 100%;
    height: 200px; 
}

.panda-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: absolute;
    transition: opacity 0.5s ease-out;
    top: 0; 
}

/* STYLING FOR THE VIDEO ELEMENT */
/* .panda-message video {
    width: 120px; 
    height: 120px;
    object-fit: contain;
    z-index: 2; 
    margin: 0; 
    padding: 0;
} */

/* Applying positioning and animation */
/* #i-panda-wrapper { left: 10%; }
#love-panda-wrapper { left: 50%; transform: translateX(-50%); }
#you-panda-wrapper { right: 10%; }

.running {
    position: absolute;
    opacity: 0;
    animation-fill-mode: forwards;
    top: 50px; 
    animation-duration: 1.5s; 
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94); 
} */

/* --- RUNNING ANIMATION KEYFRAMES (Desktop) --- */
/* @keyframes runFromLeft { 
    0% { transform: translate(-100vw, 50px); opacity: 0; } 
    100% { transform: translate(0, 50px); opacity: 1; } 
}
@keyframes runFromBottom { 
    0% { transform: translate(-50%, 100vh); opacity: 0; } 
    100% { transform: translate(-50%, 50px); opacity: 1; } 
}
@keyframes runFromRight { 
    0% { transform: translate(100vw, 50px); opacity: 0; } 
    100% { transform: translate(0, 50px); opacity: 1; } 
} */

/* --- HEART BALLOON STYLES (FORCED LINEUP) --- */
.message-wrapper {
  display: flex !important;
  flex-direction: row !important;
  justify-content: center !important; /* Forces perfect horizontal center */
  align-items: flex-end !important;
  gap: 80px;
  height: 280px; /* Reduced from 400px to move balloons up */
  width: 100% !important;
  margin: 0 auto; /* Removed 40px top margin to close gap */
  position: relative;
}

.balloon-wrapper {
  /* FIX: This stops balloons from flying to the left/right corners */
  position: relative !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;

  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transform: translateY(50px);
  transition: all 1s ease-out;
}

.balloon-wrapper.visible {
  opacity: 1;
  transform: translateY(0);
  animation: floatSway 4s ease-in-out infinite !important;
}

/* HEART SHAPE */
.balloon {
  width: 80px;
  height: 80px;
  position: relative;
  transform: rotate(-45deg);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: -5px 5px 15px rgba(0, 0, 0, 0.3);
}

.balloon::before,
.balloon::after {
  content: "";
  width: 80px;
  height: 80px;
  background: inherit;
  border-radius: 50%;
  position: absolute;
}

.balloon::before {
  top: -40px;
  left: 0;
}
.balloon::after {
  left: 40px;
  top: 0;
}

.balloon span {
  position: absolute;
  transform: rotate(45deg);
  color: white;
  font-size: 2.4em;
  font-weight: bold;
  z-index: 10;
  text-align: center;
  width: 80px;
  height: 80px;
}

.color-1 {
  background: #ff4d6d;
}
.color-2 {
  background: #ff758f;
}
.color-3 {
  background: #c9184a;
}

.string {
  width: 2px;
  height: 120px;
  background: rgba(255, 255, 255, 0.3);
  margin-top: 16px; /* Space from heart tip to string start */
}

@keyframes floatSway {
  0%,
  100% {
    transform: translateY(0) rotate(-3deg);
  }
  50% {
    transform: translateY(-25px) rotate(3deg);
  }
}
/* MODAL */
/* .modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9); display: flex; justify-content: center; align-items: center; z-index: 100;
}
.modal-content {
    background: #1b0a2d; padding: 30px; border-radius: 20px; text-align: center;
    border: 2px solid #ff6b8b; max-width: 80%;
} */

/* ========================================================== */
/* ✨ PHOTO SLIDER SCREEN - FULL REBUILD ✨  */
/* ========================================================== */

#photo-slider-screen {
  padding-top: 50px;
  text-align: center;
  min-height: 100vh;
}

/* 1. Shining Title Logic */
.slider-sub-text {
  font-size: 3.5em;
  font-weight: 700;
  margin-bottom: 5px;
  display: inline-block;
  background: linear-gradient(
    90deg,
    #ff6b8b 0%,
    #f72585 25%,
    #ffffff 50%,
    #f72585 75%,
    #ff6b8b 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShine 3s linear infinite;
  text-shadow: 0 0 20px rgba(255, 107, 139, 0.3);
}

@keyframes textShine {
  to {
    background-position: 200% center;
  }
}

.slider-intro-text {
  font-size: 0.9em;
  color: #bfa7d1;
  margin-bottom: 30px;
}

/* 2. Swiper Container Fix */
.swiper {
  width: 300px;
  height: 400px;
  margin: 20px auto 40px;
  /* Allow cards to be seen when they are stacked/rotated */
  overflow: visible !important;
}

.swiper-slide {
  width: 300px;
  height: 400px;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  background: #2c1a40;
  display: flex;
  justify-content: center;
  align-items: center;
}

.swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 3. Perfect Heart Alignment */
.card-heart {
  position: absolute;
  top: 15px; /* Both hearts at the same height */
  font-size: 1.5rem;
  z-index: 10;
  filter: drop-shadow(0 0 5px rgba(255, 107, 139, 0.8));
  pointer-events: none;
}

.card-heart.top-left {
  left: 15px;
}

.card-heart.top-right {
  right: 15px;
}

.card-heart::before {
  content: "💗";
}

/* Swiper Navigation (Arrows) */
/* .swiper-button-prev,
.swiper-button-next {
    color: #ff6b8b !important; 
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(44, 26, 64, 0.7); 
    backdrop-filter: blur(5px);
    transition: background-color 0.2s;
    top: 50%;
    transform: translateY(-50%);
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    background-color: rgba(44, 26, 64, 1); 
} */

/* Swiper Pagination (Dots) */
.swiper-pagination-bullet {
  background-color: #bfa7d1;
  opacity: 0.7;
  transition: all 0.2s;
}

.swiper-pagination-bullet-active {
  background-color: #ff6b8b;
  opacity: 1;
  transform: scale(1.2);
}

/* --- MODAL STYLES (Ultra-Responsive Fix) --- */
.modal {
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  /* FIX 3: Allow scroll for modal content on mobile */
  overflow-y: auto;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.3s ease-in-out, visibility 0.3s;
  padding: 20px;
  box-sizing: border-box;
  max-width: 100vw;
}

.modal-content {
  background: linear-gradient(145deg, #1b0a2d, #3c1955);
  padding: 30px;
  border-radius: 15px;
  width: 100%; /* Take full width on mobile */
  max-width: 450px;
  text-align: center;
  box-shadow: 0 0 30px rgba(181, 23, 158, 0.8), 0 0 50px rgba(114, 9, 183, 0.6);
  /* FIX 3: Center content vertically in the scrollable space */
  margin: auto;
  min-height: min-content;
  box-sizing: border-box;
}

.modal-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

.modal-icon {
  font-size: 3em;
  margin-bottom: 10px;
}

.modal-title {
  font-size: 2em;
  color: #ff6b8b;
  margin: 0;
}

.modal-body-text {
  font-size: 1.1em;
  color: #e0b7f8;
  margin-bottom: 30px;
}

.modal-button {
  margin-top: 10px;
}

/* ========================================================== */
/* --- RESPONSIVE DESIGN (Max Width: 600px) --- */
/* ========================================================== */

@media (max-width: 600px) {
  /* FIX 1: Ensure body does not scroll horizontally */
  body {
    overflow-x: hidden;
    width: 100vw;
  }

  /* Global Adjustments */
  .screen-container {
    padding: 40px 10px;
    /* Center everything in mobile */
    justify-content: center;
    align-items: center;
    padding-top: 50px;
    min-height: 100vh;
    height: auto;
  }

  /* --- Text Scaling --- */
  .main-heading {
    font-size: 1.8em;
    line-height: 1.3;
  }
  .sub-text {
    font-size: 0.95em;
    margin-bottom: 25px;
  }

  /* Button Group Mobile */
  .button-group {
    gap: 10px;
    flex-direction: column;
    width: 100%;
    max-width: 300px;
  }

  /* Tap Buttons Scaled */
  .tap-button {
    padding: 10px 20px;
    font-size: 0.9em;
    width: 100%;
  }

  /* --- Proposal Screen (Panda Video Adjustments) --- */
  /* .message-wrapper {
        flex-direction: row;        
        justify-content: center;    
        align-items: flex-end;      
        gap: 15px;                  
        margin-top: 30px;
        height: 280px; 
        width: 100%; 
        position: relative; 
    }
    
    .panda-message {
        position: relative; 
        margin-bottom: 5px; 
        left: auto;
        right: auto;
        transform: none !important; 
        width: 100%; 
        display: flex;
        justify-content: center;
        align-items: center;
        opacity: 0; 
        top: auto;
    }
    
    .panda-message video {
        width: 80px; 
        height: 80px;
    } */

  /* Define simple slide-up keyframes for stacked mobile view */
  @keyframes slideUpFade {
    0% {
      transform: translateY(30px);
      opacity: 0;
    }
    100% {
      transform: translateY(0);
      opacity: 1;
    }
  }

  /* Apply the new keyframes based on the delay set in JavaScript */
  #i-panda-wrapper.running {
    animation: slideUpFade 0.5s ease-out forwards;
  }
  #love-panda-wrapper.running {
    animation: slideUpFade 0.5s ease-out 1.5s forwards;
  }
  #you-panda-wrapper.running {
    animation: slideUpFade 0.5s ease-out 3s forwards;
  }

  /* --- Stacked Slider Mobile Adjustments (Swiper Classes) --- */
  #photo-slider-screen {
    padding-top: 30px;
    justify-content: center;
    min-height: 100vh;
  }

  /* NEW: Mobile style for the bigger title */
  .slider-sub-text {
    font-size: 1.8em;
    margin-bottom: 5px;
  }

  /* NEW: Mobile style for the smaller subtext */
  .slider-intro-text {
    font-size: 0.7em; /* Even smaller on mobile */
    margin-bottom: 30px;
  }

  /* Smaller card size on mobile */
  .swiper {
    width: 250px;
    height: 350px;
    margin: 20px auto 30px;
  }

  .swiper-slide {
    width: 240px;
    height: 340px;
  }

  /* Swiper Controls */
  .swiper-button-prev,
  .swiper-button-next {
    width: 30px;
    height: 30px;
    top: 50%;
    margin-top: -15px;
  }

  .swiper-button-prev {
    left: 0px;
  }
  .swiper-button-next {
    right: 0px;
  }

  /* --- MODAL RESPONSIVENESS FIX (Pop-up Message) --- */
  .modal-content {
    /* FIX: Reduce padding to prevent overflow on very small screens */
    padding: 20px 15px;
    /* Ensure max-width works correctly */
    max-width: calc(100% - 20px);
  }

  .modal-title {
    /* FIX: Scale down font size */
    font-size: 1.5em;
  }

  .modal-body-text {
    /* FIX: Scale down font size */
    font-size: 1em;
    margin-bottom: 20px;
  }
}

/* RESPONSIVE */
/* @media (max-width: 600px) {
    .message-wrapper { gap: 15px; height: 280px; }
    .balloon { width: 60px; height: 80px; font-size: 1.1em; }
    .string { height: 80px; }
    .button-group { flex-direction: column; width: 100%; }
    .main-heading { font-size: 1.8em; }
}
 */

/* ========================================================== */
/* --- RESPONSIVE DESIGN (FIXED HEART LINE & FLOAT) --- */
/* ========================================================== */

@media (max-width: 600px) {
  body {
    overflow-x: hidden;
    width: 100vw;
  }

  .screen-container {
    padding: 40px 10px;
    justify-content: center;
    min-height: 100vh;
  }

  .main-heading {
    font-size: 1.8em;
    line-height: 1.3;
  }
  .sub-text {
    font-size: 0.95em;
    margin-bottom: 25px;
  }

  /* THE FIX: Row alignment for hearts */
  .message-wrapper {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: flex-end !important;
    gap: 45px; /* Increased from 20px to separate the balloons */
    height: 200px;
    width: 100% !important;
    margin-top: 0px;
  }

  .balloon-wrapper {
    position: relative !important;
    transform: translateY(50px); /* Keeps the start position for animation */
  }

  /* Keeps animation running on mobile */
  .balloon-wrapper.visible {
    animation: floatSway 4s ease-in-out infinite !important;
  }

  .balloon {
    width: 50px;
    height: 50px;
  }
  .balloon::before,
  .balloon::after {
    width: 50px;
    height: 50px;
  }
  .balloon::before {
    top: -25px;
  }
  .balloon::after {
    left: 25px;
  }

  .balloon span {
    font-size: 1.5em;
    left: -24px;
    top: -5px;
  }

  .string {
    height: 70px;
    margin-top: 10px;
  }

  .button-group {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
  }

  .tap-button {
    width: 100%;
  }

  .slider-sub-text {
    font-size: 1.8em;
  }
  .swiper {
    width: 250px;
    height: 350px;
  }
}
/* 4. Responsive Fixes */
@media (max-width: 600px) {
  .slider-sub-text {
    font-size: 2em;
  }
  .swiper {
    width: 250px;
    height: 350px;
  }
  .swiper-slide {
    width: 250px;
    height: 350px;
  }
}

/* --- FINAL MESSAGE SCREEN --- */
.final-gif-wrapper {
  margin-bottom: 20px;
}

.rotating-envelope {
  width: 100px;
  height: auto;
  /* Changed to gentleSway to match the balloon rhythm */
  animation: gentleSway 4s ease-in-out infinite;
  display: block;
  margin: 0 auto;
}

.highlight {
  color: #ff6b8b;
  text-shadow: 0 0 10px rgba(255, 107, 139, 0.5);
}

/* The Pulsing Box */
.heart-box {
  margin-top: 30px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 107, 139, 0.3);
  padding: 40px 60px;
  border-radius: 20px;
  cursor: pointer;
  backdrop-filter: blur(5px);
  transition: transform 0.3s;
}

.heart-box:hover {
  transform: scale(1.05);
}

.beeping-heart {
  font-size: 4em;
  margin-bottom: 10px;
  /* Real Heartbeat Animation */
  animation: heartBeep 1.2s ease-in-out infinite;
  display: inline-block;
}

.tap-text {
  font-size: 1.2em;
  color: #bfa7d1;
  margin: 0;
}

/* ANIMATIONS */

/* 1. Real Heartbeat (Double pulse) */
@keyframes heartBeep {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 5px #ff6b8b);
  }
  15% {
    transform: scale(1.25);
    filter: drop-shadow(0 0 15px #ff6b8b);
  }
  30% {
    transform: scale(1);
    filter: drop-shadow(0 0 5px #ff6b8b);
  }
  45% {
    transform: scale(1.15);
    filter: drop-shadow(0 0 10px #ff6b8b);
  }
  60% {
    transform: scale(1);
    filter: drop-shadow(0 0 5px #ff6b8b);
  }
  100% {
    transform: scale(1);
  }
}

/* 2. Smooth Continuous Rotation */
/* Smoothly sways back and forth slightly like the balloons */
@keyframes gentleSway {
  0%,
  100% {
    transform: rotate(-6deg) translateY(0);
  }
  50% {
    transform: rotate(6deg) translateY(-10px);
  }
}
/* Mobile Tweak for the box */
@media (max-width: 600px) {
  .heart-box {
    padding: 30px 40px;
    width: 80%;
  }
  .rotating-envelope {
    width: 120px;
  }
}

/* --- UPDATED LETTER & PROPOSAL SCREEN --- */
#letter-screen {
  display: flex;
  flex-direction: column;
  justify-content: center; /* Vertical Center */
  align-items: center; /* Horizontal Center */
  padding: 20px;
}

.letter-box {
  background: rgba(20, 2, 34, 0.7);
  border: 1px solid rgba(255, 107, 139, 0.4);
  border-radius: 30px;
  padding: 50px; /* Increased padding */
  width: 90%;
  max-width: 800px; /* Bigger box width */
  min-height: 300px;
  margin-bottom: 40px;
  text-align: left;
  backdrop-filter: blur(15px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  box-sizing: border-box;
}

.typewriter-container {
  font-size: 1.3em; /* Slightly larger text */
  line-height: 1.7;
  color: #f1e4ff;
  white-space: pre-wrap; /* Crucial for keeping the paragraph breaks */
}

.proposal-question {
  font-size: 2.5em;
  margin-bottom: 25px;
  color: #ff6b8b;
  text-shadow: 0 0 20px rgba(255, 107, 139, 0.6);
  font-family: "Kalam", cursive;
}

.final-yes-button {
  background: linear-gradient(90deg, #ff4d6d, #9d50bb) !important;
  padding: 18px 70px !important;
  font-size: 1.5em !important;
  border-radius: 50px !important;
  box-shadow: 0 0 25px rgba(255, 77, 109, 0.5) !important;
  animation: pulseRing 1.5s infinite alternate;
}

/* Visibility Helpers */
.hidden-fade {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 2s ease;
}

.show-fade {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 600px) {
  #letter-screen {
    /* Ensure the screen can scroll if the letter is longer than the phone */
    justify-content: flex-start;
    padding-top: 60px;
    padding-bottom: 40px;
    height: auto;
    min-height: 100vh;
  }

  .letter-box {
    padding: 20px; /* Reduced padding for more text space */
    width: 92%;
    max-width: none;
    margin-bottom: 25px;
    /* Allow the box to be as tall as the text needs */
    min-height: auto;
  }

  .typewriter-container {
    /* Scale text to a readable but compact size for mobile */
    font-size: 0.95em;
    line-height: 1.5;
    text-align: left;
  }

  .proposal-question {
    font-size: 1.4em; /* Smaller question text */
    margin-bottom: 20px;
  }

  .final-yes-button {
    padding: 12px 30px !important;
    font-size: 1.1em !important;
    width: auto !important;
  }
}

/* --- CELEBRATION SCREEN & FLASH --- */

/* Flash Effect Class */
.heart-flash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle, #ff6b8b, #f72585);
  z-index: 9999;
  pointer-events: none;
  animation: flashOut 1s ease-out forwards;
}

@keyframes flashOut {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* Final Screen Text Styles */
.final-heart {
  font-size: 6em !important; /* Larger beeping heart */
  filter: drop-shadow(0 0 20px #ff6b8b);
  margin-bottom: 20px;
}

.celebration-main-text {
  font-size: 2.8em;
  font-weight: 700;
  color: #e0b7f8;
  margin: 10px 0;
  line-height: 1.4;
}

.forever-text {
  font-size: 3.5em;
  font-weight: 700;
  background: linear-gradient(90deg, #ff6b8b, #ffffff, #ff6b8b);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShine 3s linear infinite;
  text-shadow: 0 0 20px rgba(255, 107, 139, 0.5);
}

@media (max-width: 600px) {
  .celebration-main-text {
    font-size: 1.8em;
  }
  .forever-text {
    font-size: 2.2em;
  }
  .final-heart {
    font-size: 4.5em !important;
  }
}
