:root {
  --bg: #061a2b;
  --panel: rgba(255, 255, 255, .06);
  --panel-2: rgba(255, 255, 255, .08);
  --border: rgba(255, 255, 255, .12);
  --text: rgba(255, 255, 255, .92);
  --muted: rgba(255, 255, 255, .68);
  --accent: #22c1ff;
  --accent-2: #7c5cff;
  --good: #3ee28b;
  --warn: #ffbf3a;
  --bad: #ff4d6d;
  --shadow: 0 16px 40px rgba(0, 0, 0, .35);
  --radius: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box
}

/* El atributo hidden debe siempre ganar sobre cualquier display de CSS */
[hidden] {
  display: none !important;
}

html,
body {
  height: 100%
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: radial-gradient(1100px 520px at 50% -220px, rgba(34, 193, 255, .14), transparent 62%),
    radial-gradient(900px 480px at 90% -260px, rgba(124, 92, 255, .12), transparent 62%),
    var(--bg);
  color: var(--text);
}

.app {
  width: min(1200px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.topbar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 14px 18px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .04));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.topbar__title h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: .2px;
}

.topbar__title p {
  margin: 6px 0 0;
  font-size: 13px;
}

.matchup {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.matchup__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Botón analizar centrado debajo de las cards */
.matchup__cta {
  display: flex;
  justify-content: center;
  padding-top: 4px;
}

.btn--analyze {
  height: 52px;
  min-width: 260px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .4px;
  padding: 0 40px;
  background: linear-gradient(135deg, rgba(34, 193, 255, .26), rgba(124, 92, 255, .22));
  border-color: rgba(34, 193, 255, .45);
  box-shadow: 0 0 24px rgba(34, 193, 255, .14);
  transition: transform .08s ease, box-shadow .15s ease, background .15s ease;
  border-radius: 14px;
}

.btn--analyze:hover {
  background: linear-gradient(135deg, rgba(34, 193, 255, .38), rgba(124, 92, 255, .32));
  box-shadow: 0 0 36px rgba(34, 193, 255, .26);
  transform: translateY(-1px);
}

.btn--analyze:active {
  transform: translateY(1px);
}

.selector {
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, .14);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.selector__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.selector__role {
  font-size: 12px;
  letter-spacing: .9px;
  color: rgba(255, 255, 255, .70);
}

.selector__search {
  position: relative;
  width: min(280px, 100%);
}

.selector__search input {
  width: 100%;
  height: 36px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
}

.player {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, .12);
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(0, 0, 0, .14));
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
  text-align: left;
}

.player:focus {
  outline: none;
  border-color: rgba(34, 193, 255, .55);
  box-shadow: 0 0 0 3px rgba(34, 193, 255, .16);
}

.player__img {
  width: 62px;
  height: 62px;
  border-radius: 16px;
  object-fit: cover;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .10);
}

/* Card grande para la vista matchup */
.player--large {
  padding: 16px;
  gap: 16px;
}

.player--large .player__img {
  width: 96px;
  height: 96px;
  border-radius: 20px;
  border: 2px solid rgba(255, 255, 255, .15);
}

.player--large .player__name {
  font-size: 22px;
}

.player--large .pill {
  height: 26px;
  padding: 0 10px;
  font-size: 13px;
}

.player__info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.player__name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player__meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(0, 0, 0, .18);
  font-size: 12px;
  color: rgba(255, 255, 255, .82);
}

.pill--muted {
  color: rgba(255, 255, 255, .70)
}



.module-tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.tab {
  height: 44px;
  padding: 0 28px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(0, 0, 0, .18);
  color: rgba(255, 255, 255, .75);
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .4px;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.tab:hover {
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .90);
}

.tab--active {
  border-color: rgba(34, 193, 255, .55);
  background: linear-gradient(135deg, rgba(34, 193, 255, .22), rgba(124, 92, 255, .18));
  color: rgba(255, 255, 255, .95);
  box-shadow: 0 0 16px rgba(34, 193, 255, .15);
}

/* ── Rendimiento Bateador: Hero Panel ── */
.perf-hero-panel {
  background: linear-gradient(135deg, rgba(34, 193, 255, .06), rgba(124, 92, 255, .06)), rgba(255, 255, 255, .04);
  border-color: rgba(34, 193, 255, .18);
}

.perf-hero {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.perf-search-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 0 0 auto;
  width: min(280px, 100%);
}

.perf-search-label {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(34, 193, 255, .8);
}

.perf-search {
  position: relative;
  width: 100%;
}

.perf-search input {
  width: 100%;
  height: 46px;
  font-size: 14px;
}

.perf-hint {
  margin: 0;
  font-size: 12px;
}

