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

/* ========================================
   CSS Variables & Root
   ======================================== */
:root {
  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --bg-tertiary: #121212;
  --text-primary: #ffffff;
  --text-secondary: #f5f5f7;
  --text-muted: #8c8c8c;
  --accent: #d4af37;
  --accent-light: #F3E5AB;
  --accent-dark: #AA771C;
  --accent-dim: rgba(212, 175, 55, 0.15);
  --accent-glow: rgba(212, 175, 55, 0.4);
  --border-color: rgba(212, 175, 55, 0.2);
  --gold-gradient: linear-gradient(135deg, #BF953F 0%, #FCF6BA 25%, #B38728 50%, #FBF5B7 75%, #AA771C 100%);
  --gold-text-gradient: linear-gradient(135deg, #BF953F 0%, #FCF6BA 50%, #B38728 100%);
  --shadow-soft: 0 4px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(212, 175, 55, 0.05);
  --shadow-strong: 0 10px 60px rgba(0, 0, 0, 0.95), 0 0 30px rgba(212, 175, 55, 0.15);
  --transition-smooth: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-bounce: all 0.7s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ========================================
   Reset & Base
   ======================================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  cursor: default;
}

/* Film grain texture overlay for premium feel */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
}

/* ========================================
   Stars & Particles Background
   ======================================== */
#stars-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.stars-layer {
  position: absolute;
  top: -10%;
  left: -10%;
  width: 120%;
  height: 120%;
  pointer-events: none;
  transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.star {
  position: absolute;
  border-radius: 50%;
  background: white;
  animation: twinkle var(--duration) ease-in-out infinite;
  opacity: 0;
}

.star.gold {
  background: var(--accent);
}

.star.small {
  width: 2px;
  height: 2px;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.5);
}
.star.small.gold {
  box-shadow: 0 0 4px var(--accent-glow);
}

.star.medium {
  width: 3px;
  height: 3px;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
}
.star.medium.gold {
  box-shadow: 0 0 6px var(--accent);
}

.star.large {
  width: 4px;
  height: 4px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}
.star.large.gold {
  box-shadow: 0 0 10px var(--accent-light);
}

.dot {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  animation: floatDot var(--float-duration) ease-in-out infinite;
}
.dot.gold {
  background: var(--accent-dim);
}

@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50% { opacity: var(--max-opacity); transform: scale(1); }
}

@keyframes floatDot {
  0%, 100% { 
    transform: translate(0, 0); 
    opacity: 0.2;
  }
  25% { 
    transform: translate(var(--dx1), var(--dy1)); 
    opacity: 0.6;
  }
  50% { 
    transform: translate(var(--dx2), var(--dy2)); 
    opacity: 0.3;
  }
  75% { 
    transform: translate(var(--dx3), var(--dy3)); 
    opacity: 0.5;
  }
}

/* Shooting stars */
.shooting-star {
  position: absolute;
  width: 100px;
  height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0.8), transparent);
  border-radius: 50%;
  animation: shoot var(--shoot-duration) linear infinite;
  opacity: 0;
  transform-origin: left center;
}

@keyframes shoot {
  0% {
    transform: translate(0, 0) rotate(var(--angle));
    opacity: 0;
  }
  5% { opacity: 1; }
  30% { opacity: 0; }
  100% {
    transform: translate(calc(100vw + 200px), calc(100vh + 200px)) rotate(var(--angle));
    opacity: 0;
  }
}

/* ========================================
   Section Base Styles
   ======================================== */
section {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 60px;
  opacity: 0;
  transform: translateY(60px);
  transition: var(--transition-smooth);
  position: relative;
  text-align: center;
  background: var(--gold-text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-title.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 100px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transition: transform 0.8s ease 0.3s;
}

.section-title.visible::after {
  transform: translateX(-50%) scaleX(1);
}

/* ========================================
   Hero Section
   ======================================== */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  position: relative;
  overflow: hidden;
  perspective: 1200px;
}

.hero-image-wrapper {
  position: relative;
  width: clamp(280px, 50vw, 500px);
  height: clamp(350px, 60vw, 600px);
  margin-bottom: 50px;
  transform-style: preserve-3d;
  transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-image-wrapper::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 20px;
  background: var(--gold-gradient);
  z-index: -1;
  animation: borderGlow 4s linear infinite;
  background-size: 400% 400%;
}

@keyframes borderGlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-image-wrapper::after {
  content: '';
  position: absolute;
  inset: -20px;
  border-radius: 30px;
  background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.2) 0%, transparent 70%);
  z-index: -2;
  animation: pulse 3s ease-in-out infinite;
}

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
  filter: contrast(1.1);
  transition: filter 0.5s ease;
  animation: heroFloat 6s ease-in-out infinite;
}

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

