/* ==========================================================================
   Romantic Fractal Tree Animation - Design Tokens & Core Styles
   ========================================================================== */

:root {
  --bg-primary: #050409;
  --bg-secondary: #0d0714;
  --accent-gold: #ffb703;
  --accent-orange: #fb8500;
  --accent-warm: #ff9e2c;
  --accent-red: #e63946;
  --accent-crimson: #9e1b32;
  --text-primary: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.7);
  --glass-bg: rgba(20, 15, 30, 0.65);
  --glass-border: rgba(255, 170, 50, 0.22);
  --glass-glow: rgba(255, 140, 20, 0.15);
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-script: 'Caveat', cursive;
  --font-serif: 'Playfair Display', Georgia, serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  position: relative;
}

/* ==========================================================================
   Romantic Ambient Aurora Glow Orbs (Dynamic Shifting Background)
   ========================================================================== */

.ambient-aurora {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.aurora-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(85px);
  opacity: 0.45;
  mix-blend-mode: screen;
  will-change: transform, opacity;
}

.aurora-orb.orb-1 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, #e63946 0%, rgba(230, 57, 70, 0.35) 60%, transparent 80%);
  top: 5%;
  left: 10%;
  animation: floatAurora1 18s ease-in-out infinite alternate;
}

.aurora-orb.orb-2 {
  width: 540px;
  height: 540px;
  background: radial-gradient(circle, #ff9e1b 0%, rgba(255, 180, 50, 0.3) 60%, transparent 80%);
  bottom: 8%;
  right: 8%;
  animation: floatAurora2 22s ease-in-out infinite alternate;
}

.aurora-orb.orb-3 {
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, #7209b7 0%, rgba(181, 23, 158, 0.35) 60%, transparent 80%);
  top: 40%;
  left: 55%;
  animation: floatAurora3 20s ease-in-out infinite alternate;
}

@keyframes floatAurora1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(80px, 60px) scale(1.18); }
  100% { transform: translate(-50px, 90px) scale(0.95); }
}

@keyframes floatAurora2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-90px, -70px) scale(1.22); }
  100% { transform: translate(60px, -40px) scale(0.92); }
}

@keyframes floatAurora3 {
  0% { transform: translate(0, 0) scale(0.92); }
  50% { transform: translate(-70px, 80px) scale(1.15); }
  100% { transform: translate(80px, -60px) scale(1.05); }
}

/* ==========================================================================
   Canvases & Layers Stacking
   ========================================================================== */

#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* Romantic Curved Name Arc ("Sangitaa Jii 💖✨") in Tree Crown */
.tree-curved-name {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 8;
  overflow: visible;
}

