/* ═══════════════════════════════════════════════
   BIRTHDAY SITE — Main Styles
═══════════════════════════════════════════════ */

:root {
  --pk:  #FF5E9C;
  --spk: #FFD6E7;
  --lav: #C9B6FF;
  --pur: #A685E2;
  --sky: #BEEBFF;
  --mint:#D9FAD3;
  --yel: #FFD95A;
  --pch: #FFC7A8;
  --crm: #FFF8F2;
  --txt: #3A3A3A;
  --acc: #FF7EB6;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  font-family: 'Poppins', sans-serif;
  color: var(--txt);
  cursor: none;
  background: var(--crm);
}

/* ════════════════ PAGES ════════════════ */
.page {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .5s cubic-bezier(.4,0,.2,1), transform .5s cubic-bezier(.4,0,.2,1);
  transform: translateY(28px);
  z-index: 10;
  overflow: hidden;
  padding: 16px 20px;
}
.page.active  { opacity: 1; pointer-events: all; transform: translateY(0); }
.page.out-up  { opacity: 0; transform: translateY(-28px); }
.page.out-dn  { opacity: 0; transform: translateY(28px); }

/* Page bg gradients */
#p0 { background: linear-gradient(140deg, #fff0f8, #f3eeff 50%, #e8f7ff); }
#p1 { background: linear-gradient(140deg, #ffeef6, #f5f0ff); }
#p2 { background: linear-gradient(140deg, #f0fff4, #e8f4ff); }
#p3 { background: linear-gradient(140deg, #fffbea, #fff0f8); }
#p4 { background: linear-gradient(140deg, #f0f8ff, #f9f0ff); }
#p5 { background: linear-gradient(140deg, #fff0f8, #f0fff4); }
#p6 { background: radial-gradient(ellipse at 50% 40%, #fff0f8, #f3eeff, #e8f7ff); }

/* ════════════════ BACKGROUND FLOATERS ════════════════ */
.float-bg {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 1; overflow: hidden;
}
.fb {
  position: absolute;
  animation: fbUp linear infinite;
}
@keyframes fbUp {
  0%   { transform: translateY(110vh) rotate(0deg);  opacity: .6; }
  100% { transform: translateY(-15vh) rotate(18deg); opacity: 0;  }
}

/* ════════════════ CURSOR ════════════════ */
#cur {
  position: fixed;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--pk);
  pointer-events: none;
  z-index: 999999;
  transform: translate(-50%, -50%);
  mix-blend-mode: multiply;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: transform .06s;
}
.tdot {
  position: fixed; border-radius: 50%;
  pointer-events: none; z-index: 999998;
  animation: tdFade .6s forwards;
}
@keyframes tdFade {
  0%   { opacity: .7; transform: scale(1); }
  100% { opacity: 0;  transform: scale(0); }
}

/* ════════════════ LOADER ════════════════ */
#loader {
  position: fixed; inset: 0; z-index: 100000;
  background: linear-gradient(135deg, var(--spk), var(--lav), var(--sky));
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 14px;
  transition: opacity .8s, transform .8s;
}
.lnum {
  font-family: 'Chewy', cursive;
  font-size: 5.5rem; color: #fff;
  text-shadow: 3px 3px 0 var(--pk); line-height: 1;
}
.lcake { font-size: 4.5rem; animation: bce .7s ease infinite alternate; }
@keyframes bce { from { transform: translateY(0); } to { transform: translateY(-16px); } }
.ltxt { font-family: 'Baloo 2', cursive; font-size: 1.3rem; color: var(--pk); }
.lbar { width: 200px; height: 10px; background: rgba(255,255,255,.4); border-radius: 999px; overflow: hidden; }
.lf   { height: 100%; background: linear-gradient(90deg, var(--pk), var(--pur)); border-radius: 999px; animation: lp 2.7s ease forwards; }
@keyframes lp { from { width: 0; } to { width: 100%; } }

/* ════════════════ MUSIC BUTTON ════════════════ */
#mBtn {
  position: fixed; bottom: 26px; right: 26px;
  width: 54px; height: 54px;
  border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--pk), var(--pur));
  box-shadow: 0 4px 18px rgba(255,94,156,.4);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  transition: transform .3s;
}
#mBtn:hover { transform: scale(1.12); }
.mbars { display: flex; align-items: flex-end; gap: 3px; height: 18px; }
.mb {
  width: 4px; background: #fff; border-radius: 2px;
  animation: mba .8s ease infinite alternate;
}
.mb:nth-child(1) { height: 7px;  animation-delay: 0s;   }
.mb:nth-child(2) { height: 15px; animation-delay: .2s;  }
.mb:nth-child(3) { height: 9px;  animation-delay: .1s;  }
.mb:nth-child(4) { height: 13px; animation-delay: .3s;  }
.mb:nth-child(5) { height: 5px;  animation-delay: .15s; }
@keyframes mba { from { transform: scaleY(.3); } to { transform: scaleY(1); } }
#mBtn.paused .mb { animation: none; height: 9px; }

