* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    direction: rtl;
    font-family: "Vazirmatn", sans-serif;
    background: #d8cfc0;
    color: #332c26;
    min-height: 100vh;
}

.header {
    position: sticky;
    top: 14px;
    z-index: 1000;

    width: calc(100% - 40px);
    max-width: 1180px;

    margin: 14px auto 0;
    padding: 10px 16px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: rgba(250, 244, 233, 0.82);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    border: 1px solid rgba(128, 96, 73, 0.13);
    border-radius: 18px;

    box-shadow:
        0 8px 30px rgba(70, 50, 35, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);

    transition:
        box-shadow .3s ease,
        background .3s ease,
        transform .3s ease;
}

.logo {
    display: flex;
    align-items: center;
    gap: 9px;

    color: #3c332c;
    font-size: 20px;
    font-weight: 700;

    text-decoration: none;
}

.logo-heart {
    width: 29px;
    height: 29px;

    display: flex;
    align-items: center;
    justify-content: center;

    animation: heartBeat 2.4s ease-in-out infinite;
}

.logo-heart svg {
    width: 25px;
    height: 25px;

    fill: #d2b48c;
    stroke: #d2b48c;

    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;

    transition:
        transform .25s ease,
        filter .25s ease;
}

.logo:hover .logo-heart svg {
    transform: scale(1.12);

    filter:
        drop-shadow(0 3px 5px rgba(150, 105, 70, .25));
}

.nav {
    display: flex;
    align-items: center;
    gap: 5px;

    padding: 5px;

    background: rgba(128, 96, 73, 0.055);
    border: 1px solid rgba(128, 96, 73, 0.07);

    border-radius: 12px;
}

.nav a {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 8px 14px;

    color: #806049;
    text-decoration: none;

    font-size: 12px;
    font-weight: 600;

    border-radius: 9px;

    transition:
        color .25s ease,
        background .25s ease,
        transform .25s ease;
}

.nav a::after {
    content: "";

    position: absolute;

    bottom: 4px;
    left: 50%;

    width: 0;
    height: 2px;

    border-radius: 10px;

    background: #b8895f;

    transform: translateX(-50%);

    transition: width .25s ease;
}

.nav a:hover {
    color: #5f4635;

    background: rgba(128, 96, 73, 0.09);

    transform: translateY(-1px);
}

.nav a:hover::after {
    width: 15px;
}

.write-btn {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 10px 17px;

    border: 1px solid rgba(255, 239, 211, 0.35);
    border-radius: 11px;

    background: linear-gradient(
        135deg,
        #806049,
        #987255
    );

    color: #fff6e7;

    font-family: inherit;
    font-size: 12px;
    font-weight: 700;

    cursor: pointer;
    overflow: hidden;

    box-shadow:
        0 5px 14px rgba(70, 50, 35, .15),
        inset 0 1px 0 rgba(255, 255, 255, .15);

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        background .25s ease;
}

.write-btn:hover {
    transform: translateY(-2px);

    background: linear-gradient(
        135deg,
        #8d674e,
        #aa7d5d
    );

    box-shadow:
        0 9px 20px rgba(70, 50, 35, .22),
        0 0 0 4px rgba(128, 96, 73, .07);
}

.write-btn:active {
    transform: translateY(0) scale(.97);
}

@keyframes heartBeat {

    0%,
    100% {
        transform: scale(1);
    }

    8% {
        transform: scale(1.12);
    }

    16% {
        transform: scale(1);
    }

    24% {
        transform: scale(1.08);
    }

    32% {
        transform: scale(1);
    }
}

.nav {
    display: flex;
    align-items: center;
    gap: 34px;
}

.nav a {
    color: #6c6155;
    text-decoration: none;
    font-size: 14px;
    transition: color .2s ease;
}

.nav a:hover {
    color: #9a6249;
}

.write-btn {
    padding: 10px 19px;
    border: none;
    border-radius: 8px;
    background: #806049;
    color: white;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition:
        background .2s ease,
        transform .2s ease;
}

.write-btn:hover {
    background: #6d503d;
    transform: translateY(-2px);
}

.hero {
    min-height: 480px;
    padding: 75px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;

    background:
        radial-gradient(circle at 20% 30%,
            rgba(255, 255, 255, .2),
            transparent 30%),
        radial-gradient(circle at 80% 70%,
            rgba(130, 100, 70, .08),
            transparent 30%),
        #d8cfc0;
}

.hero-content {
    max-width: 720px;
}

.small-title {
    display: inline-block;
    margin-bottom: 17px;
    color: #806f5e;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
}

.hero h1 {
    font-family: "Lalezar", sans-serif;
    color: #39312b;
    font-size: clamp(52px, 7vw, 82px);
    line-height: 1.15;
    font-weight: 400;
}

.hero h1 span {
    color: #9a6249;
}

.hero p {
    max-width: 540px;
    margin: 22px auto 0;
    color: #655b51;
    font-size: 15px;
    line-height: 2;
}

