:root {
    --tournament-card-bg: #1c2129;
    --tournament-card-border: rgba(255, 255, 255, 0.08);
}

.tournament-page {
    padding: 16px 16px 40px;
    max-width: 1200px;
    width: min(1200px, 100%);
    margin: 0 auto;
}

.stats-navigation .btn-back-nav,
.stats-navigation .btn-back-nav:visited,
.stats-navigation .btn-back-nav:active,
.btn-back-nav,
.btn-back-nav:visited,
.btn-back-nav:active {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #cbd5e1;
    text-decoration: none;
    margin-bottom: 14px;
}

.stats-navigation .btn-back-nav:hover,
.btn-back-nav:hover {
    color: #cbd5e1;
    text-decoration: none;
}

.tournament-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0));
    border: 1px solid var(--tournament-card-border);
    margin-bottom: 16px;
}

.tournament-hero-left {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.tournament-hero-logo {
    width: 40px;
    height: 40px;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.tournament-hero-logo.is-empty {
    display: none;
}

.tournament-hero-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0 !important;
    background: transparent !important;
}

.tournament-hero-title {
    font-weight: 700;
    font-size: 18px;
}

.tournament-hero-subtitle {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

.tournament-page .match-row {
    column-gap: 8px;
}

.tournament-page .match-row.is-live {
    border-left: 3px solid var(--live);
    padding-left: 9px;
}

.tournament-hero-action {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    background: transparent;
}

.tournament-tabs {
    display: flex;
    gap: 18px;
    padding: 6px 4px 10px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 14px;
}

.tournament-tab {
    background: none;
    border: none;
    color: var(--muted);
    font-weight: 600;
    font-size: 14px;
    padding: 6px 0;
    cursor: pointer;
    position: relative;
}

.tournament-tab.active {
    color: var(--ink);
}

.tournament-tab.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -11px;
    height: 2px;
    background: var(--ink);
    border-radius: 999px;
}

.tournament-stage-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 12px 0 16px;
}

.tournament-stage-tab {
    border: 1px solid var(--line);
    background: #1e232b;
    color: var(--muted);
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.tournament-stage-tab.active {
    color: var(--ink);
    border-color: var(--ink);
}

.date-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    margin: 18px 0 10px;
}

.date-divider::before,
.date-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.stage-block {
    margin-bottom: 14px;
}

.stage-block-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    margin-bottom: 8px;
}

.stage-block-logo {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stage-logo-img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    border-radius: 6px;
}

.stage-block-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stage-title {
    color: #f8fafc;
    font-weight: 700;
}

.stage-country {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

@media (max-width: 600px) {
    .stage-block-logo {
        width: 18px;
        height: 18px;
    }

    .stage-logo-img {
        width: 18px;
        height: 18px;
    }
}

.tournament-row {
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #1e232b;
    margin-bottom: 10px;
}

.tournament-standings {
    margin-top: 16px;
}

/* Stats */
.stats-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 12px;
    scrollbar-width: none;
}

.stats-tabs::-webkit-scrollbar {
    display: none;
}

.stats-tab {
    border: 1px solid var(--line);
    background: #1e232b;
    color: var(--muted);
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.stats-tab.active {
    color: #111;
    background: #fff;
    border-color: transparent;
}

.stats-list {
    display: flex;
    flex-direction: column;
}

.stats-row {
    display: grid;
    grid-template-columns: 24px 1fr 40px;
    gap: 10px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.stats-row:last-child {
    border-bottom: none;
}

.stats-rank {
    color: var(--muted);
    font-weight: 700;
}

.stats-player {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stats-badge {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stats-badge img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.stats-player-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stats-player-name {
    font-weight: 600;
}

.stats-player-team {
    color: var(--muted);
    font-size: 12px;
}

.stats-value {
    font-weight: 700;
    text-align: right;
}

/* Standings table styles (match football event details) */
.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-head,
.table-row {
    display: grid;
    grid-template-columns: 28px 1.6fr repeat(8, 36px);
    gap: 6px;
    align-items: center;
    padding: 8px 0;
    min-width: 680px;
}

.table-head {
    color: var(--muted);
    font-weight: 700;
    border-bottom: 1px solid var(--line);
}

.table-row {
    border-bottom: 1px solid var(--line);
}

.table-row:last-child {
    border-bottom: none;
}

.table-team {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-badge {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.team-badge img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.table-head.form,
.table-row.form {
    grid-template-columns: 28px 1.4fr 1fr;
}

.table-form {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    flex-wrap: nowrap;
}

.form-pill {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    background: #2b2b2b;
    color: #fff;
}

.form-pill.w { background: #19d38e; color: #0b1c13; }
.form-pill.d { background: #9b9b9b; color: #111; }
.form-pill.l { background: #ff4d4d; color: #fff; }

@media (max-width: 768px) {
    .table-head,
    .table-row {
        grid-template-columns: 24px 1.4fr repeat(8, 28px);
        min-width: 560px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .table-head,
    .table-row {
        grid-template-columns: 22px 1.4fr repeat(8, 26px);
        min-width: 520px;
        font-size: 11px;
    }
}

@media (max-width: 768px) {
    .tournament-hero-title {
        font-size: 16px;
    }
}


.table-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.table-filter {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
}

.table-filter.active {
  background: #fff;
  color: #111;
  border-color: transparent;
}

/* Tournament overrides */
.stage-block-title {
    color: #fff;
}

.tournament-page .match-row {
    column-gap: 6px;
}

.tournament-page .match-row.is-live {
    border-left: 3px solid #e03a3a;
    padding-left: 9px;
}
