/* style.css - Design System & Custom Styles for For BUBU */

:root {
  /* Soft Pastel Pink Color Palette */
  --bg-color: #FFF0F3;
  --bg-cream: #FFFDF9;
  --card-bg: #FFE4EC;
  --primary-accent: #F7A8C4;
  --secondary-accent: #E8829C;
  --deep-accent: #C9184A;
  --text-dark: #5C2E3B;
  --text-muted: #8A5E6B;
  --gold-accent: #F3C68F;
  --shadow-sm: 0 4px 10px rgba(201, 24, 74, 0.05);
  --shadow-md: 0 8px 24px rgba(201, 24, 74, 0.08);
  --shadow-lg: 0 16px 36px rgba(201, 24, 74, 0.12);
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Quicksand', 'Nunito', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Selection colors */
::selection {
  background-color: var(--primary-accent);
  color: white;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
  background: var(--primary-accent);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-accent);
}

/* Typography & Headings */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: var(--deep-accent);
}

.script-text {
  font-family: 'Dancing Script', 'Caveat', cursive;
  font-weight: 600;
}

/* Ambient Floating Background Blobs */
.bg-blobs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: drift 20s infinite alternate ease-in-out;
}

.blob-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--primary-accent) 0%, rgba(255,255,255,0) 70%);
  top: -10%;
  left: -10%;
}

.blob-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--card-bg) 0%, rgba(255,255,255,0) 70%);
  bottom: -15%;
  right: -10%;
  animation-duration: 25s;
  animation-delay: -5s;
}

.blob-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #FFE5EC 0%, rgba(255,255,255,0) 70%);
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-duration: 18s;
  animation-delay: -2s;
}

@keyframes drift {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(40px, 30px) scale(1.15);
  }
}

/* Floating Hearts Container */
#hearts-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.floating-heart {
  position: absolute;
  bottom: -50px;
  color: var(--secondary-accent);
  opacity: 0.15;
  font-size: 20px;
  animation: floatUp 12s linear infinite;
  user-select: none;
  pointer-events: none;
}

@keyframes floatUp {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.25;
  }
  90% {
    opacity: 0.25;
  }
  100% {
    transform: translateY(-105vh) rotate(360deg);
    opacity: 0;
  }
}

/* Decorative Divider */
.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 40px auto;
  width: 80%;
  max-width: 300px;
}

.section-divider .line {
  height: 1px;
  flex-grow: 1;
  background: linear-gradient(to right, rgba(201, 24, 74, 0), var(--primary-accent), rgba(201, 24, 74, 0));
}

.section-divider .icon {
  margin: 0 15px;
  color: var(--deep-accent);
  font-size: 1.2rem;
  animation: pulseHeart 2s infinite ease-in-out;
}

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

/* Sparkle / Twinkle animations */
.sparkle-header {
  position: relative;
  display: inline-block;
  margin-bottom: 10px;
}

.sparkle-icon {
  position: absolute;
  color: var(--gold-accent);
  font-size: 1.2rem;
  pointer-events: none;
  animation: sparkleTwinkle 2.5s infinite alternate ease-in-out;
}

.sparkle-1 {
  top: -15px;
  left: -20px;
}

.sparkle-2 {
  bottom: -5px;
  right: -25px;
  animation-delay: 1.2s;
}

@keyframes sparkleTwinkle {
  0% { transform: scale(0.6) rotate(0deg); opacity: 0.3; }
  100% { transform: scale(1.1) rotate(45deg); opacity: 1; filter: drop-shadow(0 0 4px var(--gold-accent)); }
}

/* Buttons */
.btn-primary {
  background-color: var(--deep-accent);
  color: white;
  border: none;
  border-radius: 30px;
  padding: 12px 32px;
  font-family: 'Quicksand', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(201, 24, 74, 0.3);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  background-color: #A70E38;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(201, 24, 74, 0.4);
}

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

/* SECTION 8: PASSWORD GATE (SOFT) */
#password-gate {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-color);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  transition: opacity 0.8s cubic-bezier(0.445, 0.05, 0.55, 0.95), visibility 0.8s;
  padding: 20px;
}

.password-card {
  background-color: var(--bg-cream);
  border-radius: var(--border-radius-lg);
  padding: 40px 30px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  border: 1px solid rgba(247, 168, 196, 0.3);
  position: relative;
  overflow: hidden;
}

.password-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(to right, var(--primary-accent), var(--deep-accent), var(--primary-accent));
}

