:root {
    --bg: #0b0f12;
    --panel: #0d1418;
    --card: #11171b;
    --border: #1c2a23;
    --text: #e6f5ea;
    --muted: #a6cbb2;
    --accent: #79c08a;
    --btn: #143022;
    --btn-hover: #19422c;
    --primary: #1a643f;
    --primary-hover: #1c7a4a;
    --gold: #e7c45c;
    --header-h: 56px
}

html, body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden
}

*, *:before, *:after {
    box-sizing: border-box
}

.container {
    display: flex;
    height: calc(100vh - var(--header-h));
    overflow: hidden
}

.header {
    background: linear-gradient(90deg, #0c1317, #112027);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 60;
    height: var(--header-h);
    width: 100%;
    box-sizing: border-box
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    width: 100%;
    box-sizing: border-box
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
    font-weight: 600
}

.nav {
    display: flex;
    gap: 12px
}

.actions {
    display: none;
    gap: 8px
}

.hamburger {
    display: none;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text);
    cursor: pointer
}

.nav a {
    color: var(--muted);
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 8px
}

.nav a.active, .nav a:hover {
    background: var(--btn-hover);
    color: var(--text)
}

.sidebar {
    width: 260px;
    background: var(--panel);
    border-right: 1px solid var(--border);
    padding: 16px
}

.sidebar .scroll {
    height: calc(100vh - var(--header-h));
    overflow-y: auto
}

.sidebar .section-title {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .6px;
    font-size: 11px;
    margin-bottom: 8px
}

.sidebar details {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 10px
}

.sidebar summary {
    cursor: pointer;
    padding: 10px 12px;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: space-between
}

.sidebar .menu-list {
    padding: 8px 12px;
    border-top: 1px solid var(--border)
}

.sidebar .menu-list a {
    display: block;
    color: var(--muted);
    text-decoration: none;
    padding: 6px 0;
    border-radius: 6px
}

.sidebar .menu-list a:hover {
    color: var(--text)
}

.sb-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: var(--text);
    cursor: pointer;
    text-align: left;
    margin-top: 2px
}

.sb-item:hover {
    background: var(--btn-hover)
}

.sb-item.active {
    background: var(--btn-hover)
}

.sb-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    color: var(--accent);
    transition: transform .12s ease
}

.sb-item:hover .sb-icon {
    transform: scale(1.08)
}

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

.icon-green {
    color: #22c55e
}

.icon-yellow {
    color: #f59e0b
}

.icon-orange {
    color: #f97316
}

.icon-blue {
    color: #3b82f6
}

.icon-purple {
    color: #a855f7
}

.icon-red {
    color: #ef4444
}

.icon-cyan {
    color: #06b6d4
}

.icon-pink {
    color: #ec4899
}

.icon-indigo {
    color: #6366f1
}

.main {
    flex: 1;
    padding: 24px;
    height: 100%;
    overflow-y: auto
}

.main-inner {
    max-width: 960px;
    margin: 0 auto
}

.betslip {
    width: 320px;
    background: var(--panel);
    border-left: 1px solid var(--border);
    padding: 16px;
    height: 100%;
    overflow-y: auto
}

.betslip-toggle {
    display: none
}

.title {
    color: var(--accent);
    font-weight: 600;
    font-size: 18px
}

.muted {
    color: var(--muted)
}

.grid {
    display: grid;
    gap: 16px
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr))
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr))
}

.cards-list {
    display: flex;
    flex-direction: column;
    gap: 16px
}

.tablinks {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 12px 0
}

.nav-links {
    list-style: none
}

.tablink {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 17px;
    background: var(--btn);
    color: var(--text);
    border: 1px solid var(--border);
    cursor: pointer
}

.tablink.active, .tablink:hover {
    background: var(--btn-hover)
}

.rounded-17 {
    border-radius: 17px
}

.p3-bg {
    background: var(--btn)
}

.clickable-active2 {
    transition: background .12s ease
}

.tablinks .nav-links.active .tablink {
    outline: 2px solid var(--gold)
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 8px 0 16px;
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--bg);
    padding: 8px 0
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px
}

.select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 12px;
    min-width: 160px
}

.toolbar-right .input {
    width: 160px
}

.select:hover {
    background: var(--btn-hover)
}

.league-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
    font-size: 12px;
    margin: 16px 0 8px
}

.league-title {
    color: var(--accent);
    font-weight: 600
}