.hero-image:hover {
  filter: contrast(1.1) brightness(1.05);
}

.hero-text {
  opacity: 0;
  animation: fadeInUp 1.2s ease forwards 0.5s;
}

.hero-text h1 {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 400;
  line-height: 1.2;
  background: var(--gold-text-gradient);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
  text-shadow: none;
  margin-bottom: 15px;
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.hero-text p {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1rem, 2vw, 1.4rem);
  font-weight: 300;
  letter-spacing: 0.3em;
  color: var(--accent-light);
  text-transform: uppercase;
}

.hero-date {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-top: 15px;
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

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

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: fadeInUp 1.5s ease forwards 1.5s;
  opacity: 0;
}

.scroll-indicator span {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.scroll-arrow {
  width: 24px;
  height: 24px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translateY(0); opacity: 0.5; }
  50% { transform: rotate(45deg) translateY(8px); opacity: 1; }
}

/* ========================================
   Best Memories Section
   ======================================== */
#memories {
  padding: 100px 20px 120px;
  min-height: 100vh;
}

.memories-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  max-width: 1200px;
  perspective: 1200px;
}

.memory-card {
  width: 300px;
  height: 400px;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  opacity: 0;
  transform: translate(var(--stack-x, 0px), var(--stack-y, 0px)) rotate(var(--stack-rotate, 0deg)) scale(0.1);
  transition: transform 1.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 1.2s ease, box-shadow 0.4s ease;
  cursor: pointer;
  z-index: 1;
}

.memory-card.visible {
  opacity: 1;
  transform: translate(0, 0) rotate(calc(var(--rotation) * 1deg)) scale(1);
  z-index: 2;
}

.memory-card:hover {
  transform: translate(0, -15px) rotate(0deg) scale(1.05) !important;
  z-index: 10 !important;
  box-shadow: 0 10px 40px rgba(212, 175, 55, 0.25), var(--shadow-strong);
  border: 1px solid var(--accent);
}

.memory-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.85) 80%, rgba(212,175,55,0.15));
  z-index: 1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.memory-card:hover::before {
  opacity: 1;
}

.memory-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
  transition: all 0.5s ease;
}

.memory-card:hover img {
  filter: none;
  transform: scale(1.08);
}

.memory-card .memory-label {
  position: absolute;
  bottom: 20px;
  left: 20px;
  z-index: 2;
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease 0.1s;
}

.memory-card:hover .memory-label {
  opacity: 1;
  transform: translateY(0);
}

/* Chain/pull connection lines */
.memory-chain {
  position: absolute;
  width: 2px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.3), transparent);
  z-index: 0;
}

/* Horizontal Strip Mode for Best Memories */
.memories-gallery.strip-mode {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 25px;
  width: 100%;
  max-width: 1200px;
  margin: 40px auto 0;
  perspective: none;
}

.memory-strip-card {
  width: 210px;
  height: 290px;
  background: #0d0d0d;
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 8px 25px rgba(0,0,0,0.8), 0 0 10px rgba(212,175,55,0.02);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), border-color 0.4s ease, box-shadow 0.4s ease, opacity 0.8s ease;
  opacity: 0;
  transform: translateY(30px);
  cursor: pointer;
}

.memory-strip-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.memory-strip-card:hover {
  transform: translateY(-8px) scale(1.03);
  border-color: var(--accent);
  box-shadow: 0 12px 30px rgba(0,0,0,0.9), 0 0 20px rgba(212,175,55,0.2);
}

.memory-strip-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.4s ease;
}

.memory-strip-card:hover img {
  transform: scale(1.02);
}

.memory-strip-card .memory-label {
  margin-top: 15px;
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-light);
  letter-spacing: 0.05em;
  text-align: center;
  transition: color 0.3s ease;
}

.memory-strip-card:hover .memory-label {
  color: white;
}

/* ========================================
   Cut the Cake Section
   ======================================== */
#cake-section {
  padding: 100px 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cake-wrapper {
  position: relative;
  width: 320px;
  height: 380px;
  margin-top: 40px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(80px) scale(0.8);
  transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.cake-wrapper.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.cake-wrapper:hover {
  transform: translateY(-5px) scale(1.02);
}

.cake-container {
  position: relative;
  width: 320px;
  height: 320px;
  margin: 0 auto;
}

.cake-half {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 1s ease;
  z-index: 3;
}

.cake-left {
  left: 0;
  clip-path: inset(0 50% 0 0); /* Show only left half */
}

.cake-right {
  left: 0;
  clip-path: inset(0 0 0 50%); /* Show only right half */
}

.cake-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cake-slice-inner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: scale(0.3) rotate(-15deg);
  transition: transform 1.2s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.8s ease;
  z-index: 2;
}

