.table-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
    transition:
        background 0.3s ease,
        box-shadow 0.3s ease;
    overflow: hidden;
}

.table-scroll-container {
    overflow-x: auto;
    width: 100%;
    position: relative;
}

.table-card h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: max-content;
}

#playersTable th:first-child,
#playersTable td:first-child {
    position: sticky;
    left: 0;
    z-index: 10;
    background: var(--card-bg);
}

#playersTable th:first-child {
    z-index: 11;
    background: var(--table-hover);
}

th,
td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid var(--table-border);
    color: var(--text-color);
}

#playersTable th:nth-child(n + 2),
#playersTable td:nth-child(n + 2) {
    text-align: right;
}

#playersTable th:first-child,
#playersTable td:first-child {
    text-align: left;
}

th {
    background-color: var(--table-hover);
    font-weight: 600;
    color: var(--label-color);
    cursor: pointer;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.3;
    vertical-align: middle;
    height: 60px;
}

th:hover {
    background-color: var(--table-hover);
    opacity: 0.8;
}

tr:hover {
    background-color: var(--table-hover);
}

#playersTable tr:hover td:first-child {
    background-color: var(--table-hover) !important;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.pagination button {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.pagination button:hover {
    background: light-dark(#5a67d8, #9db4d6);
}

.pagination button:disabled {
    background: light-dark(#ccc, #555);
    color: light-dark(inherit, #888);
    cursor: not-allowed;
}

.pagination span {
    padding: 8px 12px;
    background: var(--card-bg);
    color: var(--text-color);
    border-radius: 5px;
    font-weight: 600;
    transition:
        background 0.3s ease,
        color 0.3s ease;
}

.page-input-container {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border-radius: 5px;
    padding: 8px 12px;
    color: var(--text-color);
    font-size: 14px;
}

.page-input {
    width: 40px;
    padding: 2px 4px;
    border: none;
    border-radius: 3px;
    background: light-dark(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.1));
    color: var(--text-color);
    font-size: 14px;
    text-align: center;
    margin-right: 2px;
}

.page-input:focus {
    outline: none;
    background: light-dark(rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.2));
}

/* Hide number input spinner arrows */
.page-input::-webkit-outer-spin-button,
.page-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.page-input[type='number'] {
    -moz-appearance: textfield;
}

.player-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.player-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
    filter: brightness(1.1);
}

.player-link:active {
    transform: scale(0.98);
}
