@import url("../main.css");

.leaderboard-main {
  width: 100%;
  padding: 43px 16px 64px;
}

.leaderboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 486px;
  align-items: start;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  gap: 24px;
}

.leaderboard-list {
  min-width: 0;
}

.leaderboard-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 20px;
}

.leaderboard-heading h1 {
  margin: 0;
  color: #ffffff;
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 32px;
  font-style: normal;
  font-weight: 900;
  line-height: 100%;
  letter-spacing: 0;
  text-transform: uppercase;
}

.leaderboard-search {
  display: flex;
  align-items: center;
  width: 212px;
  height: 40px;
  flex: 0 0 212px;
  padding: 0 12px;
  gap: 6px;
  border: 1px solid #404040;
  border-radius: 8px;
  background: #242424;
}

.leaderboard-search > i {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: #a3a3a3;
  font-size: 16px;
  line-height: 16px;
}

.leaderboard-search input {
  width: 100%;
  min-width: 0;
  height: 20px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #ffffff;
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 20px;
}

.leaderboard-search input::placeholder {
  color: #a3a3a3;
  opacity: 1;
}

.leaderboard-search input::-webkit-search-cancel-button {
  cursor: pointer;
  filter: grayscale(1) brightness(4);
}

.leaderboard-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: 12px;
  color: #d4d4d4;
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 24px;
}

.leaderboard-season-countdown {
  margin-left: 4px;
  color: #ffffff;
  font-weight: 700;
}

.leaderboard-updated-time {
  margin-left: 4px;
  color: #ffffff;
  font-weight: 600;
}

.leaderboard-board {
  width: 100%;
  margin-top: 20px;
  padding: 20px 20px 0;
  border: 1px solid #525252;
  border-radius: 16px;
  background: #171717;
  overflow: hidden;
}

.leaderboard-board-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 20px;
}

.leaderboard-game-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.leaderboard-game-title h2 {
  margin: 0;
  color: #ffffff;
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 24px;
  font-style: normal;
  font-weight: 900;
  line-height: 36px;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
}

.leaderboard-game-title i {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 20px;
  height: 20px;
  color: #525252;
  font-size: 20px;
}

.leaderboard-mode-toggle {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 274px;
  height: 40px;
  flex: 0 0 274px;
  padding: 2px;
  overflow: hidden;
  border-radius: 8px;
  background: #242424;
}

.leaderboard-mode-toggle::before {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 90px;
  height: 36px;
  border-radius: 6px;
  background: #171717;
  transform: translateX(0);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  content: "";
}

.leaderboard-mode-toggle[data-active="2v2"]::before {
  transform: translateX(90px);
}

.leaderboard-mode-toggle[data-active="4v4"]::before {
  transform: translateX(180px);
}

.leaderboard-mode-toggle button {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 90px;
  height: 36px;
  flex: 0 0 90px;
  padding: 6px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #525252;
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  cursor: pointer;
  transition: color 0.25s ease;
}

.leaderboard-mode-toggle button[aria-pressed="true"] {
  color: #fba924;
  font-weight: 600;
}

.leaderboard-entries {
  width: 100%;
  margin-top: 20px;
}

.leaderboard-entry {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 81px;
  padding: 16px 4px 16px 0;
  gap: 16px;
  border-bottom: 1px solid #2e2e2e;
}

.leaderboard-entry--first {
  border-bottom: 0;
}

.leaderboard-entry--first::before {
  position: absolute;
  top: 0;
  right: -20px;
  bottom: 0;
  left: -20px;
  z-index: 0;
  border-left: 2px solid #ff9d00;
  border-bottom: 1px solid #2e2e2e;
  background:
    radial-gradient(
      65.15% 241.35% at 34.85% 100%,
      rgba(194, 65, 12, 0.4) 0%,
      rgba(76, 5, 25, 0.4) 58.64%,
      rgba(26, 0, 7, 0.4) 100%
    ),
    #000000;
  content: "";
}

.leaderboard-entry > * {
  position: relative;
  z-index: 1;
}

