* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* PAGE SYSTEM */
.page {
  display: none;
  width: 100vw;
  height: 100vh;
  position: relative;
}

.page.active {
  display: flex;
}

/* PAGE 1: LEFT HALF */
.left-half {
  width: 50%;
  height: 100%;
  overflow: hidden;
}

.photo-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* PAGE 1: RIGHT HALF */
.right-half {
  width: 50%;
  height: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.bg-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

.password-box {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border-radius: 30px;
  padding: 30px 40px;
  margin-bottom: 35px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  position: relative;
}

.box-label {
  color: #fff;
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 18px;
  letter-spacing: 1px;
  position: relative;
  display: inline-block;
  padding: 8px 20px;
  border-radius: 50px;
  background: linear-gradient(135deg, rgba(255,255,255,0.3), rgba(255,255,255,0.1));
}

.box-label::after {
  content: '';
  display: inline-block;
  width: 3px;
  height: 1.1em;
  background: #fff;
  margin-left: 3px;
  vertical-align: middle;
  animation: blink 0.8s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.dots-display {
  display: flex;
  gap: 18px;
  justify-content: center;
}

.dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #fff;
  background-color: transparent;
  transition: all 0.3s ease;
  box-shadow: 0 0 8px rgba(255,255,255,0.4);
}

.dot.filled {
  background-color: #fff;
  transform: scale(1.2);
  box-shadow: 0 0 15px rgba(255,255,255,0.9);
}

.numpad {
  display: grid;
  grid-template-columns: repeat(3, 75px);
  grid-template-rows: repeat(4, 75px);
  gap: 20px;
  justify-content: center;
  align-content: center;
}

.num-btn:last-child {
  grid-column: 2;
}

.num-btn {
  width: 75px;
  height: 75px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4);
  background: linear-gradient(145deg, rgba(255,255,255,0.25), rgba(255,255,255,0.05));
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2), inset 0 1px 2px rgba(255,255,255,0.3);
  transition: transform 0.15s ease, background 0.15s ease;
}

.num-btn:hover {
  background: linear-gradient(145deg, rgba(255,255,255,0.35), rgba(255,255,255,0.1));
  transform: scale(1.05);
}

.num-btn:active {
  transform: scale(0.9);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3), inset 0 2px 4px rgba(0,0,0,0.2);
}

.hidden {
  display: none;
}

#unlockBtn {
  position: absolute;
  bottom: 40px;
  right: 20px;
  padding: 18px 50px;
  border-radius: 50px;
  border: 2px solid rgba(255,255,255,0.6);
  background: linear-gradient(135deg, #4dc3ff, #1e6fd9);
  color: #fff;
  font-size: 1.2rem;
  font-weight: bold;
  letter-spacing: 1.5px;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(30,144,255,0.6), inset 0 1px 3px rgba(255,255,255,0.4);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: glow 1.8s infinite ease-in-out;
}

#unlockBtn:hover {
  transform: scale(1.1) translateY(-3px);
  box-shadow: 0 12px 30px rgba(30,144,255,0.8);
}

@keyframes glow {
  0%, 100% { box-shadow: 0 8px 25px rgba(30,144,255,0.6), inset 0 1px 3px rgba(255,255,255,0.4); }
  50% { box-shadow: 0 8px 35px rgba(30,144,255,1), inset 0 1px 3px rgba(255,255,255,0.6); }
}
/* PAGE 2.0: WRONG PASSWORD */
#wrongPasswordPage {
  position: relative;
  overflow: hidden;
  flex-direction: column;
  align-items: center;
}

#wrongPasswordPage .full-bg {
  z-index: -1;
}
.oops-text {
  position: absolute;
  top: 18%;              /* pehle 28% tha — ab thoda upar */
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Lilita One', cursive;
  font-size: 7rem;
  font-weight: 900;
  color: #1a1a1a;
  text-shadow: 2px 3px 0 rgba(0,0,0,0.25);
  z-index: 1;
  white-space: nowrap;
  margin: 0;
}