.curved-name-aura {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 190, 60, 0.45) 0%, rgba(255, 60, 110, 0.3) 50%, transparent 75%);
  filter: blur(45px);
  opacity: 0;
  transition: opacity 1.5s ease;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.curved-letters-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.tree-curved-slot {
  position: absolute;
  transform-origin: center center;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tree-curved-char {
  display: inline-block;
  transform-origin: center center;
  font-family: 'Outfit', 'Playfair Display', sans-serif;
  font-size: clamp(22px, 4.8vw, 38px);
  font-weight: 800;
  color: #ffbe0b;
  opacity: 0;
  transform: scale(0.3);
  filter: blur(6px);
  transition: opacity 0.4s ease, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.4s ease, text-shadow 0.4s ease;
  text-shadow: 0 0 10px #ffbe0b, 0 0 20px #fb8500;
  white-space: pre;
  user-select: none;
  pointer-events: none;
}

.tree-curved-char.revealed {
  opacity: 0.95;
  filter: blur(0px);
  transform: scale(1);
  text-shadow: 0 0 14px #ffbe0b, 0 0 26px #fb8500, 0 0 42px rgba(255, 60, 110, 0.85);
}

.tree-curved-char.revealed.pop {
  animation: charRevealPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes charRevealPop {
  0% { transform: scale(0.3); opacity: 0; filter: blur(6px); }
  50% { transform: scale(1.4); opacity: 1; filter: blur(0px); }
  100% { transform: scale(1); opacity: 0.95; }
}

/* When Tree Completes - Grand Golden Highlight & Aura */
.tree-curved-name.tree-completed .curved-name-aura {
  opacity: 0.85;
  animation: auraBreathe 4s ease-in-out infinite alternate;
}

@keyframes auraBreathe {
  0% { transform: translate(-50%, -50%) scale(0.95); opacity: 0.7; }
  100% { transform: translate(-50%, -50%) scale(1.15); opacity: 0.95; }
}

.tree-curved-name.tree-completed .tree-curved-char {
  opacity: 1;
  color: #ffffff;
  text-shadow: 
    0 0 10px #ffffff,
    0 0 22px #ffbe0b,
    0 0 38px #ff0055,
    0 0 60px #ff7b00,
    0 0 90px rgba(255, 0, 90, 0.95);
  animation: completedCharPulse 2.5s ease-in-out infinite alternate;
}

.tree-curved-name.tree-completed .tree-curved-char.emoji-char {
  filter: drop-shadow(0 0 18px rgba(255, 100, 150, 1)) drop-shadow(0 0 35px #ffbe0b);
  animation: completedEmojiBeat 1.6s ease-in-out infinite;
}

@keyframes completedCharPulse {
  0% {
    transform: scale(1.02);
    text-shadow: 0 0 10px #ffffff, 0 0 20px #ffbe0b, 0 0 35px #ff0055, 0 0 55px #ff7b00;
  }
  100% {
    transform: scale(1.18);
    text-shadow: 0 0 15px #ffffff, 0 0 30px #ffe066, 0 0 50px #ff006e, 0 0 75px #ff7b00, 0 0 110px rgba(255, 0, 100, 1);
  }
}

@keyframes completedEmojiBeat {
  0%, 100% { transform: scale(1.05); }
  25% { transform: scale(1.35); }
  50% { transform: scale(1.12); }
  75% { transform: scale(1.28); }
}

#tree-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  cursor: pointer;
}

/* ==========================================================================
   Continuous Romantic Floating Hearts & Petals Layer
   ========================================================================== */

.ambient-floating-hearts,
.home-floating-hearts {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 3;
}

.home-floating-hearts {
  position: absolute;
  z-index: 1;
}

.rising-heart {
  position: absolute;
  bottom: -45px;
  pointer-events: none;
  user-select: none;
  will-change: transform, opacity;
  animation: riseUpward linear forwards;
  filter: drop-shadow(0 0 10px rgba(255, 120, 160, 0.55));
}

@keyframes riseUpward {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg) scale(var(--scale, 1));
    opacity: 0;
  }
  12% {
    opacity: var(--max-opacity, 0.7);
  }
  85% {
    opacity: var(--max-opacity, 0.7);
  }
  100% {
    transform: translateY(calc(-100vh - 90px)) translateX(var(--drift-x, 40px)) rotate(var(--rot, 30deg)) scale(var(--scale, 1));
    opacity: 0;
  }
}

/* ==========================================================================
   Interactive Click/Tap Floating Hearts Layer
   ========================================================================== */

#heart-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
}

.floating-heart {
  position: absolute;
  pointer-events: none;
  animation: floatUpAndFade 2.6s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
  will-change: transform, opacity;
  filter: drop-shadow(0 0 8px rgba(255, 110, 40, 0.7));
}

@keyframes floatUpAndFade {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.4) rotate(0deg);
  }
  15% {
    opacity: 1;
    transform: translate(0, -20px) scale(1.1) rotate(6deg);
  }
  100% {
    opacity: 0;
    transform: translate(var(--drift-x, 15px), -180px) scale(0.85) rotate(var(--rot, 20deg));
  }
}

/* ==========================================================================
   Top Header Controls (Memories Gallery Left, Music Toggle Right)
   ========================================================================== */

.top-controls {
  position: fixed;
  top: 18px;
  left: 0;
  width: 100%;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  pointer-events: auto;
}

