/* BHML — HLTV.org visual clone */
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap");

* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --hltv-black: #000000;
  --hltv-page: #1b1f23;
  --hltv-box: #2d3844;
  --hltv-box-2: #364250;
  --hltv-box-3: #2a3540;
  --hltv-row: #2f3b47;
  --hltv-row-alt: #2a3642;
  --hltv-row-hover: #3a4856;
  --hltv-border: #1b2129;
  --hltv-inset: #1b2129;
  --hltv-text: #929a9e;
  --hltv-text-strong: #ffffff;
  --hltv-text-muted: #6b737a;
  --hltv-text-soft: #7a848c;
  --hltv-link: #a9b4c0;
  --hltv-prose-link: #7eb3e0;
  --hltv-blue: #2e6eb5;
  --hltv-blue-2: #3b82c4;
  --hltv-blue-dark: #1e4f86;
  --hltv-on-blue: #ffffff;
  --hltv-won: #09c100;
  --hltv-lost: #fc1d1d;
  --hltv-live: #e74c3c;
  --hltv-live-bg: #c0392b;
  --hltv-star: #f0ad4e;
  --hltv-hover-wash: rgba(255, 255, 255, 0.04);
  --hltv-header-grad-top: #3a4a5a;
  --hltv-logo-bar-border: #12161a;
  --hltv-h2h-self-bg: #232a33;
  --hltv-h2h-self-text: #5c6570;
  --hltv-member-sub: #3a4552;
  --hltv-member-tag-text: #cfe0f0;
  --hltv-footer-bg: #12161a;
  --hltv-footer-border: #0c0f12;
  --hltv-footer-text: #6b737a;
  --hltv-footer-link: #7a848c;
  --hltv-swiss-empty: #232a33;
  --hltv-feeder: #4a5561;
  --hltv-dash: #3d4854;
  --hltv-panel-shade: rgba(0, 0, 0, 0.18);
  --hltv-panel-border: #2c3540;
  --content-max: 1360px;
  --left-w: 136px;
  --right-w: 220px;
  --font: "Open Sans", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --hltv-black: #d6dde5;
    --hltv-page: #e8eef4;
    --hltv-box: #ffffff;
    --hltv-box-2: #eef3f8;
    --hltv-box-3: #f5f8fb;
    --hltv-row: #ffffff;
    --hltv-row-alt: #f4f7fa;
    --hltv-row-hover: #e6eef6;
    --hltv-border: #d4dde6;
    --hltv-inset: #e8eef4;
    --hltv-text: #5a6570;
    --hltv-text-strong: #1b242d;
    --hltv-text-muted: #7a8692;
    --hltv-text-soft: #6b7784;
    --hltv-link: #3a6ea8;
    --hltv-prose-link: #1f6bb5;
    --hltv-blue: #2e6eb5;
    --hltv-blue-2: #3b82c4;
    --hltv-blue-dark: #1e4f86;
    --hltv-on-blue: #ffffff;
    --hltv-won: #0a9a08;
    --hltv-lost: #d32020;
    --hltv-live: #d6453a;
    --hltv-live-bg: #c0392b;
    --hltv-star: #c9942e;
    --hltv-hover-wash: rgba(30, 79, 134, 0.06);
    --hltv-header-grad-top: #d9e4ef;
    --hltv-logo-bar-border: #cfd8e2;
    --hltv-h2h-self-bg: #e8eef4;
    --hltv-h2h-self-text: #8a949e;
    --hltv-member-sub: #d7e0ea;
    --hltv-member-tag-text: #e8f2fb;
    --hltv-footer-bg: #dfe6ed;
    --hltv-footer-border: #cfd8e2;
    --hltv-footer-text: #6b7784;
    --hltv-footer-link: #3a6ea8;
    --hltv-swiss-empty: #edf2f7;
    --hltv-feeder: #9aa5b1;
    --hltv-dash: #c5d0db;
    --hltv-panel-shade: rgba(27, 36, 45, 0.04);
    --hltv-panel-border: #d4dde6;
  }
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--hltv-black);
  color: var(--hltv-text);
  font-family: var(--font);
  font-size: 12px;
  line-height: 1.4;
  min-height: 100%;
}

a {
  color: var(--hltv-link);
  text-decoration: none;
}

a:hover {
  color: var(--hltv-text-strong);
  text-decoration: underline;
}

.logo-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background: var(--hltv-inset);
  color: var(--hltv-text-strong);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.hltv-ticker-team .logo-fallback {
  width: 16px;
  height: 16px;
  font-size: 9px;
}

.teamsBox .logo-fallback {
  width: 70px;
  height: 70px;
  font-size: 28px;
  background: var(--hltv-inset);
}

.team-header-hero .logo-fallback {
  width: 72px;
  height: 72px;
  font-size: 28px;
}

.ranking-row .logo-fallback,
.standings-table .logo-fallback,
.match-team .logo-fallback {
  width: 16px;
  height: 16px;
  font-size: 8px;
}

/* ========== TOP NAV ========== */
.hltv-navbar {
  background: var(--hltv-box);
  height: 40px;
  display: flex;
  align-items: stretch;
  justify-content: center;
  border-bottom: 1px solid var(--hltv-border);
}

.hltv-navbar-inner {
  width: 100%;
  max-width: 1400px;
  display: flex;
  align-items: stretch;
  padding: 0 8px;
}

.hltv-nav-links {
  display: flex;
  align-items: stretch;
  flex: 1;
  gap: 0;
}

.hltv-nav-links a,
.hltv-nav-links button {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--hltv-text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 0 14px;
  display: flex;
  align-items: center;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}

.hltv-nav-links a:hover,
.hltv-nav-links button:hover {
  color: var(--hltv-text-strong);
  background: var(--hltv-hover-wash);
  text-decoration: none;
}

.hltv-nav-links a.is-active,
.hltv-nav-links button.is-active {
  color: var(--hltv-text-strong);
  box-shadow: inset 0 -3px 0 var(--hltv-blue);
}