.wrong-text {
  position: absolute;
  top: 38%;               /* thoda upar shift kiya taaki gap sahi rahe */
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Baloo 2', sans-serif;
  font-weight: 600;
  font-size: 2.8rem;       /* pehle 1.8rem tha — ab bada */
  color: #333;
  z-index: 1;
  white-space: nowrap;
  margin: 0;
}

.wrong-pic {
  position: absolute;
  top: 52%;                /* pehle 54% tha — thoda upar */
  left: 50%;
  transform: translateX(-50%);
  width: 230px;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  z-index: 1;
}

.try-again-btn {
  position: absolute;
  top: 86%;                /* pic aur button ke beech proper gap */
  left: 42%;
  transform: translateX(-50%);
  padding: 14px 50px;
  font-size: 2.6rem;
  font-family: 'Dancing Script', cursive;
  letter-spacing: 1.5px;
  color: #fff;
  background: linear-gradient(135deg, #ff6ec4, #7873f5, #4dc3ff);
  background-size: 200% 200%;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(120,115,245,0.5);
  animation: gradientMove 3s ease infinite, popIn 1.5s infinite ease-in-out;
  z-index: 1;
}

.try-again-btn:hover {
  transform: translateX(-50%) scale(1.1);
}

/* PAGE 2: SURPRISE PAGE */
#page2 {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.page2-stickers {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1;
  pointer-events: none;
}

.p2-sticker {
  position: absolute;
  animation: p2StickerFloat 4s infinite ease-in-out;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.25));
}

@keyframes p2StickerFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(6deg); }
}
.full-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

.curve-text-wrapper {
  position: relative;
  height: 160px;
  display: flex;
  justify-content: center;
  z-index: 1;
}

.curve-letter {
  font-size: 4rem;
  font-family: 'Lilita One', cursive;
  color: #fff;
  text-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 20px rgba(255,255,255,0.4);
  opacity: 0;
  animation: letterAppear 0.4s forwards, glowPulse 2s infinite alternate;
  position: absolute;
}

@keyframes letterAppear {
  from { opacity: 0; transform: translateY(20px) scale(0.5) rotate(var(--rot)); }
  to { opacity: 1; transform: translateY(0) scale(1) rotate(var(--rot)); }
}

@keyframes glowPulse {
  0% { text-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 15px rgba(255,255,255,0.3); }
  100% { text-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 30px rgba(255,255,255,0.8); }
}

.side-decor {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 40px;
  z-index: 1;
}

.left-decor { left: 40px; }
.right-decor { right: 40px; }

.sparkle {
  font-size: 1.6rem;
  color: rgba(255,255,255,0.8);
  animation: sparkleFloat 3s infinite ease-in-out;
  text-shadow: 0 0 15px rgba(255,255,255,0.6);
}

.sparkle:nth-child(1) { animation-delay: 0s; }
.sparkle:nth-child(2) { animation-delay: 0.4s; font-size: 1.3rem; }
.sparkle:nth-child(3) { animation-delay: 0.8s; }
.sparkle:nth-child(4) { animation-delay: 1.2s; font-size: 1.4rem; }
.sparkle:nth-child(5) { animation-delay: 1.6s; }

@keyframes sparkleFloat {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.7; }
  50% { transform: translateY(-15px) scale(1.15); opacity: 1; }
}

.surprise-video {
  width: 300px;
  height: 300px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 10px 35px rgba(0,0,0,0.5);
  border: 4px solid rgba(255,255,255,0.5);
  z-index: 1;
    margin-top: -35px;
}

