:root {
  color-scheme: light;
  --bg: #eef3f8;
  --panel: #ffffff;
  --text: #182233;
  --muted: #607089;
  --line: #d9e2ee;
  --brand: #2d9bd7;
  --brand-dark: #126ca2;
  --danger: #d84b3a;
  --success: #28945f;
  --warning: #d59a22;
  --surface-border: rgba(21, 34, 56, 0.12);
  --surface-soft: #f7fafc;
  --surface-hover: #eef6ff;
  --shadow: 0 14px 34px rgba(20, 35, 55, 0.1);
  --shadow-soft: 0 8px 20px rgba(20, 35, 55, 0.07);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 28px;
  padding: 32px;
  text-align: center;
}

.login-logo {
  width: min(280px, 58vw);
  height: auto;
  display: block;
  filter: drop-shadow(0 16px 26px rgba(24, 54, 78, 0.2));
}

.login-logo.compact {
  width: 160px;
}

.login-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--brand-dark);
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  padding: 0 24px;
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(18, 108, 162, 0.22);
  transition:
    background-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.login-button:hover {
  background: #0e5d8d;
  box-shadow: 0 14px 28px rgba(18, 108, 162, 0.28);
  transform: translateY(-1px);
}

.login-screen h1 {
  margin: 0;
  font-size: 28px;
}

.login-screen p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  padding: 12px clamp(16px, 3vw, 36px);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--surface-border);
  box-shadow: 0 8px 24px rgba(20, 35, 55, 0.06);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-size: 18px;
  font-weight: 900;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
  max-width: 560px;
  min-height: 46px;
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  background: var(--surface-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  padding: 4px;
}

.main-nav a {
  position: relative;
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
  padding: 0 16px;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--brand-dark);
}

.main-nav a:hover {
  background: var(--surface-hover);
}

.main-nav a.active {
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(18, 108, 162, 0.13), inset 0 0 0 1px rgba(45, 155, 215, 0.2);
}

.main-nav a.active::after {
  position: absolute;
  right: 18px;
  bottom: 6px;
  left: 18px;
  height: 3px;
  border-radius: 999px;
  background: var(--brand);
  content: "";
}

.main-nav a:focus-visible {
  outline: 3px solid rgba(45, 155, 215, 0.28);
  outline-offset: 2px;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  padding: 4px 6px 4px 8px;
}

.user-menu a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  color: var(--brand-dark);
  font-weight: 850;
  padding: 0 10px;
  text-decoration: none;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.user-menu a:hover {
  background: #ffffff;
  color: #0f5f91;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(45, 155, 215, 0.28);
  border-radius: 50%;
}

.dashboard {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 14px clamp(14px, 3vw, 34px) 48px;
}

.view-section {
  display: none;
}

.view-section.active {
  display: block;
}

.filter-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.filter-card-title {
  display: grid;
  gap: 3px;
  min-width: 160px;
}

.filter-card-title span,
.filter-field span {
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.filter-card-title h2 {
  margin: 0;
  color: #0f1f34;
  font-size: 24px;
  line-height: 1;
}

.filter-card-controls {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
  flex: 1;
  flex-wrap: wrap;
}

.filter-field {
  display: grid;
  gap: 5px;
  min-width: 150px;
}

.filter-field-wide {
  min-width: min(320px, 42vw);
}

.filter-field input,
.filter-field select,
.filter-button {
  min-height: 40px;
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  padding: 0 12px;
}

.filter-field input:focus,
.filter-field select:focus {
  border-color: rgba(45, 155, 215, 0.62);
  outline: 3px solid rgba(45, 155, 215, 0.16);
}

.filter-button {
  cursor: pointer;
  color: var(--brand-dark);
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.filter-button:hover,
.filter-button[aria-pressed="true"] {
  border-color: rgba(45, 155, 215, 0.55);
  background: #e8f3fb;
  box-shadow: var(--shadow-soft);
}

.filter-button[aria-pressed="true"] {
  box-shadow: inset 0 0 0 1px rgba(45, 155, 215, 0.25);
}

.filter-button-muted {
  color: var(--muted);
}

.player-page > .filter-card,
.opponent-page > .filter-card {
  margin-bottom: 0;
}

.overview-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  gap: 14px;
  margin-bottom: 14px;
}

.overview-snapshot,
.overview-form-card {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, var(--surface-soft) 100%);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.overview-snapshot:hover,
.overview-form-card:hover {
  border-color: rgba(45, 155, 215, 0.28);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.overview-snapshot::before,
.overview-form-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--brand);
  content: "";
}

