/* ══════════════════════════════════════
   TOURNAMENT HERO
══════════════════════════════════════ */
.t-hero {
    background: var(--blue);
    position: relative; overflow: hidden;
    margin-top: 0;
}

.t-hero-bg {
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 55% 90% at 90% 50%, rgba(59,110,245,.3) 0%, transparent 65%),
        radial-gradient(ellipse 35% 50% at 5% 90%, rgba(240,172,0,.12) 0%, transparent 55%);
    pointer-events: none;
}

.t-hero-flag {
    position: absolute; top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--blue) 33.3%, var(--gold-bright) 33.3%, var(--gold-bright) 66.6%, var(--red) 66.6%);
}

.t-hero-inner {
    max-width: 1240px; margin: 0 auto;
    padding: 52px 48px 0;
    position: relative; z-index: 2;
    display: flex; align-items: flex-end;
    gap: 40px; flex-wrap: wrap;
}

.t-hero-icon {
    width: 100px; height: 100px; border-radius: 22px;
    background: rgba(255,255,255,.08);
    border: 2px solid rgba(255,255,255,.15);
    display: flex; align-items: center; justify-content: center;
    font-size: 44px; flex-shrink: 0;
    box-shadow: 0 8px 32px rgba(0,0,0,.25);
}

.t-hero-info { flex: 1; min-width: 0; padding-bottom: 4px; }

.t-hero-badges {
    display: flex; align-items: center;
    gap: 8px; flex-wrap: wrap;
    margin-bottom: 14px;
}

.t-hero-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 13px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 100px;
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .12em;
    color: rgba(255,255,255,.8);
}

.t-hero-badge.live {
    background: rgba(197,27,47,.35);
    border-color: rgba(255,107,122,.4);
    color: #ff9aa4;
}

.t-hero-name {
    font-size: clamp(26px, 4.5vw, 52px);
    font-weight: 900; letter-spacing: -.04em;
    color: #fff; line-height: 1; margin-bottom: 12px;
}

.t-hero-meta { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }

.t-hero-meta-item {
    display: flex; align-items: center; gap: 7px;
    font-size: 13px; font-weight: 500;
    color: rgba(255,255,255,.6);
}

.t-hero-meta-item i { font-size: 10px; color: rgba(255,255,255,.35); }

/* Stats */
.t-hero-stats { display: flex; margin-left: auto; flex-shrink: 0; }

.t-hero-stat {
    display: flex; flex-direction: column; align-items: center;
    padding: 16px 24px;
    border-left: 1px solid rgba(255,255,255,.1);
    min-width: 80px;
}

.t-hero-stat:first-child { border-left: none; }

.t-hero-stat-num {
    font-size: 28px; font-weight: 900;
    letter-spacing: -.04em; color: #fff; line-height: 1;
}

.t-hero-stat-num.gold { color: var(--gold-bright); }

.t-hero-stat-label {
    font-size: 9px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .14em;
    color: rgba(255,255,255,.4);
    margin-top: 4px; text-align: center;
}

/* Tabs */
.t-tabs-bar {
    max-width: 1240px; margin: 0 auto;
    padding: 0 48px;
    position: relative; z-index: 2;
    display: flex; align-items: flex-end;
    gap: 4px; margin-top: 32px;
}

.t-tab {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 22px;
    font-size: 13px; font-weight: 700;
    color: rgba(255,255,255,.5);
    border-radius: 10px 10px 0 0;
    border: 1px solid transparent; border-bottom: none;
    cursor: pointer; transition: all .18s;
    background: transparent;
    font-family: 'Inter', sans-serif; letter-spacing: -.01em;
}

.t-tab:hover { color: rgba(255,255,255,.85); background: rgba(255,255,255,.08); }
.t-tab.active { background: var(--bg); color: var(--text); border-color: var(--border); }
.t-tab i { font-size: 12px; }

