body {
    font-family: "Arial", sans-serif;
    margin: 0;
    background-color: #f4f7fc;
    color: #333
}

h1 {
    color: #333;
    font-weight: 700;
    text-align: center;
    padding: 0;
    margin-top: 20px;
    margin-bottom: 20px;
    font-size: 24px
}

h2 {
    text-align: center;
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 10px
}

h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
    color: #555
}

.tabs,
.view-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
    flex-wrap: wrap
}

.tabs a {
    padding: 10px 15px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    margin-right: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s ease
}

.tabs a:hover {
    background-color: #0056b3
}

.tabs a.active {
    background-color: #ff6f00;
    font-weight: bold;
    pointer-events: none;
    color: white
}

.container,
#all-events,
#list,
#current {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    max-width: 900px;
    margin: 0 auto;
    margin-bottom: 20px
}

.game-container {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    margin: 15px 0;
    border: 1px solid #ddd;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    background-color: white
}

.odd-game {
    background-color: #f9f9f9
}

.even-game {
    background-color: #fff
}

.game-container p {
    margin: 10px 0;
    font-size: 16px;
    line-height: 1.6
}

strong {
    color: #0056b3;
    font-size: 18px
}

span.claim {
    display: block;
    margin-left: 20px;
    color: #333;
    font-size: 16px;
    margin-top: 5px
}

.bold-claim {
    font-weight: bold;
    font-size: 16px
}

.red-claim {
    color: #e74c3c;
    font-weight: bold
}

.two-fold {
    color: #666;
    font-size: 14px;
    padding: 2px 0 2px 20px;
    margin: 0;
    border: none;
    border-left: 3px solid #ccc;
    background-color: #f9f9f9
}

.round-btn,
.view-tab-btn {
    font-size: 15px;
    background-color: #f8f9fa;
    color: #444;
    text-decoration: none;
    padding: 10px 20px;
    margin: 5px;
    border-radius: 30px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease
}

.round-btn:hover,
.view-tab-btn:hover {
    background-color: #e9ecef;
    transform: translatey(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08)
}

.round-btn.active,
.view-tab-btn.active {
    background-color: #007bff;
    color: white;
    font-weight: 500;
    border-color: #007bff;
    box-shadow: 0 2px 5px rgba(0, 123, 255, 0.3);
    pointer-events: none
}

footer {
    text-align: center;
    font-size: 14px;
    color: #777;
    margin-top: 40px
}

#game-details {
    background-color: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    margin-top: 5px;
    display: none;
    padding: 0
}

#iframe-viewer {
    width: 100%;
    height: calc(100vh - 100px);
    border: none
}

button {
    background-color: #0056b3;
    color: white;
    border: none;
    padding: 12px 24px;
    margin-top: 10px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px
}

button:hover {
    background-color: #ff6f00
}

.view-tab-content {
    display: block
}

.list-event {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: flex-start
}

.list-event strong {
    color: #333;
    font-size: 1em
}

.list-event-content {
    flex-grow: 1
}

.list-event .bold-claim {
    font-weight: normal
}

#list {
    background-color: #fff;
    padding: 20px;
    border-radius: 12px
}

.chessboard-icon {
    cursor: pointer;
    margin-left: auto;
    flex-shrink: 0
}

.chessboard-icon svg {
    width: 24px;
    height: 24px
}

.last_move {
    padding: 8px 10px;
    margin: 10px 0;
    font-size: 16px;
    background-color: #f9f9f9;
    border-radius: 4px;
    border-left: 4px solid #ccc
}

.game-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    flex-shrink: 0
}

#list .game-content {
    margin-bottom: 20px
}

.game-info {
    flex-grow: 1;
    padding: 10px 15px
}

#list .game-info strong {
    padding-bottom: 4px;
    display: inline-block;
    color: #333;
    font-size: 1em
}

.game-info p {
    margin: 0
}

.game-info .bold-claim {
    margin-left: 20px;
    font-weight: normal;
    color: #333
}

.game-info h3 {
    margin-bottom: 5px
}

.claim-info {
    color: #006400;
    font-weight: bold
}

#current {
    display: none
}

#current .game-info {
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px
}

.current-position-claim {
    margin: 0;
    padding: 5px 8px;
    border-radius: 6px;
    background-color: #f0fff0;
    border: 1px solid #d1e7dd;
    font-weight: 500;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    margin-bottom: 8px;
    border-left: 3px solid #1c6e2f
}

.current-position-claim strong {
    font-weight: 700;
    color: #155724
}

.by-playing-claim {
    border-left: 3px solid #ffc107;
    background-color: #fffaf0;
    margin-bottom: 5px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 15px
}

.claim-active,
.current-position-claim {
    border-left: 6px solid #28a745 !important;
    background-color: #f0fff0 !important;
    border-radius: 4px;
    display: inline-block;
    font-size: 15px;
    padding: 8px 12px
}

.forced-draw-claim {
    border-left: 6px solid #dc3545 !important;
    background-color: #fff5f5 !important;
    margin-bottom: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 15px;
    color: #dc3545
}

.forced-draw-claim strong {
    color: #dc3545;
    font-size: 15px
}

.claim-inactive {
    border-left: 3px solid #666;
    background-color: #f7f7f9;
    color: #495057;
    font-size: 14px;
    padding: 5px;
    margin-bottom: 5px
}

.claim.by-playing-claim,
.claim-active.by-playing-claim,
.current-position-claim.by-playing-claim {
    border-left: 3px solid #e9bb31 !important;
    background-color: #fffaf0 !important
}

.future-claim,
.by-playing-claim {
    background-color: #e7f3ff;
    border-color: #b8daff
}