.glass-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 24px var(--glass-glow);
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-pill-btn:hover {
  background: rgba(40, 25, 55, 0.85);
  border-color: rgba(255, 180, 50, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(255, 140, 20, 0.28);
}

.glass-pill-btn:active {
  transform: translateY(1px);
}

.photo-btn-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid var(--accent-gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.photo-btn-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.photo-pill {
  border-color: rgba(255, 150, 180, 0.35);
}

.photo-pill:hover {
  border-color: rgba(255, 150, 200, 0.6);
  box-shadow: 0 10px 26px rgba(230, 57, 70, 0.3);
}

.sound-wave {
  display: inline-flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 14px;
}

.sound-wave span {
  width: 2.5px;
  height: 4px;
  background-color: var(--accent-gold);
  border-radius: 2px;
  transition: height 0.2s ease;
}

.sound-wave.playing span:nth-child(1) {
  animation: wave 1s ease-in-out infinite 0.1s;
}
.sound-wave.playing span:nth-child(2) {
  animation: wave 1s ease-in-out infinite 0.35s;
}
.sound-wave.playing span:nth-child(3) {
  animation: wave 1s ease-in-out infinite 0.2s;
}

@keyframes wave {
  0%, 100% { height: 3px; }
  50% { height: 14px; }
}

/* ==========================================================================
   Romantic Love Message (Under Tree Trunk)
   ========================================================================== */

.message-container {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 5;
  pointer-events: none;
  width: 92%;
  max-width: 520px;
}

.message-glow-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.love-text {
  font-family: var(--font-sans);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  line-height: 1.25;
}

.love-text .sub-lead {
  font-family: var(--font-script), 'Caveat', cursive;
  font-size: clamp(1.4rem, 4vw, 1.95rem);
  font-weight: 700;
  color: #ffe0b2;
  text-shadow: 0 0 16px rgba(255, 180, 50, 0.85), 0 0 28px rgba(255, 140, 20, 0.45);
  letter-spacing: 0.6px;
}

.love-text .main-name {
  font-size: clamp(1.85rem, 5.2vw, 2.6rem);
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #ffb347 0%, #ff6b35 50%, #ff8c42 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 16px rgba(255, 120, 40, 0.85)) drop-shadow(0 0 35px rgba(255, 180, 40, 0.4));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.heart-emoji {
  display: inline-block;
  -webkit-text-fill-color: initial;
  filter: drop-shadow(0 0 14px rgba(255, 110, 150, 0.9));
  animation: heartPulse 1.8s ease-in-out infinite;
  transform-origin: center;
}

@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.18); }
  28% { transform: scale(1); }
  42% { transform: scale(1.12); }
  70% { transform: scale(1); }
}

.personalized-note {
  font-family: var(--font-script);
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  color: #ffe8d6;
  opacity: 0.9;
  letter-spacing: 0.6px;
  text-shadow: 0 0 12px rgba(255, 160, 60, 0.6);
  min-height: 22px;
}

/* ==========================================================================
   Bottom Action Dock
   ========================================================================== */

.bottom-dock {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65), 0 0 20px var(--glass-glow);
  padding: 6px 10px;
  border-radius: 999px;
  z-index: 10;
  max-width: 95vw;
}

.dock-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.dock-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-gold);
}

.dock-btn:active {
  transform: scale(0.96);
}

.dock-btn .btn-icon {
  font-size: 15px;
}

.speed-selector {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 999px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.speed-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 10px;
  font-size: 11.5px;
  font-weight: 500;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.speed-btn.active {
  background: linear-gradient(135deg, rgba(255, 158, 44, 0.3), rgba(230, 57, 70, 0.35));
  color: #fff;
  border: 1px solid rgba(255, 180, 50, 0.4);
  box-shadow: 0 0 10px rgba(255, 150, 30, 0.3);
}

/* ==========================================================================
   Gift Envelope / Home Page Card (Featuring Hero Photo Slideshow of Sangu)
   ========================================================================== */

.intro-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.75s;
  padding: 16px;
  overflow-y: auto;
}

.intro-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(18, 9, 28, 0.58) 0%, rgba(5, 2, 8, 0.8) 100%);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

