@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;500;600;700;800&family=Pacifico&display=swap');

:root {
  --pink: #ff5fa2;
  --deep-pink: #e83e8c;
  --purple: #8458d8;
  --cream: #fffaf2;
  --ink: #66345f;
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 34px 16px 22px;
  color: var(--ink);
  font-family: 'Baloo 2', 'Trebuchet MS', sans-serif;
  background:
    radial-gradient(circle at 12% 15%, #fff6a9 0 5%, transparent 18%),
    radial-gradient(circle at 90% 20%, #ffd5e7 0 7%, transparent 21%),
    radial-gradient(circle at 10% 90%, #c9f5e8 0 6%, transparent 22%),
    linear-gradient(135deg, #b5efff, #ffe0ef 48%, #fff1bd);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .4;
  background-image: radial-gradient(#fff 1.5px, transparent 1.5px);
  background-size: 26px 26px;
}
.sky { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.balloon {
  position: absolute;
  font-size: clamp(38px, 6vw, 72px);
  filter: drop-shadow(0 8px 5px #9c6e8b33);
  animation: balloonFloat 7s ease-in-out infinite;
}
.balloon-1 { left: 3%; top: 16%; animation-delay: -1s; }
.balloon-2 { right: 5%; top: 12%; animation-delay: -3s; }
.balloon-3 { left: 7%; bottom: 13%; animation-delay: -4.5s; }
.balloon-4 { right: 7%; bottom: 15%; animation-delay: -2s; }
.floating { position: absolute; animation: bob 4.5s ease-in-out infinite; }
.flower { font-size: clamp(25px, 4vw, 42px); }
.flower-1 { left: 18%; top: 7%; animation-delay: -.5s; }
.flower-2 { right: 19%; top: 7%; animation-delay: -2s; }
.flower-3 { left: 18%; bottom: 7%; animation-delay: -1.4s; }
.flower-4 { right: 18%; bottom: 7%; animation-delay: -3s; }
.sparkle { font-size: 30px; }
.sparkle-1 { left: 9%; top: 48%; animation: twinkle 1.8s infinite; }
.sparkle-2 { right: 10%; top: 48%; animation: twinkle 2.2s infinite .4s; }
.sparkle-3 { right: 14%; bottom: 36%; animation: twinkle 1.7s infinite .8s; }
.birthday-card {
  position: relative;
  z-index: 1;
  width: min(100%, 640px);
  text-align: center;
  padding: 24px clamp(18px, 5vw, 48px) 30px;
  border: 5px solid #fff;
  border-radius: 34px;
  background: #fffdf8ee;
  box-shadow: 0 20px 60px #b45e9a2e, inset 0 0 0 2px #ffc7df;
  animation: cardAppear .9s cubic-bezier(.2,.8,.2,1) both;
  backdrop-filter: blur(5px);
}
.top-garland { font-size: clamp(18px, 3.6vw, 27px); letter-spacing: 4px; margin-bottom: 4px; }
.eyebrow {
  margin: 0;
  color: #9a71b7;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: .78rem;
  font-weight: 800;
}
h1 {
  margin: 2px 0 0;
  font-family: 'Pacifico', 'Brush Script MT', cursive;
  font-size: clamp(2.6rem, 8vw, 4.6rem);
  line-height: 1.25;
  color: var(--pink);
  text-shadow: 3px 4px 0 #ffe2ef, 0 5px 18px #ff83b64d;
  animation: titleBounce 3s ease-in-out infinite;
}
.subtitle { margin: 4px 0 18px; font-size: clamp(1rem, 3vw, 1.25rem); color: #8750a4; font-weight: 700; }
.photo-frame {
  position: relative;
  width: min(100%, 390px);
  margin: 0 auto;
  padding: 9px;
  border-radius: 26px;
  background: linear-gradient(135deg, #ffb8d6, #fff1a9, #b3f4e4, #c7b5ff);
  box-shadow: 0 10px 26px #d66caa35;
  transform: rotate(-1deg);
  animation: photoWiggle 6s ease-in-out infinite;
}
.photo-frame img {
  display: block;
  width: 100%;
  max-height: 490px;
  object-fit: cover;
  object-position: center;
  border: 4px solid #fff;
  border-radius: 19px;
}
.photo-sticker { position: absolute; font-size: 34px; filter: drop-shadow(0 3px 2px #66345f25); }
.sticker-heart { top: -17px; right: -18px; animation: bob 2.6s infinite; }
.sticker-star { bottom: 17px; left: -22px; animation: twinkle 1.8s infinite; }
.cake-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 2vw, 13px);
  margin: 19px 0 7px;
  min-height: 58px;
}
.cake { font-size: clamp(43px, 8vw, 62px); filter: drop-shadow(0 5px 3px #d89eb144); animation: cakeBounce 2.5s infinite; }
.cake-candle { width: 8px; height: 28px; border-radius: 5px; position: relative; background: repeating-linear-gradient(135deg, #fff 0 4px, #ff85bd 4px 8px); transform: translateY(-10px); }
.candle-yellow { background: repeating-linear-gradient(135deg, #fff 0 4px, #ffc84d 4px 8px); }
.candle-blue { background: repeating-linear-gradient(135deg, #fff 0 4px, #64c9f2 4px 8px); }
.candle-purple { background: repeating-linear-gradient(135deg, #fff 0 4px, #ad8aff 4px 8px); }
.candle-green { background: repeating-linear-gradient(135deg, #fff 0 4px, #70d9ac 4px 8px); }
.candle-orange { background: repeating-linear-gradient(135deg, #fff 0 4px, #ff9c59 4px 8px); }
.cake-candle i {
  position: absolute; width: 11px; height: 15px; left: -1px; top: -14px;
  border-radius: 70% 30% 65% 35%; transform: rotate(10deg);
  background: radial-gradient(ellipse at 35% 70%, #fff6a6 0 12%, #ffb52e 38%, #ff6b72 72%);
  filter: drop-shadow(0 0 6px #ffb52e);
  animation: flame 1s ease-in-out infinite alternate;
}
.wish { max-width: 440px; margin: 7px auto 12px; font-size: clamp(1rem, 2.8vw, 1.2rem); line-height: 1.5; }
.flower-divider { font-size: 24px; letter-spacing: 3px; margin: 8px 0 15px; }
button {
  border: 0;
  padding: 13px 25px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(100deg, #ff5b9e, #a56be8);
  box-shadow: 0 7px 0 #c84d9a, 0 12px 20px #d46a9d35;
  font: 800 1.05rem 'Baloo 2', sans-serif;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
button:hover { transform: translateY(-3px) scale(1.03); filter: saturate(1.15); box-shadow: 0 10px 0 #c84d9a, 0 15px 24px #d46a9d45; }
button:active { transform: translateY(3px); box-shadow: 0 3px 0 #c84d9a; }
button:focus-visible { outline: 3px solid #66345f; outline-offset: 5px; }
.surprise-message { min-height: 28px; margin: 14px 0 2px; color: #b33f86; font-weight: 800; }
.signoff { margin: 4px 0 0; color: #9a71b7; font-size: .95rem; }
footer { z-index: 1; text-align: center; margin-top: 19px; color: #795c91; font-size: .88rem; }
.confetti-layer { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.confetti {
  position: absolute; top: -20px; width: 10px; height: 15px; opacity: .95;
  animation: confettiFall var(--duration, 3s) linear forwards;
  transform: rotate(var(--rotation, 0deg));
}
@keyframes balloonFloat { 0%,100% { transform: translateY(0) rotate(-5deg); } 50% { transform: translateY(-22px) rotate(6deg); } }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-10px) rotate(5deg); } }
@keyframes twinkle { 0%,100% { transform: scale(.8) rotate(-12deg); opacity: .65; } 50% { transform: scale(1.2) rotate(12deg); opacity: 1; } }
@keyframes flame { from { transform: scale(.85) rotate(-8deg); } to { transform: scale(1.1) rotate(8deg); } }
@keyframes cardAppear { from { opacity: 0; transform: translateY(25px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes titleBounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes photoWiggle { 0%,100% { transform: rotate(-1deg); } 50% { transform: rotate(1deg); } }
@keyframes cakeBounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes confettiFall { to { transform: translateY(110vh) rotate(780deg); opacity: .2; } }
@media (max-width: 520px) {
  body { padding: 16px 10px 18px; }
  .birthday-card { border-width: 3px; border-radius: 25px; padding-top: 20px; padding-bottom: 23px; }
  .balloon-1 { left: -3%; top: 4%; } .balloon-2 { right: -3%; top: 5%; }
  .balloon-3 { left: -2%; bottom: 3%; } .balloon-4 { right: -2%; bottom: 4%; }
  .flower-1, .flower-2 { top: 1%; } .flower-3, .flower-4 { bottom: 1%; }
  .photo-frame img { max-height: 55vh; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