.card {
    width: 25%;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px
}

body[data-bs-theme="dark"] .card {
    width: auto
}

.market {
    margin-top: 12px
}

.market-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 8px
}

.market-grid {
    display: grid;
    gap: 8px
}

.market-grid.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr))
}

.market-grid.cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr))
}

.match-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px
}

.match-header {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr;
    align-items: center;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border);
    gap: 16px
}

.mh-left {
    display: flex;
    align-items: center;
    gap: 8px
}

.mh-center {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    color: var(--muted)
}

.mh-markets {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: flex-end;
    color: var(--muted);
    font-size: 12px
}

.mh-icon {
    width: 18px;
    height: 18px
}

.team-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 12px
}

.team-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 6px
}

.match-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 17px;
    margin-bottom: 25px
}

.match-vs-left, .match-vs-right {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text)
}

.match-vs .team-name {
    font-weight: 400;
    font-size: 13px
}

.match-vs .flag img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border)
}

.match-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start
}

.team-lines {
    display: flex;
    flex-direction: column;
    gap: 8px
}

.team-line {
    display: flex;
    align-items: center;
    gap: 8px
}

.team-tools {
    display: flex;
    align-items: center;
    gap: 12px
}

.vline {
    width: 1px;
    height: 40px;
    background: var(--border)
}

.table-head {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 8px
}

.odds-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px
}

.page-center {
    display: grid;
    place-items: center;
    min-height: calc(100vh - var(--header-h));
    padding: 16px;
    width: 100%
}

.odds-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--btn);
    color: var(--text);
    border: none;
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    text-align: center;
    width: 100px;
    min-height: 70px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, .15)
}

.odds-item:hover {
    background: var(--btn-hover)
}

.odds-item.active {
    outline: 2px solid var(--gold);
    background: #1c3526
}

.odds-item .label {
    display: block;
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 6px
}

.odds-item .price {
    display: block;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-size: 18px;
    line-height: 1
}

.table-wrap {
    width: 100%;
    overflow-x: auto
}

.matches-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px
}

.matches-table thead th {
    font-size: 12px;
    color: var(--muted);
    text-align: left;
    padding: 8px
}

.matches-table tbody td {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 12px
}

.matches-table tbody td:first-child {
    border-radius: 10px 0 0 10px
}

.matches-table tbody td:last-child {
    border-radius: 0 10px 10px 0
}

.cell-teams {
    display: flex;
    align-items: center;
    gap: 12px
}

.cell-teams .vs {
    margin: 0 6px
}

.odds-cell {
    text-align: center
}

.row {
    display: flex;
    align-items: center;
    justify-content: space-between
}

.btn-odd {
    background: var(--btn);
    color: var(--text);
    border: none;
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    transition: transform .08s ease
}

.btn-odd:hover {
    background: var(--btn-hover)
}

.btn-odd.active {
    outline: 2px solid var(--gold);
    background: #1c3526
}

.btn-odd:active {
    transform: scale(0.98)
}

.btn {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    width: 100%
}

.btn:hover {
    background: var(--primary-hover)
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px
}

.input {
    width: 100%;
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px
}

.pill {
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--btn);
    color: var(--text);
    cursor: pointer;
    border: none
}

.pill:hover {
    background: var(--btn-hover)
}

.pill[disabled] {
    opacity: .6;
    cursor: not-allowed
}

.small {
    font-size: 12px
}

.space-y>*+* {
    margin-top: 12px
}

.team-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 8px
}

.team {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text)
}

.team .team-name {
    font-weight: 500;
    font-size: 12px
}

.team img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border)
}

.flag-placeholder {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--btn-hover);
    border: 1px solid var(--border)
}

.vs {
    text-transform: uppercase;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: .5px
}

.tooltip {
    position: relative;
    display: inline-block
}

.tip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s ease, transform .12s ease;
    white-space: nowrap;
    margin-bottom: 8px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .25)
}

.tooltip:hover .tip, .tooltip.show .tip, .tooltip:focus-within .tip {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px)
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    backdrop-filter: saturate(120%) blur(2px);
    opacity: 0;
    pointer-events: none;
    z-index: 55
}

.overlay.open {
    opacity: 1;
    pointer-events: auto
}

@media (max-width: 1200px) {
    .team .team-name {
        font-size: 17px
    }

    .title {
        font-size: 20px
    }

    .sidebar {
        width: 220px
    }

    .betslip {
        width: 300px
    }

    .grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }
}

