/* =====================================================
   VCF STATS — DESIGN SYSTEM v2
   Valencia CF identity: Senyera · Murciélago · Mestalla
   Dirección de arte: Cartelería Vintage · Póster · Serigrafía
   ===================================================== */

/* Font loading in CSS is render-blocking — moved to <link> in _head_meta.html.
   This @import remains as fallback for standalone template usage. */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');
@import url('https://api.fontshare.com/v2/css?f[]=cabinet-grotesk@400,500,600,700,800,900&display=swap');

/* ── Variables ── */
:root {
  /* ── Typography tokens ── */
  --font-display:   'Bebas Neue', sans-serif;
  --font-condensed: 'Cabinet Grotesk', sans-serif;
  --font-body:      'Cabinet Grotesk', sans-serif;

  /* ── Primary palette ── */
  --orange:       #FF6600;
  --orange-dim:   rgba(255,102,0,0.12);
  --orange-glow:  rgba(255,102,0,0.25);

  /* Senyera */
  --senyera-red:  #C8102E;
  --senyera-yel:  #FFCD00;
  --senyera-yel-dim: rgba(255,205,0,0.10);

  /* Backgrounds */
  --bg-void:   #080808;
  --bg-base:   #0e0e0e;
  --bg-card:   #111111;
  --bg-card2:  #141414;
  --bg-input:  #181818;
  --bg-hover:  #1c1c1c;

  /* Borders */
  --border:    #1e1e1e;
  --border-hi: #2a2a2a;

  /* Text */
  --txt:       #f0f0f0;
  --txt-muted: rgba(255,255,255,0.38);
  --txt-sub:   rgba(255,255,255,0.55);

  /* Semantic */
  --green:     #22c55e;
  --green-dim: rgba(34,197,94,0.12);
  --red-loss:  #ef4444;
  --red-dim:   rgba(239,68,68,0.12);
  --amber:     #f59e0b;
  --amber-dim: rgba(245,158,11,0.12);

  /* Spacing */
  --radius:    10px;
  --radius-sm: 6px;
  --radius-lg: 14px;

  /* ── GS Components palette ── */
  --gs-bg:         #111110;
  --gs-surface:    #1c1c1a;
  --gs-surface2:   #242422;
  --gs-border:     rgba(255,255,255,0.07);
  --gs-border-hi:  rgba(255,255,255,0.13);
  --gs-txt:        #f0ede8;
  --gs-txt-muted:  rgba(240,237,232,0.45);
  --gs-txt-sub:    rgba(240,237,232,0.65);
  --gs-accent:     #FF6600;
  --gs-accent-dim: rgba(255,102,0,0.15);
  --gs-green:      #3ddc84;
  --gs-green-dim:  rgba(61,220,132,0.14);
  --gs-red:        #ff5252;
  --gs-red-dim:    rgba(255,82,82,0.14);
  --gs-amber:      #ffb830;
  --gs-amber-dim:  rgba(255,184,48,0.14);
  --gs-radius:     8px;
  --gs-radius-sm:  5px;

  /* ── Poster / Decorative tokens (hero, vintage, export cards only) ── */
  --naranja:       #E85D04;
  --naranja-dark:  #C44B00;
  --negro-tinta:   #1A1A1A;
  --blanco-roto:   #F4F0EB;
  --crema:         #E8E4DC;
  --senyera-yel-v: #FFD700;
  --senyera-red-v: #CC0000;
  --azul-rey:      #0077C8;
  --oro:           #B8860B;
  --shadow-hard:          4px 4px 0px var(--negro-tinta);
  --shadow-hard-lg:       6px 6px 0px var(--negro-tinta);
  --shadow-hard-naranja:  4px 4px 0px var(--naranja-dark);

  /* ── Animation tokens (Emil Kowalski principles) ── */
  --ease-out:   cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in:    cubic-bezier(0.55, 0, 1, 0.45);
  --dur-micro:  150ms;
  --dur-fast:   220ms;
  --dur-base:   280ms;
  --stagger:    55ms;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  background: var(--bg-void);
  color: var(--txt);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════════════════════════════
   ANIMATION SYSTEM
   Emil Kowalski principles:
   · scale(0.97) not scale(0) — never fully disappear
   · <280ms duration — snappy, not sluggish
   · custom ease-out — cubic-bezier(0.23,1,0.32,1)
   · stagger 55ms between siblings
   · :active scale on all interactive elements
   · @media (hover:hover) for all hover states
   · prefers-reduced-motion always respected
   ══════════════════════════════════════════════════ */

@keyframes vcfFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes vcfCardIn {
  from { opacity: 0; transform: translateY(6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}
@keyframes vcfSlideRight {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Utility classes — use with --vcf-i for stagger ── */
.vcf-fade-up {
  animation: vcfFadeUp var(--dur-fast) var(--ease-out) calc(var(--vcf-i, 0) * var(--stagger)) both;
}
.vcf-card-in {
  animation: vcfCardIn var(--dur-fast) var(--ease-out) calc(var(--vcf-i, 0) * var(--stagger)) both;
}
.vcf-slide-right {
  animation: vcfSlideRight var(--dur-fast) var(--ease-out) calc(var(--vcf-i, 0) * var(--stagger)) both;
}

/* ── Page title: subtle fade-up ── */
.page-title {
  animation: vcfFadeUp var(--dur-fast) var(--ease-out) 30ms both;
}

/* ── Bento items: stagger by position ── */
.bento-item:nth-child(1) { animation: vcfCardIn 230ms var(--ease-out)  40ms both; }
.bento-item:nth-child(2) { animation: vcfCardIn 230ms var(--ease-out)  95ms both; }
.bento-item:nth-child(3) { animation: vcfCardIn 230ms var(--ease-out) 150ms both; }
.bento-item:nth-child(4) { animation: vcfCardIn 230ms var(--ease-out) 205ms both; }
.bento-item:nth-child(5) { animation: vcfCardIn 230ms var(--ease-out) 260ms both; }
.bento-item:nth-child(6) { animation: vcfCardIn 230ms var(--ease-out) 315ms both; }

/* ── GS Cards as direct siblings: stagger via nth-child ── */
/* Sidebar containers — any layout with *-sidebar or *-layout */
.cls-sidebar > .gs-card:nth-child(1),
.les-sidebar > .gs-card:nth-child(1),
.arb-sidebar > .gs-card:nth-child(1),
.vm-sidebar  > .gs-card:nth-child(1),
.h2h-layout  > *:nth-child(1) { animation: vcfCardIn 230ms var(--ease-out)  60ms both; }

.cls-sidebar > .gs-card:nth-child(2),
.les-sidebar > .gs-card:nth-child(2),
.arb-sidebar > .gs-card:nth-child(2),
.vm-sidebar  > .gs-card:nth-child(2) { animation: vcfCardIn 230ms var(--ease-out) 115ms both; }

.cls-sidebar > .gs-card:nth-child(3),
.les-sidebar > .gs-card:nth-child(3),
.arb-sidebar > .gs-card:nth-child(3),
.vm-sidebar  > .gs-card:nth-child(3) { animation: vcfCardIn 230ms var(--ease-out) 170ms both; }

.cls-sidebar > .gs-card:nth-child(4),
.les-sidebar > .gs-card:nth-child(4),
.arb-sidebar > .gs-card:nth-child(4),
.vm-sidebar  > .gs-card:nth-child(4) { animation: vcfCardIn 230ms var(--ease-out) 225ms both; }

/* Main content block (always after sidebar) */
.cls-main, .les-main, .arb-layout > *:last-child,
.vm-layout > *:last-child { animation: vcfFadeUp 260ms var(--ease-out) 100ms both; }

/* ── Player cards in scouting grid ── */
.bento-grid > .player-card:nth-child(1)  { animation: vcfCardIn 220ms var(--ease-out)  50ms both; }
.bento-grid > .player-card:nth-child(2)  { animation: vcfCardIn 220ms var(--ease-out) 100ms both; }
.bento-grid > .player-card:nth-child(3)  { animation: vcfCardIn 220ms var(--ease-out) 150ms both; }
.bento-grid > .player-card:nth-child(4)  { animation: vcfCardIn 220ms var(--ease-out) 200ms both; }
.bento-grid > .player-card:nth-child(5)  { animation: vcfCardIn 220ms var(--ease-out) 250ms both; }
.bento-grid > .player-card:nth-child(6)  { animation: vcfCardIn 220ms var(--ease-out) 300ms both; }
.bento-grid > .player-card:nth-child(7)  { animation: vcfCardIn 220ms var(--ease-out) 350ms both; }
.bento-grid > .player-card:nth-child(8)  { animation: vcfCardIn 220ms var(--ease-out) 400ms both; }
.bento-grid > .player-card:nth-child(n+9){ animation: vcfCardIn 220ms var(--ease-out) 440ms both; }

/* ── Scouting jugador profile — hero stats stagger ── */
.sj-hero-grid > *:nth-child(1) { animation: vcfCardIn 220ms var(--ease-out)  60ms both; }
.sj-hero-grid > *:nth-child(2) { animation: vcfCardIn 220ms var(--ease-out) 110ms both; }
.sj-hero-grid > *:nth-child(3) { animation: vcfCardIn 220ms var(--ease-out) 160ms both; }
.sj-hero-grid > *:nth-child(4) { animation: vcfCardIn 220ms var(--ease-out) 210ms both; }

/* ── Generic .page > .sidebar + .main layout ── */
/* Used by h2h, tactica, tendencia, racha_jugador, shot_map  */
.layout > .main,
.page   > .main,
.sin-main { animation: vcfFadeUp 260ms var(--ease-out) 100ms both; }

/* ── Page header blocks (scouting-comparar, formacion, disciplina) ── */
.page-header,
.page-wrap > .page-header { animation: vcfFadeUp 220ms var(--ease-out) 20ms both; }

/* .header-title inside page-header (scouting-comparar) */
.page-header .header-title { animation: vcfFadeUp 220ms var(--ease-out) 50ms both; }
.page-header .header-sub   { animation: vcfFadeUp 220ms var(--ease-out) 80ms both; }

/* ── Formacion card (static) ── */
.formation-card { animation: vcfCardIn 250ms var(--ease-out) 80ms both; }

/* ── Disciplina chips stagger ── */
.disc-chips > .disc-chip:nth-child(1) { animation: vcfCardIn 220ms var(--ease-out)  80ms both; }
.disc-chips > .disc-chip:nth-child(2) { animation: vcfCardIn 220ms var(--ease-out) 130ms both; }
.disc-chips > .disc-chip:nth-child(3) { animation: vcfCardIn 220ms var(--ease-out) 180ms both; }
.disc-chips > .disc-chip:nth-child(4) { animation: vcfCardIn 220ms var(--ease-out) 230ms both; }

/* ── Director Deportivo bento cells ── */
main.bento-grid > .bento-cell:nth-child(1) { animation: vcfCardIn 230ms var(--ease-out)  60ms both; }
main.bento-grid > .bento-cell:nth-child(2) { animation: vcfCardIn 230ms var(--ease-out) 120ms both; }
main.bento-grid > .bento-cell:nth-child(3) { animation: vcfCardIn 230ms var(--ease-out) 180ms both; }
main.bento-grid > .bento-cell:nth-child(4) { animation: vcfCardIn 230ms var(--ease-out) 240ms both; }

/* ── Home Landing sidebar sections ── */
.sidebar-header  { animation: vcfFadeUp 220ms var(--ease-out)  30ms both; }
.sidebar-nav     { animation: vcfFadeUp 240ms var(--ease-out)  80ms both; }
.sidebar-players { animation: vcfFadeUp 240ms var(--ease-out) 140ms both; }
.sidebar-footer  { animation: vcfFadeUp 240ms var(--ease-out) 190ms both; }

/* Nav items stagger inside sidebar-nav */
.sidebar-nav .nav-item:nth-child(1)  { animation: vcfFadeUp 200ms var(--ease-out)  90ms both; }
.sidebar-nav .nav-item:nth-child(2)  { animation: vcfFadeUp 200ms var(--ease-out) 130ms both; }
.sidebar-nav .nav-item:nth-child(3)  { animation: vcfFadeUp 200ms var(--ease-out) 170ms both; }
.sidebar-nav .nav-item:nth-child(4)  { animation: vcfFadeUp 200ms var(--ease-out) 210ms both; }
.sidebar-nav .nav-item:nth-child(5)  { animation: vcfFadeUp 200ms var(--ease-out) 250ms both; }
.sidebar-nav .nav-item:nth-child(6)  { animation: vcfFadeUp 200ms var(--ease-out) 290ms both; }
.sidebar-nav .nav-item:nth-child(n+7){ animation: vcfFadeUp 200ms var(--ease-out) 320ms both; }

/* ── Senyera stripe — signature motif ── */
/* Usage: add class="senyera-top" to any card */
.senyera-top {
  border-top: none !important;
  position: relative;
}
.senyera-top::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    var(--senyera-red)  0px,
    var(--senyera-red)  25%,
    var(--senyera-yel)  25%,
    var(--senyera-yel)  50%,
    var(--senyera-red)  50%,
    var(--senyera-red)  75%,
    var(--senyera-yel)  75%,
    var(--senyera-yel)  100%
  );
  border-radius: var(--radius) var(--radius) 0 0;
}

/* ── Typography ── */
.font-cond { font-family: var(--font-condensed); }

.kpi-giant {
  font-family: var(--font-condensed);
  font-weight: 900;
  font-size: clamp(48px, 6vw, 80px);
  line-height: 1;
  letter-spacing: -2px;
  color: var(--orange);
}
.kpi-big {
  font-family: var(--font-condensed);
  font-weight: 900;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1;
  letter-spacing: -1px;
  color: var(--orange);
}
.kpi-num {
  font-family: var(--font-condensed);
  font-weight: 900;
  font-size: 26px;
  letter-spacing: -0.5px;
}
.kpi-yellow { color: var(--senyera-yel); }
.kpi-red    { color: var(--senyera-red); }

.label-eyebrow {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--txt-muted);
}
.label-section {
  font-family: var(--font-condensed);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--txt-muted);
}
.page-sup {
  font-family: var(--font-condensed);
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1px;
  color: var(--orange);
  margin-bottom: 4px;
}
.page-title {
  font-family: var(--font-condensed);
  font-weight: 900;
  font-size: clamp(32px, 4.5vw, 52px);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--txt);
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-body { padding: 20px; }
.card-orange-top { border-top: 3px solid var(--orange); }