.hero-btn {
    position: relative;
    margin-top: 27px;
    padding: 14px 30px;

    border: 1px solid rgba(255, 239, 211, 0.35);
    border-radius: 11px;

    background: linear-gradient(135deg,
            #806049 0%,
            #987255 100%);

    color: #fff6e7;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;

    cursor: pointer;
    overflow: hidden;

    box-shadow:
        0 8px 20px rgba(70, 50, 35, .18),
        inset 0 1px 0 rgba(255, 255, 255, .15);

    transition:
        transform .25s cubic-bezier(.2, .8, .2, 1),
        box-shadow .25s ease,
        background .25s ease;
}

.hero-btn::before {
    content: "";
    position: absolute;

    top: -60%;
    left: -80%;

    width: 55%;
    height: 220%;

    background: rgba(255, 241, 213, .18);

    transform: rotate(25deg);
    transition: left .65s ease;
}

.hero-btn {
    isolation: isolate;
}

.hero-btn::after {
    content: "✦";

    position: absolute;
    right: 12px;
    top: 50%;

    transform: translateY(-50%) scale(0);

    color: #f3d7ae;
    font-size: 11px;

    opacity: 0;

    transition:
        transform .3s ease,
        opacity .3s ease;
}

.hero-btn:hover {
    transform: translateY(-4px) scale(1.02);

    background: linear-gradient(135deg,
            #8d674e,
            #aa7d5d);

    box-shadow:
        0 12px 28px rgba(70, 50, 35, .25),
        0 0 0 4px rgba(128, 96, 73, .08),
        inset 0 1px 0 rgba(255, 255, 255, .2);
}

.hero-btn:hover::before {
    left: 140%;
}

.hero-btn:hover::after {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.hero-btn:active {
    transform: translateY(-1px) scale(.97);

    box-shadow:
        0 5px 12px rgba(70, 50, 35, .18);
}

.wall-section {
    padding: 70px 7% 100px;
    background-color: #cfc5b5;

    background-image:
        linear-gradient(rgba(255, 255, 255, .07) 1px,
            transparent 1px),
        linear-gradient(90deg,
            rgba(255, 255, 255, .05) 1px,
            transparent 1px);

    background-size: 35px 35px;
}

.section-header {
    max-width: 1200px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-label {
    color: #756758;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}

.section-header h2 {
    margin-top: 6px;
    font-family: "Lalezar", sans-serif;
    color: #3b332c;
    font-size: 40px;
    font-weight: 400;
}

.my-memories-btn {
    display: inline-block;
    padding: 8px 14px;
    color: #806049;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #c8b9a7;
    border-radius: 7px;
    background: #f8f3ea;
    transition: .2s ease;
}

.my-memories-btn:hover {
    background: #eee5d8;
    color: #5f4735;
    transform: translateY(-2px);
}

.filters {
    max-width: 1200px;
    margin: 0 auto 35px;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.filter-btn {
    padding: 9px 15px;
    border: 1px solid rgba(100, 80, 60, .25);
    border-radius: 50px;
    background: rgba(245, 238, 226, .5);
    color: #655a4f;
    font-family: inherit;
    font-size: 11px;
    cursor: pointer;

    transition:
        background .2s ease,
        color .2s ease,
        transform .2s ease,
        box-shadow .2s ease;
}

.filter-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, .65);
}

.filter-btn.active {
    background: #806049;
    color: white;
    border-color: #806049;

    box-shadow:
        0 4px 10px rgba(80, 55, 40, .16);
}

.memory-grid {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;

    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 30px;
}

.memory-card {
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 325px;
    padding: 31px;

    display: flex;
    flex-direction: column;

    border-radius: 4px;

    box-shadow:
        0 7px 16px rgba(60, 45, 30, .14);

    transition:
        transform .3s ease,
        box-shadow .3s ease;
}

.memory-card:hover {
    transform: translateY(-7px) rotate(0deg);

    box-shadow:
        0 14px 27px rgba(60, 45, 30, .19);
}

.memory-card::before {
    content: "";

    position: absolute;

    top: -9px;
    left: 50%;

    transform:
        translateX(-50%) rotate(-2deg);

    width: 82px;
    height: 18px;

    background:
        rgba(185, 165, 135, .7);
}

.card-yellow {
    background: #f1dfaa;
    transform: rotate(-.7deg);
}

.card-blue {
    background: #cbdfe1;
    transform: rotate(.6deg);
}

.card-pink {
    background: #e8cec6;
    transform: rotate(-.5deg);
}

.card-green {
    background: #d2dfc6;
    transform: rotate(.7deg);
}

.card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.memory-type {
    position: relative;
    display: inline-flex;
    padding: 6px 14px;
    border: 1px solid rgba(100, 80, 60, .3);
    border-radius: 50px;
    background: rgba(255, 255, 255, .2);
    color: #665544;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.memory-type::after {
    content: "";

    position: absolute;
    inset: -5px;

    border: 1px solid rgba(100, 80, 60, .13);
    border-radius: 50%;
}

.time {
    color: #7a7066;
    font-size: 10px;
    white-space: nowrap;
}

.memory-card h3 {
    margin-top: 39px;
    font-family: "Lalezar", sans-serif;
    color: #3c342c;
    font-size: 27px;
    font-weight: 400;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.memory-card p {
    margin-top: 12px;
    color: #5d544b;
    font-size: 12px;
    line-height: 2;
    overflow-wrap: anywhere;
}

.card-bottom {
    margin-top: auto;
    padding-top: 25px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.author {
    color: #786d62;
    font-size: 10px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.actions {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.view-count {
    height: 36px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 6px;
    padding: 0 11px;

    border: 1px solid rgba(100, 80, 60, .16);
    border-radius: 50px;

    background:
        rgba(255, 255, 255, .35);

    color: #75685d;
    font-size: 9px;
    font-weight: 600;
    white-space: nowrap;
}

.view-icon {
    width: 16px;
    height: 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;
}

.view-icon svg {
    width: 16px;
    height: 16px;

    fill: none;

    stroke: #75685d;
    stroke-width: 1.7;

    stroke-linecap: round;
    stroke-linejoin: round;
}

.view-number {
    line-height: 1;
}

.view-text {
    opacity: .85;
}

.more-btn {
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 1px solid rgba(100, 80, 60, .13);
    border-radius: 50%;

    background:
        rgba(255, 255, 255, .32);

    color: #62584e;
    font-size: 14px;
    letter-spacing: 1px;

    cursor: pointer;

    transition:
        background .2s ease,
        transform .2s ease,
        box-shadow .2s ease;
}

.more-btn:hover {
    background:
        rgba(255, 255, 255, .8);

    transform: scale(1.08);

    box-shadow:
        0 4px 10px rgba(70, 50, 35, .1);
}

.share-menu {
    position: absolute;

    bottom: 46px;
    left: 0;

    width: 155px;
    padding: 6px;

    background: #f8f1e6;

    border: 1px solid #d1c1ac;
    border-radius: 8px;

    box-shadow:
        0 8px 20px rgba(60, 45, 30, .15);

    z-index: 50;

    display: none;
}

.share-menu.active {
    display: block;
}

.share-menu button {
    display: block;
    width: 100%;

    padding: 9px 10px;

    border: none;
    border-radius: 5px;

    background: transparent;

    color: #554b42;
    font-family: inherit;
    font-size: 11px;
    text-align: right;

    cursor: pointer;
}

.share-menu button:hover {
    background: #ece1d1;
}

#my-memories {
    padding: 65px 7% 80px;
    background: #ddd3c4;
}

#my-memories .section-header {
    max-width: 1200px;
    margin: 0 auto 30px;
}

#myMemoriesGrid .memory-card {
    min-height: 190px;
    padding: 18px;
}

#myMemoriesGrid .memory-card h3 {
    margin-top: 20px;
    font-size: 18px;
    line-height: 1.4;
}

#myMemoriesGrid .memory-card p {
    margin-top: 7px;
    font-size: 9px;
    line-height: 1.7;

    display: -webkit-box;

    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;

    overflow: hidden;
}

#myMemoriesGrid .memory-type {
    padding: 4px 9px;
    font-size: 8px;
}

#myMemoriesGrid .time {
    font-size: 8px;
}

#myMemoriesGrid .card-bottom {
    padding-top: 13px;
}

#myMemoriesGrid .author {
    font-size: 8px;
}

#myMemoriesGrid .view-count {
    height: 28px;
    padding: 0 8px;
    gap: 4px;
    font-size: 8px;
}

