/* base + gradient background */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow-y: auto; /* allows scrolling */
  background: linear-gradient(#ffb0d6, #ff4fa3) fixed center / cover no-repeat;
  position: relative;
}


/* subtle pink glowing edges (behind everything) */
body::before {
  content: "";
  position: fixed;
   top: 0; left: 0; right: 0; bottom: 0;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top left, rgba(255, 0, 127, 0.55), rgba(255, 154, 203, 0.35) 40%, transparent 70%),
    radial-gradient(circle at top right, rgba(255, 0, 127, 0.45), rgba(255, 154, 203, 0.30) 40%, transparent 70%),
    radial-gradient(circle at bottom left, rgba(255, 0, 127, 0.45), rgba(255, 154, 203, 0.30) 40%, transparent 70%),
    radial-gradient(circle at bottom right, rgba(255, 0, 127, 0.55), rgba(255, 154, 203, 0.35) 40%, transparent 70%);
  filter: blur(45px);
  opacity: 0.9;
  z-index: 1; /* behind content and blur overlay */
  animation: edgeGlow 4s ease-in-out infinite alternate;
}
@keyframes edgeGlow { 0% { opacity: 0.25 } 100% { opacity: 0.7 } }

/* H1 (must stay above blur overlay so it doesn't get blurred) */
h1 {
  position: relative;
  top: 8%;
  z-index: 100;             /* keep it on top */
  font-size: 3rem;
  font-weight: 800;
  margin: 0 0 18px 0;
  text-shadow: 0 0 10px #fc007a, 0 0 20px #f70077;
  transition: transform 0.28s ease, color 0.28s ease, background 0.28s ease;
  display: inline-block;
  -webkit-background-clip: text;
}

/* H1 hover: scale + gradient text */
h1:hover {
  transform: scale(1.08);
  background: linear-gradient(135deg, #fc007a, #f70077);
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
}

.subtitle {
  position: absolute;
  top: 3%;
  transform: translateY(-50%);
  font-family: 'Fredoka One', cursive;
  font-size: 1.2rem;
  color: #800080;
  text-shadow: 0 0 8px #fc007a;
  z-index: 100;  /* above blur overlay */
  pointer-events: none; /* optional if you don’t want them interactive */
}

.subtitle2 {
  position: absolute;
  top: 7%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: #800080;
  text-shadow: 0 0 8px #fc007a;
  z-index: 100;  /* above blur overlay */
  pointer-events: none; /* optional if you don’t want them interactive */
}

/* CONTENT (everything that should blur) */
.content {
  display: flex;
  flex-direction: column;  /* side by side on desktop */
  flex-wrap: wrap;      /* allows stacking on small screens */
  justify-content: center;
  align-items: center;
  gap: 24px;
}


/* BLUR OVERLAY */
/* sits above .content, below the H1 */
#blur-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  backdrop-filter: blur(0px) brightness(1);
  -webkit-backdrop-filter: blur(0px) brightness(1);
  transition: backdrop-filter 0.35s ease, -webkit-backdrop-filter 0.35s ease;
  z-index: 50; /* above content (z-index:2) but below h1 (z-index:100) */
}

/* WHEN ACTIVE, the overlay blurs & darkens what's behind it */
#blur-layer.active {
  backdrop-filter: blur(8px) brightness(0.72);
  -webkit-backdrop-filter: blur(8px) brightness(0.72);
}

#hoverMessages {
  color: blue;
  filter: drop-shadow(0 0 10px black);
  background: black,blur 0.6;
  opacity: 0;
  font-family: 'Fredoka One', cursive;
  transform: translateY(10px);
  transition: 0.4s ease;
  font-size: 1.2rem;
  z-index: 100;
}

h1:hover + #hoverMessages {
  opacity: 1;
  transform: translateY(0);
}


/* Buttons + ui */
.buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 3;
}

button {
  padding: 12px 24px;
  font-size: 1.1rem;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  background: #ff4fa3;
  color: white;
  transition: transform 0.18s ease, background 0.18s ease;
}

button:hover {
  background: #ff2c8a;
  transform: scale(1.05);
}

button {
  position: relative; /* required for tooltip positioning */
}

/* Tooltip text */
button::after {
  content: attr(data-tooltip); /* uses the data-tooltip attribute */
  position: absolute;
  bottom: 125%; /* above the button */
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0,0,0,0.8);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 100;
}

/* Tooltip arrow */
button::before {
  content: "";
  position: absolute;
  bottom: 115%; /* slightly above button */
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: rgba(0,0,0,0.8) transparent transparent transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

/* Show tooltip on hover */
button:hover::after,
button:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px); /* slight upward motion */
}


