:root {
  --bg-outer: #111114;
  --bg-frame: #17171b;
  --bg-panel-grey: #4a4a4f;
  --bg-surface: #1e1e23;
  --bg-dark-card: #0e0e11;
  --bg-btn-game: #131317;
  --border-std: #32323a;
  --accent-red: #c62828;
  --accent-red-bright: #e53935;
  --blue-btn: #1b87e5;
  --blue-link: #56a8ff;
  --cyan-soft: #93c5fd;
  --green-txt: #36d374;
  --red-submit: #a82d2d;
  --red-txt: #ef5350;
  --text-main: #f1f1f3;
  --text-muted: #9ca3af;
  --font-sans: Arial, Helvetica, 'Inter', system-ui, sans-serif;
  --font-code: ui-monospace, Consolas, monospace;
}

.dec-red {
  color: #ef4444;
}

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

html, body {
  min-height: 100%;
  background: var(--bg-outer);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
}

.hidden { display: none !important; }

/* ===================== 3D GLOSSY RED LOTTERY BALLS (MATCHES REFERENCE IMAGE) ===================== */
.ball-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: nowrap;
}

.lotto-ball {
  position: relative;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.16) 17%, transparent 34%),
    radial-gradient(circle at 36% 32%, #f42424 0%, #cc0808 52%, #7f0000 88%, #4d0000 100%);
  box-shadow:
    inset -2px -3px 5px rgba(45, 0, 0, 0.72),
    inset 1px 1px 3px rgba(255, 160, 160, 0.48),
    0 2px 4px rgba(0, 0, 0, 0.65);
}

.lotto-ball-core {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #f1f1f1 70%, #d4d4d8 100%);
  color: #09090b;
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 900;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.16);
}

.lotto-ball.ball-sm {
  width: 23px;
  height: 23px;
}

.lotto-ball.ball-sm .lotto-ball-core {
  width: 13px;
  height: 13px;
  font-size: 9.5px;
}

.lotto-ball.ball-lg {
  width: 34px;
  height: 34px;
}

.lotto-ball.ball-lg .lotto-ball-core {
  width: 19px;
  height: 19px;
  font-size: 13px;
}

/* Solid Black Result Balls during 1-minute CLOSED break before result appears */
.lotto-ball.ball-black {
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.13) 0%, rgba(255, 255, 255, 0.02) 22%, transparent 40%),
    radial-gradient(circle at 38% 34%, #1f1f25 0%, #0d0d11 56%, #050507 100%);
  border: 1px solid #26262f;
  box-shadow:
    inset -2px -3px 5px rgba(0, 0, 0, 0.92),
    inset 1px 1px 2px rgba(255, 255, 255, 0.06),
    0 2px 4px rgba(0, 0, 0, 0.8);
}

.lotto-ball.ball-black .lotto-ball-core {
  background: #08080b;
  border: 1px solid #1a1a22;
  color: #08080b;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.9);
}

@keyframes ballRevealPop {
  0% { transform: scale(0.55); filter: brightness(1.5); }
  65% { transform: scale(1.16); filter: brightness(1.15); }
  100% { transform: scale(1); filter: brightness(1); }
}

.lotto-ball.ball-pop {
  animation: ballRevealPop 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (max-width: 380px) {
  .ball-row { gap: 3px; }
  .lotto-ball { width: 24px; height: 24px; }
  .lotto-ball-core { width: 13.5px; height: 13.5px; font-size: 9.5px; }
}

/* ===================== COMPACT APP SHELL ===================== */
.app-frame {
  width: 100%;
  max-width: 500px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg-panel-grey);
  border-left: 1px solid #26262c;
  border-right: 1px solid #26262c;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.app-frame.wide-mode {
  max-width: 860px;
}

.app-frame.embed-mode {
  max-width: 100%;
  border: none;
  min-height: auto;
}

