html {
  box-sizing: border-box;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  width: 100%;
  max-width: 100vw;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Work Sans", sans-serif;
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 25%, #ff9a9e 50%, #fad0c4 75%, #ffecd2 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  width: 100%;
  max-width: 100vw;
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><text y="15" font-size="16">💕</text></svg>'), auto;
  border: none !important;
  border-top: none !important;
  border-bottom: none !important;
  outline: none !important;
  box-shadow: none !important;
  /* Fix gradient seam issue */
  background-attachment: fixed !important;
  background-repeat: no-repeat !important;
}

/* Global text wrapping and overflow fixes */
.one, .two, .three, .wish h5, .timeline-caption, .carousel-caption,
.timeline-title, .story-title, .carousel-title, .video-title, .memory-title {
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  max-width: 100%;
  box-sizing: border-box;
}

/* Global prevention of unwanted scrollbars */
html, body {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scrollbar-width: none !important; /* Firefox */
  -ms-overflow-style: none !important; /* IE/Edge */
}

body::-webkit-scrollbar {
  display: none !important; /* Chrome/Safari */
}

/* Ensure all fixed elements don't cause scrollbars */
*:not(body):not(html) {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

*:not(body):not(html)::-webkit-scrollbar {
  display: none !important;
}

/* Global fix to prevent unwanted lines */
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove any potential horizontal rules or lines */
hr, .divider, .separator {
  display: none !important;
}

/* Specifically remove any horizontal lines that might appear */
.story-timeline::before {
  display: none !important;
}

/* Remove lines from body and main containers */
body, .container, .extended-content, .story-section, .carousel-section, .video-gallery, .memory-section {
  border-top: none !important;
  border-bottom: none !important;
  border-left: none !important;
  border-right: none !important;
  border: none !important;
  outline: none !important;
  border-image: none !important;
  -webkit-border-image: none !important;
  box-shadow: none !important;
}

/* Target specific elements that might be creating a horizontal line */
.six, .extended-content, .story-section, .five, .four {
  border-top: none !important;
  border-bottom: none !important;
  outline: none !important;
}

/* Restore interactive hover effects */
.memory-item:hover::after,
.wall-photo:hover::before,
.trail-photo:hover::after {
  opacity: 1 !important;
  transform: scale(1) rotate(360deg) !important;
}

/* Restore sparkle effects */
.sparkle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
  animation: sparkleAnim 1s ease-in-out infinite;
  pointer-events: none;
}

/* Remove any horizontal rules or dividers */
hr, .separator, .divider, [class*="line"] {
  display: none !important;
  height: 0 !important;
  border: none !important;
}

/* Target specific elements that might be creating the line */
.story-section, .extended-content, .six, .five {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.story-section::before, .story-section::after,
.extended-content::before, .extended-content::after,
.six::before, .six::after,
.five::before, .five::after {
  display: none !important;
  visibility: hidden !important;
}

/* Remove any horizontal lines from specific elements */
body, .container, .extended-content, .story-section, .carousel-section, .video-gallery, .memory-section {
  border-image: none !important;
  -webkit-border-image: none !important;
  border-style: none !important;
}

/* Specifically target any element that might create a line */
hr, [class*="line"], [class*="border"], [class*="separator"], [class*="divider"] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background-image: none !important;
}

/* Remove background images that might create lines */
.extended-content, .story-section, .six, .five {
  background-image: none !important;
  background-repeat: no-repeat !important;
}

/* Specific fix for the middle horizontal line */
.extended-content, .story-section, .six, .five, .four {
  border-top: none !important;
  border-bottom: none !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Aggressive pseudo-element removal */
.extended-content::before, .extended-content::after,
.story-section::before, .story-section::after,
.six::before, .six::after,
.five::before, .five::after,
.four::before, .four::after,
.container::before, .container::after {
  display: none !important;
  visibility: hidden !important;
  content: none !important;
  border: none !important;
  background: transparent !important;
  height: 0 !important;
  width: 0 !important;
  position: absolute !important;
  top: -9999px !important;
  left: -9999px !important;
}

/* Target specific separators that might be causing the line */
hr, .separator, .divider, .line, [role="separator"] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Remove only the problematic vertical timeline line */
.story-timeline::before {
  display: none !important;
}

/* Additional aggressive line removal for mobile */
@media screen and (max-width: 768px) {
  /* Remove ALL possible sources of horizontal/vertical lines */
  .story-section::before,
  .story-section::after,
  .extended-content::before,
  .extended-content::after,
  .container::before,
  .container::after,
  .six::before,
  .six::after,
  .five::before,
  .five::after,
  .four::before,
  .four::after,
  .timeline-item::before,
  .timeline-item::after,
  .timeline-content::before,
  .timeline-content::after,
  .carousel-section::before,
  .carousel-section::after,
  .video-gallery::before,
  .video-gallery::after,
  .memory-section::before,
  .memory-section::after {
    display: none !important;
    visibility: hidden !important;
    content: none !important;
    border: none !important;
    background: transparent !important;
    height: 0 !important;
    width: 0 !important;
    position: absolute !important;
    top: -9999px !important;
    left: -9999px !important;
    opacity: 0 !important;
  }

  /* Specific targeting for any remaining pseudo-elements */
  *::before,
  *::after {
    box-shadow: none !important;
    border-image: none !important;
    background-image: none !important;
    background: transparent !important;
  }

  /* Target any element that might create visual lines */
  [class*="timeline"],
  [class*="story"],
  [class*="extended"],
  [class*="carousel"],
  [class*="video"],
  [class*="memory"] {
    border-image: none !important;
    -webkit-border-image: none !important;
    border-style: none !important;
    box-shadow: none !important;
    background-image: none !important;
    outline: none !important;
  }
}

/* Keep other interactive pseudo-elements but remove borders */
.timeline-item::after,
.timeline-content::before {
  border: none !important;
  background: none !important;
}

/* Restore click animation pseudo-elements */
.memory-item::after,
.wall-photo::before,
.trail-photo::after {
  display: block !important;
  visibility: visible !important;
}

/* Ensure containers don't create unwanted borders */
.container, .extended-content, .story-section, .carousel-section, .video-gallery, .memory-section {
  border-image: none !important;
  -webkit-border-image: none !important;
  border-style: none !important;
}

/* Remove unwanted borders from text elements while preserving design borders */
p, .text-box, .hbd-chatbox, .idea-1, .idea-2, .idea-3, .idea-4, .idea-5, .idea-6, .two, .three, .four, .five, .six, .seven, .eight, .nine {
  outline: none !important;
  border-image: none !important;
  -webkit-border-image: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

/* Only remove borders from container divs that shouldn't have them */
.container > div:not(.fun-video-bg):not(.timeline-item):not(.timeline-content):not(.carousel-container):not(.video-grid):not(.memory-grid) {
  border: none !important;
  border-top: none !important;
  border-bottom: none !important;
  border-left: none !important;
  border-right: none !important;
}

/* Loading Screen - Highest priority - MOBILE OPTIMIZED */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, #ffecd2, #fcb69f, #ff9a9e);
  background-size: 400% 400%;
  animation: gradientShift 3s ease infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000 !important; /* Highest priority */
  transition: opacity 0.3s ease, visibility 0.3s ease;
  overflow: hidden;
  transform: translateZ(0);
  will-change: transform;
}

/* Mobile-specific loading screen fixes */
@media screen and (max-width: 768px) {
  .loading-screen {
    z-index: 999999 !important; /* Ensure it's above all mobile elements */
  }

  .loading-screen.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    top: -9999px !important;
    left: -9999px !important;
  }
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  transform: scale(0.95) translateY(10px);
}

