/* Suppress all transitions during bulk DOM rebuilds */
body.no-transitions *,
body.no-transitions *::before,
body.no-transitions *::after {
    transition: none !important;
    animation: none !important;
}

/* Prevent layout shifts and flickering on mobile */
@media (max-width: 768px) {
    .match-card { will-change: auto; contain: layout style; }
    .match-odds-compact { will-change: auto; }
    .odds-compact-btn, .odds-quick-btn { will-change: auto; }
    .match-body { will-change: auto; }
    .league-row { will-change: auto; }
    .section { min-height: 0; }
    #leaguesGrid, #liveMatches, #upcomingMatches {
        -webkit-overflow-scrolling: touch;
        overflow-anchor: auto;
    }
}

/* Mobile header buttons (Live | Upcoming merged pill, mobile only) */
.mobile-center-btns {
    display: none;
    align-items: center;
    margin: 0 auto;
    flex: 1;
    justify-content: center;
}
.mobile-merged-nav {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    white-space: nowrap;
    background: rgba(0,0,0,0.3);
    border-radius: 16px;
    padding: 0;
}
.mobile-nav-live {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    padding: 7px 10px;
    color: #FFDF1B;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    border-radius: 16px 0 0 16px;
}
.mobile-nav-live:active { background: rgba(255,223,27,0.15); }
.mobile-nav-divider {
    color: rgba(255,255,255,0.4);
    font-weight: 300;
    font-size: 16px;
    line-height: 1;
    user-select: none;
    pointer-events: none;
}
.mobile-nav-upcoming {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    color: #FFDF1B;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    border-radius: 0 16px 16px 0;
}
.mobile-nav-upcoming:active { background: rgba(255,223,27,0.15); }
body.light-mode .mobile-merged-nav { background: rgba(0,0,0,0.08); }
body.light-mode .mobile-nav-live { color: #FFDF1B; }
body.light-mode .mobile-nav-divider { color: rgba(0,0,0,0.25); }
body.light-mode .mobile-nav-upcoming { color: #FFDF1B; }
body.light-mode .mobile-live-dot { background: #dc2626; }
.mobile-live-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: #ef4444;
    border-radius: 50%;
    flex-shrink: 0;
    animation: pulse 1.5s infinite;
}
body.light-mode .mobile-live-dot { background: #dc2626; }
@media (max-width: 768px) {
    .mobile-center-btns { display: flex; }
}
@media (max-width: 360px) {
    .mobile-nav-live, .mobile-nav-upcoming { padding: 5px 8px; font-size: 11px; }
}
@media (min-width: 769px) {
    .mobile-center-btns { display: none !important; }
}
.mobile-live-btn:active {
    background: rgba(239, 68, 68, 0.15);
    transform: scale(0.95);
}
.mobile-live-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: #ef4444;
    border-radius: 50%;
    flex-shrink: 0;
    animation: pulse 1.5s infinite;
}
body.light-mode .mobile-live-btn { border-color: #dc2626; color: #dc2626; }
body.light-mode .mobile-live-btn:active { background: rgba(220,38,38,0.1); }
body.light-mode .mobile-live-dot { background: #dc2626; }
.mobile-upcoming-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: transparent;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    border: 1.5px solid rgba(255,255,255,0.3);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}
.mobile-upcoming-btn:active {
    background: rgba(255,255,255,0.1);
    transform: scale(0.95);
}
body.light-mode .mobile-upcoming-btn { border-color: #d97706; color: #d97706; }
body.light-mode .mobile-upcoming-btn:active { background: rgba(217,119,6,0.1); }
@media (max-width: 768px) {
    .mobile-center-btns { display: flex; }
}
@media (max-width: 360px) {
    .mobile-live-btn { padding: 4px 8px; font-size: 10px; }
    .mobile-upcoming-btn { padding: 4px 8px; font-size: 10px; }
    .mobile-center-btns { gap: 4px; }
}
@media (min-width: 769px) {
    .mobile-center-btns { display: none !important; }
}

/* Top Leagues headline */
.top-leagues-title {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
}
body.light-mode .top-leagues-title { color: #000; }

/* Market category headers grey in dark mode */
.popular-header, .market-category-header, .market-row-header-inline .market-row-name {
    color: #94a3b8 !important;
}
body.light-mode .popular-header, body.light-mode .market-category-header, body.light-mode .market-row-header-inline .market-row-name {
    color: #555 !important;
}

/* (upcoming light mode defined above) */

/* Profile modal mobile positioning */
@media (max-width: 768px) {
    .profile-modal-content {
        position: fixed !important;
        top: 48px !important;
        right: 0 !important;
        left: auto !important;
        bottom: 0 !important;
        width: 280px !important;
        max-width: 85vw !important;
        max-height: none !important;
        height: calc(100vh - 48px) !important;
        border-radius: 0 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        display: flex !important;
        flex-direction: column !important;
        padding-bottom: env(safe-area-inset-bottom, 0) !important;
    }
    .profile-modal {
        align-items: flex-start !important;
        justify-content: flex-end !important;
    }
}

/* (mobile button spacing defined above) */

/* iOS/Android mobile fixes */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overscroll-behavior-y: none;
    touch-action: manipulation;
}

/* Prevent iOS zoom on input focus */
input, select, textarea {
    font-size: 16px !important;
}

/* Safe area padding for notch phones */
.header {
    padding-top: env(safe-area-inset-top, 0);
}

/* iOS bottom bar safe area */
.mobile-bottom-nav, .betting-slip, .mobile-slip-toggle {
    padding-bottom: env(safe-area-inset-bottom, 0);
}

/* Fix iOS position:fixed inside scroll containers */
.betting-slip {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Fix Android 300ms tap delay + iOS click delegation */
a, button, .league-row, .sport-item, .match-card, .odds-compact-btn, .odds-quick-btn,
[onclick], .match-expand-btn, .action-btn, .btn-submit, .preference-item {
    touch-action: manipulation;
    cursor: pointer; /* Required for iOS click events on non-anchor elements */
}

/* Fix iOS rubber-banding on modals */
.profile-modal, .profile-modal-content {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.match-card.prematch-locked .match-odds-compact { pointer-events: none; opacity: 0.3; }
.match-card.prematch-locked .match-body { pointer-events: none; opacity: 0.3; }

:root {
    --bet365-green: #1B5E20;
    --bet365-green-hover: #145218;
    --bet365-yellow: #FFDF1B;
    --bet365-dark: #1E1E1E;
    --bet365-darker: #141414;
    --bet365-card: #292929;
    --bet365-card-hover: #333333;
    --bet365-border: #3A3A3A;
    --bet365-text: #C8C8C8;
    --bet365-text-bright: #FFFFFF;
    --bet365-text-muted: #808080;
    --bet365-live: #4CAF50;
    --bet365-odds-bg: #3D3D3D;
    --bet365-odds-hover: #4A4A4A;
    --bet365-selected: #1B5E20;
    --bet365-accent: #4CAF50;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bet365-dark);
    color: var(--bet365-text);
    font-size: 14px;
    line-height: 1.4;
    min-height: 100vh;
}

/* ===== RTL SUPPORT (Hebrew / Arabic) ===== */
html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .main-container {
    flex-direction: row-reverse;
}

/* Header */
html[dir="rtl"] .header {
    flex-direction: row-reverse;
}
html[dir="rtl"] .header-left {
    flex-direction: row-reverse;
}
html[dir="rtl"] .header-right {
    flex-direction: row-reverse;
}
html[dir="rtl"] .header-nav {
    flex-direction: row-reverse;
}

/* Left Sidebar */
html[dir="rtl"] .left-sidebar {
    border-right: 1px solid var(--bet365-border);
    border-left: none;
    left: auto;
    right: 0;
}

/* Main Content */
html[dir="rtl"] .main-content {
    margin-left: 335px;
    margin-right: 200px;
}

/* Betting Slip */
html[dir="rtl"] .betting-slip {
    right: auto;
    left: 0;
    border-left: none;
    border-right: 1px solid #333;
}

/* Profile Dropdown */
html[dir="rtl"] .profile-dropdown {
    right: auto;
    left: 16px;
}

/* Sport items and sidebar links */
html[dir="rtl"] .sport-item {
    flex-direction: row-reverse;
    text-align: right;
}
html[dir="rtl"] .sport-item .sport-count {
    margin-left: 0;
    margin-right: auto;
}

/* Market headers and arrows */
html[dir="rtl"] .market-category-header .market-arrow {
    margin-left: 0;
    margin-right: auto;
}
html[dir="rtl"] .market-row-arrow {
    margin-left: 0;
    margin-right: auto;
}

/* Auth modal close button */
html[dir="rtl"] .auth-close {
    right: auto;
    left: 12px;
}

/* Profile modal close */
html[dir="rtl"] .profile-close {
    right: auto;
    left: 12px;
}

/* Popup close button */
html[dir="rtl"] .popup-close {
    right: auto;
    left: 12px;
}

/* Slip bet remove button */
html[dir="rtl"] .slip-bet-remove {
    right: auto;
    left: 4px;
}

/* League header badge */
html[dir="rtl"] .league-header {
    text-align: right;
}

/* Match info alignment */
html[dir="rtl"] .match-info {
    text-align: right;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 48px;
    padding: 0 12px;
    background: linear-gradient(180deg, #1B5E20 0%, #145218 100%);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
}
.logo-text {
    font-size: 28px;
    font-weight: 900;
    color: white;
    letter-spacing: -1.5px;
    font-style: italic;
    font-family: Arial, Helvetica, sans-serif;
}
.logo-num {
    color: var(--bet365-yellow);
    font-weight: 900;
}

.logo-link {
    text-decoration: none;
    color: inherit;
}



.header-nav {
    display: flex;
    gap: 2px;
}

.header-nav a {
    padding: 6px 14px;
    color: rgba(255,255,255,0.8);
    font-weight: 600;
    font-size: 12px;
    border-radius: 3px;
    transition: all 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-nav a:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}
.header-nav a.active {
    background: var(--bet365-yellow);
    color: #1B5E20;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-clock {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 12px;
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
    white-space: nowrap;
}

.user-balance {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0,0,0,0.25);
    padding: 6px 14px;
    border-radius: 3px;
    color: var(--bet365-yellow);
    font-weight: 700;
    cursor: pointer;
    font-size: 13px;
}

.user-balance:hover {
    background: rgba(0,0,0,0.3);
}

.balance-amount {
    font-size: 16px;
}

.header-buttons {
    display: flex;
    gap: 8px;
}

.btn-login, .btn-join {
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-login {
    background: var(--bet365-yellow);
    border: none;
    color: #1B5E20;
    padding: 6px 18px;
    border-radius: 3px;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.btn-login:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
}

.btn-join {
    background: var(--bet365-yellow);
    color: #111;
}

.btn-join:hover {
    background: #e5a500;
}

/* Main Container */
.main-container {
    display: flex;
    margin-top: 48px;
    min-height: calc(100vh - 48px);
}

/* Left Sidebar */
.left-sidebar {
    width: 200px;
    background: #141414;
    border-right: 1px solid #2a2a2a;
    position: fixed;
    top: 48px;
    bottom: 0;
    overflow-y: auto;
}

.sidebar-section {
    padding: 8px 0;
}

.sidebar-title {
    padding: 10px 12px 6px;
    font-size: 10px;
    font-weight: 700;
    color: var(--bet365-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sport-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 13px;
}

.sport-item:hover {
    background: var(--bet365-card);
}

.sport-item.active {
    background: var(--bet365-selected);
    color: white;
}

.sport-icon {
    font-size: 18px;
}

.sport-name {
    flex: 1;
    font-size: 14px;
}

.sport-count {
    font-size: 12px;
    color: var(--bet365-text-muted);
    background: var(--bet365-card);
    padding: 2px 8px;
    border-radius: 10px;
}

.league-item {
    padding: 10px 12px;
}

.league-item:hover {
    background: rgba(255, 215, 0, 0.08);
}

.league-item.selected {
    background: rgba(255, 215, 0, 0.15);
    border-left: 3px solid var(--yellow);
}

.league-icon {
    font-size: 14px;
    margin-right: 8px;
}

.expand-icon {
    font-size: 10px;
    margin-left: auto;
    color: var(--text-muted);
    transition: transform 0.3s;
}

.sport-item.active .expand-icon {
    transform: rotate(90deg);
    color: var(--yellow);
}

/* Welcome Section */
.welcome-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 40px;
}

.welcome-icon {
    font-size: 60px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.welcome-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--bet365-text-bright);
    margin-bottom: 12px;
}

.welcome-text {
    font-size: 16px;
    color: var(--bet365-text-muted);
}

/* Leagues Grid */
.leagues-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.league-card {
    background: #292929;
    border: 1px solid #3A3A3A;
    border-radius: 4px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}

.league-card:hover {
    border-color: #4CAF50;
    background: #333;
    transform: translateY(-2px);
}

.league-card.selected {
    background: rgba(255, 215, 0, 0.15);
    border-color: var(--yellow);
}

.league-card-icon {
    font-size: 32px;
}

.league-card-name {
    font-size: 16px;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.league-flag {
    width: 28px;
    height: 20px;
    object-fit: contain;
    border-radius: 3px;
}

.flag {
    width: 28px;
    height: 20px;
    border-radius: 3px;
    display: inline-block;
}

.flag-england {
    background: linear-gradient(180deg, #012169 33%, #fff 33%, #fff 66%, #C8102E 66%);
}

.flag-italy {
    background: linear-gradient(90deg, #008C45 33%, #fff 33%, #fff 66%, #CD212A 66%);
}

.flag-spain {
    background: linear-gradient(90deg, #AA151B 33%, #F1BF00 33%, #F1BF00 66%, #AA151B 66%);
}

.flag-germany {
    background: linear-gradient(180deg, #000 33%, #DD0000 33%, #DD0000 66%, #FFCE00 66%);
}

.flag-france {
    background: linear-gradient(90deg, #002395 33%, #fff 33%, #fff 66%, #ED2939 66%);
}

.back-btn {
    cursor: pointer;
    color: var(--yellow);
    margin-right: 16px;
    font-size: 14px;
    background: none;
    border: none;
    font-family: inherit;
    padding: 0;
}

.back-btn:hover {
    text-decoration: underline;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 200px;
    margin-right: 335px;
    padding: 16px;
    min-height: calc(100vh - 56px);
    overflow: visible;
    position: relative;
    z-index: 5;
}

.matches-list {
    overflow: visible;
}

/* Match Card - Collapsible Layout */
.match-card {
    background: #292929;
    border: 1px solid #3A3A3A;
    border-radius: 4px;
    margin-bottom: 2px;
    overflow: hidden;
}

.match-card.live {
    border-color: var(--bet365-live);
}

/* Basketball stoppage lock overlay */
.match-card.bball-locked {
    border-color: #ff8f00;
}
.bball-stoppage-lock {
    background: rgba(255, 143, 0, 0.12);
    border-top: 1px solid rgba(255, 143, 0, 0.3);
    border-bottom: 1px solid rgba(255, 143, 0, 0.3);
    color: #ff8f00;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.bball-stoppage-lock i {
    font-size: 13px;
}

.match-card:hover {
    background: var(--bet365-card-hover);
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid var(--bet365-border);
}

.match-title-area {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 12px;
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--bet365-text-bright);
}

.match-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 8px;
}

.match-expand-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.match-expand-btn:hover .match-expand-icon {
    color: var(--bet365-text-bright);
}

.match-expand-icon {
    font-size: 12px;
    color: var(--bet365-text-muted);
    transition: transform 0.3s;
    display: inline-block;
}

.match-expand-btn.expanded .match-expand-icon {
    transform: rotate(180deg);
}

.match-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.league-name {
    font-size: 12px;
    color: var(--bet365-text-muted);
}

.live-badge {
    background: var(--bet365-live);
    color: white;
    padding: 2px 8px;
    border-radius: 2px;
    font-size: 10px;
    font-weight: 700;
}

.completed-badge {
    background: var(--bet365-green);
    color: white;
    padding: 2px 8px;
    border-radius: 2px;
    font-size: 10px;
    font-weight: 700;
}

.match-time {
    font-size: 12px;
    color: var(--bet365-text-muted);
    padding-right: 12px;
}

.match-time.live {
    color: var(--bet365-live);
    font-weight: 600;
}

/* Match Title Area */
.match-title-area {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--bet365-text-bright);
    min-width: 0;
}

.match-title-area .team-home {
    color: var(--bet365-text-bright);
    white-space: nowrap;
}

.match-title-area .vs {
    color: var(--bet365-text-muted);
    font-weight: 400;
    white-space: nowrap;
}

.match-title-area .team-away {
    color: var(--bet365-text-bright);
    white-space: nowrap;
}

.match-title-area .match-score-inline {
    margin-left: 8px;
    color: #4CAF50;
    font-weight: 700;
    white-space: nowrap;
}
body.light-mode .match-title-area .match-score-inline {
    color: #1B5E20;
}
.match-minute-inline {
    color: #FFDF1B;
    font-weight: 700;
    margin-left: 6px;
    font-size: inherit;
    white-space: nowrap;
}
body.light-mode .match-minute-inline {
    color: #FFDF1B;
}

/* Compact 1X2 Odds in Header */
.match-odds-compact {
    display: flex;
    padding: 8px 12px;
    gap: 8px;
    background: rgba(0,0,0,0.15);
    border-bottom: 1px solid var(--bet365-border);
}

.odds-compact-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 6px;
    background: #243046;
    border: 1px solid #2d3748;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
    min-width: 60px;
}

.odds-compact-btn:hover {
    background: #2d4060;
    border-color: #0ea5e9;
    transform: translateY(-1px);
}

.odds-compact-btn.selected {
    background: #0ea5e9;
    border-color: #0ea5e9;
}

.odds-compact-label {
    font-size: 16px;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
}
.odds-compact-btn.no-odds {
    opacity: 0.45;
    cursor: default;
}
.odds-compact-btn.no-odds:hover {
    background: #243046;
    border-color: #2d3748;
    transform: none;
}

.odds-compact-value {
    font-size: 13px;
    font-weight: 600;
    color: #4caf50;
    line-height: 1;
}

.odds-compact-btn.selected .odds-compact-label {
    color: #fff;
}
.odds-compact-btn.selected .odds-compact-value {
    color: rgba(255,255,255,0.85);
}

/* Light mode 1X2 buttons */
body.light-mode .odds-compact-btn {
    background: #e8eaed !important;
    border-color: #ccc !important;
}
body.light-mode .odds-compact-btn:hover {
    background: #d8dce2 !important;
    border-color: #1B5E20 !important;
}
body.light-mode .odds-compact-btn.no-odds {
    opacity: 0.45;
}
body.light-mode .odds-compact-btn.no-odds:hover {
    background: #e8eaed !important;
    border-color: #ccc !important;
    transform: none;
}
body.light-mode .odds-compact-btn.selected {
    background: #1B5E20 !important;
    border-color: #1B5E20 !important;
}
body.light-mode .odds-compact-label { color: #111 !important; }
body.light-mode .odds-compact-value { color: #1B5E20 !important; }
body.light-mode .odds-compact-btn.selected .odds-compact-label { color: #fff !important; }
body.light-mode .odds-compact-btn.selected .odds-compact-value { color: rgba(255,255,255,0.85) !important; }

/* Light mode: expanded market buttons */
body.light-mode .odds-btn-new {
    background: #e8eaed !important;
    border-color: #ccc !important;
}
body.light-mode .odds-btn-new:hover {
    background: #d8dce2 !important;
    border-color: #1B5E20 !important;
}
body.light-mode .odds-btn-new .selection-name {
    color: #333 !important;
}
body.light-mode .odds-btn-new .odds-value {
    color: #1B5E20 !important;
}
body.light-mode .odds-btn-new.selected {
    background: #1B5E20 !important;
    border-color: #1B5E20 !important;
}
body.light-mode .odds-btn-new.selected .selection-name,
body.light-mode .odds-btn-new.selected .odds-value {
    color: #fff !important;
}

/* Remove ALL focus/active visual persistence on odds buttons */
.odds-compact-btn:focus,
.odds-compact-btn:focus-visible,
.odds-compact-btn:focus-within,
.odds-btn-new:focus,
.odds-btn-new:focus-visible,
.odds-btn:focus,
.odds-btn:focus-visible,
.market-odds-btn:focus,
.market-odds-btn:focus-visible,
.ipm-odds-btn:focus,
.ipm-odds-btn:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    background: inherit;
}

/* Unselected buttons must NOT stay green after click */
.odds-compact-btn:not(.selected):focus,
.odds-compact-btn:not(.selected):active {
    background: var(--bet365-odds-bg) !important;
}
body.light-mode .odds-compact-btn:not(.selected):focus,
body.light-mode .odds-compact-btn:not(.selected):active {
    background: #e8eaed !important;
}

.odds-btn-new:not(.selected):focus,
.odds-btn-new:not(.selected):active {
    background: #3D3D3D !important;
}
body.light-mode .odds-btn-new:not(.selected):focus,
body.light-mode .odds-btn-new:not(.selected):active {
    background: #e8eaed !important;
}

.odds-btn:not(.selected):focus,
.odds-btn:not(.selected):active {
    background: var(--bet365-odds-bg) !important;
}
body.light-mode .odds-btn:not(.selected):focus,
body.light-mode .odds-btn:not(.selected):active {
    background: #e8eaed !important;
}

/* Brief press animation */
.odds-compact-btn:active,
.odds-btn-new:active,
.odds-btn:active {
    transform: scale(0.97);
    transition: none;
}

/* Light mode: all odds/market buttons */
body.light-mode .market-odds-btn {
    background: #e8eaed !important;
    color: #333 !important;
    border-color: #ccc !important;
}
body.light-mode .market-odds-btn:hover {
    background: #d8dce2 !important;
    border-color: #1B5E20 !important;
}
body.light-mode .market-odds-btn.selected {
    background: #1B5E20 !important;
    color: #fff !important;
    border-color: #1B5E20 !important;
}

.match-body {
    padding: 0;
    display: none;
    background: var(--bet365-card);
}

.match-body.show {
    display: block;
}

/* Odds Grid - Expanded Section */
.odds-grid {
    padding: 10px 12px;
    border-bottom: 1px solid var(--bet365-border);
}

.odds-grid-header {
    font-size: 11px;
    color: var(--bet365-text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    font-weight: 600;
}

.odds-row {
    display: flex;
    gap: 8px;
}

.odds-btn-new {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 8px;
    background: #3D3D3D;
    border: 1px solid var(--bet365-border);
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    min-width: 60px;
}

.odds-btn-new:hover {
    background: var(--bet365-odds-hover);
    border-color: var(--bet365-accent);
}

.odds-btn-new.selected {
    background: var(--bet365-selected);
    border-color: var(--bet365-accent);
}

.odds-btn-new .selection-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--bet365-text-bright);
    margin-bottom: 4px;
}

.odds-btn-new .odds-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--bet365-yellow);
}

.odds-btn-new.selected .selection-name,
.odds-btn-new.selected .odds-value {
    color: white;
}

/* More Markets */
.markets-container {
    border-top: 1px solid var(--bet365-border);
    max-height: 500px;
    overflow-y: auto;
}

.market-category-section {
    border-bottom: 1px solid var(--bet365-border);
}

.market-category-section:last-child {
    border-bottom: none;
}

.market-category-section.collapsed .market-category-content {
    display: none;
}

.market-category-header {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255,215,0,0.12);
    cursor: pointer;
    transition: background 0.2s;
}

.market-category-header:hover {
    background: rgba(255,215,0,0.18);
}

.market-category-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--bet365-yellow);
    text-transform: uppercase;
}

.market-category-header .market-arrow {
    margin-left: auto;
    font-size: 10px;
    color: var(--bet365-text-muted);
    transition: transform 0.2s;
}

.market-category-header.collapsed .market-arrow {
    transform: rotate(-90deg);
}

.market-category-content {
    padding: 0;
}

.market-category-content.hidden {
    display: none;
}

/* Inline Market Row */
.market-row {
    border-bottom: 1px solid var(--bet365-border);
}

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

.market-row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    background: rgba(0,0,0,0.1);
    cursor: pointer;
}

.market-row-header:hover {
    background: rgba(0,0,0,0.15);
}

.market-row-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--bet365-text);
}

.market-row-arrow {
    font-size: 10px;
    color: var(--bet365-text-muted);
    transition: transform 0.2s;
}

.market-row-header.collapsed .market-row-arrow {
    transform: rotate(-90deg);
}

.market-row-selections {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 6px 12px;
}

.market-row-selections.hidden {
    display: none;
}

.market-row.collapsed .market-row-selections {
    display: none;
}

/* Popular Section - Inline Markets (No Arrows) */
.market-row-inline {
    margin-bottom: 8px;
    background: var(--bet365-card);
    border-radius: 4px;
    overflow: hidden;
}

.market-row-header-inline {
    padding: 8px 12px;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid var(--bet365-border);
}

.market-selections-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px 12px;
}

