* {
  box-sizing: border-box;
}

:root {
  --bg: #0d0d14;
  --panel: #151520;
  --panel2: #1f1f2e;
  --glow: #00c8ff;
  --glow2: #00ffb3;
  --text: #e6e6e6;
  --danger: #ff3e3e;
  --yellow: #ffe066;
  --green: #38ff9c;
  --shadow: #ee4015ff;
  --radius: 14px;
  --transition: all 0.25s ease;
}

body {
  margin: 0;
  background: linear-gradient(to bottom, #19181a, rgb(26 26 26) 80%), #19181a;
  font-family: "Segoe UI", sans-serif;
  color: var(--text);
  overflow-x: hidden;
}

/* Contenedor de las tablas y paginación */

.logo-web {
  flex-shrink: 0;
  z-index: 10;
}

.logo-web img {
  width: 200px;
  height: auto;
  filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.3));
  transition: all 0.4s ease;
  border-radius: 12px;
}

.logo-web img:hover {
  filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.7));
  transform: scale(1.08);
}

.logo-left {
  order: 1;
}

.title-section {
  order: 2;
  flex: 1;
  text-align: center;
}

.logo-right {
  order: 3;
}

.title-section h1 {
  font-size: 3.8em;
  margin: 0;
  text-shadow: 0 0 30px #ad2713;
  letter-spacing: 5px;
}

.title-section p {
  font-size: 1.5em;
  margin: 12px 0 30px;
  color: #ddd;
}

.logo-container {
  margin: 20px auto 0;
  width: 220px;
  animation: fadeDown 1s ease-out 0.4s both;
}

.logo-container img:hover {
  filter: drop-shadow(0 0 35px rgba(173, 63, 36, 1));
  transform: scale(1.1);
}

.header {
  position: relative;
  width: 100%;
  text-align: center;
  padding: 90px 20px 40px;
  background-image:
    linear-gradient(to bottom, rgba(26, 25, 27, 0) 0%, rgb(26 25 27) 100%),
    url(../img/banner.jpg);
  background-size: cover;
  background-position: center 15%;
  background-repeat: no-repeat;
  margin: 0;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 30px;
  min-height: 300px;
  z-index: 2;
}

.header h1 {
  font-size: 3.2em;
  color: #ffffff;
  text-shadow: 0 0 20px #3e63ca;
  letter-spacing: 3px;
  margin: 0;
  animation: fadeDown 0.8s ease-out;
}

.header p {
  font-size: 1.4em;
  color: #ccc;
  margin: 15px 0 25px;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

.logo-container {
  margin: 0 auto;
  width: 300px;
  animation: fadeDown 1s ease-out 0.3s both;
  margin-top: 30px;
}

.logo-container img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 20px rgba(36, 91, 173, 0.7));
  transition: var(--transition);
}

.logo-container img:hover {
  filter: drop-shadow(0 0 20px rgba(36, 91, 173, 0.7));
  transform: scale(1.08);
}

/* Tabs */
.tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 125px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 12px 25px;
  background: #7442368c;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: bold;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.tab-image {
  margin-top: 5px;
  display: block;
}

.tab-image img {
  width: 50px;
  height: auto;
}
.tab-btn:hover {
  background: #744236;
  color: #f9f9f9;
}

.tab-btn.active {
  background: #ad3f24;
  color: #f9f9f9;
  transform: scale(1.07);
}

/* Search */
.search input {
  width: 350px;
  padding: 12px 18px;
  border-radius: var(--radius);
  background: #2b3f50;
  border: none;
  color: white;
  font-size: 1.1em;
  margin: 25px auto;
  display: block;
  transition: var(--transition);
  box-shadow: var(--shadow);
  margin-top: 80px;
}
.search input:hover {
  transform: translateY(-4px);

  transition: all 0.4s ease; /* transición suave */
  box-shadow: 0 0 20px rgba(100, 100, 100, 0.5); /* halo celeste */
}

