* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #111;
    color: white;
    font-family: vazirmatn, sans-serif;
    overflow-x: hidden;
}

.container {
    max-width: 500px;
    margin: auto;
    padding: 20px;
    text-align: center;
}

.hero-image {
    width: 100%;
    border-radius: 24px;
    margin-top: 20px;
}

h1 {
    margin-top: 25px;
    font-size: 2rem;
}

.subtitle {
    margin-top: 10px;
    opacity: .8;
}

.buttons {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn {
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .1);
    padding: 18px;
    border-radius: 18px;
    text-decoration: none;
    color: white;
    transition: .3s;
}

.btn:hover {
    transform: translateY(-3px);
}

.footer {
    margin-top: 40px;
    opacity: .5;
    font-size: .9rem;
}

.jar-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 20px;
}

.jar {

    width: 220px;
    height: 270px;

    margin: auto;

    position: relative;

    cursor: pointer;

    transition: .3s;
    flex-shrink: 0;

}

.jar:hover {

    transform: scale(1.04);

}

.jar-glass {

    width: 220px;
    height: 220px;

    border-radius: 35px;

    background: rgba(255, 255, 255, .08);

    border: 3px solid rgba(255, 255, 255, .25);

    backdrop-filter: blur(8px);

    box-shadow:

        0 0 25px rgba(255, 192, 203, .15);

    position: absolute;
    bottom: 0;

    overflow: hidden;

}

.jar-lid {

    width: 140px;
    height: 24px;

    background: #d9d9d9;

    border-radius: 10px;

    position: absolute;

    left: 50%;
    transform: translateX(-50%);

    top: 8px;

}

.jar-heart {

    position: absolute;

    left: 50%;
    top: 55%;

    transform: translate(-50%, -50%);

    font-size: 4rem;

}

.jar:hover {
    transform: scale(1.05);
}

.tap-text {
    margin-top: 15px;
    opacity: .7;
}

.note {
    margin-top: 30px;
    max-width: 350px;
    padding: 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .05);
    text-align: center;
    line-height: 1.6;
    direction: rtl;
    text-align: center;
    unicode-bidi: plaintext;
}

.back {
    position: absolute;
    top: 20px;
    left: 20px;
    text-decoration: none;
    color: white;
}

.gallery {
    padding: 70px 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.gallery img {
    width: 100%;
    border-radius: 18px;
    display: block;
}

#hearts {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.heart {
    position: absolute;
    font-size: 22px;
    animation: fly 1s ease forwards;
}

@keyframes fly {

    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(-120px) scale(1.6);
    }

}

.album-cover {
    width: 100%;
    max-width: 700px;

    display: block;

    margin: 40px auto 20px;

    border-radius: 24px;
}

.album-title {
    text-align: center;
    margin-bottom: 25px;
}

.last-photo {
    grid-column: 1 / span 2;
    width: 50%;
    margin: auto;
}

.camera {

    font-size: 6rem;

    cursor: pointer;

    text-align: center;

    margin-top: 40px;

    transition: .3s;
    touch-action: manipulation;
}

.camera:hover {
    transform: scale(1.05);
}

.photo-box {

    position: fixed;

    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    z-index: 100;
}

.photo-box img {

    width: min(90vw, 500px);
    background: white;

    padding: 15px 15px 45px;
    border-radius: 10px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, .4);
    opacity: 0;
    transform: translateY(-100px)scale(.7);
    transition: .6s;
    pointer-events: none;
}

.flash {

    position: fixed;
    inset: 0;

    background: white;

    opacity: 0;

    pointer-events: none;

}

.flash.active {

    animation: flash .4s ease;
}

@keyframes flash {

    0% {
        opacity: 0;
    }

    50% {
        opacity: .9;
    }

    100% {
        opacity: 0;
    }

}

#album-photo {
    display: none;
    width: 300px;
    margin: 30px;
}

.photo-box img.show {
    opacity: 1;
    transform:
        translateY(0) scale(1);
}

.overlay {

    position: fixed;
    inset: 0;

    background: rgba(0, 0, 0, .8);

    backdrop-filter: blur(8px);

    display: none;

    justify-content: center;
    align-items: center;

    z-index: 999;

}

.overlay.active {

    display: flex;

}

.overlay img {

    max-width: 90%;
    max-height: 85vh;

    border-radius: 20px;

    box-shadow: 0 20px 60px rgba(0, 0, 0, .6);

}

.note {

    font-family: "Vazirmatn", sans-serif;

    font-size: 1.15rem;

    font-weight: 500;

    line-height: 2.2;

}

@media (max-width: 480px) {

    .container,
    .jar-page,
    .album-page {
        width: 100%;
        padding: 20px;
    }

    .hero-image,
    .album-cover {
        width: 100%;
        height: auto;
    }

    .photo-box img,
    #album-photo {
        max-width: 90vw;
        max-height: 70vh;
    }

    .note {
        width: 90%;
        max-width: 340px;
        font-size: 1rem;
    }

    .jar {
        transform: scale(.9);
    }

    h1 {
        font-size: 1.8rem;
    }

}

#music-controls {

    position: fixed;

    top: 20px;
    right: 20px;

    display: flex;
    align-items: center;
    gap: 10px;

    z-index: 9999;

}

#music-controls button {

    background: rgba(255, 255, 255, .08);

    border: 1px solid rgba(255, 255, 255, .15);

    padding: 10px 18px;

    border-radius: 30px;

    color: white;

    font-family: "Vazirmatn", sans-serif;

    cursor: pointer;

    backdrop-filter: blur(8px);

    transition: .3s;

}

#music-controls button:hover {

    background: rgba(255, 255, 255, .15);

    transform: scale(1.05);

}