:root{
  --bg0:#0b0b10;
  --bg1:#10101a;
  --card:#141422cc;
  --cardSolid:#141422;
  --muted:#a7a7bd;
  --text:#f4f4ff;
  --line:rgba(255,255,255,.10);
  --line2:rgba(255,255,255,.16);
  --shadow: 0 18px 60px rgba(0,0,0,.55);
  --shadow2: 0 8px 24px rgba(0,0,0,.40);
  --accent:#9b87ff;
  --accent2:#6d5efc;
  --danger:#ff4d6d;
  --success:#2ee59d;
  --warn:#ffd166;
  --info:#5aa6ff;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(155,135,255,.22), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(90,166,255,.18), transparent 55%),
    radial-gradient(800px 500px at 35% 110%, rgba(46,229,157,.10), transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  color:var(--text);
  font-size:16px;
}

/* Top bar */
.topbar{
  position: sticky; top:0; z-index:20;
  display:flex; align-items:center; justify-content:space-between;
  gap:14px;
  padding:14px 16px;
  background: rgba(10,10,16,.70);
  backdrop-filter: blur(14px);
  border-bottom:1px solid var(--line);
}
.brand{display:flex; align-items:center; gap:12px}
.logo{width:42px;height:42px;border-radius:14px; box-shadow: var(--shadow2)}
.title{font-weight:950; letter-spacing:.2px; font-size:18px; line-height:1.1}
.subtitle{color:var(--muted); font-size:12px; margin-top:3px}

/* Layout */
.container{max-width:none; margin:12px 0; padding:0 10px 90px}
.card{
  background: var(--card);
  border:1px solid var(--line);
  border-radius:20px;
  box-shadow: var(--shadow);
  padding:14px;
}
.card.mini{padding:14px; margin-top:12px}
.h2{font-size:18px; font-weight:950}
.h3{font-size:14px; font-weight:950; color:#e9e9ff}
.muted{color:var(--muted)}
.small{font-size:12px}
.mono{font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace}
hr{border:0; border-top:1px solid var(--line); margin:14px 0}

.row{display:flex; align-items:center}
.space{justify-content:space-between}
.wrap{flex-wrap:wrap}
.gap{gap:10px}

/* Stats */
.stats{display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end}
.stat{
  background: rgba(255,255,255,.04);
  border:1px solid var(--line);
  border-radius:16px;
  padding:10px 12px;
  min-width:110px;
  text-align:right;
}
.stat .k{color:var(--muted); font-size:12px}
.stat .v{font-size:20px; font-weight:950}

/* Buttons */
.btn{
  border:1px solid var(--line);
  background: rgba(255,255,255,.06);
  color: var(--text);
  padding:10px 12px;
  border-radius:14px;
  font-weight:900;
  cursor:pointer;
  transition: transform .05s ease, filter .15s ease, border-color .15s ease, background .15s ease;
}
.btn:hover{filter:brightness(1.08); border-color:var(--line2)}
.btn:active{transform: translateY(1px)}
.btn.primary{
  background: linear-gradient(180deg, rgba(155,135,255,1) 0%, rgba(109,94,252,1) 100%);
  color:#0a0a10;
  border-color: rgba(255,255,255,.10);
  box-shadow: 0 10px 24px rgba(109,94,252,.30);
}
.btn.ghost{background: transparent}
.btn:disabled{opacity:.55; cursor:not-allowed}

/* Pills & inputs */
.pill{
  display:flex; align-items:center; gap:8px;
  background: rgba(255,255,255,.04);
  border:1px solid var(--line);
  border-radius:999px;
  padding:8px 10px;
}
select, input{
  background: rgba(10,10,16,.75);
  color: var(--text);
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px 10px;
  outline:none;
}
select{padding:8px 10px}
input:focus, select:focus{border-color: rgba(155,135,255,.55); box-shadow: 0 0 0 3px rgba(155,135,255,.18)}
.field{display:flex; flex-direction:column; gap:6px; min-width:240px}
.field span{color:var(--muted); font-size:12px}

/* One-screen 7 seats layout */
.seat-grid{
  margin-top:14px;
  display:grid;
  grid-template-columns: repeat(7, 1fr); /* always 7 columns on desktop */
  gap:10px;
  width:100%;
}
@media (max-width: 1100px){
  /* keep all 7, but allow horizontal scroll instead of wrapping */
  .seat-grid{
    grid-template-columns: repeat(7, minmax(170px, 1fr));
    overflow-x:auto;
    padding-bottom:6px;
    -webkit-overflow-scrolling: touch;
  }
  .seat-grid::-webkit-scrollbar{height:10px}
}
@media (max-width: 680px){
  .seat-grid{
    grid-template-columns: repeat(7, minmax(180px, 1fr));
    overflow-x:auto;
    padding-bottom:8px;
  }
  .logo{width:38px;height:38px}
}
  .logo{width:38px;height:38px}
}

/* Seat card */
.seat{
  background: rgba(255,255,255,.035);
  border:1px solid var(--line);
  border-radius:18px;
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:10px;
  min-height: 560px;
}
.seat-head{display:flex; justify-content:space-between; align-items:center}
.seat-title{font-weight:950; font-size:15px; letter-spacing:.2px}
.badge{
  font-size:11px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  color: var(--muted);
  background: rgba(255,255,255,.03);
  cursor:pointer;
  font-weight:950;
}
.badge.active{
  color:#0a0a10;
  border-color:transparent;
  background: linear-gradient(180deg, rgba(46,229,157,1), rgba(16,185,129,1));
  box-shadow: 0 10px 22px rgba(46,229,157,.18);
}

.kv{display:flex; justify-content:space-between; align-items:center; gap:8px}
.kv .k{color:var(--muted); font-size:12px}
.kv .v{font-weight:950; font-size:20px}

/* Bet controls */
.bet-controls{
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap:8px;
}
.big{
  padding:12px 10px;
  border-radius:14px;
  font-size:14px;
}
.big.dark{background: rgba(255,255,255,.05);}
.big.outline{background: transparent;}

/* Chips */
.chips{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap:8px;
}
.chip{
  border:0;
  border-radius:999px;
  padding:12px 10px;
  cursor:pointer;
  font-weight:950;
  font-size:14px;
  box-shadow: 0 10px 18px rgba(0,0,0,.20);
}
.chip:hover{filter:brightness(1.06)}
/* Chip colors for table SOP */
.chip.c25{background:#16a34a; color:#ffffff}   /* 25 - Green */
.chip.c50{background:#2563eb; color:#ffffff}   /* 50 - Blue */
.chip.c100{background:#111111; color:#ffffff}  /* 100 - Black */
.chip.c500{background:#7c3aed; color:#ffffff}  /* 500 - Purple */
.chip.c1000{background:#facc15; color:#111111} /* 1000 - Yellow (dark text) */

/* Flags */
.flags{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:8px;
}
.flag{
  display:flex; align-items:center; justify-content:flex-start; gap:8px;
  padding:10px 10px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  cursor:pointer;
  font-size:12px;
  font-weight:950;
}
.flag.on{border-color: rgba(155,135,255,.45); background: rgba(155,135,255,.10)}
.flag input{accent-color: var(--accent); width:18px; height:18px}

/* Outcomes */
.outcomes{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:8px;
}
.outcome{
  padding:12px 8px;
  border-radius:16px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  cursor:pointer;
  font-weight:950;
  text-align:center;
  font-size:13px;
  letter-spacing:.6px;
}
.outcome.win{background: rgba(46,229,157,.10); border-color: rgba(46,229,157,.25)}
.outcome.lose{background: rgba(255,77,109,.10); border-color: rgba(255,77,109,.25)}
.outcome.push{background: rgba(255,209,102,.10); border-color: rgba(255,209,102,.25)}
.outcome.bj{background: rgba(155,135,255,.12); border-color: rgba(155,135,255,.30)}
.outcome.sel{
  background: rgba(255,255,255,.08);
  outline: 3px solid rgba(155,135,255,.30);
}

.footer-actions{margin-top:12px}

/* Modals */
.dlg::backdrop{background: rgba(0,0,0,.60)}
.dlg{
  border:1px solid var(--line);
  border-radius:20px;
  padding:0;
  background: transparent;
  max-width: 980px;
  width: calc(100% - 24px);
}
.dlg-inner{
  background: rgba(20,20,34,.92);
  border:1px solid var(--line);
  border-radius:20px;
  box-shadow: var(--shadow);
  padding:14px;
}
.list{display:flex; flex-direction:column; gap:10px; margin-top:10px}
.item{
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  border-radius:18px;
  padding:12px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}
.item .meta{color:var(--muted); font-size:12px; margin-top:2px}

/* Toast */
.toast{
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 14px;
  background: rgba(10,10,16,.92);
  border:1px solid var(--line);
  color: var(--text);
  padding:10px 12px;
  border-radius:999px;
  box-shadow: var(--shadow2);
  opacity:0;
  pointer-events:none;
  transition: opacity .2s ease;
  max-width: calc(100% - 24px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight:900;
}
.toast.show{opacity:1}
