.main-wrapper {
    display: flex;
    width: 100%;
    min-height: calc(100vh - 122px); /* Adjust for header height */
    overflow: hidden;
}

.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: margin-left 0.3s ease;
}

.main-container {
    display: flex;
    gap: 2px; /* Further reduced gap */
    overflow-y: auto;
    padding: 0 5px; /* Reduced side padding */
}

.betting-container {
    flex: 1;
}

.matched-bets-container {
    width: 300px; /* Slightly narrower */
}

/* Left Sidebar Styles */
.left-sidebar {
    width: 250px;
    min-width: 250px;
    background-color: #e1ecf7;
    color: #000;
    overflow-y: auto;
    border-right: 1px solid #ccc;
    transition: all 0.3s ease;
    z-index: 100;
    position: relative;
}

.left-sidebar.collapsed {
    margin-left: -250px;
    min-width: 0;
}

/* Left Sidebar Toggle Button */
.left-sidebar-toggle {
    position: absolute;
    top: 5px; /* Reduced */
    right: -10px; /* Reduced */
    background-color: #64a5c3;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px; /* Smaller */
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 101;
    cursor: pointer;
    box-shadow: 0 0 4px rgba(0,0,0,0.2);
}

/* Right Sidebar Toggle Button */
.sidebar-toggle {
    position: fixed;
    top: 150px;
    right: 0;
    background-color: #004558;
    color: white;
    border: none;
    padding: 6px 8px; /* Reduced */
    border-radius: 5px 0 0 5px;
    cursor: pointer;
    z-index: 99;
    display: flex;
    align-items: center;
    box-shadow: 0 0 4px rgba(0,0,0,0.2);
}

.sidebar-toggle i {
    font-size: 18px;
}

