/* ===================================
   PRDICTIX DARK SPORTS ANALYTICS UI
   Design System v6.0
   =================================== */

/* === CSS VARIABLES === */
:root {
    /* Background Colors */
    --bg-primary: #0B0D12;
    --bg-surface: #121520;
    --bg-elevated: #171B27;
    --bg-divider: #22283A;
    
    /* Accent Colors */
    --accent-green: #22E07D;
    --accent-cyan: #22D3EE;
    --accent-amber: #F59E0B;
    --accent-red: #F43F5E;
    
    /* Text Colors */
    --text-primary: #E6ECF5;
    --text-body: #B7C0D1;
    --text-secondary: #8A94A9;
    --text-muted: #6B7280;
    
    /* Gradients */
    --gradient-model: linear-gradient(90deg, rgba(64, 48, 163, 0.18) 0%, rgba(107, 33, 168, 0.18) 100%);
    --gradient-best-bet: linear-gradient(135deg, #059669 0%, #047857 100%);
    
    /* Spacing (8pt scale) */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    
    /* Border Radius */
    --radius-xs: 8px;
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-pill: 999px;
    
    /* Shadows */
    --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.28);
    --shadow-elevated: 0 10px 30px rgba(5, 12, 28, 0.45);
    --shadow-glow-green: 0 0 20px rgba(34, 224, 125, 0.3);
    --shadow-glow-red: 0 0 20px rgba(244, 63, 94, 0.3);
    
    /* Typography */
    --font-heading: 'Saira Condensed', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
}

/* === KEYFRAME ANIMATIONS === */
/* Small Flame Animation (2 units) */
@keyframes flameSmall {
    0%, 100% { 
        transform: translateY(0) scale(1);
        opacity: 0.8;
    }
    50% { 
        transform: translateY(-3px) scale(1.1);
        opacity: 1;
    }
}

/* Large Flame Animation (3 units) */
@keyframes flameLarge {
    0%, 100% { 
        transform: translateY(0) scale(1) rotate(-5deg);
        opacity: 0.9;
    }
    25% {
        transform: translateY(-5px) scale(1.15) rotate(5deg);
        opacity: 1;
    }
    50% { 
        transform: translateY(-8px) scale(1.2) rotate(-3deg);
        opacity: 0.95;
    }
    75% {
        transform: translateY(-4px) scale(1.1) rotate(3deg);
        opacity: 1;
    }
}

/* Glow Pulse for 3 units */
@keyframes glowPulse {
    0%, 100% { 
        box-shadow: 0 0 10px rgba(251, 146, 60, 0.4),
                    0 0 20px rgba(251, 146, 60, 0.2);
    }
    50% { 
        box-shadow: 0 0 20px rgba(251, 146, 60, 0.6),
                    0 0 30px rgba(251, 146, 60, 0.3),
                    0 0 40px rgba(251, 146, 60, 0.1);
    }
}

/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-body);
    background: var(--bg-primary);
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

/* === HEADER === */
header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--bg-divider);
    padding: var(--space-4) var(--space-4);
    margin-bottom: var(--space-6);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.site-header {
    max-width: 1200px;
    margin: 0 auto;
}

.brand {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-green);
    text-decoration: none;
    text-transform: lowercase;
    letter-spacing: -0.5px;
    display: inline-block;
    margin-bottom: 0;
    text-shadow: 0 0 20px rgba(34, 224, 125, 0.4);
    transition: all 0.3s;
}

.brand-logo {
    height: 65px;
    width: auto;
    display: block;
    filter: drop-shadow(0 0 20px rgba(34, 224, 125, 0.4));
    transition: filter 0.3s;
}

.brand:hover {
    text-shadow: 0 0 30px rgba(34, 224, 125, 0.6);
}

.brand:hover .brand-logo {
    filter: drop-shadow(0 0 30px rgba(34, 224, 125, 0.6));
}

.header-top {
    display: flex;
    align-items: baseline;
    gap: var(--space-3);
    margin-bottom: var(--space-2);
}

.tagline {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.5px;
}

