/* ============================================================================
   team_select_styles.css — SELECTOR DE EQUIPOS · PARTIDO RÁPIDO
   Rediseño visual AAA: sin neón, bordes suaves y semitransparentes, tarjetas
   compactas (400px) y jerarquía tipográfica clara:
       liga pequeña en gris  →  equipo grande en blanco  →  stats al pie.
   ========================================================================== */

.f2-overlay {
  position: fixed; inset: 0; z-index: 10020;
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column; overflow: hidden;
  color: #f2f2f4;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(1200px 620px at 50% -18%, rgba(255, 255, 255, 0.055), transparent 62%),
    radial-gradient(900px 520px at 50% 118%, rgba(255, 255, 255, 0.03), transparent 60%),
    linear-gradient(180deg, #101014 0%, #0b0b0e 55%, #08080a 100%);
  animation: f2-in .2s ease-out;
}
@keyframes f2-in { from { opacity: 0; } to { opacity: 1; } }

/* ---- topbar ---- */
.f2-top {
  flex: 0 0 auto; position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: 20px 18px 12px;
}
.f2-title {
  font-weight: 800; letter-spacing: .34em; font-size: clamp(12px, 1.5vw, 15px);
  text-transform: uppercase; color: rgba(255, 255, 255, 0.88);
}
.f2-menu {
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  padding: 6px 12px; border-radius: 8px; cursor: pointer;
  font-weight: 700; font-size: 10px; letter-spacing: .14em;
  color: rgba(255, 255, 255, 0.45);
  background: transparent; border: 1px solid rgba(255, 255, 255, 0.12);
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}
.f2-menu:hover {
  color: #fff; border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.05);
}

/* ---- main : dos tarjetas centradas + columna central ---- */
.f2-main {
  flex: 1 1 auto; min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(150px, 13vw, 200px) minmax(0, 1fr);
  gap: clamp(16px, 2.4vw, 40px);
  padding: 8px clamp(16px, 3vw, 48px) clamp(16px, 3vh, 32px);
  align-items: center;
  justify-items: center;
}

/* ── centro: dificultad · VS · JUGAR ── */
.f2-mid {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(14px, 2vh, 26px); width: 100%; min-height: 0;
}
.f2-diff { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.f2-diffbtn {
  padding: 10px 12px; border-radius: 10px; cursor: pointer;
  font-weight: 600; font-size: 11px; letter-spacing: .06em; text-align: center;
  color: rgba(255, 255, 255, 0.42);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: color .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.f2-diffbtn:hover:not(.on) {
  color: rgba(255, 255, 255, 0.78);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
}
.f2-diffbtn.on {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}
.f2-vs { display: flex; align-items: center; justify-content: center; }
.f2-vs b {
  width: clamp(56px, 7vmin, 72px); height: clamp(56px, 7vmin, 72px);
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-weight: 800; font-size: clamp(14px, 1.8vmin, 18px); letter-spacing: .06em;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: none;
}
.f2-play {
  width: 100%; padding: clamp(12px, 1.7vh, 17px) 12px;
  border: 0; border-radius: 12px; cursor: pointer;
  font-weight: 800; font-size: clamp(11.5px, 1vw, 13px);
  letter-spacing: .16em; text-transform: uppercase;
  color: #0b0b0e; background: #ffffff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  transition: background .16s ease, box-shadow .16s ease, transform .1s ease, opacity .16s ease;
}
.f2-play:hover:not(:disabled) { background: #ededf0; box-shadow: 0 8px 26px rgba(0, 0, 0, 0.55); }
.f2-play:active:not(:disabled) { transform: translateY(1px); }
.f2-play:disabled { opacity: .26; cursor: not-allowed; box-shadow: none; }
/* sin pulso neón: el CTA ya se lee por contraste puro */
.f2-play.ready { animation: none; }
.f2-play.ready::before { content: none; }

/* ============================================================================
   TARJETA DE EQUIPO
   ========================================================================== */
.f2-card {
  position: relative;
  width: 100%;
  /* Fluido: antes estaba clavado en 400 px y en un monitor grande el cuadro
     quedaba diminuto con medio metro libre a cada lado. Crece con el
     viewport y se frena en 760 px para no perder la forma de tarjeta. */
  max-width: clamp(400px, 40vw, 760px);
  max-height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  padding: clamp(14px, 2vh, 20px) clamp(16px, 1.6vw, 22px) clamp(14px, 2vh, 18px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.028);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
/* tarjeta activa: resplandor sutil + borde semitransparente (sin flúor) */
.f2-card.active {
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.1), 0 18px 44px rgba(0, 0, 0, 0.45);
}
.f2-card.active::after { content: none; }

/* ── PESTAÑAS (navegación principal, arriba) ── */
.f2-tabs {
  width: 100%;
  flex: 0 0 auto;
  display: flex; align-items: flex-end; justify-content: center;
  gap: clamp(18px, 2vw, 28px);
  margin-bottom: clamp(12px, 1.8vh, 18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.f2-tabs button {
  position: relative;
  flex: 0 0 auto;
  padding: 4px 2px 10px;
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  font-weight: 700;
  font-size: clamp(9.5px, 0.9vw, 11px);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  box-shadow: none;
  transition: color .16s ease;
}
.f2-tabs button:hover { color: rgba(255, 255, 255, 0.72); background: transparent; }
/* activa: texto blanco puro + línea inferior brillante (sin bloque blanco) */
.f2-tabs button.on { color: #ffffff; background: transparent; }
.f2-tabs button.on::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  border-radius: 2px;
  background: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.55);
}

/* ── CABECERA: selector de liga ── */
.f2-head {
  width: 100%;
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 0 clamp(12px, 1.8vh, 18px);
  margin: 0;
  background: transparent;
  border: 0;
  color: #aaa;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity .16s ease;
}
.f2-head:hover { opacity: .82; }
.f2-head.static { cursor: default; }
.f2-head.static:hover { opacity: 1; }
.f2-head.static .f2-lgc { display: none; }
/* jerarquía tipográfica 1: liga pequeña, gris claro */
.f2-headname {
  min-width: 0;
  font-weight: 600;
  font-size: clamp(9.5px, 0.85vw, 11px);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #aaaaaa;
  overflow: hidden;
  text-overflow: ellipsis;
}
.f2-flag { flex: 0 0 auto; display: flex; align-items: center; }
.f2-flag img, .f2-flag svg {
  height: 14px; max-width: 22px;
  object-fit: contain; border-radius: 2px;
  opacity: .85;
}
.f2-lgc {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; padding: 0;
  font-size: 13px; font-weight: 700; line-height: 1;
  color: rgba(255, 255, 255, 0.35);
  background: transparent; border: 0; border-radius: 5px;
  cursor: pointer;
  transition: color .14s ease, background .14s ease;
}
.f2-lgc:hover { color: #fff; background: rgba(255, 255, 255, 0.07); }

/* ── CUERPO: centrado vertical, contenido estable ── */
.f2-body {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 1.8vh, 18px);
  padding: 0;
  text-align: center;
}

/* selector de equipo: flechas + nombre agrupados y centrados */
.f2-tname-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
/* jerarquía tipográfica 2: el equipo es el texto más grande y audaz */
.f2-tname {
  flex: 0 1 auto;
  min-width: 0;
  font-weight: 800;
  font-size: clamp(20px, 2.5vw, 30px);
  line-height: 1.12;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: #ffffff;
  text-align: center;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}
.f2-arr {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; line-height: 1;
  color: rgba(255, 255, 255, 0.55);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  cursor: pointer;
  transition: color .14s ease, background .14s ease, border-color .14s ease, transform .1s ease;
}
.f2-arr:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
}
.f2-arr:active { transform: scale(.94); }

/* escudo */
.f2-crest { display: flex; align-items: center; justify-content: center; }
.f2-crest img, .f2-crest svg {
  width: clamp(80px, 11vmin, 108px);
  height: auto;
  max-height: clamp(80px, 11vmin, 108px);
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.5));
  transition: transform .18s ease;
}
.f2-card.active .f2-crest img,
.f2-card.active .f2-crest svg { transform: scale(1.04); }

/* estrellas */
.f2-stars { display: flex; justify-content: center; }
.f2-stars-row { display: flex; gap: 4px; }
.f2-stars i { font-style: normal; font-size: 12px; color: rgba(255, 255, 255, 0.16); }
.f2-stars i.on { color: #f5c451; }

/* jerarquía tipográfica 3: stats en flex, bien distribuidas, al pie */
.f2-lnums {
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: clamp(8px, 1.4vh, 14px);
  padding-top: clamp(10px, 1.6vh, 14px);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.f2-lnums div {
  flex: 1 1 0;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.f2-lnums span {
  font-size: 9.5px; font-weight: 700; letter-spacing: 1px;
  color: #8a8a92; text-transform: uppercase;
}
.f2-lnums b {
  font-size: clamp(17px, 1.5vw, 21px);
  font-weight: 800; line-height: 1; color: #ffffff;
  font-variant-numeric: tabular-nums;
}

/* ============================================================================
   DESKTOP GRANDE (≥ 1600 px) — el cuadro crece con la pantalla
   Antes la tarjeta se quedaba clavada en 400 px: a 1920 sobraba casi medio
   metro a cada lado y el escudo seguía a 108 px, así que el equipo elegido
   se veía diminuto en el centro de un monitor grande. Escala todo el bloque
   (tarjeta, escudo, nombre y stats) en la misma proporción.
   ========================================================================== */
@media (min-width: 1600px) {
  .f2-card { max-width: 760px; }
  .f2-tabs button { font-size: 12px; letter-spacing: 1.6px; padding: 6px 3px 12px; }
  .f2-headname { font-size: 12px; }
  .f2-flag img, .f2-flag svg { height: 18px; max-width: 28px; }
  .f2-lgc { width: 24px; height: 24px; font-size: 16px; }
  .f2-tname { font-size: clamp(30px, 2.1vw, 42px); }
  .f2-arr { width: 40px; height: 40px; font-size: 15px; }
  .f2-crest img, .f2-crest svg {
    width: clamp(140px, 15vmin, 176px);
    max-height: clamp(140px, 15vmin, 176px);
  }
  .f2-stars i { font-size: 15px; }
  .f2-stars-row { gap: 6px; }
  .f2-lnums span { font-size: 11px; letter-spacing: 1.4px; }
  .f2-lnums b { font-size: clamp(34px, 2.4vw, 44px); }
}

/* ---- responsive ---- */
@media (max-width: 900px) {
  .f2-main {
    grid-template-columns: minmax(0, 1fr) 84px minmax(0, 1fr);
    gap: 10px;
    padding: 6px 12px 14px;
  }
  .f2-card { max-width: 100%; padding: 12px 12px 14px; border-radius: 14px; }
  .f2-tabs { gap: 14px; margin-bottom: 10px; }
  .f2-tabs button { font-size: 9px; letter-spacing: 1px; padding: 3px 1px 8px; }
  .f2-head { padding-bottom: 10px; gap: 6px; }
  .f2-headname { font-size: 9px; letter-spacing: .6px; }
  .f2-body { gap: 9px; }
  .f2-tname { font-size: clamp(14px, 4vw, 20px); }
  .f2-arr { width: 24px; height: 24px; font-size: 10px; }
  .f2-crest img, .f2-crest svg { width: 62px; max-height: 62px; }
  .f2-stars i { font-size: 10px; }
  .f2-lnums { gap: 6px; padding-top: 8px; margin-top: 6px; }
  .f2-lnums span { font-size: 8px; letter-spacing: .6px; }
  .f2-lnums b { font-size: 16px; }
  .f2-diff { gap: 5px; }
  .f2-diffbtn { font-size: 9.5px; padding: 7px 4px; }
  .f2-vs b { width: 46px; height: 46px; font-size: 12px; }
  .f2-play { font-size: 10px; padding: 10px 6px; letter-spacing: .1em; }
}

@media (max-width: 620px) {
  .f2-main {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "home away" "mid mid";
    gap: 8px;
  }
  .f2-main > .f2-card:nth-of-type(1) { grid-area: home; }
  .f2-main > .f2-card:nth-of-type(2) { grid-area: away; }
  .f2-mid { grid-area: mid; flex-direction: row; align-items: center; gap: 10px; }
  .f2-diff { flex-direction: row; gap: 6px; }
  .f2-diffbtn { flex: 1 1 0; font-size: 8.5px; padding: 8px 2px; }
  .f2-vs { display: none; }
  .f2-play { flex: 0 0 40%; }
}
