/* BetPulse — sportsbook UI */
:root {
    --bg: #070b14;
    --bg-2: #0d1322;
    --surface: #111a2e;
    --surface-2: #17223b;
    --surface-3: #1f2c4a;
    --border: rgba(148, 163, 214, 0.12);
    --border-strong: rgba(148, 163, 214, 0.22);
    --text: #e8ecf7;
    --text-2: #9aa6c4;
    --text-3: #66729a;
    --accent: #e3263a;
    --accent-hover: #f23d50;
    --accent-ink: #ffffff;
    --accent-soft: rgba(227, 38, 58, 0.14);
    --gold: #fbbf24;
    --gold-soft: rgba(251, 191, 36, 0.14);
    --blue: #4f8cff;
    --live: #ff4d5e;
    --win: #2fd67b;
    --loss: #ff5c6c;
    --void: #a0a8c0;
    --warn: #ffb547;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --header-h: 64px;
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Barlow Condensed', 'Inter', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(227, 38, 58, 0.10), transparent 60%),
        radial-gradient(900px 500px at 100% 0%, rgba(251, 191, 36, 0.06), transparent 60%),
        var(--bg);
    background-attachment: fixed;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select { font: inherit; color: inherit; }
[x-cloak] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Header ---------- */
.header {
    position: sticky; top: 0; z-index: 40;
    height: var(--header-h);
    display: flex; align-items: center; gap: 20px;
    padding: 0 24px;
    background: rgba(7, 11, 20, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 24px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.logo-mark {
    width: 40px; height: 40px; border-radius: 12px; object-fit: cover;
    background: #f7f1e8;
    box-shadow: 0 0 0 2px rgba(227, 38, 58, 0.6), 0 0 24px rgba(227, 38, 58, 0.35);
}
.logo span b { color: var(--accent); }
.header-nav { display: flex; gap: 4px; margin-left: 12px; }
.header-nav a {
    padding: 8px 14px; border-radius: 999px; color: var(--text-2); font-weight: 600;
    transition: color .15s, background .15s;
}
.header-nav a:hover { color: var(--text); background: var(--surface); }
.header-nav a.active { color: var(--text); background: var(--surface-2); }
.search { flex: 1; max-width: 380px; margin-left: auto; position: relative; }
.search input {
    width: 100%; height: 40px; padding: 0 14px 0 40px;
    border-radius: 999px; border: 1px solid var(--border);
    background: var(--surface); outline: none; transition: border-color .15s;
}
.search input:focus { border-color: var(--accent); }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.header-right { display: flex; align-items: center; gap: 10px; }
.balance-chip {
    display: flex; align-items: center; gap: 8px;
    height: 40px; padding: 0 14px; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--border);
    font-weight: 700; font-variant-numeric: tabular-nums;
}
.balance-chip small { color: var(--text-3); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; }
.avatar {
    width: 40px; height: 40px; border-radius: 50%;
    display: grid; place-items: center; font-weight: 800;
    background: linear-gradient(135deg, var(--blue), #8b5cf6); color: #fff; border: 0;
}
.dropdown { position: relative; }
.dropdown-menu {
    position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px;
    background: var(--surface-2); border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 6px;
}
.dropdown-menu a, .dropdown-menu button {
    display: flex; width: 100%; padding: 10px 12px; border-radius: 8px;
    background: none; border: 0; text-align: left; color: var(--text-2); font-weight: 500;
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface-3); color: var(--text); }
.dropdown-menu .menu-head { padding: 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.dropdown-menu .menu-head strong { display: block; }
.dropdown-menu .menu-head span { color: var(--text-3); font-size: 12px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
    font-weight: 700; white-space: nowrap; transition: transform .1s, background .15s, border-color .15s, opacity .15s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: var(--surface); }
.btn-block { width: 100%; height: 48px; font-size: 15px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

/* ---------- Layout ---------- */
.shell {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr) 340px;
    gap: 24px;
    max-width: 1480px;
    margin: 0 auto;
    padding: 24px;
}
.shell.no-slip { grid-template-columns: 240px minmax(0, 1fr); }
.sidebar, .slip-col { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; scrollbar-width: thin; }
.main { min-width: 0; }

.panel {
    background: linear-gradient(180deg, var(--surface), var(--bg-2));
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.panel-title {
    padding: 16px 16px 8px; margin: 0;
    font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-3);
}
.league-list { list-style: none; margin: 0; padding: 4px 8px 10px; }
.league-list a {
    display: flex; align-items: center; gap: 12px;
    padding: 10px; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 600;
    transition: background .15s, color .15s;
}
.league-list a:hover { background: var(--surface-2); color: var(--text); }
.league-list a.active { background: var(--accent-soft); color: var(--accent); }
.league-list .ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); font-size: 16px; }
.league-list .count { margin-left: auto; font-size: 12px; color: var(--text-3); background: var(--bg); padding: 1px 8px; border-radius: 999px; }
.league-list a.active .count { color: var(--accent); }

.chips { display: none; }

/* ---------- Hero ---------- */
.hero {
    position: relative; overflow: hidden;
    border-radius: 20px; padding: 28px;
    background:
        linear-gradient(120deg, rgba(7, 11, 20, 0.15), rgba(7, 11, 20, 0.85)),
        linear-gradient(120deg, var(--home-color, #1d4ed8) 0%, #101830 50%, var(--away-color, #b91c1c) 100%);
    border: 1px solid var(--border-strong);
    margin-bottom: 24px;
}
.hero::after {
    content: ''; position: absolute; inset: 0;
    background: repeating-linear-gradient(115deg, transparent 0 40px, rgba(255,255,255,0.025) 40px 80px);
    pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero-tag { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px; background: rgba(0,0,0,0.35); font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--gold); }
.hero-matchup { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin: 22px 0; }
.hero-team { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.hero-team .name { font-family: var(--font-display); font-size: 26px; font-weight: 700; line-height: 1.1; }
.hero-vs { font-family: var(--font-display); font-size: 18px; color: var(--text-2); text-align: center; }
.hero-vs strong { display: block; color: var(--text); font-size: 15px; font-family: var(--font); }
.hero-odds { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.hero-odds .odd-btn { background: rgba(7, 11, 20, 0.55); backdrop-filter: blur(6px); }

.team-badge {
    width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
    display: grid; place-items: center;
    font-family: var(--font-display); font-weight: 800; font-size: 14px; letter-spacing: .5px;
    color: #fff; background: var(--c, var(--surface-3));
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.15), 0 4px 14px rgba(0,0,0,0.3);
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.team-badge.lg { width: 72px; height: 72px; border-radius: 18px; font-size: 22px; }
.team-badge.sm { width: 28px; height: 28px; border-radius: 8px; font-size: 10px; }

/* ---------- Section heading ---------- */
.section-head { display: flex; align-items: center; gap: 12px; margin: 28px 0 12px; }
.section-head:first-child { margin-top: 0; }
.section-head h2 { margin: 0; font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: .3px; display: flex; align-items: center; gap: 10px; }
.section-head .meta { margin-left: auto; color: var(--text-3); font-size: 12px; }
.section-head a.meta:hover { color: var(--accent); }

/* ---------- Live strip ---------- */
.live-strip { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; scrollbar-width: none; }
.live-strip::-webkit-scrollbar { display: none; }
.live-card { min-width: 220px; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.live-card .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 3px 0; font-weight: 600; }
.live-card .row b { font-family: var(--font-display); font-size: 20px; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; color: var(--live); font-size: 11px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; }
.live-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(255, 77, 94, .6); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 77, 94, .6); } 70% { box-shadow: 0 0 0 8px rgba(255, 77, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 77, 94, 0); } }

/* ---------- Event cards ---------- */
.events { display: flex; flex-direction: column; gap: 10px; }
.event-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) repeat(3, 120px);
    gap: 10px; align-items: center;
    padding: 14px 16px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    transition: border-color .15s, background .15s;
}
.event-card:hover { border-color: var(--border-strong); background: #131d33; }
.event-cols-head {
    display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, 120px); gap: 10px;
    padding: 0 16px 4px; font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .8px;
}
.event-cols-head span:not(:first-child) { text-align: center; }
.event-info { min-width: 0; }
.event-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-3); margin-bottom: 8px; }
.event-meta .time { color: var(--text-2); font-weight: 600; }
.event-meta .more { margin-left: auto; color: var(--text-3); font-weight: 600; }
.event-meta .more:hover { color: var(--accent); }
.event-team { display: flex; align-items: center; gap: 10px; padding: 3px 0; font-weight: 600; min-width: 0; }
.event-team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.market-col { display: flex; flex-direction: column; gap: 6px; }
.market-label { display: none; }

