* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #ff4d8d;
  --primary-dark: #d92d72;
  --secondary: #7c3aed;
  --cream: #fff7fb;
  --text: #24172a;
  --muted: #75697a;
  --white: #ffffff;
  --shadow: 0 24px 60px rgba(129, 38, 88, 0.14);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  color: var(--text);
  background: var(--cream);
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(135deg, #fff2f8, #f5edff);
  display: grid;
  place-content: center;
  text-align: center;
  transition: opacity .6s ease, visibility .6s ease;
}

#loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-heart {
  font-size: 58px;
  color: var(--primary);
  animation: pulse 0.9s infinite;
}

#loader p {
  margin-top: 12px;
  color: var(--muted);
}

@keyframes pulse {
  50% { transform: scale(1.25); }
}

#confetti {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
}

#heart-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}

.floating-heart {
  position: absolute;
  bottom: -40px;
  color: rgba(255, 77, 141, .5);
  animation: floatHeart linear forwards;
}

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

.music-button {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 120;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 14px 35px rgba(217, 45, 114, .35);
  font-size: 22px;
  transition: .25s ease;
}

.music-button:hover {
  transform: translateY(-4px) scale(1.04);
}

.music-button.playing {
  animation: musicPulse 1.2s infinite;
}

@keyframes musicPulse {
  50% { box-shadow: 0 0 0 10px rgba(255,77,141,.12); }
}

.hero {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  display: grid;
  align-items: center;
  padding: 110px max(6vw, 24px) 80px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 77, 141, .18), transparent 35%),
    radial-gradient(circle at 85% 60%, rgba(124, 58, 237, .18), transparent 35%),
    linear-gradient(135deg, #fff7fb 0%, #f8efff 100%);
}

.navbar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 22px max(6vw, 24px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.logo {
  text-decoration: none;
  font-family: "Great Vibes", cursive;
  font-size: 34px;
  color: var(--primary-dark);
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: .2s ease;
}

.nav-links a:hover {
  color: var(--primary);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 0;
  font-size: 28px;
  cursor: pointer;
}

.hero-content {
  max-width: 720px;
  position: relative;
  z-index: 4;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(54px, 9vw, 112px);
  line-height: .88;
  letter-spacing: -6px;
  font-weight: 800;
}

.hero h2 {
  font-family: "Great Vibes", cursive;
  font-size: clamp(56px, 9vw, 110px);
  font-weight: 400;
  color: var(--primary);
  margin-top: 14px;
  line-height: 1;
}

.hero-text {
  max-width: 610px;
  margin-top: 26px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 15px 24px;
  font-family: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: .25s ease;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 16px 32px rgba(217, 45, 114, .26);
}

.btn-primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 36px rgba(217, 45, 114, .36);
}

.btn-secondary {
  color: var(--text);
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(255,255,255,.9);
  backdrop-filter: blur(12px);
}

.btn-secondary:hover {
  transform: translateY(-4px);
  background: white;
}

.birthday-card {
  position: absolute;
  right: 8vw;
  top: 50%;
  transform: translateY(-50%);
  width: min(310px, 30vw);
  aspect-ratio: 4/5;
  border-radius: 36px;
  padding: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(255,255,255,.85);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  z-index: 3;
}

.card-ring {
  position: absolute;
  inset: 18px;
  border: 1px dashed rgba(255,77,141,.35);
  border-radius: 28px;
}

.cake {
  font-size: 72px;
  z-index: 1;
}

.birthday-card p,
.birthday-card strong,
.birthday-card span {
  z-index: 1;
}

.birthday-card p {
  margin-top: 20px;
  color: var(--muted);
}

.birthday-card strong {
  margin: 8px 0;
  font-family: "Great Vibes", cursive;
  font-size: 48px;
  color: var(--primary-dark);
}

.birthday-card span {
  font-size: 13px;
  color: var(--muted);
}