.market-selections-inline .odds-quick-btn {
    flex: 1;
    min-width: 70px;
    max-width: 120px;
}

.popular-header {
    cursor: default !important;
    background: var(--bet365-yellow) !important;
}

.popular-header .market-category-name {
    color: #000 !important;
    font-weight: 700;
    text-transform: uppercase;
}

.popular-header .market-row-name {
    color: var(--bet365-yellow);
}

.market-category-header {
    padding: 10px 12px;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid var(--bet365-border);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.market-category-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--bet365-text);
}

/* Quick Odds Button */
.odds-quick-btn {
    flex: 1;
    min-width: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px;
    background: #243046;
    border: 1px solid #2d3748;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.odds-quick-btn:hover {
    background: #2d4060;
    border-color: #0ea5e9;
    transform: translateY(-1px);
}

.odds-quick-btn.selected {
    background: #0ea5e9;
    border-color: #0ea5e9;
}

.odds-quick-btn .line-value {
    font-size: 9px;
    color: #e0e0e0;
    margin-bottom: 1px;
}

.odds-quick-btn .selection-name {
    font-size: 10px;
    color: #e0e0e0;
    margin-bottom: 2px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.odds-quick-btn .odds-value {
    font-size: 13px;
    font-weight: 700;
    color: #e2e8f0;
}

.odds-quick-btn.selected .selection-name,
.odds-quick-btn.selected .odds-value {
    color: white;
}

/* Old styles removed - using new inline layout */

/* Betting Slip - bet365 style */
.betting-slip {
    width: 310px;
    background: #141414;
    border-left: 1px solid #333;
    position: fixed;
    top: 48px;
    bottom: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    z-index: 10;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.slip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: var(--bet365-yellow);
    color: #000;
}
.slip-header-left { display: flex; align-items: center; gap: 8px; }
.slip-header-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.slip-count {
    background: #333;
    color: #ffdf1b;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
}
.slip-clear-btn {
    background: none;
    border: none;
    color: #333;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

/* Tabs */
.slip-tabs {
    display: flex;
    background: #262626;
    border-bottom: 1px solid #333;
}
.slip-tab {
    flex: 1;
    padding: 8px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #888;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: all 0.2s;
}
.slip-tab:hover { color: #ccc; }
.slip-tab.active {
    color: #ffdf1b;
    border-bottom-color: #ffdf1b;
    background: rgba(255, 223, 27, 0.05);
}

/* Content */
.slip-content { flex: 1; overflow-y: auto; }
.slip-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 30px 20px;
}
.slip-empty p { font-size: 12px; color: #666; line-height: 1.5; }

/* Bet Cards */
.slip-bets { display: flex; flex-direction: column; }
.slip-bet {
    background: #292929;
    margin: 3px 4px;
    border-radius: 3px;
    padding: 8px 10px;
    position: relative;
    border-left: 3px solid var(--bet365-yellow);
}
.slip-bet-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #444;
    border: none;
    color: #aaa;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}
.slip-bet-remove:hover { background: #e53935; color: white; }
.slip-bet-selection {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
    padding-right: 22px;
}
.slip-bet-market { font-size: 10px; color: #888; margin-bottom: 2px; }
.slip-bet-match { font-size: 10px; color: #666; margin-bottom: 6px; }
.slip-bet-odds-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.slip-bet-odds {
    font-size: 13px;
    font-weight: 700;
    color: #ffdf1b;
    background: #333;
    padding: 2px 8px;
    border-radius: 3px;
}
/* Single bet stake input */
.slip-bet-stake-input {
    width: 90px;
    padding: 6px 8px;
    background: #333;
    border: 1px solid #444;
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-align: right;
}
.slip-bet-stake-input:focus { outline: none; border-color: #ffdf1b; }
.slip-bet-return {
    font-size: 10px;
    color: #666;
    text-align: right;
    margin-top: 4px;
}
.slip-bet-return span { color: #4caf50; font-weight: 600; }

/* Footer / Stake Section */
.slip-footer-section {
    border-top: 1px solid #333;
    background: #1e1e1e;
    padding: 10px 12px;
}
.slip-summary { margin-bottom: 6px; }
.slip-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #666;
    margin-bottom: 3px;
}
.slip-summary-row span:last-child { color: #aaa; font-weight: 600; }

/* Accumulator section */
.slip-acca-odds {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 11px;
    color: #888;
}
.slip-acca-odds-val {
    font-size: 14px;
    font-weight: 700;
    color: #ffdf1b;
}
.slip-stake-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.slip-stake-label { font-size: 11px; color: #888; min-width: 40px; }
.slip-stake-input-wrap { flex: 1; }
.slip-stake-input {
    width: 100%;
    padding: 10px;
    background: #333;
    border: 1px solid #444;
    border-radius: 4px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    box-sizing: border-box;
}
.slip-stake-input:focus { outline: none; border-color: #ffdf1b; }

/* ── Single Bet Stake Section ── */
.stake-section {
    background: #232323;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    padding: 10px 12px 8px;
    margin-bottom: 8px;
}
.stake-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 10px;
}
.stake-label {
    font-size: 12px;
    font-weight: 700;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.stake-input-row {
    display: flex;
    align-items: center;
    background: #333;
    border: 2px solid #444;
    border-radius: 6px;
    overflow: hidden;
    flex: 1;
    max-width: 160px;
}
.stake-currency {
    padding: 0 8px;
    font-size: 11px;
    font-weight: 700;
    color: #FFDF1B;
    background: #1B5E20;
    align-self: stretch;
    display: flex;
    align-items: center;
    letter-spacing: 0.3px;
}
.stake-main-input {
    flex: 1;
    padding: 8px 10px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-align: right;
    width: 80px;
    min-width: 0;
}
.stake-main-input:focus { outline: none; }
.stake-main-input::placeholder { color: #666; font-weight: 400; }
.stake-input-row:focus-within { border-color: #FFDF1B; }

/* Quick Stakes */
.slip-quick-stakes {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}
.slip-quick-stakes button {
    flex: 1;
    padding: 5px 0;
    background: #333;
    border: 1px solid #444;
    border-radius: 3px;
    color: #aaa;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}
.slip-quick-stakes button:hover { border-color: #ffdf1b; color: #ffdf1b; }

/* Totals */
.slip-totals { margin: 8px 0; }
.slip-totals-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 12px;
    color: #888;
}
.slip-totals-row span:last-child { color: #fff; font-weight: 600; }
.slip-totals-returns {
    padding: 8px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 4px;
    margin-top: 4px;
}
.slip-totals-returns span:first-child { color: #fff; font-weight: 600; }
.slip-totals-returns span:last-child { color: var(--bet365-yellow); font-size: 15px; font-weight: 700; }

/* Place Bet Button */
.slip-place-btn {
    width: 100%;
    padding: 10px;
    background: #1B5E20;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.2s;
}
.slip-place-btn:hover { background: #145218; }
.slip-place-btn:disabled { background: #444; cursor: not-allowed; }
/* Popup Message */
.popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}
.popup-overlay.show {
    display: flex;
}
.popup-box {
    position: relative;
    background: #1a2332;
    border: 1px solid #2d3748;
    border-radius: 10px;
    padding: 20px 40px 20px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    max-width: 90vw;
    min-width: 180px;
    width: auto;
    text-align: center;
    animation: popupFadeIn 0.2s ease-out;
}
@keyframes popupFadeIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}
.popup-close {
    position: absolute;
    top: 6px;
    right: 10px;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}
.popup-close:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}
.popup-message {
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0;
    line-height: 1.5;
    word-break: break-word;
}

/* Popup type variants */
.popup-box.popup-success {
    border-color: #4CAF50;
    border-left-width: 4px;
}
.popup-box.popup-success .popup-message { color: #4CAF50; }

.popup-box.popup-error {
    border-color: #e53935;
    border-left-width: 4px;
}
.popup-box.popup-error .popup-message { color: #ef5350; }

.popup-box.popup-info {
    border-color: #0ea5e9;
    border-left-width: 4px;
}
.popup-box.popup-info .popup-message { color: #0ea5e9; }

/* Light mode popup */
body.light-mode .popup-overlay        { background: rgba(0,0,0,0.45); }
body.light-mode .popup-box            { background: #1a2332 !important; border-color: #2d3748 !important; }
body.light-mode .popup-message        { color: #e2e8f0 !important; }
body.light-mode .popup-box.popup-success  { border-color: #4CAF50 !important; }
body.light-mode .popup-box.popup-success .popup-message { color: #4CAF50 !important; }
body.light-mode .popup-box.popup-error    { border-color: #e53935 !important; }
body.light-mode .popup-box.popup-error   .popup-message { color: #ef5350 !important; }
body.light-mode .popup-box.popup-info     { border-color: #0ea5e9 !important; }
body.light-mode .popup-box.popup-info    .popup-message { color: #0ea5e9 !important; }

/* Auth Modal */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.auth-modal.show { display: flex; }

.auth-modal-content {
    background: var(--bet365-card);
    padding: 32px;
    border-radius: 8px;
    width: 100%;
    max-width: 380px;
    position: relative;
    border: 1px solid var(--bet365-border);
}

.auth-close {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 24px;
    color: var(--bet365-text-muted);
    cursor: pointer;
}

.auth-modal-content h2 {
    font-size: 22px;
    margin-bottom: 8px;
    color: var(--bet365-text-bright);
}

.auth-subtitle {
    color: var(--bet365-text-muted);
    margin-bottom: 24px;
}

.auth-form-group {
    margin-bottom: 16px;
}

.auth-form-group label {
    display: block;
    font-size: 12px;
    color: var(--bet365-text-muted);
    margin-bottom: 6px;
}

.auth-form-group input {
    width: 100%;
    padding: 12px;
    background: var(--bet365-dark);
    border: 1px solid var(--bet365-border);
    border-radius: 4px;
    color: white;
    font-size: 14px;
}

.auth-form-group input:focus {
    outline: none;
    border-color: var(--bet365-accent);
}

.btn-auth-submit {
    width: 100%;
    padding: 14px;
    background: var(--bet365-green);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    margin-top: 8px;
    cursor: pointer;
}

.btn-auth-submit:hover {
    background: var(--bet365-green-hover);
}

.auth-error {
    color: var(--bet365-live);
    font-size: 12px;
    margin-bottom: 12px;
    display: none;
}

.auth-error.show { display: block; }

.auth-success {
    color: var(--bet365-accent);
    font-size: 12px;
    margin-bottom: 12px;
    display: none;
}

.auth-success.show { display: block; }

.auth-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--bet365-text-muted);
}

.auth-switch a {
    color: var(--bet365-accent);
    font-weight: 600;
}

/* Profile Button */
.btn-profile {
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-profile:hover {
    background: rgba(0,0,0,0.3);
    border-color: rgba(255,255,255,0.5);
}

.profile-icon {
    font-size: 16px;
}

/* Professional Profile Dropdown */
.logged-in-container {
    display: flex;
    align-items: center;
}

.user-balance {
    display: flex;
    align-items: center;
    background: rgba(0,0,0,0.2);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.user-balance:hover {
    background: rgba(0,0,0,0.3);
    border-color: rgba(255,255,255,0.1);
}

.user-balance:active {
    transform: scale(0.97);
    background: rgba(0,0,0,0.4);
}

.user-balance.active .balance-caret {
    transform: rotate(180deg);
}

.balance-icon {
    font-size: 16px;
    margin-right: 6px;
}

.balance-amount {
    font-size: 15px;
    font-weight: 700;
    color: var(--bet365-yellow);
}

.balance-label {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    margin-left: 2px;
}

.balance-caret {
    font-size: 10px;
    margin-left: 8px;
    color: rgba(255,255,255,0.5);
    transition: transform 0.2s;
}

.user-balance:hover .balance-caret {
    color: rgba(255,255,255,0.8);
}

/* Profile Dropdown */
.profile-dropdown {
    position: fixed;
    top: 56px;
    right: 16px;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.profile-dropdown.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.profile-dropdown-content {
    background: var(--bet365-card);
    border-radius: 12px;
    width: 280px;
    position: relative;
    border: 1px solid var(--bet365-border);
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.profile-header-section {
    background: linear-gradient(135deg, var(--bet365-green) 0%, #008a50 100%);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-avatar-large {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    flex-shrink: 0;
}

.profile-info-section {
    flex: 1;
}

.profile-name-section {
    font-size: 16px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.profile-balance-section {
    display: flex;
    align-items: center;
    gap: 4px;
}

.balance-icon-small {
    font-size: 14px;
}

.balance-amount-small {
    font-size: 14px;
    font-weight: 600;
    color: var(--bet365-yellow);
}

.balance-label-small {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
}

.profile-divider {
    height: 1px;
    background: var(--bet365-border);
}

.profile-menu-section {
    padding: 8px 0;
}

.profile-menu-item-section {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    background: none;
    border: none;
    color: var(--bet365-text);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-align: left;
}

.profile-menu-item-section {
    position: relative;
}

.profile-menu-item-section:hover {
    background: var(--bet365-card-hover);
    color: var(--bet365-text-bright);
}

.profile-menu-item-section:hover::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--bet365-accent);
}

.profile-menu-item-section:active {
    background: rgba(0, 165, 68, 0.15);
    color: var(--bet365-accent);
}

.profile-menu-icon-section {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bet365-text-muted);
    transition: color 0.2s;
}

.profile-menu-item-section:hover .profile-menu-icon-section {
    color: var(--bet365-accent);
}

.profile-footer-section {
    padding: 12px 16px;
}

.btn-logout-section {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    background: transparent;
    color: var(--bet365-live);
    border: 1px solid var(--bet365-live);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout-section:hover {
    background: var(--bet365-live);
    color: white;
}

.btn-logout-section:active {
    transform: scale(0.98);
    opacity: 0.9;
}

/* Old profile modal styles (for other modals) */
.profile-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.profile-modal.show {
    display: flex;
}

.profile-modal-content {
    background: var(--bet365-card);
    border-radius: 8px;
    width: 100%;
    max-width: 320px;
    position: relative;
    border: 1px solid var(--bet365-border);
    overflow: hidden;
}

.profile-close {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 24px;
    color: var(--bet365-text-muted);
    cursor: pointer;
    z-index: 10;
}

.profile-close:hover {
    color: var(--bet365-text-bright);
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--bet365-text-bright);
    margin-bottom: 20px;
    padding-right: 24px;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--bet365-text-bright);
    margin-bottom: 20px;
    padding-right: 24px;
}

/* Change Password Modal */
#changePasswordForm {
    margin-top: 16px;
}

/* Preferences Modal */
.preference-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--bet365-border);
    transition: all 0.15s ease;
    position: relative;
    background: var(--bet365-card);
    margin-bottom: 8px;
    border-radius: 8px;
}

.preference-item:hover {
    background: var(--bet365-card-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.preference-item:hover::before {
    display: none;
}

.preference-item:active {
    background: rgba(0, 165, 68, 0.15);
    transform: translateY(0);
}

.preference-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.preference-icon {
    font-size: 20px;
    width: 28px;
    text-align: center;
}

.preference-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preference-label {
    color: var(--bet365-text);
    font-size: 14px;
}

.preference-value {
    color: var(--bet365-accent);
    font-size: 13px;
}

/* Bets History Modal */
.bets-history-modal {
    max-width: 480px;
    max-height: 80vh;
    overflow-y: auto;
}

.bets-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.bet-stat {
    background: var(--bet365-dark);
    padding: 12px 8px;
    border-radius: 6px;
    text-align: center;
}

.bet-stat-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--bet365-text-bright);
}

.bet-stat-label {
    font-size: 11px;
    color: var(--bet365-text-muted);
}

.bet-stat.won .bet-stat-value {
    color: var(--bet365-accent);
}

.bet-stat.lost .bet-stat-value {
    color: var(--bet365-live);
}

.bet-stat.pending .bet-stat-value {
    color: var(--bet365-yellow);
}

.bet-stat.cancelled .bet-stat-value {
    color: var(--bet365-text-muted);
}

.bet-stat.closed .bet-stat-value {
    color: var(--bet365-text-muted);
}

.bets-filters {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.bets-filter-btn {
    flex: 1;
    padding: 8px;
    background: var(--bet365-dark);
    border: 1px solid var(--bet365-border);
    border-radius: 4px;
    color: var(--bet365-text);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.bets-filter-btn:hover {
    background: var(--bet365-card-hover);
    border-color: var(--bet365-accent);
}

.bets-filter-btn:active {
    transform: scale(0.95);
}

.bets-filter-btn.active {
    background: var(--bet365-green);
    border-color: var(--bet365-green);
    color: white;
}

.bets-filter-btn.active:hover {
    background: var(--bet365-green-hover);
}

/* ── Bets History Modal ─────────────────────────────────────────────── */
.bets-history-modal {
    max-width: 480px !important;
    width: 95vw !important;
    max-height: 88vh !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    overflow: hidden !important;
}
.bh-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px 14px;
    border-bottom: 1px solid var(--bet365-border);
    flex-shrink: 0;
}
.bets-stats {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--bet365-border);
    flex-shrink: 0;
}
.bet-stat {
    flex: 1;
    text-align: center;
    padding: 10px 4px;
    border-right: 1px solid var(--bet365-border);
}
.bet-stat:last-child { border-right: none; }
.bet-stat-value { font-size: 20px; font-weight: 700; color: var(--bet365-text-bright); display: block; }
.bet-stat-label { font-size: 11px; color: var(--bet365-text-muted); display: block; margin-top: 2px; text-transform: uppercase; letter-spacing: 0.3px; }
.bet-stat.pending .bet-stat-value    { color: #FFDF1B; }
.bet-stat.closed .bet-stat-value     { color: #4CAF50; }
.bet-stat.cancelled-stat .bet-stat-value { color: #aaa; }
.bet-stat-sub {
    display: block;
    font-size: 10px;
    color: var(--bet365-text-muted);
    margin-top: 1px;
    font-weight: 600;
}
body.light-mode .bet-stat.pending .bet-stat-value    { color: #b8860b !important; }
body.light-mode .bet-stat.cancelled-stat .bet-stat-value { color: #888 !important; }
body.light-mode .bet-stat-sub { color: #888 !important; }

/* ── Bet history date range row ──────────────────────────────────────── */
.bets-date-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bet365-darker);
    border-bottom: 1px solid var(--bet365-border);
    flex-shrink: 0;
}
.bets-date-group {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 1;
}
.bets-date-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--bet365-text-muted);
    text-transform: uppercase;
    white-space: nowrap;
}
.bets-date-input {
    flex: 1;
    padding: 5px 7px;
    background: var(--bet365-card);
    border: 1px solid var(--bet365-border);
    border-radius: 4px;
    color: var(--bet365-text);
    font-size: 12px;
    font-family: inherit;
    min-width: 0;
}
.bets-date-input:focus { outline: none; border-color: #4CAF50; }
.bets-date-clear {
    background: none;
    border: 1px solid var(--bet365-border);
    border-radius: 4px;
    color: var(--bet365-text-muted);
    font-size: 13px;
    padding: 4px 8px;
    cursor: pointer;
    flex-shrink: 0;
}
.bets-date-clear:hover { color: #e53935; border-color: #e53935; }

/* Light mode overrides */
body.light-mode .bets-date-row   { background: #f0f0f0 !important; border-color: #ddd !important; }
body.light-mode .bets-date-label { color: #666 !important; }
body.light-mode .bets-date-input { background: #fff !important; border-color: #ccc !important; color: #111 !important; }
body.light-mode .bets-date-input::-webkit-calendar-picker-indicator { filter: invert(0); }
body.light-mode .bets-date-clear { border-color: #ccc !important; color: #999 !important; }

.bets-filters {
    display: flex;
    gap: 4px;
    padding: 10px 12px;
    background: var(--bet365-darker);
    border-bottom: 1px solid var(--bet365-border);
    flex-wrap: wrap;
    flex-shrink: 0;
}
.bets-filter-btn {
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid var(--bet365-border);
    background: var(--bet365-card);
    color: var(--bet365-text);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.bets-filter-btn:hover  { border-color: #4CAF50; color: #fff; }
.bets-filter-btn.active { background: #1B5E20; border-color: #1B5E20; color: #fff; }

.bets-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.bets-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 24px;
    color: var(--bet365-text-muted);
    font-size: 14px;
}
.bets-loading-spinner {
    width: 18px; height: 18px;
    border: 2px solid var(--bet365-border);
    border-top-color: #4CAF50;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Bet365-style bet history item ──────────────────────────────────── */
.bh-item {
    background: var(--bet365-card);
    border: 1px solid var(--bet365-border);
    border-left: 3px solid var(--bet365-border);
    border-radius: 4px;
    padding: 10px 12px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.bh-item:hover { background: var(--bet365-card-hover); border-color: #4CAF50; }
.bh-pending   { border-left-color: #FFDF1B !important; }
.bh-won       { border-left-color: #4CAF50 !important; }
.bh-lost      { border-left-color: #e53935 !important; }
.bh-cancelled { border-left-color: #888 !important; opacity: 0.85; }

.bh-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bh-top { margin-bottom: 6px; }
.bh-bottom { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--bet365-border); }
.bh-left { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.bh-code { font-size: 11px; color: var(--bet365-text-muted); font-weight: 600; }
.bh-match { font-size: 14px; font-weight: 700; color: var(--bet365-text-bright); margin-bottom: 2px; }
.bh-vs { color: var(--bet365-text-muted); font-weight: 400; margin: 0 4px; font-size: 12px; }
.bh-league { font-size: 11px; color: var(--bet365-text-muted); margin-bottom: 5px; }
.bh-selection { font-size: 12px; margin-bottom: 2px; color: var(--bet365-text); }
.bh-market { color: var(--bet365-text-muted); font-size: 11px; }
.bh-pick   { color: var(--bet365-text-bright); font-weight: 600; margin: 0 4px; }
.bh-odds   { color: #4CAF50; font-weight: 700; font-size: 12px; }

.bh-status { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 3px; white-space: nowrap; text-transform: uppercase; letter-spacing: 0.3px; }
.bh-status-pending   { background: rgba(255,223,27,0.15);  color: #FFDF1B; }
.bh-status-won       { background: rgba(76,175,80,0.15);   color: #4CAF50; }
.bh-status-lost      { background: rgba(229,57,53,0.15);   color: #ef5350; }
.bh-status-cancelled { background: rgba(128,128,128,0.15); color: #aaa; }

.bh-stake     { font-size: 12px; color: var(--bet365-text); }
.bh-potential { font-size: 12px; color: var(--bet365-text-muted); }
.bh-won-val   { font-size: 12px; color: #4CAF50; }
.bh-lost      { font-size: 12px; color: #ef5350; }
.bh-won span.bh-won strong, .bh-potential strong { color: var(--bet365-text-bright); }

.bh-potential { color: var(--bet365-text-muted); font-size: 12px; }
.bh-won       { color: #4CAF50; font-size: 12px; font-weight: 600; }
.bh-lost      { color: #ef5350; font-size: 12px; }
.bh-cancelled { color: #aaa;    font-size: 12px; }

.bh-date { font-size: 10px; color: var(--bet365-text-muted); margin-top: 5px; }

.bh-score      { font-size: 12px; font-weight: 700; color: var(--bet365-text-bright); background: var(--bet365-darker); padding: 1px 6px; border-radius: 3px; }
.bh-score-live { color: #4CAF50; }
.bh-minute     { font-size: 11px; color: #FFDF1B; font-weight: 600; }
.bh-ft         { font-size: 11px; color: var(--bet365-text-muted); font-weight: 600; }

.bh-live-badge   { font-size: 10px; font-weight: 700; color: #fff; background: #e53935; padding: 1px 5px; border-radius: 2px; display: flex; align-items: center; }
.bh-parlay-badge { font-size: 10px; font-weight: 700; color: #fff; background: #1565C0; padding: 1px 5px; border-radius: 2px; }

.no-bets { text-align: center; padding: 40px 20px; color: var(--bet365-text-muted); font-size: 14px; }

.bet-history-item {
    background: var(--bet365-dark);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 8px;
}

.bet-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.bet-history-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 10px;
}

.bet-meta-category,
.bet-meta-line,
.bet-meta-league {
    background: rgba(255,255,255,0.1);
    padding: 3px 8px;
    border-radius: 3px;
    color: #fff !important;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}

.bet-meta-line.live {
    background: #27ae60 !important;
    color: white !important;
    font-weight: bold;
}

.bet-meta-line.pre-game {
    background: #3498db !important;
    color: white !important;
    font-weight: bold;
}

.bet-code {
    font-size: 11px;
    font-weight: 700;
    color: var(--bet365-accent);
    font-family: monospace;
    letter-spacing: 0.5px;
}

.bet-history-match-row {
    margin-bottom: 6px;
}

.bet-history-match {
    font-size: 13px;
    font-weight: 600;
    color: var(--bet365-text-bright);
}

.bet-history-status {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 3px;
    font-weight: 600;
}

.bet-history-status.pending {
    background: rgba(247, 181, 0, 0.2);
    color: var(--bet365-yellow);
}

.bet-history-status.won {
    background: rgba(0, 165, 68, 0.2);
    color: var(--bet365-accent);
}

.bet-history-status.lost {
    background: rgba(204, 0, 0, 0.2);
    color: var(--bet365-live);
}

.bet-history-status.cancelled {
    background: rgba(136, 136, 136, 0.2);
    color: var(--bet365-text-muted);
}

.bet-history-details {
    font-size: 12px;
    color: var(--bet365-text-muted);
    margin-bottom: 4px;
}

.bet-history-stake {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    padding-top: 8px;
    border-top: 1px solid var(--bet365-border);
}

.bet-history-stake span:first-child {
    color: var(--bet365-text-muted);
}

.bet-history-stake span:last-child {
    color: var(--bet365-text-bright);
    font-weight: 600;
}

.bet-history-win {
    color: var(--bet365-accent) !important;
}

.no-bets {
    text-align: center;
    padding: 24px;
    color: var(--bet365-text-muted);
}

/* Clickable Bet Code */
button.bet-code-link {
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
    transition: color 0.2s;
    background: none;
    border: none;
    padding: 0;
    font-family: monospace;
    font-size: 11px;
    font-weight: 700;
    color: var(--bet365-accent);
    letter-spacing: 0.5px;
}
button.bet-code-link:hover {
    color: var(--bet365-yellow);
}

/* Bet Detail Modal */
#betDetailModal {
    z-index: 3000;
}
.bet-detail-modal-content {
    background: var(--bet365-darker);
    border-radius: 8px;
    width: 400px;
    max-width: 95vw;
    max-height: 85vh;
    overflow-y: auto;
    padding: 0;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.bet-detail-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--bet365-border);
    background: var(--bet365-card);
    border-radius: 8px 8px 0 0;
}
.bet-detail-modal-id {
    font-size: 16px;
    font-weight: 700;
    color: var(--bet365-accent);
    font-family: monospace;
    letter-spacing: 0.5px;
}
.bet-detail-live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 20px;
    background: rgba(0, 111, 62, 0.15);
    color: var(--bet365-green);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}
.bet-detail-modal-body {
    padding: 12px 20px;
}
.bet-detail-modal-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.bet-detail-modal-row:last-child {
    border-bottom: none;
}
.bet-detail-modal-label {
    font-size: 12px;
    color: var(--bet365-text-muted);
    font-weight: 500;
    flex-shrink: 0;
    min-width: 110px;
}
.bet-detail-modal-val {
    font-size: 12px;
    color: var(--bet365-text-bright);
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}
.bet-detail-modal-selection {
    color: var(--bet365-accent);
}
.bet-detail-modal-odds {
    font-size: 14px;
    color: var(--bet365-yellow);
    font-weight: 700;
}
.bet-detail-modal-score {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
}
.bet-detail-modal-won {
    color: var(--bet365-accent) !important;
}
.bet-detail-modal-divider {
    height: 1px;
    background: var(--bet365-border);
    margin: 4px 0;
}

/* Cancel Bet Button */
.bet-detail-cancel-btn {
    display: block;
    width: calc(100% - 40px);
    margin: 12px 20px 20px;
    padding: 12px;
    background: transparent;
    border: 1px solid var(--bet365-live);
    color: var(--bet365-live);
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s;
}
.bet-detail-cancel-btn:hover {
    background: var(--bet365-live);
    color: white;
}
/* Bet History - Game Info Section */
.bet-history-game-info {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    padding: 8px 10px;
    margin: 6px 0;
}
.bet-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
    font-size: 11px;
}
.bet-detail-row + .bet-detail-row {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.bet-detail-label {
    color: var(--bet365-text-muted);
    font-weight: 500;
}
.bet-detail-value {
    color: var(--bet365-text);
    font-weight: 600;
}

/* Current Score Row */
.bet-detail-score {
    padding: 5px 0;
}
.bet-detail-score .bet-detail-label {
    color: var(--bet365-text);
    font-weight: 600;
    font-size: 11px;
}
.bet-score-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--bet365-text-bright);
    letter-spacing: 1px;
}

/* Game Time Row */
.bet-detail-gametime {
    padding: 5px 0;
}
.bet-detail-gametime .bet-detail-label {
    color: var(--bet365-text);
    font-weight: 600;
    font-size: 11px;
}
.bet-gametime-value {
    display: flex;
    align-items: center;
    gap: 6px;
}
.bet-gametime-period {
    background: rgba(255, 255, 255, 0.1);
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    color: var(--bet365-text-muted);
    text-transform: uppercase;
}
.bet-gametime-clock {
    font-size: 13px;
    font-weight: 700;
    color: var(--bet365-text-bright);
}

/* Live Pulse Animation */
.live-pulse {
    animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Live Bet Card Highlight */
.bet-live {
    border-left: 3px solid var(--bet365-green);
}
.bet-meta-live-badge {
    background: var(--bet365-live);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    animation: livePulse 2s ease-in-out infinite;
}

.options-list {
    max-height: 300px;
    overflow-y: auto;
}

.option-item {
    padding: 14px 16px;
    border-bottom: 1px solid var(--bet365-border);
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--bet365-text);
    position: relative;
}

.option-item:hover {
    color: var(--bet365-accent);
    font-weight: 600;
    background: rgba(0, 165, 68, 0.3);
    padding-left: 20px;
}

.option-item:hover::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--bet365-accent);
}

.option-item:active,
.option-item:focus,
.option-item.clicked {
    color: var(--bet365-accent) !important;
    font-weight: 600;
    background: rgba(0, 165, 68, 0.3);
    outline: none;
}

.option-item:active::before,
.option-item:focus::before,
.option-item.clicked::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--bet365-accent);
}

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

.option-item.active {
    color: var(--bet365-accent);
    font-weight: 600;
    background: rgba(0, 165, 68, 0.1);
}

.option-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--bet365-accent);
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--bet365-text-bright);
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-dot-header {
    width: 8px;
    height: 8px;
    background: var(--bet365-live);
    border-radius: 50%;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Events Timeline */
.events-timeline {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 8px;
    background: rgba(0,0,0,0.2);
}

.goal-event {
    font-size: 12px;
    color: var(--bet365-yellow);
}

.goal-event.home { color: var(--bet365-accent); }
.goal-event.away { color: var(--bet365-text-muted); }

/* ===== GLOBAL MOBILE TOUCH FIXES ===== */
* {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Active states for touch feedback (all interactive elements) */
.odds-btn:active,
.sport-item:active,
.slip-tab:active,
.slip-quick-stakes button:active,
.slip-place-btn:active,
.slip-clear-btn:active,
.btn-login:active,
.btn-register:active,
.league-card:active,
.inplay-odds-btn:active,
.preference-item:active,
.match-expand-btn:active {
    opacity: 0.7;
    transform: scale(0.97);
}

/* Prevent iOS zoom on input focus */
input, select, textarea {
    font-size: 16px !important;
}

/* ===== MOBILE NAV TOGGLES ===== */
.mobile-hamburger,
.mobile-slip-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.mobile-slip-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--bet365-green);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    font-size: 24px;
    color: #fff;
}

.mobile-slip-toggle .slip-fab-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--bet365-yellow);
    color: #000;
    font-size: 11px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-slip-close {
    display: none;
    background: none;
    border: none;
    color: var(--bet365-text);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 998;
}

.sidebar-overlay.active {
    display: block;
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Tablet */
@media (max-width: 1200px) {
    .left-sidebar { width: 180px; }
    .main-content { margin-left: 180px; }
}

/* Small Tablet */
@media (max-width: 1024px) {
    .mobile-hamburger { display: flex; }

    .left-sidebar {
        position: fixed;
        top: 48px;
        left: 0;
        bottom: 0;
        width: 260px;
        z-index: 999;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .left-sidebar.open {
        transform: translateX(0);
    }
    html[dir="rtl"] .left-sidebar {
        left: auto;
        right: 0;
        transform: translateX(100%);
    }
    html[dir="rtl"] .left-sidebar.open {
        transform: translateX(0);
    }
    html[dir="rtl"] .main-content {
        margin-left: 0;
        margin-right: 0;
    }
    html[dir="rtl"] .betting-slip {
        right: auto;
        left: 0;
    }

    .main-content { margin-left: 0; margin-right: 0; }
    .betting-slip { width: 300px; }
}

/* Phone */
@media (max-width: 768px) {
    .header-nav { display: none; }
    
    /* Top leagues grid — 3 columns on tablet, 2 on phone */
    #topLeaguesContainer > div {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    .header { 
        padding: 0 8px;
        padding-top: env(safe-area-inset-top);
        height: calc(48px + env(safe-area-inset-top));
        overflow: visible;
    }
    .header-left { gap: 8px; flex-shrink: 0; }
    .header-right { gap: 8px; flex-shrink: 0; }
    .logged-in-container { gap: 6px; }
    .user-balance { padding: 5px 8px; font-size: 12px; }
    .balance-amount { font-size: 13px; }
    .balance-label { font-size: 10px; }
    .main-container {
        padding-top: env(safe-area-inset-top);
    }

    /* Betting slip as full-screen drawer */
    .betting-slip {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100%;
        z-index: 1001;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        padding-bottom: env(safe-area-inset-bottom);
    }
    .betting-slip.open { transform: translateX(0); }
    html[dir="rtl"] .betting-slip {
        right: auto;
        left: 0;
        transform: translateX(-100%);
    }
    html[dir="rtl"] .betting-slip.open { transform: translateX(0); }
    .mobile-slip-toggle { display: flex; }
    .betting-slip.open ~ .mobile-slip-toggle { display: none; }
    .mobile-slip-close { display: block; }

    .main-content { padding: 12px; padding-bottom: calc(80px + env(safe-area-inset-bottom)); }

    /* Larger tap targets */
    .slip-quick-stakes button {
        padding: 10px 0 !important;
        min-height: 44px;
        font-size: 14px !important;
    }
    .slip-bet-remove {
        width: 32px !important;
        height: 32px !important;
        font-size: 16px !important;
    }
    .match-expand-btn {
        min-width: 44px;
        min-height: 44px;
        padding: 8px !important;
    }
    .odds-btn, .odds-quick-btn {
        min-height: 44px;
        padding: 8px 6px !important;
    }
    .inplay-odds-btn {
        min-height: 44px;
        padding: 8px 6px !important;
    }
    .sport-item {
        padding: 12px 16px !important;
        min-height: 44px;
    }

    /* Better font sizes on mobile */
    .sidebar-title { font-size: 12px !important; }
    .sport-name { font-size: 14px !important; }
    .inplay-team-name { font-size: 14px !important; }
    .inplay-odds-label { font-size: 11px !important; }
    .inplay-odds-value { font-size: 13px !important; }
    .inplay-minute { font-size: 13px !important; }

    /* Leagues grid */
    .leagues-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
    }

    /* Profile dropdown — positioned under points bank on mobile */
    .profile-dropdown {
        top: 48px !important;
        right: 0 !important;
        left: auto !important;
        bottom: auto !important;
        width: 260px !important;
        max-width: calc(100vw - 16px) !important;
        transform: translateY(-6px) !important;
        border-radius: 10px !important;
        padding-bottom: 0;
    }
    .profile-dropdown.show {
        transform: translateY(0) !important;
    }
    .profile-dropdown-content {
        width: 100% !important;
        border-radius: 10px !important;
    }
    .profile-header-section {
        padding: 12px 14px;
        gap: 10px;
    }
    .profile-avatar-large {
        width: 38px;
        height: 38px;
        font-size: 17px;
    }
    .profile-name-section {
        font-size: 14px !important;
    }
    .profile-menu-item-section {
        padding: 10px 14px;
        font-size: 13px;
        gap: 8px;
    }
    .profile-menu-icon-section {
        width: 18px;
        height: 18px;
    }
    .profile-menu-icon-section svg {
        width: 16px;
        height: 16px;
    }
    .profile-footer-section {
        padding: 8px 12px 10px;
    }
    .btn-logout-section {
        padding: 10px;
        font-size: 13px;
    }

    /* Toast safe area */
    .toast {
        bottom: calc(20px + env(safe-area-inset-bottom)) !important;
    }

    /* In-play match cards - stack on small screens */
    .inplay-match-card {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 12px;
    }
    .inplay-match-odds {
        width: 100%;
        justify-content: center;
    }
    .inplay-odds-btn {
        flex: 1;
        min-width: 0;
    }
}

/* Small Phone */
@media (max-width: 480px) {
    .logo-text { font-size: 22px; }
    .header-clock { font-size: 11px; }
    
    /* Top leagues grid — 2 columns on small phone */
    #topLeaguesContainer > div {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    .welcome-icon { font-size: 36px !important; }
    .welcome-title { font-size: 20px !important; }
    .welcome-text { font-size: 14px !important; }

    .match-header { padding: 8px !important; }
    .match-teams { font-size: 13px !important; }

    .odds-grid-header span { font-size: 11px; }

    .slip-header { padding: 10px 12px; }
    .slip-content { padding: 8px; }
}

/* Reduced motion for battery/accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bet365-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--bet365-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* In-Play Section */
.inplay-sport-group {
    margin-bottom: 16px;
}
.inplay-sport-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #1B5E20;
    border-radius: 4px 4px 0 0;
    border-bottom: none;
}
.inplay-sport-icon { font-size: 18px; }
.inplay-sport-name { font-size: 14px; font-weight: 700; color: var(--bet365-text-bright); }
.inplay-sport-count { font-size: 11px; color: var(--bet365-accent); margin-left: auto; }
.inplay-league-group {
    background: var(--bet365-darker);
    border-left: 1px solid var(--bet365-border);
    border-right: 1px solid var(--bet365-border);
}
.inplay-league-group:last-child {
    border-bottom: 1px solid var(--bet365-border);
    border-radius: 0 0 6px 6px;
}
.inplay-league-header {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--bet365-text-muted);
    background: rgba(0,0,0,0.15);
    border-bottom: 1px solid var(--bet365-border);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.inplay-matches {
    display: flex;
    flex-direction: column;
}
.inplay-match-card {
    border-bottom: 1px solid var(--bet365-border);
    transition: background 0.15s;
    cursor: pointer;
}
.inplay-match-card:hover { background: rgba(255,255,255,0.03); }
.inplay-match-card:last-child { border-bottom: none; }
.inplay-match-card.inplay-card-expanded { background: rgba(14,165,233,0.04); }

/* Top row: info + odds side by side */
.inplay-card-top {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    gap: 10px;
}
.inplay-match-info { display: flex; align-items: center; flex: 1; gap: 10px; min-width: 0; }

/* Right side: odds buttons + footer */
.inplay-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    flex-shrink: 0;
}

/* Card footer: market count + expand arrow */
.inplay-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}
.inplay-market-count {
    font-size: 11px;
    color: #0ea5e9;
    font-weight: 600;
    cursor: pointer;
    padding: 1px 6px;
    border-radius: 3px;
    background: rgba(14,165,233,0.1);
    transition: background 0.15s;
}
.inplay-market-count:hover { background: rgba(14,165,233,0.2); }
.inplay-market-count.no-odds { color: var(--bet365-text-muted); background: none; cursor: default; }
.inplay-expand-arrow {
    font-size: 11px;
    color: var(--bet365-text-muted);
    transition: transform 0.2s;
    pointer-events: none;
}
.inplay-period {
    font-size: 10px;
    color: var(--bet365-text-muted);
    font-weight: 600;
}

/* Locked odds (no price available) */
.inplay-odds-btn.inplay-odds-locked {
    opacity: 0.35;
    cursor: not-allowed;
}
.inplay-odds-btn.inplay-odds-locked:hover { background: #243046 !important; transform: none !important; }

/* Selected state for in-play odds buttons */
.inplay-odds-btn.selected {
    background: #0ea5e9 !important;
    border-color: #0ea5e9 !important;
}
.inplay-odds-btn.selected .inplay-odds-label,
.inplay-odds-btn.selected .inplay-odds-value { color: #fff !important; }

/* Markets panel that slides open */
.inplay-markets-panel {
    border-top: 1px solid var(--bet365-border);
    background: var(--bet365-darker);
    padding: 0;
}
.inplay-markets-panel .market-category-section { margin: 0; border-radius: 0; border-left: none; border-right: none; }
.inplay-markets-panel .market-category-header { border-radius: 0; }
.inplay-markets-panel .match-card { border-radius: 0; border: none; }
.inplay-match-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 40px;
    gap: 4px;
}
.inplay-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4caf50;
    animation: livePulse 1.5s ease-in-out infinite;
}
.inplay-minute {
    font-size: 12px;
    font-weight: 700;
    color: var(--bet365-accent);
}
.inplay-match-teams {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.inplay-team {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.inplay-team-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--bet365-text-bright);
}
.inplay-team-score {
    font-size: 14px;
    font-weight: 700;
    color: var(--bet365-text-bright);
    min-width: 20px;
    text-align: center;
}
.inplay-match-odds {
    display: flex;
    gap: 4px;
}
/* ALL three buttons (1, X, 2) — identical in every way, no exceptions */
.inplay-odds-btn,
.inplay-odds-btn:first-child,
.inplay-odds-btn:last-child,
.inplay-odds-btn:nth-child(1),
.inplay-odds-btn:nth-child(2),
.inplay-odds-btn:nth-child(3) {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5px 10px;
    min-width: 50px;
    background: #243046 !important;
    border: 1px solid #2d3748 !important;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.inplay-odds-btn:hover {
    background: #2d4060 !important;
    border-color: #0ea5e9 !important;
    transform: translateY(-1px);
}
/* ALL three buttons (1, X, 2) same label/value color — no differentiation */
.inplay-odds-label {
    font-size: 10px;
    color: #94a3b8 !important;
    font-weight: 600;
}
.inplay-odds-value {
    font-size: 13px;
    font-weight: 700;
    color: #e2e8f0 !important;
}
/* Odds Change Flash */
.odds-flash-up {
    animation: oddsFlashUp 1.5s ease-out;
}
.odds-flash-down {
    animation: oddsFlashDown 1.5s ease-out;
}
@keyframes oddsFlashUp {
    0% { background: rgba(76, 175, 80, 0.4); }
    100% { background: transparent; }
}
@keyframes oddsFlashDown {
    0% { background: rgba(244, 67, 54, 0.4); }
    100% { background: transparent; }
}
/* ===== LIGHT MODE ===== */
/* ── Light mode: CSS variable overrides (cascade to all children) ──────── */
body.light-mode {
    --bet365-dark:        #f0f1f3;
    --bet365-darker:      #e4e6e9;
    --bet365-card:        #ffffff;
    --bet365-card-hover:  #f5f5f5;
    --bet365-border:      #dde1e7;
    --bet365-text:        #1a1a1a;
    --bet365-text-bright: #000000;
    --bet365-text-muted:  #666666;
    --bet365-odds-bg:     #e8e8e8;
    --bet365-odds-hover:  #d8d8d8;
    background: #f0f1f3 !important;
    color: #1a1a1a !important;
}
body.light-mode .header {
    background: linear-gradient(180deg, #1B5E20 0%, #145218 100%) !important;
}
body.light-mode .left-sidebar {
    background: #fff !important;
    border-color: #ddd !important;
}
body.light-mode .sidebar-title { color: #888 !important; }
body.light-mode .sport-item { color: #555 !important; }
body.light-mode .sport-item:hover { background: #f5f5f5 !important; color: #333 !important; }
body.light-mode .sport-item.active { background: #e8f5e9 !important; color: #1B5E20 !important; }
body.light-mode .main-content { background: #f0f1f3 !important; }
body.light-mode .match-card,
body.light-mode .league-card { background: #fff !important; border-color: #ddd !important; }
body.light-mode .league-card:hover { border-color: #4CAF50 !important; }
body.light-mode .match-header { background: #f5f5f5 !important; border-color: #eee !important; }
body.light-mode .match-header .match-teams { color: #333 !important; }
body.light-mode .match-header .match-time { color: #666 !important; }
body.light-mode .odds-btn { background: #e8e8e8 !important; color: #333 !important; }
body.light-mode .odds-btn:hover { background: #ddd !important; }
body.light-mode .odds-btn.selected { background: #1B5E20 !important; color: #fff !important; }
body.light-mode .section-title { color: #333 !important; }
body.light-mode .section-header { color: #333 !important; }
body.light-mode .welcome-section { background: linear-gradient(135deg, #1B5E20 0%, #0d3011 100%) !important; color: #fff !important; }
body.light-mode .market-section { background: #fafafa !important; border-color: #eee !important; }
body.light-mode .market-name { color: #555 !important; }
body.light-mode .odds-label { color: #888 !important; }
body.light-mode .odds-value { color: #333 !important; }
body.light-mode .profile-dropdown-content { background: #fff !important; border-color: #ddd !important; color: #333 !important; }
body.light-mode .profile-modal { background: rgba(0,0,0,0.3) !important; }
body.light-mode .profile-modal-content { background: #fff !important; color: #333 !important; }
body.light-mode .betting-slip { background: #f5f5f5 !important; border-color: #ddd !important; }
body.light-mode .slip-content { background: #f5f5f5 !important; }
body.light-mode .slip-empty p { color: #888 !important; }
body.light-mode .slip-bet { background: #fff !important; border-color: #ddd !important; }
body.light-mode .slip-bet-selection { color: #333 !important; }
body.light-mode .slip-bet-odds { color: #1B5E20 !important; background: #e8f5e9 !important; }
body.light-mode .slip-bet-stake-input { background: #f0f0f0 !important; color: #333 !important; border-color: #ccc !important; }
body.light-mode .slip-footer-section { background: #fff !important; border-color: #ddd !important; }
body.light-mode .slip-stake-input { background: #f0f0f0 !important; color: #333 !important; border-color: #ccc !important; }
body.light-mode .slip-quick-stakes button { background: #e8e8e8 !important; color: #333 !important; border-color: #ccc !important; }
body.light-mode .slip-quick-stakes button:hover { border-color: #1B5E20 !important; color: #1B5E20 !important; }
body.light-mode .slip-totals-row { color: #555 !important; }
body.light-mode .slip-totals-row span:last-child { color: #333 !important; }
body.light-mode .slip-tabs { background: #eee !important; border-color: #ddd !important; }
body.light-mode .slip-tab { color: #888 !important; }
body.light-mode .slip-tab.active { color: #1B5E20 !important; border-color: #1B5E20 !important; background: rgba(27,94,32,0.05) !important; }
body.light-mode .inplay-sport-header { background: #1B5E20 !important; }
body.light-mode .inplay-league-group { background: #fff !important; border-color: #ddd !important; }
body.light-mode .inplay-league-header { background: #f5f5f5 !important; color: #555 !important; border-color: #eee !important; }
body.light-mode .inplay-match-card { border-color: #eee !important; }
body.light-mode .inplay-team-name { color: #333 !important; }
body.light-mode .inplay-team-score { color: #333 !important; }
/* inplay odds light mode handled below */
body.light-mode .inplay-odds-value { color: #1B5E20 !important; }
body.light-mode .no-matches { color: #888 !important; }
body.light-mode .leagues-grid { }
body.light-mode .league-card-name { color: #333 !important; }

/* ── Light mode: Bet365 league list ──────────────────────────────────── */
body.light-mode .league-country-header { background: #e8e8e8 !important; color: #555 !important; border-color: #ccc !important; }
body.light-mode .league-row { background: #fff !important; color: #222 !important; border-color: #e5e5e5 !important; }
body.light-mode .league-row:hover { background: #f0f4f0 !important; color: #000 !important; }
body.light-mode .league-row-arrow { color: #999 !important; }

/* ── Light mode: Preferences theme toggle ────────────────────────────── */
body.light-mode .pref-theme-row { border-color: #ddd !important; }
body.light-mode .pref-theme-label { color: #333 !important; }
body.light-mode .theme-btn { background: #e8e8e8 !important; border-color: #ccc !important; color: #333 !important; }
body.light-mode .theme-btn.active { background: #1B5E20 !important; border-color: #1B5E20 !important; color: #fff !important; }

/* ── Light mode: status bar ──────────────────────────────────────────── */
body.light-mode #oddsStatusBar { color: #666 !important; }

/* ── Bet365-style league list ─────────────────────────────────────────── */
.leagues-grid {
    display: block !important;
    padding: 0 0 24px 0;
}
.league-country-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px 6px;
    background: var(--bet365-darker);
    border-top: 1px solid var(--bet365-border);
    font-size: 12px;
    font-weight: 700;
    color: var(--bet365-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 2;
}
.league-country-flag { font-size: 16px; display: inline-flex; align-items: center; }
.country-flag-img { width: 18px; height: 18px; object-fit: cover; border-radius: 50%; vertical-align: middle; }
.match-flag-img { width: 16px; height: 16px; object-fit: cover; border-radius: 50%; vertical-align: middle; margin-right: 4px; }
.league-country-name { flex: 1; }
.league-row {
    display: flex;
    align-items: center;
    padding: 11px 14px 11px 24px;
    background: var(--bet365-card);
    border-bottom: 1px solid var(--bet365-border);
    cursor: pointer;
    transition: background 0.15s;
    font-size: 14px;
    color: var(--bet365-text);
}
.league-row:hover { background: var(--bet365-card-hover); color: #fff; }
.league-row-name  { flex: 1; user-select: text; -webkit-user-select: text; }
.league-row-arrow { color: var(--bet365-text-muted); font-size: 18px; font-weight: 300; }
.outright-badge {
    display: inline-block;
    font-size: 10px;
    background: #1B5E20;
    color: #fff;
    border-radius: 3px;
    padding: 1px 5px;
    margin-left: 6px;
    vertical-align: middle;
}

/* ── Theme toggle in Preferences ─────────────────────────────────────── */
.pref-theme-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--bet365-border);
    margin-bottom: 4px;
}
.pref-theme-label {
    font-size: 14px;
    color: var(--bet365-text);
    font-weight: 600;
}
.theme-toggle-group {
    display: flex;
    gap: 6px;
}
.theme-btn {
    padding: 7px 16px;
    border-radius: 20px;
    border: 2px solid var(--bet365-border);
    background: var(--bet365-card);
    color: var(--bet365-text);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}
.theme-btn:hover { border-color: #4CAF50; color: #fff; }
.theme-btn.active {
    background: #1B5E20;
    border-color: #1B5E20;
    color: #fff;
}

/* ── Coming Soon panel (Casino / Games) ──────────────────────────────── */
.coming-soon-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    text-align: center;
    color: var(--bet365-text-muted);
}
.coming-soon-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.4;
}
.coming-soon-panel h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--bet365-text-bright);
    margin-bottom: 8px;
}
.coming-soon-panel p {
    font-size: 14px;
    color: var(--bet365-text-muted);
    max-width: 280px;
}
body.light-mode .coming-soon-panel h3 { color: #111 !important; }
body.light-mode .coming-soon-panel p  { color: #666 !important; }

/* ── Live page header ─────────────────────────────────────────────────── */
.live-page-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bet365-darker);
    border-bottom: 1px solid var(--bet365-border);
    font-size: 13px;
    font-weight: 700;
    color: var(--bet365-text);
}
.live-page-dot {
    width: 9px; height: 9px;
    background: #e53935;
    border-radius: 50%;
    animation: pulse 1.2s infinite;
    flex-shrink: 0;
}
.live-page-count { color: var(--bet365-text-bright); }

.inplay-league-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.inplay-league-count {
    background: #1B5E20;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    padding: 1px 7px;
    min-width: 20px;
    text-align: center;
}
.inplay-match-info {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 8px;
    min-width: 0;
}

/* ── Real-time odds change animations ─────────────────────────────────── */
@keyframes oddsFlashUp {
    0%   { background: #00c853; color: #fff; }
    60%  { background: #00c853; color: #fff; }
    100% { background: inherit; color: inherit; }
}
@keyframes oddsFlashDown {
    0%   { background: #d32f2f; color: #fff; }
    60%  { background: #d32f2f; color: #fff; }
    100% { background: inherit; color: inherit; }
}
.selection-btn.odds-up   { animation: oddsFlashUp   1.5s ease forwards; }
.selection-btn.odds-down { animation: oddsFlashDown 1.5s ease forwards; }

/* Live pulse dot next to match minute */
.live-pulse {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #f44336;
    margin-right: 4px;
    animation: pulseScale 1.2s infinite;
}
@keyframes pulseScale {
    0%, 100% { opacity: 1;   transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(1.4); }
}

/* Last-updated / quota bar */
#oddsStatusBar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #888;
    padding: 2px 10px 4px;
    gap: 12px;
}
#oddsStatusBar span { opacity: 0.8; }

/* ═══════════════════════════════════════════════════════════════════════
   LIGHT MODE — COMPREHENSIVE FIXES
   Everything that needs to be visible on a white background
   ═══════════════════════════════════════════════════════════════════════ */

/* Sidebar */
body.light-mode .left-sidebar { background: #fff !important; border-color: #ddd !important; }
body.light-mode .sidebar-title { color: #999 !important; background: #f5f5f5 !important; }
body.light-mode .sport-item { color: #333 !important; }
body.light-mode .sport-item:hover { background: #f0f4f0 !important; color: #1B5E20 !important; }
body.light-mode .sport-item.active { background: #e8f5e9 !important; color: #1B5E20 !important; border-left-color: #1B5E20 !important; }
body.light-mode .sport-icon { filter: none !important; }
body.light-mode .sport-name { color: inherit !important; }

/* Main content */
body.light-mode .main-content { background: #f0f1f3 !important; }
body.light-mode .section-title { color: #222 !important; }
body.light-mode .section-header { border-color: #ddd !important; }
body.light-mode .no-matches { color: #666 !important; }
body.light-mode .welcome-title { color: #222 !important; }
body.light-mode .welcome-text { color: #555 !important; }

/* Match cards */
body.light-mode .match-card { background: #fff !important; border-color: #ddd !important; box-shadow: 0 1px 3px rgba(0,0,0,0.08) !important; }
body.light-mode .match-header { background: #f5f7f5 !important; border-color: #e0e0e0 !important; }
body.light-mode .match-teams { color: #111 !important; }
body.light-mode .team-name { color: #111 !important; font-weight: 600 !important; }
body.light-mode .match-time { color: #555 !important; }
body.light-mode .match-league { color: #777 !important; }
body.light-mode .match-score { color: #111 !important; }
body.light-mode .live-badge { background: #e53935 !important; color: #fff !important; }
body.light-mode .live-dot { background: #e53935 !important; }
body.light-mode .live-dot-header { background: #e53935 !important; }

/* Markets & Odds */
body.light-mode .market-section { background: #fafafa !important; border-color: #eee !important; }
body.light-mode .market-header { background: #f0f0f0 !important; border-color: #e0e0e0 !important; }
body.light-mode .market-name { color: #333 !important; }
body.light-mode .market-toggle { color: #555 !important; }
body.light-mode .odds-btn { background: #e8eaed !important; color: #111 !important; border-color: #ccc !important; }
body.light-mode .odds-btn:hover { background: #dde1e7 !important; color: #000 !important; }
body.light-mode .odds-btn.selected { background: #1B5E20 !important; color: #fff !important; border-color: #1B5E20 !important; }
body.light-mode .odds-label { color: #555 !important; }
body.light-mode .odds-value { color: #1B5E20 !important; font-weight: 700 !important; }
body.light-mode .sel-name { color: #333 !important; }
body.light-mode .selection-btn { background: #e8eaed !important; color: #111 !important; border-color: #ccc !important; }
body.light-mode .selection-btn:hover { background: #dde1e7 !important; }
body.light-mode .selection-btn.selected { background: #1B5E20 !important; color: #fff !important; }

/* Betting Slip */
body.light-mode .betting-slip { background: #f5f5f5 !important; border-color: #ddd !important; }
body.light-mode .slip-header { background: #1B5E20 !important; color: #fff !important; }
body.light-mode .slip-header-title { color: #fff !important; }
body.light-mode .slip-count { background: #FFDF1B !important; color: #1B5E20 !important; }
body.light-mode .slip-clear-btn { color: #fff !important; }
body.light-mode .slip-tabs { background: #e8e8e8 !important; border-color: #ddd !important; }
body.light-mode .slip-tab { color: #666 !important; }
body.light-mode .slip-tab.active { color: #1B5E20 !important; border-color: #1B5E20 !important; background: #fff !important; }
body.light-mode .slip-content { background: #f5f5f5 !important; }
body.light-mode .slip-empty p { color: #888 !important; }
body.light-mode .slip-bet { background: #fff !important; border-color: #ddd !important; }
body.light-mode .slip-bet-match { color: #333 !important; }
body.light-mode .slip-bet-market { color: #666 !important; }
body.light-mode .slip-bet-selection { color: #111 !important; font-weight: 600 !important; }
body.light-mode .slip-bet-odds { color: #1B5E20 !important; background: #e8f5e9 !important; }
body.light-mode .slip-bet-remove { color: #999 !important; }
body.light-mode .slip-bet-remove:hover { color: #e53935 !important; }
body.light-mode .slip-bet-stake-input { background: #f0f0f0 !important; color: #111 !important; border-color: #ccc !important; }
body.light-mode .slip-footer-section { background: #fff !important; border-color: #ddd !important; }
body.light-mode .slip-stake-label { color: #333 !important; }
body.light-mode .slip-stake-input { background: #f0f0f0 !important; color: #111 !important; border-color: #ccc !important; border-radius: 6px !important; }
body.light-mode .slip-stake-input:focus { border-color: #1B5E20 !important; background: #fff !important; }
body.light-mode .slip-quick-stakes button { background: #e8e8e8 !important; color: #333 !important; border-color: #ccc !important; }
body.light-mode .slip-quick-stakes button:hover { background: #d4edda !important; border-color: #1B5E20 !important; color: #1B5E20 !important; }
body.light-mode .slip-acca-odds { color: #333 !important; }
body.light-mode .slip-acca-odds-val { color: #1B5E20 !important; }
body.light-mode .slip-totals-row { color: #555 !important; border-color: #eee !important; }
body.light-mode .slip-totals-returns { background: rgba(27,94,32,0.08) !important; color: #1B5E20 !important; }
body.light-mode .slip-totals-returns span:first-child { color: #333 !important; font-weight: 600 !important; }
body.light-mode .slip-totals-returns span:last-child  { color: #1B5E20 !important; font-weight: 700 !important; }
body.light-mode #potentialWin { color: #1B5E20 !important; font-weight: 700 !important; }
body.light-mode #totalStakeDisplay { color: #333 !important; }

/* Stake section specific */
body.light-mode .stake-section { background: #fff !important; border-color: #ddd !important; }
body.light-mode .stake-label { color: #555 !important; }
body.light-mode .stake-input-row { background: #f0f0f0 !important; border-color: #ccc !important; }
body.light-mode .stake-input-row:focus-within { border-color: #1B5E20 !important; }
body.light-mode .stake-currency { background: #1B5E20 !important; color: #FFDF1B !important; }
body.light-mode .stake-main-input { color: #111 !important; background: transparent !important; }
body.light-mode .stake-main-input::placeholder { color: #aaa !important; }

/* Profile & Modals */
body.light-mode .profile-modal { background: rgba(0,0,0,0.4) !important; }
body.light-mode .profile-modal-content { background: #fff !important; color: #222 !important; box-shadow: 0 8px 32px rgba(0,0,0,0.2) !important; }
body.light-mode .modal-title { color: #111 !important; border-color: #eee !important; }
body.light-mode .preference-item { color: #222 !important; border-color: #eee !important; }
body.light-mode .preference-item:hover { background: #f5f5f5 !important; }
body.light-mode .preference-icon { filter: none !important; }
body.light-mode .preference-label { color: #333 !important; }
body.light-mode .preference-value { color: #1B5E20 !important; }
body.light-mode .profile-close { color: #555 !important; }
body.light-mode .profile-close:hover { color: #000 !important; }
body.light-mode .option-item { color: #333 !important; border-color: #eee !important; }
body.light-mode .option-item:hover { background: #f5f5f5 !important; }
body.light-mode .option-item.active { color: #1B5E20 !important; background: #e8f5e9 !important; }
body.light-mode .options-list { background: #fff !important; }

/* In-Play / Live section */
body.light-mode .inplay-sport-group { background: #fff !important; border-color: #ddd !important; }
body.light-mode .inplay-sport-header { background: #1B5E20 !important; color: #fff !important; }
body.light-mode .inplay-sport-name { color: #fff !important; }
body.light-mode .inplay-sport-count { color: rgba(255,255,255,0.8) !important; }
body.light-mode .inplay-league-header { background: #f0f0f0 !important; color: #444 !important; border-color: #e0e0e0 !important; }
body.light-mode .inplay-match-card { background: #fff !important; border-color: #eee !important; }
body.light-mode .inplay-team-name { color: #111 !important; font-weight: 600 !important; }
body.light-mode .inplay-team-score { color: #111 !important; font-weight: 700 !important; }
body.light-mode .inplay-minute { color: #555 !important; }
body.light-mode .inplay-odds-btn { background: #e8eaed !important; border-color: #ccc !important; }
body.light-mode .inplay-odds-btn:hover { background: #d8dce2 !important; }
body.light-mode .inplay-odds-label { color: #555 !important; }
body.light-mode .inplay-odds-value { color: #1B5E20 !important; font-weight: 700 !important; }

/* ── Light mode: Bet History ─────────────────────────────────────────── */
body.light-mode .bh-modal-header  { border-color: #ddd !important; }
body.light-mode .bets-stats       { border-color: #ddd !important; background: #fafafa !important; }
body.light-mode .bet-stat         { border-color: #ddd !important; }
body.light-mode .bet-stat-value   { color: #111 !important; }
body.light-mode .bet-stat-label   { color: #666 !important; }
body.light-mode .bet-stat.pending .bet-stat-value { color: #b8860b !important; }
body.light-mode .bet-stat.closed .bet-stat-value  { color: #1B5E20 !important; }
body.light-mode .bets-filters     { background: #f0f0f0 !important; border-color: #ddd !important; }
body.light-mode .bets-filter-btn  { background: #e8e8e8 !important; color: #333 !important; border-color: #ccc !important; }
body.light-mode .bets-filter-btn.active { background: #1B5E20 !important; color: #fff !important; border-color: #1B5E20 !important; }
body.light-mode .bets-list        { background: #f5f5f5 !important; }
body.light-mode .bh-item          { background: #fff !important; border-color: #ddd !important; }
body.light-mode .bh-item:hover    { background: #f5f5f5 !important; }
body.light-mode .bh-pending       { border-left-color: #b8860b !important; }
body.light-mode .bh-won           { border-left-color: #1B5E20 !important; }
body.light-mode .bh-lost          { border-left-color: #c62828 !important; }
body.light-mode .bh-cancelled     { border-left-color: #999 !important; }
body.light-mode .bh-match         { color: #111 !important; }
body.light-mode .bh-vs            { color: #999 !important; }
body.light-mode .bh-league        { color: #666 !important; }
body.light-mode .bh-code          { color: #777 !important; }
body.light-mode .bh-market        { color: #777 !important; }
body.light-mode .bh-pick          { color: #111 !important; }
body.light-mode .bh-odds          { color: #1B5E20 !important; }
body.light-mode .bh-stake         { color: #333 !important; }
body.light-mode .bh-potential     { color: #555 !important; }
body.light-mode .bh-score         { background: #e8e8e8 !important; color: #111 !important; }
body.light-mode .bh-score-live    { color: #1B5E20 !important; }
body.light-mode .bh-minute        { color: #b8860b !important; }
body.light-mode .bh-date          { color: #999 !important; }
body.light-mode .bh-bottom        { border-color: #eee !important; }
body.light-mode .bh-status-pending   { background: rgba(184,134,11,0.12)  !important; color: #b8860b !important; }
body.light-mode .bh-status-won       { background: rgba(27,94,32,0.12)    !important; color: #1B5E20 !important; }
body.light-mode .bh-status-lost      { background: rgba(198,40,40,0.12)   !important; color: #c62828 !important; }
body.light-mode .bh-status-cancelled { background: rgba(100,100,100,0.12) !important; color: #666 !important; }
body.light-mode .no-bets          { color: #888 !important; }

/* ── Card color theme — matching basketball live card ────────────────── */
.match-card {
    background: #1a2232;
    border: 1px solid #2d3748;
    color: #e2e8f0;
}
.match-header {
    background: #111827;
    border-bottom: 1px solid #2d3748;
}
.match-league-label { color: #0ea5e9 !important; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.team-name { color: #e2e8f0 !important; font-weight: 700; }
.odds-quick-btn {
    background: #243046;
    border: 1px solid #2d3748;
    color: #e2e8f0;
}
.odds-quick-btn:hover { background: #2d4060 !important; border-color: #0ea5e9 !important; }
.odds-quick-btn.selected { background: #0ea5e9 !important; border-color: #0ea5e9 !important; color: #fff !important; }
.odds-quick-btn .odds-value { color: #fff !important; font-weight: 700; }
.market-category-header { background: #111827 !important; border-color: #2d3748 !important; }
.market-category-name { color: #94a3b8 !important; text-transform: uppercase; font-size: 11px; letter-spacing: 0.5px; }
.market-row-header-inline { background: #111827; border-color: #2d3748; }
.market-row-name { color: #94a3b8; font-size: 12px; }
.selection-name { color: #e2e8f0; font-size: 12px; }

/* Light mode: restore card colors */
body.light-mode .match-card       { background: #fff !important;    border-color: #ddd !important; color: #111 !important; }
body.light-mode .match-header     { background: #f5f7f5 !important; border-color: #e0e0e0 !important; }
body.light-mode .team-name        { color: #111 !important; }
body.light-mode .match-league-label { color: #1B5E20 !important; }
body.light-mode .match-score      { color: #111 !important; }
body.light-mode .odds-quick-btn   { background: #e8eaed !important; border-color: #ccc !important; color: #111 !important; }
body.light-mode .odds-quick-btn:hover { background: #dde1e7 !important; border-color: #1B5E20 !important; }
body.light-mode .odds-quick-btn.selected { background: #1B5E20 !important; color: #fff !important; border-color: #1B5E20 !important; }
body.light-mode .odds-quick-btn .odds-value { color: #1B5E20 !important; }
body.light-mode .market-category-header { background: #f0f0f0 !important; border-color: #ddd !important; }
body.light-mode .market-category-name   { color: #555 !important; }
body.light-mode .market-row-header-inline { background: #f5f5f5 !important; border-color: #e8e8e8 !important; }
body.light-mode .market-row-name  { color: #555 !important; }
body.light-mode .selection-name   { color: #111 !important; }
body.light-mode .market-category-section { background: #fafafa !important; border-color: #eee !important; }
body.light-mode .market-category-content { background: #fff !important; }
/* Auth modal */
body.light-mode .auth-modal-content { background: #fff !important; color: #222 !important; }
body.light-mode .auth-modal-content h2 { color: #111 !important; }
body.light-mode .auth-subtitle { color: #666 !important; }
body.light-mode .auth-form-group label { color: #333 !important; }
body.light-mode .auth-form-group input { background: #f5f5f5 !important; color: #111 !important; border-color: #ccc !important; }
body.light-mode .auth-form-group input:focus { border-color: #1B5E20 !important; background: #fff !important; }
body.light-mode .auth-switch { color: #555 !important; }
body.light-mode .auth-switch a { color: #1B5E20 !important; }
body.light-mode .auth-close { color: #555 !important; }

/* Bets history */
body.light-mode .bets-modal-content { background: #fff !important; color: #222 !important; }
body.light-mode .bet-stat-value { color: #1B5E20 !important; }
body.light-mode .bet-stat-label { color: #666 !important; }
body.light-mode .bets-filter-btn { background: #e8e8e8 !important; color: #555 !important; border-color: #ccc !important; }
body.light-mode .bets-filter-btn.active { background: #1B5E20 !important; color: #fff !important; }
body.light-mode .bet-item { background: #f9f9f9 !important; border-color: #eee !important; }
body.light-mode .bet-item:hover { background: #f0f0f0 !important; }
body.light-mode .bet-history-match { color: #111 !important; }
body.light-mode .bet-history-market { color: #555 !important; }
body.light-mode .bet-history-selection { color: #1B5E20 !important; }
body.light-mode .bet-history-odds { color: #333 !important; }
body.light-mode .bet-history-stake { color: #333 !important; }
body.light-mode .bet-detail-modal-content { background: #fff !important; color: #222 !important; }
body.light-mode .bet-detail-modal-label { color: #666 !important; }
body.light-mode .bet-detail-modal-val { color: #111 !important; }
body.light-mode .bet-detail-modal-divider { border-color: #eee !important; }

/* Header stays green always */
body.light-mode .header { background: linear-gradient(180deg, #1B5E20 0%, #145218 100%) !important; }
body.light-mode .header-nav a { color: rgba(255,255,255,0.85) !important; }
body.light-mode .header-nav a.active { background: #FFDF1B !important; color: #1B5E20 !important; }
body.light-mode .header-clock { color: #fff !important; }
body.light-mode .user-balance { color: #FFDF1B !important; }
body.light-mode .balance-amount { color: #FFDF1B !important; font-weight: 800 !important; }
body.light-mode .balance-amount-small { color: #FFDF1B !important; }

/* Toast */
/* toast light-mode handled above in toast section */

/* Odds status bar */
body.light-mode #oddsStatusBar { color: #666 !important; background: #e8e8e8 !important; }

/* Live page */
body.light-mode .live-page-header { background: #e8e8e8 !important; color: #333 !important; border-color: #ddd !important; }
body.light-mode .live-page-count { color: #111 !important; }
body.light-mode .inplay-league-group { background: #fff !important; border-color: #ddd !important; }
body.light-mode .inplay-league-header { background: #f0f0f0 !important; color: #333 !important; border-color: #e0e0e0 !important; }
body.light-mode .inplay-match-card { background: #fff !important; border-color: #eee !important; }
body.light-mode .inplay-team-name { color: #111 !important; }
body.light-mode .inplay-team-score { color: #111 !important; font-weight: 700 !important; }
body.light-mode .inplay-minute { color: #555 !important; }
body.light-mode .inplay-odds-btn { background: #e8eaed !important; border-color: #ccc !important; }
body.light-mode .inplay-odds-btn:hover { background: #d8dce2 !important; }
body.light-mode .inplay-odds-label { color: #555 !important; }
body.light-mode .inplay-odds-value { color: #1B5E20 !important; font-weight: 700 !important; }
/* ?? In-play new elements light mode ????????????????????????????????????? */
body.light-mode .inplay-odds-btn.selected { background: #1B5E20 !important; border-color: #1B5E20 !important; }
body.light-mode .inplay-odds-btn.selected .inplay-odds-label,
body.light-mode .inplay-odds-btn.selected .inplay-odds-value { color: #fff !important; }
body.light-mode .inplay-odds-btn.inplay-odds-locked { background: #f0f0f0 !important; opacity: 0.4 !important; }
body.light-mode .inplay-market-count { color: #1B5E20 !important; background: rgba(27,94,32,0.1) !important; }
body.light-mode .inplay-market-count:hover { background: rgba(27,94,32,0.2) !important; }
body.light-mode .inplay-markets-panel { background: #f5f5f5 !important; border-color: #ddd !important; }
body.light-mode .inplay-match-card.inplay-card-expanded { background: rgba(27,94,32,0.04) !important; }

/* ???????????????????????????????????????????????????????????????????????
   IN-PLAY MATCH MARKETS MODAL
   ??????????????????????????????????????????????????????????????????????? */
.ipm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.72);
    z-index: 3000;
    display: none;
    align-items: flex-end;
    justify-content: center;
}
.ipm-overlay.show { display: flex; }

.ipm-modal {
    background: #111827;
    border-radius: 16px 16px 0 0;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid #1e2d42;
    border-bottom: none;
    animation: ipmSlideUp 0.25s ease;
}
@keyframes ipmSlideUp {
    from { transform: translateY(60px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.ipm-close {
    position: sticky;
    top: 10px;
    float: right;
    margin: 10px 14px 0 0;
    background: rgba(255,255,255,0.08);
    border: none;
    border-radius: 50%;
    width: 32px; height: 32px;
    font-size: 16px;
    color: #e2e8f0;
    cursor: pointer;
    z-index: 10;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
.ipm-close:hover { background: rgba(255,255,255,0.18); }

/* Header: score + league + quick odds */
.ipm-header {
    background: #1a2232;
    padding: 20px 18px 14px;
    border-bottom: 1px solid #2d3748;
    clear: both;
}
.ipm-score-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.ipm-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
}
.ipm-team-away { align-items: center; }
.ipm-team-name {
    font-size: 14px;
    font-weight: 700;
    color: #e2e8f0;
    text-align: center;
    line-height: 1.2;
}
.ipm-team-score {
    font-size: 32px;
    font-weight: 800;
    color: #4CAF50;
    line-height: 1;
}
.ipm-middle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 60px;
}
.ipm-live-badge {
    display: flex;
    align-items: center;
    background: #e53935;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 3px;
    letter-spacing: 0.5px;
}
.ipm-time {
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
}
.ipm-league {
    font-size: 11px;
    color: #64748b;
    text-align: center;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Quick 1X2 bar in modal */
.ipm-quick-odds {
    display: flex;
    gap: 6px;
    justify-content: center;
}
.ipm-odds-btn {
    flex: 1;
    max-width: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px;
    background: #243046;
    border: 1px solid #2d3748;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    overflow: hidden;
}
.ipm-odds-btn:hover { background: #2d4060; border-color: #0ea5e9; }
.ipm-odds-btn.selected { background: #0ea5e9; border-color: #0ea5e9; }
.ipm-label {
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 2px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}
.ipm-val {
    font-size: 16px;
    font-weight: 700;
    color: #e2e8f0;
}
.ipm-odds-btn.selected .ipm-label,
.ipm-odds-btn.selected .ipm-val { color: #fff; }

/* Markets area */
.ipm-markets {
    padding-bottom: 24px;
}
.ipm-markets .market-category-section {
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
}
.ipm-markets .market-category-header { border-radius: 0; }

/* Light mode */
body.light-mode .ipm-modal        { background: #fff !important; border-color: #ddd !important; }
body.light-mode .ipm-header       { background: #f5f5f5 !important; border-color: #ddd !important; }
body.light-mode .ipm-team-name    { color: #111 !important; }
body.light-mode .ipm-team-score   { color: #1B5E20 !important; }
body.light-mode .ipm-time         { color: #555 !important; }
body.light-mode .ipm-league       { color: #888 !important; }
body.light-mode .ipm-close        { background: rgba(0,0,0,0.08) !important; color: #333 !important; }
body.light-mode .ipm-odds-btn     { background: #e8eaed !important; border-color: #ccc !important; }
body.light-mode .ipm-odds-btn:hover { background: #d8dce2 !important; border-color: #1B5E20 !important; }
body.light-mode .ipm-odds-btn.selected { background: #1B5E20 !important; border-color: #1B5E20 !important; }
body.light-mode .ipm-label        { color: #666 !important; }
body.light-mode .ipm-val          { color: #111 !important; }
body.light-mode .ipm-odds-btn.selected .ipm-label,
body.light-mode .ipm-odds-btn.selected .ipm-val { color: #fff !important; }
body.light-mode .ipm-markets      { background: #f0f0f0 !important; }

/* ?? In-play modal loading state ?????????????????????????????????????? */
.ipm-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    gap: 16px;
    min-height: 200px;
}
.ipm-loading-score {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    font-weight: 700;
    color: #e2e8f0;
}
.ipm-loading-team { max-width: 120px; text-align: center; line-height: 1.3; }
.ipm-loading-vs { font-size: 20px; font-weight: 800; color: #4CAF50; white-space: nowrap; }
.ipm-loading-spinner {
    width: 28px; height: 28px;
    border: 3px solid #2d3748;
    border-top-color: #0ea5e9;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
.ipm-loading-text { font-size: 13px; color: #64748b; }
body.light-mode .ipm-loading-score { color: #111 !important; }
body.light-mode .ipm-loading-text  { color: #888 !important; }

/* ?? New bet status classes ??????????????????????????????????????????? */
.bh-half       { border-left-color: #ff9800 !important; }
.bh-status-half { background: rgba(255,152,0,0.15); color: #ff9800; }
body.light-mode .bh-half { border-left-color: #e65100 !important; }
body.light-mode .bh-status-half { background: rgba(230,81,0,0.12) !important; color: #e65100 !important; }
