/* ===== RESET AND BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #0d1117;
    color: #c9d1d9;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.4;
    overflow-x: hidden;
}

/* ===== UTILITY CLASSES ===== */
.debug-hidden {
    display: none !important;
}

.positive {
    color: #238636;
}

.negative {
    color: #f85149;
}

.clickable-row {
    cursor: pointer;
}

.mode-active .player-actions {
    display: none;
}

/* ===== LAYOUT CONTAINERS ===== */
.terminal-container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: auto auto 1fr;
    gap: 2px;
    height: 100vh;
    padding: 2px;
    background-color: #0d1117;
}

/* ===== HEADER SECTION ===== */
.terminal-header {
    grid-column: 1 / -1;
    background-color: #161b22;
    border: 1px solid #30363d;
    padding: 8px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: 1fr;
    gap: 16px;
    align-items: center;
    min-height: 80px;
}

.header-left,
.header-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    font-size: 11px;
}

.header-left {
    text-align: left;
}

.header-right {
    text-align: right;
}

.header-stat-line {
    font-size: 12px;
    line-height: 1.3;
    color: #8b949e;
    white-space: nowrap;
}

.header-stat-line .stat-value {
    color: #c9d1d9;
    font-weight: normal;
}

.header-center {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.terminal-title {
    font-size: 36px;
    font-weight: bold;
    color: #58a6ff;
    text-shadow: 0 0 5px rgba(88, 166, 255, 0.3);
    margin: 0;
    line-height: 1;
}

/* ===== TAB NAVIGATION ===== */
.tab-navigation {
    grid-column: 1 / -1;
    background-color: #161b22;
    border: 1px solid #30363d;
    display: flex;
    padding: 0;
}

.tab-button {
    background-color: #21262d;
    color: #8b949e;
    border: none;
    padding: 12px 24px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    border-right: 1px solid #30363d;
    flex: 1;
    text-align: center;
    box-sizing: border-box;
    width: 50%;
}

.tab-button:hover {
    background-color: #30363d;
    color: #c9d1d9;
}

.tab-button.active {
    background-color: #58a6ff;
    color: #0d1117;
    font-weight: normal;
}

.tab-button:last-child {
    border-right: none;
}

/* ===== TAB CONTENT ===== */
.tab-content {
    grid-column: 1 / -1;
    display: none;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: auto auto auto auto auto auto minmax(0, 1fr);
    gap: 2px;
    height: 100%;
}

.tab-content.active {
    display: grid;
}

/* ===== PANEL SECTIONS ===== */
.controls-panel {
    grid-column: 1 / 3;
    background-color: #161b22;
    border: 1px solid #30363d;
    padding: 8px;
}

.filter-panel {
    grid-column: 3 / 5;
    background-color: #161b22;
    border: 1px solid #30363d;
    padding: 8px;
}

.actions-panel-top {
    grid-column: 5 / 7;
    background-color: #161b22;
    border: 1px solid #30363d;
    padding: 8px;
}

.fv-movement-panel {
    grid-column: 7 / 13;
    background-color: #161b22;
    border: 1px solid #30363d;
    padding: 8px;
}

.tools-panel {
    grid-column: 10 / 13;
    background-color: #161b22;
    border: 1px solid #30363d;
    padding: 8px;
}

.search-panel {
    grid-column: 1 / -1;
    background-color: #161b22;
    border: 1px solid #30363d;
    padding: 8px;
    display: block;
}

.main-table-container {
    grid-column: 1 / -1;
    background-color: #161b22;
    border: 1px solid #30363d;
    overflow: auto;
    position: relative;
    height: fit-content;
    align-self: start;
}

/* ===== PANEL CONTROLS ===== */
.panel-collapsible {
    background-color: #21262d;
    color: #c9d1d9;
    cursor: pointer;
    padding: 4px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 13px;
    text-transform: uppercase;
    border-bottom: 1px solid #30363d;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-collapsible:hover {
    background-color: #30363d;
}

.panel-collapsible.active {
    background-color: #30363d;
}

.panel-collapsible::after {
    content: "−";
    font-size: 16px;
    color: #58a6ff;
}

.panel-collapsible.collapsed::after {
    content: "+";
}

.panel-content {
    padding: 8px;
    display: block;
}

.panel-content.collapsed {
    display: none !important;
}

/* ===== ACTIONS PANEL LAYOUT ===== */
.actions-panel-top .panel-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.actions-single-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.actions-single-column button,
.actions-panel-top .panel-content button {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

/* ===== PARLAY POPUP ===== */
.parlay-popup {
    position: fixed;
    top: 50px;
    right: 20px;
    width: 480px;
    min-width: 320px;
    height: 420px;
    min-height: 300px;
    background-color: #161b22;
    resize: both;
    overflow: hidden;
    border: 1px solid #58a6ff;
    border-radius: 6px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
    user-select: none;
}

.parlay-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background-color: #21262d;
    border-bottom: 1px solid #30363d;
    cursor: move;
    border-radius: 6px 6px 0 0;
}

.parlay-popup-title {
    color: #58a6ff;
    font-size: 13px;
    font-weight: bold;
}

.parlay-popup-controls {
    display: flex;
    gap: 4px;
}

.parlay-control-btn {
    background-color: transparent;
    border: none;
    color: #8b949e;
    font-size: 16px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
}

.parlay-control-btn:hover {
    background-color: #30363d;
    color: #c9d1d9;
}

.parlay-popup-content {
    padding: 12px;
}

.parlay-popup .parlay-buttons {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.parlay-popup .parlay-buttons button {
    flex: 1;
    padding: 4px 6px;
    font-size: 11px;
}

.parlay-popup .parlay-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 8px;
    background-color: #0d1117;
    border: 1px solid #30363d;
    border-radius: 3px;
    padding: 6px;
}

.parlay-popup .parlay-results {
    background-color: #0d1117;
    border: 1px solid #30363d;
    padding: 6px;
    border-radius: 3px;
    font-size: 12px;
    line-height: 1.4;
}

.parlay-popup.minimized .parlay-popup-content {
    display: none;
}

.parlay-popup.minimized {
    width: 200px;
}

.parlay-options {
    margin-bottom: 8px;
    font-size: 11px;
}

.parlay-option {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
}

.parlay-option input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.parlay-option label {
    color: #c9d1d9;
    cursor: pointer;
}

.profit-boost-input {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: 8px;
}

.profit-boost-input input {
    width: 30px;
    padding: 1px 2px;
    font-size: 9px;
    text-align: center;
    -moz-appearance: textfield;
}

.profit-boost-input input::-webkit-outer-spin-button,
.profit-boost-input input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.profit-boost-input span {
    color: #8b949e;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .parlay-popup {
        top: 10px;
        right: 10px;
        left: 10px;
        width: auto;
        resize: both;
    }

    .parlay-popup.minimized {
        width: auto;
    }

    .parlay-popup .parlay-popup-content {
        height: calc(100% - 40px);
        display: flex;
        flex-direction: column;
    }

    .parlay-popup .parlay-list {
        flex: 1;
        max-height: none;
        min-height: 150px;
    }
}