.password-icon {
  width: 70px;
  height: 70px;
  background-color: var(--card-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  color: var(--deep-accent);
  font-size: 2rem;
  box-shadow: var(--shadow-sm);
  animation: pulseHeart 2s infinite;
}

.password-card h2 {
  font-size: 2rem;
  margin-bottom: 12px;
  color: var(--deep-accent);
}

.password-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.input-group {
  position: relative;
  margin-bottom: 20px;
}

.password-input {
  width: 100%;
  padding: 14px 20px;
  font-family: 'Quicksand', sans-serif;
  font-size: 1.1rem;
  border: 2px solid var(--primary-accent);
  border-radius: 30px;
  outline: none;
  background-color: rgba(255, 255, 255, 0.8);
  text-align: center;
  color: var(--text-dark);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.password-input:focus {
  border-color: var(--deep-accent);
  box-shadow: 0 0 10px rgba(201, 24, 74, 0.15);
}

.password-card button {
  width: 100%;
  justify-content: center;
}

.password-error {
  font-size: 0.9rem;
  color: var(--deep-accent);
  margin-top: 12px;
  min-height: 20px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.3s;
}

.password-error.visible {
  opacity: 1;
}

/* Shake animation for wrong password */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  15%, 45%, 75% { transform: translateX(-10px); }
  30%, 60%, 90% { transform: translateX(10px); }
}

.shake {
  animation: shake 0.5s ease-in-out;
}

/* Body unlocked styles */
body.locked {
  height: 100vh;
  overflow: hidden;
}

/* MAIN CONTENT SECTIONS */
main {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 80px 0;
  position: relative;
}

/* SECTION 5.1: HERO / LANDING */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-top: 40px;
  z-index: 1;
}

.hero-content {
  max-width: 800px;
  position: relative;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 5.5rem);
  color: var(--deep-accent);
  line-height: 1.1;
  margin-bottom: 16px;
  text-shadow: 0 2px 4px rgba(201, 24, 74, 0.05);
}

.hero-subtitle {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--text-muted);
  margin-bottom: 40px;
  font-weight: 400;
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--deep-accent);
  cursor: pointer;
  transition: opacity 0.3s;
  font-weight: 500;
  font-size: 0.9rem;
}

.scroll-indicator svg {
  margin-top: 8px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

/* Parallax photos in Hero */
.hero-deco-photos {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.deco-photo {
  position: absolute;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  background-color: var(--bg-cream);
  border: 6px solid var(--bg-cream);
  opacity: 0.15;
  width: 130px;
  height: 160px;
  object-fit: cover;
  transform: rotate(var(--rotation));
}

.deco-photo-1 {
  top: 15%;
  left: 5%;
  --rotation: -10deg;
}

.deco-photo-2 {
  top: 20%;
  right: 5%;
  --rotation: 12deg;
}

.deco-photo-3 {
  bottom: 15%;
  left: 8%;
  --rotation: 8deg;
}

.deco-photo-4 {
  bottom: 20%;
  right: 8%;
  --rotation: -15deg;
}

/* SECTION 5.2: OUR STORY TIMELINE */
#timeline {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 8px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Together Counter style */
.together-counter {
  background-color: var(--card-bg);
  padding: 20px 40px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 50px;
  text-align: center;
  border: 1px solid rgba(247, 168, 196, 0.4);
  max-width: 450px;
}

.counter-days {
  font-size: clamp(2.5rem, 6vw, 3.8rem);
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: var(--deep-accent);
  line-height: 1.1;
  margin-bottom: 6px;
}

.counter-label {
  font-size: 1rem;
  color: var(--text-dark);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Timeline Vertical Line */
.timeline-container {
  position: relative;
  max-width: 800px;
  width: 100%;
  padding: 20px 0;
}

.timeline-container::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: linear-gradient(to bottom, rgba(201, 24, 74, 0.1), var(--primary-accent) 15%, var(--primary-accent) 85%, rgba(201, 24, 74, 0.1));
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 20px 40px;
  clear: both;
}

.timeline-item:nth-child(odd) {
  float: left;
  text-align: right;
}

.timeline-item:nth-child(even) {
  float: right;
  text-align: left;
}

/* Timeline Node / Circle */
.timeline-node {
  position: absolute;
  top: 50%;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--bg-cream);
  border: 4px solid var(--deep-accent);
  box-shadow: 0 0 0 5px rgba(247, 168, 196, 0.4);
  z-index: 2;
  transform: translateY(-50%);
}

.timeline-item:nth-child(odd) .timeline-node {
  right: -12px;
}

.timeline-item:nth-child(even) .timeline-node {
  left: -12px;
}

/* Timeline Card */
.timeline-card {
  background-color: var(--bg-cream);
  border-radius: var(--border-radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(247, 168, 196, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.timeline-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.timeline-date {
  display: inline-block;
  background-color: var(--card-bg);
  color: var(--deep-accent);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 4px 12px;
  border-radius: 12px;
  margin-bottom: 12px;
}

.timeline-card h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.timeline-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Clean floating clear fix */
.timeline-container::after {
  content: '';
  display: table;
  clear: both;
}

/* SECTION 5.3: ANIMATED PHOTO GALLERY */
#gallery {
  width: 100%;
}

.empty-gallery-msg {
  text-align: center;
  background-color: var(--bg-cream);
  border: 2px dashed var(--primary-accent);
  border-radius: var(--border-radius-lg);
  padding: 60px 40px;
  max-width: 600px;
  margin: 0 auto;
  box-shadow: var(--shadow-sm);
}

.empty-gallery-msg svg {
  color: var(--primary-accent);
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
}

.empty-gallery-msg h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.empty-gallery-msg p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Masonry Columns */
.gallery-grid {
  column-count: 3;
  column-gap: 20px;
  width: 100%;
}

.gallery-item {
  display: inline-block;
  width: 100%;
  margin-bottom: 20px;
  break-inside: avoid;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  background-color: var(--bg-cream);
  box-shadow: var(--shadow-sm);
  border: 5px solid var(--bg-cream);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.gallery-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 28px rgba(201, 24, 74, 0.16);
  border-color: var(--card-bg);
}

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

/* LIGHTBOX */
#lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(20, 5, 10, 0.92);
  z-index: 20000;
  display: none;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

#lightbox.visible {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 80%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: var(--border-radius-sm);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  border: 4px solid var(--bg-cream);
  user-select: none;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(201, 24, 74, 0.2);
  border: none;
  color: white;
  font-size: 2.2rem;
  padding: 15px 10px;
  cursor: pointer;
  border-radius: var(--border-radius-sm);
  transition: background 0.3s, opacity 0.3s;
  opacity: 0.7;
}

.lightbox-nav:hover {
  background: var(--deep-accent);
  opacity: 1;
}

.lightbox-prev {
  left: -60px;
}

.lightbox-next {
  right: -60px;
}

/* SECTION 5.4: LOVE LETTER / DIARY */
#letter {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.letter-card-container {
  perspective: 1000px;
  width: 100%;
  max-width: 650px;
}

.letter-card {
  background-color: var(--bg-cream);
  border-radius: var(--border-radius-md);
  padding: 50px 40px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(247, 168, 196, 0.25);
  transform: rotate(-1.5deg);
  transition: transform 0.5s ease;
  position: relative;
  background-image: 
    linear-gradient(rgba(247, 168, 196, 0.15) 1px, transparent 1px);
  background-size: 100% 28px;
  background-position: 0 10px;
}

.letter-card::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 30px;
  width: 1px;
  background-color: rgba(201, 24, 74, 0.15);
}

