:root {
  --pink-1: #ffe9f2;
  --pink-2: #ffcde4;
  --pink-3: #ff9bc9;
  --lavender: #e6ddff;
  --peach: #ffd8c7;
  --white: #ffffff;
  --text-dark: #4c2a4d;
  --text-light: #6b416f;
  --glow: 0 0 16px rgba(255, 155, 201, 0.7);
  --shadow: 0 20px 40px rgba(76, 42, 77, 0.15);
}

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

body {
  min-height: 100vh;
  font-family: "Quicksand", system-ui, sans-serif;
  color: var(--text-dark);
  background: linear-gradient(160deg, var(--lavender), var(--pink-1), var(--peach));
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("https://images.unsplash.com/photo-1501004318641-b39e6451bec6?auto=format&fit=crop&w=1600&q=80")
    center/cover no-repeat;
  opacity: 0.22;
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: -20%;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.65), transparent 45%),
    radial-gradient(circle at 70% 30%, rgba(255, 216, 199, 0.55), transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(230, 221, 255, 0.6), transparent 50%);
  filter: blur(10px);
  z-index: -1;
}

.bg-hearts {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.6), transparent 60%),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.5), transparent 55%),
    radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.4), transparent 55%);
  z-index: -1;
  overflow: hidden;
}

.center-wrapper,
.celebrate-wrapper {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.card,
.celebrate-card {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 28px;
  padding: 36px 28px;
  box-shadow: var(--shadow);
  text-align: center;
  max-width: 520px;
  width: 100%;
  backdrop-filter: blur(10px);
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.6);
  overflow: hidden;
  transition: transform 0.3s ease;
}

.page-question .card:hover,
.page-celebrate .celebrate-card:hover {
  transform: translateY(-4px);
}

.card::before,
.celebrate-card::before {
  content: "";
  position: absolute;
  inset: -40% 0 auto 0;
  height: 160px;
  background: linear-gradient(120deg, rgba(255, 155, 201, 0.45), rgba(230, 221, 255, 0));
  transform: rotate(-6deg);
  animation: glowShift 8s ease-in-out infinite;
  pointer-events: none;
}

.eyebrow {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 12px;
}

.title {
  font-family: "Pacifico", cursive;
  font-size: clamp(2.1rem, 3.2vw, 3rem);
  color: var(--text-dark);
  margin-bottom: 12px;
  background: linear-gradient(120deg, #ff7fb8, #9b7cff, #ff7fb8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% auto;
  animation: shimmer 6s ease-in-out infinite;
}

.subtitle {
  color: var(--text-light);
  margin-bottom: 24px;
}

.button-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn {
  border: none;
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  text-decoration: none;
  color: var(--text-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-yes {
  background: linear-gradient(120deg, var(--pink-3), var(--pink-2));
  box-shadow: 0 12px 24px rgba(255, 155, 201, 0.4);
}

.btn-yes:hover,
.btn-yes:focus {
  transform: scale(1.06);
  box-shadow: var(--glow);
}

.btn-no {
  background: rgba(255, 255, 255, 0.7);
  border: 1px dashed rgba(255, 155, 201, 0.8);
}

.page-question .btn-no {
  position: relative;
}

.celebrate-title {
  font-family: "Pacifico", cursive;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  margin-bottom: 24px;
  background: linear-gradient(120deg, #ff7fb8, #9b7cff, #ff7fb8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% auto;
  animation: shimmer 6s ease-in-out infinite;
}

.poem p {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  font-size: 1.05rem;
  color: var(--text-light);
  margin-bottom: 12px;
}

.poem p.visible {
  opacity: 1;
  transform: translateY(0);
}

.final-line {
  font-style: italic;
  color: var(--text-dark);
  text-shadow: 0 0 10px rgba(255, 155, 201, 0.8);
}

#confettiCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.cursor-sparkles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

.music-toggle {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 12px 24px rgba(255, 155, 201, 0.35);
  color: var(--text-dark);
  font-size: 1.2rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 5;
}

.music-toggle:hover {
  transform: scale(1.08);
  box-shadow: var(--glow);
}

.music-toggle.pulse {
  animation: pulse 1.6s ease-in-out infinite;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.sparkle {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 1), rgba(255, 155, 201, 0.3));
  animation: sparkle 0.9s ease-out forwards;
}

@keyframes sparkle {
  0% {
    opacity: 1;
    transform: scale(1) translate(0, 0);
  }
  100% {
    opacity: 0;
    transform: scale(0.2) translate(0, -20px);
  }
}

.floating-heart {
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--pink-3);
  transform: rotate(45deg);
  border-radius: 6px;
  opacity: 0.7;
  animation: floatUp linear infinite;
}

.floating-heart::before,
.floating-heart::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--pink-3);
  border-radius: 50%;
  top: -10px;
  left: 0;
}

.floating-heart::after {
  left: -10px;
  top: 0;
}

.floating-orb {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.5), rgba(255, 155, 201, 0.1));
  animation: floatUp linear infinite;
  opacity: 0.2;
}

@keyframes floatUp {
  from {
    transform: translateY(100vh) rotate(45deg);
  }
  to {
    transform: translateY(-120vh) rotate(45deg);
  }
}

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

@keyframes glowShift {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.9;
  }
}

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

@media (min-width: 700px) {
  .button-row {
    flex-direction: row;
    justify-content: center;
  }
}
