* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background-color: #fb9700;
}

.card {
  width: 650px;
  height: 400px;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;
  perspective: 1200px;
  transition: 1s;
}

.card:hover {
  transform: rotate(-5deg);
}

.card:hover .outside {
  transform: rotateY(-130deg);
}

.outside,
.inside {
  height: 100%;
  width: 50%;
  position: absolute;
  left: 50%;
}

.inside {
  background: linear-gradient(to right, #ffffff, #e0e0e0 30%);
  padding: 0 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  line-height: 1.8;
}

.outside {
  transform-style: preserve-3d;
  z-index: 1;
  transform-origin: left;
  transition: 2s;
}

.front,
.back {
  height: 100%;
  width: 100%;
  position: absolute;
  backface-visibility: hidden;
}

.front {
  background-color: white;
}

.back {
  transform: rotateY(180deg);
  background: linear-gradient(to left, #e0e0e0, #ffffff 30%);
}

.outside p {
  font-size: 23px;
  text-transform: uppercase;
  margin-top: 30px;
  text-align: center;
  letter-spacing: 6px;
  color: #000046;
}

/* Cake Decoration */
.cake {
  width: 100%;
  position: absolute;
  bottom: 30px;
}

.top-layer,
.middle-layer,
.bottom-layer {
  height: 80px;
  width: 240px;
  background-repeat: repeat;
  background-size: 60px 100px;
  background-image: linear-gradient(
      transparent 50px,
      #fedbab 50px,
      #fedbab 50px,
      transparent 60px
    ),
    radial-gradient(circle at 30px 5px, #994c10 30px, #fcbf29 31px);
  border-radius: 10px 10px 0 0;
  position: relative;
  margin: auto;
}

.middle-layer {
  transform: scale(0.85);
  top: 5px;
}

.top-layer {
  transform: scale(0.7);
  top: 26px;
}

.candle {
  height: 45px;
  width: 15px;
  background: repeating-linear-gradient(
    45deg,
    #fd3018 0,
    #fd3018 5px,
    #ffa89e 5px,
    #ffa89e 10px
  );
  position: absolute;
  margin: auto;
  left: 0;
  right: 0;
  bottom: 202px;
}

.candle::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  background-color: #ffa500;
  border-radius: 50% 50% 0 50%;
  bottom: 48px;
  transform: rotate(45deg);
  left: -1px;
}
