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

:root {
  --rose: #e8a0a0;
  --rose-deep: #c97b7b;
  --cream: #fdf6f0;
  --blush: #f5d5d5;
  --text: #5c4040;
  --gold: #c9a86c;
}

body {
  font-family: "Outfit", sans-serif;
  min-height: 100vh;
  background: linear-gradient(
    165deg,
    var(--cream) 0%,
    var(--blush) 50%,
    #f0c8c8 100%
  );
  color: var(--text);
  overflow-x: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

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

.heart {
  position: absolute;
  font-size: 1.2rem;
  opacity: 0.15;
  animation: float 8s ease-in-out infinite;
}

.heart:nth-child(1) {
  left: 10%;
  top: 20%;
  animation-delay: 0s;
}
.heart:nth-child(2) {
  left: 80%;
  top: 30%;
  animation-delay: -2s;
  font-size: 1rem;
}
.heart:nth-child(3) {
  left: 25%;
  top: 70%;
  animation-delay: -4s;
  font-size: 0.9rem;
}
.heart:nth-child(4) {
  left: 70%;
  top: 75%;
  animation-delay: -1s;
}
.heart:nth-child(5) {
  left: 50%;
  top: 15%;
  animation-delay: -3s;
  font-size: 0.8rem;
}
.heart:nth-child(6) {
  left: 15%;
  top: 50%;
  animation-delay: -5s;
}
.heart:nth-child(7) {
  left: 85%;
  top: 55%;
  animation-delay: -2.5s;
  font-size: 1.1rem;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(5deg);
  }
}

/* Card entrance */
.card {
  position: relative;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(196, 120, 120, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.8);
  transition: transform 0.4s ease;
  animation: cardEnter 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  opacity: 0;
  transform: translateY(40px) scale(0.95);
}

.card.entered {
  transform: translateY(0) scale(1);
}

@keyframes cardEnter {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card:hover {
  transform: scale(1.02);
}

.card h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 600;
  color: var(--rose-deep);
  margin-bottom: 0.5rem;
  line-height: 1.3;
  animation: titleBounce 0.6s ease 0.4s both;
}

@keyframes titleBounce {
  0% {
    opacity: 0;
    transform: translateY(-15px) scale(0.95);
  }
  60% {
    transform: translateY(4px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card .sub {
  font-size: 0.95rem;
  font-weight: 300;
  opacity: 0.85;
  margin-bottom: 1rem;
}

.gif-wrap {
  width: 100%;
  max-width: 200px;
  margin: 0 auto 1.25rem;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(196, 120, 120, 0.25);
  animation: gifPop 0.6s ease 0.5s both;
}

.gif-wrap img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

@keyframes gifPop {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

.btn {
  font-family: "Outfit", sans-serif;
  font-size: 1rem;
  font-weight: 500;
  padding: 0.85rem 1.8rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-yes {
  background: linear-gradient(135deg, var(--rose) 0%, var(--rose-deep) 100%);
  color: white;
  box-shadow: 0 4px 20px rgba(201, 123, 123, 0.4);
}

.btn-yes:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(201, 123, 123, 0.5);
  animation: wiggle 0.4s ease;
}

.btn-yes:active {
  animation: yesPop 0.3s ease;
}

@keyframes wiggle {
  0%,
  100% {
    transform: scale(1.08) rotate(0deg);
  }
  25% {
    transform: scale(1.1) rotate(-3deg);
  }
  75% {
    transform: scale(1.1) rotate(3deg);
  }
}

@keyframes yesPop {
  0% {
    transform: scale(1.08);
  }
  50% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1.08);
  }
}

.btn-no {
  position: relative;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  border: 2px solid var(--blush);
  transition: left 0.25s ease-out, top 0.25s ease-out, transform 0.2s;
}

.btn-no:hover {
  transform: scale(1.05);
}

/* When No button has run away (position:fixed), it keeps a high z-index so it stays clickable */
.btn-no.is-running {
  z-index: 100;
}

/* Success screen */
.success {
  display: none;
  position: relative;
  z-index: 2;
}

.success.show {
  display: block;
  animation: fadeIn 0.6s ease;
}

.ask.hide {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.success h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--rose-deep);
  margin-bottom: 0.75rem;
}

.success p {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 1.5rem;
}

.success .heart-big {
  font-size: 4rem;
  animation: pulse 1s ease infinite;
}

.success .gif-wrap {
  max-width: 180px;
  margin-bottom: 1rem;
  animation: gifPop 0.5s ease 0.2s both;
}

.success .gif-wrap img {
  border-radius: 12px;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
}

/* Confetti container */
#confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  animation: confetti-fall 3s ease-out forwards;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(-10vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

.heart-rise {
  position: fixed;
  pointer-events: none;
  z-index: 9;
  animation: heartRise 2.5s ease-out forwards;
}

@keyframes heartRise {
  0% {
    transform: translateY(0) scale(0);
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) scale(1);
    opacity: 0;
  }
}
