:root {
  --home-color: #2e6fd1; /* дом */
  --away-color: #9aa0a6; /* гость */
  --card-border: #ececec;
  --card-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}

.match-page * {
  box-sizing: border-box;
}
.match-page {
  background: #fff;
}

/* ===== HERO ===== */
.match-hero {
  background: #0e1c44;
  color: #fff;
  padding: 60px 22px;
  display: grid;
  grid-template-columns: 1fr minmax(220px, 320px) 1fr;
  align-items: start;
  gap: 18px;
  margin-bottom: 12px;
}
.match-hero__team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.match-hero__team--home {
  justify-content: flex-start;
}
.match-hero__team--away {
  justify-content: flex-end;
}
.match-hero__team-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.match-hero__logo {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #fff;
  object-fit: contain;
  display: block;
  padding: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.match-hero__name {
  display: block;
  font-weight: 800;
  font-size: 22px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  margin-bottom: 6px;
}
.match-hero__scorers {
  font-size: 15px;
  color: #d6d6d6;
  line-height: 1.4;
  margin-top: 6px;
}
.match-hero__scorers .sc-item {
  display: block;
}
.match-hero__scorers .sc-minute {
  color: #a2ffd2;
  margin-right: 4px;
}
.match-hero__scorers .sc-note {
  color: #bcbcbc;
  margin-left: 4px;
}
/* цвета в sc-who: забивший — белый, ассист/пометка — серый */
.match-hero__scorers .sc-who-scorer {
  color: #fff;
  font-weight: 500;
}
.match-hero__scorers .sc-who-assist {
  color: #bcbcbc;
  font-weight: 500;
}

.match-hero__center {
  text-align: center;
}

.match-hero__meta-center {
  display: flex;
  flex-direction: column;
  gap: 17px;
  font-size: 13px;
  color: #cfcfcf;
  margin-bottom: 10px;
}
.match-hero__meta-item {
  color: inherit;
}
.match-hero__meta-dot {
  color: #8b8b8b;
  margin: 0 6px;
}

.match-hero__meta-line1 {
  font-weight: 800;
  color: #fff; /* в HERO белый текст смотрится лучше */
}

.match-hero__score {
  font-weight: 900;
  font-size: 44px;
  padding: 6px 17px;
  border-radius: 10px;
  min-width: 143px;
  text-align: center;
  background: #e7e7e7;
  color: #0e1c44;
  display: inline-block;
}
.score-num {
  display: inline-block;
  min-width: 28px;
}
.score-sep {
  display: inline-block;
  padding: 0 10px;
}

/* ===== TABS ===== */
.match-tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #fff;
  display: flex;
  gap: 24px;
  border-bottom: 1px solid #ececec;
  margin: 10px 0 14px;
  padding: 8px 25px 0;
}
.match-tabs__btn {
  position: relative;
  display: inline-block;
  text-decoration: none;
  color: #666;
  font: inherit;
  font-weight: 700;
  padding: 12px 0 10px;
  border: 0;
  cursor: pointer;
}
.match-tabs__btn:hover {
  color: #111;
}
.match-tabs__btn.is-active,
.match-tabs__btn[aria-current='true'] {
  color: #000;
}
.match-tabs__btn.is-active::after,
.match-tabs__btn[aria-current='true']::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -1px;
  width: 44px;
  height: 3px;
  border-radius: 3px;
  background: #0e1c44;
}

.match-pane {
  padding: 8px 25px 10px;
}

/* ===== TIMELINE ===== */
.timeline {
  position: relative;
  padding: 10px 0;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #e9e9e9;
  transform: translateX(-50%);
  border-radius: 4px;
}
.timeline__item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 80px 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}
.timeline__item--home {
  text-align: right;
}
.timeline__item--away {
  text-align: left;
}
.timeline__min {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #0e1c44;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  margin: 0 auto;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
.timeline__content {
  display: flex;
  align-items: center;
  gap: 10px;
}
.timeline__photo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: #f2f2f2;
  flex: 0 0 auto;
}
.timeline__title {
  font-weight: 800;
  margin: 0;
}
.timeline__text {
  color: #444;
}
.timeline__badge {
  width: 32px;
  height: 32px;
  display: inline-block;
  vertical-align: middle;
}

/* ===== STATS (карточка с долевыми барами) ===== */
.stats__card {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  padding: 12px;
}
.stats__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px 12px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 6px;
}
.stats__team {
  display: flex;
  align-items: center;
  gap: 10px;
}
.stats__team-name {
  font-weight: 800;
}
.stats__logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
}