.hltv-nav-search {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.hltv-nav-search input {
  width: 140px;
  height: 26px;
  border: none;
  border-radius: 2px;
  background: var(--hltv-inset);
  color: var(--hltv-text-strong);
  padding: 0 10px;
  font: inherit;
  font-size: 12px;
}

.hltv-nav-search input::placeholder {
  color: var(--hltv-text-muted);
}

/* ========== LOGO + TICKER ========== */
.hltv-logo-bar {
  background: var(--hltv-page);
  display: flex;
  justify-content: center;
  border-bottom: 1px solid var(--hltv-logo-bar-border);
}

.hltv-logo-bar-inner {
  width: 100%;
  max-width: var(--content-max);
  display: grid;
  grid-template-columns: 154px 1fr;
  gap: 8px;
  padding: 8px 0;
  align-items: stretch;
}

.hltv-logo {
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none !important;
  background: var(--hltv-blue);
  height: 60px;
  overflow: hidden;
}

.hltv-logo:hover {
  filter: brightness(1.05);
}

.hltv-logo-mark {
  width: 60px;
  height: 60px;
  object-fit: cover;
  background: var(--hltv-blue-dark);
  flex-shrink: 0;
}

.hltv-logo-text {
  padding: 0 12px;
  color: var(--hltv-on-blue);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.5px;
  line-height: 1;
}

.hltv-logo-text small {
  display: block;
  font-size: 9px;
  font-weight: 600;
  opacity: 0.85;
  letter-spacing: 0.2px;
  margin-top: 4px;
  text-transform: uppercase;
}

.hltv-ticker {
  display: flex;
  gap: 6px;
  overflow: hidden;
}

.hltv-ticker-card {
  flex: 1;
  min-width: 0;
  background: var(--hltv-box);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  text-decoration: none !important;
  color: var(--hltv-text);
}

.hltv-ticker-card:hover {
  background: var(--hltv-box-2);
  color: var(--hltv-text);
}

.hltv-ticker-time {
  color: var(--hltv-text-strong);
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}

.hltv-ticker-meta {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--hltv-text-soft);
}

.hltv-ticker-teams {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hltv-ticker-team {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--hltv-text-strong);
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hltv-ticker-team img {
  width: 16px;
  height: 16px;
  object-fit: cover;
  flex-shrink: 0;
}

/* ========== PAGE SHELL ========== */
.hltv-bg {
  background: var(--hltv-page);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 8px 0 40px;
}

.hltv-width {
  width: 100%;
  max-width: var(--content-max);
  display: grid;
  grid-template-columns: var(--left-w) minmax(0, 1fr) var(--right-w);
  gap: 8px;
  align-items: start;
}

.hltv-width.two-col {
  grid-template-columns: minmax(0, 1fr) var(--right-w);
}

.hltv-width.detail-width {
  grid-template-columns: var(--left-w) minmax(0, 1fr) var(--right-w);
}

/* ========== STANDARD BOX ========== */
.standard-box {
  background: var(--hltv-box);
  margin-bottom: 8px;
}

.standard-box:last-child {
  margin-bottom: 0;
}

.box-headline {
  margin: 0;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--hltv-text-strong);
  background: var(--hltv-box-2);
  border-bottom: 1px solid var(--hltv-border);
}

.box-headline a {
  color: inherit;
  text-decoration: none;
}

.box-headline a:hover {
  text-decoration: underline;
}

.box-body {
  padding: 10px;
}

.season-switcher {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
}

.season-switcher-label {
  color: var(--hltv-text);
  font-size: 11px;
}

.season-select {
  width: 100%;
  appearance: none;
  border: 1px solid var(--hltv-border);
  background: var(--hltv-box-3);
  color: var(--hltv-text-strong);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 28px 7px 10px;
  border-radius: 0;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--hltv-text) 50%),
    linear-gradient(135deg, var(--hltv-text) 50%, transparent 50%);
  background-position: calc(100% - 14px) calc(50% - 2px), calc(100% - 9px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.season-select:hover,
.season-select:focus {
  border-color: var(--hltv-blue);
  outline: none;
}

.sidebar-col,
.right-col,
.content-col {
  min-width: 0;
}

/* ========== LEFT / RIGHT WIDGETS ========== */
.sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--hltv-border);
  color: var(--hltv-text);
  font-size: 11px;
}

.sidebar-list li:last-child {
  border-bottom: none;
}

.sidebar-list strong {
  color: var(--hltv-text-strong);
  font-weight: 700;
}

.map-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
}

.map-tags span {
  background: var(--hltv-box-3);
  color: var(--hltv-text);
  font-size: 11px;
  padding: 3px 7px;
}

.quick-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.quick-links a {
  display: block;
  padding: 7px 10px;
  border-bottom: 1px solid var(--hltv-border);
  color: var(--hltv-link);
  font-size: 12px;
}

.quick-links a:last-child {
  border-bottom: none;
}

.quick-links a:hover {
  background: var(--hltv-row-hover);
  color: var(--hltv-text-strong);
  text-decoration: none;
}

/* Ranking widget */
.ranking-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--hltv-border);
  color: inherit;
  text-decoration: none !important;
}

.ranking-row:hover {
  background: var(--hltv-row-hover);
}

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

.ranking-pos {
  width: 18px;
  color: var(--hltv-text);
  font-weight: 700;
  font-size: 11px;
  text-align: right;
}

.ranking-row img {
  width: 18px;
  height: 18px;
  object-fit: cover;
  flex-shrink: 0;
}

