*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(ellipse 120% 80% at 50% 100%, #2d0a1a 0%, #0a0408 45%, #000 100%);
  color: #fce4ec;
}

main {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  pointer-events: none;
}

main > * {
  pointer-events: auto;
}

.card {
  max-width: min(92vw, 420px);
  padding: 1rem 1rem 1.25rem;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 182, 193, 0.06));
  border: 1px solid rgba(255, 182, 193, 0.25);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  text-align: center;
}

.card h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.15rem, 4vw, 1.5rem);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.photo-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: rgba(0, 0, 0, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.photo-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fallback {
  display: none;
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #f8bbd0;
}

.hint {
  margin: 1rem 0 0;
  font-size: 0.8rem;
  opacity: 0.75;
}

/* Heart trail spans — based on droidevs/HeartTrailAnimation (Apache-2.0) */
body > span.heart-trail {
  background: url("https://cdn0.iconfinder.com/data/icons/small-n-flat/24/678087-heart-256.png");
  position: fixed;
  pointer-events: none;
  width: 100px;
  height: 100px;
  background-size: cover;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  animation: heart-float 6s linear forwards;
  z-index: 5;
}

@keyframes heart-float {
  0% {
    transform: translate(-50%, -50%);
    opacity: 1;
    filter: hue-rotate(0);
  }
  100% {
    transform: translate(-50%, -5000%);
    opacity: 0;
    filter: hue-rotate(720deg);
  }
}