.leaderboard-entry-rank {
  width: 32px;
  height: 28px;
  flex: 0 0 32px;
  color: #ffffff;
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 20px;
  font-style: normal;
  font-weight: 900;
  line-height: 140%;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.leaderboard-entry-player {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
  gap: 20px;
}

.leaderboard-entry-avatar {
  display: block;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 50%;
  object-fit: cover;
}

.leaderboard-entry-avatar-placeholder {
  display: block;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 50%;
  background: #ffffff;
}

.leaderboard-entry-identity {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.leaderboard-entry-identity strong {
  width: 100%;
  overflow: hidden;
  color: #ffffff;
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 18px;
  font-style: normal;
  font-weight: 700;
  line-height: 140%;
  text-overflow: ellipsis;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
}

.leaderboard-entry-identity span {
  width: 100%;
  overflow: hidden;
  color: #e5e5e5;
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 140%;
  text-overflow: ellipsis;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
}

.leaderboard-entry-score {
  flex: none;
  color: #ffffff;
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 20px;
  font-style: normal;
  font-weight: 700;
  line-height: 140%;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.leaderboard-entry:not(.leaderboard-entry--first) .leaderboard-entry-score {
  color: #d4d4d4;
  font-weight: 600;
}

.leaderboard-entry-open {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  padding: 4px;
  border: 0;
  background: transparent;
  color: #525252;
  cursor: pointer;
}

.leaderboard-entry-open i {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 16px;
  height: 16px;
  font-size: 16px;
}

.leaderboard-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 64px;
  padding: 12px;
}

.leaderboard-pagination-arrow {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  padding: 4px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
}

.leaderboard-pagination-arrow:disabled {
  color: #737373;
  cursor: default;
}

.leaderboard-pagination-arrow i {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  font-size: 16px;
  line-height: 16px;
}

.leaderboard-pagination-pages {
  display: flex;
  align-items: center;
  width: 172px;
  height: 34px;
  padding: 0;
  border-radius: 8px 8px 0 0;
  backdrop-filter: blur(10px);
}

.leaderboard-pagination-pages button,
.leaderboard-pagination-pages span {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 34px;
  padding: 8px;
  border: 0;
  background: transparent;
  color: #a3a3a3;
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
  line-height: 18px;
}

.leaderboard-pagination-pages button {
  cursor: pointer;
}

.leaderboard-pagination-pages button[aria-current="page"] {
  color: #ffffff;
}

.leaderboard-pagination-pages button:first-child {
  width: 22px;
}

.leaderboard-pagination-pages button:nth-child(2),
.leaderboard-pagination-pages button:nth-child(3) {
  width: 26px;
}

.leaderboard-pagination-pages button:nth-child(4) {
  width: 27px;
}

.leaderboard-pagination-pages span {
  width: 29px;
}

.leaderboard-pagination-pages button:last-child {
  width: 42px;
}

@media (prefers-reduced-motion: reduce) {
  .leaderboard-mode-toggle::before,
  .leaderboard-mode-toggle button {
    transition: none;
  }
}

.leaderboard-player-profile {
  position: sticky;
  top: 81px;
  width: 486px;
  min-height: calc(100vh - 81px);
  margin-top: -43px;
  align-self: start;
  background-color: #171717;
  background-image:
    linear-gradient(rgba(23, 23, 23, 0.9), rgba(23, 23, 23, 0.9)),
    url("../../assets/bg-toprank.webp");
  background-position: center top;
  background-size: cover;
}

.leaderboard-profile-avatar {
  display: block;
  width: 200px;
  height: 200px;
  margin-top: 127px;
  margin-right: auto;
  margin-left: auto;
  padding: 2px;
  border-radius: 9999px;
  background: linear-gradient(
    135deg,
    #525252 0%,
    #424242 43.27%,
    #7d7d7d 100%
  );
  object-fit: cover;
}

.leaderboard-profile-identity {
  display: flex;
  width: 406px;
  margin: 16px auto 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.leaderboard-profile-identity strong,
.leaderboard-profile-identity span {
  width: 100%;
  font-family: "Be Vietnam Pro", sans-serif;
  font-style: normal;
  line-height: 140%;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.leaderboard-profile-identity strong {
  color: #ffffff;
  font-size: 24px;
  font-weight: 700;
}

.leaderboard-profile-identity span {
  color: #e5e5e5;
  font-size: 14px;
  font-weight: 400;
}

.leaderboard-profile-badges {
  display: grid;
  grid-template-columns: 1fr 1.093fr 1fr;
  align-items: start;
  width: 406px;
  height: 189px;
  margin: 20px auto 0;
  gap: 4px;
}

.leaderboard-profile-badge {
  position: relative;
  display: flex;
  height: 185px;
  padding: 24px 14px 8px;
  overflow: hidden;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  isolation: isolate;
  background:
    radial-gradient(
      circle at 50% 72%,
      rgba(255, 255, 255, 0.035) 0,
      transparent 52%
    ),
    linear-gradient(180deg, rgba(20, 20, 20, 0) 13%, #141414 108%);
  clip-path: polygon(0 0, 100% 0, 100% 86%, 50% 100%, 0 86%);
}

.leaderboard-profile-badge--duel {
  height: 189px;
  padding: 24px 20px 12px;
}

.leaderboard-profile-badge-copy {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  height: 52px;
  flex-direction: column;
  align-items: center;
}

.leaderboard-profile-badge-copy span {
  width: 100%;
  color: #a3a3a3;
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 20px;
  text-align: center;
  white-space: nowrap;
}

.leaderboard-profile-badge-copy strong {
  color: #ffffff;
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 20px;
  font-style: normal;
  font-weight: 900;
  line-height: 32px;
  text-align: center;
}

.leaderboard-profile-emblem {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  max-width: 101px;
  height: 101px;
  flex: 0 0 101px;
  justify-content: center;
  align-items: center;
}

.leaderboard-profile-emblem img {
  display: block;
  width: 101px;
  height: 101px;
  object-fit: contain;
}

@media (max-width: 960px) {
  .leaderboard-layout {
    grid-template-columns: 1fr;
  }

  .leaderboard-player-profile {
    position: static;
    width: 100%;
    margin-top: 0;
  }

  .leaderboard-profile-badges {
    max-width: calc(100% - 40px);
  }
}