nav {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

nav a svg {
    opacity: 0.7;
    transition: opacity 0.2s;
}

nav a:hover {
    color: var(--accent-cyan);
    background: rgba(34, 211, 238, 0.1);
}

nav a:hover svg {
    opacity: 1;
}

nav a.active {
    color: var(--accent-green);
    background: rgba(34, 224, 125, 0.1);
    border: 1px solid rgba(34, 224, 125, 0.2);
}

nav a.active svg {
    opacity: 1;
}

header h1 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--space-1);
    letter-spacing: -0.3px;
}

#last-updated {
    color: var(--text-secondary);
    font-size: 13px;
}

/* === MAIN CONTAINER === */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-4) var(--space-8);
    min-height: 60vh;
}

/* === LOADING & EMPTY STATES === */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-10) var(--space-4);
    gap: var(--space-4);
}

.loading-spinner {
    position: relative;
}

.spinner-icon {
    color: var(--accent-cyan);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: var(--text-secondary);
    font-size: 15px;
}

.empty-state {
    text-align: center;
    padding: var(--space-10) var(--space-4);
}

.empty-state h3 {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
}

.empty-state-action {
    padding: var(--space-2) var(--space-4);
    background: var(--accent-cyan);
    color: var(--bg-primary);
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.empty-state-action:hover {
    background: var(--accent-green);
    transform: translateY(-1px);
}

/* === FILTER SECTION === */
.filter-section {
    max-width: 1200px;
    margin: 0 auto var(--space-6);
    background: var(--bg-surface);
    border-radius: 0; /* Match header's sharp corners */
    padding: var(--space-4);
    border: 1px solid var(--bg-divider);
}

/* Quick Controls */
.quick-controls {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.search-container {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.search-icon {
    position: absolute;
    left: var(--space-3);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    transition: color 0.2s;
}

.search-input {
    width: 100%;
    padding: var(--space-2) var(--space-4) var(--space-2) 40px;
    font-size: 14px;
    border: 1px solid var(--bg-divider);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-family: var(--font-body);
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1), 0 0 20px rgba(34, 211, 238, 0.2);
    background: var(--bg-surface);
}

.search-input:focus + .search-icon {
    color: var(--accent-cyan);
}

.search-clear {
    position: absolute;
    right: var(--space-3);
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    display: none;
    transition: color 0.2s;
}

.search-clear:hover {
    color: var(--text-primary);
}

.search-input:not(:placeholder-shown) ~ .search-clear {
    display: block;
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* Toggle Switch */
.show-bets-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    border: 1px solid var(--bg-divider);
}

.toggle-label-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.toggle-state-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 80px;
}

/* Slider Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--accent-cyan);
    transition: 0.3s;
    border-radius: var(--radius-pill);
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--accent-green);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* Filter Button */
.filter-button {
    padding: var(--space-2) var(--space-4);
    background: var(--bg-elevated);
    border: 1px solid var(--bg-divider);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    position: relative;
}

.filter-button:hover {
    background: var(--bg-divider);
    border-color: var(--accent-cyan);
}

.filter-button.active {
    border-color: var(--accent-green);
    background: rgba(34, 224, 125, 0.1);
}

.filter-icon {
    color: var(--text-secondary);
    transition: color 0.2s;
}

.filter-button:hover .filter-icon {
    color: var(--accent-cyan);
}

.filter-badge {
    background: var(--accent-green);
    color: var(--bg-primary);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-pill);
    min-width: 18px;
    text-align: center;
}

.toggle-arrow {
    transition: transform 0.3s ease;
    color: var(--text-secondary);
}

.filter-button.active .toggle-arrow {
    transform: rotate(180deg);
}

