@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600&family=Poppins:wght@300;400&display=swap');

/* =========================
   RESET
========================= */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;

  /* Romantic animated gradient */
  background: linear-gradient(
    120deg,
    #ffe4f1,
    #ffd6e8,
    #fbe7ff,
    #fff0f6
  );
  background-size: 400% 400%;
  animation: romanticFlow 20s ease infinite;
}

/* =========================
   BACKGROUND GLOW ORBS
========================= */
body::before,
body::after {
  content: "";
  position: fixed;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.45;
  z-index: -1;
}

body::before {
  background: #ffb3c6;
  top: -20%;
  left: -20%;
  animation: floatOrb 25s ease-in-out infinite;
}

body::after {
  background: #eac7ff;
  bottom: -25%;
  right: -20%;
  animation: floatOrb 30s ease-in-out infinite reverse;
}

@keyframes romanticFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes floatOrb {
  0% { transform: translate(0, 0); }
  50% { transform: translate(80px, 60px); }
  100% { transform: translate(0, 0); }
}

/* =========================
   PAGE LAYOUT
========================= */
.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom);
}

/* =========================
   CARD
========================= */
.card {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 26px;
  padding: 26px;
  text-align: center;
  box-shadow: 0 25px 60px rgba(255,92,138,0.25);
  animation: cardIn 0.8s ease;
  position: relative;
}

/* =========================
   TEXT
========================= */
h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(22px, 5vw, 28px);
  margin: 0 0 10px;
}

p {
  font-size: clamp(14px, 3.8vw, 16px);
  line-height: 1.6;
  color: #444;
  margin: 10px 0;
}

/* =========================
   MEDIA
========================= */
.memory-img,
video {
  width: 100%;
  max-height: 60vh;
  object-fit: cover;
  border-radius: 18px;
  margin: 14px 0;
}

/* =========================
   BUTTON
========================= */
button {
  background: linear-gradient(135deg, #ff5c8a, #ff85a2);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 16px;
  cursor: pointer;
  margin-top: 14px;
  box-shadow: 0 10px 20px rgba(255,92,138,0.35);
  transition: transform 0.2s ease;
}

button:hover {
  transform: scale(1.05);
}

/* =========================
   HEART GAME
========================= */
.heart {
  font-size: clamp(42px, 12vw, 54px);
  cursor: pointer;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* =========================
   FLOATING HEARTS
========================= */
.heart-float {
  position: fixed;
  bottom: -20px;
  pointer-events: none;
  opacity: 0.75;
  animation: floatUp 6.5s linear forwards;
}

@keyframes floatUp {
  to {
    transform: translateY(-120vh) translateX(40px);
    opacity: 0;
  }
}

/* =========================
   SPARKLES
========================= */
.sparkle {
  position: fixed;
  width: 6px;
  height: 6px;
  background: radial-gradient(circle, #fff, rgba(255,255,255,0));
  border-radius: 50%;
  opacity: 0.8;
  pointer-events: none;
  animation: sparkleFloat linear forwards;
}

@keyframes sparkleFloat {
  from { transform: translateY(0) scale(1); opacity: 1; }
  to { transform: translateY(-120vh) scale(0.3); opacity: 0; }
}

/* =========================
   PETALS (FINAL SCREEN)
========================= */
.petal {
  position: fixed;
  top: -20px;
  font-size: 18px;
  opacity: 0.6;
  pointer-events: none;
  animation: petalFall linear forwards;
}

@keyframes petalFall {
  to {
    transform: translateY(120vh) rotate(360deg);
    opacity: 0;
  }
}

/* =========================
   I LOVE YOU TEXT
========================= */
.love-text {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 8vw, 42px);
  margin-top: 22px;
  color: #ff4d6d;
  text-align: center;
  opacity: 1;

  text-shadow:
    0 0 10px rgba(255, 92, 138, 0.4),
    0 0 30px rgba(255, 92, 138, 0.25);

  animation: lovePop 2.5s ease forwards;
}

@keyframes lovePop {
  0% { transform: scale(0.9); }
  60% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* =========================
   CARD ENTRY
========================= */
@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* =========================
   DESKTOP TWEAKS
========================= */
@media (min-width: 768px) {
  .card {
    padding: 32px;
  }

  video,
  .memory-img {
    max-height: 420px;
  }
}
