/* Arbitrage Page Layout */
.arbitrage-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    gap: 0;
    min-height: calc(100vh - 200px);
}

/* Sidebar */
.arb-sidebar {
    width: 240px;
    background: #f5f6f7;
    border-right: 1px solid #e0e0e0;
    padding: 20px 0;
    flex-shrink: 0;
}

.sidebar-section {
    margin-bottom: 25px;
}

.sidebar-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #666;
    padding: 0 20px;
    margin-bottom: 10px;
}

.sport-filter-list,
.market-filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sport-filter-item,
.market-filter-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}

.sport-filter-item:hover,
.market-filter-item:hover {
    background: #e8e8e8;
}

.sport-filter-item.active,
.market-filter-item.active {
    background: #e3f2fd;
    border-left-color: var(--primary-blue);
    color: var(--primary-blue);
    font-weight: 600;
}

.sport-filter-item i {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.sport-filter-item .count {
    margin-left: auto;
    background: #ddd;
    color: #666;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.sport-filter-item.active .count {
    background: var(--primary-blue);
    color: white;
}

.sidebar-info {
    padding: 0 20px;
}

.info-box {
    background: #e8f4fd;
    border-radius: 8px;
    padding: 15px;
    font-size: 13px;
    color: #1565c0;
    line-height: 1.5;
}

.info-box i {
    display: block;
    font-size: 20px;
    margin-bottom: 8px;
}

/* Main Content */
.arb-main {
    flex: 1;
    padding: 25px 30px;
    background: #fff;
    overflow-x: auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.header-content h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 5px 0;
}

.header-content h1 .subtitle {
    font-weight: 400;
    color: #666;
}

.header-desc {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.refresh-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.refresh-btn:hover {
    background: #303f9f;
}

.last-update {
    font-size: 13px;
    color: #888;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
}

.stat-item {
    flex: 1;
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
}

.stat-label {
    font-size: 12px;
    opacity: 0.85;
    text-transform: uppercase;
}

/* Arbitrage Table */
.arb-table-container {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 40px;
}

.table-header-row {
    display: grid;
    grid-template-columns: 180px 120px 1fr 150px 150px 80px 50px;
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #666;
}

.table-header-row > div {
    padding: 14px 12px;
}

.arb-loading,
.no-arb {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #666;
}

.arb-loading i,
.no-arb i {
    font-size: 48px;
    margin-bottom: 15px;
    color: var(--primary-blue);
}

.no-arb i {
    color: #bbb;
}

.no-arb h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.no-arb p {
    max-width: 400px;
    text-align: center;
    line-height: 1.5;
}

/* Arbitrage Row */
.arb-row {
    display: grid;
    grid-template-columns: 180px 120px 1fr 150px 150px 80px 50px;
    border-bottom: 1px solid #eee;
    transition: background 0.15s;
}

.arb-row:hover {
    background: #f8f9fa;
}

.arb-row > div {
    padding: 16px 12px;
    display: flex;
    align-items: center;
}

.td-sport {
    gap: 10px;
}

.td-sport i {
    font-size: 22px;
    color: #666;
}

.sport-info {
    display: flex;
    flex-direction: column;
}

.sport-name {
    font-weight: 600;
    font-size: 13px;
    color: #333;
}

.league-name {
    font-size: 11px;
    color: #888;
}

.td-market {
    justify-content: center;
}

.market-badge {
    background: #e3f2fd;
    color: #1565c0;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
}

.td-game {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.game-datetime {
    font-size: 12px;
    color: #888;
}

.game-date {
    margin-right: 8px;
}

.game-teams {
    font-size: 14px;
}

.team {
    font-weight: 500;
}

.vs {
    color: #999;
    margin: 0 6px;
    font-size: 12px;
}

.td-outcome {
    flex-direction: column;
    gap: 6px;
    justify-content: center;
}

.td-outcome.empty {
    visibility: hidden;
}

.outcome-book {
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    min-width: 80px;
}

.outcome-odds {
    font-size: 16px;
    font-weight: 700;
    text-align: center;
}

.outcome-odds.positive {
    color: #2e7d32;
}

.outcome-odds.negative {
    color: #c62828;
}

.td-profit {
    justify-content: center;
}

.profit-value {
    background: linear-gradient(135deg, #43a047, #2e7d32);
    color: white;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
}

.td-calc {
    justify-content: center;
}

.calc-trigger {
    width: 40px;
    height: 40px;
    border: none;
    background: #f0f0f0;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.calc-trigger:hover {
    background: var(--primary-blue);
    color: white;
}

.calc-trigger i {
    font-size: 20px;
}

/* Calculator Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(-20px);
    transition: transform 0.3s;
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #e0e0e0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #d32f2f;
    color: white;
}

.modal-close i {
    font-size: 20px;
}

.modal-body {
    padding: 25px;
}

.calc-game-info {
    text-align: center;
    margin-bottom: 25px;
}

.calc-game-info h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    color: #1a1a1a;
}

.calc-game-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.calc-game-info i {
    margin-right: 5px;
}

.calc-input-section {
    margin-bottom: 25px;
}

.calc-input-section label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.stake-input-row {
    display: flex;
    gap: 10px;
}

#calcStake {
    flex: 1;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

#calcStake:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.calc-btn {
    padding: 14px 30px;
    background: #00897b;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.calc-btn:hover {
    background: #00796b;
}

/* Calculator Outcomes */
.calc-outcomes {
    margin-bottom: 25px;
}

.calc-outcomes-header {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.calc-outcomes-header .outcome-col {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.calc-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.calc-row .outcome-col {
    text-align: center;
}

.calc-row.bookmaker-row .book-badge {
    display: inline-block;
    color: white;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
}

.calc-row.odds-row .odds-value {
    font-size: 20px;
    font-weight: 700;
}

.calc-row.odds-row .odds-value.positive {
    color: #2e7d32;
}

.calc-row.odds-row .odds-value.negative {
    color: #c62828;
}

.calc-row.stakes-row,
.calc-row.winnings-row {
    background: #f8f9fa;
    padding: 12px 0;
    border-radius: 8px;
    grid-template-columns: 80px repeat(auto-fit, minmax(120px, 1fr));
}

.calc-row .row-label {
    font-size: 13px;
    color: #666;
    text-align: left;
    padding-left: 15px;
    display: flex;
    align-items: center;
}

.stake-value {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.winnings-value {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.winnings-value.highlight {
    color: #00897b;
}

.calc-profit-section {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 20px;
}

.profit-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.profit-value {
    font-size: 28px;
    font-weight: 700;
}

.profit-value .positive {
    color: #2e7d32;
}

.profit-value .negative {
    color: #c62828;
}

.profit-pct {
    font-size: 18px;
    color: #43a047;
}

.calc-options {
    text-align: center;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

.checkbox-label input {
    width: 18px;
    height: 18px;
}

/* Low Vig Section */
.lowvig-section {
    margin-bottom: 40px;
}

.section-header {
    margin-bottom: 20px;
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    color: #333;
    margin: 0 0 5px 0;
}

.section-header h2 i {
    color: var(--primary-blue);
}

.section-header p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.lowvig-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px;
    color: #666;
}

.lowvig-loading i {
    font-size: 36px;
    color: var(--primary-blue);
    margin-bottom: 10px;
}

.lowvig-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 15px;
}

.lowvig-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.2s;
}

.lowvig-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.lowvig-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px;
    background: #fafafa;
    border-bottom: 1px solid #eee;
}

.lowvig-game {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lowvig-sport {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
}

.lowvig-teams {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.lowvig-time {
    font-size: 12px;
    color: #888;
}

.lowvig-vig {
    text-align: center;
    background: #ff9800;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
}

.vig-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
}

.vig-label {
    font-size: 10px;
    text-transform: uppercase;
}

.lowvig-bets {
    padding: 15px;
}

.lowvig-bet {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 8px;
}

.lowvig-bet:last-child {
    margin-bottom: 0;
}

.bet-selection {
    font-weight: 500;
    font-size: 13px;
    flex: 1;
}

.bet-book {
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin: 0 10px;
}

.bet-odds {
    font-weight: 700;
    font-size: 14px;
    min-width: 50px;
    text-align: right;
}

.bet-odds.positive {
    color: #2e7d32;
}

.bet-odds.negative {
    color: #c62828;
}

.no-lowvig {
    text-align: center;
    padding: 40px;
    color: #888;
    background: #f8f9fa;
    border-radius: 10px;
}

/* Education Section */
.education-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 30px;
    margin-top: 20px;
}

.education-section h2 {
    font-size: 20px;
    margin: 0 0 20px 0;
    color: #333;
}

.edu-content p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 20px;
}

.edu-example {
    background: white;
    border-left: 4px solid var(--primary-blue);
    padding: 15px 20px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 20px;
}

.edu-example h4 {
    margin: 0 0 10px 0;
    color: var(--primary-blue);
}

.edu-example p {
    margin: 0;
    font-size: 14px;
}

.edu-tips {
    background: #fff3e0;
    border-radius: 8px;
    padding: 20px;
}

.edu-tips h4 {
    margin: 0 0 15px 0;
    color: #e65100;
}

.edu-tips ul {
    margin: 0;
    padding-left: 20px;
}

.edu-tips li {
    margin-bottom: 8px;
    line-height: 1.5;
    color: #555;
}

/* Responsive */
@media (max-width: 1200px) {
    .table-header-row,
    .arb-row {
        grid-template-columns: 150px 100px 1fr 130px 130px 70px 45px;
    }
}

@media (max-width: 992px) {
    .arbitrage-container {
        flex-direction: column;
    }
    
    .arb-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        padding: 15px 0;
    }
    
    .sport-filter-list {
        display: flex;
        overflow-x: auto;
        padding: 0 15px;
    }
    
    .sport-filter-item {
        padding: 10px 15px;
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    
    .sport-filter-item.active {
        border-left: none;
        border-bottom-color: var(--primary-blue);
    }
    
    .market-filter-list {
        display: flex;
        padding: 10px 15px;
        gap: 10px;
    }
    
    .market-filter-item {
        padding: 8px 15px;
        border-radius: 20px;
        background: #eee;
    }
    
    .market-filter-item.active {
        background: var(--primary-blue);
        color: white;
    }
    
    .sidebar-info {
        display: none;
    }
    
    .arb-table-container {
        overflow-x: auto;
    }
    
    .table-header-row,
    .arb-row {
        min-width: 900px;
    }
}

@media (max-width: 768px) {
    .arb-main {
        padding: 15px;
    }
    
    .stats-bar {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .stat-item {
        flex: 1 1 40%;
    }
    
    .stat-value {
        font-size: 22px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .lowvig-list {
        grid-template-columns: 1fr;
    }
    
    .modal-container {
        width: 95%;
        margin: 10px;
    }
    
    .stake-input-row {
        flex-direction: column;
    }
}