/* ============================================
   RANKING FULL WIDTH - ESTILO GAMICS
   ============================================ */

/* Container Principal - Full Width */
.ranking-ajax-wrapper,
#ranking-section {
  width: 100%;
  padding: 0; /* Remove padding lateral */
  background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 100%);
}

.ranking-container {
  width: 100%; /* Full width */
  max-width: none; /* Remove limitação de largura */
  margin: 0; /* Remove margem central */
  background: rgba(20, 20, 35, 0.6);
  border-radius: 0; /* Remove bordas arredondadas */
  padding: 20px 40px; /* Padding apenas em cima/baixo */
  backdrop-filter: blur(10px);
  border: none; /* Remove borda */
  border-top: 2px solid rgba(111, 191, 95, 0.3); /* Linha sutil no topo */
  border-bottom: 2px solid rgba(111, 191, 95, 0.3); /* Linha sutil embaixo */
  box-shadow: none; /* Remove sombra */
}

/* Header do Ranking */
.page-header.simplified {
  justify-content: center;
  text-align: center;
  padding-bottom: 25px;
  margin-bottom: 25px;
  border-bottom: 2px solid rgba(111, 191, 95, 0.3);
}

.page-header.simplified .page-title {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-family: 'Oxanium', sans-serif;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.page-header.simplified .page-title span {
  color: #6fbf5f;
}

/* Container da Tabela - Full Width */
.ranking-table-container {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 0;
  border-radius: 0;
  box-shadow: none;
}

.table-scroll {
  width: 100%;
  min-width: 900px;
}

/* Tabela */
.ranking-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  color: #e0e0e0;
}

.ranking-table thead {
  background: linear-gradient(135deg, rgba(111, 191, 95, 0.2) 0%, rgba(111, 191, 95, 0.1) 100%);
  position: sticky;
  top: 0;
  z-index: 10;
}

.ranking-table th {
  padding: 16px 12px;
  text-align: left;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.8rem;
  color: #6fbf5f;
  border-bottom: 2px solid rgba(111, 191, 95, 0.4);
  cursor: pointer;
  transition: background 0.3s ease;
  white-space: nowrap;
}

.ranking-table th:hover {
  background: rgba(111, 191, 95, 0.3);
}

.ranking-table th.sort-asc::after {
  content: ' ▲';
  font-size: 0.7em;
}

.ranking-table th.sort-desc::after {
  content: ' ▼';
  font-size: 0.7em;
}

.ranking-table tbody tr {
  background: rgba(30, 30, 50, 0.4);
  transition: all 0.3s ease;
}

.ranking-table tbody tr:nth-child(even) {
  background: rgba(35, 35, 55, 0.5);
}

.ranking-table tbody tr:hover {
  background: rgba(111, 191, 95, 0.15);
  box-shadow: inset 4px 0 0 #6fbf5f; /* Indicador lateral no hover */
}

.ranking-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

/* Colunas Específicas */
.col-pos {
  width: 60px;
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
}

