:root {
    --brand: #362a7c;
    --brand-2: #4f3fc9;
    --accent: #ffb703;
    --ink: #1b1a2b;
    --surface: #ffffff;
    --surface-muted: #f3f1fb;
    --border-soft: #e6e2f7;
    --win: #1c9a6c;
    --loss: #e3543f;
    --draw: #8a86a3;
}

* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

h1,
h2,
h3,
.nav-link,
.card-header,
.club-name,
.stat-card .value {
    font-family: 'Manrope', 'Inter', sans-serif;
}

body {
    background: #f6f5fb;
    color: var(--ink);
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(120deg, var(--brand) 0%, var(--brand-2) 70%);
}

.hero-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero-shapes .shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.hero-shapes .shape-1 {
    width: 320px;
    height: 320px;
    top: -160px;
    right: -60px;
}

.hero-shapes .shape-2 {
    width: 220px;
    height: 220px;
    bottom: -140px;
    right: 220px;
    background: rgba(255, 183, 3, 0.12);
}

.hero-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.16);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--accent);
}

#leagueName {
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.9rem;
    padding: 0.85rem 1.1rem;
}

.stat-card .value {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.1;
}

/* ---------- Nav pills ---------- */

.nav-pills {
    gap: 0.5rem;
}

.nav-pills .nav-link {
    color: var(--brand);
    font-weight: 700;
    border-radius: 0.65rem;
    padding: 0.55rem 1.1rem;
    background: var(--surface);
    border: 1px solid var(--border-soft);
}

.nav-pills .nav-link.active {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 6px 16px -6px rgba(54, 42, 124, 0.55);
}

/* ---------- Filters ---------- */

.filters-card {
    border: 1px solid var(--border-soft);
    border-radius: 1rem;
}

.filters-toggle {
    font-weight: 700;
    color: var(--brand);
    background: var(--surface);
    border-radius: 1rem;
}

.filters-toggle .bi-chevron-down {
    transition: transform 0.2s;
}

.filters-toggle:not(.collapsed) .bi-chevron-down {
    transform: rotate(180deg);
}

.form-select,
.form-control {
    border-color: var(--border-soft);
}

.form-select:focus,
.form-control:focus {
    border-color: var(--brand-2);
    box-shadow: 0 0 0 0.2rem rgba(79, 63, 201, 0.15);
}

.btn-brand {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.btn-brand:hover {
    background: var(--brand-2);
    border-color: var(--brand-2);
    color: #fff;
}

/* ---------- Fixtures ---------- */

.date-heading {
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
    color: var(--brand);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.3rem;
    margin: 1.75rem 0 0.6rem;
}

.fixture-table {
    background: var(--surface);
    table-layout: fixed;
    width: 100%;
    min-width: 520px;
}

.fixture-table td {
    vertical-align: middle;
    overflow-wrap: anywhere;
}

.fixture-table thead th {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    color: #6f6b8a;
    background: var(--surface-muted);
    border-bottom: none;
}

.fixture-table .col-time {
    width: 70px;
}

.fixture-table .col-comp {
    width: 170px;
}

.fixture-table .col-team {
    width: 22%;
}

.fixture-table .col-score {
    width: 130px;
}

.table-responsive.shadow-sm.rounded {
    border-radius: 0.9rem !important;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    box-shadow: 0 4px 14px -8px rgba(27, 26, 43, 0.15) !important;
}

.team-cell-text {
    white-space: nowrap;
    font-size: 1rem;
    font-weight: 600;
}

.club-name {
    font-weight: 700;
}

.score {
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    min-width: 70px;
    display: inline-block;
    text-align: center;
    background: var(--ink);
    color: #fff;
    border-radius: 0.5rem;
    padding: 0.18rem 0.5rem;
}

.score.pending {
    background: var(--surface-muted);
    color: #6f6b8a;
    font-weight: 600;
    font-size: 0.85rem;
}

.winner .club-name {
    color: var(--win);
}

.comp-badge {
    background: var(--surface-muted);
    color: var(--brand);
    font-weight: 700;
    border: 1px solid var(--border-soft);
}

/* ---------- League tables ---------- */

#tableFormatFilter .btn {
    border-radius: 999px;
    font-weight: 600;
}

.league-card {
    border: 1px solid var(--border-soft);
    border-radius: 1rem;
    overflow: hidden;
}

.league-card .card-header {
    background: var(--brand);
    color: #fff;
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
    border-bottom: none;
}

.league-table th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6f6b8a;
    background: var(--surface-muted);
    border-bottom: none;
}

.league-table td.pts {
    font-weight: 800;
    color: var(--brand);
}

.form-dot {
    display: inline-block;
    width: 18px;
    height: 18px;
    line-height: 18px;
    border-radius: 50%;
    font-size: 0.62rem;
    font-weight: 700;
    color: #fff;
    text-align: center;
    margin-right: 2px;
}

.form-W {
    background: var(--win);
}

.form-L {
    background: var(--loss);
}

.form-D {
    background: var(--draw);
}

/* ---------- Team links ---------- */

.team-link {
    text-decoration: none;
}

.team-link .team-chip {
    transition: transform 0.15s;
}

.team-link:hover .team-chip,
.team-link:focus .team-chip {
    transform: translateY(-1px);
}

.league-table .team-chip {
    background: transparent !important;
    color: var(--ink) !important;
    padding-left: 0;
    font-size: 0.95rem;
}

/* ---------- Footer ---------- */

.data-source-badge {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    vertical-align: middle;
    margin: 0 0.5rem;
    opacity: 0.75;
}

.refresh-link {
    text-decoration: none;
    opacity: 0.55;
    vertical-align: baseline;
}

.refresh-link:hover,
.refresh-link:focus {
    opacity: 1;
    color: var(--brand);
}

/* ---------- Modal ---------- */

.modal-content {
    border-radius: 1rem;
    border: none;
}

.summary-modal-body {
    padding: 0.5rem;
}

.modal-header {
    border-bottom: 1px solid var(--border-soft);
}

.modal-footer {
    border-top: 1px solid var(--border-soft);
}