/* Scroll Snapping Styles */
html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
    height: 100%;
  }
  
  body {
    margin: 0;
    padding: 0;
    background: #60031E;
    font-family: 'Schoolbell', cursive;
    color: white;
    min-height: 100vh;
    /* Allow vertical scrolling, but hide scrollbar initially */
    overflow-y: hidden;
    overflow-x: hidden;
  }
  
  /* Noise overlay */
  body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    z-index: 1;
    pointer-events: none;
  }
  
  .container {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    height: 100vh;
    scroll-snap-align: start;
  }
  
  /* Updated content container to be fullscreen */
  .content-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 1);
    display: none;
    margin: 0;
    padding: 0;
    text-align: center;
    opacity: 0;
    transition: opacity 1s ease;
    z-index: 50;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
  }
  
  .content-container.visible {
    display: block;
    opacity: 1;
  }
  
  .section-title {
    font-size: 2.5rem;
    margin: 30px 0;
    text-align: center;
  }
  
  .memory-section {
    height: 100vh;
    width: 100%;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  
  .memory-section h3 {
    margin-top: 0;
    color: white;
    font-size: 2rem;
  }
  
  .memory-section p {
    font-size: 1.2rem;
    max-width: 600px;
    line-height: 1.6;
    padding: 0 20px;
  }
  
  /* Navigation dots for sections */
  .section-nav {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 15px;
  }
  
  .nav-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
  }
  
  .nav-dot.active {
    background-color: white;
    transform: scale(1.3);
  }
  
  .hearts-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 15;
    pointer-events: none;
    perspective: 1000px; /* Enable 3D space */
  }
  
  .heart {
    position: absolute;
    opacity: 0.7;
    animation: float-and-sway linear infinite;
  }
  
  .shape {
    position: absolute;
    opacity: 0.7;
  }
  
  .rectangle {
    border-radius: 2px;
    animation: float-and-flip linear infinite;
    transform-style: preserve-3d;
    backface-visibility: visible;
  }
  
  .triangle {
    width: 0;
    height: 0;
    border-style: solid;
    animation: float-and-turn linear infinite;
    transform-style: preserve-3d;
    backface-visibility: visible;
  }
  
  @keyframes float-and-sway {
    0% {
      transform: translateY(0) rotate(0deg) translateX(0);
      opacity: 0;
    }
    10% {
      opacity: 0.7;
    }
    50% {
      transform: translateY(50vh) rotate(180deg) translateX(20px);
    }
    90% {
      opacity: 0.7;
    }
    100% {
      transform: translateY(100vh) rotate(360deg) translateX(-20px);
      opacity: 0;
    }
  }
  
  @keyframes float-and-flip {
    0% {
      transform: translateY(0) rotateX(0deg) rotateY(0deg) translateX(0);
      opacity: 0;
    }
    10% {
      opacity: 0.7;
    }
    25% {
      transform: translateY(25vh) rotateX(90deg) rotateY(45deg) translateX(10px);
    }
    50% {
      transform: translateY(50vh) rotateX(180deg) rotateY(90deg) translateX(20px);
    }
    75% {
      transform: translateY(75vh) rotateX(270deg) rotateY(135deg) translateX(10px);
    }
    90% {
      opacity: 0.7;
    }
    100% {
      transform: translateY(100vh) rotateX(360deg) rotateY(180deg) translateX(-20px);
      opacity: 0;
    }
  }
  
  @keyframes float-and-turn {
    0% {
      transform: translateY(0) rotateZ(0deg) rotateX(0deg) translateX(0);
      opacity: 0;
    }
    10% {
      opacity: 0.7;
    }
    25% {
      transform: translateY(25vh) rotateZ(90deg) rotateX(45deg) translateX(10px);
    }
    50% {
      transform: translateY(50vh) rotateZ(180deg) rotateX(90deg) translateX(20px);
    }
    75% {
      transform: translateY(75vh) rotateZ(270deg) rotateX(135deg) translateX(10px);
    }
    90% {
      opacity: 0.7;
    }
    100% {
      transform: translateY(100vh) rotateZ(360deg) rotateX(180deg) translateX(-20px);
      opacity: 0;
    }
  }
  
  @keyframes waddle {
    0% {
      transform: rotate(-2deg);
    }
    50% {
      transform: rotate(2deg);
    }
    100% {
      transform: rotate(-2deg);
    }
  }
  
  /* Pop-up animation for the envelope */
  @keyframes pop-up {
    0% {
      transform: scale(0.2) translateY(50px);
      opacity: 0;
    }
    70% {
      transform: scale(1.1) translateY(-10px);
    }
    100% {
      transform: scale(1) translateY(0);
      opacity: 1;
    }
  }
  
  /* Pop-up animation for the image */
  @keyframes image-pop-up {
    0% {
      transform: scale(0) translateY(100px);
      opacity: 0;
    }
    60% {
      transform: scale(1.1) translateY(-10px);
    }
    80% {
      transform: scale(0.95) translateY(5px);
    }
    100% {
      transform: scale(1) translateY(0);
      opacity: 1;
    }
  }
  
  .envelope {
    position: relative;
    width: 100px;
    height: 100px;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 1;
    animation: waddle 1s ease-in-out infinite;
  }
  
  .envelope img {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    object-fit: contain;
  }
  
  .envelope-closed {
    opacity: 1;
    transition: opacity 0.3s ease;
  }
  
  .envelope-opened {
    opacity: 0;
    will-change: transform, opacity;
  }
  
  .title {
    position: absolute;
    top: -100px;
    font-size: 2.5rem;
    color: white;
    text-align: center;
    width: 100%;
    opacity: 0;
    transition: opacity 1s ease;
  }
  
  .title.visible {
    opacity: 1;
  }
  
  .p {
    font-size: 1.5rem;
    color: #FCDEDC;
    text-align: center;
    margin-bottom: 30px;
    opacity: 1;
    transition: opacity 0.5s ease;
  }
  
  #subtitle.fade-out {
    opacity: 0;
  }
  
  .canvas-confetti {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
    opacity: 1;
  }
  
  /* Popup image styles */
  .popup-image-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    z-index: 25;
    pointer-events: none;
    transition: opacity 0.5s ease;
  }
  
  .popup-image-container.hidden {
    display: none;
  }
  
  .popup-image {
    width: 100%;
    height: auto;
    opacity: 0;
    transform: scale(0) translateY(100px);
    will-change: transform, opacity;
    border-radius: 10px;
    display: block;
  }
  
  .popup-image.visible {
    animation: image-pop-up 0.8s cubic-bezier(0.17, 0.89, 0.32, 1.49) forwards;
  }
  
  .popup-image.invisible {
    display: none;
  }
  
  /* Memory image transitions */
  .memory-image {
    max-width: 300px;
    border-radius: 10px;
    transition: transform 0.3s ease;
  }
  
  /* Footer styling */
  .footer {
    padding: 20px 0;
    text-align: center;
    color: white;
    font-size: 14px;
    margin-top: 30px;
  }
  
  @keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
  }
  
  #typewriter-text {
    position: absolute;
    top: 20px;
    line-height: 1.2;
    left: 75px;
    color: gray;
    font-size: 13px;
    animation: none;
    display: none;
  }
  
  .visible-text {
    visibility: visible;
  }
  
  #typewriter-text::after {
    content: '|';
    animation: blink 1s infinite;
  }
  
  .scroll-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.2s ease;
    text-align: center;
  }
  
  .scroll-overlay.show {
    opacity: 1;
    pointer-events: auto;
  }
  
  #heart-wallpaper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
  }
  
  .heart-icon {
    position: absolute;
    width: 32px;
    height: 32px;
    background-image: url('heart.png');
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0.15;
    transform-origin: center;
  }
  
  /* Responsive styles */
  @media (max-width: 768px) {
    .title {
      font-size: 2rem;
      top: -80px;
    }
    
    .section-title {
      font-size: 2rem;
    }
    
    .memory-section h3 {
      font-size: 1.8rem;
    }
    
    .memory-section p {
      font-size: 1rem;
    }
    
    .popup-image-container {
      width: 90%;
      max-width: 350px;
    }
    
    .memory-image {
      max-width: 250px;
    }
  }
  
  @media (max-width: 480px) {
    .title {
      font-size: 1.8rem;
      top: -70px;
    }
    
    .section-title {
      font-size: 1.8rem;
    }
    
    .memory-section h3 {
      font-size: 1.5rem;
    }
    
    .nav-dot {
      width: 5px;
      height: 5px;
    }
    
    .memory-image {
      max-width: 200px;
    }
  }