/* Bento card variants */
.card-dark  { background: var(--bg-base); }
.card-void  { background: var(--bg-void); }

/* ── KPI Card ── */
.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.2s;
}
.kpi-card:hover { border-color: var(--border-hi); }
.kpi-card .value {
  font-family: var(--font-condensed);
  font-weight: 900;
  font-size: 38px;
  line-height: 1;
  letter-spacing: -1px;
  color: var(--orange);
}
.kpi-card .value.yellow { color: var(--senyera-yel); }
.kpi-card .value.red    { color: var(--senyera-red); }
.kpi-card .value.white  { color: var(--txt); }
.kpi-card .kpi-label {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--txt-muted);
}
.kpi-card .kpi-sub {
  font-size: 16px;
  color: var(--txt-sub);
  margin-top: 4px;
}
.kpi-card .kpi-bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 8px;
}
.kpi-card .kpi-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--orange);
}

/* ── Bento Grid ── */
.bento {
  display: grid;
  gap: 14px;
}
.bento-2 { grid-template-columns: 1fr 1fr; }
.bento-3 { grid-template-columns: 1fr 1fr 1fr; }
.bento-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.bento-3-1 { grid-template-columns: 3fr 1fr; }
.bento-1-2 { grid-template-columns: 1fr 2fr; }
.bento-2-1 { grid-template-columns: 2fr 1fr; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-full { grid-column: 1 / -1; }

/* ── Page layout ── */
.page-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
}
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.page-header-left {}
.page-header .subtitle {
  font-size: 16px;
  color: var(--txt-muted);
  margin-top: 4px;
}

/* Sidebar layout */
.layout-sidebar {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.sidebar { flex: 0 0 220px; }
.main-col { flex: 1; min-width: 0; }

/* ── Panel / sidebar panel ── */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}
.panel-title {
  font-family: var(--font-condensed);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--txt-muted);
  margin-bottom: 12px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-condensed);
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background-color 150ms ease-out, color 150ms ease-out,
              border-color 150ms ease-out, opacity 150ms ease-out,
              transform 150ms ease-out, filter 150ms ease-out;
  text-decoration: none;
}
.btn-primary { background: var(--orange); color: var(--negro-tinta); }
.btn-primary:hover { filter: brightness(1.1); }
.btn:active { transform: scale(0.97); }
.btn:active .btn-icon { transform: scale(1); }
.btn-ghost {
  background: var(--bg-input);
  color: var(--txt-sub);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--txt); border-color: var(--border-hi); }
.btn-ghost.active { background: var(--orange); color: #000; border-color: var(--orange); }
.btn-sm { font-size: 16px; padding: 5px 10px; min-height: 44px; }
.btn-lg { font-size: 15px; padding: 10px 20px; min-height: 44px; }
.btn-block { width: 100%; justify-content: center; }

/* Toggle row */
.toggle-row {
  display: flex;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.toggle-row .btn {
  border-radius: 0;
  border: none;
  background: none;
  flex: 1;
  justify-content: center;
}
.toggle-row .btn.active { background: var(--orange); color: #000; }
.toggle-row .btn:hover:not(.active) { color: var(--txt); }

/* ── Form inputs ── */
.input, .select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--txt);
  font-family: var(--font-body);
  font-size: 16px;
  padding: 8px 10px;
  width: 100%;
  outline: none;
  transition: border-color 0.15s;
}
.input:focus, .select:focus { border-color: var(--orange); }
.input::placeholder { color: var(--txt-muted); }
.form-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.form-label {
  font-size: 15px;
  color: var(--txt-muted);
  font-weight: 600;
  min-width: 50px;
}

/* ── Tables ── */
.vcf-table {
  width: 100%;
  border-collapse: collapse;
}
.vcf-table th {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  color: var(--txt-muted);
  font-weight: 700;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  text-align: center;
  font-family: var(--font-body);
}
.vcf-table th.left { text-align: left; }
.vcf-table td {
  padding: 9px 8px;
  font-size: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  text-align: center;
}
.vcf-table td.left { text-align: left; }
.vcf-table tr.vcf-row { background: var(--orange-dim); }
.vcf-table tr.vcf-row td { font-weight: 700; }
.vcf-table tr:hover td { background: var(--bg-hover); }
.vcf-table tr.vcf-row:hover td { background: rgba(255,102,0,0.18); }

/* Table scroll wrapper — sticky columns en móvil */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  min-width: 0;
}

