


* {
  box-sizing: border-box;
}

html {
  font-size: 110%;
}

body {
  font-size: 18px;
  margin: 0;
  padding: 24px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: radial-gradient(circle at top, #111827 0, #020617 55%, #020617 100%);
  color: #e5e7eb;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-wrapper {
  max-width: 1400px;
  margin: 0 auto;
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 32px;
  padding: 14px 20px;
  background-color: #020617;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.75);
  margin-bottom: 28px;
  position: relative;
}

.nav-bar img {
  height: 40px;
  width: auto;
}

.nav-bar a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #9ca3af;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.nav-bar a span {
  font-family: "DM Sans", sans-serif;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.nav-bar a i {
  font-size: 18px;
}

.nav-bar a:hover {
  background-color: rgba(148, 163, 184, 0.12);
  color: #e5e7eb;
  transform: translateY(-1px);
}

.nav-bar a.disabled {
  opacity: 0.35;
  pointer-events: none;
}

.search-form {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-form input {
  background-color: #020617;
  border-radius: 999px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  padding: 8px 12px;
  min-width: 220px;
  color: #e5e7eb;
  font-size: 18px;
  outline: none;
}

.search-form input::placeholder {
  color: #6b7280;
}

.search-form button {
  border-radius: 999px;
  border: none;
  padding: 8px 10px;
  background: linear-gradient(135deg, #facc15, #f97316);
  color: #020617;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.search-form button i {
  font-size: 18px;
}

.search-error {
  position: absolute;
  right: 20px;
  top: 100%;
  margin-top: 6px;
  font-size: 17px;
  color: #f97373;
  display: none;
}

.search-error.show {
  display: block;
}

.category-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 8px 8px 8px;
  margin-bottom: 24px;
  background-color: rgba(15, 23, 42, 0.85);
  border-radius: 16px;
  border: 1px solid rgba(55, 65, 81, 0.7);
}

.category-box {
  font-family: "DM Sans", sans-serif;
  font-weight: 700;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 17px;
  background-color: transparent;
  color: #9ca3af;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.category-box img {
  width: 22px;
  height: 22px;
}

.category-box:hover {
  background-color: rgba(55, 65, 81, 0.6);
  color: #e5e7eb;
  transform: translateY(-1px);
}

.category-box.active {
  background: radial-gradient(circle at top, #22c55e, #0891b2);
  color: #f9fafb;
  border-color: transparent;
}

#loader {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #020617;
  z-index: 50;
}

.dot-loader {
  display: flex;
  gap: 6px;
}

.dot-loader span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background-color: #facc15;
  animation: bounce 0.7s infinite alternate;
}

.dot-loader span:nth-child(2) {
  animation-delay: 0.15s;
}

.dot-loader span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes bounce {
  from {
    transform: translateY(0);
    opacity: 0.4;
  }
  to {
    transform: translateY(-8px);
    opacity: 1;
  }
}

.footer {
  margin-top: 24px;
  font-size: 16px;
  color: #6b7280;
  text-align: center;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.92);
  align-items: center;
  justify-content: center;
  z-index: 60;
}

.modal.show {
  display: flex;
}

.modal-content {
  width: 440px;
  max-width: 94%;
  background: linear-gradient(180deg, #0b1220, #020617);
  border-radius: 22px;
  padding: 26px 26px 28px;
  position: relative;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.85);
  font-variant-numeric: tabular-nums;
  overflow: visible;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(30, 41, 59, 0.9);
  border: none;
  color: #e5e7eb;
  font-size: 18px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  cursor: pointer;
}

.modal-close:hover {
  background: rgba(51, 65, 85, 0.95);
}

.modal-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.modal-avatar {
  width: 96px;
  height: 96px;
  border-radius: 26px;
}

.modal-username {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.modal-region {
  font-size: 15px;
  color: #9ca3af;
}

.namemc-btn {
  margin-top: 6px;
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(75, 85, 99, 0.8);
  color: #e5e7eb;
}

.modal-divider {
  margin: 22px 0 18px;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(148, 163, 184, 0.25),
    transparent
  );
}

.modal-position {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.position-rank {
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #f9fafb;
}

.position-overall {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #f9fafb;
}

.position-points {
  font-size: 15px;
  font-weight: 500;
  color: #9ca3af;
  transform: translateY(-1px);
}

.modal-section {
  width: 100%;
}

.modal-label {
  font-size: 13px;
  font-weight: 600;
  color: #9ca3af;
  margin-bottom: 12px;
  letter-spacing: 0.06em;
}

.modal-tiers-text {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.modal-tier-pill {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(55, 65, 81, 0.85);
  font-size: 15px;
  font-weight: 700;
  min-height: 46px;
}

.modal-tier-pill img {
  width: 20px;
  height: 20px;
}

.modal-tier-pill.empty {
  opacity: 0.25;
  pointer-events: none;
}

.tier-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px) scale(0.96);
  background: linear-gradient(180deg, #0b1220, #020617);
  border: 1px solid rgba(75, 85, 99, 0.85);
  border-radius: 14px;
  padding: 8px 14px;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  z-index: 999;
  transition: all 0.15s ease;
  box-shadow: 0 14px 45px rgba(0,0,0,0.7);
}

.modal-tier-pill.has-tooltip:hover .tier-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

.tier-tooltip-title {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: #f9fafb;
  line-height: 1.1;
}

.tier-tooltip-points {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #9ca3af;
  margin-top: 2px;
}


.overall-table {
  width: 100%;
  background-color: rgba(15, 23, 42, 0.98);
  border-radius: 16px;
  overflow: visable;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.7);
}

