/* ===== IMPORTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Outfit:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
  --midnight: #0a0015;
  --deep-purple: #1a0a2e;
  --rose-pink: #ff6b8a;
  --warm-gold: #ffd700;
  --soft-blush: #ffb6c1;
  --lavender: #b388ff;
  --starlight: #f0e6ff;
  --dark-rose: #2a0a1a;
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.12);
  --letter-bg: #fdf6ee;
  --letter-text: #3a2a1a;
}

/* ===== GLOBAL RESET ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--midnight);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--rose-pink), var(--warm-gold));
  border-radius: 3px;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--midnight);
  color: var(--starlight);
  overflow-x: hidden;
  min-height: 100vh;
  background: linear-gradient(-45deg, #0a0015, #1a0a2e, #2a0a1a, #0f0520);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

/* ===== KEYFRAMES ===== */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.3), 0 0 10px rgba(255, 107, 138, 0.2); }
  50% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.6), 0 0 40px rgba(255, 107, 138, 0.4); }
}

@keyframes petalFall {
  0% {
    transform: translateY(-10vh) rotate(0deg) translateX(0);
    opacity: 1;
  }
  25% { transform: translateY(25vh) rotate(90deg) translateX(30px); }
  50% { transform: translateY(50vh) rotate(180deg) translateX(-20px); opacity: 0.8; }
  75% { transform: translateY(75vh) rotate(270deg) translateX(25px); }
  100% {
    transform: translateY(110vh) rotate(360deg) translateX(-10px);
    opacity: 0;
  }
}

@keyframes heartFloat {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  50% { transform: translateY(-50vh) scale(1.2); opacity: 0.7; }
  100% {
    transform: translateY(-100vh) scale(0.8);
    opacity: 0;
  }
}

@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0); }
  50% { opacity: 1; transform: scale(1); }
}

@keyframes fireworkBurst {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}

@keyframes cakeFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-15px) scale(1.05); }
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

@keyframes heartPulse {
  0% { transform: scale(1); }
  15% { transform: scale(1.3); }
  30% { transform: scale(1); }
  45% { transform: scale(1.2); }
  60% { transform: scale(1); }
}

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

@keyframes musicPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 107, 138, 0.5); }
  70% { box-shadow: 0 0 0 15px rgba(255, 107, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 107, 138, 0); }
}

