
#vp-header {
    margin-bottom: 0 !important;
}

/* هدر امتیاز */
.header {
    text-align: center;
    padding-top: 16px;
    font-weight: bold;
}

/* دکمه‌ها در اسکرول افقی */
.filter-scroll-wrapper {
    overflow-x: auto;
    white-space: nowrap;
    padding: 0 12px;
    margin-bottom: 20px;
}

/* لیست دکمه‌ها */
.filter-buttons {
    display: inline-flex;
    gap: 8px;
}

.filter-scroll {
    display: flex;
    overflow-x: auto;
    padding: 0 12px;
    gap: 12px;
    padding-top: 16px;
    margin: 0 auto 16px;
    justify-content: flex-start;
    scrollbar-width: none; /* مخفی‌کردن اسکرول برای فایرفاکس */
}

    .filter-scroll::-webkit-scrollbar {
        display: none; /* مخفی‌کردن اسکرول برای کروم */
    }

.filter-button {
    white-space: nowrap;
    padding: 10px 18px;
    background-color: #ffffff;
    color: #000000;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    font-size: 14px;
    font-weight: bold;
    font-family: yekanbakh, sans-serif;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    flex-shrink: 0;
}


    .filter-button.active {
        border: 1px solid #0fd043;
        background-color: #e6f9ed;
        color: #0fd043;
    }

/* خود دکمه‌ها */
.filter-buttons button {
    padding: 8px 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #fff;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
}

/* دکمه فعال */
.filter-buttons .active {
    background-color: #0fd043;
    color: white;
    border: none;
}

.cards-container {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    direction: rtl; /* چیدمان از راست به چپ */
    padding: 0 8px 32px;
    /*margin: 0 -6px;*/ /* برای جبران فاصله داخلی هر کارت */
}

.card {
    width: calc(33.333% - 12px);
    margin: 0 6px 12px;
    background-color: white;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
}

    /* جای‌گذاری دقیق کارت‌ها */
    /*.card:nth-child(3n+1) {
        margin-left: auto;
    }*/

    /*.card:nth-child(3n+2) {
        margin: 0 auto 12px;
    }

    .card:nth-child(3n) {
        margin-right: auto;
    }*/


    /* عکس کارت */
    .card img {
        width: 100%;
        display: block;
        border-radius: 0;
    }

/* عنوان پایین کارت */
.card-title {
    font-size: 13px;
    background-color: #000;
    color: #fff;
    padding: 4px;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 12px;
    background-color: #e6f0f6;
    font-weight: bold;
    font-size: 14px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto;
}

.score {
    font-weight: bold;
    font-size: 14px;
    color: #292D32;
    white-space: nowrap;
}

.btn-add-card {
    background-color: #E41D32;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 16px;
    font-size: 15px;
    /* font-weight: bold; */
    font-family: yekanbakh, sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    line-height: 1.6;
    transition: all 0.2s ease-in-out;
}

    .btn-add-card:hover {
        background-color: #c51a2b;
    }

    .btn-add-card .icon {
        width: 20px;
        height: 20px;
        border: 2px solid #fff;
        border-radius: 50%;
        font-size: 22px;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 0;
    }

.bottom-sheet {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.2);
    transition: bottom 0.3s ease-in-out;
    z-index: 999;
}

    .bottom-sheet.show {
        bottom: 0;
    }

.bottom-sheet-content {
    padding: 20px;
}

.bottom-sheet .handle {
    width: 40px;
    height: 4px;
    background: #ccc;
    border-radius: 2px;
    margin: 0 auto 12px;
}

.bottom-sheet .title {
    text-align: right;
    font-weight: bold;
    margin-bottom: 16px;
    font-size: 16px;
}

.sheet-options {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .sheet-options li {
        padding: 12px;
        border: 1px solid #eee;
        border-radius: 12px;
        margin-bottom: 8px;
        font-size: 14px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

        .sheet-options li.active {
            background-color: #d8fddf;
            border: 1px solid #0fd043;
            color: #0fd043;
            font-weight: bold;
        }



/******************************/
/* Overlay تار شونده */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.6); /* لایه سفید نیمه‌شفاف */
    backdrop-filter: none; /* حذف blur */
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    z-index: 99;
    transition: 0.3s ease;
}

    /* فعال شدن overlay */
    .overlay.show {
        opacity: 1;
        visibility: visible;
    }

/* Bottom Sheet */
.bottom-sheet {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.15);
    padding: 16px;
    z-index: 100;
    transition: bottom 0.3s ease;
    font-family: yekanbakh, sans-serif;
}

    /* نمایش Bottom Sheet */
    .bottom-sheet.show {
        bottom: 0;
    }

/* نوار وسط برای درگ */
.sheet-drag {
    width: 36px;
    height: 4px;
    background: #ccc;
    border-radius: 2px;
    margin: 0 auto 12px;
}

