/* ==========================================
   ROMANTIC FAIRYTALE DESIGN SYSTEM & STYLES
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@600;700&family=Playfair+Display:ital,wght@0,600;0,700;1,400&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg-deep: #0b0713;
  --bg-card: rgba(22, 14, 34, 0.65);
  --bg-card-hover: rgba(36, 22, 54, 0.85);
  --border-glow: rgba(255, 117, 143, 0.35);
  --rose-accent: #ff4d79;
  --rose-glow: #ff758f;
  --gold-accent: #ffb703;
  --gold-glow: rgba(255, 183, 3, 0.4);
  --text-main: #f8f9fa;
  --text-subtle: #d0c7de;
  --font-serif: 'Playfair Display', serif;
  --font-script: 'Dancing Script', cursive;
  --font-sans: 'Plus Jakarta Sans', sans-serif;
}

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

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-sans);
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* Background Particle Canvas */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

/* Global Header & Navigation */
.navbar {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.75rem 2rem;
  background: rgba(18, 11, 28, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glow);
  border-radius: 9999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 77, 121, 0.25);
  transition: all 0.3s ease;
}

.nav-link {
  color: var(--text-subtle);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-link:hover, .nav-link.active {
  color: #fff;
  background: rgba(255, 77, 121, 0.25);
  box-shadow: 0 0 12px var(--rose-glow);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

.nav-brand {
  font-family: var(--font-script);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--rose-glow);
  margin-right: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  text-shadow: 0 0 10px var(--rose-accent);
}

/* Audio Player Floating Controller */
.audio-controller {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(22, 14, 34, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glow);
  border-radius: 9999px;
  padding: 0.5rem 1.25rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 0 15px rgba(255, 77, 121, 0.2);
}

.audio-btn {
  background: none;
  border: none;
  color: var(--rose-glow);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: transform 0.2s ease, background 0.2s ease;
}

.audio-btn:hover {
  transform: scale(1.1);
  background: rgba(255, 77, 121, 0.2);
}

.sound-waves {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 16px;
}

.sound-bar {
  width: 3px;
  background: var(--rose-glow);
  border-radius: 2px;
  animation: bounce 1.2s infinite ease-in-out alternate;
}

.sound-bar:nth-child(1) { height: 60%; animation-delay: 0.1s; }
.sound-bar:nth-child(2) { height: 100%; animation-delay: 0.3s; }
.sound-bar:nth-child(3) { height: 40%; animation-delay: 0.2s; }
.sound-bar:nth-child(4) { height: 80%; animation-delay: 0.4s; }

.audio-paused .sound-bar {
  animation-play-state: paused;
  height: 4px !important;
}

@keyframes bounce {
  0% { height: 20%; }
  100% { height: 100%; }
}

/* PAGE 1: INTRO BENCH SCENE */
.intro-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 6rem 2rem 3rem 2rem;
  background: radial-gradient(circle at 50% 30%, rgba(45, 20, 60, 0.5) 0%, rgba(11, 7, 19, 0.95) 100%),
              url('../assets/hero_park_bg.png') no-repeat center center / cover;
}

.intro-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(11, 7, 19, 0.4) 0%, transparent 40%, rgba(11, 7, 19, 0.8) 100%);
  pointer-events: none;
}

/* Scene Title Header */
.hero-title-box {
  position: relative;
  z-index: 10;
  text-align: center;
  margin-top: 1rem;
}

.hero-sub {
  font-family: var(--font-script);
  font-size: 2.2rem;
  color: var(--gold-accent);
  text-shadow: 0 0 12px var(--gold-glow);
  letter-spacing: 1px;
}

.hero-main {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ffffff 0%, #ffcbd5 50%, var(--rose-glow) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(255, 117, 143, 0.4);
}

/* Interactive Name Ribbon */
.name-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  background: rgba(255, 77, 121, 0.15);
  border: 1px solid var(--border-glow);
  padding: 0.3rem 1.2rem;
  border-radius: 9999px;
  backdrop-filter: blur(8px);
}

.name-edit-input {
  background: none;
  border: none;
  border-bottom: 1.5px dashed var(--rose-glow);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  width: 110px;
  outline: none;
}

.name-edit-input:focus {
  border-bottom-style: solid;
  border-bottom-color: var(--gold-accent);
}

