#search .search-box {
    background: rgba(var(--color-body),var(--bg-alpha));
}
.alogo {
    display: flex;
    align-content: center;
    align-items: center;
}

/* استایل دکمه چرخ‌دنده بیرون فرم */
.adv-search-btn-external {
    background: rgba(var(--color-body-d-1),var(--bg-alpha));
    border: none;
    color: rgba(var(--color-primary),var(--text-alpha));
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-left: 3px;
}

.adv-search-btn-external:hover {
    background: rgba(var(--color-primary), 0.1);
    color: #03A9F4; /* تغییر رنگ آیکون هنگام قرار گرفتن موس */
}

/* رفع مشکل استایل پاپ‌آپ */
.adv-modal-content #search {
    margin: 0;
}

/* استایل دکمه چرخ‌دنده درون فرم جستجوی ساده */
.icon-adv-search {
    background: transparent;
    border: none;
    color: #999; /* رنگ آیکون رو میتونید با قالب هماهنگ کنید */
    cursor: pointer;
    position: absolute;
    left: 45px; /* تنظیم فاصله از چپ تا کنار آیکون سرچ اصلی قرار بگیرد */
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}
.icon-adv-search:hover {
    color: #03A9F4; /* رنگ هنگام هاور */
}

/* استایل‌های مربوط به پس‌زمینه پاپ‌آپ */
.adv-modal-overlay {
    display: none; /* در حالت پیش‌فرض مخفی است */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75); /* پس زمینه تاریک نیمه‌شفاف */
    backdrop-filter: blur(4px); /* تار کردن بک‌گراند */
    z-index: 99999; /* قرار گرفتن روی تمام عناصر سایت */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* کلاسی که هنگام باز شدن با جاوا اسکریپت اضافه می‌شود */
.adv-modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* استایل باکس محتوای پاپ‌آپ */
.adv-modal-content {
    position: relative;
    width: 95%;
    max-width: 1000px; /* حداکثر عرض فرم پیشرفته */
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.adv-modal-overlay.active .adv-modal-content {
    transform: translateY(0);
}

/* دکمه ضربدر بستن پاپ‌آپ */
.adv-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.adv-modal-close:hover {
    color: #ff4c4c;
}

/* حل مشکل پس زمینه سفید اضافی اگر سکشن شما پدینگ دارد */
.adv-modal-content #search {
    margin: 0;
}
/*
پایان مودال جستجو پیشرفته
 */


#nav .logo,#footer .logo {
    background: url(../img/TurkDL.png) center center no-repeat !important;
    background-size: 100% auto !important;
}
.col-bg .right-side .logo-bg .logo {
    background: url(../img/TurkDL.png) center center no-repeat;
    background-size: 100% auto;
}

/*
شروع مگامنو زیرمجموعه ای دسته بندی
 */

/* موقعیت‌دهی نسبی برای تمام li ها تا زیرمنوها نسبت به آن‌ها باز شوند */
#top-grid div > ul li {
    position: relative;
}

/* مخفی کردن زیرمنوهای سطح سوم به بعد و تنظیم موقعیت آن‌ها */
#top-grid div > ul li ul {
    position: absolute !important;
    right: 100% !important; /* در قالب‌های راست‌چین (RTL) باعث می‌شود منو سمت چپ باز شود */
    top: 0 !important;
    display: none; /* در حالت عادی مخفی است */

    /* استایل‌های ظاهری (رنگ و سایه را مشابه منوی اصلی خودتان تنظیم کنید) */
    background-color: rgba(var(--color-body-d-1),var(--bg-alpha)); /* رنگ پس‌زمینه مشابه عکس شما */
    min-width: 160px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-radius: 12px;
    padding: 5px 3px !important;
    z-index: 1000;
}

/* نمایش زیرمنو هنگام رفتن ماوس روی آیتم والد */
#top-grid div > ul li:hover > ul {
    display: block;
}