.stats__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.stats__row {
  border-bottom: 1px solid #f0f0f0;
}
.stats__row:last-child {
  border-bottom: 0;
}
.stats__cell {
  padding: 25px 8px 0;
  vertical-align: middle;
}
.stats__cell--home,
.stats__cell--away {
  width: 64px;
  text-align: center;
  font-size: 20px;
  font-weight: 800;
}
.stats__cell--label {
  width: auto;
  padding: 12px 8px;
}
.stats__label {
  color: #333;
  text-align: center;
  margin-bottom: 8px;
  font-weight: 800;
}
.stats__bar {
  position: relative;
  height: 17px;
  background: #efefef;
  border-radius: 6px;
  overflow: hidden;
}
.stats__bar-home,
.stats__bar-away {
  position: absolute;
  top: 0;
  bottom: 0;
}
.stats__bar-home {
  left: 0;
  background: var(--home-color);
}
.stats__bar-away {
  right: 0;
  background: var(--away-color);
}
.stats__empty {
  padding: 12px 8px;
  color: #777;
  text-align: center;
}

/* ===== LINEUPS (фото → флаг → имя → позиция) ===== */
.lineups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.lineups__title {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 800;
}
.lineups__meta {
  color: #666;
  font-size: 14px;
  margin-bottom: 8px;
}
.lineups__block {
  background: #fff;
  padding: 10px 12px;
}
.lineups__subtitle {
  margin: 8px 0 10px;
  font-size: 15px;
  font-weight: 800;
}
.lineups__list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.lineups__item {
  padding: 6px 8px;
  border-bottom: 1px solid #f5f5f5;
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: #f4f4f4;
}
.lineups__item:last-child {
  border-bottom: 0;
}

.pl-photo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: #f2f2f2;
  flex: 0 0 auto;
}
.pl-flag {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
  background: #f8f8f8;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
}
.pl-num {
  font-weight: 800;
  width: 28px;
  text-align: center;
  color: #333;
  flex: 0 0 auto;
}
.pl-name {
  flex: 1 1 auto;
  color: #111;
  font-weight: 500;
}
.pl-pos {
  flex: 0 0 auto;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  color: #616e96;
  font-weight: 800;
  width: 38px;
  text-align: center;
}

.match-updated {
  color: #888;
  margin-top: 12px;
  font-size: 13px;
}

/* ===== Responsive ===== */
@media (max-width: 760px) {
  .match-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .match-hero__team--away,
  .match-hero__team--home {
    justify-content: center;
  }
  .match-hero__team-box--right {
    text-align: center;
  }
  .match-hero__score {
    margin: 8px auto;
  }
  .lineups {
    grid-template-columns: 1fr;
  }
  .timeline__item {
    grid-template-columns: 1fr 60px 1fr;
  }
}

/* ===== Timeline Markers (Start / End) ===== */
.timeline__marker {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  pointer-events: none;
}
.timeline__marker--start {
  top: -22px;
}
.timeline__marker--end {
  bottom: -22px;
}

.timeline__marker-pill {
  display: inline-block;
  padding: 4px 10px;
  font-size: 17px;
  line-height: 1;
  color: #0e1c44;
  background: #ffffff;
  font-weight: 700;
  text-transform: none;
}

/* ===== Substitution inline colors ===== */
.ev-sub-in {
  color: #000;
  font-weight: 600;
}
.ev-sub-out {
  color: #888;
  font-weight: 500;
}

/* ===== Lineups header (зеркальный) ===== */
.lineups__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px 12px;
}

.lineups__head-left,
.lineups__head-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lineups__head-left {
  justify-content: flex-start;
}

.lineups__head-right {
  justify-content: flex-end;
}

.lineups__head-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
}

.lineups__head-name {
  font-size: 18px;
  font-weight: 800;
  color: #111;
}

/* ===== Lineups coaches (общая линия) ===== */
.lineups__coaches {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 12px;
  padding: 0 12px;
}
.lineups__coach {
  background: #eeeeee;
  padding: 10px 12px;
  font-size: 14px;
  color: #333;
  font-weight: 600;
}

/* ===== Player row right tail (icons + minutes) ===== */
.pl-ev {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.pl-ev .ev {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #444;
}
.pl-ev .ev .timeline__badge {
  width: 18px;
  height: 18px;
}
.pl-ev .ev .ev-m {
  line-height: 1;
}
