/* =========================
   RANKING WRAPPER (BOX)
========================= */
.ranking-container {
  max-width: 1100px;
  margin: 40px auto;
  padding: 28px;
  border-radius: 18px;

  background:
    linear-gradient(145deg, rgba(20,20,25,0.9), rgba(10,10,15,0.9));

  border: 1px solid rgba(255,255,255,0.06);

  box-shadow:
    0 25px 70px rgba(0,0,0,0.55),
    inset 0 0 0 1px rgba(255,255,255,0.03);

  backdrop-filter: blur(6px);
}

.ranking-system-header {
  text-align: center;
  margin-bottom: 18px;
}

.ranking-system-header h2 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #e5e7eb;
  letter-spacing: 0.3px;
}

/* Glow suave gamer */
.ranking-container::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.12), transparent 40%);
  pointer-events: none;
}

/* =========================
   TITLES
========================= */
.ranking-container h2 {
  font-size: 1.6rem;
  color: #e5e7eb;
  margin-bottom: 4px;
  font-weight: 600;
}

.ranking-container h3 {
  font-size: 0.9rem;
  font-weight: 400;
  color: #94a3b8;
  margin-bottom: 18px;
}

/* =========================
   TABLE BASE
========================= */
.ranking-table,
.horizontal-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 0.9rem;
  background: rgba(15, 23, 42, 0.65);
  border-radius: 12px;
  overflow: hidden;
}

.ranking-tabs {
  display: flex;
  justify-content: center;   /* CENTRALIZA */
  gap: 12px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}

.ranking-tab {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255,255,255,0.08);
  color: #94a3b8;

  padding: 9px 18px;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.3px;

  cursor: pointer;
  transition: all 0.25s ease;
}

.ranking-tab:hover {
  background: rgba(30, 41, 59, 0.95);
  color: #e5e7eb;
  transform: translateY(-2px);
}

/* ACTIVE */
.ranking-tab.active {
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  color: white;
  border-color: transparent;

  box-shadow:
    0 0 14px rgba(124,58,237,0.45),
    inset 0 0 0 1px rgba(255,255,255,0.2);
}
.search-form2 {
  display: flex;
  align-items: center;
  justify-content: center;  /* CENTRALIZA */
  gap: 10px;
  flex-wrap: wrap;

  background: rgba(2, 6, 23, 0.75);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 22px;

  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}
.search-form2 label {
  font-size: 0.8rem;
  color: #94a3b8;
}
.search-form2 select {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255,255,255,0.08);
  color: #e5e7eb;

  padding: 7px 12px;
  border-radius: 10px;
  font-size: 0.8rem;
  min-width: 140px;

  transition: 0.25s ease;
}

.search-form2 select:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 2px rgba(124,58,237,0.25);
}
.search-form2 input[type="submit"],
.search-form2 input[type="reset"] {

  background: linear-gradient(135deg, #7c3aed, #6366f1);
  border: none;
  color: white;

  padding: 7px 14px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.3px;

  cursor: pointer;
  transition: all 0.25s ease;

  box-shadow: 0 4px 12px rgba(124,58,237,0.35);
}

.search-form2 input[type="submit"]:hover,
.search-form2 input[type="reset"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(124,58,237,0.55);
}

.ranking-content {
  background:
    linear-gradient(145deg, rgba(20,20,25,0.9), rgba(0, 0, 0, 0.842));
  border-radius: 16px;
  padding: 20px;

  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: inset 0 0 0 1px rgba(8, 8, 8, 0.02);
}

@media (max-width: 768px) {

  .ranking-container {
    margin: 20px 10px;
    padding: 18px;
  }

  .search-form2 {
    flex-direction: column;
    align-items: stretch;
  }

  .search-form2 select,
  .search-form2 input {
    width: 100%;
  }

  .ranking-tab {
    flex: 1;
  }
}


.ranking-loader {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.08);
  border-top: 3px solid #7c3aed;
  margin: 30px auto;

  animation: spinLoader 0.8s linear infinite;
}