.floating-card {
  animation: floating 4s ease-in-out infinite;
}

@keyframes floating {
  50% { transform: translateY(calc(-50% - 16px)) rotate(1deg); }
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  opacity: .65;
}

.glow-one {
  width: 220px;
  height: 220px;
  background: rgba(255,77,141,.16);
  left: -70px;
  bottom: 10%;
}

.glow-two {
  width: 300px;
  height: 300px;
  background: rgba(124,58,237,.12);
  right: -80px;
  top: -60px;
}

.scroll-indicator {
  position: absolute;
  bottom: 28px;
  left: 50%;
  width: 30px;
  height: 48px;
  border: 2px solid rgba(36,23,42,.3);
  border-radius: 999px;
  transform: translateX(-50%);
}

.scroll-indicator span {
  display: block;
  width: 5px;
  height: 9px;
  border-radius: 9px;
  margin: 8px auto 0;
  background: var(--primary);
  animation: scrollDown 1.8s infinite;
}

@keyframes scrollDown {
  70% { transform: translateY(19px); opacity: 0; }
  100% { opacity: 0; }
}

.section {
  padding: 110px max(6vw, 24px);
}

.section-heading {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 54px;
}

.section-heading span {
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 12px;
  font-weight: 700;
}

.section-heading h3 {
  margin-top: 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.15;
}

.section-heading p {
  margin-top: 14px;
  color: var(--muted);
}

.about-section {
  background: white;
}

.message-card {
  max-width: 900px;
  margin: auto;
  padding: 58px;
  border-radius: 30px;
  background: linear-gradient(135deg, #fff5fa, #f7f0ff);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.message-card::before {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  right: -60px;
  top: -60px;
  background: rgba(255,77,141,.12);
}

.quote-mark {
  font-family: Georgia, serif;
  font-size: 100px;
  line-height: .65;
  color: rgba(255,77,141,.25);
}

.message-card p {
  position: relative;
  font-size: 17px;
  line-height: 2;
  color: #54495a;
}

.message-card p + p {
  margin-top: 22px;
}

.signature {
  margin-top: 28px;
  font-family: "Great Vibes", cursive;
  font-size: 36px;
  color: var(--primary-dark);
}

.memories-section {
  background: #fff8fc;
}

.gallery {
  max-width: 1160px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 300px;
  gap: 22px;
}

.gallery-card {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: white;
}

.gallery-card.tall {
  grid-row: span 2;
}

.gallery-card.wide {
  grid-column: span 2;
}

.gallery-card img {
  width: 100%;
  height: 200%;
  object-fit: cover;
  transition: transform .6s ease;
}

.gallery-card:hover img {
  transform: scale(1.06);
}

.gallery-card figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 60px 22px 22px;
  display: flex;
  flex-direction: column;
  color: white;
  background: linear-gradient(transparent, rgba(24,10,28,.82));
}

.gallery-card figcaption strong {
  font-size: 18px;
}

.gallery-card figcaption span {
  font-size: 13px;
  opacity: .86;
  margin-top: 3px;
}

.wishes-section {
  background: white;
}

.wish-grid {
  max-width: 1120px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.wish-card {
  padding: 34px 26px;
  border-radius: 24px;
  border: 1px solid #f2e7ef;
  background: #fff;
  transition: .3s ease;
}

.wish-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow);
  border-color: transparent;
}

.wish-icon {
  width: 54px;
  height: 54px;
  border-radius: 17px;
  display: grid;
  place-content: center;
  font-size: 25px;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  margin-bottom: 22px;
}

.wish-card h4 {
  font-size: 21px;
  margin-bottom: 10px;
}

.wish-card p {
  color: var(--muted);
  line-height: 1.8;
  font-size: 14px;
}

