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

:root {
  --bg-dark: #0a0a0f;
  --bg-card: rgba(255, 255, 255, 0.04);
  --pink: #ff4d6d;
  --pink-light: #ff758f;
  --pink-glow: rgba(255, 77, 109, 0.4);
  --purple: #7b2d8e;
  --purple-deep: #2d0a3e;
  --gold: #ffd700;
  --gold-soft: #f0c050;
  --rose: #e91e63;
  --text-light: #f0e6f6;
  --text-muted: #b8a9c9;
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.12);
  --font-script: 'Dancing Script', cursive;
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Poppins', sans-serif;
  --font-vibes: 'Great Vibes', cursive;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: var(--font-sans);
  background: var(--bg-dark);
  color: var(--text-light);
  overflow-x: hidden;
  line-height: 1.6;
}

/* ═══ SECTIONS WITH BG ═══ */
section {
  position: relative;
  padding: 80px 20px;
  overflow: hidden;
}

.section-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.section-bg img, .section-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(12px) brightness(0.45) saturate(1.3);
  transform: scale(1.15);
}

.section-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 15, 0.35), rgba(45, 10, 62, 0.3), rgba(10, 10, 15, 0.35));
}

section > *:not(.section-bg) {
  position: relative;
  z-index: 1;
}

.section-title {
  text-align: center;
  font-family: var(--font-vibes);
  font-size: 3rem;
  color: var(--gold);
  margin-bottom: 50px;
  text-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

/* ═══ ANIMATE ON SCROLL ═══ */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══ SECTION 1: INTRO ═══ */
#intro {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 10;
}

#intro .hearts-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.floating-heart {
  position: absolute;
  font-size: 1.5rem;
  opacity: 0;
  animation: floatHeart 6s ease-in infinite;
  color: var(--pink);
}

@keyframes floatHeart {
  0% { opacity: 0; transform: translateY(100vh) scale(0.5); }
  20% { opacity: 0.8; }
  100% { opacity: 0; transform: translateY(-20vh) scale(1.2) rotate(20deg); }
}

#intro .intro-text {
  font-family: var(--font-script);
  font-size: 1.6rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 600px;
  opacity: 0;
  animation: fadeInUp 2s ease 0.5s forwards;
  line-height: 2;
  padding: 0 20px;
}

#intro .enter-btn {
  margin-top: 50px;
  padding: 18px 60px;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-style: italic;
  color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  border: none;
  border-radius: 50px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: fadeInUp 2s ease 1.5s forwards;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 0 30px var(--pink-glow);
  letter-spacing: 2px;
}

#intro .enter-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 50px var(--pink-glow), 0 0 80px rgba(123, 45, 142, 0.3);
}

#intro .enter-btn::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: conic-gradient(transparent, rgba(255,255,255,0.15), transparent 30%);
  animation: rotateBtnGlow 3s linear infinite;
}

@keyframes rotateBtnGlow { to { transform: rotate(360deg); } }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══ SECTION 2: ENVELOPE ═══ */
#envelope-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.envelope-container {
  perspective: 1000px;
  cursor: pointer;
  width: 340px;
  height: 240px;
  position: relative;
  margin-top: 80px;
  margin-bottom: 30px;
}