.search input:focus {
  transform: scale(1.05);
  outline: 1px solid rgba(0, 0, 0, 0.158); /* borde negro al enfocar */
  transform: translateY(-4px);

  transition: all 0.4s ease; /* transición suave */
  box-shadow: 0 0 10px rgba(0, 200, 255, 0.5); /* halo celeste */
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 80px;
  background: var(--panel);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
  display: none;
}

th {
  background-color: #209cff59;
  padding: 15px;
  text-transform: uppercase;
  font-size: 0.9em;
  letter-spacing: 1px;
}

td {
  padding: 12px;
  text-align: center;

  transition: var(--transition);
  opacity: 0;
  transform: translateY(10px);
  animation: fadeRow 0.4s forwards;
}

tr {
  background-color: #3a3939;
}

tr:hover {
  background: #222233;
}

.avatar img {
  width: 45px;
  height: 45px;
  box-shadow: 0 0 12px rgba(0, 200, 255, 0.3);
  transition: var(--transition);
}

.avatar img:hover {
  transform: scale(1.15);
  box-shadow: 0 0 18px var(--glow);
}

.kdr-high {
  color: var(--green);
  font-weight: bold;
}

.kdr-mid {
  color: var(--yellow);
  font-weight: bold;
}

.kdr-low {
  color: var(--danger);
  font-weight: bold;
}

.loading {
  text-align: center;
  padding: 40px;
  font-size: 1.5em;
  color: var(--glow);
}

.site-footer {
  background: #1a191b;
  color: #fff;
  padding: 20px 0;
  position: relative;
  bottom: 0;
  width: 100%;
  margin-top: 40px;
}

.site-footer p {
  margin: 5px 0;
}

.site-footer a {
  color: #fff;
  margin: 0 10px;
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

.site-footer a:hover {
  color: #7289da;
}

.finalfooter {
  color: #8f8f8f;
  text-align: center;
  font-size: 13px;
  padding: 10px;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.footer-social a {
  text-decoration: none;
  color: #fff;
  font-size: 25px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10%;
  box-shadow: 0px 0px 10px rgba(191, 192, 192, 0.5);
  transition: all 0.3s ease;
}

.footer-social a:hover {
  color: #ff4747;
}

.site-footer {
  padding: 20px;
  text-align: center;
  color: #fff;
}

.footer-sociale a {
  color: #fff;
  margin: 0 12px;
  font-size: 28px;
  transition:
    transform 0.2s,
    color 0.3s;
  text-decoration: none;
}

.footer-sociale a:hover {
  transform: scale(1.2);
  color: #1884dd7a;
}

/* === PAGINACIÓN === */
.pagination {
  display: flex;
  justify-content: center; /* 👈 centra todo */
  align-items: center;
  gap: 14px;
  margin: 30px auto;
  width: 100%;
}

.pagination .tab-btn {
  white-space: nowrap;
}

#pagination.visible {
  display: flex !important;
  opacity: 1;
}

#prevBtn,
#nextBtn {
  padding: 12px 28px;
  background: #2b3f50;
  color: var(--text);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: bold;
  font-size: 1.1em;

  margin: 0 10px;
}

#prevBtn:hover,
#nextBtn:hover {
  background: #2b3f50;
  color: #f9f9f9;
  transform: translateY(-2px);
  transition: all 0.4s ease; /* transición suave */
  box-shadow: 0 0 20px rgba(0, 200, 255, 0.185); /* halo celeste */
}

#pageInfo {
  margin: 0 30px;
  font-size: 1.1em;
  color: #ffffff;
  text-shadow: 0 0 10px rgb(255 0 118 / 30%);
  min-width: 160px;
  display: inline-block;
}

/* Animaciones */
@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeRow {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .header-content {
    flex-direction: column;
    padding: 40px 20px;
  }

  .logo-left {
    order: 1;
    margin-bottom: 20px;
  }

  .title-section {
    order: 2;
  }

  .logo-right {
    order: 3;
    margin-top: 30px;
  }

  .title-section h1 {
    font-size: 3em;
  }

  .logo-web img {
    width: 180px;
  }
}

