.live-matches-page {
  --live-advertised: #e7c671;
  --live-observable: #7fd5b2;
  --live-unknown: #b7a9cb;
  background:
    radial-gradient(circle at 18% 7%, rgba(36, 80, 116, 0.19), transparent 34rem),
    radial-gradient(circle at 82% 22%, rgba(115, 75, 27, 0.12), transparent 30rem),
    #050812;
}

.live-matches-shell {
  width: min(1540px, calc(100% - (var(--site-page-gutter) * 2)));
  min-height: 70vh;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 5rem) 0 5rem;
}

.live-matches-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(520px, 0.75fr);
  gap: clamp(2rem, 5vw, 5.5rem);
  align-items: end;
  padding: clamp(2rem, 4vw, 3.8rem);
  overflow: hidden;
  border: 1px solid rgba(226, 192, 112, 0.28);
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(8, 13, 24, 0.98) 0%, rgba(8, 15, 27, 0.88) 56%, rgba(16, 24, 36, 0.72) 100%),
    url("../assets/images/live/earth_night_map.5b98205293b1.png") 90% 48% / min(760px, 58%) auto no-repeat;
  box-shadow: 0 28px 68px rgba(0, 0, 0, 0.34);
}

.live-matches-hero::after {
  position: absolute;
  right: -4rem;
  bottom: -8rem;
  width: 30rem;
  height: 18rem;
  border: 1px solid rgba(230, 194, 111, 0.14);
  border-radius: 50%;
  content: "";
  transform: rotate(-11deg);
  pointer-events: none;
}

.live-matches-hero-copy,
.live-summary {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.live-matches-hero h1 {
  margin: 0.4rem 0 0.75rem;
  color: #f7dfa7;
  font-family: var(--site-font-title);
  font-size: clamp(2.6rem, 6vw, 5.8rem);
  font-weight: 760;
  letter-spacing: -0.035em;
  line-height: 0.95;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.56);
}

.live-matches-lede {
  max-width: 760px;
  margin: 0;
  color: var(--site-text-muted);
  font-size: clamp(1rem, 1.35vw, 1.2rem);
  line-height: 1.65;
}

.live-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border: 1px solid rgba(225, 192, 113, 0.25);
  border-radius: 10px;
  background: rgba(3, 8, 16, 0.76);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
}

.live-summary > div {
  min-width: 0;
  padding: 1rem 1.15rem;
}

.live-summary > div:nth-child(odd) {
  border-right: 1px solid rgba(225, 192, 113, 0.16);
}

.live-summary > div:nth-child(-n + 2) {
  border-bottom: 1px solid rgba(225, 192, 113, 0.16);
}