#myMemoriesGrid .view-icon,
#myMemoriesGrid .view-icon svg {
    width: 13px;
    height: 13px;
}

#myMemoriesGrid .like-btn {
    min-width: 48px;
    height: 28px;
    padding: 0 7px;
    font-size: 8px;
}

#myMemoriesGrid .heart {
    font-size: 14px;
}

#myMemoriesGrid .more-btn {
    width: 28px;
    height: 28px;
    font-size: 11px;
}

.empty-memories {
    grid-column: 1 / -1;
    padding: 70px 20px;
    text-align: center;
    color: #655a4f;
}

.empty-icon {
    margin-bottom: 10px;
    font-family: serif;
    color: #9a634c;
    font-size: 42px;
}

.empty-memories h3 {
    font-family: "Lalezar", sans-serif;
    color: #443b34;
    font-size: 25px;
    font-weight: 400;
}

.empty-memories p {
    margin-top: 5px;
    font-size: 12px;
}

.empty-write-btn {
    margin-top: 18px;
    padding: 10px 18px;

    border: none;
    border-radius: 7px;

    background: #806049;
    color: white;

    font-family: inherit;

    cursor: pointer;
}

.memory-modal {
    position: fixed;
    inset: 0;

    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background:
        rgba(45, 37, 30, .55);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity .25s ease,
        visibility .25s ease;
}

.memory-modal.show,
.memory-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-box {
    position: relative;

    width: 100%;
    max-width: 570px;
    max-height: 90vh;

    overflow-y: auto;

    padding: 38px;

    background: #f7efdf;

    border: 1px solid #d3c2aa;
    border-radius: 5px;

    box-shadow:
        0 20px 50px rgba(45, 35, 25, .25);

    transform:
        translateY(20px) scale(.97);

    transition:
        transform .3s ease;
}

.memory-modal.show .modal-box,
.memory-modal.active .modal-box {
    transform:
        translateY(0) scale(1);
}

.close-modal {
    position: absolute;

    top: 17px;
    left: 18px;

    width: 34px;
    height: 34px;

    border: none;
    border-radius: 50%;

    background: transparent;

    color: #76695c;

    font-size: 25px;

    cursor: pointer;

    transition: .2s;
}

.close-modal:hover {
    background: #e9dfd0;
    color: #443b34;
    transform: rotate(90deg);
}