/* ===== FORM INPUTS ===== */
input[type="text"],
input[type="number"] {
    background-color: #0d1117;
    color: #c9d1d9;
    border: 1px solid #30363d;
    padding: 4px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    width: 100%;
    margin: 2px 0;
}

input[type="text"]:focus,
input[type="number"]:focus {
    outline: none;
    border-color: #58a6ff;
    box-shadow: 0 0 3px rgba(88, 166, 255, 0.5);
}

.input-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 2px 0;
}

.input-row input {
    flex: 1;
    margin: 0;
}

.labeled-input {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 4px;
}

.labeled-input label {
    color: #8b949e;
    font-size: 13px;
    white-space: nowrap;
    margin: 0;
}

.labeled-input input {
    flex: 1;
    margin: 0;
}

/* ===== CHECKBOXES ===== */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 2px 0;
}

input[type="checkbox"] {
    accent-color: #58a6ff;
}

label {
    color: #8b949e;
    font-size: 13px;
}

/* ===== BUTTONS ===== */
button {
    background-color: #21262d;
    color: #c9d1d9;
    border: 1px solid #30363d;
    padding: 4px 12px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

button:hover {
    background-color: #58a6ff;
    color: #0d1117;
    box-shadow: 0 0 5px rgba(88, 166, 255, 0.5);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

button.active {
    background-color: #238636;
    color: #f0f6fc;
    border-color: #238636;
}

button.refresh-ready {
    background-color: #238636;
    color: #f0f6fc;
    border-color: #238636;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 5px rgba(35, 134, 54, 0.5);
    }

    50% {
        box-shadow: 0 0 15px rgba(35, 134, 54, 0.5);
    }

    100% {
        box-shadow: 0 0 5px rgba(35, 134, 54, 0.5);
    }
}

.action-button {
    background-color: #21262d;
    color: #c9d1d9;
    border: 1px solid #30363d;
    padding: 2px 6px;
    font-size: 11px;
    cursor: pointer;
    margin: 0 2px;
}

.action-button:hover {
    background-color: #58a6ff;
    color: #0d1117;
}

.action-button.danger {
    background-color: #da3633;
    color: #f0f6fc;
}

.action-button.danger:hover {
    background-color: #f85149;
}

/* 3-Column Toggle Button Layout */
.toggle-grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
    margin-bottom: 12px;
}

.toggle-column {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.toggle-button {
    background-color: #21262d;
    color: #8b949e;
    border: 1px solid #30363d;
    padding: 6px 8px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    user-select: none;
    white-space: nowrap;
    text-align: center;
    position: relative;
    width: 100%;
}

.toggle-button:hover {
    background-color: #30363d;
    border-color: #58a6ff;
    color: #c9d1d9;
}

.toggle-button.active {
    background-color: #58a6ff;
    color: #0d1117;
    border-color: #58a6ff;
    font-weight: bold;
}

.toggle-button.active:hover {
    background-color: #1f6feb;
    border-color: #1f6feb;
}

/* Select buttons underneath in 2 columns */
.select-buttons-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.select-button {
    background-color: #21262d;
    color: #c9d1d9;
    border: 1px solid #30363d;
    padding: 6px 8px;
    font-size: 10px;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s;
}

.select-button:hover {
    background-color: #58a6ff;
    color: #0d1117;
}

/* Tooltip styling */
.toggle-button[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #161b22;
    color: #c9d1d9;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    white-space: nowrap;
    z-index: 1000;
    border: 1px solid #30363d;
    margin-bottom: 4px;
}

.toggle-button[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #30363d;
    z-index: 1000;
}

/* ===== TABLES ===== */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th {
    background-color: #21262d;
    color: #c9d1d9;
    padding: 4px;
    text-align: left;
    border: 1px solid #30363d;
    position: sticky;
    top: 0;
    z-index: 10;
    cursor: pointer;
    user-select: none;
}

th:hover {
    background-color: #30363d;
}

th.sorted-asc::after {
    content: " ▲";
    color: #58a6ff;
}

th.sorted-desc::after {
    content: " ▼";
    color: #58a6ff;
}

td {
    padding: 4px;
    border: 1px solid #30363d;
    color: #c9d1d9;
}

tr:hover {
    background-color: #21262d;
}

tr.expanded-row {
    background-color: #161b22;
}

tr.hidden {
    display: none;
}

.edited-row {
    background-color: rgba(88, 166, 255, 0.1) !important;
}

.expanded-main-row {
    background-color: rgba(88, 166, 255, 0.1) !important;
    box-shadow: 0 0 3px rgba(88, 166, 255, 0.5) !important;
}

.result-w,
.bet-won {
    background-color: rgba(35, 134, 54, 0.2) !important;
}

.result-l,
.bet-lost {
    background-color: rgba(248, 81, 73, 0.2) !important;
}

/* ===== TABLE COLUMN WIDTHS ===== */
#dataTable td:nth-child(1) {
    min-width: 80px;
}

