@font-face {
    font-family: "Iran Nastaliq";
    src: url("../font/IranNastaliq.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
}

body {
    font-family: Vazirmatn, sans-serif;
    margin: 0;
    position: relative;
    width: 100vw;
    height: 100vh;
    background-color: #D9AFD9;
    background-image: linear-gradient(0deg, #D9AFD9 0%, #97D9E1 100%);
}

#envelope {
    position: absolute;
    top: calc(50vh - 200px);
    left: calc(50vw - 150px);
    width: 300px;
    height: 300px;
}

#envelope>* {
    position: absolute;
    top: 0;
    left: 0;
    display: none;
}

#back {
    display: block;
    z-index: 0;
}

#front {
    display: block;
    z-index: 10;
}

#top {
    display: block;
    z-index: 11;
}

#top.animate,
#front.animate,
#back.animate,
#openup.animate {
    opacity: 0;
    transition: opacity 1s;
    transition-delay: 1s;
}

#letter {
    display: flex;
    flex-direction: column;

    align-items: center;
    background-color: #ffffff;
    padding: 10px;
    z-index: 5;
    left: 15px;
    right: 15px;
    bottom: 5px;
    top: 105px;
    box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.1), 0px 1px 2px 0px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    font-size: 16px;
}

#letter.animate {
    animation: makebig 2s forwards;
    animation-delay: 1s;
}

#letter h1 {
    font-family: Iran Nastaliq, sans-serif;
    color: #c72c41;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    font-size: 250%;
    line-height: 1;
    margin: 2rem 0 0 0;
}

#letter p {
    font-family: Iran Nastaliq, sans-serif;
    line-height: 2;
    font-size: 100%;
    text-align: center;
}

#letter h6 {
    font-weight: 900;
    font-size: 70%;
}


#openup {
    display: block;
    z-index: 15;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background-color: #ff0000;
    font-size: 25px;
    text-align: center;
    line-height: 2.2;
    color: white;
    cursor: pointer;
    top: calc(200px - 25px);
    left: calc(150px - 25px);
    transition: transform 1s, background-color 1s, color 1s;
}

#openup:hover {
    background-color: pink;
    transform: scale(1.5);
    transition: transform 1s, background-color 1s, color 1s;
}

















.bride-groom {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 30%;
}

.bride {
    left: -200px;
}

.groom {
    right: -200px;
}

.bride,
.groom {
    position: absolute;
    height: 120px;
}


.moveBrideAnimate {
    animation: moveBride 10s ease forwards;
}

.moveGroomAnimate {
    animation: moveGroom 10s ease forwards;
}

@keyframes moveBride {
    0% {
        left: -200px;
    }

    100% {
        left: calc(50% - 30px);
        transform: translateX(-50%);
    }
}

@keyframes moveGroom {
    0% {
        right: -200px;
    }

    100% {
        right: calc(50% - 30px);
        transform: translateX(50%);
    }
}



#hearts {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}


.heart {
    position: absolute;
    top: -50px;
    width: 20px;
    height: 20px;
    background-image: url('../img/heart.png');
    background-size: cover;
    opacity: 0.7;
    animation: fall 7s linear infinite;
    filter: hue-rotate(0deg);
}

@keyframes fall {
    0% {
        top: -50px;
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        top: 400px;
        opacity: 0;
    }
}



.reaction-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.circle-button {
    border: none;
    outline: none;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    font-size: 12px;
    color: #ffffff;
    cursor: pointer;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.like-button {
    background-color: #4CAF50;
}

.dislike-button {
    background-color: #F44336;
}

.circle-button:hover {
    opacity: 0.8;
}





.navbar {
    position: absolute;
    bottom: 0;
    width: 100%;
    background-color: #f9f9f9;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}


.navbar a {
    text-decoration: none;
    color: #555;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 16px;
    padding: 10px;
}

.navbar a i {
    font-size: 24px;
    margin-bottom: 5px;
}











@media (min-width: 320px) and (max-width: 375px) {
    @keyframes makebig {
        0% {
            top: 105px;
            left: 15px;
            right: 15px;
            bottom: 5px;
            font-size: 16px;
        }

        33% {
            top: -100px;
            left: 15px;
            right: 15px;
            bottom: 150px;
            font-size: 16px;
        }

        100% {
            top: -100px;
            left: 5px;
            right: 5px;
            bottom: -200px;
            font-size: 24px;
        }
    }

    #letter h6 {
        font-size: 55%;
    }
}

@media (min-width: 375px) and (max-width: 428px) {
    @keyframes makebig {
        0% {
            top: 105px;
            left: 15px;
            right: 15px;
            bottom: 5px;
            font-size: 16px;
        }

        33% {
            top: -100px;
            left: 15px;
            right: 15px;
            bottom: 150px;
            font-size: 16px;
        }

        100% {
            top: -100px;
            left: -20px;
            right: -20px;
            bottom: -200px;
            font-size: 24px;
        }
    }

    #letter h6 {
        font-size: 55%;
    }
}

@media (min-width: 428px) and (max-width: 480px) {

    @keyframes makebig {
        0% {
            top: 105px;
            left: 15px;
            right: 15px;
            bottom: 5px;
            font-size: 16px;
        }

        33% {
            top: -100px;
            left: 15px;
            right: 15px;
            bottom: 150px;
            font-size: 16px;
        }

        100% {
            top: -100px;
            left: -45px;
            right: -45px;
            bottom: -200px;
            font-size: 24px;
        }
    }
}

@media (min-width: 480px) and (max-width: 768px) {
    @keyframes makebig {
        0% {
            top: 105px;
            left: 15px;
            right: 15px;
            bottom: 5px;
            font-size: 16px;
        }

        33% {
            top: -100px;
            left: 15px;
            right: 15px;
            bottom: 150px;
            font-size: 16px;
        }

        100% {
            top: -100px;
            left: -60px;
            right: -60px;
            bottom: -200px;
            font-size: 24px;
        }
    }

    .circle-button {
        width: 60px;
        height: 60px;
    }

}

@media (min-width: 768px) {
    @keyframes makebig {
        0% {
            top: 105px;
            left: 15px;
            right: 15px;
            bottom: 5px;
            font-size: 16px;
        }

        33% {
            top: -100px;
            left: 15px;
            right: 15px;
            bottom: 150px;
            font-size: 16px;
        }

        100% {
            top: -100px;
            left: -100px;
            right: -100px;
            bottom: -200px;
            font-size: 24px;
        }
    }

    .circle-button {
        width: 70px;
        height: 70px;
    }
}