:root {
    --odds-bg: #f6f8fb;
    --card-bg: #ffffff;
    --line: #d9e0ea;
    --header-bg: #0f172a;
    --header-fg: #f8fafc;
    --muted: #64748b;
    --best-bg: #dcfce7;
    --best-fg: #166534;
    --steamer-bg: #dbeafe;
    --steamer-fg: #1e3a8a;
    --drifter-bg: #fee2e2;
    --drifter-fg: #991b1b;
    --selected-bg: #fde68a;
    --selected-fg: #78350f;
}

html[data-theme="dark"] {
    --best-bg: #14532d;
    --best-fg: #dcfce7;
    --steamer-bg: #1e3a8a;
    --steamer-fg: #dbeafe;
    --drifter-bg: #7f1d1d;
    --drifter-fg: #fee2e2;
    --selected-bg: #713f12;
    --selected-fg: #fef3c7;
}

.odds-page {
    background: radial-gradient(1200px 500px at 80% -20%, #e2e8f0 0%, var(--odds-bg) 60%, var(--odds-bg) 100%);
    padding: 2rem 0 4rem;
}

.odds-shell {
    max-width: 1760px;
    margin: 0 auto;
    padding: 0 1rem;
}

.odds-layout {
    display: grid;
    grid-template-columns: 380px minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.odds-side-menu {
    position: static;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-color: #d1d9e6 !important;
    min-height: 0;
}

.side-title {
    margin: 0 0 0.6rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #334155;
}

.sport-list-grid {
    display: grid;
    gap: 0.5rem;
}

.sport-card-link {
    display: block;
    text-decoration: none;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    background: #ffffff;
    padding: 0.65rem 0.75rem;
    transition: all 0.2s ease;
}

.sport-card-link:hover {
    border-color: #f97316;
    background: #fff8f1;
}

.sport-card-link.active {
    border-color: #f97316;
    background: #fff1e6;
}

.sport-card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.sport-card-name {
    display: block;
    color: #0f172a;
    font-size: 0.92rem;
    font-weight: 700;
}

.sport-card-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.55rem;
    height: 1.3rem;
    padding: 0 0.45rem;
    border-radius: 999px;
    border: 1px solid #c8d4e7;
    background: #eef2ff;
    color: #334155;
    font-size: 0.7rem;
    font-weight: 700;
}

.sport-card-meta {
    display: block;
    margin-top: 0.2rem;
    color: #64748b;
    font-size: 0.72rem;
}

.odds-generic-header h1 {
    margin: 0;
    font-size: clamp(1.25rem, 3vw, 1.85rem);
    color: #0f172a;
}

.odds-generic-header .details {
    margin-top: 0.55rem;
    color: #475569;
    font-size: 0.88rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.odds-generic-header .details span {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
}

.odds-hero {
    background: linear-gradient(135deg, #111827 0%, #1f2937 55%, #0f766e 100%);
    color: #ffffff;
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    border: 1px solid #1f2a44;
}

.odds-hero h1 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    line-height: 1.15;
}

.odds-hero p {
    margin: 0;
    color: #dbeafe;
}

.market {
    background: var(--card-bg);
    border: 1px solid var(--line);
    border-radius: 16px;
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.04);
}

.market-header {
    width: 100%;
    border: none;
    background: linear-gradient(90deg, #f8fafc 0%, #f1f5f9 100%);
    color: #0f172a;
    text-align: left;
    padding: 0.95rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    font-size: 0.97rem;
}

.market-header:hover {
    background: linear-gradient(90deg, #eef2ff 0%, #f8fafc 100%);
}

.market-header .meta {
    font-size: 0.82rem;
    color: var(--muted);
    font-weight: 600;
}

.arrow {
    width: 28px;
    height: 28px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.22s ease;
    font-size: 0.75rem;
    color: #334155;
}

.market.active .arrow {
    transform: rotate(180deg);
}

.market-content {
    display: none;
    padding: 0.9rem;
    border-top: 1px solid var(--line);
}

.market.active .market-content {
    display: block;
}

.market-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.8rem;
}

.quickbet-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #0f172a;
    color: #f8fafc;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
    position: relative;
    cursor: help;
}

.quickbet-chip .tooltip {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: calc(100% + 8px);
    background: #0f172a;
    color: #f8fafc;
    width: 280px;
    max-width: min(80vw, 280px);
    border-radius: 8px;
    padding: 0.55rem 0.65rem;
    font-size: 0.74rem;
    line-height: 1.35;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease;
    z-index: 6;
}

.quickbet-chip:hover .tooltip,
.quickbet-chip:focus-within .tooltip {
    opacity: 1;
}

.offer-chip {
    background: #fef9c3;
    color: #854d0e;
    border: 1px solid #fde047;
    border-radius: 999px;
    padding: 0.33rem 0.7rem;
    font-size: 0.76rem;
    font-weight: 700;
}

.grid-shell {
    position: relative;
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: rgba(255, 255, 255, 0.95);
    color: #1e293b;
    z-index: 5;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 16px rgba(15, 23, 42, 0.2);
}

.scroll-btn.left {
    left: 8px;
}

.scroll-btn.right {
    right: 8px;
}

.grid-wrapper {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    scrollbar-width: thin;
}

.grid-wrapper::-webkit-scrollbar {
    height: 10px;
}

.grid-wrapper::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 12px;
}

.odds-grid {
    width: 100%;
    min-width: 880px;
    border-collapse: collapse;
    table-layout: fixed;
}