/* BOOK */
#dataTable td:nth-child(2) {
    min-width: 70px;
}

/* DATE */
#dataTable td:nth-child(3) {
    min-width: 120px;
}

/* PLAYER */
#dataTable td:nth-child(4) {
    min-width: 60px;
}

/* BOOK */
#dataTable td:nth-child(5) {
    min-width: 60px;
}

/* TEAM */
#dataTable td:nth-child(6) {
    min-width: 70px;
}

/* ODDS */
#dataTable td:nth-child(7) {
    min-width: 70px;
}

/* FV */
#dataTable td:nth-child(8) {
    min-width: 60px;
}

/* EV% */
#dataTable td:nth-child(9) {
    min-width: 70px;
}

/* UNITS */
#dataTable td:nth-child(10) {
    min-width: 70px;
}

/* RESULT */

#trackerTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

#trackerTable th {
    background-color: #21262d;
    color: #c9d1d9;
    padding: 8px;
    text-align: left;
    border: 1px solid #30363d;
    position: sticky;
    top: 0;
    z-index: 10;
    cursor: pointer;
    user-select: none;
}

#trackerTable td {
    padding: 8px;
    border: 1px solid #30363d;
    color: #c9d1d9;
    white-space: nowrap;
    width: auto;
    min-width: 80px;
}

#trackerTable tr:hover {
    background-color: #21262d;
}

#trackerTable tr {
    background-color: #161b22;
}

/* ===== EDITABLE CELLS ===== */
.odds-cell {
    cursor: pointer;
    color: #58a6ff;
}

.odds-cell:hover {
    text-decoration: underline;
}

.editable-cell {
    cursor: pointer;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 4px;
    color: #58a6ff;
}

.editable-cell:hover {
    background-color: rgba(88, 166, 255, 0.2);
    border-color: #58a6ff;
}

.edited-odds {
    color: #f79009 !important;
    font-weight: bold !important;
}

/* ===== INPUT FIELDS IN TABLES ===== */
.odds-input {
    background-color: transparent;
    color: #58a6ff;
    border: 1px solid #58a6ff;
    padding: 3px 4px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    width: 60px;
    max-width: 60px;
    min-width: 60px;
    height: auto;
    line-height: 1.4;
    text-align: center;
    box-shadow: 0 0 3px rgba(88, 166, 255, 0.5);
    -moz-appearance: textfield;
    box-sizing: border-box;
    margin: -3px auto;
    display: block;
}

.odds-input:focus {
    outline: none;
    box-shadow: 0 0 5px rgba(88, 166, 255, 0.8);
}

.odds-input::-webkit-outer-spin-button,
.odds-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.tracker-input {
    background-color: transparent;
    color: #c9d1d9;
    border: 1px solid #58a6ff;
    padding: 3px 4px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    width: auto;
    min-width: 60px;
    max-width: 120px;
    text-align: center;
    box-shadow: 0 0 3px rgba(88, 166, 255, 0.5);
}

.tracker-input:focus {
    outline: none;
    box-shadow: 0 0 5px rgba(88, 166, 255, 0.8);
}

.result-selector {
    background-color: #0d1117;
    color: #c9d1d9;
    border: 1px solid #58a6ff;
    padding: 3px 4px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    width: 100%;
    cursor: pointer;
}

.result-selector:focus {
    outline: none;
    box-shadow: 0 0 5px rgba(88, 166, 255, 0.8);
}

.notes-input {
    background-color: transparent;
    color: #c9d1d9;
    border: 1px solid #30363d;
    padding: 4px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    width: 100%;
    max-width: 150px;
}

.notes-input:focus {
    outline: none;
    border-color: #58a6ff;
}

/* ===== COLLAPSIBLE SECTIONS ===== */
.collapsible {
    background-color: #21262d;
    color: #c9d1d9;
    cursor: pointer;
    padding: 4px;
    width: 100%;
    border: 1px solid #30363d;
    text-align: left;
    outline: none;
    font-size: 13px;
    margin-top: 5px;
}

.collapsible:hover {
    background-color: #30363d;
}

.collapsible.active {
    background-color: #30363d;
}

.collapsible-content {
    display: none;
    padding: 8px;
    background-color: #161b22;
    border: 1px solid #30363d;
    border-top: none;
    overflow-y: auto;
}

.collapsible-content.show {
    display: block;
}

/* ===== SEARCH FUNCTIONALITY ===== */
.search-box {
    display: none;
}

.search-panel input {
    width: 100%;
    margin: 0;
    display: block;
    box-sizing: border-box;
}

/* ===== TRACKER SECTION ===== */
.tracker-header {
    grid-column: 1 / -1;
    background-color: #161b22;
    border: 1px solid #30363d;
    padding: 16px;
}