/* استایل‌دهی به لینک‌های داخل زیرمنوی سطح سوم (اختیاری برای زیبایی بیشتر) */
#top-grid div > ul li ul li a {
    display: inline-block;
    padding: 0px 15px;
    white-space: nowrap;
}

/* اضافه کردن آیکون فلش به لینک‌هایی که زیرمنو دارند */
#top-grid div > ul li:has(ul) > a::after {
    content: "\f103";
    font-size: 11px;
    font-family: flaticon !important;
    padding: 0;
    vertical-align: -2px;
    display: inline-block; /* برای اینکه transform کار کند ضروری است */
    transform: rotate(90deg);

    /* برای اینکه در منوی راست‌چین، آیکون به زیبایی در سمت چپ (انتهای کادر) قرار بگیرد */
    float: left;
    margin-top: 4px; /* این مقدار را بسته به فونت خود تنظیم کنید تا وسط‌چین شود */
    transition: transform 0.3s ease;

}

/* حالت هاور: چرخش آیکون زمانی که ماوس روی والد (li) قرار می‌گیرد */
/*#top-grid div > ul li:has(ul):hover > a::after {
    transform: rotate(0deg);
}*/
#top-grid div > ul li:has(ul):hover {
    background-color: #0000001a;
    transition: all 0.3s ease;
    border-radius: 6px;
}


/* والد (li) در زیرمنوها باید relative باشد تا فرزند نسبت به آن موقعیت بگیرد */
#top-grid div > ul ul li {
    position: relative;
}

/* زیرمنوی سطح سوم (ul داخل ul) */
#top-grid div > ul ul ul {
    position: absolute !important;
    right: 100% !important; /* باعث می‌شود کامل به سمت چپ والد منتقل شود */
    top: 0 !important;      /* هم‌تراز با لبه بالایی آیتم والد (فیلم) */
    margin-right: 2px !important; /* کمی فاصله برای زیبایی (اختیاری) */
}


/*
پایان منو زیرمجموعه
 */

.social-btn {
    padding: 8px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: transform 0.2s;
    width: 100%;
    text-align: right;
    color: #fff !important;
}

.social-btn:hover {
    transform: scale(1.02);
}

.instagram-btn {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888) !important;
}

