/* dsix.es/jugadores · estadísticas del servidor SMP.
   Usa las piezas de style.css (portada, cinta, títulos de sección, cifras, pie como telón, cursor) para que sea
   la misma web; aquí solo va lo propio de esta página. */

.jg-back { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .6s var(--ease); }
.jg-back:hover { background-size: 100% 1px; }
.hero-heads button { display: block; margin-right: -6px; border-radius: 8px; transition: transform .5s var(--ease); }
.hero-heads button img { margin: 0; display: block; }
.hero-heads button:hover, .hero-heads button:focus-visible { transform: translateY(-5px) rotate(-6deg); position: relative; z-index: 1; }

/* ---------- buscador ---------- */
.jg-find { padding: clamp(90px, 12vw, 180px) var(--pad) clamp(30px, 4vw, 60px); display: grid; gap: 22px; }
.jg-combo { position: relative; }
.jg-q { width: 100%; padding: .08em 0 .12em; border: 0; border-bottom: 2px solid var(--ink); border-radius: 0; background: transparent; color: var(--ink);
  font: 800 clamp(44px, 8vw, 140px)/1 "Archivo", sans-serif; font-stretch: 85%; letter-spacing: -.04em; outline: none; transition: border-color .4s; }
.jg-q::placeholder { color: color-mix(in srgb, var(--ink) 18%, transparent); }
.jg-q:focus { border-color: var(--acc); }
.jg-q::-webkit-search-cancel-button { display: none; }
.jg-sug { position: absolute; left: 0; right: 0; top: calc(100% + 10px); z-index: 20; margin: 0; padding: 8px; list-style: none; border-radius: 22px; background: var(--paper);
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .45), 0 0 0 1px var(--line); max-height: 60vh; overflow: auto; }
.jg-sug li { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 8px 8px 8px 8px; border-radius: 14px; cursor: pointer; }
/* «Todas sus estadísticas» en cada sugerencia y en la ficha: lleva a dsix.es/jugador/?n=… */
.jg-sug-full { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 13px; font-weight: 600; white-space: nowrap; transition: background-color .3s, color .3s; }
.jg-sug-full:hover, .jg-sug-full:focus-visible { background: var(--acc); color: var(--on-acc); }
.jr-full { display: inline-flex; align-items: center; gap: 10px; height: 42px; padding: 0 8px 0 18px; border-radius: 999px; background: var(--acc); color: var(--on-acc); font-weight: 600; font-size: 14px; transition: transform .5s var(--ease); }
.jr-full i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--on-acc); color: var(--acc); font-style: normal; transition: transform .6s var(--ease); }
.jr-full:hover i { transform: rotate(-45deg); }
.jg-sug li[aria-selected="true"], .jg-sug li:hover { background: color-mix(in srgb, var(--ink) 7%, var(--paper)); }
.jg-sug img { width: 44px; height: 44px; border-radius: 10px; image-rendering: pixelated; background: color-mix(in srgb, var(--ink) 8%, transparent); }
.jg-sug b { font-size: 20px; font-weight: 800; font-stretch: 92%; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jg-sug b mark { background: none; color: var(--acc); }
.jg-sug span { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.jg-sug .none { grid-template-columns: 1fr; color: var(--muted); cursor: default; }
.jg-lead { max-width: 60ch; font-size: clamp(18px, 1.5vw, 22px); line-height: 1.4; }
.jg-lead b { font-weight: 800; }

/* ---------- secciones ---------- */
.jg-sec { padding: clamp(80px, 10vw, 150px) var(--pad) clamp(60px, 8vw, 120px); }
.jg-totals { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.jg-totals .fig-n { font-size: clamp(44px, 5.6vw, 104px); }

/* podio, en oscuro como «Servicios» en la portada */
.jg-dark { background: var(--ink); color: var(--paper); border-radius: var(--r) var(--r) 0 0; }
.jg-dark .sec-sum { color: color-mix(in srgb, var(--paper) 60%, var(--ink)); }
.podium { list-style: none; margin: clamp(10px, 2vw, 30px) 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1.18fr 1fr; gap: clamp(12px, 2vw, 28px); align-items: end; }
.podium li { position: relative; display: grid; justify-items: center; gap: 14px; padding: clamp(22px, 3vw, 40px) 18px clamp(24px, 3vw, 36px); border-radius: var(--r);
  background: color-mix(in srgb, var(--paper) 7%, var(--ink)); text-align: center; cursor: pointer; transition: transform .7s var(--ease), background-color .4s; }
.podium li:hover { transform: translateY(-8px); background: color-mix(in srgb, var(--paper) 12%, var(--ink)); }
.podium li.p1 { order: 2; background: var(--acc); color: var(--on-acc); padding-top: clamp(30px, 4vw, 56px); }
.podium li.p2 { order: 1; }
.podium li.p3 { order: 3; }
.pd-n { position: absolute; top: 14px; left: 20px; font-size: clamp(40px, 5vw, 86px); line-height: .8; font-weight: 900; font-stretch: 125%; letter-spacing: -.05em; opacity: .22; }
.pd-face { width: clamp(84px, 9vw, 150px); height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 18%; image-rendering: pixelated; background: color-mix(in srgb, var(--paper) 10%, transparent); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .6); }
.p1 .pd-face { width: clamp(100px, 11vw, 184px); }
.pd-name { font-size: clamp(18px, 1.7vw, 26px); font-weight: 800; font-stretch: 92%; letter-spacing: -.02em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-val { font-size: clamp(30px, 3.4vw, 60px); line-height: .9; font-weight: 300; font-stretch: 112%; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.pd-val small { font-size: .38em; font-weight: 600; letter-spacing: 0; margin-left: .2em; opacity: .7; }

/* ---------- pestañas y filtro ---------- */
.jg-bar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: clamp(22px, 2.6vw, 36px); }
.jg-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.jg-tab { height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); font-weight: 600; font-size: 15px; transition: background-color .35s, color .35s, border-color .35s; }
.jg-tab:hover { border-color: var(--ink); }
.jg-tab[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.jg-filter input { width: min(240px, 60vw); height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: inherit; font: inherit; font-weight: 500; }
.jg-filter input:focus { outline: none; border-color: var(--ink); }

/* ---------- clasificación ---------- */
.jg-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.jg-row { border-bottom: 1px solid var(--line); }
.jg-row > button { width: 100%; display: grid; grid-template-columns: 56px 52px minmax(0, 1.2fr) minmax(0, 1.6fr) 150px 36px; align-items: center; gap: 18px; padding: 16px 0; text-align: left; }
.jr-pos { font-size: 15px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.jr-face { width: 52px; height: 52px; border-radius: 12px; image-rendering: pixelated; background: color-mix(in srgb, var(--ink) 8%, transparent); transition: transform .6s var(--ease); }
.jg-row > button:hover .jr-face { transform: rotate(-6deg) scale(1.06); }
.jr-name { display: grid; gap: 2px; min-width: 0; }
.jr-name b { font-size: clamp(20px, 2.2vw, 34px); font-weight: 800; font-stretch: 88%; letter-spacing: -.025em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: font-stretch .6s var(--ease); }
.jg-row > button:hover .jr-name b { font-stretch: 108%; }
.jr-name small { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 7px; }
.jr-name small.on { color: var(--ok); font-weight: 600; }
.jr-name small.on::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.jr-bar { height: 10px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 7%, transparent); overflow: hidden; }
.jr-bar i { display: block; height: 100%; width: var(--w, 0%); border-radius: inherit; background: var(--acc); transition: width 1.2s var(--ease); }
.jr-val { justify-self: end; font-size: clamp(22px, 2.4vw, 38px); font-weight: 300; font-stretch: 112%; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.jr-val small { font-size: .5em; font-weight: 600; letter-spacing: 0; margin-left: .25em; color: var(--muted); }
.jr-ic { position: relative; justify-self: end; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); transition: background-color .4s, border-color .4s, color .4s; }
.jr-ic::before, .jr-ic::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; background: currentColor; border-radius: 2px; transition: transform .5s var(--ease); }
.jr-ic::after { transform: rotate(90deg); }
.jg-row > button[aria-expanded="true"] .jr-ic { background: var(--acc); border-color: var(--acc); color: var(--on-acc); }
.jg-row > button[aria-expanded="true"] .jr-ic::after { transform: rotate(0deg); }
.jg-row.top .jr-pos { color: var(--acc); }
.jg-row.flash > button { animation: flash 1.6s var(--ease); }
@keyframes flash { 0%, 40% { background: color-mix(in srgb, var(--acc) 14%, transparent); } 100% { background: transparent; } }
.jg-empty { padding: 40px 0; font-size: 20px; color: var(--muted); }

/* ---------- ficha de cada jugador ---------- */
/* se abre con grid-template-rows 0fr → 1fr: crece hasta lo que mida el contenido aunque cambie mientras se abre
   (la imagen del cuerpo al cargar, el texto al ajustarse), sin medir alturas a mano */
.jr-card { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .75s var(--ease); }
.jr-card.open { grid-template-rows: 1fr; }
.jr-card > .jr-clip { min-height: 0; overflow: hidden; }
.jr-in { display: grid; grid-template-columns: minmax(160px, 220px) minmax(0, 1fr); gap: clamp(20px, 3vw, 48px); padding: 8px 0 34px 74px; }
.jr-body { width: 100%; height: auto; max-width: 220px; image-rendering: pixelated; align-self: start; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .22)); }
.jr-main { display: grid; gap: 26px; min-width: 0; }
.jr-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.jr-stat { display: grid; gap: 4px; padding: 16px 18px; background: var(--paper); }
.jr-stat span { font-size: 13px; color: var(--muted); }
.jr-stat b { font-size: 26px; line-height: 1; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.jr-stat b small { font-size: .5em; font-weight: 600; margin-left: .2em; color: var(--muted); }
.jr-tops { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.jr-top { display: grid; gap: 10px; align-content: start; padding: 18px; border-radius: 18px; background: color-mix(in srgb, var(--ink) 5%, var(--paper)); }
.jr-top h4 { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.jr-top ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.jr-top li { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; }
.jr-top li span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 500; }
.jr-top.nem { background: color-mix(in srgb, var(--bad) 10%, var(--paper)); }
.jr-top p { font-size: 22px; font-weight: 800; font-stretch: 90%; letter-spacing: -.02em; }
.jr-links { display: flex; gap: 10px; flex-wrap: wrap; }
.jr-links a { display: inline-flex; align-items: center; height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); font-weight: 500; font-size: 14px; transition: background-color .4s, color .4s, border-color .4s; }
.jr-links a:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

img.sin-cara { visibility: hidden; }
/* mientras entra con GSAP, sin la transición del hover (si no, se pelean y se queda a medias) */
.entrando { transition: none !important; }

/* ---------- pantallas pequeñas ---------- */
/* 18 cifras: 6, 3 o 2 columnas para que las filas siempre queden completas (sin huecos grises) */
@media (max-width: 1200px) { .jr-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1000px) {
  .jg-totals { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 40px; }
  .jg-totals .fig:nth-child(4) { padding-left: 0; border-left: 0; }
  .jg-row > button { grid-template-columns: 40px 46px minmax(0, 1fr) 120px 32px; }
  .jr-bar { display: none; }
  .jr-face { width: 46px; height: 46px; }
  .jr-in { padding-left: 0; }
  .jr-tops { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .jg-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jg-totals .fig:nth-child(3), .jg-totals .fig:nth-child(5) { padding-left: 0; border-left: 0; }
  .jg-totals .fig:nth-child(4) { padding-left: 20px; border-left: 1px solid var(--line); }
  /* podio de verdad también en el móvil: 2.º, 1.º y 3.º lado a lado, más pequeños */
  .podium { grid-template-columns: 1fr 1.15fr 1fr; gap: 8px; }
  .podium li { gap: 8px; padding: 34px 8px 16px; border-radius: 18px; }
  .podium li.p1 { padding-top: 42px; }
  .pd-n { top: 8px; left: 10px; font-size: 30px; }
  .pd-face { width: min(64px, 100%); border-radius: 14px; }
  .p1 .pd-face { width: min(80px, 100%); }
  .pd-name { font-size: 14px; }
  .pd-val { font-size: 22px; }
  .pd-val small { font-size: .5em; }
  .jg-row > button { grid-template-columns: 30px 42px minmax(0, 1fr) auto; gap: 12px; }
  .jr-ic { display: none; }
  .jr-face { width: 42px; height: 42px; }
  .jr-in { grid-template-columns: 1fr; }
  .jr-body { max-width: 140px; justify-self: center; }
  .jr-tops { grid-template-columns: 1fr; }
  .jr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jg-filter { width: 100%; } .jg-filter input { width: 100%; }
  .jg-sug li { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .jg-sug li > span { display: none; }
  .jg-sug-full { height: 32px; padding: 0 12px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .podium li, .jr-bar i, .jr-name b, .jr-face, .jr-card { transition: none; }
  .jg-row.flash > button { animation: none; }
}

/* «jugadores» tiene letras que bajan (j, g): un poco más de aire bajo la palabra gigante */
.jg .hero-word { margin-bottom: .16em; }

/* ---------- iconos del juego (bloques, objetos, criaturas) ---------- */
.mc-ico { display: inline-block; flex: none; width: 28px; height: 28px; object-fit: contain; vertical-align: middle; }
img.mc-ico.mc-ico-no, span.mc-ico-no { visibility: hidden; }
.jr-top li > span:first-child { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.jr-ico { width: 24px; height: 24px; }

/* ---------- selector de servidor (SMP / OneBlock) ---------- */
.jg-modos { justify-self: start; width: max-content; max-width: 100%; display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 6px; margin: 0 0 clamp(22px, 3vw, 34px); border-radius: 999px; border: 1px solid var(--line); }
.jg-modos[hidden] { display: none; }
.jg-modo { display: inline-flex; align-items: center; height: 46px; padding: 0 24px; border-radius: 999px; font-size: 17px; font-weight: 700; font-stretch: 96%;
  letter-spacing: -.01em; transition: background-color .35s, color .35s; }
.jg-modo[aria-current="page"] { background: var(--ink); color: var(--paper); }
.jg-modo:not([aria-current="page"]):hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
