* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Poppins", Arial, sans-serif;
  background: linear-gradient(135deg, #ff9a9e, #fecfef);
  min-height: 100svh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  overflow-x: hidden;
}

.hearts {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.heart-float {
  position: absolute;
  bottom: -40px;
  opacity: 0.25;
  animation: floatUp linear infinite;
}

@keyframes floatUp {
  from {
    transform: translateY(0) scale(1);
  }
  to {
    transform: translateY(-110vh) scale(1.3);
  }
}

.container {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
}

.page {
  display: none;
  text-align: center;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
  padding: 30px 25px;
  border-radius: 25px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  animation: fadeIn 0.6s ease;
}

.page.active {
  display: block;
}

h1 {
  color: white;
  margin-bottom: 20px;
  font-size: 2rem;
}

.card {
  background: white;
  border-radius: 20px;
  padding: 20px;
  color: #333;
  line-height: 1.6;
}

.answer-buttons {
  margin-top: 25px;
  display: flex;
  gap: 15px;
}

.answer-buttons button,
#back-btn {
  flex: 1;
  padding: 15px;
  font-size: 1.1rem;
  border-radius: 15px;
  border: none;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.answer-buttons button:hover,
#back-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

#yes-btn {
  background: linear-gradient(135deg, #ff6f91, #ff9671);
  color: white;
  font-weight: bold;
  animation: pulse 2s infinite;
}

#no-btn,
#back-btn {
  background: #f5f5f5;
  color: #555;
}

.gif {
  width: 100%;
  max-width: 300px;
  border-radius: 15px;
  margin: 20px 0;
}

.heart {
  display: inline-block;
  animation: heartBeat 1.2s infinite;
  transform-origin: center;
}

@keyframes heartBeat {
  0% {
    transform: scale(1);
  }
  20% {
    transform: scale(1.25);
  }
  40% {
    transform: scale(1);
  }
  60% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 111, 145, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 15px rgba(255, 111, 145, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 111, 145, 0);
  }
}

@media (max-width: 400px) {
  h1 {
    font-size: 1.6rem;
  }
  .card {
    font-size: 0.95rem;
  }
}