/* ===================== HEADER ===================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #131317;
  border-bottom: 1px solid #2d2d34;
  padding: 10px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.header-user-block { min-width: 0; }

.header-username-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-username {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
}

.mini-role-tag {
  background: #2b1618;
  border: 1px solid var(--accent-red);
  color: #fca5a5;
  font-size: 9px;
  font-weight: 700;
  padding: 0 4px;
  border-radius: 2px;
}

.header-balance-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
}

.bal-val {
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.btn-text-refresh {
  background: transparent;
  border: none;
  color: #56a8ff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 0 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.hdr-btn {
  height: 28px;
  padding: 0 8px;
  border-radius: 3px;
  border: none;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.hdr-btn:hover { filter: brightness(1.08); }
.hdr-blue { background: var(--blue-btn); }
.hdr-dark { background: #25252b; border: 1px solid #3c3c44; color: #e4e4e7; }

.hdr-count {
  background: #c62828;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 800;
  padding: 0 4px;
  border-radius: 2px;
}

.app-main {
  flex: 1;
  width: 100%;
  min-width: 0;
}

.app-footer {
  padding: 9px 8px;
  text-align: center;
  font-size: 10px;
  color: #71717a;
  background: #121215;
  border-top: 1px solid #24242a;
}

.loading-box {
  padding: 40px 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: 11px;
}

/* ===================== SIMPLE SIDEBAR ===================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 90;
}

.side-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 245px;
  max-width: 82vw;
  background: #141418;
  border-left: 1px solid #35353e;
  z-index: 100;
  transform: translateX(105%);
  transition: transform 0.18s ease;
  display: flex;
  flex-direction: column;
}

.side-drawer.open { transform: translateX(0); }

.drawer-head {
  padding: 10px 12px;
  background: #1b1b21;
  border-bottom: 1px solid #2e2e36;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-u-name { font-weight: 700; font-size: 13px; color: #fff; text-transform: uppercase; }
.drawer-u-bal { font-size: 13px; font-weight: 700; color: #ffffff; margin-top: 3px; font-family: var(--font-sans); }

.drawer-close {
  padding: 4px 8px;
  border-radius: 3px;
  border: 1px solid #3f3f48;
  background: #27272d;
  color: #e4e4e7;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}

.drawer-nav {
  padding: 8px 10px 16px;
  overflow-y: auto;
  flex: 1;
}

.drawer-link {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px;
  border-bottom: 1px solid #23232a;
  color: #e4e4e7;
  text-decoration: none;
  font-size: 11.5px;
  font-weight: 600;
}

.drawer-link:hover { background: #1e1e25; color: #ffffff; }

.drawer-count {
  background: #c62828;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 2px;
}

.drawer-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #8c929c;
  margin: 12px 4px 6px;
}

.drawer-mkt-list { display: flex; flex-direction: column; gap: 4px; }

.drawer-mkt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 3px;
  background: #1a1a20;
  border: 1px solid #2b2b34;
  color: #e4e4e7;
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
}

.drawer-mkt-row:hover { border-color: var(--accent-red); color: #ffffff; }
.drawer-mkt-name-wrap { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.drawer-mkt-time { font-family: var(--font-sans); font-size: 10.5px; color: var(--green-txt); flex-shrink: 0; }

/* ===================== HOT BADGE (RED PILL + FLAME) ===================== */
.hot-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  flex-shrink: 0;
  padding-right: 9px;
}

.hot-pill {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(180deg, #dc1414 0%, #990707 100%);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.5px;
  line-height: 1;
  padding: 3px 10px 3px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.45);
}

.hot-flame {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-54%);
  width: 15px;
  height: 18px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
  pointer-events: none;
}

.hot-badge.hot-xs {
  padding-right: 7px;
}

.hot-badge.hot-xs .hot-pill {
  font-size: 8px;
  padding: 2px 7px 2px 5px;
  letter-spacing: 0.4px;
}

.hot-badge.hot-xs .hot-flame {
  width: 12px;
  height: 14px;
}

/* ===================== CLEAN CLASSIC LOBBY (UNIFIED DARK GREY + NON-RED MARKET CARDS) ===================== */
.lobby-wrap {
  padding: 10px 8px 16px;
  background: var(--bg-panel-grey);
  min-height: calc(100vh - 96px);
}

.lobby-wrap.embed-wrap {
  min-height: auto;
  padding: 8px;
}

.lobby-head-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.lobby-wallet-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  margin-bottom: 8px;
  border-radius: 5px;
  background: #141419;
  border: 1px solid #2d2f3a;
}