.ranking-name {
  flex: 1;
  min-width: 0;
  color: var(--hltv-text-strong);
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ranking-rate {
  color: var(--hltv-text);
  font-size: 11px;
}

.ranking-more {
  display: block;
  text-align: center;
  padding: 8px;
  color: var(--hltv-text-strong);
  background: var(--hltv-box-2);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none !important;
}

.ranking-more:hover {
  background: var(--hltv-row-hover);
}

/* ========== EVENT / COMPETITION HEADER ========== */
.event-header {
  background: linear-gradient(180deg, var(--hltv-header-grad-top) 0%, var(--hltv-box) 100%);
  margin-bottom: 8px;
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  padding: 14px;
  align-items: center;
}

.event-header-logo {
  width: 96px;
  height: 96px;
  object-fit: cover;
  background: var(--hltv-inset);
  border: 1px solid var(--hltv-inset);
}

.event-header-info h1 {
  margin: 0 0 6px;
  color: var(--hltv-text-strong);
  font-size: 20px;
  font-weight: 700;
}

.event-header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--hltv-text);
  font-size: 12px;
}

.event-header-meta span strong {
  color: var(--hltv-text-strong);
}

.event-tabs {
  display: flex;
  background: var(--hltv-box);
  margin-bottom: 8px;
  border-bottom: 2px solid var(--hltv-blue);
}

.event-tab {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--hltv-text);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  text-transform: none;
  padding: 10px 16px;
  cursor: pointer;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
}

.event-tab:hover {
  color: var(--hltv-text-strong);
  background: var(--hltv-hover-wash);
}

.event-tab.is-active {
  background: var(--hltv-blue);
  color: var(--hltv-on-blue);
}

.event-tab-link {
  margin-left: auto;
}

/* ========== PANELS ========== */
.panel {
  display: none;
}

.panel.is-active {
  display: block;
}

.prose {
  color: var(--hltv-text);
  font-size: 13px;
  line-height: 1.65;
}

.prose p {
  margin: 0 0 10px;
}

.prose a {
  color: var(--hltv-prose-link);
}

.prose strong {
  color: var(--hltv-text-strong);
}

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 12px 0 0;
}

.section-desc {
  margin: 0 0 10px;
  color: var(--hltv-text);
  font-size: 12px;
}

/* ========== MATCHES (HLTV list) ========== */
.matchday-headline {
  background: var(--hltv-box-2);
  color: var(--hltv-text-strong);
  font-size: 12px;
  font-weight: 700;
  padding: 7px 10px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--hltv-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.matchday-headline .live-badge {
  background: var(--hltv-live-bg);
  color: var(--hltv-on-blue);
  font-size: 10px;
  padding: 2px 6px;
  text-transform: uppercase;
}

.matches-section {
  margin-bottom: 8px;
}

.hltv-match {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  background: var(--hltv-row);
  border-bottom: 1px solid var(--hltv-border);
  color: inherit;
  text-decoration: none !important;
  min-height: 40px;
}

.hltv-match:nth-child(even) {
  background: var(--hltv-row-alt);
}

.hltv-match:hover {
  background: var(--hltv-row-hover);
}

.hltv-match.is-live {
  box-shadow: inset 3px 0 0 var(--hltv-live);
}

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

.match-meta .time {
  color: var(--hltv-text-strong);
  font-weight: 700;
  font-size: 11px;
}

.match-meta .time.match-countdown,
.hltv-ticker-time.match-countdown,
.timeAndEvent .time.match-countdown,
.bracket-match-meta .match-countdown,
.match-countdown {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.match-meta .format {
  color: var(--hltv-text);
  font-size: 10px;
  text-transform: lowercase;
}

.match-meta .live-label {
  color: var(--hltv-live);
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
}

.match-teams {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.match-team {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.match-team img {
  width: 16px;
  height: 16px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--hltv-inset);
}

.match-team .name {
  color: var(--hltv-text-strong);
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-scores {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  font-weight: 700;
  font-size: 12px;
  min-width: 48px;
}

.match-scores .score {
  color: var(--hltv-text);
  line-height: 16px;
  min-width: 1.2em;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.match-scores .score.won {
  color: var(--hltv-won);
}

.match-scores .score.lost {
  color: var(--hltv-lost);
}

.match-scores .score-paren {
  margin-left: 3px;
  font-size: 11px;
  font-weight: 700;
  opacity: 0.95;
}

.match-empty {
  padding: 16px 10px;
  text-align: center;
  color: var(--hltv-text);
  background: var(--hltv-box);
}

.competition-switcher {
  display: flex;
  background: var(--hltv-box);
  margin-bottom: 8px;
}

.competition-switch-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--hltv-text);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 9px 14px;
  cursor: pointer;
  flex: 1;
}

.competition-switch-btn:hover {
  color: var(--hltv-text-strong);
  background: var(--hltv-hover-wash);
}

.competition-switch-btn.is-active {
  background: var(--hltv-blue);
  color: var(--hltv-on-blue);
}

.competition-tab {
  display: none;
}

.competition-tab.is-active {
  display: block;
}

/* ========== STANDINGS ========== */
.standings-table {
  width: 100%;
  border-collapse: collapse;
}

.standings-table th {
  background: var(--hltv-box-2);
  color: var(--hltv-text);
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 700;
  text-align: left;
  padding: 7px 8px;
  border-bottom: 1px solid var(--hltv-border);
}

.standings-table td {
  padding: 7px 8px;
  border-bottom: 1px solid var(--hltv-border);
  background: var(--hltv-row);
  vertical-align: middle;
}

.standings-table tr:nth-child(even) td {
  background: var(--hltv-row-alt);
}

.standings-table tr:hover td {
  background: var(--hltv-row-hover);
}

.standings-table tr.qualified td:first-child {
  box-shadow: inset 3px 0 0 var(--hltv-won);
}

.standings-table a.team-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--hltv-text-strong);
  font-weight: 700;
  text-decoration: none !important;
}

.standings-table a.team-link img {
  width: 20px;
  height: 20px;
  object-fit: cover;
}

.standings-rank {
  width: 36px;
  color: var(--hltv-text);
  font-weight: 700;
  text-align: center;
}

.standings-muted {
  color: var(--hltv-text);
  font-size: 11px;
}

/* ========== MULTI-STAGE 赛制 ========== */
#stages-root {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stage-box {
  margin-bottom: 0;
}

.stage-body {
  padding: 10px;
}