.surprise-btn {
  padding: 16px 55px;
  font-size: 3.2rem;
  font-family: 'Dancing Script', cursive;
  letter-spacing: 1.5px;
  color: #fff;
  background: linear-gradient(135deg, #ff6ec4, #7873f5, #4dc3ff);
  background-size: 200% 200%;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(120,115,245,0.5);
  animation: gradientMove 3s ease infinite, popIn 1.5s infinite ease-in-out;
  z-index: 1;
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes popIn {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.surprise-btn:hover {
  transform: scale(1.15);
}

/* PAGE 3: OYEE PAGE */
#page3 {
  position: relative;
  overflow: hidden;
}

#page3 .full-bg {
  z-index: -2;
}

.corner-character {
  position: absolute;
  top: -2%;
  right: 0%;
  width: 20%;
  height: auto;
  max-height: 28%;
  object-fit: contain;
  z-index: 2;
  animation: slideInCorner 1s ease-out forwards;
  mix-blend-mode: multiply;
}

@keyframes slideInCorner {
  0% { transform: translate(60%, -60%) rotate(15deg); opacity: 0; }
  100% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
}

.oyee-text {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Lilita One', cursive;
  font-size: 8rem;
  color: #E53935;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.15);
  z-index: 1;
  white-space: nowrap;
  margin: 0;
}

.made-text {
  position: absolute;
  top: 28%;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Dancing Script', cursive;
  font-size: 4rem;
  font-weight: 600;
  color: #222222;
  z-index: 1;
  white-space: nowrap;
  margin: 0;
}

.see-text {
  position: absolute;
  top: 36%;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Dancing Script', cursive;
  font-size: 8rem;
  font-weight: 600;
  color: #FF7FA8;
  z-index: 1;
  white-space: nowrap;
  margin: 0;
}

.yn-buttons {
  position: absolute;
  top: 65%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 20%;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.yn-buttons.show {
  opacity: 1;
}

.yn-btn {
  width: 170px;
  height: 60px;
  border: none;
  border-radius: 50px;
  font-family: 'Dancing Script', cursive;
  font-weight: 600;
  font-size: 4rem;
  color: #fff;
  background-color: #FFB6C1;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(255,182,193,0.6);
  transition: transform 0.2s ease;
}

.yn-btn:hover {
  transform: scale(1.08);
}

.corner-character-left {
  position: absolute;
  bottom: -2%;
  left: 0%;
  width: 20%;
  height: auto;
  max-height: 28%;
  object-fit: contain;
  z-index: 2;
  mix-blend-mode: multiply;
  opacity: 0;
  animation: slideInLeft 1s ease-out forwards;
  animation-delay: 3.2s;
}

@keyframes slideInLeft {
  0% { transform: translate(-60%, 60%) rotate(-15deg); opacity: 0; }
  100% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
}

.page3-decor {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.p3-sparkle {
  position: absolute;
  font-size: 1.5rem;
  color: rgba(229,57,53,0.35);
  animation: p3Float 4s infinite ease-in-out;
}

.p3-sparkle:nth-child(1) { top: 12%; left: 8%; animation-delay: 0s; }
.p3-sparkle:nth-child(2) { top: 45%; left: 5%; animation-delay: 0.7s; font-size: 1.2rem; }
.p3-sparkle:nth-child(3) { top: 70%; left: 10%; animation-delay: 1.4s; }
.p3-sparkle:nth-child(4) { top: 25%; right: 6%; animation-delay: 2.1s; font-size: 1.3rem; }
.p3-sparkle:nth-child(5) { top: 50%; right: 10%; animation-delay: 2.8s; }
.p3-sparkle:nth-child(6) { top: 75%; right: 7%; animation-delay: 3.5s; font-size: 1.2rem; }

@keyframes p3Float {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.5; }
  50% { transform: translateY(-15px) scale(1.15); opacity: 0.9; }
}
/* PAGE 3.0: HOW DARE YOU */
#page3dot0 {
  position: relative;
  overflow: hidden;
  flex-direction: column;
  align-items: center;
}

#page3dot0 .full-bg {
  z-index: -1;
}

.dare-pic {
  position: absolute;
  top: 13%;
  left: 50%;
  transform: translateX(-50%);
  width: 340px;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 12px 35px rgba(0,0,0,0.4);
  z-index: 1;
}

