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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #23272e;
    color: #d4d8e0;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #a8c4e0;
}

h2 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: #7eb8a4;
}

.stats-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.badge {
    background: #2e3a4a;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #b0bec5;
}

.card {
    background: #2a2f38;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #3a4455;
}

.card a:not(.btn):not(.btn-small) {
    color: #7eb8d4;
    text-decoration: none;
}

.card a:not(.btn):not(.btn-small):hover {
    text-decoration: underline;
}

.card ul {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}

th, td {
    text-align: left;
    padding: 0.5rem;
    border-bottom: 1px solid #3a4455;
}

th {
    color: #7eb8a4;
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #8a96a8;
}

.breadcrumb a {
    color: #7eb8d4;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* League navigation tabs */
.league-nav {
    background: #1a1e24;
    border-bottom: 1px solid #3a4455;
    padding: 0 1.5rem;
    margin-bottom: 1.5rem;
}

.league-nav-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0 0;
}

.league-nav-home {
    color: #6a7888;
    text-decoration: none;
    font-size: 1.3rem;
    line-height: 1;
}

.league-nav-home:hover {
    color: #b0bec5;
}

.league-nav-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #a8c4e0;
}

.league-nav-tabs {
    display: flex;
    gap: 0;
    overflow-x: auto;
    padding-top: 0.5rem;
}

.league-tab {
    padding: 0.5rem 1rem;
    color: #6a7888;
    text-decoration: none;
    font-size: 0.85rem;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

.league-tab:hover {
    color: #b0bec5;
}

.league-tab.active {
    color: #7eb8a4;
    border-bottom-color: #7eb8a4;
}

/* Buttons */
.btn {
    display: inline-block;
    background: #3a5a7a;
    color: #e0eaf4;
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #4a6e90;
}

.btn-small {
    display: inline-block;
    background: #2e3a4a;
    color: #b0bec5;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.8rem;
}

.btn-small:hover {
    background: #3a5a7a;
    color: #e0eaf4;
}

/* Status */
.status-connected {
    color: #7eb8a4;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.status-tag {
    background: #4a5a6a;
    color: #c8d4e0;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-size: 0.75rem;
}

/* Roster */
.pos-label {
    font-weight: 600;
    color: #7eb8a4;
    min-width: 2.5rem;
}

.player-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 0.4rem;
}

.uniform {
    color: #6a7888;
    font-size: 0.8rem;
    margin-left: 0.3rem;
}

/* Form elements */
.input-field {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: #23272e;
    border: 1px solid #3a4455;
    border-radius: 4px;
    color: #d4d8e0;
    font-size: 0.95rem;
    font-family: inherit;
}

.input-field:focus {
    outline: none;
    border-color: #7eb8a4;
}

/* Sortable table indicators */
table.sortable thead th { cursor: pointer; user-select: none; position: relative; }
table.sortable thead th::after { content: ''; margin-left: 0.3rem; font-size: 0.65rem; color: #3a4455; }
table.sortable thead th.sort-asc::after { content: '▲'; color: #7eb8a4; }
table.sortable thead th.sort-desc::after { content: '▼'; color: #7eb8a4; }

.stat-label {
    font-size: 0.75rem;
    font-weight: normal;
    color: #6a7888;
}

.code-example {
    background: #23272e;
    border: 1px solid #3a4455;
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    margin: 0.5rem 0;
    font-size: 0.85rem;
    overflow-x: auto;
    color: #8a96a8;
}
