:root {
    --bg-color: #333333;
    --header-bg: #126e51;
    --text-color: #dedede;
    --accent-color: #ffdf1b;
    --secondary-bg: #3e3e3e;
    --hover-bg: #555555;
    --border-color: #555;
    --font-family: 'Roboto', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    font-size: 13px;
    line-height: 1.4;
}

/* Header */
.site-header {
    background-color: var(--header-bg);
    padding: 0 20px;
    height: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
}

.user-balance {
    font-weight: 700;
    color: var(--accent-color);
    font-size: 1.1rem;
}

/* Layout */
.main-container {
    display: grid;
    grid-template-columns: 200px 1fr 320px;
    gap: 15px;
    padding: 15px;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 50px);
}

/* Sidebar Nav */
.sidebar-nav {
    background-color: var(--secondary-bg);
    padding: 10px;
    border-radius: 4px;
}

.sidebar-nav h3 {
    padding: 5px 10px;
    color: #aaa;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-nav li {
    padding: 10px;
    border-bottom: 1px solid #4a4a4a;
    color: #ccc;
    cursor: pointer;
    list-style: none;
}

.sidebar-nav li:hover,
.sidebar-nav li.active {
    color: var(--accent-color);
    background-color: #444;
}

/* Match List */
.matches-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.matches-header h2 {
    font-size: 1.1rem;
}

.matches-header .date {
    color: #888;
    font-size: 0.85rem;
}

.jornada-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #2c2c2c;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.jornada-nav button {
    background: #444;
    border: none;
    color: white;
    padding: 5px 15px;
    cursor: pointer;
    border-radius: 3px;
}

.jornada-nav button[disabled] {
    opacity: 0.3;
    pointer-events: none;
}

.match-card {
    background-color: var(--secondary-bg);
    margin-bottom: 8px;
    padding: 12px;
    border-radius: 4px;
    display: grid;
    grid-template-columns: 1fr 180px;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

.match-card:hover {
    background-color: #454545;
}

.clickable-info {
    cursor: pointer;
}

.match-time {
    color: #888;
    font-size: 0.85rem;
    margin-top: 2px;
}

.more-markets {
    color: var(--accent-color);
    font-size: 0.8rem;
    margin-top: 4px;
}

.odds-container {
    display: flex;
    gap: 2px;
}

.odd-btn {
    flex: 1;
    background: #505050;
    border: none;
    color: var(--accent-color);
    padding: 8px 4px;
    cursor: pointer;
    font-weight: 700;
    border-radius: 2px;
    text-align: center;
    line-height: 1.2;
    font-size: 0.85rem;
}

.odd-btn:hover {
    background: #606060;
    color: #fff;
}

.odd-btn.selected {
    background: #dedede;
    color: #333;
}

.odd-btn.small {
    font-size: 0.8rem;
    padding: 4px 8px;
    flex: none;
    width: auto;
}

/* Match Detail */
.match-detail-header {
    margin-bottom: 20px;
    border-bottom: 1px solid #555;
    padding-bottom: 10px;
}

.back-btn {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 1rem;
    margin-bottom: 10px;
    display: block;
}

.back-btn:hover {
    color: white;
}

.detail-teams h1 {
    font-size: 1.3rem;
}

.detail-teams p {
    color: #888;
    margin-top: 4px;
}

.markets-container {
    margin-top: 10px;
}

.market-group {
    background-color: var(--secondary-bg);
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 4px;
}

.market-group h3 {
    border-left: 3px solid var(--accent-color);
    padding-left: 10px;
    margin-bottom: 15px;
    font-size: 1rem;
    color: #fff;
    background: #2c2c2c;
    padding: 8px 10px;
}

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

/* Goals / Tables */
.goals-grid-header,
.goals-row {
    display: grid;
    grid-template-columns: 100px 1fr 1fr;
    gap: 10px;
    align-items: center;
    text-align: center;
    padding: 5px 0;
}

.goals-grid-header {
    font-weight: bold;
    color: #aaa;
    border-bottom: 1px solid #555;
    margin-bottom: 5px;
}

.line-val {
    font-weight: bold;
    color: #fff;
}

/* Scorers */
.scorers-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.scorer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #333;
    padding: 8px;
    border-radius: 3px;
}

/* Bet Slip */
.bet-slip-container {
    background-color: var(--secondary-bg);
    border-radius: 4px;
    padding: 10px;
    height: fit-content;
    position: sticky;
    top: 65px;
}

.bet-slip-header {
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    margin-bottom: 10px;
    text-align: center;
}

.bet-tabs {
    display: flex;
    margin-bottom: 10px;
    background: #222;
    border-radius: 4px 4px 0 0;
    overflow: hidden;
}

.tab-btn {
    flex: 1;
    background: #222;
    border: none;
    color: #888;
    padding: 10px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.85rem;
}

.tab-btn.active {
    background: var(--header-bg);
    color: white;
}

.bet-item {
    position: relative;
    background: #fff;
    color: #333;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 3px;
}

.bet-item input {
    margin-top: 5px;
    padding: 5px;
    width: 60%;
    border: 1px solid #ccc;
    font-size: 1rem;
}

.remove-bet {
    position: absolute;
    top: 5px;
    right: 8px;
    background: none;
    border: none;
    color: #999;
    font-size: 1.2rem;
    cursor: pointer;
}

.remove-bet:hover {
    color: #d32f2f;
}

.potential-return {
    color: #126e51;
    font-weight: bold;
    margin-top: 4px;
    font-size: 0.85rem;
}

.combined-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: #fff;
}

#combined-stake {
    width: 100%;
    padding: 8px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 1rem;
    margin-bottom: 8px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    color: #fff;
    margin-bottom: 4px;
}

.total-return {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 4px;
}

.place-bet-btn {
    width: 100%;
    background: var(--accent-color);
    border: none;
    padding: 15px;
    font-weight: 800;
    font-size: 1.1rem;
    color: #333;
    cursor: pointer;
    margin-top: 10px;
    border-radius: 3px;
}

.place-bet-btn:hover {
    background: #ffe64c;
}

/* My Bets Styles */
.my-bet-card {
    background-color: var(--secondary-bg);
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid #aaa;
}

.bet-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #bbb;
}

.bet-status.pending {
    color: var(--accent-color);
    font-weight: bold;
}

.bet-type-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin-bottom: 5px;
}

.bet-sel-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid #505050;
}

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

.bet-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #555;
}

/* Login overlay */
.user-btn {
    padding: 15px 30px;
    font-size: 1.2rem;
    cursor: pointer;
    background: #333;
    color: white;
    border: 1px solid #555;
    border-radius: 4px;
    transition: all 0.2s;
    width: 100%;
    font-family: var(--font-family);
}

.user-btn:hover {
    background: #126e51;
    border-color: #126e51;
    transform: scale(1.03);
}

.admin-btn {
    background: #444 !important;
    color: #aaa !important;
    font-size: 1rem !important;
    padding: 10px 20px !important;
}

.admin-btn:hover {
    background: #666 !important;
    color: white !important;
    border-color: #666 !important;
    transform: none !important;
}

/* Mobile Nav */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 900px) {
    .main-container {
        grid-template-columns: 1fr;
    }

    .sidebar-nav {
        display: none;
        /* Mobile overlay style */
        position: fixed;
        top: 50px;
        left: 0;
        width: 100%;
        background: #333;
        z-index: 99;
        padding: 20px;
        box-shadow: 0 4px 5px rgba(0, 0, 0, 0.3);
    }

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

    .mobile-nav-toggle {
        display: block;
    }
}