/* ══════════════════════════════════════════════════════════════════
   Matches — list & detail
   ══════════════════════════════════════════════════════════════════ */

/* ── Match list — cards ─────────────────────────────────────────── */

.match-list {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.match-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .9rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: background .15s, border-color .15s, transform .12s;
  cursor: pointer;
}

.match-card:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  transform: translateX(4px);
}

/* ── ID badge ───────────────────────────────────────────────────── */

.mc-id {
  min-width: 3.2rem;
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: .05em;
  flex-shrink: 0;
}

/* ── Winner block ───────────────────────────────────────────────── */

.mc-winner {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex: 1;
  min-width: 0;
}

.mc-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.mc-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.mc-avatar-fb {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 800;
  background: var(--accent);
  border-radius: 50%;
  color: #fff;
}

.mc-winner-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

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

.mc-mmr {
  font-size: .76rem;
  color: var(--text-muted);
  margin-top: .05rem;
}

.mc-delta {
  font-size: .85rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Meta chips ─────────────────────────────────────────────────── */

.mc-meta {
  display: flex;
  gap: .4rem;
  flex-shrink: 0;
}

.mc-chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .22rem .65rem;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 600;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
}

.mc-chip-icon {
  width: 11px;
  height: 11px;
  opacity: .7;
  flex-shrink: 0;
}

/* ── Arrow ──────────────────────────────────────────────────────── */

.mc-arrow {
  font-size: 1.35rem;
  line-height: 1;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color .15s;
}

.match-card:hover .mc-arrow {
  color: var(--accent);
}

/* ── Responsive ─────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .mc-meta   { display: none; }
  .mc-id     { min-width: 2.2rem; }
  .match-card { gap: .7rem; padding: .75rem .9rem; }
}


/* ══════════════════════════════════════════════════════════════════
   Match detail
   ══════════════════════════════════════════════════════════════════ */

/* ── Header ─────────────────────────────────────────────────────── */

.match-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: .75rem;
}

.match-id-badge {
  display: inline-block;
  font-size: 1.3rem;
  color: var(--accent);
}

/* Stat chips row under the title */
.match-stat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: 1.5rem;
}

.match-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .28rem .75rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* ── Podium ─────────────────────────────────────────────────────── */

.match-podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
}

.podium-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  min-width: 130px;
}

.podium-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  overflow: hidden;
  position: relative;
}

.podium-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.podium-avatar-fallback {
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: 800;
}

.podium-gold   .podium-avatar { width: 68px; height: 68px; font-size: 1.3rem; background: var(--gold);   }
.podium-silver .podium-avatar { background: var(--silver); }
.podium-bronze .podium-avatar { background: var(--bronze); }

.podium-name {
  font-weight: 700;
  font-size: .95rem;
  color: var(--text);
  text-align: center;
}
.podium-name:hover { color: var(--accent); }

.podium-medal  { font-size: 1.5rem; }
.podium-gold   .podium-medal { font-size: 2rem; }

.podium-mmr {
  font-size: .82rem;
  color: var(--text-muted);
}

.podium-bar {
  width: 100%;
  border-radius: 6px 6px 0 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-bottom: none;
}

.podium-gold   .podium-bar { height: 80px; border-color: var(--gold);   background: rgba(255,213,0,.08);   }
.podium-silver .podium-bar { height: 55px; border-color: var(--silver); background: rgba(192,192,192,.08); }
.podium-bronze .podium-bar { height: 40px; border-color: var(--bronze); background: rgba(205,127,50,.08);  }

/* ── Ranking table player cell ──────────────────────────────────── */

.match-player-cell {
  display: flex;
  align-items: center;
  gap: .55rem;
}

.match-rank-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.match-rank-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.match-rank-avatar-fb {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .55rem;
  font-weight: 800;
  background: var(--accent);
  border-radius: 50%;
  color: #fff;
}