@keyframes titleGlow {
  0%, 100% { text-shadow: 0 0 10px rgba(255, 215, 0, 0.5), 0 0 20px rgba(255, 215, 0, 0.3), 0 0 40px rgba(255, 215, 0, 0.1); }
  50% { text-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 40px rgba(255, 215, 0, 0.5), 0 0 80px rgba(255, 215, 0, 0.3); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* ===== LOADING SCREEN ===== */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, #1a0a2e, #0a0015);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-content {
  text-align: center;
}

.loading-heart {
  font-size: 4rem;
  animation: heartPulse 1.2s ease-in-out infinite;
  margin-bottom: 1.5rem;
}

.loading-text {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  color: var(--soft-blush);
  letter-spacing: 2px;
  font-weight: 300;
  animation: fadeIn 1s ease;
}

/* ===== FLOATING ELEMENTS ===== */
.floating-elements {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.petal {
  position: absolute;
  width: 12px;
  height: 16px;
  background: radial-gradient(ellipse at 30% 30%, #ff9eb5, #ff6b8a, #cc4466);
  border-radius: 50% 0 50% 50%;
  opacity: 0.6;
  animation: petalFall linear infinite;
  filter: blur(0.5px);
}

.heart {
  position: absolute;
  bottom: -20px;
  color: var(--rose-pink);
  opacity: 0.4;
  animation: heartFloat linear infinite;
  filter: blur(0.3px);
}

.sparkle-dot {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--warm-gold);
  border-radius: 50%;
  animation: sparkle ease-in-out infinite;
  box-shadow: 0 0 6px var(--warm-gold);
}

/* ===== HERO SECTION ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  padding: 2rem;
  overflow: hidden;
}

.hero-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.35;
  filter: blur(2px);
}

.hero-bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(10, 0, 21, 0.3) 0%, rgba(10, 0, 21, 0.7) 70%, rgba(10, 0, 21, 0.95) 100%);
  z-index: 1;
}

/* ===== HERO PHOTO ===== */
.hero-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  margin: 0 auto 2rem;
  overflow: hidden;
  border: 3px solid rgba(255, 215, 0, 0.5);
  box-shadow: 0 0 30px rgba(255, 107, 138, 0.3), 0 0 60px rgba(255, 215, 0, 0.15);
  animation: glow 3s ease-in-out infinite;
  position: relative;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-photo:hover img {
  transform: scale(1.1);
}

.hero-content {
  text-align: center;
  animation: fadeInUp 1.5s ease 0.5s both;
  position: relative;
  z-index: 2;
}

.sparkle-frame {
  position: relative;
  padding: 3rem 4rem;
}

.sparkle-frame::before,
.sparkle-frame::after {
  content: '✦';
  position: absolute;
  font-size: 1.5rem;
  color: var(--warm-gold);
  animation: sparkle 2s ease-in-out infinite;
}

.sparkle-frame::before {
  top: 0;
  left: 0;
}

.sparkle-frame::after {
  bottom: 0;
  right: 0;
  animation-delay: 1s;
}

.hero-subtitle {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 300;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--soft-blush);
  margin-bottom: 1rem;
  animation: fadeIn 2s ease 1s both;
}

.hero-title {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(3rem, 8vw, 6rem);
  color: var(--warm-gold);
  animation: titleGlow 3s ease-in-out infinite;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.hero-name {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(4rem, 12vw, 9rem);
  background: linear-gradient(135deg, var(--rose-pink), var(--warm-gold), var(--lavender), var(--rose-pink));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
  line-height: 1.1;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 30px rgba(255, 107, 138, 0.3));
}

.hero-date {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 300;
  letter-spacing: 6px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.5rem;
}

.scroll-indicator {
  margin-top: 3rem;
  animation: fadeIn 2s ease 2s both;
}

.scroll-indicator span {
  display: block;
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 0.8rem;
}

.scroll-arrow {
  font-size: 1.5rem;
  color: var(--warm-gold);
  animation: scrollBounce 2s ease-in-out infinite;
}

/* ===== SECTION TITLES ===== */
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  text-align: center;
  margin-bottom: 3rem;
  background: linear-gradient(135deg, var(--warm-gold), var(--soft-blush));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== SECTION BACKGROUND IMAGES ===== */
.section-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.2;
}

.section-bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(10, 0, 21, 0.85) 0%, rgba(26, 10, 46, 0.7) 50%, rgba(10, 0, 21, 0.85) 100%);
  z-index: 1;
}

.love-letter-overlay {
  background: linear-gradient(180deg, rgba(10, 0, 21, 0.9) 0%, rgba(42, 10, 26, 0.75) 50%, rgba(10, 0, 21, 0.9) 100%);
}

/* ===== COUNTDOWN SECTION ===== */
.countdown-section {
  padding: 6rem 2rem;
  text-align: center;
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.countdown-inner,
.love-letter-inner {
  position: relative;
  z-index: 2;
}

.countdown-container {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.countdown-item {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  min-width: 120px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: glow 3s ease-in-out infinite;
}

.countdown-item:hover {
  transform: scale(1.08) translateY(-5px);
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

.countdown-number {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--warm-gold);
  line-height: 1;
  margin-bottom: 0.5rem;
  transition: transform 0.3s ease;
}

.countdown-number.flip {
  transform: rotateX(360deg);
}

.countdown-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--soft-blush);
}

.countdown-message {
  font-family: 'Great Vibes', cursive;
  font-size: 2rem;
  color: var(--warm-gold);
  margin-top: 1rem;
}

.birthday-active {
  font-size: 2.5rem;
  animation: pulse 1s ease-in-out infinite;
}