.future-claim strong,
.by-playing-claim strong {
    color: #333;
    font-size: 15px
}

.is-claimable {
    color: #155724;
    font-weight: bold;
    text-transform: uppercase;
    background-color: #d4edda;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 10px;
    display: inline-block;
    font-size: 14px;
    border-color: #c3e6cb;
}

.not-claimable {
    color: #333;
    font-weight: normal;
    margin-left: 10px;
    display: inline-block;
    font-size: 15px
}

.claims {
    margin-top: 8px
}

.claims .claim,
.two-fold {
    margin-bottom: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    margin: 1px 0;
    font-size: 15px;
    border-bottom: 1px solid #ddd
}

.two-fold strong {
    color: #333;
    font-size: 15px
}

.claims .claim-active {
    border-left: 6px solid #198754 !important;
    background-color: #f0fff0
}

.claims .claim-inactive {
    background-color: transparent
}

.claim-active strong,
.twofold strong {
    color: #333;
    font-weight: bold;
    font-size: 15px
}

.claim-inactive strong {
    color: #555;
    font-weight: normal;
    font-size: 15px
}

.last-move-with-claim {
    background-color: #f0fff0;
    border-left: 4px solid #28a745 !important;
    font-weight: bold;
    color: #1c6e2f
}

.last-move-with-possible-claim {
    background-color: #fffaf0;
    border-left: 4px solid #e9bb31
}

.claim-status-achieved {
    font-weight: bold;
    color: #155724;
    margin-left: 10px;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    max-width: fit-content;
}

.stats-container {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px 15px;
    margin: 15px 0;
    font-size: 14px;
    line-height: 1.6
}

.stats-container strong {
    font-weight: bold;
    color: inherit
}

.stats-highlight {
    font-weight: bold;
    color: inherit
}

.tab {
    overflow: hidden;
    border: 1px solid #ccc;
    background-color: #f1f1f1
}

.tab button {
    background-color: inherit;
    float: left;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 14px 16px;
    transition: 0.3s;
    font-size: 16px
}

.tab button:hover {
    background-color: #ddd
}

.tab button.active {
    background-color: #ccc
}

.tabcontent {
    display: none;
    padding: 6px 12px;
    border: none;
    border-top: none
}

.game-header {
    padding: 10px 15px;
    background-color: #f8f8f8;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px
}

.stats-view-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 25px
}

.view-tabs {
    margin-top: 10px
}

.claim.two-fold {
    padding-top: 4px;
    padding-bottom: 4px;
    color: #666
}

.claim-tool-table {
    width: 100%;
    overflow-x: auto;
    margin-top: 10px;
    border-collapse: collapse;
    font-size: 0.9em
}

.claim-tool-controls {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 0;
    font-size: 12px;
}

.claim-tool-filter-btn {
    padding: 3px 8px;
    border: 1px solid #ccc;
    background: #f5f5f5;
    color: #555;
    cursor: pointer;
    font-size: 11px;
    line-height: 1.3;
    border-radius: 0;
}
.claim-tool-filter-btn:first-child {
    border-radius: 3px 0 0 3px;
}
.claim-tool-filter-btn:last-child {
    border-radius: 0 3px 3px 0;
    border-left-width: 0;
}
.claim-tool-filter-btn:hover:not(.active) {
    background: #eee;
}
.claim-tool-filter-btn.active {
    background: #0056b3;
    color: #fff;
    border-color: #0056b3;
    cursor: default;
}
.claim-tool-filter-btn.active + .claim-tool-filter-btn {
    border-left-width: 1px;
}

.claim-tool-table table {
    width: auto;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 14px
}

.claim-tool-table th,
.claim-tool-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ddd
}

.claim-tool-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
    position: sticky;
    top: 0;
    cursor: pointer;
    user-select: none
}

.claim-tool-table th::after {
    content: "";
    float: right;
    margin-top: 7px;
    border-width: 4px;
    border-style: solid;
    border-color: #ccc transparent transparent transparent;
    visibility: hidden
}

.claim-tool-table th.sort-asc::after {
    border-color: transparent transparent #333 transparent;
    visibility: visible
}

.claim-tool-table th.sort-desc::after {
    border-color: #333 transparent transparent transparent;
    visibility: visible
}

.claim-tool-table th:hover::after {
    visibility: visible
}

/* Header styling to match column classes */
.claim-tool-table th.timestamp-header {
    width: 80px;
    min-width: 80px;
    max-width: 05px;
}

.claim-tool-table th.section-header {
    width: 60px;
    min-width: 60px;
    max-width: 80px;
}

.claim-tool-table th.board-header {
    width: 50px;
    min-width: 50px;
    max-width: 60px;
}

.claim-tool-table th.players-header {
    min-width: 250px;
    max-width: 350px;
}

.claim-tool-table th.move-header {
    width: 80px;
    min-width: 70px;
    max-width: 100px;
}

.claim-tool-table th.type-header {
    min-width: 200px;
}

.claim-tool-table tbody tr:hover {
    background-color: #f8f9fa
}

.claim-tool-table tbody tr:nth-child(even) {
    background-color: #f9f9f9
}

.claim-tool-table tbody tr:nth-child(odd) {
    background-color: #fff
}

/* Column-specific styling with appropriate widths */
.claim-tool-table .timestamp-cell {
    width: 80px;
    min-width: 80px;
    max-width: 80px;
    font-size: 13px;
}

.claim-tool-table .section-cell {
    width: 60px;
    min-width: 60px;
    max-width: 80px;
    font-weight: 500;
    text-align: center;
}

.claim-tool-table .board-cell {
    width: 50px;
    min-width: 50px;
    max-width: 60px;
    font-weight: 500;
}