/* ── Tags / Badges ── */
.tag {
  display: inline-block;
  font-family: var(--font-condensed);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1px;
  padding: 3px 8px;
  border-radius: 3px;
}
.tag-orange { background: var(--orange-dim); color: var(--orange); border: 1px solid rgba(255,102,0,0.2); }
.tag-green  { background: var(--green-dim);  color: var(--green);  border: 1px solid rgba(34,197,94,0.2); }
.tag-red    { background: var(--red-dim);    color: var(--red-loss); border: 1px solid rgba(239,68,68,0.2); }
.tag-amber  { background: var(--amber-dim);  color: var(--amber);  border: 1px solid rgba(245,158,11,0.2); }
.tag-yellow { background: rgba(255,205,0,0.1); color: var(--senyera-yel); border: 1px solid rgba(255,205,0,0.2); }
.tag-gray   { background: rgba(255,255,255,0.06); color: var(--txt-sub); border: 1px solid var(--border); }

/* ── Progress bar ── */
.bar-track {
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--orange);
  transition: width 0.4s ease;
}
.bar-fill.green { background: var(--green); }
.bar-fill.red   { background: var(--red-loss); }
.bar-fill.yellow{ background: var(--senyera-yel); }

/* ── Divider ── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}
.divider-senyera {
  height: 3px;
  background: repeating-linear-gradient(
    90deg,
    var(--senyera-red) 0, var(--senyera-red) 50%,
    var(--senyera-yel) 50%, var(--senyera-yel) 100%
  );
  background-size: 20px 100%;
  margin: 16px 0;
  border-radius: 2px;
  opacity: 0.6;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3a3a3a; }

/* =====================================================
   NUEVO: CLASES VINTAGE PÓSTER
   Solo para fondos decorativos, heroes, separadores
   ===================================================== */

/* ── Noise overlay (grano de papel/imprenta) ── */
/* Uso: añade .has-noise a cualquier contenedor decorativo */
.has-noise { position: relative; }
.has-noise::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.045;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 1;
}

/* ── Fondos decorativos ── */
.bg-naranja  { background-color: var(--naranja); color: var(--blanco-roto); }
.bg-tinta    { background-color: var(--negro-tinta); color: var(--blanco-roto); }
.bg-crema    { background-color: var(--blanco-roto); color: var(--negro-tinta); }

/* ── Tipografía Display (solo decoración/hero) ── */
.font-display {
  font-family: var(--font-display);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 0.95;
}
.font-body-clean {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  font-size: 16px;
}

/* ── Sombras duras (serigrafía) ── */
.shadow-hard    { box-shadow: var(--shadow-hard); }
.shadow-hard-lg { box-shadow: var(--shadow-hard-lg); }
.shadow-hard-naranja { box-shadow: var(--shadow-hard-naranja); }
.text-shadow-hard { text-shadow: 3px 3px 0px var(--negro-tinta); }

/* ── Marco grueso (Art Decó) ── */
.frame-thick {
  border: 3px solid var(--negro-tinta);
  box-shadow: var(--shadow-hard-lg);
}
.frame-oro {
  border: 2px solid var(--oro);
  box-shadow: 3px 3px 0px rgba(184,134,11,0.4);
}

/* ── Franjas Senyera verticales (fondo decorativo) ── */
.senyera-stripes {
  background-image: repeating-linear-gradient(
    90deg,
    var(--senyera-red-v) 0px,
    var(--senyera-red-v) 12px,
    var(--senyera-yel-v) 12px,
    var(--senyera-yel-v) 24px
  );
  opacity: 0.12;
}

/* ── Cinta azul rey (etiqueta) ── */
.cinta-azul {
  background: var(--azul-rey);
  color: #fff;
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 3px 10px;
  display: inline-block;
}

/* ── Divisor heráldico oro ── */
.divider-oro {
  height: 2px;
  background: var(--oro);
  margin: 20px 0;
  opacity: 0.7;
}

/* ── Watermark gigante de fondo (texto decorativo) ── */
.watermark-bg {
  font-family: var(--font-display);
  font-size: clamp(80px, 15vw, 200px);
  color: rgba(255,255,255,0.03);
  text-transform: uppercase;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  line-height: 1;
}
.watermark-bg-dark { color: rgba(0,0,0,0.06); }

/* ── Card de contenido limpio (lectura) ── */
/* Uso: dentro de wrappers decorativos, para el contenido real */
.content-card {
  background: var(--blanco-roto);
  color: var(--negro-tinta);
  border-radius: 2px;
  padding: 20px;
  border: 2px solid var(--negro-tinta);
  box-shadow: var(--shadow-hard);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}
.content-card h2, .content-card h3 {
  font-family: var(--font-display);
  color: var(--naranja);
  margin-bottom: 8px;
}

/* ── Clip-path murciélago (divisor de sección) ── */
.bat-divider {
  width: 100%;
  height: 60px;
  background: var(--negro-tinta);
  clip-path: polygon(0 0, 20% 0, 25% 50%, 35% 20%, 50% 60%, 65% 20%, 75% 50%, 80% 0, 100% 0, 100% 100%, 0 100%);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .bento-3, .bento-4 { grid-template-columns: 1fr 1fr; }
  .bento-3-1, .bento-2-1 { grid-template-columns: 1fr; }
  .layout-sidebar { flex-direction: column; }
  .sidebar { flex: none; width: 100%; }
}
@media (max-width: 600px) {
  .bento-2, .bento-3, .bento-4 { grid-template-columns: 1fr; }
  .span-2, .span-3 { grid-column: span 1; }
  .page-wrap { padding: 14px; }
}

/* =====================================================
   GRADIENT SPORTS COMPONENTS
   ===================================================== */

/* ── GS Card ── */
.gs-card {
  background: var(--gs-surface);
  border: 1px solid var(--gs-border);
  border-radius: var(--gs-radius);
  overflow: hidden;
  transition: border-color 0.15s;
}
.gs-card:hover { border-color: var(--gs-border-hi); }
.gs-card-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--gs-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.gs-card-title {
  font-family: var(--font-condensed);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--gs-txt-muted);
}
.gs-card-body { padding: 16px; }

