:root {
    --nav:        #3F91E2;
    --nav-dark:   #2e7acc;
    --frame:      #6BB5FF;
    --frame-soft: rgba(107,181,255,0.12);
    --white:      #FFFFFF;
    --bg:         #F0F6FF;
    --bg2:        #E6F1FF;
    --surface:    #FFFFFF;
    --border:     #D0E6FF;
    --text:       #0f2340;
    --text2:      #3a5a82;
    --muted:      #7a9cc0;
    --accent:     #3F91E2;
    --accent2:    #FF5C35;
    --success:    #00C97A;
    --gold:       #F5B800;
    --nav-h:      64px;
    --radius:     10px;
    --shadow:     0 2px 16px rgba(63,145,226,0.10);
}
body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

.teams-page-header {
    padding: calc(var(--nav-h) + 2rem) 5% 1.5rem;
    max-width: 90rem;
    margin: 0 auto;
}
.teams-page-header h1 {
    font-family: 'Fredoka', sans-serif;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
}
.teams-page-header h1 span { color: var(--accent); }
.teams-page-header p {
    color: var(--muted);
    font-size: clamp(0.82rem, 1vw, 0.95rem);
    margin-bottom: 1.5rem;
}

.teams-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin-bottom: 0.25rem;
}
.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.filter-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}
.filter-btn {
    background: var(--surface);
    border: 1.5px solid var(--border);
    color: var(--text2);
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.32rem 0.9rem;
    border-radius: 99px;
    cursor: pointer;
    transition: all 0.18s;
}
.filter-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.teams-grid-wrap {
    max-width: 90rem;
    margin: 0 auto;
    padding: 1.5rem 5% 4rem;
}
.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.team-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem 1.25rem 1rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.team-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(63,145,226,0.16);
    border-color: var(--accent);
}

.team-card-top {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}
.team-flag-wrap {
    width: 3rem;
    height: 3rem;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.team-card-info { 
    flex: 1; 
    min-width: 0; 
}
.team-card-name {
    font-weight: 700;
    font-size: clamp(0.88rem, 1.1vw, 1rem);
    color: var(--text);
    margin-bottom: 0.2rem;
    line-height: 1.2;
}
.team-card-sub {
    font-size: 0.75rem;
    color: var(--muted);
}
.team-cat-badge {
    position: absolute;
    top: 5.4rem;
    right: 0.8rem;
    background: var(--frame-soft);
    border: 1px solid var(--border);
    color: var(--accent);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.18rem 0.5rem;
    border-radius: 0.4rem;
}

.team-card-footer {
    display: flex;
    gap: 0.6rem;
}
.team-stat-pill {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: 0.22rem 0.75rem;
    font-size: 0.75rem;
    color: var(--text2);
    font-weight: 500;
}
.team-stat-pill strong { color: var(--accent); }