.cake-slice-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Cutting Knife line */
.cake-laser-knife {
  position: absolute;
  top: -40px;
  left: 50%;
  width: 4px;
  height: 0;
  background: linear-gradient(to bottom, var(--accent-light), var(--accent), transparent);
  transform: translateX(-50%);
  z-index: 5;
  box-shadow: 0 0 15px var(--accent), 0 0 30px var(--accent-light);
  opacity: 0;
}

/* Cut state transitions */
.cake-wrapper.cut .cake-left {
  transform: translateX(-80px) rotate(-8deg);
  opacity: 0;
  pointer-events: none;
}

.cake-wrapper.cut .cake-right {
  transform: translateX(80px) rotate(8deg);
  opacity: 0;
  pointer-events: none;
}

.cake-wrapper.cut .cake-slice-inner {
  opacity: 1;
  transform: scale(1) rotate(5deg);
  z-index: 4;
}

/* Knife slicing animation trigger */
.cake-wrapper.slicing .cake-laser-knife {
  opacity: 1;
  animation: laserSlice 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes laserSlice {
  0% {
    height: 0;
    top: -40px;
  }
  50% {
    height: 400px;
    top: -40px;
    opacity: 1;
  }
  100% {
    height: 400px;
    top: 400px;
    opacity: 0;
  }
}

.cut-instruction {
  margin-top: 30px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.5s ease 0.5s;
  animation: pulseText 2s ease-in-out infinite;
}

.cake-wrapper.visible ~ .cut-instruction {
  opacity: 1;
}

.cake-wrapper.cut ~ .cut-instruction {
  animation: none;
  opacity: 0;
}

@keyframes pulseText {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Cake confetti */
.cake-confetti {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
}

.cake-wrapper.cut .cake-confetti {
  animation: confettiBurst 1.5s ease forwards;
}

@keyframes confettiBurst {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--confetti-x)), calc(-50% + var(--confetti-y))) scale(0) rotate(720deg);
  }
}



/* ========================================
   Final Section - Framed Photo
   ======================================== */
#final-section {
  padding: 120px 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.frame-wrapper {
  position: relative;
  opacity: 0;
  transform: scale(0.5) rotate(-10deg);
  transition: all 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.frame-wrapper.visible {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.photo-frame {
  width: 250px;
  height: 300px;
  padding: 15px;
  background: linear-gradient(135deg, #151515, #000, #151515);
  border-radius: 8px;
  border: 2px solid var(--accent);
  box-shadow: 
    0 0 0 1px var(--accent-light),
    0 0 0 4px rgba(0,0,0,0.8),
    0 0 30px rgba(212, 175, 55, 0.25),
    var(--shadow-strong),
    inset 0 0 20px rgba(0,0,0,0.7);
  position: relative;
  animation: frameGlow 4s ease-in-out infinite;
}

@keyframes frameGlow {
  0%, 100% { box-shadow: 
    0 0 0 1px var(--accent-light),
    0 0 0 4px rgba(0,0,0,0.8),
    0 10px 60px rgba(0,0,0,0.9),
    0 0 20px rgba(212, 175, 55, 0.15),
    inset 0 0 20px rgba(0,0,0,0.7);
  }
  50% { box-shadow: 
    0 0 0 1.5px var(--accent-light),
    0 0 0 4px rgba(0,0,0,0.8),
    0 10px 80px rgba(212, 175, 55, 0.2),
    0 0 40px rgba(212, 175, 55, 0.3),
    inset 0 0 20px rgba(0,0,0,0.7);
  }
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
  filter: none;
  transition: filter 0.5s ease;
}

.photo-frame:hover img {
  filter: none;
}

/* Corner ornaments */
.frame-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--accent-light);
  border-style: solid;
}

.frame-corner.top-left {
  top: 5px; left: 5px;
  border-width: 2px 0 0 2px;
}

.frame-corner.top-right {
  top: 5px; right: 5px;
  border-width: 2px 2px 0 0;
}

.frame-corner.bottom-left {
  bottom: 5px; left: 5px;
  border-width: 0 0 2px 2px;
}

.frame-corner.bottom-right {
  bottom: 5px; right: 5px;
  border-width: 0 2px 2px 0;
}

.final-happy-birthday {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-top: 40px;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease 0.4s;
  background: var(--gold-text-gradient);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

.frame-wrapper.visible ~ .final-happy-birthday,
.final-happy-birthday.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Sefoooo Button */
.sefoo-button {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid var(--accent);
  color: var(--accent);
  padding: 15px 50px;
  margin-top: 25px;
  cursor: pointer;
  border-radius: 50px;
  transition: left 0.35s cubic-bezier(0.25, 0.8, 0.25, 1), top 0.35s cubic-bezier(0.25, 0.8, 0.25, 1), background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(30px);
  backdrop-filter: blur(5px);
}

.sefoo-button.visible {
  opacity: 1;
  transform: translateY(0);
}

.sefoo-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: var(--accent-dim);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.sefoo-button:hover {
  border-color: var(--accent-light);
  color: white;
  box-shadow: 0 0 35px rgba(212, 175, 55, 0.45);
}

.sefoo-button:hover::before {
  width: 300px;
  height: 300px;
}

/* ========================================
   Password Page
   ======================================== */
#password-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  z-index: 1000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.8s ease;
}

#password-page.active {
  display: flex;
  opacity: 1;
}