/* ===== LOVE LETTER SECTION ===== */
.love-letter-section {
  padding: 6rem 2rem;
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.envelope {
  max-width: 700px;
  margin: 0 auto;
  perspective: 1000px;
}

.letter-card {
  background: var(--letter-bg);
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 31px,
      rgba(200, 180, 160, 0.15) 31px,
      rgba(200, 180, 160, 0.15) 32px
    );
  border-radius: 12px;
  padding: 3rem 2.5rem;
  color: var(--letter-text);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  position: relative;
  transform-origin: top center;
  animation: letterSlideUp 1s ease both;
  transition: transform 0.5s ease;
  border: 1px solid rgba(200, 180, 160, 0.3);
}

.letter-card:hover {
  transform: rotate(-1deg) translateY(-5px);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.5);
}

.letter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(200, 180, 160, 0.3);
}

.letter-date {
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  color: #8a7a6a;
  font-weight: 300;
  letter-spacing: 2px;
}

.wax-seal {
  width: 50px;
  height: 50px;
  background: radial-gradient(circle at 35% 35%, #e74c6f, #c0392b, #8b1a2b);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow:
    0 4px 15px rgba(199, 57, 43, 0.4),
    inset 0 2px 4px rgba(255, 255, 255, 0.2);
}

.letter-body {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  line-height: 2;
}

.letter-body p {
  margin-bottom: 1.2rem;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.letter-body p.visible {
  opacity: 1;
  transform: translateY(0);
}

.letter-greeting {
  font-family: 'Great Vibes', cursive;
  font-size: 2rem !important;
  color: #c0392b;
  margin-bottom: 1.5rem !important;
}

.letter-closing {
  margin-top: 2rem !important;
  font-style: italic;
}

.letter-signature {
  font-family: 'Great Vibes', cursive;
  font-size: 1.8rem;
  color: #c0392b;
}

/* ===== TIMELINE SECTION ===== */
.timeline-section {
  padding: 6rem 2rem;
  position: relative;
  z-index: 2;
}

/* ===== TIMELINE IMAGES ===== */
.timeline-img {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1rem;
  aspect-ratio: 4/3;
}

.timeline-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  border-radius: 12px;
}

.timeline-card:hover .timeline-img img {
  transform: scale(1.05);
}

.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 0;
}

.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--warm-gold), var(--rose-pink), var(--warm-gold), transparent);
  transform: translateX(-50%);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.timeline-item.left {
  left: 0;
  padding-right: 3rem;
  text-align: right;
}

.timeline-item.right {
  left: 50%;
  padding-left: 3rem;
  text-align: left;
}

.timeline-dot {
  position: absolute;
  width: 16px;
  height: 16px;
  background: var(--warm-gold);
  border-radius: 50%;
  top: 2rem;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.6), 0 0 30px rgba(255, 215, 0, 0.2);
  z-index: 2;
}

.timeline-item.left .timeline-dot {
  right: -8px;
}

.timeline-item.right .timeline-dot {
  left: -8px;
}

.timeline-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 40px rgba(255, 107, 138, 0.15);
  border-color: rgba(255, 215, 0, 0.3);
}

.timeline-date {
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--warm-gold);
  display: block;
  margin-bottom: 0.5rem;
}

.timeline-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
  color: var(--soft-blush);
}

.timeline-card p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(240, 230, 255, 0.75);
  font-weight: 300;
}

/* ===== PHOTO GALLERY ===== */
.gallery-section {
  padding: 6rem 2rem 6rem;
  position: relative;
  z-index: 2;
}

/* Gallery Header Image */
.gallery-header-img {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto 3rem;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 16/7;
}

.gallery-header-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-header-img:hover img {
  transform: scale(1.03);
}

.gallery-header-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(10, 0, 21, 0.4) 0%, rgba(10, 0, 21, 0.8) 80%, rgba(10, 0, 21, 0.95) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gallery-header-overlay .section-title {
  margin-bottom: 0.5rem;
}

.gallery-header-overlay .gallery-subtitle {
  margin-top: 0;
  margin-bottom: 0;
}

.gallery-subtitle {
  text-align: center;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.5);
  margin-top: -2rem;
  margin-bottom: 3rem;
  letter-spacing: 2px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  border: 1px solid var(--glass-border);
}