.dare-text {
  position: absolute;
  top: 62%;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Lilita One', cursive;
  font-size: 5rem;
  font-weight: 900;
  color: #E53935;
  text-shadow: 3px 3px 0 rgba(0,0,0,0.3);
  z-index: 1;
  white-space: nowrap;
  margin: 0;
}

.dare-back-btn {
  position: absolute;
  top: 82%;
  left: 40%;
  transform: translateX(-50%);
  padding: 16px 55px;
  font-size: 3.2rem;
  font-family: 'Dancing Script', cursive;
  letter-spacing: 1.5px;
  color: #fff;
  background: linear-gradient(135deg, #ff6ec4, #7873f5, #4dc3ff);
  background-size: 200% 200%;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(120,115,245,0.5);
  animation: gradientMove 3s ease infinite, popIn 1.5s infinite ease-in-out;
  z-index: 1;
}

.dare-back-btn:hover {
  transform: translateX(-50%) scale(1.15);
}
/* PAGE 4: SPACE + TREE SCENE (tested and verified working) */
#page4 {
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at center, #1a1a3e 0%, #0b0c2a 60%, #050515 100%);
}

.stars-field {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1;
}

.tiny-star {
  position: absolute;
  color: #fff;
  animation: twinkle 3s infinite ease-in-out;
}

.big-star {
  position: absolute;
  color: #fffde7;
  text-shadow: 0 0 15px rgba(255,253,231,0.8);
  animation: twinkle 2.5s infinite ease-in-out;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.2); }
}

.click-heart-wrapper {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  text-align: center;
  cursor: pointer;
}

.click-heart {
  display: block;
  font-size: 4rem;
  color: #FF5C93;
  animation: heartPulse 1.2s infinite ease-in-out;
  filter: drop-shadow(0 0 15px rgba(255,92,147,0.7));
}

@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.click-heart-text {
  display: block;
  margin-top: 8px;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: #fff;
  opacity: 0.9;
}

.ground-line {
  position: absolute;
  bottom: 15%;
  left: 10%;
  width: 80%;
  height: 2px;
  background: rgba(255,255,255,0.7);
  border-radius: 2px;
  z-index: 2;
}

.falling-ball {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, #FF5C93);
  box-shadow: 0 0 15px rgba(255,92,147,0.8);
  z-index: 3;
}

.ball-fall {
  animation: ballFall 1.3s cubic-bezier(0.55, 0, 0.85, 0.35) forwards;
}

@keyframes ballFall {
  0% { top: 42%; transform: translateX(-50%) scale(1); opacity: 1; }
  85% { top: 83%; transform: translateX(-50%) scale(1); opacity: 1; }
  92% { top: 85%; transform: translateX(-50%) scale(1.3, 0.7); opacity: 1; }
  100% { top: 84%; transform: translateX(-50%) scale(0.5); opacity: 0; }
}

.tree-wrapper {
  position: absolute;
  bottom: 15%;
  left: 50%;
  transform: translateX(-50%);
  width: 640px;
  height: 680px;
  z-index: 2;
  transition: left 1.6s ease-in-out;
}

.tree-branches {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 2;
}