.claim-tool-table .players-cell {
    min-width: 250px;
    max-width: 350px;
}

.claim-tool-table .players-cell .player-names {
    font-weight: bold;
}

.claim-tool-table .players-cell .player-move {
    font-weight: normal;
}

.claim-tool-table .move-cell {
    width: 110px;
    min-width: 110px;
    max-width: 140px;
    font-family: monospace;
    font-weight: bold;
}

.claim-tool-table .type-cell {
    min-width: 200px;
    font-weight: bold;
}

/* Forced draw styling - red text for 5-fold, 75-move, stalemate, insufficient material */
.claim-tool-table tr.forced-draw td {
    color: #dc3545;
}

.claim-filter-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
    flex-wrap: wrap
}

.claim-filter-btn {
    font-size: 14px;
    background-color: #f8f9fa;
    color: #444;
    padding: 6px 12px;
    margin: 0 5px;
    border-radius: 20px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    cursor: pointer
}

.claim-filter-btn:hover {
    background-color: #e9ecef
}

.claim-filter-btn.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff
}

.claim-tool-section {
    margin-top: 30px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1)
}

.claim-tool-section h2 {
    color: #0056b3;
    margin-bottom: 20px;
    font-size: 22px;
    font-weight: 600
}

.view-tab-inner-content {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    max-width: 900px;
    margin: 0 auto;
    margin-bottom: 20px
}

.arbiter-claim-status {
    background-color: #dc3545;
    color: #fff5f5 !important;
    font-weight: bold;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    margin-left: 10px;
    display: inline-block;
    font-size: 15px
}

.pairings-list {
    list-style: none;
    padding: 0;
    margin: 0
}

.pairings-list li {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s ease
}

.pairings-list li:hover {
    background-color: #f0f0f0
}

.pairings-list li.active {
    background-color: #e7f3ff;
    font-weight: bold
}

.pairings-list li a {
    text-decoration: none;
    color: #333
}

.last-move {
    padding: 8px 10px;
    margin: 10px 0;
    font-size: 16px;
    background-color: #f9f9f9;
    border-radius: 4px;
    border-left: 4px solid #ccc;
    margin-bottom: 8px;
    color: #333;
    font-weight: bold
}

.next-claim-status {
    color: #856404;
    font-weight: bold;
    background-color: #fff3cd;
    padding: 3px 8px;
    border-radius: 4px;
    margin-left: 10px;
    border: 1px solid #ffeaa7;
    display: inline-block;
    max-width: fit-content;
}

.claim.twofold {
    border-left: 4px solid #ced4da !important;
}

.claim.by-playing-claim {
    border-left: 4px solid #e9bb31 !important;
    background-color: #fffaf0 !important;
    padding: 8px 12px;
    border-radius: 4px
}

.claim.three-fold {
    border-left: 4px solid #28a745 !important;
    background-color: #f0fff0 !important
}

.claim.claim-active {
    border-left: 4px solid #28a745 !important;
    background-color: #f0fff0 !important
}

.claim.five-fold {
    background-color: #fff5f5 !important;
    border-left: 4px solid #dc3545 !important
}

.claim-status-possible {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 4px;
    padding: 2px 6px;
    margin-left: 10px;
    display: inline-block;
}

.claim.forced-draw-claim {
    background-color: #fff5f5 !important;
    border-left: 4px solid #dc3545 !important
}

.no-claims-banner {
    padding: 8px 12px;
    background-color: #f8f9fa;
    color: #6c757d;
    border-left: 4px solid #ced4da;
    border-radius: 4px;
    text-align: center;
    font-style: italic
}

.last-move span.not-claimable,
.last-move .claim-status-not-claimable {
    background-color: #d6d8d9;
    color: #1b1e21;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 13px;
    margin-left: 10px;
    border-color: #d6d8d9;
    font-weight: normal;

}

.split-container {
    display: flex;
    height: 100vh;
    width: 100%;
    box-sizing: border-box
}

.left-pane {
    flex: 0 0 400px;
    padding: 15px 0px;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: #f8f9fa;
    box-sizing: border-box;
    transition: all 0.3s ease;
}
#tournament-title-h1, .claim-tool-link-container, .section-header {
    margin: 0 15px;
}
.view-toggle-buttons {
    text-align: center;
    margin: 0 15px 15px;
    display:flex;
    gap:8px;
    justify-content:center;
}

.left-pane.collapsed {
    flex: 0 0 0;
    padding: 0;
    border-right: none;
    overflow: hidden;
}

.right-pane {
    flex: 1;
    padding: 0;
    overflow-y: auto;
    position: relative;
    box-sizing: border-box
}

/* Sidebar Toggle Button */
.sidebar-toggle-btn {
    position: fixed;
    z-index: 999; /* Below mobile header */
    background-color: transparent;
    color: #333;
    border: none;
    width: 24px;
    height: 24px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* Adjust sidebar toggle for mobile header */
@media (max-width: 767px) {
    .sidebar-toggle-btn {
        top: 130px; /* Below mobile header */
    }
}

.sidebar-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.sidebar-toggle-btn:hover {
    color: #666;
    transform: scale(1.1);
}

.sidebar-toggle-btn:active {
    transform: scale(0.95);
}

/* When sidebar is expanded, position button within the left sidebar area */
.sidebar-toggle-btn {
    left: 365px; /* Position within the left sidebar (400px width - 40px margin) */
}

/* When sidebar is collapsed, move button to left side of page */
.left-pane.collapsed ~ .right-pane .sidebar-toggle-btn {
    left: 20px;
}

/* Rotate icon 180 degrees when sidebar is collapsed */
.left-pane.collapsed ~ .right-pane .sidebar-icon {
    transform: rotate(180deg);
}

/* Add margin to right pane when sidebar is collapsed */
.left-pane.collapsed ~ .right-pane {
    margin-left: 50px;
}

.round-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px;
}

