body {
    background: #1a1a2e;
    color: #e0e0e0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.navbar {
    background: #16213e !important;
    border-bottom: 2px solid #e94560;
    padding: 8px 16px;
}

.navbar-brand {
    color: #e94560 !important;
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: 1px;
}

/* Tab bar — scrolls horizontally on overflow without dragging the whole
   page sideways. flex-wrap: nowrap keeps tabs on one row, overflow-x: auto
   makes only the bar scroll, and overflow-x: hidden on body/container
   prevents the rest of the page from being draggable too. */
.tab-bar {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    margin-bottom: 12px;
    border-bottom: 2px solid #333;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}
.tab-bar::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* Prevent the page itself from scrolling horizontally on small screens. */
body, .container-fluid {
    overflow-x: hidden;
}

.btn-tab {
    padding: 8px 28px;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: transparent;
    color: #666;
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    transition: all 0.15s;
    margin-bottom: -2px;
    flex-shrink: 0; /* tabs keep their width; the bar scrolls instead */
    white-space: nowrap; /* don't wrap "Today's BANG" onto two lines */
}

.btn-tab:hover {
    color: #e0e0e0;
    background: rgba(233, 69, 96, 0.05);
}

.btn-tab.active {
    color: #e94560;
    border-bottom-color: #e94560;
}

/* Controls bar */
.controls-bar {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.form-select, .form-control {
    background: #16213e;
    color: #e0e0e0;
    border-color: #333;
}

.form-select:focus, .form-control:focus {
    background: #16213e;
    color: #e0e0e0;
    border-color: #e94560;
    box-shadow: 0 0 0 0.2rem rgba(233, 69, 96, 0.25);
}

.form-label {
    color: #666;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0;
}

/* Mode toggle */
.mode-toggle {
    display: flex;
}

.btn-mode {
    padding: 6px 24px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid #333;
    background: #16213e;
    color: #666;
    transition: all 0.15s;
}

.btn-mode:first-child {
    border-radius: 5px 0 0 5px;
}

.btn-mode:nth-child(2) {
    border-radius: 0 5px 5px 0;
    border-left: none;
}

.btn-mode:hover {
    color: #e0e0e0;
    background: #1f2b47;
}

.btn-mode.active {
    background: #e94560;
    border-color: #e94560;
    color: #fff;
}

.btn-primary {
    background: #e94560;
    border-color: #e94560;
}

.btn-primary:hover {
    background: #c73650;
    border-color: #c73650;
}

/* Table */
.table {
    color: #e0e0e0;
    font-size: 0.82rem;
    margin-bottom: 0;
}

.table-dark, .table thead {
    --bs-table-bg: #16213e;
    --bs-table-color: #e0e0e0;
}

.table thead th {
    background: #16213e;
    color: #aaa;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 2px solid #333;
    white-space: nowrap;
    padding: 8px 10px;
    position: sticky;
    top: 0;
    z-index: 1;
}

.table tbody tr {
    border-bottom: 1px solid #222;
}

.table tbody tr:nth-child(odd) {
    background: rgba(22, 33, 62, 0.4);
}

.table tbody tr:nth-child(even) {
    background: rgba(26, 26, 46, 0.6);
}

.table tbody tr:hover {
    background: rgba(233, 69, 96, 0.1) !important;
    cursor: pointer;
}

.table td {
    padding: 6px 10px;
    vertical-align: middle;
    white-space: nowrap;
}

/* Sortable headers */
.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 16px !important;
}

.sortable::after {
    content: "\2195";
    position: absolute;
    right: 2px;
    opacity: 0.3;
    font-size: 0.65rem;
}

.sortable.sort-asc::after {
    content: "\2191";
    opacity: 1;
}

.sortable.sort-desc::after {
    content: "\2193";
    opacity: 1;
}

/* +/- cells: conditional background colors */
.pct-cell {
    font-weight: 700;
    font-size: 0.8rem;
    text-align: center;
    border-radius: 3px;
    padding: 3px 8px !important;
}

/* Green gradient for positive (hitter mode: higher = better) */
.pct-hot-1 { background: rgba(76, 175, 80, 0.15); color: #66bb6a; }
.pct-hot-2 { background: rgba(76, 175, 80, 0.25); color: #4caf50; }
.pct-hot-3 { background: rgba(76, 175, 80, 0.40); color: #43a047; }
.pct-hot-4 { background: rgba(76, 175, 80, 0.55); color: #fff; }
.pct-hot-5 { background: rgba(76, 175, 80, 0.75); color: #fff; }

/* Red gradient for negative */
.pct-cold-1 { background: rgba(233, 69, 96, 0.12); color: #e57373; }
.pct-cold-2 { background: rgba(233, 69, 96, 0.22); color: #ef5350; }
.pct-cold-3 { background: rgba(233, 69, 96, 0.35); color: #e53935; }
.pct-cold-4 { background: rgba(233, 69, 96, 0.50); color: #fff; }
.pct-cold-5 { background: rgba(233, 69, 96, 0.70); color: #fff; }

.pct-neutral { color: #666; }

/* K% coloring */
.k-pct-cell {
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
}

.k-pct-bad { color: #e53935; }
.k-pct-high { color: #ef9a9a; }
.k-pct-good { color: #66bb6a; }

/* Matchup column in grids */
.matchup-col {
    font-size: 0.65rem !important;
    text-transform: uppercase;
    color: #888 !important;
    text-align: center;
    width: 55px;
}

.matchup-cell {
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    color: #666;
}

.matchup-home {
    color: #4fc3f7;
}

.matchup-away {
    color: #aaa;
}

/* Player modal matchup box */
.player-matchup-box {
    background: rgba(22, 33, 62, 0.6);
    border: 1px solid #333;
    border-left: 3px solid #e94560;
    border-radius: 0 6px 6px 0;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.matchup-pitcher-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}

.matchup-pitcher-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.matchup-pitcher-info .pitcher-name {
    font-size: 1rem;
}

.matchup-pitcher-info .pitcher-throws {
    font-size: 0.8rem;
}

.matchup-pitcher-info .pitcher-bang {
    font-size: 0.85rem;
    padding: 1px 6px;
}

.worse-vs-tag {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
}

.worse-vs-favorable {
    color: #66bb6a;
    background: rgba(76, 175, 80, 0.15);
}

.worse-vs-neutral {
    color: #ffa726;
    background: rgba(255, 167, 38, 0.12);
}

/* Separator column between main stat and other stats */
.col-sep {
    border-left: 2px solid #444 !important;
}

/* Player name column */
.player-link {
    color: #4fc3f7;
    text-decoration: none;
    font-weight: 500;
}

.player-link:hover {
    color: #e94560;
    text-decoration: underline;
}

.badge-team {
    background: rgba(79, 195, 247, 0.12);
    color: #4fc3f7;
    font-size: 0.6rem;
    padding: 1px 4px;
    border-radius: 3px;
    margin-left: 4px;
}

.fire-tag, .ice-tag {
    margin-left: 3px;
}

/* Stat value styling */
.stat-val {
    font-variant-numeric: tabular-nums;
}

.season-avg-val {
    color: #999;
    font-variant-numeric: tabular-nums;
}

/* Other stats (dimmer) */
.other-stat {
    color: #777;
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
}

.other-stat-head {
    color: #555 !important;
}

/* Modal */
.modal-content {
    background: #1a1a2e;
    border: 1px solid #333;
}

.modal-header {
    border-bottom-color: #333;
}

.modal-title {
    color: #e94560;
}

.btn-close {
    filter: invert(1);
}

#ingestStatus .alert {
    margin-bottom: 0;
}

/* Rank column */
.rank-col {
    color: #555;
    font-size: 0.75rem;
    width: 30px;
}

/* Player search */
.search-group {
    margin-left: auto;
}

.player-search-wrap {
    position: relative;
    min-width: 200px;
}

/* Search clear button */
.search-clear {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #888;
    font-size: 1.1rem;
    line-height: 1;
    padding: 2px 6px;
    cursor: pointer;
    z-index: 2;
}

.search-clear:hover {
    color: #e94560;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #16213e;
    border: 1px solid #333;
    border-top: none;
    border-radius: 0 0 5px 5px;
    max-height: 320px;
    overflow-y: auto;
    z-index: 1050;
}

.search-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.85rem;
    border-bottom: 1px solid #222;
}

.search-item:hover {
    background: rgba(233, 69, 96, 0.15);
}

.search-item:last-child {
    border-bottom: none;
}

/* =============================================
   Matchups Tab
   ============================================= */

.matchups-header {
    margin-bottom: 16px;
}

.matchups-date {
    font-size: 0.85rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.matchups-explainer {
    font-size: 0.78rem;
    color: #666;
    padding: 8px 12px;
    background: rgba(22, 33, 62, 0.6);
    border-left: 3px solid #e94560;
    border-radius: 0 4px 4px 0;
    margin-bottom: 8px;
}

.matchups-explainer strong {
    color: #e94560;
}

.game-card {
    background: #16213e;
    border: 1px solid #333;
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
}

.game-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(233, 69, 96, 0.08);
    border-bottom: 1px solid #333;
}

.game-teams {
    display: flex;
    align-items: center;
    gap: 6px;
}

.team-abbrev {
    font-weight: 700;
    font-size: 1.05rem;
    color: #e0e0e0;
}

.team-record {
    font-size: 0.75rem;
    color: #666;
}

.at-symbol {
    color: #555;
    margin: 0 4px;
    font-size: 0.85rem;
}

.game-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.78rem;
    color: #888;
}

.game-status-badge {
    background: rgba(233, 69, 96, 0.2);
    color: #e94560;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
}

.game-pitchers {
    padding: 0;
}

.pitcher-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid #2a2a4a;
}

.pitcher-row:last-child {
    border-bottom: none;
}

.pitcher-row:hover {
    background: rgba(233, 69, 96, 0.06);
}

.pitcher-main {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pitcher-team-tag {
    background: rgba(79, 195, 247, 0.12);
    color: #4fc3f7;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    min-width: 28px;
    text-align: center;
}

.pitcher-name {
    font-weight: 600;
    color: #4fc3f7;
    font-size: 0.9rem;
}

.pitcher-throws {
    color: #666;
    font-size: 0.75rem;
}

.pitcher-bang-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pitcher-bang {
    font-weight: 700;
    font-size: 1rem;
    padding: 2px 8px;
    border-radius: 4px;
}

.pitcher-bang-label {
    font-size: 0.65rem;
    color: #666;
    text-transform: uppercase;
}

.pitcher-rank {
    font-size: 0.72rem;
    color: #888;
}

/* BANG color coding — bettor perspective: higher = more hittable = GREEN */
.bang-bet-green {
    color: #66bb6a;
    background: rgba(76, 175, 80, 0.2);
}

.bang-bet-mid {
    color: #ffa726;
    background: rgba(255, 167, 38, 0.15);
}

.bang-bet-red {
    color: #ef5350;
    background: rgba(233, 69, 96, 0.2);
}

/* Legacy aliases (keep for any remaining references) */
.bang-high { color: #66bb6a; background: rgba(76, 175, 80, 0.2); }
.bang-mid  { color: #ffa726; background: rgba(255, 167, 38, 0.15); }
.bang-low  { color: #ef5350; background: rgba(233, 69, 96, 0.2); }

.expand-arrow {
    color: #555;
    font-size: 0.7rem;
    transition: transform 0.2s;
}

/* Pitcher Detail Expanded */
.pitcher-detail {
    border-top: 1px solid #2a2a4a;
    background: rgba(26, 26, 46, 0.6);
}

.pitcher-detail-inner {
    padding: 16px;
}

.detail-section {
    margin-bottom: 16px;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.detail-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #e94560;
    margin-bottom: 8px;
}

.detail-stats-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.detail-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.detail-stat-val {
    font-weight: 700;
    font-size: 1.1rem;
    color: #e0e0e0;
}

.detail-stat-label {
    font-size: 0.65rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Splits table */
.splits-table {
    font-size: 0.8rem !important;
    margin-bottom: 0;
}

.splits-table th {
    font-size: 0.65rem !important;
    text-transform: uppercase;
    color: #888 !important;
    border-bottom: 1px solid #333 !important;
    padding: 4px 8px !important;
}

.splits-table td {
    padding: 4px 8px !important;
    border-bottom: 1px solid #2a2a4a !important;
}

/* OPS from bettor perspective: high OPS = hittable = GREEN */
.ops-high {
    color: #66bb6a !important;
    font-weight: 700;
}

.ops-low {
    color: #ef5350 !important;
    font-weight: 700;
}

/* Matchup table */
.matchup-table {
    font-size: 0.8rem !important;
    margin-bottom: 0;
}

.matchup-table th {
    font-size: 0.65rem !important;
    text-transform: uppercase;
    color: #888 !important;
    border-bottom: 1px solid #333 !important;
    padding: 4px 8px !important;
}

.matchup-table td {
    padding: 4px 8px !important;
    border-bottom: 1px solid #2a2a4a !important;
}

.matchup-hr-row {
    background: rgba(233, 69, 96, 0.08) !important;
}

.hr-badge {
    background: #e94560;
    color: #fff;
    font-weight: 700;
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 3px;
}

.pitcher-rank-unranked {
    font-style: italic;
    color: #666;
}

.detail-note {
    font-size: 0.72rem;
    color: #666;
    margin-bottom: 8px;
    font-style: italic;
}

/* Pagination */
.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-top: 1px solid #333;
    margin-top: 4px;
}

.page-info {
    font-size: 0.78rem;
    color: #888;
}

.page-buttons {
    display: flex;
    gap: 4px;
}

.btn-page {
    background: #16213e;
    color: #aaa;
    border: 1px solid #333;
    font-size: 0.78rem;
    padding: 4px 10px;
    border-radius: 4px;
    transition: all 0.15s;
}

.btn-page:hover {
    background: #1f2b47;
    color: #e0e0e0;
    border-color: #555;
}

.btn-page.active {
    background: #e94560;
    color: #fff;
    border-color: #e94560;
}

/* =============================================
   HR Odds Tab
   ============================================= */

.odds-header {
    margin-bottom: 12px;
}

.odds-explainer {
    font-size: 0.78rem;
    color: #666;
    padding: 8px 12px;
    background: rgba(22, 33, 62, 0.6);
    border-left: 3px solid #e94560;
    border-radius: 0 4px 4px 0;
    margin-bottom: 8px;
}

.odds-explainer strong {
    color: #e94560;
}

/* Picks/All Edges view switcher (pills) */
.odds-view-switch {
    display: inline-flex;
    background: #0f1626;
    border: 1px solid #2a3659;
    border-radius: 999px;
    padding: 3px;
    gap: 2px;
    margin-bottom: 8px;
}
.odds-view-switch button {
    background: transparent;
    border: none;
    color: #aab;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.odds-view-switch button:hover {
    color: #fff;
}
.odds-view-switch button.active {
    background: #e94560;
    color: #fff;
    box-shadow: 0 2px 6px rgba(233, 69, 96, 0.35);
}
.odds-view-switch .pick-count {
    opacity: 0.75;
    font-weight: 500;
    margin-left: 4px;
}

.picks-empty {
    padding: 32px 20px;
    text-align: center;
    color: #8892b0;
    background: rgba(22, 33, 62, 0.4);
    border-radius: 6px;
    margin: 8px 0;
}
.picks-empty strong {
    color: #e94560;
    display: block;
    margin-bottom: 4px;
}

.odds-meta {
    font-size: 0.72rem;
    margin-bottom: 4px;
}

.odds-table {
    font-size: 0.82rem !important;
}

.odds-table thead th {
    background: #16213e;
    color: #aaa;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 2px solid #333;
    white-space: nowrap;
    padding: 8px 10px;
    position: sticky;
    top: 0;
    z-index: 1;
}

.odds-sortable {
    cursor: pointer;
    user-select: none;
}

.odds-sortable:hover {
    color: #e0e0e0 !important;
}

.odds-table tbody tr {
    border-bottom: 1px solid #222;
}

.odds-table tbody tr:nth-child(odd) {
    background: rgba(22, 33, 62, 0.4);
}

.odds-table tbody tr:nth-child(even) {
    background: rgba(26, 26, 46, 0.6);
}

.odds-table tbody tr:hover {
    background: rgba(233, 69, 96, 0.1) !important;
}

.odds-table td {
    padding: 6px 10px;
    vertical-align: middle;
    white-space: nowrap;
}

.odds-best {
    font-size: 0.9rem;
}

.odds-short {
    color: #66bb6a !important;
}

.odds-mid {
    color: #ffa726 !important;
}

.odds-long {
    color: #888 !important;
}

.odds-implied {
    font-size: 0.78rem;
    color: #aaa;
}

.odds-game-cell {
    font-size: 0.72rem;
    color: #888;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.book-col {
    font-size: 0.6rem !important;
    text-align: center;
    min-width: 65px;
}

.book-cell {
    text-align: center;
    font-size: 0.78rem;
    color: #777;
    font-variant-numeric: tabular-nums;
}

.book-best {
    color: #66bb6a !important;
    font-weight: 700;
}

/* HeatRadar Score */
.hr-score-cell {
    text-align: center;
    font-size: 0.9rem;
    border-radius: 4px;
    min-width: 50px;
}

.hr-score-hot {
    color: #fff !important;
    background: rgba(76, 175, 80, 0.55) !important;
}

.hr-score-warm {
    color: #66bb6a !important;
    background: rgba(76, 175, 80, 0.2) !important;
}

.hr-score-mid {
    color: #ffa726 !important;
    background: rgba(255, 167, 38, 0.12) !important;
}

.hr-score-cold {
    color: #777 !important;
}

/* Edge badges */
.edge-badge {
    font-size: 0.55rem;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 2px;
    margin-left: 4px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.edge-platoon {
    color: #66bb6a;
    background: rgba(76, 175, 80, 0.15);
}

.edge-history {
    color: #e94560;
    background: rgba(233, 69, 96, 0.15);
}

.edge-hot-ev {
    color: #ffb74d;
    background: rgba(255, 152, 0, 0.18);
}

.edge-tbd {
    color: #b39ddb;
    background: rgba(149, 117, 205, 0.18);
}

/* Our Odds & Edge columns */
.our-odds-cell {
    text-align: center;
    font-size: 0.85rem;
    color: #4fc3f7;
}

.edge-cell {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
}

.edge-great {
    color: #fff !important;
    background: rgba(76, 175, 80, 0.45) !important;
}

.edge-good {
    color: #66bb6a !important;
}

.edge-bad {
    color: #ef5350 !important;
}

/* Weather cells */
/* Odds filter controls */
.odds-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.odds-filter-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.odds-filter-group label {
    font-size: 0.8rem;
    color: #aaa;
    margin: 0;
    white-space: nowrap;
}
.odds-filter-input {
    width: 80px;
    padding: 3px 6px;
    font-size: 0.8rem;
    background: #1a1a2e;
    border: 1px solid #444;
    border-radius: 4px;
    color: #e0e0e0;
}
.odds-filter-input::placeholder {
    color: #666;
}

.weather-cell {
    font-size: 0.78rem;
    white-space: nowrap;
    min-width: 110px;
}
.weather-info { display: inline-flex; align-items: center; gap: 4px; }
.weather-hot { color: #ef5350; font-weight: 600; }
.weather-nice { color: #66bb6a; font-weight: 600; }
.weather-cool { color: #42a5f5; font-weight: 600; }
.weather-cold { color: #90caf9; font-weight: 600; }
.weather-dome { color: #bbb; font-style: italic; }
.weather-retractable { font-size: 0.7rem; }
.weather-rain { color: #42a5f5; font-size: 0.75rem; }
.weather-boost { color: #66bb6a; font-weight: 600; font-size: 0.75rem; }
.weather-nerf { color: #ef5350; font-weight: 600; font-size: 0.75rem; }
.weather-neutral { color: #aaa; font-size: 0.75rem; }

/* Weather in player detail matchup */
.matchup-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.matchup-weather {
    font-size: 0.82rem;
    color: #bbb;
}
/* BANG trend arrows */
.bang-trend-up {
    font-size: 0.65rem;
    font-weight: 700;
    color: #4caf50;
    vertical-align: super;
}
.bang-trend-down {
    font-size: 0.65rem;
    font-weight: 700;
    color: #ef5350;
    vertical-align: super;
}

/* Platoon Splits */
.platoon-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 8px;
}
.platoon-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
}
.platoon-header {
    background: rgba(255, 255, 255, 0.08);
    padding: 6px 12px;
    font-weight: 700;
    font-size: 0.85rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.platoon-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}
.platoon-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}
.platoon-stat:nth-child(3n) { border-right: none; }
.platoon-stat:nth-last-child(-n+3) { border-bottom: none; }
.platoon-label {
    font-size: 0.65rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}
.platoon-value {
    font-size: 1.05rem;
    font-weight: 700;
}
.platoon-better { color: #4caf50; }
.platoon-worse { color: #ef5350; }
.ops-hot { color: #ff6b6b; }
.ops-warm { color: #ffa726; }

.lineup-info {
    font-size: 0.75rem;
    font-weight: 600;
    color: #8ab4f8;
    background: rgba(138, 180, 248, 0.12);
    padding: 2px 7px;
    border-radius: 4px;
    white-space: nowrap;
}
.lineup-badge {
    font-size: 0.70rem;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 3px;
    white-space: nowrap;
    cursor: default;
}
.lineup-confirmed {
    color: #4caf82;
    background: rgba(76, 175, 130, 0.15);
    border: 1px solid rgba(76, 175, 130, 0.3);
}
.lineup-estimated {
    color: #aaa;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
}
.weather-detail {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

/* Pitcher Opponent Stats */
.pitcher-opp-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 8px 0;
    font-size: 0.82rem;
}

.pitcher-opp-stats span {
    white-space: nowrap;
}

/* Team Stats Table */
#teamsTable {
    font-size: 0.82rem !important;
}

#teamsTable thead th {
    background: #16213e;
    color: #aaa;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 2px solid #333;
    white-space: nowrap;
    padding: 8px 10px;
}

#teamsTable td {
    padding: 6px 10px;
    vertical-align: middle;
    border-bottom: 1px solid #2a2a4a;
}

#teamsTable tr:hover {
    background: rgba(233, 69, 96, 0.06);
}

#teamRosterTable {
    font-size: 0.82rem !important;
}

#teamRosterTable thead th {
    background: #16213e;
    color: #aaa;
    font-size: 0.7rem;
    text-transform: uppercase;
    border-bottom: 2px solid #333;
    padding: 6px 10px;
}

#teamRosterTable td {
    padding: 5px 10px;
    border-bottom: 1px solid #2a2a4a;
}

.team-sortable {
    cursor: pointer;
}

/* Player Matchups Tab */
.pm-controls {
    padding: 8px 0;
}

.pm-sortable {
    cursor: pointer;
    user-select: none;
}

.pm-sortable:hover {
    color: #e0e0e0 !important;
}

#pmTable {
    font-size: 0.82rem !important;
}

#pmTable thead th {
    background: #16213e;
    color: #aaa;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 2px solid #333;
    white-space: nowrap;
    padding: 8px 10px;
    position: sticky;
    top: 0;
    z-index: 1;
}

#pmTable td {
    padding: 6px 10px;
    vertical-align: middle;
    border-bottom: 1px solid #2a2a4a;
}

/* Platoon toggle switch styling */
.form-check-input:checked {
    background-color: #e94560;
    border-color: #e94560;
}

.form-check-input {
    background-color: #333;
    border-color: #555;
    cursor: pointer;
}

/* =============================================
   Fantasy Projections Tab
   ============================================= */

.fantasy-step { max-width: none; width: 100%; }

.fantasy-setup-card {
    background: #16213e;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 24px;
}

.fantasy-title {
    color: #e94560;
    font-weight: 700;
    font-size: 1.1rem;
}

.fantasy-subtitle {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.fantasy-saved-banner {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 6px;
    padding: 10px 16px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    color: #66bb6a;
}

.fantasy-type-picker {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.fantasy-type-card {
    background: rgba(26, 26, 46, 0.6);
    border: 2px solid #333;
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.fantasy-type-card:hover {
    border-color: #e94560;
    background: rgba(233, 69, 96, 0.06);
    transform: translateY(-2px);
}

.fantasy-type-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.fantasy-type-name {
    font-weight: 700;
    font-size: 1rem;
    color: #e0e0e0;
    margin-bottom: 4px;
}

.fantasy-type-desc {
    font-size: 0.78rem;
    color: #888;
}

/* Scoring grid */
.fantasy-scoring-grid {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 8px;
}

.fantasy-section-label {
    color: #e94560;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    margin-top: 4px;
    padding-bottom: 4px;
    border-bottom: 1px solid #333;
}

.fantasy-stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.fantasy-stat-row label {
    font-size: 0.85rem;
    color: #ccc;
    margin: 0;
}

.fantasy-stat-row input {
    width: 80px;
    background: #1a1a2e;
    border: 1px solid #444;
    border-radius: 4px;
    color: #e0e0e0;
    padding: 4px 8px;
    font-size: 0.85rem;
    text-align: center;
}

.fantasy-stat-row input:focus {
    border-color: #e94560;
    outline: none;
    box-shadow: 0 0 0 2px rgba(233, 69, 96, 0.2);
}

/* Categories checkboxes */
.fantasy-categories-grid {
    max-height: 500px;
    overflow-y: auto;
}

.fantasy-cat-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    font-size: 0.85rem;
    color: #ccc;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.fantasy-cat-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

/* League badge */
.fantasy-league-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fantasy-league-badge.points {
    background: rgba(79, 195, 247, 0.15);
    color: #4fc3f7;
}

.fantasy-league-badge.categories {
    background: rgba(255, 167, 38, 0.15);
    color: #ffa726;
}

/* Date bar */
.fantasy-date-bar {
    padding: 6px 0;
}

.fantasy-date-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #e0e0e0;
    min-width: 200px;
    text-align: center;
}

/* Player chips */
.fantasy-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.fantasy-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(79, 195, 247, 0.12);
    border: 1px solid rgba(79, 195, 247, 0.3);
    border-radius: 16px;
    padding: 4px 10px 4px 12px;
    font-size: 0.82rem;
    color: #4fc3f7;
}

.fantasy-chip .chip-team {
    font-size: 0.65rem;
    color: #888;
}

.fantasy-chip .chip-remove {
    background: none;
    border: none;
    color: #888;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
}

.fantasy-chip .chip-remove:hover {
    color: #e94560;
}

/* Projection results */
.fantasy-proj-table {
    font-size: 0.78rem !important;
    margin-top: 8px;
    width: 100%;
    table-layout: auto;
}

.fantasy-proj-table thead th {
    background: #16213e;
    color: #aaa;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 2px solid #333;
    padding: 6px 6px;
    position: sticky;
    top: 0;
    white-space: nowrap;
}

.fantasy-proj-table td {
    padding: 4px 6px;
    vertical-align: middle;
    border-bottom: 1px solid #2a2a4a;
    white-space: nowrap;
}

.fantasy-proj-table tbody tr:nth-child(odd) {
    background: rgba(22, 33, 62, 0.4);
}

.fantasy-proj-table tbody tr:nth-child(even) {
    background: rgba(26, 26, 46, 0.6);
}

.fantasy-rank-1 {
    background: rgba(76, 175, 80, 0.15) !important;
}

.fantasy-rank-cell {
    font-weight: 700;
    color: #66bb6a;
    text-align: center;
    width: 35px;
}

.fantasy-pts-cell {
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
}

.fantasy-pts-high { color: #66bb6a; }
.fantasy-pts-mid { color: #ffa726; }
.fantasy-pts-low { color: #888; }

/* Weekly matchup sub-rows */
.fantasy-weekly-detail {
    background: rgba(26, 26, 46, 0.8);
    border-left: 3px solid #e94560;
    margin: 0 8px 8px 8px;
    border-radius: 0 6px 6px 0;
    padding: 8px 12px;
}

.fantasy-weekly-games {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.fantasy-game-chip {
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.06);
    border: 1px solid #333;
    color: #aaa;
    white-space: nowrap;
}

.fantasy-game-chip.home {
    color: #4fc3f7;
    border-color: rgba(79, 195, 247, 0.3);
}

.fantasy-game-chip.away {
    color: #ccc;
}

.fantasy-games-count {
    font-size: 0.78rem;
    font-weight: 600;
    color: #e94560;
    white-space: nowrap;
}

/* Fantasy: Separate hitter/pitcher group sections */
.fantasy-group-section {
    background: #1a1a2e;
    border: 1px solid #252540;
    border-radius: 10px;
    padding: 12px 16px;
}

.fantasy-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.fantasy-group-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #e0e0e0;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fantasy-player-count {
    font-size: 0.75rem;
    color: #888;
    font-weight: 500;
    white-space: nowrap;
}

/* Pitcher chip variant */
.fantasy-chip.pitcher {
    border-color: #5c6bc0;
    background: rgba(92, 107, 192, 0.15);
}

/* BANG cell in projection table */
.bang-cell {
    font-weight: 600;
    font-size: 0.82rem;
    white-space: nowrap;
}

/* PLTN platoon sticker badges */
.pltn-badge {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 5px;
    vertical-align: middle;
    letter-spacing: 0.3px;
}

.pltn-badge.advantage {
    background: rgba(76, 175, 80, 0.25);
    color: #66bb6a;
    border: 1px solid rgba(76, 175, 80, 0.4);
}

.pltn-badge.disadvantage {
    background: rgba(233, 69, 96, 0.2);
    color: #ef5350;
    border: 1px solid rgba(233, 69, 96, 0.35);
}

/* Weekly breakdown rows */
.fantasy-breakdown-row td {
    border-top: none !important;
}

/* =====================================================================
   Yesterday's Stats tab
   ===================================================================== */

.yesterday-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.yesterday-title {
    margin: 0;
    color: #f4f4f4;
    font-weight: 600;
}

.yesterday-title .text-muted {
    font-size: 0.85rem;
    font-weight: 400;
    margin-left: 6px;
}

.yesterday-controls {
    display: flex;
    align-items: center;
}

.yesterday-controls .form-control {
    background: #1a1d24;
    border: 1px solid #2a2e36;
    color: #ddd;
    color-scheme: dark;
}

.yesterday-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 1100px) {
    .yesterday-grid {
        grid-template-columns: 1fr;
    }
}

.yd-card {
    background: #1a1d24;
    border: 1px solid #2a2e36;
    border-radius: 8px;
    padding: 14px 12px 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.yd-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 8px;
}

.yd-card-title {
    color: #f4f4f4;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
}

.yd-card-sub {
    color: #8a8f99;
    font-size: 0.72rem;
    margin-top: 2px;
}

.yd-expand-btn {
    font-size: 0.72rem;
    padding: 3px 8px;
    white-space: nowrap;
}

.yd-card-foot {
    display: flex;
    justify-content: center;
    padding: 8px 0 4px;
    border-top: 1px solid #22252c;
    margin-top: 6px;
}

.yd-table {
    margin-bottom: 0;
    font-size: 0.85rem;
    --bs-table-bg: transparent;
    --bs-table-color: #ddd;
    --bs-table-border-color: #22252c;
    --bs-table-striped-bg: transparent;
    --bs-table-hover-bg: rgba(255, 255, 255, 0.03);
    --bs-table-hover-color: #ddd;
    background: transparent !important;
    color: #ddd;
}

.yd-table > :not(caption) > * > * {
    background-color: transparent !important;
    box-shadow: none !important;
}

.yd-table thead th {
    background: #15171c !important;
    color: #8a8f99;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    border-bottom: 1px solid #2a2e36;
    padding: 6px 8px;
}

.yd-table tbody td {
    color: #ddd;
    padding: 6px 8px;
    vertical-align: middle;
    border-color: #22252c;
}

.yd-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.yd-table .rank-col {
    color: #6c7280;
    font-weight: 500;
    width: 28px;
    font-size: 0.8rem;
}

.yd-table .yd-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.yd-table tbody td.yd-num strong {
    color: #ffffff;
    font-weight: 700;
}

.yd-table tbody td.yd-num-secondary {
    color: #ddd;
    font-weight: 400;
}

.yd-team {
    font-size: 0.7rem;
    margin-left: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.yd-row-hr {
    background: rgba(76, 175, 80, 0.06);
}

.yd-row-hr:hover {
    background: rgba(76, 175, 80, 0.12) !important;
}

.yd-hr-tag {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 6px;
    background: rgba(76, 175, 80, 0.25);
    color: #66bb6a;
    border: 1px solid rgba(76, 175, 80, 0.4);
    letter-spacing: 0.4px;
    vertical-align: middle;
}

/* HR-odds badge — used in the player-detail modal header and any other
   hitter context where a small inline odds chip makes sense. Color tier
   matches the Player Matchups table (.odds-short/.odds-mid/.odds-long)
   so users get a consistent visual scale across the app. */
.hr-odds-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
    color: #ddd;
    line-height: 1.4;
}
.hr-odds-badge.odds-short { color: #66bb6a; border-color: rgba(76, 175, 80, 0.45); background: rgba(76, 175, 80, 0.12); }
.hr-odds-badge.odds-mid   { color: #ffa726; border-color: rgba(255, 167, 38, 0.45); background: rgba(255, 167, 38, 0.10); }
.hr-odds-badge.odds-long  { color: #aaa;    border-color: rgba(160, 160, 160, 0.35); background: rgba(160, 160, 160, 0.08); }
.hr-odds-badge .pick-star {
    color: #ffd54f;
    font-size: 0.85rem;
}
.hr-odds-badge .book-tag {
    font-size: 0.62rem;
    font-weight: 600;
    color: #999;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