.password-portrait {
  width: 250px;
  height: 320px;
  border-radius: 8px;
  overflow: hidden;
  border: 8px solid #ffffff;
  margin-bottom: 30px;
  box-shadow: 0 0 40px rgba(255, 255, 255, 0.15), var(--shadow-strong);
  animation: portraitPulse 3s ease-in-out infinite;
}

@keyframes portraitPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(212, 175, 55, 0.15); }
  50% { box-shadow: 0 0 40px rgba(212, 175, 55, 0.35); }
}

.password-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
}

.password-label {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 25px;
  letter-spacing: 0.1em;
  background: var(--gold-text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.password-input-wrapper {
  position: relative;
}

.password-input {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  padding: 15px 25px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  color: white;
  width: 280px;
  text-align: center;
  letter-spacing: 0.2em;
  outline: none;
  transition: all 0.4s ease;
}

.password-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.25);
  background: rgba(255,255,255,0.06);
}

.password-input::placeholder {
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.password-submit {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 12px 40px;
  background: var(--gold-gradient);
  color: black;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  margin-top: 20px;
  transition: var(--transition-smooth);
}

.password-submit:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.5);
}

.password-error {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: #ff4444;
  margin-top: 15px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.password-error.show {
  opacity: 1;
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-10px); }
  40% { transform: translateX(10px); }
  60% { transform: translateX(-10px); }
  80% { transform: translateX(10px); }
}

/* ========================================
   Success Page
   ======================================== */
#success-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  z-index: 1001;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 1s ease;
}

#success-page.active {
  display: flex;
  opacity: 1;
}

.success-image {
  width: clamp(250px, 40vw, 450px);
  height: clamp(300px, 50vw, 550px);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 0 80px rgba(212, 175, 55, 0.2);
  animation: successPulse 3s ease-in-out infinite;
  border: 3px solid var(--accent);
}

@keyframes successPulse {
  0%, 100% { 
    box-shadow: 0 0 40px rgba(212, 175, 55, 0.15);
    transform: scale(1);
  }
  50% { 
    box-shadow: 0 0 80px rgba(212, 175, 55, 0.35);
    transform: scale(1.02);
  }
}

.success-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.05);
}

.success-text {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2rem, 5vw, 4rem);
  margin-top: 40px;
  background: var(--gold-text-gradient);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

/* ========================================
   Scroll Progress Bar
   ======================================== */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0.3), rgba(255,255,255,0.8));
  z-index: 999;
  transition: width 0.1s linear;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
  .hero-image-wrapper {
    width: 260px;
    height: 340px;
  }

  .memory-card {
    width: 250px;
    height: 330px;
  }



  .cake-wrapper {
    width: 240px;
    height: 310px;
  }

  .photo-frame {
    width: 200px;
    height: 250px;
  }
}

@media (max-width: 480px) {
  .hero-image-wrapper {
    width: 220px;
    height: 290px;
  }

  .memory-card {
    width: 200px;
    height: 270px;
  }

  .section-title {
    font-size: 2rem;
  }
}

/* ========================================
   Page Transition Overlay
   ======================================== */
.page-transition {
  position: fixed;
  inset: 0;
  background: black;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.page-transition.active {
  opacity: 1;
  pointer-events: all;
}

/* ========================================
   Glitch effect for random teleport
   ======================================== */
.glitch-effect {
  animation: glitch 0.3s ease;
}

@keyframes glitch {
  0% { filter: none; }
  20% { filter: hue-rotate(90deg) invert(1); }
  40% { filter: none; }
  60% { filter: invert(1) brightness(2); }
  80% { filter: none; }
  100% { filter: none; }
}

/* ========================================
   Loading Overlay 
   ======================================== */
#loading-overlay {
  position: fixed;
  inset: 0;
  background: black;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 1s ease;
}

#loading-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loading-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  letter-spacing: 0.3em;
  animation: loadPulse 1.5s ease-in-out infinite;
}