/* ── GS Stat Chip (Screenshot 1 — 4 KPIs top) ── */
.gs-stat-chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--gs-border);
  border-radius: var(--gs-radius);
  overflow: hidden;
}
.gs-stat-chip {
  background: var(--gs-surface);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.gs-stat-chip .chip-value {
  font-family: var(--font-condensed);
  font-weight: 900;
  font-size: 36px;
  line-height: 1;
  letter-spacing: -1px;
  color: var(--gs-txt);
}
.gs-stat-chip .chip-label {
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  color: var(--gs-txt-muted);
}
.gs-stat-chip .chip-sub {
  font-size: 15px;
  color: var(--gs-txt-muted);
}
@media (max-width: 600px) {
  .gs-stat-chips { grid-template-columns: 1fr 1fr; }
}

/* ── GS Nav Tabs (tipo Club/Matches/Statistics…) ── */
.gs-tabs {
  display: flex;
  border-bottom: 1px solid var(--gs-border);
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.gs-tabs::-webkit-scrollbar { display: none; }
.gs-tab {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--gs-txt-muted);
  padding: 10px 16px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.gs-tab:hover { color: var(--gs-txt); }
.gs-tab.active {
  color: var(--gs-txt);
  border-bottom-color: var(--gs-accent);
}

/* ── GS Section Title ── */
.gs-section {
  font-family: var(--font-condensed);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--gs-txt-muted);
  padding: 14px 0 8px;
}

/* ── GS Badge — posición jugador ── */
.gs-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-condensed);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  line-height: 1.4;
}
.gs-badge-ata { background: rgba(255,82,82,0.18);  color: #ff7070; }
.gs-badge-mid { background: rgba(255,184,48,0.18); color: var(--gs-amber); }
.gs-badge-def { background: rgba(61,220,132,0.18); color: var(--gs-green); }
.gs-badge-gol { background: rgba(100,180,255,0.18); color: #80c8ff; }

/* ── GS Rating ── */
.gs-rating {
  font-family: var(--font-condensed);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.3px;
  line-height: 1;
}
.gs-rating.excellent { color: var(--gs-green); }
.gs-rating.good      { color: var(--gs-accent); }
.gs-rating.avg       { color: var(--gs-amber); }
.gs-rating.poor      { color: var(--gs-red); }

/* ── GS Table (Screenshot 2 — tabla densa jugadores) ── */
.gs-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.gs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}
.gs-table thead tr {
  border-bottom: 1px solid var(--gs-border);
}
.gs-table th {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  color: var(--gs-txt-muted);
  padding: 8px 10px;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.gs-table th.left { text-align: left; }
.gs-table th:hover { color: var(--gs-txt); }
.gs-table th.sorted { color: var(--gs-accent); }
.gs-table td {
  padding: 10px 10px;
  color: var(--gs-txt-sub);
  border-bottom: 1px solid rgba(255,255,255,0.035);
  text-align: center;
  white-space: nowrap;
}
.gs-table td.left { text-align: left; }
.gs-table td.bold { color: var(--gs-txt); font-weight: 700; }
.gs-table tbody tr:hover td { background: rgba(255,255,255,0.03); }
/* Fila resaltada (VCF o row activa) */
.gs-table tbody tr.gs-row-highlight td {
  background: var(--gs-accent-dim);
  color: var(--gs-txt);
}
.gs-table tbody tr.gs-row-highlight:hover td {
  background: rgba(255,102,0,0.22);
}

/* Celda de jugador con avatar */
.gs-player-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 160px;
}
.gs-player-cell img,
.gs-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--gs-surface2);
  flex-shrink: 0;
}
.gs-player-cell .player-name {
  font-weight: 600;
  color: var(--gs-txt);
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.gs-player-cell .player-meta {
  font-size: 15px;
  color: var(--gs-txt-muted);
}

/* ── GS Standings (Screenshot 3 — clasificación) ── */
.gs-standings {
  display: flex;
  flex-direction: column;
}
.gs-standings-header {
  display: grid;
  grid-template-columns: 28px 1fr 30px 30px 30px 30px 30px 42px;
  gap: 0;
  padding: 6px 12px;
  border-bottom: 1px solid var(--gs-border);
}
.gs-standings-header span {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  color: var(--gs-txt-muted);
  text-align: center;
}
.gs-standings-header span.left { text-align: left; }
.gs-standings-row {
  display: grid;
  grid-template-columns: 28px 1fr 30px 30px 30px 30px 30px 42px;
  gap: 0;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  align-items: center;
  transition: background 0.1s;
  cursor: default;
}
.gs-standings-row:hover { background: rgba(255,255,255,0.03); }
.gs-standings-row.gs-vcf-row {
  background: rgba(255,102,0,0.09);
  outline: 1px solid rgba(255,102,0,0.25);
  outline-offset: -1px;
}
.gs-standings-row.gs-vcf-row:hover { background: rgba(255,102,0,0.22); }
.gs-standings-pos {
  font-family: var(--font-condensed);
  font-weight: 700;
  font-size: 15px;
  color: var(--gs-txt-muted);
  text-align: center;
}
.gs-standings-pos.top3 { color: var(--gs-amber); }
.gs-standings-pos.promotion { color: var(--gs-green); }
.gs-standings-pos.relegation { color: var(--gs-red); }
.gs-standings-team {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 16px;
  color: var(--gs-txt);
}
.gs-standings-team img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}
.gs-standings-val {
  font-size: 16px;
  color: var(--gs-txt-sub);
  text-align: center;
}
.gs-standings-pts {
  font-family: var(--font-condensed);
  font-weight: 800;
  font-size: 16px;
  color: var(--gs-txt);
  text-align: center;
}
.gs-standings-pts.vcf-pts { color: var(--gs-accent); }

/* ── GS Match Card (Screenshot 1 / 4) ── */
.gs-matches-grid {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.gs-matches-grid::-webkit-scrollbar { display: none; }
.gs-match-card {
  background: var(--gs-surface);
  border: 1px solid var(--gs-border);
  border-radius: var(--gs-radius);
  padding: 12px;
  min-width: 150px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.15s;
  cursor: pointer;
}
.gs-match-card:hover { border-color: var(--gs-border-hi); }
.gs-match-card .match-comp {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1px;
  color: var(--gs-txt-muted);
}
.gs-match-card .match-comp.win  { color: var(--gs-green); }
.gs-match-card .match-comp.loss { color: var(--gs-red); }
.gs-match-card .match-comp.draw { color: var(--gs-amber); }
.gs-match-card .match-teams {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.gs-match-card .match-team {
  font-family: var(--font-condensed);
  font-weight: 700;
  font-size: 16px;
  color: var(--gs-txt);
  flex: 1;
}
.gs-match-card .match-team.right { text-align: right; }
.gs-match-card .match-score {
  font-family: var(--font-condensed);
  font-weight: 900;
  font-size: 22px;
  color: var(--gs-txt);
  letter-spacing: -1px;
  text-align: center;
  min-width: 50px;
}
.gs-match-card .match-result-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  align-self: flex-end;
  margin-bottom: 2px;
}
.gs-match-card .match-result-dot.win  { background: var(--gs-green); }
.gs-match-card .match-result-dot.draw { background: var(--gs-amber); }
.gs-match-card .match-result-dot.loss { background: var(--gs-red); }
.gs-match-card .match-round {
  font-size: 16px;
  color: var(--gs-txt-muted);
}

/* ── GS Head-to-Head stat bar (Screenshot 4) ── */
.gs-h2h-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}
.gs-h2h-bar .h2h-label {
  font-size: 15px;
  color: var(--gs-txt-muted);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.1px;
  grid-column: 2;
  grid-row: 1;
}
.gs-h2h-bar .h2h-val-left {
  font-family: var(--font-condensed);
  font-weight: 800;
  font-size: 18px;
  text-align: right;
  color: var(--gs-accent);
}
.gs-h2h-bar .h2h-val-right {
  font-family: var(--font-condensed);
  font-weight: 800;
  font-size: 18px;
  text-align: left;
  color: var(--gs-txt-sub);
}
.gs-h2h-track {
  height: 4px;
  background: var(--gs-border);
  border-radius: 2px;
  overflow: hidden;
  grid-column: 1 / -1;
  position: relative;
}
.gs-h2h-fill {
  height: 100%;
  background: var(--gs-accent);
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* ── GS Dashboard Header (club summary top) ── */
.gs-club-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 0 16px;
  border-bottom: 1px solid var(--gs-border);
  margin-bottom: 16px;
}
.gs-club-header .club-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}
.gs-club-header .club-name {
  font-family: var(--font-condensed);
  font-weight: 900;
  font-size: 26px;
  line-height: 1;
  color: var(--gs-txt);
  text-transform: uppercase;
}
.gs-club-header .club-sub {
  font-size: 16px;
  color: var(--gs-txt-muted);
  margin-top: 2px;
}

/* ── GS Result badge (V/D/L) ── */
.gs-result {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 3px;
  font-family: var(--font-condensed);
  font-weight: 800;
  font-size: 15px;
}
.gs-result.win  { background: var(--gs-green-dim); color: var(--gs-green); }
.gs-result.draw { background: var(--gs-amber-dim); color: var(--gs-amber); }
.gs-result.loss { background: var(--gs-red-dim);   color: var(--gs-red); }

/* ── Responsive GS ── */
@media (max-width: 900px) {
  .gs-standings-header,
  .gs-standings-row {
    grid-template-columns: 24px 1fr 28px 28px 28px 36px;
  }
  .gs-standings-header span:nth-child(4),
  .gs-standings-row > *:nth-child(4),
  .gs-standings-header span:nth-child(5),
  .gs-standings-row > *:nth-child(5) { display: none; }
}
@media (max-width: 600px) {
  .gs-stat-chips { grid-template-columns: 1fr 1fr; }
  .gs-standings-header,
  .gs-standings-row { grid-template-columns: 24px 1fr 28px 36px; }
  .gs-standings-header span:nth-child(3),
  .gs-standings-row > *:nth-child(3),
  .gs-standings-header span:nth-child(4),
  .gs-standings-row > *:nth-child(4),
  .gs-standings-header span:nth-child(5),
  .gs-standings-row > *:nth-child(5),
  .gs-standings-header span:nth-child(6),
  .gs-standings-row > *:nth-child(6),
  .gs-standings-header span:nth-child(7),
  .gs-standings-row > *:nth-child(7) { display: none; }
}
/* =====================================================
   POST-PARTIDO + TWITTER CARD
   twitter_card.html · post_partido_analytics.html
   ===================================================== */

/* ── Página de la Twitter Card ── */
.tc-page { background: var(--bg-void); }

.tc-page-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 40px 24px 60px;
  min-height: calc(100vh - 60px);
}

/* Wrapper para escalar la tarjeta con transform sin romper el flow */
.tc-preview-scaler {
  width: 1200px;
  height: 675px;
  transform-origin: top center;
  flex-shrink: 0;
}

/* ── Contenedor fijo 1200×675 — el artefacto exportable ── */
.twitter-card-root {
  width: 1200px;
  height: 675px;
  background: #000;
  display: flex;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  font-family: var(--font-condensed);
}

/* ── Hero izquierdo: foto + degradado ── */
.tc-hero {
  position: relative;
  width: 38%;
  flex-shrink: 0;
  overflow: hidden;
  background: #030303;
}

.tc-player-photo {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  width: auto;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* Dos capas: oscuridad lateral izquierda + naranja emergente desde abajo */
.tc-hero-gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right,  rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.15) 55%, transparent 100%),
    linear-gradient(to top,    rgba(255,102,0,0.32) 0%, transparent 52%);
}

/* Barra Senyera vertical — firma visual */
.tc-senyera-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: repeating-linear-gradient(
    180deg,
    var(--senyera-red) 0px,
    var(--senyera-red) 27px,
    var(--senyera-yel) 27px,
    var(--senyera-yel) 54px
  );
  z-index: 2;
}

