@import url('https://fonts.googleapis.com/css2?family=Mitr:wght@300;400;500;600&family=Playfair+Display:wght@400;500;600&display=swap');


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {
    font-family: "Mitr", sans-serif;
    background: #fff8f4;
    color: #4e3b42;
    overflow-x: hidden;
}


button {
    font-family: "Mitr", sans-serif;
}


.scene {
    min-height: 100vh;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 30px;
}


.scene.active {
    display: flex;
}


/* LOADING */

#loadingScene {
    background:
        radial-gradient(
            circle at 20% 20%,
            #ffdbe5,
            transparent 30%
        ),
        radial-gradient(
            circle at 80% 80%,
            #ffe5d2,
            transparent 30%
        ),
        #fff8f4;
}


.loading-content {
    text-align: center;
    width: min(500px, 90%);
}


.loading-heart {
    font-size: 80px;
    color: #ff7f9d;
    animation: heartbeat 1.5s infinite;
}


.small-text {
    font-size: 11px;
    letter-spacing: 3px;
    color: #a7828b;
    margin-bottom: 15px;
}


.loading-content h1 {
    font-family: "Playfair Display", serif;
    font-size: 50px;
    color: #594148;
    margin: 15px 0 35px;
}


.loading-bar {
    width: 100%;
    height: 10px;
    background: #f2dfe4;
    border-radius: 20px;
    overflow: hidden;
}


#loadingProgress {
    width: 0%;
    height: 100%;
    background: #ff89a5;
    border-radius: 20px;
    transition: width .1s linear;
}


#loadingText {
    margin-top: 15px;
    font-size: 13px;
    color: #9b7a82;
}


/* QUESTION */

#questionScene {
    background:
        radial-gradient(
            circle at 50% 30%,
            #ffe2eb,
            transparent 45%
        ),
        #fff8f4;
}


.question-card {
    text-align: center;
    max-width: 600px;
    padding: 60px 30px;
}


.question-heart {
    font-size: 70px;
    margin-bottom: 15px;
    animation: heartbeat 1.8s infinite;
}


.question-card h1 {
    font-family: "Playfair Display", serif;
    font-size: clamp(35px, 6vw, 55px);
    line-height: 1.3;
    margin-bottom: 20px;
}


.question-card > p {
    color: #8c6d75;
}


.question-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 35px;
}


.yes-button,
.no-button {
    border: none;
    padding: 15px 28px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 15px;
    transition: .3s;
}


.yes-button {
    background: #ff86a2;
    color: white;
    box-shadow:
        0 8px 20px rgba(255,134,162,.3);
}


.yes-button:hover {
    transform: translateY(-4px) scale(1.03);
}


.no-button {
    background: white;
    color: #81656d;
    border: 1px solid #ead6dc;
}


.no-button:hover {
    transform: translateY(-3px);
}


.no-message {
    min-height: 25px;
    margin-top: 20px;
    color: #ff7191 !important;
}


/* NAVBAR */

.navbar {
    position: sticky;
    top: 0;
    z-index: 50;

    height: 65px;
    padding: 0 7%;

    display: flex;
    justify-content: space-between;
    align-items: center;

    background: rgba(255,248,244,.9);
    backdrop-filter: blur(12px);

    border-bottom: 1px solid #f0dce2;
}


.nav-logo {
    color: #ff7798;
    font-weight: 600;
    letter-spacing: 1px;
}


.nav-count {
    font-size: 12px;
    color: #94747c;
}


.nav-count span {
    color: #ff7798;
}


/* GENERAL */

.page-section {
    min-height: 100vh;

    padding: 120px 7%;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    text-align: center;
}


.chapter-label {
    color: #ff7798;
    font-size: 11px;
    letter-spacing: 3px;
    margin-bottom: 18px;
}


.page-section h2 {
    font-family: "Playfair Display", serif;
    font-size: clamp(35px, 6vw, 55px);
    margin-bottom: 20px;
}


.lead {
    line-height: 2;
    color: #856770;
}


/* BEGINNING */

.beginning-page {
    background: #fff0f4;
}