.gallery-item:hover {
  transform: scale(1.03) translateY(-5px);
  box-shadow: 0 15px 40px rgba(255, 107, 138, 0.2);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-item .caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 1px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.gallery-item:hover .caption {
  transform: translateY(0);
}

/* Placeholder gallery items */
.gallery-item.placeholder {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 2px dashed rgba(255, 215, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-content {
  text-align: center;
  padding: 1rem;
}

.placeholder-icon {
  display: block;
  font-size: 2.5rem;
  margin-bottom: 0.8rem;
  opacity: 0.8;
}

.placeholder-text {
  display: block;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 300;
  letter-spacing: 1px;
}

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  font-size: 2.5rem;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.3s ease;
  z-index: 10001;
}

.lightbox-close:hover {
  transform: scale(1.2) rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  cursor: pointer;
  padding: 1rem;
  border-radius: 50%;
  transition: background 0.3s ease;
}

.lightbox-prev { left: 2rem; }
.lightbox-next { right: 2rem; }

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-img {
  max-width: 85%;
  max-height: 80%;
  border-radius: 8px;
  object-fit: contain;
}

.lightbox-caption {
  position: absolute;
  bottom: 3rem;
  text-align: center;
  width: 100%;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 2px;
}

/* ===== MUSIC PLAYER ===== */
.music-player {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
}

.music-btn {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose-pink), var(--lavender));
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(255, 107, 138, 0.4);
  transition: transform 0.3s ease;
}

.music-btn:hover {
  transform: scale(1.1);
}

.music-btn.playing {
  animation: musicPulse 1.5s ease-in-out infinite;
}

/* ===== FINAL WISH SECTION ===== */
.final-wish {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  padding: 4rem 2rem;
  overflow: hidden;
}

.final-wish-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.4;
}

.final-wish-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(10, 0, 21, 0.3) 0%, rgba(10, 0, 21, 0.7) 70%, rgba(10, 0, 21, 0.9) 100%);
  z-index: 1;
}

.fireworks-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.firework-particle {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  animation: fireworkBurst 1.2s ease-out forwards;
}

.final-content {
  text-align: center;
  position: relative;
  z-index: 3;
}

.final-emoji {
  font-size: 5rem;
  animation: cakeFloat 3s ease-in-out infinite;
  margin-bottom: 2rem;
}

.final-title {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2.5rem, 7vw, 5rem);
  color: var(--warm-gold);
  animation: titleGlow 3s ease-in-out infinite;
  margin-bottom: 0.5rem;
}

.final-name {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(3rem, 9vw, 7rem);
  background: linear-gradient(135deg, var(--rose-pink), var(--warm-gold), var(--lavender));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
  margin-bottom: 2rem;
}

.final-message {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  line-height: 1.9;
  max-width: 650px;
  margin: 0 auto 2rem;
  color: rgba(240, 230, 255, 0.8);
  font-weight: 300;
}

