:root {
  color-scheme: dark;
  font-family: Georgia, "Times New Roman", serif;
  background: #16040d;
  color: #fff8fa;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow-x: hidden;
  padding: clamp(20px, 5vw, 56px);
  background:
    radial-gradient(circle at 50% 0%, rgba(166, 38, 89, 0.42), transparent 42%),
    linear-gradient(145deg, #10030a 0%, #330a1c 52%, #17030d 100%);
}

.glow {
  position: fixed;
  width: 340px;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.28;
  pointer-events: none;
}

.glow-one {
  top: -130px;
  left: -100px;
  background: #ff4f87;
}

.glow-two {
  right: -140px;
  bottom: -120px;
  background: #c71555;
}

.love-card {
  position: relative;
  z-index: 2;
  width: min(100%, 500px);
  padding: clamp(12px, 2.5vw, 18px);
  border: 1px solid rgba(255, 222, 231, 0.34);
  border-radius: 28px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.045));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(16px);
  animation: arrive 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.photo-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 20px 20px 10px 10px;
  background: #080307;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
}

.photo-wrap img {
  display: block;
  width: 100%;
  max-height: min(67svh, 720px);
  object-fit: cover;
  object-position: center 42%;
  filter: saturate(0.92) contrast(1.04);
}

.photo-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), inset 0 -90px 90px -70px rgba(53, 3, 23, 0.9);
  pointer-events: none;
}

.photo-shine {
  position: absolute;
  inset: -70% auto auto -70%;
  width: 75%;
  aspect-ratio: 1;
  transform: rotate(35deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  animation: shine 8s ease-in-out infinite 1.5s;
}

.message {
  padding: clamp(22px, 5vw, 36px) 12px clamp(18px, 4vw, 28px);
  text-align: center;
}

.heart-mark {
  display: block;
  color: #ff6f9d;
  font-size: 20px;
  filter: drop-shadow(0 0 10px rgba(255, 77, 135, 0.8));
  animation: heartbeat 2.2s ease-in-out infinite;
}

h1 {
  margin: 8px 0 12px;
  font-size: clamp(2.35rem, 8vw, 4.2rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.045em;
  text-wrap: balance;
  background: linear-gradient(110deg, #fff 10%, #ffd5e3 48%, #ff8db2 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 12px 36px rgba(255, 75, 135, 0.16);
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #e85386;
  font-size: 10px;
}

.ornament span {
  width: 58px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 175, 200, 0.7));
}

.ornament span:last-child {
  transform: scaleX(-1);
}

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

.hearts span {
  position: absolute;
  left: var(--x);
  bottom: -40px;
  color: rgba(255, 104, 153, 0.38);
  font-size: var(--size);
  filter: drop-shadow(0 0 6px rgba(255, 67, 130, 0.35));
  animation: float-up var(--duration) linear infinite var(--delay);
}

@keyframes arrive {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.22); }
  28% { transform: scale(1); }
  42% { transform: scale(1.12); }
}

@keyframes float-up {
  0% { transform: translate3d(0, 0, 0) rotate(-8deg); opacity: 0; }
  10% { opacity: 1; }
  50% { transform: translate3d(24px, -52vh, 0) rotate(8deg); }
  90% { opacity: 0.8; }
  100% { transform: translate3d(-12px, -110vh, 0) rotate(-5deg); opacity: 0; }
}

@keyframes shine {
  0%, 35% { transform: translate(-30%, -30%) rotate(35deg); }
  60%, 100% { transform: translate(330%, 330%) rotate(35deg); }
}

@media (max-width: 520px) {
  body { padding: 12px; }
  .love-card { border-radius: 23px; }
  .photo-wrap { border-radius: 16px 16px 8px 8px; }
  .photo-wrap img { max-height: 66svh; }
}

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