.boxscore-page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 20px 56px;
  color: #333;
  font-family: Arial, sans-serif;
}

.boxscore-page section {
  margin-bottom: 0;
}

.boxscore-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid #e3e3e3;
}

.boxscore-kicker {
  margin: 0 0 6px;
  color: #666;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.boxscore-header h1 {
  margin: 0;
  color: #2a2a2a;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.boxscore-meta {
  margin: 7px 0 0;
  color: #666;
  font-size: 14px;
}

.boxscore-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
  color: #4a4a4a;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.boxscore-back:hover {
  border-color: #4a4a4a;
  color: #2a2a2a;
}

.boxscore-summary-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(360px, 1.15fr);
  gap: 16px;
  align-items: start;
}

.boxscore-player-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
  margin-top: 18px;
}

.boxscore-scoreboard,
.boxscore-section {
  min-width: 0;
  background: #fff;
  border: 1px solid #e3e3e3;
  border-radius: 6px;
  overflow: hidden;
}

.boxscore-section {
  margin-top: 18px;
}

.boxscore-summary-grid .boxscore-section {
  margin-top: 0;
}

.boxscore-player-grid .boxscore-section {
  margin-top: 0;
}

.boxscore-panel-head,
.boxscore-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  background: #f8f8f8;
  border-bottom: 1px solid #e3e3e3;
}

.boxscore-panel-head h2,
.boxscore-section__head h2 {
  margin: 0;
  color: #2a2a2a;
  font-size: 15px;
  font-weight: 700;
}

.boxscore-panel-head span,
.boxscore-section__head span,
.boxscore-team-labels {
  color: #777;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.boxscore-team {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
}

.boxscore-team + .boxscore-team {
  border-top: 1px solid #eee;
}

.boxscore-team img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.boxscore-team__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.boxscore-team__body strong {
  overflow: hidden;
  color: #2a2a2a;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.boxscore-team__body span {
  color: #777;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.boxscore-team__side {
  margin-bottom: 2px;
}

.boxscore-team__score {
  color: #2a2a2a;
  font-size: 28px;
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.boxscore-teamstats {
  display: flex;
  flex-direction: column;
}

.boxscore-teamstat {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-bottom: 1px solid #eee;
  background: #fff;
}

.boxscore-teamstat:last-child {
  border-bottom: 0;
}

.boxscore-teamstat:nth-child(odd):not(.boxscore-teamstat--head) {
  background: #f8f8f8;
}

.boxscore-teamstat--head {
  position: sticky;
  top: 0;
  z-index: 1;
  padding-top: 10px;
  padding-bottom: 10px;
  background: #f1f1f1;
  border-bottom: 1px solid #ddd;
}

.boxscore-teamstat__team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.boxscore-teamstat__team img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.boxscore-teamstat__team strong {
  color: #2a2a2a;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.boxscore-teamstat__heading {
  color: #777;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-align: center;
}

.boxscore-teamstat strong {
  color: #2a2a2a;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.boxscore-teamstat span {
  color: #555;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.boxscore-table-wrap {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
}

.boxscore-table-wrap--goalies {
  margin-top: 14px;
}

.boxscore-table {
  width: 100%;
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.boxscore-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 5px;
  border-bottom: 1px solid #2a2a2a;
  background: #4a4a4a;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-align: right;
  text-transform: uppercase;
  white-space: nowrap;
}

.boxscore-table .boxscore-group-row td {
  position: sticky;
  left: 0;
  z-index: 1;
  padding: 6px 9px;
  border-top: 8px solid #fff;
  border-bottom: 1px solid #d8dde6;
  background: #eef1f5;
  color: #4a4a4a;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  box-shadow: none;
}

.boxscore-table td,
.boxscore-table tbody th {
  padding: 4px 5px;
  border-bottom: 1px solid #ececec;
  color: #2f2f2f;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
}

.boxscore-table tbody tr {
  background: #fff;
}

.boxscore-table tbody tr:nth-child(even) {
  background: #f4f6fa;
}

.boxscore-table tbody tr:hover,
.boxscore-table tbody tr:hover td:first-child {
  background: #e6efff;
}

.boxscore-table th:first-child,
.boxscore-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 0;
  width: 37%;
  max-width: 180px;
  color: #1f2937;
  font-weight: 600;
  text-align: left;
  background: inherit;
  box-shadow: inset -1px 0 0 #d8dde6;
}

.boxscore-table thead th:first-child {
  z-index: 3;
  color: #fff;
  background: #4a4a4a;
  box-shadow: inset -1px 0 0 #5a5a5a;
}

.boxscore-table .boxscore-group-row td,
.boxscore-table .boxscore-group-row td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 0;
  max-width: none;
  padding: 6px 9px;
  border-top: 8px solid #fff;
  border-bottom: 1px solid #d8dde6;
  background: #eef1f5;
  color: #4a4a4a;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  box-shadow: none;
}

.boxscore-table a {
  color: #2a2a2a;
  font-weight: 700;
  text-decoration: none;
}

.boxscore-table a:hover {
  color: #FF5733;
  text-decoration: underline;
}

.boxscore-player {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.boxscore-player img {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border: 1px solid #e1e5ec;
  border-radius: 50%;
  background: #f4f6fa;
  object-fit: cover;
}

.boxscore-player__text {
  min-width: 0;
}

.boxscore-player__text a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.boxscore-optional {
  display: none;
}

.boxscore-player__text span {
  display: block;
  margin-top: 1px;
  color: #888;
  font-size: 10px;
  font-weight: 600;
}

.boxscore-empty {
  margin: 14px;
  padding: 14px;
  border: 1px dashed #d8dde6;
  border-radius: 4px;
  color: #666;
  background: #fafafa;
  font-size: 14px;
}

@media (max-width: 900px) {
  .boxscore-summary-grid,
  .boxscore-player-grid {
    grid-template-columns: 1fr;
  }

  .boxscore-table-wrap {
    max-height: none;
  }
}

@media (min-width: 1180px) {
  .boxscore-optional {
    display: table-cell;
  }

  .boxscore-table th:first-child,
  .boxscore-table td:first-child {
    width: 30%;
  }
}

@media (max-width: 700px) {
  .boxscore-page {
    padding: 16px 0 40px;
  }

  .boxscore-header {
    flex-direction: column;
    gap: 12px;
  }

  .boxscore-header h1 {
    font-size: 21px;
  }

  .boxscore-back {
    width: 100%;
  }

  .boxscore-panel-head,
  .boxscore-section__head {
    padding: 10px 12px;
  }

  .boxscore-team {
    grid-template-columns: 36px minmax(0, 1fr) 42px;
    gap: 10px;
    padding: 11px 12px;
  }

  .boxscore-team img {
    width: 34px;
    height: 34px;
  }

  .boxscore-team__body strong {
    font-size: 15px;
  }

  .boxscore-team__score {
    font-size: 24px;
  }

  .boxscore-teamstat {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    padding: 8px 12px;
  }
}