.letter-card:hover {
  transform: rotate(0deg) scale(1.01);
}

.letter-card h3.script-text {
  font-size: 2.5rem;
  color: var(--deep-accent);
  margin-bottom: 24px;
  text-align: left;
  padding-left: 10px;
}

.letter-body {
  font-family: 'Quicksand', sans-serif;
  font-size: 1.05rem;
  color: var(--text-dark);
  line-height: 1.85; /* Aligns body text beautifully with notebook lines */
  text-align: left;
  margin-bottom: 30px;
  white-space: pre-line;
  padding-left: 10px;
}

.letter-signature {
  text-align: right;
  font-size: 1.8rem;
  color: var(--deep-accent);
  margin-top: 15px;
}

.letter-card-footer {
  font-style: italic;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 24px;
  text-align: center;
}

/* SECTION 5.5: REASONS I LOVE YOU */
#reasons {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.reason-box {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  max-width: 600px;
  width: 100%;
  background-color: var(--bg-cream);
  padding: 30px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: 30px;
  border: 1px solid rgba(247, 168, 196, 0.2);
  position: relative;
  overflow: hidden;
}

.reason-box::before {
  content: "“";
  position: absolute;
  top: -10px;
  left: 20px;
  font-family: 'Playfair Display', serif;
  font-size: 7rem;
  color: rgba(247, 168, 196, 0.2);
  line-height: 1;
}

.reason-content {
  font-size: clamp(1.15rem, 3.5vw, 1.45rem);
  font-weight: 500;
  color: var(--deep-accent);
  line-height: 1.5;
  transition: opacity 0.3s, transform 0.3s;
}

.reason-content.fade-out {
  opacity: 0;
  transform: scale(0.95);
}

.reason-content.fade-in {
  opacity: 1;
  transform: scale(1);
}

.btn-heart {
  background-color: var(--deep-accent);
  color: white;
  border: none;
  border-radius: 50%;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(201, 24, 74, 0.25);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-heart svg {
  width: 28px;
  height: 28px;
  transition: transform 0.3s ease;
}

.btn-heart:hover {
  transform: scale(1.1) rotate(5deg);
  background-color: #A70E38;
}

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

.btn-heart:active {
  transform: scale(0.95);
}

.reasons-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 16px;
  font-weight: 500;
}

