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

body {
  font-family: 'Quicksand', sans-serif;
  background: #FFF0F3;
  color: #5D4157;
  min-height: 100vh;
  overflow: hidden;
}

/* Page states */
.page {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s;
}

.page.active {
  opacity: 1;
  visibility: visible;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem;
  transition: transform 0.3s ease;
}

/* GIF placeholder */
.gif-container {
  position: relative;
  width: min(300px, 75vw);
  aspect-ratio: 1;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, #FFE5EC, #FFC7D8);
  box-shadow: 0 10px 30px rgba(196, 69, 105, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gif-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gif-container img[data-placeholder="true"] {
  display: none;
}

.gif-container img:not([data-placeholder="true"]) ~ .gif-placeholder-text {
  display: none;
}

.gif-placeholder-text {
  position: absolute;
  font-size: 1.1rem;
  font-weight: 700;
  color: #C44569;
  opacity: 0.5;
}

/* Question page */
.question {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 2.5rem;
  color: #5D4157;
}

.button-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* Buttons */
.yes-button {
  padding: 1rem 3rem;
  font-family: 'Quicksand', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #FF6B9D, #C44569);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(255, 107, 157, 0.4);
  transition: transform 0.1s ease, box-shadow 0.3s ease;
}

.yes-button:hover {
  box-shadow: 0 12px 32px rgba(255, 107, 157, 0.55);
  filter: brightness(1.05);
}

.no-button {
  padding: 0.8rem 2rem;
  font-family: 'Quicksand', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #FF6B9D;
  background: transparent;
  border: 2px solid #FF6B9D;
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
  z-index: 10;
}

.no-button.runaway {
  position: fixed;
  transition: none;
}

.no-button:hover {
  background: rgba(255, 107, 157, 0.1);
}

/* Bounce animation on No click */
@keyframes bounce {
  0%, 100% { transform: var(--yes-scale, scale(1)) translateY(0); }
  40% { transform: var(--yes-scale, scale(1)) translateY(-25px); }
  60% { transform: var(--yes-scale, scale(1)) translateY(-10px); }
}

.yes-button.bounce {
  animation: bounce 0.5s ease;
}

/* Pulsating glow after many No clicks */
@keyframes pulsate {
  0%, 100% { box-shadow: 0 8px 24px rgba(255, 107, 157, 0.4); }
  50% { box-shadow: 0 8px 50px rgba(255, 107, 157, 0.8), 0 0 20px rgba(255, 107, 157, 0.3); }
}

.yes-button.pulsate {
  animation: pulsate 1.5s ease-in-out infinite;
}

/* Success page */
#successPage {
  background: linear-gradient(135deg, #FFE5EC, #FFC7D8);
}

.success-title {
  font-family: 'Pacifico', cursive;
  font-size: clamp(3rem, 8vw, 5rem);
  color: #C44569;
  margin-bottom: 1rem;
  animation: popIn 0.7s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.success-text {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 500;
  color: #5D4157;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.4s forwards;
}

@keyframes popIn {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

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

/* Floating hearts */
.hearts-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.heart {
  position: absolute;
  bottom: -50px;
  font-size: 1.8rem;
  opacity: 0;
  animation: floatHeart linear forwards;
}

@keyframes floatHeart {
  0% { transform: translateY(0) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translateY(-110vh) rotate(360deg); opacity: 0; }
}

/* Responsive */
@media (max-width: 768px) {
  .button-container {
    flex-direction: column;
    gap: 1rem;
  }

  .gif-container {
    width: min(260px, 70vw);
  }
}