.loading-content {
  text-align: center;
}

.loading-hearts {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 30px;
}

.loading-hearts .heart {
  font-size: 3rem;
  animation: heartPulse 1.2s ease-in-out infinite;
  display: inline-block;
}

.heart-1 {
  animation-delay: 0s;
}

.heart-2 {
  animation-delay: 0.3s;
}

.heart-3 {
  animation-delay: 0.6s;
}

@keyframes heartPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
  }
}

.loading-text {
  font-size: 1.5rem;
  color: #ff6b9d;
  font-weight: 600;
  animation: fadeInOut 2s ease-in-out infinite;
}

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

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

/* Light Flares */
.light-flares {
  position: fixed;
  width: 100vw;
  height: 100vh;
  top: 0;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 1 !important; /* Low priority, behind content */
  overflow: hidden;
  max-width: 100vw;
  transform: translateZ(0);
  will-change: transform;
}

/* Mobile-specific light flares fixes - PERFORMANCE OPTIMIZED */
@media screen and (max-width: 768px) {
  .light-flares {
    z-index: 0 !important; /* Push behind content on mobile */
    opacity: 0.1 !important; /* Significantly reduce intensity */
    pointer-events: none !important; /* Prevent interaction blocking */
  }

  .flare {
    filter: blur(150px) !important; /* Increase blur for mobile */
    opacity: 0.08 !important; /* Further reduce opacity */
    transform: translateZ(0); /* Hardware accelerate */
  }
}

.flare {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  animation: flareFloat 10s ease-in-out infinite;
}

.flare-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 182, 193, 0.8) 0%, transparent 70%);
  top: -200px;
  left: -200px;
  animation-duration: 15s;
}

.flare-2 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(255, 218, 185, 0.7) 0%, transparent 70%);
  top: 30%;
  right: -150px;
  animation-duration: 20s;
  animation-delay: 2s;
}

.flare-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 192, 203, 0.6) 0%, transparent 70%);
  bottom: -100px;
  left: 30%;
  animation-duration: 18s;
  animation-delay: 4s;
}

.flare-4 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(255, 228, 225, 0.8) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  animation-duration: 22s;
  animation-delay: 1s;
}

@keyframes flareFloat {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(50px, -50px) scale(1.1);
  }
  50% {
    transform: translate(-30px, 30px) scale(0.9);
  }
  75% {
    transform: translate(40px, 20px) scale(1.05);
  }
}

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  text-align: center;
  visibility: hidden;
  position: relative;
  overflow-x: hidden !important;
  overflow-y: visible !important;
  max-width: 100vw;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
  padding: 0 20px 50px;
  box-sizing: border-box;
  border: none !important;
  border-top: none !important;
  border-bottom: none !important;
  outline: none !important;
  z-index: 10; /* Ensure proper stacking context */
}

/* Fun Background Video */
.fun-video-bg {
  position: absolute;
  top: 5vh;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 450px;
  height: auto;
  z-index: 0;
  opacity: 0;
  transition: opacity 1s ease;
  border-radius: 25px;
  overflow: hidden;
  box-shadow: 0 15px 60px rgba(255, 105, 180, 0.4);
  border: 3px solid rgba(255, 255, 255, 0.6);
}

.fun-video-bg.active {
  opacity: 1;
  animation: funBounce 3s ease-in-out infinite;
}

@keyframes funBounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0) rotate(0deg);
  }
  25% {
    transform: translateX(-50%) translateY(-10px) rotate(2deg);
  }
  50% {
    transform: translateX(-50%) translateY(0) rotate(0deg);
  }
  75% {
    transform: translateX(-50%) translateY(-10px) rotate(-2deg);
  }
}

.bg-video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 26px;
}

.container div.six {
  position: relative; /* Changed from absolute to fix overlaps */
  top: auto;
  z-index: 1;
  padding: 20px 0;
  left: auto;
  right: auto;
  margin: 20px auto; /* Add proper spacing */
}