.live-summary dt {
  color: var(--site-text-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.live-summary dd {
  min-width: 0;
  margin: 0.28rem 0 0;
  overflow: hidden;
  color: #fff0bc;
  font-family: var(--site-font-title);
  font-size: clamp(1.3rem, 2.1vw, 2rem);
  font-weight: 720;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-snapshot-notice {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(231, 184, 96, 0.42);
  border-radius: 8px;
  color: #f9dfad;
  background: rgba(104, 67, 18, 0.3);
  line-height: 1.45;
}

.live-snapshot-notice[data-tone="error"] {
  border-color: rgba(225, 117, 105, 0.48);
  color: #ffd2cd;
  background: rgba(100, 31, 27, 0.32);
}

.live-controls {
  display: flex;
  gap: 1rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.2rem;
  padding: 0.85rem;
  border: 1px solid var(--site-border);
  border-radius: 10px;
  background: rgba(8, 13, 23, 0.88);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.live-filter-row {
  display: flex;
  min-width: 0;
  gap: 0.45rem;
  align-items: center;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.live-filter,
.live-refresh {
  min-height: 2.45rem;
  border: 1px solid rgba(220, 187, 111, 0.23);
  border-radius: 999px;
  color: var(--site-text-muted);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  transition: 150ms ease;
  transition-property: color, border-color, background, transform;
}

.live-filter {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 0.48rem;
  align-items: center;
  padding: 0.5rem 0.75rem 0.46rem;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

.live-filter[hidden] {
  display: none;
}

.live-filter span {
  min-width: 1.55rem;
  padding: 0.06rem 0.34rem;
  border-radius: 999px;
  color: var(--site-text-soft);
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.7rem;
  text-align: center;
}

.live-filter:hover,
.live-refresh:hover {
  border-color: rgba(236, 202, 124, 0.52);
  color: #fff0bc;
  background: rgba(225, 186, 101, 0.08);
}

.live-filter.is-active {
  border-color: rgba(238, 205, 127, 0.66);
  color: #181107;
  background: linear-gradient(180deg, #f0d38e, #c99e4e);
  box-shadow: 0 5px 18px rgba(199, 151, 63, 0.17);
}

.live-filter.is-active span {
  color: #2e1e08;
  background: rgba(66, 42, 5, 0.13);
}

.live-control-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 0.55rem;
  align-items: center;
}

.live-player-search {
  position: relative;
  display: flex;
  align-items: center;
}

.live-player-search svg {
  position: absolute;
  left: 0.8rem;
  width: 1rem;
  fill: none;
  stroke: var(--site-text-soft);
  stroke-linecap: round;
  stroke-width: 1.8;
  pointer-events: none;
}

.live-player-search input {
  width: clamp(12rem, 17vw, 16.5rem);
  min-height: 2.45rem;
  padding: 0.45rem 0.85rem 0.42rem 2.3rem;
  border: 1px solid rgba(220, 187, 111, 0.25);
  border-radius: 999px;
  outline: none;
  color: var(--site-text);
  background: rgba(1, 4, 10, 0.56);
}

.live-player-search input:focus {
  border-color: rgba(241, 207, 126, 0.72);
  box-shadow: 0 0 0 3px rgba(231, 194, 105, 0.1);
}

.live-player-search input::placeholder {
  color: var(--site-text-soft);
}

.live-refresh {
  padding: 0.45rem 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}

.live-refresh[disabled] {
  opacity: 0.55;
  cursor: wait;
}

.live-results-heading {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin: 1.2rem 0 0.7rem;
  color: var(--site-text-muted);
  font-size: 0.88rem;
}

.live-results-heading p {
  margin: 0;
}

.live-polling-status {
  color: var(--site-text-soft);
  text-align: right;
}

.live-match-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

.live-match-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(217, 181, 100, 0.24);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 239, 192, 0.035), transparent 7rem),
    rgba(8, 13, 23, 0.92);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

.live-match-card::before {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--live-unknown);
  content: "";
}

.live-match-card[data-state="advertised"]::before {
  background: var(--live-advertised);
}

.live-match-card[data-state="observable"]::before {
  background: var(--live-observable);
}

.live-card-header {
  position: relative;
  display: grid;
  min-height: 8.7rem;
  grid-template-columns: minmax(0, 1fr) 7.5rem;
  overflow: hidden;
  border-bottom: 1px solid rgba(214, 177, 94, 0.17);
}

.live-card-heading {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem 0.5rem 0.9rem 1.15rem;
  background: linear-gradient(90deg, rgba(7, 12, 21, 0.98), rgba(7, 12, 21, 0.78) 85%, transparent);
}

.live-state-line,
.live-meta-line {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.live-state-badge,
.live-data-badge {
  display: inline-flex;
  max-width: 100%;
  gap: 0.36rem;
  align-items: center;
  border-radius: 999px;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  line-height: 1;
  text-transform: uppercase;
}

.live-state-badge {
  padding: 0.36rem 0.52rem;
  border: 1px solid currentColor;
}

.live-state-badge::before {
  width: 0.43rem;
  height: 0.43rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
  content: "";
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 16%, transparent);
}

.live-state-badge[data-state="advertised"] {
  color: var(--live-advertised);
}

.live-state-badge[data-state="observable"] {
  color: var(--live-observable);
}

.live-data-badge {
  padding: 0.32rem 0.5rem;
  color: var(--site-text-muted);
  background: rgba(255, 255, 255, 0.055);
}

.live-data-badge[data-tone="unknown"] {
  color: #dac9ec;
  background: rgba(139, 111, 166, 0.18);
}

.live-freshness {
  color: var(--site-text-soft);
  font-size: 0.75rem;
  white-space: nowrap;
}

.live-card-map-name {
  max-width: 100%;
  margin: 0.65rem 0 0;
  overflow: hidden;
  color: #f3dfb2;
  font-family: var(--site-font-title);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-card-map-art {
  position: absolute;
  top: 0;
  right: 0;
  width: 46%;
  height: 100%;
  object-fit: cover;
  opacity: 0.66;
  filter: saturate(0.8) contrast(1.05);
}

.live-card-map-fallback {
  position: absolute;
  top: 0;
  right: 0;
  width: 38%;
  height: 100%;
  background:
    linear-gradient(125deg, transparent, rgba(25, 48, 64, 0.35)),
    repeating-linear-gradient(45deg, rgba(223, 190, 112, 0.05) 0 1px, transparent 1px 10px);
}

.live-roster {
  display: grid;
  flex: 1;
  gap: 0.72rem;
  padding: 0.9rem 1rem 1rem 1.15rem;
}

.live-team {
  min-width: 0;
}

.live-team + .live-team {
  padding-top: 0.68rem;
  border-top: 1px solid rgba(213, 177, 101, 0.13);
}

.live-team-title {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin: 0 0 0.35rem;
  color: var(--site-text-soft);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.live-team-title::after {
  height: 1px;
  flex: 1;
  background: rgba(213, 177, 101, 0.12);
  content: "";
}

.live-player-list {
  display: grid;
  gap: 0.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.live-player {
  display: grid;
  min-width: 0;
  min-height: 2.25rem;
  grid-template-columns: 1.7rem minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.28rem 0.38rem;
  border-radius: 6px;
}

.live-player:hover {
  background: rgba(255, 255, 255, 0.035);
}

.live-player-god {
  width: 1.7rem;
  height: 1.7rem;
  border: 1px solid rgba(225, 193, 118, 0.22);
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.04);
}

.live-player-god-fallback {
  display: grid;
  width: 1.7rem;
  height: 1.7rem;
  place-items: center;
  border: 1px solid rgba(225, 193, 118, 0.16);
  border-radius: 50%;
  color: var(--site-text-soft);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.65rem;
}

.live-player-main {
  display: flex;
  min-width: 0;
  gap: 0.38rem;
  align-items: center;
}

.live-player-name {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #f4e6c7;
  font-weight: 650;
  line-height: 1.15;
  text-decoration-color: rgba(235, 197, 111, 0.42);
  text-underline-offset: 0.2em;
}

.live-player-name:hover {
  color: var(--site-gold-strong);
}

.live-presence {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 0.24rem;
  align-items: center;
  color: var(--site-text-soft);
  font-size: 0.63rem;
  white-space: nowrap;
}

.live-presence::before {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: #8c99a8;
  content: "";
}

.live-presence[data-presence="in_game"]::before {
  background: #6dd3a8;
}

.live-presence[data-presence="lobby"]::before {
  background: #e3bd67;
}

.live-presence[data-presence="main_menu"]::before {
  background: #88bfe5;
}

.live-presence[data-presence="offline"]::before {
  background: #8c8990;
}

.live-player-rating {
  color: #e4c987;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
}

.live-rating-source {
  display: block;
  color: var(--site-text-soft);
  font-size: 0.58rem;
  font-weight: 500;
  line-height: 1.05;
  text-align: right;
}

.live-roster-note,
.live-no-roster {
  margin: 0;
  color: var(--site-text-soft);
  font-size: 0.78rem;
  line-height: 1.4;
}

.live-roster-note {
  padding-top: 0.45rem;
  border-top: 1px solid rgba(213, 177, 101, 0.12);
}

.live-empty-state {
  margin-top: 1rem;
  padding: clamp(2.5rem, 8vw, 6rem) 1.5rem;
  border: 1px dashed rgba(213, 177, 101, 0.3);
  border-radius: 10px;
  color: var(--site-text-muted);
  background: rgba(8, 13, 23, 0.58);
  text-align: center;
}

.live-empty-state h2 {
  margin: 0.25rem 0 0.4rem;
  color: #f0daa9;
  font-family: var(--site-font-title);
}

.live-empty-state p {
  margin: 0;
}

.live-empty-mark {
  color: var(--site-gold);
  font-size: 2rem;
}

.live-source-note {
  display: grid;
  grid-template-columns: minmax(12rem, 0.4fr) minmax(20rem, 1fr) auto;
  gap: 1.5rem 2.5rem;
  align-items: center;
  margin-top: 2.5rem;
  padding: 1.4rem 1.5rem;
  border-top: 1px solid rgba(213, 177, 101, 0.25);
  border-bottom: 1px solid rgba(213, 177, 101, 0.16);
}

.live-source-note h2 {
  margin: 0.22rem 0 0;
  color: #eed8a6;
  font-family: var(--site-font-title);
  font-size: 1.15rem;
}

.live-source-note > p {
  margin: 0;
  color: var(--site-text-muted);
  line-height: 1.55;
}

.live-source-note a {
  color: var(--site-gold);
  font-weight: 700;
  text-align: right;
  text-decoration: none;
}

.live-source-note a:hover {
  color: var(--site-gold-strong);
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

@media (max-width: 1220px) {
  .live-matches-hero {
    grid-template-columns: minmax(0, 1fr) minmax(420px, 0.8fr);
  }

  .live-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .live-control-actions {
    justify-content: flex-end;
  }

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

  .live-source-note {
    grid-template-columns: 0.45fr 1fr;
  }

  .live-source-note a {
    grid-column: 2;
    text-align: left;
  }
}

@media (max-width: 820px) {
  .live-matches-shell {
    width: min(100% - 1.5rem, 1540px);
    padding-top: 1rem;
  }

  .live-matches-hero {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
    background:
      linear-gradient(180deg, rgba(8, 13, 24, 0.94), rgba(8, 15, 27, 0.94)),
      url("../assets/images/live/earth_night_map.5b98205293b1.png") center / cover no-repeat;
  }

  .live-matches-hero h1 {
    font-size: clamp(2.45rem, 13vw, 4rem);
  }

  .live-control-actions {
    align-items: stretch;
  }

  .live-player-search {
    flex: 1;
  }

  .live-player-search input {
    width: 100%;
  }

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

  .live-source-note {
    grid-template-columns: 1fr;
  }

  .live-source-note a {
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  .live-matches-page .site-shell-header {
    padding-inline: 0.6rem;
  }

  .live-matches-page .site-header-inner {
    gap: 0.35rem;
  }

  .live-matches-page .site-header-search {
    display: none;
  }

  .live-matches-page .site-brand-icon {
    width: 42px;
    height: 42px;
  }

  .live-matches-page .site-brand-wordmark {
    font-size: 1.42rem;
  }

  .live-matches-page .site-brand-tagline {
    display: none;
  }

  .live-matches-shell {
    width: min(100% - 1rem, 1540px);
  }

  .live-matches-hero {
    padding: 1.2rem;
  }

  .live-matches-hero h1 {
    max-width: 100%;
    font-size: clamp(2rem, 10.5vw, 2.55rem);
    letter-spacing: -0.05em;
    overflow-wrap: anywhere;
  }

  .live-summary > div {
    padding: 0.85rem;
  }

  .live-summary dd {
    font-size: 1.25rem;
  }

  .live-controls {
    padding: 0.62rem;
  }

  .live-control-actions {
    flex-wrap: wrap;
  }

  .live-player-search {
    flex-basis: 100%;
  }

  .live-refresh {
    width: 100%;
  }

  .live-results-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .live-polling-status {
    text-align: left;
  }

  .live-card-header {
    grid-template-columns: minmax(0, 1fr) 5.5rem;
  }

  .live-player {
    grid-template-columns: 1.55rem minmax(0, 1fr) auto;
    gap: 0.42rem;
  }

  .live-player-god,
  .live-player-god-fallback {
    width: 1.55rem;
    height: 1.55rem;
  }

  .live-source-note {
    padding-inline: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-filter,
  .live-refresh {
    transition: none;
  }
}