#round-select {
    flex-grow: 1;
    margin: 0 10px;
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 14px;
    background-color: #fff
}

.round-nav-btn {
    padding: 6px 12px;
    background-color: #0056b3;
    color: white;
    border: 1px solid #0056b3;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
    margin-top: 0
}

.round-nav-btn:hover {
    background-color: #004494
}

.round-nav-btn:disabled {
    background-color: #ccc;
    border-color: #ccc;
    color: #666;
    opacity: 0.7;
    cursor: not-allowed
}

.claim-tool-link-container {
    margin-bottom: 15px;
    text-align: center
}

#claim-tool-link {
    font-size: 14px;
    color: #0056b3;
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid #0056b3;
    border-radius: 4px;
    background-color: #e7f3ff;
    transition: background-color 0.2s ease
}

#claim-tool-link:hover {
    background-color: #d0e7ff;
    text-decoration: underline
}

.game-list-item {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fff;
    border-left: 4px solid transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px 10px;
    margin-left: 3px;
}

.game-list-item:nth-child(even) {
    background-color: #f8f9fa
}

.game-list-item:nth-child(odd) {
    background-color: #fff
}

/* Add spacing after section headers */
.section-header+.game-list-item {
    margin-top: 8px;
}

.game-list-item:hover {
    background-color: #eef4ff
}

.game-list-item.active,
.game-list-item .selected {
    background-color: #d4eaff !important;
}

.section-header {
    background-color: #0056b3;
    color: white;
    font-weight: bold;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 4px rgba(0, 86, 179, 0.2);
}

.game-list-main {
    display: flex;
    align-items: center;
    flex-grow: 1;
    min-width: 200px
}

.game-list-board {
    min-width: 20px;
    max-width: 35px;
    font-weight: bold;
    margin-right: 8px;
    font-size: 14px;
    text-align: left;
    flex-shrink: 0
}

.game-list-players {
    flex-grow: 1;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    font-weight: bold
}

/* LiveChess: live + clock paused (run null) + 2+ ply — needs arbiter attention */
/* Red "Clock stopped" line when clock is paused (until result) */
.game-list-clock-stopped {
    color: #c0392b;
    font-weight: bold;
    font-size: 12px;
    margin-top: 4px;
    padding-left: 2px;
}
.game-list-clock-stopped.hidden {
    display: none;
}

.game-list-item.clock-needs-attention .game-list-players {
    border: 2px solid #c0392b;
    border-radius: 3px;
    padding: 2px 4px;
    box-sizing: border-box;
}

.game-list-status {
    padding: 2px 6px;
    font-size: 11px;
    border-radius: 4px;
    border-left-width: 3px;
    border-left-style: solid;
    border-left-color: transparent;
    display: block;
    gap: 4px;
    flex-shrink: 0;
    text-align: right;
    min-height: 0;
    padding-left: 26px;
    width: 322px
}

.game-list-status .status-line {
    border-radius: 4px;
    font-weight: bold;
    font-size: 13px;
    margin-top: 5px;
}

.claim-status-draw {
    background-color: #f8d7da;
    color: #721c24;
    font-weight: bold;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    margin-left: 10px;
    border: 1px solid #f5c6cb;
    display: inline-block;
}

.game-list-status.last-move-with-claim {
    border-bottom: none
}

.game-list-status.last-move-with-forced-draw {
    border-bottom: none
}

.game-list-status.last-move-two-fold {
    border-bottom: none
}

.game-list-status .next-claim-status,
.game-list-status .arbiter-claim-status,
.game-list-status .is-claimable,
.game-list-status .two-fold-status {
    padding: 3px 8px;
    font-size: 13px;
    margin-left: 0;
    line-height: 1.2;
    white-space: normal;
    display: inline-block;
}

.game-list-status .not-claimable {
    display: none
}

.game-list-status .move-counter {
    font-size: 13px;
    color: #555;
    white-space: nowrap;
    text-align: right;
    padding-bottom: 5px
}

.right-pane .game-viewer-container {
    max-width: none;
    height: 100%;
    box-shadow: none;
    border-radius: 0;
    padding: 15px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden
}

#claim-tool-view {
    padding: 15px;
    width: 100%;
    box-sizing: border-box;
    height: 100%;
    overflow-y: auto
}

/* MultiBoard layout inside right pane */
#multiboard-view {
    padding: 15px;
    width: 100%;
    box-sizing: border-box;
    height: 100%;
    overflow-y: auto;
}

.multiboard-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.multiboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.multiboard-section-header {
    grid-column: 1 / -1;
    background-color: #0056b3;
    color: white;
    font-weight: bold;
    font-size: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0, 86, 179, 0.3);
    margin: 8px 0;
    text-align: center;
}
.multiboard-section-header:first-child {
    margin-top: 0;
}

.board-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 4px;
    flex-direction: column;
    align-items: center;
}

.board-card .board-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 14px;
}

.board-card .board-header .board-result {
    font-weight: bold;
}

.board-card .player-top,
.board-card .player-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: bold;
    min-height: 20px;
    font-size: 14px;
    padding: 3px 0px;
    margin: 0px 0;
}

.board-card .player-top {
    background: #3f3f40;
    color: white;
}

.board-card .player-bottom {
    background: #ecf0f1;
    color: #2c3e50;
}

.board-card .player-bar .player-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-left: 20px;
}

