@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;600;700&family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400;1,600&family=Inter:wght@300;400;500&display=swap');

/* ─── Reset & Base ──────────────────────────────── */
html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: url('bg_perfect.png') no-repeat center center / cover;
  font-family: 'Inter', sans-serif;
  animation: bgBreathing 30s ease-in-out infinite alternate;
  transition: filter 1.5s ease, background 1.5s ease;
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="rgba(255,140,170,0.8)" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path></svg>') 10 10, auto;
}

/* Custom romantic pointer for links/buttons */
a, button, .nav-links a {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="rgba(255,140,170,0.9)" stroke="rgba(255,255,255,0.8)" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path></svg>') 11 11, pointer !important;
}

/* Night Mode */
body.night-mode {
  /* Use the majestic starry night image without any dark tint overlays */
  background: url('bg_perfect_night.png') no-repeat center center / cover;
  background-blend-mode: normal;
}

@keyframes bgBreathing {
  0% {
    background-size: 100% auto;
  }

  100% {
    background-size: 110% auto;
  }
}

/* ─── 3D Canvas ─────────────────────────────────── */
#scene {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}



/* ─── Mouse Trail ───────────────────────────────── */
.mouse-trail {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
}

.trail-particle {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  animation: trailFade var(--dur) ease-out forwards;
}

.trail-sparkle {
  background: radial-gradient(circle, rgba(255, 255, 255, 1) 0%, rgba(255, 180, 210, 0.8) 50%, transparent 70%);
}

@keyframes trailFade {
  0% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(0) translateY(-20px);
  }
}

/* ─── Sparkle Overlay ───────────────────────────── */
.sparkle-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: radial-gradient(circle, rgba(255, 255, 255, 1) 0%, rgba(255, 200, 230, 0.8) 40%, transparent 70%);
  border-radius: 50%;
  animation: sparkleAnim var(--dur) ease-in-out infinite;
  animation-delay: var(--delay);
  opacity: 0;
}

@keyframes sparkleAnim {
  0% {
    opacity: 0;
    transform: scale(0) rotate(0deg);
  }

  25% {
    opacity: 1;
    transform: scale(1.2) rotate(90deg);
  }

  50% {
    opacity: 0.6;
    transform: scale(0.8) rotate(180deg);
  }

  75% {
    opacity: 1;
    transform: scale(1.5) rotate(270deg);
  }

  100% {
    opacity: 0;
    transform: scale(0) rotate(360deg);
  }
}

/* ─── SVG Icon Styles ───────────────────────────── */
.badge-icon {
  flex-shrink: 0;
  animation: heartPulse 1.5s ease-in-out infinite;
}

.heading-icon {
  vertical-align: middle;
  margin-left: 4px;
}

.footer-dot {
  display: flex;
  align-items: center;
}

.toggle-icon,
.music-icon {
  display: block;
}

.btn-primary svg,
.btn-secondary svg,
.claim-spot svg {
  flex-shrink: 0;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

/* ─── UI Layer ──────────────────────────────────── */
.ui-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem 4rem 2rem;
  box-sizing: border-box;
  color: white;
  pointer-events: none;
}

.ui-layer *,
.ui-layer a,
.ui-layer button {
  pointer-events: auto;
}

/* Dark vignette overlay for text readability */
.ui-layer::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at center top, rgba(0, 0, 0, 0.35) 0%, transparent 55%),
    radial-gradient(ellipse at center, transparent 25%, rgba(0, 0, 0, 0.18) 100%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.1) 15%, transparent 30%, transparent 65%, rgba(0, 0, 0, 0.35) 100%);
  z-index: -1;
  pointer-events: none;
}

/* ─── Navbar ────────────────────────────────────── */
.navbar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  animation: fadeSlideDown 1s ease-out both;
}

@keyframes fadeSlideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo svg {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 0 10px rgba(255, 140, 170, 0.6));
  animation: heartPulse 2s ease-in-out infinite;
}