/* Stage Container for Character Animation */
.animation-stage {
  position: relative;
  width: 100%;
  max-width: 1100px;
  height: 480px;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

#introCanvas {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Speech Bubble Box */
.speech-bubble {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  max-width: 580px;
  width: 90%;
  background: rgba(24, 15, 36, 0.92);
  backdrop-filter: blur(20px);
  border: 1.5px solid var(--border-glow);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(255, 117, 143, 0.3);
  border-radius: 24px;
  padding: 2rem;
  z-index: 20;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease, transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.27);
}

.speech-bubble.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) scale(1);
}

.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 16px 16px 0;
  border-style: solid;
  border-color: rgba(24, 15, 36, 0.92) transparent;
  display: block;
  width: 0;
}

.bubble-quote {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  line-height: 1.6;
  color: #fff;
  text-align: center;
  margin-bottom: 0.8rem;
  font-style: italic;
}

.bubble-quote span.highlight {
  color: var(--rose-glow);
  font-family: var(--font-script);
  font-size: 1.8rem;
  font-style: normal;
  font-weight: bold;
}

.bubble-heart {
  font-size: 1.6rem;
  color: var(--rose-accent);
  text-align: center;
  animation: pulseHeart 1.5s infinite ease-in-out;
}

@keyframes pulseHeart {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.25); opacity: 1; filter: drop-shadow(0 0 8px var(--rose-glow)); }
}

/* Glowing Pulsing Button */
.cta-container {
  position: relative;
  z-index: 20;
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 1s ease 0.5s;
}

.cta-container.visible {
  opacity: 1;
  transform: translateY(0);
}

.btn-glow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.1rem 2.8rem;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #ff4d79 0%, #d62839 100%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 9999px;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(255, 77, 121, 0.5), 0 0 20px rgba(255, 77, 121, 0.4);
  cursor: pointer;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.27);
  animation: btnPulse 2s infinite ease-in-out;
}

.btn-glow:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 15px 40px rgba(255, 77, 121, 0.7), 0 0 35px rgba(255, 183, 3, 0.6);
  background: linear-gradient(135deg, #ff758f 0%, #ff4d79 100%);
}

@keyframes btnPulse {
  0%, 100% { box-shadow: 0 10px 30px rgba(255, 77, 121, 0.5), 0 0 15px rgba(255, 77, 121, 0.3); }
  50% { box-shadow: 0 15px 45px rgba(255, 77, 121, 0.8), 0 0 30px rgba(255, 183, 3, 0.5); }
}

/* PAGE 2: TIMELINE */
.page-section {
  padding: 8rem 2rem 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-subtitle {
  font-family: var(--font-script);
  font-size: 2.2rem;
  color: var(--rose-glow);
  text-shadow: 0 0 10px var(--rose-glow);
}

.section-title {
  font-family: var(--font-serif);
  font-size: 3.2rem;
  font-weight: 700;
  margin-top: 0.3rem;
  color: #fff;
}

/* Timeline Vertical Container */
.timeline-wrapper {
  position: relative;
  padding: 2rem 0;
}

/* SVG Glowing Red String Line Connector */
.timeline-string-container {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.timeline-string-svg {
  width: 100%;
  height: 100%;
}

.red-string-path {
  fill: none;
  stroke: var(--rose-accent);
  stroke-width: 4;
  stroke-linecap: round;
  filter: drop-shadow(0 0 10px var(--rose-glow));
  transition: stroke-dashoffset 0.1s linear;
}

/* Milestone Cards */
.timeline-item {
  position: relative;
  display: flex;
  justify-content: flex-end;
  padding-bottom: 5rem;
  width: 50%;
}

.timeline-item:nth-child(even) {
  align-self: flex-end;
  justify-content: flex-start;
  margin-left: 50%;
}

.timeline-content {
  width: 90%;
  max-width: 480px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glow);
  border-radius: 20px;
  padding: 1.8rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateX(-60px);
  transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.timeline-item:nth-child(even) .timeline-content {
  transform: translateX(60px);
}

.timeline-content.in-view {
  opacity: 1;
  transform: translateX(0) !important;
}

.timeline-content:hover {
  background: var(--bg-card-hover);
  border-color: var(--rose-glow);
  box-shadow: 0 20px 45px rgba(255, 77, 121, 0.25);
}

/* Timeline Photo Frame */
.timeline-photo-frame {
  width: 100%;
  height: auto;
  max-height: 450px;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 0;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
}

.timeline-photo-frame img {
  width: 100%;
  height: auto;
  max-height: 450px;
  object-fit: contain;
  transition: transform 0.6s ease;
  display: block;
}

.timeline-content:hover .timeline-photo-frame img {
  transform: scale(1.08);
}

.timeline-date {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold-accent);
  margin-bottom: 0.4rem;
}

.timeline-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  margin-bottom: 0.6rem;
  color: #fff;
}