.telegram-btn {
    background: linear-gradient(to right,#0f66c7,#4498f7);
}

.sidebar-item.telegram {
    padding: 10px 20px !important;
    margin-bottom: 15px !important;
}

/* تنظیمات کلی باکس در برگیرنده */
.episodes-update-info {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* استایل پایه برای همه تگ ها */
.ep-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    margin-left: 5px;
}

/* استایل مخصوص زبان اصلی (طوسی ملایم) */
.ep-original {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

/* استایل مخصوص زیرنویس (زرد/نارنجی ملایم) */
.ep-subbed {
    background-color: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

/* استایل مخصوص دوبله (سبز ملایم) */
.ep-dubbed {
    background-color: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

/* استایل برای مقدار قدیمی (آبی ملایم) */
.ep-default {
    background-color: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

/*
نظرات
 */
.comment-awaiting-moderation {
    border-radius: 6px;
    padding: 5px 10px;
    margin-bottom: 0px;
    display: flex;

    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    font-size: 12px;
    font-weight: bold;
}
/* --- استایل پایه بخش کامنت‌ها --- */
.comment-form-comment textarea {
    color: rgba(var(--color-invert),var(--text-alpha));
    background: rgba(var(--color-body),var(--bg-alpha));
    border: 1px solid #ccc;
}
#respond {
    background: rgba(var(--color-body),var(--bg-alpha));
    border-radius: 12px;
    border: 1px solid #ccc;
    padding: 10px 15px;
}
#comments {
    margin-top: 10px;
    padding: 5px;
    border-radius: 12px;
}
.comment-form-spoiler {
    background: #00000008;
    padding: 8px 10px;
    border-radius: 4px;
}
.form-submit .submit {
    color: #fff !important;
    background: #313b78 !important;
    padding: 10px !important;
    border-radius: 10px !important;
}
/* لیست کامنت‌ها */
ul.commentlist {
    list-style: none !important;
    padding-right: 0 !important; /* چون سایت راست‌چین است، از سمت راست فاصله را صفر می‌کنیم */
    margin-right: 0 !important;
}

/* حذف کامل نقطه و استایل لیست */
li.comment {
    list-style: none !important; /* این خط اصلی است */
    background: #fff;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid #ececec;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}


/* اطلاعات نویسنده و آواتار */
.comment-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    font-weight: 600;
}

.comment-author img {
    border-radius: 50%; /* گرد کردن آواتار */
    width: 45px;
    height: 45px;
}

.comment-meta {
    font-size: 0.85em;
    color: #888;
    margin-bottom: 8px;
}

/* متن کامنت */
.comment-content {
    line-height: 1.6;
    color: #444;
    font-size: 0.95em;
}

/* دکمه پاسخ */
.reply a {
    display: inline-block;
    margin-top: 10px;
    color: #3498db;
    font-weight: bold;
    font-size: 0.9em;
    text-decoration: none;
}
.reply a:hover {
    text-decoration: underline;
}

/* --- استایل‌های اختصاصی اسپویلر شما (ادغام شده) --- */
.comment-spoiler-warning {
    padding: 10px 14px;
    margin-bottom: 10px;
    border-radius: 6px;
    background: #fff9e6; /* زرد خیلی ملایم */
    border: 1px solid #ffe89d;
    color: #d98200;
    font-weight: 600;
    font-size: 0.9em;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.spoiler-content {
    filter: blur(6px);
    transition: filter 0.3s ease;
    cursor: pointer;
    user-select: none;
}

.spoiler-content.revealed {
    filter: blur(0);
    cursor: default;
}

/* --- تنظیمات دارک مود برای بخش کامنت‌ها --- */

[m-theme="dark"] li.comment {
    background: rgba(var(--color-body), var(--bg-alpha)); /* پس‌زمینه دارک */
    border: 1px solid #333; /* رنگ بردری که در دارک مود دیده شود */
}

[m-theme="dark"] .comment-form-comment textarea {
    border: 1px solid #444; /* بردر ملایم‌تر برای تکست‌اریا */
}

[m-theme="dark"] #respond {
    border: 1px solid #444;
}

[m-theme="dark"] .comment-content {
    color: rgba(var(--color-invert), 0.8); /* متن روشن برای حالت دارک */
}

[m-theme="dark"] .comment-meta {
    color: #aaa; /* خاکستری ملایم‌تر برای تاریخ و زمان */
}

/* استایل دارک برای باکس اخطار اسپویل */
[m-theme="dark"] .comment-spoiler-warning {
    background: #3d3000; /* رنگ زرد تیره (قهوه‌ای خیلی ملایم) */
    border: 1px solid #594600;
    color: #ffb84d; /* رنگ متنِ اخطار که در دارک مود خوانا باشد */
}

/* برای لینک‌های پاسخ در حالت دارک */
[m-theme="dark"] .reply a {
    color: #5dade2; /* آبی روشن‌تر برای اینکه در دارک مود گم نشود */
}

/* اصلاح کادرِ input و check-box در دارک مود */
[m-theme="dark"] .comment-form-spoiler input[type="checkbox"] {
    border: 1px solid #555;
    background: #222;
}


/*
end 2026-06
 */
.ab-datemodify {
    margin-top: 10px;
    background: #e1ffee;
    padding: 2px 6px;
    border-radius: 5px;
    color: #2a771a;
    border: 1px solid #a4f494;
    font-size: 15px !important;
}
.ab-datemodify .icon-calendar{
    margin-left: 1px;
    display: inline-block;
}
#videoPlayer video{
    max-width: 100% !important;
}
/*
title box
 */
.ab-title-box {
    list-style: none;
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
}

.seprator {
    flex: 1;
    height: 1px;
    background: #c8c8c882;
    margin: 0 10px;
}

.ab-title-box > span{
    /*background: #fdfdfd;*/
    border-radius: 6px;
    padding: 4px 8px;
    color: rgba(var(--color-primary),var(--text-alpha));
    display: flex;
}

.ab-title-box span i {
    vertical-align: -2px;
}
#breadcrumbs {
    display: inline-block;
}
.ab--more {
    transition: all 0.3s;
    display: flex;
    align-items: center;
    align-content: center;
}
.ab--more:hover {
    color: rgba(var(--color-cyan),var(--text-alpha)) !important;
}
.ab--more::after {
    content: "\f103";
    font-size: 11px;
    font-family: flaticon !important;
    padding: 0;
    vertical-align: -2px;
    transform: rotate(90deg);
    margin-right: 6px;
}

/*
end title box
 */

.bargozideha {
    display: flex;
    flex-direction: row;
}
.bargozideh-body {
    display: flex;
    flex-wrap: wrap;
}
.bargozideh-body .swiper-slide {
    width: 25%;
}
.bargozideh-body.abrelated .swiper-slide {
    width: 12%;
}
.bargozideha.relatede {
    flex-direction: column !important;
}
.bargozideh.ab40right {
    width: 50%;
}
.bargozideh.ab40left {
    width: 50%;
    margin-right: 15px;
}
.bargozideha .slide-post .name , .ab40mahbob .slide-post .name{
    direction: rtl !important;
    font-size: 16px !important;
    margin-top: 10px !important;
}
.bargozideha .slide-post , .ab40mahbob .slide-post {
    padding-bottom: 20px !important;
}

.bargozideha .slide-post .image .cover {
    backdrop-filter: saturate(180%) blur(3px);
}
.ab-title-box .icon {
    transform: rotate(90deg);
    font-size: 12px;
    margin: 0 5px;
    padding-top: 2px;
}
/*
mahbob
 */
.ab40mahbob .slide-post {
    width: 25%;
}
.ab40mahbob {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 25px !important;
}
@media only screen and (max-width:1000px){
    #slides .slide-post .image .cover .icon-arrow-down-sign-to-navigate {
        position: absolute;
        bottom: 0;
        left: 12px;
    }
    .bargozideha {
        flex-direction: column;
    }
    .bargozideh.ab40right , .bargozideh.ab40left {
            width: 100%;
        margin-bottom: 10px;
    }
    .bargozideh.ab40left {
        margin-right: 0 !important;
    }
    .bargozideh-body.abrelated .swiper-slide , .ab40mahbob .slide-post{
        width: 25%;
    }
}
@media only screen and (max-width:400px){
    .bargozideh-body .swiper-slide , .bargozideh-body.abrelated .swiper-slide,.ab40mahbob .slide-post {
        width: 50%;
    }
    .bargozideh-body .slide-post, .ab40mahbob .slide-post {
        padding-bottom: 10px !important;
    }
}

