/* =========================================================
   Happy Birthday — Mrs. Buggu Ji
   Romantic, elegant, fully responsive theme
   ========================================================= */

:root {
  --pink: #ff6fa5;
  --pink-soft: #ffd6e7;
  --pink-deep: #e84d86;
  --red: #ff3b6b;
  --gold: #f6c453;
  --gold-deep: #d9a531;
  --white: #fff7fb;
  --ink: #5a2a3d;
  --ink-soft: #8a5a6e;

  --bg-gradient: linear-gradient(160deg, #fff0f6 0%, #ffe3ee 45%, #ffeede 100%);
  --shadow-soft: 0 18px 50px rgba(232, 77, 134, 0.18);
  --radius: 22px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 0;
}

body {
  font-family: "Poppins", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg-gradient);
  background-attachment: fixed;
  overflow-x: hidden;
  line-height: 1.7;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- Headings ---------- */
.script-heading {
  font-family: "Great Vibes", cursive;
  font-size: clamp(2.4rem, 6vw, 4rem);
  color: var(--pink-deep);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

/* ---------- Floating hearts (global) ---------- */
.floating-hearts {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.floating-hearts span {
  position: absolute;
  bottom: -40px;
  font-size: 1.4rem;
  opacity: 0;
  animation: floatUp linear infinite;
  will-change: transform, opacity;
}
@keyframes floatUp {
  0%   { transform: translateY(0) scale(0.6) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.9; }
  90%  { opacity: 0.7; }
  100% { transform: translateY(-110vh) scale(1.1) rotate(40deg); opacity: 0; }
}

/* ---------- Music toggle ---------- */
.music-toggle {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 60;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 1.4rem;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(6px);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.music-toggle:hover { transform: scale(1.1) rotate(8deg); }
.music-toggle.playing .music-icon {
  display: inline-block;
  animation: spin 4s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Nav dots ---------- */
.nav-dots {
  position: fixed;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.nav-dots .dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: rgba(232, 77, 134, 0.35);
  transition: all 0.3s ease;
  position: relative;
}
.nav-dots .dot.active { background: var(--pink-deep); transform: scale(1.5); }
.nav-dots .dot::after {
  content: attr(data-label);
  position: absolute;
  right: 22px; top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  color: var(--pink-deep);
  background: rgba(255,255,255,0.9);
  padding: 2px 8px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.nav-dots .dot:hover::after { opacity: 1; }
@media (max-width: 640px) { .nav-dots { display: none; } }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Buttons ---------- */
.btn-glow {
  display: inline-block;
  margin-top: 1.6rem;
  padding: 0.9rem 2.2rem;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(120deg, var(--pink), var(--red));
  box-shadow: 0 10px 30px rgba(255, 59, 107, 0.45);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: pulseGlow 2.6s ease-in-out infinite;
}
.btn-glow:hover { transform: translateY(-3px) scale(1.04); }
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 10px 30px rgba(255, 59, 107, 0.4); }
  50%      { box-shadow: 0 14px 44px rgba(246, 196, 83, 0.65); }
}

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 4rem;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  width: 70vmax; height: 70vmax;
  top: -20%; left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255,111,165,0.45), rgba(246,196,83,0.18) 40%, transparent 70%);
  filter: blur(40px);
  animation: breathe 7s ease-in-out infinite;
  z-index: 0;
}
@keyframes breathe {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.8; }
  50%      { transform: translateX(-50%) scale(1.15); opacity: 1; }
}
.roses {
  position: absolute; inset: 0;
  pointer-events: none; z-index: 1;
}
.roses span {
  position: absolute;
  font-size: 2rem;
  opacity: 0.5;
  animation: sway 6s ease-in-out infinite;
}
.roses span:nth-child(1) { top: 12%; left: 8%;  animation-delay: 0s; }
.roses span:nth-child(2) { top: 22%; right: 10%; animation-delay: 1.2s; }
.roses span:nth-child(3) { bottom: 18%; left: 12%; animation-delay: 2.4s; }
.roses span:nth-child(4) { bottom: 14%; right: 9%; animation-delay: 0.8s; }
@keyframes sway {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50%      { transform: translateY(-16px) rotate(8deg); }
}

