@import url('https://fonts.googleapis.com/css2?family=Pacifico&family=Quicksand:wght@500;600;700&family=Dancing+Script:wght@600;700&display=swap');

:root {
  --pink: #ff6eb4;
  --pink-light: #ffb3d9;
  --pink-pale: #fff0f7;
  --cream: #fff8f0;
  --deep-pink: #6a1b9a; /* Royal Purple */
  --text-dark: #4a148c; /* Dark Purple */
  
  --font-head: 'Pacifico', cursive;
  --font-sub: 'Dancing Script', cursive;
  --font-body: 'Quicksand', sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: var(--font-body);
  font-weight: 500;
  background: var(--cream);
  overflow-x: hidden;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ctext y='20' font-size='20'%3E🎀%3C/text%3E%3C/svg%3E") 12 12, auto;
}

/* ══ SPLASH ══ */
#splash {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #ffe4f0 0%, #ffd6ec 25%, #f9c6e3 55%, #fce4ff 100%);
  cursor: pointer;
}
#splash::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 15% 20%, rgba(255,182,215,0.6) 0%, transparent 55%),
              radial-gradient(ellipse at 85% 75%, rgba(232,199,245,0.6) 0%, transparent 55%);
  pointer-events: none;
}
#splash::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 14px;
  background: repeating-linear-gradient(90deg, var(--pink) 0px, var(--pink) 20px, var(--pink-light) 20px, var(--pink-light) 40px);
}
.splash-ribbon-bottom {
  position: absolute; bottom: 0; left: 0; right: 0; height: 14px;
  background: repeating-linear-gradient(90deg, var(--pink-light) 0px, var(--pink-light) 20px, var(--pink) 20px, var(--pink) 40px);
}
.splash-particles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.sp { position: absolute; font-size: 1.6rem; animation: spFloat linear infinite; opacity: 0; }
@keyframes spFloat {
  0%   { transform: translateY(110vh) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.65; } 90% { opacity: 0.65; }
  100% { transform: translateY(-10vh) rotate(360deg); opacity: 0; }
}
.splash-inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; padding: 20px; }
.splash-bow { font-size: 5rem; animation: bowBounce 2s ease-in-out infinite; filter: drop-shadow(0 8px 20px rgba(233,30,140,0.35)); }
@keyframes bowBounce {
  0%, 100% { transform: translateY(0) scale(1) rotate(-6deg); }
  50%       { transform: translateY(-18px) scale(1.08) rotate(6deg); }
}
.splash-title { font-family: var(--font-head); font-size: clamp(2rem, 8vw, 4.2rem); color: var(--deep-pink); text-shadow: 2px 2px 0 rgba(255,215,0,0.8), 4px 4px 0 rgba(106,27,154,0.3); animation: popIn 0.9s cubic-bezier(0.34,1.56,0.64,1) both; line-height: 1.4; padding: 0 10px; }
.splash-sub { font-family: var(--font-sub); font-size: clamp(1.4rem, 4.5vw, 2.2rem); color: var(--text-dark); font-weight: 700; letter-spacing: 1px; animation: popIn 0.9s 0.2s cubic-bezier(0.34,1.56,0.64,1) both; }
@keyframes popIn { from { transform: scale(0.4) rotate(-10deg); opacity: 0; } to { transform: scale(1) rotate(0deg); opacity: 1; } }
.splash-hearts { font-size: 2.4rem; letter-spacing: 12px; filter: drop-shadow(0 3px 6px rgba(74,20,140,0.5)); animation: popIn 0.9s 0.35s cubic-bezier(0.34,1.56,0.64,1) both; }
.splash-btn {
  margin-top: 10px; padding: 18px 50px;
  font-family: var(--font-head); font-size: clamp(1.1rem, 3vw, 1.5rem);
  color: white; background: linear-gradient(135deg, var(--pink), var(--deep-pink));
  border: none; border-radius: 60px; cursor: pointer;
  box-shadow: 0 8px 30px rgba(233,30,140,0.45), 0 2px 0 rgba(255,255,255,0.3) inset;
  animation: popIn 0.9s 0.5s cubic-bezier(0.34,1.56,0.64,1) both, btnPulse 2s 1.5s ease-in-out infinite;
  position: relative; overflow: hidden;
}
.splash-btn::after { content: ''; position: absolute; top: 0; left: -100%; width: 60%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent); animation: shimmer 2.5s 2s infinite; }
@keyframes shimmer { 0% { left: -100%; } 100% { left: 160%; } }
@keyframes btnPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
.splash-hint { font-size: 0.8rem; color: #c2185b; opacity: 0.7; font-weight: 600; letter-spacing: 1px; animation: popIn 0.9s 0.7s ease both; }
#splash.hide { animation: splashOut 0.8s cubic-bezier(0.4,0,0.2,1) forwards; }
@keyframes splashOut { 0% { opacity: 1; transform: scale(1); } 60% { opacity: 1; transform: scale(1.04); } 100% { opacity: 0; transform: scale(1.12); pointer-events: none; } }

.song-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  max-width: 320px;
}
.puzzle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 10px auto;
}
.btn-base {
  width: 70px; height: 70px; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-size: 1.8rem; cursor: pointer; border: none; outline: none;
  transition: all 0.3s ease; margin: 0 auto;
}