/* ── Contenido derecho — credencial ── */
.tc-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 26px 36px 22px 28px;
  position: relative;
  overflow: hidden;
  background: #080808;
}

/* Trama diagonal sutil */
.tc-content::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0px, transparent 28px,
    rgba(255,102,0,0.018) 28px, rgba(255,102,0,0.018) 29px
  );
  pointer-events: none;
  z-index: 0;
}

/* ── Cabecera: escudo + resultado ── */
.tc-match-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.tc-shield {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex-shrink: 0;
}

.tc-match-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.tc-result-score {
  font-family: var(--font-condensed);
  font-weight: 800;
  font-size: 30px;
  color: #fff;
  line-height: 1;
  letter-spacing: 0.03em;
}

.tc-result-sep { color: var(--orange); margin: 0 5px; }

.tc-result-label {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--txt-muted);
}

.tc-shield-rival {
  font-family: var(--font-condensed);
  font-size: 16px;
  font-weight: 700;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  padding: 5px 12px;
  flex-shrink: 0;
}

/* ── Separador credencial ── */
.tc-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 14px 0;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

/* ── Nombre jugador ── */
.tc-player-name {
  position: relative;
  z-index: 1;
  font-family: var(--font-condensed);
  font-weight: 900;
  font-size: 62px;
  line-height: 0.88;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tc-player-meta {
  position: relative;
  z-index: 1;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--txt-muted);
  margin-top: 7px;
}

/* ── Bloque de valoración — ocupa el espacio central ── */
.tc-rating-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
}

.tc-rating-number {
  font-family: var(--font-condensed);
  font-size: 88px;
  font-weight: 900;
  color: var(--orange);
  line-height: 1;
  letter-spacing: -0.04em;
  flex-shrink: 0;
}

.tc-rating-text {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.tc-rating-label {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  color: var(--txt-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.tc-rating-desc {
  font-family: var(--font-condensed);
  font-size: 18px;
  font-weight: 700;
  color: rgba(255,255,255,0.80);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(255,102,0,0.10);
  padding: 5px 10px;
  border-radius: 4px;
  line-height: 1;
}

/* ── Fila de stats — estilo Ajax (números abiertos, sin cajas) ── */
.tc-stats-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 18px;
  padding-bottom: 18px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.tc-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.tc-stat-value {
  font-family: var(--font-condensed);
  font-size: 48px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
}

.tc-stat-label {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  color: var(--txt-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  line-height: 1;
}

/* Color semántico en el número, no en caja */
.tc-stat--pos .tc-stat-value { color: #fff; }
.tc-stat--neu .tc-stat-value { color: rgba(255,255,255,0.38); }
.tc-stat--red .tc-stat-value { color: var(--red-loss); }

/* ── Marca de agua ── */
.tc-watermark {
  position: absolute;
  bottom: 14px;
  right: 18px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: rgba(255,255,255,0.18);
  z-index: 2;
}

/* ── Botones de exportación (fuera de la tarjeta) ── */
.tc-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* =====================================================
   POST-PARTIDO ANALYTICS
   post_partido_analytics.html
   ===================================================== */

/* ── Cabecera del partido ── */
.pa-match-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.pa-matchup {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pa-team {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pa-team-badge {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.pa-team-badge-placeholder {
  width: 40px;
  height: 40px;
  background: var(--bg-card2);
  border: 1px solid var(--border-hi);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-condensed);
  font-weight: 800;
  font-size: 15px;
  color: var(--txt-sub);
  flex-shrink: 0;
}

.pa-team-name {
  font-family: var(--font-condensed);
  font-weight: 800;
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--txt);
}

.pa-score {
  text-align: center;
}

.pa-score-num {
  font-family: var(--font-condensed);
  font-weight: 900;
  font-size: 48px;
  line-height: 1;
  letter-spacing: -2px;
  color: #fff;
}

.pa-score-sep { color: var(--orange); margin: 0 4px; }

.pa-score-meta {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--txt-muted);
  margin-top: 2px;
}

/* Quick stats bar */
.pa-quick-stats {
  display: flex;
  gap: 20px;
  align-items: center;
}

.pa-qs-item {
  text-align: center;
}

.pa-qs-val {
  font-family: var(--font-condensed);
  font-weight: 700;
  font-size: 17px;
  color: var(--txt);
  line-height: 1;
}

.pa-qs-label {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--txt-muted);
  margin-top: 2px;
}

.pa-qs-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
  flex-shrink: 0;
}

/* ── Panel xG comparativo ── */
.pa-xg-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.pa-xg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px 10px;
  border-bottom: 1px solid var(--border);
}

.pa-xg-title {
  font-family: var(--font-condensed);
  font-weight: 800;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--txt-muted);
}

.pa-xg-totals {
  display: flex;
  gap: 20px;
}

.pa-xg-team-total {
  display: flex;
  align-items: center;
  gap: 7px;
}

.pa-xg-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pa-xg-team-label {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--txt-sub);
}

.pa-xg-team-val {
  font-family: var(--font-condensed);
  font-weight: 800;
  font-size: 15px;
  color: var(--txt);
}

.pa-xg-chart-wrap {
  padding: 12px 16px 8px;
  overflow: hidden;
}

.pa-xg-chart-wrap svg {
  display: block;
  width: 100%;
  height: auto;
}

/* ── Ranking panels (4 columnas) ── */
.analytics-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.analytics-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px 9px;
  border-bottom: 1px solid var(--border);
}

.analytics-panel-accent {
  width: 3px;
  height: 13px;
  border-radius: 2px;
  flex-shrink: 0;
}

.ap-accent--red    { background: var(--senyera-red); }
.ap-accent--orange { background: var(--orange); }
.ap-accent--blue   { background: var(--azul-rey); }
.ap-accent--amber  { background: var(--amber); }

.analytics-panel-title {
  font-family: var(--font-condensed);
  font-weight: 800;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--txt-muted);
}

/* Grupos top/bottom */
.ranking-section {
  padding: 6px 0;
}

.ranking-section + .ranking-section {
  border-top: 1px solid var(--border);
}

.ranking-section-label {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--txt-muted);
  padding: 2px 14px 5px;
}

/* Fila de jugador */
.ranking-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px;
  transition: background 0.12s;
  text-decoration: none;
  color: inherit;
}

.ranking-item:hover { background: var(--bg-hover); }

.ranking-item--top    { background: rgba(34,197,94,0.04); }
.ranking-item--bottom { background: rgba(239,68,68,0.04); }
.ranking-item--top:hover    { background: rgba(34,197,94,0.08); }
.ranking-item--bottom:hover { background: rgba(239,68,68,0.08); }

.ranking-item__pos {
  font-family: var(--font-condensed);
  font-weight: 700;
  font-size: 16px;
  color: var(--txt-muted);
  width: 12px;
  text-align: center;
  flex-shrink: 0;
}

.ranking-item__avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-card2);
}

.ranking-item__info {
  flex: 1;
  min-width: 0;
}

.ranking-item__name {
  font-family: var(--font-condensed);
  font-size: 16px;
  font-weight: 700;
  color: var(--txt);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  transition: color 0.12s;
  line-height: 1.15;
}

.ranking-item:hover .ranking-item__name { color: var(--orange); }

.ranking-item__sub {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1px;
  color: var(--txt-muted);
}

.ranking-item__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}

.ranking-item__value {
  font-family: var(--font-condensed);
  font-weight: 800;
  font-size: 15px;
  line-height: 1;
}

.ranking-item--top    .ranking-item__value { color: var(--green); }
.ranking-item--bottom .ranking-item__value { color: var(--red-loss); }

.ranking-item__bar-wrap {
  width: 48px;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.ranking-item__bar-fill {
  height: 100%;
  border-radius: 2px;
}

.ranking-item--top    .ranking-item__bar-fill { background: var(--green); }
.ranking-item--bottom .ranking-item__bar-fill { background: var(--red-loss); }

/* Responsive analytics grid */
@media (max-width: 1100px) {
  .pa-quick-stats { gap: 14px; }
}
@media (max-width: 768px) {
  .pa-match-header { flex-direction: column; align-items: flex-start; }
  .pa-quick-stats { flex-wrap: wrap; gap: 12px; }
  .pa-qs-divider { display: none; }
}

/* ── Selector de partido / jugador ── */
.match-selector {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.match-selector-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 180px;
}
.match-selector-group .form-label { margin-bottom: 0; }

/* ── Barras comparativas (centro panel analytics) ── */
.pa-compare-wrap { padding: 14px 18px 6px; }

.pa-compare-row {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.pa-compare-label {
  grid-column: 1 / -1;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--txt-muted);
  text-align: center;
  margin-top: -6px;
  margin-bottom: 4px;
}

.pa-compare-val {
  font-family: var(--font-condensed);
  font-weight: 800;
  font-size: 16px;
  line-height: 1;
}
.pa-compare-val--vcf   { color: var(--orange); text-align: right; }
.pa-compare-val--rival { color: var(--txt-sub); text-align: left; }

.pa-compare-bars {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--border);
}
.pa-compare-bar--vcf {
  background: var(--orange);
  border-radius: 3px 0 0 3px;
  transition: width 0.4s ease;
}
.pa-compare-bar--rival {
  background: rgba(255,255,255,0.2);
  border-radius: 0 3px 3px 0;
  transition: width 0.4s ease;
  margin-left: auto;
}

