:root {
  --pink: #ff5e9d;
  --hot: #e92f78;
  --purple: #8f66bb;
  --gold: #f5bd50;
  --ink: #683653;
}

* { box-sizing: border-box; }

html, body { overflow-x: hidden; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  font-family: Georgia, serif;
  background: linear-gradient(145deg, #fffafd, #fff0f7 50%, #f5edff);
}

.glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle at 10% 10%, #ff91bd55, transparent 25%),
    radial-gradient(circle at 90% 35%, #bb91ef44, transparent 25%),
    radial-gradient(circle at 50% 100%, #ffd47e3b, transparent 25%);
}

header {
  max-width: 1100px;
  margin: auto;
  padding: 22px clamp(20px, 5vw, 55px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-style: italic;
}

header button, .pink-btn {
  font: inherit;
  cursor: pointer;
}

header button {
  color: var(--hot);
  background: #ffffffaa;
  border: 1px solid #f6a6c6;
  border-radius: 999px;
  padding: 10px 15px;
}

.hero {
  text-align: center;
  padding: 40px 20px 50px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--hot);
  text-transform: uppercase;
  letter-spacing: .18em;
  font: bold .68rem Arial, sans-serif;
}

h1 {
  margin: 0;
  font-size: clamp(2.7rem, 9vw, 5.8rem);
  line-height: .94;
  color: #79375f;
  text-shadow: 0 4px white;
}

h1 em {
  display: block;
  color: var(--hot);
  font-weight: normal;
}

h2 {
  color: #813e67;
  font-size: clamp(1.55rem, 4vw, 2.45rem);
}

.subtitle, .hint {
  color: #76455f;
  font-size: 1.08rem;
}

.heart-scene {
  width: min(430px, 78vw);
  height: min(430px, 78vw);
  position: relative;
  display: block;
  margin: 18px auto 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  perspective: 800px;
}

.heart-outline {
  position: absolute;
  inset: 4%;
  animation: spin 22s linear infinite;
}

.heart-outline span {
  position: absolute;
  color: #bd286a;
  font: bold clamp(.55rem, 1.7vw, .8rem) Arial, sans-serif;
  white-space: nowrap;
  text-shadow: 0 1px white, 1px 1px 2px #ff8fba;
}

.heart {
  position: absolute;
  width: 43%;
  height: 43%;
  top: 25%;
  left: 28.5%;
  border-radius: 13% 0;
  transform: rotate(-45deg) rotateX(10deg);
  background: linear-gradient(135deg, #ffb3cf, #ff3e8d 50%, #b91457);
  box-shadow:
    inset 13px 10px 18px #ffffff99,
    inset -15px -15px 20px #850d44a8,
    18px 24px 0 #bd16585a,
    0 28px 38px #bd16585a;
  animation: heartbeat 2.4s ease-in-out infinite;
}

.heart::before, .heart::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: inherit;
  box-shadow: inherit;
}

.heart::before { top: -50%; }
.heart::after { left: 50%; }

.heart i {
  position: absolute;
  z-index: 3;
  top: -30%;
  left: 10%;
  width: 22%;
  height: 40%;
  background: #ffffff88;
  border-radius: 50%;
  filter: blur(2px);
}

.heart-scene small {
  position: absolute;
  bottom: 7%;
  left: 0;
  right: 0;
  color: #a34a77;
  font: italic .95rem Arial;
}

.cards {
  max-width: 1100px;
  margin: auto;
  padding: 10px clamp(16px, 4vw, 45px) 70px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card {
  text-align: center;
  padding: 28px 20px;
  border: 1px solid white;
  border-radius: 27px;
  background: #ffffffb8;
  box-shadow: 0 16px 42px #aa2c6838;
  transition: transform .3s;
}

.card:hover { transform: translateY(-6px); }
.card h2 { font-size: 1.35rem; }
.card p { line-height: 1.5; }

.icon {
  display: grid;
  place-items: center;
  width: 57px;
  height: 57px;
  margin: auto;
  border-radius: 50%;
  color: white;
  font-size: 1.65rem;
  background: linear-gradient(135deg, #ffc5da, #ec4e8a);
}

.pink-btn {
  border: 0;
  border-radius: 999px;
  padding: 13px 18px;
  color: white;
  font-weight: bold;
  background: linear-gradient(120deg, var(--hot), #ff77a9);
  box-shadow: 0 8px 16px #e835794d;
  transition: .25s;
}

.pink-btn:hover { transform: translateY(-2px); }

.reveal {
  padding: 10px;
  color: #954169;
  border-radius: 12px;
  background: #fff0f6;
  animation: reveal .6s both;
}

.gift {
  position: relative;
  width: 90px;
  height: 73px;
  margin: 18px auto 0;
  border-radius: 4px;
  background: #f04688;
  box-shadow: inset -8px -8px #c72061;
  transform: scale(0);
  transition: .5s;
}

.gift.open { transform: scale(1); }

.gift b {
  position: absolute;
  left: -5px;
  top: -13px;
  width: 100px;
  height: 23px;
  border-radius: 4px;
  background: #ff75a6;
}

.gift i {
  position: absolute;
  left: 38px;
  top: 0;
  width: 15px;
  height: 100%;
  background: #ffd46c;
}

.gift span {
  position: absolute;
  inset: 23px 0;
  color: white;
  font-size: 1.6rem;
}

.cake-area {
  text-align: center;
  padding: 55px 20px 80px;
  background: linear-gradient(transparent, #fff8fc);
}

.cake {
  position: relative;
  display: block;
  width: 250px;
  height: 235px;
  margin: 16px auto 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.cake-base {
  position: absolute;
  left: 25px;
  bottom: 18px;
  width: 200px;
  height: 88px;
  border-radius: 18px 18px 33px 33px;
  background: linear-gradient(90deg, #f54189, #ff80af 42%, #ec3e81);
  box-shadow: inset 0 -13px #ca2466, 0 10px 15px #b8285840;
}

.cake-base i {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 18px;
  margin: 18px 16px;
  border-radius: 0 0 50% 50%;
  background: #ffd86d;
}

.frosting {
  position: absolute;
  bottom: 91px;
  left: 21px;
  width: 208px;
  height: 43px;
  border-radius: 24px 24px 10px 10px;
  background: #fff4fa;
}

.cake-top {
  position: absolute;
  bottom: 120px;
  left: 37px;
  width: 176px;
  height: 26px;
  border-radius: 50%;
  background: #ffd2e3;
}

.candle {
  position: absolute;
  bottom: 142px;
  width: 11px;
  height: 55px;
  z-index: 2;
  border-radius: 6px;
  background: repeating-linear-gradient(45deg, #fdf5ff 0 6px, #9873c3 6px 12px);
}

.c1 { left: 69px; }
.c2 { left: 119px; height: 68px; }
.c3 { right: 69px; }

.candle i {
  position: absolute;
  top: -17px;
  left: -4px;
  width: 19px;
  height: 26px;
  border-radius: 60% 40% 60% 40%;
  transform: rotate(45deg);
  background: linear-gradient(#fff9a7, #ffae38 45%, #ed5a3e);
  box-shadow: 0 0 14px #ffc842;
  animation: flame .55s infinite alternate;
}

.cake.blown .candle i {
  opacity: 0;
  transform: translateY(-12px) scale(.25);
  animation: none;
}

.cake-message {
  color: var(--hot);
  font-weight: bold;
  font-size: 1.1rem;
  animation: reveal .6s both;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  background: #63204770;
  transition: .3s;
}

.modal.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  position: relative;
  max-width: 510px;
  padding: 50px 34px 36px;
  text-align: center;
  border-radius: 30px;
  background: linear-gradient(145deg, white, #fff4f8);
  box-shadow: 0 25px 90px #44102699;
  transform: translateY(25px) scale(.94);
  transition: .3s;
}

.modal.open .modal-box { transform: none; }
.modal-box p { font-size: 1.1rem; line-height: 1.7; }

.close {
  position: absolute;
  right: 14px;
  top: 8px;
  border: 0;
  color: var(--hot);
  background: none;
  font-size: 2rem;
  cursor: pointer;
}

.big-star { color: var(--gold); font-size: 2.3rem; }

#particles {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  left: var(--x);
  top: var(--y);
  color: var(--color);
  font-size: var(--size);
  animation: burst var(--duration) ease-out forwards;
}

footer {
  padding: 25px;
  text-align: center;
  color: #914d72;
  font-style: italic;
}

@keyframes heartbeat {
  0%, 100% { transform: rotate(-45deg) rotateX(10deg) scale(1); }
  45% { transform: rotate(-45deg) rotateX(10deg) scale(1.07); }
}

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes flame {
  to { transform: rotate(38deg) scale(.82); }
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes burst {
  to {
    opacity: 0;
    transform: translate(var(--move-x), var(--move-y)) rotate(420deg);
  }
}

@media (max-width: 720px) {
  .cards {
    grid-template-columns: 1fr;
    max-width: 460px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}