@keyframes branchGrow {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

.leaf-heart {
  position: absolute;
  font-size: 1.7rem;
  opacity: 0;
  z-index: 3;
  animation: leafAppear 0.4s ease-out forwards;
}

@keyframes leafAppear {
  from { opacity: 0; transform: scale(0); }
  to { opacity: 1; transform: scale(1); }
}

.leaves-falling {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 2;
  pointer-events: none;
}

.falling-leaf {
  position: absolute;
  font-size: 1.2rem;
  opacity: 0.9;
  animation: leafDrift 4.5s linear forwards;
}

@keyframes leafDrift {
  0% { transform: translate(0,0) rotate(0deg); opacity: 0.9; }
  100% { transform: translate(-50px, 320px) rotate(200deg); opacity: 0; }
}

.friend-heading {
  position: absolute;
  bottom: 33%;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Lilita One', cursive;
  font-size: 2.2rem;
  color: #fff;
  text-shadow: 0 0 20px rgba(255,213,106,0.6);
  z-index: 3;
  white-space: nowrap;
}

.next-btn {
  position: absolute;
  bottom: 6%;
  right: 6%;
  padding: 14px 40px;
  border: none;
  border-radius: 50px;
  background: linear-gradient(135deg, #FFD56A, #FF5C93);
  color: #fff;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(255,92,147,0.5);
  z-index: 3;
  transition: transform 0.2s ease;
}

.next-btn:hover {
  transform: scale(1.08);
}
.moon {
  position: absolute;
  top: -14%;
  right: -10%;
  width: 42vmax;
  height: 42vmax;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fffef2 0%, #fdf6d8 35%, #e8dfb0 65%, #cfc48f 100%);
  box-shadow: 0 0 150px 50px rgba(255,250,220,0.3), inset -50px -50px 90px rgba(0,0,0,0.18);
  z-index: 0;
}

.friend-counter {
  position: absolute;
  bottom: 17%;
  left: 34%;
  z-index: 3;
  text-align: left;
}

.counter-line {
  font-family: 'Lilita One', cursive;
  font-size: 1.6rem;
  color: #FFD56A;
  text-shadow: 0 0 18px rgba(255,213,106,0.7);
  white-space: nowrap;
}

.counter-suffix {
  font-family: 'Baloo 2', sans-serif;
  font-size: 0.75rem;
  color: #fff;
  opacity: 0.8;
  margin-top: 4px;
}

.quote-text {
  position: absolute;
  top: 48%;
  left: 6%;
  width: 32%;
  transform: translateY(-50%);
  font-family: 'Baloo 2', sans-serif;
  font-size: 0.8rem;
  line-height: 1.6;
  color: #fff;
  opacity: 0.9;
  z-index: 3;
  white-space: pre-line;
}
/* PAGE 5: BALLOON POP SCENE */
#page5 {
  position: relative;
  overflow: hidden;
  background: #c25da5;
}

#page5 .full-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: -1;
}

.page5-decor {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1;
  pointer-events: none;
}

.p5-sparkle {
  position: absolute;
  color: rgba(255,255,255,0.85);
  text-shadow: 0 0 12px rgba(255,255,255,0.6);
  animation: p5Twinkle 3s infinite ease-in-out;
}

.p5-heart-decor {
  position: absolute;
  opacity: 0.75;
  animation: p5Float 4s infinite ease-in-out;
}

@keyframes p5Twinkle {
  0%, 100% { opacity: 0.4; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.15); }
}

@keyframes p5Float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(8deg); }
}

.loading-heading {
  position: absolute;
  top: 6%;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Lilita One', cursive;
  font-size: 2.1rem;
  color: #fff;
  text-shadow: 0 0 20px rgba(255,213,106,0.6), 0 4px 12px rgba(0,0,0,0.4);
  z-index: 5;
  white-space: nowrap;
}

.balloons-field {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 2;
}

.balloon {
  position: absolute;
  bottom: -260px;
  width: 130px;
  height: 158px;
  cursor: pointer;
}