/* Hero card del jugador en Rendimiento */
.perf-player-hero {
  flex: 1 1 auto;
  display: flex;
  gap: 20px;
  align-items: center;
  background: linear-gradient(135deg, rgba(34, 193, 255, .12), rgba(124, 92, 255, .10));
  border: 1px solid rgba(34, 193, 255, .30);
  border-radius: 20px;
  padding: 20px 24px;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s ease, box-shadow .15s ease;
  min-height: 120px;
}

.perf-player-hero:hover {
  border-color: rgba(34, 193, 255, .55);
  box-shadow: 0 0 24px rgba(34, 193, 255, .14);
}

.perf-player-hero:focus {
  outline: none;
  border-color: rgba(34, 193, 255, .70);
  box-shadow: 0 0 0 3px rgba(34, 193, 255, .18);
}

.perf-player-img-wrap {
  position: relative;
  flex: 0 0 auto;
}

.perf-player-img {
  width: 110px;
  height: 110px;
  border-radius: 22px;
  object-fit: cover;
  background: rgba(255, 255, 255, .06);
  border: 2px solid rgba(34, 193, 255, .35);
  display: block;
}

.perf-player-glow {
  position: absolute;
  inset: -4px;
  border-radius: 26px;
  background: radial-gradient(circle, rgba(34, 193, 255, .20), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

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

.perf-player-name {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: .2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.perf-player-meta {
  gap: 8px;
}

.perf-player-tag {
  display: inline-flex;
  margin-top: 2px;
}

/* ── Gráfica: controls superiores ── */
.chart-top-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* Control de línea umbral */
.threshold-control {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, .22);
  border: 1px solid rgba(34, 193, 255, .30);
  border-radius: 10px;
  padding: 4px 8px;
}

.threshold-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: rgba(34, 193, 255, .80);
  margin-right: 2px;
}

.threshold-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(34, 193, 255, .35);
  background: rgba(34, 193, 255, .12);
  color: rgba(34, 193, 255, .95);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s ease, transform .08s ease;
  padding: 0;
}

.threshold-btn:hover {
  background: rgba(34, 193, 255, .24);
}

.threshold-btn:active {
  transform: scale(.92);
}

.threshold-value {
  font-size: 15px;
  font-weight: 800;
  color: rgba(255, 191, 58, .95);
  min-width: 36px;
  text-align: center;
  letter-spacing: .3px;
}

.perf-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.select {
  height: 36px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 10px 6px 2px;
  overflow: auto;
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(0, 0, 0, .02)),
    repeating-linear-gradient(to top,
      rgba(255, 255, 255, .06) 0,
      rgba(255, 255, 255, .06) 1px,
      transparent 1px,
      transparent 32px),
    rgba(0, 0, 0, .10);
  border-radius: var(--radius-sm);
  min-height: 240px;
  width: 100%;
  position: relative;
  /* para la línea del umbral */
}

/* Línea horizontal de umbral */
.threshold-line {
  position: absolute;
  left: 6px;
  right: 6px;
  height: 2px;
  background: rgba(255, 191, 58, .85);
  border-radius: 2px;
  pointer-events: none;
  z-index: 4;
}

.threshold-line-label {
  position: absolute;
  right: 0;
  top: -18px;
  font-size: 10px;
  font-weight: 800;
  color: rgba(255, 191, 58, .95);
  background: rgba(6, 26, 43, .90);
  padding: 2px 5px;
  border-radius: 5px;
  border: 1px solid rgba(255, 191, 58, .35);
  white-space: nowrap;
}

.bar {
  width: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1 0 44px;
  max-width: 64px;
}

.bar__value {
  font-size: 11px;
  color: rgba(255, 255, 255, .76);
  min-height: 14px;
}

.bar__stick {
  width: 100%;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(34, 193, 255, .90), rgba(124, 92, 255, .75));
  border: 1px solid rgba(255, 255, 255, .10);
  transition: height .18s ease;
}

/* Colores según resultado vs línea */
.bar--over .bar__stick {
  background: linear-gradient(180deg, rgba(62, 226, 139, .95), rgba(16, 185, 89, .80));
  border-color: rgba(62, 226, 139, .25);
  box-shadow: 0 0 10px rgba(62, 226, 139, .22);
}

.bar--under .bar__stick {
  background: linear-gradient(180deg, rgba(255, 77, 109, .90), rgba(180, 20, 50, .75));
  border-color: rgba(255, 77, 109, .25);
  box-shadow: 0 0 10px rgba(255, 77, 109, .18);
}

.bar--push .bar__stick {
  background: linear-gradient(180deg, rgba(34, 193, 255, .90), rgba(124, 92, 255, .75));
  border-color: rgba(34, 193, 255, .25);
  box-shadow: 0 0 10px rgba(34, 193, 255, .18);
}