/* Game Count */
.game-count {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.count-visual {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    border: 1px solid var(--bg-divider);
}

.count-icon {
    color: var(--accent-cyan);
}

.count-text {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.count-highlight {
    color: var(--accent-green);
    font-weight: 700;
    font-family: var(--font-mono);
}

/* Advanced Filters */
.advanced-filters {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.advanced-filters.show {
    max-height: 500px;
    opacity: 1;
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--bg-divider);
}

.filters-container {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-3);
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--bg-divider);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.filters-container.visible {
    display: grid;
    max-height: 500px;
    opacity: 1;
    margin-bottom: var(--space-3);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

/* Special styling for button-only filter groups */
.filter-group:has(.clear-btn) {
    justify-content: flex-end;
}

.filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select {
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--bg-divider);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

.reset-button {
    padding: var(--space-2) var(--space-4);
    background: transparent;
    border: 1px solid var(--bg-divider);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.reset-button:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
    background: rgba(244, 63, 94, 0.1);
}

/* === GAME CARDS === */
.game-card {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin-bottom: var(--space-4);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--bg-divider);
    border-left: 4px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, transparent, var(--accent-green), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.game-card:hover {
    border-color: rgba(34, 211, 238, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.game-card:hover::before {
    opacity: 0.6;
}

.game-card[data-ev-level="high"] {
    border-left-color: var(--accent-green);
}

.game-card[data-ev-level="medium"] {
    border-left-color: var(--accent-cyan);
}

.game-card[data-ev-level="low"] {
    border-left-color: var(--accent-amber);
}

.game-card.filtered-out {
    display: none;
}

.game-card .no-bet-indicator {
    padding: var(--space-3);
    text-align: center;
    border: 1px dashed var(--bg-divider);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-style: italic;
    margin-top: var(--space-2);
}

/* Game Header */
.game-header {
    border-bottom: 1px solid var(--bg-divider);
    padding-bottom: var(--space-3);
    margin-bottom: var(--space-4);
}

.matchup {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--space-1);
    color: var(--text-primary);
}

.kickoff {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}

/* Model Prediction Section */
.model-prediction {
    background: var(--gradient-model);
    border: 1px solid rgba(107, 33, 168, 0.3);
    border-radius: var(--radius-sm);
    padding: var(--space-4);
    margin-bottom: var(--space-4);
    position: relative;
    overflow: hidden;
}

.model-prediction::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(107, 33, 168, 0.1));
    pointer-events: none;
}

.prediction-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-bottom: var(--space-2);
    position: relative;
    z-index: 1;
}

.prediction-header .label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(147, 51, 234, 0.9);
    background: rgba(147, 51, 234, 0.15);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-xs);
}

.prediction-main {
    display: flex;
    align-items: baseline;
    gap: var(--space-3);
    position: relative;
    z-index: 1;
}

.prediction-line {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-body);
}

.prediction-prob {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-cyan);
    font-family: var(--font-mono);
}

/* Best Bet Section */
.best-bet-section {
    margin-bottom: var(--space-4);
}

.best-bet-badge {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-green);
    margin-bottom: var(--space-2);
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

/* Bet Option Cards */
.bet-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.2s;
    border: 2px solid transparent;
    margin-bottom: var(--space-2);
    position: relative;
    overflow: hidden;
}

.bet-option.best {
    background: var(--gradient-best-bet);
    border-color: #047857;
    box-shadow: var(--shadow-elevated);
    position: relative;
}

/* Raining Money Pattern - Enhanced */
.bet-option.best::before {
    content: '$ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $';
    position: absolute;
    top: -100%;
    left: -20%;
    width: 140%;
    height: 300%;
    font-size: 42px;
    font-weight: 900;
    line-height: 1.4;
    letter-spacing: 20px;
    word-spacing: 0;
    color: rgba(255, 255, 255, 0.10);
    transform: rotate(-22deg);
    white-space: pre-wrap;
    word-wrap: break-word;
    pointer-events: none;
    z-index: 0;
    mask-image: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.5) 25%,
        rgba(0, 0, 0, 0.7) 50%,
        rgba(0, 0, 0, 0.9) 75%,
        rgba(0, 0, 0, 1) 100%
    );
    -webkit-mask-image: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.5) 25%,
        rgba(0, 0, 0, 0.7) 50%,
        rgba(0, 0, 0, 0.9) 75%,
        rgba(0, 0, 0, 1) 100%
    );
}

.bet-option.best::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
}

.bet-option.best:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(5, 150, 105, 0.4);
}

.bet-option.best .bet-book,
.bet-option.best .bet-line,
.bet-option.best .bet-price,
.bet-option.best .bet-ev,
.bet-option.best .bet-units {
    color: white;
    position: relative;
    z-index: 1;
}

/* Positive EV options */
.bet-option.positive {
    background: rgba(34, 224, 125, 0.05);
    border-color: rgba(34, 224, 125, 0.2);
}

.bet-option.positive:hover {
    background: rgba(34, 224, 125, 0.08);
    border-color: rgba(34, 224, 125, 0.4);
    transform: translateY(-1px);
}

/* Negative EV options */
.bet-option.negative {
    background: rgba(244, 63, 94, 0.05);
    border-color: rgba(244, 63, 94, 0.2);
}