.tips-section {
  background: linear-gradient(135deg, #2d1637, #1d1531);
  color: white;
}

.tips-section .section-heading span {
  color: #ff8eb8;
}

.timeline {
  max-width: 900px;
  margin: auto;
}

.timeline-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 24px;
  padding: 30px 0;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.timeline-number {
  font-size: 35px;
  font-weight: 800;
  color: #ff8eb8;
}

.timeline-item h4 {
  font-size: 21px;
  margin-bottom: 7px;
}

.timeline-item p {
  color: rgba(255,255,255,.66);
  line-height: 1.8;
}

.final-surprise {
  min-height: 78vh;
  display: grid;
  place-items: center;
  padding: 90px 24px;
  text-align: center;
  background:
    radial-gradient(circle at center, rgba(255,77,141,.2), transparent 35%),
    linear-gradient(135deg, #fff3f8, #f5edff);
}

.final-content {
  max-width: 760px;
}

.sparkle {
  font-size: 34px;
  color: var(--primary);
}

.final-content > p:first-of-type {
  color: var(--muted);
  margin: 12px 0;
}

.final-content h3 {
  font-family: "Great Vibes", cursive;
  font-size: clamp(56px, 9vw, 100px);
  color: var(--primary-dark);
  line-height: 1;
}

.big-cake {
  font-size: 82px;
  margin: 20px 0;
}

.final-message {
  color: var(--muted);
  font-size: 18px;
  margin-bottom: 28px;
}

footer {
  padding: 32px 24px;
  text-align: center;
  background: #1b1220;
  color: rgba(255,255,255,.76);
}

footer span {
  display: block;
  margin-top: 8px;
  color: #ff8eb8;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(19,8,24,.68);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: .3s ease;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  width: min(460px, 100%);
  background: white;
  border-radius: 28px;
  padding: 44px 30px 34px;
  text-align: center;
  position: relative;
  transform: translateY(20px) scale(.96);
  transition: .3s ease;
}

.modal.active .modal-card {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  border: 0;
  background: transparent;
  font-size: 30px;
  cursor: pointer;
  color: var(--muted);
}

.modal-icon {
  font-size: 58px;
}

.modal-card h3 {
  margin: 12px 0 8px;
  font-size: 30px;
}

.modal-card p {
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 24px;
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .birthday-card {
    opacity: .32;
    right: -80px;
    width: 330px;
  }

  .hero-content {
    max-width: 680px;
  }

  .wish-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .navbar {
    padding-top: 18px;
  }

  .menu-toggle {
    display: block;
    z-index: 11;
  }

  .nav-links {
    position: absolute;
    top: 70px;
    left: 20px;
    right: 20px;
    padding: 22px;
    border-radius: 20px;
    flex-direction: column;
    background: rgba(255,255,255,.95);
    box-shadow: var(--shadow);
    transform: translateY(-20px);
    opacity: 0;
    visibility: hidden;
    transition: .25s ease;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .hero {
    min-height: 100svh;
    padding-top: 120px;
    align-items: start;
  }

  .hero h1 {
    letter-spacing: -3px;
  }

  .birthday-card {
    display: none;
  }

  .scroll-indicator {
    display: none;
  }

  .section {
    padding: 80px 20px;
  }

  .message-card {
    padding: 38px 25px;
  }

  .message-card p {
    font-size: 15px;
  }

  .gallery {
    grid-template-columns: 1fr;
    grid-auto-rows: 310px;
  }

  .gallery-card.tall,
  .gallery-card.wide {
    grid-row: auto;
    grid-column: auto;
  }

  .wish-grid {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 58px 1fr;
    gap: 14px;
  }

  .timeline-number {
    font-size: 26px;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .hero-text {
    font-size: 15px;
  }

  .hero h2 {
    margin-top: 18px;
  }

  .gallery {
    grid-auto-rows: 260px;
  }

  .section-heading {
    margin-bottom: 36px;
  }

  .music-button {
    width: 48px;
    height: 48px;
    right: 14px;
    bottom: 14px;
  }
}