/* عنوان */
.sheet-title {
    text-align: right;
    font-weight: bold;
    margin-bottom: 16px;
}

/* لیست آیتم‌ها */
.sheet-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .sheet-list li {
        padding: 12px 16px;
        border: 1px solid #eee;
        border-radius: 12px;
        margin-bottom: 8px;
        background-color: #fff;
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 14px;
    }

        /* انتخاب‌شده */
        .sheet-list li.active {
            background-color: #e8ffe8;
            border-color: #0fd043;
            color: #0fd043;
            font-weight: bold;
        }


@media screen and (min-width: 768px) {
    .bottom-sheet, .overlay {
        display: none !important;
    }
}


.bottom-sheet {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
    padding: 16px;
    z-index: 100;
    transition: bottom 0.3s ease;
    font-family: yekanbakh, sans-serif;
    /* 👇 اضافه کردن کنترل ارتفاع */
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}

.sheet-list {
    list-style: none;
    padding: 0;
    margin: 0;
    /* 👇 این باعث میشه فقط لیست اسکرول بخوره */
    overflow-y: auto;
    flex: 1;
}

    /* .sheet-list li {
    padding: 12px 16px;
    border: 1px solid #eee;
    border-radius: 12px;
    margin-bottom: 8px;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-size: 14px;
    position: relative;
    gap: 8px; 
  }
   */
    /* .sheet-list li {
    padding: 12px 16px;
    border: 1px solid #eee;
    border-radius: 12px;
    margin-bottom: 8px;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-size: 14px;
    gap: 8px; 
  } */


    .sheet-list li img {
        width: 20px;
        height: auto;
        margin-left: 8px;
    }

    .sheet-list li.active {
        background-color: #e8ffe8;
        border-color: #0fd043;
        color: #0fd043;
        font-weight: bold;
    }

.sheet-drag {
    width: 36px;
    height: 4px;
    background: #ccc;
    border-radius: 2px;
    margin: 0 auto 12px;
}

.sheet-title {
    text-align: right;
    font-weight: bold;
    margin-bottom: 16px;
}

/* فقط موبایل */
@media screen and (min-width: 768px) {
    .bottom-sheet,
    .overlay {
        display: none !important;
    }
}

.sheet-list li .tick-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    margin-right: auto;
    margin-left: 8px;
}

.sheet-list li {
    padding: 12px 16px;
    border: 1px solid #eee;
    border-radius: 12px;
    margin-bottom: 8px;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* همه راست‌چین */
    font-size: 14px;
    gap: 8px; /* فاصله بین آیتم‌ها */
}

/*++++++++++++++++++++++++++++++++++++++++++++++++*/

.card-modal {
    position: fixed;
    z-index: 1000;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 0;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
    max-width: 95%;
    width: 360px;
    display: none;
    flex-direction: column;
    align-items: center;
    padding-top: 16px;
    padding-bottom: 16px;
    overflow: hidden;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    display: none;
    z-index: 999;
}

.modal-img {
    width: 100%;
    display: block;
}

.close-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    background: white;
    border: none;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
}

/*-------------------------------*/

.card-modal .modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    border: none;
    padding: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

    .modal-close img {
        width: 32px;
        height: 32px;
    }


/*-----------------------------------------*/
.card-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: right;
    direction: rtl;
    padding: 12px 16px;
    gap: 12px;
    width: 100%;
    margin-right: 0;
    margin-left: auto;
}

.card-title-wrapper,
.card-category-wrapper {
    margin-bottom: 12px;
}


.card-actions a img {
    width: 24px;
    height: 24px;
}


/*++++++++++++++++++++++++++++++++++++++++++*/

.icon-text-row {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 6px;
    justify-content: flex-start;
}

.flag-icon,
.club-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.card-title-en,
.card-category-en {
    font-size: 13px;
    color: #444;
    text-align: center;
}

.flag-icon,
.club-icon {
    width: auto;
    height: 40px;
}

.card-title-fa,
.card-category-fa {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 8px;
    text-align: right;
    font-weight: 900;
    font-family: 'yekanbakhen'
}

.card-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
    margin-bottom: 12px;
}

.cardCollectionContainer {
    max-width: 425px;
    margin: 0 auto;
    height: 100%;
    min-height: 100vh;
    background: url(/res/themes/master/assets/img/bio/addcard/add-card-mincraft_bg.png);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    height: 100%;
    min-height: 100vh;
    margin-top: -16px;
    /*margin-bottom: 32px;*/
    font-family: 'Yekan Bakh NoEn', sans-serif;
}

@media only screen and (min-width: 0px) and (max-width: 959px) {
    .size4 {
        padding: 0 0px !important;
    }
}