.stage-subhead {
  margin: 12px 0 8px;
  color: var(--hltv-text-strong);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.stage-standings .standings-table {
  margin: 0;
}

.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(460px, 1fr));
  gap: 12px;
  align-items: start;
}

.group-box {
  background: var(--hltv-box-2);
  border: 1px solid var(--hltv-border);
  padding: 8px;
}

.group-title {
  margin: 0 0 8px;
  color: var(--hltv-text-strong);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.35px;
}

.group-standings .h2h-wrap {
  margin: 0;
}

.h2h-matrix .h2h-team .team-link-static {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--hltv-text);
  font-weight: 700;
}

.h2h-wrap {
  overflow-x: auto;
}

.h2h-matrix {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}

.h2h-matrix th,
.h2h-matrix td {
  border: 1px solid var(--hltv-border);
  padding: 6px 3px;
  text-align: center;
  vertical-align: middle;
  background: var(--hltv-row);
}

.h2h-matrix thead th {
  background: var(--hltv-box-2);
  color: var(--hltv-text);
  font-size: 11px;
  font-weight: 700;
}

.h2h-matrix tr:nth-child(even) td {
  background: var(--hltv-row-alt);
}

.h2h-matrix tr.qualified td:first-child {
  box-shadow: inset 3px 0 0 var(--hltv-won);
}

.h2h-matrix .standings-rank {
  width: 28px;
  padding: 6px 3px;
}

.h2h-matrix .h2h-team {
  text-align: left;
  width: 120px;
  min-width: 108px;
  padding-left: 6px;
}

.h2h-matrix .h2h-team .team-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--hltv-text-strong);
  font-weight: 700;
  text-decoration: none !important;
  min-width: 0;
}

.h2h-matrix .h2h-team .team-link span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}

.h2h-matrix .h2h-team img,
.h2h-matrix .h2h-team .logo-fallback,
.h2h-matrix .h2h-opp img,
.h2h-matrix .h2h-opp .logo-fallback {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  font-size: 9px;
}

.h2h-matrix .h2h-opp {
  width: 58px;
  max-width: 64px;
  padding: 4px 2px;
}

.h2h-matrix .h2h-opp span {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 58px;
  margin-left: auto;
  margin-right: auto;
}

.h2h-matrix .h2h-stat {
  width: 40px;
  font-weight: 700;
  color: var(--hltv-text-strong);
  font-variant-numeric: tabular-nums;
}

.h2h-matrix .h2h-rate {
  width: 40px;
}

.h2h-cell {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.h2h-cell a {
  color: inherit;
  text-decoration: none !important;
}

.h2h-cell a:hover {
  text-decoration: underline !important;
}

.h2h-self {
  color: var(--hltv-h2h-self-text);
  background: var(--hltv-h2h-self-bg) !important;
}

.h2h-empty {
  color: var(--hltv-text-muted);
  font-weight: 600;
}

.h2h-win {
  color: var(--hltv-won);
}

.h2h-lose {
  color: var(--hltv-lost);
}

.h2h-draw,
.h2h-pending {
  color: var(--hltv-text);
}

.h2h-upcoming {
  color: var(--hltv-link);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.h2h-upcoming a:hover {
  color: var(--hltv-text-strong);
}

.logo-fallback.is-placeholder {
  opacity: 0.75;
  font-size: 0.85em;
}

.knockout-rounds {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.knockout-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.bracket-match {
  display: block;
  width: 180px;
  min-width: 180px;
  max-width: 180px;
  flex: 0 0 180px;
  background: var(--hltv-row);
  border: 1px solid var(--hltv-border);
  text-decoration: none !important;
  color: inherit;
  overflow: hidden;
}

.bracket-match:hover {
  background: var(--hltv-row-hover);
}

.bracket-match-meta {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 3px 6px;
  background: var(--hltv-box-2);
  color: var(--hltv-text);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.25;
}

.bracket-team {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 5px 6px;
  border-top: 1px solid var(--hltv-border);
  box-shadow: inset 2px 0 0 transparent;
  min-height: 26px;
  line-height: 1.2;
}

.bracket-team.won {
  box-shadow: inset 2px 0 0 var(--hltv-won);
}

.bracket-team.lost {
  box-shadow: inset 2px 0 0 var(--hltv-lost);
}

.bracket-team-side {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.bracket-team-side img,
.bracket-team-side .logo-fallback {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  font-size: 8px;
}

.bracket-team-side .name {
  color: var(--hltv-text-strong);
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bracket-team-side .name.is-placeholder {
  font-size: 10px;
  font-weight: 600;
  color: var(--hltv-text);
}

.bracket-score {
  font-weight: 700;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--hltv-text);
}

.bracket-team.won .bracket-score {
  color: var(--hltv-won);
}

.bracket-team.lost .bracket-score {
  color: var(--hltv-lost);
}

.bracket-score .score-paren {
  margin-left: 2px;
  font-size: 9px;
  opacity: 0.95;
}

/* ========== SINGLE ELIM BRACKET (Liquipedia / HLTV playoffs) ========== */
.se-bracket-wrap {
  overflow-x: auto;
  padding-bottom: 6px;
}

.se-bracket {
  --se-slot-min: 74px;
  --se-slot-gap: 10px;
  --se-rounds-max: 1;
  display: flex;
  align-items: stretch;
  gap: 0;
  min-width: min(100%, 720px);
  padding: 4px 0 8px;
}

.se-round {
  display: flex;
  flex-direction: column;
  width: 200px;
  min-width: 200px;
  max-width: 200px;
  flex: 0 0 200px;
}

.se-round-title {
  text-align: center;
  color: var(--hltv-text-strong);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 0 4px 6px;
  border-bottom: 1px solid var(--hltv-border);
  margin-bottom: 4px;
  flex: none;
}

.se-round-matches {
  --se-feeder: var(--hltv-feeder);
  --se-slots: 1;
  --se-span: 1;
  --se-feeder-arm: 10px;
  --se-feeder-arm-in: 0px;
  display: grid;
  grid-template-rows: repeat(var(--se-slots), var(--se-slot-min));
  gap: var(--se-slot-gap);
  align-content: start;
  justify-items: stretch;
  flex: 1 1 auto;
  min-height: calc(
    (var(--se-rounds-max) * var(--se-slot-min)) +
      ((var(--se-rounds-max) - 1) * var(--se-slot-gap))
  );
  padding: 4px 10px;
  position: relative;
}

.se-match-slot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  height: 100%;
  padding: 0;
  box-sizing: border-box;
  overflow: visible;
}

.se-match-slot .se-match,
.se-match-slot .bracket-match {
  width: 180px;
  min-width: 180px;
  max-width: 180px;
  max-height: calc(var(--se-slot-min) - 2px);
  flex: none;
  position: relative;
  z-index: 1;
  overflow: hidden;
  margin-left: auto;
  margin-right: auto;
}

/* Liquipedia-style feeders — lengths follow format (feed mode + row span) */
.se-round[data-feed="merge"] .se-match-slot::before,
.se-round[data-feed="merge"] .se-match-slot::after,
.se-round[data-feed="pass"] .se-match-slot::before {
  content: "";
  position: absolute;
  pointer-events: none;
  box-sizing: border-box;
  z-index: 0;
}

/* Horizontal arm out of every feeding match (length = --se-feeder-arm) */
.se-round[data-feed="merge"] .se-match-slot::before,
.se-round[data-feed="pass"] .se-match-slot::before {
  right: calc(-1 * var(--se-feeder-arm));
  top: 50%;
  width: var(--se-feeder-arm);
  height: 2px;
  background: var(--se-feeder);
  transform: translateY(-50%);
}

/* 2→1 vertical spine: length = half(top) + gap + half(bottom) → scales with slot span */
.se-round[data-feed="merge"] .se-match-slot[data-pair="top"]::after {
  right: calc(-1 * var(--se-feeder-arm));
  top: 50%;
  width: var(--se-feeder-arm);
  height: calc(50% + var(--se-slot-gap) + 50%);
  border-right: 2px solid var(--se-feeder);
}

.se-round[data-feed="pass"] .se-match-slot::after {
  content: none;
  display: none;
}

/* Incoming arm into later-round matches (length from previous round's feed mode) */
.se-round:not(:first-child) .se-match-slot > .se-match::before,
.se-round:not(:first-child) .se-match-slot > .bracket-match::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--se-feeder-arm-in));
  top: 50%;
  width: var(--se-feeder-arm-in);
  height: 2px;
  background: var(--se-feeder);
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 0;
}