/*
Live Search
 */

#search-results {
    position: absolute;
    top: 105%; /* دقیقا زیر فیلد جستجو قرار می‌گیرد */
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 4px 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none; /* مخفی بودن در ابتدا */
}

#search-results p {
    margin: 0;
    padding: 10px 6px;
    border-bottom: 1px solid #f0f0f0;
}

#search-results p:last-child {
    border-bottom: none;
}

#search-results p a {
    text-decoration: none;
    color: #333;
}

#search-results .search-item:hover {
    background-color: #f9f9f9;
}

/* نمایش نتایج هنگام تایپ */
#search-results.show {
    display: block;
}

#search-results .search-item {
    display: flex;
    align-items: center;
    padding: 1px 0;
    border-bottom: 1px solid #f0f0f0;
}

#search-results .search-item:last-child {
    border-bottom: none;
}

.search-image {
    width: 50px;
    height: auto;
    margin-right: 10px;
    border-radius: 4px;
    object-fit: cover;
    margin-bottom: 2px;
    margin-top: 2px;
}

#search-results .search-item p {
    margin: 0;
}

#search-results .search-item a {
    text-decoration: none;
    color: #333;
    font-weight: normal;
    display: flex;
    align-items: center;
        width: 100%;

}

.search-view-all {
    text-align: center;
    padding: 10px;
}