@keyframes spinLoader {
  to { transform: rotate(360deg); }
}

/* =========================
   HEADERS
========================= */

.ranking-table thead,
.horizontal-table tr:first-child {
  background: linear-gradient(90deg, #1e293b, #0f172a);
}

.ranking-table th,
.horizontal-table th {
  text-align: left;
  padding: 12px 14px;
  font-weight: 500;
  color: #cbd5f5;
  font-size: 0.78rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* =========================
   ROWS
========================= */
.ranking-table td,
.horizontal-table td {
  padding: 10px 14px;
  color: #e5e7eb;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: all 0.2s ease;
}

/* Hover gamer clean */
.ranking-table tbody tr:hover,
.horizontal-table tr:hover {
  background: rgba(168, 85, 247, 0.08);
  transform: scale(1.01);
}

/* =========================
   RANK COLORS
========================= */
.rank-1,
.top-ranked {
  background: linear-gradient(90deg, rgba(250,204,21,0.15), transparent);
  font-weight: 600;
}

.rank-2 {
  background: linear-gradient(90deg, rgba(148,163,184,0.12), transparent);
}

.rank-3 {
  background: linear-gradient(90deg, rgba(251,146,60,0.12), transparent);
}

/* =========================
   EMPBLEM / ICONS
========================= */
.horizontal-table img {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  box-shadow: 0 0 6px rgba(0,0,0,0.4);
}

/* =========================
   EMPTY ROW
========================= */
.empty-row td {
  opacity: 0.25;
}

/* =========================
   LINKS
========================= */
.ranking-container a {
  color: #a855f7;
  text-decoration: none;
  transition: 0.2s;
}

.ranking-container a:hover {
  color: #c084fc;
  text-shadow: 0 0 6px rgba(168,85,247,0.6);
}

/* =========================
   SEARCH / FILTER FORM
========================= */
.search-form2 {
  background: rgba(2, 6, 23, 0.65);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 18px;
}

.search-form2 label {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-right: 8px;
}

.search-form2 select,
.search-form2 input[type="submit"],
.search-form2 input[type="reset"] {
  background: #020617;
  border: 1px solid rgba(255,255,255,0.08);
  color: #e5e7eb;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.8rem;
  transition: 0.2s;
}

.search-form2 select:focus {
  outline: none;
  border-color: #a855f7;
  box-shadow: 0 0 0 1px rgba(168,85,247,0.4);
}

.search-form2 input[type="submit"],
.search-form2 input[type="reset"] {
  cursor: pointer;
  margin-left: 6px;
}

.search-form2 input[type="submit"]:hover,
.search-form2 input[type="reset"]:hover {
  background: #a855f7;
  color: white;
  box-shadow: 0 0 12px rgba(168,85,247,0.5);
}

/* =========================
   LOADING (AJAX)
========================= */
#ranking-content.loading {
  opacity: 0.5;
  filter: blur(1px);
  pointer-events: none;
  transition: 0.2s;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {

  .ranking-container {
    padding: 18px;
  }

  .ranking-table th,
  .horizontal-table th {
    font-size: 0.7rem;
  }

  .ranking-table td,
  .horizontal-table td {
    font-size: 0.75rem;
    padding: 8px;
  }

  /* Scroll horizontal suave */
  .ranking-table,
  .horizontal-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
#ranking-result.loading {
  opacity: 0.4;
  transform: translateY(4px);
  filter: blur(1px);
  transition: 0.25s ease;
}

/* =========================
   FIX GUILD EMBLEM COLUMN
========================= */

.horizontal-table {
  table-layout: fixed;
  width: 100%;
}

.emblem-cell {
  width: 20px;
  text-align: center;
}

.emblem-cell img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border-radius: 4px;
  box-shadow: 0 0 6px rgba(0,0,0,0.4);
}