.final-hearts {
  font-size: 2rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.final-hearts span {
  animation: pulse 1.5s ease-in-out infinite;
}

.final-hearts span:nth-child(2) { animation-delay: 0.15s; }
.final-hearts span:nth-child(3) { animation-delay: 0.3s; }
.final-hearts span:nth-child(4) { animation-delay: 0.45s; }
.final-hearts span:nth-child(5) { animation-delay: 0.6s; }

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: 3rem 2rem;
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer p {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 300;
  letter-spacing: 1px;
}

.footer-small {
  font-size: 0.8rem !important;
  margin-top: 0.5rem;
  color: rgba(255, 255, 255, 0.25) !important;
}

/* ===== BIRTHDAY CAKE SECTION ===== */
.cake-section {
  padding: 6rem 2rem;
  position: relative;
  z-index: 2;
}

.cake-content {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.cake-image-wrapper {
  position: relative;
  border-radius: 20px;
  overflow: visible;
  box-shadow: 0 20px 60px rgba(255, 107, 138, 0.2), 0 0 40px rgba(255, 215, 0, 0.1);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
  border: 1px solid var(--glass-border);
}

.cake-image-wrapper:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 30px 80px rgba(255, 107, 138, 0.3), 0 0 60px rgba(255, 215, 0, 0.2);
}

.cake-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.cake-image-wrapper:hover img {
  transform: scale(1.05);
}

.cake-text {
  text-align: left;
}

.cake-text .section-title {
  text-align: left;
  margin-bottom: 1.5rem;
}

.cake-description {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  line-height: 1.9;
  color: rgba(240, 230, 255, 0.75);
  font-weight: 300;
}

/* ===== INTERACTIVE CANDLES ===== */
.candles-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

.candle {
  position: absolute;
  width: 40px;
  height: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  pointer-events: all;
  transform: translateX(-50%);
  transition: filter 0.3s ease;
}

.number-candle {
  width: auto;
  height: auto;
}

.candle-number {
  font-family: 'Outfit', 'Arial Rounded MT Bold', sans-serif;
  font-size: 48px;
  font-weight: 800;
  background: linear-gradient(180deg, #ffe082 0%, #f5c842 30%, #e8a830 60%, #d4881e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));
  line-height: 1;
  text-shadow: none;
  position: relative;
}

/* Add a wax-like stroke/outline to the number */
.candle-number::before {
  content: attr(data-num);
  position: absolute;
  top: 0;
  left: 0;
  font-size: inherit;
  font-weight: inherit;
  -webkit-text-stroke: 2px rgba(200, 150, 50, 0.4);
  -webkit-text-fill-color: transparent;
  z-index: -1;
}

.candle-flame-wrapper {
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.candle-flame {
  width: 12px;
  height: 22px;
  background: radial-gradient(ellipse at 50% 90%, #fff9c4 0%, #ffeb3b 25%, #ff9800 55%, #ff5722 80%, transparent 100%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  animation: flicker 0.15s ease-in-out infinite alternate, sway 1s ease-in-out infinite;
  filter: blur(0.5px);
  opacity: 1;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.candle-glow {
  position: absolute;
  width: 50px;
  height: 50px;
  background: radial-gradient(circle, rgba(255, 200, 50, 0.4) 0%, rgba(255, 150, 0, 0.15) 40%, transparent 70%);
  border-radius: 50%;
  animation: glowPulse 1.5s ease-in-out infinite;
  pointer-events: none;
}

.candle:not(.lit) .candle-flame {
  opacity: 0;
  transform: scale(0);
}

.candle:not(.lit) .candle-glow {
  opacity: 0;
}

/* Smoke effect when blown out */
.candle-smoke {
  position: absolute;
  top: -30px;
  left: 50%;
  width: 6px;
  height: 6px;
  background: rgba(200, 200, 200, 0.6);
  border-radius: 50%;
  animation: smokeRise 1.2s ease-out forwards;
  pointer-events: none;
}

@keyframes flicker {
  0% { transform: scaleY(1) scaleX(1) rotate(-1deg); }
  100% { transform: scaleY(1.08) scaleX(0.95) rotate(1deg); }
}

@keyframes sway {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(2deg); }
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

@keyframes smokeRise {
  0% { opacity: 0.7; transform: translateX(-50%) translateY(0) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-50px) scale(3); }
}

/* ===== BLOW BUTTON ===== */
.blow-btn {
  display: inline-block;
  margin: 1.5rem 0 1rem;
  padding: 0.9rem 2.2rem;
  background: linear-gradient(135deg, var(--rose-pink), var(--lavender));
  color: #fff;
  border: none;
  border-radius: 50px;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 1px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 20px rgba(255, 107, 138, 0.3);
}

.blow-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 30px rgba(255, 107, 138, 0.5);
}

.blow-btn:active,
.blow-btn.active {
  transform: scale(0.97);
  animation: musicPulse 0.8s ease-in-out infinite;
}

/* ===== BLOW METER ===== */
.blow-meter-container {
  width: 100%;
  max-width: 280px;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.blow-meter {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--warm-gold), var(--rose-pink), #ff4081);
  border-radius: 10px;
  transition: width 0.1s ease;
  box-shadow: 0 0 10px rgba(255, 107, 138, 0.5);
}

/* ===== WISH STATUS ===== */
.wish-status {
  margin-top: 1rem;
}

.candles-remaining {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  color: var(--warm-gold);
  letter-spacing: 1px;
}

/* ===== WISH MESSAGE ===== */
.wish-message {
  position: relative;
  margin-top: 2rem;
  padding: 2rem;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  overflow: hidden;
  animation: fadeInUp 0.8s ease both;
}

.wish-message.hidden {
  display: none;
}

.wish-granted {
  font-family: 'Great Vibes', cursive;
  font-size: 2rem;
  color: var(--warm-gold);
  animation: titleGlow 2s ease-in-out infinite;
  margin-bottom: 1rem;
}

.wish-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  line-height: 1.8;
  color: rgba(240, 230, 255, 0.8);
  font-weight: 300;
  margin-bottom: 1.5rem;
}

.wish-again-btn {
  display: inline-block;
  padding: 0.7rem 1.8rem;
  background: linear-gradient(135deg, var(--warm-gold), #ffaa00);
  color: var(--midnight);
  border: none;
  border-radius: 50px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}

.wish-again-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 30px rgba(255, 215, 0, 0.5);
}

/* ===== WISH CONFETTI ===== */
.wish-confetti {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.confetti-piece {
  position: absolute;
  width: 8px;
  height: 8px;
  top: -10px;
  animation: confettiFall 2.5s ease-in forwards;
  opacity: 0.9;
}

.confetti-piece.circle {
  border-radius: 50%;
}

.confetti-piece.rect {
  width: 6px;
  height: 12px;
  border-radius: 2px;
}

@keyframes confettiFall {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(300px) rotate(720deg) scale(0.5);
  }
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .sparkle-frame {
    padding: 2rem 1.5rem;
  }

  .countdown-container {
    gap: 1rem;
  }

  .countdown-item {
    min-width: 80px;
    padding: 1.5rem 1rem;
  }

  .countdown-number {
    font-size: 2.2rem;
  }

  .letter-card {
    padding: 2rem 1.5rem;
  }

  .letter-greeting {
    font-size: 1.6rem !important;
  }

  /* Timeline mobile */
  .timeline-line {
    left: 20px;
  }

  .timeline-item {
    width: 100%;
    padding-left: 3.5rem !important;
    padding-right: 1rem !important;
    text-align: left !important;
  }

  .timeline-item.left,
  .timeline-item.right {
    left: 0;
  }

  .timeline-item.left .timeline-dot,
  .timeline-item.right .timeline-dot {
    left: 12px;
    right: auto;
  }

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

  .cake-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .cake-text {
    text-align: center;
  }

  .cake-text .section-title {
    text-align: center;
  }

  .blow-btn {
    padding: 0.75rem 1.8rem;
    font-size: 0.9rem;
  }

  .blow-meter-container {
    margin: 0 auto 1rem;
  }

  .candle-number {
    font-size: 36px;
  }

  .candle-flame {
    width: 10px;
    height: 18px;
  }

  .hero-photo {
    width: 150px;
    height: 150px;
  }

  .gallery-header-img {
    aspect-ratio: 16/9;
    border-radius: 14px;
  }
}

@media (max-width: 480px) {
  .hero-subtitle {
    font-size: 0.85rem;
    letter-spacing: 2px;
  }

  .countdown-container {
    gap: 0.6rem;
  }

  .countdown-item {
    min-width: 65px;
    padding: 1rem 0.8rem;
    border-radius: 14px;
  }

  .countdown-number {
    font-size: 1.8rem;
  }

  .countdown-label {
    font-size: 0.7rem;
  }

  .section-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
  }

  .letter-card {
    padding: 1.5rem 1.2rem;
  }

  .letter-body {
    font-size: 0.95rem;
  }

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

  .timeline-card {
    padding: 1.5rem;
  }

  .final-emoji {
    font-size: 3.5rem;
  }

  .music-btn {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
  }

  .hero-photo {
    width: 120px;
    height: 120px;
  }

  .cake-description {
    font-size: 0.95rem;
  }

  .blow-btn {
    padding: 0.65rem 1.5rem;
    font-size: 0.85rem;
  }

  .candle-number {
    font-size: 28px;
  }

  .candle-flame {
    width: 8px;
    height: 14px;
  }

  .wish-granted {
    font-size: 1.5rem;
  }
}

/* ========================================================
   MAGNETIC HEARTS — "Our Hearts Connected" Section
   ======================================================== */

.magnetic-hearts-section {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  background: #07060b;
  touch-action: pan-y;
  user-select: none;
}

.magnetic-hearts-section canvas#magneticCanvas {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Overlay — section header text */
.magnetic-overlay {
  position: absolute;
  top: 6vh;
  left: 0;
  right: 0;
  z-index: 10;
  text-align: center;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.magnetic-tag {
  font-size: clamp(0.7rem, 2.5vw, 0.9rem);
  font-weight: 500;
  letter-spacing: 0.45em;
  color: #ffd700;
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
  text-transform: uppercase;
  animation: magneticPulseGlow 2s infinite ease-in-out;
}

.magnetic-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 8vw, 3.8rem);
  font-weight: 700;
  color: #fff;
  line-height: 1;
  text-shadow: 0 0 30px rgba(255, 215, 0, 0.35), 0 0 60px rgba(160, 196, 255, 0.15);
  background: linear-gradient(135deg, #a0c4ff 0%, #ffffff 40%, #ffd700 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.magnetic-sub {
  font-size: clamp(0.85rem, 3vw, 1.1rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 4px;
}

@keyframes magneticPulseGlow {
  0%, 100% {
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    opacity: 0.8;
  }
  50% {
    text-shadow: 0 0 25px rgba(255, 215, 0, 0.95);
    opacity: 1;
  }
}

/* Merge Message — appears when hearts connect */
.magnetic-merge-message {
  position: absolute;
  bottom: 6vh;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  z-index: 10;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease, transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  max-width: 90%;
  width: 450px;
}

.magnetic-merge-message.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.merge-emoji {
  font-size: 3rem;
  animation: mergeEmojiBeat 1.2s ease-in-out infinite;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 25px rgba(255, 215, 0, 0.7));
}

@keyframes mergeEmojiBeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.25); }
  30% { transform: scale(1); }
  45% { transform: scale(1.15); }
  60% { transform: scale(1); }
}