.timeline-caption {
  font-size: 0.98rem;
  color: var(--text-subtle);
  line-height: 1.6;
}

/* Heart Node on Line */
.timeline-node-heart {
  position: absolute;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 38px;
  height: 38px;
  background: var(--bg-deep);
  border: 2px solid var(--rose-glow);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rose-accent);
  font-size: 1rem;
  z-index: 5;
  box-shadow: 0 0 15px var(--rose-glow);
}

/* PAGE 3: MEMORY GALLERY */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 6rem;
}

/* Storybook Photo Card */
.gallery-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.27);
  transform: rotate(var(--rotation, 0deg));
  cursor: pointer;
}

.gallery-card:nth-child(1) { --rotation: -2deg; }
.gallery-card:nth-child(2) { --rotation: 2deg; }
.gallery-card:nth-child(3) { --rotation: -1.5deg; }
.gallery-card:nth-child(4) { --rotation: 1.5deg; }
.gallery-card:nth-child(5) { --rotation: -2.5deg; }
.gallery-card:nth-child(6) { --rotation: 2.5deg; }

/* SVG Filter Application for Painted Aesthetic */
.gallery-img-wrap {
  position: relative;
  width: 100%;
  height: 340px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: saturate(1.15) contrast(1.05) url('#storybook-filter');
  transition: transform 0.6s ease, filter 0.6s ease;
  display: block;
}

.gallery-card:hover {
  transform: rotate(0deg) scale(1.04);
  z-index: 20;
  border-color: var(--rose-glow);
  box-shadow: 0 25px 50px rgba(255, 77, 121, 0.35);
}

.gallery-card:hover .gallery-img {
  transform: scale(1.1);
  filter: saturate(1.3) contrast(1.1);
}

/* Gallery Hover Caption Overlay */
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 9, 25, 0.95) 0%, rgba(15, 9, 25, 0.4) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.8rem;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery-card:hover .gallery-overlay {
  opacity: 1;
}

.gallery-date {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold-accent);
  letter-spacing: 1px;
}

.gallery-caption {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: #fff;
  margin-top: 0.3rem;
  line-height: 1.4;
}

/* THE FINALE: OPEN LETTER SECTION */
.finale-section {
  position: relative;
  max-width: 800px;
  margin: 4rem auto 6rem auto;
  text-align: center;
}

.envelope-card {
  position: relative;
  background: #fdf8ef;
  color: #2b1e19;
  border-radius: 16px;
  padding: 3.5rem 3rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(255, 183, 3, 0.3);
  border: 10px solid #f3e9d7;
  overflow: hidden;
  transition: all 0.6s ease;
}

.wax-seal-wrapper {
  margin-bottom: 2rem;
}

