body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  /* Deep night gradient */
  background:
    radial-gradient(circle at center, rgba(255,255,255,0.03) 0%, rgba(0,0,0,0.85) 60%),
    linear-gradient(180deg, #05050a 0%, #0b0f2b 40%, #020208 100%);

  font-family: Arial, sans-serif;
  color: #eaeaea;

  min-height: 100vh;
  overflow: hidden;
}

* {
  -webkit-tap-highlight-color: transparent; 
}


h3 {
  color: #ff4d6d;
}

#ageDisplay,#nameDisplay {
  font-size: 22px;
  /* margin: 10px; */
  padding: 6px 14px;
  border-radius: 14px;
  border: 2px solid #ff4d6d;
  background: #ffe6ec;
  width: 283px;
  text-align: center;
}

/* Container */
#cake-container {
  position: relative;
  width: 350px;
  cursor: pointer;
  margin-top:69px;
}

/* Cake Image */
#cake-container img {
  width: 100%;
  display: block;
  filter: brightness(1);
  transition: filter 0.4s ease, filter 0.4s ease;
}


/* Candle */
.candle {
  position: absolute;
  width: 12px;
  height: 45px;
  border-radius: 4px;
  background: repeating-linear-gradient(
    45deg,
    #ffffff,
    #ffffff 4px,
    #ff7aa2 4px,
    #ff7aa2 8px
  );
  transform-origin: bottom center;
}


/* Flame */
.flame {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 22px;
  pointer-events: none;
}

/* Outer flame */
.flame::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at 50% 30%,
    #fff6a0 0%,
    #ffb300 35%,
    #ff7a00 65%,
    rgba(255, 122, 0, 0) 75%
  );
  border-radius: 50% 50% 50% 50% / 65% 65% 35% 35%;
  animation: flameMove 0.25s infinite ease-in-out;
  box-shadow: 0 0 20px 8px rgba(255, 160, 0, 0.8); /* stronger glow */
}


/* Inner flame (hot core) */
.flame::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 10px;
  left: 50%;
  top: 4px;
  transform: translateX(-50%);
  background: radial-gradient(circle, #ffffff 0%, #ffe066 60%, transparent 70%);
  border-radius: 50%;
  opacity: 0.9;
}


@keyframes flameMove {
  0% {
    transform: scale(1) rotate(-2deg);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.08) rotate(2deg);
    opacity: 1;
  }
  100% {
    transform: scale(0.95) rotate(-1deg);
    opacity: 0.85;
  }
}


#blowBtn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #d85f86;
}
/* Blow-out animation */
.blow-out {
  animation: blowOut 0.5s forwards ease-out;
}

@keyframes blowOut {
  0% {
    transform: translateX(-50%) scale(1) rotate(0deg);
    opacity: 1;
  }
  60% {
    transform: translateX(-50%) scale(1.4) rotate(10deg);
    opacity: 0.6;
  }
  100% {
    transform: translateX(-50%) scale(0) translateY(-15px);
    opacity: 0;
  }
}

/* Countdown Design */
#countdownOverlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 240, 245, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

#countdownOverlay.show { opacity: 1; }

#countNumber {
  font-size: 120px;
  font-weight: bold;
  color: #ff4d6d;
  
}



@keyframes pop {
  0%   { transform: scale(0.6); opacity: 0; }
  30%  { transform: scale(1.1); opacity: 1; }
  70%  { transform: scale(1); }
  100% { transform: scale(0.8); opacity: 0; }
}

/* Blow BTN Design */
#blowReadyBtn {
  margin-top: 22px;
  padding: 8px 12px;
  font-size: 16px;
  border-radius: 30px;
  border: none;
  background: linear-gradient(135deg, #ff4d6d, #ff8fab);
  color: white;
  cursor: pointer;
  box-shadow: 0 6px 0 #d63a55;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#blowReadyBtn:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #d63a55;
}

#blowReadyBtn .mic {
  margin-left: 8px;
}

