@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root{
  /* Minimal dark */
  --bg0:#0B0F17;      /* page */
  --bg1:#0F1624;      /* surface */
  --bg2:#121B2C;      /* elevated surface */
  --stroke: rgba(255,255,255,.08);
  --stroke2: rgba(255,255,255,.12);

  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.62);
  --muted2: rgba(255,255,255,.42);

  /* ✅ Brand accent (verde logo / pro) */
  --accent:#34D399;   /* emerald 400 */
  --accent2:#22C55E;  /* green 500 */
  --danger:#EF4444;

  --r12:12px;
  --r14:14px;
  --r16:16px;
  --r20:20px;

  --shadow: 0 8px 24px rgba(0,0,0,.30);

  /* ✅ Focus ring verde */
  --ring: 0 0 0 3px rgba(52,211,153,.18), 0 0 0 1px rgba(52,211,153,.26);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, "Helvetica Neue", Arial;
  color: var(--text);
  background: var(--bg0);
}

/* Base */
.hidden{ display:none !important; }

/* Minimal card */
.card{
  background: var(--bg1);
  border: 1px solid var(--stroke);
  border-radius: var(--r20);
  box-shadow: none;
  backdrop-filter: none;
}

/* =========================
   FIX layout: comparar dentro del layout .app
   jugadores.css usa .content como grid 2 columnas
   ========================= */
.compareContent{
  display:block !important;
  grid-template-columns: 1fr !important;
  gap: 16px !important;
}

.compareContent > .card{
  width: 100%;
  grid-column: 1 / -1 !important;
}

.compareContent .pickCard,
.compareContent .resultCard{
  max-width: 1120px;
  margin-inline: auto;
}

/* =========================
   Buttons (minimal)
   ========================= */
.btn{
  border-radius: var(--r14);
  padding: 10px 14px;
  font-weight: 800;
  letter-spacing: .2px;
  cursor: pointer;
  border: 1px solid var(--stroke2);
  color: var(--text);
  background: transparent;
  transition: background .12s ease, border-color .12s ease, transform .12s ease, filter .12s ease;
}
.btn:hover{
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.16);
}
.btn:active{ transform: translateY(1px); }
.btn:disabled{ opacity:.55; cursor:not-allowed; transform:none; }

.btn.primary{
  background: var(--accent);
  border-color: transparent;
  color: #06120E;
}
.btn.primary:hover{
  filter: brightness(1.02);
}

/* =========================
   Pick Card
   ========================= */
.pickCard{ padding: 16px; }

.pickGrid{
  display:grid;
  grid-template-columns: 1fr 220px 1fr;
  gap: 16px;
  align-items:start;
}

.pickLabel{
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 900;
  letter-spacing: .5px;
  text-transform: uppercase;
}

/* Search box (minimal) */
.searchBox{
  display:flex;
  align-items:center;
  gap: 10px;
  background: var(--bg0);
  border: 1px solid var(--stroke2);
  border-radius: var(--r16);
  padding: 10px 10px;
  transition: border-color .12s ease, box-shadow .12s ease;
}

.searchBox input{
  width:100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}
.searchBox input::placeholder{
  color: rgba(255,255,255,.42);
  font-weight: 600;
}

.searchBox:focus-within{
  border-color: rgba(52,211,153,.35);
  box-shadow: var(--ring);
}

/* Clear button */
.iconBtn{
  width: 34px;
  height: 34px;
  border-radius: var(--r12);
  border: 1px solid var(--stroke2);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 18px;
  line-height: 0;
  transition: background .12s ease, border-color .12s ease, transform .12s ease;
}
.iconBtn:hover{
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.16);
}
.iconBtn:active{ transform: translateY(1px); }

/* Dropdown list (minimal, clean) */
.dropdown{
  margin-top: 8px;
  background: var(--bg1);
  border: 1px solid var(--stroke);
  border-radius: var(--r16);
  overflow: hidden;
  display: none;
  max-height: 320px;
  overflow-y: auto;
}
.dropdown.open{ display:block; }

