body {
  background-color: #ffe5ec;
}

.candle-count-display {
  text-align: center;
  margin-top: 140px;
  margin-bottom: 20px;
  font-family: 'Arial', sans-serif;
  font-size: 30px;
  font-weight: bold;
  color: #f0e4d0;
  background-color: #ff8fab;
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  border: 2px solid #ffc2d1;
}

.cake .instruction {
  position: absolute;
  top: 40px; /* adjust so it sits near the candle */
  left: -46%; /* adjust horizontal position */
  transform: translateX(-50%);
  font-family: 'Arial', sans-serif;
  font-size: 10px;
  font-weight: bold;
  color: #f0e4d0;
  text-shadow: 1px 1px 2px #ff8fab;
  white-space: nowrap;
  pointer-events: none; /* so it doesn’t interfere with candle clicks */
  border: 2px solid #ffc2d1;
  padding: 10px;
  border-radius: 10px;
  background-color: #ff8fab;
}


/* Modal background */
.modal {
  display: none; 
  position: fixed;
  z-index: 9999; /* stays above everything */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.6);
}

.modal-content {
  background: #fff0f6;
  margin: 10% auto;
  padding: 20px;
  border: 2px solid #ff8fab;
  border-radius: 20px;
  width: 60%;
  max-width: 500px;
  text-align: center;
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
}

/* Pulsing glow class */
.modal-content.glow {
  animation: neonPulse 2s infinite alternate;
  transform: scale(1.02);
}

/* Keyframes for pulsing neon glow */
@keyframes neonPulse {
  0% {
    box-shadow:
      0 0 10px #ff8fab,
      0 0 20px #ff8fab,
      0 0 30px #ff8fab,
      0 0 40px #ff8fab inset;
  }
  50% {
    box-shadow:
      0 0 20px #ff8fab,
      0 0 30px #ff8fab,
      0 0 40px #ff8fab,
      0 0 50px #ff8fab inset;
  }
  100% {
    box-shadow:
      0 0 10px #ff8fab,
      0 0 20px #ff8fab,
      0 0 30px #ff8fab,
      0 0 40px #ff8fab inset;
  }
}


/* Close button */
.close {
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  color: #ff4d6d;
}

.close:hover {
  color: black;
}

/* Animation */
@keyframes popUp {
  from {transform: scale(0.8); opacity: 0;}
  to {transform: scale(1); opacity: 1;}
}


.candle-count-display span {
  font-weight: bold;
  color: #AD030F;
}

.cake {
  position: absolute;
  width: 250px;
  height: 200px;
  top: 50%;
  left: 50%;
  margin-top: -70px;
  margin-left: -125px;
}

.plate {
  width: 270px;
  height: 110px;
  position: absolute;
  bottom: -10px;
  left: -10px;
  background-color: #ccc;
  border-radius: 50%;
  box-shadow: 0 2px 0 #b3b3b3, 0 4px 0 #b3b3b3, 0 5px 40px rgba(0, 0, 0, 0.5);
}

.cake > * {
  position: absolute;
}

.layer {
  position: absolute;
  display: block;
  width: 250px;
  height: 100px;
  border-radius: 50%;
  background-color: #ffc2d1;
  box-shadow: 0 2px 0px #fb6f92, 0 4px 0px #ff8fab, 0 6px 0px #ff8fab, 0 8px 0px #ff8fab, 0 10px 0px #ff8fab, 0 12px 0px #ff8fab, 0 14px 0px #ff8fab, 0 16px 0px #ff8fab, 0 18px 0px #ff8fab, 0 20px 0px #ff8fab, 0 22px 0px #ff8fab, 0 24px 0px #ff8fab, 0 26px 0px #ff8fab, 0 28px 0px #ff8fab, 0 30px 0px #ff8fab;
}

.layer-top {
  top: 0px;
}

.layer-middle {
  top: 33px;
}

.layer-bottom {
  top: 66px;
}