/* Targeted mobile fixes - restore proper layout */
@media screen and (max-width: 768px) {
  /* Universal mobile element constraints */
  * {
    max-width: 100vw;
    box-sizing: border-box;
  }
  
  /* Only fix the specific problematic elements */
  .container div.seven,
  .container div.eight {
    /* Remove only the problematic height and positioning */
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  
  /* Fix all container divs to be relative */
  .container > div {
    position: relative !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
  }
  
  .container div.six {
    position: relative !important;
    top: auto !important;
  }

  /* Keep the loading screen but ensure it's properly hidden */
  .loading-screen.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }

  /* Ensure light flares don't interfere */
  .light-flares {
    z-index: 1 !important;
    opacity: 0.2 !important;
  }

  /* Ensure mobile hearts don't block interactions */
  .mobile-hearts-container {
    pointer-events: none !important;
    z-index: 2 !important;
  }

  /* Restore proper scrolling */
  body {
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  html {
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  /* Ensure proper overflow on main containers */
  .container {
    overflow-x: hidden !important;
    overflow-y: visible !important;
    max-width: 100vw;
    position: relative;
  }

  .extended-content {
    overflow-x: hidden !important;
    overflow-y: visible !important;
    max-width: 100vw;
    position: relative;
    display: block;
  }
  
  /* Ensure .six doesn't interfere */
  .container div.six {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    overflow: visible !important;
  }
  
  /* Fix carousel and grids */
  .carousel-container, .video-grid, .memory-grid {
    max-width: 100%;
    overflow: hidden;
  }
}

.container > div:not(.fun-video-bg) {
  position: relative;
  left: auto;
  transform: none;
  top: auto;
  z-index: 10;
  min-height: auto;
  width: fit-content;
  max-width: 95%;
  margin: 20px auto;
}

.one {
  font-size: 4.5rem;
  text-shadow: 0 0 20px rgba(255, 182, 193, 0.8), 0 0 40px rgba(255, 192, 203, 0.6);
  max-width: 90%;
  margin: 0;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  padding: 15px 20px;
  border-radius: 15px;
  display: inline-block;
  width: fit-content;
}

.one > img {
  vertical-align: middle;
  margin-bottom: 10px;
  max-width: 100%;
  height: auto;
}

.two {
  font-size: 1.2rem;
  font-weight: lighter;
  max-width: 90%;
  margin: 10px auto 0;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  padding: 12px 16px;
  border-radius: 12px;
  display: inline-block;
  width: fit-content;
}

.three {
  font-size: 3rem;
  max-width: 90%;
  margin: 0;
  z-index: 20;
  position: relative;
  width: fit-content;
}

.three p {
  margin: 0;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  border-radius: 15px;
  display: inline-block;
  width: fit-content;
}

.four .text-box {
  width: 90%;
  max-width: 600px;
  margin: 0 auto;
  border: none !important;
  outline: none !important;
  border-radius: 5px;
  padding: 10px;
  position: relative;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  z-index: 20;
}

.text-box p {
  margin: 0;
  text-align: left;
  border: none !important;
  outline: none !important;
}

.text-box span {
  visibility: hidden;
}

.text-box .fake-btn {
  position: absolute;
  right: 5px;
  bottom: 5px;
  color: #fff;
  background-color: rgb(21, 161, 237);
  padding: 5px 8px;
  border-radius: 3px;
}

.five p {
  font-size: 2rem;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0 auto;
  max-width: 90%;
  background: transparent;
  backdrop-filter: none;
  padding: 12px 15px;
  border-radius: 12px;
  z-index: 20;
  width: fit-content;
  display: inline-block;
  color: #000;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.9),
               0 0 40px rgba(255, 192, 203, 0.6),
               0 2px 4px rgba(0, 0, 0, 0.1);
  font-weight: 500;
}

.idea-3 strong {
  padding: 3px 5px;
  border-radius: 3px;
  display: inline-block;
  transition: all 0.3s ease;
  cursor: pointer;
}

.idea-3 strong:hover {
  transform: scale(1.2);
  box-shadow: 0 5px 20px rgba(255, 107, 157, 0.5);
}

.five .idea-5 {
  font-size: 4rem;
}

.idea-5 span,
.idea-6 span,
.wish-hbd span {
  display: inline-block;
}

.idea-6 span {
  font-size: 15rem;
}

.six {
  position: relative;
}

.media-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  width: 100%;
  position: relative;
  z-index: 2;
}

.six img {
  display: inline-block;
  max-width: 500px;
  width: calc(50% - 15px);
  min-width: 280px;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 10px 50px rgba(255, 105, 180, 0.4),
              0 0 100px rgba(255, 192, 203, 0.3),
              inset 0 0 20px rgba(255, 255, 255, 0.2);
  border: 3px solid rgba(255, 255, 255, 0.5);
  animation: photoGlow 3s ease-in-out infinite;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  cursor: pointer;
}

.six img:hover {
  transform: scale(1.05) rotate(2deg);
  box-shadow: 0 20px 70px rgba(255, 105, 180, 0.6),
              0 0 150px rgba(255, 192, 203, 0.5),
              inset 0 0 30px rgba(255, 255, 255, 0.4);
  border: 4px solid rgba(255, 255, 255, 0.8);
}

.wedding-video {
  max-width: 500px;
  width: calc(50% - 15px);
  min-width: 280px;
  height: auto;
  max-height: 600px;
  border-radius: 20px;
  box-shadow: 0 10px 50px rgba(255, 105, 180, 0.4),
              0 0 100px rgba(255, 192, 203, 0.3),
              inset 0 0 20px rgba(255, 255, 255, 0.2);
  border: 3px solid rgba(255, 255, 255, 0.5);
  animation: photoGlow 3s ease-in-out infinite;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  cursor: pointer;
  object-fit: cover;
}

.wedding-video:hover {
  transform: scale(1.05) rotate(-2deg);
  box-shadow: 0 20px 70px rgba(255, 105, 180, 0.6),
              0 0 150px rgba(255, 192, 203, 0.5),
              inset 0 0 30px rgba(255, 255, 255, 0.4);
  border: 4px solid rgba(255, 255, 255, 0.8);
}

@keyframes photoGlow {
  0%, 100% {
    box-shadow: 0 10px 50px rgba(255, 105, 180, 0.4),
                0 0 100px rgba(255, 192, 203, 0.3),
                inset 0 0 20px rgba(255, 255, 255, 0.2);
  }
  50% {
    box-shadow: 0 15px 60px rgba(255, 105, 180, 0.6),
                0 0 120px rgba(255, 192, 203, 0.5),
                inset 0 0 30px rgba(255, 255, 255, 0.3);
  }
}

.six .hat {
  position: absolute;
  width: 80px;
  top: -35px;
  left: 41.5%;
  /* transform: scale(0.1); */
}

.baloons img {
  display: inline-block;
  position: absolute;
  width: 200px;
  transition: all 0.3s ease;
  cursor: pointer;
  filter: drop-shadow(0 0 10px rgba(255, 107, 157, 0.3));
}

.baloons img:hover {
  transform: scale(1.2) rotate(10deg);
  filter: drop-shadow(0 0 20px rgba(255, 107, 157, 0.6));
}

.baloons img:nth-child(even) {
  left: 10%;
}

.baloons img:nth-child(odd) {
  right: 10%;
}

.baloons img:nth-child(3n + 0) {
  left: 30%;
}

.eight svg {
  width: 25px;
  position: absolute;
  top: 0;
  left: 0;
  visibility: hidden;
  z-index: -1;
  filter: drop-shadow(0 0 5px currentColor);
  animation: float 3s ease-in-out infinite;
}

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

.eight svg:nth-child(1) {
  top: 7vh;
  left: 5vw;
  fill: #bd6ecf;
}

.eight svg:nth-child(2) {
  top: 23vh;
  left: 35vw;
  fill: #7dd175;
}

.eight svg:nth-child(3) {
  top: 33vh;
  left: 23vw;
  fill: #349d8b;
}

.eight svg:nth-child(4) {
  top: 43vh;
  left: 57vw;
  fill: #347a9d;
}

.eight svg:nth-child(5) {
  top: 68vh;
  left: 7vw;
  fill: #c66053;
}

.eight svg:nth-child(6) {
  top: 42vh;
  left: 77vw;
  fill: #bfaa40;
}

.eight svg:nth-child(7) {
  top: 68vh;
  left: 83vw;
  fill: #e3bae8;
}

.eight svg:nth-child(8) {
  top: 86vh;
  left: 37vw;
  fill: #8762cb;
}

.eight svg:nth-child(9) {
  top: 94vh;
  left: 87vw;
  fill: #9a90da;
}

.wish-hbd {
  font-size: 3em;
  margin: 0;
  background: linear-gradient(45deg, #ff6b9d, #c56cf0, #ffb8b8, #ff6b9d);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientText 3s ease infinite;
  text-shadow: 0 0 30px rgba(255, 107, 157, 0.5);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.wish-hbd:hover {
  transform: scale(1.1);
  filter: brightness(1.2);
}

.wish-hbd::after {
  display: none;
}

@keyframes sparkleAppear {
  0%, 100% { opacity: 0; transform: translate(0, 0) scale(0); }
  50% { opacity: 1; transform: translate(10px, -10px) scale(1); }
}

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

/* Countdown Timer Styling */
.countdown-timer {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 30px 0;
  flex-wrap: wrap;
}

.time-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 20px;
  min-width: 80px;
  box-shadow: 0 8px 32px rgba(255, 105, 180, 0.2),
              inset 0 2px 10px rgba(255, 255, 255, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.4);
  animation: timerPulse 2s ease-in-out infinite;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.time-unit::before {
  display: none;
}

@keyframes shimmer {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.time-unit:hover {
  transform: scale(1.1) translateY(-5px) translateZ(10px);
  box-shadow: 0 15px 50px rgba(255, 105, 180, 0.4),
              inset 0 2px 15px rgba(255, 255, 255, 0.5);
  border: 3px solid rgba(255, 255, 255, 0.6);
  will-change: transform, box-shadow;
}

.time-value {
  font-size: 2.5em;
  font-weight: bold;
  background: linear-gradient(135deg, #ff6b9d, #c56cf0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 20px rgba(255, 107, 157, 0.3);
}

.time-label {
  font-size: 0.9em;
  margin-top: 5px;
  color: #ff6b9d;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

@keyframes timerPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 8px 32px rgba(255, 105, 180, 0.2),
                inset 0 2px 10px rgba(255, 255, 255, 0.3);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(255, 105, 180, 0.4),
                inset 0 2px 15px rgba(255, 255, 255, 0.4);
  }
}

.wish h5 {
  font-weight: lighter;
  font-size: 1.5rem;
  margin: 10px auto 20px;
  color: #ff6b9d;
  text-shadow: 0 0 10px rgba(255, 107, 157, 0.3);
  line-height: 1.6;
  transition: all 0.3s ease;
  cursor: default;
  max-width: 900px;
  padding: 0 20px 40px;
  position: relative;
  z-index: 2;
}

.wish h5:hover {
  color: #c56cf0;
  text-shadow: 0 0 20px rgba(197, 108, 240, 0.6);
  transform: scale(1.02);
}

.nine p {
  font-size: 2rem;
  font-weight: lighter;
  text-shadow: 0 0 15px rgba(255, 107, 157, 0.4);
  max-width: 90%;
  margin: 0 auto;
}

#replay {
  z-index: 3;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #ff6b9d;
}

#replay:hover {
  transform: scale(1.1);
  text-shadow: 0 0 25px rgba(255, 107, 157, 0.8);
}

.last-smile {
  font-size: 3rem;
  animation: heartBeat 1.5s ease-in-out infinite;
}

@keyframes heartBeat {
  0%, 100% {
    transform: scale(1);
  }
  10%, 30% {
    transform: scale(1.2);
  }
  20%, 40% {
    transform: scale(1.1);
  }
}

/* Confetti Animations */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999 !important; /* High priority effects layer */
  overflow: hidden;
  transform: translateZ(0);
  will-change: transform;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -10px;
  opacity: 0.8;
  animation: confettiFall linear infinite;
  transform-origin: center;
}

@keyframes confettiFall {
  0% {
    transform: translateY(0) rotateZ(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotateZ(720deg);
    opacity: 0;
  }
}

/* Sparkle Effect */
.sparkle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
  animation: sparkleAnim 1s ease-in-out infinite;
  pointer-events: none;
}

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

/* Micro Interactions - Performance Optimized */
.container > div {
  transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.container > div:hover {
  transform: scale(1.02);
}

.one:hover {
  animation: wiggle 0.5s ease-in-out;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
}

.two {
  transition: all 0.3s ease;
}

.two:hover {
  color: #ff6b9d;
  transform: scale(1.1);
  text-shadow: 0 0 20px rgba(255, 107, 157, 0.8);
}

.three p {
  transition: all 0.3s ease;
  cursor: pointer;
}

.three p:hover {
  transform: scale(1.1) rotate(2deg);
  text-shadow: 0 0 30px rgba(255, 107, 157, 0.8);
}

.text-box {
  transition: all 0.3s ease;
}

.text-box:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 40px rgba(255, 107, 157, 0.4);
}

.fake-btn {
  transition: all 0.3s ease;
  cursor: pointer;
}

.fake-btn:hover {
  transform: scale(1.1);
  background-color: rgb(255, 107, 157) !important;
  box-shadow: 0 5px 15px rgba(255, 107, 157, 0.5);
}

/* Media Queries */
@media screen and (max-height: 1000px) {
  .six .hat {
    left: 40%;
  }
}

@media screen and (max-height: 800px) {
  .six .hat {
    left: 37%;
  }
}

@media screen and (max-height: 700px) {
  .six .hat {
    left: 32%;
  }
}

@media screen and (max-height: 850px) and (max-width: 450px) {
  .six .hat {
    left: 32%;
  }
}

@media screen and (max-width: 500px) {
  .container {
    width: 100%;
    padding: 0 10px;
    max-height: none;
    overflow: visible;
    min-height: auto !important;
    height: auto !important;
    position: relative !important;
  }

  /* Fix half-screen occupation by ensuring containers don't take full viewport */
  .container > div:not(.fun-video-bg) {
    min-height: auto !important;
    height: auto !important;
    max-height: none !important;
    position: relative !important;
    left: auto !important;
    transform: none !important;
    top: auto !important;
  }

  /* Ensure extended content doesn't cause scroll issues */
  .extended-content {
    min-height: auto !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    position: relative !important;
  }

  /* Fix any remaining absolute positioning issues */
  .six, .seven, .eight {
    position: relative !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    transform: none !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
  }

  /* Additional aggressive fixes to prevent half-screen occupation */
  .container > div,
  .extended-content > div,
  .story-section > div,
  .carousel-section > div,
  .video-gallery > div,
  .memory-section > div {
    max-height: 80vh !important;
    overflow: visible !important;
    position: relative !important;
  }

  /* Prevent any element from creating unwanted overlays */
  .container div.six {
    position: relative !important;
    top: auto !important;
    z-index: 1 !important;
    padding: 20px 0;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    max-height: none !important;
    min-height: auto !important;
    height: auto !important;
  }

  .container > div:not(.fun-video-bg) {
    min-height: auto !important;
    height: auto !important;
    left: auto !important;
    transform: none !important;
    width: fit-content !important;
    max-width: 95% !important;
    position: relative !important;
    margin: 10px auto !important;
  }
  
  .one {
    font-size: 1.8rem;
    padding: 12px 16px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    max-width: 90% !important;
    position: relative;
    z-index: 10;
    margin: 10px auto !important;
    line-height: 1.3;
  }
  
  .one h1 {
    font-size: 1.8rem;
    margin: 5px 0;
    position: relative;
    z-index: 10;
  }

  .two {
    font-size: 1rem;
    padding: 10px 14px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    max-width: 90% !important;
    position: relative;
    z-index: 10;
    margin: 8px auto !important;
    line-height: 1.4;
  }
  
  .three {
    font-size: 1.6rem;
    max-width: 95% !important;
    position: relative;
    z-index: 10;
    margin: 15px auto !important;
  }

  .three p {
    margin: 0 !important;
    padding: 12px 16px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    display: inline-block !important;
    width: fit-content !important;
    position: relative;
    z-index: 10;
    line-height: 1.3;
  }
  
  .fun-video-bg {
    max-width: 92%;
    top: 8vh;
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.5);
  }
  
  .fun-video-bg.active {
    animation: funBounceMobile 3s ease-in-out infinite;
  }
  
  @keyframes funBounceMobile {
    0%, 100% {
      transform: translateX(-50%) translateY(0) rotate(0deg) scale(0.9);
    }
    50% {
      transform: translateX(-50%) translateY(-5px) rotate(0deg) scale(0.95);
    }
  }

  .four .text-box {
    width: 95%;
    padding: 8px;
    background: rgba(255, 255, 255, 0.75) !important;
  }
  
  .five p {
    font-size: 1.5rem;
    padding: 10px;
    background: transparent !important;
    backdrop-filter: none !important;
    width: fit-content !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    color: #000 !important;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.9),
                 0 0 40px rgba(255, 192, 203, 0.6),
                 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    font-weight: 500 !important;
  }
  
  .five .idea-5 {
    font-size: 2.5rem;
  }
  
  .five .idea-6 span {
    font-size: 8rem;
  }

  .text-box .fake-btn {
    right: 5px;
    bottom: -38px;
  }

  .idea-5 span {
    display: block;
  }

  .idea-6 span {
    font-size: 10rem;
  }

  .six .hat {
    width: 50px;
    top: -20px;
  }

  .wish-hbd {
    font-size: 2.3em;
  }

  .wish h5 {
    font-size: 1.4rem;
  }

  .nine p {
    font-size: 1.5rem;
    font-weight: lighter;
  }
  
  .countdown-timer {
    gap: 10px;
  }
  
  .time-unit {
    padding: 15px;
    min-width: 60px;
  }
  
  .time-value {
    font-size: 1.8em;
  }
  
  .time-label {
    font-size: 0.7em;
  }
  
  .flare {
    filter: blur(60px);
  }
  
  .confetti {
    width: 7px;
    height: 7px;
  }
  
  body {
    cursor: auto;
  }
  
  .time-unit:hover {
    transform: scale(1.05) translateY(-3px);
  }
  
  .six img:hover {
    transform: scale(1.02) rotate(1deg);
  }
  
  .media-container {
    gap: 15px;
  }
  
  .six img,
  .wedding-video {
    max-width: 90%;
    width: 90%;
  }
  
  .wedding-video:hover {
    transform: scale(1.02) rotate(-1deg);
  }
}