/* Home Intro Moving Background Animations */
.intro-bg-animations {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.home-aurora-glow {
  position: absolute;
  top: -25%;
  left: -25%;
  width: 150%;
  height: 150%;
  background: radial-gradient(ellipse at 25% 25%, rgba(230, 57, 70, 0.25) 0%, transparent 55%),
              radial-gradient(ellipse at 80% 75%, rgba(255, 158, 27, 0.22) 0%, transparent 50%),
              radial-gradient(ellipse at 75% 20%, rgba(114, 9, 183, 0.25) 0%, transparent 50%);
  animation: auroraPulse 12s ease-in-out infinite alternate;
  filter: blur(50px);
}

@keyframes auroraPulse {
  0% { transform: scale(1) rotate(0deg); opacity: 0.75; }
  50% { transform: scale(1.15) rotate(3deg); opacity: 1; }
  100% { transform: scale(0.95) rotate(-3deg); opacity: 0.8; }
}

/* Romantic Shooting Stars */
.shooting-star {
  position: absolute;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 245, 210, 1), rgba(255, 150, 40, 0.7), transparent);
  border-radius: 999px;
  filter: drop-shadow(0 0 6px rgba(255, 200, 100, 0.9));
  opacity: 0;
  pointer-events: none;
}

.shooting-star::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 10px #ffbe0b, 0 0 20px #ff9e00;
}

.shooting-star.s-star-1 {
  top: 18%;
  left: 12%;
  width: 140px;
  transform: rotate(-35deg);
  animation: meteorSweep1 7s ease-in-out infinite;
  animation-delay: 0.8s;
}

.shooting-star.s-star-2 {
  top: 26%;
  right: 16%;
  width: 170px;
  transform: rotate(-40deg);
  animation: meteorSweep2 8.5s ease-in-out infinite;
  animation-delay: 3.5s;
}

.shooting-star.s-star-3 {
  top: 9%;
  right: 36%;
  width: 110px;
  transform: rotate(-30deg);
  animation: meteorSweep3 9.5s ease-in-out infinite;
  animation-delay: 6s;
}

@keyframes meteorSweep1 {
  0% { transform: rotate(-35deg) translateX(0); opacity: 0; }
  8% { opacity: 1; }
  22% { transform: rotate(-35deg) translateX(300px); opacity: 0; }
  100% { transform: rotate(-35deg) translateX(300px); opacity: 0; }
}

@keyframes meteorSweep2 {
  0% { transform: rotate(-40deg) translateX(0); opacity: 0; }
  8% { opacity: 1; }
  24% { transform: rotate(-40deg) translateX(320px); opacity: 0; }
  100% { transform: rotate(-40deg) translateX(320px); opacity: 0; }
}

@keyframes meteorSweep3 {
  0% { transform: rotate(-30deg) translateX(0); opacity: 0; }
  8% { opacity: 1; }
  20% { transform: rotate(-30deg) translateX(250px); opacity: 0; }
  100% { transform: rotate(-30deg) translateX(250px); opacity: 0; }
}

/* Envelope Card with Breathing Glow */
.envelope-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 360px;
  background: linear-gradient(145deg, #1b0f27, #0e0817);
  border: 1.5px solid rgba(255, 180, 70, 0.4);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 45px rgba(255, 120, 30, 0.3);
  border-radius: 28px;
  padding: 24px 22px 22px;
  text-align: center;
  transform: translateY(0);
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
  margin: auto;
  animation: envelopePulse 4s ease-in-out infinite alternate;
}

@keyframes envelopePulse {
  0% {
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(255, 120, 30, 0.25);
    border-color: rgba(255, 180, 70, 0.35);
  }
  100% {
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.9), 0 0 55px rgba(230, 57, 70, 0.42), 0 0 25px rgba(255, 195, 80, 0.3);
    border-color: rgba(255, 205, 95, 0.6);
  }
}

.envelope-top-flare {
  position: absolute;
  top: -70px;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 140px;
  background: radial-gradient(ellipse, rgba(255, 140, 20, 0.45) 0%, transparent 70%);
  pointer-events: none;
}

.greeting-pre {
  font-family: var(--font-script);
  font-size: 1.35rem;
  color: #ffb703;
  margin-bottom: 2px;
}

.greeting-title {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 4.5vw, 1.85rem);
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
  line-height: 1.25;
  text-shadow: 0 2px 14px rgba(255, 77, 109, 0.45);
}

