/* ═══════════════════════════════════════════════════════════════
   FÚTBOL ARGENTINA — styles.css
   Mobile-first · CSS Variables · Flexbox + Grid
   Breakpoints: 320 / 480 / 768 / 1024 / 1280
═══════════════════════════════════════════════════════════════ */

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul, ol { list-style: none; }

/* ── CSS VARIABLES ── */
:root {
  /* Global dark theme */
  --bg:           #0a0a0f;
  --bg-2:         #111118;
  --bg-3:         #1a1a24;
  --bg-card:      #16161e;
  --border:       rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.18);
  --text:         #e8e8f0;
  --text-2:       #9090a8;
  --text-3:       #6060780;
  --accent:       #f0f0ff;
  --shadow:       0 4px 24px rgba(0,0,0,0.5);
  --shadow-lg:    0 12px 48px rgba(0,0,0,0.7);
  --radius:       12px;
  --radius-sm:    8px;
  --radius-lg:    20px;
  --transition:   0.22s cubic-bezier(0.4, 0, 0.2, 1);

  /* Boca theme */
  --boca-primary:   #003082;
  --boca-secondary: #f5c518;
  --boca-light:     #1a4aab;
  --boca-bg:        #06091a;
  --boca-glow:      rgba(0, 48, 130, 0.4);

  /* Seleccion theme */
  --sel-primary:    #74b9e8;
  --sel-secondary:  #ffffff;
  --sel-accent:     #5aa0d4;
  --sel-bg:         #050d1a;
  --sel-glow:       rgba(116, 185, 232, 0.35);

  /* Status colors */
  --win:   #22c55e;
  --draw:  #eab308;
  --loss:  #ef4444;
  --next:  #818cf8;

  /* Spacing scale */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Header height */
  --header-h: 60px;
}

/* ═══════════════════════════════════════════
   HEADER
═══════════════════════════════════════════ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(10,10,15,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: background var(--transition);
}

.site-header.scrolled {
  background: rgba(10,10,15,0.98);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-md);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.logo-icon {
  font-size: 1.4rem;
  animation: spinSlow 8s linear infinite;
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.logo strong { color: var(--boca-secondary); }

/* Desktop nav */
.main-nav {
  display: none;
  align-items: center;
  gap: var(--space-xs);
}

.nav-link {
  padding: 0.4rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-2);
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: var(--bg-3);
}

.nav-boca.active { color: var(--boca-secondary); background: rgba(0,48,130,0.3); }
.nav-seleccion.active { color: var(--sel-primary); background: rgba(116,185,232,0.15); }

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--bg-3);
  transition: background var(--transition);
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display: flex;
  flex-direction: column;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4,0,0.2,1);
}

.mobile-menu.open { max-height: 240px; }

.mobile-link {
  padding: var(--space-md) var(--space-lg);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
  transition: all var(--transition);
}

.mobile-link:last-child { border-bottom: none; }
.mobile-link:active { background: var(--bg-3); }
.mobile-boca { color: var(--boca-secondary); }
.mobile-seleccion { color: var(--sel-primary); }

/* ═══════════════════════════════════════════
   MAIN
═══════════════════════════════════════════ */
#app {
  min-height: calc(100vh - var(--header-h));
  padding-top: var(--header-h);
}

/* ── VIEW SYSTEM ── */
.view {
  display: none;
  min-height: calc(100vh - var(--header-h));
  animation: fadeIn 0.3s ease;
}

.view.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════
   HOME / HERO
═══════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl) var(--space-md);
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 0%, rgba(26,74,171,0.15) 0%, transparent 60%),
              var(--bg);
}

.hero-bg-text {
  position: absolute;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: clamp(8rem, 30vw, 22rem);
  color: rgba(255,255,255,0.025);
  letter-spacing: -0.05em;
  user-select: none;
  pointer-events: none;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 680px;
}

.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: var(--space-md);
}

.hero-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(3.2rem, 12vw, 7rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: var(--space-lg);
}

