.cake-animation {
  height: 100vh;
  width: 92%; 
  overflow: hidden;
}
.cake-animation * {
  position: absolute;
  margin: auto;
  left: 0;
  right: 0;
}

@keyframes rainbow {
  0% { color: red; }
  10% { color: #ff7f00; }
  20% { color: yellow; }
  30% { color: #7fff00; }
  40% { color: #00ff00 }
  50% { color:#00ff7f }
  60% { color: 	#00ffff }
  70% { color: #007fff }
  80% { color: #0000ff }
  90% { color: #7f00ff }
  100% { color: red }
}

.cake-animation .words {
  color: rgba(0,0,0,0);
  font-weight: bold;
  font-size: 28px;
  font-family: fantasy;
  position: relative;
  animation: rainbow 5s infinite;
  animation-delay: 12s;
  margin: 0;
  top: 260px;
}

@keyframes move-words {
  0% {
    left: 100%;
  }
  
  100% {
    left: -100%;
    display: none;
  }
}

.layer-1 {
  background-color: #367bd0;
  height: 7.5em;
  width: 98%;
  top: -7.5em;
  border-radius: 20% 20% 0 0;
  background-size: 1.56em 9.37em;
  background-position: 0 -1.25em;
  background-image: radial-gradient(
    circle at 0.78em 1.5em,
    #f5f5f5 2.00em,
    transparent 1.3em
  );
  animation: fall-1 15s 1 forwards;
}
@keyframes fall-1 {
  20% {
    transform: translateY(30.62em);
  }
  100% {
    transform: translateY(30.62em);
  }
}
.cake-animation .layer-1:before {
  content: "֍֍֍֍֍֍֍֍֍֍֍֍֍֍֍֍֍֍֍֍֍֍֍֍֍֍֍";
  color: #ffffff;
  position: absolute;
  height: 1.5em;
  width: 100%;
  background-color: #ff4a83;
  bottom: 0;
}
.cake-animation .layer-1:after {
  content: "";
  position: absolute;
  height: 1.25em;
  width: 1.25em;
  background-color: #f5e671;
  border-radius: 50%;
  top: 2.81em;
  left: 1.87em;
  box-shadow: 3.12em 1.56em #ff4a83, 9.37em 1.8em #9a152b,
    14.68em 0 #f5e671, 17.75em 1.56em #9a152b;
}
.cake-animation .layer-2 {
  height: 7.5em;
  width: 15.62em;
  background-color: #ff99b9;
  top: -7.5em;
  border-radius: 20% 20% 0 0;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 3.12em,
    #ff4a83 3.12em,
    #ff4a83 6.25em
  );
  animation: fall-2 15s 1 forwards;
}
@keyframes fall-2 {
  20% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(23.12em);
  }
  100% {
    transform: translateY(23.12em);
  }
}
.cake-animation .layer-3 {
  background-color: #9a202f;
  height: 7.5em;
  width: 9.37em;
  top: -7.5em;
  border-radius: 20% 20% 0 0;
  background-size: 1.56em 9.37em;
  background-position: 0 -1.25em;
  background-image: radial-gradient(
    circle at 0.78em 1em,
    #ffee8d 2.25em,
    transparent 1.3em
  );
  animation: fall-3 15s 1 forwards;
}
@keyframes fall-3 {
  40% {
    transform: translateY(0);
  }
  60% {
    transform: translateY(15.62em);
  }
  100% {
    transform: translateY(15.62em);
  }
}
.cake-animation .layer-3:before {
  position: absolute;
  content: "Super3"!important;
  text-align: center;
  font-size: large;
  font-family: 'Wendy One', sans-serif;
  color: #367bd0;
  height: 1.73em;
  width: 100%;
  top: 3.12em;
  background-color: #ffee8d;
}
.cake-animation .layer-3:after {
  position: absolute;
  content: "";
  background-color: #f54597;
  height: 1.25em;
  width: 1.25em;
  border-radius: 50%;
  top: -1.25em;
  left: 0.37em;
  box-shadow: 1.87em 0 #f54597, 3.75em 0 #f54597, 5.62em 0 #f54597,
    7.5em 0 #f54597;
}
.cake-animation .candle {
  height: 3.7em;
  width: 0.75em;
  background-color: #3aa2cf;
  top: -3.12em;
  border-radius: 0.12em 0.12em 0 0;
  animation: fall-4 15s 1 forwards;
}
@keyframes fall-4 {
  60% {
    transform: translateY(0);
  }
  80% {
    transform: translateY(8.12em);
  }
  100% {
    transform: translateY(8.12em);
  }
}
.cake-animation .candle:before {
  position: absolute;
  content: "";
  background-color: #f1af3f;
  height: 1.25em;
  width: 1.25em;
  margin: -0.25em;
  border-radius: 50% 50% 50% 0;
  top: -1.7em;
  transform: rotate(135deg);
  animation: flame 2s infinite;
}
@keyframes flame {
  50% {
    transform: scale(0.8) rotate(150deg);
  }
}

.cake-animation .candle:nth-child(1) {
  height: 2.72em;
  width: 0.65em;
  background-color: #3aa2cf;
  top: -2.9em;
  left: -50px;
  border-radius: 0.12em 0.12em 0 0;
  animation: fall-4 13s 1 forwards;
  animation-delay: 2s
}

.cake-animation .candle:nth-child(1)::before {
  position: absolute;
  content: "";
  background-color: #f1af3f;
  height: 1.05em;
  width: 1.05em;
  margin: -0.25em;
  border-radius: 50% 50% 50% 0;
  top: -1.5em;
  transform: rotate(135deg);
  animation: flame 2s infinite;
}
.cake-animation .candle:nth-child(2) {
  height: 2.72em;
  width: 0.65em;
  background-color: #3aa2cf;
  top: -2.9em;
  left: +50px;
  border-radius: 0.12em 0.12em 0 0;
  animation: fall-4 11s 1 forwards;
  animation-delay: 4s
}

.cake-animation .candle:nth-child(2)::before {
  position: absolute;
  content: "";
  background-color: #f1af3f;
  height: 1.05em;
  width: 1.05em;
  margin: -0.25em;
  border-radius: 50% 50% 50% 0;
  top: -1.5em;
  transform: rotate(135deg);
  animation: flame 2s infinite;
}
.cake-animation .close-cake-btn {
  position: absolute;
  top: 85px;
  right: 10px;
  width: 30px;
  padding: 5px 10px;
  margin-right: 10%;
  background-color: rgba(0, 0, 0, 0.2);
  color: white;
  border: none;
  cursor: pointer;
}
@media only screen and (max-width: 950px) {
  .layer-1 {
    width: 100%;
  }
}
