/* ===========================
   ROOT & RESET
=========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blush:    #f7c5d5;
  --rose:     #e87fa0;
  --deep:     #c24d7a;
  --lavender: #c9aee6;
  --lilac:    #e8d8f8;
  --sky:      #d0ecf8;
  --mint:     #c8f0e4;
  --gold:     #f7d97a;
  --cream:    #fff8f2;
  --text:     #4a2a45;
  --soft:     #9b6b8a;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Quicksand', sans-serif;
  background: var(--cream);
  color: var(--text);
  overflow-x: hidden;
}

/* ===========================
   PARTICLES
=========================== */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.4;
  animation: floatUp linear infinite;
}

@keyframes floatUp {
  0%   { transform: translateY(110vh) scale(0.5) rotate(0deg); opacity: 0.3; }
  50%  { opacity: 0.6; }
  100% { transform: translateY(-10vh)  scale(1.2) rotate(360deg); opacity: 0; }
}

/* ===========================
   HERO SECTION
=========================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(160deg, #fce4f0 0%, #ede0ff 40%, #d8f0ff 100%);
  z-index: 1;
}

/* Twinkling stars */
.stars { position: absolute; inset: 0; pointer-events: none; }
.star {
  position: absolute;
  width: 4px; height: 4px;
  background: white;
  border-radius: 50%;
  animation: twinkle ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.8); }
}

/* Dreamy clouds */
.clouds { position: absolute; bottom: 0; width: 100%; pointer-events: none; }
.cloud {
  position: absolute;
  bottom: 0;
  border-radius: 50%;
  background: white;
  opacity: 0.55;
  filter: blur(30px);
  animation: cloudDrift ease-in-out infinite alternate;
}
.c1 { width: 500px; height: 120px; left: -100px; animation-duration: 8s; }
.c2 { width: 400px; height: 100px; left: 35%; bottom: 20px; animation-duration: 11s; }
.c3 { width: 350px; height: 90px;  right: -60px; animation-duration: 9s; }
@keyframes cloudDrift {
  from { transform: translateX(0); }
  to   { transform: translateX(30px); }
}

/* Hero Content */
.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem;
  animation: fadeInUp 1.2s ease both;
}

.pre-title {
  font-family: 'Quicksand', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--deep);
  margin-bottom: 1.5rem;
  animation: fadeInUp 1s ease 0.3s both;
}

.main-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.8rem, 8vw, 6rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  animation: fadeInUp 1s ease 0.5s both;
}

.name {
  display: block;
  font-style: italic;
  background: linear-gradient(135deg, var(--rose), var(--deep), var(--lavender));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: clamp(3.5rem, 10vw, 7.5rem);
  filter: drop-shadow(0 4px 20px rgba(200,80,130,0.25));
}

/* Date Badge */
.date-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(232, 127, 160, 0.4);
  border-radius: 60px;
  padding: 0.55rem 1.6rem;
  margin: 1.2rem auto;
  box-shadow: 0 8px 30px rgba(200,80,150,0.15);
  animation: fadeInUp 1s ease 0.65s both;
}

.date-day {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--deep);
  line-height: 1;
}

.date-month {
  font-family: 'Quicksand', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--rose);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-top: 0.3rem;
}

.subtitle {
  font-size: 1.15rem;
  color: var(--soft);
  margin-top: 1.2rem;
  font-weight: 500;
  animation: fadeInUp 1s ease 0.7s both;
}

.scroll-hint {
  margin-top: 2.5rem;
  font-size: 0.85rem;
  color: var(--rose);
  letter-spacing: 0.2em;
  animation: bounce 2s ease-in-out infinite, fadeInUp 1s ease 1s both;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(8px); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===========================
   MESSAGE SECTION
=========================== */
.message-section {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, #ede0ff 0%, #fff0f7 100%);
  padding: 6rem 2rem;
  text-align: center;
}

.section-inner { max-width: 760px; margin: 0 auto; }

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--deep);
  margin: 1.5rem 0 2.5rem;
}

.deco-line {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--blush), var(--lavender), transparent);
  border-radius: 2px;
}

.message-card {
  background: white;
  border-radius: 28px;
  padding: 3rem 3.5rem;
  margin: 2rem 0;
  position: relative;
  box-shadow: 0 20px 60px rgba(200, 80, 150, 0.1), 0 4px 20px rgba(180,100,220,0.07);
  border: 1px solid rgba(230,200,240,0.6);
  text-align: left;
  line-height: 1.9;
  font-size: 1.05rem;
  color: var(--text);
  animation: cardReveal 0.8s ease 0.3s both;
}