.hero-accent {
  background: linear-gradient(135deg, var(--boca-secondary) 0%, var(--sel-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  color: var(--text-2);
  margin-bottom: var(--space-2xl);
  line-height: 1.6;
}

/* Hero buttons */
.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
  width: 100%;
}

.btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 1rem 1.8rem;
  border-radius: var(--radius);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  width: 100%;
  max-width: 340px;
  justify-content: space-between;
  transition: all var(--transition);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--transition);
}

.btn:active { transform: scale(0.98); }

.btn-boca {
  background: linear-gradient(135deg, var(--boca-primary), var(--boca-light));
  color: var(--boca-secondary);
  border-color: var(--boca-light);
  box-shadow: 0 4px 20px rgba(0,48,130,0.4);
}

.btn-seleccion {
  background: linear-gradient(135deg, #0a1a2e, #0d2444);
  color: var(--sel-primary);
  border-color: rgba(116,185,232,0.3);
  box-shadow: 0 4px 20px rgba(116,185,232,0.15);
}

.btn-label { flex: 1; text-align: left; }
.btn-arrow { font-size: 1.1rem; transition: transform var(--transition); }
.btn-icon { font-size: 1rem; }

/* Quick stats */
.quick-stats {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 0;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.quick-stats::-webkit-scrollbar { display: none; }

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-md) var(--space-xl);
  border-right: 1px solid var(--border);
  min-width: 140px;
}

.stat-item:last-child { border-right: none; }

.stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-2);
  font-weight: 600;
}

.stat-value {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 2px;
}

/* Hero decorations */
.hero-decoration { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 1; }

.deco-circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--border);
  animation: pulseSlow 6s ease-in-out infinite;
}

.c1 {
  width: 600px; height: 600px;
  top: -200px; right: -200px;
  border-color: rgba(0,48,130,0.15);
  animation-delay: 0s;
}

.c2 {
  width: 400px; height: 400px;
  bottom: -100px; left: -100px;
  border-color: rgba(116,185,232,0.1);
  animation-delay: 3s;
}

.deco-line {
  position: absolute;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245,197,24,0.2), transparent);
  top: 50%;
}

@keyframes pulseSlow {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.05); opacity: 1; }
}

/* ═══════════════════════════════════════════
   SECTION STRUCTURE (Boca & Selección)
═══════════════════════════════════════════ */
.section-watermark {
  position: fixed;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: clamp(8rem, 25vw, 18rem);
  opacity: 0.03;
  user-select: none;
  pointer-events: none;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  letter-spacing: 0.05em;
  color: var(--text);
  white-space: nowrap;
  z-index: 0;
}

.section-header {
  position: relative;
  z-index: 1;
  padding: var(--space-2xl) var(--space-md) var(--space-lg);
  text-align: center;
}

.section-badge {
  display: inline-block;
  padding: 0.3rem 1rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

.badge-boca {
  background: rgba(0,48,130,0.3);
  color: var(--boca-secondary);
  border: 1px solid rgba(245,197,24,0.3);
}

.badge-seleccion {
  background: rgba(116,185,232,0.15);
  color: var(--sel-primary);
  border: 1px solid rgba(116,185,232,0.3);
}

.section-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(2rem, 8vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1;
}

.theme-boca .section-title { color: var(--boca-secondary); }
.theme-seleccion .section-title { color: var(--sel-primary); }

.section-subtitle {
  font-size: 0.9rem;
  color: var(--text-2);
  margin-top: var(--space-sm);
}

/* ── THEME BACKGROUNDS ── */
.theme-boca {
  background: radial-gradient(ellipse at 30% 20%, rgba(0,48,130,0.12) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(245,197,24,0.05) 0%, transparent 50%),
              var(--bg);
}

.theme-seleccion {
  background: radial-gradient(ellipse at 70% 20%, rgba(116,185,232,0.1) 0%, transparent 50%),
              radial-gradient(ellipse at 30% 80%, rgba(255,255,255,0.04) 0%, transparent 50%),
              var(--bg);
}

/* ═══════════════════════════════════════════
   TAB NAVIGATION
═══════════════════════════════════════════ */
.tab-nav {
  display: flex;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0 var(--space-md) var(--space-lg);
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.tab-btn {
  padding: 0.5rem 1.2rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-2);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all var(--transition);
  white-space: nowrap;
}

.tab-btn:active { transform: scale(0.97); }

.theme-boca .tab-btn.active {
  background: var(--boca-primary);
  color: var(--boca-secondary);
  border-color: var(--boca-secondary);
}

.theme-seleccion .tab-btn.active {
  background: rgba(116,185,232,0.2);
  color: var(--sel-primary);
  border-color: var(--sel-primary);
}

.tab-content { display: none; padding: 0 var(--space-md) var(--space-3xl); position: relative; z-index: 2; }
.tab-content.active { display: block; animation: fadeIn 0.25s ease; }

/* ═══════════════════════════════════════════
   LOADER & ERROR
═══════════════════════════════════════════ */
.content-loader,
.content-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-3xl) var(--space-md);
  text-align: center;
  color: var(--text-2);
  font-size: 0.9rem;
}