/* ══════════════════════════════════════
   TAB PANELS
══════════════════════════════════════ */
.t-panel { display: none; }
.t-panel.active { display: block; }

/* ══════════════════════════════════════
   STANDINGS TABLE
══════════════════════════════════════ */
.standings-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 16px; overflow: hidden;
    box-shadow: var(--shadow);
}

.standings-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.standings-group-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.standings-group-title { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--border); background: var(--surface2); }
.standings-group-title-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.standings-group-title-text { font-size: 13px; font-weight: 800; letter-spacing: -.015em; color: var(--text); }
.standings-group-title-count { font-size: 10px; font-weight: 600; color: var(--muted); margin-left: auto; }

.standings-thead {
    display: grid;
    grid-template-columns: 36px 1fr 32px 32px 32px 50px;
    gap: 4px; padding: 9px 16px;
    background: var(--surface2);
    border-bottom: 1px solid var(--border);
    font-size: 9px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .14em;
    color: var(--muted);
}

.standings-thead .th-center { text-align: center; }

.standings-tr {
    display: grid;
    grid-template-columns: 36px 1fr 32px 32px 32px 50px;
    gap: 4px; padding: 11px 16px;
    border-bottom: 1px solid var(--border);
    align-items: center; transition: background .12s;
}

.standings-tr:last-child { border-bottom: none; }
.standings-tr:hover { background: var(--bg); }
/*.standings-tr.pos1 { background: linear-gradient(90deg, rgba(240,172,0,.06) 0%, transparent 70%); border-left: 3px solid var(--gold-bright); }*/
/*.standings-tr.pos2 { border-left: 3px solid var(--muted); }*/
/*.standings-tr.pos3 { border-left: 3px solid #cd7f32; }*/
.standings-tr.relegated { border-left: 3px solid var(--red); background: linear-gradient(90deg, rgba(197,27,47,.04) 0%, transparent 70%); }

.rank-num { font-size: 13px; font-weight: 800; text-align: center; color: var(--muted); }
/*.rank-num.r1 { color: var(--gold-bright); }*/
/*.rank-num.r2 { color: var(--muted); }*/
/*.rank-num.r3 { color: #cd7f32; }*/

.team-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }

.team-cell-logo {
    width: 30px; height: 30px; border-radius: 6px;
    background: var(--surface2); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 8px; font-weight: 800; color: var(--blue2);
    flex-shrink: 0; overflow: hidden;
}