.wax-seal {
  width: 90px;
  height: 90px;
  background: radial-gradient(circle at 30% 30%, #ff4d6d, #b7094c);
  border-radius: 50%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2.2rem;
  box-shadow: 0 8px 20px rgba(183, 9, 76, 0.6), inset 0 -4px 8px rgba(0,0,0,0.4);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wax-seal:hover {
  transform: scale(1.12);
  box-shadow: 0 12px 28px rgba(183, 9, 76, 0.8), inset 0 -4px 8px rgba(0,0,0,0.4);
}

.letter-content {
  display: none;
  animation: fadeInLetter 1.2s ease forwards;
}

.letter-content.open {
  display: block;
}

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

.letter-heading {
  font-family: var(--font-script);
  font-size: 3rem;
  color: #8b0000;
  margin-bottom: 1.5rem;
}

.letter-body {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.85;
  color: #3a2b25;
  text-align: left;
  margin-bottom: 2rem;
}

.letter-body p {
  margin-bottom: 1.2rem;
}

.letter-signature {
  font-family: var(--font-script);
  font-size: 2.5rem;
  color: #b7094c;
  text-align: right;
  margin-top: 2rem;
}

/* RESPONSIVE MEDIA QUERIES */
@media (max-width: 768px) {
  .hero-main { font-size: 2.5rem; }
  .hero-sub { font-size: 1.8rem; }
  .speech-bubble { padding: 1.4rem; top: 10%; }
  .bubble-quote { font-size: 1.1rem; }
  
  .timeline-item, .timeline-item:nth-child(even) {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
    padding-left: 50px;
  }
  
  .timeline-string-container {
    left: 20px;
  }
  
  .timeline-node-heart {
    left: 20px;
  }

  .envelope-card {
    padding: 2rem 1.5rem;
  }
  
  .letter-body {
    font-size: 1.1rem;
  }
}

/* ==========================================
   POLAROID CARDS & PHOTO-NOTE LIGHTBOX MODAL
   ========================================== */

.section-desc {
  color: var(--text-subtle);
  font-size: 1.05rem;
  margin-top: 0.5rem;
  font-family: var(--font-sans);
}

.polaroid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 2rem;
  margin-bottom: 3.5rem;
}

.polaroid-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 20px;
  padding: 1.25rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 117, 143, 0.15);
  position: relative;
  cursor: pointer;
  transform-origin: center bottom;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.polaroid-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--rose-glow);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.75), 0 0 30px rgba(255, 77, 121, 0.4);
  z-index: 10;
}

.polaroid-pin {
  position: absolute;
  top: -14px;
  right: 18px;
  font-size: 1.5rem;
  z-index: 2;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
}

.polaroid-img-frame {
  width: 100%;
  height: 220px;
  overflow: hidden;
  border-radius: 14px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.polaroid-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.polaroid-card:hover .polaroid-img {
  transform: scale(1.08);
}

.polaroid-caption {
  margin-top: 1.2rem;
  color: var(--text-main);
  text-align: left;
}

.polaroid-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.polaroid-preview {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-subtle);
  line-height: 1.5;
  margin-bottom: 0.8rem;
}

.polaroid-tap-hint {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--rose-glow);
  background: rgba(255, 77, 121, 0.15);
  border: 1px solid rgba(255, 117, 143, 0.3);
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  transition: all 0.3s ease;
}

.polaroid-card:hover .polaroid-tap-hint {
  background: var(--rose-accent);
  color: #fff;
  box-shadow: 0 0 12px var(--rose-glow);
}

/* CUSTOM PHOTO UPLOAD BOX */
.photo-upload-box {
  background: var(--bg-card);
  border: 1px dashed var(--rose-glow);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  margin-bottom: 4rem;
}

.photo-upload-box h3 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--rose-glow);
  margin-bottom: 0.5rem;
}

.photo-upload-box p {
  color: var(--text-subtle);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.upload-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  align-items: center;
}