.modal-label {
    color: #9a7258;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}

.modal-box h2 {
    margin-top: 7px;

    font-family: "Lalezar", sans-serif;

    color: #3d342d;

    font-size: 38px;
    font-weight: 400;
}

.modal-description {
    margin-top: 5px;
    color: #75695e;
    font-size: 12px;
    line-height: 1.8;
}

#memoryForm {
    margin-top: 27px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    color: #554a40;
    font-size: 12px;
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;

    border: 1px solid #cfc0ac;
    border-radius: 7px;

    background: #fffaf2;
    color: #433a32;

    font-family: inherit;
    font-size: 13px;

    outline: none;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

.form-group input,
.form-group select {
    height: 45px;
    padding: 0 13px;
}

.form-group textarea {
    min-height: 130px;
    padding: 12px 13px;
    resize: vertical;
    line-height: 1.9;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #9a7258;

    box-shadow:
        0 0 0 3px rgba(154, 114, 88, .1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #aaa095;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.submit-memory {
    position: relative;

    width: 100%;
    padding: 14px 24px;

    border: 1px solid rgba(255, 239, 211, 0.35);
    border-radius: 11px;

    background: linear-gradient(135deg,
            #806049 0%,
            #987255 100%);

    color: #fff6e7;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;

    cursor: pointer;
    overflow: hidden;
    isolation: isolate;

    box-shadow:
        0 7px 18px rgba(70, 50, 35, .17),
        inset 0 1px 0 rgba(255, 255, 255, .15);

    transition:
        transform .25s cubic-bezier(.2, .8, .2, 1),
        box-shadow .25s ease,
        background .25s ease;
}

.submit-memory::before {
    content: "";

    position: absolute;
    top: -60%;
    left: -80%;

    width: 55%;
    height: 220%;

    background: rgba(255, 241, 213, .18);

    transform: rotate(25deg);

    transition: left .65s ease;

    z-index: -1;
}

.submit-memory::after {
    content: "✦";

    position: absolute;
    right: 15px;
    top: 50%;

    transform: translateY(-50%) scale(0);

    color: #f3d7ae;
    font-size: 11px;

    opacity: 0;

    transition:
        transform .3s ease,
        opacity .3s ease;
}

.submit-memory:hover {
    transform: translateY(-3px) scale(1.015);

    background: linear-gradient(135deg,
            #8d674e,
            #aa7d5d);

    box-shadow:
        0 11px 25px rgba(70, 50, 35, .24),
        0 0 0 4px rgba(128, 96, 73, .08),
        inset 0 1px 0 rgba(255, 255, 255, .2);
}

.submit-memory:hover::before {
    left: 140%;
}

.submit-memory:hover::after {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.submit-memory:active {
    transform: translateY(-1px) scale(.97);

    box-shadow:
        0 5px 12px rgba(70, 50, 35, .18);
}

.submit-memory:disabled {
    cursor: not-allowed;
    opacity: .65;
    transform: none;
    box-shadow: none;
}

.memory-notification {
    position: fixed;

    bottom: 25px;
    left: 50%;

    z-index: 2000;

    padding: 11px 18px;

    background: #3c352e;
    color: white;

    border-radius: 8px;

    font-family: "Vazirmatn", sans-serif;
    font-size: 12px;

    opacity: 0;

    transform:
        translate(-50%, 20px);

    transition:
        opacity .25s ease,
        transform .25s ease;
}

.memory-notification.show {
    opacity: 1;

    transform:
        translate(-50%, 0);
}

footer {
    position: relative;

    padding: 38px 7%;

    background: #3c352e;
    color: #c6baaa;

    font-size: 11px;
}

.footer-content {
    position: relative;

    width: 100%;
    max-width: 1100px;

    margin: 0 auto;

    display: flex;

    align-items: center;
    justify-content: space-between;

    direction: ltr;
}

.footer-support {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-support a {
    color: #d5b99f;
    text-decoration: none;
    font-weight: 600;
    transition: color .2s ease;
}

.footer-support a:hover {
    color: white;
}

.footer-logo {
    color: #eee5d8;
    font-size: 20px;
    font-weight: 700;
}

.footer-heart {
    font-family: serif;
    color: #d5b99f;
    font-size: 22px;
}

.copyright {
    position: absolute;

    left: 50%;

    transform:
        translateX(-50%);

    white-space: nowrap;

    color: #c6baaa;
}

@media (max-width: 1050px) {

    .memory-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

}

@media (max-width: 800px) {

    .header {
        padding: 0 5%;
    }

    .nav {
        display: none;
    }

    .memory-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 25px 20px;
    }

    .section-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
    }

    footer {
        padding: 30px 5%;
    }

}

@media (max-width: 600px) {

    .header {
        height: 65px;
    }

    .logo {
        font-size: 17px;
    }

    .write-btn {
        display: none;
    }

    .hero {
        min-height: 430px;
        padding: 55px 20px;
    }

    .hero h1 {
        font-size: 48px;
    }

    .hero p {
        font-size: 13px;
    }

    .wall-section {
        padding: 52px 5% 75px;
    }

    .section-header h2 {
        font-size: 34px;
    }

    .filters {
        gap: 7px;
    }

    .filter-btn {
        padding: 8px 11px;
        font-size: 10px;
    }

    .memory-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .memory-card {
        min-height: 310px;
        padding: 26px 23px;
    }

    .memory-card h3 {
        font-size: 25px;
    }

    .like-btn {
        min-width: 68px;
        height: 36px;
    }

    .more-btn {
        width: 36px;
        height: 36px;
    }

    .view-count {
        height: 36px;
    }

    #myMemoriesGrid .memory-card {
        min-height: 180px;
        padding: 18px;
    }

    #myMemoriesGrid .memory-card h3 {
        font-size: 18px;
    }

    #myMemoriesGrid .memory-card p {
        font-size: 9px;
    }

    .footer-content {
        flex-direction: column;
        gap: 14px;
    }

    .copyright {
        position: static;
        order: 2;
        transform: none;
    }

}

@media (max-width: 550px) {

    .modal-box {
        padding: 30px 22px;
    }

    .modal-box h2 {
        font-size: 32px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

}

.memory-owner-actions {
    width: 100%;

    display: flex;
    align-items: center;
    gap: 8px;

    margin-top: 14px;
    padding-top: 12px;

    border-top: 1px solid rgba(100, 80, 60, .12);
}

.memory-owner-actions button {
    flex: 1;

    min-width: 0;

    height: 34px;

    border: none;
    border-radius: 8px;

    padding: 0 10px;

    font-family: inherit;
    font-size: 11px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background .2s ease,
        transform .2s ease;
}

.edit-memory {
    background: rgba(128, 96, 73, .12);
    color: #806049;
}

.edit-memory:hover {
    background: rgba(128, 96, 73, .22);
    transform: translateY(-1px);
}

.delete-memory {
    background: rgba(170, 70, 70, .10);
    color: #a34646;
}

.delete-memory:hover {
    background: rgba(170, 70, 70, .18);
    transform: translateY(-1px);
}

.edit-memory-btn,
.edit-memory {
    background: rgba(128, 96, 73, .12);
    color: #806049;
}

.edit-memory-btn:hover,
.edit-memory:hover {
    background: rgba(128, 96, 73, .22);
    transform: translateY(-1px);
}

.delete-memory-btn,
.delete-memory {
    background: rgba(170, 70, 70, .10);
    color: #a34646;
}

.delete-memory-btn:hover,
.delete-memory:hover {
    background: rgba(170, 70, 70, .18);
    transform: translateY(-1px);
}

.auth-area {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-btn {
    border: 1px solid rgba(128, 96, 73, .25);
    background: transparent;
    color: #806049;
    border-radius: 9px;
    padding: 8px 14px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: .2s ease;
}

.auth-btn:hover {
    background: rgba(128, 96, 73, .08);
}

.logout-btn {
    color: #9a4f4f;
    border-color: rgba(154, 79, 79, .2);
}

.auth-modal {
    position: fixed;
    inset: 0;

    background: rgba(45, 37, 29, .45);

    backdrop-filter: blur(5px);

    display: none;

    align-items: center;
    justify-content: center;

    z-index: 2000;

    padding: 20px;
}

.auth-modal.active {
    display: flex;
}

.auth-box {
    width: min(420px, 100%);

    background: #f8f3ea;

    border-radius: 18px;

    padding: 28px;

    position: relative;

    box-shadow:
        0 20px 60px rgba(50, 40, 30, .2);
}

.auth-box h2 {
    margin-bottom: 8px;
    color: #4f4035;
}

.auth-box p {
    color: #806f60;
    font-size: 14px;
    margin-bottom: 20px;
}

.auth-box input {
    width: 100%;

    border: 1px solid rgba(128, 96, 73, .2);

    background: #fffaf2;

    border-radius: 10px;

    padding: 12px;

    margin-bottom: 12px;

    font-family: inherit;

    outline: none;
}

.auth-box input:focus {
    border-color: #9a6249;
}

.auth-submit {
    width: 100%;

    border: none;
    border-radius: 10px;

    padding: 12px;

    background: #806049;
    color: white;

    font-family: inherit;
    font-weight: 600;

    cursor: pointer;
}

.close-auth {
    position: absolute;

    top: 12px;
    left: 14px;

    border: none;

    background: none;

    font-size: 25px;

    color: #806049;

    cursor: pointer;
}

.hero-subtitle {
    position: relative;
    display: inline-block;

    margin-top: 18px;
    padding: 4px 22px;

    font-family: inherit;
    font-size: 17px;
    font-weight: 500;
    line-height: 2;
    letter-spacing: .3px;

    color: #806049;

    background: linear-gradient(
        115deg,
        #806049 0%,
        #806049 34%,
        #a7835d 43%,
        #f8e7c8 49%,
        #fff5df 50%,
        #f8e7c8 51%,
        #a7835d 57%,
        #806049 66%,
        #806049 100%
    );

    background-size: 300% 100%;
    background-position: 120% 0;

    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;

    transform: translateZ(0);
    will-change: transform, opacity;

    animation:
        subtitleEntrance 1.35s cubic-bezier(.16, 1, .3, 1) both,
        subtitleShine 4.2s cubic-bezier(.4, 0, .2, 1) 1.15s infinite;
}

@keyframes subtitleEntrance {

    0% {
        opacity: 0;
        transform:
            translate3d(0, 58px, 0)
            scale(.94);
    }

    38% {
        opacity: 1;
        transform:
            translate3d(0, -9px, 0)
            scale(1.012);
    }

    58% {
        transform:
            translate3d(0, 3px, 0)
            scale(.998);
    }

    76% {
        transform:
            translate3d(0, -1.5px, 0)
            scale(1.002);
    }

    100% {
        opacity: 1;
        transform:
            translate3d(0, 0, 0)
            scale(1);
    }
}

@keyframes subtitleShine {

    0% {
        background-position: 120% 0;
    }

    15% {
        background-position: 120% 0;
    }

    43% {
        background-position: -20% 0;
    }

    100% {
        background-position: -20% 0;
    }
}

.hero-subtitle::before {
    content: "“";

    position: absolute;
    right: -3px;
    top: -8px;

    color: #574227;
    -webkit-text-fill-color: #574227;

    font-family: Georgia, serif;
    font-size: 30px;
    font-weight: 700;
    line-height: 1;

    transform: translateY(0);
    transition:
        transform .4s ease,
        color .4s ease;
}

.hero-subtitle::after {
    content: "”";

    position: absolute;
    left: -3px;
    bottom: -8px;

    color: #c9a77a;
    -webkit-text-fill-color: #574227;

    font-family: Georgia, serif;
    font-size: 30px;
    font-weight: 700;
    line-height: 1;

    transform: translateY(0);
    transition:
        transform .4s ease,
        color .4s ease;
}

@keyframes quoteLeftIn {
    from {
        opacity: 0;
        transform: translateY(8px) rotate(-8deg);
    }

    to {
        opacity: 1;
        transform: translateY(0) rotate(0);
    }
}

@keyframes quoteRightIn {
    from {
        opacity: 0;
        transform: translateY(-8px) rotate(8deg);
    }

    to {
        opacity: 1;
        transform: translateY(0) rotate(0);
    }
}

.hero-subtitle::before {
    animation:
        quoteLeftIn .75s cubic-bezier(.16, 1, .3, 1) .35s both;
}

.hero-subtitle::after {
    animation:
        quoteRightIn .75s cubic-bezier(.16, 1, .3, 1) .45s both;
}

.full-memory-modal,
.share-fallback-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity .3s ease,
        visibility .3s ease;
}

.full-memory-modal.active,
.share-fallback-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.full-memory-overlay,
.share-fallback-overlay {
    position: absolute;
    inset: 0;
    background: rgba(35, 27, 21, .45);
    backdrop-filter: blur(7px);
}

.full-memory-box,
.share-fallback-box {
    position: relative;
    z-index: 1;
    width: min(680px, 100%);
    max-height: 85vh;
    overflow-y: auto;
    background: #fffaf4;
    border: 1px solid rgba(128, 96, 73, .16);
    border-radius: 24px;
    padding: 30px;
    box-shadow:
        0 25px 80px rgba(50, 35, 25, .25);
    transform: translateY(20px) scale(.97);
    transition: transform .3s ease;
}

.full-memory-modal.active .full-memory-box,
.share-fallback-modal.active .share-fallback-box {
    transform: translateY(0) scale(1);
}

.full-memory-close,
.share-fallback-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(128, 96, 73, .09);
    color: #806049;
    font-size: 24px;
    cursor: pointer;
    transition:
        background .2s ease,
        transform .2s ease;
}

.full-memory-close:hover,
.share-fallback-close:hover {
    background: rgba(128, 96, 73, .17);
    transform: rotate(8deg);
}

.full-memory-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 18px;
    padding-right: 35px;
}