.balloon-body {
  width: 100%;
  height: 100%;
  background: var(--balloon-color, #FF6EC4);
  border-radius: 50% 50% 50% 50% / 58% 58% 42% 42%;
  position: relative;
  box-shadow: inset -16px -16px 26px rgba(0,0,0,0.15),
              inset 14px 14px 20px rgba(255,255,255,0.3),
              0 10px 26px rgba(0,0,0,0.25);
}

.balloon-body::after {
  content: '';
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 18px solid var(--balloon-color, #FF6EC4);
}

.balloon-string {
  position: absolute;
  bottom: -70px;
  left: 50%;
  width: 2px;
  height: 70px;
  background: rgba(255,255,255,0.5);
  transform: translateX(-50%);
}

.balloon-label {
  position: absolute;
  top: 46%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Baloo 2', sans-serif;
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0,0,0,0.35);
  pointer-events: none;
  white-space: nowrap;
}

@keyframes balloonRise {
  0%   { bottom: -260px; }
  100% { bottom: 115%; }
}

@keyframes balloonSway {
  0%, 100% { margin-left: 0; }
  50%      { margin-left: 26px; }
}

.balloon.rising {
  animation: balloonRise linear infinite, balloonSway ease-in-out infinite;
}

.balloon.popping {
  animation: none !important;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.pop-sparkle-burst {
  position: absolute;
  width: 1px;
  height: 1px;
  pointer-events: none;
  z-index: 4;
}

.pop-sparkle {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 1.5rem;
  opacity: 1;
  animation: sparkleBurst 0.9s ease-out forwards;
}

@keyframes sparkleBurst {
  0%   { transform: translate(-50%, -50%) scale(0.3) rotate(0deg); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.4) rotate(180deg); opacity: 0; }
}

.popped-photos {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 3;
  pointer-events: none;
}

.popped-photo-wrap {
  position: absolute;
  transform: translate(-50%, -50%);
  opacity: 0;
  animation: photoPopIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes photoPopIn {
  to { opacity: 1; }
}

.popped-photo-wrap img {
  display: block;
  width: 190px;
  height: auto;
  border: 4px solid rgba(255,255,255,0.85);
  box-shadow: 0 8px 25px rgba(0,0,0,0.35);
  border-radius: 8px;
}

.popped-photo-caption {
  position: absolute;
  top: 72%;
  left: 0;
  width: 100%;
  padding: 4px 10px;
  font-family: 'Baloo 2', sans-serif;
  font-size: 0.65rem;
  line-height: 1.35;
  color: #000;
  text-align: center;
  text-shadow: 0 1px 3px rgba(255,255,255,0.75), 0 0 4px rgba(255,255,255,0.5);
  white-space: pre-line;
}
/* PAGE 6: LETTER SEQUENCE */
#page6 {
  position: relative;
  overflow: hidden;
  align-items: flex-start;
  justify-content: flex-start;
  transition: background 0.6s ease;
}

.letter-stickers {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1;
  pointer-events: none;
}

.letter-sticker {
  position: absolute;
  opacity: 0.5;
  animation: letterStickerFloat 5s infinite ease-in-out;
}

@keyframes letterStickerFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(6deg); }
}

.bestie-heading {
  position: absolute;
  top: 6%;
  left: 6%;
  font-family: 'Dancing Script', cursive;
  font-size: 3.6rem;
  color: #1a1a1a;
  text-shadow: 0 2px 8px rgba(255,255,255,0.35);
  z-index: 20;
  white-space: nowrap;
  margin: 0;
}

.letter-text-wrap {
  position: absolute;
  top: 20%;
  left: 15%;
  width: 55%;
  z-index: 10;
}

.letter-text {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1.75;
  color: #1a1a1a;
  text-shadow: none;
  white-space: pre-line;
  text-align: left;
  margin: 0;
}

/* Dynamic corner decoration — JS positions this exactly where the text ends */
.corner-decor {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  transition: opacity 0.9s ease;
  pointer-events: none;
  z-index: 9;
}

.corner-decor.show { opacity: 1; }

.corner-line {
  position: absolute;
  background: linear-gradient(90deg, rgba(26,26,26,0.85), rgba(120,80,40,0.85));
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(0,0,0,0.2);
}

.corner-bow {
  position: absolute;
  font-size: 2.2rem;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
    transform: translate(-50%, -50%);
}