@keyframes heartPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.15);
  }
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 0.6rem 2rem;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.nav-links a {
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  cursor: pointer;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #ff8cb0, #ffb6d5);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: #ffcce0;
  text-shadow: 0 0 12px rgba(255, 140, 180, 0.5);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.music-toggle {
  background: rgba(255, 200, 220, 0.15);
  border: 1px solid rgba(255, 180, 200, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  padding: 0;
}

.music-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(255, 100, 150, 0.3);
  background: rgba(255, 200, 220, 0.25);
}

.music-icon {
  line-height: 1;
}

/* ─── Day / Night Toggle Switch ─────────────────── */
.theme-toggle {
  position: relative;
  width: 52px;
  height: 28px;
  border-radius: 14px;
  border: 1px solid rgba(255, 210, 170, 0.55);
  background: linear-gradient(135deg, rgba(255, 200, 120, 0.6), rgba(255, 145, 75, 0.42));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  transition: background 0.45s ease, border-color 0.45s ease, box-shadow 0.45s ease;
  box-shadow: inset 0 0 10px rgba(255, 200, 140, 0.28), 0 4px 14px rgba(0, 0, 0, 0.18);
  flex-shrink: 0;
}

.theme-toggle:hover {
  box-shadow: 0 0 18px rgba(255, 160, 70, 0.4), inset 0 0 10px rgba(255, 200, 140, 0.28);
}

.theme-toggle.is-night {
  background: linear-gradient(135deg, rgba(50, 75, 168, 0.65), rgba(100, 55, 162, 0.52));
  border-color: rgba(170, 190, 255, 0.52);
  box-shadow: inset 0 0 10px rgba(100, 140, 255, 0.3), 0 4px 14px rgba(0, 0, 0, 0.34);
}

.theme-toggle.is-night:hover {
  box-shadow: 0 0 18px rgba(100, 140, 255, 0.45), inset 0 0 10px rgba(100, 140, 255, 0.3);
}

/* Track (background layer) */
.theme-toggle-track {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

/* Tiny stars visible on the left once the thumb slides right */
.theme-star {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transition: opacity 0.45s ease;
}

.theme-star.ts1 { width: 2px; height: 2px; top:  5px; left:  7px; }
.theme-star.ts2 { width: 2px; height: 2px; top: 17px; left: 12px; }
.theme-star.ts3 { width: 3px; height: 3px; top:  9px; left: 20px; }

.theme-toggle.is-night .theme-star {
  opacity: 0.92;
  animation: starTwinkle 1.8s ease-in-out infinite alternate;
}
.theme-toggle.is-night .theme-star.ts2 { animation-delay: 0.55s; }
.theme-toggle.is-night .theme-star.ts3 { animation-delay: 1.05s; }

@keyframes starTwinkle {
  from { opacity: 0.35; transform: scale(0.8);  }
  to   { opacity: 1;    transform: scale(1.35); }
}

/* Sliding knob */
.theme-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff8dc, #ffd060);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: transform    0.42s cubic-bezier(0.34, 1.56, 0.64, 1),
              background   0.42s ease,
              box-shadow   0.42s ease;
}

.theme-toggle.is-night .theme-toggle-thumb {
  transform: translateX(24px);
  background: linear-gradient(145deg, #daeeff, #9bbde8);
  box-shadow: 0 2px 8px rgba(55, 100, 200, 0.42), 0 0 12px rgba(140, 175, 255, 0.35);
}

.toggle-icon {
  display: block;
  transition: opacity 0.25s ease;
}

.claim-spot {
  background: linear-gradient(135deg, rgba(255, 140, 170, 0.3), rgba(255, 200, 220, 0.15));
  color: white;
  border: 1px solid rgba(255, 180, 200, 0.4);
  padding: 0.6rem 1.4rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  font-size: 0.9rem;
  box-shadow: 0 0 20px rgba(255, 100, 150, 0.15);
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  animation: heartbeatBtn 2.5s ease-in-out infinite;
}

@keyframes heartbeatBtn {
  0%, 100% { transform: scale(1); }
  10% { transform: scale(1.05); box-shadow: 0 0 25px rgba(255, 100, 150, 0.25); }
  20% { transform: scale(1); }
  30% { transform: scale(1.05); box-shadow: 0 0 25px rgba(255, 100, 150, 0.25); }
  40% { transform: scale(1); }
}

.claim-spot:hover {
  transform: scale(1.08) !important;
  box-shadow: 0 0 30px rgba(255, 100, 150, 0.35);
  background: linear-gradient(135deg, rgba(255, 140, 170, 0.5), rgba(255, 200, 220, 0.3));
  animation-play-state: paused;
}

.song-dedication-note {
  position: fixed;
  right: 24px;
  bottom: 22px;
  left: auto;
  transform: translateY(14px) scale(0.97);
  opacity: 0;
  pointer-events: none;
  z-index: 30;
  padding: 0.78rem 1.15rem 0.72rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 200, 220, 0.55);
  background: linear-gradient(145deg, rgba(255, 140, 170, 0.42), rgba(255, 175, 210, 0.22));
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.88rem;
  letter-spacing: 0.1px;
  text-align: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.26), inset 0 0 20px rgba(255, 255, 255, 0.08);
  width: min(440px, calc(100vw - 2rem));
  transition: opacity 0.35s ease, transform 0.35s ease;
  overflow: hidden;
}