/* Neon Glow Style */
.style-neon { 
  background: #1a1a2e; 
  padding: 30px; 
  border-radius: 20px; 
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.style-neon .btn-base {
  background: transparent;
  border: 2px solid #ff2e93;
  border-radius: 12px;
  color: #ff2e93;
  box-shadow: 0 0 10px #ff2e93, inset 0 0 10px #ff2e93;
  text-shadow: 0 0 5px #ff2e93;
  animation: popIn 0.5s ease both;
}
.style-neon .btn-base:hover {
  background: #ff2e93;
  color: #1a1a2e;
  box-shadow: 0 0 25px #ff2e93, inset 0 0 15px #ff2e93;
  transform: scale(1.1) translateY(-4px);
}
.style-neon .btn-base:active {
  transform: scale(0.95);
}

.shake {
  animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}
  animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}
@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* ══ PARTICLES ══ */
.particles { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; overflow: hidden; }
.particle { position: absolute; font-size: 1.4rem; animation: floatUp linear infinite; opacity: 0.7; }
@keyframes floatUp {
  0%   { transform: translateY(110vh) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.7; } 90% { opacity: 0.7; }
  100% { transform: translateY(-10vh) rotate(360deg); opacity: 0; }
}

/* ══ HERO ══ */
.hero {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, #ffe4f0 0%, #ffd6ec 30%, #f9c6e3 60%, #fce4ff 100%);
  overflow: hidden; padding: 40px 20px;
}
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 20% 30%, rgba(255,182,215,0.5) 0%, transparent 60%), radial-gradient(ellipse at 80% 70%, rgba(232,199,245,0.5) 0%, transparent 60%); }
.ribbon-top { position: absolute; top: 0; left: 0; right: 0; height: 12px; background: repeating-linear-gradient(90deg, var(--pink) 0px, var(--pink) 20px, var(--pink-light) 20px, var(--pink-light) 40px); }
.hero-content { position: relative; z-index: 2; }
.crown { font-size: 4.5rem; display: block; animation: bounce 1.5s ease-in-out infinite; margin-bottom: 10px; filter: drop-shadow(0 5px 10px rgba(74,20,140,0.4)); }
@keyframes bounce { 0%, 100% { transform: translateY(0) rotate(-5deg); } 50% { transform: translateY(-15px) rotate(5deg); } }
.hero h1 { font-family: var(--font-head); font-size: clamp(2.5rem, 8vw, 5.5rem); color: var(--deep-pink); text-shadow: 2px 2px 0 rgba(255,215,0,0.9), 5px 5px 0 rgba(106,27,154,0.25); line-height: 1.4; animation: popIn 0.8s cubic-bezier(0.34,1.56,0.64,1) both; }
.hero h2 { font-family: var(--font-sub); font-size: clamp(1.6rem, 5vw, 3.2rem); color: var(--text-dark); font-weight: 700; letter-spacing: 1px; margin-top: 8px; animation: slideUp 0.8s 0.3s ease both; }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.hearts-row { margin: 20px 0; font-size: 2.8rem; letter-spacing: 15px; filter: drop-shadow(0 3px 6px rgba(74,20,140,0.5)); animation: slideUp 0.8s 0.5s ease both; }

