:root {
  --bg: #0b0f14;
  --card: #121824;
  --text: #e7eefc;
  --accent: #ff7aa2;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, sans-serif;
  background: radial-gradient(circle at center, #1a2236, #0b0f14);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px; 
}

.top {
  position: absolute;
  top: 10px;
  left: 10px;
}

.top img {
  height: 40px;
  padding: 5px;
  margin: 5px;
}

.container {
  max-width: 600px;
  width: 100%; 
  padding: 20px;
  text-align: center;
}

h1 {
  margin-bottom: 20px;
  font-size: 1.8rem;
}

.card {
  background: var(--card);
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

label {
  display: block;
  margin-bottom: 10px;
  font-weight: bold;
}

input[type="date"] {
  padding: 10px;
  border-radius: 8px;
  border: none;
  margin-bottom: 15px;
  width: 100%;
  font-size: 1rem;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.error {
  color: #ff5555;
  margin-top: 10px;
}

.result {
  margin-top: 20px;
}

.beats {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--accent);
}

.subtext {
  margin-top: 6px;
  font-size: 0.9rem;
  color: #aaa;
}


.heart {
  width: 50px;
  height: 50px;
  background: var(--accent);
  margin: 12px auto;
  transform: rotate(-45deg);
  position: relative;
  animation: pulse 1s infinite;
}

.heart::before,
.heart::after {
  content: "";
  width: 50px;
  height: 50px;
  background: var(--accent);
  border-radius: 50%;
  position: absolute;
}

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

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

@keyframes pulse {
  0% {
    transform: rotate(-45deg) scale(1);
  }
  50% {
    transform: rotate(-45deg) scale(1.2);
  }
  100% {
    transform: rotate(-45deg) scale(1);
  }
}


@media (max-width: 768px) {
  .container {
    padding: 15px;
  }
  h1 {
    font-size: 1.6rem;
  }
  .heart {
    width: 40px;
    height: 40px;
  }
  .heart::before,
  .heart::after {
    width: 40px;
    height: 40px;
  }
  .heart::before {
    top: -20px;
  }
  .heart::after {
    left: 20px;
  }
}


@media (max-width: 480px) {
  .container {
    padding: 10px;
  }
  h1 {
    font-size: 1.4rem;
  }
  .beats {
    font-size: 1.4rem;
  }
  input[type="date"] {
    font-size: 0.9rem;
    padding: 8px;
  }
  .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
  }
  .heart {
    width: 30px;
    height: 30px;
  }
  .heart::before,
  .heart::after {
    width: 30px;
    height: 30px;
  }
  .heart::before {
    top: -15px;
  }
  .heart::after {
    left: 15px;
  }
}
