.btn-back {
    cursor: pointer;
    padding: 10px;
    background: var(--sidebar-color);
    color: var(--default-text-color);
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 5px;
    transition: .3s;
}

.btn-back:hover {
    transition: .3s;
    background: var(--default-text-color-invert);
}

.header-btns {
    border-bottom: 1px solid var(--table-line);
    display: flex;
}

.header-btn {
    background: #1f1f1f94;
    padding: 10px 20px;
    border-right: 2px solid var(--table-line);
    border-top-left-radius: 15px;
    cursor: pointer;
    transition: .3s;
    color: var(--default-text-color);
    font-weight: bold;
}

.header-btn:last-child {
    border-top-left-radius: 0px;
    border-top-right-radius: 15px;
    border: none;
}

.header-btn-active {
    background: var(--span-color);
    transition: .3s;
}

.select-panel.select-panel-table.badge {
     position: absolute;
     right: 85px; 
}
.select-panel.select-panel-table.badge select, .select-panel.select-panel-table.badge option {
     font-size: 1.2em;
    font-weight: 500;
}

.clan-block {
    display: flex;
}

.clan-info {
    height: 204px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
}

.clan-info-left {
    height: 100%;
    width: 65%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.clan-info-left .clan-avatar-block {
    display: flex;
    align-items: center;
    margin-left: 30px;
}

.clan-button {
    margin-left: 20px;
    margin-top: 20px;
    display: none;
}

.clan-info-right {
    height: 100%;
    width: 35%;
}

.clan-stats {
    height: 180px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

.stat-block {
    height: 70px;
    width: 70px;
    border-radius: 5px;
    background: #4F4F4F;
    margin: 8px;
    display: flex;
    position: relative;
}

.zmdi-mood {
    font-size: 50px !important;
    transform: rotateZ(-15deg);
    position: absolute;
    right: 6px;
    top: 6px;
    opacity: 0.2;
}

.zmdi-account-circle {
    font-size: 50px !important;
    transform: rotateZ(-15deg);
    position: absolute;
    right: 6px;
    top: 6px;
    opacity: 0.2;
}

.zmdi-money-box {
    font-size: 50px !important;
    transform: rotateZ(-15deg);
    position: absolute;
    right: 8px;
    top: 6px;
    opacity: 0.2;
}

.stat-text {
    align-self: center;
    margin-left: 5px;
}

.stat-name {
    position: absolute;
    bottom: 3px;
    left: 5px;
    font-size: 10px;
    color: azure;
}

.clan-players {
    height: 400px;
    margin: 0 auto;
    overflow-y: scroll;
}

.yes {
    border-radius: 5px;
    height: 25px;
    background: var(--bg-color);
    color: white;
}

.server-block {
    background: var(--bg-color);
    height: 30px;
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.server-block:first-child {
    margin-top: 0;
}

@media (max-width: 768px) {
    .clan-info {
        flex-direction: column;
    }

    .clan-info-left {
        width: 100%;
        padding-bottom: 20px;
        padding-top: 20px;
    }

    .clan-avatar-block {
        justify-content: center;
        margin-left: 0 !important;
    }

    .clan-button {
        margin-left: 0 !important;
        margin-top: 20px;
        align-self: center;
    }

    .clan-info-right {
        width: 100%;
        height: 0;
    }

    .clan-stats {
        height: auto;
        justify-content: center;
    }

    .clan-players {
        overflow-x: scroll;
    }
}

.pagination {
    display: inline-block;
}

.pagination a {
    color: white;
    float: left;
    padding: 5px 12px;
    text-decoration: none;
    transition: background-color .3s;
    border: 2px solid #33325a;
    border-radius: 5px;
    margin: 0 2px;
}

.pagination a.active,  .pagination .active a {
    background-color: #6169fc;
    color: white;
    border: 1px solid #6169fc;
}

.pagination a:hover:not(.active) {
    background-color: #33325a;
}
/*-----------button--------------------*/
.clans-button {
    width: 100%;
    display: inline-block;
    margin: 0 0 5px 0;
    padding: 15px 0;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    outline: none;
    color: #fff;
    background-color: #272727;
    border-right: 5px solid #272727;
    border-bottom: 3px solid #1c0a0a;
    border-radius: 5px;
}

.clans-button:hover, .filter-active  {
    border-right: 5px solid #6169fc;
}

.clans-button:active {
    border-right: 5px solid #6169fc;
    transform: translateY(4px);
}

.clan-grid-modern {
    display: grid !important;
    /* auto-fill создаст несколько колонок в ряд, если позволяет ширина экрана */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Фикс для Bootstrap: отключаем влияние рядов, если они ломают сетку */
.clan-grid-modern::before, .clan-grid-modern::after {
    display: none !important;
}

.clan-card {
    position: relative;
    height: 320px; /* Немного увеличим высоту для текста */
    border-radius: 12px;
    overflow: hidden;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.3s ease;
    /* Убираем любые float, которые могли остаться от старого кода */
    float: none !important; 
    display: block !important;
}

.clan-card-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(20px) brightness(0.4);
    z-index: 1;
}

.clan-card-content {
    position: relative;
    z-index: 2;
    padding: 15px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.clan-card-header {
    display: flex;
    justify-content: space-between;
    color: #fff;
    font-size: 12px;
}

.clan-rank {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
}

.clan-main-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
}

.clan-avatar img {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 10px;
}

.clan-name {
    color: #fff;
    font-size: 16px;
    text-transform: uppercase;
    margin: 5px 0;
}

.clan-tag {
    color: #467ebb;
    font-size: 14px;
}

.clan-description {
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    margin-top: 10px;
    min-height: 40px;
}
button.join, button.leave {
    background-color: #6262ff;
}

/**--------------icons-----------------------------*/

@font-face {
    font-family: 'icomoon';
    src:  url('fonts/icomoon.eot?w2con7');
    src:  url('fonts/icomoon.eot?w2con7#iefix') format('embedded-opentype'),
        url('fonts/icomoon.ttf?w2con7') format('truetype'),
        url('fonts/icomoon.woff?w2con7') format('woff'),
        url('fonts/icomoon.svg?w2con7#icomoon') format('svg');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

[class^="icons-"], [class*=" icons-"] {
    /* use !important to prevent issues with browser extensions that change fonts */
    font-family: 'icomoon' !important;
    speak: never;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;

    /* Better Font Rendering =========== */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.icons-calendar:before {
    content: "\e953";
}
.icons-kills:before {
    content: "\e900";
}
.icons-coins:before {
    content: "\f111";
}
.icons-deaths2:before {
    content: "\f135";
}
.icons-players:before {
    content: "\f20d";
}
.icons-deaths:before {
    content: "\f235";
}

i.icons-deaths2 {
    font-size: 2.4em;
    color: red;
    opacity: 0.5;
    cursor: pointer;
}

i.icons-deaths2:hover {

    opacity: 1;
}

/*  */


/*  */
div.clan-wrapper {
    display: grid;
    gap: 5px;
    grid-template-columns: auto auto auto;
    border: 0px solid transparent;
    border-radius: 4px;
}


div.statistic-bloc{
    background-color: var(--sidebar-color);
    padding: 10px;
    position: relative;
    height: 80px;
}

div.statistic-cout {
    font-size: 2.2em;
    position: absolute;
    top: 1px;
    color: rgb(98, 98, 255);
}
div.statistic-icon {
    position: absolute;
    right: 10px;
    font-size: 2.2em;
    color: #373969;
}
div.statistic-text-smail {
    position: absolute;
    top: 38px;
    font-size: 1em;
    color: #373969;
}
div.statistic-text{
    position: absolute;
    bottom: 2px;
}


/* =============================================
   ИСПРАВЛЕННЫЕ СТИЛИ ДЛЯ КАРТОЧЕК КЛАНА
   Слева-направо → перенос вниз
============================================= */

.clan-cards-container {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    justify-content: flex-start !important; /* Карточки начинаются слева */
}

/* Карточка с гибкой шириной */
.clan-card-item {
    /* Заменяем фиксированную ширину на гибкую */
    width: calc((100% - 60px) / 4) !important; /* 4 карточки в ряд с учетом gap */
    min-width: 250px !important; /* Минимальная ширина */
    max-width: 320px !important; /* Максимальная ширина */
    
    height: 320px !important;
    position: relative !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    background: #111 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    flex: 1 1 auto !important; /* Гибко растягивается */
}
/* Эффект при наведении */
.clan-card-item:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3) !important;
    border-color: #6169fc !important;
}

/* Фон карточки */
.clan-card-bg {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-size: cover !important;
    background-position: center !important;
    filter: blur(20px) brightness(0.4) !important;
    z-index: 1 !important;
}

/* Содержимое карточки */
.clan-card-content {
    position: relative !important;
    z-index: 2 !important;
    padding: 15px !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    box-sizing: border-box !important;
}

/* Заголовок карточки */
.clan-card-header {
    display: flex !important;
    justify-content: space-between !important;
    color: #fff !important;
    font-size: 12px !important;
}

.clan-rank {
    background: rgba(255, 255, 255, 0.1) !important;
    padding: 2px 6px !important;
    border-radius: 3px !important;
}

/* Основная информация клана */
.clan-main-info {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    flex-grow: 1 !important;
    text-align: center !important;
}

.clan-avatar img {
    width: 70px !important;
    height: 70px !important;
    border-radius: 8px !important;
    object-fit: cover !important;
    margin-bottom: 10px !important;
    border: 2px solid rgba(255, 255, 255, 0.1) !important;
}

.clan-name {
    color: #fff !important;
    font-size: 16px !important;
    text-transform: uppercase !important;
    margin: 5px 0 !important;
    font-weight: bold !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
}

.clan-tag {
    color: #467ebb !important;
    font-size: 14px !important;
    font-weight: bold !important;
}

/* =============================================
   АДАПТИВНОСТЬ
============================================= */

/* Для больших экранов - 3 карточки в ряд */
@media (min-width: 1200px) {
    .clan-card-item {
        width: calc((100% - 40px) / 3) !important; /* 3 в ряд */
    }
}

/* Для средних экранов - 2 карточки в ряд */
@media (min-width: 768px) and (max-width: 1199px) {
    .clan-card-item {
        width: calc((100% - 20px) / 2) !important; /* 2 в ряд */
    }
}

/* Для маленьких экранов - 1 карточка в ряд */
@media (max-width: 767px) {
    .clan-card-item {
        width: 100% !important; /* 1 в ряд */
        height: 280px !important;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .clan-cards-container {
        gap: 10px !important;
    }
    
    .clan-card-item {
        height: 250px !important;
    }
    
    .clan-avatar img {
        width: 60px !important;
        height: 60px !important;
    }
    
    .clan-name {
        font-size: 14px !important;
    }
    
    .clan-tag {
        font-size: 12px !important;
    }
}

/* =============================================
   ОЧИСТКА СТАРЫХ СТИЛЕЙ
============================================= */

/* Удаляем или комментируем старые стили, которые могут мешать */
/*
.clan-grid-modern {
    display: none !important;
}

.clan-card {
    display: none !important;
}

.clan-main-wrapper {
    display: none !important;
}
*/

/* ИЛИ просто переопределяем их */
.clan-grid-modern {
    display: none !important;
}

.clan-card {
    display: none !important;
}