.bet-option.negative:hover {
    background: rgba(244, 63, 94, 0.08);
    border-color: rgba(244, 63, 94, 0.4);
}

/* Bet option content */
.bet-main {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex: 1;
    position: relative;
    z-index: 1;
}

.bet-book {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    min-width: 80px;
    letter-spacing: 0.3px;
}

.bet-option.best .bet-book {
    color: rgba(255, 255, 255, 0.9);
}

.bet-line {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 140px;
    font-family: var(--font-body);
}

.bet-option.best .bet-line {
    color: white;
}

.bet-price {
    font-size: 14px;
    color: var(--text-secondary);
    min-width: 50px;
    font-family: var(--font-mono);
}

.bet-option.best .bet-price {
    color: rgba(255, 255, 255, 0.9);
}

/* Line Movement Trend Indicators */
.trend-up,
.trend-down {
    font-size: 10px;
    margin-left: 4px;
    display: inline-block;
    font-weight: 700;
}

.trend-up {
    color: var(--accent-green);
}

.trend-down {
    color: var(--accent-red);
}

.bet-option.best .trend-up,
.bet-option.best .trend-down {
    color: white;
    opacity: 0.9;
}

/* Bet metrics */
.bet-metrics {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    position: relative;
    z-index: 1;
}

.bet-ev {
    font-size: 13px;
    font-weight: 700;
    padding: 4px var(--space-2);
    border-radius: var(--radius-xs);
    min-width: 70px;
    text-align: center;
    font-family: var(--font-mono);
}

.bet-ev.positive {
    color: var(--accent-green);
    background-color: rgba(34, 224, 125, 0.15);
}

.bet-option.best .bet-ev.positive {
    background-color: rgba(255, 255, 255, 0.25);
    color: white;
}

.bet-ev.negative {
    color: var(--accent-red);
    background-color: rgba(244, 63, 94, 0.15);
}

.bet-units {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    background-color: rgba(139, 148, 169, 0.15);
    padding: 4px var(--space-2);
    border-radius: var(--radius-xs);
    min-width: 45px;
    text-align: center;
    font-family: var(--font-mono);
    position: relative;
    transition: all 0.3s ease;
}

/* 2 Unit Tier - Hot (small flames) */
.bet-units.hot {
    font-size: 14px;
    font-weight: 700;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.25) 0%, rgba(249, 115, 22, 0.25) 100%);
    color: #FB923C;
    border: 1px solid rgba(251, 146, 60, 0.3);
}

.bet-units.hot::before {
    content: '🔥';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    animation: flameSmall 0.8s ease-in-out infinite;
}

/* 3 Unit Tier - Fire (large flames, burning fireball) */
.bet-units.fire {
    font-size: 16px;
    font-weight: 800;
    padding: 8px 16px;
    background: linear-gradient(135deg, #FB923C 0%, #F97316 50%, #EA580C 100%);
    color: white;
    border: 2px solid #FB923C;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    animation: glowPulse 2s ease-in-out infinite;
}

.bet-units.fire::before {
    content: '🔥';
    position: absolute;
    top: -16px;
    left: 20%;
    font-size: 18px;
    animation: flameLarge 1s ease-in-out infinite;
}

.bet-units.fire::after {
    content: '🔥';
    position: absolute;
    top: -16px;
    right: 20%;
    font-size: 18px;
    animation: flameLarge 1s ease-in-out infinite 0.3s;
}

.bet-option.best .bet-units {
    background-color: rgba(255, 255, 255, 0.25);
    color: white;
}

/* AI-generated bet analysis */
.bet-analysis {
    margin-top: var(--space-3);
    padding: var(--space-3);
    background-color: rgba(139, 148, 169, 0.08);
    border-radius: var(--radius-sm);
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
    font-style: italic;
    border-left: 3px solid rgba(139, 148, 169, 0.3);
}

.bet-option.best .bet-analysis {
    background-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    border-left-color: rgba(255, 255, 255, 0.4);
}

.book-row .bet-analysis {
    margin-top: var(--space-2);
    padding: var(--space-2);
    font-size: 12px;
}

/* AI Analysis Section - Collapsible */
.analysis-section {
    margin-top: var(--space-4);
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    transition: background-color 0.2s ease;
}

.analysis-header:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(99, 102, 241, 0.15) 100%);
}