/* ════════════════ SIDE DOTS NAV ════════════════ */
#dots {
  position: fixed; right: 16px; top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column;
  gap: 9px; z-index: 9998;
}
.dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--spk); border: 2px solid var(--pk);
  cursor: pointer; transition: all .3s;
}
.dot.on { background: var(--pk); transform: scale(1.45); }

/* ════════════════ TOAST ════════════════ */
#toast {
  position: fixed; bottom: 96px; left: 50%;
  transform: translateX(-50%) translateY(14px);
  background: #fff; border-radius: 18px;
  padding: 11px 22px;
  box-shadow: 0 8px 28px rgba(0,0,0,.11);
  border: 2px solid var(--spk);
  font-family: 'Fredoka', cursive; font-size: 1rem;
  opacity: 0; transition: all .4s;
  z-index: 99997; pointer-events: none; white-space: nowrap;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ════════════════ CONFETTI CANVAS ════════════════ */
#cvc { position: fixed; inset: 0; pointer-events: none; z-index: 99990; }

/* ════════════════ COMMON ════════════════ */
.ptitle {
  font-family: 'Chewy', cursive;
  font-size: clamp(2rem, 5.5vw, 3.8rem);
  background: linear-gradient(135deg, var(--pk), var(--pur));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  text-align: center; line-height: 1.15; margin-bottom: 6px;
}
.psub {
  font-family: 'Caveat', cursive;
  font-size: clamp(1rem, 2.4vw, 1.4rem);
  color: var(--pur); text-align: center; margin-bottom: 20px;
}
.btn {
  background: linear-gradient(135deg, var(--pk), #FF9AC5);
  color: #fff; border: none;
  padding: 13px 34px; border-radius: 999px;
  font-family: 'Fredoka', cursive; font-size: 1.1rem; font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(255,94,156,.33), 3px 3px 0 rgba(0,0,0,.07);
  transition: all .3s; display: inline-block;
}
.btn:hover { transform: translateY(-3px) scale(1.04); }
.btng {
  background: transparent; border: 2px solid var(--pk); color: var(--pk);
  padding: 10px 28px; border-radius: 999px;
  font-family: 'Fredoka', cursive; font-size: .95rem;
  cursor: pointer; transition: all .3s;
}
.btng:hover { background: var(--spk); }
.nav-row {
  display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
}
.eyebrow {
  font-family: 'Fredoka', cursive; font-size: .82rem;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--acc); text-align: center;
  margin-bottom: 5px; display: block;
}
.deco {
  position: absolute; pointer-events: none;
  opacity: .12; font-size: 2rem;
  animation: df 5s ease-in-out infinite alternate;
}
@keyframes df {
  from { transform: translateY(0) rotate(0deg); }
  to   { transform: translateY(-13px) rotate(12deg); }
}

/* ════════════════ PAGE 0: HERO ════════════════ */
.h-emoji {
  font-size: clamp(4.5rem, 13vw, 9rem);
  animation: hfl 3s ease-in-out infinite;
  display: block; margin-bottom: 8px;
  filter: drop-shadow(0 12px 28px rgba(255,94,156,.25));
}
@keyframes hfl { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }
.h-main {
  font-family: 'Chewy', cursive;
  font-size: clamp(2.8rem, 9vw, 6.5rem);
  background: linear-gradient(135deg, var(--pk), var(--pur));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  line-height: 1.05;
}
.h-name {
  font-family: 'Chewy', cursive;
  font-size: clamp(3rem, 10vw, 7rem);
  color: var(--yel);
  -webkit-text-stroke: 3px var(--pk);
  text-shadow: 4px 4px 0 var(--pk);
  animation: nw 2.5s ease-in-out infinite;
  cursor: pointer; line-height: 1;
}
@keyframes nw {
  0%,100% { transform: rotate(-2deg) scale(1); }
  50%      { transform: rotate(2deg) scale(1.02); }
}
.badge {
  background: linear-gradient(135deg, var(--yel), var(--pch));
  padding: 6px 20px; border-radius: 999px;
  font-family: 'Fredoka', cursive; font-size: .88rem; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase;
  box-shadow: 3px 3px 0 rgba(0,0,0,.1);
  display: inline-block; margin-bottom: 14px;
}