.envelope {
  width: 100%; height: 100%;
  position: relative;
  background: linear-gradient(135deg, #d4a574, #c4956a);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  transition: transform 0.6s ease;
}

.envelope-flap {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 50%;
  background: linear-gradient(180deg, #c4956a, #b8875c);
  clip-path: polygon(0 0, 50% 100%, 100% 0);
  transform-origin: top center;
  transition: transform 0.8s ease;
  z-index: 2;
}

.envelope.opened .envelope-flap { transform: rotateX(180deg); }

.envelope-heart {
  position: absolute;
  top: 35%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.5rem;
  z-index: 3;
  transition: opacity 0.3s ease;
  filter: drop-shadow(0 0 10px rgba(255, 77, 109, 0.5));
}

.envelope.opened .envelope-heart { opacity: 0; }

.letter-content {
  display: none;
  max-width: 700px;
  text-align: center;
  animation: fadeInUp 1s ease;
}

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

.letter-content .letter-text {
  font-family: var(--font-script);
  font-size: 1.4rem;
  color: var(--text-light);
  line-height: 2.2;
  margin-bottom: 40px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 40px;
  backdrop-filter: blur(10px);
}

.letter-photos {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.polaroid {
  background: #fff;
  padding: 10px 10px 40px 10px;
  border-radius: 4px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
  transform: rotate(var(--rotate, -3deg));
  transition: transform 0.4s ease;
  width: 180px;
}

.polaroid:nth-child(2) { --rotate: 2deg; }
.polaroid:nth-child(3) { --rotate: -5deg; }
.polaroid:hover { transform: rotate(0deg) scale(1.1); z-index: 10; }

.polaroid img {
  width: 100%; height: 160px;
  object-fit: cover;
  border-radius: 2px;
}

.tap-hint {
  font-family: var(--font-script);
  font-size: 1.2rem;
  color: var(--gold-soft);
  animation: pulse 2s ease-in-out infinite;
}

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

/* ═══ GALLERY: STAGGERED SHOWCASE ═══ */
#gallery { padding: 80px 20px; }

.gallery-showcase {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

/* Style A: Full-width hero with overlay */
.gallery-hero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.4s ease;
  max-height: 500px;
}

.gallery-hero:hover { transform: scale(1.02); }

.gallery-hero .blur-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.gallery-hero .blur-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: blur(20px) brightness(0.5) saturate(1.2);
  transform: scale(1.2);
}

.gallery-hero .main-img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 450px;
  object-fit: contain;
}

.gallery-hero .hero-text {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 30px;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  z-index: 2;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--text-light);
  text-align: center;
}

/* Style B: Side-by-side with text */
.gallery-duo {
  display: flex;
  gap: 30px;
  align-items: center;
}

.gallery-duo.reverse { flex-direction: row-reverse; }

.gallery-duo .duo-image {
  flex: 1;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  max-height: 400px;
}

.gallery-duo .duo-image .blur-bg {
  position: absolute; inset: 0; z-index: 0;
}

.gallery-duo .duo-image .blur-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: blur(20px) brightness(0.5) saturate(1.2);
  transform: scale(1.2);
}

.gallery-duo .duo-image .main-img {
  position: relative; z-index: 1;
  width: 100%; height: 350px;
  object-fit: contain;
}

.gallery-duo .duo-text {
  flex: 1;
  text-align: center;
  padding: 20px;
}

.gallery-duo .duo-text blockquote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--text-muted);
  line-height: 1.9;
  border-left: 3px solid var(--pink);
  padding-left: 20px;
}

/* Style C: Triple cards */
.gallery-triple {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.gallery-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.gallery-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(255,77,109,0.25);
}

.gallery-card .blur-bg {
  position: absolute; inset: 0; z-index: 0;
}

.gallery-card .blur-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: blur(18px) brightness(0.5) saturate(1.2);
  transform: scale(1.2);
}

.gallery-card .main-img {
  position: relative; z-index: 1;
  width: 100%; height: 300px;
  object-fit: contain;
}

.gallery-card .card-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 20px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  z-index: 2;
  font-family: var(--font-script);
  font-size: 1rem;
  color: #fff;
  text-align: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

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

/* ═══ VIDEO CAROUSEL ═══ */
#video-carousel { padding: 80px 20px; }

.carousel-wrapper {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  display: flex;
  gap: 24px;
  padding: 20px 40px;
  max-width: 100%;
}
.carousel-wrapper::after {
  content: '';
  min-width: 40px;
  flex-shrink: 0;
}

.carousel-card {
  min-width: 280px; max-width: 280px;
  scroll-snap-align: center;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.carousel-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(255,77,109,0.2);
}

.carousel-card video {
  width: 100%; height: 220px;
  object-fit: contain;
  display: block;
}

