@import url(https://fonts.googleapis.com/css?family=Lato:300italic);
@import url("https://fonts.googleapis.com/css2?family=Dancing+Script:wght@700&display=swap");

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  background: linear-gradient(135deg, #252432 0%, #3a3950 50%, #252432 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* Sparkling stars background */
.stars {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.star {
  position: absolute;
  background-color: #fff;
  border-radius: 50%;
  animation: twinkle 3s infinite ease-in-out;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.2;
  }
  50% {
    opacity: 1;
  }
}

/* Floating balloons */
.balloons {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.balloon {
  position: absolute;
  width: 50px;
  height: 60px;
  border-radius: 50%;
  bottom: -100px;
  animation: float 15s infinite ease-in;
  box-shadow: inset -5px -5px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
}

.balloon:before {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  top: 15px;
  left: 15px;
}

.balloon:after {
  content: "🎈";
  position: absolute;
  font-size: 20px;
  opacity: 0.8;
}

@keyframes float {
  0% {
    transform: translateY(0) rotate(0deg) scale(0.8);
    opacity: 0;
  }
  10% {
    opacity: 1;
    transform: translateY(-20px) rotate(5deg) scale(1);
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(-100vh) rotate(20deg) scale(1.1);
    opacity: 0;
  }
}

#cake-container {
  position: relative;
  margin-bottom: 2rem;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
}

#cake {
  display: block;
  position: relative;
  margin: -10em auto 0 auto;
  z-index: 2;
}

.candle {
  background: linear-gradient(to bottom, #ffffff 0%, #f8f8f8 100%);
  border-radius: 10px;
  position: absolute;
  top: 200px;
  left: 50%;
  margin-left: -3px;
  margin-top: -10px;
  width: 7px;
  height: 60px;
  transform: translateY(-300px);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-animation: in 500ms 6s ease-out forwards;
  animation: in 500ms 6s ease-out forwards;
  z-index: 10;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
}

.candle:after,
.candle:before {
  background: rgba(255, 100, 100, 0.5);
  content: "";
  position: absolute;
  width: 100%;
  height: 3px;
}

.candle:after {
  top: 25%;
  left: 0;
}

.candle:before {
  top: 45%;
  left: 0;
}

.fire {
  border-radius: 100%;
  position: absolute;
  top: -22px;
  left: 50%;
  margin-left: -3.5px;
  width: 8px;
  height: 22px;
}

.fire:nth-child(1) {
  -webkit-animation: fire 2s 6.5s infinite;
  animation: fire 2s 6.5s infinite;
}

.fire:nth-child(2) {
  -webkit-animation: fire 1.5s 6.5s infinite;
  animation: fire 1.5s 6.5s infinite;
}

.fire:nth-child(3) {
  -webkit-animation: fire 1s 6.5s infinite;
  animation: fire 1s 6.5s infinite;
}

.fire:nth-child(4) {
  -webkit-animation: fire 0.5s 6.5s infinite;
  animation: fire 0.5s 6.5s infinite;
}

.fire:nth-child(5) {
  -webkit-animation: fire 0.2s 6.5s infinite;
  animation: fire 0.2s 6.5s infinite;
}

@-webkit-keyframes fire {
  0%,
  100% {
    background: rgba(254, 248, 97, 0.5);
    box-shadow: 0 0 40px 10px rgba(248, 233, 209, 0.2);
    transform: translateY(0) scale(1);
  }
  50% {
    background: rgba(255, 100, 50, 0.3);
    box-shadow: 0 0 40px 20px rgba(248, 233, 209, 0.3);
    transform: translateY(-20px) scale(0);
  }
}
@keyframes fire {
  0%,
  100% {
    background: rgba(254, 248, 97, 0.5);
    box-shadow: 0 0 40px 10px rgba(248, 233, 209, 0.2);
    transform: translateY(0) scale(1);
  }
  50% {
    background: rgba(255, 100, 50, 0.3);
    box-shadow: 0 0 40px 20px rgba(248, 233, 209, 0.3);
    transform: translateY(-20px) scale(0);
  }
}
@-webkit-keyframes in {
  to {
    transform: translateY(0);
  }
}
@keyframes in {
  to {
    transform: translateY(0);
  }
}

/* Decorative sprinkles */
.sprinkles {
  position: absolute;
  width: 200px;
  height: 100px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.sprinkle {
  position: absolute;
  width: 4px;
  height: 8px;
  border-radius: 2px;
  opacity: 0;
  animation: sprinkle-fall 4s infinite;
}

@keyframes sprinkle-fall {
  0% {
    opacity: 0;
    transform: translateY(0) rotate(0deg);
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
    transform: translateY(100px) rotate(360deg);
  }
}

.text {
  color: #fefae9;
  font-family: "Dancing Script", cursive;
  font-weight: 700;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  margin-top: 2rem;
  animation: text-glow 2s infinite alternate;
}

@keyframes text-glow {
  from {
    text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #f486bd, 0 0 20px #e6a2c4;
  }
  to {
    text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #e78bb9,
      0 0 40px #efabcd;
  }
}

.text h1 {
  font-size: 3em;
  margin: 0;
  letter-spacing: 2px;
  color: #473c40;
}

.text p {
  font-size: 2.5em;
  margin: 0.5rem 0 0 0;
  color: #b73563;
}

/* Floating hearts */
.hearts {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.heart {
  position: absolute;
  opacity: 0;
  color: #ff6b9e;
  animation: float-heart 10s infinite ease-in;
}

@keyframes float-heart {
  0% {
    opacity: 0;
    transform: translateY(0) rotate(0deg);
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
    transform: translateY(-100px) rotate(360deg);
  }
}

/* Cake plate */
.plate {
  width: 220px;
  height: 20px;
  background: radial-gradient(ellipse at center, #f5f5f5 0%, #e0e0e0 100%);
  border-radius: 50%;
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.plate:before {
  content: "";
  position: absolute;
  width: 240px;
  height: 10px;
  background: radial-gradient(ellipse at center, #e0e0e0 0%, #c9c9c9 100%);
  border-radius: 50%;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
}
