/* =========================================================
   RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* =========================================================
   HTML / BODY
========================================================= */

html {
    width: 100%;
    height: 100%;

    background: #000;

    overflow: hidden;
}

body {
    width: 100%;
    height: 100%;

    min-height: 100dvh;

    overflow: hidden;

    background: transparent;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    color: #ffffff;

    -webkit-tap-highlight-color: transparent;
}


/* =========================================================
   MAIN APP
========================================================= */

#app {
    position: fixed;

    inset: 0;

    width: 100vw;
    height: 100dvh;

    overflow: hidden;

    background: transparent;

    isolation: isolate;
}


/* =========================================================
   FULL-SCREEN PINTEREST BACKGROUND
========================================================= */

.background {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    overflow: hidden;

    z-index: 0;

    /*
       THIS IS THE ACTUAL PINTEREST IMAGE
    */

    background-image:
        url("../assets/images/pinterest-bg.jpg");

    background-repeat: no-repeat;

    background-position: center center;

    background-size: cover;

    /*
       IMPORTANT:
       NO DARK BLUE BACKGROUND HERE
    */

    background-color: transparent;
}


/* =========================================================
   OLD BACKGROUND ELEMENTS
   Keep them for JS compatibility,
   but make them invisible.
========================================================= */

.background .moon,
.background .stars,
.background .fireflies,
.background .lake {
    pointer-events: none;
}


/*
   Remove old artificial moon/lake background.
*/

.background .moon {
    display: none;
}

.background .lake {
    display: none;
}


/*
   Stars/fireflies can remain if your
   JavaScript creates them.
*/

.background .stars,
.background .fireflies {
    position: absolute;

    inset: 0;

    pointer-events: none;
}


/* =========================================================
   FLOATING HEART CONTAINER
========================================================= */

#heart-container {
    position: fixed;

    inset: 0;

    width: 100%;
    height: 100%;

    z-index: 5;

    pointer-events: none;

    overflow: hidden;
}


/* =========================================================
   SCREEN
========================================================= */

.screen {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    min-width: 0;
    min-height: 0;

    display: none;

    align-items: center;
    justify-content: center;

    padding:
        max(18px, env(safe-area-inset-top))
        max(18px, env(safe-area-inset-right))
        max(18px, env(safe-area-inset-bottom))
        max(18px, env(safe-area-inset-left));

    /*
       VERY IMPORTANT:
       Screen itself is transparent.
       Therefore Pinterest image remains visible.
    */

    background: transparent;

    z-index: 10;

    overflow: hidden;
}


.screen.active {
    display: flex;
}


/* =========================================================
   WHITE GLASS CARD
========================================================= */

.glass-card,
.letter-wrapper,
.proposal-card {

    position: relative;

    width: min(90vw, 370px);

    max-height: 84dvh;

    padding: 28px 22px;

    border-radius: 26px;

    /*
       WHITE TRANSPARENT GLASS
    */

    background:
        rgba(255, 255, 255, 0.16);

    /*
       WHITE GLASS BORDER
    */

    border:
        1px solid rgba(255, 255, 255, 0.38);

    /*
       BLUR THE PINTEREST BACKGROUND
       BEHIND THE CARD
    */

    backdrop-filter:
        blur(12px)
        saturate(115%);

    -webkit-backdrop-filter:
        blur(12px)
        saturate(115%);

    /*
       SOFT GLASS SHADOW
    */

    box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.25),
        inset 0 1px 1px rgba(255, 255, 255, 0.28),
        inset 0 -1px 1px rgba(255, 255, 255, 0.08);

    color: #ffffff;

    text-align: center;

    overflow-y: auto;

    scrollbar-width: none;
}


.glass-card::-webkit-scrollbar,
.letter-wrapper::-webkit-scrollbar,
.proposal-card::-webkit-scrollbar {
    display: none;
}


/* =========================================================
   GLASS HIGHLIGHT
========================================================= */

.glass-card::before,
.letter-wrapper::before,
.proposal-card::before {

    content: "";

    position: absolute;

    inset: 0;

    border-radius: inherit;

    pointer-events: none;

    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.16),
            transparent 42%,
            rgba(255, 255, 255, 0.04)
        );

    opacity: 0.9;
}


/* =========================================================
   CONTENT ABOVE GLASS EFFECT
========================================================= */

.glass-card > *,
.letter-wrapper > *,
.proposal-card > * {
    position: relative;

    z-index: 2;
}


/* =========================================================
   LABEL
========================================================= */

.small-label,
.letter-small {

    display: block;

    margin-bottom: 12px;

    font-size: 10px;

    font-weight: 700;

    letter-spacing: 3px;

    color:
        rgba(255, 255, 255, 0.82);
}


/* =========================================================
   HEADINGS
========================================================= */

h1 {
    margin-bottom: 14px;

    font-size:
        clamp(28px, 8vw, 40px);

    line-height: 1.15;

    font-weight: 700;

    color: #ffffff;

    text-shadow:
        0 3px 18px rgba(0, 0, 0, 0.25);
}


h2 {
    margin-bottom: 14px;

    font-size:
        clamp(23px, 7vw, 32px);

    line-height: 1.2;

    font-weight: 700;

    color: #ffffff;

    text-shadow:
        0 3px 15px rgba(0, 0, 0, 0.22);
}


/* =========================================================
   PARAGRAPHS
========================================================= */

p {
    margin-bottom: 14px;

    font-size: 14px;

    line-height: 1.75;

    color:
        rgba(255, 255, 255, 0.94);

    text-shadow:
        0 2px 8px rgba(0, 0, 0, 0.18);
}


/* =========================================================
   BUTTON BASE
========================================================= */