.se-match-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 180px;
  min-width: 180px;
  max-width: 180px;
  min-height: 64px;
  background: var(--hltv-row);
  border: 1px dashed var(--hltv-dash);
  color: var(--hltv-text);
  font-weight: 700;
  font-size: 12px;
  margin-left: auto;
  margin-right: auto;
}

.se-match .bracket-team {
  padding: 5px 6px;
}

.se-match .bracket-team-side .name {
  font-size: 12px;
}

.se-match .bracket-score {
  font-size: 12px;
}

@media (max-width: 760px) {
  .se-round {
    width: 176px;
    min-width: 176px;
    max-width: 176px;
    flex-basis: 176px;
  }

  .se-bracket {
    --se-slot-min: 70px;
    --se-slot-gap: 8px;
  }

  .bracket-match,
  .se-match-slot .se-match,
  .se-match-slot .bracket-match,
  .se-match-empty {
    width: 156px;
    min-width: 156px;
    max-width: 156px;
  }
}

/* ========== SWISS (compact overview board) ========== */
.swiss-blurb {
  margin-bottom: 6px;
  font-size: 12px;
}

.swiss-board-wrap {
  overflow-x: auto;
  padding-bottom: 2px;
}

.swiss-board {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
}

.swiss-round {
  flex: 1 1 0;
  min-width: 132px;
  border: 1px solid var(--hltv-border);
  background: var(--hltv-box-2);
  padding: 4px;
}

.swiss-round-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--hltv-text-strong);
  text-align: center;
  padding: 2px 3px 4px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--hltv-border);
}

.swiss-buckets {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.swiss-bucket {
  background: var(--hltv-panel-shade);
  border: 1px solid var(--hltv-panel-border);
  padding: 3px;
}

.swiss-bucket-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--hltv-text);
  margin-bottom: 3px;
  padding: 0 2px;
  line-height: 1.2;
}

.swiss-bucket-name {
  opacity: 0.7;
  font-weight: 600;
}

.swiss-record {
  color: var(--hltv-text-strong);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
}

.swiss-matches {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.swiss-match {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 3px;
  width: 100%;
  height: 22px;
  max-width: none;
  min-width: 0;
  padding: 0 4px;
  background: var(--hltv-row);
  border: 1px solid transparent;
  border-bottom-color: var(--hltv-hover-wash);
  text-decoration: none !important;
  color: inherit;
  line-height: 1;
  box-sizing: border-box;
}

.swiss-match:hover {
  background: var(--hltv-row-hover);
}

.swiss-match.is-live {
  border-color: #c44;
}

.swiss-side {
  display: block;
  min-width: 0;
  overflow: hidden;
}

.swiss-side-b {
  text-align: right;
}

.swiss-side .name {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--hltv-text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 22px;
}

.swiss-side.won .name {
  color: var(--hltv-won);
}

.swiss-side.lost {
  opacity: 0.6;
}

.swiss-vs {
  flex: none;
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--hltv-text);
  text-align: center;
  min-width: 1.6em;
  opacity: 0.85;
  line-height: 22px;
}

.swiss-match-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  border: 1px dashed var(--hltv-dash);
  color: var(--hltv-text);
  font-size: 10px;
  font-weight: 700;
  background: transparent;
}

.swiss-bucket-high {
  border-top: 2px solid #3d8f5a;
}

.swiss-bucket-mid {
  border-top: 2px solid #b08a2e;
}

.swiss-bucket-low {
  border-top: 2px solid #8f3d3d;
}

.swiss-bucket-open {
  border-top: 2px solid var(--hltv-feeder);
}