.time-together {
    padding: 20px 10px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}


.time-together-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 600px;
    margin: 0 auto;
  }
  
  .digital-clock {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    font-family: 'Digital-7', monospace;
  }
  
  .time-segment {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .time-unit {
    background: linear-gradient(to bottom, black, black);
    color: white;
    font-size: 3rem;
    font-weight: bold;
    padding: 10px;
    border-radius: 10px;
    min-width: 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
  }
  
  .time-unit::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }
  
  .time-label {
    color: white;
    font-size: 0.8rem;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
  }
  
  .time-separator {
    display: flex;
    align-items: center;
    font-size: 3rem;
    color: white;
    margin-top: -20px;
    animation: pulse 1s infinite;
  }
  
  @keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
  }
  
  /* Responsive adjustments */
  @media (max-width: 768px) {
    .time-unit {
      font-size: 2rem;
      min-width: 70px;
    }
    
    .time-separator {
      font-size: 2rem;
    }
  }
  
  @media (max-width: 480px) {
    .time-unit {
      font-size: 1.5rem;
      min-width: 50px;
      padding: 8px;
    }
    
    .time-separator {
      font-size: 1.5rem;
    }
    
    .digital-clock {
      gap: 5px;
    }
  }


  .puzzle-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 10px auto;
    width: 90%;
    max-width: 500px;
  }
  
  .puzzle-board {
    position: relative;
    width: 300px;
    height: 300px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 2px;
    padding: 2px;
    background-color: red;
  }
  
  .puzzle-piece {
    position: relative;
    width: 100%;
    height: 100%;
    background-size: 300px 300px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  }
  
  .puzzle-piece:hover {
    z-index: 10;
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(255, 10, 84, 0.5);
  }
  
  .puzzle-piece.correct {
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.7);
  }
  
  .puzzle-controls {
    display: flex;
    gap: 15px;
    margin-top: 10px;
  }
  
  .puzzle-button {
    padding: 10px 20px;
    background: linear-gradient(to bottom, #ff477e, #ff0a54);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-family: 'Schoolbell', cursive;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 10, 84, 0.3);
  }
  
  .puzzle-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(255, 10, 84, 0.5);
  }
  
  .puzzle-button:active {
    transform: translateY(1px);
  }
  
  .puzzle-message {
    font-size: 1.2rem;
    color: black;
    margin-top: 15px;
    text-align: center;
    min-height: 30px;
  }
  
  .success-animation {
    animation: success-pulse 1.5s ease-in-out;
  }
  
  @keyframes success-pulse {
    0% {
      box-shadow: 0 0 10px rgba(0, 255, 0, 0.7);
    }
    50% {
      box-shadow: 0 0 30px rgba(0, 255, 0, 1);
    }
    100% {
      box-shadow: 0 0 10px rgba(0, 255, 0, 0.7);
    }
  }
  
  /* Responsive adjustments */
  @media (max-width: 480px) {
    .puzzle-board {
      width: 270px;
      height: 270px;
    }
    
    .puzzle-piece {
      background-size: 270px 270px;
    }
  }


  .puzzle {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
  }
  
  
  .polaroid-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 25px;
  }
  
  .polaroid {
    background-color: white;
    padding: 10px 10px 25px 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    width: 220px;
    display: inline-block;
    border-radius: 3px;
    transition: all 0.3s ease;
    transform: rotate(0deg);
    position: relative;
  }
  
  .polaroid:hover {
    transform: scale(1.05) rotate(0deg);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    z-index: 5;
  }
  
  .polaroid-image {
    width: 100%;
    height: 170px;
    background-color: #dcdcdc;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
  }
  
  .polaroid-caption {
    font-family: 'Schoolbell', cursive;
    font-size: 16px;
    color: #333;
    text-align: end;
    margin-top: 5px;
  }
  
  .polaroid-date {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #777;
    position: absolute;
    bottom: 15px;
    right: 15px;
  }
  
  /* Tape effect on polaroids */
  .polaroid::before {
    content: "";
    position: absolute;
    width: 30%;
    height: 15px;
    top: -7px;
    left: 35%;
    background-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transform: rotate(2deg);
  }
  
  /* Rotate some polaroids for a more natural look */
  .polaroid:nth-child(odd) {
    transform: rotate(-3deg);
  }
  
  .polaroid:nth-child(odd):hover {
    transform: scale(1.05) rotate(-3deg);
  }
  
  .polaroid:nth-child(even) {
    transform: rotate(2deg);
  }
  
  .polaroid:nth-child(even):hover {
    transform: scale(1.05) rotate(2deg);
  }
  
  .polaroid:nth-child(3n) {
    transform: rotate(-1deg);
  }
  
  .polaroid:nth-child(3n):hover {
    transform: scale(1.05) rotate(-1deg);
  }
  
  .polaroid:nth-child(5n) {
    transform: rotate(5deg);
  }
  
  .polaroid:nth-child(5n):hover {
    transform: scale(1.05) rotate(5deg);
  }
  
  /* Responsive adjustments */
  @media (max-width: 768px) {
    .polaroid {
      width: 180px;
    }
    
    .polaroid-image {
      height: 140px;
    }
  }
  
  @media (max-width: 480px) {
    .polaroid-container {
      gap: 15px;
    }
    
    .polaroid {
      width: 140px;
      padding: 10px 10px 30px 10px;
    }
    
    .polaroid-image {
      height: 110px;
    }
    
    .polaroid-caption {
      font-size: 14px;
    }
  }

  .pulse {
    font-size: 100px;
    display: inline-block;
    animation: pulse 1.5s ease infinite;
  }
  
  @keyframes pulse {
    0% {
      transform: scale(1);
    }
    50% {
      transform: scale(1.5);
    }
    100% {
      transform: scale(1);
    }
  }