:root {
  color-scheme: dark;
  --bg: #090b10;
  --surface: #121721;
  --surface-alt: #181e2a;
  --border: #2d3544;
  --text: #edf0f4;
  --muted: #9aa5b4;
  --gold: #cfa95c;
  --gold-bright: #f1cf82;
  --green: #62c98a;
  --red: #d87575;
  --blue: #79b9f2;
  --alliance: #0042ff;
  --horde: #ff0303;
  --player-color: var(--gold-bright);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; color: var(--text); background: radial-gradient(circle at 50% -20%, #263247 0, var(--bg) 42rem); }
a { color: var(--gold-bright); text-decoration: none; }
a:hover, a:focus-visible { color: #fff1c7; text-decoration: underline; }
.site-header { position: sticky; top: 0; z-index: 5; border-bottom: 1px solid var(--border); background: rgba(9, 11, 16, .94); backdrop-filter: blur(10px); }
.header-inner, .page-shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.header-inner { min-height: 68px; display: flex; align-items: center; gap: 24px; justify-content: flex-end; }
.brand { color: var(--gold-bright); font-family: Georgia, serif; font-size: 1.6rem; font-weight: 700; letter-spacing: .12em; }
.brand:hover { text-decoration: none; }
.page-shell { padding: 44px 0 72px; }
.page-shell > section { margin: 0 0 38px; }
.hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; padding: 30px 0 24px; border-bottom: 1px solid var(--border); }
.hero h1, .profile-title h1, .error-page h1 { margin: 5px 0; font-family: Georgia, serif; color: var(--gold-bright); letter-spacing: .035em; }
.hero h1 { font-size: clamp(2.35rem, 4vw, 3.15rem); line-height: 1.05; white-space: nowrap; font-variant-numeric: lining-nums; }
.hero-title-suffix { display: inline-block; position: relative; top: -.015em; vertical-align: baseline; line-height: 1; }
.profile-title h1, .error-page h1 { font-size: clamp(2.4rem, 8vw, 4.4rem); }
.hero p, .profile-title p { margin: 0; }
.bot-status { display: grid; gap: 6px; min-width: 170px; padding: 15px 18px; border: 1px solid var(--border); border-radius: 8px; background: linear-gradient(150deg, #101722, #0c1119); text-align: right; box-shadow: 0 12px 28px rgba(0, 0, 0, .18); }
.bot-status-label { color: var(--muted); font-size: .71rem; font-weight: 700; letter-spacing: .075em; text-transform: uppercase; }
.bot-status-state { display: inline-flex; align-items: center; justify-content: flex-end; gap: 7px; font-size: 1rem; letter-spacing: .04em; text-transform: uppercase; }
.bot-status-state i { width: .62rem; height: .62rem; border-radius: 50%; background: var(--red); box-shadow: 0 0 9px var(--red); }
.bot-status-online .bot-status-state { color: var(--green); }
.bot-status-online .bot-status-state i { background: var(--green); box-shadow: 0 0 9px var(--green); }
.bot-status-offline .bot-status-state { color: var(--red); }
.bot-status-offline .bot-status-state i { background: var(--red); box-shadow: 0 0 9px var(--red); }
.bot-status-age { color: var(--muted); font-size: .78rem; }
.eyebrow { color: var(--gold); letter-spacing: .11em; font-size: .75rem; font-weight: 700; text-transform: uppercase; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin-bottom: 12px; }
.section-heading h2 { margin: 0; font-size: 1.25rem; }
.muted, .subline { color: var(--muted); }
.subline { display: block; font-size: .77rem; margin-top: 2px; }
.live-dot { color: var(--green); font-size: .85rem; }
.live-dot::before { content: ""; display: inline-block; width: .45rem; height: .45rem; margin-right: .35rem; background: var(--green); border-radius: 50%; box-shadow: 0 0 10px var(--green); }
.live-card, .profile-card, .detail-card, .empty-card { border: 1px solid var(--border); border-radius: 9px; background: linear-gradient(150deg, var(--surface-alt), var(--surface)); box-shadow: 0 14px 34px rgba(0, 0, 0, .2); }
.live-card, .profile-card, .detail-card { padding: 20px; }
.lobby-card { border-color: #766035; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.live-game-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.live-game-card { width: 100%; }
.card-topline { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: .8rem; }
.status { padding: 3px 7px; font-size: .71rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border-radius: 4px; }
.status-lobby { color: #201908; background: var(--gold); }
.status-running { color: #031e13; background: var(--green); }
h3 { margin: 15px 0 12px; font-size: 1.08rem; }
.live-game-name { display: flex; align-items: center; gap: 7px; }
.live-game-name > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.copy-game-name { position: relative; display: inline-grid; width: 1.7rem; height: 1.7rem; flex: 0 0 1.7rem; place-items: center; padding: 0; border: 1px solid #465164; border-radius: 4px; color: var(--gold-bright); background: #101722; cursor: pointer; font-size: 1.08rem; line-height: 1; }
.copy-game-name:hover, .copy-game-name:focus-visible { border-color: var(--gold); color: #fff1c7; background: #1a2230; outline: 0; }
.copy-game-name::after { position: absolute; z-index: 25; top: calc(100% + 7px); left: 50%; padding: 5px 7px; border: 1px solid #566275; border-radius: 4px; color: var(--text); background: #101722; box-shadow: 0 10px 20px rgba(0,0,0,.34); font-size: .7rem; font-weight: 700; opacity: 0; pointer-events: none; transform: translate(-50%, -3px); transition: opacity .12s ease, transform .12s ease; white-space: nowrap; }
.copy-game-name[data-copy-state="copied"]::after { color: var(--green); content: "Copied!"; opacity: 1; transform: translate(-50%, 0); }
.copy-game-name[data-copy-state="failed"]::after { color: var(--red); content: "Copy failed"; opacity: 1; transform: translate(-50%, 0); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.facts-wide { grid-template-columns: repeat(3, minmax(140px, 1fr)); }
.facts.live-game-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.facts div, .stats-grid div { min-width: 0; }
dt { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .055em; }
dd { margin: 3px 0 0; overflow-wrap: anywhere; }
.player-list { margin-top: 18px; }
.player-team-groups { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.player-team { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.team-marker, .faction-icon, .history-faction, .match-team-icon, .roster-faction-icon, .winner-faction-icon { display: inline-flex; align-items: center; justify-content: center; color: var(--alliance); }
.faction-artwork { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 3px 7px rgba(0, 0, 0, .38)); }
.team-marker { position: relative; width: 2.75rem; height: 2.75rem; flex: 0 0 2.75rem; padding: 2px; border: 1px solid currentColor; border-radius: 8px; background: #101925; box-shadow: inset 0 0 0 1px rgba(255,255,255,.025); }
.lobby-card .team-marker .faction-artwork,
.live-game-card .team-marker .faction-artwork { transform: scale(1.07); transform-origin: center; }
.team-marker::after { position: absolute; z-index: 30; top: calc(100% + 9px); left: 50%; width: max-content; padding: 7px 9px; border: 1px solid #566275; border-radius: 5px; color: var(--text); background: #101722; box-shadow: 0 12px 24px rgba(0, 0, 0, .38); content: attr(data-team-tooltip); font-size: .72rem; font-weight: 700; letter-spacing: .05em; opacity: 0; pointer-events: none; transform: translate(-50%, -4px); transition: opacity .12s ease, transform .12s ease; white-space: nowrap; }
.team-marker:hover::after, .team-marker:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.team-marker-alliance, .faction-icon-alliance, .history-faction-alliance, .match-team-icon-alliance, .roster-faction-icon-alliance, .winner-faction-icon-alliance { color: var(--alliance); }
.team-marker-horde, .faction-icon-horde, .history-faction-horde, .match-team-icon-horde, .roster-faction-icon-horde, .winner-faction-icon-horde { color: var(--horde); }
.team-marker-horde { background: #1a1014; box-shadow: inset 0 0 0 1px rgba(255,255,255,.025); }
.history-players .player-chip { display: inline-block; margin: 0 4px 4px 0; }
.player-chip { border: 1px solid #3e4859; padding: 5px 8px; border-radius: 4px; color: var(--player-color); background: #10151f; font-size: .88rem; }
.player-chip:hover { background: #202837; }
.live-player-chip { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.slot-badge { display: inline-grid; width: 1.45rem; height: 1.45rem; place-items: center; border-radius: 3px; color: var(--slot-text-color, #fff); background: var(--slot-color, #3e4859); font-size: .75rem; font-weight: 800; line-height: 1; }
.live-player-chip::after { position: absolute; z-index: 20; top: calc(100% + 9px); left: 50%; width: max-content; max-width: 220px; padding: 8px 10px; border: 1px solid #566275; border-radius: 5px; color: var(--text); background: #101722; box-shadow: 0 12px 24px rgba(0, 0, 0, .38); content: attr(data-player-tooltip); font-size: .78rem; line-height: 1.35; opacity: 0; pointer-events: none; transform: translate(-50%, -4px); transition: opacity .12s ease, transform .12s ease; }
.live-player-chip:hover::after, .live-player-chip:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.empty-card { padding: 24px; color: var(--muted); }
.empty-card p { margin: 0 0 7px; }
.breadcrumbs { display: flex; gap: 9px; margin-bottom: 30px; color: var(--muted); font-size: .86rem; }
.profile-title { margin-bottom: 22px; }
.profile-card { margin-bottom: 16px; }
.profile-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--border); padding-bottom: 13px; margin-bottom: 16px; }
.profile-card h2 { margin: 0; font-size: 1.05rem; }
.alias { color: var(--player-color); margin-left: 10px; }
.rank { color: #f1bd38; font-size: clamp(1.55rem, 2.3vw, 1.82rem); font-weight: 800; letter-spacing: -.025em; text-shadow: 0 0 12px rgba(241, 189, 56, .42), 0 2px 12px rgba(0, 0, 0, .3); }
.game-time { color: var(--green); font-weight: 700; font-variant-numeric: tabular-nums; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 18px; margin: 0; }
.stat-card { --stat-accent: #4d8dff; display: flex; min-height: 178px; flex-direction: column; justify-content: space-between; padding: 22px 24px; border: 1px solid var(--border); border-color: color-mix(in srgb, var(--stat-accent) 40%, #2d3544); border-radius: 15px; background: #0d141e; background: radial-gradient(circle at 28% 28%, color-mix(in srgb, var(--stat-accent) 11%, transparent), transparent 35%), linear-gradient(145deg, #111925, #090f18); box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 13px 28px rgba(0, 0, 0, .18); overflow: hidden; }
.stat-value-row { display: flex; align-items: center; gap: 18px; min-height: 76px; }
.stats-grid .stat-card dd { min-width: 0; margin: 0; color: #f5f7fb; font-size: clamp(2.2rem, 3.35vw, 3.1rem); font-weight: 800; letter-spacing: -.045em; line-height: .98; text-shadow: 0 2px 12px rgba(0,0,0,.3); white-space: nowrap; }
.stat-card-compact .stat-value-row { gap: 13px; }
.stat-card-compact .stat-icon { width: 3.65rem; height: 3.65rem; flex-basis: 3.65rem; }
.stats-grid .stat-card-compact dd { font-size: clamp(1.7rem, 2.8vw, 2.55rem); letter-spacing: -.06em; }
.stats-grid .stat-card dt { margin-top: 18px; color: var(--stat-accent); font-size: .91rem; font-weight: 800; letter-spacing: .025em; }
.stat-icon { display: inline-flex; width: 4.4rem; height: 4.4rem; flex: 0 0 4.4rem; align-items: center; justify-content: center; color: var(--stat-accent); filter: drop-shadow(0 0 12px color-mix(in srgb, var(--stat-accent) 65%, transparent)); }
.stat-icon svg { display: block; width: 100%; height: 100%; }
.stat-card[data-stat="games"] { --stat-accent: #287bff; }
.stat-card[data-stat="wins"] { --stat-accent: #f1bd38; }
.stat-card[data-stat="losses"] { --stat-accent: #b8c0cf; }
.stat-card[data-stat="winrate"] { --stat-accent: #a569ff; }
.stat-card[data-stat="kills"] { --stat-accent: #ff8a24; }
.stat-card[data-stat="deaths"] { --stat-accent: #ff0303; }
.stat-card[data-stat="assists"] { --stat-accent: #20c000; }
.stat-card[data-stat="elo"] { --stat-accent: #62d7ff; }
.profile-stats-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px 28px; margin-top: 18px; }
.profile-stats-footer p { margin: 0; }
.profile-stat-rule, .profile-dates { color: var(--muted); font-size: .84rem; font-weight: 400; }
.profile-dates { text-align: right; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; min-width: 660px; background: var(--surface); }
th, td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid #252c38; }
th { background: #171d28; color: var(--muted); font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #18202d; }
.leaderboard-table { min-width: 560px; }
.leaderboard-table th:first-child { width: 90px; }
.leaderboard-table th:nth-child(3) { width: 150px; }
.leaderboard-table th:last-child { width: 190px; }
.leaderboard-rank { display: inline-block; min-width: 2ch; font-weight: 750; font-variant-numeric: tabular-nums; }
.leaderboard-rank-content { display: inline-flex; align-items: center; gap: 8px; }
.stat-icon.leaderboard-crown { width: 1.55rem; height: 1.55rem; flex: 0 0 1.55rem; }
.leaderboard-crown-1 { --stat-accent: #f1bd38; }
.leaderboard-crown-2 { --stat-accent: #b8c0cf; }
.leaderboard-crown-3 { --stat-accent: #cd8d59; }
.leaderboard-player { font-weight: 700; }
.leaderboard-elo { color: var(--text); font-variant-numeric: tabular-nums; }
.leaderboard-server { color: var(--muted); }
.profile-title .leaderboard-rule { margin-top: 7px; }
.colored-player { color: var(--player-color); }
.result-summary { color: var(--muted); margin: 18px 0 0; }
.history-list { display: grid; gap: 11px; }
.history-match { display: grid; grid-template-columns: 56px minmax(0, 1fr) 74px 66px 24px; align-items: center; gap: 14px; min-height: 88px; padding: 13px 17px 13px 13px; border: 1px solid #273344; border-radius: 10px; color: var(--text); background: linear-gradient(135deg, #111b29, #0d141e); box-shadow: 0 9px 21px rgba(0,0,0,.12); transition: border-color .14s ease, transform .14s ease, background .14s ease; }
.history-match:hover, .history-match:focus-visible { color: var(--text); border-color: #356fdb; background: linear-gradient(135deg, #142339, #0f1722); box-shadow: 0 0 0 1px rgba(53,111,219,.18), 0 12px 26px rgba(0,0,0,.2); text-decoration: none; transform: translateY(-1px); }
.history-faction { width: 3rem; height: 3rem; padding: 2px; border: 1px solid currentColor; border-radius: 8px; background: #101925; }
.history-faction .faction-artwork { transform: scale(1.05); transform-origin: center; }
.history-faction-horde { background: #1a1014; }
.history-faction-empty { border-color: transparent; background: transparent; box-shadow: none; }
.history-match-main { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 11px; align-items: baseline; min-width: 0; }
.history-match-main strong { color: var(--gold-bright); font-size: 1.08rem; }
.history-match-main > span { overflow: hidden; color: #d5d9e2; font-size: .9rem; text-overflow: ellipsis; white-space: nowrap; }
.history-match-main small { grid-column: 1 / -1; margin-top: 5px; color: var(--muted); font-size: .78rem; }
.history-match-main small b { color: #8d79d9; padding: 0 3px; }
.history-result { font-size: .83rem; font-weight: 800; letter-spacing: .04em; }
.history-result-win { color: #75dc67; text-shadow: 0 0 12px rgba(78,206,76,.25); }
.history-result-loss { color: #ff5a5a; text-shadow: 0 0 12px rgba(255,3,3,.2); }
.history-duration { color: #d8dce4; font-size: .86rem; font-variant-numeric: tabular-nums; }
.history-chevron { color: #d5dcea; font-size: 1.8rem; font-weight: 300; line-height: 1; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 9px; padding-top: 22px; }
.pagination a, .pagination-disabled, .pagination strong { display: inline-grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--border); border-radius: 5px; background: #101722; font-size: 1.15rem; }
.pagination strong { border-color: #4c55b9; color: #fff; background: #3843a6; font-size: .95rem; }
.pagination-disabled { color: #566071; }
.pagination > span:not(.pagination-disabled) { color: var(--muted); font-size: .8rem; margin: 0 3px; }
.button-link { border: 1px solid var(--border); padding: 7px 10px; border-radius: 4px; }
.match-detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.match-detail-header h1 { margin: 6px 0 11px; color: var(--text); font-size: clamp(1.45rem, 3.4vw, 2.25rem); letter-spacing: -.025em; }
.match-meta { display: flex; flex-wrap: wrap; gap: 0 16px; margin: 0; color: var(--muted); font-size: .84rem; }
.match-meta span { display: inline-flex; align-items: center; }
.match-meta span + span::before { width: 1px; height: .95em; margin-right: 16px; background: #465164; content: ''; }
.winner-panel { display: flex; min-width: 154px; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 12px 15px; border: 1px solid #2955aa; border-radius: 7px; background: linear-gradient(135deg, #122137, #0d1724); color: var(--alliance); text-align: center; }
.winner-panel span { order: 2; color: var(--muted); font-size: .64rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; text-align: center; }
.winner-panel strong { order: 3; font-size: .94rem; letter-spacing: .035em; text-transform: uppercase; text-align: center; }
.winner-panel-horde { border-color: #8a252b; background: linear-gradient(135deg, #291319, #170d11); color: var(--horde); }
.winner-panel .winner-faction-icon { order: 1; width: 2.75rem; height: 2.75rem; }
.match-team-section { width: 100%; max-width: 100%; margin: 0 0 16px; }
.match-team-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; min-width: 0; }
.match-team { min-width: 0; overflow: hidden; border: 1px solid #275fc9; border-radius: 8px; background: linear-gradient(150deg, #101d2d, #0b121b); }
.match-team-horde { border-color: #98262c; background: linear-gradient(150deg, #251318, #0d121a); }
.match-team header { min-height: 65px; padding: 12px 15px; border-bottom: 1px solid rgba(93,147,255,.22); }
.match-team-horde header { border-color: rgba(255,70,70,.2); }
.match-team header > div { display: flex; align-items: center; gap: 10px; color: var(--alliance); }
.match-team-horde header > div { color: var(--horde); }
.match-team h2 { margin: 0; font-size: .93rem; letter-spacing: .035em; text-transform: uppercase; }
.match-team-icon { width: 2.35rem; height: 2.35rem; }
.match-team-icon .faction-artwork { transform: scale(1.15); transform-origin: center; }
.team-player-table { font-size: .84rem; }
.team-player-head, .team-player-row { display: grid; grid-template-columns: minmax(120px, 1fr) 5rem minmax(170px, 1.3fr); align-items: center; min-height: 40px; gap: 8px; padding: 0 14px; }
.team-player-row { min-height: 58px; }
.team-player-table.has-elo .team-player-head, .team-player-table.has-elo .team-player-row { grid-template-columns: minmax(102px, 1fr) 4.75rem minmax(155px, 1.18fr) 4.2rem; }
.team-player-head { min-height: 33px; color: var(--muted); border-bottom: 1px solid rgba(255,255,255,.07); font-size: .66rem; letter-spacing: .05em; text-transform: uppercase; }
.team-player-row + .team-player-row { border-top: 1px solid rgba(255,255,255,.055); }
.team-player-row > span:not(:first-child), .team-player-head > span:not(:first-child) { text-align: center; font-variant-numeric: tabular-nums; }
.team-player-head > span:first-child, .team-player-name { grid-column: 1; }
.team-player-head .team-kda, .team-player-row .team-kda { grid-column: 2; }
.team-player-head .team-stay-heading, .team-player-row .team-stay { grid-column: 3; justify-self: stretch; text-align: left !important; }
.team-kda { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; min-width: 0; }
.team-kda b { font-weight: 600; text-align: center; }
.team-stay { display: grid; width: 100%; gap: 4px; align-self: center; justify-items: start; min-width: 0; }
.team-stay strong { color: #e7ebf3; font-size: .88rem; font-weight: 750; }
.team-stay small { min-width: 0; color: var(--muted); font-size: .73rem; line-height: 1.25; overflow-wrap: anywhere; }
.team-stay small b { color: #7d88a0; padding: 0 2px; }
.team-player-name { display: flex; align-items: center; min-width: 0; gap: 8px; }
.team-player-name a { overflow: hidden; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.roster-faction-icon { width: 1.7rem; height: 1.7rem; flex: 0 0 1.7rem; }
.elo-delta { font-size: .72rem; font-weight: 700; white-space: nowrap; }
.elo-positive { color: #71da69; }.elo-negative { color: #ff5858; }.elo-neutral { color: var(--muted); }
.leaderboard-link { display: inline-flex; align-items: center; justify-content: center; padding: 8px 14px; border: 1px solid #766035; border-radius: 5px; color: var(--gold-bright); background: #111722; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.leaderboard-link:hover, .leaderboard-link:focus-visible { border-color: var(--gold); color: #fff1c7; background: #1a2230; text-decoration: none; outline: 0; }
.player-search { position: relative; display: flex; min-width: min(430px, 68vw); }
.player-search input { min-width: 0; flex: 1; padding: 9px 11px; color: var(--text); border: 1px solid var(--border); border-radius: 5px 0 0 5px; background: #111722; }
.player-search button { padding: 9px 12px; color: #201908; font-weight: 700; border: 0; border-radius: 0 5px 5px 0; background: var(--gold); cursor: pointer; }
.search-results { position: absolute; top: calc(100% + 5px); right: 0; left: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 5px; background: #111722; box-shadow: 0 14px 32px #000; }
.search-results a { display: block; padding: 10px 12px; color: var(--text); font-size: .87rem; }
.search-results a + a { border-top: 1px solid #28303d; }
.search-results a:hover { background: #1d2635; text-decoration: none; }
.search-page-results { display: grid; gap: 8px; }
.result-link { display: flex; justify-content: space-between; gap: 12px; padding: 15px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.result-link span { color: var(--muted); }
.error-page { padding: 70px 0; max-width: 650px; }
.site-footer { padding: 25px 16px; color: var(--muted); text-align: center; border-top: 1px solid var(--border); font-size: .76rem; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; clip: rect(0,0,0,0); overflow: hidden; white-space: nowrap; border: 0; }
@media (max-width: 640px) {
  .header-inner { min-height: auto; padding: 14px 0; align-items: stretch; flex-direction: column; gap: 10px; }
  .leaderboard-link { align-self: flex-start; }
  .leaderboard-table { min-width: 0; }
  .profile-stats-footer { align-items: flex-start; flex-direction: column; gap: 6px; }
  .profile-dates { text-align: left; }
  .player-search { min-width: 0; width: 100%; }
  .page-shell { padding-top: 28px; }
  .hero { align-items: stretch; flex-direction: column; gap: 18px; }
  .bot-status { width: 100%; text-align: left; }
  .bot-status-state { justify-content: flex-start; }
  .facts, .facts-wide, .facts.live-game-facts, .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .player-team-groups { gap: 10px 16px; }
  .stat-card { min-height: 142px; padding: 17px; }
  .stat-value-row { gap: 12px; min-height: 56px; }
  .stat-icon { width: 3.2rem; height: 3.2rem; flex-basis: 3.2rem; }
  .stats-grid .stat-card dd { font-size: clamp(1.72rem, 9.5vw, 2.25rem); }
  .stat-card-compact .stat-value-row { gap: 8px; }
  .stat-card-compact .stat-icon { width: 2.55rem; height: 2.55rem; flex-basis: 2.55rem; }
  .stats-grid .stat-card-compact dd { font-size: clamp(1.12rem, 5vw, 1.7rem); }
  .stats-grid .stat-card dt { margin-top: 12px; font-size: .79rem; }
  .profile-card-head, .section-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
  .history-match { grid-template-columns: 46px minmax(0, 1fr) auto; gap: 10px; min-height: 92px; padding: 11px; }
  .history-faction { width: 2.5rem; height: 2.5rem; }
  .history-result { grid-column: 2; grid-row: 2; align-self: end; }
  .history-duration { grid-column: 3; grid-row: 2; align-self: end; }
  .history-chevron { grid-column: 3; grid-row: 1; align-self: start; }
  .history-match-main { grid-row: 1; }
  .match-detail-header { align-items: stretch; flex-direction: column; }
  .winner-panel { align-self: flex-start; }
  .match-meta { gap: 5px 10px; }
  .match-meta span + span::before { margin-right: 10px; }
  .match-team-grid { grid-template-columns: 1fr; }
  .team-player-head, .team-player-row, .team-player-table.has-elo .team-player-head, .team-player-table.has-elo .team-player-row { grid-template-columns: minmax(76px, 1fr) 3.6rem minmax(110px, 1.18fr); gap: 7px; padding: 0 10px; }
  .team-player-table.has-elo .team-player-head, .team-player-table.has-elo .team-player-row { grid-template-columns: minmax(0, 1fr) 3rem minmax(0, 1.1fr) 3.5rem; gap: 6px; }
  .team-player-row { min-height: 62px; }
  .roster-faction-icon { width: 1.35rem; height: 1.35rem; flex-basis: 1.35rem; }
  .team-player-name { gap: 5px; }
  .team-player-name a { font-size: .76rem; }
  .team-stay small { font-size: .67rem; }
  .table-wrap { border: 0; overflow: visible; }
  table, thead, tbody, tr, th, td { display: block; min-width: 0; }
  thead { display: none; }
  table { background: transparent; }
  tr { margin-bottom: 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); }
  td { display: grid; grid-template-columns: 40% 1fr; border: 0; padding: 8px 11px; }
  td::before { content: attr(data-label); color: var(--muted); font-size: .72rem; text-transform: uppercase; }
  td .subline { grid-column: 2; }
}

@media (min-width: 1160px) {
  .match-team-grid { gap: 18px; }
  .team-player-head, .team-player-row { grid-template-columns: minmax(130px, 1fr) 5.1rem minmax(185px, 1.3fr); gap: 8px; padding: 0 17px; }
  .team-player-table.has-elo .team-player-head, .team-player-table.has-elo .team-player-row { grid-template-columns: minmax(116px, 1fr) 5rem minmax(170px, 1.2fr) 4.6rem; }
}

@media (max-width: 1080px) {
  .match-team-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1159px) and (min-width: 1081px) {
  .team-player-table.has-elo .team-player-head, .team-player-table.has-elo .team-player-row { grid-template-columns: minmax(102px, 1fr) 4.75rem minmax(155px, 1.18fr) 4.2rem; }
}

@media (max-width: 900px) and (min-width: 641px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .hero h1 { white-space: normal; }
}

@media (min-width: 861px) {
  .match-team-icon .faction-artwork { transform: scale(1.3225); }
  .roster-faction-icon .faction-artwork { transform: scale(1.15); transform-origin: center; }
  .team-player-name { gap: 10px; }
  .team-player-name a { font-size: 1rem; }
  .winner-panel .winner-faction-icon .faction-artwork { transform: scale(1.10); transform-origin: center; }
  .lobby-card .team-marker .faction-artwork,
  .live-game-card .team-marker .faction-artwork { transform: scale(1.177); }
}

.live-layout { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; gap: 0; align-items: start; }
.live-main { min-width: 0; }
.chat-panel { display: none !important; width: 279px; height: 439px; min-width: 0; overflow: hidden; border: 0; border-radius: 0; padding: 0; background: transparent; }
.chat-panel > .section-heading { display: none; }
.chatango-mount { position: relative; isolation: isolate; width: 279px; height: 439px; min-width: 0; overflow: hidden; margin: 0 auto; background: #090B10; }
.chatango-mount iframe { position: relative; z-index: 0; display: block; width: 279px !important; height: 439px !important; max-width: 100%; border: 0; }
.chatango-mount::before, .chatango-mount::after { position: absolute; z-index: 1; right: 4px; left: 4px; pointer-events: none; content: ''; }
.chatango-mount::before {
  bottom: 25px;
  height: 36px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cfa95c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h3l1.5-2h7L17 8h3v10H4z'/%3E%3Ccircle cx='12' cy='13' r='3.5'/%3E%3C/svg%3E") left center / 17px 17px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cfa95c' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M4 7h9M17 7h3M4 12h3M11 12h9M4 17h8M16 17h4'/%3E%3Ccircle cx='15' cy='7' r='2'/%3E%3Ccircle cx='9' cy='12' r='2'/%3E%3Ccircle cx='14' cy='17' r='2'/%3E%3C/svg%3E") left 21.5px center / 17px 17px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cfa95c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Cpath d='M9 10h.01M15 10h.01M8.5 14c1 1.5 2.1 2 3.5 2s2.5-.5 3.5-2'/%3E%3C/svg%3E") right 21.5px center / 17px 17px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cfa95c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 6h14M12 6v11M8 18h8'/%3E%3C/svg%3E") right center / 17px 17px no-repeat,
    linear-gradient(#090B10, #090B10) left / 17px 100% no-repeat,
    linear-gradient(#090B10, #090B10) left 21.5px top / 17px 100% no-repeat,
    linear-gradient(#090B10, #090B10) right 21.5px top / 17px 100% no-repeat,
    linear-gradient(#090B10, #090B10) right / 17px 100% no-repeat;
}
.chatango-mount::after {
  bottom: 4px;
  height: 21px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cfa95c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 10v4h4l5 4V6l-5 4zM17 9c1 .8 1.5 1.8 1.5 3S18 14.2 17 15M19 7c1.7 1.3 2.5 3 2.5 5s-.8 3.7-2.5 5'/%3E%3C/svg%3E") left 126.5px center / 18px 18px no-repeat,
    linear-gradient(#090B10, #090B10) left 126.5px top / 19px 100% no-repeat,
    linear-gradient(#090B10, #090B10) left / 45px 100% no-repeat;
}

@media (min-width: 861px) {
  .live-layout { width: 100%; }
  .chat-panel { justify-self: end; transform: translate(30px, 39px); }
}

@media (max-width: 860px) {
  .live-layout { grid-template-columns: 1fr; }
  .live-main { order: 1; }
  .chat-panel { order: 2; justify-self: center; width: min(279px, 100%); height: 439px; min-height: 439px; max-width: 100%; overflow: visible; }
  .chatango-mount { width: 100%; height: 439px; min-height: 439px; overflow: visible; }
  .chatango-mount iframe { display: block !important; width: 100% !important; height: 439px !important; min-height: 439px !important; max-width: 100% !important; }
}
