/* ── Season badge ────────────────────────────────────────── */
.mcl-season-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  margin-left: 10px;
  vertical-align: middle;
  background: rgba(82,214,138,0.1);
  border: 1px solid rgba(82,214,138,0.3);
  color: #52d68a;
}
.mcl-season-badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #52d68a;
  animation: mclPulse 1.4s ease-in-out infinite;
}
@keyframes mclPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

/* ── Teams grid ──────────────────────────────────────────── */
.mcl-teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.mcl-team-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 12px;
  text-align: center;
}

.mcl-team-logo {
  width: 56px; height: 56px;
  border-radius: 10px;
  object-fit: contain;
  background: var(--surf2);
  border: 1px solid var(--border2);
  padding: 6px;
}

.mcl-team-logo-fallback {
  width: 56px; height: 56px;
  border-radius: 10px;
  background: var(--surf2);
  border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--accent);
}

.mcl-team-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  word-break: break-word;
}

.mcl-team-card { cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.mcl-team-card:hover { border-color: var(--accent); background: var(--surf2); }

/* ── Match list ──────────────────────────────────────────── */
.mcl-match-list { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }

.mcl-match-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  position: relative;
}

.mcl-match-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 92px;
  flex-shrink: 0;
}
.mcl-match-date  { font-size: 0.75rem; color: var(--muted); font-weight: 600; }
.mcl-stage-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--dim);
}

.mcl-match-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.mcl-match-teams {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-width: 0;
}

.mcl-match-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.mcl-match-team {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.mcl-match-team.right { flex-direction: row-reverse; text-align: right; }
.mcl-match-team.clickable { cursor: pointer; }
.mcl-match-team.clickable .mcl-match-team-name:hover { color: var(--accent); text-decoration: underline; }

.mcl-team-logo-sm {
  width: 32px; height: 32px;
  border-radius: 7px;
  object-fit: contain;
  background: var(--surf2);
  border: 1px solid var(--border2);
  padding: 3px;
  flex-shrink: 0;
}
.mcl-team-logo-sm-fallback {
  width: 32px; height: 32px;
  border-radius: 7px;
  background: var(--surf2);
  border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--accent);
  flex-shrink: 0;
}

.mcl-match-team-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.mcl-match-team.winner .mcl-match-team-name { color: var(--accent); }

/* Per-team score — hidden on desktop (the centered .mcl-score-block is used
   instead), shown inline on mobile where teams stack into their own rows. */
.mcl-match-team-score {
  display: none;
  font-family: var(--font-cond);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text);
  flex-shrink: 0;
}
.mcl-match-team.winner .mcl-match-team-score { color: var(--accent); }

.mcl-score-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
  min-width: 64px;
}

.mcl-score-block {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-cond);
  font-weight: 900;
  font-size: 1.3rem;
  justify-content: center;
}
.mcl-score-block .sep { color: var(--dim); font-size: 1rem; }
.mcl-score-loser { color: var(--muted); }
.mcl-score-winner { color: var(--accent); }

.mcl-match-maps {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  font-size: 0.66rem;
  color: var(--dim);
  white-space: nowrap;
  text-align: center;
}

.mcl-vs {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--dim);
  flex-shrink: 0;
  min-width: 64px;
  text-align: center;
}

.mcl-status-badge {
  flex-shrink: 0;
  width: 88px;
  text-align: right;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.mcl-status-upcoming { color: #52d68a; }
.mcl-status-completed { color: var(--dim); }

.mcl-faceit-link {
  flex-shrink: 0;
  color: var(--dim);
  font-size: 0.9rem;
  transition: color 0.15s;
  margin-left: 4px;
}
.mcl-faceit-link:hover { color: var(--accent); }

/* ── Responsive ──────────────────────────────────────────── */
/* Below this width there isn't room to lay both teams out side by side with
   real (long) team names, so each match row switches from
   [meta] [team — score — team] [status] all on one line to a fully stacked
   card: meta on top, each team on its own row with its own score on the
   right, then the map line and status/link at the bottom. */
@media (max-width: 640px) {
  .mcl-match-row { flex-direction: column; align-items: stretch; gap: 10px; padding: 14px; }

  .mcl-match-meta { width: auto; flex-direction: row; gap: 8px; }

  .mcl-match-teams { flex-direction: column; align-items: stretch; gap: 8px; }
  .mcl-match-team,
  .mcl-match-team.right { flex-direction: row; text-align: left; justify-content: flex-start; }
  .mcl-match-team-name { font-size: 0.85rem; flex: 1; }
  .mcl-match-team-score { display: inline-block; }

  .mcl-score-col, .mcl-vs { display: none; }
  .mcl-match-maps { align-items: flex-start; text-align: left; }

  .mcl-match-footer { justify-content: space-between; }
  .mcl-status-badge { width: auto; text-align: left; }
  .mcl-faceit-link { margin-left: 0; }

  .mcl-teams-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}

/* ── Team roster modal ──────────────────────────────────── */
.mcl-modal-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.65);
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.mcl-modal-box {
  background: var(--surf);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 420px;
  max-height: 85vh;
  overflow-y: auto;
}

.mcl-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
}
.mcl-modal-header > div:first-child { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }

.mcl-modal-team-name {
  font-family: var(--font-cond);
  font-size: 1.2rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text);
}

.mcl-team-faceit-link {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--accent);
  margin-top: 3px;
}
.mcl-team-faceit-link:hover { text-decoration: underline; }

.mcl-modal-close {
  background: none; border: none;
  color: var(--muted); cursor: pointer;
  font-size: 1rem; padding: 4px 8px;
  border-radius: 4px; transition: color 0.15s;
  flex-shrink: 0;
}
.mcl-modal-close:hover { color: var(--text); }

.mcl-modal-body { padding: 18px 22px 22px; }

.mcl-roster-group { margin-bottom: 18px; }
.mcl-roster-group:last-child { margin-bottom: 0; }

.mcl-roster-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.mcl-roster-player {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  transition: opacity 0.15s;
}
.mcl-roster-player:hover { opacity: 0.8; }
.mcl-roster-player:hover .mcl-player-name { color: var(--accent); text-decoration: underline; }

.mcl-player-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surf2);
  border: 1px solid var(--border2);
  flex-shrink: 0;
}
.mcl-player-avatar-fallback {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--surf2);
  border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--accent);
  flex-shrink: 0;
}

.mcl-player-name { font-size: 0.86rem; color: var(--text); }

.mcl-roster-empty { font-size: 0.85rem; color: var(--muted); }

/* ── View toggle (Results / Standings) ──────────────────── */
.mcl-view-toggle-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 40px;
}

.mcl-view-toggle {
  display: flex;
  gap: 4px;
  background: var(--surf);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 3px;
}

.mcl-view-btn {
  padding: 7px 16px;
  border-radius: 6px;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.mcl-view-btn:hover  { color: var(--text); }
.mcl-view-btn.active { background: var(--accent-g); color: var(--accent); }

/* ── Standings table ─────────────────────────────────────── */
.mcl-standings-team { cursor: pointer; }
.mcl-standings-team:hover { color: var(--accent); }

/* Scroll horizontally instead of squeezing columns unreadably on narrow
   screens — same pattern as the Tournaments leaderboard table. */
#leagueTableWrap { -webkit-overflow-scrolling: touch; }
#leagueTableWrap table { width: max-content; min-width: 100%; }

/* ── Playoff bracket ─────────────────────────────────────── */
.mcl-bracket {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.mcl-bracket-round {
  flex: 1;
  min-width: 300px;
}

.mcl-bracket-round-title {
  font-family: var(--font-cond);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
  text-align: center;
}

.mcl-bracket-matches { display: flex; flex-direction: column; gap: 10px; }

.mcl-bm { padding: 12px 14px; }

.mcl-bm-teams {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mcl-bm-teams .mcl-match-team { flex: 1; min-width: 0; }

.mcl-bm-score {
  font-family: var(--font-cond);
  font-weight: 800;
  font-size: 1rem;
  color: var(--text);
  flex-shrink: 0;
  min-width: 40px;
  text-align: center;
}

.mcl-bm-date {
  font-size: 0.7rem;
  color: var(--dim);
  text-align: center;
  margin-top: 8px;
}

@media (max-width: 640px) {
  .mcl-view-toggle-row { justify-content: stretch; }
  .mcl-view-toggle { width: 100%; }
  .mcl-view-btn { flex: 1; }
  .mcl-bracket { flex-direction: column; }
  .mcl-bracket-round { min-width: 0; }

  .mcl-bm-teams { flex-direction: column; align-items: stretch; gap: 8px; }
  .mcl-bm-score { display: none; }
}