.full-memory-category {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(128, 96, 73, .1);
    color: #806049;
    font-size: 12px;
}

.full-memory-time {
    color: #9b8d82;
    font-size: 12px;
}

.full-memory-box h2 {
    margin: 0 0 10px;
    color: #3c332c;
    font-size: 25px;
    line-height: 1.5;
}

.full-memory-author {
    margin-bottom: 22px;
    color: #806049;
    font-size: 13px;
    font-weight: 600;
}

.full-memory-content {
    color: #51473f;
    font-size: 15px;
    line-height: 2.1;
    white-space: pre-wrap;
    word-break: break-word;
}

.full-memory-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(128, 96, 73, .12);
}

.full-memory-share,
.full-memory-close-bottom,
.share-fallback-box button {
    border: none;
    border-radius: 10px;
    padding: 11px 20px;
    font-family: inherit;
    cursor: pointer;
    transition:
        transform .2s ease,
        background .2s ease;
}

.full-memory-share {
    background: #806049;
    color: white;
}

.full-memory-close-bottom {
    background: rgba(128, 96, 73, .1);
    color: #806049;
}

.full-memory-share:hover,
.full-memory-close-bottom:hover,
.share-fallback-box button:hover {
    transform: translateY(-2px);
}

.read-more-memory {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 0;
    border: none;
    background: transparent;
    color: #806049;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition:
        gap .2s ease,
        opacity .2s ease;
}

.read-more-memory:hover {
    gap: 10px;
    opacity: .75;
}

.memory-preview {
    overflow-wrap: anywhere;
}

.shared-memory-highlight {
    animation:
        sharedMemoryGlow 1.2s ease-in-out 2;
}

@keyframes sharedMemoryGlow {

    0% {
        box-shadow:
            0 0 0 0 rgba(128, 96, 73, 0);
    }

    50% {
        box-shadow:
            0 0 0 5px rgba(128, 96, 73, .25),
            0 15px 45px rgba(80, 55, 40, .18);
    }

    100% {
        box-shadow:
            0 0 0 0 rgba(128, 96, 73, 0);
    }
}

.share-fallback-box {
    max-width: 500px;
}

.share-fallback-box h3 {
    margin-top: 0;
    color: #3c332c;
}

.share-fallback-box p {
    color: #6f6258;
    font-size: 13px;
}

#shareFallbackInput {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid rgba(128, 96, 73, .2);
    border-radius: 10px;
    background: #fff;
    color: #51473f;
    direction: ltr;
    margin: 10px 0;
    outline: none;
}

#shareFallbackCopy {
    background: #806049;
    color: white;
}

@media (max-width: 600px) {

    .full-memory-modal,
    .share-fallback-modal {
        padding: 12px;
    }

    .full-memory-box,
    .share-fallback-box {
        padding: 24px 20px;
        border-radius: 20px;
        max-height: 90vh;
    }

    .full-memory-box h2 {
        font-size: 21px;
    }

    .full-memory-content {
        font-size: 14px;
        line-height: 2;
    }

    .full-memory-actions {
        flex-direction: column;
    }

    .full-memory-share,
    .full-memory-close-bottom {
        width: 100%;
    }

    .full-memory-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

.report-modal {
    position: fixed;
    inset: 0;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(0, 0, 0, 0.55);

    z-index: 9999;
}

.report-modal {
    position: fixed;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(15, 18, 30, 0.65);

    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);

    z-index: 9999;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 0.4s ease,
        visibility 0.4s ease,
        backdrop-filter 0.5s ease;
}

.report-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
}