.song-dedication-note::before,
.song-dedication-note::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.song-dedication-note::before {
  width: 140px;
  height: 140px;
  top: -70px;
  right: -35px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 70%);
}

.song-dedication-note::after {
  width: 90px;
  height: 90px;
  bottom: -42px;
  left: -18px;
  background: radial-gradient(circle, rgba(255, 220, 235, 0.2) 0%, rgba(255, 220, 235, 0) 68%);
}

.song-dedication-title {
  display: block;
  font-family: 'Dancing Script', cursive;
  font-size: 1.36rem;
  line-height: 1.05;
  color: #fff7fb;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.26);
  margin-bottom: 0.22rem;
}

.song-dedication-subtitle {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255, 244, 249, 0.94);
  line-height: 1.3;
}

.song-dedication-note.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: noteFloat 2.8s ease-in-out infinite;
}

@keyframes noteFloat {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-3px) scale(1.008);
  }
}

@media (max-width: 640px) {
  .song-dedication-note {
    right: auto;
    left: 50%;
    bottom: 12px;
    transform: translate(-50%, 14px) scale(0.97);
    padding: 0.68rem 0.9rem;
    width: min(94vw, 420px);
  }

  .song-dedication-title {
    font-size: 1.14rem;
  }

  .song-dedication-subtitle {
    font-size: 0.76rem;
  }
}

/* ─── Relationship Timer ────────────────────────── */
.timer-section {
  animation: fadeSlideUp 1s ease-out 0.1s both;
  margin-bottom: 0.8rem;
}

.timer-label {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.95rem;
  margin: 0 0 0.4rem 0;
  opacity: 0.9;
  letter-spacing: 1px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.timer-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.timer-unit {
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 0.5rem 1rem;
  min-width: 75px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.timer-value {
  font-family: 'Dancing Script', cursive;
  font-size: 1.8rem;
  font-weight: 700;
  display: block;
  line-height: 1.1;
  background: linear-gradient(135deg, #ffffff, #ffd6e8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
}

.timer-name {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.85;
  font-weight: 600;
  display: block;
  margin-top: 2px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.timer-sep {
  font-family: 'Dancing Script', cursive;
  font-size: 1.5rem;
  opacity: 0.5;
  animation: timerPulse 1s ease-in-out infinite;
}

@keyframes timerPulse {

  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }
}

/* ─── Hero Section ──────────────────────────────── */
.hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -5vh;
  position: relative;
}

.badge {
  background: rgba(255, 200, 220, 0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0.45rem 1.3rem;
  border-radius: 50px;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 180, 200, 0.3);
  animation: fadeSlideUp 1s ease-out 0.2s both;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.title {
  font-family: 'Dancing Script', cursive;
  font-size: 5rem;
  line-height: 1.15;
  margin: 0 0 1rem 0;
  font-weight: 700;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #ffffff 0%, #ffd6e8 40%, #ffb6d5 70%, #ffffff 100%);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeSlideUp 1s ease-out 0.4s both, shimmerText 6s ease-in-out infinite;
  filter: drop-shadow(0 4px 20px rgba(255, 140, 180, 0.3));
}

@keyframes shimmerText {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.8;
  max-width: 620px;
  margin: 0 0 1.5rem 0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 0, 0, 0.3);
  animation: fadeSlideUp 1s ease-out 0.6s both;
  color: rgba(255, 255, 255, 0.95);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  animation: fadeSlideUp 1s ease-out 0.8s both;
}

.btn-primary {
  background: linear-gradient(135deg, rgba(255, 140, 170, 0.4), rgba(255, 100, 140, 0.25));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  border: 1px solid rgba(255, 180, 200, 0.45);
  padding: 0.8rem 1.6rem;
  border-radius: 50px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  font-size: 0.92rem;
  box-shadow: 0 0 25px rgba(255, 100, 150, 0.15);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}

.btn-primary:hover {
  background: linear-gradient(135deg, rgba(255, 140, 170, 0.55), rgba(255, 100, 140, 0.4));
  box-shadow: 0 0 40px rgba(255, 100, 150, 0.35);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: white;
  border: none;
  padding: 0.8rem 1.6rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-size: 0.92rem;
  position: relative;
  transition: all 0.3s ease;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}

.btn-secondary::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 50%;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 180, 200, 0.7), transparent);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.btn-secondary:hover::after {
  width: 80%;
}

