* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
}

body {
    background: #050505;
    color: white;
    font-family: 'Poppins', sans-serif;
    overflow: hidden;
}

.app {
    width: 100vw;
    height: 100vh;
    position: relative;
}


/* =====================================================
   GENERAL SCREEN
===================================================== */

.screen {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    display: none !important;

    justify-content: center;
    align-items: center;
    flex-direction: column;

    text-align: center;

    padding: 25px;

    background:
        radial-gradient(
            circle at center,
            #171117 0%,
            #080708 45%,
            #020202 100%
        );
}

.screen.active {
    display: flex !important;
    animation: screenIn 0.8s ease;
}
.content {
    max-width: 750px;
    width: 100%;
}


/* =====================================================
   HEARTS
===================================================== */

.small-heart {
    font-size: 75px;
    color: #ff6f9c;

    margin-bottom: 15px;

    animation: heartbeat 1.6s infinite;
}

.icon {
    font-size: 65px;

    margin-bottom: 25px;
}

.big-heart {
    font-size: 110px;

    color: #ff6f9c;

    animation: heartbeat 1.6s infinite;
}

.small-title {
    color: #c8b8bf;

    font-size: 15px;

    letter-spacing: 2px;

    margin-bottom: 20px;
}


/* =====================================================
   HEADINGS
===================================================== */

h1 {
    font-family: 'Caveat', cursive;

    font-size: clamp(
        65px,
        10vw,
        120px
    );

    line-height: 0.85;

    font-weight: 600;
}

h1 span {
    color: #ff6f9c;
}

h2 {
    font-family: 'Caveat', cursive;

    font-size: clamp(
        50px,
        7vw,
        85px
    );

    line-height: 0.95;

    font-weight: 500;
}

.subtext {
    color: #a99da3;

    line-height: 1.8;

    margin: 30px auto;

    max-width: 550px;
}


/* =====================================================
   BUTTON
===================================================== */

button {
    background: transparent;

    color: #ddd;

    border: 1px solid #5b4d54;

    padding: 13px 28px;

    border-radius: 30px;

    font-family: 'Poppins', sans-serif;

    cursor: pointer;

    transition: 0.3s;
}

button:hover {
    background: #ff5f8d;

    color: white;

    border-color: #ff5f8d;

    box-shadow:
        0 0 30px
        rgba(255,95,141,0.35);

    transform: translateY(-2px);
}


/* =====================================================
   PHOTO SECTION
===================================================== */

.photo-screen {
    gap: 15px;
}

.memory-title {
    font-family: 'Caveat', cursive;

    font-size: 30px;

    color: #aaa0a7;

    margin-bottom: 15px;
}

.photo-container {
    width: min(
        85vw,
        650px
    );

    height: min(
        70vh,
        600px
    );

    padding: 10px;

    background: #171417;

    border-radius: 18px;

    border: 1px solid #30272c;

    box-shadow:
        0 0 15px
        rgba(255,94,145,0.15),

        0 0 50px
        rgba(255,94,145,0.08);

    cursor: pointer;

    transition: 0.4s;

    display: flex;

    justify-content: center;

    align-items: center;
}

.photo-container:hover {
    transform: scale(1.025);

    box-shadow:
        0 0 25px
        rgba(255,94,145,0.3),

        0 0 70px
        rgba(255,94,145,0.12);
}


/* IMPORTANT:
   Shows the COMPLETE photo.
   No cropping.
*/

.photo-container img {
    width: 100%;

    height: 100%;

    object-fit: contain;

    border-radius: 12px;

    display: block;
}

.tap-text {
    color: #aaa0a7;

    font-size: 13px;

    margin-top: 5px;
}

.caption {
    color: #847981;

    font-family: 'Caveat', cursive;

    font-size: 25px;

    max-width: 600px;

    margin-top: 5px;
}


/* =====================================================
   LETTER SCREEN
===================================================== */

/*
   The letter is much longer than the screen,
   so this section is allowed to scroll.
*/

.letter-screen {

    position: absolute;

    inset: 0;

    width: 100%;

    height: 100%;

    overflow-y: auto;

    overflow-x: hidden;

    justify-content: flex-start;

    align-items: center;

    padding-top: 30px;

    padding-bottom: 70px;

    min-height: 100vh;

    /*
       Smooth scrolling on phone.
    */
    scroll-behavior: smooth;

    /*
       Important for long content.
    */
    -webkit-overflow-scrolling: touch;
}


/* =====================================================
   LETTER PAPER
===================================================== */

.letter {

    /*
       MUCH wider than before.
       This gives your long Telugu-English
       sentences more horizontal space.
    */

    width: 94vw;

    max-width: 1100px;


    /*
       VERY IMPORTANT:

       Do NOT use a fixed height.

       The paper will automatically become
       as tall as your complete apology.
    */

    height: auto;

    min-height: 850px;


    /*
       Large internal spacing.
    */

    padding: 70px 75px 80px;


    /*
       Prevent flexbox from shrinking
       the letter.
    */

    flex-shrink: 0;


    /*
       Position on page.
    */

    margin: 20px auto 35px;


    /*
       Text colour.
    */

    color: #493a30;


    text-align: left;


    /*
       Paper background.
    */

    background:

        radial-gradient(
            circle at 20% 20%,
            rgba(255,255,255,0.85),
            transparent 22%
        ),

        radial-gradient(
            circle at 80% 80%,
            rgba(255,255,255,0.35),
            transparent 25%
        ),

        linear-gradient(
            135deg,
            #f4e6c8,
            #e7d4ad
        );


    border-radius: 10px;


    /*
       Beautiful paper shadow.
    */

    box-shadow:

        0 0 25px
        rgba(255,105,150,0.12),

        0 25px 80px
        rgba(0,0,0,0.65);


    position: relative;


    /*
       Animation.
    */

    animation:
        letterIn
        1s ease;
}


