:root {
  --bg: #0a1218;
  --panel: #121212;
  --card: #edf0f3;
  --card-soft: #f8fcff;
  --text: #01043a;
  --muted: #424b6b;
  --orange: #ff5b14;
  --orange-2: #ff8139;
  --green: #27ec8d;
  --cyan: #29f2ba;
  --danger: #ea442e;
  --win: #00c166;
  --header: #050505;
  --slip-bg: #f2f5fb;
  --accent-line: #edba40;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  width: 100%;
  background: var(--bg) url("/casino/basketball/modules/FSEL/bin_prod/data/images/preload/backgrounds/main-bg.webp") center/cover fixed;
  font-family: "Roboto", "Segoe UI", sans-serif;
  color: #fff;
  overflow: hidden;
  user-select: none;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  max-width: none;
  margin: 0;
  position: relative;
}

.topbar {
  height: 64px;
  background: var(--header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
  z-index: 20;
}

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

.brand img.logo { height: 40px; }
.brand .sub {
  background: var(--orange);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 2px;
  text-transform: uppercase;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 700;
}

.clock { font-size: 12px; opacity: .9; }
.balance {
  font-size: 14px;
  letter-spacing: .2px;
}

.exit-btn {
  border: 0;
  background: var(--orange);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .4px;
  padding: 8px 14px;
  border-radius: 2px;
  cursor: pointer;
  text-transform: uppercase;
}
.exit-btn:hover {
  background: var(--orange-2);
}

.layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  grid-template-areas: "main slip";
  gap: 10px;
  min-height: 0;
  padding: 12px;
  overflow: hidden;
}

.main-col {
  grid-area: main;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  background: rgba(0,0,0,.25);
  border-radius: 4px;
  overflow: hidden;
}

.day-bar {
  height: 50px;
  background: #edf0f3;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 18px;
  font-weight: 500;
  flex-shrink: 0;
}

.day-bar button {
  position: absolute;
  background: transparent;
  border: 0;
  color: var(--text);
  font-size: 22px;
  cursor: pointer;
  width: 40px;
  height: 40px;
}
.day-bar .prev { left: 8px; }
.day-bar .next { right: 8px; }

.match-tabs {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(10,18,24,.55);
  flex-shrink: 0;
}

.match-tab {
  flex: 1;
  height: 44px;
  border: 0;
  border-radius: 2px;
  background: #fff;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-family: "Roboto Condensed", sans-serif;
  cursor: pointer;
  position: relative;
  box-shadow: 0 2px 5px rgba(31,41,90,.1);
}

.match-tab img { height: 26px; width: 26px; object-fit: contain; }
.match-tab .vs { font-size: 12px; opacity: .7; }
.match-tab.active {
  background: linear-gradient(90deg, #29f2ba, #27ec8d);
  color: #012018;
}
.match-tab .badge {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffc700;
  color: #111;
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 2px;
  font-weight: 800;
}

.stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 520px;
  height: 58vh;
  background: #0b1014 url("/casino/basketball/modules/FSEL/bin_prod/data/images/preload/backgrounds/content-bg.webp") center/cover;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  display: none;
}
.stage.playing video { display: block; }

.mute-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: rgba(0,0,0,.45);
  color: #fff;
  cursor: pointer;
  font-size: 16px;
}

.preview-board {
  position: relative;
  z-index: 2;
  width: min(640px, 94%);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: center;
  text-align: center;
}

.team-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.team-block img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.45));
}
.team-block .name {
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .4px;
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
}
.team-block .pos {
  font-size: 12px;
  opacity: .85;
}
.team-block .pct {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 3px solid var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  background: rgba(0,0,0,.35);
}
.form {
  display: flex;
  gap: 4px;
}
.form span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.form .W { background: var(--win); }
.form .L { background: var(--danger); }

.center-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.countdown {
  background: #fff;
  color: var(--text);
  border-radius: 20px;
  padding: 4px 12px;
  font-weight: 800;
  font-size: 13px;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.countdown.urgent {
  background: var(--danger);
  color: #fff;
  animation: flicker 1s steps(1) infinite;
}
@keyframes flicker {
  50% { background: #fff; color: var(--danger); }
}
.h2h {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: "Roboto Condensed", sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #dfe0e1;
}
.h2h div.win-left span:first-child,
.h2h div.win-right span:last-child { color: var(--green); }

.scoreboard {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 6;
  display: none;
  align-items: center;
  gap: 10px;
  background: #18191b;
  padding: 8px 14px;
  border-radius: 2px;
  min-width: 320px;
  justify-content: center;
}
.stage.playing .scoreboard { display: flex; }
.scoreboard img { height: 28px; width: 28px; object-fit: contain; }
.scoreboard .score {
  font-size: 22px;
  font-weight: 800;
  font-family: "Roboto Condensed", sans-serif;
  letter-spacing: 2px;
}
.scoreboard .meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 11px;
  color: #ddd;
  background: linear-gradient(180deg, #ff5b14, #ff8139);
  padding: 4px 10px;
  border-radius: 2px;
  font-weight: 700;
}

.fulltime {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(5,5,5,.55);
  backdrop-filter: blur(4px);
  gap: 18px;
}
.fulltime.show { display: flex; }
.fulltime h2 {
  color: var(--orange);
  font-size: 42px;
  font-weight: 900;
  letter-spacing: 2px;
  text-shadow: 0 2px 0 #d32803, 0 6px 10px rgba(211,40,3,.4);
}
.fulltime .row {
  display: flex;
  align-items: center;
  gap: 40px;
}
.fulltime .team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}
.fulltime .team img { width: 120px; height: 120px; object-fit: contain; }
.fulltime .winner-tag {
  background: linear-gradient(90deg, #29f2ba, #27ec8d);
  color: #012018;
  font-weight: 800;
  font-size: 12px;
  padding: 4px 14px;
  border-radius: 2px;
}
.fulltime .final-score {
  font-size: 48px;
  font-weight: 900;
  background: #26282b;
  padding: 8px 28px;
  border-bottom: 4px solid var(--orange);
}

.markets {
  background: #cbd5e6;
  padding: 6px 8px 8px;
  flex: 0 0 auto;
  position: relative;
  z-index: 3;
}
.markets-head {
  display: flex;
  color: #fff;
  background: #1a2430;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px 6px 96px;
  gap: 8px;
}
.markets-head span { flex: 1; text-align: center; }

.market-row {
  display: grid;
  grid-template-columns: 90px 1fr 1fr;
  gap: 6px;
  align-items: center;
  background: #fff;
  margin-top: 4px;
  padding: 6px;
  border-radius: 2px;
}
.market-row.active-match {
  outline: 2px solid var(--orange);
}
.pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text);
  font-weight: 800;
  font-size: 12px;
}
.pair img { height: 22px; width: 22px; object-fit: contain; }