.board-card .player-bar .player-score {
    font-weight: bold;
    background: #e8edf2;
    color: #263646;
    border-radius: 4px;
    margin-right: 5px;
    padding: 2px 6px;
    min-height: 18px;
    min-width: 24px;
    text-align: center;
    line-height: 1.15;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.board-card .player-bottom .player-score {
    background: #dde6ee;
    color: #263646;
}

/* Player score result colors (multiboard cards) */
.board-card .player-bar.result-win .player-score {
    background: #2f9e44;
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14);
}
.board-card .player-bar.result-draw .player-score {
    background: #f2c94c;
    color: #3a2b00;
    box-shadow: inset 0 0 0 1px rgba(103, 74, 0, 0.18);
}
.board-card .player-bar.result-loss .player-score {
    background: #c44545;
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14);
}

/* Brief highlight when game result just updated via SSE so it's visible */
.board-card.result-just-updated {
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.7);
    transition: box-shadow 0.2s ease-out;
}
.board-card.result-just-updated .player-bar.result-win .player-score,
.board-card.result-just-updated .player-bar.result-loss .player-score,
.board-card.result-just-updated .player-bar.result-draw .player-score {
    font-weight: 800;
}

/* LiveChess: live + clock paused (run null) + 2+ ply — needs arbiter attention */
.board-card.clock-needs-attention .player-bar .player-score {
    border: 2px solid #c0392b;
    box-sizing: border-box;
}

/* Multiview: red border around clock when there is a claim state (claimable, possible claim, or forced draw) */
.board-card.last-move-with-claim .player-bar .player-score,
.board-card.last-move-with-possible-claim .player-bar .player-score,
.board-card.last-move-with-forced-draw .player-bar .player-score {
    border: 2px solid #c0392b;
    box-sizing: border-box;
}

/* "Clock stopped" label on multiboard cards (matches game list) */
.board-card .multiboard-clock-stopped {
    color: #c0392b;
    font-weight: bold;
    font-size: 12px;
    margin-top: 2px;
    padding: 0 6px;
}
.board-card .multiboard-clock-stopped.hidden {
    display: none;
}

.board-card .board-canvas {
    width: 260px;
    height: 260px;
    margin: 0 auto;
    box-sizing: border-box;
    display: contents;
    /* Remove inner padding/gap from inner wrapper to avoid extra space */
}

.board-canvas .white-1e1d7.sq-highlight {
    background-color: #e6d7bf !important;
    outline: 2px solid #ffbf00;
    outline-offset: -2px;
}
.board-canvas .black-3c85d.sq-highlight {
    background-color: #b3957c !important;
    outline: 2px solid #ffbf00;
    outline-offset: -2px;
}


.board-card .last-move-area {
    padding: 6px;
    align-self: stretch;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
    box-sizing: border-box;
}

/* Board number: stuck to the left edge of the card, light gray */
.board-card .last-move-board-num {
    flex-shrink: 0;
    margin-left: 0;
    background: #e2e4e8;
    color: #333;
    padding: 3px 6px;
    border-radius: 4px;
    min-width: 1.6em;
    text-align: center;
    font-size: 12px;
    font-weight: bold;
}

/* Move notation: separate box to the right of the number */
.board-card .last-move-line {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 12px;
    color: #333;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 3px 6px;
    font-weight: bold;
    text-align: center;
    max-width: calc(100% - 48px);
    margin-left: 0;
    margin-right: 0;
}

.board-card .last-move-notation {
    display: block;
}

.board-card .status-block {
    margin-top: 8px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* Reuse game-list status styling for multiboard cards */
.board-card .status-block {
    text-align: center;
}

.board-card .status-block .status-line {
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 13px;
    margin-top: 2px;
    width: 100%;
    text-align: center;
    display: inline-block;
}

/* Multiview: claim/status text under the move, red like a normal event */
.board-card .status-block.status-under-move {
    flex: 0 0 100%;
    width: 100%;
    margin-top: 4px;
    padding-top: 2px;
}
.board-card .status-block.status-under-move .status-line,
.board-card .status-block.status-under-move .claim-status-draw,
.board-card .status-block.status-under-move .is-claimable,
.board-card .status-block.status-under-move .claim-status-not-claimable,
.board-card .status-block.status-under-move .next-claim-status {
    color: #c0392b;
    white-space: normal;
    line-height: 1.25;
}

/* No left borders for multiboard cards */
.board-card.last-move-with-claim,
.board-card.last-move-with-forced-draw,
.board-card.last-move-two-fold {
    border-left: none !important;
}

.right-pane .game-header {
    flex-shrink: 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 10px;
    font-weight: bold;
    padding: 0 15px;
    background-color: #f1f1f8
}

.right-pane .game-header h2 {
    font-size: 18px;
    margin: 0
}

.right-pane .game-header .game-info span {
    font-size: 15px;
    padding: 3px 6px
}

.right-pane .viewer-claims-area {
    flex-grow: 1;
    flex-shrink: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
    overflow: hidden
}

.right-pane #last-move-display {
    margin-bottom: 0;
    padding: 8px 12px;
    font-size: 15px;
    border-radius: 6px 6px 0 0;
    border-left: 6px solid #ced4da;
    background-color: #f8f9fa;
    border-bottom: none;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.right-pane #claimable-status-display {
    padding: 8px 12px;
    font-size: 15px;
    border-radius: 0 0 6px 6px;
    background-color: #f8f9fa;
    border-top: none;
    flex-shrink: 0;
}

/* Green left border for threefold claim */
.right-pane #claimable-status-display:has(.claim-status-achieved) {
    border-left: 6px solid #28a745;
}

/* Gray left border for twofold claim */
.right-pane #claimable-status-display:has(.claim-status-twofold) {
    border-left: 6px solid #ced4da;
}