/* =====================================================
   LETTER INNER BORDER
===================================================== */

.letter::before {

    content: "";

    position: absolute;

    top: 18px;
    left: 18px;
    right: 18px;
    bottom: 18px;

    border:
        1px solid
        rgba(90,65,40,0.25);

    pointer-events: none;
}


/* =====================================================
   LETTER DECORATION
===================================================== */

.letter-decoration {

    text-align: center;

    font-size: 26px;

    color: #9c7450;

    margin-bottom: 25px;
}


/* =====================================================
   DEAR YOU
===================================================== */

.letter h2 {

    color: #584431;

    font-size: 58px;

    line-height: 1;

    margin-bottom: 35px;
}


/* =====================================================
   LETTER PARAGRAPHS
===================================================== */

/*
   Your actual apology is quite long.

   These settings give it enough room
   and make it look like handwritten text.
*/

.letter p {

    font-family: 'Caveat', cursive;

    font-size: 28px;

    line-height: 1.7;

    margin-bottom: 32px;

    color: #493a30;

    /*
       Prevents long words from
       breaking outside the paper.
    */

    overflow-wrap: break-word;

    word-wrap: break-word;
}


/* =====================================================
   SIGNATURE
===================================================== */

.signature {

    margin-top: 50px;

    margin-bottom: 20px;

    text-align: right;

    font-family: 'Caveat', cursive;

    font-size: 25px;

    line-height: 1.5;
}

.signature span {

    font-size: 36px;
}


/* =====================================================
   READ IT SLOWLY
===================================================== */

.letter-screen > .tap-text {

    flex-shrink: 0;

    font-size: 15px;

    margin-bottom: 15px;
}


/* =====================================================
   FINAL REPLY
===================================================== */

.final-reply {

    display: none;

    color: #ff7da3;

    font-family: 'Caveat', cursive;

    font-size: 30px;

    margin-top: 30px;

    animation:
        fadeUp
        1s ease;
}


/* =====================================================
   FLOATING HEARTS
===================================================== */

#hearts {

    position: fixed;

    inset: 0;

    pointer-events: none;

    z-index: 20;
}

.floating-heart {

    position: absolute;

    bottom: -30px;

    color: #ff6f9c;

    font-size: 18px;

    opacity: 0;

    animation:
        floatHeart
        6s linear forwards;
}


/* =====================================================
   BACKGROUND STARS
===================================================== */

.stars {

    position: fixed;

    inset: 0;

    pointer-events: none;

    z-index: 1;

    background-image:
        radial-gradient(
            white 1px,
            transparent 1px
        );

    background-size: 100px 100px;

    opacity: 0.12;
}


/* =====================================================
   ANIMATIONS
===================================================== */

@keyframes screenIn {

    from {

        opacity: 0;

        transform:
            scale(0.97);
    }

    to {

        opacity: 1;

        transform:
            scale(1);
    }
}


@keyframes fadeUp {

    from {

        opacity: 0;

        transform:
            translateY(25px);
    }

    to {

        opacity: 1;

        transform:
            translateY(0);
    }
}


@keyframes heartbeat {

    0%,
    100% {

        transform:
            scale(1);
    }

    50% {

        transform:
            scale(1.15);
    }
}


@keyframes letterIn {

    from {

        opacity: 0;

        transform:
            translateY(30px)
            rotate(-2deg);
    }

    to {

        opacity: 1;

        transform:
            translateY(0)
            rotate(0deg);
    }
}


@keyframes floatHeart {

    0% {

        transform:
            translateY(0)
            scale(0.5);

        opacity: 0;
    }

    15% {

        opacity: 0.7;
    }

    100% {

        transform:
            translateY(-110vh)
            translateX(40px)
            scale(1.2);

        opacity: 0;
    }
}


/* =====================================================
   MOBILE / PHONE
===================================================== */

@media (max-width: 600px) {

    h1 {

        font-size: 65px;
    }

    h2 {

        font-size: 52px;
    }


    /* -------------------------
       PHOTOS
    ------------------------- */

    .photo-container {

        width: 85vw;

        height: 58vh;
    }

    .memory-title {

        font-size: 27px;
    }

    .caption {

        font-size: 22px;
    }


    /* -------------------------
       LETTER SCREEN
    ------------------------- */

    .letter-screen {

        padding-top: 20px;

        padding-bottom: 50px;
    }


    /* -------------------------
       LETTER
    ------------------------- */

    .letter {

        width: 94vw;

        min-height: 900px;

        padding:
            50px
            30px
            60px;

        margin:
            10px auto
            30px;
    }


    .letter::before {

        top: 12px;

        left: 12px;

        right: 12px;

        bottom: 12px;
    }


    /* -------------------------
       LETTER HEADING
    ------------------------- */

    .letter h2 {

        font-size: 45px;

        margin-bottom: 28px;
    }


    /* -------------------------
       LETTER TEXT
    ------------------------- */

    .letter p {

        font-size: 23px;

        line-height: 1.6;

        margin-bottom: 27px;
    }


    /* -------------------------
       SIGNATURE
    ------------------------- */

    .signature {

        font-size: 21px;

        margin-top: 35px;
    }

    .signature span {

        font-size: 30px;
    }
}