.custom-file-btn {
  background: rgba(255, 77, 121, 0.2);
  color: var(--text-main);
  border: 1px solid var(--rose-glow);
  padding: 0.6rem 1.4rem;
  border-radius: 9999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.custom-file-btn input[type="file"] {
  display: none;
}

.custom-file-btn:hover {
  background: var(--rose-accent);
  box-shadow: 0 0 15px var(--rose-glow);
}

.upload-input {
  background: rgba(10, 5, 20, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 9999px;
  font-size: 0.9rem;
  outline: none;
  min-width: 220px;
  transition: border-color 0.3s ease;
}

.upload-input:focus {
  border-color: var(--rose-glow);
  box-shadow: 0 0 10px rgba(255, 117, 143, 0.3);
}

.btn-glow-small {
  background: linear-gradient(135deg, var(--rose-accent), #d90429);
  color: #fff;
  border: none;
  padding: 0.65rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(255, 77, 121, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-glow-small:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(255, 77, 121, 0.8);
}

/* PHOTO MODAL LIGHTBOX OVERLAY */
.photo-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 4, 16, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  padding: 1.5rem;
}

.photo-modal-overlay.active {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.photo-modal-card {
  background: #171026;
  border: 1px solid var(--border-glow);
  border-radius: 24px;
  width: 100%;
  max-width: 850px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 77, 121, 0.3);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 2.2rem;
  cursor: pointer;
  z-index: 10;
  transition: color 0.3s ease;
}

.modal-close-btn:hover {
  color: var(--rose-accent);
}

.modal-body-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 2.5rem;
}

@media (max-width: 768px) {
  .modal-body-content {
    grid-template-columns: 1fr;
  }
}

.modal-img-wrap {
  width: 100%;
  height: 340px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.modal-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-text-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.modal-tag {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--rose-glow);
  margin-bottom: 0.8rem;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: #fff;
  margin-bottom: 1rem;
}

.modal-note {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-subtle);
  margin-bottom: 1.5rem;
}

.modal-footer-signature {
  font-family: var(--font-script);
  font-size: 1.3rem;
  color: var(--rose-accent);
}

/* ==========================================
   ANIMATED ROMANTIC CONNECTOR BOX TO NOTES
   ========================================== */

.romantic-connector-box {
  margin-top: 5rem;
  margin-bottom: 3rem;
  text-align: center;
  padding: 3rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 28px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(255, 77, 121, 0.25);
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

.romantic-connector-box:hover {
  border-color: var(--rose-glow);
  box-shadow: 0 25px 55px rgba(0, 0, 0, 0.8), 0 0 35px rgba(255, 77, 121, 0.45);
}

.connector-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.connector-line {
  height: 1px;
  width: 80px;
  background: linear-gradient(90deg, transparent, var(--rose-glow), transparent);
}

.connector-heart {
  font-size: 1.8rem;
  animation: heartPulse 1.8s ease-in-out infinite alternate;
  display: inline-block;
  filter: drop-shadow(0 0 8px var(--rose-accent));
}

@keyframes heartPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.35) rotate(8deg); }
}

.connector-subtitle {
  font-family: var(--font-script);
  font-size: 1.6rem;
  color: var(--rose-glow);
  margin-bottom: 0.4rem;
}

.connector-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: #ffffff;
  margin-bottom: 1rem;
}

.btn-glow-pulse {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #ff4d6d, #d90429);
  border-radius: 9999px;
  text-decoration: none;
  box-shadow: 0 0 20px rgba(255, 77, 109, 0.5), 0 0 40px rgba(255, 77, 109, 0.25);
  animation: btnGlowPulse 2.5s ease-in-out infinite alternate;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

@keyframes btnGlowPulse {
  0% {
    box-shadow: 0 0 15px rgba(255, 77, 109, 0.4), 0 0 30px rgba(255, 77, 109, 0.2);
  }
  100% {
    box-shadow: 0 0 30px rgba(255, 77, 109, 0.8), 0 0 55px rgba(255, 77, 109, 0.5);
  }
}

.btn-glow-pulse:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 0 40px rgba(255, 77, 109, 0.9), 0 0 70px rgba(255, 77, 109, 0.6);
}

.btn-icon {
  font-size: 1.3rem;
}

.btn-arrow {
  transition: transform 0.3s ease;
}

.btn-glow-pulse:hover .btn-arrow {
  transform: translateX(6px);
}

/* ==========================================
   ANIMATED ROMANTIC LYRICS & THOUGHTS RIBBON
   ========================================== */

.lyrics-ribbon-bar {
  position: fixed;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.55rem 1.6rem;
  background: rgba(18, 11, 28, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glow);
  border-radius: 9999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 77, 121, 0.2);
  max-width: 90vw;
  pointer-events: none;
}

.lyrics-icon {
  font-size: 1.2rem;
  animation: noteFloat 2s ease-in-out infinite alternate;
}

@keyframes noteFloat {
  0% { transform: translateY(0) rotate(-6deg); }
  100% { transform: translateY(-4px) rotate(6deg); }
}

.lyrics-text {
  font-family: var(--font-script);
  font-size: 1.3rem;
  color: var(--rose-glow);
  text-shadow: 0 0 8px rgba(255, 117, 143, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 68vw;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.lyrics-sparkle {
  font-size: 1.1rem;
  animation: sparkleRotate 3s linear infinite;
}

@keyframes sparkleRotate {
  0% { transform: rotate(0deg) scale(0.9); }
  50% { transform: rotate(180deg) scale(1.15); }
  100% { transform: rotate(360deg) scale(0.9); }
}

@media (max-width: 768px) {
  .lyrics-ribbon-bar {
    bottom: 0.8rem;
    padding: 0.4rem 1rem;
  }
  .lyrics-text {
    font-size: 1.1rem;
    max-width: 75vw;
  }
}