@media (max-width: 600px) {
  .logo-web img {
    width: 150px;
  }

  .title-section h1 {
    font-size: 2.5em;
  }
}

.sponsor-section {
  text-align: center;
  margin: 150px 0 120px;
  width: 100%;
}

.sponsor-container {
  display: inline-block;
  padding: 15px;
  border-radius: var(--radius);
  transition: var(--transition);
}

.sponsor-logo {
  width: 200px;
  height: auto;
  filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.192));
  transition: var(--transition);
}

.sponsor-logo:hover {
  filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.226));
  transform: scale(1.08);
}

@media (max-width: 600px) {
  .sponsor-logo {
    width: 150px;
  }

  .sponsor-container {
    padding: 10px;
  }
}

td:nth-child(2) {
  text-align: left !important;
  padding-left: 20px;
}

td:nth-child(2) > div {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  justify-content: flex-start !important;
}

.name {
  color: var(--text);
}

.avatar img {
  width: 45px;
  height: 45px;
  border-radius: 8px;
  object-fit: cover;
}

.page-numbers {
  display: flex;
  gap: 8px;
  align-items: center;
}

.page-btn {
  background: #96b4cd7a;
  color: #fff;
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.page-btn:hover {
  background: #96b4cd7a;
}

.page-btn.active {
  background: #c98b4b;
  color: #000;
  cursor: default;
}

/* ===== TOP TABS ===== */

/* === TOP TABS CONTAINER === */
.top-tabs {
  max-width: 1600px;
  margin: 40px auto 30px;
  padding: 0 20px;
  margin-top: 120px;
}

/* Botones */
.top-tabs-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 22px;
}

.top-tab-btn {
  padding: 10px 22px;
  background: #2b3f50;
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.25s;
  width: 260px;
}

.top-tab-btn:hover {
  transform: translateY(-4px);

  transition: all 0.4s ease; /* transición suave */
  box-shadow: 0 0 20px rgba(0, 200, 255, 0.5); /* halo celeste */
  transform: translateY(-2px);
}

.top-tab-btn.active {
  background: #c98b4b;
  color: #000;
}

/* Contenido */
.top-tabs-content {
  display: flex;
  justify-content: center;
  margin-top: 80px;
}

/* === GRID DE CARDS (IGUAL A RECURSOS) === */
.top-tab-content {
  display: none;
  width: 100%;
  max-width: 1000px;
  gap: 20px;
}

.top-tab-content.active {
  display: flex;
  gap: 20px;
  justify-content: center;
}
/* === CARD INDIVIDUAL === */
.top-player {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: #2a2a2a;
  border-radius: 14px;
  min-width: 260px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.top-player:hover {
  transform: translateY(-4px);

  transition: all 0.4s ease; /* transición suave */
  box-shadow: 0 0 20px rgba(0, 200, 255, 0.5); /* halo celeste */
  transform: translateY(-2px);
}

/* #1 #2 #3 */
.top-player .rank {
  font-weight: bold;
  color: #ffcf87;
  margin-right: 4px;
  font-size: 24px;
}

/* Avatar */
.top-player img {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  object-fit: cover;
}

/* Texto a la derecha */
.top-player .info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Nickname */
.top-player .name {
  font-weight: 600;
  font-size: 1em;
  color: #fff;
  line-height: 1.1;
}

.top-player .value {
  font-size: 0.9em;
  color: #ccc;
}

th[data-sort] {
  cursor: pointer;
}

th[data-sort]::after {
  content: "▼";
  font-size: 12px;
  margin-left: 5px;
  opacity: 0.5;
  transition: transform 0.3s;
}

.main-wrapper {
  max-width: 1600px;
  margin: 0 auto; /* centra horizontalmente */
  padding: 0 30px; /* aire a los lados */
  box-sizing: border-box;
}