.report-modal-box {
    position: relative;

    width: min(100%, 480px);

    padding: 32px;

    background: #ffffff;

    border-radius: 24px;

    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.28);

    text-align: right;

    opacity: 0;

    transform:
        translateY(45px)
        scale(0.88)
        rotateX(8deg);

    transition:
        opacity 0.4s ease,
        transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.report-modal.active .report-modal-box {
    opacity: 1;

    transform:
        translateY(0)
        scale(1)
        rotateX(0deg);
}

.close-report-modal {
    position: absolute;

    top: 14px;
    left: 14px;

    width: 40px;
    height: 40px;

    border: none;
    border-radius: 50%;

    background: #f4f4f6;

    color: #555;

    font-family: inherit;

    font-size: 25px;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.3s ease;
}

.close-report-modal:hover {
    background: #111;
    color: #fff;

    transform:
        rotate(90deg)
        scale(1.08);
}

.close-report-modal:active {
    transform:
        rotate(90deg)
        scale(0.9);
}

.report-modal-box h2 {
    margin: 10px 0;

    font-size: 24px;
}

.report-modal-box .modal-description {
    margin-bottom: 22px;

    color: #777;

    line-height: 1.8;
}

.report-reasons {
    display: flex;

    flex-direction: column;

    gap: 11px;
}

.report-reason {
    width: 100%;

    padding: 15px 18px;

    border: 1px solid #e8e8ec;

    border-radius: 14px;

    background: #fafafa;

    color: #333;

    font-family: inherit;

    font-size: 15px;

    font-weight: 500;

    text-align: right;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.report-reason:hover {
    background: #fff;

    border-color: #222;

    transform: translateY(-2px);

    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.08);
}

.report-reason:active {
    transform: scale(0.97);
}

.report-btn {
    position: relative !important;

    height: 36px !important;
    min-width: 36px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;

    padding: 0 12px !important;

    border: 1px solid rgba(150, 80, 80, 0.18) !important;
    border-radius: 50px !important;

    background: rgba(255, 245, 243, 0.55) !important;
    color: #9a5b52 !important;

    font-family: inherit !important;
    font-size: 10px !important;
    font-weight: 600 !important;

    cursor: pointer !important;

    box-shadow:
        0 3px 10px rgba(80, 50, 40, 0.06),
        inset 0 1px 0 rgba(255,255,255,.5) !important;

    transition:
        transform .2s ease,
        background .2s ease,
        color .2s ease,
        box-shadow .2s ease,
        border-color .2s ease !important;
}

