/* module_page_configs v2 — каталог конфигов + страница игрока.
   Пагинация — глобальные классы темы (.pagination / .button_pagination). */

/* ---------- Общее ---------- */

.pcfg-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-custom, #8b8d97);
    font-size: var(--font-size-s, 13px);
    margin-bottom: 12px;
    text-decoration: none;
    transition: color .15s ease;
}

.pcfg-back:hover {
    color: var(--text-default, #fff);
}

.pcfg-back svg {
    width: 10px;
    height: 10px;
    fill: currentColor;
}

/* ---------- Hero ---------- */

.pcfg-hero {
    position: relative;
    overflow: hidden;
    background: var(--card, #1a1b23);
    border: 1px solid var(--transparent-5-w, rgba(255, 255, 255, .05));
    border-radius: var(--br-16, 16px);
    padding: 22px 24px;
    margin-bottom: 14px;
}

.pcfg-hero__glow {
    position: absolute;
    top: -120px;
    right: -60px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(125, 127, 255, .16), transparent 65%);
    pointer-events: none;
}

.pcfg-hero__inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.pcfg-hero__title {
    font-size: 24px;
    font-weight: var(--font-weight-7, 700);
    color: var(--text-default, #fff);
    margin: 0 0 6px;
    line-height: 1.2;
}

.pcfg-hero__sub {
    color: var(--text-custom, #8b8d97);
    font-size: var(--font-size-s, 13px);
    max-width: 560px;
    line-height: 1.5;
}

.pcfg-hero__stats {
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--transparent-5-w, rgba(255, 255, 255, .05));
}

.pcfg-hero__count {
    color: var(--text-custom, #8b8d97);
    font-size: var(--font-size-s, 13px);
    white-space: nowrap;
}

.pcfg-hero__count b {
    color: var(--text-default, #fff);
    font-size: var(--font-size-m, 15px);
}

.pcfg-hero__hint {
    color: var(--text-custom, #8b8d97);
    font-size: var(--font-size-s, 12px);
    opacity: .8;
}

.pcfg-hero--empty {
    text-align: center;
    padding: 40px 24px;
}

/* ---------- Поиск ---------- */

.pcfg-search {
    position: relative;
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.pcfg-search__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 13px;
    height: 13px;
    fill: var(--text-custom, #8b8d97);
    pointer-events: none;
}

.pcfg-search input {
    background: var(--transparent-5-w, rgba(255, 255, 255, .05));
    border: 1px solid var(--transparent-5-w, rgba(255, 255, 255, .07));
    border-radius: var(--br-8, 10px);
    color: var(--text-default, #fff);
    padding: 10px 14px 10px 36px;
    min-width: 230px;
    outline: none;
    transition: border-color .15s ease;
}

.pcfg-search input:focus {
    border-color: var(--span, #7d7fff);
}

.pcfg-search input::placeholder {
    color: var(--text-custom, #8b8d97);
}

.pcfg-search button {
    background: var(--span, #7d7fff);
    color: var(--text-default, #fff);
    border: none;
    border-radius: var(--br-8, 10px);
    padding: 10px 20px;
    cursor: pointer;
    font-weight: var(--font-weight-6, 600);
    transition: opacity .15s ease;
}

.pcfg-search button:hover {
    opacity: .85;
}

/* ---------- Список ---------- */

.pcfg-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pcfg-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--card, #1a1b23);
    border: 1px solid var(--transparent-5-w, rgba(255, 255, 255, .05));
    border-radius: var(--br-16, 14px);
    padding: 12px 18px;
    text-decoration: none;
    transition: border-color .15s ease, transform .12s ease;
}

.pcfg-item:hover {
    border-color: var(--span, #7d7fff);
    transform: translateY(-1px);
}

.pcfg-item__rank {
    width: 36px;
    text-align: center;
    font-size: 17px;
    font-weight: var(--font-weight-7, 700);
    color: var(--text-custom, #8b8d97);
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.pcfg-item__rank--1 { color: #f5c644; }
.pcfg-item__rank--2 { color: #c0c7d1; }
.pcfg-item__rank--3 { color: #d0885a; }

.pcfg-item__ava {
    width: 48px;
    height: 48px;
    border-radius: var(--br-8, 10px);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--transparent-5-w, rgba(255, 255, 255, .05));
}

.pcfg-item__who {
    min-width: 0;
    flex: 1;
}

.pcfg-item__name {
    color: var(--text-default, #fff);
    font-weight: var(--font-weight-6, 600);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pcfg-item__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 5px;
}

.pcfg-item__date {
    color: var(--text-custom, #8b8d97);
    font-size: var(--font-size-s, 12px);
    white-space: nowrap;
}

.pcfg-item__chip {
    font-size: 11px;
    color: var(--text-custom, #8b8d97);
    background: var(--transparent-5-w, rgba(255, 255, 255, .05));
    padding: 3px 9px;
    border-radius: 20px;
    white-space: nowrap;
}

.pcfg-item__chip b {
    color: var(--text-default, #fff);
    font-weight: var(--font-weight-6, 600);
}

.pcfg-item__xhair {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: var(--br-8, 10px);
    background: linear-gradient(145deg, #333d36 0%, #242c27 100%);
    border: 1px solid var(--transparent-5-w, rgba(255, 255, 255, .05));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pcfg-item__dl {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-custom, #8b8d97);
    font-size: var(--font-size-s, 13px);
    font-variant-numeric: tabular-nums;
    min-width: 52px;
    justify-content: flex-end;
}

.pcfg-item__dl svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
    flex-shrink: 0;
}

.pcfg-item__open {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--transparent-5-w, rgba(255, 255, 255, .05));
    color: var(--text-default, #fff);
    border-radius: var(--br-8, 10px);
    padding: 9px 16px;
    font-size: var(--font-size-s, 13px);
    font-weight: var(--font-weight-6, 600);
    transition: background .15s ease;
}

.pcfg-item:hover .pcfg-item__open {
    background: var(--span, #7d7fff);
}

.pcfg-item__open svg {
    width: 8px;
    height: 8px;
    fill: currentColor;
}

/* ---------- Пусто ---------- */

.pcfg-emptybox {
    text-align: center;
    padding: 52px 20px;
    background: var(--card, #1a1b23);
    border: 1px solid var(--transparent-5-w, rgba(255, 255, 255, .05));
    border-radius: var(--br-16, 14px);
}

.pcfg-emptybox svg {
    width: 34px;
    height: 34px;
    fill: var(--text-custom, #8b8d97);
    opacity: .55;
    margin-bottom: 12px;
}

.pcfg-emptybox__title {
    font-size: var(--font-size-l, 17px);
    font-weight: var(--font-weight-6, 600);
    color: var(--text-default, #fff);
    margin-bottom: 7px;
}

.pcfg-emptybox__desc {
    color: var(--text-custom, #8b8d97);
    font-size: var(--font-size-s, 13px);
    max-width: 420px;
    margin: 0 auto;
}

/* ---------- Шапка игрока ---------- */

.pcfg-player {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--card, #1a1b23);
    border: 1px solid var(--transparent-5-w, rgba(255, 255, 255, .05));
    border-radius: var(--br-16, 16px);
    padding: 16px 18px;
    margin-bottom: 14px;
}

.pcfg-player__ava {
    width: 62px;
    height: 62px;
    border-radius: var(--br-12, 12px);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--transparent-5-w, rgba(255, 255, 255, .05));
}

.pcfg-player__name {
    font-size: 19px;
    font-weight: var(--font-weight-7, 700);
    color: var(--text-default, #fff);
    margin-bottom: 4px;
    word-break: break-word;
}

.pcfg-player__links {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-custom, #8b8d97);
    font-size: var(--font-size-s, 13px);
}

.pcfg-player__links a {
    color: var(--span, #7d7fff);
    text-decoration: none;
}

.pcfg-player__links a:hover {
    text-decoration: underline;
}

/* ---------- Адаптив ---------- */

@media (max-width: 860px) {
    .pcfg-item__xhair {
        display: none;
    }
}

@media (max-width: 700px) {
    .pcfg-hero__inner {
        flex-direction: column;
        align-items: stretch;
    }

    .pcfg-search {
        width: 100%;
    }

    .pcfg-search input {
        flex: 1;
        min-width: 0;
    }

    .pcfg-item__rank {
        display: none;
    }

    .pcfg-item__dl {
        display: none;
    }

    .pcfg-item__open {
        padding: 9px 12px;
    }
}