.odd-btn {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 44px; padding: 4px 8px; width: 100%;
    border-radius: var(--radius-sm); border: 1px solid var(--border);
    background: var(--surface-2);
    font-variant-numeric: tabular-nums;
    transition: background .12s, border-color .12s, transform .08s;
}
.odd-btn:hover:not([disabled]) { border-color: var(--accent); background: var(--surface-3); }
.odd-btn:active:not([disabled]) { transform: scale(0.96); }
.odd-btn .line { font-size: 11px; color: var(--text-2); font-weight: 600; line-height: 1.2; }
.odd-btn .price { font-weight: 800; font-size: 14px; color: var(--gold); line-height: 1.3; }
.odd-btn .sel-name { font-size: 11px; color: var(--text-2); font-weight: 600; line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.odd-btn.selected, .odd-btn.selected:hover:not([disabled]) { background: var(--accent); border-color: var(--accent); }
.odd-btn.selected .price, .odd-btn.selected .line, .odd-btn.selected .sel-name { color: var(--accent-ink); }
.odd-btn[disabled] { opacity: .35; cursor: not-allowed; }
.odd-btn.empty { background: transparent; border-style: dashed; color: var(--text-3); cursor: default; }

/* ---------- Bet slip ---------- */
.slip { display: flex; flex-direction: column; }
.slip-head { display: flex; align-items: center; gap: 10px; padding: 16px; border-bottom: 1px solid var(--border); }
.slip-head h3 { margin: 0; font-family: var(--font-display); font-size: 20px; }
.slip-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.slip-clear { margin-left: auto; background: none; border: 0; color: var(--text-3); font-size: 12px; font-weight: 600; }
.slip-clear:hover { color: var(--loss); }
.slip-close { display: none; }
.slip-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 12px 16px 0; padding: 4px; border-radius: 999px; background: var(--bg); }
.slip-tabs button { height: 34px; border: 0; border-radius: 999px; background: none; color: var(--text-2); font-weight: 700; }
.slip-tabs button.active { background: var(--surface-3); color: var(--text); }
.slip-tabs button[disabled] { opacity: .4; cursor: not-allowed; }
.slip-items { padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.slip-item { padding: 12px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); position: relative; }
.slip-item.conflict { border-color: var(--warn); }
.slip-item .remove { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 6px; border: 0; background: none; color: var(--text-3); display: grid; place-items: center; }
.slip-item .remove:hover { background: var(--surface-3); color: var(--text); }
.slip-item .pick { font-weight: 700; padding-right: 28px; }
.slip-item .market { font-size: 12px; color: var(--text-2); }
.slip-item .match { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.slip-item .bottom { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.slip-item .price { font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.slip-item .warn { font-size: 11px; color: var(--warn); margin-top: 6px; }
.stake-input { position: relative; margin-left: auto; width: 120px; }
.stake-input span { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-weight: 600; }
.stake-input input {
    width: 100%; height: 38px; padding: 0 10px 0 22px; text-align: right;
    border-radius: 8px; border: 1px solid var(--border-strong); background: var(--bg); outline: none;
    font-weight: 700; font-variant-numeric: tabular-nums;
}
.stake-input input:focus { border-color: var(--accent); }
.quick-stakes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.quick-stakes button { height: 30px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text-2); font-size: 12px; font-weight: 700; }
.quick-stakes button:hover { border-color: var(--accent); color: var(--text); }
.slip-foot { padding: 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.slip-row { display: flex; justify-content: space-between; color: var(--text-2); font-variant-numeric: tabular-nums; }
.slip-row strong { color: var(--text); }
.slip-row.payout strong { color: var(--gold); font-size: 18px; }
.slip-empty { padding: 36px 20px; text-align: center; color: var(--text-3); }
.slip-empty .ico { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-2); font-size: 26px; }
.slip-empty strong { display: block; color: var(--text-2); margin-bottom: 4px; }
.slip-msg { padding: 10px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; }
.slip-msg.error { background: rgba(255, 92, 108, 0.12); color: var(--loss); }
.slip-msg.ok { background: rgba(47, 214, 123, 0.12); color: var(--win); }

/* ---------- Flash / alerts ---------- */
.flash { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 20px; font-weight: 600; }
.flash.success { background: rgba(47, 214, 123, 0.12); color: var(--win); border: 1px solid rgba(47, 214, 123, 0.25); }
.flash.error { background: rgba(255, 92, 108, 0.12); color: var(--loss); border: 1px solid rgba(255, 92, 108, 0.25); }
.toast {
    position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 100;
    padding: 12px 20px; border-radius: 999px; background: var(--win); color: #03240f; font-weight: 800; box-shadow: var(--shadow);
}

/* ---------- Empty state ---------- */
.empty-state { text-align: center; padding: 60px 20px; border: 1px dashed var(--border-strong); border-radius: var(--radius); color: var(--text-2); }
.empty-state .ico { font-size: 40px; margin-bottom: 8px; }
.empty-state h3 { margin: 0 0 6px; color: var(--text); font-family: var(--font-display); font-size: 22px; }
.empty-state p { margin: 0 0 16px; }

/* ---------- Event detail ---------- */
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-weight: 600; margin-bottom: 16px; }
.back-link:hover { color: var(--accent); }
.scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.scoreboard .score { font-family: var(--font-display); font-size: 44px; font-weight: 800; text-align: center; letter-spacing: 2px; }
.market-card { padding: 16px; margin-bottom: 14px; }
.market-card h3 { margin: 0 0 12px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.market-card h3 small { color: var(--text-3); font-weight: 500; font-size: 12px; }
.market-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.market-grid .odd-btn { min-height: 58px; }
.info-list { list-style: none; margin: 0; padding: 0 16px 16px; }
.info-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); color: var(--text-2); }
.info-list li:last-child { border-bottom: 0; }
.info-list li strong { color: var(--text); text-align: right; }

