/* ========================================================================
   JUGADORES ALL DATA — Player Profile Page
   ======================================================================== */

/* ── Hero Section ── */
.player-hero {
  width: 100%;
  border-radius: 16px;
  padding: clamp(1rem, 1.8vw, 2rem);
  margin: 1rem 0 2rem;
  background: radial-gradient(1200px 600px at 20% 20%, rgba(0, 140, 255, 0.18), rgba(0, 0, 0, 0)),
              linear-gradient(120deg, rgba(20, 35, 78, 0.85), rgba(7, 10, 25, 0.70));
  border: 1px solid rgba(255, 255, 255, 0.20);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

.player-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(1rem, 1.8vw, 2rem);
}

.player-hero__left {
  display: flex;
  align-items: center;
  gap: clamp(0.8rem, 1.4vw, 1.5rem);
  min-width: 0;
}

.player-hero__avatarWrap {
  width: clamp(64px, 8vw, 118px);
  min-width: 64px;
  aspect-ratio: 1;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 3px solid rgba(255, 138, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(4px, 0.55vw, 8px);
  box-sizing: border-box;
}

.player-hero__avatar {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
}

.player-hero__meta { min-width: 0; }

.player-hero__title {
  margin: 0;
  font-size: clamp(1.25rem, 3.1vw, 3rem);
  letter-spacing: 0.02em;
  color: #fff;
  font-weight: 900;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.player-hero__team {
  margin: 0.3rem 0 0;
  font-size: clamp(0.875rem, 2.1vw, 2rem);
  color: #ff8a00;
  font-weight: 900;
}

.player-hero__subtitle {
  margin: 0.35rem 0 0;
  font-size: clamp(0.7rem, 1.25vw, 1.1rem);
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
}

.player-hero__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.4rem, 1vw, 0.8rem);
  align-items: stretch;
  width: clamp(280px, 44vw, 720px);
  max-width: 720px;
}