.hero-content { position: relative; z-index: 2; max-width: 760px; }
.hero-eyebrow {
  font-family: "Dancing Script", cursive;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--gold-deep);
  margin-bottom: 0.6rem;
}
.hero-title {
  font-family: "Dancing Script", cursive;
  font-weight: 700;
  font-size: clamp(2.6rem, 8vw, 5rem);
  line-height: 1.05;
  color: var(--ink);
  text-shadow: 0 4px 18px rgba(232,77,134,0.18);
}
.hero-title .accent {
  background: linear-gradient(120deg, var(--pink-deep), var(--red), var(--gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-subtext {
  margin-top: 1.4rem;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: var(--ink-soft);
}

.scroll-cue {
  position: absolute;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 44px;
  border: 2px solid var(--pink-deep);
  border-radius: 14px;
  z-index: 3;
}
.scroll-cue span {
  position: absolute;
  top: 8px; left: 50%;
  transform: translateX(-50%);
  width: 5px; height: 8px;
  border-radius: 4px;
  background: var(--pink-deep);
  animation: scrollDot 1.6s ease-in-out infinite;
}
@keyframes scrollDot {
  0% { opacity: 0; top: 8px; }
  40% { opacity: 1; }
  100% { opacity: 0; top: 26px; }
}

/* ============ SECTIONS ============ */
.section {
  position: relative;
  z-index: 2;
  padding: 6rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}
.section-head { text-align: center; margin-bottom: 3rem; }
.section-sub { color: var(--ink-soft); font-size: 1.05rem; }

/* ---------- Gallery ---------- */
.upload-btn {
  display: inline-block;
  margin-top: 1.4rem;
  padding: 0.7rem 1.6rem;
  border-radius: 50px;
  background: #fff;
  color: var(--pink-deep);
  font-weight: 500;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  border: 2px dashed var(--pink);
  transition: transform 0.2s ease, background 0.2s ease;
}
.upload-btn:hover { transform: translateY(-2px); background: var(--pink-soft); }
.upload-hint {
  margin-top: 0.8rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.upload-hint code {
  background: rgba(232,77,134,0.1);
  padding: 1px 6px;
  border-radius: 6px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.4rem;
}
.photo-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  background: #fff;
  aspect-ratio: 4 / 5;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.photo-card:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 26px 60px rgba(232,77,134,0.3); }
.photo-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.photo-card:hover img { transform: scale(1.08); }
.photo-card img.placeholder {
  /* shown when an image is missing */
  object-fit: contain;
  background:
    radial-gradient(circle at 30% 30%, var(--pink-soft), transparent 60%),
    linear-gradient(135deg, #ffe3ee, #fff7fb);
}
.photo-card img.placeholder::after { content: ""; }
.photo-card figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.4rem 1rem 0.9rem;
  color: #fff;
  font-family: "Dancing Script", cursive;
  font-size: 1.25rem;
  text-align: center;
  background: linear-gradient(transparent, rgba(232,77,134,0.85));
  transform: translateY(8px);
  opacity: 0;
  transition: all 0.35s ease;
}
.photo-card:hover figcaption { transform: none; opacity: 1; }

/* Placeholder helper text for empty images */
.photo-card img.placeholder + figcaption,
.photo-card:has(img.placeholder) figcaption { opacity: 1; transform: none; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(60, 20, 35, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 80;
  padding: 2rem;
}
.lightbox.open { display: flex; animation: fadeIn 0.3s ease; }
.lightbox img {
  max-width: 92vw;
  max-height: 86vh;
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.lightbox-close {
  position: absolute;
  top: 20px; right: 26px;
  background: none; border: none;
  color: #fff; font-size: 2rem;
  cursor: pointer;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Love message ---------- */
.message-section { display: flex; justify-content: center; }
.message-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  padding: clamp(2rem, 5vw, 3.5rem);
  box-shadow: var(--shadow-soft);
  max-width: 760px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.6);
}
.typed {
  font-family: "Dancing Script", cursive;
  font-size: clamp(1.3rem, 3.5vw, 1.9rem);
  color: var(--pink-deep);
  min-height: 2.4em;
  margin-bottom: 1.5rem;
}
.typed::after {
  content: "|";
  animation: blink 1s step-end infinite;
  color: var(--red);
}
.typed.done::after { content: ""; }
@keyframes blink { 50% { opacity: 0; } }

.letter p {
  margin-bottom: 1.1rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.letter.show p { opacity: 1; transform: none; }
.letter.show p:nth-child(2) { transition-delay: 0.25s; }
.letter.show p:nth-child(3) { transition-delay: 0.5s; }
.letter.show p:nth-child(4) { transition-delay: 0.75s; }
.letter-sign {
  font-family: "Dancing Script", cursive;
  font-size: 1.3rem !important;
  color: var(--pink-deep) !important;
}
.sign-name { color: var(--red); font-weight: 600; }

/* ---------- Quiz ---------- */
.quiz-section { display: flex; justify-content: center; }
.quiz-card {
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  padding: clamp(2rem, 5vw, 3.5rem);
  box-shadow: var(--shadow-soft);
  max-width: 640px;
  width: 100%;
  text-align: center;
}
.quiz-progress {
  height: 8px;
  background: var(--pink-soft);
  border-radius: 10px;
  overflow: hidden;
  margin: 1.6rem 0 2rem;
}
.quiz-progress-bar {
  height: 100%;
  width: 0;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--pink), var(--gold));
  transition: width 0.5s ease;
}
.quiz-question {
  font-family: "Dancing Script", cursive;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  color: var(--ink);
  min-height: 2.4em;
  margin-bottom: 1.6rem;
}
.quiz-buttons {
  position: relative;
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  flex-wrap: wrap;
  min-height: 60px;
}
.btn-yes, .btn-no {
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 50px;
  font-size: 1.05rem;
  font-weight: 500;
  cursor: pointer;
  font-family: "Poppins", sans-serif;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-yes {
  color: #fff;
  background: linear-gradient(120deg, var(--pink), var(--red));
  box-shadow: 0 8px 22px rgba(255,59,107,0.4);
}
.btn-yes:hover { transform: scale(1.08); }
.btn-no {
  color: var(--ink-soft);
  background: #fff;
  border: 2px solid var(--pink-soft);
}
.btn-no.runaway { position: absolute; transition: all 0.25s ease; }
.quiz-reaction {
  margin-top: 1.4rem;
  font-family: "Dancing Script", cursive;
  font-size: 1.3rem;
  color: var(--pink-deep);
  min-height: 1.6em;
}

/* ============ CELEBRATION ============ */
.celebration {
  position: fixed; inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: radial-gradient(circle at center, rgba(255,240,246,0.96), rgba(255,220,235,0.98));
  overflow: hidden;
  padding: 2rem;
}
.celebration.open { display: flex; animation: fadeIn 0.5s ease; }
#confettiCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.celebration-message {
  position: relative;
  z-index: 2;
  max-width: 700px;
}
.celebration-message p {
  font-size: clamp(1.05rem, 2.6vw, 1.4rem);
  color: var(--ink);
  margin-top: 1rem;
  line-height: 2;
}
.celebrate-title {
  font-family: "Great Vibes", cursive;
  font-size: clamp(2.6rem, 8vw, 5rem);
  color: var(--pink-deep);
  font-weight: 400;
  animation: popHeart 1s ease;
}
@keyframes popHeart {
  0% { transform: scale(0.4); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}
.reveal-now { animation: fadeIn 0.8s ease 0.3s both; }

/* Balloons */
.balloons { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.balloon {
  position: absolute;
  bottom: -160px;
  width: 54px; height: 68px;
  border-radius: 50%;
  opacity: 0.9;
  animation: balloonUp ease-in forwards;
}
.balloon::after {
  content: "";
  position: absolute;
  bottom: -10px; left: 50%;
  width: 1px; height: 60px;
  background: rgba(0,0,0,0.15);
  transform: translateX(-50%);
}
@keyframes balloonUp {
  0% { transform: translateY(0) rotate(-4deg); opacity: 0; }
  10% { opacity: 0.95; }
  100% { transform: translateY(-120vh) rotate(6deg); opacity: 0; }
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--ink-soft);
  font-family: "Dancing Script", cursive;
  font-size: 1.2rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .section { padding: 4.5rem 1.2rem; }
  .music-toggle { width: 46px; height: 46px; font-size: 1.2rem; }
  .quiz-buttons { gap: 0.8rem; }
}