.ddItem{
  display:flex;
  gap: 10px;
  align-items:center;
  padding: 10px 12px;
  cursor:pointer;
  border-top: 1px solid rgba(255,255,255,.06);
}
.ddItem:first-child{ border-top:none; }
.ddItem:hover{ background: rgba(255,255,255,.03); }

.ddLogo{
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  object-fit: contain;
}
.ddName{ font-weight: 900; font-size: 13px; }
.ddMeta{ font-size: 12px; color: var(--muted); font-weight: 600; }

/* Selected mini */
.miniSelected{ margin-top: 10px; min-height: 52px; }
.miniCard{
  display:flex;
  gap: 10px;
  align-items:center;
  padding: 10px 12px;
  border-radius: var(--r16);
  border: 1px solid rgba(255,255,255,.08);
  background: var(--bg0);
}

.avatar{
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
}
.miniText .name{ font-weight: 900; }
.miniText .sub{ font-size: 12px; color: var(--muted); font-weight: 600; }

.teamLine{ display:flex; align-items:center; gap: 8px; }
.teamLine img{ width:18px;height:18px;border-radius:6px;object-fit:contain; }

/* Middle column */
.midCol{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap: 10px;
  padding: 8px 0;
}
.vs{
  font-weight: 950;
  font-size: 12px;
  letter-spacing: .6px;
  color: rgba(255,255,255,.78);
  text-transform: uppercase;
}
.hint{
  font-size: 12px;
  color: var(--muted);
  text-align:center;
  max-width: 210px;
  line-height: 1.35;
}

/* =========================
   Results
   ========================= */
.resultCard{ margin-top: 16px; padding: 16px; }
.resultHeaderFlex{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.resultTitle{ font-weight: 950; font-size: 16px; }
.resultSub{ font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 600; }

/* Mode box */
.modeBox{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r16);
  border: 1px solid var(--stroke);
  background: var(--bg0);
}
.modeTxt{
  font-size: 12px;
  color: rgba(255,255,255,.72);
  font-weight: 900;
}

/* Switch (minimal) */
.switch{
  position:relative;
  width:46px;
  height:26px;
  display:inline-block;
}
.switch input{ display:none; }
.slider{
  position:absolute; inset:0;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  cursor:pointer;
  transition: .18s ease;
}
.slider::after{
  content:"";
  position:absolute;
  top:3px; left:3px;
  width:20px; height:20px;
  border-radius:999px;
  background: rgba(255,255,255,.88);
  transition:.18s ease;
}
.switch input:checked + .slider{
  background: rgba(52,211,153,.18);
  border-color: rgba(52,211,153,.30);
}
.switch input:checked + .slider::after{
  transform: translateX(20px);
  background: rgba(255,255,255,.94);
}

/* Panels */
.panels{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.panel{
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--r16);
  background: var(--bg1);
  padding: 12px;
}

/* KPI grid */
.kpis{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.kpi{
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--r14);
  background: var(--bg0);
  padding: 10px;
}
.kpi .lab{
  font-size: 11px;
  color: var(--muted);
  font-weight: 900;
  letter-spacing: .4px;
  text-transform: uppercase;
}
.kpi .val{
  font-size: 18px;
  font-weight: 950;
  margin-top: 4px;
}

/* Radar row */
.radarRow{
  display:grid;
  grid-template-columns: 460px 1fr;
  gap: 14px;
}

.radarCard,.tableCard{
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--r16);
  background: var(--bg1);
  padding: 12px;
}
.radarTitle,.tableTitle{ font-weight: 950; margin-bottom: 8px; }
#radar{ width:100%; height:auto; display:block; }