.view-all-button {
    display: inline-block;
    padding: 8px 16px;
    background-color: rgba(var(--color-primary),1);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.view-all-button:hover {
    background-color: #005bb5;
}

/* استایل آیکون چرخشی لودینگ */
.loading-spinner {
    border: 4px solid #fff;
    border-top: 4px solid #313b78;
    border-radius: 50%;
    width: 27px;
    height: 27px;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 8px;
    left: 10px;
    transform: translateY(-50%);
}

/* انیمیشن چرخش */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media only screen and (max-width: 992px) {
    #nav .search .icon-search {
        display: none !important;
    }
    .loading-spinner {
        top: 20px !important;
    }
}

.abheader-links {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: -10px auto 20px;
    flex-wrap: wrap;
}

.abheader-link-box {
    background-color: #f0f4fa;
    padding: 15px;
    width: 155px;
    border-radius: 8px;
    box-shadow: 0 4px 6px #0000001a;
    text-align: center;
    transition: filter 0.3s ease;
    margin-right: 15px;
}
.abheader-link-box:first-child {
    margin-right: 0 !important;
}
.abheader-link-box:hover {
    background: rgba(var(--color-body-d-1),var(--bg-alpha));
}

.ablink-title {
    font-size: 14px;
    font-weight: bold;
    color: #1D3B6C;
    margin-bottom: 8px;
}

.ablink-url {
    font-size: 12px;
    color: #3D5C9B !important;
    text-decoration: none !important;
    word-break: break-all;
    display: block;
}

.abheader-link-box:hover .ablink-url {
    text-decoration: underline !important;
}

.abheader-link-box:hover ~ .abheader-link-box,
.abheader-link-box:hover ~ a,
.abheader-links:hover .abheader-link-box:not(:hover) {
    filter: blur(2px);
}

@media only screen and (max-width:800px) {
    .abheader-links {
        margin: 10px auto 0 !important;
    }
    .abheader-link-box {
        padding: 12px;
        width: 130px;
        margin-right: 15px;
        flex-grow: 1;
    }
}
@media only screen and (max-width:451px) {
    .abheader-link-box:last-child {
        margin-top: 15px;
        margin-right: 0;
    }
}

.icon-aparat {
    width: 56px !important;
    height: 56px !important;
    background: url(aparat.svg) center center no-repeat;
    background-size: 26px;
}
.icon-tiktok {
    width: 56px !important;
    height: 56px !important;
    background: url(tiktok.svg) center center no-repeat;
    background-size: 20px;
}
#footer .social {
    display: flex;
    justify-content: center;
}
/*
images
 */
.wp-caption {
    margin: 0 auto;
}
.wp-caption img {
    margin: 0 auto;
    display: block;
}
.wp-caption-text {
    margin-bottom: 10px;
}
/*
Mobile Scroll
 */
@media (max-width: 800px) {
    .ab40-mob-scroll {
        overflow: hidden;
        margin-left: -1rem;
        margin-right: -0.7rem;
    }
    .ab40-mob-scroll .swiper-slide {
        max-width: 170px !important;
        flex: 0 0 170px !important;
        margin-left: 3px;
    }
    .ab40-mob-scroll .slide-post .name{
        font-size: 14px !important;
    }
    .ab40-mob-scroll .bargozideh-body {
        flex-wrap: nowrap !important;
        padding-bottom: 6px;
        padding-left: 10px;
        overflow-x: scroll;
        overflow-y: hidden;
        margin-bottom: -6px;
    }
}
/*
end
 */



/*
dl box
 */

/*
dl box
*/