@keyframes loadPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.loading-dots {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
  animation: dotBounce 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBounce {
  0%, 80%, 100% { transform: scale(0.5); opacity: 0.3; }
  40% { transform: scale(1); opacity: 1; }
}

/* Flash animation for teleport */
@keyframes flashFade {
  from { opacity: 0.3; }
  to { opacity: 0; }
}

/* Smooth scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.3);
}

/* Selection color */
::selection {
  background: rgba(255,255,255,0.2);
  color: white;
}

/* Top Back Button for Overlays */
.back-btn-top {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 10px 25px;
  background: rgba(0, 0, 0, 0.85);
  color: var(--accent);
  border: 1.5px solid var(--accent);
  border-radius: 50px;
  cursor: pointer;
  z-index: 1010;
  transition: var(--transition-smooth);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.back-btn-top:hover {
  background: var(--gold-gradient);
  color: black;
  border-color: transparent;
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.55);
  transform: translateX(-50%) scale(1.05);
}

.back-btn-top:active {
  transform: translateX(-50%) scale(0.95);
}

/* ========================================
   MEMORY WALL SECTION
   ======================================== */
#memory-wall {
  position: relative;
  min-height: 100vh;
  padding: 100px 20px 140px;
  background: radial-gradient(ellipse at 50% 0%, rgba(212,175,55,0.06) 0%, transparent 65%);
  overflow: hidden;
  display: block;
}

.memory-wall-title {
  position: relative;
  z-index: 2;
  margin-bottom: 16px;
  display: block;
  text-align: center;
}

.memory-wall-subtitle {
  position: relative;
  z-index: 2;
  text-align: center;
  font-family: 'Great Vibes', cursive;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  color: var(--accent-light);
  margin-bottom: 70px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s ease 0.4s, transform 0.9s ease 0.4s;
}

.memory-wall-subtitle.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Pinterest-style Masonry Grid */
.masonry-gallery {
  position: relative;
  z-index: 2;
  column-count: 4;
  column-gap: 20px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

@media (max-width: 1200px) { .masonry-gallery { column-count: 3; } }
@media (max-width: 800px)  { .masonry-gallery { column-count: 2; column-gap: 16px; } }
@media (max-width: 480px)  { .masonry-gallery { column-count: 1; } }

/* Gallery Item Box */
.masonry-item {
  display: block;
  position: relative;
  break-inside: avoid;
  margin-bottom: 20px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.12);
  background: #080808;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(40px) scale(0.96);
  transition: 
    border-color 0.4s ease, 
    box-shadow 0.4s ease, 
    transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.masonry-item:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: var(--accent);
  box-shadow: 
    0 15px 35px rgba(0, 0, 0, 0.8), 
    0 0 20px rgba(212, 175, 55, 0.25);
  z-index: 10;
}

/* Custom normal-emoji selector to override text gradients */
.normal-emoji {
  background: none !important;
  -webkit-text-fill-color: initial !important;
  color: initial !important;
  display: inline-block;
}

.masonry-item img {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: filter 0.6s ease, transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Luxury Custom Filters to make 11 photos look like 55 unique ones */
/* All custom color filters disabled to restore original photo colors */
.filter-luxury-gold img,
.filter-luxury-bw img,
.filter-luxury-warm img,
.filter-luxury-cool img,
.filter-luxury-contrast img,
.filter-luxury-sepia img,
.filter-luxury-vintage img,
.filter-luxury-dark img,
.filter-luxury-luminous img,
.filter-luxury-desaturated img,
.filter-luxury-muted-gold img {
  filter: none !important;
}

/* Hover removes filter to show clear original colors */
.masonry-item:hover img {
  filter: none !important;
}

/* Custom crop alignments */
.crop-top img { object-position: top center; }
.crop-bottom img { object-position: bottom center; }
.crop-left img { object-position: center left; }
.crop-right img { object-position: center right; }
.crop-zoom img { transform: scale(1.25); }
.crop-zoom:hover img { transform: scale(1.3); }

/* Luxury Overlay Caption */
.masonry-overlay {
  display: none !important;
}

.masonry-item:hover .masonry-overlay {
  opacity: 1;
}

.masonry-caption {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  transform: translateY(15px);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.masonry-tag {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 5px;
  transform: translateY(15px);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.05s;
}

.masonry-item:hover .masonry-caption,
.masonry-item:hover .masonry-tag {
  transform: translateY(0);
}

/* ========================================
   LIGHTBOX
   ======================================== */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: background 0.5s ease;
  backdrop-filter: blur(0px);
}

.gallery-lightbox.open {
  background: rgba(0, 0, 0, 0.97);
  pointer-events: all;
  backdrop-filter: blur(15px);
}

.lightbox-content-wrap {
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: scale(0.92);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s ease;
}

.gallery-lightbox.open .lightbox-content-wrap {
  transform: scale(1);
  opacity: 1;
}

.lightbox-img-box {
  position: relative;
  width: 100%;
  max-height: 70vh;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid rgba(212, 175, 55, 0.25);
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.8),
    0 0 30px rgba(212, 175, 55, 0.1);
  background: #000;
}