/* SECTION 5.6: COUNTDOWN TIMER */
#countdown {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.countdown-container {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 600px;
  width: 100%;
}

.countdown-card {
  background-color: var(--bg-cream);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(247, 168, 196, 0.2);
  width: 100px;
  padding: 16px 8px;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.countdown-card::before {
  content: '♥';
  position: absolute;
  top: 4px;
  font-size: 0.75rem;
  color: var(--primary-accent);
}

.countdown-num {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 700;
  color: var(--deep-accent);
  line-height: 1.1;
  margin-bottom: 2px;
}

.countdown-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* SECTION 5.7: AUDIO PLAYER TOGGLE */
.music-control-wrapper {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
}

.btn-music {
  background-color: var(--bg-cream);
  color: var(--deep-accent);
  border: 2px solid var(--primary-accent);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.btn-music:hover {
  transform: scale(1.1);
  background-color: var(--card-bg);
  border-color: var(--deep-accent);
}

.btn-music.playing {
  background-color: var(--deep-accent);
  color: white;
  border-color: var(--deep-accent);
  animation: pulseMusic 1.8s infinite ease-in-out;
}

@keyframes pulseMusic {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(201, 24, 74, 0.4); }
  50% { transform: scale(1.08); box-shadow: 0 0 0 8px rgba(201, 24, 74, 0); }
}

.music-tooltip {
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--text-dark);
  color: white;
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 0.75rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-music:hover + .music-tooltip {
  opacity: 1;
}

/* SECTION 5.8: CLOSING / FOOTER */
footer {
  text-align: center;
  padding: 60px 20px 40px;
  width: 100%;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.footer-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--deep-accent);
}

.heart-row {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.heart-row svg {
  color: var(--primary-accent);
  width: 16px;
  height: 16px;
  animation: pulseHeart 1.5s infinite;
}

.heart-row svg:nth-child(2) {
  color: var(--deep-accent);
  animation-delay: 0.3s;
}

.heart-row svg:nth-child(3) {
  color: var(--primary-accent);
  animation-delay: 0.6s;
}

.btn-totop {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 15px;
  transition: color 0.3s;
}

.btn-totop:hover {
  color: var(--deep-accent);
}

/* MEDIA QUERIES & RESPONSIVENESS */

@media (max-width: 992px) {
  .gallery-grid {
    column-count: 2;
  }
  .lightbox-prev {
    left: -40px;
  }
  .lightbox-next {
    right: -40px;
  }
}

@media (max-width: 768px) {
  section {
    padding: 60px 0;
  }
  
  /* Timeline switches to a vertical single column layout on mobile/tablet */
  .timeline-container::before {
    left: 20px;
  }
  
  .timeline-item {
    width: 100%;
    padding: 15px 0 15px 40px;
  }
  
  .timeline-item:nth-child(odd) {
    float: none;
    text-align: left;
  }
  
  .timeline-item:nth-child(even) {
    float: none;
    text-align: left;
  }
  
  .timeline-item:nth-child(odd) .timeline-node {
    left: 8px;
    right: auto;
  }
  
  .timeline-item:nth-child(even) .timeline-node {
    left: 8px;
  }
  
  .deco-photo {
    width: 100px;
    height: 130px;
  }
  
  .deco-photo-1 { top: 12%; left: 3%; }
  .deco-photo-2 { top: 18%; right: 3%; }
  .deco-photo-3 { bottom: 12%; left: 3%; }
  .deco-photo-4 { bottom: 18%; right: 3%; }
}

@media (max-width: 576px) {
  .gallery-grid {
    column-count: 1;
  }
  
  .letter-card {
    padding: 35px 20px;
    background-size: 100% 28px;
    background-position: 0 15px;
  }
  
  .letter-card::after {
    left: 15px;
  }
  
  .letter-card h3.script-text {
    font-size: 2rem;
  }
  
  .letter-body {
    font-size: 0.95rem;
    line-height: 1.75;
  }
  
  .lightbox-content {
    max-width: 95%;
  }
  
  .lightbox-nav {
    display: none; /* Hide nav arrows on very small mobile to rely on swipe/tap */
  }
  
  .countdown-container {
    gap: 8px;
  }
  
  .countdown-card {
    width: 75px;
    padding: 10px 4px;
  }
}

/* Reduced Motion Settings */
@media (prefers-reduced-motion: reduce) {
  .blob, .floating-heart, .btn-music.playing, .scroll-indicator svg, .section-divider .icon, .sparkle-icon, .heart-row svg {
    animation: none !important;
  }
  
  .timeline-card:hover, .gallery-item:hover, .btn-primary:hover, .btn-heart:hover {
    transform: none !important;
  }
  
  body, html {
    scroll-behavior: auto !important;
  }
}