/* Named stickers (page-specific images) — slide-in system */
.named-sticker {
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.named-sticker.show-right { opacity: 1 !important; transform: translateX(0) rotate(0deg) !important; }
.named-sticker[style*="right"]:not(.show-right) { transform: translateX(60px) rotate(10deg); }
.named-sticker.show-left { opacity: 1 !important; transform: translateX(0) rotate(0deg) !important; }
.named-sticker[style*="left"]:not(.show-left) { transform: translateX(-60px) rotate(-10deg); }
.named-sticker.show-top { opacity: 1 !important; transform: translateY(0) rotate(0deg) !important; }
.named-sticker[style*="top"]:not(.show-top) { transform: translateY(-50px) rotate(-8deg); }
.named-sticker.show-bottom { opacity: 1 !important; transform: translateY(0) rotate(0deg) !important; }
.named-sticker[style*="bottom"]:not(.show-bottom) { transform: translateY(50px) rotate(8deg); }

.thread-repeat-wrap {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1;
  pointer-events: none;
}

.thread-repeat {
  position: absolute;
  opacity: 0;
  transition: opacity 1s ease;
}

.thread-repeat.show { opacity: 0.18; }

/* Big page8bg1.jpeg sticker — appears large on every letter page */
.big-page-sticker {
  position: absolute;
  width: 560px;        /* pehle 480px tha */
  max-width: 48%;       /* pehle 42% tha */
  height: auto;
  z-index: 2;
  opacity: 0;
  transform: scale(0.85) rotate(4deg);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.big-page-sticker.show {
  opacity: 0.95;
  transform: scale(1) rotate(0deg);
}
/* PAGE 10: FINAL MESSAGE */
#page10 {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at center, #fbd7e6 0%, #f4a9c6 45%, #e6799f 100%);
}

.page10-heart-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 40vmax;
  color: #fff;
  opacity: 0.12;
  z-index: 0;
  pointer-events: none;
  line-height: 1;
}

.page10-bow-decor {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

.p10-bow, .p10-hand {
  position: absolute;
  opacity: 0.5;
}

.page10-photo-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  width: 30%;
  opacity: 0;
  z-index: 2;
  transition: opacity 1s ease, transform 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.page10-photo-wrap.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.page10-photo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.page10-corner-sticker {
  position: absolute;
  top: -12%;
  right: -10%;
  width: 34%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
  z-index: 3;
  transform: rotate(6deg);
}

.page10-text {
  position: absolute;
  left: 48%;
  top: 28%;
  width: 42%;
  max-height: 55%;
  margin: 0;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 500;
  font-size: 1.15rem;
  line-height: 1.7;
  color: #ffffff;
  white-space: pre-line;
  overflow-wrap: break-word;
  z-index: 5;
  text-shadow: 0 2px 10px rgba(0,0,0,0.35);
}
.page10-big-sticker {
  position: absolute;
  bottom: 4%;
  left: 3%;
  width: 400px;
  max-width: 36%;
  height: auto;
  z-index: 2;
  opacity: 0;
  transform: scale(0.85) rotate(-4deg);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 10px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

.page10-big-sticker.show {
  opacity: 0.95;
  transform: scale(1) rotate(0deg);
}

.page10-corner-tl {
  position: absolute;
  top: 4%;
  left: 3%;
  width: 170px;
  max-width: 18%;
  height: auto;
  z-index: 3;
  opacity: 0;
  transform: translateY(-40px) rotate(-8deg);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}

.page10-corner-tl.show {
  opacity: 1;
  transform: translateY(0) rotate(0deg);
}

.page10-side-right {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%) translateX(40px);
  height: 72%;
  width: auto;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}

.page10-side-right.show {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}
.page10-end-btn {
  position: absolute;
  bottom: 5%;
  right: 5%;
  padding: 14px 42px;
  border: none;
  border-radius: 50px;
  background: linear-gradient(135deg, #FFD56A, #FF5C93);
  color: #fff;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(255,92,147,0.5);
  z-index: 6;
  transition: transform 0.2s ease;
}

.page10-end-btn:hover {
  transform: scale(1.08);
}