body {
  background: linear-gradient(to bottom right, #100b0b, #311e1e);
  height: 100%;
  color: #e0e0e0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  padding: 20px;
  margin: 0;
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.show {
  opacity: 1;
  transform: translateY(0);
}

h1 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 40px;
  color: #00f7ff;
  text-shadow: 0 0 8px #00f7ff88;
}

.category-line {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 20px auto 10px;
  flex-wrap: wrap;
}

.category-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background-color: #1a1d24;
  color: #aaa;
  font-weight: 600;
  font-size: 1.2rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.category-box img {
  height: 1.2em;
  width: auto;
  display: inline-block;
  vertical-align: middle;
  filter: drop-shadow(0 0 2px rgba(0,0,0,0.4));
}

.category-box:hover {
  color: #fff;
  background-color: #232731;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.category-line a.category-box {
  text-decoration: none;
  color: inherit;
}

.category-box.active {
  background: #ffb912;
  color: #111;
  border-color: #ffcc33;
  box-shadow: 0 3px 8px rgba(255,180,0,0.4);
}

.tier-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 24px;
  margin: 20px auto;
  background: #121317;
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.05), 0 4px 20px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.06);
  max-width: 1350px;
}

.tier {
  width: 220px;
  flex: 0 0 auto;
}

.tier h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  gap: 0.4em;
  margin: 0 0 12px 0;
  padding: 12px;
  border-radius: 12px;
  font-weight: 600;
  text-align: center;
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.05);
}

.tier h2 .tier-icon {
  height: 1.2em;
  width: auto;
  display: inline-block;
  vertical-align: middle;
}

.tier-1 h2 {
  background: linear-gradient(to right, rgba(255, 165, 0, 0.3), rgba(255, 204, 0, 0.3));
  color: #fff5cc;
  text-shadow: 0 0 4px #ffbb33;
}

.tier-2 h2 {
  background: linear-gradient(90deg, rgba(192, 192, 192, 0.25), rgba(220, 220, 220, 0.25));
  color: #e0e0e0;
}

.tier-3 h2 {
  background: linear-gradient(to right, rgba(205, 127, 50, 0.3), rgba(169, 113, 66, 0.3));
  color: #f0d6b5;
  text-shadow: 0 0 4px #b87333;
}

.tier-4 h2,
.tier-5 h2 {
  background: rgba(46, 59, 78, 0.25);
  color: #8fa3c3;
}

.player-entry {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.player-skin {
  height: 20px;
  width: 20px;
  image-rendering: pixelated;
  flex-shrink: 0;
  border-radius: 4px;
}

.player-name {
  font-size: 1rem;
  font-weight: 500;
  color: white;
  word-break: break-word;
}

.players {
  display: flex;
  flex-direction: column;
  gap: 1px;
  align-items: stretch;
}

.player {
  padding: 12px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  position: relative;
  text-align: center;
  transition: background 0.2s ease, transform 0.2s ease;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  font-size: 1rem;
}

.player:hover {
  background-color: rgba(255, 255, 255, 0.15);
  transform: scale(1.035);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.15);
}

.player::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 4px;
  border-radius: 4px;
}

.player.eu::before { background-color: #27ae60; }
.player.na::before { background-color: #ff1800; }
.player.as::before { background-color: #c27ab3; }
.player.au::before { background-color: #b5915b; }

.player.ht { background: rgba(255, 255, 255, 0.2); }
.player.lt { background: rgba(255, 255, 255, 0.05); }

.player span {
  color: white;
  font-weight: 500;
  font-size: 0.95rem;
}

.rankingmodal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.75);
}

.rankingmodal.show {
  display: block;
}

.rankingmodal-content {
  background-color: #1e222a;
  margin: 5% auto;
  padding: 30px 25px;
  width: 360px;
  border-radius: 16px;
  text-align: center;
  position: relative;
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.rankingmodal-close-btn {
  position: absolute;
  top: 10px;
  right: 14px;
  width: 36px;
  height: 36px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  font-size: 22px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s ease;
  font-family: Arial, sans-serif;
}

.rankingmodal-close-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.rankingmodal-text {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 25px;
  color: #fff;
}

.rankingmodal-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.rankingmodal-buttons button {
  padding: 10px 22px;
  border: none;
  border-radius: 10px;
  background: #27ae60;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.rankingmodal-buttons button:hover {
  background: #1e874b;
}

.modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.75);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: #11141b;
  border-radius: 20px;
  padding: 40px 30px;
  width: 380px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0,0,0,0.8);
  transform: scale(0.9);
  opacity: 0;
  transition: all 0.25s ease;
  overflow-y: auto;
}

.modal.show .modal-content {
  transform: scale(1);
  opacity: 1;
}