/* ---------- Page header / tabs ---------- */
.page-title { font-family: var(--font-display); font-size: 32px; font-weight: 800; margin: 0 0 6px; }
.page-sub { color: var(--text-2); margin: 0 0 22px; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 18px; }
.tabs a { padding: 8px 18px; border-radius: 999px; font-weight: 700; color: var(--text-2); }
.tabs a.active { background: var(--accent); color: var(--accent-ink); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat { padding: 16px; }
.stat .label { font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--text-3); }
.stat .value { font-family: var(--font-display); font-size: 28px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .value.pos { color: var(--win); }
.stat .value.neg { color: var(--loss); }

/* ---------- Bet history ---------- */
.bet-card { padding: 16px; margin-bottom: 12px; }
.bet-card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.bet-card-head .type { font-weight: 800; font-family: var(--font-display); font-size: 18px; text-transform: uppercase; letter-spacing: .5px; }
.bet-card-head .date { color: var(--text-3); font-size: 12px; }
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; }
.badge.pending { background: rgba(79, 140, 255, 0.15); color: var(--blue); }
.badge.won { background: rgba(47, 214, 123, 0.15); color: var(--win); }
.badge.lost { background: rgba(255, 92, 108, 0.15); color: var(--loss); }
.badge.void { background: rgba(160, 168, 192, 0.15); color: var(--void); }
.bet-card-head .badge { margin-left: auto; }
.leg { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.leg-status { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; background: var(--blue); }
.leg-status.won { background: var(--win); }
.leg-status.lost { background: var(--loss); }
.leg-status.void { background: var(--void); }
.leg-main { min-width: 0; flex: 1; }
.leg-main .pick { font-weight: 700; }
.leg-main .sub { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leg .price { font-weight: 800; font-variant-numeric: tabular-nums; }
.bet-card-foot { display: flex; gap: 24px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--border); }
.bet-card-foot div { display: flex; flex-direction: column; }
.bet-card-foot span { font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .6px; }
.bet-card-foot strong { font-variant-numeric: tabular-nums; font-size: 16px; }
.bet-card-foot strong.win { color: var(--win); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; padding: 12px 16px; font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--text-3); border-bottom: 1px solid var(--border); }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; }
.amount.pos { color: var(--win); font-weight: 700; }
.amount.neg { color: var(--loss); font-weight: 700; }