.btn-secondary:hover {
  color: #ffd6e8;
  text-shadow: 0 0 12px rgba(255, 140, 180, 0.4);
}

/* ─── Love Letter Modal ─────────────────────────── */
.love-letter-modal,
.reasons-modal,
.gallery-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: modalFadeIn 0.4s ease-out both;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.letter-content,
.reasons-content,
.gallery-content {
  background: linear-gradient(165deg, rgba(255, 240, 245, 0.95), rgba(255, 220, 235, 0.92));
  color: #4a2030;
  border-radius: 24px;
  padding: 2.5rem;
  max-width: 560px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow:
    0 25px 80px rgba(255, 100, 150, 0.25),
    0 0 60px rgba(255, 140, 170, 0.15),
    inset 0 0 60px rgba(255, 255, 255, 0.3);
  animation: letterSlideUp 0.5s ease-out both;
  border: 1px solid rgba(255, 180, 200, 0.3);
}

.gallery-content {
  max-width: 700px;
}

@keyframes letterSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.letter-content h2,
.reasons-content h2,
.gallery-content h2 {
  font-family: 'Dancing Script', cursive;
  font-size: 2rem;
  margin: 0 0 1.2rem 0;
  color: #c0506a;
  text-align: center;
}

.letter-content p,
#typewriterContainer p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 0.8rem;
  color: #5a3040;
}

.letter-signature {
  text-align: right;
  margin-top: 1.2rem;
  font-style: italic;
}

.signature {
  font-family: 'Dancing Script', cursive;
  font-size: 1.4rem;
  color: #d4607a;
}

/* Typewriter cursor */
.typewriter-cursor {
  display: inline;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  color: #d4607a;
  animation: cursorBlink 0.6s ease-in-out infinite;
}

@keyframes cursorBlink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

.close-letter {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #c0506a;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.close-letter:hover {
  background: rgba(200, 80, 106, 0.15);
  transform: scale(1.1);
}

/* ─── Reasons Cards ─────────────────────────────── */
.reasons-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.reason-card {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  padding: 1rem;
  border: 1px solid rgba(255, 180, 200, 0.3);
  animation: reasonFadeIn 0.5s ease-out both;
  animation-delay: var(--delay);
  transition: all 0.3s ease;
}

.reason-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 100, 150, 0.2);
}

@keyframes reasonFadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reason-num {
  font-family: 'Dancing Script', cursive;
  font-size: 1.4rem;
  color: #d4607a;
  display: block;
  margin-bottom: 0.3rem;
}

.reason-card p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
  color: #5a3040;
}

/* ─── Photo Gallery ────────────────────────────── */
.gallery-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  text-align: center;
  color: #8a5060;
  margin: -0.5rem 0 1rem 0;
  font-size: 1rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.8rem;
}

.gallery-card {
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  animation: reasonFadeIn 0.5s ease-out both;
  animation-delay: var(--delay);
  transition: all 0.3s ease;
  cursor: pointer;
}