.hidden { display: none !important; }

.loader-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--boca-secondary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.theme-seleccion .loader-spinner { border-top-color: var(--sel-primary); }

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

.error-icon { font-size: 2rem; }

.btn-retry {
  padding: 0.5rem 1.2rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--bg-3);
  color: var(--text);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.btn-retry:hover { background: var(--bg-card); border-color: var(--border-hover); }

/* ═══════════════════════════════════════════
   MATCH CARDS
═══════════════════════════════════════════ */
.matches-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-sm);
  max-width: 860px;
  margin: 0 auto;
}

.match-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-md) var(--space-lg);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.match-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
  transition: background var(--transition);
}

.match-card.status-win::before   { background: var(--win); }
.match-card.status-draw::before  { background: var(--draw); }
.match-card.status-loss::before  { background: var(--loss); }
.match-card.status-next::before  { background: var(--next); }
.match-card.status-live::before  { background: var(--win); animation: blinkBar 1s infinite; }

@keyframes blinkBar { 0%,100%{opacity:1} 50%{opacity:0.3} }

.match-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
}

.match-competition {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
}

.match-date {
  font-size: 0.75rem;
  color: var(--text-2);
}

.match-status-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
}

.match-status-badge.win  { background: rgba(34,197,94,0.15);  color: var(--win);  border: 1px solid rgba(34,197,94,0.3); }
.match-status-badge.draw { background: rgba(234,179,8,0.15);  color: var(--draw); border: 1px solid rgba(234,179,8,0.3); }
.match-status-badge.loss { background: rgba(239,68,68,0.15);  color: var(--loss); border: 1px solid rgba(239,68,68,0.3); }
.match-status-badge.next { background: rgba(129,140,248,0.15);color: var(--next); border: 1px solid rgba(129,140,248,0.3); }
.match-status-badge.live { background: rgba(34,197,94,0.2);   color: var(--win);  border: 1px solid rgba(34,197,94,0.5); animation: blinkBar 1s infinite; }

.match-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-sm);
}

.team {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.team.away { flex-direction: row-reverse; text-align: right; }

.team-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: contain;
  background: var(--bg-3);
  flex-shrink: 0;
  loading: lazy;
}

.team-logo-fallback {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
  font-weight: 700;
  color: var(--text-2);
}

.team-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.match-score {
  text-align: center;
  min-width: 60px;
}

.score-display {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--text);
  letter-spacing: 0.05em;
  line-height: 1;
}

.score-time {
  font-size: 0.7rem;
  color: var(--text-2);
  margin-top: 2px;
}

.match-venue {
  margin-top: var(--space-sm);
  font-size: 0.75rem;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ═══════════════════════════════════════════
   STANDINGS TABLE
═══════════════════════════════════════════ */
.standings-container {
  max-width: 720px;
  margin: 0 auto;
}

.standings-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-2);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border);
}