.close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: background 0.2s;
}

.close-btn:hover { 
  background: rgba(255,255,255,0.18); 
  color: #fff; 
}

.modal-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  margin: 0 auto 12px;
}

.modal-username {
  font-size: 1.5rem;
  font-weight: 700;
  color: #e7eaf1;
  margin-bottom: 6px;
}

.modal-region {
  font-size: 0.95rem;
  color: #7a7f8c;
  background: #1e222a;
  display: inline-block;
  padding: 4px 12px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-transform: uppercase;
  font-weight: 600;
}

.modal-position-box {
  background: #1a1d24;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 12px 10px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.position-number {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
}

.position-overall {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffc83d;
}

.position-points {
  font-size: 0.9rem;
  color: #aaa;
}

.modal-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #999;
  margin-bottom: 8px;
  text-align: left;
}

.modal-tiers-text {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

.modal-tier-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #2a2f3a;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffc83d;
}

.modal-tier-pill img {
  width: 20px;
  height: 20px;
}

.modal-tier-pill.empty {
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  color: transparent;
  width: 60px;
  height: 28px;
  padding: 0;
}

.namemc-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1e222a;
  color: #e7eaf1;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  margin-top: 14px;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
  font-size: 0.9rem;
}

.namemc-btn:hover {
  background: #2b303b;
  transform: translateY(-2px);
  color: #fff;
}

.namemc-btn i {
  font-size: 0.9rem;
  color: #aaa;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 14px;
  width: 36px;
  height: 36px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  font-size: 22px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s ease;
  font-family: Arial, sans-serif;
}

.page-wrapper {
  max-width: 1350px;
  margin: 0 auto;
  padding: 0 20px;
}

.close-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 20px 24px;
  background-color: #0f1117;
  border-radius: 12px;
  margin-bottom: 50px;
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.nav-bar a {
  color: #ccc;
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease-in-out;
}

.nav-bar a:hover {
  color: #fff;
  transform: scale(1.05);
}

.nav-bar img {
  position: absolute;
  left: 20px;
  width: 100x;
  height: 50px;
}

.nav-bar a.disabled {
  color: #666 !important;
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.6;
  transform: none !important;
}

.nav-bar a.disabled:hover {
  color: #666;
}

.search-form {
  position: absolute;
  right: 20px;
  display: flex;
  align-items: center;
  background-color: #10141a;
  border: 1px solid #2d323a;
  border-radius: 999px;
  padding: 3px 8px;
}

.search-form input {
  background: transparent;
  border: none;
  color: #fff;
  padding: 6px 12px;
  font-size: 0.95rem;
  width: 140px;
  outline: none;
  border-radius: 999px;
}

.search-form button {
  background: none;
  border: none;
  color: #aaa;
  cursor: pointer;
}

.search-form button:hover {
  color: #fff;
}

.search-error {
  position: absolute;
  right: 20px;
  top: 100%;
  margin-top: 8px;
  background-color: #d32f2f;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  display: none;
}

.search-error.show {
  display: block;
}

.footer {
  margin-top: 60px;
  padding: 20px 0;
  text-align: center;
  background-color: #0f1117;
  color: #888;
  font-size: 0.9rem;
  border-radius: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
  .nav-bar {
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 20px;
    gap: 20px;
    text-align: center;
  }

  .nav-bar img {
    position: static;
    margin-bottom: 10px;
    width: 40px;
    height: 40px;
  }

  .nav-bar a {
    flex: 1 1 45%;
    justify-content: center;
    font-size: 1rem;
    padding: 6px 0;
  }

  .search-form {
    position: static;
    margin: 10px auto 0;
    width: 100%;
    justify-content: center;
  }

  .search-form input {
    width: 60%;
    font-size: 0.9rem;
  }

  .search-error {
    position: static;
    margin: 10px auto 0;
    text-align: center;
  }

  #loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0b0c10;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
  }

  .dot-loader span {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin: 4px;
    border-radius: 50%;
    background: #ffffff;
    animation: blink 1.4s infinite both;
  }

  .dot-loader span:nth-child(2) {
    animation-delay: 0.2s;
  }

  .dot-loader span:nth-child(3) {
    animation-delay: 0.4s;
  }

  @keyframes blink {
    0%, 80%, 100% {
      opacity: 0;
    }
    40% {
      opacity: 1;
    }
  }

  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }

  ::-webkit-scrollbar-track {
    background: #1c1f26;
    border-radius: 10px;
  }

  ::-webkit-scrollbar-thumb {
    background: #444c56;
    border-radius: 10px;
  }

  ::-webkit-scrollbar-thumb:hover {
    background: #666f79;
  }
}