/* ============================================
   NEW ENHANCED SECTIONS STYLES
   ============================================ */

/* Extended Content Wrapper - MOBILE OPTIMIZED */
.extended-content {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  background: transparent !important;
  backdrop-filter: none !important;
  padding: 20px 15px; /* Added proper padding */
  box-sizing: border-box;
  transition: opacity 0.5s ease; /* Faster transition */
  border: none !important;
  outline: none !important;
  border-top: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  position: relative;
  overflow-x: hidden !important;
  overflow-y: visible !important;
  max-width: 100vw;
  z-index: 5 !important;
  display: none; /* Initially hidden */
  opacity: 0;
}

/* Remove any spacing or borders between containers */
.container + .extended-content,
.extended-content + .container {
  margin: -2px !important;
  padding: 0 !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  border-top: none !important;
  border-bottom: none !important;
  border-left: none !important;
  border-right: none !important;
  border-image: none !important;
  -webkit-border-image: none !important;
  border-style: none !important;
}

/* Aggressively remove ALL borders and lines */
* {
  border-image: none !important;
  -webkit-border-image: none !important;
  border-style: none !important;
}

/* Remove all possible horizontal lines */
hr, .divider, .separator, .line, [class*="line"], [class*="border"], [class*="separator"], [class*="divider"] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  width: 0 !important;
  border: none !important;
  outline: none !important;
  margin: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  background-image: none !important;
  background: transparent !important;
  max-height: 0 !important;
  min-height: 0 !important;
  line-height: 0 !important;
  font-size: 0 !important;
}