.gallery-card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 30px rgba(255, 100, 150, 0.25);
}

.gallery-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 200, 220, 0.4), rgba(255, 160, 190, 0.25));
  border: 2px dashed rgba(255, 140, 170, 0.4);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  transition: all 0.3s ease;
}

.gallery-placeholder span {
  font-size: 2rem;
}

.gallery-placeholder p {
  font-family: 'Dancing Script', cursive;
  font-size: 0.85rem;
  color: #c0506a;
  margin: 0;
}

.gallery-placeholder:hover {
  background: linear-gradient(135deg, rgba(255, 200, 220, 0.6), rgba(255, 160, 190, 0.4));
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  transition: transform 0.5s ease;
}

.gallery-card:hover img {
  transform: scale(1.1);
}

.gallery-label {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 0.6rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
  color: white;
  font-family: 'Dancing Script', cursive;
  font-size: 0.9rem;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.gallery-card:hover .gallery-label {
  opacity: 1;
}

.gallery-hint {
  text-align: center;
  font-size: 0.75rem;
  color: #a07080;
  margin: 1rem 0 0 0;
  font-style: italic;
}

/* ─── Footer ────────────────────────────────────── */
.partners {
  text-align: center;
  animation: fadeSlideUp 1s ease-out 1s both;
}

.partners-text {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  opacity: 0.9;
  margin-bottom: 0.5rem;
  font-weight: 400;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 0, 0, 0.3);
}

.partner-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  font-family: 'Dancing Script', cursive;
  font-size: 1.3rem;
  opacity: 1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 0, 0, 0.3);
}

