* {
  box-sizing: border-box;
}

:root {
  --pink: #ff5f91;
  --deep-pink: #d92f68;
  --soft-pink: #fff0f5;
  --cream: #fffaf7;
  --text: #4a2835;
  --muted: #805a68;
  --white: rgba(255, 255, 255, 0.88);
  --shadow: 0 24px 70px rgba(129, 42, 76, 0.18);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "DM Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, #ffe0ec 0, transparent 32%),
    radial-gradient(circle at bottom right, #ffd7e5 0, transparent 30%),
    linear-gradient(145deg, #fff8fb 0%, #fff0f5 50%, #fff9f2 100%);
}

button {
  font: inherit;
}

.background-glow {
  position: fixed;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  filter: blur(65px);
  opacity: 0.35;
  pointer-events: none;
}

.glow-one {
  background: #ff7da7;
  top: -120px;
  right: -80px;
}

.glow-two {
  background: #ffc875;
  bottom: -150px;
  left: -100px;
}

main {
  min-height: 100vh;
}

.screen {
  min-height: 100vh;
  width: 100%;
  padding: 28px 18px;
  display: none;
  place-items: center;
  position: relative;
  z-index: 2;
  animation: fadeIn 0.8s ease;
}

.screen.active {
  display: grid;
}

.card,
.wide-card {
  width: min(92vw, 720px);
  padding: clamp(28px, 6vw, 58px);
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: 32px;
  background: var(--white);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  text-align: center;
}

.wide-card {
  width: min(94vw, 1050px);
}

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

h1 {
  margin: 0;
  font-family: "Great Vibes", cursive;
  font-size: clamp(3.6rem, 12vw, 7rem);
  font-weight: 400;
  line-height: 1;
  color: var(--deep-pink);
}

h2 {
  margin: 8px 0 18px;
  font-size: clamp(1.8rem, 5vw, 3rem);
  line-height: 1.15;
}

.intro,
.typed-message,
.final-message {
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.8;
}

.primary-button,
.secondary-button {
  border: 0;
  border-radius: 999px;
  padding: 15px 24px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
  margin-top: 20px;
  color: white;
  background: linear-gradient(135deg, #ff5f91, #d92f68);
  box-shadow: 0 12px 28px rgba(217, 47, 104, 0.28);
}

.secondary-button {
  color: var(--deep-pink);
  background: #ffe5ef;
}

.primary-button:hover,
.secondary-button:hover,
.reason-card:hover {
  transform: translateY(-3px);
}

.tiny-note {
  margin: 18px 0 0;
  color: #a78390;
  font-size: 0.82rem;
}

.typed-message {
  min-height: 180px;
  white-space: pre-line;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 30px 0;
}

.photo-card {
  margin: 0;
  padding: 12px 12px 18px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 18px 38px rgba(81, 36, 54, 0.16);
  transition: transform 0.25s ease;
}

.photo-card:hover {
  transform: rotate(0) scale(1.04);
}

.tilt-left {
  transform: rotate(-3deg);
}

.tilt-right {
  transform: rotate(3deg);
}

.photo-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 6px;
  background: #f7dce6;
}

.photo-card figcaption {
  padding-top: 12px;
  color: var(--muted);
  font-family: "Great Vibes", cursive;
  font-size: 1.5rem;
}

.reason-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 26px;
}

.reason-card {
  min-height: 170px;
  padding: 24px;
  border: 1px solid #ffd5e4;
  border-radius: 24px;
  background: rgba(255,255,255,0.78);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.3s ease;
}

.reason-card span {
  display: block;
  font-size: 2rem;
}

.reason-card strong {
  display: block;
  margin: 10px 0 8px;
  font-size: 1.1rem;
}

.reason-card small {
  display: none;
  color: var(--muted);
  line-height: 1.55;
}

.reason-card.open {
  background: #fff0f5;
}

.reason-card.open small {
  display: block;
  animation: fadeIn 0.45s ease;
}

.unlock-message {
  color: var(--muted);
  margin-top: 24px;
}

.big-heart {
  font-size: 4rem;
  animation: heartbeat 1.4s infinite;
}

.signature {
  margin-top: 28px;
  color: var(--deep-pink);
  font-family: "Great Vibes", cursive;
  font-size: 2rem;
}

.hug-message {
  color: var(--deep-pink);
  font-weight: 700;
}

.hidden {
  display: none !important;
}

.music-control {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 8px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.85);
  box-shadow: 0 10px 30px rgba(70, 24, 43, 0.15);
  color: var(--muted);
  font-size: 0.8rem;
}

.music-control button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: var(--pink);
  cursor: pointer;
}

.floating-heart {
  position: fixed;
  bottom: -40px;
  z-index: 1;
  pointer-events: none;
  animation: floatUp linear forwards;
}

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

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.14); }
  30% { transform: scale(1); }
  45% { transform: scale(1.09); }
}

@keyframes floatUp {
  to {
    transform: translateY(-115vh) rotate(360deg);
    opacity: 0;
  }
}

@media (max-width: 760px) {
  .gallery,
  .reason-grid {
    grid-template-columns: 1fr;
  }

  .gallery {
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
  }

  .card,
  .wide-card {
    padding: 28px 20px;
    border-radius: 24px;
  }

  .typed-message {
    min-height: 250px;
  }
}