.extended-content.visible {
  display: block !important;
  opacity: 1 !important;
}

/* Story Timeline Section */
.story-section {
  position: relative;
  padding: 20px 10px;
  margin: 0 !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  z-index: 5 !important;
}

.story-title {
  font-size: 3.5rem;
  text-align: center;
  margin-bottom: 80px;
  background: linear-gradient(135deg, #ff6b9d, #c56cf0, #ffd93d);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientText 4s ease infinite;
  text-shadow: 0 0 30px rgba(255, 107, 157, 0.3);
  font-weight: 700;
  letter-spacing: 2px;
}

.story-timeline {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 0;
}

.story-timeline::before {
  display: none !important;
}

.timeline-item {
  display: flex;
  justify-content: flex-start;
  padding: 40px 0;
  position: relative;
  opacity: 0;
  transform: translateY(50px);
}

.timeline-item:nth-child(even) {
  justify-content: flex-end;
}

.timeline-item:nth-child(even) .timeline-content {
  flex-direction: row-reverse;
  text-align: right;
}

.timeline-content {
  display: flex;
  align-items: center;
  gap: 30px;
  max-width: 45%;
  position: relative;
}

.timeline-content::before {
  content: '💕';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  z-index: 10;
  animation: heartBeat 1.5s ease-in-out infinite;
}

.timeline-item:nth-child(1) .timeline-content::before {
  content: '✨';
}

.timeline-item:nth-child(3) .timeline-content::before {
  content: '💍';
}

.timeline-image-wrapper {
  position: relative;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  overflow: hidden;
  border: 5px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 15px 60px rgba(255, 105, 180, 0.4),
              0 0 80px rgba(197, 108, 240, 0.3);
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.timeline-image-wrapper:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 20px 80px rgba(255, 105, 180, 0.6),
              0 0 120px rgba(197, 108, 240, 0.5);
  border-color: #fff;
}

.timeline-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.timeline-image-wrapper:hover .timeline-image {
  transform: scale(1.15);
}

.timeline-title {
  font-size: 2rem;
  color: #ff6b9d;
  margin: 10px 0;
  text-shadow: 0 0 15px rgba(255, 107, 157, 0.4);
}

.timeline-caption {
  font-size: 1.2rem;
  color: #333;
  opacity: 0.9;
  font-style: italic;
}

/* Photo Carousel Section */
.carousel-section {
  position: relative;
  padding: 20px 10px;
  margin: 0 !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
}

.carousel-title {
  font-size: 3.5rem;
  text-align: center;
  margin-bottom: 60px;
  background: linear-gradient(135deg, #c56cf0, #ff6b9d, #ffd93d);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientText 4s ease infinite;
  font-weight: 700;
  letter-spacing: 2px;
}

.photo-carousel {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

.carousel-container {
  position: relative;
  width: 100%;
  height: 600px;
  overflow: hidden;
  border-radius: 30px;
  box-shadow: 0 20px 80px rgba(255, 105, 180, 0.4);
}

.carousel-slides {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 1; /* Below buttons */
  pointer-events: none; /* Allow clicks through to buttons */
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255, 182, 193, 0.3), rgba(197, 108, 240, 0.3));
  backdrop-filter: blur(10px);
  pointer-events: auto; /* Re-enable on actual slides */
}

.carousel-slide.active {
  opacity: 1;
  z-index: 1;
}

.carousel-slide img {
  max-width: 100%;
  max-height: 80%;
  object-fit: contain;
  border-radius: 20px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
}

.carousel-caption {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.95);
  padding: 15px 30px;
  border-radius: 50px;
  font-size: 1.3rem;
  color: #ff6b9d;
  font-weight: 600;
  box-shadow: 0 5px 20px rgba(255, 105, 180, 0.3);
  max-width: 80%;
  text-align: center;
}

.carousel-btn {
  position: absolute !important;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  font-size: 2rem;
  color: #ff6b9d;
  padding: 15px 20px;
  cursor: pointer;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 5px 20px rgba(255, 105, 180, 0.3);
  z-index: 15 !important; /* Above slides and overlay */
  pointer-events: auto !important;
}

.carousel-btn:hover {
  background: #ff6b9d;
  color: white;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 8px 30px rgba(255, 105, 180, 0.5);
}

.carousel-prev {
  left: 20px;
}

.carousel-next {
  right: 20px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 107, 157, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.carousel-dot:hover {
  background: rgba(255, 107, 157, 0.6);
  transform: scale(1.2);
}

.carousel-dot.active {
  background: #ff6b9d;
  transform: scale(1.3);
  box-shadow: 0 0 15px rgba(255, 107, 157, 0.6);
}

/* Special Video Section */
.special-video-section {
  position: relative;
  padding: 60px 10px;
  margin: 0 !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.special-video-title {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 40px;
  background: linear-gradient(135deg, #ff6b9d, #ffd93d, #c56cf0);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientText 4s ease infinite;
  font-weight: 700;
  letter-spacing: 2px;
  text-shadow: 0 0 30px rgba(255, 107, 157, 0.3);
}

.special-video-card {
  position: relative;
  border-radius: 25px;
  overflow: hidden;
  box-shadow: 0 20px 80px rgba(255, 105, 180, 0.4);
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 3px solid rgba(255, 255, 255, 0.5);
  cursor: pointer;
  max-width: 800px;
  width: 90%;
  aspect-ratio: 16/9;
  z-index: 10;
}

.special-video-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 30px 100px rgba(255, 105, 180, 0.6);
  border-color: rgba(255, 255, 255, 0.8);
}

.special-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.special-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 107, 157, 0.3), rgba(197, 108, 240, 0.3));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.3s ease;
  z-index: 2;
  pointer-events: none !important;
}