/* ══ COUNTDOWN ══ */
.countdown-section { position: relative; z-index: 2; margin-top: 30px; animation: slideUp 0.8s 0.7s ease both; }
.countdown-label { font-size: 0.9rem; font-weight: 700; color: var(--deep-pink); text-transform: uppercase; letter-spacing: 3px; margin-bottom: 12px; }
.countdown-boxes { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.countdown-box { background: white; border: 3px solid var(--pink-light); border-radius: 20px; padding: 14px 18px; min-width: 80px; box-shadow: 0 8px 20px rgba(255,110,180,0.2), inset 0 1px 0 rgba(255,255,255,0.8); transition: transform 0.3s; }
.countdown-box:hover { transform: translateY(-5px) rotate(2deg); }
.countdown-num { font-family: var(--font-head); font-size: 2.2rem; color: var(--deep-pink); display: block; line-height: 1; }
.countdown-unit { font-size: 0.7rem; font-weight: 700; color: var(--pink); text-transform: uppercase; letter-spacing: 2px; }
.birthday-now { font-family: var(--font-head); font-size: 1.8rem; color: var(--deep-pink); animation: pulse 1s infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }

/* ══ MUSIC PLAYER ══ */
.music-player { position: fixed; bottom: 24px; right: 24px; z-index: 100; display: flex; align-items: center; gap: 12px; background: white; border: 3px solid var(--pink-light); border-radius: 50px; padding: 10px 20px 10px 10px; box-shadow: 0 8px 30px rgba(255,110,180,0.3); }
.music-btn { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--pink), var(--deep-pink)); border: none; cursor: pointer; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; transition: transform 0.2s; box-shadow: 0 4px 12px rgba(233,30,140,0.4); }
.music-btn:hover { transform: scale(1.1); }
.music-info { line-height: 1.2; }
.music-title { font-weight: 700; font-size: 0.85rem; color: var(--deep-pink); }
.music-artist { font-size: 0.72rem; color: #aaa; }
.music-wave { display: flex; gap: 3px; align-items: center; }
.music-wave span { display: block; width: 3px; background: var(--pink); border-radius: 3px; animation: wave 0.8s ease-in-out infinite; }
.music-wave span:nth-child(1) { height: 8px;  animation-delay: 0s; }
.music-wave span:nth-child(2) { height: 16px; animation-delay: 0.15s; }
.music-wave span:nth-child(3) { height: 12px; animation-delay: 0.3s; }
.music-wave span:nth-child(4) { height: 20px; animation-delay: 0.1s; }
.music-wave span:nth-child(5) { height: 10px; animation-delay: 0.25s; }
@keyframes wave { 0%, 100% { transform: scaleY(0.4); } 50% { transform: scaleY(1); } }
.music-wave.paused span { animation-play-state: paused; }

.next-song-btn { width: 30px; height: 30px; border-radius: 50%; background: transparent; border: 2px solid var(--pink-light); cursor: pointer; font-size: 0.8rem; display: flex; align-items: center; justify-content: center; color: var(--deep-pink); transition: all 0.2s; }
.next-song-btn:hover { background: var(--pink-light); transform: scale(1.1); }

/* ══ PHOTOS ══ */
.photos-section { position: relative; z-index: 1; padding: 80px 20px; background: linear-gradient(180deg, #ffe4f0, #fff0f7); text-align: center; }
.section-title { font-family: var(--font-head); font-size: clamp(1.8rem, 5vw, 3rem); color: var(--deep-pink); text-shadow: 1px 1px 0 rgba(255,215,0,0.8), 2px 2px 0 rgba(106,27,154,0.2); margin-bottom: 12px; }
.section-subtitle { font-size: 1.1rem; font-weight: 600; color: var(--text-dark); margin-bottom: 40px; letter-spacing: 0.5px; }
.photos-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px; max-width: 1200px; margin: 0 auto; }

.photo-card {
  position: relative;
  background: white;
  border-radius: 24px;
  padding: 12px 12px 36px;
  box-shadow: 0 12px 40px rgba(255,110,180,0.2);
  transform: rotate(var(--rot));
  transition: transform 0.3s, box-shadow 0.3s;
  border: 3px solid var(--pink-pale);
}
.photo-card:hover { transform: rotate(0deg) scale(1.06); box-shadow: 0 20px 50px rgba(255,110,180,0.35); z-index: 5; }

/* Dynamic sizing based on aspect ratio */
.card-3x4 { width: 220px; }
.card-3x4 img { height: 293px; }

.card-9x16 { width: 240px; max-width: 90vw; }
.card-9x16 img { height: 426px; max-height: 70vh; }

.card-1x1 { width: 260px; max-width: 90vw; }
.card-1x1 img { height: 260px; }

@media (max-width: 480px) {
  .card-9x16 { width: 260px; max-width: 88vw; }
  .card-9x16 img { height: 460px; max-height: 65vh; }
  .photos-grid { gap: 20px; }
}

.photo-card img {
  width: 100%;
  object-fit: cover;
  border-radius: 16px;
  display: block;
}
.photo-caption { margin-top: 10px; font-family: var(--font-sub); font-size: 1.2rem; font-weight: 700; color: var(--text-dark); text-align: center; }
.photo-sticker { position: absolute; top: -12px; right: -12px; font-size: 1.8rem; animation: spin 4s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ══ MESSAGE ══ */
.message-section { position: relative; z-index: 1; padding: 80px 20px; background: linear-gradient(135deg, #fce4ff 0%, #ffe4f0 100%); text-align: center; }
.message-card { max-width: 720px; margin: 0 auto; background: white; border-radius: 32px; padding: 50px 40px; box-shadow: 0 20px 60px rgba(255,110,180,0.18); border: 3px solid var(--pink-light); position: relative; overflow: hidden; }
.message-card::before { content: '💌'; position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 2.5rem; filter: drop-shadow(0 4px 8px rgba(255,110,180,0.3)); }
.message-card::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at top right, rgba(255,182,215,0.15), transparent 60%), radial-gradient(ellipse at bottom left, rgba(232,199,245,0.15), transparent 60%); pointer-events: none; }
.message-text { font-size: clamp(1.1rem, 2.5vw, 1.25rem); line-height: 1.9; color: #5a3a4a; font-weight: 600; text-align: left; position: relative; z-index: 1; }

/* ══ CAKE ══ */
.cake-section { padding: 70px 20px; text-align: center; background: linear-gradient(180deg, #fff0f7, #ffe4f0); position: relative; overflow: hidden; }
.wish-text { font-family: var(--font-sub); font-size: clamp(1.6rem, 4.5vw, 2.5rem); font-weight: 700; color: var(--text-dark); margin-top: 20px; max-width: 600px; margin-left: auto; margin-right: auto; line-height: 1.5; }

/* ══ INTERACTIVE CAKE ══ */
.interactive-cake-container { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 320px; padding-top: 30px; }
.css-cake { position: relative; width: 220px; height: 180px; margin-top: 40px; opacity: 0; transition: opacity 0.5s ease; pointer-events: none; }
.css-cake.visible { opacity: 1; pointer-events: auto; }

.cake-tier { position: absolute; left: 50%; transform: translateX(-50%); }

.cake-bottom {
  width: 180px; height: 65px; bottom: 0;
  background: #ff7eb3;
  border-bottom-left-radius: 90px 25px;
  border-bottom-right-radius: 90px 25px;
  box-shadow: 0 20px 30px rgba(255, 126, 179, 0.4);
}
.cake-bottom::before {
  content: ''; position: absolute; top: -25px; left: 0; width: 180px; height: 50px;
  background: #ff9a9e; border-radius: 50%; box-shadow: inset 0 -5px 15px rgba(0,0,0,0.08);
}

.cake-middle {
  width: 130px; height: 55px; bottom: 75px;
  background: #a18cd1;
  border-bottom-left-radius: 65px 20px;
  border-bottom-right-radius: 65px 20px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}
.cake-middle::before {
  content: ''; position: absolute; top: -20px; left: 0; width: 130px; height: 40px;
  background: #fbc2eb; border-radius: 50%; box-shadow: inset 0 -5px 15px rgba(0,0,0,0.08);
}

.cake-top {
  width: 90px; height: 50px; bottom: 140px;
  background: #ff9a44;
  border-bottom-left-radius: 45px 15px;
  border-bottom-right-radius: 45px 15px;
  box-shadow: 0 10px 15px rgba(0,0,0,0.15);
}
.cake-top::before {
  content: ''; position: absolute; top: -15px; left: 0; width: 90px; height: 30px;
  background: #fc6076; border-radius: 50%; box-shadow: inset 0 -5px 10px rgba(0,0,0,0.08);
}

.candle { position: absolute; width: 10px; height: 35px; background: linear-gradient(to right, #fff, #ffb6d7, #fff); border-radius: 5px; border: 1px solid #ff7eb3; box-shadow: 0 4px 6px rgba(0,0,0,0.1); z-index: 2; }
.c1 { left: 15%; } .c2 { left: 45%; top: -35px; } .c3 { right: 15%; }
.flame { position: absolute; width: 12px; height: 20px; background: #ffd700; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; top: -25px; left: -4px; box-shadow: 0 0 15px #ffd700, 0 0 30px #ff8c00; animation: flicker 0.1s infinite alternate; transition: all 0.5s ease; }
@keyframes flicker { 0% { transform: scale(1) rotate(-1deg); opacity: 0.9; } 100% { transform: scale(1.1) rotate(1deg); opacity: 1; } }
.flame.blown-out { opacity: 0; transform: scale(0) translateY(-20px); box-shadow: none; animation: none; }

footer { background: linear-gradient(135deg, #f9c6e3, #e8c7f5); text-align: center; padding: 30px 20px; font-family: var(--font-sub); font-size: 1.4rem; font-weight: 700; color: var(--text-dark); letter-spacing: 1px; }

.confetti-piece { position: fixed; pointer-events: none; z-index: 9999; animation: confettiFall 2s ease-in forwards; }
@keyframes confettiFall { 0% { transform: translateY(0) rotate(0deg); opacity: 1; } 100% { transform: translateY(100vh) rotate(720deg); opacity: 0; } }
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ══ BALLOON & FLOWER EXPLOSION ANIMATIONS ══ */
.num-pop {
  animation: numScalePop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes numScalePop {
  0% { transform: scale(1.5); color: #ff2e93; }
  100% { transform: scale(1); }
}

.box-pop-out {
  animation: boxPopOut 0.35s ease forwards;
}
@keyframes boxPopOut {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.8; }
  100% { transform: scale(0); opacity: 0; }
}

.banner-pop-in {
  animation: bannerPopIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes bannerPopIn {
  0% { transform: scale(0.2) rotate(-8deg); opacity: 0; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.pop-burst-element {
  position: fixed;
  pointer-events: none;
  z-index: 99999;
  filter: drop-shadow(0 5px 15px rgba(255,110,180,0.5));
  animation: burstFly 1.6s cubic-bezier(0.15, 0.85, 0.35, 1.2) forwards;
}
@keyframes burstFly {
  0% {
    transform: translate(-50%, -50%) scale(0.1) rotate(0deg);
    opacity: 1;
  }
  30% {
    opacity: 1;
  }
  100% {
    transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1.4) rotate(var(--rot));
    opacity: 0;
  }
}
