        * { margin: 0; padding: 0; box-sizing: border-box; }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: #f0f2f5;
            color: #1a1a1a;
            min-height: 100vh;
        }

        .header {
            background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
            padding: 15px 25px;
            color: white;
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }

        .header h1 { font-size: 22px; font-weight: 700; }
        .header-stats { display: flex; gap: 20px; font-size: 14px; }
        .header-stats span { background: rgba(255,255,255,0.2); padding: 5px 12px; border-radius: 20px; }

        .controls {
            background: white;
            padding: 12px 20px;
            border-bottom: 1px solid #e2e8f0;
            display: flex;
            gap: 15px;
            align-items: center;
            flex-wrap: wrap;
            position: sticky;
            top: 0;
            z-index: 100;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

        /* Unified Search Box */
        .unified-search-container {
            position: relative;
            min-width: 350px;
        }

        .unified-search-input {
            width: 100%;
            padding: 10px 40px 10px 14px;
            border: 2px solid #e2e8f0;
            border-radius: 8px;
            font-size: 14px;
            transition: all 0.3s;
        }

        .unified-search-input:focus {
            outline: none;
            border-color: #f97316;
            box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.15);
        }

        .unified-search-input::placeholder { color: #94a3b8; }

        .unified-search-clear {
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
            background: #e2e8f0;
            border: none;
            color: #64748b;
            cursor: pointer;
            font-size: 16px;
            width: 22px;
            height: 22px;
            border-radius: 50%;
            display: none;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
        }

        .unified-search-clear:hover { background: #ef4444; color: white; }
        .unified-search-clear.visible { display: flex; }

        .btn {
            padding: 8px 16px;
            border: 1px solid #e2e8f0;
            border-radius: 6px;
            background: white;
            color: #64748b;
            cursor: pointer;
            font-size: 13px;
            font-weight: 500;
        }

        .btn:hover { background: #f8fafc; }

        .time-filters { display: flex; gap: 5px; margin-left: auto; }

        .time-btn {
            padding: 6px 12px;
            border: 1px solid #d1d5db;
            border-radius: 6px;
            background: white;
            color: #1f2937;
            cursor: pointer;
            font-size: 12px;
            font-weight: 600;
        }

        .time-btn:hover { background: #fff7ed; border-color: #f97316; color: #ea580c; }
        .time-btn.active { background: #f97316; border-color: #f97316; color: white; }
        /* Filter groups */
        .ncaa-group { display: inline-flex; gap: 2px; }
        .time-btn.refresh-order-btn { background: #dbeafe; border-color: #3b82f6; color: #1d4ed8; margin-left: 10px; }
        .time-btn.refresh-order-btn:hover { background: #3b82f6; border-color: #3b82f6; color: white; }

        .main-container { width: 100%; padding: 15px; overflow-x: auto; }

        .match-table {
            width: 100%;
            min-width: 1450px;
            background: white;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
            overflow: visible;  /* Changed from hidden to allow quarter flow popup to show */
        }

        /* MATCH ROW CONTAINER */
        .match-row {
            border-bottom: 3px solid #e2e8f0;
        }

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

        /* SELECTED STATE - sticky highlight until another row clicked */
        .match-row.selected {
            box-shadow: inset 0 0 0 3px #f59e0b !important;
            background: rgba(245, 158, 11, 0.15) !important;
        }
        .match-row.selected .row-header {
            background: #b45309 !important;
        }

        /* ROW HEADER - Blue bar at top of each row */
        /* UPDATED 2026-03-03: Added per-quarter timeout columns T1 T2 T3 T4 (no divider between G-TO and T1) */
        /* columns: star, league, matchup, ML, Qtr Time Score, Q1-Q4, Spr L-Spr O/U L-O/U Mom W-L Rel | [CB H-W] Q-TO G-TO T1 T2 T3 T4 */
        .row-header {
            display: grid;
            /* ORDER: ★ Icons Matchup ML | Qtr Time Score | Q1-Q4 | Spr L-Spr O/U L-O/U Mom W-L Rel | [CB H-W for NCAAB] Q-TO G-TO T1 T2 T3 T4 */
            grid-template-columns: 28px 150px 180px 70px 50px 48px 58px 44px 44px 54px 44px 44px 6px 40px 44px 40px 40px 6px 40px 40px 40px 6px 38px 38px 38px 38px 10px 38px 38px 38px 38px 1fr;
            background: #2c5282;
            color: white;
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            padding: 0 10px;
            letter-spacing: 0.4px;
        }

        .row-header > div {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 8px 2px;
        }

        .row-header > div:nth-child(2) {
            justify-content: flex-start;
        }

        /* White divider columns */
        .row-header .section-divider {
            background: white;
            padding: 0;
            width: 2px;
        }

        /* MATCH SUMMARY - Data row */
        /* UPDATED 2026-03-03: Added per-quarter timeout columns T1 T2 T3 T4 (no divider between G-TO and T1) */
        .match-summary {
            display: grid;
            /* ORDER: ★ Icons Matchup ML | Qtr Time Score | Q1-Q4 | Spr L-Spr O/U L-O/U Mom W-L Rel | [CB H-W for NCAAB] Q-TO G-TO T1 T2 T3 T4 */
            grid-template-columns: 28px 150px 180px 70px 50px 48px 58px 44px 44px 54px 44px 44px 6px 40px 44px 40px 40px 6px 40px 40px 40px 6px 38px 38px 38px 38px 10px 38px 38px 38px 38px 1fr;
            padding: 0 10px;
            align-items: center;
            cursor: pointer;
            transition: background 0.2s;
            background: white;
        }

        .match-summary:hover { background: #f8fafc; }
        .match-summary.expanded { background: #fff7ed; }

        .match-summary > div {
            padding: 10px 4px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .match-summary > div:nth-child(1),
        .match-summary > div:nth-child(2) {
            justify-content: flex-start;
        }

        /* Matchup column - prevent overflow into ML */
        .match-summary > div:nth-child(3) {
            overflow: hidden;
            justify-content: flex-start;
        }

        /* Section dividers in data row */
        .match-summary .section-divider {
            background: #d1d5db;
            padding: 0;
            width: 2px;
            height: 100%;
            align-self: stretch;
        }

        /* Section backgrounds */
        .match-summary .h2h-cell { background: #faf5ff; }
        .match-summary .home-cell { background: #fff7ed; }
        .match-summary .away-cell { background: #eff6ff; }

        /* Common elements */
        .expand-arrow {
            font-size: 12px;
            color: #94a3b8;
            transition: transform 0.2s;
            padding: 4px;  /* Larger click target */
            cursor: pointer;
        }
        .match-summary.expanded .expand-arrow { transform: rotate(90deg); color: #f97316; }

        .copy-btn { font-size: 11px; color: #94a3b8; cursor: pointer; padding: 2px 4px; border-radius: 3px; }
        .copy-btn:hover { color: #f97316; background: #fff7ed; }

        /* Quick action buttons container - 2x2 grid layout */
        .quick-actions {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 2px;
            background: #f1f5f9;
            padding: 3px;
            border-radius: 4px;
            width: fit-content;
        }
        .alarm-btn {
            font-size: 9px;
            color: #64748b;
            cursor: pointer;
            padding: 1px 3px;
            border-radius: 3px;
            background: #f1f5f9;
            border: 1px solid #e2e8f0;
            transition: all 0.15s;
            white-space: nowrap;
        }
        .alarm-btn:hover { color: #f97316; background: #fff7ed; border-color: #fed7aa; }
        .alarm-btn.active { color: #fff; background: #f97316; border-color: #ea580c; }
        .red-alert-btn {
            font-size: 9px;
            color: #dc2626;
            cursor: pointer;
            padding: 1px 3px;
            border-radius: 3px;
            background: #fef2f2;
            border: 1px solid #fecaca;
            transition: all 0.15s;
        }
        .red-alert-btn:hover { background: #fee2e2; }
        .red-alert-btn.active { color: #fff; background: #dc2626; border-color: #b91c1c; animation: pulse-red 1.5s infinite; }
        @keyframes pulse-red { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }

        /* Left border reset zone - click to close all */
        .reset-zone {
            position: fixed;
            left: 0;
            top: 0;
            width: 15px;
            height: 100vh;
            background: linear-gradient(to right, #e2e8f0, transparent);
            cursor: pointer;
            z-index: 100;
            transition: background 0.2s;
        }
        .reset-zone:hover {
            background: linear-gradient(to right, #f97316, transparent);
        }

        .star-btn { font-size: 14px; color: rgba(255,255,255,0.5); cursor: pointer; padding: 2px 4px; border-radius: 3px; transition: all 0.15s; }
        .star-btn:hover { color: #fbbf24; transform: scale(1.2); }
        .star-btn.starred { color: #fbbf24; text-shadow: 0 0 4px rgba(251,191,36,0.5); }

        /* Star button for data row (dark on light background) */
        .star-data {
            font-size: 14px;
            color: #d1d5db;
            cursor: pointer;
            padding: 2px 4px;
            border-radius: 3px;
            transition: all 0.15s;
            margin-right: 4px;
        }
        .star-data:hover { color: #fbbf24; transform: scale(1.2); }
        .star-data.starred { color: #fbbf24; text-shadow: 0 0 4px rgba(251,191,36,0.5); }

        .dump-btn { font-size: 12px; color: rgba(255,255,255,0.5); cursor: pointer; padding: 2px 4px; border-radius: 3px; transition: all 0.15s; margin-left: 4px; }
        .dump-btn:hover { color: #3b82f6; transform: scale(1.2); }
        .dump-btn.downloading { color: #f59e0b; animation: pulse-download 1s infinite; }
        @keyframes pulse-download { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

        /* Notification toast */
        .notification-toast {
            position: fixed;
            top: 20px;
            right: 20px;
            padding: 12px 20px;
            border-radius: 8px;
            color: white;
            font-size: 14px;
            font-weight: 500;
            z-index: 10000;
            animation: slideIn 0.3s ease-out;
            box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        }
        .notification-toast.success { background: #22c55e; }
        .notification-toast.error { background: #ef4444; }
        .notification-toast.info { background: #3b82f6; }
        @keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
        @keyframes slideOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }

        .competition {
            font-size: 13px;
            color: #374151;
            font-weight: 700;
            white-space: normal;
            line-height: 1.3;
            cursor: pointer;
            padding: 2px 4px;
            border-radius: 3px;
            transition: background 0.2s;
        }
        .competition:hover {
            background: #e0f2fe;
            color: #0369a1;
        }

        .teams-box { background: #f8fafc; border-radius: 5px; padding: 6px 6px; border: 1px solid #e2e8f0; width: 165px; min-width: 165px; max-width: 165px; overflow: hidden; }
        .team-row { display: flex; align-items: center; justify-content: space-between; }
        .team-row.home { margin-bottom: 2px; padding-bottom: 2px; border-bottom: 1px solid #e2e8f0; }
        .team-name { font-weight: 600; font-size: 13px; color: #1a1a1a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px; }
        .team-ml { font-size: 13px; font-weight: 700; color: #000; margin-left: auto; white-space: nowrap; flex-shrink: 0; }
        /* Team name colors */
        .team-row.home .team-name { color: #ea580c; }
        .team-row.away .team-name { color: #2563eb; }

        /* ML BOX - Matches Matchup Box Style */
        .ml-box { background: #f8fafc; border-radius: 5px; padding: 6px 8px; border: 1px solid #e2e8f0; width: 70px; min-width: 70px; max-width: 70px; overflow: hidden; }
        .ml-row { display: flex; align-items: center; justify-content: center; }
        .ml-row.home { margin-bottom: 3px; padding-bottom: 3px; border-bottom: 1px solid #e2e8f0; }
        .ml-value { font-size: 13px; font-weight: 700; white-space: nowrap; }
        .ml-value.home { color: #ea580c; }
        .ml-value.away { color: #2563eb; }

        /* STAT BOX - For FOULS, 2PM, 3PM, TO columns - Same style as ML box */
        .stat-box { background: #f8fafc; border-radius: 5px; padding: 6px 8px; border: 1px solid #e2e8f0; width: 38px; min-width: 38px; max-width: 38px; overflow: hidden; }
        .stat-box .stat-row { display: flex; align-items: center; justify-content: center; }
        .stat-box .stat-row.home { margin-bottom: 3px; padding-bottom: 3px; border-bottom: 1px solid #e2e8f0; }
        .stat-box .stat-num { font-size: 13px; font-weight: 700; }
        .stat-box .stat-num.home { color: #ea580c; }
        .stat-box .stat-num.away { color: #2563eb; }
        /* Connected stat boxes - left box of pair */
        .stat-box.group-left { border-radius: 5px 0 0 5px; border-right: none; }
        /* Connected stat boxes - right box of pair */
        .stat-box.group-right { border-radius: 0 5px 5px 0; border-left: none; }

        /* TIMEOUT BOX - For Q-TO and G-TO columns - closed box like ML */
        .timeout-box { background: #f8fafc; border-radius: 5px; padding: 5px 8px; border: 1px solid #e2e8f0; overflow: hidden; }
        .timeout-box.qto { width: 65px; min-width: 65px; max-width: 65px; }
        .timeout-box.gto { width: 95px; min-width: 95px; max-width: 95px; }
        .timeout-box .to-row { display: flex; align-items: center; justify-content: center; font-size: 12px; letter-spacing: 2px; }
        .timeout-box .to-row.home { margin-bottom: 3px; padding-bottom: 3px; border-bottom: 1px solid #e2e8f0; }
        .timeout-box.group-left { border-radius: 5px 0 0 5px; border-right: none; }
        .timeout-box.group-right { border-radius: 0 5px 5px 0; }

        /* HIDDEN STAT COLUMNS - Fouls, 2PM, 3PM, Scr/Def temporarily hidden */
        .stat-box:not(.timeout-box) { display: none !important; }
        .ff-box.scr-def { display: none !important; }
        .hidden-col { display: none !important; }

        /* FRESH FORM BOX - For Mom, W-L, Rel, Q4P, AI columns */
        .ff-box { background: #f8fafc; border-radius: 5px; padding: 6px 4px; border: 1px solid #e2e8f0; min-width: 38px; width: 100%; box-sizing: border-box; overflow: hidden; }
        .ff-box .ff-row { display: flex; align-items: center; justify-content: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .ff-box .ff-row.home { margin-bottom: 3px; padding-bottom: 3px; border-bottom: 1px solid #e2e8f0; }
        .ff-box .ff-val { font-size: 12px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .ff-box .ff-val.home { color: #c2410c; } /* Darker orange for better contrast */
        .ff-box .ff-val.away { color: #1d4ed8; } /* Darker blue for better contrast */
        /* Enhanced text visibility on colored backgrounds */
        .ff-row.hot .ff-val, .ff-row.cold .ff-val, .ff-row.warm .ff-val {
            font-weight: 900;
            text-shadow: 0 0 1px rgba(255,255,255,0.8);
        }
        .ff-row.hot .ff-val.home { color: #9a3412; } /* Dark orange on green */
        .ff-row.hot .ff-val.away { color: #1e40af; } /* Dark blue on green */
        .ff-row.cold .ff-val.home { color: #9a3412; } /* Dark orange on red */
        .ff-row.cold .ff-val.away { color: #1e40af; } /* Dark blue on red */
        .ff-row.warm .ff-val.home { color: #9a3412; } /* Dark orange on yellow */
        .ff-row.warm .ff-val.away { color: #1e40af; } /* Dark blue on yellow */
        .ff-box.group-left { border-radius: 5px 0 0 5px; border-right: none; }
        .ff-box.group-mid { border-radius: 0; border-left: none; border-right: none; }
        .ff-box.group-right { border-radius: 0 5px 5px 0; border-left: none; }
        /* Fresh Form color coding - BOX LEVEL (legacy, keep for fallback) */
        .ff-box.strong { background: #dcfce7; border-color: #86efac; }
        .ff-box.weak { background: #fee2e2; border-color: #fca5a5; }
        .ff-box.mixed { background: #fef9c3; border-color: #fde047; }
        /* Fresh Form color coding - ROW LEVEL (team-specific) - Connected horizontally across all 3 boxes */
        .ff-row.hot, .ff-row.cold, .ff-row.warm {
            margin: 0 -4px;  /* Extend background to box edges */
            padding: 0 4px;  /* Restore inner spacing */
            border-radius: 0; /* No rounded corners for seamless connection */
        }
        .ff-row.hot { background: #dcfce7; } /* Green - team is hot (WW or winning record) */
        .ff-row.cold { background: #fee2e2; } /* Red - team is cold (LL or losing record) */
        .ff-row.warm { background: #fef9c3; } /* Yellow - team is mixed (WL/LW) */
        /* Rounded corners only at outer edges of connected group */
        .ff-box.group-left .ff-row.home.hot, .ff-box.group-left .ff-row.home.cold, .ff-box.group-left .ff-row.home.warm { border-radius: 3px 0 0 0; }
        .ff-box.group-left .ff-row.away.hot, .ff-box.group-left .ff-row.away.cold, .ff-box.group-left .ff-row.away.warm { border-radius: 0 0 0 3px; }
        .ff-box.group-right .ff-row.home.hot, .ff-box.group-right .ff-row.home.cold, .ff-box.group-right .ff-row.home.warm { border-radius: 0 3px 0 0; }
        .ff-box.group-right .ff-row.away.hot, .ff-box.group-right .ff-row.away.cold, .ff-box.group-right .ff-row.away.warm { border-radius: 0 0 3px 0; }
        /* Win/Loss momentum colors */
        .ff-win { color: #16a34a !important; }
        .ff-loss { color: #dc2626 !important; }

        /* Q4 Pattern confidence colors */
        .q4p-val { font-size: 11px !important; }
        .q4p-high { color: #16a34a !important; font-weight: 800 !important; }
        .q4p-med { color: #f59e0b !important; font-weight: 700 !important; }
        .q4p-low { color: #9ca3af !important; font-weight: 600 !important; }
        .q4p-box:hover { background: #fef3c7 !important; }

        .odds-col { text-align: center; font-size: 13px; font-weight: 700; color: #1a1a1a; }
        .status-col { text-align: center; font-size: 12px; font-weight: 600; color: #1a1a1a; padding-right: 4px; }
        .status-col.live { color: #e11d48; }
        .time-col { text-align: center; font-weight: 600; font-size: 12px; color: #1a1a1a; padding-left: 4px; }
        .score-col { text-align: center; background: #dbeafe; border-radius: 4px; padding: 4px 6px !important; }
        .score-display { display: flex; justify-content: center; gap: 4px; font-weight: 800; font-size: 16px; color: #1a1a1a; }
        .score-display span.score-blink { animation: scoreBlink 0.3s ease-in-out 3; }
        @keyframes scoreBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }
        .score-separator { color: #1a1a1a; }

        .quarter-col { text-align: center; }
        .quarter-box { background: #f1f5f9; border-radius: 3px; padding: 2px 3px; }
        .quarter-box .q-row { display: flex; justify-content: center; font-weight: 700; font-size: 13px; }
        .quarter-box .q-row.home { margin-bottom: 1px; padding-bottom: 1px; border-bottom: 1px solid #e2e8f0; }
        /* Quarter box text colors */
        .q-row.home { color: #ea580c; }
        .q-row.away { color: #2563eb; }

        /* Lead indicators (+6 lead pattern detection) */
        .lead-indicator-h1, .lead-indicator-h2 {
            display: block;
            font-size: 9px;
            font-weight: 700;
            text-align: center;
            margin-top: 2px;
            padding: 1px 2px;
            border-radius: 2px;
            line-height: 1.1;
            min-height: 11px;
        }
        .lead-indicator-h1:not(:empty), .lead-indicator-h2:not(:empty) {
            background: #fef3c7;
            color: #92400e;
            border: 1px solid #fbbf24;
        }
        /* ABS pattern - stronger color (team absorbed challenge) */
        .indicator-abs {
            background: #dcfce7 !important;
            color: #166534 !important;
            border: 1px solid #22c55e !important;
        }
        /* Regular +6 lead */
        .indicator-lead {
            background: #fef3c7;
            color: #92400e;
            border: 1px solid #fbbf24;
        }
        /* Lead indicator badge for scoring sequence panel */
        .lead-indicator-badge {
            display: inline-block;
            font-size: 11px;
            font-weight: 700;
            padding: 2px 6px;
            border-radius: 3px;
            background: #fef3c7;
            color: #92400e;
            border: 1px solid #fbbf24;
        }
        .lead-indicator-badge.indicator-abs {
            background: #dcfce7;
            color: #166534;
            border: 1px solid #22c55e;
        }

        /* Year styling - subtle colors */
        .year-val { font-size: 11px; font-weight: 700; }
        .year-val.fresh { color: #059669; }
        .year-val.stale { color: #d97706; }
        .year-val.old { color: #e11d48; }
        .year-val.none { color: #9ca3af; }

        /* Games count */
        .games-val { font-size: 12px; font-weight: 700; color: #1a1a1a; }
        .games-val.no-data { color: #9ca3af; }

        /* Win/Loss record */
        .wl-val { font-size: 11px; font-weight: 700; color: #1a1a1a; }
        .wl-val.good { color: #059669; }
        .wl-val.bad { color: #e11d48; }

        /* Stat percentage - subtle colors */
        .stat-val { font-size: 12px; font-weight: 700; }
        .stat-val.good { color: #059669; }
        .stat-val.bad { color: #e11d48; }

        /* Stats section backgrounds */
        /* C- (Current Quarter) stat columns have yellow background - applied inline */

        /* MATCH DETAILS (expanded) */
        .match-details { display: none; background: #fefce8; padding: 15px 20px; border-bottom: 2px solid #fde68a; }
        .match-details.show { display: block; }

        /* PRE-MATCH ODDS BANNER */
        .prematch-banner {
            background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
            border-radius: 6px;
            padding: 10px 20px;
            margin-bottom: 15px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            color: white;
        }

        .prematch-banner .banner-title {
            font-size: 11px;
            font-weight: 700;
            color: #94a3b8;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .prematch-items {
            display: flex;
            gap: 25px;
            align-items: center;
        }

        .prematch-item {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .prematch-item .pm-label {
            font-size: 10px;
            color: #94a3b8;
            text-transform: uppercase;
        }

        .prematch-item .pm-value {
            font-size: 15px;
            font-weight: 700;
            color: white;
        }

        .prematch-item .pm-value.home-ml { color: #fb923c; }
        .prematch-item .pm-value.away-ml { color: #60a5fa; }

        .prematch-divider {
            width: 1px;
            height: 24px;
            background: #475569;
        }

        /* ODDS SNAPSHOTS TABLE - Clean 2-row spreadsheet style */
        .odds-table-container {
            background: #ffffff;
            border-radius: 8px;
            padding: 8px;
            margin-bottom: 15px;
            border: 1px solid #e2e8f0;
            box-shadow: 0 1px 3px rgba(0,0,0,0.08);
            overflow-x: auto;
        }
        .odds-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 10px;
            min-width: 900px;
        }
        .odds-table th {
            background: #f8fafc;
            color: #475569;
            font-weight: 600;
            text-transform: uppercase;
            font-size: 9px;
            padding: 6px 3px;
            text-align: center;
            border: 1px solid #e2e8f0;
        }
        .odds-table .period-header th {
            font-size: 10px;
            padding: 8px 4px;
        }
        .odds-table .stat-header th {
            font-size: 8px;
            padding: 4px 2px;
            background: #f1f5f9;
            color: #64748b;
        }
        .odds-table th.team-col {
            width: 120px;
            text-align: left;
            padding-left: 8px;
            background: #1e293b;
            color: #f8fafc;
        }
        .odds-table th.pm-col { background: #dcfce7; color: #16a34a; }
        .odds-table th.q1-col { background: #dbeafe; color: #2563eb; }
        .odds-table th.ht-col { background: #fef3c7; color: #ca8a04; }
        .odds-table th.q3-col { background: #ffedd5; color: #ea580c; }
        .odds-table th.final-col { background: #1e293b; color: #f8fafc; width: 50px; }
        .odds-table .score-sub { font-size: 9px; color: inherit; opacity: 0.8; margin-left: 4px; }
        .odds-table td {
            padding: 6px 3px;
            text-align: center;
            border: 1px solid #e2e8f0;
            color: #334155;
            font-size: 10px;
        }
        .odds-table td.team-name {
            text-align: left;
            padding-left: 8px;
            font-weight: 600;
            font-size: 11px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 120px;
        }
        .odds-table td.home-name { color: #ea580c; background: rgba(251,146,60,0.1); }
        .odds-table td.away-name { color: #2563eb; background: rgba(96,165,250,0.1); }
        .odds-table td.val { font-weight: 500; }
        .odds-table td.val.imp { font-weight: 700; font-size: 11px; }
        .odds-table tr.home-row td.imp { color: #ea580c; background: rgba(251,146,60,0.15); }
        .odds-table tr.away-row td.imp { color: #2563eb; background: rgba(96,165,250,0.15); }
        .odds-table td.final-score { font-weight: 700; font-size: 14px; background: #f1f5f9; }
        .odds-table td.home-score { color: #ea580c; }
        .odds-table td.away-score { color: #2563eb; }

        /* STAT BOXES - STACKED VERTICALLY, FULL WIDTH */
        .stat-boxes-row {
            display: flex;
            flex-direction: column;
            gap: 15px;
            margin-bottom: 30px;
        }

        .stat-boxes-row .stat-box {
            background: white;
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
            border: 1px solid #e2e8f0;
            overflow: hidden;
            width: 100%;
            min-width: 100%;
            max-width: 100%;
        }

        .stat-box.h2h-box { border-top: 3px solid #8b5cf6; }
        .stat-box.home-box { border-top: 3px solid #f97316; }
        .stat-box.away-box { border-top: 3px solid #2563eb; }

        .stat-box-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 12px;
            background: #f8fafc;
            border-bottom: 1px solid #e2e8f0;
        }

        .stat-box-title { font-size: 13px; font-weight: 700; color: #1a1a1a; white-space: nowrap; }
        
        .stat-box-averages {
            display: flex;
            gap: 10px;
            align-items: center;
        }

        .avg-item-box {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 4px 10px;
            border: 1px solid #e2e8f0;
            border-radius: 4px;
            background: white;
        }

        .avg-item-box .avg-label {
            font-size: 10px;
            color: #64748b;
            text-transform: uppercase;
            line-height: 1;
        }

        .avg-item-box .avg-value {
            font-size: 15px;
            font-weight: 700;
            color: #1a1a1a;
            line-height: 1.3;
        }

        .avg-item-box .avg-value.positive { color: #059669; }
        .avg-item-box .avg-value.negative { color: #e11d48; }

        .stat-box-count { font-size: 11px; font-weight: 600; color: #64748b; background: #e2e8f0; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }

        /* TABS */
        .stat-box-tabs {
            display: flex;
            gap: 2px;
            padding: 8px 12px;
            background: #f1f5f9;
            border-bottom: 1px solid #e2e8f0;
        }

        .stat-tab {
            padding: 6px 14px;
            border: none;
            border-radius: 4px;
            background: transparent;
            color: #64748b;
            font-size: 11px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }

        .stat-tab:hover { background: #e2e8f0; color: #1a1a1a; }
        .stat-tab.active { background: #1e293b; color: white; }

        .stat-tab .tab-count {
            font-size: 9px;
            background: rgba(0,0,0,0.1);
            padding: 1px 5px;
            border-radius: 8px;
            margin-left: 4px;
        }

        .stat-tab.active .tab-count { background: rgba(255,255,255,0.2); }

        /* Game List - FULL WIDTH - ALL COLUMNS VISIBLE */
        .game-list { max-height: 450px; overflow-y: auto; }

        /* FULL WIDTH COLUMNS - plenty of room */
        .game-list-header {
            display: grid;
            /* Date Matchup Q1 Q2 HT Q3 Q4 Spread O/U ML Score W/L SPR F/U SPR-M T-O/U T-IMP T-FS */
            grid-template-columns: 70px 120px 36px 36px 42px 36px 36px 55px 50px 60px 65px 40px 40px 35px 60px 40px 45px 45px;
            padding: 8px 12px;
            background: #1e293b;
            color: white;
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            position: sticky;
            top: 0;
            z-index: 10;
        }

        .game-list-header > div { text-align: center; }
        .game-list-header > div:nth-child(2) { text-align: left; }

        .game-list-row {
            display: grid;
            /* Date Matchup Q1 Q2 HT Q3 Q4 Spread O/U ML Score W/L SPR F/U SPR-M T-O/U T-IMP T-FS */
            grid-template-columns: 70px 120px 36px 36px 42px 36px 36px 55px 50px 60px 65px 40px 40px 35px 60px 40px 45px 45px;
            padding: 6px 12px;
            font-size: 11px;
            border-bottom: 1px solid #f1f5f9;
            align-items: center;
            background: white;
        }

        /* Stacked quarter scores in history */
        .qtr-stack {
            display: flex;
            flex-direction: column;
            align-items: center;
            font-size: 9px;
            font-weight: 600;
            line-height: 1.2;
        }
        .qtr-stack .qtr-home { color: #ea580c; }
        .qtr-stack .qtr-away { color: #2563eb; }
        .qtr-stack.ht { background: #fef3c7; border-radius: 3px; padding: 1px 2px; }
        .qtr-stack.ht .qtr-home { color: #92400e; }
        .qtr-stack.ht .qtr-away { color: #1e40af; }

        /* Scoring Sequence Panel - Full width at bottom of page */
        .scoring-sequence-panel {
            display: none;
            background: #f8fafc;
            border: 2px solid #3b82f6;
            border-radius: 8px;
            margin-top: 20px;
            padding: 15px;
            box-shadow: 0 -4px 20px rgba(59, 130, 246, 0.15);
        }
        .scoring-sequence-panel.show { display: block; }
        .scoring-sequence-panel .panel-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
            padding-bottom: 10px;
            border-bottom: 1px solid #e2e8f0;
        }
        .scoring-sequence-panel .panel-title {
            font-size: 14px;
            font-weight: 700;
            color: #1e40af;
        }
        .scoring-sequence-panel .panel-close {
            cursor: pointer;
            padding: 4px 10px;
            background: #fee2e2;
            border-radius: 4px;
            font-size: 12px;
            color: #dc2626;
            font-weight: 600;
        }
        .scoring-sequence-panel .panel-close:hover { background: #fecaca; }

        /* H2H History Panel - Similar to scoring-sequence-panel */
        .h2h-history-panel {
            display: none;
            background: #faf5ff;
            border: 2px solid #8b5cf6;
            border-radius: 8px;
            margin-top: 20px;
            padding: 15px;
            box-shadow: 0 -4px 20px rgba(139, 92, 246, 0.15);
        }
        .h2h-history-panel.show { display: block; }
        .h2h-history-panel .panel-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
            padding-bottom: 10px;
            border-bottom: 1px solid #e2e8f0;
        }
        .h2h-history-panel .panel-title {
            font-size: 14px;
            font-weight: 700;
            color: #7c3aed;
        }
        .h2h-history-panel .panel-close {
            cursor: pointer;
            padding: 4px 10px;
            background: #fee2e2;
            border-radius: 4px;
            font-size: 12px;
            color: #dc2626;
            font-weight: 600;
        }
        .h2h-history-panel .panel-close:hover { background: #fecaca; }
        .h2h-history-panel .h2h-content {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        /* Inline H2H History (inserted in match details area) */
        .h2h-history-inline {
            background: #faf5ff;
            border: 2px solid #8b5cf6;
            border-radius: 8px;
            padding: 15px;
            box-shadow: 0 4px 20px rgba(139, 92, 246, 0.15);
        }
        .h2h-history-inline .panel-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
            padding-bottom: 10px;
            border-bottom: 1px solid #e2e8f0;
        }
        .h2h-history-inline .panel-title {
            font-size: 14px;
            font-weight: 700;
            color: #7c3aed;
        }
        .h2h-history-inline .panel-close {
            cursor: pointer;
            padding: 4px 10px;
            background: #fee2e2;
            border-radius: 4px;
            font-size: 12px;
            color: #dc2626;
            font-weight: 600;
        }
        .h2h-history-inline .panel-close:hover { background: #fecaca; }
        .h2h-history-inline .h2h-content {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        /* Quarter Scoring Flow Visualization */
        .scoring-flow-container {
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            border-radius: 6px;
            margin: 8px 0;
            padding: 10px;
            display: none;
        }
        .scoring-flow-container.show { display: block; }
        .scoring-flow-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
            font-size: 11px;
            font-weight: 600;
            color: #475569;
        }
        .scoring-flow-tabs {
            display: flex;
            gap: 4px;
        }
        .scoring-flow-tab {
            padding: 3px 8px;
            border: 1px solid #cbd5e1;
            border-radius: 4px;
            background: white;
            font-size: 10px;
            cursor: pointer;
            transition: all 0.15s;
        }
        .scoring-flow-tab:hover { background: #f1f5f9; border-color: #94a3b8; }
        .scoring-flow-tab.active { background: #1e40af; color: white; border-color: #1e40af; }
        .scoring-flow-quarter {
            margin-bottom: 10px;
            background: white;
            border-radius: 4px;
            padding: 8px;
            border: 1px solid #e2e8f0;
        }
        .scoring-flow-quarter-header {
            font-size: 10px;
            font-weight: 700;
            color: #64748b;
            margin-bottom: 6px;
            display: flex;
            justify-content: space-between;
        }
        .scoring-flow-rows {
            font-family: 'Courier New', monospace;
            font-size: 11px;
            line-height: 1.4;
            overflow-x: visible;
            white-space: nowrap;
        }
        .scoring-flow-row {
            display: flex;
            align-items: center;
            margin-bottom: 8px;
        }
        .scoring-flow-row:last-child {
            margin-bottom: 0;
        }
        .scoring-flow-label {
            width: 45px;
            font-weight: 700;
            flex-shrink: 0;
        }
        .scoring-flow-label.home { color: #ea580c; }
        .scoring-flow-label.away { color: #2563eb; }
        .scoring-flow-scores {
            display: flex;
            gap: 2px;
        }
        .scoring-flow-score-wrapper {
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        .scoring-flow-time {
            font-size: 7px;
            color: #475569;
            font-weight: 600;
            white-space: nowrap;
            width: 24px;
            text-align: center;
        }
        .scoring-flow-score {
            width: 24px;
            text-align: right;
            padding: 1px 2px;
        }
        .scoring-flow-score.burst {
            background: #fef3c7;
            border-radius: 2px;
            font-weight: 700;
        }
        .scoring-flow-score.burst-big {
            background: #fecaca;
            border-radius: 2px;
            font-weight: 700;
        }

        /* Scoring Sequence Table Styles */
        .scoring-seq-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 12px;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: white;
        }
        .scoring-seq-table th {
            background: #f0f0f0;
            color: #333;
            font-weight: 600;
            font-size: 11px;
            padding: 6px 4px;
            text-align: center;
            border-bottom: 1px solid #ddd;
            white-space: nowrap;
            position: sticky;
            top: 0;
            z-index: 1;
        }
        .scoring-seq-table td {
            padding: 5px 4px;
            text-align: center;
            border-bottom: 1px solid #eee;
            white-space: nowrap;
        }
        .scoring-seq-table td:first-child,
        .scoring-seq-table td:nth-child(2) {
            text-align: left;
        }
        .scoring-seq-table th:first-child,
        .scoring-seq-table th:nth-child(2) {
            text-align: left;
        }
        .scoring-seq-table tr:hover {
            background: #f8fafc;
        }
        .scoring-seq-table tr.run-6 {
            background: #fef3c7;
        }
        .scoring-seq-table tr.run-8 {
            background: #fecaca;
        }
        .scoring-seq-table tr.qtr-transition {
            border-top: 2px solid #3b82f6;
        }
        .scoring-seq-table td.score-col {
            font-weight: 700;
        }
        .scoring-seq-table td.home-score { color: #ea580c; }
        .scoring-seq-table td.away-score { color: #2563eb; }

        /* Comeback indicators */
        .comeback-indicator {
            display: inline-block;
            width: 12px;
            height: 12px;
            border-radius: 50%;
            font-size: 7px;
            font-weight: 700;
            text-align: center;
            line-height: 12px;
            color: white;
            margin-left: 2px;
            vertical-align: middle;
        }
        .comeback-indicator.yellow-circle {
            background: #f59e0b;
            box-shadow: 0 0 4px #f59e0b;
        }
        .comeback-indicator.red-circle {
            background: #dc2626;
            box-shadow: 0 0 4px #dc2626;
        }
        .qtr-header-clickable {
            cursor: pointer;
            transition: background 0.15s;
        }
        .qtr-header-clickable:hover {
            background: #dbeafe;
            border-radius: 3px;
        }

        /* Full Sequence Display (HT click) - spans full width minus notes */
        .full-sequence-container {
            background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
            border: 2px solid #3b82f6;
            border-radius: 8px;
            margin: 8px 0;
            padding: 12px;
            display: none;
            position: absolute;
            z-index: 100;
            left: 0;
            right: 0;
            margin-top: 5px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }
        .full-sequence-container.show { display: block; }
        .full-sequence-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
            font-size: 12px;
            font-weight: 700;
            color: #1e40af;
        }
        .full-sequence-wrapper {
            display: flex;
            gap: 15px;
        }
        .full-sequence-main {
            flex: 1;
            min-width: 0;
        }
        /* Clickable score and scorer elements */
        .score-clickable, .scorer-clickable {
            cursor: pointer !important;
            user-select: none !important;
            -webkit-user-select: none !important;
        }
        .score-clickable:hover, .scorer-clickable:hover {
            text-decoration: underline;
            opacity: 0.8;
        }
        .full-sequence-half {
            background: white;
            border-radius: 6px;
            padding: 10px;
            border: 1px solid #e2e8f0;
            margin-bottom: 10px;
        }
        .full-sequence-half:last-child {
            margin-bottom: 0;
        }
        .full-sequence-half-header {
            font-size: 11px;
            font-weight: 700;
            color: #475569;
            margin-bottom: 8px;
            padding-bottom: 4px;
            border-bottom: 1px solid #e2e8f0;
            display: flex;
            justify-content: space-between;
        }
        .full-sequence-half-header .half-label {
            background: #1e40af;
            color: white;
            padding: 2px 8px;
            border-radius: 4px;
            font-size: 10px;
        }
        .full-sequence-half-header .half-score {
            font-size: 12px;
            font-weight: 700;
        }
        .full-sequence-rows {
            font-family: 'Courier New', monospace;
            font-size: 11px;
            line-height: 1.4;
            overflow-x: auto;
            white-space: nowrap;
            padding-bottom: 5px;
        }
        .full-sequence-row {
            display: flex;
            align-items: center;
            margin-bottom: 8px;
        }
        .full-sequence-row:last-child {
            margin-bottom: 0;
        }
        .full-sequence-label {
            width: 50px;
            font-weight: 700;
            flex-shrink: 0;
        }
        .full-sequence-label.home { color: #ea580c; }
        .full-sequence-label.away { color: #2563eb; }
        .full-sequence-scores {
            display: flex;
            gap: 2px;
            flex-wrap: nowrap;
        }
        .full-sequence-notes {
            width: 280px;
            flex-shrink: 0;
            background: white;
            border-radius: 6px;
            padding: 10px;
            border: 1px solid #e2e8f0;
            display: flex;
            flex-direction: column;
        }
        .full-sequence-notes-header {
            font-size: 11px;
            font-weight: 700;
            color: #475569;
            margin-bottom: 8px;
        }
        .full-sequence-notes-input {
            flex: 1;
            min-height: 60px;
            border: 1px solid #e2e8f0;
            border-radius: 4px;
            padding: 8px;
            font-size: 11px;
            resize: none;
            margin-bottom: 6px;
        }
        .full-sequence-notes-input:focus {
            outline: none;
            border-color: #3b82f6;
        }
        .full-sequence-notes-send {
            background: #3b82f6;
            color: white;
            border: none;
            border-radius: 4px;
            padding: 6px 12px;
            font-size: 11px;
            font-weight: 600;
            cursor: pointer;
            margin-bottom: 8px;
        }
        .full-sequence-notes-send:hover {
            background: #2563eb;
        }
        .full-sequence-notes-history {
            flex: 1;
            overflow-y: auto;
            font-size: 10px;
            color: #64748b;
            max-height: 150px;
        }
        /* Quarter separator in full sequence */
        .qtr-separator {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 20px;
            height: 20px;
            background: #e2e8f0;
            border-radius: 3px;
            font-size: 8px;
            font-weight: 700;
            color: #64748b;
            margin: 0 3px;
            flex-shrink: 0;
        }

        /* Quarter odds columns */
        .qtr-odds {
            font-size: 8px;
            font-weight: 600;
            color: #6366f1;
            text-align: center;
        }
        .qtr-odds.negative { color: #dc2626; }

        .game-list-row:hover { background: #f8fafc; }
        .game-list-row:nth-child(even) { background: #fafafa; }
        .game-list-row:nth-child(even):hover { background: #f1f5f9; }

        .game-list-row > div { text-align: center; }
        .game-list-row > div:nth-child(2) { text-align: left; }

        .game-date { color: #64748b; font-weight: 600; font-size: 10px; }
        .game-date.old { color: #b45309; font-weight: 700; }

        /* Copy match ID button */
        .copy-id-btn {
            cursor: pointer;
            font-size: 10px;
            opacity: 0.5;
            transition: all 0.2s;
            margin-left: 3px;
        }
        .copy-id-btn:hover {
            opacity: 1;
            transform: scale(1.2);
        }
        .copy-id-btn.copied {
            opacity: 1;
            color: #16a34a;
        }

        /* Dump icons */
        .dump-icon-btn {
            cursor: pointer;
            font-size: 12px;
            opacity: 0.7;
            transition: opacity 0.2s, background 0.2s;
            padding: 2px 4px;
            border-radius: 3px;
            text-align: center;
        }
        .dump-icon-btn:hover {
            opacity: 1;
            background: #dbeafe;
        }
        .dump-icon-btn.loading {
            opacity: 1;
            background: #fef3c7;
        }
        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.4; }
        }

        /* O/U result - team specific implied total */
        .ou-result {
            font-weight: 700;
            font-size: 11px;
        }
        .ou-result.over {
            color: #dc2626;
        }
        .ou-result.under {
            color: #dc2626;
        }

        /* Clickable rows with nested history */
        .clickable-row { cursor: pointer; }
        .clickable-row:hover { background: #e0f2fe !important; }
        .expand-arrow {
            font-size: 8px;
            color: #3b82f6;
            transition: transform 0.2s;
            display: inline-block;
        }
        .expand-arrow.expanded { transform: rotate(90deg); }

        /* Nested history container */
        .nested-history-container {
            background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
            border-left: 3px solid #3b82f6;
            margin: 0 8px 8px 20px;
            padding: 10px;
            border-radius: 6px;
            font-size: 11px;
        }
        .nested-history-header {
            font-weight: 700;
            color: #1e40af;
            margin-bottom: 8px;
            font-size: 11px;
        }
        .nested-game-row {
            display: flex;
            gap: 10px;
            padding: 4px 0;
            border-bottom: 1px solid #bfdbfe;
            align-items: center;
        }
        .nested-game-row:last-child { border-bottom: none; }
        .nested-game-row-expanded {
            padding: 6px 8px;
            border-bottom: 1px solid #e2e8f0;
        }
        .nested-game-row-expanded:last-child { border-bottom: none; }
        .nested-game-main {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .nested-date { color: #64748b; min-width: 65px; font-size: 10px; }
        .nested-opp { flex: 1; font-weight: 500; color: #1e293b; font-size: 11px; }
        .nested-score { min-width: 45px; font-weight: 600; font-size: 11px; }
        .nested-score.win { color: #16a34a; }
        .nested-score.loss { color: #dc2626; }
        .nested-result { font-size: 10px; white-space: nowrap; }
        .nested-quarters {
            display: flex;
            gap: 3px;
            margin-top: 3px;
            margin-left: 65px;
        }
        .nested-quarters .q-score {
            padding: 1px 3px;
            border-radius: 2px;
            background: #f1f5f9;
            font-family: monospace;
            font-size: 8px;
            color: #64748b;
        }
        .nested-quarters .q-score.ht {
            background: #dbeafe;
            font-weight: 600;
            color: #1e40af;
        }
        .nested-summary {
            margin-top: 8px;
            padding-top: 8px;
            border-top: 1px solid #93c5fd;
            font-weight: 600;
            color: #1e40af;
            font-size: 10px;
        }

        .game-opponent { font-weight: 600; color: #1a1a1a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

        .venue-tag {
            font-size: 8px;
            font-weight: 700;
            padding: 2px 5px;
            border-radius: 3px;
            margin-left: 4px;
            display: inline-block;
        }

        .venue-tag.home { background: #dcfce7; color: #166534; }
        .venue-tag.away { background: #fee2e2; color: #991b1b; }

        .game-score { font-weight: 700; color: #1a1a1a; }
        .game-score.win { color: #059669; }
        .game-score.loss { color: #e11d48; }

        .game-odds { font-size: 10px; font-weight: 600; color: #475569; }
        .game-odds.positive { color: #059669; }
        .game-odds.negative { color: #e11d48; }

        .game-result { font-weight: 700; font-size: 14px; }
        .game-result.covered { color: #059669; }
        .game-result.not-covered { color: #e11d48; }

        /* Quarter Odds Detail Grid - Collapsible */
        .qtr-odds-detail {
            grid-column: 1 / -1;
            background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
            border: 1px solid #cbd5e1;
            border-radius: 6px;
            padding: 8px 12px;
            margin: 4px 0 8px 0;
            display: none;
        }
        .qtr-odds-detail.expanded { display: block; }
        .qtr-odds-toggle {
            cursor: pointer;
            user-select: none;
            position: relative;
        }
        .qtr-odds-toggle::after {
            content: '▼';
            font-size: 6px;
            position: absolute;
            bottom: -2px;
            left: 50%;
            transform: translateX(-50%);
            color: #6366f1;
        }
        .qtr-odds-toggle:hover { background: #e0e7ff; border-radius: 3px; }
        /* Quarter Odds Table */
        .qtr-odds-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 11px;
            border: 1px solid #e2e8f0;
            border-radius: 6px;
            overflow: hidden;
        }
        .qtr-odds-table .period-header th {
            background: #1e293b;
            color: white;
            font-size: 11px;
            font-weight: 700;
            padding: 8px 4px;
            text-align: center;
            border: 1px solid #334155;
        }
        .qtr-odds-table .period-header th.team-col { background: #0f172a; width: 100px; }
        .qtr-odds-table .period-header th.q1-group { background: #1d4ed8; }
        .qtr-odds-table .period-header th.ht-group { background: #ca8a04; }
        .qtr-odds-table .period-header th.q3-group { background: #dc2626; }
        .qtr-odds-table .sub-header th {
            background: #f1f5f9;
            color: #475569;
            font-size: 9px;
            font-weight: 700;
            padding: 5px 3px;
            text-align: center;
            text-transform: uppercase;
            border: 1px solid #e2e8f0;
        }
        .qtr-odds-table .sub-header th.q1-sub { background: #dbeafe; color: #1d4ed8; }
        .qtr-odds-table .sub-header th.ht-sub { background: #fef3c7; color: #92400e; }
        .qtr-odds-table .sub-header th.q3-sub { background: #fee2e2; color: #991b1b; }
        .qtr-odds-table td {
            padding: 6px 4px;
            text-align: center;
            border: 1px solid #e2e8f0;
            font-size: 11px;
            background: #ffffff;
        }
        .qtr-odds-table td.team-name {
            text-align: left;
            padding-left: 10px;
            font-weight: 700;
            font-size: 11px;
            background: #f8fafc;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 100px;
        }
        .qtr-odds-table td.team-name.home { color: #ea580c; }
        .qtr-odds-table td.team-name.away { color: #2563eb; }
        .qtr-odds-table td.spread { font-weight: 700; }
        .qtr-odds-table td.spread.pos { color: #16a34a; background: #f0fdf4; }
        .qtr-odds-table td.spread.neg { color: #dc2626; background: #fef2f2; }
        .qtr-odds-table td.ml { color: #475569; font-size: 10px; }
        .qtr-odds-table td.total { font-weight: 600; color: #0891b2; background: #ecfeff; }
        .qtr-odds-table td.empty { color: #cbd5e1; background: #f8fafc; }

        /* Summary Footer - Horizontal Layout */
        .stat-box-footer {
            background: #1e293b;
            color: white;
            padding: 10px 15px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .footer-total { font-size: 12px; font-weight: 700; }
        .footer-stats { display: flex; gap: 20px; }
        .footer-stat { font-size: 11px; }
        .footer-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 11px; }
        .footer-row.total { font-size: 12px; font-weight: 700; padding: 6px 0; border-bottom: 1px solid #334155; margin-bottom: 6px; }
        .footer-label { color: #94a3b8; margin-right: 5px; }
        .footer-value { font-weight: 700; }
        .footer-value.good { color: #34d399; }
        .footer-value.bad { color: #fb7185; }

        /* MASTER SUMMARY BAR */
        .master-summary-bar {
            background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
            border-radius: 8px;
            margin-top: 15px;
            padding: 15px 20px;
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 20px;
            color: white;
        }

        .master-section { text-align: center; }
        .master-section-title { font-size: 10px; color: #94a3b8; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
        .master-stats { display: flex; justify-content: center; gap: 15px; }
        .master-stat { text-align: center; }
        .master-stat-label { font-size: 9px; color: #64748b; text-transform: uppercase; }
        .master-stat-value { font-size: 18px; font-weight: 700; margin-top: 2px; }
        .master-stat-value.good { color: #34d399; }
        .master-stat-value.bad { color: #fb7185; }
        .master-stat-value.neutral { color: #fbbf24; }

        .empty-state, .loading { text-align: center; padding: 60px 20px; color: #94a3b8; }
        .spinner { border: 3px solid #f3f3f3; border-top: 3px solid #f97316; border-radius: 50%; width: 30px; height: 30px; animation: spin 1s linear infinite; margin: 0 auto 15px; }
        @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

        .connection-indicator { display: flex; align-items: center; gap: 6px; font-size: 12px; }
        .connection-dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; }
        .connection-dot.disconnected { background: #ef4444; }

        @media (max-width: 1400px) {
            .master-summary-bar { grid-template-columns: 1fr; }
            .prematch-banner { flex-direction: column; gap: 10px; }
            .stat-box-header { flex-wrap: wrap; gap: 8px; }
            .stat-box-averages { order: 3; width: 100%; justify-content: center; }
            .stat-box-footer { flex-direction: column; gap: 10px; align-items: flex-start; }
            .footer-stats { flex-wrap: wrap; }
        }

        .game-list::-webkit-scrollbar { width: 6px; }
        .game-list::-webkit-scrollbar-track { background: #f1f5f9; }
        .game-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

        /* Main Tab Navigation */
        .main-tabs {
            display: flex;
            gap: 0;
            margin-left: 30px;
        }
        .main-tab {
            padding: 10px 24px;
            border: none;
            background: rgba(255,255,255,0.1);
            color: rgba(255,255,255,0.7);
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            border-radius: 6px 6px 0 0;
        }
        .main-tab:hover { background: rgba(255,255,255,0.2); color: white; }
        .main-tab.active { background: white; color: #ea580c; }
        .main-tab .tab-badge {
            background: rgba(255,255,255,0.2);
            padding: 2px 8px;
            border-radius: 10px;
            font-size: 11px;
            margin-left: 8px;
        }
        .main-tab.active .tab-badge { background: #fed7aa; color: #c2410c; }
        .main-tab.tool-link {
            text-decoration: none;
            background: rgba(0, 153, 77, 0.2);
            border: 1px solid rgba(255,255,255,0.3);
        }
        .main-tab.tool-link:hover {
            background: rgba(0, 153, 77, 0.4);
        }

        /* Pagination */
        .pagination {
            display: none;
            align-items: center;
            gap: 10px;
            margin-left: 20px;
        }
        .pagination.show { display: flex; }
        .pagination-btn {
            padding: 6px 12px;
            border: 1px solid #e2e8f0;
            border-radius: 6px;
            background: white;
            color: #64748b;
            cursor: pointer;
            font-size: 12px;
            font-weight: 600;
        }
        .pagination-btn:hover:not(:disabled) { background: #f8fafc; border-color: #f97316; color: #ea580c; }
        .pagination-btn:disabled { opacity: 0.5; cursor: not-allowed; }
        .pagination-info { font-size: 12px; color: #64748b; }

        /* Burst Alert Notification - Bottom Left */
        .burst-alert-container {
            position: fixed;
            bottom: 20px;
            left: 20px;
            z-index: 9999;
            display: flex;
            flex-direction: column-reverse;
            gap: 10px;
            max-height: 80vh;
            overflow-y: auto;
        }
        .burst-alert {
            background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
            color: white;
            border-radius: 10px;
            padding: 12px 15px;
            min-width: 300px;
            max-width: 350px;
            box-shadow: 0 4px 20px rgba(220, 38, 38, 0.4);
            cursor: pointer;
            animation: slideInLeft 0.3s ease-out;
            transition: transform 0.2s, box-shadow 0.2s;
        }
        .burst-alert:hover {
            transform: translateX(5px);
            box-shadow: 0 6px 25px rgba(220, 38, 38, 0.5);
        }
        @keyframes slideInLeft {
            from { transform: translateX(-100%); opacity: 0; }
            to { transform: translateX(0); opacity: 1; }
        }
        .burst-alert-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
            font-weight: 700;
            font-size: 13px;
        }
        .burst-alert-close {
            background: rgba(255,255,255,0.2);
            border: none;
            color: white;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            cursor: pointer;
            font-size: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .burst-alert-close:hover { background: rgba(255,255,255,0.4); }
        .burst-alert-teams {
            font-size: 15px;
            font-weight: 600;
            margin-bottom: 6px;
        }
        .burst-alert-score {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 6px;
        }
        .burst-alert-score-main {
            font-size: 18px;
            font-weight: 700;
        }
        .burst-alert-score-diff {
            background: rgba(255,255,255,0.2);
            padding: 2px 8px;
            border-radius: 10px;
            font-size: 11px;
        }
        .burst-alert-time {
            font-size: 12px;
            opacity: 0.9;
            margin-bottom: 8px;
        }
        .burst-alert-run {
            background: rgba(255,255,255,0.15);
            padding: 6px 10px;
            border-radius: 6px;
            font-size: 12px;
            margin-bottom: 8px;
        }
        .burst-alert-id {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 11px;
            opacity: 0.8;
        }
        .burst-alert-copy {
            background: rgba(255,255,255,0.2);
            border: none;
            color: white;
            padding: 3px 8px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 10px;
        }
        .burst-alert-copy:hover { background: rgba(255,255,255,0.4); }
        .burst-alert-hint {
            font-size: 10px;
            opacity: 0.7;
            margin-top: 6px;
            text-align: center;
        }

        /* Match Notes Section in Quarter Flow */
        .qtr-flow-wrapper {
            display: flex;
            justify-content: space-between;
        }
        .qtr-flow-main {
            flex: 1;
            min-width: 0;
        }
        .qtr-flow-notes {
            width: 320px;
            flex-shrink: 0;
            background: #f8fafc;
            border-left: 2px solid #e2e8f0;
            padding: 8px;
            display: flex;
            flex-direction: column;
            margin-left: auto;
        }
        .qtr-flow-notes-header {
            font-size: 11px;
            font-weight: 600;
            color: #475569;
            margin-bottom: 5px;
        }
        .qtr-flow-notes-input {
            width: 100%;
            min-height: 90px;
            padding: 6px;
            border: 1px solid #cbd5e1;
            border-radius: 4px;
            font-size: 11px;
            font-family: inherit;
            resize: vertical;
            margin-bottom: 6px;
        }
        .qtr-flow-notes-input:focus {
            outline: none;
            border-color: #f97316;
            box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2);
        }
        .qtr-flow-notes-input::placeholder {
            color: #94a3b8;
        }
        .qtr-flow-notes-history {
            flex: 1;
            overflow-y: auto;
            max-height: 100px;
            font-size: 10px;
        }
        .qtr-flow-note-item {
            padding: 4px 0;
            border-bottom: 1px solid #e2e8f0;
            color: #334155;
        }
        .qtr-flow-note-item:last-child {
            border-bottom: none;
        }
        .qtr-flow-note-time {
            color: #64748b;
            font-size: 9px;
        }
        .qtr-flow-note-text {
            margin-top: 1px;
            word-wrap: break-word;
        }
        .qtr-flow-notes-send {
            background: #f97316;
            color: white;
            border: none;
            border-radius: 4px;
            padding: 6px 12px;
            font-size: 11px;
            font-weight: 600;
            cursor: pointer;
            margin-bottom: 6px;
            transition: background 0.2s;
        }
        .qtr-flow-notes-send:hover {
            background: #ea580c;
        }
        .qtr-flow-notes-send:active {
            background: #c2410c;
        }

        /* ========== MOBILE-FRIENDLY STYLES ========== */
        /* These styles ONLY apply to screens smaller than 1200px - desktop is unaffected */
        @media screen and (max-width: 1200px) {
            /* Enable horizontal scrolling on mobile */
            html, body {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }

            .main-container {
                padding: 5px;
                overflow-x: scroll;
                -webkit-overflow-scrolling: touch;
            }

            .match-table {
                overflow: visible;
            }

            /* Larger touch targets */
            .time-btn, .pagination-btn {
                min-height: 44px;
                min-width: 44px;
                font-size: 14px;
            }

            /* Better header on mobile */
            .header {
                padding: 10px 15px;
                flex-wrap: wrap;
                gap: 10px;
            }

            .header h1 {
                font-size: 16px;
            }

            /* Controls wrap nicely */
            .controls {
                flex-wrap: wrap;
                gap: 8px;
                padding: 10px;
            }

            .time-filters {
                flex-wrap: wrap;
                gap: 5px;
            }

            /* Search input full width on mobile */
            .unified-search-container {
                min-width: 100%;
            }

            .unified-search-input {
                font-size: 16px; /* Prevents iOS zoom on focus */
            }

            /* Stats badges more compact */
            .stats-bar {
                font-size: 11px;
                gap: 5px;
            }

            /* Tab buttons */
            .main-tabs {
                flex-wrap: wrap;
                gap: 5px;
            }

            .main-tab {
                font-size: 12px;
                padding: 6px 10px;
            }
        }

        /* Extra small screens */
        @media screen and (max-width: 600px) {
            .header h1 {
                font-size: 14px;
            }

            .time-btn {
                padding: 8px 10px;
                font-size: 12px;
            }

            .refresh-order-btn {
                margin-left: 0 !important;
                margin-top: 5px;
            }
        }

        /* PWA standalone mode adjustments */
        @media all and (display-mode: standalone) {
            body {
                padding-top: env(safe-area-inset-top);
                padding-bottom: env(safe-area-inset-bottom);
            }

            .header {
                padding-top: calc(10px + env(safe-area-inset-top));
            }
        }

        /* Floating Snapshot Button - Messenger style */
        .snapshot-float {
            position: fixed;
            bottom: 80px;
            right: 20px;
            width: 56px;
            height: 56px;
            background: linear-gradient(135deg, #0084ff 0%, #0066cc 100%);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            cursor: grab;
            z-index: 99999;
            box-shadow: 0 4px 12px rgba(0,0,0,0.3), 0 2px 4px rgba(0,0,0,0.2);
            user-select: none;
            touch-action: none;
            transition: transform 0.1s, box-shadow 0.2s;
        }
        .snapshot-float:hover {
            transform: scale(1.1);
            box-shadow: 0 6px 16px rgba(0,0,0,0.4);
        }
        .snapshot-float:active, .snapshot-float.dragging {
            cursor: grabbing;
            transform: scale(1.15);
            box-shadow: 0 8px 24px rgba(0,0,0,0.5);
        }
        .snapshot-float::after {
            content: '';
            position: absolute;
            width: 14px;
            height: 14px;
            background: #22c55e;
            border-radius: 50%;
            bottom: 2px;
            right: 2px;
            border: 2px solid white;
        }