@media (max-width: 900px) {
  .swiss-board {
    min-width: max-content;
    width: auto;
  }

  .swiss-round {
    flex: 0 0 auto;
    width: 140px;
  }
}

/* ========== DOUBLE ELIM ========== */
.de-bracket {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.de-side-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.45px;
  color: var(--hltv-text-strong);
  margin-bottom: 6px;
}

.de-upper .de-side-label {
  color: #7dcea0;
}

.de-lower .de-side-label {
  color: #e8a8a8;
}

.de-gf .de-side-label {
  color: #f0c674;
}

.de-gf .se-bracket {
  min-width: 200px;
  max-width: none;
}

.de-lower .se-round-matches {
  min-height: 0;
}

.de-upper .se-round-matches {
  min-height: 0;
}

/* ========== MATCH DETAIL PAGE ========== */
.teamsBox {
  background: var(--hltv-box);
  display: grid;
  grid-template-columns: 1fr 210px 1fr;
  align-items: center;
  padding: 16px 12px;
  margin-bottom: 8px;
  min-height: 137px;
}

.teamsBox .team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none !important;
  color: var(--hltv-text-strong);
  font-size: 18px;
  font-weight: 700;
  text-align: center;
}

.teamsBox .team:hover {
  color: var(--hltv-text-strong);
}

.teamsBox .team img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  background: var(--hltv-inset);
}

.teamsBox .team.team2 {
  order: 3;
}

.timeAndEvent {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
}

.timeAndEvent .score-big {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1;
}

.timeAndEvent .score-big .won {
  color: var(--hltv-won);
}

.timeAndEvent .score-big .lost {
  color: var(--hltv-lost);
}

.timeAndEvent .score-big .sep {
  color: var(--hltv-text);
  margin: 0 4px;
}

.timeAndEvent .time {
  color: var(--hltv-text-strong);
  font-size: 14px;
  font-weight: 700;
}

.timeAndEvent .event {
  color: var(--hltv-text);
  font-size: 11px;
  text-decoration: none;
  display: inline-block;
}

.timeAndEvent a.event:hover {
  color: var(--hltv-text-strong);
  text-decoration: underline;
}

.timeAndEvent .status {
  color: var(--hltv-text);
  font-size: 11px;
  text-transform: uppercase;
}

.timeAndEvent .status.is-live {
  color: var(--hltv-live);
  font-weight: 700;
}

.timeAndEvent .replay-btn {
  margin-top: 6px;
  display: inline-block;
  background: var(--hltv-blue);
  color: var(--hltv-on-blue) !important;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  text-decoration: none !important;
}

.timeAndEvent .replay-btn:hover {
  background: var(--hltv-blue-2);
}

.match-alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 8px;
  padding: 12px 14px;
  background: #4a1212;
  border: 1px solid #e74c3c;
  border-left: 5px solid #ff3b3b;
  color: #ffe8e8;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
}

.match-alert-label {
  flex: 0 0 auto;
  padding: 1px 7px;
  background: #e74c3c;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.4;
}

.match-alert-text {
  white-space: pre-line;
}

.match-alert-text a {
  color: #fff;
  text-decoration: underline;
}

@media (prefers-color-scheme: light) {
  .match-alert {
    background: #fdecec;
    border-color: #e24c4c;
    border-left-color: #d32020;
    color: #7a1c1c;
  }

  .match-alert-label {
    background: #d32020;
  }

  .match-alert-text a {
    color: #9b1515;
  }
}

/* Maps block */
.maps-box {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0;
  margin-bottom: 8px;
}

.maps-info {
  background: var(--hltv-box);
  padding: 12px;
  border-right: 1px solid var(--hltv-border);
}

.maps-info .label {
  color: var(--hltv-text);
  font-size: 11px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.maps-info .value {
  color: var(--hltv-text-strong);
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 12px;
}

.maps-info .value:last-child {
  margin-bottom: 0;
}

.maps-list {
  background: var(--hltv-box);
  display: flex;
  flex-direction: column;
}

.mapholder {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--hltv-border);
  min-height: 56px;
}

.mapholder:last-child {
  border-bottom: none;
}

.mapholder .results-left,
.mapholder .results-right {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--hltv-text);
}

.mapholder .results-left {
  justify-content: flex-end;
}

.mapholder .results-right {
  justify-content: flex-start;
}

.mapholder .results-left.won,
.mapholder .results-right.won {
  color: var(--hltv-won);
}

.mapholder .results-left.lost,
.mapholder .results-right.lost {
  color: var(--hltv-lost);
}

.mapholder .mapname {
  text-align: center;
  color: var(--hltv-text-strong);
  font-weight: 700;
  font-size: 12px;
}

.mapholder .mapname .tba {
  color: var(--hltv-text);
  font-weight: 600;
}

.mapholder .map-score {
  font-size: 13px;
  margin-top: 2px;
  color: var(--hltv-text);
}

.mapholder.is-tba {
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0.55;
  background: var(--hltv-panel-shade);
}

.mapholder.is-tba .mapname {
  color: var(--hltv-text-muted);
  font-weight: 600;
}

.mapholder.is-tba .map-slot-label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
}

.mapholder.is-tba .map-score.tba {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
  color: var(--hltv-text-soft);
}

.mapholder.is-advantage .mapname {
  font-size: 11px;
}

.mapholder.is-advantage .map-slot-label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 10px;
  font-weight: 600;
  color: var(--hltv-text-muted);
}

/* Player stats */
.stats-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  background: var(--hltv-box-2);
  border-bottom: 1px solid var(--hltv-border);
}

.map-tab-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--hltv-text);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 8px 12px;
  cursor: pointer;
}

.map-tab-btn:hover {
  color: var(--hltv-text-strong);
}

.map-tab-btn.active {
  background: var(--hltv-blue);
  color: var(--hltv-on-blue);
}

.stats-tables-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 8px;
}

@media (max-width: 900px) {
  .stats-tables-grid {
    grid-template-columns: 1fr;
  }
}

