.match-card { 
  padding: 0; 
  overflow: hidden;
  background: linear-gradient(125deg, 
    rgba(44, 20, 72, 0.95),
    rgba(15, 10, 29, 0.95)
  );
  border-radius: 16px;
  box-shadow: 0 3px 10px rgba(0,0,0,.08);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.1);
  margin-bottom: 16px;
}

.match-header {
  display: flex; 
  align-items: center; 
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,.15);
}

.match-title { 
  font-weight: 700;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.3rem;
  color: rgba(255,255,255,.95);
  letter-spacing: 0.02em;
}

.match-score { 
  font-weight: 700; 
  color: rgba(255,255,255,.95);
  font-size: 1.2rem;
  font-family: 'Rajdhani', sans-serif;
}

.match-body { 
  display: none; 
  background: rgba(255,255,255,.04);
}

.match-body.open { 
  display: block; 
}

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

.team-col { 
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  padding: 12px 16px;
  backdrop-filter: blur(4px);
}

.team-name {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: rgba(255,255,255,.95);
  margin-bottom: 12px;
  display: block;
  letter-spacing: 0.02em;
}

.group { 
  margin-top: 12px; 
}

.group-title {
  font-size: 1rem;
  color: rgba(255,255,255,.85);
  margin: 16px 0 8px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.player-row {
  display: grid;
  grid-template-columns: 68px 1fr 64px;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  transition: background-color 0.2s ease;
}

.player-row:hover {
  background: rgba(255,255,255,.08);
}

.player-row:last-child {
  border-bottom: none;
}

.pos {
  display: inline-block;
  font-size: .75rem;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 700;
  min-width: 40px;
  text-align: center;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.9);
  margin-right: 8px;
  backdrop-filter: blur(4px);
}

.pmeta { 
  color: rgba(255,255,255,.7); 
  font-size: .9rem;
}

/* Player names */
.player-name {
  color: rgba(255,255,255,.95);
  text-decoration: none;
  transition: opacity 0.2s ease;
  cursor: pointer;
}

.player-name:hover {
  opacity: 0.8;
}

.pts { 
  text-align: right; 
  font-weight: 700;
  color: rgba(255,255,255,.95);
  font-variant-numeric: tabular-nums;
  justify-self: end;
}

.match-left { 
  display: flex; 
  flex-direction: column; 
  gap: 2px; 
}

.match-avg { 
  font-size: 0.9em;
  color: rgba(255,255,255,.7);
}

/* Player name styling */
.name-link {
  color: rgba(255,255,255,.95);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.name-link:hover {
  opacity: 0.8;
}

/* --- Horizontal scroller for wide matchup grids (mobile-friendly) --- */
/* Scroll only when needed; keep symmetrical gutters */
/* Keep header at 16px; match body to it */
.match-header { padding: 14px 16px; }
.match-body   { padding: 0 16px 16px; }  /* <<< consistent side padding */

/* Scroller: visually align to card edges, but preserve inner gutters */
.match-scroller {
  margin: 0 -16px;          /* stretch to the card border */
  padding: 0 16px 8px;      /* restore equal L/R gutters inside */
  overflow-x: auto;
  overflow-y: hidden;
  width: auto;              /* not forced; follows container */
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable both-edges;
}

/* Scrollbar styling */
.match-scroller::-webkit-scrollbar { 
  height: 8px; 
}

.match-scroller::-webkit-scrollbar-track { 
  background: transparent; 
}

.match-scroller::-webkit-scrollbar-thumb { 
  background: rgba(255,255,255,.2);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.match-scroller::-webkit-scrollbar-thumb:hover { 
  background: rgba(255,255,255,.3);
}

@supports (scrollbar-width: thin) {
  .match-scroller { 
    scrollbar-width: thin; 
    scrollbar-color: rgba(255,255,255,.2) transparent; 
  }
}

/* Grid: fills when wide, scrolls when narrow (no extra padding here) */
.match-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 12px;
  width: 100%;
}

@media (max-width: 900px){
  .match-grid { grid-template-columns: repeat(2, minmax(300px, 1fr)); }
}
@media (max-width: 700px){
  .match-grid { grid-template-columns: repeat(2, minmax(260px, 1fr)); }
}