.special-video-card.playing .special-video-overlay {
  opacity: 0;
  pointer-events: none;
}

.special-video-play-btn {
  background: rgba(255, 255, 255, 0.95);
  border: none;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  font-size: 2.5rem;
  color: #ff6b9d;
  cursor: pointer !important;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 15px 50px rgba(255, 105, 180, 0.5);
  z-index: 3 !important;
  pointer-events: auto !important;
  position: relative;
}

.special-video-play-btn:hover {
  background: #ff6b9d;
  color: white;
  transform: scale(1.2);
  box-shadow: 0 20px 60px rgba(255, 105, 180, 0.7);
}

/* Featured Photo */
.featured-photo {
  text-align: center;
  margin: 60px 0;
}

.featured-photo .girl-dp {
  max-width: 600px;
  width: 90%;
  border-radius: 30px;
  box-shadow: 0 20px 80px rgba(255, 105, 180, 0.5),
              0 0 150px rgba(255, 192, 203, 0.4);
  border: 5px solid rgba(255, 255, 255, 0.6);
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  animation: photoGlow 3s ease-in-out infinite;
}

.featured-photo .girl-dp:hover {
  transform: scale(1.05) rotate(2deg);
  box-shadow: 0 30px 100px rgba(255, 105, 180, 0.7),
              0 0 200px rgba(255, 192, 203, 0.6);
  border-width: 8px;
}

/* Memory Grid Section */
.memory-section {
  position: relative;
  padding: 20px 10px;
  margin: 0 !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  z-index: 5;
}

.memory-title {
  font-size: 3.5rem;
  text-align: center;
  margin-bottom: 80px;
  background: linear-gradient(135deg, #ff6b9d, #ffd93d, #c56cf0);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientText 4s ease infinite;
  font-weight: 700;
  letter-spacing: 2px;
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.memory-item {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 3/4;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 10px 40px rgba(255, 105, 180, 0.3);
  border: 3px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(5px);
  opacity: 0;
  transform: scale(0.8);
}

.memory-item:hover {
  transform: scale(1.05) translateY(-10px);
  box-shadow: 0 20px 60px rgba(255, 105, 180, 0.5),
              0 0 80px rgba(197, 108, 240, 0.4);
  border-color: rgba(255, 255, 255, 0.8);
  z-index: 10;
}

.memory-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.memory-item:hover img {
  transform: scale(1.15);
}

.memory-item::after {
  content: '🔍';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 10;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

.memory-item:hover::after {
  opacity: 1;
}

/* Photo Modal/Lightbox */
.photo-modal {
  display: none;
  position: fixed;
  z-index: 10000 !important; /* Modal layer - above all content */
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  animation: fadeIn 0.3s ease;
  overflow: hidden;
  transform: translateZ(0);
  will-change: transform;
}

.photo-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 15px;
  box-shadow: 0 20px 100px rgba(255, 105, 180, 0.5);
  animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 30px;
  right: 50px;
  font-size: 4rem;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10001;
  font-weight: 300;
}

.modal-close:hover {
  color: #ff6b9d;
  transform: scale(1.2) rotate(90deg);
}

.modal-prev,
.modal-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  font-size: 2.5rem;
  color: #ff6b9d;
  padding: 20px 25px;
  cursor: pointer;
  border-radius: 50%;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 10px 40px rgba(255, 105, 180, 0.4);
}

.modal-prev {
  left: 30px;
}

.modal-next {
  right: 30px;
}

.modal-prev:hover,
.modal-next:hover {
  background: #ff6b9d;
  color: white;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 15px 50px rgba(255, 105, 180, 0.6);
}

/* Enhanced Animations */
@keyframes floatUpDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

@keyframes rotateGlow {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

.floating-heart {
  position: fixed;
  font-size: 1.5rem;
  opacity: 0;
  pointer-events: none;
  animation: floatHeartUp 2.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
  z-index: 9999;
  will-change: transform, opacity;
  max-width: 100vw;
  max-height: 100vh;
}

.interaction-heart {
  position: fixed;
  font-size: 1.8rem;
  pointer-events: none;
  z-index: 1000;
  animation: heartBurst 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
  max-width: 100vw;
  max-height: 100vh;
}

@keyframes floatHeartUp {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  50% {
    opacity: 0.8;
    transform: translateY(-100px) scale(1.2) rotate(10deg);
  }
  100% {
    opacity: 0;
    transform: translateY(-200px) scale(1.5) rotate(15deg);
  }
}

@keyframes heartBurst {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate(var(--distance), 0) rotate(var(--angle));
  }
}

@keyframes floatHeart {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-200px) scale(1.5);
  }
}