/* ════════════════ PAGE 1: POLAROIDS ════════════════ */
.polwrap {
  display: flex; flex-wrap: wrap;
  gap: 18px; justify-content: center; max-width: 820px;
}
.pol {
  background: #fff;
  padding: 11px 11px 38px;
  box-shadow: 5px 5px 16px rgba(0,0,0,.11);
  transform: rotate(var(--r));
  transition: all .4s cubic-bezier(.34,1.56,.64,1);
  cursor: pointer;
  animation: pp .6s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes pp {
  from { opacity: 0; transform: scale(.5) rotate(var(--r)); }
  to   { opacity: 1; transform: scale(1) rotate(var(--r)); }
}
.pol:hover {
  transform: rotate(0deg) scale(1.09) translateY(-8px);
  box-shadow: 10px 12px 34px rgba(0,0,0,.18), 0 0 0 4px var(--spk);
  z-index: 10;
}
.polimg {
  width: 140px; height: 122px;
  background: linear-gradient(135deg, var(--spk), var(--lav));
  display: flex; align-items: center; justify-content: center;
  font-size: 3.2rem; border-radius: 2px;
}
.polcap {
  font-family: 'Caveat', cursive; font-size: .9rem;
  text-align: center; margin-top: 7px; line-height: 1.3;
}

/* ════════════════ PAGE 2: MEMORY WALL ════════════════ */
.memwrap {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px; max-width: 580px; width: 100%;
}
.mc {
  position: relative; border-radius: 16px; overflow: hidden;
  aspect-ratio: 2 / 3; cursor: pointer;
  box-shadow: 4px 4px 0 var(--lav), 0 7px 24px rgba(0,0,0,.09);
  border: 3px solid #fff;
  transition: all .4s cubic-bezier(.34,1.56,.64,1);
  animation: mca .5s ease both;
}
@keyframes mca {
  from { opacity: 0; transform: scale(.86) translateY(18px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.mc:hover {
  transform: scale(1.05) rotate(1deg);
  box-shadow: 6px 6px 0 var(--pk), 0 14px 36px rgba(0,0,0,.14);
  z-index: 10;
}
.mc img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .4s;
}
.mc:hover img { transform: scale(1.06); }

/* Overlay on hover */
.mc-ov {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(255,94,156,.78));
  opacity: 0; transition: opacity .3s;
  display: flex; align-items: flex-end; padding: 12px;
}
.mc:hover .mc-ov { opacity: 1; }
.mc-lbl {
  font-family: 'Caveat', cursive;
  color: #fff; font-size: .95rem; font-weight: 600;
}

/* Missing photo placeholder */
.mc-missing {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--spk), var(--lav));
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px; padding: 12px;
}
.mc-missing span  { font-size: 2.5rem; opacity: .5; }
.mc-missing p     { font-family: 'Fredoka', cursive; font-size: .82rem; color: var(--pur); text-align: center; font-weight: 500; }
.mc-missing small { font-size: .72rem; color: #aaa; text-align: center; }

/* ════════════════ PAGE 3: CHALLENGES ════════════════ */
.chlgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 14px; max-width: 860px; width: 100%;
}
.chlcard {
  background: #fff; border-radius: 18px;
  padding: 22px 14px; text-align: center;
  cursor: pointer;
  border: 3px dashed var(--lav);
  transition: all .3s; animation: mca .5s ease both;
  position: relative; overflow: hidden;
}
.chlcard::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--lav), var(--sky));
  opacity: 0; transition: opacity .3s;
}
.chlcard:hover { transform: translateY(-5px); border-style: solid; box-shadow: 0 9px 24px rgba(0,0,0,.08); }
.chlcard.rev::before { opacity: .13; }
.ci  { font-size: 2.2rem; margin-bottom: 10px; position: relative; z-index: 1; }
.ct  { font-family: 'Fredoka', cursive; font-size: .96rem; font-weight: 500; position: relative; z-index: 1; line-height: 1.35; }
.tap { font-size: .76rem; color: #bbb; margin-top: 6px; position: relative; z-index: 1; }
.back { display: none; }
.chlcard.rev .front { display: none; }
.chlcard.rev .back  { display: block; }

/* ════════════════ PAGE 4: REASONS ════════════════ */
.rnum {
  font-family: 'Chewy', cursive;
  font-size: clamp(4.5rem, 16vw, 8rem);
  color: var(--pk); line-height: 1;
  text-shadow: 4px 4px 0 var(--spk);
}
.rtxt {
  font-family: 'Baloo 2', cursive;
  font-size: clamp(1.1rem, 2.8vw, 1.65rem);
  font-weight: 700; color: var(--pur);
  min-height: 58px; text-align: center;
  animation: rfa .5s ease;
  max-width: 560px;
}
@keyframes rfa {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.rbar {
  max-width: 440px; width: 90%;
  height: 9px; background: var(--spk);
  border-radius: 999px;
  margin: 10px auto 18px;
  overflow: hidden;
}
.rbarf {
  height: 100%;
  background: linear-gradient(90deg, var(--pk), var(--lav));
  border-radius: 999px;
  transition: width 1s ease;
}

/* ════════════════ PAGE 5: LOVE NOTES ════════════════ */
.notesgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 14px; max-width: 900px; width: 100%;
  max-height: 62vh; overflow-y: auto;
  padding: 4px 4px 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--pk) var(--spk);
}
.sn {
  padding: 20px 14px;
  border-radius: 4px 12px 12px 4px;
  font-family: 'Caveat', cursive; font-size: 1rem; line-height: 1.5;
  box-shadow: 4px 4px 12px rgba(0,0,0,.08);
  transform: rotate(var(--nr));
  transition: all .3s; cursor: pointer;
  position: relative;
  animation: snp .5s cubic-bezier(.34,1.56,.64,1) both;
}
.sn::before {
  content: '📌'; position: absolute;
  top: -9px; left: 50%; transform: translateX(-50%);
  font-size: 1rem;
}
.sn:hover {
  transform: rotate(0deg) scale(1.04) translateY(-4px);
  z-index: 10; box-shadow: 7px 7px 22px rgba(0,0,0,.14);
}
@keyframes snp {
  from { opacity: 0; transform: scale(.7) rotate(var(--nr)); }
  to   { opacity: 1; transform: scale(1) rotate(var(--nr)); }
}