.col-pos.top-1 .position-number {
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 1.4rem;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.col-pos.top-3 {
  color: #6fbf5f;
  font-weight: 800;
}

.col-player {
  min-width: 280px;
}

.player-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-avatar {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.player-avatar img,
.player-avatar div {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(111, 191, 95, 0.3);
}

.player-avatar div {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.status-indicator {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #1a1a2e;
  box-shadow: 0 0 6px currentColor;
}

.status-indicator.online { background: #28a745; color: #28a745; }
.status-indicator.offline { background: #6c757d; color: #6c757d; }
.status-indicator.lobby { background: #ffc107; color: #ffc107; }
.status-indicator.playing { background: #dc3545; color: #dc3545; }

.player-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.player-name {
  font-weight: 600;
  color: #fff;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-status-badge {
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.player-status-badge.online { background: rgba(40, 167, 69, 0.2); color: #28a745; }
.player-status-badge.offline { background: rgba(108, 117, 125, 0.2); color: #6c757d; }
.player-status-badge.lobby { background: rgba(255, 193, 7, 0.2); color: #ffc107; }
.player-status-badge.playing { background: rgba(220, 53, 69, 0.2); color: #dc3545; }

.player-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: #888;
  flex-wrap: wrap;
}

.player-flag {
  font-size: 1.1rem;
  line-height: 1;
}

/* Colunas de Dados */
.col-rating {
  font-weight: 700;
  color: #6fbf5f;
  font-size: 1rem;
  text-align: center;
  white-space: nowrap;
}

.col-winrate {
  text-align: center;
  white-space: nowrap;
}

.winrate-high { color: #28a745; font-weight: 700; }
.winrate-mid { color: #ffc107; font-weight: 600; }
.winrate-low { color: #dc3545; font-weight: 600; }

.col-games {
  text-align: center;
  color: #a0a0b0;
  white-space: nowrap;
}

.col-lastmatch {
  color: #888;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* Coluna de Ações */
.col-actions {
  width: 160px;
  text-align: center;
}

.col-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  margin: 2px;
  border: none;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 36px;
  min-height: 36px;
}

.view-details-btn {
  background: rgba(111, 191, 95, 0.2);
  color: #6fbf5f;
  border: 1px solid rgba(111, 191, 95, 0.4);
}
.view-details-btn:hover {
  background: #6fbf5f;
  color: #0f0f1a;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(111, 191, 95, 0.4);
}

.compare-btn {
  background: rgba(102, 126, 234, 0.2);
  color: #667eea;
  border: 1px solid rgba(102, 126, 234, 0.4);
}
.compare-btn:hover {
  background: #667eea;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
}

.map-stats-btn {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
  border: 1px solid rgba(255, 193, 7, 0.4);
}
.map-stats-btn:hover {
  background: #ffc107;
  color: #0f0f1a;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(255, 193, 7, 0.4);
}

.civ-stats-btn {
  background: rgba(220, 53, 69, 0.2);
  color: #dc3545;
  border: 1px solid rgba(220, 53, 69, 0.4);
}
.civ-stats-btn:hover {
  background: #dc3545;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(220, 53, 69, 0.4);
}

/* Paginação */
.pagination-container {
  display: flex;
  justify-content: center;
  margin-top: 25px;
  padding-bottom: 10px;
}

.pagination {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.pagination-btn {
  background: rgba(111, 191, 95, 0.1);
  border: 2px solid rgba(111, 191, 95, 0.3);
  color: #6fbf5f;
  padding: 8px 14px;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination-btn:hover:not(.disabled) {
  background: #6fbf5f;
  color: #0f0f1a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(111, 191, 95, 0.4);
}

.pagination-btn.active {
  background: #6fbf5f;
  color: #0f0f1a;
  border-color: #6fbf5f;
}

.pagination-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pagination-dots {
  color: #6fbf5f;
  padding: 0 4px;
}

/* Footer Note */
.footer-note {
  text-align: center;
  color: #888;
  font-size: 0.8rem;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */

@media (max-width: 992px) {
  .ranking-container {
    padding: 20px;
  }
  
  .page-header.simplified .page-title {
    font-size: 1.3rem;
  }
  
  .table-scroll {
    min-width: 800px;
  }
}

@media (max-width: 768px) {
  .ranking-container {
    padding: 15px 10px;
  }
  
  .page-header.simplified .page-title {
    font-size: 1.1rem;
  }
  
  .table-scroll {
    min-width: 700px;
    font-size: 0.85rem;
  }
  
  .ranking-table th,
  .ranking-table td {
    padding: 10px 8px;
  }
  
  .col-actions {
    width: 140px;
  }
  
  .col-actions button {
    padding: 5px 8px;
    min-width: 32px;
    min-height: 32px;
    font-size: 0.7rem;
  }
  
  .pagination-btn {
    padding: 6px 10px;
    font-size: 0.75rem;
  }
}

@media (max-width: 576px) {
  .ranking-container {
    padding: 10px 5px;
  }
  
  .table-scroll {
    min-width: 650px;
    font-size: 0.8rem;
  }
  
  .player-avatar {
    width: 40px;
    height: 40px;
  }
  
  .player-name {
    font-size: 0.85rem;
  }
  
  .col-actions {
    width: 120px;
  }
  
  .col-actions button {
    padding: 4px 6px;
    min-width: 28px;
    min-height: 28px;
    margin: 1px;
  }
}

/* Scrollbar Personalizada */
.ranking-table-container::-webkit-scrollbar {
  height: 8px;
}
.ranking-table-container::-webkit-scrollbar-track {
  background: rgba(20, 20, 35, 0.5);
}
.ranking-table-container::-webkit-scrollbar-thumb {
  background: rgba(111, 191, 95, 0.5);
  border-radius: 4px;
}
.ranking-table-container::-webkit-scrollbar-thumb:hover {
  background: rgba(111, 191, 95, 0.8);
}