.carousel-card .quote-overlay {
  position: relative;
  z-index: 2;
  padding: 16px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ═══ MYSTERY CARDS ═══ */
#mystery-cards {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

.flip-card {
  width: 100%; height: 340px;
  perspective: 1000px;
  cursor: pointer;
}

.flip-card-inner {
  width: 100%; height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.flip-card.flipped .flip-card-inner { transform: rotateY(180deg); }

.flip-card-front, .flip-card-back {
  position: absolute;
  width: 100%; height: 100%;
  backface-visibility: hidden;
  border-radius: 16px;
  overflow: hidden;
}

.flip-card-front {
  background: linear-gradient(135deg, var(--purple-deep), #1a0a2e);
  border: 2px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.flip-card-front .mystery-icon {
  font-size: 4rem;
  animation: floatIcon 3s ease-in-out infinite;
}

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

.flip-card-front .tap-text {
  font-family: var(--font-script);
  font-size: 1.1rem;
  color: var(--gold-soft);
}

.flip-card-back {
  transform: rotateY(180deg);
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
}

.flip-card-back img {
  width: 100%; height: 70%;
  object-fit: contain;
}

.flip-card-back .card-thought {
  padding: 15px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(123,45,142,0.2), transparent);
}

/* ═══ POEMS ═══ */
#poems {
  min-height: 100vh;
}

.poem-block {
  max-width: 800px;
  margin: 0 auto 80px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
}

.poem-block .poem-image-wrap {
  width: 280px; height: 350px;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
}

.poem-block .poem-image-wrap .blur-bg {
  position: absolute; inset: 0; z-index: 0;
}

.poem-block .poem-image-wrap .blur-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: blur(18px) brightness(0.5) saturate(1.2);
  transform: scale(1.2);
}

.poem-block .poem-image-wrap .main-img {
  position: relative; z-index: 1;
  width: 100%; height: 100%;
  object-fit: contain;
}

.poem-block .poem-text-container {
  flex: 1;
  min-width: 280px;
}

.poem-text-container h3 {
  font-family: var(--font-vibes);
  font-size: 2.2rem;
  color: var(--pink-light);
  margin-bottom: 20px;
}

.poem-text-container .typewriter-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 2;
  white-space: pre-line;
}

.typewriter-cursor {
  display: inline-block;
  width: 2px; height: 1.2em;
  background: var(--gold);
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}

@keyframes blink { 50% { opacity: 0; } }

/* ═══ VIDEO DIARY: ALTERNATING CINEMATIC ═══ */
#video-diary { padding: 80px 20px; }

.video-strip {
  display: flex;
  align-items: center;
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto 60px;
  padding: 0 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.video-strip:nth-child(even) { flex-direction: row-reverse; }

.video-strip video {
  width: 500px;
  max-width: 100%;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  cursor: pointer;
  object-fit: contain;
}

.video-strip .strip-text {
  flex: 1;
  min-width: 250px;
  text-align: center;
}

.video-strip .strip-text blockquote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--text-muted);
  line-height: 1.8;
  border-left: 3px solid var(--pink);
  padding-left: 20px;
}

/* ═══ SCRATCH CARDS ═══ */
#scratch-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 80px;
  padding-bottom: 80px;
}

.scratch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

.scratch-card {
  position: relative;
  width: 100%; height: 280px;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
}

.scratch-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0; left: 0;
  border-radius: 16px;
}

.scratch-card canvas {
  position: absolute;
  top: 0; left: 0;
  border-radius: 16px;
  cursor: crosshair;
}

.scratch-hint {
  font-family: var(--font-script);
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-top: 20px;
  text-align: center;
  animation: pulse 2s ease-in-out infinite;
}

/* ═══ FLOATING POLAROIDS ═══ */
#floating-polaroids {
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.polaroids-container {
  position: relative;
  width: 100%;
  max-width: 1000px;
  min-height: 700px;
  margin: 0 auto;
}