/* Red left border for fivefold claim */
.right-pane #claimable-status-display:has(.claim-status-fivefold) {
    border-left: 6px solid #dc3545;
}

/* Yellow left border for sevenfold claim */
.right-pane #claimable-status-display:has(.claim-status-possible) {
    border-left: 6px solid #ffc107;
}

.right-pane #claimable-status-display .not-claimable {
    background-color: #6c757d;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    display: block;
    margin-bottom: 4px;
    width: fit-content;
}

.right-pane #claimable-status-display .claim-status-achieved {
    background-color: #d4edda;
    color: #155724;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 14px;
    display: block;
    margin-bottom: 4px;
    width: fit-content;
    border-color: #c3e6cb;
    ;
}

.right-pane #claimable-status-display .claim-status-draw {
    background-color: #dc3545;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 14px;
    display: block;
    margin-bottom: 4px;
    width: fit-content;
}

.right-pane #claimable-status-display .next-claim-status {
    background-color: #fff3cd;
    color: #856404;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 14px;
    display: block;
    margin-bottom: 4px;
    width: fit-content;
    border-color: #ffeeba;
}

.right-pane #claimable-status-display .claim-status-twofold {
    background-color: #e2e3e5;
    color: #495057;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 14px;
    display: block;
    margin-bottom: 4px;
    width: fit-content;
    border-color: #d6d8db;
}

/* Historical potential claims styling */
.claims .historical-potential-claim {
    opacity: 0.8;
    border-left: 3px solid #ffc107;
}

.claims .historical-potential-claim:hover {
    opacity: 1;
}

.right-pane #last-move-display.last-move-with-claim,
.right-pane #last-move-display.last-move-with-forced-draw,
.right-pane #last-move-display.last-move-two-fold {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0
}

.right-pane #last-move-display.last-move-with-claim {
    border-left-color: #28a745
}

.right-pane #last-move-display.last-move-with-forced-draw {
    border-left-color: #dc3545
}

.right-pane #last-move-display.last-move-two-fold {
    border-left-color: #ccc
}

.right-pane .game-viewer-header-content {
    flex-grow: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    height: calc(100% - 480px);
}

.right-pane #claims-list {
    flex-grow: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    border-top: none;
    border-radius: 0 0 4px 4px;
    padding: 5px;
    margin-left: 30px
}

.right-pane #claims-list .claim {
    padding: 6px 10px;
    font-size: 14px;
    border-radius: 4px;
    display: block
}

.right-pane #claims-list .clickable-claim {
    cursor: pointer
}

.right-pane #claims-list .clickable-claim:hover {
    background-color: #e9ecef
}

.right-pane .game-content {
    flex-shrink: 0;
    width: 685px;
    height: 490px;
    max-height: 480px;
    min-height: 480px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 10px;
    box-sizing: border-box;
    margin-top: 20px
}

.right-pane .board-container {
    flex: 1 1 200px;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-height: 100%;
    overflow: hidden
}

.right-pane #board {
    width: 100% !important;
    max-width: 400px;
    margin-bottom: 10px;
    flex-shrink: 1;
    flex-grow: 0
}

.right-pane .navigation-controls {
    margin-top: auto;
    padding-top: 10px;
    flex-shrink: 0
}

.right-pane .game-side-panel {
    flex: 1 1 50px;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: 100%
}

.right-pane .moves-container {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
    background-color: #fff;
    flex-grow: 1;
    overflow-y: auto;
    min-height: 0
}

.game-viewer-container {
    display: flex;
    flex-direction: column;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1)
}

.game-header h1 {
    margin: 0;
    font-size: 22px;
    color: #333
}

.game-header .game-info {
    display: flex;
    gap: 15px
}

.game-header .game-info span {
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
    background-color: #f0f0f0
}

.claims-container {
    flex: 100%;
    margin-bottom: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1)
}

.claims-container h3 {
    display: none
}

.claim-active {
    margin-bottom: 5px;
    padding: 5px;
    border-left: 3px solid #1c6e2f;
    background-color: #f0fff0
}

.not-claimable,
.claim-status-twofold {
    background-color: #e2e3e5;
    color: #383d41;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 10px;
    border: 1px solid #d6d8db;
    display: inline-block;
}

.games-list-container p{
    text-align: center;
}
.claim {
    margin-bottom: 5px;
    padding: 5px 8px;
    cursor: pointer
}

.claim strong {
    cursor: pointer
}

.board-container {
    flex: 1;
    min-width: 400px;
    align-self: flex-start
}

.game-side-panel {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-self: flex-start
}

.moves-container {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
    background-color: #fff
}

.moves-list {
    display: grid;
    grid-template-columns: auto 1fr 1fr;
    gap: 5px 6px;
    color: #333
}

.white-move,
.black-move {
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
}

.white-move:hover,
.black-move:hover {
    background-color: #f0f0f0
}

.current-move {
    background-color: #0056b3 !important;
    color: white !important
}

.navigation-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px
}

.nav-button {
    padding: 8px 15px;
    background-color: #0056b3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin: 0;
    font-size: 20px
}

.nav-button:hover {
    background-color: #003d82
}

.nav-button:disabled {
    background-color: #ccc;
    cursor: not-allowed
}

.back-button {
    display: inline-block;
    margin-bottom: 20px;
    padding: 8px 15px;
    background-color: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 4px
}

.back-button:hover {
    background-color: #e0e0e0
}

.tabs {
    margin-bottom: 20px
}

.related-move {
    background-color: #a8d5ff !important
}

.current-move.claim-move {
    background-color: #3a74b1 !important;
    color: white !important
}

