:root {
    --bg: #0b1324;
    --card: #121b33;
    --text: #e6ebf5;
    --muted: #9aa6c0;
    --line: #263252;
    --thead: #1a2541;
}

body {
    font-family: Inter, Segoe UI, Arial, sans-serif;
    margin: 24px;
    color: var(--text);
    background: var(--bg);
}

h1 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
    color: var(--text);
}

.subtitle {
    color: var(--muted);
    margin-bottom: 1rem;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    margin-bottom: 16px;
}

table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    color: var(--text);
}

thead th {
    background: var(--thead);
    color: var(--text);
    font-weight: 600;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 10px 12px;
    text-align: left;
}

tbody tr {
    border: 1px solid var(--line);
}

tbody tr {
    border-radius: 8px;
    overflow: hidden;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: #131c34;
}

.footer {
    margin-top: 1rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.badges {
    display: flex;
    gap: 6px;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    border-radius: 999px;
    border: 1px solid #5b6aa6;
    background: #1f2a4a;
    color: var(--text);
}

.badge.lead {
    border-color: #7c8cff;
    background: #233061;
    color: var(--text);
}

.badge.dim {
    opacity: 0.7;
}

abbr.hint {
    border-bottom: 1px dotted #94a3b8;
    cursor: help;
    text-decoration: none;
}

/* Division color accents */
.div0 td {
    background: #1e293b;
}

.div1 td {
    background: #172554;
}

.div2 td {
    background: #064e3b;
}

.div3 td {
    background: #3b0764;
}

.div4 td {
    background: #1e3a8a;
}

/* Legend */
.legend {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin: 8px 0 16px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
}

.legend-swatch {
    width: 14px;
    height: 14px;
    border: 1px solid var(--line);
    border-radius: 4px;
    display: inline-block;
}

a {
    color: #a7c0ff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    color: #cfe0ff;
}

.muted {
    color: var(--muted);
}

.index-table {
    width: 100%;
    border-collapse: collapse;
}

.index-table th,
.index-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
}

.index-table thead {
    .index-table tbody tr:nth-child(odd) {
        background-color: rgba(255, 255, 255, 0.03);
    }

    .index-table tbody tr:nth-child(even) {
        background-color: rgba(0, 0, 0, 0.08);
    }

    background: var(--thead);
}

.index-table .league-name {
    font-weight: 600;
}