.floating-polaroid {
  position: absolute;
  background: #fff;
  padding: 8px 8px 35px 8px;
  border-radius: 4px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  transition: transform 0.4s ease, z-index 0s;
  animation: gentleFloat var(--duration, 6s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

.floating-polaroid:hover {
  transform: scale(1.15) rotate(0deg) !important;
  z-index: 100;
  box-shadow: 0 15px 50px rgba(255,77,109,0.3);
}

.floating-polaroid img {
  width: 160px; height: 180px;
  object-fit: cover;
  border-radius: 2px;
  display: block;
}

.floating-polaroid .caption {
  font-family: var(--font-script);
  font-size: 0.85rem;
  color: #555;
  text-align: center;
  margin-top: 6px;
}

@keyframes gentleFloat {
  0%, 100% { transform: translateY(0) rotate(var(--rotate, -3deg)); }
  50% { transform: translateY(-15px) rotate(calc(var(--rotate, -3deg) + 3deg)); }
}

/* ═══ VIDEO MOSAIC: INTERACTIVE REVEAL GRID ═══ */
#video-mosaic { padding: 80px 20px; }

.video-mosaic-showcase {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

/* Cinematic full-width video */
.video-cinema {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  max-height: 450px;
}

.video-cinema video {
  width: 100%;
  height: 450px;
  object-fit: contain;
  display: block;
}

.video-cinema .cinema-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 40px 30px;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  text-align: center;
  z-index: 2;
}

.video-cinema .cinema-overlay p {
  font-family: var(--font-vibes);
  font-size: 2rem;
  color: #fff;
}

.video-cinema .play-btn-big {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 70px; height: 70px;
  background: rgba(255,77,109,0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  font-size: 1.8rem;
  cursor: pointer;
  transition: transform 0.3s ease, background 0.3s ease;
  border: none;
  color: #fff;
}

.video-cinema .play-btn-big:hover {
  transform: translate(-50%, -50%) scale(1.15);
  background: var(--pink);
}

/* Video pairs */
.video-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.video-pair-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.4s ease;
}

.video-pair-card:hover { transform: scale(1.03); }

.video-pair-card video {
  width: 100%; height: 300px;
  object-fit: contain;
  display: block;
}

.video-pair-card .pair-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 20px 15px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  font-family: var(--font-script);
  font-size: 1.1rem;
  color: #fff;
  text-align: center;
  z-index: 2;
}

/* Video Reveal (click to play/unmute) */
.video-reveal {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  background: var(--purple-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  transition: transform 0.4s ease;
}

.video-reveal:hover { transform: scale(1.02); }

.video-reveal video:not(.blur-video-bg) {
  width: 100%; height: 300px;
  object-fit: contain;
  display: block;
  opacity: 0.3;
  transition: opacity 0.5s ease;
}

.video-reveal.playing video:not(.blur-video-bg) { opacity: 1; }
.video-reveal .blur-video-bg { opacity: 1 !important; }

.video-reveal .reveal-prompt {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.video-reveal.playing .reveal-prompt { opacity: 0; }

.video-reveal .reveal-prompt .reveal-icon {
  font-size: 3rem;
  animation: floatIcon 3s ease-in-out infinite;
}

.video-reveal .reveal-prompt .reveal-text {
  font-family: var(--font-script);
  font-size: 1.2rem;
  color: var(--gold-soft);
}

/* ═══ PHOTO SLIDER (with blur BG) ═══ */
#photo-slider {
  min-height: 100vh;
  padding: 0;
  position: relative;
  overflow: hidden;
}

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

.slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  opacity: 0;
  transition: opacity 1.5s ease;
}

.slide.active { opacity: 1; }

.slide .slide-blur-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.slide .slide-blur-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: blur(30px) brightness(0.25);
  transform: scale(1.15);
}

.slide .slide-main-img {
  position: relative;
  z-index: 1;
  width: 100%; height: 100%;
  object-fit: contain;
  animation: kenBurns 8s ease-in-out infinite alternate;
}

@keyframes kenBurns {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}

.slide .slide-quote {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 60px 40px;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  text-align: center;
  z-index: 2;
}

.slide .slide-quote p {
  font-family: var(--font-vibes);
  font-size: 2.5rem;
  color: #fff;
  text-shadow: 0 0 30px rgba(0,0,0,0.5);
}

.slider-dots {
  position: absolute;
  bottom: 30px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}

.slider-dots .dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}