.tab-name {
    cursor: pointer;
}
.boxdl-ab40 {
    background: rgba(var(--color-body-d-1),var(--bg-alpha));
    width: 100%;
    margin-top: 1px;
    border-radius: 15px;
    overflow: hidden;
    padding-bottom: 3px;
    margin-bottom: 2em;
    direction: rtl;
    text-align: right;
}

.downloads-titlebox {
    display: flex;
    padding: 7px 12px;
    font-size: 18px;
    color: rgba(var(--color-primary),var(--text-alpha));
    font-weight: bold;
    gap: 10px;
    background: #00000008;
    text-align: right;
    direction: rtl;
    border-radius: 4px;
    margin-top: 50px;
}

/* --- شروع استایل‌های اصلاح شده باکس دانلود و تگ‌ها --- */
.downloads-list {
    background: #0000000a;
    margin: 10px;
    padding: 12px; /* پدینگ یکدست */
    border-radius: 8px;
    display: flex;
    align-items: center; /* جلوگیری از کشیده شدن ارتفاع دکمه */
    gap: 15px; /* فاصله یکدست بین دکمه و باکس تگ‌ها */
}

.downloads-list a {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: rgba(var(--color-primary),var(--bg-alpha));
    padding: 12px 15px;
    border-radius: 6px;
    color: rgba(var(--color-body),var(--text-alpha));
    font-weight: 500;
    flex: 0 0 30%; /* تخصیص یک عرض منطقی در دسکتاپ */
    min-width: 220px;
    max-width: 100%;
    line-height: 1.5;
    box-sizing: border-box;
}

.downloads-list-detail {
    display: flex;
    flex-wrap: wrap; /* رفتن تگ‌های اضافی به خط بعد */
    align-items: center;
    justify-content: flex-start; /* چیدمان تگ‌ها در کنار دکمه */
    gap: 8px; /* جایگزین مارجین: فاصله دقیق و مرتب بین تگ‌ها در همه جهات */
    flex: 1; /* گرفتن بقیه فضای خالی */
}
/* --- پایان استایل‌های اصلاح شده باکس دانلود --- */

.boxdl-ab40 .quality {
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
    min-width: 130px;
    text-align: center;
    background: #f1f1f1;
    padding: 2px 4px;
    border-radius: 5px;
    width: auto;
    display: inline-block;
    color: #313131;
}