/* --- Hero Photo Frame & Animations --- */
.hero-photo-wrapper {
  position: relative;
  width: 100%;
  max-width: 235px;
  margin: 0 auto 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: photoFloat 5s ease-in-out infinite;
  cursor: pointer;
}

@keyframes photoFloat {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(1deg);
  }
}

.photo-glow-ring {
  position: absolute;
  top: -12px;
  left: -12px;
  right: -12px;
  bottom: -12px;
  border-radius: 24px;
  background: radial-gradient(circle, rgba(255, 160, 50, 0.45) 0%, rgba(230, 57, 70, 0.25) 50%, transparent 75%);
  filter: blur(14px);
  z-index: 1;
  animation: pulseGlow 3s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
  0% { opacity: 0.6; transform: scale(0.96); }
  100% { opacity: 1; transform: scale(1.05); }
}

.photo-frame {
  position: relative;
  z-index: 2;
  width: 100%;
  aspect-ratio: 9 / 13;
  border-radius: 20px;
  overflow: hidden;
  border: 2.5px solid rgba(255, 195, 80, 0.7);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(255, 140, 30, 0.4);
  background: #120919;
}

.slideshow-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-photo.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  opacity: 0;
  transition: opacity 0.85s cubic-bezier(0.4, 0, 0.2, 1), transform 1.1s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform: scale(1.04);
}

.hero-photo.slide.active {
  opacity: 1;
  transform: scale(1);
}

.slide-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 5;
}

.slide-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: all 0.3s ease;
}

.slide-dot.active {
  background: var(--accent-gold);
  transform: scale(1.35);
  box-shadow: 0 0 8px var(--accent-gold);
}

.photo-shimmer {
  position: absolute;
  top: -50%;
  left: -100%;
  width: 60%;
  height: 200%;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(255, 255, 255, 0.25) 50%,
    transparent 100%
  );
  transform: rotate(25deg);
  animation: shimmerSweep 4s infinite 1s;
  pointer-events: none;
  z-index: 4;
}

@keyframes shimmerSweep {
  0% { left: -100%; }
  35%, 100% { left: 200%; }
}

.photo-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  background: rgba(22, 10, 30, 0.88);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 180, 50, 0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  animation: heartPulse 1.8s ease-in-out infinite;
  z-index: 6;
}

.photo-sparkle {
  position: absolute;
  font-size: 18px;
  pointer-events: none;
  z-index: 3;
  animation: sparkleBob 3s ease-in-out infinite;
}

.photo-sparkle.s1 {
  top: -8px;
  right: -8px;
  animation-delay: 0.2s;
}

.photo-sparkle.s2 {
  bottom: -6px;
  left: -8px;
  animation-delay: 1.2s;
}

.photo-sparkle.s3 {
  top: 45%;
  left: -14px;
  animation-delay: 2.1s;
}

@keyframes sparkleBob {
  0%, 100% { transform: translateY(0) scale(0.9); opacity: 0.7; }
  50% { transform: translateY(-6px) scale(1.2); opacity: 1; }
}

.greeting-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.4;
}

.open-action-btn {
  background: linear-gradient(135deg, #ff9e2c 0%, #e63946 100%);
  color: #fff;
  border: none;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(230, 57, 70, 0.45);
  transition: all 0.25s ease;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.open-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(255, 100, 50, 0.65);
}

.open-action-btn:active {
  transform: translateY(1px);
}

.btn-heart-pulse {
  font-size: 17px;
  animation: heartPulse 1.8s ease-in-out infinite;
}

/* ==========================================================================
   Toast / Celebration Love Card
   ========================================================================== */

.celebration-toast {
  position: fixed;
  top: 66px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(20, 11, 30, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 180, 50, 0.45);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7), 0 0 25px rgba(255, 140, 20, 0.25);
  color: #fff;
  padding: 14px 26px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 20;
  pointer-events: auto;
  cursor: pointer;
  max-width: 92vw;
  width: auto;
  text-align: center;
}

.celebration-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.toast-heart {
  font-size: 24px;
  line-height: 1;
  filter: drop-shadow(0 0 10px rgba(255, 100, 150, 0.85));
  animation: heartPulse 1.8s ease-in-out infinite;
  flex-shrink: 0;
}

