* {
  box-sizing: border-box;
}

body {
  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;
}

.tiers-bigbox {
  background: rgba(2,6,23,0.55);
  border: 1px solid rgba(148,163,184,0.16);
  border-radius: 18px;
  padding: 16px;
  cursor: grab;
  overflow: hidden;
  position: relative;
}

.tiers-bigbox:active {
  cursor: grabbing;
}

.tier-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  will-change: transform;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}


.tier {
  background: linear-gradient(180deg, rgba(20,30,55,0.92), rgba(10,15,30,0.92));
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  padding-bottom: 10px;
}

.tier-header {
  height: 56px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 25px;
  font-weight: 700;
  border-radius: 14px 14px 10px 10px;
  margin-bottom: 12px;
  text-align: center;
}

.tier-header img {
  width: 30px;
  height: 30px;
}

.tier-1 .tier-header {
  background: linear-gradient(135deg, #6b4f1d, #3b2a10);
  color: #fbbf24;
}

.tier-2 .tier-header {
  background: linear-gradient(135deg, #374151, #1f2937);
  color: #e5e7eb;
}

.tier-3 .tier-header {
  background: linear-gradient(135deg, #5b3418, #3a1f10);
  color: #fb923c;
}

.tier-4 .tier-header,
.tier-5 .tier-header {
  background: linear-gradient(135deg, #1f2937, #0f172a);
  color: #cbd5e1;
}

.players {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 10px;
}

.player {
  width: 100%;
}

.player-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(30,41,59,0.96);
  padding: 8px 10px;
  padding-left: 14px;
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: padding-left 0.18s ease, background 0.15s ease;
}

.player-entry:hover {
  padding-left: 48px;
  background: rgba(15,23,42,0.98);
}

.player-region {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  letter-spacing: 0.08em;
  border-radius: 10px 0 0 10px;
  pointer-events: none;
  overflow: hidden;
  font-size: 0;
  transition: width 0.18s ease, font-size 0.12s ease;
}

.player-entry:hover .player-region {
  width: 38px;
  font-size: 12px;
}



.player.eu .player-region {
  background-color: rgba(74, 222, 128, 0.60);
  color: #bbf7d0;
}

.player.na .player-region {
  background-color: rgba(248, 113, 113, 0.60);
  color: #fecaca;
}

.player.as .player-region {
  background-color: rgba(56, 189, 248, 0.60);
  color: #bae6fd;
}

.player.au .player-region {
  background-color: rgba(196, 181, 253, 0.60);
  color: #ddd6fe;
}

.player-entry-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.player-skin {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.player-name {
  font-size: 13.5px;
  font-weight: 600;
}

.player.ht .player-entry {
  background: rgba(51,65,85,0.97);
}

.player-tier-icon {
  font-size: 18px;
  opacity: 0.85;
}


.footer {
  margin-top: 24px;
  font-size: 12px;
  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;
}

.tiers-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.info-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #e5e7eb;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.info-btn i {
  font-size: 14px;
  opacity: 0.9;
}

.info-btn:hover {
  background: rgba(51, 65, 85, 0.95);
  transform: translateY(-1px);
}

.nav-icon {
  font-size: 30px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(1px);
}

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined' !important;
  font-weight: normal;
  font-style: normal;
  letter-spacing: normal;
}




@media (max-width: 1100px) {
  .tier-container {
    grid-template-columns: repeat(5, 240px);
    overflow-x: auto;
    padding-bottom: 8px;
  }
}
