* {
  box-sizing: border-box;
}

.ranking-table,
.custom-ranking-table {
  width: 100%;
  background: rgba(10, 15, 25, 0.9);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(212, 175, 55, 0.3);
  margin: 20px 0;
}

.ranking-table table,
.custom-ranking-table table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.ranking-table thead,
.custom-ranking-table thead {
  background: linear-gradient(135deg, #FFD700, #D4AF37);
}

.ranking-table thead th,
.custom-ranking-table thead th {
  padding: 20px 15px;
  color: #000;
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  border: none;
  position: relative;
}

.ranking-table thead th:nth-child(1),
.custom-ranking-table thead th:nth-child(1),
.ranking-table tbody td:nth-child(1),
.custom-ranking-table tbody td:nth-child(1) {
  width: 10%;
  text-align: center;
}

.ranking-table thead th:nth-child(2),
.custom-ranking-table thead th:nth-child(2),
.ranking-table tbody td:nth-child(2),
.custom-ranking-table tbody td:nth-child(2) {
  width: 40%;
  text-align: left;
  padding-left: 20px;
}

.ranking-table thead th:nth-child(3),
.custom-ranking-table thead th:nth-child(3),
.ranking-table tbody td:nth-child(3),
.custom-ranking-table tbody td:nth-child(3) {
  width: 30%;
  text-align: center;
}

.ranking-table thead th:nth-child(4),
.custom-ranking-table thead th:nth-child(4),
.ranking-table tbody td:nth-child(4),
.custom-ranking-table tbody td:nth-child(4) {
  width: 20%;
  text-align: center;
}

.ranking-table tbody td,
.custom-ranking-table tbody td {
  padding: 15px;
  color: #fff;
  background: rgba(15, 25, 40, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
  font-size: 14px;
}

.ranking-table tbody tr:hover td,
.custom-ranking-table tbody tr:hover td {
  background: rgba(212, 175, 55, 0.1);
  
}

.rank-number {
  display: inline-block;
  width: 35px;
  height: 35px;
  line-height: 35px;
  text-align: center;
  background: rgba(30, 40, 55, 0.8);
  border: 2px solid rgba(212, 175, 55, 0.4);
  border-radius: 8px;
  color: #FFD700;
  font-weight: bold;
  font-size: 14px;
  margin: 0 auto;
}

.player-name {
  color: #00FFFF !important;
  font-weight: bold;
  text-decoration: none;
  font-size: 15px;
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.5);
  display: inline-block;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.player-name:hover {
  color: #00CED1 !important;
  text-shadow: 0 0 12px rgba(0, 255, 255, 0.7);
  text-decoration: none;
  
}

.clan-name {
  color: #FF3333 !important;
  font-weight: bold;
  text-decoration: none;
  font-size: 14px;
  text-shadow: 0 0 8px rgba(255, 51, 51, 0.5);
  text-transform: uppercase;
  display: inline-block;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.clan-name:hover {
  color: #FF0000 !important;
  text-shadow: 0 0 12px rgba(255, 0, 0, 0.7);
  text-decoration: none;
  
}

.np-value {
  color: #FFD700;
  font-weight: bold;
  font-size: 15px;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.player-info {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0;
  margin: 0;
}

.ranking-player-name {
  display: flex;
  align-items: center;
  gap: 1px;
  width: 100%;
}

.player-icons {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: 8px;
  vertical-align: middle;
}

.player-icon {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  padding: 3px;
  background: linear-gradient(135deg, rgba(15, 20, 30, 0.9), rgba(10, 15, 25, 0.8));
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.3s ease;
  overflow: hidden;
}

.player-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.03));
  pointer-events: none;
}

.player-icon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
  position: relative;
  z-index: 1;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.player-icon:hover {
  z-index: 10;
  transform: translateY(-1px);
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.5),
    0 0 12px rgba(255, 215, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.nation-icon {
  border: 1px solid rgba(100, 149, 237, 0.6);
  background: linear-gradient(135deg, rgba(25, 35, 60, 0.9), rgba(15, 20, 35, 0.8));
}

.nation-icon:hover {
  border-color: rgba(100, 149, 237, 0.9);
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.5),
    0 0 15px rgba(100, 149, 237, 0.4),
    inset 0 1px 0 rgba(100, 149, 237, 0.2);
}

.class-icon {
  border: 1px solid rgba(255, 215, 0, 0.5);
  background: linear-gradient(135deg, rgba(40, 35, 20, 0.9), rgba(25, 20, 10, 0.8));
}

.class-icon:hover {
  border-color: rgba(255, 215, 0, 0.8);
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.5),
    0 0 15px rgba(255, 215, 0, 0.3),
    inset 0 1px 0 rgba(255, 215, 0, 0.15);
}