/* Valor en la barra también coloreado */
.bar--over .bar__value {
  color: rgba(62, 226, 139, .90);
  font-weight: 700;
}

.bar--under .bar__value {
  color: rgba(255, 77, 109, .90);
  font-weight: 700;
}

.bar--push .bar__value {
  color: rgba(34, 193, 255, .90);
  font-weight: 700;
}

.bar__label {
  font-size: 10px;
  color: rgba(255, 255, 255, .62);
  text-align: center;
  line-height: 1.15;
  width: 100%;
  white-space: pre-line;
  word-break: break-word;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.results {
  position: absolute;
  top: 42px;
  right: 0;
  left: 0;
  border: 1px solid var(--border);
  background: rgba(10, 18, 28, .98);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  z-index: 50;
  max-height: 320px;
  overflow: auto;
}

.results__item {
  width: 100%;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 10px;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.results__item:hover {
  background: rgba(255, 255, 255, .06)
}

.results__img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .10);
  flex: 0 0 auto;
}

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

.results__name {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.results__sub {
  font-size: 12px;
  color: rgba(255, 255, 255, .65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.controls {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  min-width: min(720px, 100%);
}

.controls__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-size: 12px;
  color: var(--muted);
}

input {
  height: 42px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, .18);
  color: var(--text);
  outline: none;
}

select {
  height: 42px;
  padding: 0 36px 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(34, 193, 255, .28);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(34,193,255,0.85)' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 10px center / 16px 16px,
    linear-gradient(135deg, rgba(34, 193, 255, .10), rgba(124, 92, 255, .08)),
    rgba(4, 14, 26, .75);
  color: var(--text);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .2px;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  backdrop-filter: blur(4px);
}

select:hover {
  border-color: rgba(34, 193, 255, .50);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(34,193,255,0.85)' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 10px center / 16px 16px,
    linear-gradient(135deg, rgba(34, 193, 255, .16), rgba(124, 92, 255, .13)),
    rgba(4, 14, 26, .80);
}

select:focus {
  border-color: rgba(34, 193, 255, .75);
  box-shadow: 0 0 0 3px rgba(34, 193, 255, .20);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(34,193,255,0.85)' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 10px center / 16px 16px,
    linear-gradient(135deg, rgba(34, 193, 255, .18), rgba(124, 92, 255, .14)),
    rgba(4, 14, 26, .85);
}

select option {
  background: #081622;
  color: var(--text);
  padding: 8px 12px;
}

input:focus {
  border-color: rgba(34, 193, 255, .6);
  box-shadow: 0 0 0 3px rgba(34, 193, 255, .18);
}

.btn {
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .08);
  color: var(--text);
  padding: 0 14px;
  font-weight: 600;
  letter-spacing: .1px;
  cursor: pointer;
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
}

.btn:active {
  transform: translateY(1px)
}

.btn--primary {
  background: linear-gradient(135deg, rgba(34, 193, 255, .22), rgba(124, 92, 255, .20));
  border-color: rgba(34, 193, 255, .35);
}

.btn--primary:hover {
  background: linear-gradient(135deg, rgba(34, 193, 255, .30), rgba(124, 92, 255, .26))
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.panel {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .05);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

h2 {
  margin: 0;
  font-size: 15px;
  letter-spacing: .15px;
}

.tag {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, .18);
  color: var(--muted);
}

.tag--good {
  border-color: rgba(62, 226, 139, .35);
  color: rgba(62, 226, 139, .9)
}

.tag--warn {
  border-color: rgba(255, 191, 58, .35);
  color: rgba(255, 191, 58, .95)
}

.tag--bad {
  border-color: rgba(255, 77, 109, .35);
  color: rgba(255, 77, 109, .92)
}

.cards {
  display: grid;
  gap: 10px;
}

.cards--summary {
  grid-template-columns: repeat(8, minmax(0, 1fr))
}

.cards--context {
  grid-template-columns: repeat(5, minmax(0, 1fr))
}

.cards--metrics {
  grid-template-columns: repeat(8, minmax(0, 1fr))
}

.card {
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, .16);
  border-radius: var(--radius-sm);
  padding: 12px 12px 10px;
}

.card__k {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}

.card__v {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .2px;
}

.card__sub {
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}

.v--accent {
  color: rgba(34, 193, 255, .95)
}

.v--accent2 {
  color: rgba(124, 92, 255, .95)
}

.v--good {
  color: rgba(62, 226, 139, .95)
}

.v--warn {
  color: rgba(255, 191, 58, .98)
}

.v--bad {
  color: rgba(255, 77, 109, .95)
}

