
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@500;600;700&display=swap');

:root {
  --pink: #ed80aa;
  --deep-pink: #d9578b;
  --light-pink: #fff0f5;
  --soft-pink: #ffe0eb;
  --text: #70495a;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: linear-gradient(145deg, #fff7fa, #ffeaf2, #fff5f8);
  overflow-x: hidden;
  min-height: 100vh;
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

/* Opening screen */

.opening {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 20%, #ffffff, transparent 35%),
    linear-gradient(135deg, #fff5f9, #ffdce9, #fff0f5);
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.opening.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.envelope {
  font-size: clamp(4rem, 12vw, 6rem);
  animation: float 2.5s ease-in-out infinite;
  filter: drop-shadow(0 12px 14px #d9578b20);
  margin-bottom: 18px;
}

.small-title {
  font-size: 0.75rem;
  letter-spacing: 4px;
  font-weight: 700;
  color: var(--deep-pink);
  margin-bottom: 18px;
}

.opening h1,
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.7rem, 9vw, 5.4rem);
  line-height: 1.13;
  color: #9d456d;
}

.opening-text {
  margin: 20px 0 28px;
  line-height: 1.8;
  max-width: 360px;
}

.tiny-note {
  margin-top: 25px;
  font-size: 0.8rem;
  opacity: 0.75;
}

/* Buttons */

.main-btn {
  border: none;
  border-radius: 50px;
  padding: 14px 26px;
  background: linear-gradient(135deg, #ef8bb2, #d9578b);
  color: white;
  font-weight: 700;
  box-shadow: 0 9px 25px #d9578b30;
  transition: transform 0.25s, box-shadow 0.25s;
}

.main-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px #d9578b45;
}

.main-btn:active {
  transform: scale(0.97);
}

.link-btn {
  display: inline-block;
  text-decoration: none;
  margin-top: 25px;
}

.secondary-btn {
  background: white;
  color: var(--deep-pink);
  border: 1px solid #f3bfd2;
  border-radius: 50px;
  padding: 12px 22px;
  margin-top: 12px;
}

/* Countdown */

.countdown {
  position: fixed;
  z-index: 20;
  inset: 0;
  background: #fff0f5f5;
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}

.countdown span {
  font-family: 'Playfair Display', serif;
  font-size: clamp(6rem, 25vw, 11rem);
  color: var(--deep-pink);
  animation: pop 0.6s ease;
}

.countdown p {
  font-size: 1rem;
}

/* Main hero */

#birthday {
  position: relative;
  animation: reveal 1s ease both;
}

.hero {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 22px;
}

.sparkle {
  color: var(--pink);
  letter-spacing: 10px;
  margin-bottom: 30px;
  font-size: 1.6rem;
}

.hero h1 span {
  color: var(--deep-pink);
}

.subtitle {
  max-width: 520px;
  line-height: 1.9;
  margin-top: 22px;
  color: #8e6577;
}

/* Sections */

.section {
  width: min(100% - 36px, 1000px);
  margin: 0 auto;
  padding: 70px 0;
}

.section-heading {
  text-align: center;
  margin-bottom: 38px;
}

.section-heading > span {
  display: block;
  font-size: 2.4rem;
  margin-bottom: 14px;
}

.section-heading h2,
.surprise-card h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 5vw, 2.7rem);
  color: #a64d73;
  margin-bottom: 12px;
}

.section-heading p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #997487;
}

/* Birthday letter */

.letter {
  max-width: 720px;
  margin: auto;
  padding: clamp(24px, 6vw, 48px);
  border: 1px solid #f7d6e3;
  border-radius: 24px;
  background: #ffffffbd;
  box-shadow: 0 16px 45px #b94b7510;
  line-height: 1.95;
}

.letter p + p {
  margin-top: 18px;
}

.letter-greeting {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--deep-pink);
}

.letter-ending {
  color: #bc5480;
  font-weight: 700;
}

.signature {
  font-family: 'Playfair Display', serif;
  font-style: italic;
}

/* Photo gallery */

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.photo-card {
  background: white;
  padding: 10px 10px 18px;
  border-radius: 15px;
  box-shadow: 0 10px 30px #8c4c6514;
  transition: transform 0.3s ease;
}

.photo-card:nth-child(2) {
  transform: translateY(18px) rotate(2deg);
}

.photo-card:nth-child(1) {
  transform: rotate(-2deg);
}

.photo-card:hover {
  transform: translateY(-8px) rotate(0);
}