.claim-indicator {
    display: inline-block;
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    margin-right: 5px !important;
    vertical-align: middle;
    background-color: transparent;
    padding: 0 !important;
    border: 1px solid #ccc
}

.claim-indicator.red {
    background-color: #dc3545;
    border-color: #b02a37
}

.claim-indicator.green {
    background-color: #28a745;
    border-color: #1c6e2f
}

.claim-indicator.yellow {
    background-color: #ffc107;
    border-color: #e9b400
}

.claim-indicator.gray {
    background-color: #adb5bd;
    border-color: #6c757d
}

.claim-move {
    font-weight: 600;
    text-decoration: none
}

#btnPrev,
#btnNext {
    padding: 8px 45px
}

.claim-tool-table td.clickable-game {
    cursor: pointer
}

.claim-tool-table td.clickable-game:hover {
    color: #003d82
}

.round-nav-btn,
#show-claim-tool-btn {
    background-color: #f1f1f8;
    border-color: #ced4da;
    width: 100%;
    margin-top: 5px;
    color: #333;
    font-weight: bold
}

.round-nav-btn:hover,
#show-claim-tool-btn:hover {
    background-color: #dee2e6;
    border-color: #adb5bd;
    color: #212529
}

.moves-list span {
    padding: 2px 4px;
    margin: 1px;
    border-radius: 3px;
    cursor: pointer;
    display: inline-block
}

.moves-list .move-number {
    cursor: default;
    margin-right: 5px
}

.moves-list span.current-move {
    background-color: #d0e0f0;
    font-weight: bold
}

.moves-list span.related-move {
    background-color: #ffc
}

.moves-list span.claim-move {
    font-weight: bold;
    border-radius: 3px;
    padding: 1px 3px
}

.moves-list span.claim-move.claim-active {
    background-color: #d4edda;
    color: #155724
}

.moves-list span.claim-move.by-playing {
    background-color: #fff3cd;
    color: #856404
}

.moves-list span.claim-move.forced-draw {
    background-color: #f8d7da;
    color: #721c24
}

.moves-list span.claim-move.two-fold {
    border: none;
    background: none
}

.claim-indicator.is-threefold,
.claim-indicator.is-multiple-repetition {
    background-color: #28a745;
    border-color: #1c6e2f
}

.claim-indicator.is-fifty-move {
    background-color: #28a745;
    border-color: #1c6e2f
}

.claim-indicator.is-twofold {
    background-color: #adb5bd;
    border-color: #6c757d
}

.claim-indicator.by-playing {
    background-color: #ffc107;
    border-color: #e9b400
}

.claim-indicator.is-seventyfive-move,
.claim-indicator.is-stalemate,
.claim-indicator.is-insufficient-material {
    background-color: #dc3545;
    border-color: #b02a37
}

.claim-indicator.inactive-claim,
.claim-indicator.unknown {
    background-color: #adb5bd;
    border-color: #6c757d
}

.games-list-container .game-list-status {
    border-left: none !important;
    background: none
}

.last-move .claim-status-achieved,
.last-move .claim-status-possible,
.last-move .next-claim-status,
.last-move .claim-status-twofold {
    display: table;
    margin-bottom: 5px;
    margin-top: 5px;
    margin-left: 0
}

.quiet-moves-counter,
.move-counter {
    font-size: 13px;
    font-style: italic;
    font-weight: normal !important;
    margin-left: 5px;
}

.game-list-item:has(.last-move-with-claim) {
    border-left-color: #28a745;
    /* Green */
}

.game-list-item:has(.last-move-with-forced-draw) {
    border-left-color: #dc3545;
    /* Red */
}

.game-list-item:has(.last-move-two-fold) {
    border-left-color: #ccc;
    /* Gray */
}

.game-list-item:has(.last-move-two-fold),
.last-move:has(.last-move-two-fold) {
    border-left-color: #adb5bd !important;
}

.game-list-item:has(.claim-status-possible),
.last-move:has(.claim-status-possible) {
    border-left-color: #e9bb31 !important;
    /* Yellow */
}

.game-list-item:has(.claim-status-achieved),
.game-list-item:has(.is-claimable),
.last-move:has(.claim-status-achieved),
.last-move:has(.is-claimable) {
    border-left-color: #28a745 !important;
    /* Green */
}

.game-list-item:has(.claim-status-draw),
.last-move:has(.claim-status-draw) {
    border-left-color: #dc3545 !important;
    /* Red */
}

/* Future claim statuses - only apply when no confirmed claim (green/red) is present */
.game-list-item:not(:has(.claim-status-achieved)):not(:has(.is-claimable)):not(:has(.claim-status-draw)):has(.claim-status-twofold),
.last-move:not(:has(.claim-status-achieved)):not(:has(.is-claimable)):not(:has(.claim-status-draw)):has(.claim-status-twofold) {
    border-left-color: #adb5bd !important;
    /* Gray for twofold */
}

.game-list-item:not(:has(.claim-status-achieved)):not(:has(.is-claimable)):not(:has(.claim-status-draw)):has(.claim-status-fivefold),
.last-move:not(:has(.claim-status-achieved)):not(:has(.is-claimable)):not(:has(.claim-status-draw)):has(.claim-status-fivefold) {
    border-left-color: #6f42c1 !important;
    /* Purple for fivefold */
}

/* Also target next-claim-status spans for future claims */
.game-list-item:not(:has(.claim-status-achieved)):not(:has(.is-claimable)):not(:has(.claim-status-draw)):has(.next-claim-status),
.last-move:not(:has(.claim-status-achieved)):not(:has(.is-claimable)):not(:has(.claim-status-draw)):has(.next-claim-status) {
    border-left-color: #e9bb31 !important;
    /* Yellow for future claims */
}

