:root {
  --bg: #07050a;
  --pink: #ff5fae;
  --soft-pink: #ffc4df;
  --white: #fff7fb;
  --muted: #c9b5c3;
  --glass: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 95, 174, 0.22), transparent 32rem),
    radial-gradient(circle at 10% 88%, rgba(255, 255, 255, 0.08), transparent 18rem),
    var(--bg);
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
}

button {
  font: inherit;
}

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

.glow {
  position: absolute;
  width: 16rem;
  height: 16rem;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.22;
}

.glow-one {
  top: -3rem;
  right: -5rem;
  background: #ff68b7;
}

.glow-two {
  bottom: -4rem;
  left: -5rem;
  background: #ffffff;
}

.star,
.tiny-heart {
  position: absolute;
  opacity: 0;
  animation: floatUp linear infinite;
}

.star {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 12px white;
}

.tiny-heart {
  color: rgba(255, 175, 215, 0.82);
  font-size: 0.8rem;
  text-shadow: 0 0 14px rgba(255, 95, 174, 0.75);
}

.app {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.screen {
  width: min(100%, 25rem);
  min-height: 29rem;
  display: none;
  place-items: center;
  align-content: center;
  gap: 1.35rem;
  text-align: center;
  padding: 2rem 1.15rem;
  animation: fadeIn 650ms ease both;
}

.screen.active {
  display: grid;
}

.eyebrow {
  margin: 0;
  color: var(--soft-pink);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16rem;
  text-transform: uppercase;
  text-shadow: 0 0 16px rgba(255, 95, 174, 0.7);
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.15rem, 12vw, 3.3rem);
  line-height: 1.02;
  text-wrap: balance;
  text-shadow: 0 0 28px rgba(255, 95, 174, 0.72);
}

.primary-btn,
.mute-btn {
  border: 1px solid rgba(255, 255, 255, 0.34);
  color: var(--white);
  background: linear-gradient(135deg, rgba(255, 95, 174, 0.95), rgba(255, 255, 255, 0.18));
  box-shadow: 0 0 22px rgba(255, 95, 174, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(18px);
}

.primary-btn {
  min-width: 10rem;
  min-height: 3.25rem;
  border-radius: 999px;
  padding: 0.85rem 1.35rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.primary-btn:active {
  transform: scale(0.97);
}

.mute-btn {
  position: fixed;
  z-index: 5;
  top: max(1rem, env(safe-area-inset-top));
  right: 1rem;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  cursor: pointer;
}

.mute-btn.is-muted {
  opacity: 0.58;
  background: rgba(255, 255, 255, 0.08);
}

.surprise-card {
  width: 100%;
  min-height: 21rem;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 1.3rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(10, 7, 15, 0.72);
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.38), 0 0 34px rgba(255, 95, 174, 0.2);
  backdrop-filter: blur(22px);
}

.surprise-card.fade {
  animation: cardFade 520ms ease both;
}

.love-message {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 8vw, 2.55rem);
  line-height: 1.1;
  text-wrap: balance;
  text-shadow: 0 0 24px rgba(255, 95, 174, 0.56);
}

.photo-frame {
  width: min(100%, 18rem);
  aspect-ratio: 3 / 4;
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: linear-gradient(135deg, rgba(255, 95, 174, 0.2), rgba(255, 255, 255, 0.08));
  box-shadow: 0 0 28px rgba(255, 95, 174, 0.26);
}

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

.photo-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
  background: rgba(7, 5, 10, 0.58);
}

.rose {
  position: relative;
  width: 12rem;
  height: 15rem;
  display: grid;
  place-items: center;
}

.rose-bloom {
  position: relative;
  width: 8rem;
  height: 8rem;
  animation: rosePulse 2.8s ease-in-out infinite;
}

.petal {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 3.7rem;
  height: 5.4rem;
  border-radius: 58% 42% 60% 40%;
  background: linear-gradient(145deg, #ff9acb, #ff2d8f 55%, #b60056);
  transform-origin: 0.3rem 4.4rem;
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.22), 0 0 18px rgba(255, 95, 174, 0.38);
}

.petal:nth-child(1) { transform: translate(-50%, -68%) rotate(0deg); }
.petal:nth-child(2) { transform: translate(-50%, -68%) rotate(45deg); }
.petal:nth-child(3) { transform: translate(-50%, -68%) rotate(90deg); }
.petal:nth-child(4) { transform: translate(-50%, -68%) rotate(135deg); }
.petal:nth-child(5) { transform: translate(-50%, -68%) rotate(180deg); }
.petal:nth-child(6) { transform: translate(-50%, -68%) rotate(225deg); }
.petal:nth-child(7) { transform: translate(-50%, -68%) rotate(270deg); }
.petal:nth-child(8) { transform: translate(-50%, -68%) rotate(315deg); }

.rose-center {
  position: absolute;
  inset: 2.3rem;
  border-radius: 50%;
  background: radial-gradient(circle, #fff2f8 0 10%, #ff5fae 42%, #9b0049 72%);
  box-shadow: 0 0 24px rgba(255, 95, 174, 0.7);
}

.stem {
  position: absolute;
  top: 8.2rem;
  left: 50%;
  width: 0.34rem;
  height: 6rem;
  border-radius: 999px;
  background: linear-gradient(#6af0a2, #18884e);
  transform: translateX(-50%);
}

.leaf {
  position: absolute;
  top: 11rem;
  width: 3.6rem;
  height: 1.6rem;
  border-radius: 100% 0;
  background: linear-gradient(135deg, #75f0a7, #116d3e);
}

.leaf-left {
  left: 2.7rem;
  transform: rotate(22deg);
}

.leaf-right {
  right: 2.6rem;
  transform: scaleX(-1) rotate(22deg);
}

.burst-heart {
  position: fixed;
  left: 50%;
  bottom: -2rem;
  z-index: 4;
  color: #ff8fc6;
  pointer-events: none;
  text-shadow: 0 0 18px rgba(255, 95, 174, 0.8);
  animation: heartBurst 2.8s ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(0.7rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cardFade {
  from { opacity: 0; transform: translateY(0.8rem) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes floatUp {
  0% { opacity: 0; transform: translate3d(0, 10vh, 0) scale(0.7); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--drift), -110vh, 0) scale(1.1); }
}

@keyframes rosePulse {
  0%, 100% { transform: scale(0.98) rotate(-2deg); }
  50% { transform: scale(1.06) rotate(2deg); }
}

@keyframes heartBurst {
  0% { opacity: 0; transform: translate(-50%, 0) scale(0.7) rotate(0deg); }
  12% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--x)), -105vh) scale(1.35) rotate(var(--r)); }
}

@media (max-width: 380px) {
  .screen {
    min-height: 27rem;
    padding-inline: 0.4rem;
  }

  .surprise-card {
    min-height: 19.5rem;
    padding: 1rem;
  }

  .rose {
    transform: scale(0.88);
  }
}

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

  .star,
  .tiny-heart {
    opacity: 0.5;
  }
}
