* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, sans-serif;
  background: #ffffff;
  color: white;
  overflow-x: hidden;
}

/* PASSWORD SCREEN */

#lock-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.lock-bg {
  position: absolute;
  inset: 0;
  background: url("her.jpg") center/cover no-repeat;
  filter: blur(6px) brightness(45%);
  transform: scale(1.05);
}

.lock-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 380px;
  padding: 32px 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
  text-align: center;
  animation: fadeUp 1s ease;
}

.lock-card h1 {
  font-size: 2rem;
  margin-bottom: 16px;
}

.lock-card p {
  margin-bottom: 8px;
  opacity: 0.9;
}

.lock-card input {
  width: 100%;
  padding: 14px;
  margin-top: 22px;
  border: none;
  border-radius: 999px;
  text-align: center;
  font-size: 1rem;
}

.lock-card button,
.buttons button {
  width: 100%;
  padding: 14px;
  margin-top: 14px;
  border: none;
  border-radius: 999px;
  background: #ff4f8b;
  color: white;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
}

#errorText {
  display: block;
  margin-top: 14px;
  color: #ffd1dc;
}

/* MAIN SECTIONS */

.hidden {
  display: none;
}

.page {
  min-height: 100vh;
  scroll-snap-align: start;
  display: grid;
  place-items: center;
  padding: 32px 22px;
  position: relative;
  text-align: center;
  background: radial-gradient(circle at top, #ff86d1, #bd5b97 70%);
}

.video-section {
    position: relative;
    overflow: hidden;
    padding: 0;
}

.video-section video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.content {
  width: min(88%, 340px);
    margin: 0 auto;
  animation: fadeUp 1s ease both;
}

.page h1 {
  font-size: 2.7rem;
  margin-bottom: 18px;
}

.page h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}

.page h3 {
  margin-top: 28px;
  font-size: 1.4rem;
}

.page p {
  font-size: 1.12rem;
  line-height: 1.7;
  margin-bottom: 12px;
  opacity: 0.92;
}

/* HERO */

.hero {
  padding: 0;
  overflow: hidden;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.25), rgba(0,0,0,.85));
}

.hero .content {
  position: relative;
  z-index: 2;
  padding: 24px;
}

.hero span {
  display: block;
  margin-top: 40px;
  font-size: 2rem;
  animation: bounce 1.5s infinite;
}

/* QUESTIONS */

.questions p {
  opacity: 0;
  animation: reveal 0.8s ease forwards;
}

.questions p:nth-child(2) { animation-delay: .4s; }
.questions p:nth-child(3) { animation-delay: .9s; }
.questions p:nth-child(4) { animation-delay: 1.4s; }
.questions p:nth-child(5) { animation-delay: 1.9s; }
.questions h3 { animation: fadeUp 1s ease 2.4s both; }
.questions p:last-child { animation-delay: 2.8s; }

/* PHOTOS */

.photos .content {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.polaroid {
  background: white;
  color: #222;
  padding: 12px 12px 20px;
  border-radius: 8px;
  transform: rotate(-2deg);
}

.polaroid:nth-child(3) {
  transform: rotate(2deg);
}

.polaroid img {
  width: 100%;
  border-radius: 4px;
  display: block;
}

.polaroid p {
  color: #222;
  margin-top: 10px;
  margin-bottom: 0;
}

/* LIST */

ul {
  list-style: none;
}

li {
  font-size: 1.15rem;
  margin-bottom: 14px;
}

li::before {
  content: "❤️ ";
}

/* LETTER */

.paper {
  background: #fff7ec;
  color: #331b12;
  padding: 30px 24px;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

.paper p {
  color: #331b12;
}

/* FINAL */

.final {
  background: linear-gradient(160deg, #1b0711, #ff4f8b);
}

.buttons {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

#yesMessage {
  margin-top: 24px;
  font-size: 1.3rem;
  font-weight: bold;
}

/* ANIMATIONS */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(12px);
  }
}
#wordSearch {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 3px;
  width: min(92vw, 330px);
  margin: 20px auto;
}

.cell {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(255,255,255,.16);
  font-size: 0.75rem;
  font-weight: bold;
  user-select: none;
  cursor: pointer;
}

.cell.selected {
  background: white;
  color: #ff4f8b;
}

.cell.correct {
  background: #ffd1dc;
  color: #5c102b;
}

#foundMessage {
  min-height: 44px;
  margin-top: 18px;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.6;
}

#foundMessage span:not(:empty)::after {
  content: " ";
}

.memories {
    position: relative;
    overflow: hidden;
    min-height: 170vh;
    padding: 0;
}