/* ─── Glow Pulse Effect on Whole Page ───────────── */
.ui-layer::before {
  content: '';
  position: fixed;
  top: -30%;
  left: -30%;
  width: 160%;
  height: 160%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 140, 170, 0.06) 0%, transparent 60%);
  z-index: -1;
  animation: glowPulse 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes glowPulse {

  0%,
  100% {
    opacity: 0.4;
    transform: scale(1);
  }

  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

/* ─── Night mode text adjustments ───────────────── */
body.night-mode .title {
  background: linear-gradient(135deg, #e0e8ff 0%, #c8b8ff 40%, #a0c4ff 70%, #e0e8ff 100%);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeSlideUp 1s ease-out 0.4s both, shimmerText 6s ease-in-out infinite;
  filter: drop-shadow(0 4px 20px rgba(100, 140, 255, 0.4));
}

body.night-mode .timer-value {
  background: linear-gradient(135deg, #e0e8ff, #c8b8ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.night-mode .nav-links {
  background: rgba(100, 120, 200, 0.15);
  border-color: rgba(140, 160, 255, 0.25);
}

body.night-mode .music-toggle {
  background: rgba(100, 120, 200, 0.15);
  border-color: rgba(140, 160, 255, 0.25);
}

body.night-mode .claim-spot {
  background: linear-gradient(135deg, rgba(100, 140, 255, 0.3), rgba(140, 120, 200, 0.15));
  border-color: rgba(140, 160, 255, 0.4);
}

body.night-mode .badge {
  background: rgba(100, 120, 200, 0.15);
  border-color: rgba(140, 160, 255, 0.25);
}

body.night-mode .timer-unit {
  background: rgba(100, 120, 200, 0.15);
  border-color: rgba(140, 160, 255, 0.2);
}

body.night-mode .btn-primary {
  background: linear-gradient(135deg, rgba(100, 140, 255, 0.35), rgba(140, 100, 200, 0.2));
  border-color: rgba(140, 160, 255, 0.4);
}

body.night-mode .ui-layer::before {
  background: radial-gradient(circle at 50% 50%, rgba(100, 140, 255, 0.08) 0%, transparent 60%);
}



body.night-mode .partner-logos {
  text-shadow: 0 2px 10px rgba(100, 140, 255, 0.3);
}

/* Night Mode Modals & Content */
body.night-mode .letter-content,
body.night-mode .reasons-content,
body.night-mode .gallery-content {
  background: linear-gradient(135deg, rgba(100, 140, 255, 0.35), rgba(140, 100, 200, 0.2));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: rgba(255, 245, 248, 0.96);
  border-color: rgba(140, 160, 255, 0.4);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(100, 140, 255, 0.12);
}

body.night-mode .letter-content h2,
body.night-mode .reasons-content h2,
body.night-mode .gallery-content h2 {
  color: #ffd6e3;
}

body.night-mode .letter-content p,
body.night-mode #typewriterContainer p,
body.night-mode .reason-card p,
body.night-mode .gallery-subtitle,
body.night-mode .jar-hint {
  color: rgba(255, 238, 243, 0.92);
}

body.night-mode .signature {
  color: #ffd6e3;
}

body.night-mode .close-letter {
  color: #ffd6e3;
}

body.night-mode .close-letter:hover {
  background: rgba(100, 140, 255, 0.2);
}

body.night-mode .reason-card {
  background: linear-gradient(135deg, rgba(100, 140, 255, 0.24), rgba(140, 100, 200, 0.12));
  border-color: rgba(140, 160, 255, 0.32);
}

body.night-mode .reason-num {
  color: #ffd6e3;
}

body.night-mode .gallery-placeholder {
  background: linear-gradient(135deg, rgba(100, 140, 255, 0.18), rgba(140, 100, 200, 0.08));
  border-color: rgba(140, 160, 255, 0.4);
}

body.night-mode .gallery-placeholder p {
  color: #ffd6e3;
}

body.night-mode .gallery-placeholder:hover {
  background: linear-gradient(135deg, rgba(100, 140, 255, 0.28), rgba(140, 100, 200, 0.16));
}

body.night-mode .drawn-promise {
  background: linear-gradient(165deg, rgba(100, 140, 255, 0.28), rgba(140, 100, 200, 0.18));
  border-left: 5px solid rgba(140, 160, 255, 0.9);
  box-shadow: 0 10px 30px rgba(100, 140, 255, 0.2);
  color: rgba(255, 245, 248, 0.96);
}

body.night-mode #drawnPromiseText {
  color: rgba(255, 245, 248, 0.96);
}

/* Update inline SVGs */
body.night-mode .heading-icon path[fill="#d4607a"] {
  fill: #ffd6e3 !important;
}
body.night-mode .heading-icon rect[stroke="#c0506a"] {
  stroke: #ffd6e3 !important;
}
body.night-mode .heading-icon circle[fill="#d4607a"] {
  fill: #ffd6e3 !important;
}

/* Scrollbars */
body.night-mode .letter-content::-webkit-scrollbar-thumb,
body.night-mode .reasons-content::-webkit-scrollbar-thumb,
body.night-mode .gallery-content::-webkit-scrollbar-thumb {
  background: rgba(140, 160, 255, 0.4);
}

/* Let the stars show through the modal backgrounds slightly! */
body.night-mode .love-letter-modal,
body.night-mode .reasons-modal,
body.night-mode .gallery-modal {
  background: rgba(10, 10, 25, 0.6);
}

/* ─── Responsive ────────────────────────────────── */
@media (max-width: 1024px) {
  .ui-layer {
    padding: 1.2rem 2rem 1.5rem;
  }

  .claim-spot {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
  }

  .nav-links {
    gap: 1.2rem;
    font-size: 0.82rem;
    padding: 0.4rem 1rem;
  }
}

@media (max-width: 768px) {
  .ui-layer {
    padding: 1rem 1.2rem;
  }

  .title {
    font-size: 2.8rem;
  }

  .subtitle {
    font-size: 0.95rem;
  }

  .subtitle br {
    display: none;
  }

  .nav-links {
    display: none;
  }

  .claim-spot {
    font-size: 0.78rem;
    padding: 0.5rem 0.9rem;
  }

  .hero-actions {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
  }

  .reasons-list {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }

  .letter-content,
  .reasons-content,
  .gallery-content {
    padding: 1.5rem;
  }

  .timer-unit {
    min-width: 50px;
    padding: 0.3rem 0.5rem;
  }

  .timer-value {
    font-size: 1.4rem;
  }

  .timer-name {
    font-size: 0.55rem;
  }

  .partner-logos {
    font-size: 1.1rem;
    gap: 1rem;
  }
}

/* ─── Scrollbar for modals ──────────────────────── */
.letter-content::-webkit-scrollbar,
.reasons-content::-webkit-scrollbar,
.gallery-content::-webkit-scrollbar {
  width: 6px;
}

.letter-content::-webkit-scrollbar-track,
.reasons-content::-webkit-scrollbar-track,
.gallery-content::-webkit-scrollbar-track {
  background: transparent;
}

.letter-content::-webkit-scrollbar-thumb,
.reasons-content::-webkit-scrollbar-thumb,
.gallery-content::-webkit-scrollbar-thumb {
  background: rgba(200, 80, 106, 0.3);
  border-radius: 3px;
}

/* ─── Envelope Animations ─── */
.envelope-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0; left: 0;
  transition: opacity 0.8s ease;
  z-index: 10;
}
.envelope-wrapper {
  position: relative;
  width: 300px;
  height: 200px;
  cursor: pointer;
  perspective: 1000px;
  animation: floatEnvelope 3s infinite ease-in-out;
}
@keyframes floatEnvelope {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.envelope-back {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #e8a0b8, #e27a96);
  border-radius: 5px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.envelope-front {
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 0;
  border-left: 150px solid #f08ea8;
  border-right: 150px solid #f08ea8;
  border-bottom: 100px solid #e8809e;
  border-top: 100px solid transparent;
  border-radius: 5px;
  z-index: 3;
}
.envelope-flap {
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 0;
  border-left: 150px solid transparent;
  border-right: 150px solid transparent;
  border-top: 100px solid #ff9db8;
  border-bottom: 100px solid transparent;
  transform-origin: top;
  transition: transform 0.6s ease-in-out;
  z-index: 4;
}
.envelope-paper {
  position: absolute;
  top: 10px; left: 10px;
  width: 280px; height: 180px;
  background: white;
  border-radius: 5px;
  z-index: 2;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
.envelope-seal {
  position: absolute;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, #e60039, #a80029);
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Dancing Script', cursive;
  font-size: 14px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  z-index: 5;
  border: 2px solid #ff4d79;
  transition: all 0.3s ease;
}
.envelope-wrapper:hover .envelope-seal {
  transform: translateX(-50%) scale(1.1);
  box-shadow: 0 6px 15px rgba(255,100,150,0.6);
}


/* ─── Polaroid Stack ─── */
.polaroid-stack {
  position: relative;
  width: 100%;
  height: 450px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
}

.polaroid-card {
  position: absolute;
  width: 240px;
  height: 280px;
  perspective: 1000px;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform: rotate(var(--rot)) translateY(0);
}

.polaroid-card:hover {
  transform: rotate(0deg) scale(1.05) translateY(-10px);
  z-index: 20 !important;
}

.polaroid-card.active {
  transform: rotate(0deg) scale(1.3) translateY(0);
  z-index: 50 !important;
}

.polaroid-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.polaroid-card.active .polaroid-inner {
  transform: rotateY(180deg);
}

.polaroid-front, .polaroid-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  padding: 15px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.polaroid-front img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 2px;
  background: #f0f0f0;
}

.polaroid-label {
  font-family: 'Dancing Script', cursive;
  font-size: 1.4rem;
  color: #333;
  margin-top: auto;
}

.polaroid-back {
  transform: rotateY(180deg);
  background: #fffdf5; /* slight warm tint */
  justify-content: center;
  align-items: center;
}

.polaroid-note {
  font-family: 'Dancing Script', cursive;
  font-size: 1.6rem;
  color: #c0506a;
  line-height: 1.4;
  margin: 0;
}


/* ─── Promises Jar ─── */
.promises-jar-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2rem;
  position: relative;
  min-height: 430px;
}

.jar {
  position: relative;
  width: 150px;
  cursor: pointer;
  transition: transform 0.3s ease, filter 0.3s ease;
  z-index: 5;
  filter: drop-shadow(0 12px 22px rgba(210, 92, 129, 0.25));
}

.jar:hover {
  transform: scale(1.07) rotate(2deg) translateY(-2px);
  filter: drop-shadow(0 16px 28px rgba(210, 92, 129, 0.36));
}

.jar:active {
  transform: scale(0.95);
}

.jar.shaking {
  animation: jarShake 0.5s ease-in-out infinite;
}

@keyframes jarShake {
  0% { transform: translate(1px, 1px) rotate(0deg); }
  10% { transform: translate(-1px, -2px) rotate(-1deg); }
  20% { transform: translate(-3px, 0px) rotate(1deg); }
  30% { transform: translate(3px, 2px) rotate(0deg); }
  40% { transform: translate(1px, -1px) rotate(1deg); }
  50% { transform: translate(-1px, 2px) rotate(-1deg); }
  60% { transform: translate(-3px, 1px) rotate(0deg); }
  70% { transform: translate(3px, 1px) rotate(-1deg); }
  80% { transform: translate(-1px, -1px) rotate(1deg); }
  90% { transform: translate(1px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -2px) rotate(-1deg); }
}

.jar-lid-top {
  width: 108px;
  height: 15px;
  background: linear-gradient(180deg, #efc693 0%, #d59a58 100%);
  margin: 0 auto;
  border-radius: 5px 5px 0 0;
  border: 2px solid #ab6f2d;
  border-bottom: none;
  box-shadow: inset 0 2px 2px rgba(255, 235, 205, 0.6);
}

.jar-lid {
  width: 118px;
  height: 26px;
  background: linear-gradient(180deg, #e4b174 0%, #c98949 100%);
  margin: 0 auto;
  border-radius: 3px;
  border: 2px solid #ab6f2d;
  box-shadow: 0 3px 8px rgba(85, 48, 20, 0.25);
}

.jar-glass {
  width: 150px;
  height: 176px;
  background: radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.55) 0%, rgba(209, 235, 255, 0.34) 48%, rgba(170, 214, 240, 0.3) 100%);
  border: 4px solid rgba(200, 230, 255, 0.68);
  border-radius: 30px 30px 40px 40px;
  position: relative;
  box-shadow: inset -10px 0 20px rgba(255,255,255,0.44), inset 10px 0 20px rgba(0,0,0,0.06), 0 8px 22px rgba(100, 136, 179, 0.24);
  overflow: hidden;
}

.jar-glass::after {
  content: '';
  position: absolute;
  top: 10px;
  left: 15px;
  width: 20px;
  height: 120px;
  background: rgba(255,255,255,0.4);
  border-radius: 10px;
  transform: rotate(-5deg);
}

.jar-glass::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -12px;
  width: 92px;
  height: 22px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255, 145, 185, 0.3) 0%, rgba(255, 145, 185, 0) 70%);
  pointer-events: none;
}

