:root {
  --pink: #ff5d8f;
  --deep-pink: #d92d67;
  --cream: #fff8f4;
  --ink: #4a2435;
  --glass: rgba(255, 255, 255, 0.72);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow-x: hidden;
  padding: 28px;
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  background:
    radial-gradient(circle at 15% 15%, rgba(255,255,255,.9), transparent 28%),
    radial-gradient(circle at 85% 20%, rgba(255,210,226,.8), transparent 30%),
    linear-gradient(135deg, #ffdbe7 0%, #fff1f5 45%, #ffe8d6 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.18) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.18) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.card,
.photo-card {
  position: relative;
  z-index: 2;
  width: min(720px, 94vw);
  text-align: center;
  padding: clamp(36px, 7vw, 72px);
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 34px;
  background: var(--glass);
  box-shadow: 0 30px 80px rgba(128, 38, 73, .18), inset 0 1px 0 rgba(255,255,255,.95);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: rise .9s cubic-bezier(.2,.8,.2,1) both;
}

.card::after,
.photo-card::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 93, 143, .18);
  border-radius: 26px;
  pointer-events: none;
}

.sparkle {
  font-size: 2rem;
  color: var(--pink);
  margin-bottom: 4px;
  animation: twinkle 2s ease-in-out infinite;
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: .24em;
  font-size: .75rem;
  font-weight: 700;
  color: var(--deep-pink);
}

h1 {
  margin: 0 0 22px;
  font-family: "Great Vibes", cursive;
  font-size: clamp(3rem, 8vw, 5.8rem);
  line-height: .98;
  font-weight: 400;
  color: #8f2451;
  text-shadow: 0 3px 0 rgba(255,255,255,.75);
}

.message {
  margin: 8px 0;
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  font-weight: 600;
}

.love-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
  padding: 16px 24px;
  border-radius: 999px;
  text-decoration: none;
  color: white;
  font-weight: 700;
  background: linear-gradient(135deg, var(--pink), var(--deep-pink));
  box-shadow: 0 14px 30px rgba(217,45,103,.3);
  transition: transform .2s ease, box-shadow .2s ease;
}

.love-button:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 18px 36px rgba(217,45,103,.38);
}

.love-button span { animation: pulse 1.1s infinite; }

.photo-page { padding-block: 34px; }
.photo-card { width: min(900px, 95vw); padding: clamp(24px, 5vw, 48px); }
.photo-card h1 { font-size: clamp(3rem, 7vw, 5rem); margin-bottom: 18px; }

.photo-frame {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  padding: 8px;
  background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(255,175,202,.75));
  box-shadow: 0 22px 50px rgba(110, 42, 70, .22);
}

.photo-frame img {
  display: block;
  width: 100%;
  max-height: 68vh;
  object-fit: cover;
  border-radius: 20px;
}

.back-link {
  display: inline-block;
  margin-top: 22px;
  color: var(--deep-pink);
  font-weight: 700;
  text-decoration: none;
}
.back-link:hover { text-decoration: underline; }

.hearts {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.heart {
  position: absolute;
  bottom: -40px;
  color: rgba(255, 62, 125, .46);
  filter: drop-shadow(0 4px 8px rgba(142, 35, 77, .16));
  animation: floatUp linear infinite;
  user-select: none;
}

@keyframes floatUp {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0; }
  10% { opacity: .9; }
  100% { transform: translate3d(var(--drift), -115vh, 0) rotate(360deg); opacity: 0; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(24px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes twinkle {
  0%,100% { transform: scale(1) rotate(0); opacity: .65; }
  50% { transform: scale(1.25) rotate(18deg); opacity: 1; }
}

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

@media (max-width: 520px) {
  body { padding: 16px; }
  .card, .photo-card { border-radius: 26px; }
  .photo-frame img { max-height: 58vh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}
