body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: #fce4ec; /* Light pink background */
  margin: 0;
}

.heart {
  position: relative;
  width: 100px;
  height: 100px;
  background-color: #ff4d4d; /* Heart color */
  transform: rotate(-45deg);
  animation: heartbeat 1.2s infinite ease-in-out; /* Makes it move */
}

/* Creating the rounded tops of the heart */
.heart::before,
.heart::after {
  content: "";
  position: absolute;
  width: 100px;
  height: 100px;
  background-color: #ff4d4d;
  border-radius: 50%;
}

.heart::before {
  top: -50px;
  left: 0;
}

.heart::after {
  left: 50px;
  top: 0;
}

/* The moving animation */
@keyframes heartbeat {
  0% {
    transform: rotate(-45deg) scale(1);
  }
  25% {
    transform: rotate(-45deg) scale(1.1);
  }
  50% {
    transform: rotate(-45deg) scale(1.3); /* The "beat" peak */
  }
  100% {
    transform: rotate(-45deg) scale(1);
  }
}
