* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #eaf4ff;
    color: #243b53;
}

/* =========================
   LOCK SCREEN
========================= */

.lock-screen {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background:
        radial-gradient(circle at top left, #ffffff, transparent 40%),
        radial-gradient(circle at bottom right, #b9dcff, transparent 40%),
        #eaf4ff;
}

.lock-box {
    width: 100%;
    max-width: 380px;
    text-align: center;
    padding: 35px 25px;
}

.heart {
    font-size: 55px;
    margin-bottom: 15px;
    color: #3978b8;
}

.lock-box h1 {
    font-family: Georgia, serif;
    font-size: 42px;
    font-weight: normal;
    margin-bottom: 10px;
}

.lock-box p {
    color: #3978b8;
    font-size: 14px;
    line-height: 1.6;
}

/* PIN */

.pin-display {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
}

.pin-display span {
    font-size: 25px;
    color: #3978b8;
}

/* KEYPAD */

.keypad {
    display: grid;
    grid-template-columns: repeat(3, 70px);
    justify-content: center;
    gap: 12px;
}

.keypad button {
    width: 70px;
    height: 60px;
    border: none;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.7);
    color: #4b3b35;
    font-size: 20px;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 4px 15px rgba(80, 50, 40, 0.08);
}

.keypad button:hover {
    transform: translateY(-3px);
    background: #fff;
}

.keypad button:active {
    transform: scale(0.92);
}

.keypad .empty {
    visibility: hidden;
}

.hint {
    margin-top: 25px;
    font-size: 12px !important;
    opacity: 0.7;
}

/* =========================
   MAIN PAGE
========================= */

.main-page {
    display: none;
    min-height: 100vh;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    background: #f8f1e8;
}

.main-page h1 {
    font-family: Georgia, serif;
    font-size: 45px;
    margin-bottom: 15px;
}

.main-page p {
    color: #806f68;
}

/* =========================
   LEVEL 2 - OPENING
========================= */

.main-page {
    position: relative;
    overflow: hidden;
    min-height: 100vh;

    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;

    text-align: center;

    background:
        radial-gradient(circle at 50% 30%, #ffffff, transparent 35%),
        linear-gradient(135deg, #eaf4ff, #c9e5ff);

    animation: pageFade 1.5s ease;
}

.opening-content {
    position: relative;
    z-index: 2;
    max-width: 650px;
    padding: 30px;
}

.small-title {
    font-size: 12px;
    letter-spacing: 4px;
    color: #3978b8;
    margin-bottom: 20px;
}

.opening-content h1 {
    font-family: Georgia, serif;
    font-size: clamp(50px, 8vw, 90px);
    font-weight: normal;
    color: #243b53;
    margin-bottom: 5px;

    animation: titleUp 1.2s ease;
}

.opening-content h2 {
    font-family: Georgia, serif;
    font-size: 38px;
    font-weight: normal;
    color: #3978b8;
    margin-bottom: 25px;

    animation: titleUp 1.5s ease;
}

.opening-text {
    white-space: pre-line;
    color: #627d98;
    line-height: 1.8;
    font-size: 15px;

    animation: titleUp 1.8s ease;
}

/* BUTTON */

.opening-content button {
    margin-top: 35px;

    padding: 14px 28px;

    border: 1px solid #3978b8;
    border-radius: 30px;

    background: rgba(255, 255, 255, 0.5);
    color: #3978b8;

    font-size: 14px;
    cursor: pointer;

    transition: 0.3s;

    animation: titleUp 2s ease;
}

.opening-content button:hover {
    background: #3978b8;
    color: white;
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(57, 120, 184, 0.2);
}

/* STARS */

.stars span {
    position: absolute;
    color: #3978b8;
    font-size: 25px;
    opacity: 0.5;
    animation: floating 4s ease-in-out infinite;
}

.stars span:nth-child(1) {
    top: 15%;
    left: 15%;
}

.stars span:nth-child(2) {
    top: 25%;
    right: 18%;
    animation-delay: 1s;
}

.stars span:nth-child(3) {
    bottom: 20%;
    left: 20%;
    animation-delay: 2s;
}

.stars span:nth-child(4) {
    bottom: 15%;
    right: 15%;
    animation-delay: 1.5s;
}

.stars span:nth-child(5) {
    top: 12%;
    left: 50%;
    animation-delay: 0.5s;
}

/* ANIMATION */

@keyframes pageFade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes titleUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floating {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* =========================
   LEVEL 3 - LETTER
========================= */

.letter-page {
    display: none;
    min-height: 100vh;
    padding: 80px 20px;

    justify-content: center;
    align-items: center;

    background:
        radial-gradient(circle at top right, #ffffff, transparent 35%),
        linear-gradient(135deg, #eaf4ff, #c9e5ff);
}

.letter-container {
    width: 100%;
    max-width: 700px;

    padding: 55px 50px;

    background: rgba(255, 255, 255, 0.75);

    border-radius: 8px;

    box-shadow:
        0 20px 60px rgba(50, 90, 130, 0.12);

    animation: letterAppear 1s ease;
}

.letter-label {
    text-align: center;

    font-size: 11px;
    letter-spacing: 4px;

    color: #3978b8;

    margin-bottom: 20px;
}

.letter-container h1 {
    text-align: center;

    font-family: Georgia, serif;
    font-size: 45px;
    font-weight: normal;

    color: #243b53;

    margin-bottom: 20px;
}

.letter-line {
    width: 60px;
    height: 1px;

    background: #3978b8;

    margin: 0 auto 35px;
}

.letter-text {
    color: #526b82;

    font-size: 15px;
    line-height: 2;

    text-align: left;
}

.letter-text p {
    margin-bottom: 20px;
}

.letter-sign {
    margin-top: 35px;

    text-align: right;

    color: #627d98;

    line-height: 1.8;
}

.letter-sign strong {
    color: #3978b8;

    font-family: Georgia, serif;
    font-size: 20px;
}

.letter-container button {
    display: block;

    margin: 35px auto 0;

    padding: 13px 28px;

    border: 1px solid #3978b8;
    border-radius: 30px;

    background: transparent;

    color: #3978b8;

    cursor: pointer;

    transition: 0.3s;
}

.letter-container button:hover {
    background: #3978b8;
    color: white;

    transform: translateY(-3px);
}

@keyframes letterAppear {

    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}

/* =========================
   LEVEL 4 - MEMORIES
========================= */

.memories-page {
    display: none;
    min-height: 100vh;
    padding: 80px 25px;

    background:
        radial-gradient(circle at top left, #ffffff, transparent 35%),
        linear-gradient(135deg, #eaf4ff, #c9e5ff);
}

.memories-container {
    width: 100%;
    max-width: 1000px;
    margin: auto;
    text-align: center;

    animation: letterAppear 1s ease;
}

.memories-label {
    color: #3978b8;
    font-size: 11px;
    letter-spacing: 4px;
    margin-bottom: 15px;
}

.memories-container h1 {
    font-family: Georgia, serif;
    font-size: 50px;
    font-weight: normal;
    color: #243b53;
}

.memories-subtitle {
    margin-top: 10px;
    color: #627d98;
}

/* FOTO */

.photo-grid {
    margin-top: 45px;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.photo-card {
    background: rgba(255, 255, 255, 0.75);
    border-radius: 15px;
    overflow: hidden;

    box-shadow: 0 15px 40px rgba(50, 90, 130, 0.12);

    transition: 0.4s;

    text-align: left;
}

.photo-card:hover {
    transform: translateY(-10px) rotate(1deg);
    box-shadow: 0 20px 50px rgba(50, 90, 130, 0.2);
}

.photo-card img {
    width: 100%;
    height: 300px;

    display: block;

    object-fit: cover;
}

.photo-info {
    padding: 20px;
}

.photo-info h3 {
    font-family: Georgia, serif;
    font-size: 21px;
    font-weight: normal;
    color: #243b53;

    margin-bottom: 8px;
}

.photo-info p {
    color: #627d98;
    font-size: 13px;
    line-height: 1.5;
}

/* BUTTON */

.memory-button {
    margin-top: 45px;

    padding: 13px 30px;

    border: 1px solid #3978b8;
    border-radius: 30px;

    background: transparent;
    color: #3978b8;

    cursor: pointer;
    transition: 0.3s;
}

.memory-button:hover {
    background: #3978b8;
    color: white;
    transform: translateY(-3px);
}

/* HP */

@media (max-width: 700px) {

    .photo-grid {
        grid-template-columns: 1fr;
    }

    .memories-container h1 {
        font-size: 40px;
    }

}

/* =========================
   LEVEL 5 - TIMELINE
========================= */

.timeline-page {
    display: none;
    min-height: 100vh;
    padding: 90px 25px;

    background:
        radial-gradient(circle at top right, #ffffff, transparent 35%),
        linear-gradient(135deg, #eaf4ff, #c9e5ff);
}

.timeline-container {
    width: 100%;
    max-width: 800px;
    margin: auto;
    text-align: center;
}

.timeline-label {
    color: #3978b8;
    font-size: 11px;
    letter-spacing: 4px;
    margin-bottom: 15px;
}

.timeline-container > h1 {
    font-family: Georgia, serif;
    font-size: 50px;
    font-weight: normal;
    color: #243b53;
}

.timeline-subtitle {
    margin-top: 10px;
    color: #627d98;
}

/* TIMELINE */

.timeline {
    position: relative;
    margin: 60px auto;
    text-align: left;
}

.timeline::before {
    content: "";
    position: absolute;

    left: 25px;
    top: 0;
    bottom: 0;

    width: 1px;
    background: #8bb9df;
}

.timeline-item {
    position: relative;
    display: flex;
    gap: 25px;
    margin-bottom: 45px;
}

.timeline-dot {
    position: relative;
    z-index: 2;

    width: 51px;
    height: 51px;

    flex-shrink: 0;

    display: flex;
    justify-content: center;
    align-items: center;

    border-radius: 50%;

    background: #eaf4ff;
    border: 1px solid #3978b8;

    color: #3978b8;
}

.timeline-card {
    flex: 1;

    padding: 25px;

    background: rgba(255, 255, 255, 0.75);

    border-radius: 15px;

    box-shadow: 0 10px 35px rgba(50, 90, 130, 0.1);

    transition: 0.3s;
}

.timeline-card:hover {
    transform: translateX(8px);
}

.timeline-card span {
    color: #3978b8;
    font-size: 12px;
    letter-spacing: 2px;
}

.timeline-card h2 {
    font-family: Georgia, serif;
    font-weight: normal;
    color: #243b53;
    margin: 8px 0;
}

.timeline-card p {
    color: #627d98;
    line-height: 1.7;
    font-size: 14px;
}

/* BUTTON */

.timeline-button {
    padding: 13px 30px;

    border: 1px solid #3978b8;
    border-radius: 30px;

    background: transparent;
    color: #3978b8;

    cursor: pointer;
    transition: 0.3s;
}

.timeline-button:hover {
    background: #3978b8;
    color: white;
    transform: translateY(-3px);
}

/* =========================
   LEVEL 6 - FINAL
========================= */

.final-page {
    display: none;

    min-height: 100vh;
    padding: 30px;

    justify-content: center;
    align-items: center;

    text-align: center;

    background:
        radial-gradient(circle at center, #ffffff, transparent 40%),
        linear-gradient(135deg, #eaf4ff, #c9e5ff);

    overflow: hidden;
}

.final-content {
    max-width: 650px;

    animation: finalAppear 1.5s ease;
}

.final-heart {
    font-size: 65px;
    color: #3978b8;

    animation: heartFloat 3s ease-in-out infinite;
}

.final-label {
    margin-top: 20px;

    color: #3978b8;

    font-size: 11px;
    letter-spacing: 4px;
}

.final-content h1 {
    margin-top: 15px;

    font-family: Georgia, serif;

    font-size: clamp(55px, 8vw, 85px);

    font-weight: normal;

    color: #243b53;
}

.final-message {
    margin-top: 25px;

    white-space: pre-line;

    color: #627d98;

    font-size: 15px;

    line-height: 2;
}

.final-line {
    width: 60px;
    height: 1px;

    margin: 35px auto;

    background: #3978b8;
}

.final-sign {
    color: #627d98;

    line-height: 1.8;
}

.final-sign strong {
    color: #3978b8;

    font-family: Georgia, serif;

    font-size: 21px;
}

/* REPLAY */

.replay-button {
    margin-top: 35px;

    padding: 13px 30px;

    border: 1px solid #3978b8;
    border-radius: 30px;

    background: transparent;

    color: #3978b8;

    cursor: pointer;

    transition: 0.3s;
}

.replay-button:hover {
    background: #3978b8;

    color: white;

    transform: translateY(-3px);
}

/* ANIMATION */

@keyframes finalAppear {

    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}

@keyframes heartFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }

}

/* =========================
   LEVEL 7 - MUSIC
========================= */

.music-button {
    position: fixed;

    right: 25px;
    bottom: 25px;

    width: 50px;
    height: 50px;

    border: 1px solid #3978b8;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.8);

    color: #3978b8;

    font-size: 20px;

    cursor: pointer;

    z-index: 9999;

    box-shadow: 0 8px 25px rgba(50, 90, 130, 0.15);

    transition: 0.3s;
}

.music-button:hover {
    transform: scale(1.1);
    background: #3978b8;
    color: white;
}

.photo-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(20, 50, 80, 0.85);
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.photo-modal img {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 18px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    animation: photoZoom 0.3s ease;
}

@keyframes photoZoom {
    from {
        transform: scale(0.7);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.stars {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.stars span {
    position: absolute;
    font-size: 20px;
    opacity: 0.6;
    animation: twinkle 3s infinite ease-in-out;
}

.stars span:nth-child(1) {
    top: 15%;
    left: 15%;
}

.stars span:nth-child(2) {
    top: 25%;
    right: 20%;
    animation-delay: 0.5s;
}

.stars span:nth-child(3) {
    top: 45%;
    left: 10%;
    animation-delay: 1s;
}

.stars span:nth-child(4) {
    top: 60%;
    right: 12%;
    animation-delay: 1.5s;
}

.stars span:nth-child(5) {
    top: 75%;
    left: 25%;
    animation-delay: 2s;
}

.stars span:nth-child(6) {
    top: 20%;
    right: 40%;
    animation-delay: 0.8s;
}

.stars span:nth-child(7) {
    top: 80%;
    right: 30%;
    animation-delay: 1.8s;
}

.stars span:nth-child(8) {
    top: 35%;
    left: 40%;
    animation-delay: 2.3s;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.2;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.3);
    }
}

#typingTitle::after {
    content: "|";
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }

    51%, 100% {
        opacity: 0;
    }
}

.page-transition {
    animation: pageFade 0.8s ease;
}

@keyframes pageFade {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.continue-button {
    position: relative;
    margin-top: 50px;
    padding: 13px 28px;
    border: 1px solid #3978b8;
    border-radius: 30px;
    background: white;
    color: #3978b8;
    font-size: 15px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
}

.continue-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(57, 120, 184, 0.25);
    background: #3978b8;
    color: white;
}

.continue-button:active {
    transform: scale(0.95);
}

.floating-hearts {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.floating-hearts span {
    position: absolute;
    bottom: -30px;
    font-size: 22px;
    opacity: 0;
    animation: floatHeart 8s linear infinite;
}

.floating-hearts span:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
}

.floating-hearts span:nth-child(2) {
    left: 25%;
    animation-delay: 2s;
}

.floating-hearts span:nth-child(3) {
    left: 40%;
    animation-delay: 4s;
}

.floating-hearts span:nth-child(4) {
    left: 55%;
    animation-delay: 1s;
}

.floating-hearts span:nth-child(5) {
    left: 70%;
    animation-delay: 3s;
}

.floating-hearts span:nth-child(6) {
    left: 82%;
    animation-delay: 5s;
}

.floating-hearts span:nth-child(7) {
    left: 35%;
    animation-delay: 6s;
}

.floating-hearts span:nth-child(8) {
    left: 90%;
    animation-delay: 7s;
}

@keyframes floatHeart {
    0% {
        transform: translateY(0) scale(0.7);
        opacity: 0;
    }

    15% {
        opacity: 0.5;
    }

    80% {
        opacity: 0.5;
    }

    100% {
        transform: translateY(-110vh) scale(1.2);
        opacity: 0;
    }
}

.scroll-reveal {
    opacity: 1;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-reveal.show {
    opacity: 1;
    transform: translateY(0);
}

.little-moments-button {
    margin-top: 50px;
}