.tracker-stats {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.stat-card {
    background-color: #21262d;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 12px;
    text-align: center;
}

.stat-title {
    color: #8b949e;
    font-size: 11px;
    text-transform: uppercase;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-value {
    color: #c9d1d9;
    font-size: 18px;
    font-weight: bold;
}

.tracker-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    margin-bottom: 16px;
}

.tracker-dropdowns {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tracker-dropdowns select {
    background-color: #0d1117;
    color: #c9d1d9;
    border: 1px solid #30363d;
    padding: 6px 8px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    min-width: 80px;
    height: 32px;
    flex: 1;
}

.tracker-dropdowns select:focus {
    outline: none;
    border-color: #58a6ff;
    box-shadow: 0 0 3px rgba(88, 166, 255, 0.5);
}

.tracker-inputs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tracker-inputs input {
    background-color: #0d1117;
    color: #c9d1d9;
    border: 1px solid #30363d;
    padding: 6px 8px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    min-width: 80px;
    height: 32px;
    flex: 1;
    box-sizing: border-box;
}

.tracker-inputs input:focus {
    outline: none;
    border-color: #58a6ff;
    box-shadow: 0 0 3px rgba(88, 166, 255, 0.5);
}

.tracker-controls>input[type="text"] {
    background-color: #0d1117;
    color: #c9d1d9;
    border: 1px solid #30363d;
    padding: 6px 8px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    height: 32px;
    box-sizing: border-box;
}

.tracker-controls>input[type="text"]:focus {
    outline: none;
    border-color: #58a6ff;
    box-shadow: 0 0 3px rgba(88, 166, 255, 0.5);
}

.tracker-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tracker-buttons button {
    background-color: #21262d;
    color: #c9d1d9;
    border: 1px solid #30363d;
    padding: 6px 12px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    min-width: 80px;
}

.tracker-buttons button:hover {
    background-color: #58a6ff;
    color: #0d1117;
    box-shadow: 0 0 5px rgba(88, 166, 255, 0.5);
}

/* ===== PAGINATION ===== */
.tracker-table-container {
    grid-column: 1 / -1;
    background-color: #161b22;
    border: 1px solid #30363d;
    overflow: auto;
    position: relative;
}

.tracker-pagination-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background-color: #21262d;
    border-bottom: 1px solid #30363d;
}

.tracker-pagination-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 12px;
    background-color: #21262d;
    border-top: 1px solid #30363d;
}

.pagination-info {
    color: #8b949e;
    font-size: 13px;
}

.pagination-controls select {
    background-color: #0d1117;
    color: #c9d1d9;
    border: 1px solid #30363d;
    padding: 4px 8px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 12px;
}

.pagination-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pagination-nav button {
    background-color: #21262d;
    color: #c9d1d9;
    border: 1px solid #30363d;
    padding: 6px 12px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-nav button:hover:not(:disabled) {
    background-color: #58a6ff;
    color: #0d1117;
}

.pagination-nav button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#trackerPageInfo {
    color: #c9d1d9;
    font-size: 13px;
    min-width: 100px;
    text-align: center;
}

/* ===== BET STATES ===== */
.bet-selected-for-removal {
    background-color: rgba(88, 166, 255, 0.3) !important;
    border: 1px solid #58a6ff !important;
}

.player-selected {
    background-color: rgba(88, 166, 255, 0.2) !important;
    border-left: 2px solid #58a6ff !important;
}

/* ===== PLAYER ACTIONS (DESKTOP) ===== */
@media (min-width: 769px) {
    .player-actions {
        display: inline-flex;
        gap: 4px;
        margin-left: 6px;
        opacity: 0.7;
        transition: opacity 0.2s;
        float: right;
    }

    .player-actions:hover {
        opacity: 1;
    }

    .player-action-btn {
        background-color: #21262d;
        color: #c9d1d9;
        border: 1px solid #30363d;
        padding: 2px 6px;
        font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
        font-size: 10px;
        cursor: pointer;
        transition: all 0.2s;
        border-radius: 2px;
        min-width: auto;
        text-align: center;
        line-height: 1;
    }

    .player-action-btn:hover {
        background-color: #58a6ff;
        color: #0d1117;
    }

    .player-action-btn.track:hover {
        background-color: #238636;
    }

    .player-action-btn.hide:hover {
        background-color: #da3633;
    }

    .player-action-btn.show:hover {
        background-color: #238636;
    }

    .player-action-btn.untrack:hover {
        background-color: #da3633;
    }

    .filter-panel .collapsible-content.show {
        max-height: none;
        overflow: visible;
    }
}

/* Hide FV Movement Report in side layout (temporary fix) */
.side-layout .fv-movement-panel {
    display: none !important;
}

/* ===== FV MOVEMENT REPORT STYLES ===== */
.fv-movement-lists {
    display: flex;
    flex-direction: row;
    gap: 8px;
    max-height: 385px;
    overflow-y: auto;
}

.clv-section {
    flex: 1;
    border: 1px solid #30363d;
    border-radius: 4px;
    background-color: #0d1117;
}

.clv-header {
    padding: 6px 8px;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
    border-bottom: 1px solid #30363d;
    text-transform: uppercase;
}

.clv-kings-header {
    background-color: rgba(35, 134, 54, 0.2);
    color: #238636;
}

.clv-cucks-header {
    background-color: rgba(248, 81, 73, 0.2);
    color: #f85149;
}

.clv-list {
    padding: 4px;
    max-height: 235px;
    overflow-y: auto;
}

.clv-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 6px;
    margin: 2px 0;
    border-radius: 3px;
    font-size: 11px;
    line-height: 1.2;
    transition: background-color 0.2s;
}