/* ── Timeline de goles (centro panel) ── */
.pa-timeline-wrap { padding: 14px 18px 10px; }

.pa-timeline-strip {
  position: relative;
  height: 72px;
}
.pa-tl-line {
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  height: 2px;
  background: var(--border-hi);
  border-radius: 2px;
  transform: translateY(-50%);
}
.pa-tl-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  z-index: 1;
  cursor: default;
  padding: 4px 2px;
}
.pa-tl-marker--above { flex-direction: column-reverse; }

.pa-tl-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #0e0e0e;
  flex-shrink: 0;
  transition: transform 0.12s;
}
.pa-tl-marker:hover .pa-tl-dot { transform: scale(1.4); }
.pa-tl-dot--goal-vcf   { background: var(--orange); }
.pa-tl-dot--goal-rival { background: rgba(255,255,255,0.45); }
.pa-tl-dot--card       { background: var(--amber); border-radius: 2px; width: 8px; height: 10px; }
.pa-tl-dot--card-red   { background: var(--red-loss); }

.pa-tl-name {
  font-family: var(--font-condensed);
  font-size: 16px;
  font-weight: 700;
  color: var(--txt);
  white-space: nowrap;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}
.pa-tl-min {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  color: var(--txt-muted);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}
.pa-tl-marker:hover .pa-tl-name,
.pa-tl-marker:hover .pa-tl-min { opacity: 1; z-index: 10; }

.pa-tl-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
}
.pa-tl-axis span {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  color: var(--txt-muted);
}

/* ── Posición del nombre: arriba o abajo de la línea ── */
.pa-tl-marker--above .pa-tl-name,
.pa-tl-marker--above .pa-tl-min  { margin-bottom: 2px; }
.pa-tl-marker--below .pa-tl-name,
.pa-tl-marker--below .pa-tl-min  { margin-top: 2px; }


/* ═══════════════════════════════════════════════════════════════
   EXPORT CARD  1080×1350  (Instagram 4:5 / Twitter portrait)
   ═══════════════════════════════════════════════════════════════ */

.ec-page {
  display: flex; flex-direction: column;
  align-items: center; padding: 24px; gap: 20px;
}
.ec-scaler {
  width: 1080px; height: 1350px;
  transform-origin: top center; flex-shrink: 0;
}
.ec-card {
  width: 1080px; height: 1350px;
  background: #080808;
  display: flex; flex-direction: column;
  overflow: hidden; position: relative;
  font-family: var(--font-condensed);
}

/* ── Header ── */
.ec-header {
  display: flex; align-items: center;
  padding: 44px 48px 36px;
  gap: 28px; flex-shrink: 0;
}

/* Avatar circle */
.ec-avatar-wrap {
  position: relative; flex-shrink: 0;
  width: 120px; height: 120px;
}
.ec-avatar-ring { position: absolute; inset: 0; }
.ec-avatar-img {
  position: absolute; inset: 5px;
  border-radius: 50%;
  object-fit: cover; object-position: top center;
  background: #1c1c1c;
}

/* Center block */
.ec-header-mid { flex: 1; min-width: 0; }
.ec-player-name {
  font-size: 54px; font-weight: 900; text-transform: uppercase;
  letter-spacing: 0.01em; color: #fff; line-height: 0.95;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ec-player-pos {
  font-size: 16px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: rgba(255,255,255,0.3);
  margin: 6px 0 16px;
}
.ec-match-line {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
}
.ec-match-score {
  font-size: 32px; font-weight: 900; color: #fff; line-height: 1;
  letter-spacing: -0.01em;
}
.ec-match-score-sep { color: rgba(255,255,255,0.18); margin: 0 3px; }
.ec-match-teams {
  font-size: 16px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(255,255,255,0.35);
  line-height: 1.5;
}

/* Rating badge */
.ec-rating-wrap {
  flex-shrink: 0; position: relative;
  width: 144px; height: 144px;
}
.ec-rating-svg { width: 144px; height: 144px; display: block; }
.ec-rating-inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.ec-rating-val {
  font-size: 58px; font-weight: 900; color: #FF6600; line-height: 1;
  letter-spacing: -0.02em;
}
.ec-rating-lbl {
  font-size: 16px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: rgba(255,255,255,0.28);
  margin-top: 1px;
}

/* Divider */
.ec-divider {
  height: 1px; background: rgba(255,255,255,0.06);
  margin: 0; flex-shrink: 0;
}

/* ── Smart Grid 2×2 ── */
.ec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1px;
  background: #1c1c1c;   /* gap colour */
  flex: 1; min-height: 0;
}
.ec-block {
  background: #080808;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 32px 24px;
  position: relative; overflow: hidden;
  border-top: 3px solid transparent;
}
/* Subtle top glow matching accent */
.ec-block::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 45%;
  pointer-events: none;
}
.ec-block--pos { border-top-color: #22C55E; }
.ec-block--pos::before { background: radial-gradient(ellipse at 50% -10%, rgba(34,197,94,0.07) 0%, transparent 70%); }
.ec-block--neu { border-top-color: #FF6600; }
.ec-block--neu::before { background: radial-gradient(ellipse at 50% -10%, rgba(255,102,0,0.07) 0%, transparent 70%); }
.ec-block--neg { border-top-color: #C8102E; }
.ec-block--neg::before { background: radial-gradient(ellipse at 50% -10%, rgba(200,16,46,0.07) 0%, transparent 70%); }

.ec-block-label {
  font-family: var(--font-body);
  font-size: 16px; font-weight: 700; letter-spacing: 0.20em;
  text-transform: uppercase; color: rgba(255,255,255,0.28);
  margin-bottom: 12px; position: relative; z-index: 1;
}
.ec-block-val {
  font-family: var(--font-condensed);
  font-size: 128px; font-weight: 900; line-height: 1;
  color: #fff; position: relative; z-index: 1;
  letter-spacing: -0.02em;
}

/* ── Footer ── */
.ec-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 48px; flex-shrink: 0;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.ec-footer-left { display: flex; align-items: center; gap: 10px; }
.ec-footer-shield { width: 22px; height: 22px; object-fit: contain; }
.ec-footer-meta {
  font-family: var(--font-body);
  font-size: 16px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(255,255,255,0.20);
}
.ec-watermark {
  font-family: var(--font-condensed);
  font-size: 16px; font-weight: 700; letter-spacing: 0.10em;
  text-transform: uppercase; color: rgba(255,102,0,0.40);
}
.ec-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  position: sticky;
  bottom: 20px;
  z-index: 100;
  background: rgba(8,8,8,.94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
}

/* === VCF Share Bar === */
.vcf-share-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.share-label {
  font-size: 13px;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #aaa;
  font-size: 14px;
  font-family: inherit;
  padding: 6px 12px;
  cursor: pointer;
  transition: background-color 150ms ease-out, border-color 150ms ease-out,
              color 150ms ease-out, transform 150ms ease-out;
}
.share-btn:hover { background: rgba(255,102,0,0.12); border-color: #FF6600; color: #FF6600; }
.share-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.share-twitter:hover { background: rgba(29,155,240,0.12); border-color: #1d9bf0; color: #1d9bf0; }

/* ── Accessibility ── */

/* Skip-to-content link — visible only on keyboard focus */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  background: var(--orange);
  color: var(--negro-tinta);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-decoration: none;
  transition: top 100ms ease-out;
}
.skip-link:focus {
  top: 0;
  outline: none;
}

/* Visible focus ring for keyboard navigation (WCAG 2.4.7 AA) */
:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
/* Override for inputs — they have their own focus style via border-color */
.input:focus-visible,
.select:focus-visible {
  outline: none;
}

/* ── Reduced motion (WCAG 2.3.3) ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ═══════════════════════════════════════════════════════
   VCF STATS — v3 Components
   Visual upgrade: match hero · pill tabs · photo cards
   Scroll reveal · status badges · enhanced page header
   ═══════════════════════════════════════════════════════ */

/* ── 1. Match Hero ─────────────────────────────────── */
.match-hero {
  position: relative;
  background: var(--gs-bg, #111110);
  overflow: hidden;
  padding: 28px 24px 24px;
  border-bottom: 1px solid var(--gs-border);
}
.match-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 120% at 15% 50%, rgba(200, 16, 46, 0.13), transparent),
    radial-gradient(ellipse 55% 120% at 85% 50%, rgba(255, 102, 0, 0.09), transparent);
  pointer-events: none;
}
.match-hero-inner {
  max-width: 860px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.match-hero-comp {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gs-txt-muted);
  text-align: center;
  margin-bottom: 22px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}
.match-hero-comp-sep { opacity: 0.3; }
.match-hero-teams {
  display: grid;
  grid-template-columns: 1fr 180px 1fr;
  align-items: center;
  gap: 12px;
}
.match-hero-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.match-hero-team.home { align-items: flex-end; }
.match-hero-team.away { align-items: flex-start; }
.match-hero-crest {
  width: 60px;
  height: 60px;
  object-fit: contain;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.5));
}
.match-hero-team-name {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--gs-txt);
  text-align: center;
}
.match-hero-score-block {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.match-hero-score {
  font-family: var(--font-display);
  font-size: 76px;
  line-height: 1;
  letter-spacing: -2px;
  color: var(--gs-txt);
  text-align: center;
}
.match-hero-score .mh-sep {
  color: var(--gs-txt-muted);
  margin: 0 4px;
  font-size: 52px;
  vertical-align: middle;
}
.match-hero-score-status {
  font-size: 14px;
  color: var(--gs-txt-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 4px;
}
.match-hero-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 4vw, 42px);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.04);
  text-align: center;
  margin-top: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: none;
  pointer-events: none;
}
.match-hero-info {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 16px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid var(--gs-border);
}
.match-hero-info-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  color: var(--gs-txt-muted);
  letter-spacing: 0.4px;
}
@media (max-width: 600px) {
  .match-hero-teams { grid-template-columns: 1fr 130px 1fr; gap: 8px; }
  .match-hero-score { font-size: 56px; }
  .match-hero-crest { width: 44px; height: 44px; }
  .match-hero-team-name { font-size: 15px; }
}