/* Remove duplicate animation definitions */
.floating-heart {
  animation: floatHeartUp 2.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

/* ============================================
   ENHANCED MOBILE EXPERIENCE
   ============================================ */

/* Mobile Responsive Styles for New Sections */
@media screen and (max-width: 768px) {
  /* Streamlined mobile touch support - BETTER PERFORMANCE */
  * {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  /* Allow text selection for important elements only */
  p, h1, h2, h3, h4, h5, h6, span, div {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
  }

  /* Mobile-first enhanced backgrounds */
  body {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 25%, #ff9a9e 50%, #fad0c4 75%, #ffecd2 100%);
    background-size: 300% 300%;
    animation: gradientShift 20s ease infinite;
    overflow-x: hidden;
    position: relative;
  }

  /* Touch-friendly floating hearts - OPTIMIZED */
  .mobile-hearts-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none !important; /* Prevent all interactions */
    z-index: 1 !important; /* Much lower z-index */
    overflow: hidden;
    transform: translateZ(0);
    will-change: transform;
    opacity: 0.6; /* Reduce visual distraction */
  }

  .touch-heart {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0;
    animation: touchHeartFloat 2s ease-out forwards;
    pointer-events: none;
    z-index: 1000;
  }

  @keyframes touchHeartFloat {
    0% {
      opacity: 1;
      transform: translateY(0) scale(0.5);
    }
    50% {
      opacity: 0.8;
      transform: translateY(-100px) scale(1.2) rotate(15deg);
    }
    100% {
      opacity: 0;
      transform: translateY(-250px) scale(0.8) rotate(30deg);
    }
  }

  /* Enhanced mobile typography with clamp for better scaling */
  .story-title,
  .carousel-title,
  .video-title,
  .memory-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin-bottom: 20px;
    padding: 0 15px;
    text-shadow: 0 0 20px rgba(255, 107, 157, 0.4);
    line-height: 1.2;
    position: relative;
    z-index: 5;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .timeline-caption, .carousel-caption {
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    max-width: 90%;
    padding: 8px 12px;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .wish h5 {
    font-size: clamp(1.2rem, 4vw, 1.5rem) !important;
    padding: 0 20px !important;
    line-height: 1.6 !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .story-section {
    padding: 30px 10px;
    margin: 20px 0;
  }

  /* Vertical mobile timeline */
  .story-timeline {
    padding: 20px 0;
  }

  .story-timeline::before {
    display: none !important;
  }

  .timeline-item,
  .timeline-item:nth-child(even) {
    justify-content: center;
    padding: 15px 10px;
    margin-bottom: 15px;
    text-align: center;
  }

  .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    max-width: 100%;
    flex-direction: column;
    text-align: center;
    align-items: center;
    gap: 15px;
  }

  .timeline-content::before {
    display: block !important;
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin-bottom: 10px;
    font-size: 2rem;
  }

  .timeline-image-wrapper {
    width: 100px;
    height: 100px;
    border: 3px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 30px rgba(255, 105, 180, 0.4),
                0 0 50px rgba(197, 108, 240, 0.3);
  }

  .timeline-title {
    font-size: 1.4rem;
    margin: 8px 0;
    color: #ff6b9d;
    text-shadow: 0 0 15px rgba(255, 107, 157, 0.4);
  }

  .timeline-caption {
    font-size: 1rem;
    color: #666;
    line-height: 1.4;
  }

  /* Enhanced mobile carousel */
  .carousel-section {
    padding: 30px 10px;
    margin: 20px 0;
  }

  .carousel-container {
    height: 250px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    touch-action: pan-y;
  }

  .carousel-slide img {
    max-height: 75%;
    border-radius: 15px;
    transition: transform 0.3s ease;
  }

  .carousel-slide img:active {
    transform: scale(0.95);
  }

  .carousel-btn {
    width: 50px !important;
    height: 50px !important;
    font-size: 1.6rem !important;
    padding: 12px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 4px 20px rgba(255, 105, 180, 0.3) !important;
    transition: all 0.2s ease !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: rgba(255, 107, 157, 0.3) !important;
    cursor: pointer !important;
    z-index: 9999 !important;
    position: absolute !important;
  }

  .carousel-btn:active {
    transform: translateY(-50%) scale(0.9) !important;
    background: #ff6b9d !important;
    color: white !important;
  }
  
  .carousel-slides {
    pointer-events: none !important;
  }
  
  .carousel-slide {
    pointer-events: auto !important;
  }

  .carousel-prev {
    left: 15px;
  }

  .carousel-next {
    right: 15px;
  }

  .carousel-caption {
    font-size: 1.1rem;
    padding: 12px 20px;
    bottom: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    max-width: 85%;
  }

  /* Touch-friendly dots */
  .carousel-dots {
    gap: 10px;
    margin-top: 20px;
  }

  .carousel-dot {
    width: 10px;
    height: 10px;
    transition: all 0.2s ease;
  }

  .carousel-dot:active {
    transform: scale(0.8);
  }

  /* Enhanced mobile special video section */
  .special-video-section {
    padding: 50px 15px 60px 15px !important;
    margin: 80px auto 60px auto !important;
    position: relative !important;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 25px;
    width: 95% !important;
    max-width: 95vw !important;
    box-shadow: 0 10px 40px rgba(255, 105, 180, 0.2);
    display: block !important;
    clear: both !important;
    isolation: isolate;
    float: none !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
  }

  .special-video-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin-bottom: 30px;
    padding: 0 15px;
    text-shadow: 0 0 20px rgba(255, 107, 157, 0.4);
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
    position: relative;
    z-index: 1;
  }

  .special-video-card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    aspect-ratio: 9/16;
    max-height: 550px;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 15px 60px rgba(255, 105, 180, 0.5),
                0 0 100px rgba(197, 108, 240, 0.3);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative !important;
    border: 4px solid rgba(255, 255, 255, 0.7);
    z-index: 1;
    float: none !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
  }

  .special-video-card:active {
    transform: scale(0.98) !important;
  }
  
  /* Ensure video doesn't get repositioned */
  .special-video {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    display: block !important;
  }

  .special-video-play-btn {
    width: 80px !important;
    height: 80px !important;
    font-size: 2rem !important;
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 10px 40px rgba(255, 105, 180, 0.5),
                0 0 60px rgba(197, 108, 240, 0.3) !important;
    transition: all 0.2s ease !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: rgba(255, 107, 157, 0.3) !important;
    cursor: pointer !important;
    z-index: 9999 !important;
    position: relative !important;
    border: 3px solid rgba(255, 107, 157, 0.3) !important;
  }

  .special-video-play-btn:active {
    transform: scale(0.85) !important;
    background: #ff6b9d !important;
    color: white !important;
    border-color: #ff6b9d !important;
  }
  
  .special-video-overlay {
    pointer-events: none !important;
  }
  
  .special-video-card {
    touch-action: manipulation !important;
  }

  /* Enhanced mobile memory grid */
  .memory-section {
    padding: 50px 10px !important;
    margin: 120px auto 50px auto !important;
    position: relative !important;
    clear: both !important;
    display: block !important;
    width: 100% !important;
    max-width: 100vw !important;
    isolation: isolate;
    float: none !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
  }
  
  .memory-title {
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
  }
  
  .memory-grid {
    position: relative;
    z-index: 1;
  }

  .memory-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 10px;
  }

  .memory-item {
    aspect-ratio: 3/4;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(255, 105, 180, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.6);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  .memory-item:active {
    transform: scale(0.95);
  }

  .memory-item img {
    transition: transform 0.3s ease;
  }

  .memory-item:active img {
    transform: scale(0.95);
  }

  /* Enhanced mobile countdown timer */
  .countdown-timer {
    gap: 8px;
    margin: 20px 0;
    padding: 0 10px;
  }

  .time-unit {
    padding: 12px 8px;
    min-width: 65px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 6px 25px rgba(255, 105, 180, 0.25),
                inset 0 2px 8px rgba(255, 255, 255, 0.4);
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  .time-unit:active {
    transform: scale(0.95) translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 105, 180, 0.3),
                inset 0 1px 6px rgba(255, 255, 255, 0.5);
  }

  .time-value {
    font-size: 2rem;
    font-weight: 700;
  }

  .time-label {
    font-size: 0.75rem;
    margin-top: 4px;
    letter-spacing: 0.5px;
  }

  /* Enhanced featured photo */
  .featured-photo {
    margin: 30px 0;
    padding: 0 15px;
  }

  .featured-photo .girl-dp {
    width: 95%;
    border-radius: 25px;
    border: 4px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 15px 60px rgba(255, 105, 180, 0.4),
                0 0 120px rgba(255, 192, 203, 0.3);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  .featured-photo .girl-dp:active {
    transform: scale(0.98);
  }

  /* Enhanced modal for mobile */
  .photo-modal.active {
    padding: 20px;
    box-sizing: border-box;
  }

  .modal-content {
    max-width: 95%;
    max-height: 85%;
    border-radius: 20px;
    transition: transform 0.2s ease;
  }

  .modal-content:active {
    transform: scale(0.98);
  }

  .modal-close {
    top: 20px;
    right: 20px;
    font-size: 2.5rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  }

  .modal-close:active {
    transform: scale(0.9);
    background: #ff6b9d;
    color: white;
  }

  .modal-prev,
  .modal-next {
    width: 55px;
    height: 55px;
    font-size: 2rem;
    padding: 12px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 6px 25px rgba(255, 105, 180, 0.4);
  }

  .modal-prev:active,
  .modal-next:active {
    transform: translateY(-50%) scale(0.9);
    background: #ff6b9d;
    color: white;
  }

  .modal-prev {
    left: 15px;
  }

  .modal-next {
    right: 15px;
  }

  /* Enhanced interactive elements */
  .extended-content {
    padding: 0 5px;
    background: transparent;
  }

  .story-section,
  .carousel-section,
  .video-gallery,
  .featured-photo,
  .memory-section {
    padding: 20px 5px;
    margin: 15px 0;
  }

  /* Clean up borders and outlines */
  .extended-content,
  .story-section,
  .carousel-section,
  .special-video-section,
  .memory-section,
  .timeline-item,
  .timeline-content,
  .carousel-container,
  .memory-grid {
    border: none !important;
    border-top: none !important;
    border-bottom: none !important;
    outline: none !important;
  }
  
  /* Ensure all major sections in extended content flow properly */
  .extended-content > * {
    position: relative !important;
    width: 100% !important;
    max-width: 100vw !important;
    display: block !important;
    clear: both !important;
  }

  /* Remove problematic pseudo-elements */
  .time-unit::before,
  .wish-hbd::after,
  .timeline-item::before,
  .timeline-item::after {
    display: none !important;
  }

  /* Keep interactive elements */
  .timeline-content::before,
  .memory-item::after {
    display: block !important;
  }

  /* Mobile swipe indicators */
  .swipe-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
  }

  .swipe-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
  }

  .swipe-dot.active {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.2);
  }

  /* Mobile performance optimizations */
  .media-container {
    gap: 15px;
    margin-bottom: 15px;
  }

  .six img,
  .wedding-video {
    max-width: 90%;
    width: 90%;
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(255, 105, 180, 0.35),
                0 0 60px rgba(255, 192, 203, 0.25);
  }

  .six img:active,
  .wedding-video:active {
    transform: scale(0.98) rotate(1deg);
  }

  /* Enhanced loading screen for mobile */
  .loading-hearts .heart {
    font-size: 2.5rem;
  }

  .loading-text {
    font-size: 1.3rem;
  }

  /* Mobile-only haptic feedback class */
  .haptic-feedback {
    position: relative;
    overflow: hidden;
  }

  .haptic-feedback::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    animation: hapticRipple 0.6s ease-out;
  }

  @keyframes hapticRipple {
    0% {
      transform: translate(-50%, -50%) scale(0);
      opacity: 1;
    }
    100% {
      transform: translate(-50%, -50%) scale(4);
      opacity: 0;
    }
  }
}