/* Move selection indicator for historical moves */
.move-selection-indicator {
    display: inline-block;
    font-size: 15px;
}

/* Latest move claims section */
/* Move sections */
.move-section {
    margin-bottom: 12px;
    padding: 8px 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
    border-left: 4px solid #ccc;
    font-weight: bold;
    color: #333;
    display: inline-block;
    width: auto;
}

.move-text {
    margin-bottom: 6px;
    font-size: 16px;
}

.move-claims {
    font-size: 14px;
    font-weight: normal;
    margin-top: 6px;
    width: content-fit;
}

.move-claims span {
    display: block;
    margin-bottom: 4px;
}

/* Latest move section border colors */
.latest-move-section:has(.claim-status-achieved),
.latest-move-section:has(.is-claimable) {
    border-left-color: #28a745 !important; /* Green for achieved */
}

.latest-move-section:has(.claim-status-possible) {
    border-left-color: #e9bb31 !important; /* Yellow for possible */
}

.latest-move-section:has(.claim-status-draw) {
    border-left-color: #dc3545 !important; /* Red for draw */
}

.latest-move-section:not(:has(.claim-status-achieved)):not(:has(.is-claimable)):not(:has(.claim-status-draw)):has(.claim-status-twofold) {
    border-left-color: #adb5bd !important; /* Gray for twofold */
}

.latest-move-section:not(:has(.claim-status-achieved)):not(:has(.is-claimable)):not(:has(.claim-status-draw)):has(.claim-status-fivefold) {
    border-left-color: #6f42c1 !important; /* Purple for fivefold */
}

/* Selected move section - same color scheme as latest move */
.selected-move-section:has(.claim-status-achieved),
.selected-move-section:has(.is-claimable) {
    border-left-color: #28a745 !important; /* Green for achieved */
}

.selected-move-section:has(.claim-status-possible) {
    border-left-color: #e9bb31 !important; /* Yellow for possible */
}

.selected-move-section:has(.claim-status-draw) {
    border-left-color: #dc3545 !important; /* Red for draw */
}

.selected-move-section:not(:has(.claim-status-achieved)):not(:has(.is-claimable)):not(:has(.claim-status-draw)):has(.claim-status-twofold) {
    border-left-color: #adb5bd !important; /* Gray for twofold */
}

.selected-move-section:not(:has(.claim-status-achieved)):not(:has(.is-claimable)):not(:has(.claim-status-draw)):has(.claim-status-fivefold) {
    border-left-color: #6f42c1 !important; /* Purple for fivefold */
}

.move-selection-header {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 6px;
    color: #333;
}

.latest-move-notation {
    font-weight: 500;
    color: #333;
    background: transparent;
}

/* Current position not claimable styling */
.claim-status-not-claimable {
    display: inline-block;
    background-color: #f5f5f5;
    color: #666;
    padding: 3px 8px;
    margin-left: 10px;
    border-radius: 4px;
    font-size: 13px;
    border: 1px solid #ddd;
    font-weight: bold;
    text-transform: uppercase;
}

/* Claim status content wrapper */
.claim-status-content {
    display: inline-block;
    margin-left: 10px;
}

/* Page Footer */
.page-footer {
    position: fixed;
    bottom: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid #ddd;
    border-left: 1px solid #ddd;
    padding: 8px 15px;
    font-size: 12px;
    color: #666;
    z-index: 1000;
    box-shadow: -2px -2px 5px rgba(0,0,0,0.1);
}

/* Adjust footer for mobile */
@media (max-width: 767px) {
    .page-footer {
        right: auto;
        left: 0;
        bottom: 0;
        width: 100%;
        text-align: center;
        border-left: none;
        border-top: 1px solid #ddd;
    }
}

.footer-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.back-home-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.back-home-link:hover {
    text-decoration: underline;
}

/* Mobile Header */
.mobile-header {
    display: none;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    padding: 10px 15px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
    box-sizing: border-box;
}

.mobile-header h1 {
    margin: 0 0 10px 0;
    font-size: 18px;
    text-align: center;
}

.mobile-round-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
}

.mobile-view-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.mobile-btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 14px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.mobile-btn.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

/* Mobile responsiveness */
@media (max-width: 767px) {
    /* Show mobile header on mobile */
    .mobile-header {
        display: block;
    }

    /* Hide desktop round navigation on mobile */
    .round-navigation,
    #tournament-title-h1 {
        display: none;
    }

    /* Hide multiboard button on mobile devices */
    #show-multiboard-btn {
        display: none !important;
    }

    /* Hide multiboard view on mobile devices */
    #multiboard-view {
        display: none !important;
    }

    /* Make left pane responsive on mobile */
    .left-pane {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    /* Ensure no horizontal scroll on mobile */
    .split-container {
        flex-direction: column;
        height: auto;
        min-height: calc(100vh - 140px); /* Account for mobile header */
        margin-top: 120px; /* Push content below fixed header */
    }

    .right-pane {
        flex: 1;
        min-height: 50vh;
    }

    /* Adjust button layout for mobile */
    .view-toggle-buttons {
        display: none; /* Hide desktop buttons on mobile */
    }

    /* Initially hide right pane on mobile to show game list first */
    .right-pane {
        display: none;
    }

    .left-pane {
        display: block;
    }

    /* Override for larger screens */
    @media (min-width: 768px) {
        .mobile-header {
            display: none;
        }

        .round-navigation,
        #tournament-title-h1 {
            display: block;
        }

        .view-toggle-buttons {
            display: flex;
        }

        .right-pane {
            display: block !important;
        }
        .left-pane {
            display: block !important;
        }
    }
}