.table-wrap {
  overflow: auto
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.table th,
.table td {
  padding: 10px 10px;
  font-size: 12px;
  text-align: center;
}

.table th {
  background: rgba(255, 255, 255, .06);
  color: rgba(255, 255, 255, .78);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}

.table td {
  background: rgba(0, 0, 0, .14);
  color: rgba(255, 255, 255, .86)
}

.ctx-note {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.45;
}

.pred {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pred__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pred__card {
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, .16);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.pred__label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.pred__value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: .3px;
}

.meter {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .10);
  margin-top: 10px;
  overflow: hidden;
}

.meter__bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(34, 193, 255, .95), rgba(124, 92, 255, .95));
  transition: width .35s ease;
}

.pred__conclusion {
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, .12);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.pred__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.45
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  font-size: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, .14);
  border-radius: var(--radius);
}

.muted {
  color: var(--muted)
}

/* ══════════════════════════════════════════
   HOT HITTERS MODULE
   ══════════════════════════════════════════ */

.hot-panel {
  background: linear-gradient(135deg,
      rgba(255, 100, 30, .06),
      rgba(255, 191, 58, .05)),
    rgba(255, 255, 255, .04);
  border-color: rgba(255, 120, 30, .22);
}

/* Cabecera: título + controles */
.hot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.hot-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hot-fire {
  font-size: 28px;
  line-height: 1;
}

.hot-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, #ff8c30, #ffbf3a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hot-subtitle {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .3px;
}

.hot-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn--hot-refresh {
  height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 120, 30, .40);
  background: rgba(255, 120, 30, .14);
  color: rgba(255, 191, 58, .95);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .12s ease, transform .08s ease;
}

.btn--hot-refresh:hover {
  background: rgba(255, 120, 30, .26);
}

.btn--hot-refresh:active {
  transform: scale(.96);
}

/* Loading spinner */
.hot-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 40px;
  color: var(--muted);
  font-size: 14px;
}

.hot-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(255, 120, 30, .20);
  border-top-color: rgba(255, 120, 30, .90);
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Grid responsivo de cards */
.hot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

/* Cada card de jugador */
.hitter-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(0, 0, 0, .12));
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
  text-align: center;
}

.hitter-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 120, 30, .45);
  box-shadow: 0 10px 28px rgba(255, 100, 20, .18);
}

/* Badge de posición en el ranking */
.hitter-rank {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .35);
  border: 1px solid rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .80);
}

/* Rank 1,2,3 con colores especiales */
.hitter-rank--1 {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  border-color: rgba(255, 215, 0, .60);
  color: #1a0800;
}

.hitter-rank--2 {
  background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
  border-color: rgba(200, 200, 200, .60);
  color: #111;
}

.hitter-rank--3 {
  background: linear-gradient(135deg, #cd7f32, #a0522d);
  border-color: rgba(205, 127, 50, .60);
  color: #fff;
}

/* Foto del jugador */
.hitter-img {
  width: 90px;
  height: 90px;
  border-radius: 20px;
  object-fit: cover;
  background: rgba(255, 255, 255, .06);
  border: 2px solid rgba(255, 255, 255, .12);
  display: block;
  transition: border-color .12s ease;
}

.hitter-card:hover .hitter-img {
  border-color: rgba(255, 120, 30, .55);
}

/* Stat principal — el número grande */
.hitter-stat {
  font-size: 36px;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, #ff8c30, #ffbf3a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
}

/* Para AVG / OPS mostramos decimales más pequeños */
.hitter-stat--decimal {
  font-size: 26px;
  letter-spacing: -.5px;
}

/* Nombre del jugador */
.hitter-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

/* Team badge */
.hitter-team {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

/* Etiqueta de métrica debajo de la stat */
.hitter-metric-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: rgba(255, 150, 50, .70);
  margin-top: -6px;
}

@media (max-width: 980px) {
  .topbar {
    flex-direction: column;
    align-items: stretch
  }

  .controls {
    grid-template-columns: 1fr;
    min-width: 0
  }

  .matchup__grid {
    grid-template-columns: 1fr
  }

  .matchup__grid {
    grid-template-columns: 1fr
  }

  .selector__search {
    width: 100%
  }

  .perf-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .perf-search-col {
    width: 100%;
  }

  .perf-player-hero {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .perf-player-img {
    width: 80px;
    height: 80px;
  }

  .perf-player-name {
    font-size: 22px;
  }

  .chart-top-controls {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .cards--summary {
    grid-template-columns: repeat(4, minmax(0, 1fr))
  }

  .cards--context {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }

  .cards--metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr))
  }

  .pred__grid {
    grid-template-columns: 1fr
  }
}

@media (max-width: 560px) {
  .app {
    width: calc(100% - 22px);
    margin: 18px auto 0
  }

  .cards--summary {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }

  .cards--metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }
}