.big-icon {
    font-size: 65px;
    margin-bottom: 15px;
}


.beginning-card {
    max-width: 600px;
    padding: 55px 35px;
    margin-top: 40px;

    background: white;

    border-radius: 35px;

    box-shadow:
        0 20px 50px rgba(100,60,70,.08);
}


.date {
    color: #ff7798;
    font-size: 13px;
    margin-bottom: 15px;
}


.beginning-card p {
    line-height: 2;
    color: #80636c;
    margin: 15px 0;
}


.quote {
    margin-top: 30px;
    padding: 25px;

    background: #fff0f4;

    color: #ff7093;

    border-radius: 20px;

    line-height: 2;
}


/* CLOCK */

.clock-page {
    background: #fff8f4;
}


.clock {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    margin: 55px 0 25px;

    flex-wrap: wrap;
}


.time-box {
    min-width: 115px;
    padding: 22px 12px;

    background: white;

    border: 1px solid #f0d8df;

    border-radius: 20px;

    box-shadow:
        0 10px 30px rgba(110,60,75,.08);
}


.time-box strong {
    display: block;

    color: #ff7899;

    font-size: 32px;

    font-weight: 500;
}


.time-box span {
    font-size: 10px;
    color: #9c7c84;
    letter-spacing: 2px;
}


.colon {
    font-size: 30px;
    color: #ff91a9;
}


.since {
    color: #987780;
    margin-bottom: 40px;
}


.next-button {
    border: none;

    background: #ff88a4;
    color: white;

    padding: 15px 28px;

    border-radius: 50px;

    cursor: pointer;

    box-shadow:
        0 8px 20px rgba(255,136,164,.25);

    transition: .3s;
}


.next-button:hover {
    transform: translateY(-4px);
}


/* CALENDAR */

.calendar-page {
    background: #fff8f4;
}


.calendar-grid {
    width: min(1000px, 100%);

    margin-top: 60px;

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 20px;
}


.month-card {
    position: relative;

    min-height: 270px;

    padding: 25px;

    background: white;

    border: 1px solid #efdce1;

    border-radius: 25px;

    text-align: left;

    cursor: pointer;

    transition: .35s;

    overflow: hidden;
}


.month-card:hover {
    transform:
        translateY(-8px)
        rotate(-1deg);

    box-shadow:
        0 18px 35px rgba(100,60,70,.12);
}


.month-top {
    display: flex;
    justify-content: space-between;

    color: #b18e96;
    font-size: 12px;
}


.month-top span:last-child {
    font-size: 25px;
    color: #ff7998;
}


.month-card h3 {
    font-family: "Playfair Display", serif;

    font-size: 25px;

    margin-top: 8px;
}


.month-icon {
    font-size: 55px;
    margin: 25px 0 10px;
}


.month-card p {
    color: #84666f;
    font-size: 13px;
    line-height: 1.7;
}


.view-memory {
    position: absolute;
    bottom: 20px;

    color: #ff7798;

    font-size: 12px;
}


.special-month {
    background:
        linear-gradient(
            135deg,
            #fff0f5,
            #fff8f4
        );

    border: 2px solid #ff9ab1;
}


.special-label {
    position: absolute;

    top: 12px;
    right: 12px;

    font-size: 8px;

    color: white;

    background: #ff809e;

    padding: 6px 9px;

    border-radius: 20px;
}


.calendar-note {
    margin-top: 50px;

    color: #987781;

    line-height: 2;
}


.calendar-note span {
    color: #ff7798;
    margin: 0 10px;
}


/* JOURNEY */

.journey-page {
    background: #fff0f4;
}


.journey {
    position: relative;

    width: min(750px, 100%);

    margin-top: 60px;
}


.journey-line {
    position: absolute;

    width: 3px;

    background: #ffb1c4;

    top: 0;
    bottom: 0;

    left: 50%;
}


.journey-item {
    position: relative;

    width: 50%;

    padding: 15px 40px;

    text-align: left;
}


.journey-item:nth-child(even) {
    margin-left: 50%;
}