.photo-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 10px;
  background: var(--soft-pink);
}

.photo-card figcaption {
  text-align: center;
  font-family: 'Playfair Display', serif;
  margin-top: 15px;
  font-size: 0.95rem;
}

.photo-note {
  text-align: center;
  font-size: 0.8rem;
  margin-top: 38px;
  color: #a17a8c;
}

/* Cake */

.cake-section {
  text-align: center;
}

.cake {
  width: 230px;
  height: 205px;
  position: relative;
  margin: 25px auto 20px;
  animation: float 3s ease-in-out infinite;
}

.cake-plate {
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 230px;
  height: 15px;
  background: #f7c7d8;
  border-radius: 50%;
  box-shadow: 0 5px 0 #e9a4bd;
}

.cake-layer {
  position: absolute;
  left: 25px;
  width: 180px;
  border-radius: 12px 12px 18px 18px;
}

.layer-one {
  bottom: 20px;
  height: 68px;
  background: linear-gradient(#f7b4cf, #e987b0);
  box-shadow: inset 0 -8px #db6d9b;
}

.layer-two {
  bottom: 85px;
  height: 49px;
  background: linear-gradient(#fff1f6, #ffcadd);
  border-bottom: 9px solid #f4a3c2;
}

.cake-top {
  position: absolute;
  bottom: 122px;
  left: 25px;
  width: 180px;
  height: 22px;
  background: #fff4f8;
  border-radius: 50%;
  z-index: 2;
}

.candles {
  position: absolute;
  bottom: 137px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 24px;
  z-index: 3;
}

.candle {
  width: 9px;
  height: 42px;
  position: relative;
  border-radius: 4px;
  background: repeating-linear-gradient(
    135deg,
    #fff 0 5px,
    #e981ab 5px 9px
  );
}

.flame {
  position: absolute;
  top: -19px;
  left: -2px;
  width: 13px;
  height: 18px;
  background: #ffbd56;
  border-radius: 50% 50% 45% 45%;
  box-shadow: 0 0 18px #ffb347aa;
  transform-origin: bottom center;
  animation: flicker 0.6s infinite alternate;
}

.cake.blown .flame {
  opacity: 0;
  transform: scale(0);
  transition: 0.3s ease;
}

.cake-text {
  margin: 20px auto;
  line-height: 1.7;
}

/* Surprise */

.surprise-card {
  text-align: center;
  background: linear-gradient(135deg, #fff, #fff0f5);
  border: 1px solid #f8d5e3;
  border-radius: 28px;
  padding: clamp(25px, 6vw, 55px);
  box-shadow: 0 15px 45px #a9487210;
}

.gift {
  display: block;
  font-size: 3.8rem;
  margin-bottom: 18px;
  animation: float 2s ease-in-out infinite;
}

.surprise-card > p {
  margin: 14px 0 25px;
  line-height: 1.7;
}

.secret-message {
  margin: 28px auto 0;
  padding: 25px;
  border-radius: 20px;
  background: #fff;
  line-height: 1.9;
  animation: reveal 0.7s ease both;
}

.big-heart {
  font-size: 3.2rem;
  animation: heartbeat 1.4s infinite;
}

.secret-message h3 {
  font-family: 'Playfair Display', serif;
  color: #b94e7b;
  font-size: 1.4rem;
  margin: 12px 0;
}

.final-wish {
  color: var(--deep-pink);
  font-weight: 700;
}

/* Music player */

.music-player {
  position: fixed;
  z-index: 5;
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100% - 36px);
  padding: 12px 15px;
  border-radius: 18px;
  background: #ffffffed;
  border: 1px solid #f5d5e2;
  box-shadow: 0 8px 28px #8e42651c;
  backdrop-filter: blur(12px);
}

.music-icon {
  font-size: 1.6rem;
}

.music-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.music-info strong {
  font-size: 0.75rem;
}

.music-info span {
  font-size: 0.68rem;
  color: #a17a8c;
}

.music-btn {
  border: none;
  background: var(--soft-pink);
  color: #b84e79;
  width: 37px;
  height: 37px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Footer */

footer {
  text-align: center;
  padding: 45px 20px 110px;
  font-size: 0.85rem;
  line-height: 2;
  color: #a17a8c;
}

footer p {
  color: var(--deep-pink);
  font-weight: 700;
}

/* Floating hearts */

.floating-hearts {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.heart {
  position: absolute;
  bottom: -50px;
  color: #ed80aa;
  opacity: 0;
  animation: rise linear forwards;
}

/* Animations */

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes flicker {
  from { transform: rotate(-7deg) scale(1); }
  to { transform: rotate(7deg) scale(1.08); }
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.12); }
  30% { transform: scale(1); }
  45% { transform: scale(1.08); }
}

@keyframes pop {
  from { transform: scale(0.3); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes rise {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  10% { opacity: 0.65; }
  100% {
    transform: translateY(-115vh) rotate(35deg);
    opacity: 0;
  }
}

/* Responsive layout */

@media (max-width: 650px) {
  .hero {
    min-height: 82vh;
    padding: 65px 20px;
  }

  .section {
    padding: 48px 0;
  }

  .gallery {
    grid-template-columns: 1fr;
    gap: 22px;
    max-width: 340px;
    margin: auto;
  }

  .photo-card:nth-child(1),
  .photo-card:nth-child(2) {
    transform: none;
  }

  .photo-card img {
    aspect-ratio: 4 / 3;
  }

  .photo-note {
    margin-top: 24px;
  }

  .music-player {
    right: 10px;
    bottom: 10px;
    gap: 9px;
    padding: 9px 11px;
  }

  .music-info strong {
    font-size: 0.68rem;
  }

  .music-info span {
    font-size: 0.62rem;
  }

  .letter {
    padding: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================
   PERSONAL FINAL BIRTHDAY MESSAGE
   ========================================== */

#secretMessage {
  margin: 28px auto 0;
  padding: clamp(22px, 5vw, 38px);
  max-width: 720px;
  border: 1px solid #f7d6e3;
  border-radius: 24px;
  background: linear-gradient(145deg, #fff0f5, #fffafd, #ffeaf2);
  box-shadow: 0 12px 35px #d9578b12;
  color: var(--text);
  text-align: center;
  line-height: 1.95;
  animation: finalMessageReveal 0.8s ease both;
}

#secretMessage p {
  max-width: 620px;
  margin: 20px auto;
  line-height: 1.95;
}

#secretMessage .small-title {
  margin: 12px 0 18px;
  color: var(--deep-pink);
  font-size: 0.72rem;
  letter-spacing: 3px;
  font-weight: 700;
}

#secretMessage h3 {
  font-family: 'Playfair Display', serif;
  color: #b94e7b;
  font-size: clamp(1.35rem, 4vw, 1.8rem);
  line-height: 1.5;
  margin: 18px 0;
}

#secretMessage .big-heart {
  font-size: 3.2rem;
  margin-bottom: 14px;
}

#secretMessage .final-wish {
  color: var(--deep-pink);
  font-weight: 700;
  margin-top: 28px;
}

#secretMessage .signature {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  color: #b94e7b;
  margin-top: 24px;
}