@keyframes cardReveal {
  from { opacity: 0; transform: scale(0.96) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.quote-mark {
  font-family: 'Playfair Display', serif;
  font-size: 5rem;
  color: var(--blush);
  line-height: 0.5;
  display: block;
  margin-bottom: 1rem;
}
.quote-mark.closing {
  text-align: right;
  margin-top: 1rem;
  margin-bottom: 0;
}

/* ===========================
   WISHES SECTION
=========================== */
.wishes-section {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, #fff0f7 0%, #e8f7ff 100%);
  padding: 6rem 2rem;
  text-align: center;
}

.wishes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.8rem;
  max-width: 1000px;
  margin: 3rem auto 0;
}

.wish-card {
  background: white;
  border-radius: 24px;
  padding: 2.2rem 1.8rem;
  box-shadow: 0 10px 35px rgba(200,80,150,0.08);
  border: 1px solid rgba(220,190,240,0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: wishReveal 0.7s ease var(--delay) both;
  cursor: default;
}

.wish-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 50px rgba(200,80,150,0.15);
}

@keyframes wishReveal {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.wish-icon {
  font-size: 2.4rem;
  margin-bottom: 1rem;
  display: block;
  animation: iconFloat 3s ease-in-out infinite;
}
@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-5px); }
}

.wish-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--deep);
  margin-bottom: 0.7rem;
}

.wish-card p {
  font-size: 0.93rem;
  color: var(--soft);
  line-height: 1.7;
}

/* ===========================
   FOOTER
=========================== */
.footer {
  position: relative;
  z-index: 1;
  background: linear-gradient(160deg, #f0d8f5, #fce4f0, #d8f0ff);
  text-align: center;
  padding: 5rem 2rem 4rem;
  overflow: hidden;
}

.balloons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.balloon {
  font-size: 3rem;
  animation: balFloat ease-in-out infinite alternate;
}
.b1 { animation-duration: 2.5s; }
.b2 { animation-duration: 3s;   animation-delay: 0.3s; }
.b3 { animation-duration: 2.8s; animation-delay: 0.6s; }
@keyframes balFloat {
  from { transform: translateY(0) rotate(-5deg); }
  to   { transform: translateY(-18px) rotate(5deg); }
}

.footer-name {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  background: linear-gradient(135deg, var(--rose), var(--deep), var(--lavender));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-msg {
  font-size: 1.1rem;
  color: var(--soft);
  margin: 0.8rem 0 0.4rem;
}

.footer-sub {
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  color: var(--rose);
  margin-top: 1.5rem;
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 600px) {
  .message-card { padding: 2rem 1.5rem; }
  .wishes-grid  { grid-template-columns: 1fr; }
}

/* ===========================
   FIREWORKS CANVAS
=========================== */
#fxCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  width: 100%;
  height: 100%;
}

/* ===========================
   INTERACTIVE SECTION
=========================== */
.interactive-section {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, #e8f7ff 0%, #f5e8ff 100%);
  padding: 6rem 2rem 5rem;
  text-align: center;
  overflow: hidden;
}

.interactive-sub {
  color: var(--soft);
  font-size: 1rem;
  margin-top: -1rem;
  margin-bottom: 3rem;
  letter-spacing: 0.05em;
}

.btn-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.3rem;
  max-width: 820px;
  margin: 0 auto 3rem;
}

.joy-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 150px;
  height: 150px;
  border: none;
  border-radius: 28px;
  cursor: pointer;
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: transform 0.2s cubic-bezier(.34,1.56,.64,1), box-shadow 0.2s ease;
  overflow: hidden;
  outline: none;
}

.joy-btn:hover  { transform: translateY(-6px) scale(1.05); }
.joy-btn:active { transform: scale(0.95); }

.btn-icon  { font-size: 2.6rem; line-height: 1; display: block; }
.btn-label { font-size: 0.8rem; font-weight: 700; }