.player-statCard {
  border-radius: 12px;
  background: rgba(8, 12, 25, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: clamp(0.5rem, 1.1vw, 1.2rem) clamp(0.4rem, 1vw, 1rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 0.2rem;
  backdrop-filter: blur(10px);
}

.player-statCard__value {
  font-size: clamp(1.25rem, 3vw, 3rem);
  color: #fff;
  font-weight: 900;
  line-height: 1;
}

.player-statCard__label {
  font-size: clamp(0.6rem, 1.05vw, 1rem);
  color: rgba(255, 255, 255, 0.92);
  font-weight: 900;
  letter-spacing: 0.06em;
}

/* ── Hero Detail Pills ── */
.player-hero__details {
  margin-top: clamp(0.6rem, 1.1vw, 1rem);
  padding-top: clamp(0.6rem, 1.1vw, 1rem);
  border-top: 1px solid rgba(255, 255, 255, 0.20);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.3rem, 0.8vw, 0.8rem);
}

.player-detail {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: clamp(0.4rem, 0.8vw, 0.8rem);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.player-detail__k {
  font-size: clamp(0.55rem, 0.95vw, 0.85rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.78);
  text-transform: uppercase;
}

.player-detail__v {
  font-size: clamp(0.7rem, 1.15vw, 1.1rem);
  font-weight: 800;
  color: rgba(255, 255, 255, 0.95);
  overflow-wrap: anywhere;
}

/* ── Season Stats Table ── */
.estadisticas_temporada {
  margin-bottom: 1.5rem;
}

.estadisticas_temporada h2 {
  font-size: clamp(1.1rem, 1.8vw, 1.6rem);
  margin: 1.5rem 0 0.5rem;
}

.tabla-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

body.light-mode .tabla-responsive {
  border-color: rgba(0, 0, 0, 0.1);
}

.tabla-responsive table.table {
  min-width: 700px;
  width: 100%;
  border-collapse: collapse;
  font-size: clamp(0.75rem, 1vw, 0.95rem);
}

.tabla-responsive table.table th {
  padding: 0.6rem 0.75rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.7;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  white-space: nowrap;
}

body.light-mode .tabla-responsive table.table th {
  border-bottom-color: rgba(0, 0, 0, 0.12);
}

.tabla-responsive table.table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: middle;
}

body.light-mode .tabla-responsive table.table td {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

.tabla-responsive table.table td a {
  color: var(--text-color);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.tabla-responsive table.table td a:hover {
  color: #007ACC;
}

.tabla-responsive table.table td.puntos,
.tabla-responsive table.table td.rebotes,
.tabla-responsive table.table td.asistencias,
.tabla-responsive table.table td.perdidas,
.tabla-responsive table.table td.robos,
.tabla-responsive table.table td.valoracion {
  white-space: nowrap;
}

.tabla-responsive table.table tbody tr {
  cursor: pointer;
  transition: background 0.2s ease;
}

.tabla-responsive table.table tbody tr:hover td {
  background: rgba(0, 122, 204, 0.08);
}

/* ── Maximum Records Section ── */
.maxima_partidos {
  margin-top: 0.5rem;
}

.maxima_partidos h2 {
  font-size: clamp(1.1rem, 1.8vw, 1.6rem);
  margin: 1rem 0;
}

.info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: clamp(0.5rem, 1vw, 1rem);
}

.div-info {
  box-sizing: border-box;
  padding: clamp(0.6rem, 1vw, 1.2rem);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  text-align: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

body.light-mode .div-info {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
}

.div-info:hover {
  border-color: rgba(0, 122, 204, 0.4);
  box-shadow: 0 4px 20px rgba(0, 122, 204, 0.08);
}

.div-info--link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.div-info--link:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border-color: rgba(0, 122, 204, 0.5);
}

.titulo_info {
  color: var(--text-color);
  font-size: clamp(0.7rem, 1.1vw, 1rem);
  font-weight: 700;
  margin: 0 0 0.3rem;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.info_num {
  font-size: clamp(1.5rem, 2.5vw, 2.5rem);
  color: #007ACC;
  font-weight: 900;
  margin: 0.3rem 0;
  line-height: 1.1;
}

body.light-mode .info_num {
  color: #005fa3;
}

.info_info {
  font-size: clamp(0.55rem, 0.75vw, 0.8rem);
  color: var(--text-color);
  font-weight: 600;
  margin: 0.3rem 0 0;
  opacity: 0.6;
  line-height: 1.3;
}

/* ── Percentage & Extra Stats ── */
.porcentajes_temporada_jugadores {
  margin-bottom: 2rem;
}

.porcentajes_temporada_jugadores h2 {
  font-size: clamp(1.1rem, 1.8vw, 1.6rem);
  margin: 1rem 0;
}

.grafica-container_jugadores {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.75rem, 1.5vw, 1.5rem);
}

.grafica_jugadores_estadisticas {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.chart-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 300px;
}

.grafica_jugadores_estadisticas canvas {
  width: 100% !important;
  height: 100% !important;
}

.titulos_porcentajes {
  font-size: clamp(0.75rem, 1vw, 1rem);
  font-weight: 700;
  text-align: center;
  margin: 0 0 0.5rem;
  color: var(--text-color);
}

/* ── Advanced Stats / Shot Chart ── */
.estadisticas_avanzadas {
  margin-bottom: 2rem;
}

.estadisticas_avanzadas h2 {
  font-size: clamp(1.1rem, 1.8vw, 1.6rem);
  margin: 1rem 0;
}

.contenedor_avanzadas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 2vw, 2rem);
  align-items: start;
}

.imagen_cancha_contenedor {
  position: relative;
  width: 100%;
}