.final-decoration {
  margin-top: 24px;
  font-size: 1.8rem;
  letter-spacing: 5px;
  animation: finalDecorationFloat 2s ease-in-out infinite;
}

@keyframes finalMessageReveal {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes finalDecorationFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@media (max-width: 650px) {
  #secretMessage {
    padding: 22px 17px;
  }

  #secretMessage p {
    line-height: 1.85;
  }
}

/* JIGYASA'S REPLY FORM */

.answer-form {
  max-width: 650px;
  margin: 0 auto;
  padding: clamp(22px, 5vw, 38px);
  background: linear-gradient(145deg, #fff, #fff0f5);
  border: 1px solid #f7d6e3;
  border-radius: 24px;
  box-shadow: 0 12px 35px #d9578b12;
}

.answer-form label {
  display: block;
  margin-bottom: 12px;
  color: #b94e7b;
  font-weight: 700;
}

.answer-form textarea {
  display: block;
  width: 100%;
  min-height: 160px;
  padding: 16px;
  border: 1px solid #f0c4d5;
  border-radius: 16px;
  background: #fffafd;
  color: var(--text);
  font: inherit;
  line-height: 1.8;
  resize: vertical;
  outline: none;
  margin-bottom: 20px;
}

.answer-form textarea:focus {
  border-color: var(--deep-pink);
  box-shadow: 0 0 0 3px #d9578b18;
}

.answer-form .main-btn {
  width: 100%;
}

.answer-note {
  margin-top: 16px;
  text-align: center;
  font-size: 0.82rem;
  color: #a17a8c;
  line-height: 1.7;
}