.slider-dots .dot.active {
  background: var(--pink);
  transform: scale(1.3);
  box-shadow: 0 0 12px var(--pink-glow);
}

/* ═══ FINAL MESSAGE ═══ */
#final-message {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #2d0a3e, #0a0a0f);
  text-align: center;
  position: relative;
}

.final-heart {
  font-size: 6rem;
  animation: heartbeat 1.2s ease-in-out infinite;
  margin-bottom: 30px;
  filter: drop-shadow(0 0 30px rgba(255, 77, 109, 0.5));
}

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

.final-text {
  font-family: var(--font-vibes);
  font-size: 3.5rem;
  color: var(--pink-light);
  text-shadow: 0 0 40px var(--pink-glow);
  margin-bottom: 20px;
  max-width: 600px;
}

.final-subtext {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 500px;
  line-height: 1.8;
}

.final-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.star {
  position: absolute;
  width: 3px; height: 3px;
  background: #fff;
  border-radius: 50%;
  animation: twinkle var(--dur, 3s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

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

/* ═══ MUSIC PLAYER ═══ */
.music-player {
  position: fixed;
  bottom: 20px; right: 20px;
  z-index: 1000;
  background: linear-gradient(135deg, rgba(123,45,142,0.9), rgba(255,77,109,0.9));
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  border-radius: 50px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(255,77,109,0.3);
  transition: transform 0.3s ease;
}

.music-player:hover { transform: scale(1.05); }

.music-player .music-icon {
  font-size: 1.5rem;
  animation: musicBounce 1s ease-in-out infinite;
}

.music-player.paused .music-icon { animation: none; }

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

.music-player .music-label {
  font-family: var(--font-script);
  font-size: 0.9rem;
  color: #fff;
}

/* ═══ SCROLL PROGRESS ═══ */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--pink), var(--gold), var(--purple));
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ═══ SECTION DIVIDER ═══ */
.section-divider {
  text-align: center;
  padding: 20px 0;
  font-size: 1.5rem;
  letter-spacing: 15px;
  color: var(--pink);
  opacity: 0.4;
}

/* ═══ LIGHTBOX ═══ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.lightbox.show { display: flex; }

.lightbox img, .lightbox video {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 0 60px rgba(255,77,109,0.3);
}

.lightbox .close-btn {
  position: absolute;
  top: 20px; right: 30px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  background: none;
  border: none;
  z-index: 10001;
}

/* ═══ BLUR VIDEO/IMAGE BACKGROUNDS (JS-created) ═══ */
.blur-video-bg {
  position: absolute !important;
  top: -10% !important;
  left: -10% !important;
  width: 120% !important;
  height: 120% !important;
  object-fit: cover !important;
  filter: blur(20px) brightness(0.5) saturate(1.3) !important;
  z-index: 0 !important;
  pointer-events: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  max-width: none !important;
}

.strip-video-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  width: 500px;
  max-width: 100%;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.strip-video-wrap video:not(.blur-video-bg) {
  position: relative;
  z-index: 1;
  width: 100%;
  display: block;
  object-fit: contain;
  cursor: pointer;
}

.flip-img-wrap {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 70%;
}

.flip-img-wrap .blur-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.flip-img-wrap .blur-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: blur(18px) brightness(0.5) saturate(1.2);
  transform: scale(1.2);
}

.flip-img-wrap .main-img {
  position: relative;
  z-index: 1;
  width: 100%; height: 100%;
  object-fit: contain;
}

/* Ensure main media stays above blur bg */
.carousel-card video:not(.blur-video-bg),
.video-cinema video:not(.blur-video-bg),
.video-pair-card video:not(.blur-video-bg),
.video-reveal video:not(.blur-video-bg) {
  position: relative;
  z-index: 1;
}

