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

:root {
    --bg: #0b0f17;
    --card: #131a26;
    --panel: #0f1622;
    --accent: #00ff66;
    --text: #ffffff;
    --muted: #9ca3af;
    --border: #1e293b;
    --danger: #ef4444;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
}

a {
    color: inherit;
}

.nav-bar {
    background: #070a10;
    padding: 18px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-logo {
    color: #fff;
    text-decoration: none;
    font-size: 20px;
    font-weight: 950;
    text-transform: uppercase;
}

.nav-logo span {
    color: var(--accent);
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
    margin-left: 24px;
}

.nav-links a:hover {
    color: #fff;
}

.hero {
    padding: 70px 24px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    background:
        radial-gradient(circle at top right, rgba(0,255,102,.08), transparent),
        linear-gradient(180deg, #070a10 0%, var(--bg) 100%);
}

.hero-left {
    text-align: left;
}

.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.eyebrow {
    color: var(--accent);
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 4.3rem);
    font-weight: 950;
    letter-spacing: -2px;
    line-height: .95;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.hero p {
    color: var(--muted);
    font-size: 1.1rem;
    max-width: 720px;
    margin: 0 auto;
}

.hero-left p {
    margin: 0;
}

.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 24px;
}

.two-col {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 360px;
    gap: 22px;
}

.section-title {
    font-size: 20px;
    font-weight: 950;
    text-transform: uppercase;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: "";
    width: 4px;
    height: 20px;
    background: var(--accent);
    border-radius: 2px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,.22);
}

.card h2 {
    color: var(--accent);
    font-size: 13px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-bottom: 15px;
}

.card p {
    color: #dbe4f0;
    line-height: 1.65;
}

.table-wrapper {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,.3);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: var(--panel);
    color: var(--muted);
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .8px;
    padding: 13px 14px;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 14px;
    border-bottom: 1px solid var(--border);
    color: #e2e8f0;
    font-size: 14px;
    vertical-align: middle;
}

tr:hover td {
    background: rgba(255,255,255,.015);
}

.date-divider td {
    background: #161f30;
    color: var(--accent);
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.matchup-cell {
    display: flex;
    align-items: center;
    gap: 16px;
    font-weight: 850;
}

.team-unit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    width: 220px;
    transition: color .2s ease;
}

.team-unit:hover,
.team-link:hover {
    color: var(--accent);
}

.team-one {
    justify-content: flex-end;
}

.team-two {
    justify-content: flex-start;
}

.vs-label {
    color: var(--muted);
    font-size: 12px;
    width: 30px;
    text-align: center;
}

.score-badge {
    background: var(--accent);
    color: #07100b;
    font-weight: 950;
    padding: 4px 12px;
    border-radius: 6px;
}

.flag {
    width: 22px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
}

.group-tag {
    background: rgba(255,255,255,.06);
    color: #cbd5e1;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 850;
}

.groups-grid {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 28px;
}

.group-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
}

.group-title {
    background: var(--panel);
    padding: 14px 20px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 950;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}

.team-link {
    color: #fff;
    text-decoration: none;
    font-weight: 850;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.stat-line {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    padding: 10px 0;
}

.stat-line strong {
    color: var(--muted);
    font-size: 13px;
}

.stat-line span {
    text-align: right;
    color: #fff;
    font-weight: 750;
}

.mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mini-stat {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
}

.mini-stat .label {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.mini-stat .value {
    color: #fff;
    font-size: 20px;
    font-weight: 950;
}

.position-divider td {
    background: var(--panel) !important;
    color: var(--accent);
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .8px;
    padding: 10px 12px;
}

.back-link {
    display: inline-block;
    margin-top: 22px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 850;
}

.empty {
    color: var(--muted);
    font-style: italic;
}

.custom-footer {
    text-align: center;
    padding: 50px 20px;
    color: #4b5563;
    font-size: 13px;
    border-top: 1px solid var(--border);
    margin-top: 80px;
}

@media (max-width: 900px) {
    .nav-bar {
        padding: 16px 20px;
    }

    .two-col {
        grid-template-columns: 1fr;
    }

    .table-wrapper,
    .group-card,
    .card {
        overflow-x: auto;
    }

    table {
        min-width: 760px;
    }

    .groups-grid {
        grid-template-columns: 1fr;
        padding: 0 14px;
    }

    .matchup-cell {
        flex-wrap: wrap;
    }

    .team-unit {
        width: auto;
    }
}

.team-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 28px;
    align-items: center;
}

.team-hero-identity {
    background: rgba(19, 26, 38, 0.72);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px;
    display: grid;
    justify-items: center;
    gap: 16px;
    box-shadow: 0 18px 45px rgba(0,0,0,.25);
}

.team-hero-badge {
    width: 116px;
    height: 116px;
    object-fit: contain;
}

.team-hero-logo {
    max-width: 220px;
    max-height: 82px;
    object-fit: contain;
}

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

    .team-hero-identity {
        justify-items: start;
        max-width: 320px;
    }
}

.team-mini-badge {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex: 0 0 auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.35));
}

/* Tight group-table team badges */
.group-card .team-mini-badge {
    width: 18px !important;
    height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    object-fit: contain;
    display: inline-block;
}

.group-card .team-link {
    gap: 7px;
    line-height: 1.2;
}

.group-card td {
    padding-top: 10px;
    padding-bottom: 10px;
}

/* Group table badge + flag combo */
.group-card .team-icon-stack {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: 44px;
    min-width: 44px;
}

.group-card .team-mini-badge {
    width: 18px !important;
    height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    object-fit: contain;
    display: inline-block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.35));
}

.group-card .team-mini-flag {
    width: 18px !important;
    height: 12px !important;
    max-width: 18px !important;
    max-height: 12px !important;
    object-fit: cover;
    border-radius: 2px;
    display: inline-block;
}

.group-card .team-link {
    gap: 8px;
    line-height: 1.2;
}

/* Homepage fixture badge + flag combo */
.fixture-icon-stack {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 44px;
}

.fixture-mini-badge {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    object-fit: contain;
    display: inline-block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.35));
}

.fixture-mini-flag {
    width: 20px !important;
    height: 14px !important;
    max-width: 20px !important;
    max-height: 14px !important;
    object-fit: cover;
    border-radius: 2px;
    display: inline-block;
}

/* Homepage fixture badge + flag combo */
.fixture-icon-stack {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 44px;
}

.fixture-mini-badge {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    object-fit: contain;
    display: inline-block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.35));
}

.fixture-mini-flag {
    width: 20px !important;
    height: 14px !important;
    max-width: 20px !important;
    max-height: 14px !important;
    object-fit: cover;
    border-radius: 2px;
    display: inline-block;
}

.nav-logo-image {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.nav-logo-image img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(0,255,102,.28));
}

.nav-logo-image > span {
    display: inline-block;
}

@media (max-width: 520px) {
    .nav-logo-image img {
        width: 30px;
        height: 30px;
    }

    .nav-logo-image > span {
        font-size: 15px;
    }
}
