.ranking-shell {
  --ranking-bg: #101315;
  --ranking-panel: rgba(24, 24, 24, 0.9);
  --ranking-panel-soft: rgba(38, 38, 38, 0.92);
  --ranking-border: rgba(255, 255, 255, 0.12);
  --ranking-gold: #d8b56a;
  --ranking-text: #dce8f2;
  --ranking-muted: #8f969d;
  width: 100vw;
  min-height: calc(100vh - 92px);
  margin: -8px 0 0 calc(50% - 50vw);
  padding: 46px 0 70px;
  background:
    linear-gradient(180deg, rgba(8, 10, 11, 0.9) 0%, rgba(8, 10, 11, 0.56) 16%, rgba(8, 10, 11, 0.58) 78%, rgba(8, 10, 11, 0.92) 100%),
    url("../../../themes/vinvictus/assets/images/titan/azeroth.png") center top / cover no-repeat;
  background-attachment: fixed;
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
}

.ranking-shell::before,
.ranking-shell::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: -1;
  pointer-events: none;
}

.ranking-shell::before {
  top: 0;
  height: 190px;
  background: linear-gradient(180deg, rgba(8, 10, 11, 0.98), rgba(8, 10, 11, 0));
}

.ranking-shell::after {
  bottom: 0;
  height: 230px;
  background: linear-gradient(0deg, rgba(8, 10, 11, 0.98), rgba(8, 10, 11, 0));
}

.ranking-container {
  width: min(1552px, calc(100vw - 96px));
  margin: 0 auto;
}

.ranking-layout {
  display: grid;
  grid-template-columns: 325px minmax(0, 1fr);
  gap: clamp(72px, 5vw, 96px);
  align-items: start;
}

.ranking-sidebar {
  display: grid;
  gap: 56px;
}

.ranking-menu {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--ranking-border);
  background: rgba(28, 28, 28, 0.9);
}

.ranking-menu-title,
.ranking-menu button {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border: 0;
  border-bottom: 1px solid var(--ranking-border);
  background: transparent;
  color: var(--ranking-gold);
  font: 600 16px/1.2 Poppins, Arial, sans-serif;
  text-align: left;
}

.ranking-menu-title {
  color: var(--ranking-muted);
  font-weight: 500;
}

.ranking-menu li:last-child button {
  border-bottom: 0;
}

.ranking-menu button.active,
.ranking-menu button:hover {
  background: rgba(216, 181, 106, 0.1);
  color: #f0cb77;
}

.ranking-content {
  min-width: 0;
  padding-top: 26px;
}

.ranking-hero {
  display: block;
  margin: 0 0 31px;
}

.ranking-hero h1 {
  margin: 0 0 20px;
  color: #fff;
  font-size: 46px;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.85);
}

.ranking-realms {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
}

.ranking-realm-pill {
  min-width: 0;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 18px;
  border: 0;
  background: rgba(37, 38, 40, 0.94);
  color: #d6d6d6;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}

.ranking-realm-pill.active,
.ranking-realm-pill:hover {
  background: #f2f2f2;
  color: #2a2a2a;
}

.ranking-realm select {
  min-width: 190px;
  height: 42px;
  border: 0;
  border-radius: 21px;
  padding: 0 38px 0 16px;
  background: #f2f2f2;
  color: #2a2a2a;
  font-weight: 600;
}

.ranking-tabs {
  display: none;
}

.ranking-tabs.active {
  display: block;
}

.ranking-table {
  display: grid;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.ranking-head,
.ranking-row {
  display: grid;
  grid-template-columns: 19% 29% 18% 19% 15%;
  align-items: center;
  min-height: 66px;
  border-radius: 5px;
  background: var(--ranking-panel);
}

.ranking-head {
  min-height: 48px;
  color: var(--ranking-gold);
  font-weight: 700;
  font-size: 16px;
}

.ranking-row {
  color: var(--ranking-text);
  font-weight: 700;
  font-size: 16px;
}

.ranking-cell {
  padding: 0 22px;
  text-align: center;
}

.ranking-player {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--ranking-text);
  text-decoration: none;
}

.ranking-player:hover {
  color: #fff;
  background: rgba(216, 181, 106, 0.22);
}

.ranking-race-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
}

.ranking-faction-icon {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.ranking-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  color: #dce8f2;
  font-size: 20px;
}

.ranking-trophy {
  position: relative;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
  line-height: 1;
}

.ranking-trophy i {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: currentColor;
  font-size: 42px;
  line-height: 1;
}

.ranking-trophy b {
  position: relative;
  z-index: 1;
  display: inline-block;
  margin-top: -2px;
  color: #121212;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.24);
}

.ranking-trophy-1 {
  color: #ffc400;
  filter: drop-shadow(0 0 5px rgba(255, 196, 0, 0.32));
}

.ranking-trophy-2 {
  color: #aeb8c8;
  filter: drop-shadow(0 0 5px rgba(174, 184, 200, 0.24));
}

.ranking-trophy-3 {
  color: #b67108;
  filter: drop-shadow(0 0 5px rgba(182, 113, 8, 0.26));
}

.ranking-empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: var(--ranking-panel);
  color: var(--ranking-muted);
  font-weight: 600;
}

@media (max-width: 1100px) {
  .ranking-container {
    width: min(100% - 32px, 980px);
  }

  .ranking-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .ranking-sidebar {
    gap: 18px;
  }
}

@media (max-width: 760px) {
  .ranking-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .ranking-hero h1 {
    font-size: 32px;
  }

  .ranking-head {
    display: none;
  }

  .ranking-row {
    grid-template-columns: 74px minmax(0, 1fr);
    grid-template-areas:
      "rank name"
      "rank faction"
      "rank points"
      "rank level";
    row-gap: 6px;
    padding: 14px 0;
  }

  .ranking-cell {
    padding: 0 14px;
    text-align: left;
  }

  .ranking-cell-rank {
    grid-area: rank;
    text-align: center;
  }

  .ranking-cell-name {
    grid-area: name;
  }

  .ranking-cell-faction {
    grid-area: faction;
  }

  .ranking-cell-points {
    grid-area: points;
  }

  .ranking-cell-level {
    grid-area: level;
  }

  .ranking-player {
    justify-self: start;
  }
}
