:root {
    --bg-color: #0b0c10;
    --card-bg: #1f2833;
    --text-primary: #c5c6c7;
    --text-secondary: #ffffff;
    --accent: #b0b0b0;
    --header-bg: #1f2833;
    --table-stripe: #12161c;
    --border-color: #2d3845;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Roboto Mono', monospace;
    margin: 0;
    padding: 10px;
}

.container {
    max-width: 95%;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--accent);
    padding-bottom: 20px;
}

h1 {
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
}

p {
    color: var(--accent);
    margin-top: 10px;
    font-size: 0.9em;
}

.social-links {
    margin-top: 10px;
    font-size: 0.9em;
}

.social-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.table-container {
    overflow-x: auto;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
    font-size: 0.98rem;
}

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

th {
    background-color: var(--header-bg);
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85em;
    cursor: pointer;
    user-select: none;
    position: sticky;
    top: 0;
    white-space: nowrap;
    transition: background-color 0.2s;
    z-index: 10;
    /* Ensure header stays on top */
}

th:hover {
    background-color: #2b3642;
}

th.sortable::after {
    content: '↕';
    margin-left: 5px;
    opacity: 0.3;
    font-size: 0.8em;
}

th.active-asc::after {
    content: '↑';
    opacity: 1;
    color: var(--accent);
}

th.active-desc::after {
    content: '↓';
    opacity: 1;
    color: var(--accent);
}

tr:nth-child(even) {
    background-color: var(--table-stripe);
}

tr:hover {
    background-color: #2c3440;
}

td a {
    text-decoration: none;
    color: inherit;
}

.player-cell * {
    text-decoration: none !important;
    border-bottom: none !important;
}

td {
    font-size: 0.9em;
}

/* Specific Column Styling */
.num-cell {
    width: 30px;
    text-align: center;
    color: var(--accent);
    font-weight: bold;
    font-size: 0.8em;
}

.role-cell {
    white-space: nowrap;
}

.player-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    color: #fff;
    min-width: 200px;
}

.flag-icon {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    object-fit: cover;
}

.logo-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
    border-radius: 50%;
    background: #fff;
    padding: 2px;
}

.rank-cell {
    font-weight: bold;
    color: var(--text-secondary);
    text-align: center;
}

.pos-cell {
    color: #aebbc7;
}

.height-cell {
    white-space: nowrap;
}

.rating-cell {
    text-align: center;
}

/* Year Selector */
.year-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.year-btn {
    background-color: #1f2833;
    color: #c5c6c7;
    border: 1px solid #b0b0b0;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Roboto Mono', monospace;
    transition: all 0.3s ease;
}

.year-btn:hover {
    background-color: #b0b0b0;
    color: #0b0c10;
}

.year-btn.active {
    background-color: #ffffff;
    color: #0b0c10;
    border-color: #ffffff;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {

    th,
    td {
        padding: 8px 10px;
        font-size: 0.8em;
    }

    .player-cell {
        min-width: 150px;
    }
}

/* Team Logo */
.team-logo {
    height: 24px;
    width: auto;
    vertical-align: middle;
    margin-right: 8px;
}

/* Social Icons */
.social-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
    vertical-align: middle;
    margin-right: 5px;
    position: relative;
    top: -1px;
}

.role-cell {
    white-space: normal;
    vertical-align: middle;
}

.role-content {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
    /* Standard property for compatibility */
    line-clamp: 2;
}