.team-stats-block {
  min-width: 0;
}

.team-stats-name {
  margin: 0 0 4px;
  color: var(--hltv-text-strong);
  font-weight: 700;
  font-size: 12px;
  padding: 0 2px;
}

.table-wrap {
  overflow-x: auto;
}

.stats-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  border: 1px solid var(--hltv-border);
  font-size: 12px;
}

.stats-table th,
.stats-table td {
  padding: 6px 8px;
  border: 1px solid var(--hltv-border);
  vertical-align: middle;
}

.stats-table th {
  background: var(--hltv-box-2);
  color: var(--hltv-text);
  font-size: 10px;
  text-transform: uppercase;
  text-align: left;
}

.stats-table th.stats-player,
.stats-table td.stats-player {
  width: 34%;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-table th.stats-num,
.stats-table td.stats-num {
  width: 11%;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.stats-table tbody tr {
  background: var(--hltv-row);
}

.stats-table tbody tr:nth-child(even) {
  background: var(--hltv-row-alt);
}

.stats-table tbody tr:hover {
  background: var(--hltv-row-hover);
}

.stats-table td.stats-player {
  color: var(--hltv-text-strong);
  font-weight: 600;
}

.diff-pos {
  color: var(--hltv-won) !important;
  font-weight: 700;
}

.diff-neg {
  color: var(--hltv-lost) !important;
  font-weight: 700;
}

/* Ban/pick */
.bp-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bp-list li {
  padding: 6px 10px;
  border-bottom: 1px solid var(--hltv-border);
  font-size: 12px;
  color: var(--hltv-text);
}

.bp-list li:last-child {
  border-bottom: none;
}

.bp-team {
  color: var(--hltv-text-strong);
  font-weight: 700;
}

.bp-action {
  color: var(--hltv-text);
}

.bp-side {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 5px;
  font-size: 10px;
  background: var(--hltv-blue-dark);
  color: var(--hltv-on-blue);
}

/* Team page */
.team-header-hero {
  background: var(--hltv-box);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  margin-bottom: 8px;
}

.team-header-hero img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  background: var(--hltv-inset);
}

.team-header-info h1 {
  margin: 0;
  color: var(--hltv-text-strong);
  font-size: 22px;
}

.team-header-info p {
  margin: 4px 0 0;
  color: var(--hltv-text);
  font-size: 12px;
  text-transform: uppercase;
}

.member-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 5px;
  font-size: 10px;
  font-weight: 700;
  background: var(--hltv-blue-dark);
  color: var(--hltv-member-tag-text);
}

.member-tag.sub {
  background: var(--hltv-member-sub);
  color: var(--hltv-text);
}

/* S2 player page */
.player-hero {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 18px;
  margin-bottom: 8px;
}

.player-avatar-shell {
  position: relative;
  width: 112px;
  height: 112px;
  overflow: hidden;
  border: 1px solid var(--hltv-panel-border);
  background:
    radial-gradient(circle at 35% 28%, var(--hltv-box-2), transparent 55%),
    var(--hltv-inset);
}

.player-avatar,
.player-avatar-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.player-avatar {
  z-index: 2;
  object-fit: cover;
}

.player-avatar-fallback {
  display: grid;
  place-items: center;
  color: var(--hltv-text-soft);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.player-avatar-shell:has(.player-avatar) .player-avatar-fallback {
  display: none;
}

.player-identity {
  min-width: 0;
}

.player-kicker {
  margin-bottom: 3px;
  color: var(--hltv-blue-2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.player-identity h1 {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--hltv-text-strong);
  font-size: 28px;
  line-height: 1.15;
}

.player-team-line {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
}

.player-team-line a {
  color: var(--hltv-link);
}

.player-summary,
.player-form-box {
  margin-bottom: 8px;
}

.player-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--hltv-border);
}

.player-metric {
  min-width: 0;
  padding: 13px 14px;
  background: var(--hltv-row);
}