.journey-icon {
    position: absolute;

    width: 50px;
    height: 50px;

    display: flex;

    justify-content: center;
    align-items: center;

    background: white;

    border: 3px solid #ff9ab2;

    border-radius: 50%;

    z-index: 2;
}


.journey-item:nth-child(odd) .journey-icon {
    right: -25px;
}


.journey-item:nth-child(even) .journey-icon {
    left: -25px;
}


.journey-card {
    background: white;

    padding: 25px;

    border-radius: 22px;

    box-shadow:
        0 10px 25px rgba(100,60,70,.07);
}


.journey-card span {
    color: #ff7798;
    font-size: 11px;
}


.journey-card h3 {
    margin: 8px 0;
}


.journey-card p {
    color: #80636c;

    line-height: 1.8;

    font-size: 13px;
}


.special-journey .journey-card {
    border: 2px solid #ff91aa;
    background: #fff7f9;
}


/* PHOTOS */

.photo-page {
    background: #fff8f4;
}


.photo-wall {
    position: relative;

    width: min(900px, 100%);

    height: 600px;

    margin-top: 50px;
}


.polaroid {
    position: absolute;

    width: 220px;

    padding: 12px 12px 25px;

    background: white;

    box-shadow:
        0 15px 30px rgba(80,50,60,.14);

    transition: .4s;
}


.polaroid:hover {
    z-index: 5;

    transform:
        scale(1.08)
        rotate(0deg);
}


.photo-box {
    height: 220px;

    background: #ffe3ea;

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: hidden;
}


.photo-box img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}


.polaroid p {
    margin-top: 15px;
    font-size: 13px;
}


.p1 {
    left: 5%;
    top: 30px;
    transform: rotate(-7deg);
}


.p2 {
    left: 32%;
    top: 110px;
    transform: rotate(5deg);
}


.p3 {
    right: 5%;
    top: 20px;
    transform: rotate(8deg);
}


.p4 {
    left: 40%;
    bottom: 0;
    transform: rotate(-4deg);
}


/* GIFT */

.gift-page {
    background: #332a2e;
    color: white;
}


.gift-page .chapter-label {
    color: #ff9ab2;
}


.gift-page h2 {
    color: white;
}


.gift-page .lead {
    color: #d9c5ca;
}


.gift-box {
    margin-top: 50px;

    cursor: pointer;

    transition: .5s;
}


.gift-box:hover {
    transform:
        translateY(-12px)
        rotate(-3deg)
        scale(1.05);
}


.gift-lid {
    font-size: 70px;
}


.gift-body {
    font-size: 100px;
    margin-top: -10px;
}


.gift-hint {
    margin-top: 20px;
    color: #ffc2d0;
}


/* LETTER */

.letter-page {
    background: #fff0f4;
}


.letter-card {
    max-width: 650px;

    padding: 60px 45px;

    background:
        repeating-linear-gradient(
            #fffdfa,
            #fffdfa 35px,
            #f5e9e3 36px
        );

    box-shadow:
        0 20px 50px rgba(100,60,70,.12);

    border-radius: 10px;
}


.letter-icon {
    font-size: 60px;
    margin-bottom: 20px;
}


.letter-text {
    margin-top: 30px;
    text-align: left;
}


.letter-text p {
    line-height: 2;
    margin: 20px 0;
    color: #725a61;
}


.letter-text h3 {
    text-align: center;

    color: #ff7093;

    font-size: 25px;

    margin-top: 30px;
}


/* FINAL */

.final-page {
    background:
        radial-gradient(
            circle at center,
            #ffdce5,
            #fff8f4
        );
}


.final-heart {
    font-size: 90px;
    color: #ff7898;

    animation: heartbeat 2s infinite;
}


.loading-word {
    color: #ff7798;

    font-size: 13px;

    letter-spacing: 4px;

    margin-bottom: 20px;
}


.final-page h2 {
    font-size: 65px;
    letter-spacing: 3px;
}


.final-page > p {
    line-height: 2;
    color: #81636b;
}


.infinity {
    font-size: 90px;

    color: #ff7798;

    margin: 20px;
}


.final-page h3 {
    line-height: 2;
    font-weight: 400;
}