.jar-note {
  position: absolute;
  width: 35px;
  height: 20px;
  border-radius: 3px;
  box-shadow: 1px 1px 3px rgba(0,0,0,0.2);
  border: 1px solid rgba(0,0,0,0.1);
  animation: jarNoteFloat 2.4s ease-in-out infinite;
  transform-origin: center center;
}

.jar-note:nth-child(1) { animation-delay: 0s; }
.jar-note:nth-child(2) { animation-delay: 0.2s; }
.jar-note:nth-child(3) { animation-delay: 0.4s; }
.jar-note:nth-child(4) { animation-delay: 0.6s; }
.jar-note:nth-child(5) { animation-delay: 0.8s; }
.jar-note:nth-child(6) { animation-delay: 1s; }

@keyframes jarNoteFloat {
  0%, 100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -3px;
  }
}

.jar-hint {
  font-size: 0.92rem;
  color: #975469;
  margin-top: 1.1rem;
  font-style: italic;
  letter-spacing: 0.3px;
}

.drawn-promise {
  margin-top: 1.65rem;
  width: 80%;
  max-width: 560px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.98), rgba(255, 246, 250, 0.95));
  padding: 1.5rem;
  border-radius: 14px;
  box-shadow: 0 16px 34px rgba(200, 100, 120, 0.2);
  transform: translateY(10px) scale(0.92);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(240, 176, 198, 0.7);
  border-left: 5px solid #d4607a;
  pointer-events: none;
}

.drawn-promise.show {
  transform: translateY(0) scale(1);
  opacity: 1;
}

#drawnPromiseText {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  color: #3e2f36;
  line-height: 1.65;
  margin: 0;
}