@media (max-width: 992px) {
    .team .team-name {
        font-size: 18px
    }

    .title {
        font-size: 22px
    }

    .container {
        flex-direction: column
    }

    .header-content {
        max-width: 100%
    }

    .actions {
        display: flex
    }

    .hamburger {
        display: inline-flex
    }

    .nav {
        display: none
    }

    .nav.open {
        display: flex;
        flex-direction: column;
        position: fixed;
        right: 0;
        top: var(--header-h);
        width: 80%;
        max-width: 380px;
        background: var(--panel);
        border-left: 1px solid var(--border);
        padding: 14px;
        gap: 10px;
        z-index: 60;
        box-shadow: 0 10px 24px rgba(0, 0, 0, .35)
    }

    .sidebar {
        position: fixed;
        top: var(--header-h);
        bottom: 0;
        left: -310px;
        width: 310px;
        background: var(--panel);
        border-right: 1px solid var(--border);
        padding: 16px;
        z-index: 60;
        transition: left .2s ease
    }

    .sidebar.open {
        left: 0
    }

    .main {
        padding: 16px
    }

    .betslip {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--border);
        position: static;
        height: auto;
        overflow: visible
    }

    .betslip-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        background: transparent;
        border: none;
        color: var(--text);
        width: 100%;
        padding: 8px 0;
        cursor: pointer
    }

    .betslip-toggle .arrow {
        color: var(--muted);
        display: inline-flex
    }

    .betslip.mobile-open .betslip-toggle .arrow {
        transform: rotate(180deg)
    }

    .betslip.mobile-collapsed .betslip-content {
        display: none
    }

    .betslip-head-title, .betslip-head-multipla {
        display: none
    }

    .betslip-actions {
        margin-left: auto
    }

    .match-body {
        grid-template-columns: 1fr
    }
}

@media (max-width: 768px) {
    .team .team-name {
        font-size: 20px
    }

    .title {
        font-size: 24px
    }

    .grid-3 {
        grid-template-columns: 1fr
    }

    .grid-2 {
        grid-template-columns: 1fr
    }

    .btn-odd {
        width: 100%
    }

    .odds-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr))
    }

    .odds-grid .btn-odd {
        width: auto
    }

    .row {
        flex-wrap: wrap;
        gap: 8px
    }

    .header-content {
        padding: 10px 14px
    }

    .nav a {
        padding: 8px 10px
    }

    .hamburger {
        width: 40px;
        height: 40px
    }
}

.betslip .team img {
    width: 16px;
    height: 16px
}

.betslip .flag-placeholder {
    width: 16px;
    height: 16px
}

.main {
    scrollbar-width: thin;
    scrollbar-color: var(--btn-hover) var(--panel)
}

.main::-webkit-scrollbar {
    width: 8px;
    height: 8px
}

.main::-webkit-scrollbar-track {
    background: var(--panel)
}

.main::-webkit-scrollbar-thumb {
    background: var(--btn-hover);
    border-radius: 8px;
    border: 2px solid var(--panel)
}

.main::-webkit-scrollbar-thumb:hover {
    background: var(--primary)
}

.sidebar .scroll {
    scrollbar-width: thin;
    scrollbar-color: var(--btn-hover) var(--panel)
}

.sidebar .scroll::-webkit-scrollbar {
    width: 8px;
    height: 8px
}

.sidebar .scroll::-webkit-scrollbar-track {
    background: var(--panel)
}

.sidebar .scroll::-webkit-scrollbar-thumb {
    background: var(--btn-hover);
    border-radius: 8px;
    border: 2px solid var(--panel)
}

.sidebar .scroll::-webkit-scrollbar-thumb:hover {
    background: var(--primary)
}

.betslip {
    scrollbar-width: thin;
    scrollbar-color: var(--btn-hover) var(--panel)
}

.betslip::-webkit-scrollbar {
    width: 8px;
    height: 8px
}

.betslip::-webkit-scrollbar-track {
    background: var(--panel)
}

.betslip::-webkit-scrollbar-thumb {
    background: var(--btn-hover);
    border-radius: 8px;
    border: 2px solid var(--panel)
}

.betslip::-webkit-scrollbar-thumb:hover {
    background: var(--primary)
}

@media (max-width: 720px) {
    .odds-item {
        width: 80px
    }
}