.rank-icon {
  border: 1px solid rgba(255, 51, 51, 0.5);
  background: linear-gradient(135deg, rgba(40, 20, 20, 0.9), rgba(25, 10, 10, 0.8));
}

.rank-icon:hover {
  border-color: rgba(255, 51, 51, 0.8);
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.5),
    0 0 15px rgba(255, 51, 51, 0.3),
    inset 0 1px 0 rgba(255, 51, 51, 0.15);
}

.player-icon[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 5px;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 100;
}

.player-icon[data-tooltip]:hover::after {
  opacity: 1;
}

.ranking-table tbody tr:nth-child(1) .rank-number,
.custom-ranking-table tbody tr:nth-child(1) .rank-number {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #000;
  border-color: #FFD700;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.5);
}

.ranking-table tbody tr:nth-child(2) .rank-number,
.custom-ranking-table tbody tr:nth-child(2) .rank-number {
  background: linear-gradient(135deg, #C0C0C0, #A8A8A8);
  color: #000;
  border-color: #C0C0C0;
  box-shadow: 0 4px 15px rgba(192, 192, 192, 0.4);
}

.ranking-table tbody tr:nth-child(3) .rank-number,
.custom-ranking-table tbody tr:nth-child(3) .rank-number {
  background: linear-gradient(135deg, #CD7F32, #B87333);
  color: #000;
  border-color: #CD7F32;
  box-shadow: 0 4px 15px rgba(205, 127, 50, 0.4);
}

.ranking-page-header {
  background: linear-gradient(135deg, rgba(14, 27, 31, 0.795), rgba(20, 35, 50, 0.95));
  backdrop-filter: blur(15px);
  border-radius: 15px;
  padding: 30px 60px;
  margin: 20px auto 30px;
  max-width: 1900px;
  box-shadow: 
    0 15px 35px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(212, 175, 55, 0.1),
    inset 0 1px 0 rgba(109, 94, 94, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.3);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.ranking-page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 215, 0, 0.6), 
    transparent);
}

.ranking-page-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 215, 0, 0.6), 
    transparent);
}

.ranking-page-header h1 {
  color: #FFD700;
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  text-shadow: 
    0 0 15px rgba(255, 215, 0, 0.5),
    0 2px 8px rgba(0, 0, 0, 0.7);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}

.ranking-page-header p {
  color: #b8b8b8;
  font-size: 1rem;
  margin: 0;
  position: relative;
  z-index: 1;
  font-weight: 400;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  letter-spacing: 0.5px;
  opacity: 0.9;
}

.ranking-page-header h1::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #FFD700, transparent);
  margin: 12px auto 0;
  opacity: 0.8;
}

.container {
  position: relative;
  z-index: 1;
}

.custom-search-box {
  margin-bottom: 30px;
  position: relative;
}

.custom-search-box .form-control {
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(212, 175, 55, 0.4);
  color: #fff;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.custom-search-box .form-control:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: #FFD700;
  box-shadow: 0 0 0 0.2rem rgba(255, 215, 0, 0.25);
  outline: none;
}

.custom-search-box .btn {
  background: #FFD700;
  border: 2px solid #FFD700;
  color: #000;
  border-radius: 10px;
  padding: 12px 25px;
  font-weight: bold;
  font-size: 14px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.custom-search-box .btn:hover {
  background: #FFA500;
  border-color: #FFA500;
  box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
  color: #000;
}

.custom-search-box .btn:active {
  transform: none !important;
  background: #FFD700;
}

@media (max-width: 768px) {
  .ranking-table,
  .custom-ranking-table {
    font-size: 12px;
  }
  
  .ranking-table thead th,
  .custom-ranking-table thead th {
    padding: 15px 10px;
    font-size: 12px;
  }
  
  .ranking-table tbody td,
  .custom-ranking-table tbody td {
    padding: 12px 10px;
    font-size: 12px;
  }
  
  .player-name {
    font-size: 13px;
  }
  
  .clan-name {
    font-size: 12px;
  }
  
  .np-value {
    font-size: 13px;
  }
}

.ranking-table *,
.custom-ranking-table *,
.player-name,
.clan-name,
.player-icon,
.rank-number {
  transform: none !important;
}

.ranking-table tbody tr:hover,
.custom-ranking-table tbody tr:hover {
  transform: none !important;
}

* {
  animation: none !important;
  transition-property: background-color, color, box-shadow, border-color, opacity !important;
  transition-duration: 0.3s !important;
  transition-timing-function: ease !important;
}