/* ════════════════ PAGE 6: FINAL ════════════════ */
.fheart {
  font-size: clamp(3.5rem, 11vw, 6.5rem);
  animation: hfl 2s ease-in-out infinite;
  display: block; margin-bottom: 8px;
}
.fmsg {
  font-family: 'Caveat', cursive;
  font-size: clamp(1.3rem, 3.2vw, 2rem);
  line-height: 1.65; color: var(--pur);
  max-width: 640px; text-align: center;
  text-shadow: 1px 1px 0 rgba(255,255,255,.8);
}
.fsign {
  font-family: 'Caveat', cursive;
  font-size: clamp(1rem, 2.2vw, 1.4rem);
  color: var(--pk); margin-top: 10px;
}
.femojis {
  display: flex; gap: 12px; justify-content: center;
  flex-wrap: wrap; margin-top: 16px;
  font-size: clamp(1.7rem, 4.5vw, 2.8rem);
}
.fe { animation: hfl 2s ease-in-out infinite; }

/* ════════════════ NAME MODAL ════════════════ */
#nmM {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.44); z-index: 99996;
  align-items: center; justify-content: center;
}
#nmM.open { display: flex; }
.nmi {
  background: #fff; border-radius: 22px;
  padding: 32px; text-align: center;
  max-width: 320px; width: 90%;
  box-shadow: 0 20px 56px rgba(0,0,0,.16);
  animation: cardPop .4s ease;
}
@keyframes cardPop {
  from { opacity: 0; transform: scale(.85) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.nmT  { font-family: 'Baloo 2', cursive; font-size: 1.35rem; font-weight: 700; color: var(--pk); margin-bottom: 12px; }
.nmIn {
  width: 100%; padding: 10px 14px;
  border: 2px solid var(--spk); border-radius: 11px;
  font-family: 'Poppins', sans-serif; font-size: 1rem;
  outline: none; margin-bottom: 12px;
}
.nmIn:focus  { border-color: var(--pk); }
.nmBtn {
  width: 100%;
  background: linear-gradient(135deg, var(--pk), #FF9AC5);
  color: #fff; border: none;
  padding: 11px; border-radius: 999px;
  font-family: 'Fredoka', cursive; font-size: 1rem; cursor: pointer;
}

/* ════════════════ LIGHTBOX ════════════════ */
#lb {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.87); z-index: 99995;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 12px;
}
#lb.open { display: flex; }
#lb img {
  max-width: 88vw; max-height: 76vh;
  border-radius: 13px; border: 4px solid #fff;
  box-shadow: 0 20px 56px rgba(255,94,156,.22);
}
#lbCl {
  position: absolute; top: 18px; right: 22px;
  color: #fff; font-size: 1.7rem;
  background: none; border: none; cursor: pointer;
  transition: transform .3s;
}
#lbCl:hover { transform: rotate(90deg) scale(1.2); }
.lbnav { display: flex; gap: 14px; }
.lbB {
  background: rgba(255,255,255,.18); border: 2px solid #fff;
  color: #fff; width: 44px; height: 44px;
  border-radius: 50%; cursor: pointer; font-size: 1.2rem;
  transition: all .3s;
}
.lbB:hover { background: var(--pk); border-color: var(--pk); }

/* ════════════════ RESPONSIVE ════════════════ */
@media (max-width: 580px) {
  .polwrap   { gap: 12px; }
  .polimg    { width: 116px; height: 102px; }
  .memwrap   { max-width: 360px; gap: 10px; }
  .chlgrid   { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .notesgrid { grid-template-columns: repeat(2, 1fr); }
}