button {

    position: relative;

    z-index: 30;

    border: none;

    outline: none;

    cursor: pointer;

    font-family: inherit;

    font-size: 14px;

    font-weight: 700;

    letter-spacing: 0.2px;

    color: #ffffff;

    padding: 13px 23px;

    border-radius: 999px;

    /*
       TRANSPARENT WHITE GLASS BUTTON
    */

    background:
        rgba(255, 255, 255, 0.18);

    border:
        1px solid rgba(255, 255, 255, 0.38);

    backdrop-filter:
        blur(10px);

    -webkit-backdrop-filter:
        blur(10px);

    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.18),
        inset 0 1px 1px rgba(255, 255, 255, 0.25);

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}


button:hover {

    background:
        rgba(255, 255, 255, 0.27);

    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.22),
        inset 0 1px 1px rgba(255, 255, 255, 0.35);
}


button:active {

    transform: scale(0.94);

    background:
        rgba(255, 255, 255, 0.30);
}


/* =========================================================
   PRIMARY BUTTON
========================================================= */

.primary-button {
    margin-top: 12px;

    background:
        rgba(255, 255, 255, 0.20);
}


/* =========================================================
   INTRO
========================================================= */

.intro-card {
    text-align: center;
}


/* =========================================================
   LETTER
========================================================= */

.letter-wrapper {
    text-align: center;
}


.letter-content {
    width: 100%;
}


.hidden {
    display: none !important;
}


/* =========================================================
   ENVELOPE
========================================================= */

.envelope {

    position: relative;

    width: 130px;
    height: 92px;

    margin:
        10px auto 20px;

    border-radius: 12px;

    cursor: pointer;

    background:
        rgba(255, 255, 255, 0.16);

    border:
        1px solid rgba(255, 255, 255, 0.35);

    backdrop-filter:
        blur(10px);

    -webkit-backdrop-filter:
        blur(10px);

    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.18);
}


.envelope-front {

    width: 100%;
    height: 100%;

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;
}


.envelope-heart {

    font-size: 30px;

    margin-bottom: 6px;
}


/* =========================================================
   PERSONAL CARD
========================================================= */

.personal-card {
    text-align: center;
}


.heart-icon {

    font-size: 34px;

    margin-bottom: 10px;
}


/* =========================================================
   PROPOSAL
========================================================= */

.proposal-card {
    text-align: center;
}


.proposal-heart {

    font-size: 40px;

    margin-bottom: 8px;
}


.proposal-screen {
    align-items: center;
    justify-content: center;
}


/* =========================================================
   YES / NO BUTTONS
========================================================= */

.proposal-buttons {

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 12px;

    flex-wrap: wrap;

    margin-top: 22px;
}


.yes-button {

    background:
        rgba(255, 105, 170, 0.30);

    border-color:
        rgba(255, 190, 220, 0.48);
}


.no-button {

    background:
        rgba(255, 255, 255, 0.13);
}


/* =========================================================
   RESPONSE BOX
========================================================= */

.response-box {

    position: relative;

    margin-top: 20px;

    padding: 18px 14px;

    border-radius: 20px;

    /*
       EXTRA GLASS INSIDE THE MAIN GLASS
    */

    background:
        rgba(255, 255, 255, 0.10);

    border:
        1px solid rgba(255, 255, 255, 0.22);

    backdrop-filter:
        blur(8px);

    -webkit-backdrop-filter:
        blur(8px);
}


.response-icon,
.celebration-icon {

    font-size: 40px;

    margin-bottom: 10px;
}


/* =========================================================
   YES RESPONSE
========================================================= */

#yes-response {

    background:
        rgba(255, 120, 180, 0.10);
}


/* =========================================================
   FINAL NO RESPONSE
========================================================= */

#final-no-response {

    background:
        rgba(255, 255, 255, 0.08);
}


/* =========================================================
   MOBILE VIEW
========================================================= */

@media (max-width: 600px) {

    #app {

        width: 100vw;

        height: 100dvh;
    }


    .background {

        width: 100vw;

        height: 100dvh;

        background-size: cover;

        background-position: center center;
    }


    .screen {

        width: 100vw;

        height: 100dvh;

        padding:
            max(16px, env(safe-area-inset-top))
            max(16px, env(safe-area-inset-right))
            max(16px, env(safe-area-inset-bottom))
            max(16px, env(safe-area-inset-left));
    }


    .glass-card,
    .letter-wrapper,
    .proposal-card {

        width: 91vw;

        max-width: 370px;

        max-height: 82dvh;

        padding: 25px 19px;

        border-radius: 24px;

        background:
            rgba(255, 255, 255, 0.16);

        backdrop-filter:
            blur(12px)
            saturate(115%);

        -webkit-backdrop-filter:
            blur(12px)
            saturate(115%);
    }


    h1 {

        font-size: 30px;
    }


    h2 {

        font-size: 25px;
    }


    p {

        font-size: 14px;

        line-height: 1.7;
    }


    button {

        padding: 12px 21px;

        font-size: 14px;
    }
}


/* =========================================================
   SMALL PHONES
========================================================= */

@media (max-width: 360px) {

    .screen {

        padding: 12px;
    }


    .glass-card,
    .letter-wrapper,
    .proposal-card {

        width: 94vw;

        padding:
            21px 16px;
    }


    h1 {

        font-size: 27px;
    }


    h2 {

        font-size: 23px;
    }


    p {

        font-size: 13px;
    }


    button {

        padding:
            11px 18px;

        font-size: 13px;
    }
}


/* =========================================================
   SAFE AREA
========================================================= */

@supports (height: 100dvh) {

    #app {

        height: 100dvh;
    }


    .background {

        height: 100dvh;
    }


    .screen {

        height: 100dvh;
    }
}