.clv-item:hover {
    background-color: rgba(88, 166, 255, 0.1);
}

.clv-player {
    font-weight: bold;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.clv-change {
    font-weight: bold;
    font-size: 10px;
    margin-left: 4px;
    white-space: nowrap;
    min-width: 80px;
    text-align: right;
}

.clv-empty {
    color: #6e7681;
    font-size: 11px;
    text-align: center;
    padding: 12px 8px;
    font-style: italic;
}

/* Make FV movement panel match filter panel height
.fv-movement-panel .panel-content,
.filter-panel .panel-content {
    min-height: 300px;
    max-height: 380px;
} */

/* CLV Movement color grading */
.clv-great {
    background-color: rgba(35, 134, 54, 0.15);
    color: #7dd3fc;
}

.clv-good {
    background-color: rgba(35, 134, 54, 0.1);
    color: #8b949e;
}

.clv-okay {
    background-color: rgba(35, 134, 54, 0.05);
    color: #c9d1d9;
}

.clv-bad {
    background-color: rgba(248, 81, 73, 0.05);
    color: #c9d1d9;
}

.clv-worse {
    background-color: rgba(248, 81, 73, 0.1);
    color: #8b949e;
}

.clv-terrible {
    background-color: rgba(248, 81, 73, 0.15);
    color: #ffa657;
}

/* ===== PARLAY CALCULATOR ===== */
.parlay-calculator {
    background-color: #21262d;
    border: 1px solid #30363d;
    border-radius: 4px;
    padding: 8px;
    margin-bottom: 8px;
}

.parlay-list {
    max-height: 120px;
    overflow-y: auto;
    margin-bottom: 8px;
}

.parlay-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 6px;
    background-color: #0d1117;
    border: 1px solid #30363d;
    margin-bottom: 2px;
    font-size: 13px;
}

.parlay-item-remove {
    color: #f85149;
    cursor: pointer;
    padding: 0 4px;
    font-weight: bold;
}

.parlay-item-remove:hover {
    background-color: #f85149;
    color: #0d1117;
}

.parlay-results {
    background-color: #0d1117;
    border: 1px solid #30363d;
    padding: 6px;
    border-radius: 2px;
    font-size: 13px;
    line-height: 1.3;
}

.parlay-buttons {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.parlay-buttons button {
    flex: 1;
    padding: 4px 6px;
    font-size: 11px;
}

/* ===== MODALS AND OVERLAYS ===== */
.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #161b22;
    border: 2px solid #58a6ff;
    padding: 20px;
    z-index: 1000;
    box-shadow: 0 0 20px rgba(88, 166, 255, 0.5);
}

.modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(13, 17, 23, 0.8);
    z-index: 999;
}

.modal h3 {
    color: #58a6ff;
    margin-bottom: 10px;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #161b22;
    border: 1px solid #58a6ff;
    padding: 15px;
    color: #c9d1d9;
    box-shadow: 0 0 10px rgba(88, 166, 255, 0.5);
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s;
}

.toast.show {
    opacity: 1;
}

/* Side layout styles */
.side-layout .tab-content {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: auto auto auto auto auto auto minmax(0, 1fr);
    gap: 8px;
}

.side-layout .main-table-container {
    grid-column: 1;
    grid-row: 1 / -1;
    min-width: 0;
    /* Allow shrinking */
}

.side-layout .controls-panel {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    /* Allow shrinking */
}

.side-layout .filter-panel {
    grid-column: 2;
    grid-row: 3;
    min-width: 0;
    /* Allow shrinking */
}

.side-layout .actions-panel-top {
    grid-column: 2;
    grid-row: 4;
    min-width: 0;
    /* Allow shrinking */
}

.side-layout .tools-panel {
    grid-column: 2;
    grid-row: 5;
    min-width: 0;
    /* Allow shrinking */
}

.side-layout .search-panel {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    /* Allow shrinking */
}

.side-layout .filter-panel .collapsible-content.show {
    max-height: calc(33vh - 100px);
    overflow-y: auto;
}

/* ===== UTILITY SECTIONS ===== */
.section-title {
    color: #8b949e;
    font-size: 13px;
    margin-bottom: 5px;
    text-transform: uppercase;
    border-bottom: 1px solid #30363d;
    padding-bottom: 2px;
}

.info-text {
    color: #6e7681;
    font-size: 12px;
    margin: 5px 0;
    line-height: 1.3;
}

/* ===== LINEUP COLUMN SIZING ===== */
th[data-column="LINEUP"],
td.lineup-column {
    width: 25px !important;
    min-width: 25px !important;
    max-width: 25px !important;
    text-align: center;
}

/* ===== FV COLUMN STYLING ===== */
.fv-column {
    cursor: pointer;
    color: #58a6ff;
}

.fv-column:hover {
    text-decoration: underline;
}

/* Remove blue color from FV column header */
th[data-column="BATX_FV"] {
    color: #c9d1d9 !important;
    cursor: default !important;
}

th[data-column="BATX_FV"]:hover {
    color: #c9d1d9 !important;
    text-decoration: none !important;
}

/* ===== FV HISTORY MODAL STYLING ===== */
.fv-history-modal {
    min-width: 350px;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
}

.fv-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    background-color: #21262d;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 16px;
}

.fv-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.fv-label {
    color: #8b949e;
    font-weight: normal;
}

.fv-value-text {
    color: #c9d1d9;
    font-weight: bold;
}

.fv-history-container {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #30363d;
    border-radius: 4px;
    background-color: #0d1117;
}

.fv-history-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid #21262d;
    transition: background-color 0.2s;
}