.player-metric-label {
  color: var(--hltv-text-muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.player-metric-value {
  margin-top: 3px;
  color: var(--hltv-text-strong);
  font-size: 23px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.player-metric-detail {
  margin-top: 1px;
  color: var(--hltv-text);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.player-gauge {
  margin-top: 8px;
}

.player-gauge-track {
  position: relative;
  height: 6px;
  border-radius: 99px;
  background: var(--hltv-inset);
  overflow: visible;
}

.player-gauge-mid {
  position: absolute;
  top: -3px;
  width: 1px;
  height: 12px;
  background: var(--hltv-text-muted);
  transform: translateX(-50%);
  opacity: 0.7;
}

.player-gauge-fill {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 99px;
  background: var(--hltv-text-muted);
}

.player-gauge.is-low .player-gauge-fill,
.player-gauge.is-low .player-gauge-marker {
  background: var(--hltv-lost);
}

.player-gauge.is-high .player-gauge-fill,
.player-gauge.is-high .player-gauge-marker {
  background: var(--hltv-won);
}

.player-gauge.is-mid .player-gauge-fill,
.player-gauge.is-mid .player-gauge-marker {
  background: var(--hltv-text-muted);
}

.player-gauge-marker {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--hltv-text-muted);
  box-shadow: 0 0 0 2px var(--hltv-row);
  transform: translate(-50%, -50%);
}

.player-gauge.is-capped .player-gauge-marker {
  top: -2px;
  transform: translate(-50%, -100%);
}

.player-data-scope {
  padding: 8px 12px;
  border-top: 1px solid var(--hltv-border);
  background: var(--hltv-box-3);
  color: var(--hltv-text-muted);
  font-size: 10px;
}

.player-data-scope strong {
  margin-left: 4px;
  color: var(--hltv-star);
}

.player-form-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.player-form-toggle {
  appearance: none;
  border: 1px solid var(--hltv-border);
  background: var(--hltv-box);
  color: var(--hltv-text-strong);
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  cursor: pointer;
}

.player-form-toggle:hover,
.player-form-toggle[aria-pressed="true"] {
  background: var(--hltv-blue);
  border-color: var(--hltv-blue);
  color: var(--hltv-on-blue);
}

.player-form-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 52px;
  padding: 9px 12px;
  background: var(--hltv-box);
}

.player-form-strip.is-chart {
  display: block;
  padding: 4px 8px 8px;
}

.player-form-value {
  display: grid;
  place-items: center;
  min-width: 52px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--hltv-border);
  background: var(--hltv-row);
  color: var(--hltv-text-strong);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.player-form-value.is-high {
  color: var(--hltv-won);
}

.player-form-value.is-low {
  color: var(--hltv-lost);
}

.player-form-value.is-mid {
  color: var(--hltv-text-strong);
}

.player-form-value:hover {
  background: var(--hltv-row-hover);
}

.player-form-chart {
  display: block;
  width: 100%;
  height: 112px;
}

.player-form-chart-grid {
  stroke: var(--hltv-border);
  stroke-dasharray: 3 4;
}

.player-form-chart-axis {
  fill: var(--hltv-text-muted);
  font-size: 10px;
}

.player-form-chart-line {
  stroke: var(--hltv-text);
  stroke-width: 1.8;
}

.player-form-chart-dot {
  fill: var(--hltv-text-muted);
}

.player-form-chart-dot.is-high {
  fill: var(--hltv-won);
}

.player-form-chart-dot.is-low {
  fill: var(--hltv-lost);
}

.player-form-chart-dot.is-mid {
  fill: var(--hltv-text-strong);
}

.player-form-empty {
  color: var(--hltv-text-muted);
  font-size: 11px;
}

.player-results-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  font-size: 11px;
}

.player-results-table th,
.player-results-table td {
  padding: 8px 9px;
  border: 1px solid var(--hltv-border);
  text-align: left;
  vertical-align: middle;
}

.player-results-table th {
  background: var(--hltv-box-2);
  color: var(--hltv-text);
  font-size: 10px;
  text-transform: uppercase;
}

.player-results-table tbody tr {
  background: var(--hltv-row);
}

.player-results-table tbody tr:nth-child(even) {
  background: var(--hltv-row-alt);
}

.player-results-table tbody tr.is-excluded {
  background: rgba(139, 35, 35, 0.2);
}

.player-result-opponent {
  display: block;
  color: var(--hltv-text-strong);
  white-space: nowrap;
}

.player-result-opponent strong {
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
}

.player-result-opponent strong.won {
  color: var(--hltv-won);
}

.player-result-opponent strong.lost {
  color: var(--hltv-lost);
}

.player-result-warning {
  display: inline-block;
  margin-top: 3px;
  padding: 1px 5px;
  background: var(--hltv-lost);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
}

.stats-player-link {
  color: var(--hltv-text-strong);
  font-weight: 600;
}

.stats-player-link:hover {
  color: var(--hltv-prose-link);
  text-decoration: underline;
}

.detail-list,
.small-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.detail-list li,
.small-list li {
  padding: 6px 10px;
  border-bottom: 1px solid var(--hltv-border);
  font-size: 12px;
}

.detail-list li:last-child,
.small-list li:last-child {
  border-bottom: none;
}

.hint,
.loading {
  color: var(--hltv-text);
  padding: 16px;
  text-align: center;
}

/* Footer */
.site-footer {
  background: var(--hltv-footer-bg);
  border-top: 1px solid var(--hltv-footer-border);
  text-align: center;
  color: var(--hltv-footer-text);
  font-size: 11px;
  padding: 14px 12px 20px;
}

.site-footer a {
  color: var(--hltv-footer-link);
}

/* Compact match list (sidebars / team page) */
.match-list .hltv-match {
  grid-template-columns: 44px minmax(0, 1fr) 48px;
  gap: 6px;
  padding: 6px 8px;
  min-height: 44px;
}

.match-list .match-meta .time {
  font-size: 11px;
}

.match-list .match-meta .format {
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-list .match-team {
  gap: 5px;
}

.match-list .match-team img,
.match-list .match-team .logo-fallback {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.match-list .match-team .name {
  font-size: 11px;
  flex: 1;
  min-width: 0;
}

.match-list .match-scores {
  font-size: 12px;
  min-width: 0;
  gap: 3px;
}

.match-list .match-scores .score {
  line-height: 16px;
  font-size: 12px;
}

.match-list .match-scores .score-paren {
  font-size: 10px;
  margin-left: 2px;
}

.right-col .ranking-name {
  font-size: 11px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1020px) {
  .hltv-width,
  .hltv-width.detail-width {
    grid-template-columns: minmax(0, 1fr) var(--right-w);
    padding: 0 8px;
  }

  .sidebar-col {
    display: none;
  }

  .hltv-logo-bar-inner {
    padding: 8px;
    grid-template-columns: 140px 1fr;
  }
}

@media (max-width: 760px) {
  .hltv-navbar-inner {
    overflow-x: auto;
  }

  .hltv-nav-search {
    display: none;
  }

  .hltv-logo-bar-inner {
    grid-template-columns: 1fr;
  }

  .hltv-ticker {
    display: none;
  }

  .hltv-width,
  .hltv-width.two-col,
  .hltv-width.detail-width {
    grid-template-columns: 1fr;
    padding: 0 8px;
  }

  .right-col {
    order: 2;
  }

  .teamsBox {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .teamsBox .team.team2 {
    order: 0;
  }

  .maps-box {
    grid-template-columns: 1fr;
  }

  .maps-info {
    border-right: none;
    border-bottom: 1px solid var(--hltv-border);
  }

  .player-hero {
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .player-avatar-shell {
    width: 80px;
    height: 80px;
  }

  .player-avatar-fallback {
    font-size: 23px;
  }

  .player-identity h1 {
    font-size: 22px;
  }

  .player-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .player-form-strip {
    overflow-x: auto;
  }

  .event-header {
    grid-template-columns: 72px 1fr;
  }

  .event-header-logo {
    width: 72px;
    height: 72px;
  }

  .event-tabs {
    overflow-x: auto;
  }
}