.overview-form-card::before {
  background: var(--warning);
}

.overview-snapshot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 136px;
  padding: 20px 22px 18px;
}

.overview-snapshot-main span,
.overview-snapshot-meta span,
.overview-form-heading span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.overview-snapshot-main h2 {
  margin: 8px 0 12px;
  color: #0f1f34;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1;
}

.overview-snapshot-main p {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
  color: var(--muted);
  font-weight: 850;
}

.overview-snapshot-main p b {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid rgba(21, 34, 56, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  padding: 0 10px;
}

.overview-snapshot-meta {
  display: grid;
  gap: 7px;
  min-width: 168px;
  border: 1px solid rgba(45, 155, 215, 0.18);
  border-color: color-mix(in srgb, var(--brand) 28%, transparent);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.82), 0 8px 16px rgba(20, 35, 55, 0.06);
  padding: 14px 16px;
}

.overview-snapshot-meta strong {
  color: var(--brand-dark);
  font-size: 18px;
  font-weight: 950;
}

.overview-form-card {
  display: grid;
  align-content: center;
  gap: 12px;
  min-height: 136px;
  padding: 20px 22px 18px;
}

.overview-form-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.overview-form-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.overview-form-strip .form-result {
  width: 36px;
  min-height: 36px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 16px rgba(20, 35, 55, 0.09);
}

.overview-form-card p {
  width: max-content;
  max-width: 100%;
  margin: 0;
  border: 1px solid rgba(21, 34, 56, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  padding: 6px 9px;
}

.overview-form-card .empty-state {
  min-height: 120px;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.overview-panels {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr) minmax(0, 0.95fr);
  gap: 18px;
}

.stat-card,
.tool-panel {
  background: var(--panel);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.stat-card {
  --card-accent: var(--brand);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "label value"
    "detail value";
  gap: 8px 12px;
  align-content: center;
  min-height: 104px;
  padding: 14px 14px 12px 16px;
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, var(--surface-soft) 100%);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.stat-card:hover {
  border-color: rgba(45, 155, 215, 0.28);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.stat-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--card-accent);
  content: "";
}

.stat-card-positive,
.stat-card-rating-good {
  --card-accent: var(--success);
}

.stat-card-negative,
.stat-card-rating-low {
  --card-accent: var(--danger);
}

.stat-card-neutral,
.stat-card-rating-ok {
  --card-accent: var(--warning);
}

.stat-card span {
  grid-area: label;
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.stat-card strong {
  grid-area: value;
  min-width: 58px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  align-self: center;
  border: 1px solid rgba(45, 155, 215, 0.18);
  border-color: color-mix(in srgb, var(--card-accent) 28%, transparent);
  border-radius: 8px;
  background: #ffffff;
  color: var(--card-accent);
  font-size: 26px;
  line-height: 1;
  padding: 0 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.82), 0 8px 16px rgba(20, 35, 55, 0.06);
}

.stat-card em {
  grid-area: detail;
  width: max-content;
  max-width: 100%;
  border: 1px solid rgba(21, 34, 56, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  line-height: 1;
  overflow: hidden;
  padding: 6px 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-panel {
  overflow: hidden;
}

.overview-list {
  display: grid;
}

.overview-match-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  border-top: 1px solid var(--surface-border);
  padding: 10px 14px;
  transition: background-color 0.15s ease;
}

.overview-match-row:first-child {
  border-top: 0;
}

.overview-match-row:nth-child(even) {
  background: var(--surface-soft);
}

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

.overview-match-teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  font-size: 14px;
  font-weight: 800;
}

.overview-match-teams strong,
.overview-match-teams span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-match-teams span {
  justify-self: center;
  color: var(--brand-dark);
  font-weight: 900;
}

.overview-row-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.overview-player-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 48px 42px 42px 50px;
  gap: 8px;
  align-items: center;
  min-height: 54px;
  border-top: 1px solid var(--surface-border);
  padding: 8px 12px;
  transition: background-color 0.15s ease;
}