.fv-history-row:hover {
    background-color: #21262d;
}

.fv-history-row:last-child {
    border-bottom: none;
}

.fv-time {
    color: #8b949e;
    font-size: 12px;
    font-weight: normal;
}

.fv-value {
    color: #c9d1d9;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
}

.fv-change {
    font-size: 12px;
    font-weight: bold;
}

.fv-increase {
    color: #f85149;
    /* Red for increase (worse for bettors) */
}

.fv-decrease {
    color: #238636;
    /* Green for decrease (better for bettors) */
}

.fv-row-increase {
    background-color: rgba(248, 81, 73, 0.1);
    border-left: 3px solid #f85149;
}

.fv-row-decrease {
    background-color: rgba(35, 134, 54, 0.1);
    border-left: 3px solid #238636;
}

.fv-note {
    background-color: #0d1117;
    border: 1px solid #30363d;
    border-radius: 4px;
    padding: 8px;
    margin: 16px 0;
    text-align: center;
}

.fv-note small {
    color: #8b949e;
    font-size: 11px;
    line-height: 1.3;
}

/* ===== WEATHER MODAL STYLING ===== */
.weather-modal {
    min-width: 700px;
    max-width: 900px;
    max-height: 80vh;
    overflow-y: auto;
}

.weather-subtitle {
    color: #8b949e;
    font-size: 13px;
    margin-bottom: 16px;
    border-bottom: 1px solid #30363d;
    padding-bottom: 8px;
}

.stadium-info {
    color: #58a6ff;
    font-size: 14px;
    margin-bottom: 16px;
    text-align: center;
}

.weather-hours {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Force exactly 4 columns */
    gap: 16px;
    margin: 16px 0;
}

.weather-hour {
    background-color: #21262d;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 16px 12px;
    text-align: center;
    font-size: 12px;
    min-width: 0;
    /* Allow content to shrink */
}

.hour-time {
    font-weight: bold;
    color: #58a6ff;
    margin-bottom: 12px;
    font-size: 14px;
}

.hour-wind-main {
    margin-bottom: 12px;
    padding: 8px 0;
    border: 2px solid #30363d;
    border-radius: 6px;
    background-color: #161b22;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.wind-speed-direction {
    color: #f0f6fc;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    line-height: 1.2;
}

.wind-effect {
    display: flex;
    justify-content: center;
}

.hour-temp {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #c9d1d9;
}

.hour-condition {
    margin-bottom: 8px;
}

.condition-main {
    color: #c9d1d9;
    font-weight: bold;
    margin-bottom: 3px;
    font-size: 13px;
}

.condition-desc {
    color: #8b949e;
    font-size: 10px;
    text-transform: capitalize;
    line-height: 1.2;
}

.hour-humidity {
    color: #8b949e;
    font-size: 12px;
    font-weight: bold;
    margin-top: 4px;
}

.weather-note {
    background-color: #0d1117;
    border: 1px solid #30363d;
    border-radius: 4px;
    padding: 8px;
    margin-top: 16px;
    text-align: center;
}

.weather-note small {
    color: #8b949e;
    font-size: 11px;
}

.loading-weather {
    text-align: center;
    padding: 40px;
    color: #58a6ff;
    font-size: 16px;
}

.weather-error {
    text-align: center;
    padding: 40px;
    color: #f85149;
    font-size: 14px;
}

.weather-error small {
    color: #8b949e;
    font-size: 12px;
}

/* ===== WIND INDICATOR STYLING ===== */
.wind-indicator {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    cursor: help;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.wind-indicator:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.wind-arrow {
    color: white;
    font-size: 20px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.5));
}

/* Update wind section styling */
.hour-wind {
    margin-bottom: 8px;
    padding: 6px 0;
    border-top: 1px solid #30363d;
    border-bottom: 1px solid #30363d;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.wind-main {
    color: #c9d1d9;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
}

.wind-effect {
    display: flex;
    justify-content: center;
}

/* ===== TRACKER ANALYTICS SECTION ===== */
.tracker-analytics {
    grid-column: 1 / -1;
    background-color: #161b22;
    border: 1px solid #30363d;
    margin-top: 16px;
}

.analytics-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.analytics-buttons button {
    background-color: #21262d;
    color: #c9d1d9;
    border: 1px solid #30363d;
    padding: 8px 12px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 4px;
    flex: 1;
    min-width: 140px;
    text-align: center;
}

.analytics-buttons button:hover {
    background-color: #30363d;
    color: #c9d1d9;
}

.analytics-buttons button.active {
    background-color: #58a6ff;
    color: #0d1117;
    font-weight: bold;
}

.brier-score-container {
    background-color: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 16px;
}

.brier-score-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.brier-score-item {
    background-color: #21262d;
    border: 1px solid #30363d;
    border-radius: 4px;
    padding: 12px;
    text-align: center;
}

.brier-score-value {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 4px;
}

.brier-score-label {
    font-size: 12px;
    color: #8b949e;
    margin-bottom: 2px;
}

.brier-score-rating {
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .analytics-buttons {
        flex-direction: column;
    }

    .analytics-buttons button {
        min-width: auto;
        width: 100%;
    }
}

.analytics-header h3 {
    color: #58a6ff;
    margin: 0;
    font-size: 18px;
}

.analytics-content {
    padding: 16px;
}

.chart-section {
    margin-bottom: 32px;
}

.chart-section h4 {
    color: #c9d1d9;
    margin-bottom: 16px;
    font-size: 16px;
    border-bottom: 1px solid #30363d;
    padding-bottom: 8px;
}

