/* Общие стили для медиа блоков */
.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-1.jpg);
  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),#28201b 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: #28201b;
  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;
  background-color: #392d26;
  padding: .75rem;
}

.top__rw {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 0;
  cursor: default;
  min-height: 1.875rem;
  box-sizing: border-box;
  font-weight: 700;
  transition: all .2s;
}

.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;
  }
}

/* Переменные */
:root {
  --border: 1px solid #574d46;
  --color-0: 255,255,255;
  --color-accent: 255,184,45;
  --color-1: 20,20,20;
  --color-2: 57,45,38;
  --color-4: 147,134,126;
}

[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;
}