/* ═══ RESPONSIVE — TABLET ═══ */
@media (max-width: 768px) {
  section { padding: 60px 16px; }
  .section-title { font-size: 2.2rem; margin-bottom: 35px; }

  /* Intro */
  #intro .intro-text { font-size: 1.3rem; padding: 0 16px; }
  #intro .enter-btn { padding: 15px 45px; font-size: 1.1rem; }

  /* Envelope */
  .envelope-container { width: 300px; height: 210px; }
  .letter-content .letter-text { padding: 25px; font-size: 1.2rem; }
  .letter-photos { gap: 12px; }
  .polaroid { width: 150px; }
  .polaroid img { height: 130px; }

  /* Gallery */
  .gallery-showcase { gap: 40px; }
  .gallery-duo { flex-direction: column !important; gap: 20px; }
  .gallery-duo .duo-image .main-img { height: 280px; }
  .gallery-duo .duo-text blockquote { font-size: 1.1rem; }
  .gallery-triple { grid-template-columns: 1fr; gap: 16px; }
  .gallery-card .main-img { height: 250px; }
  .gallery-card .card-label { opacity: 1; }
  .gallery-hero .main-img { height: 300px; }
  .gallery-hero .hero-text { font-size: 1rem; padding: 20px; }

  /* Carousel */
  .carousel-wrapper { padding: 16px 24px; gap: 16px; }
  .carousel-card { min-width: 240px; max-width: 240px; }
  .carousel-card video { height: 180px; }

  /* Mystery Cards */
  .cards-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 0 16px; }
  .flip-card { width: 100%; height: 280px; }
  .flip-card-front .mystery-icon { font-size: 3rem; }
  .flip-card-back .card-thought { font-size: 0.85rem; padding: 12px; }

  /* Poems */
  .poem-block { flex-direction: column !important; gap: 20px; margin-bottom: 60px; }
  .poem-block .poem-image-wrap { width: 100%; height: 280px; }
  .poem-text-container h3 { font-size: 1.8rem; }
  .poem-text-container .typewriter-text { font-size: 1rem; }

  /* Video Diary */
  .video-strip { flex-direction: column !important; gap: 20px; margin-bottom: 40px; }
  .video-strip video { width: 100%; border-radius: 12px; }
  .video-strip .strip-text blockquote { font-size: 1.1rem; }

  /* Scratch */
  .scratch-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .scratch-card { width: 100%; height: 280px; }

  /* Floating Polaroids */
  .polaroids-container { min-height: 550px; }
  .floating-polaroid img { width: 120px; height: 140px; }
  .floating-polaroid .caption { font-size: 0.75rem; }

  /* Video Mosaic */
  .video-cinema video { height: 300px; }
  .video-cinema .cinema-overlay p { font-size: 1.5rem; }
  .video-pair { grid-template-columns: 1fr; gap: 16px; }
  .video-pair-card video { height: 250px; }
  .video-reveal { min-height: 250px; }
  .video-reveal video { height: 250px; }

  /* Slider */
  .slide .slide-quote p { font-size: 1.6rem; }
  .slide .slide-quote { padding: 40px 20px; }

  /* Final */
  .final-text { font-size: 2.5rem; padding: 0 20px; }
  .final-subtext { font-size: 1rem; padding: 0 20px; }
  .final-heart { font-size: 4rem; }

  /* Music Player */
  .music-player { padding: 10px 16px; bottom: 12px; right: 12px; }
  .music-player .music-label { font-size: 0.8rem; }
}

