    :root {
        /* -- Light Mode Colors -- */
        --background-light: #f4f7fc;
        --card-background-light: #ffffff;
        --text-color-light: #343a40;
        --muted-text-color-light: #6c757d;
        --border-color-light: #e0e5ec;

        /* بنفش */
        --hover-color-light: #5a32a3;
        --link-color-light: #0d6efd;
        --link-hover-color-light: #0056b3;

        /* -- Dark Mode Colors -- */
        --background-dark: #121212;
        /* مشکی خیلی تیره */
        --card-background-dark: #1e1e1e;
        /* خاکستری تیره برای کارت‌ها */
        --text-color-dark: #e0e0e0;
        /* متن روشن */
        --muted-text-color-dark: #a0a0a0;
        /* متن کم‌رنگ‌تر */
        --border-color-dark: #3a3a3a;
        /* مرز تیره‌تر */

        /* بنفش روشن‌تر برای دارک مود */
        --hover-color-dark: #b39ddb;
        /* بنفش روشن‌تر برای هاور */
        --link-color-dark: #6699ff;
        /* آبی روشن‌تر */
        --link-hover-color-dark: #99ccff;

        /* -- Default Variables (Light Mode) -- */
        --background: var(--background-light);
        --card-background: var(--card-background-light);
        --text-color: var(--text-color-light);
        --muted-text-color: var(--muted-text-color-light);
        --border-color: var(--border-color-light);

        --line-height: 1.8;
        --border-radius: 15px;
        --box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
        --box-shadow-dark: 0 8px 25px rgba(0, 0, 0, 0.3);
        /* سایه تیره‌تر برای دارک مود */


    }




    /* poets */

    .poet-card-custom {
        display: flex;
        align-items: center;
        padding: 10px;
        border-radius: 8px;
        transition: transform .2s, box-shadow .2s;
        background-color: var(--poet-card-custom-bg);
        box-shadow: 0 2px 5px var(--poet-card-custom-box-shadow);
        min-height: 100px;
        overflow: hidden;
        border: 1px solid var(--main-nav-border-bt);
    }

    .poet-card-custom:hover {
        transform: translateY(-4px);
        box-shadow: 0 6px 12px var(--poet-card-custom-hover-box-shadow);
    }

    .poet-info-custom {
        margin-right: 15px;
        text-align: right;
        flex-grow: 1;
    }

    .poet-name-custom {
        font-size: 1.1rem;
        /* font-weight: bold; */
        margin-bottom: 0;
        /* color: #333; */
    }

    .poet-avatar-custom {
        width: 75px;
        height: 75px;
        object-fit: cover;
        flex-shrink: 0;
        /* جلوگیری از کوچک شدن عکس */
        margin-left: 0;
        /* حذف margin-left چون عکس سمت راست است */
        margin-right: auto;
        /* عکس را به سمت راست هل می‌دهد */
    }

    /* .poet-row .full-link {
        display: block;
        text-decoration: none;
        color: inherit;
    } */

    /* .poet-row .full-link:hover {
        color: inherit;
    } */

    /* برای جایگزینی div کلیت کارت با لینک */
    /* .poet-card-wrapper {
        position: relative;
    }

    .poet-card-wrapper a.full-link {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
    }

    .poet-card-wrapper .poet-card-custom {
        z-index: 2;
    } */

    /* book */
    .poet-profile-container {
        background-color: var(--mahfel-card-bg);
        border-radius: var(--border-radius);
        border: 1px solid var(--border-mahfel-card);
        box-shadow: var(--box-shadow-color);
        padding: 20px;
        /* margin-top: 30px; */
        margin-bottom: 30px;
        overflow: hidden;
        transition: background-color 0.3s ease, box-shadow 0.3s ease;
    }

    .poet-header {
        text-align: center;
        margin-bottom: 20px;
        padding-bottom: 5px;
        border-bottom: 2px dashed var(--border-color);
        position: relative;
        transition: border-color 0.3s ease;
    }


    .poet-name-main {
        font-size: 2rem;
        font-weight: 600;
        color: var(--primary-color);
        margin-bottom: 5px;
        transition: color 0.3s ease;
    }

    .poet-subtitle {
        font-size: 1.1rem;
        color: var(--muted-text-color);
        margin-bottom: 25px;
        transition: color 0.3s ease;

    }

    .poet-subtitle a {
        text-decoration: none;
    }


    /* ===== کارت شاعر با دکمه ویرایش یکپارچه ===== */
    .poet-card-wrapper {
        position: relative;
        transition: transform 0.2s ease;
    }

    .poet-card-wrapper:hover {
        transform: translateY(-4px);
    }

    /* دکمه ویرایش درون کارت */
    .btn-edit-poet-card,
    .edit-cat-modal-btn,
    .edit-cat-btn,
    .edit-poem-title-btn {
        position: absolute;
        bottom: 12px;
        left: 12px;
        background: #5c636a;
        backdrop-filter: blur(4px);
        border: none;
        border-radius: 40px;
        /* border: 1px solid #6c757d; */
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 1rem;
        cursor: pointer;
        transition: all 0.2s ease;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
        z-index: 5;
    }

    .edit-cat-btn, .edit-poem-title-btn {
        position: unset;
        bottom: unset;

    }

    .btn-edit-poet-card:hover,
    .edit-cat-modal-btn:hover,
    .edit-cat-btn:hover:hover,
    .edit-poem-title-btn:hover {
        background: #464b50;
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

    /* در موبایل دکمه همیشه قابل مشاهده و بزرگ‌تر */
    @media (max-width: 768px) {

        .btn-edit-poet-card,
        .edit-cat-modal-btn,
        .edit-cat-btn,
        .edit-poem-title-btn:hover {
            /* width: 44px;
        height: 44px; */
            /* bottom: 10px; */
            left: 10px;
            /* font-size: 1.2rem; */
        }
    }

    /* اطمینان از اینکه لینک اصلی کل کارت را می‌پوشاند */
    .poet-card-wrapper .full-link {
        display: block;
        text-decoration: none;
        color: inherit;
    }

    /* حذف دکمه قبلی در صورت وجود */
    .poet-card-wrapper .d-flex.justify-content-center {
        display: none;
    }

    .biography-section,
    .category-section {
        border-left: 1px solid var(--border-color);
        padding-left: 30px;
        transition: all 0.4s ease-in-out, border-color 0.3s ease;
    }

    .col-lg-12.category-section {
        border-left: unset;
        padding-left: unset;

    }

    .works-section {
        padding-right: 30px;
        transition: all 0.4s ease-in-out;
    }

    .biography-content p,
    .works-content ul li,
    .category-content ul li {
        line-height: var(--line-height);
        color: var(--text-color);
        /* این رنگ خودش متغیر است */
        text-align: justify;
    }

    .works-content ul,
    .category-content ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .works-content ul li,
    .category-content ul li {
        margin-bottom: 15px;
        position: relative;
        /* padding-right: 40px; */
        transition: transform 0.2s ease, color 0.3s ease;
    }

    .works-content ul li::before {}

    .works-content ul li a,
    .category-content ul li a {
        color: var(--poet-link-color);
        text-decoration: none;
        font-weight: 500;
        transition: color 0.3s ease;
    }

    .works-content ul li a:hover,
    .category-content ul li a:hover {
        color: var(--link-hover-color);
    }

    .works-content ul li:hover,
    .category-content ul li:hover {
        color: var(--hover-color);
    }

    /* -- Responsive adjustments -- */
    @media (max-width: 991.98px) {
        .biography-section {
            border-left: none;
            border-bottom: 1px solid var(--border-color);
            padding-left: 0;
            padding-bottom: 30px;
            margin-bottom: 30px;
            transition: border-color 0.3s ease;
        }

        .works-section {
            padding-right: 0;
        }

        .poet-header {
            padding-bottom: 15px;
        }

        .poet-name-main {
            font-size: 1.8rem;
        }

        .poet-subtitle {
            font-size: 1rem;
        }
    }

    @media (max-width: 575.98px) {
        .poet-profile-container {
            padding: 25px;
        }

        .poet-name-main {
            font-size: 1.8rem;
        }

        .poet-subtitle {
            font-size: 0.95rem;
        }

        .works-content ul li,
        .category-content ul li {
            /* padding-right: 30px; */
            font-size: 0.95rem;
        }

        /* .works-content ul li::before {
                 font-size: 1.1rem;
             } */
    }




    /* show poem trext */
    .thread-card {
        border: 1px solid rgba(15, 23, 42, .08);
        border-radius: 18px;
        padding: 1.6rem;
        background: #fff;
        box-shadow: 0 16px 38px rgba(15, 23, 42, .08);
    }

    .thread-title {
        font-size: 1.4rem;
        font-weight: 700;
        color: #1f2937;
    }

    .thread-meta {
        color: #64748b;
        font-size: .9rem;
    }

    .poem-content {
        line-height: 2rem;
        text-align: center;
    }



    .poem-content .position-0 {}

    .poem-content .position-1 {
        margin-bottom: 10px;
    }

    .poem-content .position-2 {
        font-weight: 600;
    }

    .poem-content .position-3 {
        font-weight: 600;
        margin-bottom: 10px;
    }

    .poem-content .position-5, 
    .poem-content .position--1{

        margin-top: 5px;
        margin-bottom: 10px;
        text-align: start;
        font-weight: 500;
    }

    .reply-depth-1 {
        border-right: 4px solid rgba(108, 99, 255, .35);
    }

    .reply-depth-2 {
        border-right: 4px solid rgba(255, 122, 162, .35);
        margin-right: 12px;
    }

    .reply-depth-3 {
        border-right: 4px solid rgba(15, 118, 110, .35);
        margin-right: 24px;
    }

    .reply-depth-4 {
        border-right: 4px solid rgba(234, 88, 12, .35);
        margin-right: 36px;
    }

    .reply-author {
        font-weight: 600;
        color: #1f2937;
    }

    .poem-author {
        display: inline-flex;
        align-items: center;
        gap: .5rem;
        transition: transform .2s, box-shadow .2s;
        background-color: var(--poet-card-custom-bg);
        box-shadow: 0 2px 5px var(--poet-card-custom-box-shadow);
        backdrop-filter: blur(4px);
        border: 1px solid var(--main-nav-border-bt);
        padding: 10px;
        border-radius: 8px;
    }

    .poem-author img {
        width: 36px;
        height: 36px;
        border-radius: 999px;
        object-fit: cover;
        border: 2px solid var(--author-img-border-color);
    }

    .btns-next-back .btn-outline-primary {
        color: var(--beytas-bs-btn-color);
        border: var(--bs-btn-border-width) solid var(--beytas-bs-btn-border-color);
    }

    .btns-next-back .btn-outline-primary:hover {
        color: var(--beytas-bs-btn-hover-color);
        background: var(--beytas-bs-btn-color);
        border: var(--bs-btn-border-width) solid var(--beytas-bs-btn-hover-boder-color);

    }


    .loading-opacity {
        opacity: 0.6;
        pointer-events: none;
        position: relative;
    }

    .loading-opacity::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 30px;
        height: 30px;
        border: 3px solid #f3f3f3;
        border-top: 3px solid #3498db;
        border-radius: 50%;
        animation: spin 1s linear infinite;
        transform: translate(-50%, -50%);
    }

    @keyframes spin {
        0% {
            transform: translate(-50%, -50%) rotate(0deg);
        }

        100% {
            transform: translate(-50%, -50%) rotate(360deg);
        }
    }

    .poet-card-custom {
        position: relative;
        transition: all 0.3s ease;
    }