/* ---------- Logos & avatars ---------- */
.logo { width: 22px; height: 22px; object-fit: contain; flex: none; }
.logo-lg { width: 64px; height: 64px; object-fit: contain; }
.logo-md { width: 36px; height: 36px; object-fit: contain; flex: none; }
.flag { width: 18px; height: 12px; border-radius: 2px; object-fit: cover; flex: none; display: inline-block; vertical-align: -1px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--panel-3); flex: none; }
.avatars { display: flex; }
.avatars img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--panel-3); border: 2px solid var(--panel); margin-left: -8px; }
.avatars img:first-child { margin-left: 0; }

/* ---------- Lists ---------- */
.list { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.row {
  display: grid; grid-template-columns: 70px 1fr auto; gap: 12px; align-items: center;
  padding: 11px 14px; border-top: 1px solid var(--line); cursor: pointer; transition: background .12s;
}
.row:first-child { border-top: 0; }
.row:hover { background: var(--panel-2); }
.time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.time small { display: block; font-size: 11px; }
.live-badge { display: inline-flex; align-items: center; gap: 6px; color: var(--live); font-weight: 800; font-size: 11px; letter-spacing: .5px; }
.live-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--live); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
/* Auto-refresh status: a ring that fills up until the next poll, and a flash on rows whose score changed. */
.refresh-status { display: inline-flex; align-items: center; gap: 7px; font-variant-numeric: tabular-nums; }
.refresh-ring { width: 14px; height: 14px; border-radius: 50%; flex: none; background: conic-gradient(var(--accent) calc(var(--p, 0) * 1turn), var(--panel-3) 0); }
.refresh-ring.busy { background: conic-gradient(var(--accent) .3turn, var(--panel-3) 0); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
.row.flash { animation: row-flash 2s ease-out; }
@keyframes row-flash { from { background: color-mix(in srgb, var(--accent) 30%, transparent); } }
.hero-score.flash { animation: score-flash 1.2s ease-out; }
@keyframes score-flash { from { color: var(--accent); transform: scale(1.12); } }
.teams { min-width: 0; }
.team-line { display: flex; align-items: center; gap: 9px; min-width: 0; height: 24px; }
.team-line .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-line .score { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 700; padding-left: 8px; }
.won .name, .won .score { font-weight: 700; }
.lost { color: var(--muted); }
.leading .score { color: var(--win); }
.maps-won { color: var(--muted); font-weight: 500; }
.event { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 3px; }
.side { text-align: right; color: var(--muted); font-size: 12px; white-space: nowrap; display: grid; gap: 2px; justify-items: end; }
.stars { color: var(--star); letter-spacing: 1px; font-size: 11px; }
.bo { text-transform: uppercase; font-weight: 600; font-size: 11px; background: var(--panel-3); border-radius: 5px; padding: 1px 6px; }
.cur-map { color: var(--text); font-weight: 600; }

.state { padding: 44px 16px; text-align: center; color: var(--muted); }
.state.error { color: var(--lose); }
.state .big { font-size: 28px; margin-bottom: 6px; }
.skeleton { height: 62px; border-top: 1px solid var(--line); position: relative; overflow: hidden; }
.skeleton:first-child { border-top: 0; }
.skeleton::after {
  content: ""; position: absolute; inset: 16px 16px 16px 96px; border-radius: 6px;
  background: linear-gradient(90deg, var(--panel-2), var(--panel-3), var(--panel-2));
  background-size: 200% 100%; animation: shimmer 1.2s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.more-btn { display: block; margin: 14px auto 0; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px;
  transition: transform .15s, border-color .15s, box-shadow .15s; color: var(--text);
}
a.card:hover, .card.clickable:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); box-shadow: var(--shadow); text-decoration: none; cursor: pointer; }