.odds {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.odd-btn {
  border: 1px solid #d4d8df;
  background: #f8faff;
  height: 36px;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 11px;
  pointer-events: auto;
  position: relative;
  z-index: 2;
}
.odd-btn:hover:not(:disabled) {
  border-color: var(--orange);
  background: #fff4ec;
}
.odd-btn b { color: var(--text); font-size: 14px; }
.odd-btn.selected {
  background: linear-gradient(180deg, rgba(255,91,20,.85), rgba(255,129,57,.85));
  color: #fff;
  border-color: transparent;
}
.odd-btn.selected b { color: #fff; }
.odd-btn:disabled { opacity: .45; cursor: default; }

.aside {
  grid-area: slip;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--slip-bg);
  border-radius: 2px;
  overflow: hidden;
}

.panel-head {
  min-height: 50px;
  background: #121212 url("/casino/basketball/modules/FSEL/bin_prod/data/images/preload/backgrounds/module-bg.webp") center/cover;
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 8px;
  font-size: 18px;
  font-weight: 500;
}
.panel-head .count {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--orange);
  color: #111;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slip-body {
  flex: 1;
  overflow: auto;
  background: #dedbdf;
  position: relative;
  min-height: 160px;
}
.slip-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7d7c7f;
  font-size: 16px;
}
.slip-item {
  background: #f8faff;
  border-bottom: 1px solid #dfe0e1;
  padding: 10px 12px;
  color: var(--text);
}
.slip-item .meta {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}
.slip-item .sel {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.slip-item .est { color: var(--orange); font-size: 11px; text-align: right; margin-top: 4px; }
.slip-item input {
  width: 78px;
  height: 32px;
  border: 1px solid #424b6b;
  border-radius: 2px;
  text-align: right;
  padding: 0 6px;
  font-weight: 700;
  margin-top: 6px;
}
.slip-item .remove {
  float: right;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
}

.chips {
  display: flex;
  gap: 4px;
  padding: 8px;
  background: #dfe0e1;
}
.chips button {
  flex: 1;
  height: 36px;
  border: 1px solid #424b6b;
  background: #f8faff;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}
.chips button.active {
  background: var(--orange-2);
  border-color: var(--orange-2);
  color: #fff;
}

.submit-wrap { padding: 8px; background: #fff; }
.submit-btn {
  width: 100%;
  height: 57px;
  border: 0;
  border-radius: 2px;
  background: linear-gradient(180deg, #ff5b14, #ff8139);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
}
.submit-btn:disabled,
.submit-btn.is-disabled {
  opacity: .5;
  cursor: default;
}
.submit-btn .sub {
  display: block;
  font-size: 12px;
  font-weight: 500;
  font-family: "Roboto Condensed", sans-serif;
  text-transform: none;
  opacity: .95;
}

.matchday-bets {
  margin-top: 4px;
  background: #fff;
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
  max-height: 72px;
}
.md-list { max-height: 48px; overflow: auto; color: var(--text); }
.md-item {
  padding: 10px 12px;
  border-top: 1px solid #dfe0e1;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}
.md-item .right { text-align: right; color: var(--orange); font-weight: 700; }
.md-item.won .right { color: var(--win); }
.md-item.lost .right { color: var(--danger); }

.toast {
  position: fixed;
  top: 80px;
  right: 20px;
  background: rgba(255,255,255,.95);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  z-index: 50;
  display: none;
  font-weight: 600;
}
.toast.show { display: block; animation: slideIn .35s ease; }
@keyframes slideIn {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px) {
  body { overflow: auto; }
  #app { overflow: auto; height: auto; min-height: 100%; }
  .layout {
    grid-template-columns: 1fr;
    grid-template-areas: "main" "slip";
  }
  .aside { min-height: 280px; }
  .stage { min-height: 420px; height: 50vh; }
  .team-block img { width: 80px; height: 80px; }
  .fulltime h2 { font-size: 28px; }
}

