@import url("https://fonts.googleapis.com/css2?family=Caveat:wght@400;500;600;700&family=Pacifico&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Caveat", cursive;
  font-size: 1.2rem;
  height: 100vh;
  height: 100dvh;
  width: 100vw;
  width: 100dvw;
  display: flex;
  justify-content: center;
  align-items: center;
  /* Animated Gradient Background */
  background: linear-gradient(
    -45deg,
    #ff9a9e,
    #fecfef,
    #ff758c,
    #ff7eb3,
    #a1c4fd,
    #c2e9fb
  );
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  overflow: hidden;
  position: relative;
}

body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cpath fill='rgba(255,255,255,0.12)' d='M30 43.5l-1.45-1.32C19.4 33.36 15 29.28 15 24.5 15 20.42 18.42 17 22.5 17c2.74 0 5.41 1.81 6.5 3.09 1.09-1.28 3.76-3.09 6.5-3.09 4.08 0 7.5 3.42 7.5 7.5 0 4.78-4.4 8.86-13.55 17.68L30 43.5z'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Floating Hearts */
.hearts-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.heart {
  position: absolute;
  top: 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 24px;
  animation: float 4s ease-in infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes float {
  0% {
    transform: translateY(-10vh) scale(0.5) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
    transform: translateY(10vh) scale(1) rotate(45deg);
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(110vh) scale(1.5) rotate(360deg);
    opacity: 0;
  }
}

.card {
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: none;
  border-radius: 35px;
  padding: 50px 40px;
  text-align: center;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.15),
    inset 0 0 20px rgba(255, 255, 255, 0.5);
  z-index: 10;
  max-width: 90%;
  width: 450px;
  transition: all 0.3s ease;
  position: relative;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 35px;
  filter: url('#wavy');
  pointer-events: none;
}

.gif-container {
  margin-bottom: 20px;
  min-height: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.emoji-display {
  font-size: 5rem;
  transition: transform 0.3s ease;
  animation: gentleBounce 2s infinite alternate ease-in-out;
}

@keyframes gentleBounce {
  0% {
    transform: translateY(0) scale(1);
  }
  100% {
    transform: translateY(-10px) scale(1.05);
  }
}

.emoji-display:hover {
  transform: scale(1.15) rotate(5deg);
  animation: none;
}

h1 {
  font-family: "Pacifico", cursive;
  color: #fff;
  font-size: 2.8rem;
  margin-bottom: 15px;
  text-shadow: 3px 3px 6px rgba(255, 71, 87, 0.4);
  transition: all 0.3s ease;
  line-height: 1.3;
}

p.message {
  color: #fff;
  font-size: 1.3rem;
  margin-bottom: 35px;
  font-weight: 700;
  opacity: 0.95;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

.buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  position: relative;
  min-height: 70px;
}

button {
  font-family: "Caveat", cursive;
  font-size: 1.6rem;
  font-weight: 800;
  padding: 15px 40px;
  border: none;
  border-radius: 40px;
  cursor: pointer;
  position: relative;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.btn-yes {
  background: linear-gradient(45deg, #ff4757, #ff6b81);
  color: white;
  z-index: 2;
  animation: heartbeat 1.5s infinite;
}

.btn-yes::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 3px solid #ff7eb3;
  border-radius: 40px;
  filter: url('#wavy');
  pointer-events: none;
}

@keyframes heartbeat {
  0% {
    transform: scale(1);
  }
  15% {
    transform: scale(1.1);
  }
  30% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.1);
  }
  60% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
}

.btn-yes:hover {
  background: linear-gradient(45deg, #ff6b81, #ff4757);
}

.btn-no {
  background: #fff;
  color: #ff4757;
  z-index: 50;
}

.btn-no::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 3px solid #ff4757;
  border-radius: 40px;
  filter: url('#wavy');
  pointer-events: none;
}

.btn-no.catchable {
  background: #ffeaa7;
  color: #d63031;
}

.btn-no.catchable::before {
  border-color: #d63031;
}

.success-screen {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Keep the gradient background consistent for success */
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  z-index: 100;
}

.success-emoji-container {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 7rem;
  margin-bottom: 20px;
  animation: bounceIn 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.animal {
  display: inline-block;
}

.bear {
  animation: danceLeft 0.8s ease-in-out infinite alternate;
  transform-origin: bottom center;
}

.panda {
  animation: danceRight 0.8s ease-in-out infinite alternate;
  transform-origin: bottom center;
  animation-delay: 0.2s;
}

.floating-heart-img {
  width: 80px;
  height: 80px;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ff4757'%3e%3cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3e%3c/svg%3e");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  animation: heartbeat 1s infinite;
  display: inline-block;
}

@keyframes danceLeft {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  100% {
    transform: translateY(-20px) rotate(-15deg);
  }
}

@keyframes danceRight {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  100% {
    transform: translateY(-20px) rotate(15deg);
  }
}

@keyframes bounceIn {
  0% {
    transform: scale(0.1);
    opacity: 0;
  }
  60% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}

.success-screen h1 {
  font-size: 4rem; /* Slightly smaller for mobile */
  color: white;
  text-align: center;
  text-shadow: 4px 4px 15px rgba(255, 71, 87, 0.5);
  animation: fadeInDown 1s ease 0.3s both;
  margin: 0 10px;
  line-height: 1.5;
}

.success-screen p {
  font-size: 1.8rem;
  color: white;
  text-align: center;
  font-weight: 700;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
  animation: fadeInUp 1s ease 0.6s both;
  margin-top: 10px;
  margin-bottom: 30px;
}

.btn-share {
  background: linear-gradient(45deg, #1dd1a1, #10ac84);
  color: white;
  z-index: 101;
  font-size: 1.4rem;
  padding: 12px 30px;
  animation: fadeInUp 1s ease 0.9s both;
}

.btn-share::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 3px solid #1dd1a1;
  border-radius: 40px;
  filter: url('#wavy');
  pointer-events: none;
}

.btn-share:hover {
  background: linear-gradient(45deg, #10ac84, #1dd1a1);
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.footer {
  position: absolute;
  bottom: 20px;
  width: 100%;
  text-align: center;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 200;
  pointer-events: none;
  letter-spacing: 1.5px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

.footer a {
  pointer-events: auto;
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s;
}

.footer a:hover {
  opacity: 0.8;
}