.wallet-hero { padding: 28px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-bottom: 22px; background: linear-gradient(130deg, #5c1a22, #0f1729 55%, #3d2e08); }
.wallet-hero .label { color: var(--text-2); font-weight: 600; }
.wallet-hero .big { font-family: var(--font-display); font-size: 52px; font-weight: 800; line-height: 1; margin-top: 6px; }
.wallet-hero form { margin-left: auto; }

/* ---------- Pagination ---------- */
.pager { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.pager a, .pager span { padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; color: var(--text-2); }
.pager a:hover { color: var(--text); border-color: var(--border-strong); }
.pager span { opacity: .4; }

/* ---------- Auth ---------- */
.auth-wrap { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 420px; padding: 32px; }
.auth-card h1 { margin: 0 0 6px; font-family: var(--font-display); font-size: 32px; }
.auth-card p.sub { margin: 0 0 24px; color: var(--text-2); }
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.field input[type=email], .field input[type=password], .field input[type=text] {
    width: 100%; height: 46px; padding: 0 14px; border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong); background: var(--bg); outline: none; transition: border-color .15s;
}
.field input:focus { border-color: var(--accent); }
.field .error { color: var(--loss); font-size: 12px; margin-top: 6px; }
.check { display: flex; align-items: center; gap: 8px; color: var(--text-2); margin-bottom: 20px; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.auth-alt { text-align: center; margin-top: 20px; color: var(--text-2); }
.auth-alt a { color: var(--gold); font-weight: 700; }
.auth-note { margin-top: 20px; padding: 12px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--text-2); font-size: 13px; }

/* ---------- Footer ---------- */
.footer { max-width: 1480px; margin: 0 auto; padding: 24px; color: var(--text-3); font-size: 12px; text-align: center; }
.footer .rg { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; margin-bottom: 8px; font-weight: 700; }

/* ---------- Mobile bottom nav ---------- */
.bottom-nav { display: none; }
.sheet-backdrop { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
    .shell { grid-template-columns: 210px minmax(0, 1fr) 310px; gap: 18px; padding: 18px; }
    .event-card, .event-cols-head { grid-template-columns: minmax(0, 1fr) repeat(3, 96px); }
}

@media (max-width: 1024px) {
    .shell, .shell.no-slip { grid-template-columns: minmax(0, 1fr); padding: 16px 16px 96px; }
    .sidebar { display: none; }
    .header-nav { display: none; }
    .chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 18px; padding: 0 16px 4px; scrollbar-width: none; }
    .chips::-webkit-scrollbar { display: none; }
    .chips a { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; color: var(--text-2); }
    .chips a.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

    /* Bet slip becomes a bottom sheet */
    .slip-col {
        position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 60;
        max-height: 85vh; overflow-y: auto;
        transform: translateY(105%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
    }
    .slip-col.open { transform: translateY(0); }
    .slip-col .panel { border-radius: 22px 22px 0 0; border-bottom: 0; box-shadow: 0 -20px 50px rgba(0,0,0,0.5); padding-bottom: env(safe-area-inset-bottom); }
    .slip-head::before { content: ''; position: absolute; left: 50%; top: 8px; width: 40px; height: 4px; border-radius: 4px; background: var(--border-strong); transform: translateX(-50%); }
    .slip-head { position: relative; padding-top: 22px; }
    .slip-close { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--surface-3); }
    .sheet-backdrop { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(0,0,0,0.55); }

    .bottom-nav {
        display: grid; grid-template-columns: repeat(5, 1fr);
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
        padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
        background: rgba(13, 19, 34, 0.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
        border-top: 1px solid var(--border);
    }
    .bottom-nav a, .bottom-nav button {
        position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
        padding: 6px 0; border: 0; background: none; color: var(--text-3); font-size: 11px; font-weight: 600;
    }
    .bottom-nav .active { color: var(--accent); }
    .bottom-nav .nav-badge { position: absolute; top: 0; left: 50%; margin-left: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 800; display: grid; place-items: center; }
    .footer { padding-bottom: 90px; }
}

@media (max-width: 720px) {
    :root { --header-h: 58px; }
    .header { padding: 0 14px; gap: 10px; }
    .logo { font-size: 20px; }
    .logo-mark { width: 34px; height: 34px; }
    .search { display: none; }
    .header-right { margin-left: auto; }
    .balance-chip { height: 36px; padding: 0 12px; }
    .balance-chip small { display: none; }
    .avatar { width: 36px; height: 36px; }
    .header .btn { height: 36px; padding: 0 14px; }

    .hero { padding: 20px 16px; border-radius: 18px; }
    .hero-team .name { font-size: 18px; }
    .team-badge.lg { width: 56px; height: 56px; font-size: 18px; border-radius: 14px; }

    .event-cols-head { display: none; }
    .event-card { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 14px; }
    .event-info { grid-column: 1 / -1; }
    .market-label { display: block; font-size: 10px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--text-3); text-align: center; }
    .odd-btn { min-height: 46px; }

    .stats { grid-template-columns: repeat(2, 1fr); }
    .stat .value { font-size: 22px; }
    .page-title { font-size: 26px; }
    .scoreboard .score { font-size: 32px; }
    .wallet-hero .big { font-size: 40px; }
    .wallet-hero form { margin-left: 0; width: 100%; }
    .wallet-hero form .btn { width: 100%; }
    .table th:nth-child(3), .table td:nth-child(3) { display: none; }
    .table td, .table th { padding: 12px 10px; }
    .auth-card { padding: 24px 20px; }
}

/* Mobile search inside page */
.mobile-search { display: none; }
@media (max-width: 720px) {
    .mobile-search { display: block; position: relative; margin-bottom: 14px; }
    .mobile-search input { width: 100%; height: 42px; padding: 0 14px 0 40px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); outline: none; }
    .mobile-search input:focus { border-color: var(--accent); }
    .mobile-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
}