.report-memory-btn {
    border: none;
    background: #fff1f2;
    color: #e11d48;
    padding: 7px 10px;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.report-memory-btn:hover {
    background: #ffe4e6;
    transform: translateY(-1px);
}

.report-memory-btn:active {
    transform: scale(0.96);
}

.report-memory-btn:focus-visible {
    outline: 2px solid #fb7185;
    outline-offset: 2px;
}

.report-memory-btn {
    border: none;
    background: #fff1f2;
    color: #5e4147;
    padding: 7px 10px;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.report-memory-btn:hover {
    background: #ffe4e6;
    transform: translateY(-1px);
}

.report-memory-btn:active {
    transform: scale(0.96);
}

.report-memory-btn:focus-visible {
    outline: 2px solid #ffced5;
    outline-offset: 2px;
}

.filter-btn[data-category="عاشقانه"] {
    position: relative;
}

.filter-btn[data-category="عاشقانه"]::before {
    content: "♡";
    margin-left: 5px;
    font-size: 13px;
    transition: transform .25s ease;
}

.filter-btn[data-category="عاشقانه"]:hover::before {
    transform: scale(1.25);
}

.filter-btn[data-category="عاشقانه"].active::before {
    content: "♥";
    color: #ffe7e5;
}
.my-memories {
    padding: 80px 0;
}

.my-memory-card {
    transform: scale(.98);
}

.empty {
    text-align: center;
    padding: 50px 20px;
    color: #8b7b6a;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(51, 44, 38, .7);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-box {
    background: #f5efe6;
    border-radius: 24px;
    width: min(600px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    padding: 35px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}

.modal-close {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: #e8ddd0;
    color: #5c4b3e;
    font-size: 22px;
    cursor: pointer;
    transition: .25s;
}

.modal-close:hover {
    background: #d7c8b8;
    transform: rotate(90deg);
}

.modal-box h3 {
    font-family: "Lalezar", sans-serif;
    font-size: 28px;
    margin-bottom: 25px;
    color: #4a3b30;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-weight: 700;
    color: #5c4b3e;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    border: 1px solid #d8cabc;
    border-radius: 12px;
    padding: 13px 15px;
    font-family: inherit;
    font-size: 14px;
    background: #fffaf4;
    color: #332c26;
    outline: none;
    transition: .25s;
}

.form-group textarea {
    resize: vertical;
    min-height: 130px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #9b7653;
    box-shadow: 0 0 0 3px rgba(155, 118, 83, .12);
}

.submit-memory {
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 14px;
    background: #6d5038;
    color: #fff;
    font-family: inherit;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: .25s;
    margin-top: 8px;
}

.submit-memory::before {
    content: "✦";
    margin-left: 7px;
}

.submit-memory:hover {
    background: #543b29;
    transform: translateY(-2px);
}

.submit-memory:active {
    transform: translateY(0);
}

.submit-memory:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
}

.notification {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: #4f3d30;
    color: #fff;
    padding: 14px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, .2);
    z-index: 2000;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: .3s;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.footer {
    background: #4b3a2e;
    color: #e8ddd0;
    padding: 35px 20px;
    text-align: center;
    margin-top: 60px;
}

.footer p {
    margin: 6px 0;
}

.footer a {
    color: #f2c7a5;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

@media (max-width: 1050px) {
    .memory-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero h1 {
        font-size: 48px;
    }
}

@media (max-width: 800px) {
    .header {
        padding: 15px 20px;
    }

    .nav {
        gap: 18px;
    }

    .hero {
        min-height: 500px;
    }

    .hero h1 {
        font-size: 42px;
    }

    .hero p {
        font-size: 15px;
    }

    .memory-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .card-content {
        padding: 18px;
    }
}
@media (max-width: 600px) {
    .header {
        flex-wrap: wrap;
        gap: 15px;
    }
    .nav {
        order: 3;
        width: 100%;
        justify-content: center;
        overflow-x: auto;
        padding-bottom: 4px;
    }
    .logo {
        font-size: 24px;
    }
    .write-btn {
        padding: 9px 14px;
        font-size: 13px;
    }
    .hero {
        min-height: 460px;
        padding: 60px 20px;
    }
    .hero h1 {
        font-size: 34px;
    }
    .hero p {
        font-size: 14px;
    }
    .wall {
        padding: 55px 15px;
    }
    .memory-grid {
        grid-template-columns: 1fr;
    }
    .filters {
        gap: 7px;
    }
    .filter-btn {
        padding: 7px 12px;
        font-size: 12px;
    }
    .modal-box {
        padding: 25px 18px;
    }
    .notification {
        right: 15px;
        left: 15px;
        bottom: 15px;
        text-align: center;
    }
}
@media (max-width: 550px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .my-memories-btn {
        width: 100%;
    }
}
.typing-container {
    width: 100%;
    height: 55px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    flex: 0 0 55px;
    overflow: visible;
}
.memory-typing {
    margin: 0 !important;
    direction: rtl;
    display: block;
    width: max-content;
    max-width: 100%;
    white-space: nowrap;
    font-family: "Vazirmatn", Tahoma, sans-serif;
    font-size: clamp(16px, 2vw, 22px);
    font-weight: 500;
    line-height: 1.8;
    color: #686872;
    position: relative;
    transform: translateY(8px);
    opacity: 0;
    animation:
        typingFade 0.8s ease forwards 0.3s,
        typingMove 0.8s ease forwards 0.3s;
}
@keyframes typingFade {

    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }

}

@keyframes typingMove {

    from {
        transform: translateY(8px);
    }

    to {
        transform: translateY(0);
    }

}

.memory-typing::after {

    content: "";

    position: absolute;

    right: 0;
    bottom: -6px;

    width: 0;
    height: 1px;

    background: #686872;

    opacity: 0.35;

    animation: typingLine 1s ease forwards 1.1s;
}


@keyframes typingLine {

    from {
        width: 0;
    }

    to {
        width: 100%;
    }

}

.typing-container + .hero-btn {
    flex-shrink: 0;
}

@media (max-width: 600px) {

    .typing-container {
        height: 48px;
        flex-basis: 48px;
    }

    .memory-typing {
        font-size: 15px;
    }

}

.like-btn {
    position: relative;
    isolation: isolate;
    overflow: visible;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 58px;
    padding: 7px 11px;
    border: 1px solid rgba(240, 68, 104, .15);
    border-radius: 999px;
    background: #fff5f7;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition:
        background 220ms ease,
        border-color 220ms ease,
        color 220ms ease,
        box-shadow 220ms ease,
        transform 180ms ease;
}

.like-btn .heart {
    position: relative;
    display: inline-block;
    z-index: 2;
    font-size: 19px;
    line-height: 1;
    transform-origin: center;
    will-change: transform, filter;
}

.like-btn .like-count {
    display: inline-block;
    position: relative;
    z-index: 2;
    font-size: 11px;
    line-height: 1;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.like-btn:hover {
    background: #ffedf2;
    border-color: rgba(240, 68, 104, .3);
    box-shadow: 0 4px 14px rgba(240, 68, 104, .08);
}

.like-btn:active {
    transform: scale(.95);
}

.like-btn.liked {
    color: #f04468;
    background: #fff0f4;
    border-color: rgba(240, 68, 104, .25);
}

.like-btn.liked .heart {
    color: #f04468;
    text-shadow: 0 1px 8px rgba(240, 68, 104, .18);
}

.like-btn.like-explosion {
    animation: memoryAura 850ms ease-out both;
}

.like-btn.like-explosion .heart {
    animation: memoryHeart 760ms cubic-bezier(.16, 1, .3, 1) both;
}

.like-btn.like-explosion .like-count {
    animation: memoryCount 460ms cubic-bezier(.16, 1, .3, 1) both;
}

.like-btn.like-explosion::before {
    content: "";
    position: absolute;
    inset: -3px;
    z-index: -1;
    border-radius: inherit;
    border: 1px solid rgba(240, 68, 104, .4);
    pointer-events: none;
    animation: memoryHalo 780ms ease-out both;
}

.like-btn.like-explosion .heart::before {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    pointer-events: none;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        transparent 235deg,
        rgba(255, 118, 155, .15) 255deg,
        rgba(255, 118, 155, 1) 285deg,
        rgba(255, 215, 227, 1) 300deg,
        transparent 325deg,
        transparent 360deg
    );
    -webkit-mask: radial-gradient(
        farthest-side,
        transparent calc(100% - 1.5px),
        #000 calc(100% - 1px)
    );
    mask: radial-gradient(
        farthest-side,
        transparent calc(100% - 1.5px),
        #000 calc(100% - 1px)
    );
    animation: memoryOrbit 800ms linear both;
}

.like-particle {
    position: absolute;
    z-index: 5;
    top: 50%;
    left: 50%;
    color: var(--particle-color, #f04468);
    font-size: var(--particle-size, 11px);
    line-height: 1;
    pointer-events: none;
    user-select: none;
    will-change: transform, opacity;
    animation: memoryParticle 850ms cubic-bezier(.16, 1, .3, 1) both;
}

@keyframes memoryHeart {
    0% {
        transform: scale(1);
        filter: brightness(1);
    }
    20% {
        transform: scale(.78) rotate(-8deg);
    }
    42% {
        transform: scale(1.3) rotate(7deg);
        filter: brightness(1.2);
    }
    65% {
        transform: scale(.94) rotate(-3deg);
    }
    82% {
        transform: scale(1.08);
    }
    100% {
        transform: scale(1);
        filter: brightness(1);
    }
}

@keyframes memoryAura {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(240, 68, 104, 0);
    }
    35% {
        box-shadow:
            0 0 0 4px rgba(240, 68, 104, .07),
            0 4px 18px rgba(240, 68, 104, .12);
    }
    70% {
        box-shadow:
            0 0 0 7px rgba(240, 68, 104, .025),
            0 0 22px rgba(240, 68, 104, .07);
    }
}

@keyframes memoryHalo {
    0% {
        opacity: 0;
        transform: scale(.96);
    }
    30% {
        opacity: .8;
    }
    100% {
        opacity: 0;
        transform: scale(1.13);
    }
}

@keyframes memoryOrbit {
    0% {
        opacity: 0;
        transform: rotate(0deg);
    }
    8% {
        opacity: 1;
    }
    88% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: rotate(360deg);
    }
}

@keyframes memoryParticle {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(.2) rotate(0deg);
    }
    18% {
        opacity: 1;
    }
    72% {
        opacity: .85;
    }
    100% {
        opacity: 0;
        transform:
            translate(
                calc(-50% + var(--x)),
                calc(-50% + var(--y))
            )
            scale(var(--particle-end-scale, .45))
            rotate(var(--rotation, 35deg));
    }
}

@keyframes memoryCount {
    0% {
        transform: translateY(0) scale(1);
    }
    38% {
        transform: translateY(-2px) scale(1.12);
    }
    68% {
        transform: translateY(1px) scale(.98);
    }
    100% {
        transform: translateY(0) scale(1);
    }
}