/* Title */
.cake-title {
  font-size: 22px;
  margin-bottom: 18px;
  font-weight: bold;
  color: #ff4d6d;
  text-align: center;
  font-family: "Poppins", sans-serif;
}

/* Cake Options Grid */
.cake-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 18px;
  justify-content: center;
  padding: 10px;
  max-width: 500px;
  margin: auto;
}

 #cakeSelection {
    text-align: center;
    padding: 20px;
    font-family: Arial, sans-serif;
  }

/* Cake Card */
.cake-card {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 18px;
  padding: 15px 10px;
  text-align: center;
  cursor: pointer;
  backdrop-filter: blur(10px);
  border: 2px solid transparent;
  transition: 0.35s ease;
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

/* Cake Image */
.cake-card img {
  width: 90px;
  transition: 0.35s ease;
}

/* Cake Name */
.cake-card p {
  margin-top: 10px;
  font-size: 15px;
  font-weight: 600;
  color: white;
  font-family: "Poppins", sans-serif;
}

/* Hover Effect */
.cake-card:hover {
  transform: translateY(-8px) scale(1.05);
  border: 2px solid #ff4d6d;
  box-shadow: 0 0 20px rgba(255, 77, 109, 0.4);
}

/* Hover Image Bounce */
.cake-card:hover img {
  transform: scale(1.12) rotate(-2deg);
}

/* Active Selected Cake */
.cake-card.selected {
  border: 2px solid #ff4d6d;
  background: rgba(255, 77, 109, 0.15);
}


.cake-choice {
  width: 100px;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 10px;
  transition: transform 0.2s ease, border 0.2s ease;
}

.cake-choice:hover {
  transform: scale(1.05);
  /* border: 2px solid #ff6370; */
}

.hidden {
  display: none !important;
  opacity: 0; /* optional for fade-out */
}


/* Smooth fade out */
.fade-out {
  opacity: 0;
  transform: scale(0.95);
  transition: 0.4s ease;
}

/* Cake pop-in animation */
@keyframes cakePop {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  60% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}

#nameStep {
  display: flex;
  flex-direction: column;
  justify-content: center;  /* center vertically */
  align-items: center;      /* center horizontally */
  text-align: center;

  min-height: 100vh;        /* full screen height */
  gap: 15px;                /* spacing between elements */
}


/* Apply animation to selected cake */
#cake-container.show img {
  animation: cakePop 0.6s ease;
}

/* Button slide-up animation */
@keyframes buttonSlide {
  0% {
    transform: translateY(30px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

#blowReadyBtn.show {
  animation: buttonSlide 0.5s ease;
}

#nextBtn {
  margin-top: 15px;
  padding: 10px 20px;
  border: none;
  background: #ff4d6d;
  color: white;
  font-size: 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.3s ease;
}

#nextBtn:hover {
  transform: scale(1.05);
}


@media(max-width:430px){
body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  /* Deep night gradient */
  background:
    radial-gradient(circle at center, rgba(255,255,255,0.03) 0%, rgba(0,0,0,0.85) 60%),
    linear-gradient(180deg, #05050a 0%, #0b0f2b 40%, #020208 100%);

  font-family: Arial, sans-serif;
  color: #eaeaea;

  min-height: 100vh;
  overflow: hidden;
}
 #cake-container {
    position: relative;
    width: 90%;          
    max-width: 420px;    
    cursor: pointer;
    margin-top: 69px;
    display: flex;
    justify-content: center; 
  }

  #cake-container img {
    width: 100%;  
    display: block;
    filter: brightness(1);
    transition: filter 0.4s ease;
  }
#nameStep {
  display: flex;
  flex-direction: column;
  justify-content: center;  /* center vertically */
  align-items: center;      /* center horizontally */
  text-align: center;

  min-height: 100vh;        /* full screen height */
  gap: 15px;                /* spacing between elements */
}

.cake-options {
        grid-template-columns: 1fr; /* 1 column = row layout */
        gap: 15px;
        max-width: 90%; /* fit nicely on mobile */
        padding: 8px;
    }

}