.background {
    position: absolute;
    inset: 0;
    background: url("PICBGROUND.png") center/cover no-repeat;
    filter: brightness(.75);
}

/* Shared */

.memory {
     position: absolute;
    width: 55%;
    max-width: 240px; /* prevents them from getting too large */
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,.25);
    opacity: 0;
}

/* First */

.memory1{
    top:12%;
    right:8%;
    transform:translateX(120%) rotate(8deg);
    animation:slideRight .9s ease forwards;
    animation-delay:.5s;
}

/* Second */

.memory2{
    top:32%;
    left:6%;
    transform:translateX(-120%) rotate(-8deg);
    animation:slideLeft .9s ease forwards;
    animation-delay:2s;
    z-index:2;
}

/* Third */

.memory3{
    bottom:8%;
    right:5%;
    transform:translateX(120%) rotate(6deg);
    animation:slideRight .9s ease forwards;
    animation-delay:3.5s;
    z-index:3;
}

@keyframes slideRight{

    from{
        opacity:0;
        transform:translateX(120%) rotate(10deg);
    }

    to{
        opacity:1;
        transform:translateX(0) rotate(10deg);
    }

}

@keyframes slideLeft{

    from{
        opacity:0;
        transform:translateX(-120%) rotate(-10deg);
    }

    to{
        opacity:1;
        transform:translateX(0) rotate(-10deg);
    }

}

.video-section {
    width: 100%;
    min-height: 120vh;
    overflow: hidden;
    padding: 0;
}

.video-section video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.intro-text p {
  opacity: 0;
  transform: translateY(16px);
  animation: introFade 0.8s ease forwards;
}

.intro-text p:nth-child(1) {
  animation-delay: 0.3s;
}

.intro-text p:nth-child(2) {
  animation-delay: 1.1s;
}

.intro-text p:nth-child(3) {
  animation-delay: 2s;
}

.intro-text p:nth-child(4) {
  animation-delay: 2.8s;
}

.intro-text p:nth-child(5) {
  animation-delay: 3.5s;
}

.intro-text p:nth-child(6) {
  animation-delay: 4.3s;
}

.intro-text span {
  opacity: 0;
  animation: introFade 0.8s ease forwards, bounce 1.5s infinite;
  animation-delay: 5.2s, 6s;
}

@keyframes introFade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.introduction{
    position:relative;
    min-height:100vh;
    overflow:hidden;

    background:linear-gradient(
        180deg,
        #ffffff,
        #f8f8f8,
        #ececec
    );
}

.intro-content{
    position:relative;
    z-index:5;
    max-width:340px;
    margin:auto;
    text-align:center;
}

.intro-content h1{

    font-family:Georgia, serif;
    font-size:2.3rem;
    font-weight:500;
    line-height:1.2;
    color:#1f1f1f;

}

.intro-content p{

    font-family:Georgia, serif;
    color:#555;
    font-size:1.15rem;
    line-height:1.8;

}
.line{

    opacity:0;
    transform:translateY(25px);
    animation:fadeText .8s ease forwards;

}

.line1{ animation-delay:.5s; }

.line2{ animation-delay:1.5s; }

.line3{ animation-delay:2.5s; }

.line4{ animation-delay:3.8s; }
.intro-photo{

    position:absolute;
    width:170px;
    border-radius:18px;

    box-shadow:0 20px 60px rgba(0,0,0,.12);

    opacity:0;

}

.photo1{

    right:-220px;
    top:18%;

    transform:rotate(8deg);

    animation:
        photoRight 1s ease forwards;

    animation-delay:2s;

}

.photo2{

    left:-220px;
    bottom:12%;

    transform:rotate(-8deg);

    animation:
        photoLeft 1s ease forwards;

    animation-delay:3.3s;

}
@keyframes fadeText{

    to{

        opacity:1;
        transform:translateY(0);

    }

}

@keyframes photoRight{

    to{

        opacity:1;
        right:25px;

    }

}

@keyframes photoLeft{

    to{

        opacity:1;
        left:25px;

    }

}
.image-story-section {
  min-height: 100vh;
  padding: 60px 20px;
  background: url("background_img.jpg") center/cover fixed no-repeat;
}

.image-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
  width: min(90%, 360px);
  margin: 0 auto;
}

.story-img {
  width: 100%;
  border-radius: 22px;
  box-shadow: 0 18px 45px rgba(0,0,0,.18);
  display: block;
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.8s ease forwards;
}
.password-hint {
  margin-top: 10px;
  font-size: 0.85rem;
  color: #777;
  font-style: italic;
}