.final-love {
    margin-top: 20px;
    color: #ff7093 !important;
}


.restart-button {
    margin-top: 35px;

    border: 1px solid #f0cfd8;

    background: white;

    color: #ff7798;

    padding: 12px 22px;

    border-radius: 30px;

    cursor: pointer;
}


/* POPUP */

.popup {
    position: fixed;

    inset: 0;

    z-index: 100;

    display: none;

    justify-content: center;
    align-items: center;

    padding: 20px;

    background: rgba(45,30,35,.65);

    backdrop-filter: blur(8px);
}


.month-modal {
    position: relative;

    width: min(550px, 100%);

    padding: 45px 35px;

    background: #fffaf7;

    border-radius: 30px;

    text-align: center;

    animation: popup .35s ease;

    box-shadow:
        0 25px 70px rgba(0,0,0,.2);
}


#monthModalIcon {
    font-size: 60px;
    margin-bottom: 10px;
}


.month-modal h2 {
    font-family: "Playfair Display", serif;

    font-size: 35px;

    margin: 10px 0 15px;
}


#monthModalDescription {
    color: #80636c;
    line-height: 2;
}


.month-memories {
    margin-top: 25px;

    display: flex;

    flex-direction: column;

    gap: 10px;
}


.memory-line {
    background: #fff0f4;

    padding: 12px;

    border-radius: 15px;

    color: #765961;

    font-size: 13px;
}


.close-button {
    position: absolute;

    right: 18px;
    top: 12px;

    border: none;

    background: none;

    font-size: 28px;

    color: #9c7881;

    cursor: pointer;
}


/* FLOATING HEARTS */

.floating-hearts span {
    position: fixed;

    z-index: 1;

    color: #ffb5c5;

    opacity: .35;

    font-size: 25px;

    animation: float 6s infinite ease-in-out;

    pointer-events: none;
}


.floating-hearts span:nth-child(1) {
    left: 8%;
    top: 20%;
}


.floating-hearts span:nth-child(2) {
    left: 85%;
    top: 25%;
}


.floating-hearts span:nth-child(3) {
    left: 15%;
    top: 75%;
}


.floating-hearts span:nth-child(4) {
    left: 90%;
    top: 70%;
}


.floating-hearts span:nth-child(5) {
    left: 50%;
    top: 15%;
}


/* ANIMATION */

@keyframes heartbeat {

    0%,100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }

}


@keyframes popup {

    from {
        opacity: 0;
        transform: scale(.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }

}


@keyframes float {

    0%,100% {
        transform:
            translateY(0)
            rotate(0);
    }

    50% {
        transform:
            translateY(-30px)
            rotate(15deg);
    }

}


/* MOBILE */

@media(max-width:700px) {

    .navbar {
        padding: 0 20px;
    }


    .nav-count {
        font-size: 10px;
    }


    .clock {
        gap: 5px;
    }


    .time-box {
        min-width: 75px;
        padding: 18px 8px;
    }


    .time-box strong {
        font-size: 22px;
    }


    .colon {
        font-size: 20px;
    }


    .calendar-grid {
        grid-template-columns: 1fr;
    }


    .journey-line {
        left: 20px;
    }


    .journey-item,
    .journey-item:nth-child(even) {
        width: 100%;

        margin-left: 0;

        padding-left: 60px;

        padding-right: 0;
    }


    .journey-item:nth-child(odd) .journey-icon,
    .journey-item:nth-child(even) .journey-icon {
        left: -5px;
        right: auto;
    }


    .photo-wall {
        height: 950px;
    }


    .polaroid {
        width: 180px;
    }


    .photo-box {
        height: 180px;
    }


    .p1 {
        left: 0;
    }


    .p2 {
        right: 0;
        left: auto;
        top: 220px;
    }


    .p3 {
        left: 0;
        right: auto;
        top: 430px;
    }


    .p4 {
        right: 0;
        left: auto;
        bottom: 0;
    }


    .letter-card {
        padding: 45px 25px;
    }


    .final-page h2 {
        font-size: 42px;
    }

}