/* ── 2. Tab Pills ───────────────────────────────────── */
.tab-pills {
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  background: var(--gs-surface, #1c1c1a);
  border: 1px solid var(--gs-border, rgba(255,255,255,0.07));
  border-radius: 11px;
  flex-wrap: wrap;
}
.tab-pill {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 7px 18px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--gs-txt-muted);
  cursor: pointer;
  transition:
    background var(--dur-fast, 220ms) var(--ease-out, cubic-bezier(0.23,1,0.32,1)),
    color var(--dur-fast, 220ms) var(--ease-out, cubic-bezier(0.23,1,0.32,1)),
    transform var(--dur-micro, 150ms) var(--ease-out, cubic-bezier(0.23,1,0.32,1));
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.tab-pill:hover:not(.active) {
  color: var(--gs-txt);
  background: var(--gs-surface2, #242422);
}
.tab-pill.active {
  background: var(--gs-accent, #FF6600);
  color: #000;
  font-weight: 800;
}
.tab-pill:active:not(.active) { transform: scale(0.96); }

/* ── 3. Photo Card ──────────────────────────────────── */
.photocard {
  position: relative;
  border-radius: var(--radius, 10px);
  overflow: hidden;
  background: var(--gs-surface, #1c1c1a);
  aspect-ratio: 3 / 4;
  cursor: pointer;
  isolation: isolate;
}
.photocard-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 400ms var(--ease-out, cubic-bezier(0.23,1,0.32,1));
}
.photocard:hover .photocard-img { transform: scale(1.05); }
.photocard-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.92) 0%,
    rgba(0, 0, 0, 0.48) 45%,
    rgba(0, 0, 0, 0.08) 100%
  );
}
.photocard-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 14px 14px;
  z-index: 2;
}
.photocard-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 5px;
}
.photocard-badge.fichaje  { background: rgba(255,102,0,0.18); color: var(--gs-accent, #FF6600); }
.photocard-badge.salida   { background: rgba(255,82,82,0.18);  color: var(--gs-red, #ff5252); }
.photocard-badge.objetivo { background: rgba(59,130,246,0.18); color: #60a5fa; }
.photocard-badge.titular  { background: rgba(34,197,94,0.18);  color: var(--gs-green, #3ddc84); }
.photocard-name {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.photocard-sub {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.48);
  margin-top: 3px;
  letter-spacing: 0.4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.photocard-club {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.65));
  z-index: 2;
}
.photocard-pos {
  position: absolute;
  top: 10px;
  left: 10px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.65);
  color: rgba(255, 255, 255, 0.65);
  z-index: 2;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.photocard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}

/* ── 4. Scroll Reveal ───────────────────────────────── */
.vcf-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 380ms var(--ease-out, cubic-bezier(0.23,1,0.32,1)),
    transform 380ms var(--ease-out, cubic-bezier(0.23,1,0.32,1));
}
.vcf-reveal.in-view {
  opacity: 1;
  transform: none;
}
.vcf-reveal[data-delay="1"] { transition-delay: 55ms; }
.vcf-reveal[data-delay="2"] { transition-delay: 110ms; }
.vcf-reveal[data-delay="3"] { transition-delay: 165ms; }
.vcf-reveal[data-delay="4"] { transition-delay: 220ms; }
.vcf-reveal[data-delay="5"] { transition-delay: 275ms; }
.vcf-reveal[data-delay="6"] { transition-delay: 330ms; }

/* ── 5. Status Badge (pill con dot de color) ────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 20px;
}
.status-badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.status-badge.active   { background: var(--gs-green-dim, rgba(61,220,132,0.14)); color: var(--gs-green, #3ddc84); }
.status-badge.injured  { background: var(--gs-red-dim,   rgba(255,82,82,0.14));  color: var(--gs-red,   #ff5252); }
.status-badge.doubt    { background: var(--gs-amber-dim, rgba(255,184,48,0.14)); color: var(--gs-amber, #ffb830); }
.status-badge.new      { background: var(--gs-accent-dim,rgba(255,102,0,0.15));  color: var(--gs-accent,#FF6600); }
.status-badge.out      { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.4); }

/* ── 6. Page Header v2 (más impacto) ────────────────── */
.page-header-v2 {
  max-width: var(--page-max, 1200px);
  margin: 0 auto;
  padding: 28px 24px 20px;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.page-header-v2 .ph2-left { flex: 1; min-width: 0; }
.page-header-v2 .ph2-right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.page-header-v2 .page-sup {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gs-accent, #FF6600);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.page-header-v2 .page-sup::before {
  content: '';
  width: 18px;
  height: 2px;
  background: var(--gs-accent, #FF6600);
  border-radius: 1px;
  flex-shrink: 0;
}
.page-header-v2 .page-title {
  font-family: var(--font-display);
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gs-txt, #f0ede8);
  margin-bottom: 6px;
  animation: vcfFadeUp var(--dur-base, 280ms) var(--ease-out, cubic-bezier(0.23,1,0.32,1)) both;
}
.page-header-v2 .page-sub {
  font-size: 15px;
  color: var(--gs-txt-muted);
  max-width: 520px;
  line-height: 1.5;
}

/* ── 7. Hover sutil en filas de tabla ───────────────── */
.vcf-row {
  transition: background var(--dur-micro, 150ms) var(--ease-out, cubic-bezier(0.23,1,0.32,1));
  cursor: default;
}
.vcf-row:hover { background: var(--gs-surface2, #242422); }

/* ── 8. Highlight chip (badge compacto inline) ──────── */
.hl-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--gs-surface2);
  color: var(--gs-txt-sub);
  border: 1px solid var(--gs-border);
}
.hl-chip.accent { background: var(--gs-accent-dim); color: var(--gs-accent); border-color: rgba(255,102,0,0.2); }
.hl-chip.green  { background: var(--gs-green-dim);  color: var(--gs-green);  border-color: rgba(61,220,132,0.2); }
.hl-chip.amber  { background: var(--gs-amber-dim);  color: var(--gs-amber);  border-color: rgba(255,184,48,0.2); }
.hl-chip.red    { background: var(--gs-red-dim);    color: var(--gs-red);    border-color: rgba(255,82,82,0.2); }

/* ══════════════════════════════════════════════════════════════════
   VCFCard — Sistema de export 1080×1080  (prefijo vc-)
   Usado por todas las páginas vía VCFCard.* en export_senyera.js
   ══════════════════════════════════════════════════════════════════ */

/* ── Modal overlay ─────────────────────────────────────────────── */
.vcf-card-modal {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.88); z-index: 10000;
  align-items: center; justify-content: center;
  backdrop-filter: blur(10px);
}
.vcf-card-modal.open { display: flex; }
.vcf-card-modal-box {
  background: #111; border-radius: 16px; padding: 24px;
  box-shadow: 0 24px 80px rgba(0,0,0,.9);
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  max-width: 95vw; max-height: 95vh; overflow-y: auto;
}
.vcf-card-modal-label {
  font-family: var(--font-display); font-size: 13px; letter-spacing: 2px;
  color: rgba(255,255,255,.4); text-transform: uppercase;
}
.vcf-card-modal-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.vcf-card-modal-hint { font-size: 11px; color: rgba(255,255,255,.25); font-family: var(--font-body); text-align: center; }

/* ── Card container 540×540 (html2canvas escala a 1080×1080 @2x) ── */
.vcf1080 {
  width: 540px; height: 540px;
  background: #0e0e0e; overflow: hidden;
  font-family: 'Inter', sans-serif; position: relative; flex-shrink: 0;
}

/* ── Accent bar superior ────────────────────────────────────────── */
.vc-accent { height: 4px; background: #FF6600; width: 100%; }

/* ── Body (flex column, rellena el espacio restante) ─────────────── */
.vc-body {
  padding: 18px 22px 18px; display: flex; flex-direction: column;
  height: calc(100% - 4px); box-sizing: border-box; gap: 0;
}

/* ── Player header (foto + nombre + badge) ───────────────────────── */
.vc-player-row { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 12px; }
.vc-photo {
  width: 86px; height: 86px; border-radius: 50%; overflow: hidden;
  background: #1a1a1a; border: 2px solid #FF6600; flex-shrink: 0;
}
.vc-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.vc-player-info { flex: 1; min-width: 0; padding-top: 2px; }
.vc-nombre {
  font-family: 'Bebas Neue', sans-serif; font-size: 29px; line-height: 1;
  color: #fff; letter-spacing: 0.5px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.vc-meta { display: flex; align-items: center; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.vc-pos-badge {
  font-size: 8px; font-weight: 800; letter-spacing: 1.5px; padding: 2px 7px;
  border-radius: 3px; text-transform: uppercase; font-family: 'Inter', sans-serif;
}
.vc-sub { font-size: 10px; color: rgba(255,255,255,.45); }

/* ── Logo block (top-right) ──────────────────────────────────────── */
.vc-logo { margin-left: auto; text-align: right; padding-top: 2px; flex-shrink: 0; }
.vc-logo-name {
  font-family: 'Bebas Neue', sans-serif; font-size: 13px;
  color: #FF6600; letter-spacing: 2px; line-height: 1;
}
.vc-logo-url { font-size: 8px; color: rgba(255,255,255,.22); font-family: 'Inter', sans-serif; }

/* ── Team header (sin foto) ──────────────────────────────────────── */
.vc-team-row {
  display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px;
}
.vc-team-title {
  font-family: 'Bebas Neue', sans-serif; font-size: 11px; letter-spacing: 3px;
  color: rgba(255,255,255,.3); text-transform: uppercase;
}
.vc-team-name {
  font-family: 'Bebas Neue', sans-serif; font-size: 36px; line-height: 1.05;
  color: #fff; letter-spacing: 0.5px; margin-top: 4px;
}
.vc-team-sub { font-size: 10px; color: rgba(255,255,255,.45); margin-top: 4px; }

/* ── Hero number (stat protagonista grande) ──────────────────────── */
.vc-hero { text-align: center; padding: 6px 0; }
.vc-hero-num {
  font-family: 'Bebas Neue', sans-serif; font-size: 72px; line-height: 1;
  color: #FF6600; letter-spacing: -1px;
}
.vc-hero-label {
  font-size: 8px; letter-spacing: 3px; text-transform: uppercase;
  color: rgba(255,255,255,.3); margin-top: 2px;
}

/* ── KPI row ──────────────────────────────────────────────────────── */
.vc-kpi-row {
  display: flex; align-items: center;
  border-top: 1px solid rgba(255,102,0,.2);
  border-bottom: 1px solid rgba(255,102,0,.2);
  padding: 8px 0; margin-bottom: 12px;
}
.vc-kpi { flex: 1; text-align: center; }
.vc-kpi-val { font-family: 'Bebas Neue', sans-serif; font-size: 22px; color: #fff; line-height: 1; }
.vc-kpi-label {
  font-size: 7.5px; color: rgba(255,255,255,.35); text-transform: uppercase;
  letter-spacing: 0.8px; margin-top: 2px;
}
.vc-kpi-sep { width: 1px; height: 28px; background: rgba(255,255,255,.1); flex-shrink: 0; }

/* ── Section label ───────────────────────────────────────────────── */
.vc-section {
  font-size: 7.5px; letter-spacing: 2px; text-transform: uppercase;
  color: rgba(255,255,255,.25); margin-bottom: 7px;
}

/* ── Metric bar row (percentil) ──────────────────────────────────── */
.vc-metric { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.vc-metric-name {
  font-family: 'Inter', sans-serif; font-size: 9.5px; color: rgba(255,255,255,.65);
  width: 138px; flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vc-bar-track { flex: 1; height: 5px; background: rgba(255,255,255,.07); border-radius: 3px; overflow: hidden; }
.vc-bar-fill  { height: 100%; border-radius: 3px; }
.vc-bar-fill.h { background: #4ade80; }
.vc-bar-fill.m { background: #fbbf24; }
.vc-bar-fill.l { background: #f87171; }
.vc-metric-pct {
  font-family: 'Bebas Neue', sans-serif; font-size: 14px;
  color: #fff; width: 26px; text-align: right; flex-shrink: 0;
}

/* ── Match row ───────────────────────────────────────────────────── */
.vc-match {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,.05);
}
.vc-match:last-child { border-bottom: none; }
.vc-match-date { font-size: 8px; color: rgba(255,255,255,.35); width: 36px; flex-shrink: 0; font-family: 'Inter', sans-serif; }
.vc-match-rival { font-size: 10px; color: rgba(255,255,255,.7); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vc-match-loc { font-size: 8px; color: rgba(255,255,255,.3); flex-shrink: 0; }
.vc-match-res { font-family: 'Bebas Neue', sans-serif; font-size: 12px; padding: 2px 6px; border-radius: 3px; flex-shrink: 0; }
.vc-match-res.w { background: rgba(74,222,128,.15); color: #4ade80; }
.vc-match-res.d { background: rgba(251,191,36,.15);  color: #fbbf24; }
.vc-match-res.l { background: rgba(248,113,113,.15); color: #f87171; }
.vc-match-nota { font-family: 'Bebas Neue', sans-serif; font-size: 12px; color: rgba(255,255,255,.5); width: 28px; text-align: right; flex-shrink: 0; }
.vc-match-xg  { font-size: 9px; color: rgba(255,255,255,.3); width: 52px; text-align: right; flex-shrink: 0; font-family: 'Inter', sans-serif; }

/* ── Form dots (W/D/L) ───────────────────────────────────────────── */
.vc-form { display: flex; gap: 5px; align-items: center; }
.vc-form-dot {
  width: 30px; height: 30px; border-radius: 6px; display: flex; align-items: center;
  justify-content: center; font-family: 'Bebas Neue', sans-serif; font-size: 15px;
}
.vc-form-dot.w { background: rgba(74,222,128,.18); color: #4ade80; border: 1px solid rgba(74,222,128,.3); }
.vc-form-dot.d { background: rgba(251,191,36,.18);  color: #fbbf24; border: 1px solid rgba(251,191,36,.3); }
.vc-form-dot.l { background: rgba(248,113,113,.18); color: #f87171; border: 1px solid rgba(248,113,113,.3); }

/* ── Dual bar (comparison cards) ─────────────────────────────────── */
.vc-dual { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.vc-dual-name {
  font-size: 9px; color: rgba(255,255,255,.55); width: 114px; flex-shrink: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: 'Inter', sans-serif;
}
.vc-dual-bars { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.vc-dual-bar-row { display: flex; align-items: center; gap: 4px; }
.vc-dual-track { flex: 1; height: 4px; background: rgba(255,255,255,.07); border-radius: 2px; overflow: hidden; }
.vc-dual-fill-a { height: 100%; background: #FF6600; border-radius: 2px; }
.vc-dual-fill-b { height: 100%; background: #3b82f6; border-radius: 2px; }
.vc-dual-val {
  font-family: 'Bebas Neue', sans-serif; font-size: 11px;
  color: rgba(255,255,255,.5); width: 22px; text-align: right; flex-shrink: 0;
}

/* ── Score hero (resultado partido) ──────────────────────────────── */
.vc-score-row { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 8px 0; }
.vc-score-team { text-align: center; flex: 1; }
.vc-score-team-name { font-family: 'Bebas Neue', sans-serif; font-size: 14px; color: rgba(255,255,255,.5); letter-spacing: 1px; }
.vc-score-num { font-family: 'Bebas Neue', sans-serif; font-size: 64px; line-height: 1; color: #fff; }
.vc-score-sep { font-family: 'Bebas Neue', sans-serif; font-size: 32px; color: rgba(255,255,255,.2); }

/* ── Footer ───────────────────────────────────────────────────────── */
.vc-footer {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between;
  padding-top: 10px; border-top: 1px solid rgba(255,255,255,.07); flex-shrink: 0;
}
.vc-footer-logo { font-family: 'Bebas Neue', sans-serif; font-size: 13px; color: #FF6600; letter-spacing: 1.5px; }
.vc-footer-tag    { font-size: 8.5px; color: rgba(255,255,255,.2); font-family: 'Inter', sans-serif; }
.vc-footer-season { font-size: 8.5px; color: rgba(255,255,255,.2); font-family: 'Inter', sans-serif; }

/* ── ACTION BAR — 2 botones export unificados ──────────────────── */
.vcf-action-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
/* Botón Scout Card — primario naranja */
.vcf-btn-scout {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #FF6600;
  color: #000;
  border: none;
  border-radius: 6px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 0 16px;
  height: 36px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity 200ms ease, transform 200ms ease;
  -webkit-font-smoothing: antialiased;
}
.vcf-btn-scout svg { width: 14px; height: 14px; flex-shrink: 0; }
@media (hover: hover) and (pointer: fine) {
  .vcf-btn-scout:hover { opacity: .85; }
}
.vcf-btn-scout:active { transform: scale(0.97); }

/* Botón Twitter/X — secundario oscuro */
.vcf-btn-twitter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,.07);
  color: #e7e7e7;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 6px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 0 16px;
  height: 36px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease, transform 200ms ease;
  -webkit-font-smoothing: antialiased;
}
.vcf-btn-twitter svg { width: 13px; height: 13px; flex-shrink: 0; }
@media (hover: hover) and (pointer: fine) {
  .vcf-btn-twitter:hover {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.22);
    color: #fff;
  }
}
.vcf-btn-twitter:active { transform: scale(0.97); }