.analysis-header .header-text {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.analysis-header .toggle-icon {
    font-size: 12px;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.analysis-content {
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.analysis-content.collapsed {
    max-height: 0;
}

.analysis-text {
    padding: var(--space-4);
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
    background-color: rgba(139, 148, 169, 0.03);
}

/* Override for hot/fire units in best bet */
.bet-option.best .bet-units.hot {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.4) 0%, rgba(249, 115, 22, 0.4) 100%);
    color: #FED7AA;
}

.bet-option.best .bet-units.fire {
    background: linear-gradient(135deg, #FB923C 0%, #F97316 50%, #EA580C 100%);
    color: white;
}

/* No Best Bet Card */
.no-best-bet-card {
    margin-bottom: var(--space-4);
}

.no-best-bet-message {
    background: rgba(139, 148, 169, 0.1);
    border: 1px solid var(--bg-divider);
    color: var(--text-secondary);
    padding: var(--space-3);
    border-radius: var(--radius-sm);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    font-size: 14px;
}

/* Collapsible Section */
.collapsible-section {
    margin-top: var(--space-4);
}

.collapsible-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--bg-elevated);
    border: 1px solid var(--bg-divider);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: var(--space-2);
}

.collapsible-header:hover {
    background: var(--bg-divider);
    border-color: var(--accent-cyan);
}

.collapsible-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.collapse-icon {
    font-size: 14px;
    color: var(--text-secondary);
    transition: transform 0.2s;
    flex-shrink: 0;
}

.collapsible-header.active .collapse-icon {
    transform: rotate(180deg);
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.collapsible-content.show {
    max-height: 2000px;
}

/* Other Lines Section */
.other-lines-section {
    background: var(--bg-elevated);
    border: 1px solid var(--bg-divider);
    border-radius: var(--radius-sm);
    padding: var(--space-3);
}

.books-compact-header {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-2) var(--space-3);
    background: var(--bg-elevated);
    border-radius: var(--radius-xs);
    transition: all 0.2s;
}

.books-compact-header:hover {
    background: var(--bg-surface);
}

.toggle-icon {
    font-size: 11px;
    transition: transform 0.2s;
}

.books-compact-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 1;
    margin-top: var(--space-2);
}

.books-compact-list.collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.section-header {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
}

.book-rows {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 1;
    margin-top: var(--space-3);
}

.book-rows.collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.books-compact-header {
    cursor: pointer;
    user-select: none;
}

.show-all-books-btn {
    width: 100%;
    padding: var(--space-2);
    margin-top: var(--space-2);
    background: var(--bg-surface);
    border: 1px solid var(--bg-divider);
    border-radius: var(--radius-xs);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.show-all-books-btn:hover {
    background: var(--bg-elevated);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.book-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-2) var(--space-3);
    background: var(--bg-surface);
    border-radius: var(--radius-xs);
    border: 1px solid transparent;
    transition: all 0.2s;
}

.book-row:hover {
    border-color: var(--bg-divider);
    background: var(--bg-primary);
}

.book-row.positive {
    border-left: 3px solid var(--accent-green);
}

.book-row.negative {
    border-left: 3px solid var(--accent-red);
}

.book-row-name {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    min-width: 100px;
    letter-spacing: 0.3px;
}

.book-row-bet {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex: 1;
}

.row-team {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 120px;
}