.cardCollectionContainer .button-hero {
    height: 54px;
    max-height: 54px;
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    column-gap: 4px;
    border-radius: 12px;
    cursor: pointer;
}

    .cardCollectionContainer .button-hero.button-add-new {
        background: #E41D32;
    }


.card {
    position: relative; /* لازم برای موقعیت‌دهی به badge */
}

.card-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background-color: #E41D32;
    color: #fff;
    width: 22px;
    height: 22px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: yekanbakh, sans-serif;
    box-shadow: 0 0 4px rgba(0,0,0,0.2);
    z-index: 2;
}

.fix-addCard_bottom {
    position: fixed;
    bottom: 73px;
    left: 0;
    right: 0;
    z-index: 9 !important;
    max-width: 425px;
    width: 100%;
    padding: 16px;
    background: #ffffff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}


    .fix-addCard_bottom a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        column-gap: 8px;
        width: 100%;
        height: 48px;
        background: #E41D32;
        border-radius: 8px;
        color: #ffffff;
        font-weight: 700;
        font-size: 16px;
        line-height: 100%;
        letter-spacing: -0.5px;
        text-align: center;
        font-family: yekanbakh, sans-serif;
    }

        .fix-addCard_bottom a span {
            padding-top: 4px;
        }

.header .header-content .share-album {
    display: inline-flex;
    align-items: center;
    column-gap: 6px;
    color: #168FDF;
    font-weight: 700;
    font-size: 12px;
    line-height: 100%;
    font-family: yekanbakh, sans-serif;
    letter-spacing: -0.5px;
    cursor: pointer;
}

    .header .header-content .share-album .icon {
        padding-top: 3px;
    }

@media screen and (min-width: 500px) {
    /*   .cardCollectionContainer{
        position: relative;
    }*/
    .fix-addCard_bottom {
        /*position: absolute;*/
        bottom: 0;
        margin: 0 auto;
        background: transparent;
        box-shadow: none;
    }
}

@media only screen and (min-width: 0px) and (max-width: 959px) {
    .size4 {
        padding: 0 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    #vp-header .vp-middle-header .size4 {
        padding: 0 16px !important;
    }
}

.card-modal {
    position: fixed;
    z-index: 1000;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    max-width: 95%;
    width: 360px;
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
}

.flip-container {
    perspective: 1000px;
    width: 100%;
    height: auto;
    margin-bottom: 10px;
    position: relative;
}

.flipper {
    transition: 0.8s;
    transform-style: preserve-3d;
    width: 100%;
    height: 100%;
    position: relative;
}

.flip-container.flipped .flipper {
    transform: rotateY(180deg);
}

.front, .back {
    width: 100%;
    backface-visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
}

.back {
    transform: rotateY(180deg);
}

.front {
    position: relative !important;
}

    .front .rotate-card {
        position: absolute;
        right: 63px;
        bottom: 12px;
    }

.album-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    column-gap: 4px;
    flex-direction: row-reverse;
}

.show-code-btn {
    background: #E41D32;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

    .show-code-btn img {
        width: 100%;
        height: 100%;
        max-width: 20px;
        max-height: 20px;
    }

.hidden {
    display: none;
}

.card-uid {
    height: 31px;
    background: #E41D32;
    color: #FFFFFF;
    font-weight: 600;
    font-size: 12px;
    line-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

    /*.card-uid .uid-show {
        visibility: hidden;
        opacity: 0;
        display: none;
    }*/

        /*.card-uid .uid-show.active {
            visibility: visible;
            opacity: 1;
            display: block;
        }*/

            /*.card-uid .uid-show.active .uid-unshow {
                display: none;
            }*/

.card-uid_btn {
    background: #E41D32;
    width: 100%;
    height: 31px;
}

    .card-uid_btn img {
        width: 20px;
        height: 20px;
        margin: 0 auto;
    }

.btn-unshow_uid {
    color: #FFFFFF;
    font-weight: 600;
    font-size: 12px;

}

.codes-modal {
    position: fixed;
    z-index: 1000;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 0;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
    max-width: 95%;
    width: 200px;
    display: none;
    flex-direction: column;
    align-items: center;
    padding-top: 16px;
    padding-bottom: 16px;
    overflow: hidden;
}

    .codes-modal .modal-close {
        /*position: relative;
        top: 2px;
        right: -20px;*/
        margin: 0 auto;
        width: 36px;
        height: 36px;
        background: white;
        border-radius: 50%;
        box-shadow: 0 2px 6px rgba(0,0,0,0.2);
        border: none;
        padding: 6px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10;
    }

.modal-codes_items{
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    row-gap: 16px;
}

.code-item {
    font-weight: 600;
    font-size: 16px;
    line-height: 100%;
    letter-spacing: -0.5px;
    text-align: center;
    color: #292D32;
}