.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.charts-grid-large {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.chart-container,
.chart-container-wide {
    background-color: #21262d;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 8px;
}

.chart-container-wide {
    grid-column: 1 / -1;
    margin-bottom: 16px;
}

.chart-container>div,
.chart-container-wide>div {
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-container h5 {
    color: #8b949e;
    margin: 0 0 12px 0;
    font-size: 14px;
    text-align: center;
}

.monte-carlo-stats {
    margin-top: 16px;
    padding: 12px;
    background-color: #161b22;
    border: 1px solid #30363d;
    border-radius: 4px;
    font-size: 13px;
    color: #c9d1d9;
}

.monte-carlo-stats .stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

/* Mobile adjustments */
@media (max-width: 768px) {

    .charts-grid,
    .charts-grid-large {
        grid-template-columns: 1fr;
    }

    .analytics-header {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }

    .analytics-header button {
        width: 100%;
    }
}

/* Mobile weather adjustments */
@media (max-width: 768px) {
    .weather-modal {
        min-width: 95vw;
        max-width: 95vw;
    }

    .weather-hours {
        grid-template-columns: repeat(2, 1fr);
        /* 2x2 grid on mobile */
        gap: 12px;
    }

    .weather-hour {
        padding: 12px 8px;
    }

    .hour-temp {
        font-size: 18px;
    }
}

.game-summary {
    color: #8b949e;
    font-size: 12px;
    text-align: center;
    margin-bottom: 12px;
    padding: 6px 12px;
    background-color: #21262d;
    border-radius: 4px;
    border: 1px solid #30363d;
}

/* Make team cells look clickable */
td:nth-child(4) {
    /* TM column - adjusted for lineup column */
    cursor: pointer !important;
    color: #58a6ff !important;
    transition: all 0.2s;
}

td:nth-child(4):hover {
    text-decoration: underline !important;
    background-color: rgba(88, 166, 255, 0.1) !important;
}

/* Modern, narrow scrollbars for FV movement lists */
.fv-movement-lists::-webkit-scrollbar,
.clv-list::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.fv-movement-lists::-webkit-scrollbar-track,
.clv-list::-webkit-scrollbar-track {
    background: #0d1117;
    border-radius: 3px;
}

.fv-movement-lists::-webkit-scrollbar-thumb,
.clv-list::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 3px;
    transition: background 0.2s;
}

.fv-movement-lists::-webkit-scrollbar-thumb:hover,
.clv-list::-webkit-scrollbar-thumb:hover {
    background: #58a6ff;
}

/* For Firefox */
.fv-movement-lists,
.clv-list {
    scrollbar-width: thin;
    scrollbar-color: #30363d #0d1117;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
    .terminal-header {
        display: grid;
        grid-template-columns: 1fr 2fr 1fr;
        grid-template-rows: auto;
        gap: 4px;
        text-align: center;
        min-height: 50px !important;
        padding: 4px 8px !important;
        align-items: center;
    }

    .modal.fv-history-modal {
        min-width: 95vw !important;
        max-width: 95vw !important;
        width: 95vw !important;
    }

    .header-left,
    .header-right {
        display: flex;
        flex-direction: column;
        justify-content: center;
        font-size: 11px;
    }

    .header-left {
        text-align: left;
    }

    .header-right {
        text-align: right;
    }

    .terminal-title {
        font-size: 24px;
        line-height: 1.2;
    }

    .header-stat-line {
        font-size: 10px !important;
        line-height: 1.2 !important;
        margin: 1px 0;
    }

    .header-left .header-stat-line {
        text-align: left !important;
    }

    .header-right .header-stat-line {
        text-align: right !important;
    }

    .header-center {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Terminal Container Mobile Layout */
    .terminal-container {
        padding: 0;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto auto auto auto 1fr;
        gap: 8px;
        height: 100vh;
        width: 100vw;
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Explicit grid positioning for mobile */
    .terminal-container .terminal-header {
        grid-column: 1 / -1;
        grid-row: 1;
        width: 100% !important;
    }

    .terminal-container .tab-navigation {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100% !important;
    }

    .terminal-container .controls-panel {
        grid-column: 1 / -1;
        grid-row: 3;
        width: 100% !important;
    }

    .terminal-container .filter-panel {
        grid-column: 1 / -1;
        grid-row: 4;
        width: 100% !important;
    }

    .terminal-container .actions-panel-top {
        grid-column: 1 / -1;
        grid-row: 5;
        width: 100% !important;
    }

    .terminal-container .fv-movement-panel {
        grid-column: 1 / -1;
        grid-row: 6;
        width: 100% !important;
    }

    .terminal-container .search-panel {
        grid-column: 1 / -1;
        grid-row: 8;
        width: 100% !important;
    }

    .terminal-container .main-table-container {
        grid-column: 1 / -1;
        grid-row: 9;
        width: 100% !important;
    }

    /* Ensure all elements use full width */
    .terminal-header,
    .tab-navigation,
    .controls-panel,
    .filter-panel,
    .actions-panel-top,
    .main-table-container {
        box-sizing: border-box;
        max-width: none;
        margin: 0;
    }

    .panel-content {
        width: 100%;
    }

    .actions-panel-top .panel-content button {
        width: 100%;
        box-sizing: border-box;
    }

    .controls-panel input,
    .controls-panel select {
        width: 100%;
        box-sizing: border-box;
    }

    .controls-panel .checkbox-group {
        width: 100%;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        margin: 2px 0;
    }

    .controls-panel .checkbox-group input[type="checkbox"] {
        width: auto !important;
        flex-shrink: 0;
        margin-right: 8px;
        margin-left: 0;
    }

    .controls-panel .checkbox-group label {
        flex: 1;
        text-align: left;
        white-space: nowrap;
    }

    .filter-panel .checkbox-group {
        width: 100%;
    }

    .main-table-container #dataTable {
        width: 100%;
        box-sizing: border-box;
    }

    .search-box {
        display: none;
    }

    .header-center,
    .header-stats {
        width: 100%;
        text-align: center;
    }

    .odds-input {
        width: 38px !important;
        max-width: 38px !important;
        min-width: 38px !important;
        font-size: 11px !important;
        padding: 2px !important;
    }

    /* Tighter mobile table columns */
    #dataTable {
        font-size: 11px;
    }

    #dataTable th,
    #dataTable td {
        padding: 2px 4px;
        font-size: 11px;
    }

    /* Specific column widths for mobile */
    #dataTable td:nth-child(1) {
        /* BOOK */
        min-width: 35px;
        max-width: 45px;
        width: 40px;
    }

    #dataTable td:nth-child(2) {
        /* PLAYER */
        min-width: 60px;
        max-width: 80px;
        width: 70px;
    }

    #dataTable td:nth-child(3) {
        /* TM */
        min-width: 30px;
        max-width: 35px;
        width: 32px;
    }

    #dataTable td:nth-child(4) {
        /* ODDS */
        min-width: 40px;
        max-width: 50px;
        width: 45px;
    }

    #dataTable td:nth-child(5) {
        /* BET */
        min-width: 50px;
        max-width: 65px;
        width: 60px;
    }

    #dataTable td:nth-child(6) {
        /* EV% */
        min-width: 35px;
        max-width: 45px;
        width: 40px;
    }

    #dataTable td:nth-child(7) {
        /* FV */
        min-width: 40px;
        max-width: 50px;
        width: 45px;
    }

    #dataTable td:nth-child(8) {
        /* TIME */
        min-width: 40px;
        max-width: 50px;
        width: 45px;
    }

    #dataTable td:nth-child(9) {
        /* FV */
        min-width: 32px !important;
        max-width: 36px !important;
        width: 34px !important;
    }

    #dataTable th:nth-child(9) {
        /* FV header */
        min-width: 32px !important;
        max-width: 36px !important;
        width: 34px !important;
    }

    /* Tighter FV movement lists on mobile */
    .clv-player {
        font-size: 10px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .clv-change {
        font-size: 9px;
        min-width: 70px;
    }

    .clv-item {
        padding: 2px 4px;
        margin: 1px 0;
    }

    /* Search panel mobile */
    .search-panel input {
        width: 100%;
        box-sizing: border-box;
    }

    /* Tab Navigation Mobile */
    .tab-button {
        flex: 1;
        padding: 8px 12px;
        font-size: 14px;
    }

    /* Filter panel mobile */
    .filter-panel .collapsible-content.show {
        max-height: 200px;
        overflow-y: auto;
    }

    .search-focused .terminal-header {
        position: sticky;
        top: 0;
        z-index: 100;
        background-color: #0d1117;
        border-bottom: 2px solid #30363d;
    }

    .search-focused .main-table-container {
        margin-top: 10px;
        max-height: none;
    }

    /* Mobile toggle button adjustments */
    .toggle-grid-container {
        gap: 6px;
        margin-bottom: 8px;
    }

    .toggle-column {
        gap: 4px;
    }

    .toggle-button {
        padding: 6px 8px;
        font-size: 10px;
    }

    .select-buttons-container {
        gap: 6px;
    }

    .select-button {
        padding: 4px 6px;
        font-size: 9px;
    }

    /* Tracker mobile adjustments */
    .tracker-header {
        padding: 12px;
    }

    .tracker-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        margin-bottom: 12px;
        justify-content: center;
        max-width: 100%;
    }

    .stat-card {
        padding: 6px 4px;
        min-width: 0;
        text-align: center;
    }

    .stat-title {
        font-size: 9px !important;
        line-height: 1.1;
        margin-bottom: 2px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .stat-value {
        font-size: 16px;
    }

    .tracker-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .tracker-controls input[type="text"]:first-child {
        width: 100%;
        margin-bottom: 8px;
    }

    .tracker-dropdowns {
        flex-direction: column;
        gap: 8px;
    }

    .tracker-dropdowns select {
        min-width: auto;
        width: 100%;
    }

    .tracker-inputs {
        flex-direction: column;
        gap: 8px;
    }

    .tracker-inputs input {
        min-width: auto;
        width: 100%;
    }

    .tracker-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .tracker-buttons button {
        min-width: auto;
        width: 100%;
    }

    .tracker-table-container {
        overflow-x: auto;
    }

    #trackerTable {
        font-size: 11px;
        min-width: 900px;
    }

    #trackerTable th,
    #trackerTable td {
        padding: 4px;
    }

    /* Mobile pagination adjustments */
    .tracker-pagination-top {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }

    .pagination-info {
        text-align: center;
        font-size: 12px;
    }

    .pagination-controls {
        text-align: center;
    }

    .pagination-controls select {
        width: 100%;
        max-width: 200px;
    }

    .pagination-nav {
        gap: 12px;
    }

    .pagination-nav button {
        flex: 1;
        max-width: 80px;
    }

    /* ===== ADDITIONAL CHART CONTAINERS ===== */
    .chart-container-tall {
        background-color: #21262d;
        border: 1px solid #30363d;
        border-radius: 6px;
        padding: 8px;
        height: 600px;
        /* Taller for rankings */
    }

    .chart-container-tall h5 {
        color: #8b949e;
        margin: 0 0 12px 0;
        font-size: 14px;
        text-align: center;
    }
}