.row-line {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.row-price {
    font-size: 12px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.row-ev {
    font-size: 12px;
    font-weight: 700;
    padding: 2px var(--space-2);
    border-radius: var(--radius-xs);
    min-width: 65px;
    text-align: center;
    font-family: var(--font-mono);
}

.row-ev.positive {
    color: var(--accent-green);
    background-color: rgba(34, 224, 125, 0.15);
}

.row-ev.negative {
    color: var(--accent-red);
    background-color: rgba(244, 63, 94, 0.15);
}

.row-units {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    background-color: rgba(139, 148, 169, 0.15);
    padding: 2px var(--space-2);
    border-radius: var(--radius-xs);
    min-width: 40px;
    text-align: center;
    font-family: var(--font-mono);
}

/* === LOADING & EMPTY STATES === */
.loading {
    text-align: center;
    padding: var(--space-10);
    color: var(--text-secondary);
    font-size: 15px;
}

.no-games {
    text-align: center;
    padding: var(--space-10) var(--space-4);
    color: var(--text-secondary);
    font-size: 16px;
}

/* === FOOTER === */
/* === FOOTER === */
footer {
    max-width: 1200px;
    margin: var(--space-10) auto 0;
    padding: var(--space-8) var(--space-4);
    color: var(--text-secondary);
    font-size: 13px;
    border-top: 1px solid var(--bg-divider);
}

.footer-stats {
    background: var(--bg-surface);
    border: 1px solid var(--bg-divider);
    border-radius: var(--radius-sm);
    padding: var(--space-3) var(--space-4);
    margin-bottom: var(--space-4);
}

.stats-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    flex-wrap: wrap;
    font-size: 14px;
}

.stats-line strong {
    color: var(--text-primary);
}

.stats-line span {
    color: var(--accent-green);
    font-family: var(--font-mono);
    font-weight: 600;
}

.footer-section {
    margin-bottom: var(--space-3);
    text-align: left;
}

.footer-section summary {
    cursor: pointer;
    padding: var(--space-2) var(--space-3);
    background: var(--bg-surface);
    border: 1px solid var(--bg-divider);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all 0.2s;
    list-style: none;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.footer-section summary::-webkit-details-marker {
    display: none;
}

.footer-section summary::before {
    content: '▶';
    font-size: 10px;
    color: var(--text-secondary);
    transition: transform 0.2s;
}

.footer-section[open] summary::before {
    transform: rotate(90deg);
}

.footer-section summary:hover {
    background: var(--bg-elevated);
    border-color: var(--accent-cyan);
}

.footer-section p {
    padding: var(--space-3);
    margin-top: var(--space-2);
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    line-height: 1.6;
}

.footer-links {
    margin-top: var(--space-6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-4);
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--bg-surface);
    border: 1px solid var(--bg-divider);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.github-link:hover {
    background: var(--bg-elevated);
    border-color: var(--accent-cyan);
    transform: translateX(2px);
}

.github-link svg {
    transition: transform 0.2s;
}

.github-link:hover .arrow-icon {
    transform: translateX(2px);
}

.last-sync {
    font-size: 12px;
    color: var(--text-muted);
}

.last-sync span {
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

/* === MOBILE RESPONSIVE === */
@media (max-width: 768px) {
    body {
        padding: 0;
    }
    
    header {
        padding: var(--space-3);
    }
    
    header h1 {
        font-size: 18px;
    }
    
    main {
        padding: 0 var(--space-3) var(--space-6);
    }
    
    /* Quick controls mobile */
    .quick-controls {
        flex-direction: column;
        gap: var(--space-2);
    }
    
    .search-container {
        width: 100%;
        min-width: unset;
    }
    
    .show-bets-toggle {
        width: 100%;
        justify-content: space-between;
    }
    
    .filter-button {
        width: 100%;
    }
    
    .game-count {
        width: 100%;
        text-align: center;
    }
    
    /* Game cards mobile */
    .game-card {
        padding: var(--space-3);
        margin-bottom: var(--space-3);
    }
    
    .matchup {
        font-size: 16px;
    }
    
    /* Bet option cards mobile */
    .bet-option {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-2);
    }
    
    .bet-option.best::before {
        font-size: 32px;
        letter-spacing: 18px;
        line-height: 1.8;
    }
    
    .bet-main {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .bet-metrics {
        width: 100%;
        justify-content: flex-start;
    }
    
    /* Book rows mobile */
    .book-row {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-2);
    }
    
    .book-row-bet {
        width: 100%;
        flex-wrap: wrap;
    }
    
    /* Filters mobile */
    .filters-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .matchup {
        font-size: 15px;
    }
    
    .prediction-line {
        font-size: 14px;
    }
    
    .bet-line {
        font-size: 14px;
    }
}

/* === ANIMATIONS === */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-card {
    animation: fadeIn 0.3s ease-out;
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible */
*:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 2px;
}

/* === RESULTS PAGE STYLES === */

/* Main container - matches header width */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-4) var(--space-8);
}

/* Filters always visible on results page */
.results-page .filters-container {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(20, 20, 25, 0.95);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-height: none;
    opacity: 1;
    position: sticky;
    top: 70px;
    z-index: 100;
    backdrop-filter: blur(10px);
}

