/* Общие стили для медиа блоков */
.media {
    padding: 1.25rem 0;
}

.media__list {
    display: grid;
    grid-gap: 3.75rem 1.875rem;
    gap: 3.75rem 1.875rem;
    max-width: 43.75rem;
    margin: 0 auto;
}

@media (min-width:1200px) {
    .media__list {
        grid-template-columns: repeat(3,1fr);
        max-width: none;
    }
}

/* Стили для box элементов */
.box {
    --box-char-scale: 0.8;
    --box-char-transform: scale(1);
    border: 1px solid #574d46;
    border: var(--border);
    box-sizing: border-box;
    padding: .25rem;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 0;
}

.box__bg {
    z-index: -3;
    background-color: transparent;
    background-image: url(../images/bg-active.png);
    background-size: cover;
    background-position: 50%;
    background-repeat: no-repeat;
    height: 17.8125rem;
}

.box__bg, .box__bg:after {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
}

.box__bg:after {
    display: block;
    content: "";
    bottom: 0;
    background: linear-gradient(180deg,rgba(40,32,27,0),rgb(9, 19, 31) 74.97%);
    z-index: 10;
}

.box__char {
    position: absolute;
    left: calc(50% - 21.75rem*var(--box-char-scale)/2);
    z-index: -1;
    background-color: transparent;
    background-image: url(../images/char-1.png);
    background-position: 50%;
    background-size: contain;
    width: calc(21.75rem*var(--box-char-scale));
    height: calc(16.875rem*var(--box-char-scale));
    top: -1.25rem;
    pointer-events: none;
    -webkit-mask: linear-gradient(0deg,transparent 0,#000 14%);
    mask: linear-gradient(0deg,transparent 0,#000 14%);
    transition: all .3s;
    transform-origin: center bottom;
    transform: var(--box-char-transform);
}

.box__container {
    background-color: rgb(var(--body-background-color));
    position: relative;
    z-index: 2;
    padding: .5rem;
    flex-grow: 1;
}

.box__container, .box__heading {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.box__heading {
    height: 7.5rem;
    padding-bottom: 1rem;
    text-align: center;
    justify-content: center;
}

.box__title {
    margin-top: auto;
    color: #fff;
    color: rgba(var(--color-0),1);
    font-size: 1.5rem;
    font-style: normal;
    font-weight: 700;
    line-height: 1.25;
}

.box__body {
    flex-grow: 1;
    display: flex;
    justify-content: stretch;
    flex-direction: column;
}

@media (min-width:840px) {
    .box {
        --box-char-scale: 1;
    }

    .box:hover {
        --box-char-transform: scale(1.06);
    }

    .box__char {
        top: -4.375rem;
    }

    .box__container {
        padding: 1rem;
    }

    .box__heading {
        height: 9.0625rem;
        padding-bottom: 1.25rem;
    }

    .box__title {
        font-size: 2.125rem;
    }
}

/* Стили для рейтинга (Leaderboard) */
.rating, .rating__body {
    flex-grow: 1;
    display: flex;
    justify-content: stretch;
    flex-direction: column;
}

.rating__tab {
    border: 1px solid #574d46;
    border: var(--border);
    padding: .25rem;
}

.top {
    --top-margin: 0;
    box-sizing: border-box;
    font-size: .875rem;
    color: #fff;
    color: rgba(var(--color-0),1);
    position: relative;
    z-index: 0;
    padding: .75rem;
}

.top__rw {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 0;
    cursor: default;
    min-height: 2.6rem;
    box-sizing: border-box;
    font-weight: 700;
    transition: all .2s;
}

.error {
    display: flex; align-items: center; width: 100%; justify-content: center; flex-direction: column; height: 100%;
}
/* Tabs hidden on desktop */
.top-mobile-tabs {
    display: none;
}

@media (max-width: 507px) {
    .box__heading {
        margin: 1rem;
    }
}
@media (max-width: 992px) {

    .fll {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    .top-columns {
        display: block !important;
    }

    .top-mobile-tabs {
        display: flex;
        gap: 6px;
        margin-bottom: 10px;
    }

    .top-mobile-tab {
        flex: 1;
        padding: 8px 10px;
        background: #151c2b;
        border: 1px solid #d4af37;
        color: #d4af37;
        font-weight: 600;
        cursor: pointer;
        transition: .3s;
    }

    .top-mobile-tab.active {
        background: #d4af37;
        color: #111;
    }

    .top-col {
        display: none;
    }

    .top-col.active {
        display: block;
    }
}
.top__rw:not(.top__header):first-child, .top__rw:not(.top__header):nth-child(2), .top__rw:not(.top__header):nth-child(3) {
    color: #ffb82d;
    color: rgba(var(--color-accent),1);
    font-weight: 700;
}

.top__rw:not(.top__header):first-child .top__place:after, .top__rw:not(.top__header):nth-child(2) .top__place:after, .top__rw:not(.top__header):nth-child(3) .top__place:after {
    display: block;
    content: "";
    background-image: url(../images/place.svg);
    background-size: contain;
    background-position: 50%;
    background-repeat: no-repeat;
    width: 1.125rem;
    height: 1.375rem;
}

.top__rw:not(.top__header):after {
    display: none;
    content: "";
    position: absolute;
    left: var(--top-margin);
    right: var(--top-margin);
    bottom: 0;
    height: 1px;
    background-color: #eee;
}

.top__rw:not(.top__header):last-child:after {
    content: none;
}

.top__num {
    flex-basis: 2.125rem;
    text-align: left;
    justify-content: flex-start;
    font-weight: 400;
}

.top__num, .top__place {
    min-width: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.top__place {
    flex-basis: 2.8125rem;
    padding: 0;
    margin-right: 1.25rem;
}

.top__icon, .top__place {
    text-align: center;
    justify-content: center;
}

.top__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    position: relative;
    top: 1px;
    padding-right: .25rem;
}

.top__icon:empty {
    display: none;
}

.top__ico {
    display: block;
}

.top__name {
    flex-grow: 1;
    text-align: left;
    justify-content: flex-start;
}

.top__name, .top__total {
    min-width: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.top__total {
    flex-basis: 2.5rem;
    text-align: right;
    padding: 0 .25rem;
    justify-content: flex-end;
    flex-shrink: 0;
}

.top__content {
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.top__clan-ico {
    display: inline-block;
    position: relative;
    top: .125rem;
}

.top__clan-ico:last-child {
    margin-right: .3125rem;
}

.top__header .top__content {
    cursor: default;
    color: #93867e;
    font-size: .875rem;
}

@media (min-width:400px) {
    .top__total {
        flex-basis: 5.625rem;
    }
}

/* Кнопки переключения рейтинга */
.rating-btns, .rating-btns__btn {
    display: flex;
    justify-content: center;
    align-items: center;
}

.rating-btns {
    grid-gap: .3125rem;
    gap: .3125rem;
    margin-top: auto;
    padding-top: .5rem;
}

.rating-btns__btn {
    flex-basis: 47%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    cursor: pointer;
    background-color: #29241f;
    color: #fff;
    color: rgba(var(--color-0),1);
    border: 1px solid #574d46;
    border: 1px solid var(--border-color);
    font-size: 1rem;
    min-height: 3.125rem;
    transition: all .3s;
}

.rating-btns__btn:hover {
    background-color: #3a332c;
}

[data-atab-btn-active=true], [data-atab-btn-active=true]:hover {
    background-color: #ffb82d;
    background-color: rgba(var(--color-accent),1);
    border: 1px solid #ffb82d;
    border: 1px solid rgba(var(--color-accent),1);
    color: #141414;
    color: rgba(var(--color-1),1);
}

@media (min-width:500px) {
    .rating-btns {
        flex-wrap: nowrap;
    }

    .rating-btns__btn {
        flex-basis: 50%;
    }
}

/* Стили для социальных блоков (Follow Us) */
.social-list {
    display: grid;
    grid-gap: .625rem;
    gap: .625rem;
}

.social {
    border: 1px solid #574d46;
    border: var(--border);
    border-color: #6972e7;
    box-sizing: border-box;
    padding: .25rem;
    min-height: 6.25rem;
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    align-items: stretch;
    position: relative;
    z-index: 0;
}

.social:where(:nth-child(2n)) {
    border-color: #2aabee;
}

.social:where(:nth-child(3n)) {
    border-color: #07f;
}

.social__link {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
    display: block;
    text-decoration: none;
}

.social__container {
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url(../images/bg-1_1.jpg);
    background-size: cover;
    background-position: 50%;
    flex-grow: 1;
    box-sizing: border-box;
    padding-left: 6.25rem;
    padding-right: .75rem;
    position: relative;
    z-index: 0;
    overflow: hidden;
}

.social__container, .social__ico {
    background-color: transparent;
    background-repeat: no-repeat;
}

.social__ico {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6.25rem;
    z-index: -1;
    pointer-events: none;
    background-image: url(../images/scl-ico-discord.png);
    background-size: contain;
    background-position: 0;
    filter: drop-shadow(.25rem .5rem .375rem rgba(11,13,33,.7));
    transition: all .2s;
}

.social:hover .social__ico {
    transform: scale(1.1);
}

.social__title {
    flex-grow: 1;
    min-width: 0;
    color: #fff;
    color: rgba(var(--color-0),1);
    font-size: 1.25rem;
    font-style: normal;
    font-weight: 700;
    line-height: 1.25;
    padding-right: .625rem;
    box-sizing: border-box;
}

.social__arrow {
    box-sizing: border-box;
    margin-left: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all .2s;
    flex-shrink: 0;
    background-color: transparent;
    background-image: url(../images/arrow.svg);
    background-size: cover;
    background-position: 50%;
    background-repeat: no-repeat;
    width: 2.375rem;
    height: 2.4375rem;
    display: none;
}

.social:hover .social__arrow {
    transform: scale(1.1);
}

@media (min-width:540px) {
    .social {
        min-height: 8.1875rem;
    }

    .social__container {
        padding-left: 8.75rem;
        padding-right: .875rem;
    }

    .social__ico {
        width: 9.375rem;
    }

    .social__title {
        font-size: 1.5rem;
    }
}

@media (min-width:460px) {
    .social__arrow {
        display: flex;
    }
}

/* Анимации */
.fadeIn {
    -webkit-animation: fadeIn 1s ease forwards;
    animation: fadeIn 1s ease forwards;
}

@-webkit-keyframes fadeIn {
    0% {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}


[data-open-tab-active=true].rating-btns__btn {
    color: #12100f;
    background-color: #ffb82d;
    background-color: rgba(var(--color-accent), 1);
    border-color: #ffb82d;
    border-color: rgba(var(--color-accent), 1);
}

.rating-btns__btn {
    grid-gap: .375rem;
    gap: .375rem;
    font-size: 1.2rem;
    font-style: normal;
    font-weight: 700;
    text-transform: uppercase;
    flex-basis: 100%;
    min-height: 2.5rem;
    border: 1px solid #574d46;
    cursor: pointer;
    transition: all .2s;
}

.rating-btns__btn-ico {
    font-size: 1.5rem;
    position: relative;
    z-index: 0;
    top: -1px;
}

.theme {
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    padding: .625rem;
    position: relative;
    z-index: 0;
    overflow: hidden;
    background: #131d26;
    border-radius: 3px;
    min-height: 5.3rem;
    cursor: default;
    transition: all .2s;
    min-width: 0;
    max-width: 100%;
    line-height: 1.2
}

.theme:not(:last-child) {
    border-bottom: 0.0625rem solid rgba(246, 246, 246, 0.14);
    border-bottom: 0.0625rem solid var(--box-border-color)
}

.theme__pic {
    width: 3.125rem;
    height: 3.125rem;
    position: relative;
    z-index: 0;
    margin-right: .875rem;
    box-sizing: border-box
}

.theme__ava, .theme__pic {
    flex-shrink: 0;
    border-radius: 50%
}

.theme__ava {
    width: 100%;
    height: 100%
}

.theme__content {
    min-width: 0;
    flex-grow: 1;
    box-sizing: border-box
}

.theme__title {
    text-decoration: none;
    color: #fff8eb;
    color: rgba(var(--color-0), 1);
    font-weight: 600;
    transition: all .2s;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden
}

.theme__info, .theme__title {
    font-size: .875rem;
    padding: 0.0625rem 0
}

.theme__info {
    display: flex;
    align-items: center;
    color: rgba(248, 248, 248, 0.7);
}

.theme__sep {
    margin-left: .5rem;
    margin-right: .5rem;
    display: none
}

.theme__author {
    box-sizing: border-box;
    white-space: nowrap
}

.theme__author-name {
    color: #ccc1a4;
    color: rgba(var(--color-1), 1)
}

.theme__date {
    box-sizing: border-box;
    white-space: nowrap;
    margin-left: auto
}

.theme__link {
    display: block;
    text-decoration: none;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10
}

.theme__arrow {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    border: 0.0625rem solid rgba(255, 255, 255, 0.3);
    margin-left: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0
}

.theme__arrow, .theme__arrow:before {
    box-sizing: border-box;
    transition: all .2s
}

.theme__arrow:before {
    display: block;
    content: "";
    width: .625rem;
    height: .625rem;
    border-right: .125rem solid #ffffff;
    border-right: .125rem solid rgba(var(--color-accent), 1);
    border-top: .125rem solid #ffffff;
    border-top: .125rem solid rgba(var(--color-accent), 1);
    transform: rotate(45deg);
    margin-right: .1875rem
}

.theme:hover .theme__title {
    color: #ffce8f;
    color: rgba(var(--color-accent), 1)
}

.theme:hover .theme__arrow {
    background-color: #fbfbfb;
}

.theme:hover .theme__arrow:before {
    border-color: #000
}

/**/
 .top-columns{
     display:grid;
     grid-template-columns:repeat(3,1fr);
     gap:40px;
     position:relative;
 }

.top-columns .top{
    position:relative;
    padding:0 .8rem;
}

.top-columns .top:not(:last-child)::after{
    content:"";
    position:absolute;
    top:0;
    right:0;
    width:1px;
    height:100%;
    background:linear-gradient(
            to bottom,
            transparent,
            rgba(212,175,55,0.6),
            rgba(243,196,107,0.9),
            rgba(212,175,55,0.6),
            transparent
    );
    box-shadow:0 0 12px rgba(243,196,107,0.4);
}
/* Разделители строк */
.top__rw:not(.top__header) {
    border-bottom: 1px solid rgba(212,175,55,0.12);
}

.top__rw:not(.top__header):hover {
    background: rgba(212,175,55,0.06);
    box-shadow: inset 0 0 8px rgba(212,175,55,0.15);
}

/* Убираем линию у последней строки */
.top__rw:last-child {
    border-bottom: none;
}