.imagen_cancha {
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.punto_tiro {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.85;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.tabla_estadisticas {
  width: 100%;
  border-collapse: collapse;
  font-size: clamp(0.8rem, 1vw, 1rem);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

body.light-mode .tabla_estadisticas {
  border-color: rgba(0, 0, 0, 0.1);
}

.tabla_estadisticas th {
  padding: 0.6rem 1rem;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85em;
  letter-spacing: 0.04em;
  opacity: 0.7;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  text-align: left;
}

body.light-mode .tabla_estadisticas th {
  border-bottom-color: rgba(0, 0, 0, 0.12);
}

.tabla_estadisticas td {
  padding: 0.55rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body.light-mode .tabla_estadisticas td {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

/* ── Career Summary Stats ── */
.career-summary {
  margin: 2rem 0;
}
.career-summary h2 { margin-bottom: 1rem; }
.career-summary h3 { margin: 1.5rem 0 0.8rem; font-size: 1.2rem; opacity: 0.9; }

.career-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.8rem;
}
.career-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
}
body.light-mode .career-card {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
}
.career-card__val {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
}
body.light-mode .career-card__val { color: #14234e; }
.career-card__label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.3rem;
}
body.light-mode .career-card__label { color: rgba(0, 0, 0, 0.6); }

.career-shooting-grid, .career-adv-grid {
  display: grid;
  gap: 0.8rem;
}
.career-shooting-grid { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); }
.career-adv-grid { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }

.career-shoot-pill, .career-adv-item {
  background: rgba(255, 138, 0, 0.1);
  border: 1px solid rgba(255, 138, 0, 0.3);
  padding: 0.6rem;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
body.light-mode .career-shoot-pill, body.light-mode .career-adv-item {
  background: rgba(0, 122, 204, 0.05);
  border-color: rgba(0, 122, 204, 0.2);
}
.shoot-label, .adv-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
}
body.light-mode .shoot-label, body.light-mode .adv-label { color: rgba(0, 0, 0, 0.6); }
.shoot-val, .adv-val {
  font-size: 1.2rem;
  font-weight: 900;
  color: #ff8a00;
  margin-top: 0.2rem;
}
body.light-mode .shoot-val, body.light-mode .adv-val { color: #007ACC; }

.career-trend { margin: 2rem 0; }
.career-trend-chart-wrap {
  position: relative;
  width: 100%;
  height: 350px;
  background: rgba(255,255,255,0.02);
  border-radius: 12px;
  padding: 1rem;
}

/* ── Responsive: Tablet ── */
@media (max-width: 900px) {
  .info {
    grid-template-columns: repeat(3, 1fr);
  }

  .contenedor_avanzadas {
    grid-template-columns: 1fr;
  }

  .grafica-container_jugadores {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Responsive: Mobile ── */
@media (max-width: 600px) {
  .player-hero {
    padding: 0.75rem;
    margin: 0.5rem 0 1rem;
    border-radius: 12px;
  }

  .player-hero__inner {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .player-hero__avatarWrap {
    width: 56px;
    min-width: 56px;
    padding: 4px;
  }

  .player-hero__title { font-size: 1.1rem; }
  .player-hero__team  { font-size: 0.85rem; }
  .player-hero__subtitle { font-size: 0.65rem; }

  .player-hero__stats {
    width: 100%;
    max-width: none;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.35rem;
  }

  .player-statCard { padding: 0.5rem 0.3rem; }
  .player-statCard__value { font-size: 1rem; }
  .player-statCard__label { font-size: 0.55rem; }

  .player-hero__details {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.3rem;
    margin-top: 0.6rem;
    padding-top: 0.6rem;
  }

  .player-detail__k { font-size: 0.5rem; }
  .player-detail__v { font-size: 0.6rem; }

  .info {
    grid-template-columns: repeat(2, 1fr);
  }

  .grafica-container_jugadores {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .tabla-responsive table.table {
    min-width: 550px;
    font-size: 0.75rem;
  }

  .contenedor_avanzadas {
    grid-template-columns: 1fr;
  }
}