/* ═══ RESPONSIVE — MOBILE ═══ */
@media (max-width: 480px) {
  section { padding: 40px 12px; }
  .section-title { font-size: 1.8rem; margin-bottom: 25px; }

  /* Intro */
  #intro .intro-text { font-size: 1.1rem; line-height: 1.8; }
  #intro .enter-btn { padding: 14px 35px; font-size: 1rem; }

  /* Envelope */
  .envelope-container { width: 260px; height: 180px; }
  .envelope-heart { font-size: 2rem; }
  .letter-content .letter-text { padding: 20px; font-size: 1.1rem; line-height: 1.9; }
  .letter-photos { flex-direction: column; align-items: center; gap: 15px; }
  .polaroid { width: 200px; }
  .polaroid img { height: 160px; }
  .tap-hint { font-size: 1rem; }

  /* Gallery */
  .gallery-showcase { gap: 25px; }
  .gallery-hero .main-img { height: 220px; }
  .gallery-hero .hero-text { font-size: 0.9rem; padding: 15px; }
  .gallery-duo .duo-image .main-img { height: 220px; }
  .gallery-duo .duo-text { padding: 10px; }
  .gallery-duo .duo-text blockquote { font-size: 1rem; padding-left: 15px; }
  .gallery-card .main-img { height: 200px; }

  /* Carousel */
  .carousel-wrapper {
    flex-direction: column;
    overflow-x: visible;
    scroll-snap-type: none;
    padding: 10px 16px;
    gap: 16px;
  }
  .carousel-wrapper::after { display: none; }
  .carousel-card { min-width: 100%; max-width: 100%; }
  .carousel-card video { height: 220px; }
  .carousel-card .quote-overlay { padding: 12px; font-size: 0.85rem; min-height: 45px; }

  /* Mystery Cards */
  .cards-grid { grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 8px; }
  .flip-card { height: 220px; }
  .flip-card-front .mystery-icon { font-size: 2.5rem; }
  .flip-card-front .tap-text { font-size: 0.9rem; }
  .flip-card-back .card-thought { font-size: 0.75rem; padding: 10px; }

  /* Poems */
  .poem-block { gap: 15px; margin-bottom: 40px; }
  .poem-block .poem-image-wrap { width: 100%; height: 220px; }
  .poem-text-container h3 { font-size: 1.5rem; margin-bottom: 12px; }
  .poem-text-container .typewriter-text { font-size: 0.9rem; line-height: 1.8; }

  /* Video Diary */
  .video-strip { gap: 15px; margin-bottom: 30px; padding: 0 8px; }
  .video-strip video { border-radius: 10px; }
  .video-strip .strip-text blockquote { font-size: 1rem; padding-left: 15px; }
  .video-strip .strip-text { min-width: auto; }

  /* Scratch */
  .scratch-grid { grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 8px; }
  .scratch-card { width: 100%; height: 220px; }
  .scratch-hint { font-size: 0.95rem; }

  /* Floating Polaroids */
  .polaroids-container { min-height: 420px; }
  .floating-polaroid { padding: 5px 5px 25px 5px; }
  .floating-polaroid img { width: 90px; height: 100px; }
  .floating-polaroid .caption { font-size: 0.65rem; }

  /* Video Mosaic */
  .video-cinema video { height: 200px; }
  .video-cinema .cinema-overlay p { font-size: 1.2rem; }
  .video-cinema .play-btn-big { width: 50px; height: 50px; font-size: 1.3rem; }
  .video-pair-card video { height: 180px; }
  .video-pair-card .pair-label { font-size: 0.9rem; padding: 12px 10px; }
  .video-reveal { min-height: 180px; }
  .video-reveal video { height: 180px; }
  .video-reveal .reveal-prompt .reveal-icon { font-size: 2rem; }
  .video-reveal .reveal-prompt .reveal-text { font-size: 1rem; }

  /* Slider */
  .slide .slide-quote p { font-size: 1.3rem; }
  .slide .slide-quote { padding: 30px 16px; }
  .slider-dots .dot { width: 8px; height: 8px; }
  .slider-dots { gap: 8px; bottom: 20px; }

  /* Final */
  .final-text { font-size: 1.8rem; padding: 0 16px; }
  .final-subtext { font-size: 0.9rem; padding: 0 16px; line-height: 1.7; }
  .final-heart { font-size: 3.5rem; }

  /* Dividers */
  .section-divider { font-size: 1rem; letter-spacing: 10px; padding: 12px 0; }

  /* Music Player */
  .music-player { padding: 8px 14px; bottom: 10px; right: 10px; }
  .music-player .music-icon { font-size: 1.2rem; }
  .music-player .music-label { font-size: 0.7rem; }

  /* Progress */
  .scroll-progress { height: 2px; }
}