.toast-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}

.toast-line {
  font-family: var(--font-sans);
  font-size: clamp(13px, 3.4vw, 15.5px);
  font-weight: 500;
  color: #ffe8d6;
  text-shadow: 0 0 10px rgba(255, 180, 50, 0.5);
  letter-spacing: 0.3px;
  line-height: 1.4;
  white-space: nowrap;
}

.toast-line.highlight {
  color: #ffb703;
  font-weight: 600;
  text-shadow: 0 0 14px rgba(255, 180, 50, 0.85);
}

/* ==========================================================================
   Romantic Photo Gallery Lightbox Modal
   ========================================================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 3, 9, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s ease;
  padding: 16px;
}

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

.photo-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.photo-modal-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 345px;
  background: #170d22;
  border: 1.5px solid rgba(255, 180, 60, 0.45);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 40px rgba(255, 120, 30, 0.3);
  border-radius: 24px;
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transform: scale(0.9);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.modal-overlay.active .photo-modal-card {
  transform: scale(1);
}

.gallery-counter {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-gold);
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 180, 50, 0.3);
  letter-spacing: 0.5px;
}

.photo-modal-frame-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background: rgba(20, 10, 30, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 180, 50, 0.4);
  border-radius: 50%;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.gallery-nav-btn:hover {
  background: rgba(40, 20, 60, 0.9);
  border-color: var(--accent-gold);
  transform: translateY(-50%) scale(1.1);
}

.gallery-nav-btn.prev {
  left: -6px;
}

.gallery-nav-btn.next {
  right: -6px;
}

.photo-modal-frame {
  position: relative;
  width: 86%;
  aspect-ratio: 9 / 13;
  border-radius: 18px;
  overflow: hidden;
  border: 2px solid rgba(255, 190, 80, 0.55);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
  background: #0f0714;
}

.modal-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  transition: opacity 0.35s ease, transform 0.4s ease;
}

.modal-close-icon {
  position: absolute;
  top: 8px;
  right: 14px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
  transition: transform 0.2s ease, color 0.2s ease;
  z-index: 5;
}

.modal-close-icon:hover {
  transform: scale(1.15);
  color: var(--accent-gold);
}

.photo-modal-caption {
  text-align: center;
  padding: 0 4px;
}

.caption-title {
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 600;
  color: #ffb703;
  margin-bottom: 2px;
  text-shadow: 0 0 10px rgba(255, 180, 50, 0.5);
}

.caption-sub {
  font-family: var(--font-script), 'Caveat', cursive;
  font-size: 16.5px;
  color: #ffe8d6;
  text-shadow: 0 0 10px rgba(255, 140, 20, 0.4);
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  justify-content: center;
  width: 100%;
  padding-top: 2px;
}

.thumb-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.thumb-btn:hover {
  border-color: rgba(255, 180, 50, 0.6);
  transform: translateY(-2px);
}

.thumb-btn.active {
  border-color: var(--accent-gold);
  box-shadow: 0 0 12px rgba(255, 180, 50, 0.6);
  transform: scale(1.08);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */

@media (max-width: 480px) {
  .top-controls {
    top: 12px;
    padding: 0 12px;
  }
  
  .glass-pill-btn {
    padding: 6px 11px;
    font-size: 12px;
    gap: 6px;
  }

  .envelope-card {
    padding: 20px 16px 18px;
  }

  .hero-photo-wrapper {
    max-width: 205px;
    margin-bottom: 12px;
  }

  .greeting-title {
    font-size: 1.45rem;
    line-height: 1.25;
    margin-bottom: 8px;
  }

  .message-container {
    bottom: 74px;
  }

  .love-text .sub-lead {
    font-size: 1.35rem;
  }

  .love-text .main-name {
    font-size: 1.85rem;
  }

  .bottom-dock {
    bottom: 12px;
    padding: 4px 8px;
    gap: 4px;
  }

  .dock-btn {
    padding: 6px 9px;
    font-size: 12px;
  }

  .speed-btn {
    padding: 5px 8px;
    font-size: 10.5px;
  }

  .toast-line {
    white-space: normal;
  }
}
