:root {
  --chess-dark: rgba(34, 85, 34, 0.5);
  --chess-light: rgba(255, 255, 255, 0.5);
  --text-dark: #111;
  --text-light: #f5f5f5;
}

table.chessboard {
  border-collapse: collapse;
  width: 100%;
}

table.chessboard tr:nth-child(odd) td {
  background-color: var(--chess-dark);
  color: var(--text-light);
}

table.chessboard tr:nth-child(even) td {
  background-color: var(--chess-light);
  color: var(--text-dark);
}

/* Only style table headers in fixtures / leagues */
table.chessboard thead th {
  background-color: rgba(0, 0, 0, 0.75);
  color: #fff;
}


table.chessboard tbody tr td.club-fenton {
  color: #d4d4d4 !important ;
  font-weight: 1000 !important;
  text-shadow:
        -2px -2px 0 #875C00,
         0px -2px 0 #875C00,
         2px -2px 0 #875C00,
        -2px  0px 0 #875C00,
         2px  0px 0 #875C00,
        -2px  2px 0 #875C00,
         0px  2px 0 #875C00,
         2px  2px 0 #875C00;
}

table.chessboard tbody tr td.fenton-win {
  color: #00ff4c !important;
  font-weight: 700 !important;
  text-shadow:
    -1px  0   0 #000,
     1px  0   0 #000,
     0   -1px 0 #000,
     0    1px 0 #000 !important;
}

table.chessboard tbody tr td.fenton-loss {
  color: #d4d4d4 !important ;
  font-weight: 700 !important;
  text-shadow:
    -1px  0   0 #000,
     1px  0   0 #000,
     0   -1px 0 #000,
     0    1px 0 #000 !important;
}

table.chessboard tbody tr td.draw {
  color: #d4af37 !important;
  font-weight: 700 !important;
  text-shadow:
    -1px  0   0 #000,
     1px  0   0 #000,
     0   -1px 0 #000,
     0    1px 0 #000 !important;
}

/* Winning score */
table.chessboard td.result-cell .score-win {
  color: #00ff4c;
  font-weight: 700;
  text-shadow:
    -1px 0 0 #000,
     1px 0 0 #000,
     0 -1px 0 #000,
     0  1px 0 #000;
}

/* Losing score */
table.chessboard td.result-cell .score-loss {
  color: #ff2e2e;
  font-weight: 700;
  text-shadow:
    -1px 0 0 #000,
     1px 0 0 #000,
     0 -1px 0 #000,
     0  1px 0 #000;
}

/* Draw */
table.chessboard td.result-cell .score-draw {
  color: #d4af37;
  font-weight: 700;
  text-shadow:
    -1px 0 0 #000,
     1px 0 0 #000,
     0 -1px 0 #000,
     0  1px 0 #000;
}

/* Dash stays neutral */
table.chessboard td.result-cell .score-dash {
  color: inherit;
  font-weight: 600;
  text-shadow: none;
}

/* Centre result values */
table.chessboard td.result-cell {
  text-align: center;
  white-space: nowrap;
}

/* Centre Home, Result, Away columns (header + cells) */
table.chessboard th:nth-child(1),
table.chessboard td:nth-child(1),
table.chessboard th:nth-child(2),
table.chessboard td:nth-child(2),
table.chessboard th:nth-child(3),
table.chessboard td:nth-child(3) {
  text-align: center;
}

/* Comparison table chessboard rows (skip header) */
table.comparison-table.chessboard tbody tr:nth-child(odd) td {
  background-color: var(--chess-dark);
  color: var(--text-light);
}

table.comparison-table.chessboard tbody tr:nth-child(even) td {
  background-color: var(--chess-light);
  color: var(--text-dark);
}

/* fenton-player chessboard rows (skip header) */
table.fenton-player.chessboard tbody tr:nth-child(odd) td {
  background-color: var(--chess-dark);
  color: var(--text-light);
}

table.fenton-player.chessboard tbody tr:nth-child(even) td {
  background-color: var(--chess-light);
  color: var(--text-dark);
}

/* Chessboard rows — apply to both td and th in tbody */
table.chessboard tbody tr:nth-child(odd) > th,
table.chessboard tbody tr:nth-child(odd) > td {
  background-color: var(--chess-dark);
  color: var(--text-light);
}

table.chessboard tbody tr:nth-child(even) > th,
table.chessboard tbody tr:nth-child(even) > td {
  background-color: var(--chess-light);
  color: var(--text-dark);
}

table.chessboard tr.fenton-row td {
  color: #d4d4d4 !important ;
  font-weight: 1000 !important;  
text-shadow:
        -2px -2px 0 #875C00,
         0px -2px 0 #875C00,
         2px -2px 0 #875C00,
        -2px  0px 0 #875C00,
         2px  0px 0 #875C00,
        -2px  2px 0 #875C00,
         0px  2px 0 #875C00,
         2px  2px 0 #875C00;
}