/* Performance Summary Cards */
.performance-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.stat-card {
    background: linear-gradient(135deg, rgba(30, 30, 35, 0.95), rgba(25, 25, 30, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.2s, border-color 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.stat-card.highlight {
    border-color: var(--accent-cyan);
    background: linear-gradient(135deg, rgba(30, 35, 40, 0.95), rgba(25, 30, 35, 0.95));
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.stat-value.positive {
    color: var(--accent-green);
}

.stat-value.negative {
    color: var(--accent-red);
}

.stat-sublabel {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Quick Insights */
.results-insights {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-4);
    background: rgba(20, 20, 25, 0.5);
    border-radius: 12px;
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
}

.insight-chip {
    flex: 1;
    min-width: 200px;
    padding: var(--space-3);
    background: rgba(30, 30, 35, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.insight-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    font-weight: 600;
}

.insight-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.insight-value.positive {
    color: var(--accent-green);
}

.insight-value.negative {
    color: var(--accent-red);
}

/* Results Table */
.results-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: rgba(20, 20, 25, 0.5);
    border-radius: 12px;
    overflow: hidden;
}

.results-table thead {
    background: linear-gradient(135deg, rgba(30, 30, 35, 0.95), rgba(25, 25, 30, 0.95));
}

.results-table thead.sticky-header {
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.results-table th {
    padding: 1rem;
    text-align: left;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.results-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
}

.results-table th.sortable:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent-primary);
}

.results-table th.sortable:active {
    transform: scale(0.98);
}

.results-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.2s;
}

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

.results-table td {
    padding: 1rem;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.result-row.win {
    border-left: 3px solid var(--accent-green);
}

.result-row.loss {
    border-left: 3px solid var(--accent-red);
}

.result-row.push {
    border-left: 3px solid var(--text-secondary);
}

.date-cell {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.matchup-cell {
    font-weight: 500;
}

.bet-cell {
    color: var(--accent-cyan);
}

.odds-cell {
    font-family: 'Courier New', monospace;
}

.score-cell {
    font-family: 'Courier New', monospace;
    color: var(--text-secondary);
}

.result-cell {
    font-weight: 600;
}

.result-cell.win {
    color: var(--accent-green);
}

.result-cell.loss {
    color: var(--accent-red);
}

.result-cell.push {
    color: var(--text-secondary);
}

.profit-cell {
    font-weight: 700;
    font-size: 1rem;
}

.profit-cell.positive {
    color: var(--accent-green);
}

.profit-cell.negative {
    color: var(--accent-red);
}

/* Filter Inputs for Results Page */
.filter-input, .filter-select {
    width: 100%;
    padding: 0.6rem 0.8rem;
    background: rgba(30, 30, 35, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.2s;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--accent-cyan);
    background: rgba(30, 30, 35, 0.95);
}

.filter-input::placeholder {
    color: var(--text-secondary);
}

.clear-btn {
    width: 100%;
    padding: 0.6rem 0.8rem; /* Match filter input padding exactly */
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.3);
    border-radius: 8px;
    color: var(--accent-red);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: auto; /* Push to bottom of flex container */
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-btn:hover {
    background: rgba(255, 59, 48, 0.2);
    border-color: var(--accent-red);
}

/* No results message */
.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.error {
    text-align: center;
    padding: 3rem;
    color: var(--accent-red);
    font-size: 1.1rem;
}

.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    /* Container padding on mobile */
    .container {
        padding: 0 var(--space-3) var(--space-6);
    }
    
    .site-header {
        padding: 0 var(--space-3);
    }
    
    /* Performance summary - stack on mobile */
    .performance-summary {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
        margin: 1.5rem 0;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .stat-sublabel {
        font-size: 0.7rem;
    }
    
    /* Filters - 1 column on mobile */
    .results-page .filters-container {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 1rem;
        margin: 1.5rem 0;
    }
    
    .filter-input,
    .filter-select,
    .clear-btn {
        font-size: 14px;
    }
    
    /* Results table - horizontal scroll */
    .results-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 calc(var(--space-3) * -1);
        padding: 0 var(--space-3);
    }
    
    .results-table {
        font-size: 0.75rem;
        min-width: 700px; /* Minimum width before scrolling */
    }
    
    .results-table th,
    .results-table td {
        padding: 0.5rem 0.4rem;
        white-space: nowrap;
    }
    
    /* Make some columns more compact on mobile */
    .date-cell,
    .odds-cell,
    .units-cell,
    .ev-cell {
        font-size: 0.7rem;
    }
    
    .score-cell,
    .result-cell,
    .profit-cell {
        font-weight: 600;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-2) var(--space-4);
    }
    
    .site-header {
        padding: 0 var(--space-2);
    }
    
    .brand-logo {
        height: 50px;
    }
    
    header h1 {
        font-size: 16px;
    }
    
    /* Performance summary - full stack on tiny screens */
    .performance-summary {
        grid-template-columns: 1fr;
    }
    
    .stat-value {
        font-size: 1.75rem;
    }
    
    /* Table even more compact */
    .results-table {
        font-size: 0.7rem;
    }
    
    .results-table th,
    .results-table td {
        padding: 0.4rem 0.3rem;
    }
}

/* Landscape mobile - better utilize horizontal space */
@media (max-width: 900px) and (orientation: landscape) {
    .performance-summary {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
    }
    
    .stat-card {
        padding: 0.75rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
}

/* ===================================
   ALL GAMES SECTION (COLLAPSIBLE)
   =================================== */

.all-games-section {
    margin: var(--space-8) auto;
    max-width: 1200px;
    padding: 0 var(--space-4);
}

.all-games-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-5);
    background: var(--bg-surface);
    border: 1px solid var(--bg-divider);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.2s ease;
    user-select: none;
}

.all-games-header:hover {
    background: var(--bg-elevated);
    border-color: rgba(34, 224, 125, 0.3);
}

.all-games-header svg {
    transition: transform 0.2s ease;
    color: var(--accent-green);
}

details[open] .all-games-header svg {
    transform: rotate(180deg);
}

.all-games-content {
    margin-top: var(--space-4);
    display: grid;
    gap: var(--space-4);
}

.all-games-content .game-card {
    opacity: 0.85;
}

.all-games-content .game-card:hover {
    opacity: 1;
}

/* No bet indicator */
.all-games-content .game-card .bet-info {
    opacity: 0.5;
}

.all-games-content .game-card .no-bet-indicator {
    padding: var(--space-3);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-style: italic;
}

/* Line Movement History Section */
.line-history-section {
  margin-top: var(--space-4);
  border-top: 1px solid var(--bg-divider);
  padding-top: var(--space-3);
}

.line-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3);
  background: var(--bg-elevated);
  border: 1px solid var(--bg-divider);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: all 0.2s ease;
  user-select: none;
}

