:root {
  --bg: #08111f;
  --panel: #0e1b2d;
  --panel-2: #13243a;
  --line: #243851;
  --text: #f4f7fb;
  --muted: #93a4ba;
  --accent: #f5c542;
  --accent-2: #ffe184;
  --good: #34d399;
  --bad: #fb7185;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at 15% 0%, #183252 0, var(--bg) 34%);
  color: var(--text);
  min-height: 100vh;
}
button, input { font: inherit; }
button { cursor: pointer; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(8,17,31,.88);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
}
.brand { font-size: 28px; font-weight: 900; letter-spacing: .12em; color: var(--accent); }
.tagline { color: var(--muted); font-size: 11px; letter-spacing: .18em; margin-top: 2px; }
.wallet-box { display: flex; gap: 12px; align-items: center; }
.wallet-box span { color: var(--muted); font-size: 11px; }
.wallet-box strong { font-size: 18px; color: var(--accent-2); }
.tabs { display: flex; gap: 8px; padding: 12px 28px; border-bottom: 1px solid var(--line); background: #0b1728; }
.tab, .filter, .ghost, .link-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  border-radius: 9px;
  padding: 9px 13px;
}
.tab.active, .filter.active { background: var(--accent); border-color: var(--accent); color: #101010; font-weight: 800; }
.notice { padding: 8px 28px; background: #201b08; color: #f6df8e; border-bottom: 1px solid #574914; font-size: 12px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; max-width: 1500px; margin: 0 auto; padding: 24px 28px 50px; }
.content { min-width: 0; }
.view { display: none; }
.active-view { display: block; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
h1 { font-size: 26px; margin: 0; }
h2 { margin-top: 28px; font-size: 18px; }
p { margin: 5px 0 0; color: var(--muted); }
.sport-filters { display: flex; gap: 7px; flex-wrap: wrap; }
.event-card { background: linear-gradient(180deg, var(--panel), #0b1727); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 14px; overflow: hidden; }
.event-head { display: flex; justify-content: space-between; gap: 10px; padding: 13px 16px; background: rgba(255,255,255,.02); border-bottom: 1px solid var(--line); }
.event-league { color: var(--muted); font-size: 12px; }
.live-pill { color: #051b13; background: var(--good); padding: 4px 8px; border-radius: 999px; font-weight: 800; font-size: 11px; }
.event-body { padding: 16px; }
.teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; font-size: 17px; font-weight: 800; }
.teams .away { text-align: right; }
.score { min-width: 56px; text-align: center; font-size: 20px; color: var(--accent-2); }
.market { margin-top: 16px; }
.market-title { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.outcomes { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.odd-btn { border: 1px solid #314964; border-radius: 9px; background: #142944; color: var(--text); padding: 10px 12px; display: flex; justify-content: space-between; gap: 8px; }
.odd-btn strong { color: var(--accent-2); }
.odd-btn.selected { background: var(--accent); color: #101010; border-color: var(--accent); }
.odd-btn.selected strong { color: #101010; }
.betslip { position: sticky; top: 116px; align-self: start; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: 0 18px 40px rgba(0,0,0,.28); }
.betslip-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.betslip-head div { display: flex; flex-direction: column; gap: 3px; }
.betslip-head span { color: var(--muted); font-size: 12px; }
.link-btn { border: 0; color: var(--muted); padding: 4px; }
.slip-selections { padding: 10px 0; display: grid; gap: 9px; }
.empty { color: var(--muted); padding: 14px 4px; text-align: center; }
.slip-item { border: 1px solid var(--line); border-radius: 9px; padding: 10px; background: var(--panel-2); }
.slip-item .top { display: flex; justify-content: space-between; gap: 8px; }
.slip-item .event { color: var(--muted); font-size: 11px; margin-top: 5px; }
.remove { border: 0; color: var(--bad); background: transparent; font-size: 18px; line-height: 1; }
.stake-label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.stake-label input { width: 100%; background: #081524; border: 1px solid var(--line); color: var(--text); border-radius: 9px; padding: 11px; outline: none; }
.summary-row { display: flex; justify-content: space-between; padding-top: 11px; }
.primary { border: 0; border-radius: 9px; background: var(--accent); color: #101010; font-weight: 900; padding: 11px 16px; }
.primary:disabled { opacity: .4; cursor: not-allowed; }
.full { width: 100%; margin-top: 14px; }
.message { min-height: 20px; margin-top: 10px; color: var(--muted); font-size: 12px; }
.bet-card, .ticket-card { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 14px; margin-bottom: 10px; }
.bet-title, .ticket-title { display: flex; justify-content: space-between; gap: 8px; }
.status { font-size: 11px; font-weight: 900; padding: 4px 7px; border-radius: 999px; background: #24344a; }
.status.WON { background: rgba(52,211,153,.18); color: var(--good); }
.status.LOST { background: rgba(251,113,133,.15); color: var(--bad); }
.bet-leg { margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--line); }
.bet-leg .small, .small { color: var(--muted); font-size: 12px; }
.lotto-panel { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); padding: 18px; }
.draw-meta { margin-bottom: 14px; color: var(--muted); }
.number-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 7px; }
.number-btn { aspect-ratio: 1; border-radius: 50%; border: 1px solid #35506f; background: #11253d; color: var(--text); font-weight: 700; }
.number-btn.selected { background: var(--accent); color: #101010; border-color: var(--accent); }
.lotto-actions { margin-top: 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.demo-admin { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); color: var(--muted); display: flex; gap: 10px; align-items: center; }
.toast { position: fixed; right: 24px; bottom: 24px; max-width: 360px; background: #f5c542; color: #101010; border-radius: 10px; padding: 12px 16px; font-weight: 800; opacity: 0; transform: translateY(10px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .betslip { position: static; }
  .number-grid { grid-template-columns: repeat(9, 1fr); }
}
@media (max-width: 650px) {
  .topbar { padding: 14px 16px; align-items: flex-start; gap: 12px; }
  .wallet-box { display: grid; justify-items: end; gap: 3px; }
  .tabs, .notice { padding-left: 16px; padding-right: 16px; overflow-x: auto; }
  .layout { padding: 18px 16px 40px; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .number-grid { grid-template-columns: repeat(6, 1fr); }
  .teams { font-size: 14px; }
}