.overview-player-row:first-child {
  border-top: 0;
}

.overview-player-row:nth-child(even) {
  background: var(--surface-soft);
}

.overview-player-row:hover {
  background: var(--surface-hover);
}

.overview-player-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  min-height: 26px;
  border-radius: 999px;
  background: #e8f2ff;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 950;
}

.overview-player-row strong {
  min-width: 0;
  overflow: hidden;
  color: #0f1f34;
  font-size: 14px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-player-stat {
  justify-self: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.overview-player-row .rating-badge {
  justify-self: end;
  min-width: 42px;
  height: 24px;
  padding: 0 7px;
  font-size: 12px;
}

.overview-opponents {
  display: grid;
}

.overview-opponent-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px minmax(70px, auto);
  gap: 8px;
  align-items: center;
  min-height: 52px;
  border-top: 1px solid var(--surface-border);
  padding: 8px 12px;
  transition: background-color 0.15s ease;
}

.overview-opponent-row:first-child {
  border-top: 0;
}

.overview-opponent-row:nth-child(even) {
  background: var(--surface-soft);
}

.overview-opponent-row:hover {
  background: var(--surface-hover);
}

.overview-opponent-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.overview-opponent-main strong,
.overview-opponent-main span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-opponent-main strong {
  color: #0f1f34;
  font-size: 14px;
  font-weight: 950;
}

.overview-opponent-main span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.overview-opponent-row b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 24px;
  border-radius: 999px;
  background: #eef3f8;
  font-size: 13px;
  font-weight: 950;
}

.overview-opponent-row b.positive {
  background: #e8f7ef;
  color: var(--success);
}

.overview-opponent-row b.neutral {
  background: #fff5df;
  color: var(--warning);
}

.overview-opponent-row b.negative {
  background: #fff0ed;
  color: var(--danger);
}

.overview-opponent-form {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  min-width: 0;
}

.overview-opponent-form .form-result {
  width: 20px;
  min-height: 20px;
  font-size: 9px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--surface-border);
  background: linear-gradient(180deg, #ffffff 0%, var(--surface-soft) 100%);
}

.panel-header h1,
.panel-header h2 {
  margin: 0;
  color: #0f1f34;
  font-size: 20px;
  line-height: 1.15;
}

.compact-header {
  padding: 16px 18px;
}

.player-page {
  display: grid;
  gap: 16px;
}

.player-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.player-highlight-card {
  --highlight-accent: var(--brand);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "label value"
    "name value"
    "meta meta";
  gap: 7px 12px;
  min-height: 106px;
  align-content: center;
  padding: 14px 14px 12px 16px;
  background: linear-gradient(180deg, #ffffff 0%, var(--surface-soft) 100%);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.player-highlight-card:nth-child(1) {
  --highlight-accent: var(--warning);
}

.player-highlight-card:nth-child(2),
.player-highlight-card:nth-child(3) {
  --highlight-accent: var(--brand);
}

.player-highlight-card:nth-child(4) {
  --highlight-accent: var(--success);
}

.player-highlight-card:nth-child(5) {
  --highlight-accent: #607089;
}

.player-highlight-card:hover {
  border-color: rgba(45, 155, 215, 0.28);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.player-highlight-card::before,
.opponent-highlight-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--brand);
  content: "";
}

.player-highlight-card::before {
  inset: 0 auto 0 0;
  width: 4px;
  height: auto;
  background: var(--highlight-accent);
}

.player-highlight-card span {
  grid-area: label;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

.player-highlight-card strong {
  grid-area: name;
  min-width: 0;
  overflow: hidden;
  color: #0f1f34;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-highlight-card > b {
  grid-area: value;
  min-width: 48px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  align-self: center;
  border: 1px solid rgba(45, 155, 215, 0.18);
  border-color: color-mix(in srgb, var(--highlight-accent) 28%, transparent);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.82), 0 8px 16px rgba(20, 35, 55, 0.06);
  padding: 0 12px;
}

