.teams-page .group-stage-section {
  position: relative;
  margin-bottom: 1.25rem;
  padding: 1.25rem;
  border: 1px solid rgba(137, 119, 255, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(102, 199, 255, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(102, 199, 255, 0.055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(17, 20, 32, 0.94), rgba(8, 10, 20, 0.96));
  background-size: 34px 34px, 34px 34px, auto;
  box-shadow: 0 24px 62px rgba(0, 0, 0, 0.34);
}

.teams-page .group-stage-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.55fr);
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
}

.teams-page .group-stage-heading .eyebrow {
  grid-column: 1 / -1;
}

.teams-page .group-stage-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.teams-page .group-stage-heading p:last-child {
  margin: 0;
  color: var(--muted, #b9c1d4);
  line-height: 1.5;
}

.teams-page .group-stage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.teams-page .group-stage-card {
  overflow: hidden;
  border: 1px solid rgba(102, 199, 255, 0.24);
  border-radius: 8px;
  background: rgba(2, 6, 14, 0.76);
}

.teams-page .group-stage-card-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  background: linear-gradient(90deg, rgba(137, 119, 255, 0.34), rgba(102, 199, 255, 0.18));
}

.teams-page .group-stage-card-heading span {
  color: var(--muted, #b9c1d4);
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.teams-page .group-stage-card-heading strong {
  color: #ffffff;
  font-size: 2.8rem;
  line-height: 0.9;
}

.teams-page .group-stage-card table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.teams-page .group-stage-card th,
.teams-page .group-stage-card td {
  padding: 0.65rem 0.72rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  vertical-align: middle;
}

.teams-page .group-stage-card th {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.teams-page .group-stage-card th:first-child,
.teams-page .group-stage-card td:first-child {
  width: auto;
}

.teams-page .group-stage-card th:nth-child(2),
.teams-page .group-stage-card th:nth-child(3),
.teams-page .group-stage-card td:nth-child(2),
.teams-page .group-stage-card td:nth-child(3) {
  width: 92px;
  text-align: center;
  white-space: nowrap;
}

.teams-page .group-stage-card td:first-child {
  display: grid;
  grid-template-columns: 30px 38px minmax(0, 1fr);
  gap: 0.55rem;
  align-items: center;
}

.teams-page .group-rank {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.1);
}

.teams-page .group-logo {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.teams-page .group-logo img {
  max-width: 30px;
  max-height: 30px;
  object-fit: contain;
}

.teams-page .group-logo span {
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 900;
}

.teams-page .group-stage-card td strong {
  overflow: hidden;
  color: #ffffff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.teams-page .group-stage-card tr.is-advancing td:first-child {
  box-shadow: inset 4px 0 0 var(--success, #8fe3b4);
}

.teams-page .group-stage-card tr.is-eliminated {
  opacity: 0.72;
}

.teams-page .group-stage-card tr.is-eliminated td:first-child {
  box-shadow: inset 4px 0 0 var(--danger, #ff8ca8);
}

.teams-page .group-stage-card tr.is-empty td {
  color: var(--muted, #b9c1d4);
}

.teams-page .group-stage-card tr.is-manual-eliminated {
  opacity: 0.5;
  filter: grayscale(0.72);
}

.teams-page .group-stage-card tr.is-manual-eliminated td:first-child {
  box-shadow: inset 4px 0 0 var(--danger, #ff8ca8);
}

.teams-page .group-stage-card tr.is-disqualified {
  opacity: 0.48;
  filter: grayscale(0.85);
}

.teams-page .group-stage-card tr.is-disqualified td:first-child {
  box-shadow: inset 4px 0 0 var(--danger, #ff8ca8);
}

.teams-page .group-stage-card tr.is-disqualified td strong {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(255, 140, 168, 0.92);
}

.teams-page .group-stage-card tr.is-disqualified td:nth-child(2),
.teams-page .group-stage-card tr.is-disqualified td:nth-child(3) {
  color: #ffdbe4;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.teams-page .team-out-label {
  display: inline-flex;
  margin-left: 0.45rem;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  color: #ffdbe4;
  background: rgba(255, 140, 168, 0.14);
  font-size: 0.62rem;
  font-style: normal;
  text-transform: uppercase;
}

.teams-page .team-dq-label {
  display: inline-flex;
  margin-left: 0.45rem;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  color: #ffdbe4;
  background: rgba(255, 140, 168, 0.22);
  font-size: 0.62rem;
  font-style: normal;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .teams-page .group-stage-heading,
  .teams-page .group-stage-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .teams-page .group-stage-section {
    padding: 0.9rem;
  }

  .teams-page .group-stage-card th:nth-child(2),
  .teams-page .group-stage-card th:nth-child(3),
  .teams-page .group-stage-card td:nth-child(2),
  .teams-page .group-stage-card td:nth-child(3) {
    width: 68px;
    padding-inline: 0.4rem;
  }

  .teams-page .group-stage-card td:first-child {
    grid-template-columns: 26px minmax(0, 1fr);
  }

  .teams-page .group-logo {
    display: none;
  }
}