.icing {
  top: -2px;
  left: 5px;
  background-color: #f0e4d0;
  width: 240px;
  height: 90px;
  border-radius: 50%;
}
.icing:before {
  content: "";
  position: absolute;
  top: 4px;
  right: 5px;
  bottom: 6px;
  left: 5px;
  background-color: #f4ebdc;
  box-shadow: 0 0 4px #f6efe3, 0 0 4px #f6efe3, 0 0 4px #f6efe3;
  border-radius: 50%;
  z-index: 1;
}

.drip {
 display: block;
  width: 50px;
  height: 60px;
  border-bottom-left-radius: 25px;
  border-bottom-right-radius: 25px;
  background-color: #f0e4d0; 
}

.drip1 {
  top: 53px;
  left: 5px;
  transform: skewY(15deg);
  height: 48px;
  width: 40px;
}

.drip2 {
  top: 69px;
  left: 181px;
  transform: skewY(-15deg);
}

.drip3 {
  top: 54px;
  left: 90px;
  width: 80px;
  border-bottom-left-radius: 40px;
  border-bottom-right-radius: 40px;
}

.candle {
  background-color: #7B020B;
  width: 12px;
  height: 35px;
  border-radius: 6px/3px;
  top: -20px;
  left: 50%;
  margin-left: -8px;
  z-index: 10;
}
.candle:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 12px;
  height: 6px;
  border-radius: 50%;
  background-color: #ad030f;
}

.candle.out .flame {
  display: none;
}

.flame {
  position: absolute;
  background-color: orange;
  width: 10px;
  height: 25px;
  border-radius: 8px 8px 8px 8px/20px 20px 8px 8px;
  top: -34px;
  left: 50%;
  margin-left: -7.5px;
  z-index: 10;
  box-shadow: 0 0 10px rgba(255, 165, 0, 0.5), 0 0 20px rgba(255, 165, 0, 0.5), 0 0 60px rgba(255, 165, 0, 0.5), 0 0 80px rgba(255, 165, 0, 0.5);
  transform-origin: 50% 90%;
  animation: flicker 1s ease-in-out alternate infinite;
}

@keyframes flicker {
  0% {
    transform: skewX(5deg);
    box-shadow: 0 0 10px rgba(255, 165, 0, 0.2), 0 0 20px rgba(255, 165, 0, 0.2), 0 0 60px rgba(255, 165, 0, 0.2), 0 0 80px rgba(255, 165, 0, 0.2);
  }
  25% {
    transform: skewX(-5deg);
    box-shadow: 0 0 10px rgba(255, 165, 0, 0.5), 0 0 20px rgba(255, 165, 0, 0.5), 0 0 60px rgba(255, 165, 0, 0.5), 0 0 80px rgba(255, 165, 0, 0.5);
  }
  50% {
    transform: skewX(10deg);
    box-shadow: 0 0 10px rgba(255, 165, 0, 0.3), 0 0 20px rgba(255, 165, 0, 0.3), 0 0 60px rgba(255, 165, 0, 0.3), 0 0 80px rgba(255, 165, 0, 0.3);
  }
  75% {
    transform: skewX(-10deg);
    box-shadow: 0 0 10px rgba(255, 165, 0, 0.4), 0 0 20px rgba(255, 165, 0, 0.4), 0 0 60px rgba(255, 165, 0, 0.4), 0 0 80px rgba(255, 165, 0, 0.4);
  }
  100% {
    transform: skewX(5deg);
    box-shadow: 0 0 10px rgba(255, 165, 0, 0.5), 0 0 20px rgba(255, 165, 0, 0.5), 0 0 60px rgba(255, 165, 0, 0.5), 0 0 80px rgba(255, 165, 0, 0.5);
  }
}




.heart {
    animation: blink 1s linear infinite;
    width: 16px;
    height: 16px;
    margin-left: 5px;
}
@keyframes blink {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}
