:root {
  --ink: #16181d;
  --muted: #575b63;
  --line: #e8e5df;
  --paper: #fbfaf8;
  --indigo: #4f46e5;
  --indigo-soft: #dcdafe;
  --yellow: #f6d21a;
  --red: #e5484d;
  --red-soft: #fde4e4;
  --night: #0b0e15;
  --night-card: #171b24;
  --night-muted: #a4a8b3;
  --head: "Space Grotesk", Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
button, input { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }

.top {
  background: var(--indigo);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 24px;
}
.top .eyebrow { color: var(--indigo-soft); }
.title { font-family: var(--head); font-weight: 700; font-size: 26px; line-height: 1.1; }
.dot { color: var(--yellow); }
.payout { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.payout label { color: var(--indigo-soft); font-size: 14px; }
.payout input { width: 140px; accent-color: var(--yellow); }
.rate-out { font-family: var(--head); font-weight: 700; font-size: 20px; min-width: 48px; }
.rate-note { font-size: 12px; color: var(--indigo-soft); min-width: 120px; }

.layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px 40px;
}

.games { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.games input {
  height: 40px;
  padding: 0 12px;
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  background: #fff;
}
.games ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: calc(100vh - 190px); overflow-y: auto; }
.game {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 6px;
  border: 1.5px solid transparent;
  border-radius: 12px;
  background: none;
  text-align: left;
  cursor: pointer;
}
.game:hover { background: #efedff; }
.game.on { border-color: var(--ink); background: var(--indigo-soft); }
.thumb {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--indigo) center 30% / cover no-repeat;
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--head);
  font-weight: 700;
}
.game-name { font-size: 14px; font-weight: 500; line-height: 1.25; }

.play { min-width: 0; }
.play-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.play-head h1 { font-family: var(--head); font-size: 28px; margin: 0; }
.actions { display: flex; gap: 10px; }
.btn {
  padding: 9px 16px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: #fff;
  box-shadow: 3px 3px 0 var(--ink);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-yellow { background: var(--yellow); }

.stage { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 24px; align-items: start; }
.seat-line { font-size: 14px; margin-bottom: 8px; min-height: 21px; }
.phone {
  position: relative;
  background: var(--night);
  border-radius: 36px;
  padding: 10px;
  aspect-ratio: 9 / 17;
  max-height: calc(100vh - 230px);
  min-height: 480px;
}
.phone iframe {
  position: relative;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 26px;
  background: transparent;
  display: block;
}
/* These games are overlays for a live room: the top of the screen is the
   host's video. Mark that space instead of leaving it blank. */
.phone::before {
  content: "LIVE · the host's video plays here";
  position: absolute;
  inset: 10px;
  border-radius: 26px;
  padding-top: 22%;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--night-muted);
  background: radial-gradient(120% 60% at 50% 20%, #2a3040 0%, var(--night-card) 70%);
}
.phone-empty {
  position: absolute;
  inset: 10px;
  border-radius: 26px;
  background: var(--night-card);
  color: var(--night-muted);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
}
.phone-empty[hidden] { display: none; }

.bots { display: flex; flex-direction: column; gap: 12px; }
#botCards { display: flex; flex-direction: column; gap: 12px; }
.bot {
  background: #fff;
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  box-shadow: 3px 3px 0 var(--ink);
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
}
.bot-name { font-family: var(--head); font-weight: 700; font-size: 16px; }
.bot-coins { font-size: 13px; color: var(--muted); text-align: right; }
.bot-bet { font-size: 13px; color: var(--muted); grid-column: 1 / -1; }
.tag {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 8px;
  background: #efedeb;
  color: var(--muted);
}
.tag.got { background: var(--yellow); color: var(--ink); }
.tag.diff { background: var(--red-soft); color: var(--red); }
.bot-note { font-size: 14px; color: var(--muted); margin: 0; }

.banner {
  margin-top: 18px;
  padding: 14px 18px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: #fff;
  font-size: 16px;
}
.banner.same { background: var(--yellow); }
.banner.diff { background: var(--red-soft); border-color: var(--red); color: var(--red); }
.banner b { font-weight: 600; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; padding: 16px; }
  .games ul { flex-direction: row; overflow-x: auto; max-height: none; padding-bottom: 6px; }
  .game { flex-direction: column; width: 88px; flex: none; text-align: center; }
  .game-name { font-size: 12px; }
  .stage { grid-template-columns: 1fr; }
  .phone { max-height: none; min-height: 0; }
  .top { padding: 12px 16px; }
}