/* ---------- Language switcher ---------- */
.lang-switch { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.lang-switch a { padding: 5px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; color: var(--text-3); }
.lang-switch a:hover { color: var(--text); }
.lang-switch a.active { background: var(--accent); color: var(--accent-ink); }

/* ---------- Currency picker ---------- */
.currency-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.currency-options label { cursor: pointer; }
.currency-options input { position: absolute; opacity: 0; pointer-events: none; }
.currency-options .opt {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 12px 6px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--bg);
    transition: border-color .15s, background .15s;
}
.currency-options .opt .flag { font-size: 22px; line-height: 1; }
.currency-options .opt strong { font-size: 14px; }
.currency-options .opt small { font-size: 11px; color: var(--text-3); text-align: center; }
.currency-options input:checked + .opt { border-color: var(--accent); background: var(--accent-soft); }
.currency-options input:focus-visible + .opt { outline: 2px solid var(--gold); }
.auth-logo { display: block; width: 150px; margin: 0 auto 18px; border-radius: 18px; background: #f7f1e8; padding: 6px; }

/* ---------- Casino ---------- */
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-bottom: 24px; }
.game-tile {
    position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
    min-height: 230px; padding: 20px; border-radius: 20px; border: 1px solid var(--border-strong);
    transition: transform .15s, border-color .15s;
}
.game-tile:hover { transform: translateY(-3px); border-color: var(--gold); }
.game-tile .art { position: absolute; top: 18px; right: 18px; font-size: 64px; filter: drop-shadow(0 8px 18px rgba(0,0,0,.45)); }
.game-tile h3 { margin: 0; font-family: var(--font-display); font-size: 28px; position: relative; }
.game-tile p { margin: 4px 0 14px; color: var(--text-2); position: relative; }
.game-tile .btn { align-self: flex-start; position: relative; }
.game-tile.slots { background: linear-gradient(150deg, #7a1420, #1a1030 70%); }
.game-tile.roulette { background: linear-gradient(150deg, #0d4f2f, #0b1426 70%); }
.game-tile.borlette { background: linear-gradient(150deg, #8a5a05, #1b1222 70%); }

.game-stage { padding: 24px; text-align: center; margin-bottom: 16px; }
.game-controls { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.game-controls .row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.game-controls .row > label { font-weight: 600; color: var(--text-2); }
.result-banner { min-height: 32px; margin-top: 14px; font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: .5px; }
.result-banner.win { color: var(--gold); }
.result-banner.lose { color: var(--text-3); }
.paytable { width: 100%; border-collapse: collapse; font-size: 13px; }
.paytable td { padding: 7px 4px; border-bottom: 1px solid var(--border); }
.paytable td:last-child { text-align: right; font-weight: 700; color: var(--gold); }

/* Slots */
.reels { display: inline-grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 16px; border-radius: 22px; background: linear-gradient(180deg, #2a0d14, #120a18); border: 3px solid var(--gold); box-shadow: 0 0 40px rgba(251,191,36,.18), inset 0 0 30px rgba(0,0,0,.6); }
.reel { width: 104px; height: 120px; border-radius: 14px; background: linear-gradient(180deg, #fff8ec, #e9dcc5); display: grid; place-items: center; font-size: 60px; overflow: hidden; box-shadow: inset 0 6px 14px rgba(0,0,0,.25); }
.reel.spinning span { animation: reel-blur .12s linear infinite; }
@keyframes reel-blur { 0% { transform: translateY(-40%); opacity: .4; } 100% { transform: translateY(40%); opacity: .4; } }
.reel.pop span { animation: pop .3s ease-out; }
@keyframes pop { 0% { transform: scale(.6); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }

/* Roulette */
.wheel-wrap { position: relative; width: 280px; height: 280px; margin: 0 auto; }
.wheel-wrap svg.wheel { width: 100%; height: 100%; transition: transform 4s cubic-bezier(.12, .8, .14, 1); }
.wheel-pointer { position: absolute; left: 50%; top: -6px; transform: translateX(-50%); width: 0; height: 0; border-left: 12px solid transparent; border-right: 12px solid transparent; border-top: 22px solid var(--gold); filter: drop-shadow(0 2px 4px rgba(0,0,0,.6)); z-index: 2; }
.wheel-center { position: absolute; inset: 34%; border-radius: 50%; background: radial-gradient(circle, #2a1b0a, #120a05); border: 3px solid var(--gold); display: grid; place-items: center; font-family: var(--font-display); font-size: 34px; font-weight: 800; z-index: 1; }
.wheel-center.red { color: #ff5a67; } .wheel-center.black { color: #fff; } .wheel-center.green { color: #3ddc84; }
.rboard { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; }
.rboard button, .routside button {
    position: relative; height: 40px; border-radius: 6px; border: 1px solid rgba(255,255,255,.08); color: #fff; font-weight: 800; font-size: 13px;
}
.rboard .red { background: #b3172a; } .rboard .black { background: #1c2333; } .rboard .zero { background: #0f7a45; grid-column: 1 / -1; }
.routside { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 4px; }
.routside button { background: var(--surface-3); font-size: 12px; }
.routside .red { background: #b3172a; } .routside .black { background: #1c2333; }
.chip-count { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 999px; background: var(--gold); color: #1a1200; font-size: 10px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0,0,0,.5); }

/* Borlette */
.balls { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.ball-slot { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ball-slot small { font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .8px; font-size: 11px; }
.ball {
    width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center;
    background: radial-gradient(circle at 32% 28%, #ff8a8a, #d0182b 45%, #6d0612 100%);
    box-shadow: 0 10px 24px rgba(0,0,0,.45), inset -6px -8px 16px rgba(0,0,0,.35);
}
.ball span { width: 50px; height: 50px; border-radius: 50%; background: #fff; color: #8a0d18; display: grid; place-items: center; font-family: var(--font-display); font-size: 26px; font-weight: 800; }
.ball.rolling { animation: roll .5s linear infinite; }
@keyframes roll { 0% { transform: rotate(0); } 100% { transform: rotate(360deg); } }
.ball.hit { box-shadow: 0 0 0 4px var(--gold), 0 0 30px rgba(251,191,36,.6); }
.picks { display: flex; flex-direction: column; gap: 8px; }
.pick-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); }
.pick-row .num { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #8a0d18; font-family: var(--font-display); font-size: 20px; font-weight: 800; flex-shrink: 0; }
.pick-row.won { border-color: var(--gold); background: var(--gold-soft); }
.num-input { width: 90px; height: 42px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--bg); text-align: center; font-family: var(--font-display); font-size: 22px; font-weight: 800; outline: none; }
.num-input:focus { border-color: var(--accent); }
.icon-btn { width: 32px; height: 32px; border-radius: 8px; border: 0; background: none; color: var(--text-3); display: grid; place-items: center; margin-left: auto; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }

.casino-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
@media (max-width: 1240px) { .casino-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) {
    .header .lang-switch { display: none; }
    .reel { width: 84px; height: 100px; font-size: 48px; }
    .reels { gap: 8px; padding: 12px; }
    .wheel-wrap { width: 240px; height: 240px; }
    .rboard { grid-template-columns: repeat(6, 1fr); }
    .rboard .zero { grid-column: 1 / -1; }
    .ball { width: 68px; height: 68px; }
    .ball span { width: 42px; height: 42px; font-size: 22px; }
    .game-stage { padding: 18px 12px; }
}
.mobile-lang { display: none; }
@media (max-width: 720px) { .mobile-lang { display: flex; justify-content: center; margin-bottom: 14px; } }
@media (min-width: 1025px) { .shell.no-slip .slip-col, .shell.no-slip .sheet-backdrop { display: none; } }

/* Borlette bet types */
.draw-line { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; padding: 6px 16px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border-strong); }
.draw-line span { font-size: 11px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--text-3); }
.draw-line strong, .draw-extra strong { font-family: var(--font-display); font-size: 24px; letter-spacing: 3px; color: var(--gold); }
.draw-extra { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.draw-extra div { display: flex; flex-direction: column; align-items: center; padding: 8px 18px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--border-strong); min-width: 140px; }
.draw-extra span { font-size: 11px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--text-3); }
.pick-row { flex-wrap: wrap; }
.pick-nums { display: flex; align-items: center; gap: 6px; }
.pick-nums .amp { font-weight: 800; color: var(--gold); }
.num-input.d2 { width: 64px; } .num-input.d4 { width: 104px; } .num-input.d5 { width: 124px; }
.type-tag { min-width: 76px; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; text-align: center; text-transform: uppercase; letter-spacing: .5px; }
.type-tag.bolet { background: var(--accent-soft); color: #ff6b78; }
.type-tag.maryaj { background: rgba(167, 139, 250, .16); color: #c4b5fd; }
.type-tag.lotto4 { background: rgba(79, 140, 255, .16); color: #93b8ff; }
.type-tag.lotto5 { background: var(--gold-soft); color: var(--gold); }
.pick-row .dice { height: 36px; padding: 0 12px; }
.pick-row .stake-input { width: 120px; margin-left: 0; }
.pick-win { font-weight: 800; color: var(--gold); }
.add-picks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.add-picks .btn { height: 38px; padding: 0 8px; font-size: 13px; }
.rules { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 720px) {
    .add-picks { grid-template-columns: repeat(2, 1fr); }
    .draw-extra div { min-width: 0; flex: 1; }
    .type-tag { flex-basis: 100%; text-align: left; min-width: 0; padding: 0; background: none !important; }
}

/* ---------- Admin settings ---------- */
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.switch-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--border); cursor: pointer; }
.switch-row input { width: 20px; height: 20px; accent-color: var(--accent); margin-top: 2px; }
.switch-row span { display: flex; flex-direction: column; }
.switch-row small { color: var(--text-3); }
.settings-grid .field input, .currency-fields .field input { width: 100%; height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--bg); outline: none; }
.settings-grid .field input:focus, .currency-fields .field input:focus { border-color: var(--accent); }
.currency-list { display: flex; flex-direction: column; gap: 10px; }
.currency-form { display: flex; align-items: flex-end; gap: 12px; padding: 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); }
.currency-form.disabled { opacity: .6; }
.currency-fields { flex: 1; display: grid; grid-template-columns: 60px repeat(4, minmax(0, 1fr)); gap: 10px; align-items: end; }
.currency-fields .field { margin: 0; }
.currency-fields .field label { font-size: 11px; margin-bottom: 4px; }
.currency-fields .code { font-family: var(--font-display); font-size: 24px; font-weight: 800; color: var(--gold); align-self: center; }
@media (max-width: 1024px) {
    .currency-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .currency-form { flex-direction: column; align-items: stretch; }
}
@media (max-width: 720px) { .settings-grid { grid-template-columns: 1fr; } }

/* ---------- Wallet payments ---------- */
.wallet-actions { margin-bottom: 16px; }
.pay-form .field input[type=number], .pay-form .field input[type=tel] {
    width: 100%; height: 46px; padding: 0 14px; border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong); background: var(--bg); outline: none; font-size: 16px;
}
.pay-form .field input:focus { border-color: var(--accent); }
.hint { display: block; margin-top: 6px; color: var(--text-3); font-size: 12px; }
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.method-grid.two { grid-template-columns: repeat(2, 1fr); }
.method-grid label { cursor: pointer; }
.method-grid input { position: absolute; opacity: 0; pointer-events: none; }
.method-grid .opt { display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 8px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--bg); font-weight: 700; font-size: 13px; text-align: center; }
.method-grid input:checked + .opt { border-color: var(--accent); background: var(--accent-soft); }
.method-grid input:focus-visible + .opt { outline: 2px solid var(--gold); }
.link-btn { border: 0; background: none; padding: 0; margin-left: 8px; color: var(--gold); font-weight: 700; font-size: 12px; text-decoration: underline; }
@media (max-width: 720px) { .method-grid { grid-template-columns: repeat(2, 1fr); } }
