.ts-team-page {
    overflow: hidden;
}

.ts-team-hero {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 28px;
    align-items: center;
    padding: 24px 28px;
    margin-bottom: 24px;
    border-radius: 24px;
    background: rgba(255,255,255,0.85);
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow:
        0 12px 30px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.ts-team-hero::before {
    content: '';

    position: absolute;

    left: -120px;
    top: -120px;

    width: 500px;
    height: 500px;

    background:
        radial-gradient(
            circle,
            var(--team-primary) 0%,
            transparent 70%
        );

    opacity: .20;

    pointer-events: none;
}

.ts-team-hero::after {
    content: '';

    position: absolute;

    right: -120px;
    bottom: -120px;

    width: 500px;
    height: 500px;

    background:
        radial-gradient(
            circle,
            var(--team-secondary) 0%,
            transparent 70%
        );

    opacity: .20;

    pointer-events: none;
}

.ts-team-hero > * {
    position: relative;
    z-index: 2;
}

.ts-team-hero-logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.ts-team-hero-logo img {
    width: 120px !important;
    height: 120px !important;
    max-width: 120px !important;
    max-height: 120px !important;
    object-fit: contain;
}

.ts-team-league {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.7;
    margin-bottom: 8px;
}

.ts-team-name {
    margin: 0;
    margin-bottom: 6px;
    font-size: 2rem;
    font-weight: 800;
}

.ts-team-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 12px;
    font-size: 0.95rem;
    opacity: 0.9;
}

.ts-team-ranking {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.ts-team-ranking span {
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(0,0,0,0.06);
    font-weight: 700;
}

.ts-team-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.ts-stat-box {
    padding: 12px;
    border-radius: 18px;
    text-align: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
}

.ts-stat-box span {
    display: block;
    font-size: 0.85rem;
    opacity: 0.7;
    margin-bottom: 8px;
}

.ts-stat-box strong {
    font-size: 1.8rem;
    font-weight: 800;
}

.ts-squad-section {
    margin-top: 42px;
}

.ts-squad-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.ts-squad-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.ts-squad-grid--trainer {
    grid-template-columns: 280px;
}

.ts-player-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 16px 16px;
    border-radius: 18px;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 6px 16px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    min-height: 230px;
}

.ts-player-card:hover {
    transform: translateY(-4px);
    background: rgba(255,255,255,0.08);
}

.ts-player-flag {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 22px;
    height: 16px;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.ts-player-number {
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 2.3rem;
    font-weight: 800;
    color: rgba(0,0,0,0.12);
    line-height: 1;
}

.ts-player-avatar {
    margin-top: 8px;
    margin-bottom: 8px;
}

.ts-player-avatar img,
.ts-player-noavatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
}

.ts-player-avatar img {
    border: 2px solid rgba(255,255,255,0.12);
}

.ts-player-noavatar {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.08);
    font-size: 2rem;
}

.ts-player-name {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
    min-height: 32px;
}

.ts-player-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 8px;
}

.ts-stat-pill {
    min-width: 56px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
}

.ts-stat-goals {
    background: #2ecc71;
    color: #fff;
}

.ts-stat-yellow {
    background: #f1c40f;
    color: #222;
}

.ts-stat-red {
    background: #e74c3c;
    color: #fff;
}

.ts-player-status {
    padding: 6px 12px;
    border-radius: 999px;
    background: linear-gradient(
        135deg,
        #6c757d,
        #495057
    );
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
}

.ts-captain {
    margin-left: 6px;
}

@media (max-width: 900px) {
    .ts-team-hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .ts-team-meta,
    .ts-team-ranking {
        justify-content: center;
    }

    .ts-team-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .ts-team-stats {
        grid-template-columns: 1fr;
    }

    .ts-squad-grid {
        grid-template-columns: 1fr;
    }

    .ts-player-card {
        flex-direction: column;
        text-align: center;
    }
}

.ts-team-matches {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 36px;
    align-items: start;
}

.ts-team-matchbox {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(0,0,0,0.08);
}

.ts-team-matchbox h3 {
    margin-bottom: 16px;
    font-size: 1.15rem;
}

.ts-team-matchlist {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ts-team-matchlist li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.ts-form {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
}

.ts-form--w {
    background: #2ecc71;
}

.ts-form--d {
    background: #f1c40f;
    color: #222;
}

.ts-form--l {
    background: #e74c3c;
}

.ts-match-date {
    min-width: 48px;
    font-weight: 600;
}

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

.ts-team-form {
    display: flex;
    gap: 50px;
    margin-top: 16px;
}

.ts-form-badge {
    width: 34px;
    height: 34px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: .9rem;
    font-weight: 700;

    color: #fff;
}

.ts-form-badge--w {
    background: #2ecc71;
}

.ts-form-badge--d {
    background: #f1c40f;
    color: #222;
}

.ts-form-badge--l {
    background: #e74c3c;
}

.ts-team-season-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);

    gap: 14px;

    margin-top: 18px;
    padding-top: 18px;

    border-top: 1px solid rgba(0,0,0,0.08);
}

.ts-season-stat {
    text-align: center;
}

.ts-season-stat span {
    display: block;

    font-size: .72rem;
    color: #666;

    margin-bottom: 4px;

    text-transform: uppercase;
    letter-spacing: .05em;
}

.ts-season-stat strong {
    font-size: 1.15rem;
    font-weight: 700;
}