.lightbox-img-box img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 70vh;
  object-fit: contain;
  transition: filter 0.4s ease;
}

.lightbox-meta {
  width: 100%;
  margin-top: 20px;
  text-align: center;
  z-index: 2;
}

.lightbox-caption {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  background: var(--gold-text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 5px;
}

.lightbox-counter {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Lightbox buttons */
.lightbox-close {
  position: fixed;
  top: 30px;
  right: 30px;
  font-size: 1.8rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.2);
  color: var(--accent);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 9020;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  /* Hide by default, show on lightbox open */
  opacity: 0;
  pointer-events: none;
}

.gallery-lightbox.open .lightbox-close {
  opacity: 1;
  pointer-events: all;
}

.lightbox-close:hover {
  background: var(--gold-gradient);
  color: #000;
  transform: scale(1.1) rotate(90deg);
  border-color: transparent;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(212, 175, 55, 0.2);
  color: var(--accent);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 9020;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
  /* Hide by default, show on lightbox open */
  opacity: 0;
  pointer-events: none;
}

.gallery-lightbox.open .lightbox-prev,
.gallery-lightbox.open .lightbox-next {
  opacity: 1;
  pointer-events: all;
}

.lightbox-prev { left: 30px; }
.lightbox-next { right: 30px; }

.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--gold-gradient);
  color: #000;
  border-color: transparent;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.lightbox-prev:hover { transform: translateY(-50%) scale(1.1); }
.lightbox-next:hover { transform: translateY(-50%) scale(1.1); }

@media (max-width: 768px) {
  .lightbox-prev,
  .lightbox-next {
    width: 46px;
    height: 46px;
    font-size: 1.8rem;
  }
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
  .lightbox-close {
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    font-size: 1.4rem;
  }
  .lightbox-caption {
    font-size: 1.2rem;
  }
}

/* ========================================
   SUCCESS PAGE UPGRADE (5 Polaroids)
   ======================================== */
#success-page {
  overflow-y: auto;
  padding: 100px 20px 60px;
  justify-content: flex-start;
}

.success-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.success-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 8px;
  margin-bottom: 60px;
}

.success-polaroids {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  width: 100%;
  padding-bottom: 40px;
}

.success-polaroid {
  background: transparent;
  padding: 0;
  border-radius: 16px;
  box-shadow:
    0 10px 30px rgba(0,0,0,0.65),
    0 0 0 1px rgba(255,255,255,0.08);
  width: 300px;
  overflow: hidden;
  transform: rotate(var(--rot, 0deg));
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  position: relative;
  cursor: default;
  opacity: 0;
  animation: successPolaroidIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes successPolaroidIn {
  from {
    opacity: 0;
    transform: rotate(var(--rot, 0deg)) scale(0.5) translateY(40px);
  }
  to {
    opacity: 1;
    transform: rotate(var(--rot, 0deg)) scale(1) translateY(0);
  }
}

.success-polaroid:hover {
  transform: rotate(0deg) scale(1.08) translateY(-10px) !important;
  box-shadow:
    0 20px 60px rgba(0,0,0,0.8),
    0 0 40px rgba(212,175,55,0.3);
  z-index: 10;
}

.success-polaroid::after {
  display: none;
}

.success-polaroid img {
  display: block;
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: 16px;
  filter: contrast(1.05);
  transition: filter 0.4s ease, transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.success-polaroid:hover img {
  filter: contrast(1.1);
  transform: scale(1.06);
}

.success-polaroid-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none;
  z-index: 2;
}

.success-polaroid:hover .success-polaroid-label {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 600px) {
  .success-polaroids { gap: 20px; }
  .success-polaroid { width: 260px; padding: 0; }
  .success-polaroid img { height: 320px; }
}

/* ========================================
   PRANK LOADING OVERLAY
   ======================================== */
#prank-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 10005;
  overflow: hidden;
  display: block;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

#prank-overlay.active {
  opacity: 1;
  pointer-events: all;
}

#prank-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}



.prank-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
  width: 90%;
  max-width: 450px;
  text-align: center;
  z-index: 10010;
}

.prank-gift-icon {
  font-size: clamp(4rem, 12vw, 6.5rem);
  animation: giftBounce 2s ease-in-out infinite;
  user-select: none;
  filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.15));
}