.like-btn.count-changed .like-count {
    animation: memoryCount 400ms cubic-bezier(.16, 1, .3, 1);
}

.like-btn:focus-visible {
    outline: 2px solid #f04468;
    outline-offset: 3px;
}

.like-btn:disabled {
    cursor: pointer;
    opacity: .8;
}

@media (prefers-reduced-motion: reduce) {
    .like-btn,
    .like-btn *,
    .like-btn::before,
    .like-particle {
        animation: none !important;
        transition: none !important;
    }

    .like-particle {
        display: none !important;
    }
}

.like-btn .like-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 1.4em;
    overflow: hidden;
    vertical-align: middle;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.like-count .like-digit {
    display: inline-block;
    height: 1.4em;
    overflow: hidden;
}

.like-count .like-digit-reel {
    display: flex;
    flex-direction: column;
    transform: translateY(0);
    will-change: transform;
}

.like-count .like-digit-number {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 1.4em;
    min-height: 1.4em;
    line-height: 1.4em;
}

.like-count .like-digit-reel.rolling {
    transition: transform 420ms cubic-bezier(.22, 1, .36, 1);
}

@media (prefers-reduced-motion: reduce) {
    .like-count .like-digit-reel.rolling {
        transition: none;
    }
}

.like-btn .like-count {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    font-variant-numeric: tabular-nums;
    will-change: transform, opacity;
}

.like-btn .like-count.number-up {
    animation: numberRollUp 350ms cubic-bezier(.2, .8, .2, 1);
}

.like-btn .like-count.number-down {
    animation: numberRollDown 350ms cubic-bezier(.2, .8, .2, 1);
}

@keyframes numberRollUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes numberRollDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/*This part is about announcements*/

/* ========================================
   DIVAR KHATEREH — TELEGRAM BAR
======================================== */

.telegram-bar,
.telegram-bar * {
    box-sizing: border-box;
}

.telegram-bar {
    position: relative;
    z-index: 20;
    width: 100%;
    padding: 14px 52px;
    background: rgba(255, 255, 255, 0.3);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
    font-family: 'Vazirmatn', sans-serif;
}

.telegram-bar[hidden] {
    display: none !important;
}

/* Main link */

.telegram-link {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    max-width: 1100px;
    min-width: 0;
    margin: 0 auto;
    direction: rtl;
    color: inherit;
    text-decoration: none;
}

/* Telegram icon */

.telegram-icon {
    display: flex;
    flex: 0 0 25px;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    color: #229ED9;
}

.telegram-icon svg {
    display: block;
    width: 23px;
    height: 23px;
}

/* Message */

.telegram-message {
    display: flex;
    flex: 0 1 auto;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    text-align: right;
}

.telegram-message strong,
.telegram-message #telegramTyping {
    display: block;
    min-width: 0;
    margin: 0;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.9;
    letter-spacing: 0;
    direction: rtl;
    text-align: right;
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
}

/* Typing text */

#telegramTyping {
    color: #332c26;
}

/* Optional subtitle */

.telegram-message small {
    font-family: 'Vazirmatn', sans-serif;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.7;
    color: rgba(51, 44, 38, 0.72);
}

/* Join button */

.telegram-cta {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin: 0;
    padding: 8px 13px;

    /* Neutral styling; replace with your original button colors */
    border: 1px solid rgba(51, 44, 38, 0.16);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.25);
    color: #332c26;

    font-family: 'Vazirmatn', sans-serif;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.7;
    white-space: nowrap;

    transition: background 180ms ease, border-color 180ms ease;
}

.telegram-link:hover .telegram-cta {
    background: rgba(255, 255, 255, 0.45);
    border-color: rgba(51, 44, 38, 0.25);
}

/* Close button */

.telegram-close {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);

    display: grid;
    place-items: center;

    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 8px;

    background: transparent;
    color: rgba(51, 44, 38, 0.65);

    font-family: Arial, sans-serif;
    font-size: 23px;
    font-weight: 400;
    line-height: 1;

    cursor: pointer;
    transition: background 180ms ease, color 180ms ease;
}

.telegram-close:hover {
    background: rgba(51, 44, 38, 0.06);
    color: #332c26;
}

/* Typing cursor */

#telegramTyping::after {
    content: '';
    display: inline-block;
    width: 2px;
    height: 0.9em;
    margin-right: 4px;
    vertical-align: -0.1em;
    border-radius: 2px;
    background: #229ED9;
    animation: telegramCursor 750ms ease-in-out infinite;
}

@keyframes telegramCursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}

/* Tablet */

@media (max-width: 800px) {
    .telegram-bar {
        padding: 13px 44px;
    }

    .telegram-link {
        gap: 10px;
    }

    .telegram-message strong,
    .telegram-message #telegramTyping {
        font-size: 14px;
    }

    .telegram-cta {
        padding: 7px 10px;
    }
}

/* Mobile */

@media (max-width: 600px) {
    .telegram-bar {
        padding: 12px 44px 12px 54px;
    }

    .telegram-link {
        justify-content: flex-start;
        gap: 8px;
        max-width: 100%;
    }

    .telegram-icon {
        flex-basis: 20px;
        width: 20px;
        height: 20px;
    }

    .telegram-icon svg {
        width: 19px;
        height: 19px;
    }

    .telegram-message {
        flex: 1 1 0;
        min-width: 0;
    }

    .telegram-message strong,
    .telegram-message #telegramTyping {
        font-size: 12px;
        line-height: 1.9;
    }

    .telegram-message small {
        font-size: 10px;
    }

    .telegram-cta {
        flex: 0 0 auto;
        gap: 3px;
        margin-left: 8px;
        padding: 6px 7px;
        border-radius: 8px;
        font-size: 9px;
        line-height: 1.6;
    }

    .telegram-close {
        left: 10px;
        width: 27px;
        height: 27px;
        font-size: 22px;
    }
}

/* Very small phones */

@media (max-width: 380px) {
    .telegram-bar {
        padding-right: 38px;
        padding-left: 54px;
    }

    .telegram-link {
        gap: 6px;
    }

    .telegram-icon {
        flex-basis: 18px;
        width: 18px;
        height: 18px;
    }

    .telegram-icon svg {
        width: 17px;
        height: 17px;
    }

    .telegram-message strong,
    .telegram-message #telegramTyping {
        font-size: 11px;
    }

    .telegram-cta {
        margin-left: 8px;
        padding: 5px;
        font-size: 8px;
    }

    .telegram-close {
        left: 7px;
    }
}

/* Accessibility */

@media (prefers-reduced-motion: reduce) {
    #telegramTyping::after {
        animation: none;
    }

    .telegram-cta,
    .telegram-close {
        transition: none;
    }
}

/*This part is about announcements*/