/* On mobile: standings become cards */
.standings-table {
  width: 100%;
  border-collapse: collapse;
  display: none; /* hidden on mobile, shown as cards */
}

.standings-card-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.standing-card {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition);
}

.standing-card.highlight {
  border-color: var(--boca-secondary);
  background: rgba(0,48,130,0.15);
}

.theme-seleccion .standing-card.highlight {
  border-color: var(--sel-primary);
  background: rgba(116,185,232,0.1);
}

.standing-pos {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-2);
  text-align: center;
}

.standing-team {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-width: 0;
}

.standing-team-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.standing-stats {
  display: flex;
  gap: var(--space-md);
  text-align: center;
}

.standing-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 32px;
}

.standing-stat-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-2);
}

.standing-stat-value {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.standing-pts {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--boca-secondary);
}

.theme-seleccion .standing-pts { color: var(--sel-primary); }

/* ═══════════════════════════════════════════
   TIMELINE (Selección)
═══════════════════════════════════════════ */
.timeline-container {
  max-width: 680px;
  margin: 0 auto;
  position: relative;
  padding-left: var(--space-xl);
}

.timeline-container::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--sel-primary), transparent);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-md);
  animation: slideInLeft 0.3s ease both;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 18px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sel-primary);
  border: 2px solid var(--bg);
  transition: transform var(--transition);
}

.timeline-item.status-win::before  { background: var(--win); }
.timeline-item.status-loss::before { background: var(--loss); }
.timeline-item.status-draw::before { background: var(--draw); }
.timeline-item.status-next::before { background: var(--next); }

@keyframes slideInLeft {
  from { opacity:0; transform: translateX(-12px); }
  to   { opacity:1; transform: translateX(0); }
}

/* ═══════════════════════════════════════════
   STATS GRID (Selección)
═══════════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
  max-width: 720px;
  margin: 0 auto;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  text-align: center;
  transition: all var(--transition);
}

.stat-card-value {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--sel-primary);
  line-height: 1;
}

.stat-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-top: var(--space-xs);
}

/* ═══════════════════════════════════════════
   PLAYERS GRID
═══════════════════════════════════════════ */
.players-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-sm);
  max-width: 720px;
  margin: 0 auto;
}

.player-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-md);
  transition: all var(--transition);
}

.player-rank {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--border);
  width: 32px;
  text-align: center;
}

.player-rank.gold   { color: #ffd700; }
.player-rank.silver { color: #c0c0c0; }
.player-rank.bronze { color: #cd7f32; }

.player-photo {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-3);
}

.player-photo-fallback {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--bg-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.player-info { min-width: 0; }

.player-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-position {
  font-size: 0.72rem;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

.player-stats {
  display: flex;
  gap: var(--space-md);
  text-align: center;
}

.player-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.player-stat-value {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--sel-primary);
}

.player-stat-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-2);
}

/* ═══════════════════════════════════════════
   SECTION LABELS (group labels)
═══════════════════════════════════════════ */
.group-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-2);
  padding: var(--space-md) 0 var(--space-sm);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.group-label span {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--boca-secondary);
}

.theme-seleccion .group-label span { background: var(--sel-primary); }

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.site-footer p {
  font-size: 0.8rem;
  color: var(--text-2);
}

.footer-credit a {
  color: var(--boca-secondary);
  font-weight: 600;
  transition: color var(--transition);
}

.footer-credit a:hover { color: var(--text); }

/* ═══════════════════════════════════════════
   TOAST NOTIFICATIONS
═══════════════════════════════════════════ */
#toast-container {
  position: fixed;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: center;
  pointer-events: none;
}

.toast {
  padding: 0.6rem 1.2rem;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--bg-3);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  white-space: nowrap;
}

.toast.success { background: rgba(34,197,94,0.15); color: var(--win); border-color: rgba(34,197,94,0.3); }
.toast.error   { background: rgba(239,68,68,0.15);  color: var(--loss); border-color: rgba(239,68,68,0.3); }
.toast.info    { background: rgba(129,140,248,0.15);color: var(--next); border-color: rgba(129,140,248,0.3); }

