:root {
  background:
    linear-gradient(90deg, rgba(227, 255, 75, 0.12) 0 1px, transparent 1px 80px),
    #e8edf1;
  color: #11171d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.app-shell {
  display: grid;
  gap: 18px;
  margin: 0 auto;
  max-width: 1220px;
  padding: 24px;
}

.top {
  background:
    linear-gradient(135deg, rgba(230, 255, 62, 0.18), transparent 34%),
    #0d1217;
  border: 1px solid #29323a;
  border-radius: 8px;
  color: #f7fafc;
  display: grid;
  min-height: 210px;
  overflow: hidden;
  padding: 28px;
  position: relative;
}

.top::after {
  background: #e6ff3e;
  bottom: 0;
  content: "";
  height: 10px;
  left: 28px;
  position: absolute;
  width: 168px;
}

.eyebrow {
  color: #6b7781;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.top .eyebrow,
.live-panel .eyebrow {
  color: #9aa8b2;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(36px, 6vw, 68px);
  letter-spacing: 0;
  line-height: 0.98;
  margin-top: 10px;
  max-width: 780px;
}

h2 {
  font-size: 20px;
  line-height: 1.2;
  margin-top: 4px;
}

.summary {
  display: grid;
  gap: 10px;
  grid-template-columns: 1.2fr 1fr 1fr 1.3fr;
}

.summary div {
  background: #ffffff;
  border: 1px solid #d2dbe2;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  min-height: 86px;
  padding: 16px;
}

.summary div:first-child {
  background: #11171d;
  border-color: #11171d;
  color: #ffffff;
}

.summary div:nth-child(2) {
  border-left: 8px solid #e33a3a;
}

.summary div:nth-child(3) {
  border-left: 8px solid #2f7bdc;
}

.summary div:nth-child(4) {
  border-left: 8px solid #e6ff3e;
}

.summary small {
  color: #687680;
  font-weight: 800;
}

.summary div:first-child small {
  color: #aeb8bf;
}

.summary strong {
  font-size: 30px;
  line-height: 1;
}

.live-panel {
  background: #11171d;
  border: 1px solid #27313a;
  border-radius: 8px;
  color: #f7fafc;
  display: grid;
  gap: 0;
  grid-template-columns: 310px minmax(0, 1fr);
  overflow: hidden;
}

.live-copy {
  align-content: center;
  border-right: 1px solid #2f3942;
  display: grid;
  gap: 16px;
  padding: 22px;
}

.live-dot {
  align-items: center;
  background: #e33a3a;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 950;
  height: 28px;
  justify-content: center;
  width: 56px;
}

.live-list {
  display: grid;
  gap: 0;
}

.live-match {
  align-items: center;
  background: #171e25;
  border-bottom: 1px solid #2b3540;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 78px;
  padding: 14px 16px;
}

.live-match:last-child {
  border-bottom: 0;
}

.live-match strong,
.live-match small,
.live-match time {
  display: block;
}

.live-match strong {
  font-size: 20px;
  line-height: 1.15;
}

.live-match strong span {
  background: #e6ff3e;
  border-radius: 6px;
  color: #11171d;
  display: inline-flex;
  font-weight: 950;
  justify-content: center;
  margin: 0 8px;
  min-width: 64px;
  padding: 5px 8px;
}

.live-match small,
.live-match time {
  color: #b8c3ca;
  font-size: 12px;
}

.filter-panel {
  background: #ffffff;
  border: 1px solid #d2dbe2;
  border-radius: 8px;
  display: grid;
  gap: 14px;
  padding: 16px;
}

.filter-header,
.results-heading {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.clear-filter,
.filter-tag,
.panel-heading button,
.auth-form button {
  border: 0;
  cursor: pointer;
  font-weight: 850;
  white-space: nowrap;
}

.clear-filter,
.panel-heading button,
.auth-form button {
  background: #11171d;
  border-radius: 6px;
  color: #ffffff;
  min-height: 38px;
  padding: 0 13px;
}

.clear-filter {
  background: #e6ff3e;
  color: #11171d;
}

.auth-form button.secondary {
  background: #eef3f5;
  color: #26343b;
}

.filter-group {
  display: grid;
  gap: 8px;
}

.filter-group > span {
  color: #60707a;
  font-size: 12px;
  font-weight: 850;
}

.tag-row {
  display: flex;
  gap: 8px;
  min-height: 40px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.filter-tag {
  background: #f3f6f8;
  border: 1px solid #d5dee6;
  border-radius: 999px;
  color: #26343b;
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
}

.filter-tag.active {
  background: #11171d;
  border-color: #11171d;
  box-shadow: inset 0 -3px 0 #e6ff3e;
  color: #ffffff;
}

.filter-tag:disabled,
.filter-tag.disabled {
  background: #eef2f4;
  border-color: #dde5ea;
  box-shadow: none;
  color: #98a4ad;
  cursor: not-allowed;
  opacity: 0.62;
}

.results-heading {
  background: transparent;
  min-height: 46px;
}

.results-count {
  background: #11171d;
  border-radius: 999px;
  color: #e6ff3e;
  font-size: 13px;
  font-weight: 900;
  padding: 7px 10px;
}

.match-list {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.match-card {
  background: #ffffff;
  border: 1px solid #d2dbe2;
  border-left: 8px solid #c6d0d8;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 13px 14px 13px 12px;
}

.match-card.is-live {
  background:
    linear-gradient(135deg, rgba(227, 58, 58, 0.12), transparent 34%),
    #ffffff;
  grid-column: 1 / -1;
  min-height: 166px;
  padding: 18px;
}

.match-card.is-next {
  background:
    linear-gradient(135deg, rgba(230, 255, 62, 0.16), transparent 32%),
    #ffffff;
  min-height: 148px;
}

.match-card:has(.state.inProgress) {
  border-left-color: #e33a3a;
}

.match-card:has(.state.scheduled) {
  border-left-color: #2f7bdc;
}

.match-card:has(.state.completed) {
  border-left-color: #7d8a94;
}

.match-time,
.match-meta,
.panel-heading,
.run-list article {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.match-time strong {
  color: #50606a;
  font-size: 13px;
}

.state {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  padding: 5px 9px;
}

.state.inProgress {
  background: #e33a3a;
  color: #ffffff;
}

.state.scheduled,
.state.unstarted {
  background: #e8f1fb;
  color: #215f9a;
}

.state.completed {
  background: #eef1f3;
  color: #52616b;
}

.teams {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) 96px minmax(0, 1fr);
}

.teams span {
  font-size: 18px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.is-live .teams span {
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.05;
}

.is-live .teams strong {
  font-size: 22px;
  min-width: 110px;
  padding: 11px 12px;
}

.is-next .teams span {
  font-size: 21px;
}

.teams span:last-child {
  text-align: right;
}

.teams strong {
  background: #11171d;
  border-radius: 7px;
  color: #ffffff;
  justify-self: center;
  min-width: 88px;
  padding: 8px 10px;
  text-align: center;
}

.match-meta {
  color: #60707a;
  flex-wrap: wrap;
  font-size: 13px;
}

.sources {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sources a {
  background: #eef3f5;
  border-radius: 999px;
  color: #26343b;
  font-size: 12px;
  font-weight: 780;
  padding: 6px 9px;
  text-decoration: none;
}

.admin-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
}

.auth-panel {
  grid-template-columns: minmax(180px, 0.5fr) minmax(0, 1fr);
}

.auth-form {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1fr) auto auto;
}

.auth-form label {
  display: grid;
  gap: 6px;
}

.auth-form label span {
  color: #60707a;
  font-size: 12px;
  font-weight: 850;
}

.auth-form input {
  border: 1px solid #ccd7df;
  border-radius: 8px;
  min-height: 42px;
  padding: 0 11px;
  width: 100%;
}

.panel {
  background: #ffffff;
  border: 1px solid #d2dbe2;
  border-radius: 8px;
  display: grid;
  gap: 14px;
  padding: 16px;
}

.muted,
.empty {
  color: #60707a;
  line-height: 1.55;
}

.compact {
  color: #b8c3ca;
  margin: 0;
}

pre {
  background: #15211c;
  border-radius: 8px;
  color: #e7f6ee;
  margin: 0;
  min-height: 120px;
  overflow: auto;
  padding: 14px;
}

.source-list,
.run-list {
  display: grid;
  gap: 10px;
}

.source-list article,
.run-list article {
  border: 1px solid #e2e8ed;
  border-radius: 8px;
  padding: 12px;
}

.source-list article {
  display: grid;
  gap: 5px;
}

.source-list span,
.run-list span {
  color: #60707a;
  font-size: 13px;
}

.run-list article > div {
  display: grid;
  gap: 4px;
}

@media (max-width: 780px) {
  .app-shell {
    padding: 14px;
  }

  .top,
  .match-time,
  .filter-header,
  .results-heading,
  .panel-heading,
  .run-list article,
  .live-match {
    align-items: stretch;
    flex-direction: column;
  }

  .summary,
  .live-panel,
  .match-list,
  .auth-panel,
  .auth-form,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .live-copy {
    border-bottom: 1px solid #2f3942;
    border-right: 0;
  }

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

  .teams span,
  .teams span:last-child {
    text-align: left;
  }

  .teams strong {
    justify-self: start;
  }
}