/* Small mobile devices (iPhone SE, etc.) */
@media screen and (max-width: 375px) {
  .story-title,
  .carousel-title,
  .video-title,
  .memory-title {
    font-size: 1.8rem;
    margin-bottom: 25px;
  }

  .timeline-image-wrapper {
    width: 100px;
    height: 100px;
  }

  .timeline-title {
    font-size: 1.2rem;
  }

  .timeline-caption {
    font-size: 0.9rem;
  }

  .carousel-container {
    height: 250px;
  }

  .carousel-btn {
    width: 40px;
    height: 40px;
    font-size: 1.3rem;
    padding: 8px;
  }

  .memory-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .countdown-timer {
    gap: 6px;
  }

  .time-unit {
    padding: 10px 6px;
    min-width: 55px;
  }

  .time-value {
    font-size: 1.6rem;
  }

  .time-label {
    font-size: 0.65rem;
  }
}

/* Large mobile and small tablets */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .timeline-image-wrapper {
    width: 200px;
    height: 200px;
  }

  .memory-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .carousel-container {
    height: 400px;
  }

  .video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================
   MOBILE PERFORMANCE & ACCESSIBILITY
   ============================================ */

/* Reduce motion for users who prefer it AND MOBILE PERFORMANCE */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .mobile-hearts-container,
  .touch-heart {
    display: none !important;
  }
}

/* MOBILE PERFORMANCE BOOST - Reduce animations on small screens */
@media screen and (max-width: 768px) {
  /* Disable resource-intensive animations on mobile */
  .baloons img,
  .light-flares,
  .mobile-hearts-container {
    animation-duration: 0.01ms !important;
    transition-duration: 0.1s !important;
  }

  /* Reduce backdrop-filter usage on mobile */
  .timeline-content::before,
  .memory-item::after,
  .featured-photo,
  .time-unit {
    backdrop-filter: none !important;
    background: rgba(255, 255, 255, 0.9) !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .timeline-image-wrapper,
  .memory-item,
  .video-card {
    border: 3px solid #000 !important;
  }

  .time-unit {
    border: 2px solid #000 !important;
    background: #fff !important;
    color: #000 !important;
  }

  .time-value {
    color: #000 !important;
  }
}

/* Mobile-specific performance optimizations - STREAMLINED */
.mobile-optimized {
  /* Optimize images for mobile */
  img {
    max-width: 100%;
    height: auto;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }

  /* Smooth scrolling for mobile - REDUCED FOR PERFORMANCE */
  html {
    scroll-behavior: auto; /* Disable smooth scrolling for better performance */
    -webkit-overflow-scrolling: touch;
  }

  /* Prevent horizontal scrolling on mobile */
  body {
    overflow-x: hidden;
    width: 100vw;
    max-width: 100vw;
  }

  /* Fix container overflow */
  .container {
    overflow-x: hidden;
    overflow-y: visible;
  }
}

  /* Better touch targets */
  button,
  .carousel-btn,
  .video-play-btn,
  .time-unit {
    min-height: 44px;
    min-width: 44px;
  }

  /* Mobile text selection improvements */
  p, h1, h2, h3, h4, h5, h6 {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
  }

  /* Prevent zoom on input focus */
  input, textarea, select {
    font-size: 16px;
  }
}

/* Mobile landscape optimizations */
@media screen and (max-width: 768px) and (orientation: landscape) {
  .timeline-image-wrapper {
    width: 100px;
    height: 100px;
  }

  .carousel-container {
    height: 200px;
  }

  .video-card {
    max-height: 200px;
  }

  .countdown-timer {
    gap: 5px;
  }

  .time-unit {
    padding: 8px 6px;
    min-width: 50px;
  }

  .time-value {
    font-size: 1.4rem;
  }

  .time-label {
    font-size: 0.6rem;
  }
}

/* Dark mode support for mobile */
@media (prefers-color-scheme: dark) {
  .mobile-optimized {
    .timeline-caption {
      color: #ccc;
    }

    .carousel-caption {
      background: rgba(0, 0, 0, 0.8);
      color: #fff;
    }

    .modal-close {
      background: rgba(0, 0, 0, 0.8);
      color: #fff;
    }
  }
}

/* Final Mobile Performance Boost - CRITICAL OPTIMIZATIONS */
@media screen and (max-width: 768px) {
  /* Force hardware acceleration for smooth scrolling */
  body {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }

  /* Optimize images for mobile performance */
  img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    max-width: 100%;
    height: auto;
  }

  /* Disable resource-intensive animations completely */
  .fun-video-bg,
  .baloons img,
  .light-flares,
  .mobile-hearts-container,
  .sparkle {
    animation: none !important;
    transition: none !important;
  }

  /* Simplified transitions for mobile */
  .timeline-image-wrapper,
  .memory-item,
  .carousel-btn,
  .special-video-play-btn {
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  /* Remove backdrop filters completely on mobile */
  * {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* Optimize scrolling performance */
  html, body {
    scroll-behavior: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Reduce visual effects for performance */
  .time-unit,
  .featured-photo,
  .timeline-content {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  }
}

/* Mobile print styles */
@media print and (max-width: 768px) {
  .mobile-hearts-container,
  .light-flares,
  .baloons,
  .video-overlay,
  .video-play-btn {
    display: none !important;
  }

  .timeline-image-wrapper,
  .memory-item img,
  .featured-photo img {
    filter: grayscale(100%) !important;
    box-shadow: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }
}