.radarLegend{
  display:flex; gap: 10px; flex-wrap:wrap;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.legendDot{ width:10px;height:10px;border-radius:999px;display:inline-block;margin-right:6px; }

/* Table minimal */
.metricsWrap{
  display:block;
  width:100%;
  overflow:auto;
  max-height: 520px;
  border-radius: var(--r16);
}
.metrics{
  width:100%;
  border-collapse:collapse;
  font-size: 13px;
}
.metrics th,.metrics td{
  padding: 11px 10px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  text-align:left;
}
.metrics th{
  color: var(--muted);
  font-weight: 950;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.metrics tbody tr:hover{ background: rgba(255,255,255,.02); }

.metrics td.val{ font-weight: 900; }
.metrics td.small{ color: var(--muted); font-weight: 700; }

/* Winner highlight (minimal) */
.metrics td.val.win{
  background: rgba(52,211,153,.12);
  box-shadow: inset 0 0 0 1px rgba(52,211,153,.18);
  border-radius: 12px;
  padding: 12px 14px;
}
.metrics td.val.lose{
  background: rgba(255,255,255,.03);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
  border-radius: 12px;
  padding: 12px 14px;
}
.metrics td.val.tie{
  background: rgba(255,255,255,.03);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
  border-radius: 12px;
  padding: 12px 14px;
}

.badgeWin{
  display:inline-block;
  margin-right: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .4px;
  color: rgba(255,255,255,.92);
  background: rgba(52,211,153,.14);
  border: 1px solid rgba(52,211,153,.18);
}

/* Focus visible */
:where(button, a, input, select, textarea):focus-visible{
  outline:none;
  box-shadow: var(--ring);
}

/* Responsive */
@media (max-width: 980px){
  .pickGrid{ grid-template-columns: 1fr; gap: 12px; }
  .midCol{ flex-direction: row; justify-content: space-between; width: 100%; }
  .panels{ grid-template-columns: 1fr; }
  .radarRow{ grid-template-columns: 1fr; }
  .compareContent .pickCard,
  .compareContent .resultCard{ max-width: 100%; }
}

/* =========================
   FIX SELECT BLANCO (Comparar) — dark + pro
   ========================= */

/* Select dentro de cards/resumen */
.content select,
.card select,
.profileGrid select,
.compare select,
.comparePage select,
.resumen select{
  -webkit-appearance: none;
  appearance: none;

  height: 34px;
  padding: 0 36px 0 10px; /* espacio para flecha */
  border-radius: 10px;

  background: rgba(0,0,0,.22);
  color: rgba(255,255,255,.92);

  border: 1px solid rgba(255,255,255,.10);
  outline: none;

  font-weight: 800;
  font-size: 12px;
  line-height: 1;

  /* flecha */
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255,255,255,.70) 50%),
    linear-gradient(135deg, rgba(255,255,255,.70) 50%, transparent 50%),
    linear-gradient(to right, transparent, transparent);
  background-position:
    calc(100% - 16px) 55%,
    calc(100% - 11px) 55%,
    0 0;
  background-size: 6px 6px, 6px 6px, 100% 100%;
  background-repeat: no-repeat;
}

/* Hover / Focus */
.content select:hover,
.card select:hover{
  border-color: rgba(255,255,255,.14);
  background: rgba(0,0,0,.26);
}

.content select:focus,
.card select:focus{
  border-color: rgba(52,211,153,.35);
  box-shadow: 0 0 0 3px rgba(52,211,153,.18), 0 0 0 1px rgba(52,211,153,.26);
}

/* Opciones del dropdown (importante: evita blanco al abrir) */
.content select option,
.card select option{
  background: #0F1624;
  color: rgba(255,255,255,.92);
}

/* En algunos browsers el “cuadrado blanco” es el fondo del select al estar deshabilitado */
.content select:disabled,
.card select:disabled{
  opacity: .7;
  cursor: not-allowed;
}

/* Safari/Chrome: quita highlight raro */
.content select::-ms-expand{ display:none; }