.team-cell-logo img { width: 100%; height: 100%; object-fit: contain; padding: 2px; }
.team-cell-name { font-size: 12px; font-weight: 600; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-cell-name:hover { color: var(--blue2); }

.td-center { text-align: center; font-size: 11px; font-weight: 500; color: var(--muted); }
.td-pts { text-align: center; font-size: 15px; font-weight: 900; color: var(--blue2); }

.form-pills { display: flex; gap: 3px; justify-content: center; }

.form-pill {
    width: 18px; height: 18px; border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    font-size: 9px; font-weight: 800;
}

.form-pill.w { background: #e8f9f0; color: #1a7f4b; }
.form-pill.l { background: var(--red-pale); color: var(--red); }

.standings-legend {
    display: flex; align-items: center;
    gap: 20px; padding: 12px 20px;
    border-top: 1px solid var(--border);
    background: var(--surface2); flex-wrap: wrap;
}

.legend-item { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 500; color: var(--muted2); }
.legend-dot { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }

/* ══════════════════════════════════════
   GROUP FILTER (matches tab)
══════════════════════════════════════ */
.group-filter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.group-filter-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-right: 4px; }
.group-tab { display: inline-flex; align-items: center; gap: 7px; padding: 8px 18px; font-size: 12.5px; font-weight: 700; color: var(--muted2); background: var(--surface); border: 1.5px solid var(--border); border-radius: 100px; cursor: pointer; transition: all .15s; font-family: 'Inter', sans-serif; }
.group-tab:hover { background: var(--blue-pale); color: var(--blue2); border-color: var(--blue-pale2); }
.group-tab.active { background: var(--blue2); color: #fff; border-color: var(--blue2); box-shadow: 0 4px 12px rgba(36,80,216,.25); }
.group-tab .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.group-tab:not(.active) .dot { opacity: .4; }

/* ══════════════════════════════════════
   MATCHES / SCHEDULE
══════════════════════════════════════ */
.matches-filter {
    display: flex; align-items: center;
    gap: 8px; flex-wrap: wrap;
    margin-bottom: 24px;
}

.matches-filter-label {
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .14em;
    color: var(--muted); margin-right: 4px;
}

.round-tab {
    display: inline-flex; align-items: center;
    padding: 7px 14px;
    font-size: 12px; font-weight: 600;
    color: var(--muted2);
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 100px;
    cursor: pointer; transition: all .15s;
    white-space: nowrap; font-family: 'Inter', sans-serif;
}

.round-tab:hover { background: var(--blue-pale); color: var(--blue2); border-color: var(--blue-pale2); }
.round-tab.active { background: var(--blue2); color: #fff; border-color: var(--blue2); box-shadow: 0 4px 12px rgba(36,80,216,.25); }

.round-group { margin-bottom: 32px; }

.round-group-title {
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .16em;
    color: var(--muted); margin-bottom: 12px;
    display: flex; align-items: center; gap: 10px;
}

.round-group-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.matches-group-section { margin-bottom: 36px; }
.matches-group-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.matches-group-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.matches-group-name { font-size: 13px; font-weight: 800; letter-spacing: -.015em; color: var(--text); }
.matches-group-line { flex: 1; height: 1px; background: var(--border); }

.match-row {
    display: flex; flex-direction: column;
    padding: 16px 20px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 13px; margin-bottom: 8px;
    box-shadow: var(--shadow-sm); transition: all .16s;
    overflow: hidden;
}

.match-row:hover { border-color: var(--blue-pale2); transform: translateY(-2px); box-shadow: var(--shadow); }

.match-row-main { display: flex; flex-direction: column; }
.match-row-body { display: flex; align-items: center; gap: 16px; }

.match-row-date { display: flex; flex-direction: column; align-items: center; min-width: 48px; flex-shrink: 0; }
.match-row-day { font-size: 22px; font-weight: 900; letter-spacing: -.03em; color: var(--text); line-height: 1; }
.match-row-mon { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.match-row-time { font-size: 10px; font-weight: 600; color: var(--muted); margin-top: 1px; }

.match-row-location {
    font-size: 12px; font-weight: 500;
    color: var(--muted);
    padding: 6px 0 0;
    border-top: 1px solid var(--border);
    margin-top: 8px;
    display: flex; align-items: center; gap: 5px;
}

.match-row-location i { font-size: 9px; color: var(--muted2); flex-shrink: 0; }

.match-row-divider { width: 1px; height: 44px; background: var(--border); flex-shrink: 0; }

.match-row-teams { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }

.match-row-team { display: flex; align-items: center; gap: 12px; width: 100%; }
.match-row-team.winner .match-row-name { font-weight: 800; color: var(--text); }

.match-row-logo {
    width: 28px; height: 28px; border-radius: 7px;
    background: var(--surface2); border: 1.5px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 9px; font-weight: 800; color: var(--blue2);
    flex-shrink: 0; overflow: hidden;
}

.match-row-logo img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.match-row-name { font-size: 13px; font-weight: 600; color: var(--text2);min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.match-row-score-num { font-size: 17px; font-weight: 900; letter-spacing: -.03em; line-height: 1; color: var(--text); flex-shrink: 0; }
.match-row-score-num.win { color: #1a7f4b; }
.match-row-score-num.loss { color: var(--red); }


.badge-live-sm {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px;
    background: var(--red-pale); color: var(--red);
    border: 1px solid rgba(197,27,47,.2); border-radius: 100px;
    font-size: 9px; font-weight: 800;
    text-transform: uppercase; letter-spacing: .1em; white-space: nowrap;
}

.badge-upcoming-sm {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px;
    background: var(--gold-pale); color: #a87000;
    border: 1px solid rgba(194,138,0,.2); border-radius: 100px;
    font-size: 9px; font-weight: 700; white-space: nowrap;
}

/* ══════════════════════════════════════
   TEAMS GRID
══════════════════════════════════════ */
.t-teams-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.t-team-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 16px; padding: 24px 16px 18px;
    display: flex; flex-direction: column; align-items: center;
    gap: 12px; text-align: center;
    transition: all .2s; box-shadow: var(--shadow-sm);
    position: relative; overflow: hidden;
    color: inherit;
}

.t-team-card::before {
    content: ''; position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--blue2), var(--blue));
    opacity: 0; transition: opacity .2s;
}

.t-team-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--blue-pale2); }
.t-team-card:hover::before { opacity: 1; }

.t-team-logo {
    width: 72px; height: 72px; border-radius: 16px;
    background: var(--surface2); border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; transition: border-color .2s;
}

.t-team-logo img { width: 100%; height: 100%; object-fit: contain; padding: 7px; }
.t-team-logo-ph { font-size: 22px; font-weight: 900; color: var(--blue2); letter-spacing: -.02em; }
.t-team-card:hover .t-team-logo { border-color: var(--blue-pale2); }

.t-team-name { font-size: 14px; font-weight: 800; letter-spacing: -.02em; color: var(--text); transition: color .15s; }
.t-team-card:hover .t-team-name { color: var(--blue2); }

.t-team-city { font-size: 11px; font-weight: 500; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 4px; }

.t-team-rank {
    position: absolute; top: 10px; right: 10px;
    width: 22px; height: 22px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 800;
}

.t-team-rank.r1 { background: var(--gold-pale); color: #a87000; }
.t-team-rank.r2 { background: var(--surface2); color: var(--muted2); }
.t-team-rank.r3 { background: #fdf0e8; color: #a0522d; }
.t-team-rank.rn { background: var(--surface2); color: var(--muted); }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 1024px) {
    .standings-groups { grid-template-columns: 1fr; }
    .t-teams-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    .t-hero-stats { margin-left: 0; width: 100%; border-top: 1px solid rgba(255,255,255,.1); padding-top: 16px; }
    .t-hero-stat:first-child { border-left: none; }
    .t-teams-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .t-hero-inner { padding: 32px 20px 0; gap: 20px; }
    .t-tabs-bar { padding: 0 20px; }
    .t-tab { padding: 9px 14px; font-size: 12px; }
    .t-tab span { display: none; }
    .standings-thead, .standings-tr { grid-template-columns: 28px 1fr 28px 44px; }
    .standings-thead > *:nth-child(3),
    .standings-thead > *:nth-child(4),
    .standings-thead > *:nth-child(5),
    .standings-tr > *:nth-child(3),
    .standings-tr > *:nth-child(4),
    .standings-tr > *:nth-child(5) { display: none; }
}

@media (max-width: 520px) {
    .t-teams-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .t-hero-stat { padding: 12px 16px; }
    .t-hero-stat-num { font-size: 22px; }
}

@media (min-width: 1025px) {
    .match-row { flex-direction: row; align-items: stretch; }
    .match-row-main { flex: 1; }
    .match-row-body { align-items: center; }
}

/* 2-column layout when 2 groups are shown */
.matches-round-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 24px;
    align-items: start;
}

/* when group filter hides one column, remaining fills full width */
.matches-group-section[style*="display:none"] {
    display: none !important;
}

@media (max-width: 900px) {
    .matches-round-groups {
        grid-template-columns: 1fr;
    }
}