@keyframes toastIn  { from { opacity:0; transform: translateY(12px); } to { opacity:1; transform: translateY(0); } }
@keyframes toastOut { from { opacity:1; } to { opacity:0; } }

/* ═══════════════════════════════════════════
   CACHE BADGE
═══════════════════════════════════════════ */
.cache-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  color: var(--text-2);
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 100px;
  margin: 0 auto var(--space-md);
  width: fit-content;
}

/* ═══════════════════════════════════════════
   EMPTY STATE
═══════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: var(--space-3xl) var(--space-md);
  color: var(--text-2);
  font-size: 0.9rem;
}

.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: var(--space-md); }

/* ═══════════════════════════════════════════
   DEMO NOTICE BANNER
═══════════════════════════════════════════ */
.demo-notice {
  background: rgba(129,140,248,0.1);
  border: 1px solid rgba(129,140,248,0.25);
  border-radius: var(--radius);
  padding: var(--space-md) var(--space-lg);
  margin: 0 auto var(--space-lg);
  max-width: 720px;
  font-size: 0.82rem;
  color: var(--next);
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  line-height: 1.5;
}

.demo-notice strong { display: block; margin-bottom: 2px; }

/* ═══════════════════════════════════════════
   RESPONSIVE — 480px+
═══════════════════════════════════════════ */
@media (min-width: 480px) {
  .hero-buttons {
    flex-direction: row;
    justify-content: center;
  }

  .btn { max-width: 260px; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  .players-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — 768px+
═══════════════════════════════════════════ */
@media (min-width: 768px) {
  :root { --header-h: 64px; }

  .main-nav { display: flex; }
  .hamburger { display: none; }
  .mobile-menu { display: none !important; }

  .matches-grid { grid-template-columns: 1fr; }

  .stats-grid { grid-template-columns: repeat(4, 1fr); }

  .players-grid { grid-template-columns: 1fr; }

  .standings-table {
    display: table;
  }

  .standings-card-list {
    display: none;
  }

  .standings-table th,
  .standings-table td {
    padding: var(--space-sm) var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
  }

  .standings-table th {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-2);
    font-weight: 700;
  }

  .standings-table td { color: var(--text); }

  .standings-table tr.highlight td {
    color: var(--boca-secondary);
  }

  .theme-seleccion .standings-table tr.highlight td { color: var(--sel-primary); }

  .tab-nav { gap: var(--space-sm); }

  .timeline-container { padding-left: 2.5rem; }

  .team-name { font-size: 1.1rem; }

  .section-header { padding: var(--space-3xl) var(--space-md) var(--space-xl); }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — 1024px+
═══════════════════════════════════════════ */
@media (min-width: 1024px) {
  .tab-content { padding: 0 var(--space-xl) var(--space-3xl); }

  .matches-grid { grid-template-columns: 1fr; }

  .match-card { padding: var(--space-lg) var(--space-xl); }

  .hero { padding: var(--space-3xl) var(--space-xl); }

  /* Desktop hover effects */
  .btn:hover .btn-arrow { transform: translateX(4px); }

  .match-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
  }

  .tab-btn:hover { color: var(--text); background: var(--bg-3); }

  .player-card:hover { border-color: var(--border-hover); transform: translateX(4px); }
  .stat-card:hover   { border-color: rgba(116,185,232,0.3); transform: translateY(-2px); box-shadow: 0 8px 32px rgba(116,185,232,0.1); }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — 1280px+
═══════════════════════════════════════════ */
@media (min-width: 1280px) {
  .tab-content { padding: 0 0 var(--space-3xl); }

  .section-header { padding: var(--space-3xl) 0 var(--space-xl); }

  #app { max-width: 1280px; margin: 0 auto; padding-left: var(--space-xl); padding-right: var(--space-xl); }

  .matches-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════════════════════════════════
   ACCESSIBILITY
═══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

:focus-visible {
  outline: 2px solid var(--boca-secondary);
  outline-offset: 3px;
  border-radius: 4px;
}
