:root {
  --bg: #0a162e;
  --panel: #122447;
  --panel2: #18305c;
  --line: #25406e;
  --text: #f4f7fb;
  --muted: #9bb0d0;
  --accent: #3d7cff;
  --yellow: #f5d000;
  --pink: #e91e8c;
  --green: #2ecc71;
  --red: #ff5a5a;
  --side: #0d1b36;
  --bet: #e8eef8;
  --bet-text: #13233f;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; min-height: 100%;
  font-family: "Exo 2", "Trebuchet MS", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #0b1832 0%, #07101f 100%);
}
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input { font: inherit; }
.hide { display: none !important; }

#app { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 14px;
  background: #0c1a33;
  border-bottom: 1px solid var(--line);
}
.top-left, .top-right { display: flex; align-items: center; gap: 12px; }
.menu-dot { font-size: 22px; color: var(--muted); width: 34px; }
.crumbs { color: var(--muted); font-size: 13px; }
.balance { color: #fff; font-weight: 800; letter-spacing: .02em; }
.pill {
  background: #1a2f55; color: #cfe0ff; padding: 6px 12px; border-radius: 16px;
  font-size: 12px; font-weight: 700;
}
.pill.scheduled { background: linear-gradient(90deg, #2a4d8c, #1e3a6b); }
.exit-btn { background: #243a63; padding: 7px 12px; border-radius: 6px; font-weight: 700; }

.layout {
  flex: 1;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 230px;
  min-height: 0;
  transition: grid-template-columns .25s ease;
}
.layout.markets-open {
  grid-template-columns: 210px minmax(0, 1fr) 300px 230px;
}


.side-nav {
  background: var(--side);
  border-right: 1px solid var(--line);
  overflow: auto;
  padding: 10px 0 20px;
}
.nav-group { margin-bottom: 6px; }
.nav-group-title {
  width: 100%;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  color: #fff; font-weight: 800; font-size: 14px;
}
.nav-group-title .ico { width: 18px; text-align: center; opacity: .9; }
.nav-group-title .chev { margin-left: auto; color: var(--muted); font-size: 12px; }
.nav-sub {
  width: 100%;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 28px;
  color: var(--muted); font-size: 13px; font-weight: 600;
}
.nav-sub.active, .nav-sub:hover {
  background: rgba(61,124,255,.18);
  color: #fff;
}
.nav-leaf {
  width: 100%;
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 40px;
  color: #b7c7e4; font-size: 12px;
  text-align: left;
}
.nav-leaf .flag,
.side-nav .flag {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  background: #1a2f55;
  border: 1px solid rgba(255,255,255,.15);
}
.nav-leaf span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-leaf.active, .nav-leaf:hover {
  background: rgba(245,208,0,.12);
  color: var(--yellow);
}
.nav-search {
  position: sticky; bottom: 0;
  padding: 10px 12px;
  background: linear-gradient(180deg, transparent, var(--side) 30%);
  margin-top: 12px;
}
.nav-search input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #122447;
  color: #fff;
  outline: none;
}

.main {
  display: flex; flex-direction: column;
  gap: 10px; padding: 10px; min-width: 0; min-height: 0;
}
.mode-tabs, .market-bar {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.mode-tabs button {
  padding: 9px 16px; border-radius: 18px;
  background: #16305a; color: var(--muted); font-weight: 800; font-size: 12px;
  letter-spacing: .04em;
}
.mode-tabs button.active {
  background: var(--yellow); color: #1a1600;
}
.market-bar {
  padding: 8px 12px 0;
}
.market-bar button {
  padding: 7px 10px; border-radius: 6px;
  background: #14284f; color: var(--muted); font-size: 12px; font-weight: 700;
}
.market-bar button.active { background: var(--accent); color: #fff; }

.fixture-bar {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}
.fixture-meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 10px;
}
.fixture-league {
  font-weight: 800; letter-spacing: .04em; font-size: 14px;
  color: #fff;
}
.fixture-countdown {
  display: flex; align-items: baseline; gap: 8px;
  background: #0f2144; border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 14px;
}
.fixture-countdown .lbl {
  color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase;
}
.fixture-countdown strong {
  color: var(--yellow); font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.fixture-strip {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px;
  scrollbar-width: thin;
}
.fixture-card {
  flex: 0 0 auto;
  min-width: 168px;
  max-width: 220px;
  text-align: left;
  background: #0f2144;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 12px;
  color: #d7e4ff;
  transition: border-color .15s, background .15s, transform .15s;
}
.fixture-card:hover { border-color: #3d7cff; transform: translateY(-1px); }
.fixture-card.active {
  border-color: var(--yellow);
  background: linear-gradient(160deg, #1a3564, #12284f);
  box-shadow: 0 0 0 1px rgba(245,208,0,.25);
}
.fixture-card .fc-teams {
  display: flex; align-items: center; gap: 6px;
  font-weight: 800; font-size: 13px; color: #fff;
  white-space: nowrap;
}
.fixture-card .fc-crest {
  width: 18px; height: 18px; border-radius: 50%; object-fit: contain;
  background: #081427;
}
.fixture-card .fc-vs { color: var(--yellow); font-size: 11px; }
.fixture-card .fc-sub {
  margin-top: 6px; color: var(--muted); font-size: 11px; font-weight: 600;
}
.fixture-card .fc-hint {
  margin-top: 4px; color: #7eb6ff; font-size: 10px; font-weight: 700;
  letter-spacing: .03em; text-transform: uppercase;
}

.combi-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.combi-card {
  background: linear-gradient(160deg, #1a3a72, #12284f);
  border: 1px solid #2a4f8a;
  border-radius: 10px; padding: 12px;
}
.combi-card h3 { margin: 0 0 8px; color: #9ec1ff; font-size: 13px; }
.combi-legs { font-size: 12px; color: #d5e4ff; margin-bottom: 10px; }
.combi-legs div { display: flex; justify-content: space-between; padding: 3px 0; }
.combi-foot { display: flex; justify-content: space-between; align-items: center; }
.combi-foot strong { color: var(--yellow); font-size: 18px; }
.combi-foot button {
  background: var(--yellow); color: #1a1600;
  padding: 8px 14px; border-radius: 6px; font-weight: 800;
}

.broadcast.wide {
  flex: 1;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  min-height: 0; overflow: hidden;
  display: flex; flex-direction: column;
}
.odds-body { flex: 1; overflow: auto; padding: 8px 10px 14px; }
.odds-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.odds-table th, .odds-table td {
  border-bottom: 1px solid #1c335c; padding: 8px 6px; text-align: center;
}
.odds-table th { color: var(--muted); font-weight: 700; background: #102447; }
.odds-table td.match { text-align: left; color: #e8f0ff; font-weight: 700; }
.team-row {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 12px;
}
.team-row .crest {
  width: 18px; height: 18px; object-fit: contain; border-radius: 50%;
  background: #0f2144;
}
.team-row .vs { color: var(--muted); font-weight: 600; margin: 0 2px; }
.mma-card { padding: 12px; }
.mma-vs {
  display: flex; justify-content: center; align-items: center; gap: 12px;
  margin-bottom: 12px; font-size: 15px; flex-wrap: wrap;
}
.mma-vs span { color: var(--yellow); font-weight: 800; }
.mma-fighter {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 700; color: #e8f0ff;
}
.mma-flag {
  width: 22px; height: 16px; object-fit: cover;
  border-radius: 2px; background: #0f2144;
}
.mma-name { font-size: 12px; }
.mma-vs-inline { color: var(--yellow); font-weight: 800; margin: 0 6px; }
.mma-round {
  color: var(--yellow); font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; margin-bottom: 10px; font-size: 13px;
}
.mma-qf-table td.match { vertical-align: middle; }
.mma-qf-table .odd-btn { margin-top: 6px; display: inline-block; min-width: 64px; }
.mma-mid { color: var(--muted); font-weight: 700; text-align: center; width: 36px; }
.mma-row-on { background: rgba(255, 210, 70, .08); }
.mma-qf .mma-fighter { font-size: 11px; }
.mma-bracket {
  margin-top: 16px; padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.mma-br-label {
  color: var(--muted); font-size: 11px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px;
}
.mma-br-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px;
}
.mma-br-pair {
  display: flex; flex-direction: column; gap: 6px;
  padding: 8px; border-radius: 6px; background: rgba(0,0,0,.25);
}
.mma-br-slot {
  min-height: 28px; display: flex; align-items: center;
  padding: 4px 6px; border-radius: 4px; background: #12284f;
}
.mma-br-slot.empty { color: var(--muted); justify-content: center; font-size: 11px; }
.mma-br-slot.final { border: 1px solid rgba(255,210,70,.35); }
.mma-br-finals {
  grid-column: 1 / -1; display: flex; justify-content: center; gap: 10px; margin-top: 6px;
}
.mma-br-gap { display: none; }
.fc-teams.mma-qf { flex-direction: column; align-items: flex-start; gap: 4px; }
.stage img.poster {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 2; /* above video while stream buffers */
}
.stage img.poster.hide { z-index: 0; }
.stage video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 1; background: #000;
}
.odd-btn {
  min-width: 52px; padding: 7px 6px; border-radius: 5px;
  background: #1a3564; color: #fff; font-weight: 800;
}
.odd-btn:hover { background: #234782; }
.odd-btn.on { background: var(--yellow); color: #1a1600; }
.odd-btn.tall {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-width: 72px; padding: 10px 8px;
}
.odd-btn.tall .cap { font-size: 11px; font-weight: 700; opacity: .85; }
.odd-btn.tall strong { font-size: 15px; }
.match-bet-card { display: flex; flex-direction: column; gap: 14px; }
.mb-row { display: flex; flex-direction: column; gap: 8px; }
.mb-lbl { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.mb-odds { display: flex; flex-wrap: wrap; gap: 8px; }

.stage {
  position: relative; flex: 1; min-height: 320px;
  background: #081427;
}
.keno-layer {
  position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(circle at 50% 30%, #1a3a72, #07101f 70%);
  padding: 16px; overflow: auto;
}
.keno-title {
  text-align: center; color: var(--yellow); font-weight: 800;
  letter-spacing: .08em; margin-bottom: 12px;
}
.keno-grid {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
}
.keno-ball {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #ffe566, #f0a000);
  color: #1a1600; font-weight: 900; font-size: 14px;
  animation: kenoPop .25s ease-out;
}
@keyframes kenoPop {
  from { transform: scale(.3); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.keno-pick { padding: 10px; }
.keno-pick p { margin: 0 0 10px; color: var(--muted); }
.keno-board {
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px;
}
.keno-num {
  padding: 7px 0; border-radius: 4px;
  background: #1a3564; color: #fff; font-weight: 700; font-size: 12px;
}
.keno-num.on { background: var(--yellow); color: #1a1600; }
.keno-actions { margin-top: 12px; text-align: center; }

.stage-overlay {
  position: absolute; left: 0; right: 0; top: 0; z-index: 2;
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 10px; padding: 12px 14px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.55), transparent 90%);
}
.stage-match {
  color: #fff; font-weight: 800; font-size: 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,.55);
  max-width: 72%;
}
.stage-match .sm-league {
  display: block; color: #cfe0ff; font-size: 12px; font-weight: 600;
  margin-top: 2px;
}
.stage-badge {
  position: static;
  background: var(--yellow); color: #111; font-weight: 800;
  font-size: 11px; padding: 5px 10px; border-radius: 4px;
  white-space: nowrap;
}
/* Center stage-score unused */
.stage-score { display: none !important; }
.stage-match .sm-scoreline {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 15px;
}
.stage-match .sm-scoreline .sm-score {
  display: inline-block;
  margin: 0;
  padding: 2px 12px;
  font-size: 28px;
  font-weight: 900;
  color: #ffe082;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,224,130,.45);
  border-radius: 6px;
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
}
.goal-flash {
  position: absolute; left: 50%; top: 42%;
  transform: translate(-50%, -50%);
  z-index: 8;
  pointer-events: none;
  text-align: center;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 4px 18px rgba(0,0,0,.85);
  background: rgba(180, 20, 35, .88);
  border: 2px solid #ffe082;
  border-radius: 12px;
  padding: 16px 36px;
  min-width: 200px;
  animation: none;
}
.goal-flash.is-on {
  animation: goalPop .55s ease 1 forwards;
}
.goal-flash .gf-title {
  font-size: clamp(36px, 6vw, 52px);
  letter-spacing: .18em;
  color: #ffe082;
}
.goal-flash .gf-team {
  margin-top: 6px;
  font-size: 15px;
  color: #ffe082;
}
.goal-flash .gf-score {
  margin-top: 10px;
  font-size: 32px;
  font-weight: 900;
  color: #ffe082;
  letter-spacing: .06em;
}
@keyframes goalPop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.7); }
  40% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.score-bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 6;
  background: rgba(0,0,0,.72); padding: 10px 14px;
  font-weight: 800; font-size: 14px;
  color: #fff;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.score-bar .sb-score {
  color: var(--yellow);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
}
.results-mini {
  padding: 8px 10px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted);
  max-height: 72px; overflow: auto;
}

.markets-drawer {
  background: #0d1b36;
  border-left: 1px solid var(--line);
  display: flex; flex-direction: column; min-height: 0;
  animation: drawerIn .22s ease;
}
@keyframes drawerIn {
  from { opacity: .4; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}
.markets-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 8px; padding: 12px 14px;
  background: #122447; border-bottom: 1px solid var(--line);
}
.markets-title { font-weight: 800; color: #fff; font-size: 14px; }
.markets-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.markets-close {
  width: 32px; height: 32px; border-radius: 8px;
  background: #1a3564; color: var(--yellow); font-size: 22px; line-height: 1;
}
.markets-close:hover { background: #234782; }

.betslip {
  background: #f3f6fb;
  color: var(--bet-text);
  border-left: 1px solid #c5d0e4;
  display: flex; flex-direction: column;
  align-self: start;
  width: 100%;
  max-height: calc(100vh - 56px);
  border-radius: 0 0 0 12px;
  box-shadow: -4px 8px 24px rgba(0,0,0,.12);
  overflow: hidden;
}
.betslip.is-empty .slip-body {
  flex: 0 0 auto;
  max-height: none;
}
.betslip.has-bets .slip-body {
  flex: 1 1 auto;
  max-height: min(42vh, 360px);
  overflow: auto;
}
.betslip-head {
  background: #1f4fb0; color: #fff;
  padding: 10px 14px; font-weight: 800; letter-spacing: .03em;
}
.stake-row {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; color: #3a4d6e; font-weight: 700; font-size: 12px;
}
.stake-row input {
  width: 72px; text-align: center;
  border: 1px solid #c5d0e4; border-radius: 6px; padding: 6px;
}
.stake-row button {
  width: 30px; height: 30px; border-radius: 6px;
  background: var(--yellow); color: #1a1600; font-weight: 900;
}
.chips {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 8px;
}
.chips button {
  min-width: 46px; padding: 6px 8px; border-radius: 14px;
  background: #d9e3f5; color: #1a2d4f; font-weight: 800; font-size: 12px;
}
.chips button.on { background: var(--yellow); color: #1a1600; }
.slip-body { padding: 6px 12px; }
.slip-empty {
  text-align: center; color: #8a9bb8;
  padding: 10px 8px 12px; font-size: 12px;
}
.slip-item {
  background: #fff; border: 1px solid #d5deed; border-radius: 8px;
  padding: 8px 10px; margin-bottom: 8px; position: relative;
}
.slip-item .rm { position: absolute; top: 4px; right: 8px; color: #8899b5; }
.slip-item .rm.locked-tag {
  color: #0a7a3e; font-weight: 800; font-size: 11px; pointer-events: none;
}
.slip-item.locked { opacity: .92; border-color: #b8e0c8; background: #f4fff8; }
.slip-item .title { font-weight: 800; padding-right: 16px; font-size: 13px; }
.slip-item .sub { color: #6d7f9d; font-size: 12px; margin-top: 2px; }
.betslip-foot {
  padding: 10px 12px 14px; border-top: 1px solid #d5deed; background: #eef3fb;
}
.pot { display: flex; justify-content: space-between; margin-bottom: 8px; font-weight: 700; }
.pot-odd strong {
  color: #1a4a9e;
  font-size: 18px;
  letter-spacing: .02em;
}
#est-win { color: #0a7a3e; font-size: 16px; }
.place-btn {
  width: 100%; padding: 12px;
  background: linear-gradient(180deg, #ffe566, #f0c400);
  color: #1a1600; font-weight: 900; border-radius: 8px;
}
.place-btn:disabled { opacity: .45; cursor: not-allowed; }
.clear-btn {
  width: 100%; margin-top: 6px; color: #5b6f91; font-size: 12px; font-weight: 700;
}

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: #122447; border: 1px solid var(--accent); color: #fff;
  padding: 10px 16px; border-radius: 8px; z-index: 50; display: none;
}
.toast.show { display: block; }
.result-modal {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(0,0,0,.65);
  display: flex; align-items: center; justify-content: center;
}
.result-card {
  width: min(400px, 92%);
  background: #122447; border: 1px solid var(--accent);
  border-radius: 12px; padding: 18px; text-align: center;
}
.result-card h2 { margin: 0 0 10px; color: var(--yellow); }
.result-card button {
  margin-top: 12px; min-width: 120px; padding: 10px 16px;
  background: var(--yellow); color: #1a1600; font-weight: 800; border-radius: 6px;
}

.help-btn {
  width: 34px; height: 34px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: #1a2f55;
}
.help-btn img {
  width: 22px; height: 22px; display: block;
  filter: brightness(0) saturate(100%) invert(78%) sepia(88%) saturate(1200%) hue-rotate(359deg) brightness(104%) contrast(102%);
}
.help-btn:hover { opacity: .9; background: #234782; }

.help-modal {
  position: fixed; inset: 0; z-index: 55;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.72);
  padding: 16px;
}
.help-modal-card {
  width: min(720px, 100%);
  max-height: min(86vh, 760px);
  display: flex; flex-direction: column;
  background: #122447;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,.55);
  overflow: hidden;
}
.help-modal-head {
  display: flex; align-items: center; justify-content: center;
  position: relative;
  padding: 16px 48px 12px;
  border-bottom: 1px solid var(--line);
  background: #0f2144;
}
.help-modal-head h2 {
  margin: 0; text-align: center;
  color: var(--yellow); font-size: 20px; letter-spacing: .05em;
}
.help-close {
  position: absolute; right: 12px; top: 10px;
  width: 36px; height: 36px;
  color: var(--yellow); font-size: 28px; line-height: 1;
  font-weight: 700;
}
.help-modal-body { overflow: auto; padding: 8px 18px 20px; }
.help-row {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid #1c335c;
}
.help-row:last-child { border-bottom: 0; }
.help-num {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff;
  font-weight: 800; font-size: 16px;
}
.help-row h3 { margin: 0 0 6px; color: var(--yellow); font-size: 15px; }
.help-row p { margin: 0; color: #d5e4ff; font-size: 13px; line-height: 1.45; }

.stats-footer {
  padding: 10px 18px 16px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: flex-end;
}
.stats-clear {
  padding: 8px 14px; border-radius: 6px;
  background: #1a3564; color: #cfe0ff; font-weight: 700;
}
.stats-clear:hover { background: #234782; }
.stats-summary {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  margin-bottom: 14px;
}
.stats-summary > div {
  background: #0f2144; border: 1px solid var(--line);
  border-radius: 8px; padding: 10px; text-align: center;
}
.stats-summary .lbl { display: block; color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.stats-summary .val { font-weight: 800; font-size: 16px; }
.stats-summary .val.win { color: var(--green); }
.stats-summary .val.lose { color: var(--red); }
.stats-empty { text-align: center; color: var(--muted); padding: 36px 12px; }
.stats-item {
  border-bottom: 1px solid #1c335c; padding: 10px 0;
}
.stats-item:last-child { border-bottom: 0; }
.stats-item-head {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.stats-item-head .game { font-weight: 800; color: #fff; }
.stats-badge {
  font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 10px;
}
.stats-badge.win { background: rgba(46,204,113,.18); color: var(--green); }
.stats-badge.lose { background: rgba(255,90,90,.18); color: var(--red); }
.stats-meta { color: var(--muted); font-size: 12px; margin-top: 4px; }
.stats-bets { margin: 6px 0 0; padding-left: 16px; color: #cfe0ff; font-size: 12px; }
.stats-bets .ok { color: var(--green); }
.stats-bets .no { color: var(--red); }
@media (max-width: 640px) {
  .stats-summary { grid-template-columns: repeat(2, 1fr); }
}

.lang-switch { position: relative; z-index: 40; }
.lang-btn {
  display: flex; align-items: center; gap: 8px;
  background: #1a2f55; border: 1px solid var(--line);
  border-radius: 6px; padding: 5px 10px 5px 6px;
  min-width: 64px;
}
.lang-btn img {
  width: 28px; height: 18px; object-fit: cover;
  border-radius: 2px; display: block;
}
.lang-btn span { font-size: 13px; font-weight: 800; letter-spacing: .04em; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  width: 240px; max-height: min(62vh, 420px);
  overflow: auto;
  background: #122447;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 12px 28px rgba(0,0,0,.45);
}
.lang-item {
  width: 100%;
  display: grid;
  grid-template-columns: 34px 36px 1fr;
  align-items: center;
  gap: 8px;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  color: #e8f0ff;
  font-size: 13px;
}
.lang-item img {
  width: 28px; height: 18px; object-fit: cover;
  border-radius: 2px;
}
.lang-item .code { font-weight: 800; color: #9bb0d0; }
.lang-item .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lang-item:hover, .lang-item.active { background: #1a3564; }

@media (max-width: 1200px) {
  .layout, .layout.markets-open { grid-template-columns: 190px minmax(0, 1fr) 220px; }
  .markets-drawer {
    position: fixed; right: 220px; top: 48px; bottom: 0; width: min(320px, 88vw); z-index: 25;
    box-shadow: -12px 0 30px rgba(0,0,0,.35);
  }
  .betslip {
    position: fixed; right: 0; top: 48px; bottom: auto;
    width: min(220px, 40vw); z-index: 20;
    max-height: calc(100vh - 56px);
  }
  .combi-row { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .layout, .layout.markets-open { grid-template-columns: 1fr; }
  .side-nav { max-height: 200px; }
  .markets-drawer, .betslip { position: static; width: auto; box-shadow: none; }
  .stage { min-height: 240px; }
}
