* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --navy: #002868;
    --red: #BF0A30;
    --white: #FFFFFF;
    --dark: #0a0e17;
    --card-bg: #111827;
    --card-border: #1f2937;
    --text: #e5e7eb;
    --text-muted: #9ca3af;
    --accent: #3b82f6;
    --gold: #fbbf24;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--dark);
    color: var(--text);
    line-height: 1.6;
}

/* VIDEO HEADER */
.video-header {
    background: linear-gradient(135deg, var(--navy) 0%, #001a4d 50%, var(--dark) 100%);
    border-bottom: 3px solid var(--red);
}

.header-title-section {
    text-align: center;
    padding: 2rem 1rem 1rem;
}

.video-container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1rem 1.5rem;
}

.video-container video {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
    background: #000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

header {
    background: linear-gradient(135deg, var(--navy) 0%, #001a4d 50%, var(--dark) 100%);
    border-bottom: 3px solid var(--red);
    padding: 2rem 1rem;
    text-align: center;
}

.flag-bar {
    height: 4px;
    background: linear-gradient(90deg, var(--red) 0%, var(--red) 33%, var(--white) 33%, var(--white) 66%, var(--navy) 66%, var(--navy) 100%);
    margin-bottom: 1.5rem;
    border-radius: 2px;
    max-width: 200px;
    margin-left: auto;
    margin-right: auto;
}

header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 0.3rem;
}

.subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.updated {
    font-size: 0.8rem;
    color: var(--gold);
    margin-top: 0.5rem;
    font-weight: 600;
}

/* NAV FILTERS */
nav {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--card-bg);
    border-bottom: 1px solid var(--card-border);
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 100;
}

.filter-btn {
    padding: 0.5rem 1.2rem;
    border: 1px solid var(--card-border);
    background: transparent;
    color: var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* MAIN */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

/* LEADER CARDS */
.leaders {
    margin-bottom: 2rem;
}

.leaders h2 {
    font-size: 1.1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.leader-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.leader-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.leader-card:hover {
    transform: translateY(-2px);
    border-color: var(--gold);
}

.leader-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gold);
    font-weight: 700;
}

.leader-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
}

.leader-stat {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1.2;
}

.leader-club {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* POSITION GROUPS */
.position-group {
    margin-bottom: 2.5rem;
}

.position-group h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--red);
    display: inline-block;
}

.section-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* TABLES */
.table-wrapper {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid var(--card-border);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

table.compact {
    font-size: 0.82rem;
}

thead {
    background: var(--card-bg);
}

th {
    padding: 0.8rem 0.6rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    white-space: nowrap;
    border-bottom: 2px solid var(--card-border);
}

td {
    padding: 0.7rem 0.6rem;
    border-bottom: 1px solid var(--card-border);
    white-space: nowrap;
}

tbody tr {
    transition: background 0.15s ease;
}

tbody tr:hover {
    background: rgba(59, 130, 246, 0.08);
}

tbody tr:last-child td {
    border-bottom: none;
}

.player-name {
    font-weight: 700;
    color: var(--white);
}

.stat-highlight {
    color: var(--gold);
    font-weight: 800;
}

/* LEAGUE BADGES */
.league-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.premierleague { background: #3d1451; color: #ff2882; }
.seriea { background: #024494; color: #9dd3ff; }
.serieb { background: #024494; color: #6db8e8; }
.bundesliga { background: #d20515; color: #fff; }
.ligue1 { background: #0e3c27; color: #c8f560; }
.laliga { background: #ee8707; color: #fff; }
.eredivisie { background: #e65100; color: #fff; }
.championship { background: #1c2c5b; color: #c4a647; }
.scottish { background: #2d5a27; color: #fff; }
.mls { background: #333; color: #ccc; }

/* FOOTER */
footer {
    text-align: center;
    padding: 2rem 1rem;
    border-top: 1px solid var(--card-border);
    font-size: 0.8rem;
    color: var(--text-muted);
}

footer a {
    color: var(--accent);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

footer p + p {
    margin-top: 0.4rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .video-container {
        padding: 0 0.5rem 1rem;
    }

    header h1 {
        font-size: 1.6rem;
    }

    .leader-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .leader-stat {
        font-size: 1.4rem;
    }

    nav {
        gap: 0.3rem;
    }

    .filter-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }

    table {
        font-size: 0.78rem;
    }

    th, td {
        padding: 0.5rem 0.4rem;
    }
}

@media (max-width: 480px) {
    .leader-cards {
        grid-template-columns: 1fr;
    }
}