.boxdl-ab40 table {
    float: right;
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

.boxdl-ab40 table thead tr {
    border-bottom: 3px solid #eee;
    background: #444;
}

.boxdl-ab40 table tbody tr:nth-child(even) {
    background: #f5f5f5;
}

.boxdl-ab40 table th {
    padding: 10px 10px 15px;
    text-align: right;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.boxdl-ab40 table td {
    padding: 10px 10px 15px;
    text-align: right;
    font-size: 12px;
}

.boxdl-ab40 table .quality {
    background: #a2b6bf;
    padding: 2px 4px;
    border-radius: 3px;
    box-shadow: 0px 2px 0px rgba(84, 96, 101, 0.61);
    color: #546065;
    font-size: 11px;
    padding-top: 3px;
}

.boxdl-ab40 table a {
    background: #03A9F4;
    color: #fff;
    padding: 9px 10px;
    border-radius: 4px;
}
.linkdlebox {
    background: linear-gradient(45deg, #0000, #0000000a);
    margin-bottom: .75rem;
    padding-top: 8px;
    padding-bottom: 8px;
    padding-right: 15px;
    color: rgba(var(--color-primary),var(--text-alpha));
    display: flex;
    font-size: 16px;
    margin-top: .75rem;
    font-weight: 500;
    gap: 7px;
    border-radius: 6px;
}

/* ظاهر summary/آکاردئون بدون نیاز به JS */
.boxdl-ab40 details.dlbox-chapter {
    margin-bottom: 10px;
    border-radius: 10px;
    overflow: hidden;
}
.boxdl-ab40 details.dlbox-chapter > summary {
    list-style: none; /* مخفی کردن مثلث پیش‌فرض برخی مرورگرها */
}
.boxdl-ab40 details.dlbox-chapter > summary::-webkit-details-marker { display:none; }

.boxdl-ab40 .linkdlebox {
    align-items: center;
    gap: .5rem;
    cursor: pointer;
    user-select: none;
    transition: background .2s ease, box-shadow .2s ease;
}
.boxdl-ab40 .linkdlebox:hover { background:#e6eefc; }

.boxdl-ab40 details[open] .linkdlebox {
    background:#e6eefc;
    box-shadow: inset 0 0 0 2px rgba(46,58,116,.15);
}

/* چرخش فلش وقتی باز است */
.boxdl-ab40 details .icon-arrow-down-sign-to-navigate {
    transition: transform .2s ease;
    transform: rotate(90deg);
}
.boxdl-ab40 details[open] .icon-arrow-down-sign-to-navigate { transform: rotate(0deg); }

.boxdl-footer {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    align-content: center;
    gap: 15px;
}
.boxdl-footer a {
    background: #0000000a;
    padding: 5px 10px;
    border-radius: 4px;
    color: rgba(var(--color-primary),var(--text-alpha));
    font-weight: bold;
    border: 1px solid rgba(var(--color-primary),var(--text-alpha));
}
.boxdl-note {
    background: rgba(var(--color-body),var(--bg-alpha));
    padding: 10px 30px 10px 0;
    display: flex;
    flex-direction: column;
    margin: 8px 10px;
    border-radius: 10px;
    color: rgba(var(--color-primary),var(--text-alpha));
    border: 1px solid #0000001f;
    direction: rtl;
    text-align: right;
}
.boxdl-note li {
    margin-bottom: 4px;
}

/* --- استایل پایه همه دکمه‌های کیفیت اصلاح شده --- */
/* --- استایل پایه همه دکمه‌های کیفیت --- */
.downloads-list .quality {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 12px;
    margin: 0;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    text-align: center;
    cursor: default;
    transition: background 0.2s ease, color 0.2s ease, border 0.2s ease;
    border: 1px solid transparent;
    white-space: nowrap;
}

/* هر کلاس با بردر کمی شفاف‌تر از رنگ متن */
.downloads-list .quality.sub-attached {
    background: #ffccd2;
    color: #a60020;
    border: 1px solid rgba(166, 0, 32, 0.6);
}
.downloads-list .quality.no-sub {
    background: #c6f7d0;
    color: #1f5d33;
    border: 1px solid rgba(31, 93, 51, 0.6);
}
.downloads-list .quality.dub {
    background: #b3d8ff;
    color: #003f8c;
    border: 1px solid rgba(0, 63, 140, 0.6);
}
.downloads-list .quality.dub-2h {
    background: #ffe7b3;
    color: #805800;
    border: 1px solid rgba(128, 88, 0, 0.6);
}
.downloads-list .quality.dub-recorded {
    background: #f7c6f0;
    color: #6b005d;
    border: 1px solid rgba(107, 0, 93, 0.6);
}
.downloads-list .quality.dub-exclusive {
    background: #d6c6f7;
    color: #4b0082;
    border: 1px solid rgba(75, 0, 130, 0.6);
}
.downloads-list .quality.dual-lang {
    background: #c6f0f7;
    color: #005d6b;
    border: 1px solid rgba(0, 93, 107, 0.6);
}


#movie-single #tab-section .contents, #series-single #tab-section .contents {
    max-height: unset !important;
}
.download.cast {
    color: rgba(var(--color-primary),var(--text-alpha));
    background: rgba(var(--color-body),var(--bg-alpha));
    border-radius: 8px;
    max-height: unset !important;
    padding-top: 15px !important;
    padding-bottom: 15px !important;
    text-align: right;
    line-height: 2;
}
.download.cast h3, .download.cast h4 {
    text-align: right;
    padding: 5px 0;
    font-weight: bold;
    font-size: 18px;
    margin-top: 10px;
    margin-bottom: 10px;
}
.download.cast h2,.download.cast h1 {
    background: rgba(var(--color-body-d-1),var(--bg-alpha));
    color: rgba(var(--color-primary),var(--text-alpha));
    text-align: right;
    padding: 5px 15px;
    font-weight: bold;
    font-size: 16px;
    border-radius: 5px;
    margin-top: 10px;
    margin-bottom: 10px;
}
.download.cast table {
    border-collapse: collapse;
    margin: 25px 0;
    text-align: right;
    direction: rtl;
    border: 1px solid #ddd;
}
.download.cast table tbody tr {
    border-bottom: 1px solid #ddd;
}
.download.cast table tbody tr:nth-of-type(2n) {
    background-color: rgba(var(--color-body-d-1),var(--bg-alpha));
}
.download.cast table th, .download.cast table td {
    padding: 12px 15px;
    border-right: 1px solid #ddd;
}
.download.cast table th:last-child, .download.cast table td:last-child {
    border-right: none;
}
.download.cast table tbody tr:hover {
    background-color: #e0f2f1;
    cursor: pointer;
}

/* --- تنظیمات ریسپانسیو اختصاصی برای دستگاه‌های مختلف --- */
@media (max-width: 992px) {
    /* تبلت‌ها */
    .downloads-list a {
        min-width: 180px; /* دکمه کمی کوچکتر می‌شود تا جا برای تگ‌ها باز بماند */
    }
}

@media (max-width: 768px) {
    /* موبایل‌ها */
    .downloads-list {
        flex-direction: column; /* چیدمان عمودی: دکمه بالا، تگ‌ها پایین */
        align-items: stretch; /* دکمه کل عرض را بگیرد */
        padding: 12px;
        gap: 15px;
    }

    .downloads-list a {
        width: 100%;
        min-width: 100%; /* دکمه فول-سایز در موبایل */
        padding: 14px;
    }

    .downloads-list-detail {
        justify-content: center; /* در موبایل تگ‌ها کاملاً وسط‌چین شوند */
        width: 100%;
    }

    .downloads-list .quality {
        font-size: 0.8rem; /* متن تگ‌ها کمی ریزتر برای جا شدن در موبایل */
        padding: 4px 10px;
        flex-grow: 1; /* این ویژگی باعث میشه تگ‌ها فقط توی موبایل تمام عرض بشن */
    }
}


@media (max-width: 768px) {
    #top-grid div > ul li:has(ul) {
        padding: 10px 5px !important;
    }
    #top-grid div > ul li ul {
        position: relative !important;
        right: 0 !important;
        margin-top: 6px !important;
       /* display: block !important;*/
    }

    #top-grid .grid > div ul {
        width: 90% !important;
        top: 40% !important;
        left: auto !important;
        right: auto;
        transform: unset !important;
        z-index: 10004;
    }
    #top-grid .grid > div > ul ul {
        width: 100% !important;
    }

    .adv-search-btn-external {
        width: 32px;
        height: 32px;
    }

}

@media (max-width: 768px) {
    /* مخفی کردن تمام زیرمنوها به صورت پیش‌فرض */
    #top-grid ul ul {
        display: none;
    }

    /* نمایش زیرمنو در صورت اضافه شدن کلاس is-open با جاوا اسکریپت */
    #top-grid li.is-open > ul {
        display: block;
    }

    /* استایل دکمه باز و بسته کردن (فلش) */
    .mobile-toggle-btn {
        display: inline-block;
        padding: 5px 10px;
        cursor: pointer;
        font-size: 14px;
        float: left; /* برای اینکه فلش سمت چپ قرار بگیرد */
        color: #555;
        background: #0000001f;
        border-radius: 5px;
    }
    #top-grid div > ul li:has(ul) > a::after {
        content: unset !important;
    }
}
#slides {
    margin-bottom: 15px;
    border-bottom: 1px solid #0000000d;
}