@keyframes giftBounce {
  0%, 100% {
    transform: translateY(0) scale(1) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) scale(1.08) rotate(3deg);
    filter: drop-shadow(0 15px 25px rgba(212, 175, 55, 0.45));
  }
}

.prank-btn {
  position: relative;
  font-family: 'Inter', sans-serif;
  font-size: clamp(0.95rem, 3.5vw, 1.1rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 16px 36px;
  background: var(--gold-gradient);
  color: black;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.prank-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 40px rgba(212, 175, 55, 0.6);
}

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

/* ========================================
   Mobile Responsiveness Overrides (< 768px)
   ======================================== */
@media (max-width: 767px) {
  /* 1. Global & Reset Rules */
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  img {
    max-width: 100% !important;
    height: auto !important;
  }

  section {
    padding: 60px 15px !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* 2. Typography & Centering */
  .section-title {
    font-size: clamp(1.8rem, 7vw, 2.5rem) !important;
    margin-bottom: 40px !important;
    text-align: center !important;
    word-break: break-word !important;
  }

  .section-title::after {
    width: 60px !important;
  }

  /* 3. Hero Section */
  #hero {
    padding: 40px 15px !important;
  }

  .hero-image-wrapper {
    width: clamp(200px, 60vw, 280px) !important;
    height: clamp(260px, 80vw, 360px) !important;
    margin-bottom: 30px !important;
  }

  .hero-text {
    width: 100% !important;
    padding: 0 10px !important;
  }

  .hero-text h1 {
    font-size: clamp(2.2rem, 9vw, 4.2rem) !important;
    margin-bottom: 10px !important;
    text-align: center !important;
  }

  .hero-text p {
    font-size: clamp(0.75rem, 3.5vw, 1rem) !important;
    letter-spacing: 0.15em !important;
    text-align: center !important;
  }

  .hero-date {
    font-size: clamp(1rem, 4.5vw, 1.3rem) !important;
    margin-top: 10px !important;
    text-align: center !important;
  }

  .scroll-indicator {
    bottom: 20px !important;
  }

  /* 4. Best Memories Section */
  #memories {
    padding: 60px 15px !important;
  }

  .memories-gallery {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 30px !important;
    width: 100% !important;
  }

  .memory-card {
    width: 240px !important;
    height: 320px !important;
    transform: none !important;
    opacity: 1 !important;
    position: relative !important;
    margin: 0 auto !important;
    /* Neutralize inline variables set by JS */
    --stack-x: 0px !important;
    --stack-y: 0px !important;
    --stack-rotate: 0deg !important;
    --rotation: 0 !important;
    box-shadow: var(--shadow-soft) !important;
  }

  .memory-card.visible {
    transform: none !important;
    opacity: 1 !important;
  }

  .memory-card:hover {
    transform: translateY(-5px) scale(1.02) !important;
    border: 1px solid var(--accent) !important;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.2), var(--shadow-strong) !important;
  }

  .memory-card img {
    transform: none !important;
  }

  .memory-card:hover img {
    transform: scale(1.04) !important;
  }

  .memory-card::before {
    opacity: 1 !important;
    background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.85) 90%) !important;
  }

  .memory-card .memory-label {
    opacity: 1 !important;
    transform: none !important;
    font-size: 0.95rem !important;
    bottom: 15px !important;
    left: 15px !important;
    right: 15px !important;
    text-align: center !important;
    background: rgba(0, 0, 0, 0.6) !important;
    padding: 6px 10px !important;
    border-radius: 4px !important;
    border: 1px solid rgba(212, 175, 55, 0.2) !important;
  }

  /* 5. Cake Section */
  #cake-section {
    padding: 60px 15px !important;
  }

  .cake-wrapper {
    width: 220px !important;
    height: 280px !important;
    margin: 20px auto 0 !important;
  }

  .cake-container {
    width: 220px !important;
    height: 220px !important;
  }

  /* Adjust sliced position on mobile so it does not overflow screen edges */
  .cake-wrapper.cut .cake-left {
    transform: translateX(-40px) rotate(-6deg) !important;
  }

  .cake-wrapper.cut .cake-right {
    transform: translateX(40px) rotate(6deg) !important;
  }

  .cake-wrapper.cut .cake-slice-inner {
    transform: scale(1) rotate(3deg) !important;
  }

  .cut-instruction {
    font-size: 0.85rem !important;
    letter-spacing: 0.1em !important;
    margin-top: 25px !important;
    text-align: center !important;
    width: 100% !important;
    padding: 0 10px !important;
  }

  /* 6. Memory Wall Masonry -> 2-Column Grid */
  #memory-wall {
    padding: 60px 15px 80px !important;
  }

  .memory-wall-subtitle {
    margin-bottom: 40px !important;
    font-size: clamp(1.1rem, 4vw, 1.6rem) !important;
  }

  .masonry-gallery {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    column-count: auto !important; /* override CSS column layout */
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 auto !important;
  }

  .masonry-item {
    width: 100% !important;
    margin-bottom: 0 !important; /* Managed by grid gap now */
    transform: none !important;
    opacity: 1 !important; /* ensure items are visible without GSAP translate */
    position: relative !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5) !important;
    transition: transform 0.3s ease !important;
  }

  .masonry-item:hover {
    transform: scale(1.02) !important;
    box-shadow: 0 6px 15px rgba(212, 175, 55, 0.25) !important;
  }

  .masonry-item img {
    height: 150px !important; /* Fixed image height for clean 2-column grid balance */
    width: 100% !important;
    object-fit: cover !important;
    max-height: none !important;
    transform: none !important;
  }

  .crop-zoom img, .crop-zoom:hover img {
    transform: none !important;
  }

  /* 7. Loading & Final Sections */
  .loading-text {
    font-size: 1.1rem !important;
    letter-spacing: 0.15em !important;
    text-align: center !important;
    padding: 0 20px !important;
    line-height: 1.6 !important;
  }

  .frame-wrapper {
    margin: 0 auto !important;
    display: flex !important;
    justify-content: center !important;
  }

  .photo-frame {
    width: 180px !important;
    height: 220px !important;
    padding: 10px !important;
  }

  .final-happy-birthday {
    font-size: clamp(2rem, 8vw, 3rem) !important;
    margin-top: 30px !important;
    text-align: center !important;
    padding: 0 15px !important;
  }

  .sefoo-button {
    font-size: 1.4rem !important;
    padding: 10px 35px !important;
    margin-top: 20px !important;
  }

  /* 8. Password & Success Screens */
  #password-page {
    padding: 60px 15px !important;
  }

  .password-portrait {
    width: 180px !important;
    height: 230px !important;
    border-width: 5px !important;
    margin-bottom: 20px !important;
  }

  .password-label {
    font-size: clamp(1.2rem, 5vw, 1.6rem) !important;
    margin-bottom: 20px !important;
  }

  .password-input {
    width: 230px !important;
    padding: 12px 20px !important;
    font-size: 0.95rem !important;
  }

  .password-submit {
    padding: 10px 30px !important;
    font-size: 0.85rem !important;
    margin-top: 15px !important;
  }

  #success-page {
    padding: 80px 15px 40px !important;
  }

  .success-text {
    font-size: clamp(1.8rem, 7vw, 2.5rem) !important;
    margin-top: 20px !important;
    padding: 0 10px !important;
    text-align: center !important;
    word-break: break-word !important;
  }

  .success-subtitle {
    margin-bottom: 35px !important;
    font-size: 0.8rem !important;
    letter-spacing: 0.15em !important;
    text-align: center !important;
  }

  .success-polaroids {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px !important;
    width: 100% !important;
    max-width: 320px !important;
    padding-bottom: 20px !important;
  }

  .success-polaroid {
    width: 100% !important;
    transform: none !important;
    animation: successPolaroidInMobile 0.7s ease forwards !important;
    animation-delay: var(--delay, 0s) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5) !important;
    border-radius: 8px !important;
  }

  @keyframes successPolaroidInMobile {
    from {
      opacity: 0;
      transform: scale(0.85) translateY(15px);
    }
    to {
      opacity: 1;
      transform: scale(1) translateY(0);
    }
  }

  .success-polaroid img {
    height: 160px !important;
    border-radius: 8px !important;
  }

  .success-polaroid-label {
    opacity: 1 !important;
    transform: none !important;
    font-size: 0.8rem !important;
    height: 35px !important;
    background: linear-gradient(to top, rgba(0,0,0,0.95), transparent) !important;
  }

  .success-polaroid:hover {
    transform: none !important;
    box-shadow: 0 6px 20px rgba(212,175,55,0.2) !important;
  }

  .success-polaroid:hover img {
    transform: none !important;
  }

  /* 9. Lightbox Mobile Settings */
  .lightbox-content-wrap {
    width: 95% !important;
  }

  .lightbox-img-box {
    max-height: 55vh !important;
  }

  .lightbox-img-box img {
    max-height: 55vh !important;
  }

  .lightbox-caption {
    font-size: 1rem !important;
    padding: 0 15px !important;
  }

  .lightbox-counter {
    font-size: 0.75rem !important;
  }

  .lightbox-prev, .lightbox-next {
    width: 40px !important;
    height: 40px !important;
    font-size: 1.5rem !important;
  }
}