.player-highlight-value {
  color: var(--brand-dark);
  font-size: 26px;
  line-height: 1;
}

.player-highlight-card em {
  grid-area: meta;
  width: max-content;
  max-width: 100%;
  border: 1px solid rgba(21, 34, 56, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
  padding: 6px 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-list-panel {
  overflow: hidden;
}

.player-stat-list {
  display: grid;
  background: var(--surface-soft);
}

.player-profile-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(190px, 0.95fr) minmax(0, 3fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  border-top: 1px solid var(--surface-border);
  cursor: pointer;
  padding: 11px 14px;
  transition:
    background-color 0.15s ease,
    box-shadow 0.15s ease;
}

.player-profile-card::before {
  position: absolute;
  inset: 12px auto 12px 0;
  width: 3px;
  border-radius: 999px;
  background: transparent;
  content: "";
  transition: background-color 0.15s ease;
}

.player-profile-card:first-child {
  border-top: 0;
}

.player-profile-card:nth-child(odd) {
  background: #ffffff;
}

.player-profile-card:hover {
  background: var(--surface-hover);
  box-shadow: inset 0 0 0 1px rgba(45, 155, 215, 0.12);
}

.player-profile-card:hover::before {
  background: var(--brand);
}

.player-profile-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.player-profile-main strong {
  min-width: 0;
  overflow: hidden;
  color: #0f1f34;
  font-size: 16px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-profile-main span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-profile-stats {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}

.player-mini-stat {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  min-height: 34px;
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, var(--surface-soft) 100%);
  padding: 0 8px;
}

.player-mini-stat em {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.12;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.player-mini-stat b {
  flex: 0 0 auto;
  min-width: 0;
  overflow: hidden;
  color: #12233a;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 950;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-mini-stat .rating-badge {
  justify-self: start;
  min-width: 34px;
  height: 20px;
  padding: 0 6px;
  font-size: 12px;
}

.player-match-button {
  min-height: 38px;
  border: 1px solid rgba(45, 155, 215, 0.36);
  border-radius: 8px;
  background: #e8f3fb;
  color: var(--brand-dark);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  padding: 0 13px;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.player-match-button:hover {
  border-color: rgba(45, 155, 215, 0.62);
  background: #d9ecf8;
  box-shadow: var(--shadow-soft);
}

.profile-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.opponent-page {
  display: grid;
  gap: 16px;
}

.opponent-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.opponent-highlight-card {
  --highlight-accent: var(--brand);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "label value"
    "name value"
    "meta meta";
  gap: 7px 12px;
  min-height: 106px;
  align-content: center;
  padding: 14px 14px 12px 16px;
  background: linear-gradient(180deg, #ffffff 0%, var(--surface-soft) 100%);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.opponent-highlight-card:nth-child(1) {
  --highlight-accent: var(--brand);
}

.opponent-highlight-card:nth-child(2),
.opponent-highlight-card:nth-child(3) {
  --highlight-accent: var(--success);
}

.opponent-highlight-card:nth-child(4) {
  --highlight-accent: var(--warning);
}

.opponent-highlight-card:nth-child(5) {
  --highlight-accent: var(--danger);
}

.opponent-highlight-card:hover {
  border-color: rgba(45, 155, 215, 0.28);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.opponent-highlight-card::before {
  inset: 0 auto 0 0;
  width: 4px;
  height: auto;
  background: var(--highlight-accent);
}

.opponent-highlight-card span {
  grid-area: label;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.opponent-highlight-card strong {
  grid-area: name;
  min-width: 0;
  overflow: hidden;
  color: #0f1f34;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.opponent-highlight-card > b {
  grid-area: value;
  min-width: 48px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  align-self: center;
  border: 1px solid rgba(45, 155, 215, 0.18);
  border-color: color-mix(in srgb, var(--highlight-accent) 28%, transparent);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.82), 0 8px 16px rgba(20, 35, 55, 0.06);
  padding: 0 12px;
}

.opponent-highlight-value {
  color: var(--brand-dark);
  font-size: 26px;
  line-height: 1;
}

.opponent-highlight-card em {
  grid-area: meta;
  width: max-content;
  max-width: 100%;
  border: 1px solid rgba(21, 34, 56, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
  overflow: hidden;
  padding: 6px 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.opponent-list-panel {
  overflow: hidden;
}

.opponent-stat-list {
  display: grid;
  background: var(--surface-soft);
}

.opponent-profile-card {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(0, 2.15fr) auto;
  gap: 14px;
  align-items: center;
  min-width: 0;
  border-top: 1px solid var(--surface-border);
  cursor: pointer;
  padding: 14px 16px;
  transition: background-color 0.15s ease;
}

.opponent-profile-card:first-child {
  border-top: 0;
}

.opponent-profile-card:nth-child(odd) {
  background: #ffffff;
}

.opponent-profile-card:hover {
  background: var(--surface-hover);
}

.opponent-profile-main {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.opponent-profile-main strong {
  min-width: 0;
  overflow: hidden;
  color: #0f1f34;
  font-size: 16px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.opponent-profile-main span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.opponent-form-list {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.opponent-form-list span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.opponent-form-list em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.opponent-form-list .form-result {
  width: 22px;
  min-height: 22px;
  font-size: 10px;
}

.opponent-profile-stats {
  display: grid;
  grid-template-columns: repeat(7, minmax(64px, 1fr));
  gap: 7px;
  min-width: 0;
}

.opponent-mini-stat {
  display: grid;
  gap: 4px;
  align-content: center;
  min-width: 0;
  min-height: 50px;
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  background: #ffffff;
  padding: 7px 8px;
}

.opponent-mini-stat em {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.opponent-mini-stat b {
  min-width: 0;
  overflow: hidden;
  color: #12233a;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 950;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.opponent-mini-stat .positive,
.opponent-highlight-value.positive {
  color: var(--success);
}

.opponent-mini-stat .negative,
.opponent-highlight-value.negative {
  color: var(--danger);
}

.opponent-mini-stat .neutral {
  color: var(--warning);
}

.opponent-match-button {
  min-height: 38px;
  border: 1px solid rgba(45, 155, 215, 0.36);
  border-radius: 8px;
  background: #e8f3fb;
  color: var(--brand-dark);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  padding: 0 13px;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.opponent-match-button:hover {
  border-color: rgba(45, 155, 215, 0.62);
  background: #d9ecf8;
  box-shadow: var(--shadow-soft);
}

.profile-detail-panel:empty {
  display: none;
}

.profile-card {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, var(--surface-soft) 100%);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.profile-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--brand);
  content: "";
}

.opponent-compare-card::before {
  background: var(--warning);
}

.profile-detail-head {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.profile-detail-head span,
.profile-detail-grid h4 {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.profile-detail-head h3 {
  margin: 0;
  color: #0f1f34;
  font-size: 24px;
  line-height: 1.1;
}

.profile-detail-head p {
  width: max-content;
  max-width: 100%;
  margin: 0;
  border: 1px solid rgba(21, 34, 56, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  overflow: hidden;
  padding: 7px 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.profile-stat {
  display: flex;
  min-width: 0;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  background: #ffffff;
  padding: 0 10px;
}

.profile-stat em {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.profile-stat b {
  flex: 0 0 auto;
  color: #12233a;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 950;
}

.profile-stat.positive b,
.profile-stat.rating-good b {
  color: var(--success);
}

.profile-stat.neutral b,
.profile-stat.rating-ok b {
  color: var(--warning);
}

.profile-stat.negative b,
.profile-stat.rating-low b {
  color: var(--danger);
}

.profile-detail-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.45fr) minmax(0, 1fr);
  gap: 14px;
}

.profile-detail-grid section {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.profile-form-strip {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.profile-empty-pill {
  width: max-content;
  max-width: 100%;
  border: 1px solid rgba(21, 34, 56, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  padding: 6px 9px;
}

.profile-match-list {
  display: grid;
  gap: 7px;
}

.profile-match-list .empty-state {
  min-height: 72px;
}

.profile-match-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto minmax(150px, auto);
  gap: 8px;
  align-items: center;
  min-height: 42px;
  border: 1px solid rgba(21, 34, 56, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  padding: 6px 9px;
}

.profile-match-row strong,
.profile-match-row em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-match-row strong {
  color: #0f1f34;
  font-size: 13px;
  font-weight: 950;
}

.profile-match-row b {
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 950;
}

.profile-match-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  justify-self: end;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(420px, 1.35fr);
  min-height: 620px;
}

.match-list {
  border-right: 1px solid var(--surface-border);
  background: var(--surface-soft);
}

.match-row {
  width: 100%;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px 12px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid var(--surface-border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  padding: 14px 16px;
  text-align: left;
  transition:
    background-color 0.15s ease,
    box-shadow 0.15s ease;
}

.match-row:hover,
.match-row.active {
  background: var(--surface-hover);
}

.match-row.active {
  box-shadow: inset 4px 0 0 var(--brand);
}

.match-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.match-main strong,
.match-main span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-main span {
  justify-self: center;
  color: var(--brand-dark);
  font-weight: 900;
}

.match-meta {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.result-pill {
  width: 30px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.result-pill.win {
  background: var(--success);
}

.result-pill.draw {
  background: var(--warning);
}

.result-pill.loss {
  background: var(--danger);
}

.match-details {
  padding: 22px;
  background: #ffffff;
  overflow: auto;
}

.detail-head {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.detail-head .result-pill {
  width: auto;
  justify-self: start;
  border-radius: 8px;
  padding: 6px 12px;
}

.detail-head h2 {
  margin: 0;
  font-size: clamp(22px, 2vw, 32px);
  line-height: 1.15;
}

.detail-head p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.match-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.match-stat-card {
  --card-accent: var(--brand);
  position: relative;
  min-height: 82px;
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, var(--surface-soft) 100%);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  padding: 12px 12px 12px 14px;
}

.match-stat-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--card-accent);
  content: "";
}

.match-stat-card.rating-good {
  --card-accent: var(--success);
}

.match-stat-card.rating-ok {
  --card-accent: var(--warning);
}

.match-stat-card.rating-low {
  --card-accent: var(--danger);
}

.match-stat-card > span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.match-stat-card > strong {
  width: max-content;
  max-width: 100%;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  border: 1px solid rgba(45, 155, 215, 0.18);
  border-color: color-mix(in srgb, var(--card-accent) 28%, transparent);
  border-radius: 8px;
  background: #ffffff;
  color: var(--card-accent);
  font-size: 21px;
  line-height: 1;
  padding: 0 11px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.82);
}

.match-stat-card strong.stat-compact {
  font-size: 16px;
  line-height: 1.18;
}

.match-stat-card > strong.rating-good {
  --card-accent: var(--success);
  color: var(--success);
}

.match-stat-card > strong.rating-ok {
  --card-accent: var(--warning);
  color: var(--warning);
}

.match-stat-card > strong.rating-low {
  --card-accent: var(--danger);
  color: var(--danger);
}

.opponent-record-card {
  --card-accent: var(--brand);
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  min-height: 70px;
  background: linear-gradient(90deg, #f8fbfe 0%, #edf6fc 100%);
}

.opponent-record-card > span {
  color: var(--brand-dark);
}

.opponent-record-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.opponent-record-main strong {
  color: var(--text);
  font-size: 20px;
  line-height: 1;
}

.opponent-record-main b {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border-radius: 8px;
  background: #ffffff;
  color: var(--brand-dark);
  font-size: 20px;
  font-weight: 900;
  padding: 0 12px;
  box-shadow: inset 0 0 0 1px rgba(45, 155, 215, 0.18);
}

.opponent-record-main em {
  color: var(--muted);
  font-size: 15px;
  font-style: normal;
  font-weight: 850;
}

.opponent-record-form {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

.opponent-record-form span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.form-result {
  width: 26px;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.form-result.win {
  background: var(--success);
}

.form-result.draw {
  background: var(--warning);
}

.form-result.loss {
  background: var(--danger);
}

.detail-section-title {
  margin: 0 0 10px;
  font-size: 18px;
}

.players-table {
  background: #ffffff;
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.players-header,
.players-row {
  display: grid;
  grid-template-columns: minmax(122px, 1.22fr) minmax(58px, 0.48fr) minmax(40px, 0.34fr) minmax(68px, 0.52fr) minmax(58px, 0.45fr) minmax(78px, 0.6fr) minmax(72px, 0.55fr) minmax(78px, 0.6fr) minmax(76px, 0.56fr);
  gap: 5px;
  align-items: center;
  min-width: 0;
  padding: 0 12px;
}

.players-header {
  min-height: 48px;
  background: linear-gradient(135deg, #112039 0%, #1d3556 100%);
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.1;
  text-transform: uppercase;
}

.players-header span:not(:first-child) {
  justify-self: center;
}

.players-row {
  min-height: 54px;
  background: #ffffff;
  border-top: 1px solid var(--surface-border);
  font-size: 13px;
  font-weight: 800;
  box-shadow: inset 3px 0 0 transparent;
  transition:
    background-color 0.15s ease,
    box-shadow 0.15s ease;
}

.players-row:nth-child(odd) {
  background: var(--surface-soft);
}

.players-row:hover {
  background: var(--surface-hover);
  box-shadow: inset 3px 0 0 var(--brand);
}

.players-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-name-cell {
  color: #0f1f34;
  font-weight: 900;
}

.position-badge,
.rating-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  line-height: 1;
}

.position-badge {
  justify-self: center;
  min-width: 34px;
  height: 24px;
  padding: 0 8px;
  background: #e8f2ff;
  border-color: #cfe0f5;
  color: #1f62a8;
}

.rating-badge {
  justify-self: center;
  min-width: 42px;
  height: 24px;
  padding: 0 8px;
  background: #eef3f8;
  border-color: #d9e4ef;
  color: #24344d;
}

.stat-number,
.stat-fraction,
.stat-percent {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  border: 1px solid rgba(21, 34, 56, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: #12233a;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  padding: 0 7px;
}

.stat-percent {
  font-weight: 900;
}

.rating-good {
  color: var(--success);
}

.rating-ok {
  color: var(--warning);
}

.rating-low {
  color: var(--danger);
}

.rating-badge.rating-good {
  background: #e8f7ef;
  border-color: rgba(40, 148, 95, 0.28);
  color: #0b7a4b;
}

.rating-badge.rating-ok {
  background: #fff5df;
  border-color: rgba(214, 142, 31, 0.32);
  color: #af6a04;
}

.rating-badge.rating-low {
  background: #fff0ed;
  border-color: rgba(221, 63, 46, 0.28);
  color: #c93324;
}

.empty-state {
  display: grid;
  min-height: 180px;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 18px;
  margin-top: 18px;
}

.summary-panel {
  overflow: hidden;
}

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

.summary-header,
.summary-row {
  display: grid;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
}

.summary-header {
  background: #152238;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.summary-row {
  border-top: 1px solid var(--surface-border);
  font-size: 14px;
  font-weight: 750;
}

.summary-row:nth-child(odd) {
  background: var(--surface-soft);
}

.summary-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.players-summary-header,
.players-summary-row {
  grid-template-columns: minmax(180px, 1.7fr) 52px 48px 48px 72px 72px;
}

.opponents-summary-header,
.opponents-summary-row {
  grid-template-columns: minmax(180px, 1.6fr) 52px 88px 82px;
}

.overview-players-header,
.overview-players-row {
  grid-template-columns: minmax(180px, 1.7fr) 52px 48px 48px 72px;
}

@media (max-width: 980px) {
  .overview-dashboard {
    grid-template-columns: 1fr;
  }

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

  .panel-header,
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .main-nav {
    justify-content: flex-start;
    overflow-x: auto;
    max-width: none;
    width: 100%;
  }

  .main-nav a {
    white-space: nowrap;
  }

  .filter-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-card-title,
  .filter-card-controls,
  .filter-field,
  .filter-button {
    width: 100%;
  }

  .filter-field-wide {
    min-width: 0;
  }

  .profile-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .profile-detail-grid {
    grid-template-columns: 1fr;
  }

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

  .player-profile-card {
    grid-template-columns: 1fr;
  }

  .profile-actions {
    justify-content: flex-start;
  }

  .player-profile-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .player-match-button {
    justify-self: start;
  }

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

  .opponent-profile-card {
    grid-template-columns: 1fr;
  }

  .opponent-profile-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .opponent-match-button {
    justify-self: start;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .overview-panels {
    grid-template-columns: 1fr;
  }

  .match-list {
    border-right: 0;
    border-bottom: 1px solid var(--surface-border);
  }

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

@media (max-width: 640px) {
  .overview-snapshot {
    align-items: flex-start;
    flex-direction: column;
  }

  .overview-snapshot-meta {
    width: 100%;
  }

  .overview-grid {
    grid-template-columns: 1fr;
  }

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

  .profile-detail-head p {
    width: 100%;
    white-space: normal;
  }

  .profile-match-row {
    grid-template-columns: 30px minmax(0, 1fr) auto;
  }

  .profile-match-row em {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .overview-player-row {
    grid-template-columns: 28px minmax(0, 1fr) 42px 34px 34px 44px;
    gap: 5px;
    padding: 8px 10px;
  }

  .overview-player-rank {
    width: 24px;
    min-height: 24px;
  }

  .overview-player-stat {
    font-size: 11px;
  }

  .overview-opponent-row {
    grid-template-columns: minmax(0, 1fr) 44px;
  }

  .overview-opponent-form {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .match-main {
    grid-template-columns: 1fr;
  }

  .match-main span {
    justify-self: start;
  }

  .match-stat-grid {
    grid-template-columns: 1fr;
  }

  .match-details {
    padding: 14px;
  }

  .filter-card-title h2 {
    font-size: 26px;
  }

  .player-highlights {
    grid-template-columns: 1fr;
  }

  .player-profile-card {
    padding: 12px;
  }

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

  .player-mini-stat {
    min-height: 32px;
  }

  .opponent-highlights {
    grid-template-columns: 1fr;
  }

  .opponent-profile-card {
    padding: 12px;
  }

  .opponent-profile-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .opponent-mini-stat {
    min-height: 48px;
  }

  .players-table {
    display: grid;
    gap: 10px;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .players-header {
    display: none;
  }

  .players-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    min-height: 0;
    border: 1px solid var(--surface-border);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    font-size: 12px;
    padding: 10px;
  }

  .players-row:nth-child(odd),
  .players-row:hover {
    background: #ffffff;
  }

  .players-row:hover {
    box-shadow: inset 3px 0 0 var(--brand), var(--shadow-soft);
  }

  .players-row span {
    white-space: normal;
  }

  .player-name-cell {
    grid-column: 1 / -1;
    border-bottom: 1px solid var(--surface-border);
    padding-bottom: 8px;
    font-size: 14px;
  }

  .players-row .position-badge,
  .players-row .rating-badge,
  .players-row .stat-number,
  .players-row .stat-fraction,
  .players-row .stat-percent {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    height: auto;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    justify-self: stretch;
    border-radius: 8px;
    padding: 4px 8px;
  }

  .players-row .position-badge::before,
  .players-row .rating-badge::before,
  .players-row .stat-number::before,
  .players-row .stat-fraction::before,
  .players-row .stat-percent::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: 9px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
  }

  .opponent-record-card {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .opponent-record-main {
    gap: 8px;
  }

  .opponent-record-main strong,
  .opponent-record-main b {
    font-size: 18px;
  }

  .opponent-record-form {
    justify-content: flex-start;
  }

  .players-summary-header,
  .players-summary-row {
    min-width: 620px;
  }

  .opponents-summary-header,
  .opponents-summary-row {
    min-width: 460px;
  }

  .overview-match-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .overview-match-teams {
    grid-template-columns: 1fr;
  }

  .overview-match-teams span {
    justify-self: start;
  }

  .overview-row-meta {
    grid-column: 2;
  }

  .overview-players-header,
  .overview-players-row {
    min-width: 520px;
  }
}