.line-history-header:hover {
  background: var(--bg-elevated);
  border-color: rgba(34, 224, 125, 0.3);
}

.line-history-header .toggle-icon {
  transition: transform 0.2s ease;
  color: var(--accent-green);
  font-size: 0.75rem;
}

.line-history-section:not(.collapsed) .line-history-header .toggle-icon {
  transform: rotate(180deg);
}

.line-history-content {
  margin-top: var(--space-3);
  padding: var(--space-4);
  background: var(--bg-surface);
  border: 1px solid var(--bg-divider);
  border-radius: var(--radius-sm);
}

.line-history-controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.line-history-controls label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.book-selector {
  padding: var(--space-2) var(--space-3);
  background: var(--bg-elevated);
  border: 1px solid var(--bg-divider);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.book-selector:hover {
  border-color: rgba(34, 224, 125, 0.3);
}

.book-selector:focus {
  outline: none;
  border-color: var(--accent-green);
  box-shadow: 0 0 0 2px rgba(34, 224, 125, 0.1);
}

.line-history-chart-container {
  height: 300px;
  position: relative;
}

.line-history-chart-container canvas {
  max-height: 100%;
}

.line-history-loading {
  display: none;
  text-align: center;
  padding: var(--space-4);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-style: italic;
}

.no-data-message,
.error-message {
  text-align: center;
  padding: var(--space-4);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-style: italic;
}

.error-message {
  color: var(--accent-red);
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .line-history-chart-container {
    height: 250px;
  }
  
  .line-history-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .book-selector {
    width: 100%;
  }
  
  .results-insights {
    flex-direction: column;
  }
  
  .insight-chip {
    min-width: 100%;
  }
}