/* ═══ COLLECTION HUB ═══ */
#collection-hub {
  position: relative;
  padding: 80px 20px;
  min-height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hub-subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 40px;
  text-align: center;
}
.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 900px;
  width: 100%;
}
.collection-card {
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  overflow: hidden;
}
.collection-card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 20px 60px rgba(255, 77, 109, 0.25), 0 0 30px rgba(123, 45, 142, 0.2);
  border-color: rgba(255, 77, 109, 0.4);
}
.card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(255, 77, 109, 0.15), transparent 60%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.collection-card:hover .card-glow { opacity: 1; }
.card-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 10px rgba(255, 77, 109, 0.5));
}
.card-title {
  font-family: var(--font-vibes);
  font-size: 1.6rem;
  color: var(--gold);
  margin-bottom: 8px;
}
.card-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.4;
}
.card-cta {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--pink-light);
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 8px 20px;
  border: 1px solid rgba(255, 77, 109, 0.3);
  border-radius: 30px;
  transition: all 0.3s ease;
}
.collection-card:hover .card-cta {
  background: rgba(255, 77, 109, 0.15);
  border-color: var(--pink);
  color: #fff;
}

/* Pulse animation on cards */
@keyframes card-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 77, 109, 0.2); }
  50% { box-shadow: 0 0 20px 5px rgba(255, 77, 109, 0.15); }
}
.collection-card { animation: card-pulse 3s ease-in-out infinite; }
.collection-card:hover { animation: none; }

/* ═══ COLLECTION MODALS ═══ */
.collection-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.collection-modal.active {
  display: flex;
}
.modal-backdrop {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.collection-modal.active .modal-backdrop {
  opacity: 1;
}
.modal-content {
  position: relative;
  width: 100%;
  max-width: 100%;
  max-height: 95vh;
  background: linear-gradient(135deg, #0d0d15 0%, #1a0a25 50%, #0d0d15 100%);
  border-radius: 24px 24px 0 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 60px 20px 40px;
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  scrollbar-width: thin;
  scrollbar-color: var(--pink) transparent;
}
.collection-modal.active .modal-content {
  transform: translateY(0);
}
.modal-content section {
  position: relative;
  min-height: auto;
  padding: 20px 0;
}
.modal-content .section-bg {
  display: none;
}
.modal-close-btn {
  position: sticky;
  top: 0;
  float: right;
  z-index: 10001;
  width: 44px;
  height: 44px;
  border: 2px solid rgba(255, 77, 109, 0.5);
  background: rgba(10, 10, 15, 0.9);
  color: var(--pink);
  font-size: 1.5rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  margin-bottom: -44px;
}
.modal-close-btn:hover {
  background: var(--pink);
  color: #fff;
  transform: rotate(90deg);
}

/* Modal content scrollbar */
.modal-content::-webkit-scrollbar { width: 4px; }
.modal-content::-webkit-scrollbar-track { background: transparent; }
.modal-content::-webkit-scrollbar-thumb { background: var(--pink); border-radius: 2px; }

/* Body scroll lock */
body.modal-open {
  overflow: hidden;
}

/* ═══ RESPONSIVE — COLLECTION HUB ═══ */
@media (max-width: 768px) {
  .hub-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .collection-card { padding: 24px 16px; }
  .card-icon { font-size: 2.5rem; }
  .card-title { font-size: 1.3rem; }
  .card-tagline { font-size: 0.8rem; }
  .modal-content { max-height: 92vh; padding: 50px 12px 30px; }
}
@media (max-width: 480px) {
  #collection-hub { padding: 50px 12px; }
  .hub-subtitle { font-size: 0.9rem; margin-bottom: 24px; }
  .hub-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .collection-card { padding: 20px 12px; border-radius: 16px; }
  .card-icon { font-size: 2rem; margin-bottom: 10px; }
  .card-title { font-size: 1.1rem; }
  .card-tagline { font-size: 0.75rem; margin-bottom: 12px; }
  .card-cta { font-size: 0.7rem; padding: 6px 14px; }
  .modal-content { 
    max-height: 95vh; 
    padding: 45px 8px 20px;
    border-radius: 16px 16px 0 0;
  }
  .modal-close-btn { width: 36px; height: 36px; font-size: 1.2rem; }
}

/* ═══ SCROLLBAR ═══ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--pink), var(--purple)); border-radius: 3px; }