#memoryBox, #quoteBox {
  margin-top: 12px;
  font-size: 1.05rem;
  z-index: 3;
}

/* Intro overlay full screen */
#introOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(#39ccfd, #3a3aff);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200; /* above everything */
  backdrop-filter: blur(8px) brightness(0.72);
  -webkit-backdrop-filter: blur(8px) brightness(0.72);
  opacity: 0;
  animation: introFade 5s ease forwards; /* animation name & duration */
}

/* Big centered text */
#introOverlay h1 {
  font-size: 3rem;
  font-weight: 800;
  text-shadow: 0 0 20px black, 0 0 30px black;
  color: #FFA500; 
  margin: 0;
  opacity: 0;
  transform: scale(0.9);
  animation: textPop 2s ease forwards 0.5s; /* delay slightly for smooth effect */
}

@media (max-width: 768px) {
  #introOverlay h1 {
    font-size: 1.5rem; /* smaller for mobile */
  }
}


/* Fade in/out overlay */
@keyframes introFade {
  0% { opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; display: none; }
}

/* Text pop-in */
@keyframes textPop {
  0% { opacity: 0; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
  100% { opacity: 1; transform: scale(1); }
}

.content {
  position: relative; /* needed so absolute positions inside reference this */
  z-index: 2;
  display: flex;
  flex-direction: column; /* buttons still stack vertically */
  align-items: center; /* left-align items by default */
  gap: 18px;
}

/* Image positioned next to buttons */
.birthday-pic1 {
  position: absolute;
  top: 0%;
  left: 400px;
  width: 300px;
  max-width: 300px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
  transform: rotate(10deg);
}

.birthday-pic1:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 10px #ffffff);
}


.birthday-pic2 {
  position: absolute;
  top: 0;
  right: 400px;
  width: 300px;
  max-width: 300px; /* scale images nicely */
  border-radius: 12px; /* optional rounded corners */
  box-shadow: 0 4px 12px rgba(0,0,0,0.3); /* optional shadow */
  transition: transform 0.3s ease;
    /* Add a playful rotation */
  transform: rotate(-10deg); /* negative = tilt left, positive = tilt right */
}

.birthday-pic2:hover {
  transform: scale(1.05); /* subtle zoom on hover */
  filter: drop-shadow(0 0 10px #ffffff);
}

.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* clicks still work */
  overflow: hidden;
  z-index: 10;
}

.particles span {
  position: absolute;
  top: -10px;               /* start above the screen */
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  animation: fall linear infinite;
}

/* Falling animation */
@keyframes fall {
  0%   { transform: translateY(-20px) rotate(0deg); opacity: 0.6; }
  50%  { opacity: 1; }
  100% { transform: translateY(110vh) rotate(360deg); opacity: 0.6; }
}

/* --- slower, multicolor bubble-neon pop --- */
.popMessage {
  display: inline-block; 
  transform-origin: center;
  animation: bubbleNeonPop .8s ease forwards; /* slower than before */
}

@keyframes bubbleNeonPop {
  0% {
    opacity: 0;
    transform: scale(0.2) translateY(10px);
    color: #fff;
    text-shadow: 0 0 0px #ff00ff, 0 0 0px #00ffff;
  }
  30% {
    opacity: 1;
    transform: scale(1.2) translateY(0);
    color: #ff0;
    text-shadow: 0 0 12px #ff00ff, 0 0 12px #00ffff;
  }
  50% {
    transform: scale(1.35) translateY(-4px);
    color: #00ffea;
    text-shadow: 0 0 15px #00ffea, 0 0 15px #ff00ff;
  }
  70% {
    transform: scale(0.85) translateY(2px);
    color: #ff5ee5;
    text-shadow: 0 0 12px #ff5ee5, 0 0 12px #00ffff;
  }
  85% {
    transform: scale(1.05) translateY(-1px);
    color: #fff;
    text-shadow: 0 0 8px #ff00ff, 0 0 8px #00ffff;
  }
  100% {
    transform: scale(1) translateY(0);
    color: #fff;
    text-shadow: 0 0 5px #ff00ff, 0 0 5px #00ffff;
  }
}





@media screen and (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  .buttons {
    width: 90%;
  }

  button {
    width: 100%;
  }
}


@media (max-width: 768px) {
  .birthday-pic1,
  .birthday-pic2 {
    position: static;       /* stops overlap */
    width: 70vw;           /* responsive size */
    max-width: 320px;
    margin: 20px auto;     /* center them */
    transform: rotate(0deg); /* remove big tilts for mobile */
    display: block;
  }

  .content {
    flex-direction: column;
    align-items: center;
  }
}