.table-header {
  display: grid;
  grid-template-columns:
    128px
    minmax(320px, 1.4fr)
    96px
    minmax(640px, 2.2fr);
  column-gap: 16px;
  align-items: center;
  padding: 12px 48px 12px 24px;
  background: linear-gradient(90deg, #0b1120, #020617);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9ca3af;
}

.table-header,
.player-row {
  width: 100%;
}



.header-rank {
  justify-content: center;
}

.header-player {
  justify-content: flex-start;
}

.header-region {
  display: flex;
  align-items: center;
  justify-content: center;
}


.header-tiers {
  justify-content: center;
  text-align: center;
}

#playerTableBody {
  display: flex;
  flex-direction: column;
}

.player-row {
  display: grid;
  height: 80px;
  grid-template-columns:
    125px
    minmax(360px, 1.4fr)
    96px
    minmax(640px, 2.2fr);
  column-gap: 16px;
  align-items: center;
  padding: 12px 48px 12px 24px;
  border-top: 1px solid rgba(31, 41, 55, 0.95);
  background-color: rgba(15, 23, 42, 0.98);
  cursor: pointer;
  position: relative;
  overflow: visible;
}

.player-row:hover {
  background-color: #020617;
  transform: translateY(-1px);
  box-shadow: none;
}


.player-left {
  grid-column: 1 / 3;
  display: flex;
  align-items: center;
  gap: 16px;
}



.rank-badge {
  position: relative;
  width: 132px;
  height: 64px;

  display: flex;
  align-items: center;
  gap: 6px;

  padding-left: 16px;

  font-weight: 900;
  font-size: 24px;
  font-style: italic;

  color: #020617;

  background: linear-gradient(
    135deg,
    #64748b 0%,
    #334155 55%,
    #1e293b 100%
  );

  clip-path: polygon(
    0 0,
    86% 0,
    100% 50%,
    86% 100%,
    0 100%
  );

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.35),
    0 14px 32px rgba(0,0,0,0.65);
}




.rank-avatar-wrap {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);

  width: 44px;
  height: 44px;

  overflow: hidden;
  border-radius: 8px;

  box-shadow:
    0 8px 18px rgba(0,0,0,0.7),
    inset 0 1px 0 rgba(255,255,255,0.3);
}

.rank-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}



.rank-badge.rank-1 {
  background: linear-gradient(
    135deg,
    #fde047 0%,
    #facc15 45%,
    #f59e0b 100%
  );
}

.rank-badge.rank-2 {
  background: linear-gradient(
    135deg,
    #f1f5f9 0%,
    #cbd5e1 45%,
    #94a3b8 100%
  );
}

.rank-badge.rank-3 {
  background: linear-gradient(
    135deg,
    #fdba74 0%,
    #fb923c 45%,
    #f97316 100%
  );
}





.rank-badge {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.25),
    0 4px 10px rgba(0,0,0,0.35);
}

.rank-number {
  font-size: 30px;
  line-height: 1;
  z-index: 2;

  color: #f3f1f0;

  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.75),
    0 5px 12px rgba(0, 0, 0, 0.6),
    0 10px 20px rgba(0, 0, 0, 0.35);
}


.rank-badge.rank-1 .rank-number,
.rank-badge.rank-2 .rank-number,
.rank-badge.rank-3 .rank-number {
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.85),
    0 6px 14px rgba(0, 0, 0, 0.65),
    0 14px 26px rgba(0, 0, 0, 0.4);
}







.rank-avatar {
  width: 60px;
  height: 60px;

  border-radius: 10px;
  overflow: visible;

  background: none;
  box-shadow: none;

}

.rank-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;

  border-radius: 10px;

}






.player-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.player-name {
  font-size: 1.1rem;
  font-weight: 600;
}

.player-points {
  font-size: 0.95rem;
  color: #9ca3af;
}


.region-cell {
  grid-column: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;

  width: auto;
  max-width: 100%;
}




.region {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: unset;
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
}

.region.EU { background: rgba(74, 222, 128, 0.2); color: #bbf7d0; }
.region.NA { background: rgba(248, 113, 113, 0.2); color: #fecaca; }
.region.AS { background: rgba(56, 189, 248, 0.2); color: #bae6fd; }
.region.AU { background: rgba(196, 181, 253, 0.2); color: #ddd6fe; }


.tier-list {
  grid-column: 4;
  display: grid;
  grid-template-columns: repeat(8, 64px);
  gap: 8px;

  align-items: center;
  justify-content: start;

  width: auto;
  justify-self: start;
  padding-left: 55px;
}





.tier-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 64px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background-color: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(55, 65, 81, 0.85);
  font-size: 0.9rem;
}

.tier-pill img {
  width: 16px;
  height: 16px;
}

.tier-pill.empty {
  opacity: 0.25;
}


@media (max-width: 980px) {
  .table-header,
  .player-row {
    grid-template-columns:
      64px
      1fr;
    padding: 12px;
  }

  .header-region,
  .header-tiers,
  .region-cell,
  .tier-list {
    display: none;
  }
}


.context-menu {
  position: fixed;
  z-index: 9999;
  min-width: 210px;
  background: linear-gradient(180deg, #0b1220, #020617);
  border: 1px solid rgba(75, 85, 99, 0.9);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.85);
  display: none;
}

.context-menu.show {
  display: block;
}

.context-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  color: #e5e7eb;
  cursor: pointer;
  transition: background 0.12s ease;
}

.context-item i {
  width: 18px;
  text-align: center;
  color: #9ca3af;
}

.context-item:hover {
  background: rgba(55, 65, 81, 0.6);
}

.context-item:active {
  background: rgba(55, 65, 81, 0.8);
}



::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: #222;
    border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
    background: #333;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #7a7a7a #020617;
}