.btn-confetti  { background: linear-gradient(135deg, #fce4f0, #f7c5d5); color: var(--deep);  box-shadow: 0 10px 30px rgba(200,80,150,0.25); }
.btn-hearts    { background: linear-gradient(135deg, #ffd6e7, #ffb3cc); color: #b5004e;       box-shadow: 0 10px 30px rgba(255,100,150,0.3); }
.btn-fireworks { background: linear-gradient(135deg, #e0d0ff, #c9aee6); color: #5a1a9b;       box-shadow: 0 10px 30px rgba(160,100,230,0.3); }
.btn-wish      { background: linear-gradient(135deg, #d8f0ff, #b8e4ff); color: #1a6b9b;       box-shadow: 0 10px 30px rgba(80,160,230,0.25); }
.btn-dance     { background: linear-gradient(135deg, #fff0c0, #ffd97a); color: #7a5000;       box-shadow: 0 10px 30px rgba(240,180,30,0.3); }
.btn-cake      { background: linear-gradient(135deg, #c8f0e4, #a0e8cc); color: #0a6645;       box-shadow: 0 10px 30px rgba(50,200,130,0.25); }

.joy-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.5) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}
.joy-btn:hover::after { transform: translateX(100%); }

/* ===========================
   WISH POPUP
=========================== */
.wish-popup {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(80,40,100,0.45);
  backdrop-filter: blur(8px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}
.wish-popup.active { display: flex; animation: popupFadeIn 0.3s ease; }

@keyframes popupFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.wish-popup-inner {
  background: white;
  border-radius: 32px;
  padding: 3rem 2.5rem;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 30px 80px rgba(180,80,200,0.25);
  animation: popupBounce 0.4s cubic-bezier(.34,1.56,.64,1);
}
@keyframes popupBounce {
  from { transform: scale(0.7); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.wish-popup-emoji { font-size: 3.5rem; margin-bottom: 1rem; }

#wishText {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.wish-close {
  background: linear-gradient(135deg, var(--rose), var(--deep));
  color: white;
  border: none;
  border-radius: 50px;
  padding: 0.6rem 1.8rem;
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.wish-close:hover { transform: scale(1.05); box-shadow: 0 6px 20px rgba(200,80,150,0.35); }

/* ===========================
   CAKE DISPLAY
=========================== */
.cake-display {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.5rem;
  animation: fadeInUp 0.5s ease;
}
.cake-display.visible { display: flex; }

.candle-row {
  display: flex;
  gap: 0.5rem;
  font-size: 2.2rem;
  justify-content: center;
}

.flame {
  display: inline-block;
  transition: opacity 0.4s ease, transform 0.4s ease;
  animation: flickerFlame 0.5s ease-in-out infinite alternate;
}
.flame.out {
  opacity: 0;
  transform: scale(0.2);
  animation: none;
}

@keyframes flickerFlame {
  from { transform: rotate(-5deg) scale(1); }
  to   { transform: rotate(5deg) scale(1.1); }
}

.cake-emoji { font-size: 4rem; }

.cake-msg {
  font-size: 1rem;
  color: var(--soft);
  font-weight: 600;
  margin-top: 0.4rem;
}

/* Party flash */
body.party-mode {
  animation: partyFlash 0.25s ease infinite alternate;
}
@keyframes partyFlash {
  from { filter: hue-rotate(0deg) brightness(1); }
  to   { filter: hue-rotate(40deg) brightness(1.1); }
}

/* Burst emoji */
.burst-emoji {
  position: fixed;
  font-size: 1.8rem;
  pointer-events: none;
  z-index: 9998;
  animation: burstFly 1.4s ease forwards;
}
@keyframes burstFly {
  0%   { opacity: 1; transform: translate(0,0) scale(1) rotate(0deg); }
  100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(0.3) rotate(var(--rot)); }
}

@media (max-width: 600px) {
  .joy-btn { width: 120px; height: 120px; }
  .btn-icon { font-size: 2rem; }
}

/* ===========================
   INTRO SCREEN
=========================== */
.hidden {
  display: none !important;
}

.intro-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: radial-gradient(circle at top, rgba(255, 192, 203, 0.35), transparent 35%),
              linear-gradient(180deg, #2f0f66 0%, #0b0320 100%);
  color: #fff;
}

.intro-inner {
  width: min(100%, 560px);
  text-align: center;
  padding: 3rem 2rem;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(16px);
}

.intro-note {
  margin-bottom: 1rem;
  font-size: 1rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.9;
}

.intro-title {
  margin-bottom: 2rem;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.05;
}

.launch-btn {
  border: none;
  border-radius: 999px;
  padding: 1rem 2.4rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #23063b;
  background: linear-gradient(135deg, #ff9de4, #ffd86b);
  cursor: pointer;
  box-shadow: 0 18px 40px rgba(255, 116, 214, 0.25);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.launch-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 48px rgba(255, 116, 214, 0.35);
}
/* ===========================
   CLOSE PAGE BUTTON
=========================== */
.footer .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding: 0.9rem 2.8rem;
  background: linear-gradient(135deg, var(--blush), var(--lavender), var(--gold));
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(200, 80, 150, 0.3), 0 2px 8px rgba(201, 174, 230, 0.25);
  transition: transform 0.2s cubic-bezier(.34,1.56,.64,1), box-shadow 0.2s ease;
  outline: none;
}

.footer .btn:hover {
  transform: translateY(-5px) scale(1.06);
  box-shadow: 0 16px 40px rgba(200, 80, 150, 0.4), 0 4px 16px rgba(201, 174, 230, 0.35);
}

.footer .btn:active {
  transform: scale(0.94);
}

.footer .btn .btn-label {
  font-family: 'Quicksand', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  text-shadow: 0 1px 6px rgba(160, 60, 120, 0.35);
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}