/* Custom Header Styles */
.site-header {
    background: linear-gradient(to right, #005e76, #00a9c7);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

.logo-container {
    padding: 6px 8px; /* Reduced */
}

.logo-container img {
    height: 32px; /* Slightly smaller */
}

.main-nav {
    display: flex;
    background: linear-gradient(to right, #005e76, #00a9c7);
    color: white;
    overflow-x: auto;
    white-space: nowrap;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
    display: none;
}

.nav-item {
    padding: 6px 8px; /* Reduced */
    color: white;
    text-decoration: none;
    font-size: 13px; /* Slightly smaller */
    font-weight: 500;
    position: relative;
    transition: background-color 0.3s;
}

.nav-item:hover, .nav-item.active {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background-color: #f44336;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.account-info {
    display: flex;
    align-items: center;
    background-color: #004558;
    padding: 3px 8px; /* Reduced */
    justify-content: flex-end;
}

.balance-display {
    color: white;
    font-weight: 600;
    font-size: 13px; /* Slightly smaller */
    padding: 3px 5px; /* Reduced */
    background-color: #006a85;
    border-radius: 4px;
    margin-left: 5px;
}

.sub-header {
    background-color: #222;
    color: white;
    padding: 4px 8px; /* Reduced */
    font-size: 12px;
    display: flex;
    justify-content: space-between;
}

/* Right Sidebar Styles */
.right-sidebar {
    width: 250px;
    background-color: #004558;
    color: white;
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    z-index: 200;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.right-sidebar.open {
    transform: translateX(0);
}

.sidebar-header {
    background-color: #003a4a;
    padding: 8px; /* Reduced */
    text-align: right;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header .close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
}

.user-info {
    padding: 4px 8px; /* Reduced */
    border-bottom: 1px solid #005e76;
    display: flex;
    align-items: center;
    font-size: 13px;
}

.user-info i {
    margin-right: 8px;
    color: #00a9c7;
}

.stats-container {
    display: flex;
    padding: 0;
    border-bottom: 1px solid #005e76;
}

.stat-box {
    flex: 1;
    padding: 6px; /* Reduced */
    text-align: center;
    border-right: 1px solid #005e76;
}

.stat-box:last-child {
    border-right: none;
}

.stat-label {
    font-size: 12px;
    color: #ccc;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 16px;
    font-weight: 600;
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0; /* Reduced */
}

.menu-item {
    padding: 6px 8px; /* Reduced */
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    font-size: 13px;
    transition: background-color 0.3s;
}

.menu-item:hover {
    background-color: #005e76;
}

.menu-item i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
    color: #00a9c7;
}

.logout-btn {
    padding: 6px 8px; /* Reduced */
    background-color: #003a4a;
    color: white;
    border: none;
    text-align: left;
    width: 100%;
    font-size: 13px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.logout-btn i {
    margin-right: 10px;
    color: #f44336;
}

.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 20px; /* Slightly smaller */
    padding: 3px 6px; /* Reduced */
    cursor: pointer;
}

/* Main Content Styles */
.header-bar {
    background-color: #16a5bf;
    color: white;
    padding: 3px 4px; /* Reduced */
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.header-bar h3 {
    margin: 0;
    font-size: 15px; /* Reduced */
    font-weight: 600;
}

.date-info {
    display: flex;
    align-items: center;
    font-size: 13px;
}

.market-header {
    background-color: #5bb6d1;
    color: white;
    padding: 3px 4px; /* Reduced */
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    border-radius: 3px 3px 0 0;
}

.market-header-title {
    margin: 0;
    font-weight: 600;
}

.collapse-btn {
    border: none;
    background: none;
    color: white;
    cursor: pointer;
    padding: 0;
    font-size: 14px;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.betting-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    table-layout: fixed;
    margin: 0;
}

.betting-table tr {
    border-bottom: 1px solid #e8e8e8;
}

.betting-table tr:last-child {
    border-bottom: none;
}

.betting-table td, .betting-table th {
    padding: 2px 1px; /* Further reduced */
    text-align: center;
    vertical-align: middle;
}

.team-name {
    text-align: left;
    font-weight: 600;
    color: #212121;
    white-space: nowrap;
    padding-left: 4px;
    padding-right: 1px;
    width: 50%;
    font-size: 12px;
}

.header-cell {
    padding: 3px 2px; /* Reduced */
    text-align: center;
    font-weight: 600;
    color: #000;
    width: 25%;
    font-size: 12px;
}

.back-header, .lay-header {
    border-radius: 4px;
    font-size: 12px; /* Reduced */
    font-weight: bold;
    padding: 2px 1px;
}

.back-header {
    background-color: #92c9f9;
}

.lay-header {
    background-color: #f9c9d7;
}

.back-cell {
    background-color: #92c9f9;
    cursor: pointer;
    transition: all 0.2s;
    padding: 2px 1px;
    width: 25%;
    border-radius: 4px;
}

.lay-cell {
    background-color: #f9c9d7;
    cursor: pointer;
    transition: all 0.2s;
    padding: 2px 1px;
    width: 25%;
    border-radius: 4px;
}

.odds-value {
    font-weight: 700;
    font-size: 13px; /* Reduced */
    color: #212121;
    line-height: 1.2;
}

.volume-value {
    font-size: 11px;
    color: rgba(0, 0, 0, 0.5);
    margin-top: 1px;
    line-height: 1;
}

/* Mobile runner styles */
.mobile-header-row {
    display: flex;
    background-color: #fff;
    padding: 2px 1px; /* Reduced */
    border-bottom: 1px solid #e8e8e8;
}

.mobile-team-header {
    flex: 1;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 12px; /* Reduced */
    padding-left: 3px;
}

.mobile-odds-header {
    width: 50%;
    display: flex;
}

.mobile-back-header, .mobile-lay-header {
    flex: 1;
    text-align: center;
    font-weight: 600;
    padding: 2px; /* Reduced */
    font-size: 12px;
}

.mobile-back-header {
    background-color: #92c9f9;
    color: #000;
    margin-right: 2px;
}

.mobile-lay-header {
    background-color: #f9c9d7;
    color: #000;
}

.runner-card {
    padding: 2px 3px; /* Reduced */
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    position: relative;
}

.runner-card.suspended {
    background-color: #f8f9fa;
}

.runner-name {
    font-weight: 600;
    color: #212121;
    flex: 1;
    text-align: left;
    padding-right: 3px;
    font-size: 12px;
}

.runner-odds {
    display: flex;
    gap: 2px; /* Reduced */
    width: 50%;
}

.runner-odds .back-cell,
.runner-odds .lay-cell {
    flex: 1;
    border-radius: 4px;
    padding: 2px 1px;
}

.suspended-cell {
    background-color: #6c757d;
    color: white;
    text-align: center;
    font-weight: 600;
    padding: 8px;
}

.suspended-label {
    color: #ff0000;
    font-weight: 600;
    text-align: center;
    background-color: rgba(255, 0, 0, 0.1);
    padding: 3px; /* Reduced */
    border-radius: 4px;
}

/* Market section styles */
.market-section {
    background-color: white;
    border-radius: 4px;
    margin-bottom: 4px; /* Reduced */
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 1px solid #e8e8e8;
}

.market-body {
    padding: 0;
}

/* Mobile market card styles */
.market-card {
    background-color: white;
    border-radius: 4px;
    margin-bottom: 4px; /* Reduced */
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 1px solid #e8e8e8;
}

.market-card-header {
    background-color: #5bb6d1;
    color: white;
    padding: 3px 4px; /* Reduced */
    font-size: 13px;
}

.market-card-header h4 {
    margin: 0;
    font-size: 13px; /* Reduced */
    font-weight: 600;
}

.market-card-body {
    padding: 0;
}

.bet-slip-container {
    background-color: #e9f1f7;
    border-top: 1px solid #ccc;
    padding: 8px; /* Reduced */
}

.bet-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.team-selection {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

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

.odds-input {
    width: 70px;
    height: 35px;
    border: 1px solid #ccc;
    text-align: center;
    margin: 0 5px;
}

.odds-btn {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ccc;
    border: none;
    cursor: pointer;
}

.stake-buttons {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.stake-btn {
    background-color: #5bc0de;
    color: white;
    border: none;
    padding: 4px 6px; /* Reduced */
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
}

.stake-btn:hover, .stake-btn.active {
    background-color: #5367ff;
    color: white;
    border-color: #5367ff;
}

.bet-stake-input {
    margin-bottom: 4px; /* Reduced */
}

.bet-stake-input label {
    display: block;
    margin-bottom: 3px;
    font-weight: bold;
    font-size: 13px;
}

.bet-stake-input input {
    width: 100%;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.bet-actions {
    display: flex;
    justify-content: space-between;
    gap: 6px; /* Reduced */
}

.place-bet-btn, .cancel-bet-btn {
    flex: 1;
    padding: 4px 0; /* Reduced */
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 12px;
}

.place-bet-btn {
    background-color: #5cb85c;
    color: white;
}

.cancel-bet-btn {
    background-color: #d9534f;
    color: white;
}

.matched-bet-section {
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px; /* Reduced */
}

.matched-bet-header {
    background-color: #f8f9fa;
    padding: 6px 10px; /* Reduced */
    border-bottom: 1px solid #ddd;
}

.matched-bet-header h4 {
    margin: 0;
    font-size: 16px;
}

.matched-bet-content {
    padding: 10px;
}

.matched-bet-table {
    width: 100%;
    border-collapse: collapse;
}

.matched-bet-table th, .matched-bet-table td {
    padding: 6px; /* Reduced */
    text-align: left;
    border-bottom: 1px solid #eee;
}

.matched-bet-table th {
    font-weight: bold;
    background-color: #f8f9fa;
}

/* Media queries for responsive design */
@media (max-width: 992px) {
    .main-container {
        flex-direction: column;
    }
    
    .matched-bets-container {
        width: 100%;
    }
    
    .back-cell, .lay-cell {
        width: 70px;
    }
    
    .mobile-nav-toggle {
        display: block;
    }
    
    .main-nav {
        display: none;
        flex-direction: column;
    }
    
    .main-nav.open {
        display: flex;
    }
    
    .left-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100%;
        transform: translateX(-100%);
        z-index: 150;
    }
    
    .left-sidebar.open {
        transform: translateX(0);
    }
    
    .content-area {
        margin-left: 0 !important;
    }
}

@media (max-width: 768px) {
    .balance-display {
        font-size: 12px;
        padding: 3px 6px;
    }
    
    .odds-input {
        width: 60px;
    }
    
    .stake-btn {
        padding: 4px 8px; /* Slightly reduced */
        font-size: 12px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 5px;
    }
    
    .place-bet-btn, .cancel-bet-btn {
        width: 100%;
        margin: 5px 0;
    }
}

/* Match Table Additional Styles to match reference */
.match-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    color: #333;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
}

.match-table th, .match-table td {
    padding: 8px 12px;
    text-align: center;
    border: 1px solid #e5e7eb;
}

.match-table th {
    background-color: #22b8cf;
    color: white;
    font-weight: 600;
    text-align: center;
}

.match-table thead tr:first-child th {
    padding: 10px 0;
    text-align: center;
}

.match-table thead tr:first-child th:first-child {
    background-color: white;
    border: none;
}

.cricket-header {
    text-align: left !important;
    background-color: #22b8cf;
    color: white;
}

.number-header {
    font-size: 16px;
    font-weight: bold;
}

.back-label, .lay-label {
    display: block;
    padding: 2px 0;
    font-weight: normal;
}

.back-label {
    color: #0066cc;
}

.lay-label {
    color: #ff0066;
}

.match-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.match-table tr {
    border-bottom: 1px solid #dee2e6;
}

.match-date {
    font-weight: 600;
    color: #666;
    white-space: nowrap;
    text-align: left;
    padding-right: 0 !important;
}

.match-details {
    text-align: left;
    font-weight: 600;
}

.match-link {
    color: #333;
    text-decoration: none;
}

.match-link:hover {
    text-decoration: underline;
    color: #22b8cf;
}

.back-value {
    background-color: #72bbee;
    padding: 8px 10px;
    border-radius: 4px;
    display: block;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
}

.lay-value {
    background-color: #fbaabb;
    padding: 8px 10px;
    border-radius: 4px;
    display: block;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
}

.media-icons {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-left: 8px;
    float: right;
}

.media-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #444;
    color: white;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Mobile Card View */
.match-card {
    background-color: white;
    border-radius: 4px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

.match-card-header {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
}

.match-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.match-title .match-link {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.match-time {
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    margin-top: 5px;
}

.clock-icon {
    margin-right: 5px;
    color: #777;
    font-size: 14px;
}

.match-card-odds {
    padding: 10px;
}

.odds-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 5px;
}

.odds-row .back-value,
.odds-row .lay-value {
    padding: 10px 5px;
    font-size: 14px;
}

/* Desktop/Mobile View Toggle */
.desktop-view {
    display: block;
}

.mobile-view {
    display: none;
}

@media (max-width: 576px) {
    .desktop-view {
        display: none;
    }
    
    .mobile-view {
        display: block;
    }
    
    .match-details {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .media-icons {
        margin-left: 2px;
        gap: 2px;
    }
    
    .match-card .media-icon {
        width: 22px;
        height: 22px;
    }
}

/* Market Tabs */
.market-tabs {
    display: flex;
    overflow-x: auto;
    background-color: #004558;
    white-space: nowrap;
    margin-bottom: 10px;
    -ms-overflow-style: none;  /* Hide scrollbar for IE and Edge */
    scrollbar-width: none;  /* Hide scrollbar for Firefox */
}

.market-tabs::-webkit-scrollbar {
    display: none;  /* Hide scrollbar for Chrome, Safari and Opera */
}

.market-tab-btn {
    background: none;
    border: none;
    color: white;
    padding: 8px 15px;
    font-size: 13px;
    cursor: pointer;
    position: relative;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}

.market-tab-btn.active {
    background-color: #00a9c7;
    color: white;
}

.market-tab-btn:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.1);
}

.tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #f44336;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    margin-left: 4px;
    line-height: 1;
}

.market-tab-btn.active .tab-count {
    background-color: white;
    color: #00a9c7;
}

/* Category Styling */
.market-category {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
}

.category-header {
    background: #f0f2f5;
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
}

.category-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
}

/* Make market sections inside categories have less margin */
.market-category .market-section {
    margin-bottom: 10px;
}

/* Mobile styling */
.mobile-view .market-category {
    margin-bottom: 15px;
}

.mobile-view .category-header {
    padding: 8px 12px;
}

.mobile-view .category-header h3 {
    font-size: 14px;
}

/* Betting Odds Page Styles */
.market-section {
    background-color: white;
    border-radius: 4px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

.market-body {
    padding: 0;
}

.betting-table {
    width: 100%;
    border-collapse: collapse;
}

.betting-table tr {
    border-bottom: 1px solid #e4e6ef;
}

.betting-table td {
    padding: 6px;
    text-align: center;
    vertical-align: middle;
}

.team-name {
    text-align: left;
    font-weight: 600;
    color: #212121;
    white-space: nowrap;
    padding-left: 10px;
    font-size: 12px;
}

.header-cell {
    padding: 6px 4px;
    text-align: center;
    font-weight: 600;
    color: white;
    background-color: inherit;
}

.back-header {
    background-color: #72bbef;
}

.lay-header {
    background-color: #faa9ba;
}

.back-cell {
    background-color: #72bbee;
    cursor: pointer;
    transition: all 0.2s;
    padding: 6px 4px;
    width: 80px;
}

.back-cell:hover {
    background-color: #bfe1ff;
}

.lay-cell {
    background-color: #fbaabb;
    cursor: pointer;
    transition: all 0.2s;
    padding: 6px 4px;
    width: 80px;
}

.lay-cell:hover {
    background-color: #ffc9c9;
}

.suspended-cell {
    background-color: #6c757d;
    color: white;
    text-align: center;
    font-weight: 600;
    padding: 8px;
}

.odds-value {
    font-weight: 700;
    font-size: 15px;
    color: #212121;
}

.volume-value {
    font-size: 11px;
    color: #7e8299;
    margin-top: 2px;
}

/* Matched Bet Section Styles */
.matched-bet-section {
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.matched-bet-header {
    background-color: #f8f9fa;
    padding: 6px 10px;
    border-bottom: 1px solid #ddd;
}

.matched-bet-header h4 {
    margin: 0;
    font-size: 16px;
}

.matched-bet-content {
    padding: 10px;
}

.matched-bet-table {
    width: 100%;
    border-collapse: collapse;
}

.matched-bet-table th, .matched-bet-table td {
    padding: 6px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.matched-bet-table th {
    font-weight: bold;
    background-color: #f8f9fa;
}

/* Mobile Market Card Styles */
.market-card {
    background-color: white;
    border-radius: 4px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

.market-card-header {
    background-color: #16a5bf;
    color: white;
    padding: 6px 10px;
}

.market-card-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.market-card-body {
    padding: 0;
}

.runner-card {
    padding: 2px 3px;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    position: relative;
}

.runner-card.suspended {
    background-color: #f8f9fa;
}

.runner-name {
    font-weight: 600;
    color: #212121;
    flex: 1;
    text-align: left;
    padding-right: 3px;
    font-size: 12px;
}

.runner-odds {
    display: flex;
    gap: 2px;
    margin-top: 5px;
    align-items: center;
}

.runner-odds .back-cell,
.runner-odds .lay-cell {
    flex: 1;
    border-radius: 4px;
    padding: 2px 1px;
}

.bet-placement-container {
    display: none;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 6px;
    margin: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    width: 100%;
    box-sizing: border-box;
}

.bet-placement-row td {
    padding: 0;
}

.bet-placement-row td[colspan="3"] {
    padding: 0;
}

.bet-team-selection {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.bet-team-name {
    font-weight: bold;
    font-size: 14px;
}

.bet-type-indicator {
    padding: 3px 6px;
    border-radius: 3px;
    color: white;
    font-weight: bold;
    font-size: 12px;
}

.bet-type-indicator.back {
    background-color: #5cb85c;
}

.bet-type-indicator.lay {
    background-color: #d9534f;
}

.bet-odds-controls {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.odds-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    background-color: #f8f9fa;
    cursor: pointer;
    font-weight: bold;
}

.odds-input {
    width: 70px;
    height: 28px;
    border: 1px solid #ddd;
    text-align: center;
    margin: 0 5px;
}

.bet-stake-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 4px;
}

.stake-btn {
    padding: 3px 6px;
    border: 1px solid #ddd;
    background-color: #5bc0de;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
}

.stake-btn:hover, .stake-btn.active {
    background-color: #5367ff;
    color: white;
    border-color: #5367ff;
}

.bet-stake-input {
    margin-bottom: 4px;
}

.bet-stake-input label {
    display: block;
    margin-bottom: 3px;
    font-weight: bold;
    font-size: 13px;
}

.bet-stake-input input {
    width: 100%;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.bet-actions {
    display: flex;
    justify-content: space-between;
    gap: 6px;
}

.place-bet-btn, .cancel-bet-btn {
    flex: 1;
    padding: 4px 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 12px;
}

.place-bet-btn {
    background-color: #5cb85c;
    color: white;
}

.cancel-bet-btn {
    background-color: #d9534f;
    color: white;
}

.matched-bet-section {
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.matched-bet-header {
    background-color: #f8f9fa;
    padding: 6px 10px;
    border-bottom: 1px solid #ddd;
}

.matched-bet-header h4 {
    margin: 0;
    font-size: 16px;
}

.matched-bet-content {
    padding: 10px;
}

.matched-bet-table {
    width: 100%;
    border-collapse: collapse;
}

.matched-bet-table th, .matched-bet-table td {
    padding: 6px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.matched-bet-table th {
    font-weight: bold;
    background-color: #f8f9fa;
}

/* Media queries for responsive design */
@media (max-width: 992px) {
    .main-container {
        flex-direction: column;
    }
    
    .matched-bets-container {
        width: 100%;
    }
    
    .back-cell, .lay-cell {
        width: 70px;
    }
    
    .mobile-nav-toggle {
        display: block;
    }
    
    .main-nav {
        display: none;
        flex-direction: column;
    }
    
    .main-nav.open {
        display: flex;
    }
    
    .left-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100%;
        transform: translateX(-100%);
        z-index: 150;
    }
    
    .left-sidebar.open {
        transform: translateX(0);
    }
    
    .content-area {
        margin-left: 0 !important;
    }
}

@media (max-width: 768px) {
    .balance-display {
        font-size: 12px;
        padding: 3px 6px;
    }
    
    .odds-input {
        width: 60px;
    }
    
    .stake-btn {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 5px;
    }
    
    .place-bet-btn, .cancel-bet-btn {
        width: 100%;
        margin: 5px 0;
    }
}

/* Match Table Additional Styles to match reference */
.match-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    color: #333;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
}

.match-table th, .match-table td {
    padding: 8px 12px;
    text-align: center;
    border: 1px solid #e5e7eb;
}

.match-table th {
    background-color: #22b8cf;
    color: white;
    font-weight: 600;
    text-align: center;
}

.match-table thead tr:first-child th {
    padding: 10px 0;
    text-align: center;
}

.match-table thead tr:first-child th:first-child {
    background-color: white;
    border: none;
}

.cricket-header {
    text-align: left !important;
    background-color: #22b8cf;
    color: white;
}

.number-header {
    font-size: 16px;
    font-weight: bold;
}

.back-label, .lay-label {
    display: block;
    padding: 2px 0;
    font-weight: normal;
}

.back-label {
    color: #0066cc;
}

.lay-label {
    color: #ff0066;
}

.match-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.match-table tr {
    border-bottom: 1px solid #dee2e6;
}

.match-date {
    font-weight: 600;
    color: #666;
    white-space: nowrap;
    text-align: left;
    padding-right: 0 !important;
}

.match-details {
    text-align: left;
    font-weight: 600;
}

.match-link {
    color: #333;
    text-decoration: none;
}

.match-link:hover {
    text-decoration: underline;
    color: #22b8cf;
}

.back-value {
    background-color: #72bbee;
    padding: 8px 10px;
    border-radius: 4px;
    display: block;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
}

.lay-value {
    background-color: #fbaabb;
    padding: 8px 10px;
    border-radius: 4px;
    display: block;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
}

.media-icons {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-left: 8px;
    float: right;
}

.media-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #444;
    color: white;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Mobile Card View */
.match-card {
    background-color: white;
    border-radius: 4px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

.match-card-header {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
}

.match-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.match-title .match-link {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.match-time {
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    margin-top: 5px;
}

.clock-icon {
    margin-right: 5px;
    color: #777;
    font-size: 14px;
}

.match-card-odds {
    padding: 10px;
}

.odds-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 5px;
}

.odds-row .back-value,
.odds-row .lay-value {
    padding: 10px 5px;
    font-size: 14px;
}

/* Desktop/Mobile View Toggle */
.desktop-view {
    display: block;
}

.mobile-view {
    display: none;
}

@media (max-width: 576px) {
    .desktop-view {
        display: none;
    }
    
    .mobile-view {
        display: block;
    }
    
    .match-details {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .media-icons {
        margin-left: 2px;
        gap: 2px;
    }
    
    .match-card .media-icon {
        width: 22px;
        height: 22px;
    }
}