.lobby-wallet-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.lobby-wallet-lbl {
  font-size: 9.5px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.lobby-wallet-val {
  font-size: 13.5px;
  font-weight: 800;
  color: #ffffff;
  margin-top: 1px;
}

.lobby-wallet-btns {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-lobby-wd {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: 4px;
  border: 1px solid #10b981;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.btn-lobby-wd svg { width: 13px; height: 13px; }
.btn-lobby-wd:hover { filter: brightness(1.1); }

.btn-lobby-ret {
  display: inline-flex;
  align-items: center;
  padding: 7px 9px;
  border-radius: 4px;
  border: 1px solid #3f4250;
  background: #23252e;
  color: #e4e4e7;
  font-size: 10.5px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.lobby-license-strip {
  margin-bottom: 8px;
  padding: 5px 8px;
  border-radius: 4px;
  background: #141419;
  border: 1px solid #2c2e38;
  font-size: 10px;
  color: #cbd5e1;
  text-align: center;
  line-height: 1.4;
}

.lobby-license-strip a {
  color: #93c5fd;
  font-weight: 700;
  text-decoration: none;
}

.lobby-license-strip a:hover { text-decoration: underline; }

.lobby-cat-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 10px;
}

.lobby-cat-btn {
  padding: 6px 4px;
  border-radius: 4px;
  border: 1px solid #2e303b;
  background: #141419;
  color: #cbd5e1;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lobby-cat-btn:hover { border-color: #60a5fa; color: #ffffff; }
.lobby-cat-btn.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #60a5fa;
  color: #ffffff;
}

.lobby-cat-block {
  margin-bottom: 12px;
}

.lobby-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 9px;
  margin-bottom: 7px;
  border-radius: 4px;
  background: #141419;
  border: 1px solid #2c2e38;
  border-left: 3px solid #3b82f6;
}

.lobby-sec-head.sec-fast {
  border-left-color: #38bdf8;
  background: linear-gradient(90deg, #1a2232 0%, #141419 72%);
}

.lobby-sec-head.sec-regular {
  border-left-color: #6366f1;
  background: linear-gradient(90deg, #1b1d30 0%, #141419 72%);
}

.lobby-sec-title {
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.35px;
}

.lobby-sec-cnt {
  font-size: 10px;
  font-weight: 700;
  color: #9ca3af;
}

.lobby-head-title {
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.lobby-search {
  width: 155px;
  background: #101014;
  border: 1px solid #363640;
  border-radius: 3px;
  color: #ffffff;
  padding: 5px 8px;
  font-size: 11px;
  outline: none;
}

.lobby-search:focus { border-color: var(--blue-btn); }

.lobby-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.lobby-grid.embed-grid {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.mkt-card {
  border-radius: 5px;
  background: #111115;
  border: 1px solid #2b2d37;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
  transition: border-color 0.14s ease, transform 0.12s ease;
}

.mkt-card:hover {
  border-color: #3b82f6;
}

.mkt-card.is-closed {
  border-color: #272730;
}

.mkt-card.is-closed .mkt-card-top {
  background: #181920;
  border-bottom: 1px solid #282a34;
}

.mkt-card.is-closed .mkt-card-name {
  color: #a1a1aa;
}

.mkt-card.is-closed .mkt-card-mid {
  background: #070709;
}

.mkt-closed-tag {
  background: #2b1315;
  color: #f87171;
  border: 1px solid #5c1f24;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 2px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.bet-closed-state {
  text-align: center;
  padding: 28px 14px 24px;
  border-radius: 5px;
  background: #0b0b0e;
  border: 1px solid #351b1f;
}

.bet-closed-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1.4px;
  color: #ef4444;
  text-transform: uppercase;
}

.bet-closed-mkt {
  margin-top: 4px;
  font-size: 11.5px;
  font-weight: 700;
  color: #d4d4d8;
}

.bet-closed-balls {
  margin: 14px 0 12px;
  display: flex;
  justify-content: center;
}

.bet-closed-countdown {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 3px;
  background: #2b1315;
  border: 1px solid #6b2126;
  color: #fca5a5;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.bet-closed-desc {
  margin-top: 10px;
  font-size: 11px;
  color: #9ca3af;
  line-height: 1.45;
}

.drawer-mkt-time.closed {
  color: var(--red-txt);
  font-weight: 700;
}

.mkt-card-top {
  background: linear-gradient(180deg, #272a34 0%, #1d2028 100%);
  border-bottom: 1px solid #343846;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.mkt-card-name {
  color: #ffffff;
  font-weight: 800;
  font-size: 10.5px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.mkt-card-badges {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.mkt-card-type {
  background: #141418;
  color: #e4e4e7;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 2px;
  flex-shrink: 0;
}

.mkt-card-mid {
  padding: 12px 6px 11px;
  text-align: center;
  background: #0c0c0f;
}

.mkt-card-foot {
  padding: 5px 8px;
  background: #15151a;
  border-top: 1px solid #26262f;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  font-size: 10px;
}

.mkt-per { color: #9ca3af; font-weight: 600; }

.mkt-timer {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  color: var(--green-txt);
}

.mkt-timer.urgent,
.mkt-timer.closed { color: var(--red-txt); }

/* ===================== BETTING PAGE (ZERO YELLOW + RED LOTTERY BALLS) ===================== */
.game-top-panel {
  background: var(--bg-panel-grey);
  padding: 10px 8px 11px;
  color: #ffffff;
}

.game-mkt-heading-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.game-mkt-heading {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.game-status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.game-status-badge {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--green-txt);
}

.game-status-badge.closed { color: #fca5a5; }

.game-result-strip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #16161b;
  border: 1px solid #35353f;
  border-radius: 4px;
  padding: 3px 6px;
}

.game-res-lbl {
  font-size: 10px;
  color: #d4d4d8;
  font-weight: 700;
}

.game-sub-info {
  margin-top: 6px;
  margin-bottom: 8px;
  font-size: 10px;
  line-height: 1.4;
}

.game-sub-info .accent-sub {
  color: var(--cyan-soft);
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.game-license-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 8px;
  padding: 5px 7px;
  border-radius: 4px;
  background: rgba(14, 14, 18, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 10px;
  color: #e4e4e7;
}

.game-lic-text a {
  color: #93c5fd;
  font-weight: 700;
  text-decoration: none;
}

.game-lic-text a:hover { text-decoration: underline; }

.game-sched-inline {
  padding-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.25);
  color: #f4f4f5;
  white-space: nowrap;
}

.game-sched-inline strong {
  color: #36d374;
  font-weight: 800;
}

.game-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.g-menu-btn {
  background: var(--bg-btn-game);
  border: 1px solid #26262c;
  border-radius: 4px;
  color: #e4e4e7;
  padding: 6px 3px;
  font-size: 10.5px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.g-menu-btn:hover { background: #1d1d24; border-color: #71717a; }
.g-menu-btn.active {
  background: #8f1d1d;
  border-color: #ef4444;
  color: #ffffff;
  font-weight: 800;
}

.generator-bar {
  margin: 7px 0 6px;
  padding: 4px 0;
  text-align: center;
  font-size: 11.5px;
  font-weight: 800;
  color: #ffffff;
  border-top: 1px solid rgba(255, 255, 255, 0.32);
  border-bottom: 1px solid rgba(255, 255, 255, 0.32);
}

.bet-card-wrap {
  background: var(--bg-panel-grey);
  padding: 0 6px 10px;
}

.bet-dark-card {
  background: var(--bg-dark-card);
  border-radius: 6px;
  padding: 10px 8px 14px;
  color: #ffffff;
}

.bet-card-title {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}

.bet-meta-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  padding-bottom: 6px;
  border-bottom: 1px solid #27272e;
  font-size: 11px;
}

.baris-select-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #d4d4d8;
}

.baris-select {
  background: #ffffff;
  color: #111827;
  border: 1px solid #9ca3af;
  border-radius: 3px;
  padding: 2px 4px;
  font-size: 11px;
  font-weight: 700;
}

.total-bet-display {
  color: #ffffff;
  font-weight: 700;
  font-size: 12px;
  font-family: var(--font-sans);
}

.bet-color-box {
  border: 1px solid #737b84;
  border-radius: 2px;
  overflow: hidden;
  width: 100%;
}

.bet-color-box.theme-DISCOUNT { background: #3f6a7e; }
.bet-color-box.theme-FULL     { background: #2c3242; }
.bet-color-box.theme-BET_BB   { background: #2c5c2e; }

.bet-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

.bet-mode-tab {
  border: none;
  border-right: 1px solid rgba(255, 255, 255, 0.3);
  padding: 8px 4px;
  font-size: 11px;
  font-weight: 800;
  color: #cbd5e1;
  cursor: pointer;
  text-transform: uppercase;
  text-align: center;
}

.bet-mode-tab:last-child { border-right: none; }
.bet-mode-tab[data-bmode="DISCOUNT"] { background: #447287; }
.bet-mode-tab[data-bmode="FULL"]     { background: #31384a; }
.bet-mode-tab[data-bmode="BET_BB"]   { background: #2d6230; }

.bet-mode-tab.active {
  color: #ffffff;
  box-shadow: inset 0 -2px 0 #ffffff;
}

.bet-grid-subhead {
  display: grid;
  grid-template-columns: 1.45fr 4fr;
  padding: 4px 5px;
  font-size: 10.5px;
  font-weight: 800;
  color: #ffffff;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

.bet-autobet-title {
  text-align: center;
  padding: 3px 5px;
  font-size: 10.5px;
  font-weight: 800;
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

.bet-grid-row {
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr 1fr 1fr 22px;
  gap: 3px;
  padding: 3px 5px;
  align-items: center;
}

.bet-grid-row.cols-4d {
  grid-template-columns: 1.45fr 1fr 1fr 1fr 22px;
}

.bet-grid-row.autobet-row {
  padding-top: 5px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.bet-grid-row.data-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.bet-grid-row.data-row:last-child { border-bottom: none; }

.bb-head-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-size: 9.5px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}

.grid-inp {
  width: 100%;
  min-width: 0;
  height: 24px;
  padding: 0 3px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.35);
  background: #ffffff;
  color: #111827;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
  outline: none;
}

.grid-inp:focus { border-color: #1b87e5; }
.grid-inp::placeholder { color: #8c929c; font-weight: 600; font-size: 10px; }
.grid-inp:disabled { background: #d5d7dc; color: #6b7280; cursor: not-allowed; }
.grid-inp.num-inp { letter-spacing: 0.8px; font-size: 11.5px; color: #09090b; }

.grid-bb-cb {
  width: 14px;
  height: 14px;
  margin: 0 auto;
  display: block;
  cursor: pointer;
  accent-color: #c62828;
}

.compact-preview-strip {
  margin-top: 7px;
  padding: 5px 8px;
  border-radius: 3px;
  background: #17171d;
  border: 1px solid #35353f;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 10.5px;
  color: #d4d4d8;
}

.compact-preview-strip strong { color: #ffffff; }

.preview-link-btn {
  background: transparent;
  border: none;
  color: var(--blue-link);
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  white-space: nowrap;
}

.preview-table-wrap {
  margin-top: 6px;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid #2e2e36;
  border-radius: 3px;
  background: #0a0a0d;
}

.bet-action-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.btn-submit-red {
  min-width: 114px;
  padding: 7px 18px;
  border-radius: 4px;
  border: 1px solid #c94747;
  background: linear-gradient(180deg, #b83232 0%, #8e2121 100%);
  box-shadow: 0 2px 0 #5a1212;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
}
.btn-submit-red:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-hapus-grey {
  min-width: 114px;
  padding: 7px 18px;
  border-radius: 4px;
  border: 1px solid #9ca3af;
  background: linear-gradient(180deg, #88888d 0%, #646469 100%);
  box-shadow: 0 2px 0 #3f3f46;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
}

.hadiah-bar-wrap {
  padding: 8px 6px 10px;
  background: var(--bg-panel-grey);
}

.hadiah-toggle-btn {
  width: 100%;
  background: #f4f4f5;
  color: #111827;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  padding: 8px 10px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
}

.hadiah-body {
  margin-top: 6px;
  background: #101014;
  border: 1px solid #2e2e36;
  border-radius: 3px;
  padding: 8px;
}

.special-form-box {
  background: #16161b;
  border: 1px solid #303038;
  border-radius: 3px;
  padding: 9px;
}

.special-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.special-grid-5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.colok-cell { background: #0d0d10; border: 1px solid #2f2f37; border-radius: 3px; padding: 5px 4px; text-align: center; }
.colok-num { font-family: var(--font-sans); font-size: 14px; font-weight: 800; color: #ffffff; margin-bottom: 4px; }

/* ===================== CLEAN CLASSIC LEDGER TABLES (UNIFIED DARK GREY BG) ===================== */
.page-pad {
  padding: 10px 8px 16px;
  background: var(--bg-panel-grey);
  min-height: calc(100vh - 96px);
}

.ledger-panel {
  background: #0e0e11;
  border-top: 2px solid var(--accent-red);
  border-left: 1px solid #292930;
  border-right: 1px solid #292930;
  border-bottom: 1px solid #292930;
  padding: 10px 8px;
}

.panel-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #25252d;
}

.panel-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.table-x-safe { width: 100%; overflow-x: auto; }

.compact-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10.5px;
}

.compact-table th {
  color: #ffffff;
  font-weight: 700;
  padding: 7px 4px;
  border-bottom: 1px solid #d4d4d8;
  text-align: center;
  white-space: nowrap;
}

.compact-table td {
  padding: 8px 4px;
  border-bottom: 1px solid #202027;
  text-align: center;
  color: #e4e4e7;
  vertical-align: middle;
}

.compact-table tbody tr:hover td { background: #15151b; }

.compact-table tr.row-win td {
  background: #122619;
  color: #dcfce7;
  font-weight: 700;
}

.compact-table tr.grand-row td {
  background: #1a1a22;
  color: #ffffff;
  font-weight: 800;
  border-top: 1px solid var(--accent-red);
  padding: 8px 5px;
}

.tx-link { color: var(--blue-link); text-decoration: none; font-weight: 600; }
.tx-link:hover { text-decoration: underline; }

.txt-win { color: var(--green-txt); font-weight: 700; }
.txt-lose { color: var(--red-txt); font-weight: 700; }
.txt-pending { color: var(--cyan-soft); font-weight: 700; }
.txt-accent { color: #ffffff; font-weight: 700; }
.txt-muted { color: var(--text-muted); }

.detail-summary-bar {
  padding: 7px 9px;
  margin-bottom: 8px;
  background: #15151a;
  border: 1px solid #2d2d36;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
}

/* ===================== CLEAN CLASSIC ADMIN BACKOFFICE (ZERO YELLOW) ===================== */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}
@media (max-width: 560px) {
  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.st-box {
  background: #121216;
  border: 1px solid #2c2c35;
  padding: 8px 10px;
}
.st-lbl { font-size: 9.5px; color: #9ca3af; text-transform: uppercase; font-weight: 700; }
.st-val { font-size: 13px; font-weight: 700; color: #ffffff; font-family: var(--font-sans); margin-top: 3px; }

.admin-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 10px;
}
@media (max-width: 560px) {
  .admin-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.admin-tab {
  background: #141419;
  border: 1px solid #2f2f39;
  color: #a1a1aa;
  padding: 7px 4px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}
.admin-tab.active {
  background: #8f1d1d;
  border-color: #ef4444;
  color: #ffffff;
}

.admin-section {
  background: #121216;
  border: 1px solid #2b2b34;
  padding: 10px;
  margin-bottom: 10px;
}

.admin-section h3 {
  font-size: 11.5px;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  margin-bottom: 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid #26262f;
}

.admin-cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 600px) { .admin-cols-2 { grid-template-columns: 1fr; } }
.hms-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }

.info-strip {
  background: #17171d;
  border-left: 3px solid var(--accent-red);
  padding: 7px 9px;
  font-size: 10.5px;
  color: #d4d4d8;
  margin-bottom: 8px;
}

.code-pre {
  background: #0a0a0d;
  border: 1px solid #2c2c35;
  padding: 8px;
  font-family: var(--font-code);
  font-size: 10px;
  color: #d4d4d8;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ===================== FORM CONTROLS & FLAT BUTTONS ===================== */
.inp, .sel {
  width: 100%;
  min-width: 0;
  background: #0c0c10;
  border: 1px solid #35353f;
  border-radius: 3px;
  color: #ffffff;
  padding: 6px 8px;
  font-size: 11px;
  outline: none;
}
.inp:focus, .sel:focus { border-color: var(--blue-btn); }

.fld {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 600;
  color: #a1a1aa;
}

.stack-form { display: flex; flex-direction: column; gap: 8px; }

.btn-accent {
  background: #b91c1c;
  color: #ffffff;
  border: none;
  border-radius: 3px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-blue {
  background: var(--blue-btn);
  color: #ffffff;
  border: none;
  border-radius: 3px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.btn-ghost {
  background: #23232a;
  color: #e4e4e7;
  border: 1px solid #3a3a45;
  border-radius: 3px;
  padding: 5px 9px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.btn-green {
  background: #1f7a44;
  color: #ffffff;
  border: none;
  border-radius: 3px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.btn-danger {
  background: #7f1d1d;
  color: #fee2e2;
  border: 1px solid #991b1b;
  border-radius: 3px;
  padding: 5px 9px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}

/* ===================== MODALS & TOASTS ===================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.modal-box {
  width: 100%;
  background: #141419;
  border: 1px solid var(--accent-red);
  border-radius: 4px;
  overflow: hidden;
  max-height: 88vh;
}
.modal-xs { max-width: 340px; }
.result-popup-box { padding: 16px 14px; text-align: center; }

.toast-stack {
  position: fixed;
  bottom: 12px;
  right: 12px;
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-width: 290px;
}

.toast-item {
  background: #16161c;
  border: 1px solid #444450;
  border-left: 3px solid var(--blue-btn);
  padding: 8px 10px;
  color: #ffffff;
  font-size: 11px;
}
.toast-item.success { border-left-color: #22c55e; }
.toast-item.error   { border-left-color: #ef4444; }

/* ===================== FLOATING DRAGGABLE 3-BUTTON DOCK ===================== */
.floating-dock {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 6px;
  border-radius: 999px;
  background: rgba(16, 18, 28, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  user-select: none;
  touch-action: none;
  cursor: grab;
  max-width: calc(100vw - 16px);
}

.floating-dock.is-dragging {
  cursor: grabbing;
  border-color: rgba(168, 85, 247, 0.6);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.78);
}

.dock-grip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  padding: 0 2px 0 4px;
  flex-shrink: 0;
}

.dock-grip svg {
  width: 14px;
  height: 14px;
}

.dock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 13px;
  border-radius: 999px;
  text-decoration: none;
  color: #cbd5e1;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease, transform 0.12s ease;
}

.dock-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.dock-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.dock-btn.active {
  background: linear-gradient(135deg, #e11d48 0%, #7c3aed 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.35);
}

.dock-btn[data-bnav="history"].active {
  background: linear-gradient(135deg, #2563eb 0%, #0891b2 100%);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.dock-btn[data-bnav="leaderboard"].active {
  background: linear-gradient(135deg, #7c3aed 0%, #e11d48 100%);
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.38);
}

.has-bottom-nav {
  padding-bottom: 84px !important;
}

/* ===================== MODERN COLORFUL DAILY 500 LEADERBOARD (UNIFIED DARK GREY BG) ===================== */
.lb-shell {
  padding: 10px 8px 88px;
  background: var(--bg-panel-grey);
  min-height: calc(100vh - 70px);
}

.lb-hero {
  position: relative;
  border-radius: 12px;
  padding: 14px 12px 12px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #1e1b4b 0%, #4c1d95 52%, #9f1239 100%);
  border: 1px solid rgba(196, 181, 253, 0.25);
  overflow: hidden;
}

.lb-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.lb-hero-title-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
}

.lb-hero-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lb-hero-icon-box svg { width: 18px; height: 18px; }

.lb-hero-title {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.2px;
}

.lb-hero-sub {
  font-size: 10.5px;
  color: #e2e8f0;
  margin-top: 1px;
}

.lb-reset-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

.lb-reset-pill svg { width: 12px; height: 12px; color: #38bdf8; }

.lb-hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.lb-hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f1f5f9;
  font-size: 10px;
  font-weight: 600;
}

.lb-hero-chip svg { width: 11px; height: 11px; color: #a78bfa; }

/* Modern 3-Column Visual Podium (#2 Left, #1 Tall Center, #3 Right) */
.lb-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 6px;
  margin-bottom: 10px;
}

.pod-card {
  border-radius: 10px;
  padding: 10px 6px 9px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.pod-card.pod-1 {
  background: linear-gradient(180deg, rgba(225, 29, 72, 0.26) 0%, #161824 62%);
  border-color: rgba(244, 63, 94, 0.55);
  padding-top: 13px;
  padding-bottom: 11px;
}

.pod-card.pod-2 {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.24) 0%, #151824 62%);
  border-color: rgba(56, 189, 248, 0.45);
}

.pod-card.pod-3 {
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.26) 0%, #151824 62%);
  border-color: rgba(167, 139, 250, 0.45);
}

.pod-crown {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}

.pod-1 .pod-crown { background: linear-gradient(135deg, #e11d48, #be123c); }
.pod-2 .pod-crown { background: linear-gradient(135deg, #2563eb, #0891b2); }
.pod-3 .pod-crown { background: linear-gradient(135deg, #7c3aed, #6d28d9); }
.pod-crown svg { width: 11px; height: 11px; }

.pod-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 5px;
  border: 2px solid rgba(255, 255, 255, 0.25);
}

.pod-1 .pod-avatar { width: 42px; height: 42px; font-size: 14px; background: linear-gradient(135deg, #f43f5e, #881337); }
.pod-2 .pod-avatar { background: linear-gradient(135deg, #38bdf8, #1d4ed8); }
.pod-3 .pod-avatar { background: linear-gradient(135deg, #c084fc, #5b21b6); }

.pod-id {
  font-size: 11.5px;
  font-weight: 800;
  color: #ffffff;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pod-win-tag {
  margin-top: 3px;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.16);
  color: #7dd3fc;
}

.pod-amt {
  margin-top: 5px;
  font-size: 10.5px;
  font-weight: 800;
  color: #34d399;
  line-height: 1.25;
  word-break: break-word;
}

.pod-bet {
  margin-top: 2px;
  font-size: 9px;
  color: #94a3b8;
}

.pod-delta {
  margin-top: 4px;
  font-size: 9.5px;
  font-weight: 700;
}

/* Current User Standing Card */
.lb-my-modern {
  border-radius: 10px;
  padding: 10px 11px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.16) 0%, rgba(124, 58, 237, 0.14) 100%);
  border: 1px solid rgba(96, 165, 250, 0.35);
}

.lb-my-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.lb-my-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lb-my-rank-pill {
  padding: 3px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 800;
}

.lb-my-rank-pill.in-top {
  background: linear-gradient(135deg, #059669, #0d9488);
}

.lb-my-tier-txt {
  font-size: 10.5px;
  color: #bfdbfe;
  font-weight: 700;
}

.lb-my-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.lb-my-stat {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 7px;
  padding: 6px 7px;
}

.lb-my-stat-lbl {
  font-size: 9px;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 700;
}

.lb-my-stat-val {
  font-size: 10.5px;
  font-weight: 700;
  color: #ffffff;
  margin-top: 2px;
}

.lb-progress-wrap {
  margin-top: 8px;
}

.lb-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 9.5px;
  color: #cbd5e1;
  margin-bottom: 4px;
}

.lb-progress-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  overflow: hidden;
}

.lb-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8, #a855f7, #f43f5e);
}

/* Filter Chips & Search */
.lb-controls-card {
  background: #151722;
  border: 1px solid #262a3a;
  border-radius: 10px;
  padding: 8px;
  margin-bottom: 9px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.lb-chip-row {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.lb-chip-row::-webkit-scrollbar { display: none; }

.lb-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid #2e3347;
  background: #1b1e2c;
  color: #cbd5e1;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.14s ease;
}

.lb-chip svg { width: 12px; height: 12px; }
.lb-chip:hover { border-color: #64748b; color: #ffffff; }

.lb-chip.active[data-wf="ALL"] { background: linear-gradient(135deg, #2563eb, #7c3aed); border-color: transparent; color: #ffffff; }
.lb-chip.active[data-wf="5D"]  { background: linear-gradient(135deg, #e11d48, #be123c); border-color: transparent; color: #ffffff; }
.lb-chip.active[data-wf="4D"]  { background: linear-gradient(135deg, #2563eb, #0284c7); border-color: transparent; color: #ffffff; }
.lb-chip.active[data-wf="3D"]  { background: linear-gradient(135deg, #7c3aed, #9333ea); border-color: transparent; color: #ffffff; }
.lb-chip.active[data-wf="2D"]  { background: linear-gradient(135deg, #059669, #10b981); border-color: transparent; color: #ffffff; }

.lb-search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
}

.lb-search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.lb-search-box svg {
  position: absolute;
  left: 8px;
  width: 13px;
  height: 13px;
  color: #64748b;
  pointer-events: none;
}

.lb-search-inp {
  width: 100%;
  background: #0e1017;
  border: 1px solid #2b3042;
  border-radius: 7px;
  color: #ffffff;
  padding: 6px 8px 6px 26px;
  font-size: 11px;
  outline: none;
}

.lb-search-inp:focus { border-color: #38bdf8; }

.lb-range-sel {
  background: #0e1017;
  border: 1px solid #2b3042;
  border-radius: 7px;
  color: #e2e8f0;
  padding: 6px 8px;
  font-size: 10.5px;
  font-weight: 700;
  outline: none;
}

/* Modern Card-List Entries (Zero Cramped Tables!) */
.lb-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lb-item-card {
  background: #151722;
  border: 1px solid #242838;
  border-radius: 9px;
  padding: 8px 9px;
  cursor: pointer;
  transition: border-color 0.14s, background 0.14s;
}

.lb-item-card:hover {
  border-color: #3b425c;
  background: #191c2a;
}

.lb-item-card.is-top10 {
  border-left: 3px solid #e11d48;
  background: linear-gradient(90deg, rgba(225, 29, 72, 0.08) 0%, #151722 36%);
}

.lb-item-card.is-me {
  border-color: #10b981;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.14) 0%, #151722 50%);
}

.lb-item-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.lb-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.lb-rank-num {
  min-width: 34px;
  padding: 3px 5px;
  border-radius: 6px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  background: #1f2333;
  color: #cbd5e1;
  flex-shrink: 0;
}

.lb-rank-num.r-1 { background: linear-gradient(135deg, #e11d48, #be123c); color: #ffffff; }
.lb-rank-num.r-2 { background: linear-gradient(135deg, #2563eb, #0891b2); color: #ffffff; }
.lb-rank-num.r-3 { background: linear-gradient(135deg, #7c3aed, #6d28d9); color: #ffffff; }
.lb-rank-num.r-top10 { background: rgba(225, 29, 72, 0.22); color: #fda4af; border: 1px solid rgba(244, 63, 94, 0.35); }

.lb-mini-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  flex-shrink: 0;
}

.lb-user-meta { min-width: 0; }

.lb-user-line {
  display: flex;
  align-items: center;
  gap: 5px;
}

.lb-user-id {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-me-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 999px;
  background: #059669;
  color: #ffffff;
}

.lb-tags-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 3px;
}

.win-chip {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
}
.win-chip.w-5D { background: rgba(225, 29, 72, 0.22); color: #fda4af; }
.win-chip.w-4D { background: rgba(37, 99, 235, 0.22); color: #93c5fd; }
.win-chip.w-3D { background: rgba(124, 58, 237, 0.24); color: #d8b4fe; }
.win-chip.w-2D { background: rgba(16, 185, 129, 0.22); color: #6ee7b7; }

.delta-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 9.5px;
  font-weight: 700;
}
.delta-badge svg { width: 11px; height: 11px; }
.delta-up   { color: #34d399; }
.delta-down { color: #fb7185; }
.delta-new  { color: #38bdf8; }
.delta-same { color: #64748b; }

.lb-item-right {
  text-align: right;
  flex-shrink: 0;
}

.lb-win-amt {
  font-size: 11.5px;
  font-weight: 700;
  color: #34d399;
  white-space: nowrap;
}

.lb-bet-amt {
  font-size: 9.8px;
  color: #94a3b8;
  margin-top: 2px;
  white-space: nowrap;
}

.lb-item-expand {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid #262b3d;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  font-size: 10px;
  color: #cbd5e1;
}

.lb-exp-cell {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #10121a;
  padding: 5px 7px;
  border-radius: 6px;
}

.lb-exp-cell svg { width: 12px; height: 12px; color: #38bdf8; flex-shrink: 0; }

.lb-pager-modern {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.lb-pg-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #1b1e2c;
  border: 1px solid #2e344a;
  border-radius: 8px;
  color: #f1f5f9;
  padding: 6px 10px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}
.lb-pg-btn svg { width: 13px; height: 13px; }
.lb-pg-btn:hover:not(:disabled) { border-color: #38bdf8; background: #222638; }
.lb-pg-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ===================== 1-CLICK COPY API & MARKET DESIGN DOCS PAGE ===================== */
.docs-page {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.doc-hero {
  background: linear-gradient(135deg, #171924 0%, #1e2235 60%, #151722 100%);
  border: 1px solid #353b52;
  border-radius: 6px;
  padding: 14px 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.doc-hero-left {
  flex: 1 1 320px;
}

.doc-kicker {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #60a5fa;
  margin-bottom: 3px;
}

.doc-h1 {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.doc-sub {
  margin-top: 4px;
  font-size: 11px;
  color: #cbd5e1;
  line-height: 1.45;
}

.doc-hero-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
}

.btn-doc-copy-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: 5px;
  border: 1px solid #60a5fa;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-doc-copy-all svg { width: 15px; height: 15px; }
.btn-doc-copy-all:hover { filter: brightness(1.08); }

.doc-quick-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.doc-quick-links .btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 1;
  justify-content: center;
}

.doc-quick-links svg { width: 12px; height: 12px; }

.doc-card {
  background: #121318;
  border: 1px solid #2d303d;
  border-radius: 6px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.doc-sec-head {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding-bottom: 8px;
  border-bottom: 1px solid #262936;
}

.doc-num {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.doc-sec-head h2 {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
}

.doc-sec-head p {
  margin-top: 2px;
  font-size: 10.5px;
  color: #a1a1aa;
  line-height: 1.4;
}

.doc-block {
  border: 1px solid #282b36;
  border-radius: 4px;
  overflow: hidden;
  background: #0a0b0f;
}

.doc-block-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  background: #181a22;
  border-bottom: 1px solid #282b36;
  font-size: 10.5px;
  font-weight: 700;
  color: #e4e4e7;
}

.doc-block .code-pre {
  border: none;
  margin: 0;
  max-height: 270px;
}

.doc-block .code-pre.doc-pre-tall {
  max-height: 360px;
}

.btn-copy-sm {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 3px;
  border: 1px solid #3f465c;
  background: #222634;
  color: #93c5fd;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.btn-copy-sm svg { width: 11px; height: 11px; }
.btn-copy-sm:hover { background: #2d3347; color: #ffffff; }

.doc-preview-box {
  background: var(--bg-panel-grey);
  border: 1px solid #353844;
  border-radius: 5px;
  padding: 10px;
}

.doc-preview-lbl {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #e4e4e7;
  margin-bottom: 8px;
}

.doc-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 620px) {
  .doc-preview-grid { grid-template-columns: 1fr; }
}

.doc-flow-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

@media (max-width: 620px) {
  .doc-flow-steps { grid-template-columns: 1fr; }
}

.doc-step {
  background: #171922;
  border: 1px solid #2b2f3e;
  border-radius: 4px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.doc-step strong {
  font-size: 11px;
  color: #36d374;
}

.doc-step span {
  font-size: 10.5px;
  color: #cbd5e1;
  line-height: 1.4;
}