.merge-text {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(0.95rem, 3.2vw, 1.2rem);
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
  padding: 20px 28px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 215, 0, 0.15);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 0 30px rgba(255, 215, 0, 0.06);
}

/* Celebration emojis that burst on merge */
.magnetic-celebration-emoji {
  position: absolute;
  bottom: 0;
  z-index: 5;
  pointer-events: none;
  animation: magneticCelebFloat 3s ease-out forwards;
  opacity: 0;
}

@keyframes magneticCelebFloat {
  0% {
    transform: translateY(0) scale(0.3) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
    transform: translateY(-20px) scale(1) rotate(15deg);
  }
  100% {
    transform: translateY(-80vh) scale(0.5) rotate(360deg);
    opacity: 0;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .magnetic-hearts-section {
    height: 80vh;
    min-height: 480px;
  }

  .magnetic-overlay {
    top: 3vh;
  }

  .magnetic-merge-message {
    bottom: 3vh;
    width: 88%;
    max-width: 380px;
  }

  .merge-text {
    font-size: 0.88rem;
    padding: 16px 18px;
    max-height: 35vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .merge-emoji {
    font-size: 2.2rem;
    margin-bottom: 8px;
  }

  .magnetic-title {
    font-size: clamp(1.6rem, 7vw, 2.8rem);
  }

  .magnetic-sub {
    font-size: clamp(0.78rem, 2.8vw, 1rem);
    padding: 0 1rem;
  }
}

@media (max-width: 480px) {
  .magnetic-hearts-section {
    height: 75vh;
    min-height: 420px;
  }

  .magnetic-overlay {
    top: 2.5vh;
  }

  .magnetic-title {
    font-size: 1.6rem;
  }

  .magnetic-tag {
    font-size: 0.65rem;
    letter-spacing: 0.3em;
  }

  .magnetic-merge-message {
    bottom: 2vh;
    width: 94%;
  }

  .merge-text {
    font-size: 0.82rem;
    padding: 12px 14px;
    line-height: 1.6;
  }

  .merge-emoji {
    font-size: 1.8rem;
  }
}
