/* ============================================================
   SportsElo — main stylesheet (light theme)
   ============================================================ */

:root {
    --bg:            #faf9f5;
    --surface:       #ffffff;
    --border:        #e3e1da;
    --text:          #1a1a17;
    --text-secondary:#6b6a63;
    --accent:        #4a6fa5;
    --accent-dark:   #38547e;
    --success:       #1d9e75;
    --danger:        #d85a30;
    --radius:        10px;
    --font-main:     -apple-system, BlinkMacSystemFont, "Segoe UI",
                     Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono:     "SF Mono", SFMono-Regular, Menlo, Consolas,
                     "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.5;
}

/* ---------- Navbar ---------- */

header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.nav-inner {
    max-width: 860px;
    margin: 0 auto;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    text-decoration: none;
}

.brand:hover { color: var(--accent); }

header nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

header nav a {
    color: var(--text);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
}

header nav a:hover { color: var(--accent); }

header nav .soon {
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    opacity: 0.55;
    cursor: default;
}

header nav .soon small {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: 4px;
    vertical-align: super;
}

/* ---------- Layout ---------- */

main {
    max-width: 860px;
    margin: 0 auto;
    padding: 24px 16px 64px;
}

section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 24px;
}

h2 {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

p { margin: 0 0 8px; }

a { color: var(--accent); }
a:hover { color: var(--accent-dark); }

/* ---------- Tables ---------- */

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

th {
    text-align: left;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 8px 12px;
    border-bottom: 2px solid var(--border);
}

td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--border);
}

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

tbody tr:hover, tr:hover td { background: #f4f3ee; }

td:first-child, th:first-child {
    color: var(--text-secondary);
    width: 40px;
}

table td:nth-last-child(-n+3):not(:nth-child(2)),
table th:nth-last-child(-n+3):not(:nth-child(2)) {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

td a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
}

td a:hover { color: var(--accent); }

/* ---------- Forms (date picker) ---------- */

form {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

label {
    color: var(--text-secondary);
    font-size: 15px;
}

input[type="text"], input[type="date"] {
    font-family: var(--font-main);
    font-size: 15px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    width: 140px;
}

input:focus {
    outline: 2px solid var(--accent);
    outline-offset: -1px;
    border-color: var(--accent);
}

button {
    font-family: var(--font-main);
    font-size: 15px;
    font-weight: 500;
    padding: 8px 18px;
    border: none;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
}

button:hover { background: var(--accent-dark); }

/* ---------- Chart ---------- */

canvas { max-width: 100%; }

/* ---------- Stat block ---------- */

section p strong {
    font-variant-numeric: tabular-nums;
}

/* ---------- Team badge (colored circle with abbreviation) ---------- */

.team-cell {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.team-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

/* ---------- Mobile ---------- */

@media (max-width: 600px) {
    main { padding: 16px 8px 48px; }
    section { padding: 14px 14px; }
    th, td { padding: 7px 8px; }
    body { font-size: 15px; }
    .nav-inner { padding: 12px 12px; }
    header nav { gap: 14px; }
}