.odds-grid thead th {
    background: var(--header-bg);
    color: var(--header-fg);
    border-bottom: 1px solid #334155;
    padding: 0.55rem;
    font-size: 0.75rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.odds-grid .sticky-col {
    position: sticky;
    left: 0;
    z-index: 4;
    background: #f8fafc;
}

.odds-grid thead .sticky-col {
    z-index: 5;
    background: var(--header-bg);
    color: var(--header-fg);
}

.odds-grid td {
    border-top: 1px solid #e2e8f0;
    border-right: 1px solid #edf2f7;
    text-align: center;
    padding: 0.55rem 0.4rem;
    font-weight: 700;
    color: #0f172a;
    font-size: 0.92rem;
}

.odds-grid td.outcome {
    text-align: left;
    font-weight: 700;
    color: #1e293b;
    min-width: 180px;
}

.odds-grid tbody tr:nth-child(even) td {
    background: #fcfdff;
}

.odds-grid td.best-odds {
    background: var(--best-bg);
    color: var(--best-fg);
    box-shadow: inset 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.odds-grid td.steamer {
    background: var(--steamer-bg);
    color: var(--steamer-fg);
}

.odds-grid td.drifter {
    background: var(--drifter-bg);
    color: var(--drifter-fg);
}

.odds-grid td.selectedBet {
    background: var(--selected-bg);
    color: var(--selected-fg);
    box-shadow: inset 0 0 0 2px #eab308;
}

.bookie-logo {
    height: 26px;
    max-width: 110px;
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

.legend {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.8rem;
}

.legend-item {
    font-size: 0.72rem;
    color: #334155;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 0.25rem 0.55rem;
    background: #fff;
}

html[data-theme="dark"] .odds-page {
    background: radial-gradient(1200px 500px at 80% -20%, #243b57 0%, #0f172a 55%, #0b1220 100%);
}

html[data-theme="dark"] .odds-side-menu {
    background: linear-gradient(180deg, #1f2d44 0%, #182338 100%);
    border-color: #27344d !important;
}

html[data-theme="dark"] .side-title {
    color: #dbeafe;
}

html[data-theme="dark"] .sport-card-link {
    border-color: #344359;
    background: rgba(255, 255, 255, 0.03);
}

html[data-theme="dark"] .sport-card-link:hover {
    border-color: #f97316;
    background: rgba(249, 115, 22, 0.12);
}

html[data-theme="dark"] .sport-card-link.active {
    border-color: #f97316;
    background: rgba(249, 115, 22, 0.18);
}

html[data-theme="dark"] .sport-card-name {
    color: #f8fafc;
}

html[data-theme="dark"] .sport-card-count {
    border-color: #334155;
    background: #334155;
    color: #e2e8f0;
}

html[data-theme="dark"] .sport-card-meta {
    color: #94a3b8;
}

html[data-theme="dark"] .odds-generic-header,
html[data-theme="dark"] .odds-main-content > section.mb-4.rounded-xl {
    background-color: #111827 !important;
    border-color: #334155 !important;
}

html[data-theme="dark"] .odds-generic-header h1,
html[data-theme="dark"] .odds-generic-header .details,
html[data-theme="dark"] .odds-main-content label,
html[data-theme="dark"] .odds-main-content strong {
    color: #e2e8f0 !important;
}

html[data-theme="dark"] .odds-generic-header .details span {
    background: #1e293b;
    border-color: #334155;
}

html[data-theme="dark"] .market {
    background: #111827;
    border-color: #334155;
}

html[data-theme="dark"] .market-header {
    background: linear-gradient(90deg, #1e293b 0%, #111827 100%);
    color: #f8fafc;
}

html[data-theme="dark"] .market-header:hover {
    background: linear-gradient(90deg, #273449 0%, #111827 100%);
}

html[data-theme="dark"] .market-header .meta,
html[data-theme="dark"] .legend-item {
    color: #cbd5e1;
}

html[data-theme="dark"] .arrow,
html[data-theme="dark"] .scroll-btn {
    border-color: #334155;
    background: #1e293b;
    color: #e2e8f0;
}

html[data-theme="dark"] .market-content,
html[data-theme="dark"] .grid-wrapper,
html[data-theme="dark"] .legend-item {
    border-color: #334155;
}

html[data-theme="dark"] .grid-wrapper {
    background: #111827;
}

html[data-theme="dark"] .odds-grid .sticky-col {
    background: #111827;
}

html[data-theme="dark"] .odds-grid td {
    color: #e2e8f0;
    border-top-color: #334155;
    border-right-color: #1e293b;
}

html[data-theme="dark"] .odds-grid td.outcome {
    color: #f8fafc;
}

html[data-theme="dark"] .odds-grid tbody tr:nth-child(even) td {
    background: #0f172a;
}

html[data-theme="dark"] .legend-item {
    background: #1e293b;
}

html[data-theme="dark"] .odds-main-content a.rounded-lg.border {
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}

html[data-theme="dark"] .odds-main-content a.rounded-lg.border:hover {
    background: #1e293b !important;
}

html[data-theme="dark"] .odds-main-content button[type="submit"] {
    background: #f97316 !important;
    color: #fff !important;
}

html[data-theme="dark"] .odds-main-content button[type="submit"]:hover {
    background: #ea580c !important;
}

@media (max-width: 768px) {
    .odds-layout {
        grid-template-columns: 1fr;
    }

    .odds-side-menu {
        position: static;
    }

    .odds-page {
        padding-top: 1rem;
    }

    .market-header {
        font-size: 0.9rem;
    }

    .market-header .meta {
        display: block;
        margin-top: 0.3rem;
    }

    .scroll-btn {
        width: 32px;
        height: 32px;
    }

    .odds-grid {
        min-width: 740px;
    }

    .odds-grid td {
        font-size: 0.84rem;
    }
}
