/* =============================================================
   SEA KING PLAY — theme Minecraft pixel (đè lên style.css)
   ============================================================= */

:root {
  --bg: #060e1a;
  --bg-2: #0a1421;
  --panel: #0b1523;
  --panel-2: #101d2e;
  --card-bg: #0a1220;
  --line: rgba(120, 160, 200, 0.14);
  --line-strong: rgba(140, 190, 240, 0.3);
  --text: #e8eef7;
  --muted: #8595ab;
  --gold: #ffcf5c;
  --gold-2: #f0a93b;
  --green: #3ddc84;
  --green-2: #1fa765;
  --red: #ff5f7e;
  --blue: #5cc8ff;
  --purple: #a06bff;
  --radius: 10px;
  --pix: "Silkscreen", "Courier New", monospace;
  --shadow-pix: 0 3px 0 #03080f;
}

body {
  background:
    radial-gradient(900px 420px at 12% -6%, rgba(61, 220, 132, 0.1), transparent 62%),
    radial-gradient(820px 480px at 94% 4%, rgba(160, 107, 255, 0.09), transparent 62%),
    linear-gradient(180deg, #060e1a, #050b14 60%, #04090f);
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("assets/tex/dirt.png");
  background-size: 96px;
  image-rendering: pixelated;
  opacity: 0.05;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("assets/tex/deepslate.png");
  background-size: 128px;
  image-rendering: pixelated;
  opacity: 0.025;
  mix-blend-mode: screen;
}

/* ── Đăng nhập ─────────────────────────────────────────────── */

.login {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.login-sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(6, 14, 26, 0.55), rgba(6, 14, 26, 0.9) 70%, #060e1a),
    url("assets/hero.png") center / cover no-repeat;
  image-rendering: pixelated;
}

.login-card {
  max-width: 430px;
  border-radius: 12px;
  border: 2px solid #1b2a3c;
  background: linear-gradient(180deg, rgba(13, 23, 37, 0.96), rgba(8, 16, 27, 0.98));
  box-shadow: 0 0 0 4px rgba(3, 8, 15, 0.6), 0 30px 90px rgba(0, 0, 0, 0.7);
  padding: 28px 26px 22px;
}

.login-crown {
  width: 64px;
  height: 64px;
  margin: 0 auto 8px;
  image-rendering: pixelated;
  filter: drop-shadow(0 8px 20px rgba(255, 207, 92, 0.35));
  animation: bob 3s ease-in-out infinite;
}

.login-kicker {
  text-align: center;
  font-family: var(--pix);
  font-size: 9px;
  letter-spacing: 2.5px;
  color: var(--green);
  margin-bottom: 8px;
}

.login-card h1 {
  font-family: var(--pix);
  font-size: 22px;
  letter-spacing: 1px;
  color: #fff;
}

.login-card h1 span { color: var(--green); }

.login-sub { color: var(--muted); font-size: 12.5px; }

.login-card label {
  font-family: var(--pix);
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--muted);
}

#code {
  border: 2px solid #1e3045;
  border-radius: 8px;
  background: #050b13;
  font-family: var(--pix);
  font-size: 20px;
  letter-spacing: 6px;
  color: var(--green);
  box-shadow: inset 0 3px 0 rgba(0, 0, 0, 0.35);
}

#code:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(61, 220, 132, 0.15); }

#login-btn {
  border-radius: 8px;
  border: 2px solid #091a10;
  background: linear-gradient(180deg, #4bea92, #22b96c);
  color: #04160c;
  font-family: var(--pix);
  font-size: 12px;
  letter-spacing: 1.5px;
  box-shadow: 0 4px 0 #0a3a22;
}

.login-help code { color: var(--green); background: rgba(61, 220, 132, 0.08); border-color: rgba(61, 220, 132, 0.25); }

/* ── Topbar ────────────────────────────────────────────────── */

.topbar {
  padding: 0 clamp(10px, 3vw, 26px);
  height: 62px;
  gap: 14px;
  background: rgba(5, 11, 20, 0.94);
  border-bottom: 2px solid #101f30;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
}

.brand { gap: 9px; padding: 0; border-radius: 0; }

.brand-crown {
  width: 34px;
  height: 34px;
  image-rendering: pixelated;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.5));
}

.brand-text {
  font-family: var(--pix);
  font-size: 13px;
  letter-spacing: 1px;
  color: #fff;
}

.brand-text small { color: var(--green); letter-spacing: 2px; font-size: 9px; }

.tb-nav { display: flex; align-items: center; gap: 4px; margin-left: 6px; }

.tb-link {
  font-family: var(--pix);
  font-size: 9.5px;
  letter-spacing: 1.2px;
  color: var(--muted);
  padding: 8px 11px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.tb-link:hover { color: #cfe0f2; background: rgba(255, 255, 255, 0.04); }

.tb-link.active {
  color: var(--green);
  border-color: rgba(61, 220, 132, 0.28);
  background: rgba(61, 220, 132, 0.08);
}

.top-actions { gap: 7px; }

.tb-vip { padding: 0; }

.tb-vip-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 207, 92, 0.4);
  background: linear-gradient(180deg, rgba(255, 207, 92, 0.16), rgba(255, 207, 92, 0.06));
  color: var(--gold);
  font-family: var(--pix);
  font-size: 9px;
  letter-spacing: 1px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.4);
}

.tb-vip-badge::before { content: "👑"; font-size: 12px; filter: saturate(0.9); }

.wallet {
  gap: 9px;
  padding: 5px 12px 5px 8px;
  border-radius: 8px;
  border: 2px solid #1c2c40;
  background: #081120;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.35);
  transition: border-color 0.3s, background 0.3s;
}

.wallet-coin {
  width: 30px;
  height: 30px;
  image-rendering: pixelated;
  mix-blend-mode: screen;
}

.wallet-body { display: flex; flex-direction: column; line-height: 1.1; }

.wallet-label { font-size: 8px; letter-spacing: 1.4px; color: var(--muted); }

.wallet strong {
  font-family: var(--pix);
  font-size: 15px;
  color: var(--gold);
  letter-spacing: 0.5px;
}

.wallet-unit { font-size: 9px; color: rgba(255, 207, 92, 0.65); font-weight: 800; letter-spacing: 1px; }

.wallet.up { border-color: rgba(61, 220, 132, 0.75); background: #0a1c16; }
.wallet.down { border-color: rgba(255, 95, 126, 0.65); background: #1a0b12; }

.btn-pix {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 7px;
  border: 2px solid #0b1a12;
  font-family: var(--pix);
  font-size: 10px;
  letter-spacing: 1px;
  box-shadow: 0 3px 0 #030a07;
  transition: transform 0.12s, filter 0.15s;
  white-space: nowrap;
}

.btn-pix:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn-pix:active { transform: translateY(2px); box-shadow: 0 1px 0 #030a07; }

.btn-pix.green { background: linear-gradient(180deg, #4bea92, #22b96c); color: #04160c; }
.btn-pix.purple { background: linear-gradient(180deg, #b98cff, #7d45e0); color: #12071f; border-color: #1a0d2b; box-shadow: 0 3px 0 #150a24; }
.btn-pix.gold { background: linear-gradient(180deg, #ffe08a, #f0a93b); color: #24160a; border-color: #2a1a08; box-shadow: 0 3px 0 #2a1a08; }
.btn-pix.ghost {
  background: #0d1929;
  color: #b9cade;
  border-color: #1d2d42;
  box-shadow: 0 3px 0 #03080f;
}
.btn-pix.big { padding: 13px 20px; font-size: 12px; }

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 7px;
  border: 2px solid #172739;
  background: #0b1524;
  box-shadow: 0 3px 0 #03080f;
  font-size: 14px;
}

.icon-btn:hover { background: #132135; border-color: #263c56; transform: translateY(-1px); }

/* ── Khung ─────────────────────────────────────────────────── */

main.shell {
  max-width: 1280px;
  padding: clamp(14px, 2.6vw, 26px) clamp(10px, 3vw, 24px) 46px;
}

/* ── Hero ──────────────────────────────────────────────────── */

.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  border: 2px solid #152537;
  background: #050b13;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  min-height: 292px;
  margin-bottom: 22px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 70%;
  image-rendering: pixelated;
}

.hero-fade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 11, 19, 0.96) 0%, rgba(5, 11, 19, 0.82) 38%, rgba(5, 11, 19, 0.2) 72%, rgba(5, 11, 19, 0.55) 100%),
    linear-gradient(0deg, rgba(5, 11, 19, 0.9), transparent 42%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding: clamp(22px, 3vw, 34px);
  max-width: 620px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--pix);
  font-size: 9px;
  letter-spacing: 1.6px;
  color: var(--green);
  background: rgba(61, 220, 132, 0.08);
  border: 1px solid rgba(61, 220, 132, 0.28);
  border-radius: 5px;
  padding: 5px 9px;
  margin-bottom: 14px;
}

.hero-inner h1 {
  margin: 0 0 10px;
  font-family: var(--pix);
  font-size: clamp(20px, 3.4vw, 32px);
  line-height: 1.35;
  letter-spacing: 0.5px;
  color: #fff;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.5);
}

.hero-inner h1 span { color: var(--green); }

.hero-inner p {
  margin: 0 0 16px;
  color: #a9b9cc;
  font-size: 13px;
  line-height: 1.6;
  max-width: 470px;
}

.hero-actions { display: flex; gap: 9px; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.hero-stat {
  min-width: 92px;
  padding: 7px 10px;
  border-radius: 7px;
  border: 1px solid rgba(140, 190, 240, 0.16);
  background: rgba(6, 14, 24, 0.62);
  backdrop-filter: blur(4px);
}

.hero-stat span {
  display: block;
  font-family: var(--pix);
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 0.5px;
}

.hero-stat small { font-size: 9px; color: var(--muted); letter-spacing: 0.6px; }

.hero-user {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  gap: 9px;
  padding: 5px 12px 5px 5px;
  border-radius: 999px;
  border: 1px solid rgba(140, 190, 240, 0.2);
  background: rgba(6, 14, 24, 0.72);
  backdrop-filter: blur(8px);
}

.hero-user img, .avatar-fallback { width: 32px; height: 32px; }
.hero-user strong { font-size: 12px; max-width: 150px; }
.hero-user span { font-size: 10px; }

/* ── Bố cục sảnh ───────────────────────────────────────────── */

.lobby-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 356px;
  gap: 18px;
  align-items: start;
}

.lobby-main { min-width: 0; }

.sec-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 12px;
}

.sec-head h2 {
  margin: 0;
  font-family: var(--pix);
  font-size: 12px;
  letter-spacing: 1.4px;
  color: #fff;
}

.sec-line { flex: 1; height: 1px; background: linear-gradient(90deg, #1b2c40, transparent); }

.sec-note { font-size: 9px; letter-spacing: 1.2px; color: var(--muted); font-weight: 700; }

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--pix);
  font-size: 8px;
  color: #04160c;
  background: var(--green);
  border-radius: 4px;
  padding: 3px 6px;
  animation: livePulse 2s infinite;
}

.live-dot::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #04160c; }

.live-empty, .chat-empty, .empty-state {
  padding: 22px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

/* ── Lưới game ─────────────────────────────────────────────── */

.grid {
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 12px;
  margin-bottom: 26px;
}

.game-card {
  counter-reset: line;
  gap: 0;
  padding: 0;
  min-height: 0;
  border-radius: 10px;
  border: 1px solid #16273a;
  background:
    linear-gradient(180deg, rgba(16, 29, 46, 0.55), rgba(8, 16, 27, 0.9)),
    url("assets/tex/stone.png");
  background-size: auto, 64px;
  box-shadow: 0 3px 0 #03080f, inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.16s, border-color 0.16s, box-shadow 0.2s;
}

.game-card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 118px;
  background: radial-gradient(120px 90px at 50% 55%, var(--accent, #3ddc84), transparent 72%);
  opacity: 0.12;
  transition: opacity 0.25s;
  z-index: 0;
}

.game-card:hover {
  transform: translateY(-3px);
  border-color: rgba(61, 220, 132, 0.55);
  box-shadow: 0 0 0 1px rgba(61, 220, 132, 0.18), 0 14px 30px rgba(0, 0, 0, 0.5), 0 3px 0 #03080f;
}

.game-card:hover::after { opacity: 0.24; }

.game-thumb {
  position: relative;
  z-index: 1;
  height: 112px;
  display: grid;
  place-items: center;
  background: #060e1a;
  border-bottom: 1px solid #14283c;
  overflow: hidden;
}

.game-thumb img {
  width: 88px;
  height: 88px;
  image-rendering: pixelated;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.6));
  transition: transform 0.22s;
}

.game-card:hover .game-thumb img { transform: scale(1.08) translateY(-2px); }

.game-ribbon {
  position: absolute;
  top: 7px;
  left: 7px;
  z-index: 2;
  padding: 3px 7px;
  border-radius: 4px;
  font-family: var(--pix);
  font-size: 7.5px;
  letter-spacing: 0.8px;
  color: #04160c;
  background: var(--green);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
}

.game-ribbon.live { background: var(--red); color: #1b0409; }
.game-ribbon.hot { background: var(--gold); color: #1a1205; }

.game-body-inner { position: relative; z-index: 1; padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 5px; flex: 1; }

.game-card h3 {
  margin: 0;
  font-family: var(--pix);
  font-size: 10.5px;
  letter-spacing: 0.6px;
  color: #f2f7fd;
  line-height: 1.4;
}

.game-card p {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-meta { margin-top: 3px; }

.mini-tag {
  padding: 2px 6px;
  border-radius: 3px;
  font-family: var(--pix);
  font-size: 7px;
  letter-spacing: 0.8px;
  color: #8fa3bb;
  border: 1px solid #1b2c40;
  background: #081220;
}

.mini-tag.live {
  color: #04160c;
  background: #2bd47c;
  border-color: transparent;
}

.mini-tag.live::before { width: 4px; height: 4px; background: #04160c; }

/* ── Live bets ─────────────────────────────────────────────── */

.live-bets {
  border: 1px solid #16273a;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(12, 23, 38, 0.9), rgba(6, 13, 23, 0.92));
  box-shadow: 0 3px 0 #03080f;
  overflow: hidden;
  margin-bottom: 8px;
}

.live-head,
.live-row {
  display: grid;
  grid-template-columns: 1.1fr 1.5fr 0.8fr 0.6fr;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
}

.live-head {
  font-family: var(--pix);
  font-size: 8px;
  letter-spacing: 1.2px;
  color: #65788f;
  border-bottom: 1px solid #142434;
  background: #081323;
}

.live-row {
  font-size: 12px;
  border-bottom: 1px solid rgba(20, 36, 52, 0.7);
  animation: rowIn 0.3s ease both;
}

.live-row:last-child { border-bottom: 0; }
.live-row:hover { background: rgba(61, 220, 132, 0.04); }

.live-game { display: flex; align-items: center; gap: 7px; color: #cfdcec; font-weight: 700; font-size: 11.5px; }
.live-game img { width: 20px; height: 20px; image-rendering: pixelated; }

.live-player { display: flex; align-items: center; gap: 7px; min-width: 0; }
.live-player img { width: 22px; height: 22px; border-radius: 50%; border: 1px solid #22374d; }
.live-player span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #c6d5e6; }

.live-bet { color: var(--gold); font-weight: 800; font-variant-numeric: tabular-nums; font-size: 11.5px; }

.live-mult {
  justify-self: end;
  font-family: var(--pix);
  font-size: 9.5px;
  padding: 3px 6px;
  border-radius: 4px;
}

.live-mult.win { color: #04160c; background: #3ddc84; }
.live-mult.lose { color: #ffc4cf; background: rgba(255, 95, 126, 0.14); border: 1px solid rgba(255, 95, 126, 0.3); }

/* ── VIP ───────────────────────────────────────────────────── */

.lobby-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 76px; }

.vip-card {
  position: relative;
  overflow: hidden;
  border-radius: 11px;
  border: 2px solid #2a2110;
  background: #0d0b10;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 3px 0 #03080f;
}

.vip-gif {
  display: block;
  width: 100%;
  height: 104px;
  object-fit: cover;
  object-position: center 60%;
  image-rendering: pixelated;
  border-bottom: 1px solid rgba(255, 207, 92, 0.2);
}

.vip-body { padding: 11px 13px 12px; }

.vip-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }

.vip-badge {
  font-family: var(--pix);
  font-size: 9px;
  letter-spacing: 0.8px;
  padding: 4px 7px;
  border-radius: 4px;
  color: #0a0710;
  background: var(--gold);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.4);
}

.vip-name { font-family: var(--pix); font-size: 10px; letter-spacing: 0.8px; color: #e8d7b0; }

.vip-bar {
  height: 9px;
  border-radius: 4px;
  background: #1a1622;
  border: 1px solid #2b2438;
  overflow: hidden;
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.4);
}

.vip-bar i {
  display: block;
  height: 100%;
  width: 0;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.22) 0 6px, transparent 6px 12px),
    linear-gradient(90deg, #22b96c, #4bea92);
  background-size: 24px 100%, auto;
  transition: width 0.6s ease;
  animation: barStripes 1.4s linear infinite;
}

.vip-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
  font-size: 9.5px;
  color: var(--muted);
}

.vip-meta b { color: #d9e6f4; }

.vip-breakdown {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #1b1723;
  font-size: 9.5px;
  color: #8f9cae;
}

.vip-breakdown b { color: var(--gold); font-variant-numeric: tabular-nums; }

/* ── Chat ──────────────────────────────────────────────────── */

.chat-panel {
  display: flex;
  flex-direction: column;
  height: 512px;
  border-radius: 11px;
  border: 1px solid #16273a;
  background: linear-gradient(180deg, #0b1726, #070f1b);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 3px 0 #03080f;
  overflow: hidden;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border-bottom: 1px solid #132335;
  background: #0a1626;
}

.chat-ico { width: 26px; height: 26px; image-rendering: pixelated; }

.chat-title { flex: 1; min-width: 0; }

.chat-title strong {
  display: block;
  font-family: var(--pix);
  font-size: 9px;
  letter-spacing: 1px;
  color: #dbe9f8;
}

.chat-title span { display: inline-flex; align-items: center; gap: 5px; font-size: 9px; color: var(--muted); }

.chat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(61, 220, 132, 0.8);
  animation: livePulse 2s infinite;
}

.chat-collapse {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  border: 1px solid #1b2c40;
  background: #0d1a2b;
  color: #9fb0c4;
  font-weight: 800;
  line-height: 1;
}

.chat-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 8px 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  scrollbar-width: thin;
  scrollbar-color: #1e3147 transparent;
}

.chat-list::-webkit-scrollbar { width: 7px; }
.chat-list::-webkit-scrollbar-thumb { background: #1e3147; border-radius: 4px; }

.chat-msg {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px;
  padding: 6px 6px;
  border-radius: 6px;
  animation: msgIn 0.25s ease both;
}

.chat-msg:hover { background: rgba(255, 255, 255, 0.035); }

.chat-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #243a52;
  background: #0c1725;
}

.chat-main { min-width: 0; }

.chat-line {
  display: flex;
  align-items: baseline;
  gap: 5px;
  flex-wrap: wrap;
  line-height: 1.3;
}

.chat-name {
  font-size: 12px;
  font-weight: 800;
  max-width: 128px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-vip {
  font-family: var(--pix);
  font-size: 7px;
  padding: 2px 4px;
  border-radius: 3px;
  color: #0a0710;
  letter-spacing: 0.4px;
}

.chat-time { margin-left: auto; font-size: 9px; color: #5d7087; font-variant-numeric: tabular-nums; }

.chat-text {
  margin: 2px 0 0;
  font-size: 12.3px;
  line-height: 1.45;
  color: #cddaea;
  word-break: break-word;
  white-space: pre-wrap;
}

.chat-form {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border-top: 1px solid #132335;
  background: #081323;
}

.chat-form input {
  flex: 1;
  min-width: 0;
  padding: 9px 10px;
  border-radius: 6px;
  border: 1px solid #1a2c41;
  background: #050d17;
  color: #dce8f5;
  font-size: 12px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.chat-form input:focus { border-color: rgba(61, 220, 132, 0.55); box-shadow: 0 0 0 2px rgba(61, 220, 132, 0.12); }

.chat-count { font-size: 8px; color: #5d7087; font-variant-numeric: tabular-nums; }

.chat-form button {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  border: 2px solid #1a0d2b;
  background: linear-gradient(180deg, #b98cff, #7d45e0);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 3px 0 #150a24;
  transition: transform 0.12s, filter 0.15s;
}

.chat-form button:hover { filter: brightness(1.1); transform: translateY(-1px); }
.chat-form button:active { transform: translateY(2px); box-shadow: 0 1px 0 #150a24; }
.chat-form button:disabled { opacity: 0.5; transform: none; }

.chat-panel.collapsed { height: auto; }
.chat-panel.collapsed .chat-list,
.chat-panel.collapsed .chat-form { display: none; }

/* ── Modal ─────────────────────────────────────────────────── */

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(3, 7, 12, 0.78);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.18s ease;
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 22px 20px 20px;
  border-radius: 11px;
  border: 2px solid #1d3147;
  background: linear-gradient(180deg, #0d1a2b, #081220);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 4px 0 #03080f;
}

.modal-card h3 {
  margin: 0 0 12px;
  font-family: var(--pix);
  font-size: 12px;
  letter-spacing: 1px;
  color: #fff;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 5px;
  border: 1px solid #1d3147;
  background: #0b1725;
  color: #9fb0c4;
}

.modal-body { font-size: 12.5px; line-height: 1.65; color: #b6c6d8; }
.modal-body b { color: #eaf2fb; }
.modal-body code {
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(61, 220, 132, 0.1);
  border: 1px solid rgba(61, 220, 132, 0.25);
  color: var(--green);
  font-family: var(--pix);
  font-size: 10px;
}

.modal-body ol { margin: 8px 0 0; padding-left: 18px; }
.modal-body li { margin: 5px 0; }

/* ── Nạp / Rút ─────────────────────────────────────────────── */

.wf { display: flex; flex-direction: column; gap: 9px; margin-top: 12px; }

.wf label {
  font-family: var(--pix);
  font-size: 9.5px;
  letter-spacing: 0.8px;
  color: #8fa4bb;
  text-transform: uppercase;
}

.wf input {
  width: 100%;
  padding: 11px 13px;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid #1d3147;
  border-radius: 9px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.wf input::placeholder { color: #5b6d82; font-weight: 500; }

.wf input:focus {
  border-color: rgba(61, 220, 132, 0.5);
  box-shadow: 0 0 0 3px rgba(61, 220, 132, 0.1);
}

.wf .wf-chips { display: flex; gap: 6px; flex-wrap: wrap; }

.wf .wf-chips .chip { flex: 1; text-align: center; padding: 7px 4px; }

.wf-btn {
  width: 100%;
  padding: 12px 14px;
  border-radius: 9px;
  border: 2px solid #0a1a12;
  background: linear-gradient(180deg, #3ddc84, #1fa860);
  color: #04140b;
  font-family: var(--pix);
  font-size: 11px;
  letter-spacing: 0.6px;
  box-shadow: 0 3px 0 #0b4d2c;
  cursor: pointer;
  transition: transform 0.15s, filter 0.15s;
}

.wf-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.wf-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #0b4d2c; }
.wf-btn:disabled { opacity: 0.5; transform: none; cursor: default; }

.wf-btn.ghost {
  background: linear-gradient(180deg, #17283c, #0e1a29);
  color: #cfe1f4;
  border-color: #1d3147;
  box-shadow: 0 3px 0 #071019;
}

.wf-row { display: flex; gap: 8px; }
.wf-row .wf-btn { flex: 1; }

.wf-note { margin: 8px 0 0; font-size: 11.5px; line-height: 1.55; color: #8fa4bb; }
.wf-note b { color: #eaf2fb; }
.wf-note code {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(61, 220, 132, 0.1);
  border: 1px solid rgba(61, 220, 132, 0.25);
  color: var(--green);
  font-family: var(--pix);
  font-size: 10px;
}

.wf-pending {
  margin-top: 10px;
  padding: 12px 13px;
  border-radius: 9px;
  border: 1px solid rgba(255, 207, 92, 0.32);
  background: rgba(255, 207, 92, 0.07);
}

.wf-kv {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 4px 0;
  font-size: 12px;
  color: #9db0c5;
}

.wf-kv span:last-child { color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }

/* ── Hiệu ứng thắng ────────────────────────────────────────── */

.win-flash {
  position: fixed;
  inset: 0;
  z-index: 55;
  pointer-events: none;
  opacity: 0;
}

.win-flash img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: screen;
}

.win-flash.on { animation: flashFade 2.2s ease forwards; }

/* ── Game screens ──────────────────────────────────────────── */

.game-head h2 { font-family: var(--pix); font-size: clamp(14px, 2.4vw, 18px); letter-spacing: 0.8px; color: #fff; }
.game-head p { color: var(--muted); }

.back-btn {
  border-radius: 7px;
  border: 2px solid #172739;
  background: #0b1524;
  box-shadow: 0 3px 0 #03080f;
}

.back-btn:hover { background: #132135; transform: translateX(-2px); }

.tag {
  border-radius: 4px;
  font-family: var(--pix);
  font-size: 8px;
  letter-spacing: 1px;
  padding: 5px 9px;
}

.card {
  border-radius: 10px;
  border: 1px solid #16273a;
  background:
    linear-gradient(180deg, rgba(16, 29, 46, 0.6), rgba(7, 15, 26, 0.92)),
    url("assets/tex/deepslate.png");
  background-size: auto, 96px;
  box-shadow: 0 3px 0 #03080f, inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.card h3 { font-family: var(--pix); font-size: 9px; letter-spacing: 1.2px; }

.btn {
  border-radius: 7px;
  font-family: var(--pix);
  font-size: 11px;
  letter-spacing: 1px;
  border: 2px solid #0b1a12;
  box-shadow: 0 3px 0 #030a07;
  padding: 12px 16px;
}

.btn-gold {
  background: linear-gradient(180deg, #ffd97a, #e8a12c);
  color: #1a1205;
  box-shadow: 0 3px 0 #3d2a06;
}

.btn-green {
  background: linear-gradient(180deg, #4bea92, #22b96c);
  color: #04160c;
  box-shadow: 0 3px 0 #0a3a22;
}

.btn-red {
  background: linear-gradient(180deg, #ff8ca1, #e2465e);
  color: #2a070d;
  box-shadow: 0 3px 0 #3a0c14;
}

.bet-input {
  border-radius: 7px;
  border: 2px solid #1e3045;
  background: #050b13;
  font-family: var(--pix);
  font-size: 15px;
  color: var(--gold);
}

.bet-input:focus { border-color: rgba(255, 207, 92, 0.6); box-shadow: 0 0 0 3px rgba(255, 207, 92, 0.1); }

.bet-label { font-family: var(--pix); font-size: 9px; letter-spacing: 1.4px; }

.chip {
  border-radius: 5px;
  border: 1px solid #1b2c40;
  background: #081220;
  font-size: 10.5px;
}

.chip:hover { border-color: rgba(255, 207, 92, 0.4); background: rgba(255, 207, 92, 0.08); }

.result-banner { border-radius: 7px; }

.choice { border-radius: 8px; }

.history-list { display: flex; flex-direction: column; gap: 8px; }

/* ── Arrow GIF ─────────────────────────────────────────────── */

.arrow-stage {
  padding: 10px 10px 14px;
  text-align: center;
}

.arrow-gif {
  display: block;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  border-radius: 10px;
  border: 2px solid #1b2d42;
  background: #050b13;
  image-rendering: pixelated;
  box-shadow: 0 6px 0 #03080f, 0 18px 40px rgba(0, 0, 0, 0.45);
}

.arrow-gif.shoot { animation: arrowFlash 0.5s ease; }

@keyframes arrowFlash {
  0% { filter: brightness(1.5) saturate(1.3); }
  100% { filter: none; }
}

/* ── Toast ─────────────────────────────────────────────────── */

.toast {
  border-radius: 7px;
  border: 2px solid #1d3147;
  background: #0b1725;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 3px 0 #03080f;
  font-size: 12.5px;
}

/* ── Bảng xếp hạng ─────────────────────────────────────────── */

.bxh-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 16px;
}

.bxh-tab {
  padding: 9px 13px;
  border-radius: 7px;
  border: 2px solid #172739;
  background: #0b1524;
  color: #93a6bd;
  font-family: var(--pix);
  font-size: 10px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.15s, color 0.15s, background 0.15s;
}

.bxh-tab:hover { transform: translateY(-1px); color: #d7e5f5; border-color: #26405c; }

.bxh-tab.active {
  background: linear-gradient(180deg, #ffe08a, #f0a93b);
  border-color: #2a1a08;
  color: #24160a;
  box-shadow: 0 3px 0 #2a1a08;
}

.bxh-board { display: block; }

.bxh-me {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 11px 14px;
  border-radius: 9px;
  border: 2px solid rgba(255, 207, 92, 0.45);
  background:
    linear-gradient(90deg, rgba(255, 207, 92, 0.14), rgba(255, 207, 92, 0.02));
  box-shadow: inset 0 0 24px rgba(240, 169, 59, 0.08);
}

.bxh-me-label { font-family: var(--pix); font-size: 9px; letter-spacing: 1.4px; color: var(--gold); }
.bxh-me-rank { font-family: var(--pix); font-size: 20px; color: #fff3cf; }
.bxh-me-val { margin-left: auto; font-family: var(--pix); font-size: 12px; color: var(--gold); }

.bxh-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.bxh-pod {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 10px 14px;
  border-radius: 10px;
  border: 2px solid #1b2b40;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, 0.06), transparent 60%),
    linear-gradient(180deg, #0e1b2b, #0a1320);
  box-shadow: 0 5px 0 #03080f;
  overflow: hidden;
  animation: rowIn 0.25s ease both;
}

.bxh-pod::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.07) 50%, transparent 65%);
}

.bxh-pod.rank-1 {
  border-color: rgba(255, 207, 92, 0.75);
  box-shadow: 0 5px 0 #2a1a08, 0 0 26px rgba(255, 207, 92, 0.18);
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 207, 92, 0.2), transparent 62%),
    linear-gradient(180deg, #1a1608, #0d1220);
}

.bxh-pod.rank-2 { border-color: rgba(196, 210, 228, 0.5); }
.bxh-pod.rank-3 { border-color: rgba(214, 137, 88, 0.55); }
.bxh-pod.me { outline: 2px solid rgba(61, 220, 132, 0.5); outline-offset: 2px; }

.bxh-pod-medal { font-size: 20px; line-height: 1; }

.bxh-pod-ava {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.18);
  background: #0a1220;
}

.bxh-pod.rank-1 .bxh-pod-ava {
  width: 62px;
  height: 62px;
  border-color: rgba(255, 207, 92, 0.8);
  box-shadow: 0 0 18px rgba(255, 207, 92, 0.35);
}

.bxh-pod-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
  font-size: 12.5px;
  color: #eaf2fc;
}

.bxh-vip {
  padding: 2px 7px;
  border-radius: 999px;
  font-family: var(--pix);
  font-size: 8px;
  letter-spacing: 0.6px;
  color: #04160c;
  background: #3ddc84;
}

.bxh-pod-val {
  font-family: var(--pix);
  font-size: 11.5px;
  letter-spacing: 0.4px;
  color: var(--gold);
}

.bxh-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.bxh-row {
  display: grid;
  grid-template-columns: 42px 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #0b1626, #091220);
  animation: rowIn 0.2s ease both;
}

.bxh-row.me {
  border-color: rgba(255, 207, 92, 0.5);
  background: linear-gradient(90deg, rgba(255, 207, 92, 0.12), rgba(255, 207, 92, 0.02));
}

.bxh-rank { font-family: var(--pix); font-size: 11px; color: var(--muted); }

.bxh-ava {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #0a1220;
}

.bxh-name-wrap { display: flex; align-items: center; gap: 7px; min-width: 0; }

.bxh-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  font-size: 13px;
  color: #dbe7f5;
}

.bxh-val { font-family: var(--pix); font-size: 11.5px; color: var(--gold); white-space: nowrap; }

@media (max-width: 520px) {
  .bxh-pod { padding: 14px 6px 11px; }
  .bxh-pod-ava { width: 42px; height: 42px; }
  .bxh-pod.rank-1 .bxh-pod-ava { width: 50px; height: 50px; }
  .bxh-pod-name { font-size: 11px; }
  .bxh-pod-val { font-size: 10px; }
  .bxh-row { grid-template-columns: 34px 26px minmax(0, 1fr) auto; gap: 8px; padding: 7px 9px; }
  .bxh-ava { width: 26px; height: 26px; }
  .bxh-name { font-size: 12px; }
  .bxh-val { font-size: 10.5px; }
}

/* ── Mời bạn bè ────────────────────────────────────────────── */

.invite-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid #2d2413;
  background:
    radial-gradient(560px 200px at 92% 0%, rgba(255, 207, 92, 0.14), transparent 70%),
    linear-gradient(135deg, #12100b, #0b1523 62%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 3px 0 #03080f;
  overflow: hidden;
}

.invite-info { min-width: 0; }

.invite-kicker {
  font-family: var(--pix);
  font-size: 9px;
  letter-spacing: 1.2px;
  color: var(--gold);
  opacity: 0.9;
}

.invite-info h2 {
  margin: 7px 0 6px;
  font-family: var(--pix);
  font-size: 17px;
  line-height: 1.3;
  letter-spacing: 0.5px;
  color: #f4ead2;
}

.invite-info h2 span { color: var(--gold); }

.invite-info p { margin: 0; font-size: 12.5px; color: #a9b7c8; line-height: 1.55; }
.invite-info p b { color: #f5e7c2; }

.invite-link-row { display: flex; gap: 8px; margin-top: 12px; }

.invite-link {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 7px;
  border: 1px solid #2a3550;
  background: #081120;
  color: #cfe0f2;
  font-size: 11.5px;
  font-family: var(--pix);
  letter-spacing: 0.4px;
  text-overflow: ellipsis;
}

.invite-link:focus { outline: 1px solid rgba(255, 207, 92, 0.5); }

.invite-stats { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

.invite-stat {
  flex: 1;
  min-width: 96px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #1d2a3d;
  background: rgba(8, 17, 32, 0.7);
}

.invite-stat span {
  display: block;
  font-family: var(--pix);
  font-size: 13px;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.invite-stat small {
  display: block;
  margin-top: 3px;
  font-size: 8.5px;
  letter-spacing: 0.7px;
  color: var(--muted);
}

.invite-friends { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }

.invite-friend {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 6px 9px;
  border-radius: 7px;
  border: 1px solid #16233a;
  background: rgba(6, 13, 24, 0.65);
  animation: rowIn 0.25s ease both;
}

.invite-friend img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  background: #0a1220;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.invite-friend-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
  font-weight: 600;
  color: #dbe7f5;
}

.invite-friend-meta { font-size: 9.5px; color: var(--muted); }
.invite-friend-meta b { color: #e8d7b0; }

.invite-friend.paid .invite-friend-meta b { color: var(--green); }

.invite-empty { margin: 0; font-size: 11px; color: var(--muted); }

.invite-art {
  display: block;
  align-self: center;
  width: 100%;
  max-height: 190px;
  object-fit: cover;
  border-radius: 9px;
  image-rendering: pixelated;
  border: 1px solid rgba(255, 207, 92, 0.16);
}

/* ── Số liệu thật + tin cậy ───────────────────────────────── */

.proof { margin-top: 14px; }

.proof-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.proof-tile {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 13px 14px;
  border-radius: 10px;
  border: 1px solid #1b2a3d;
  background: linear-gradient(160deg, #0e1a2a, #0a1220);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), 0 2px 0 #03080f;
}

.proof-tile span {
  font-family: var(--pix);
  font-size: 20px;
  letter-spacing: 0.5px;
  color: var(--gold);
  white-space: nowrap;
}

.proof-tile:nth-child(2) span { color: #b98cff; }
.proof-tile:nth-child(3) span { color: #3ce08c; }
.proof-tile:nth-child(4) span { color: #5cc8ff; }

.proof-tile small {
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 1.1px;
  color: var(--muted);
}

.proof-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.proof-card {
  display: flex;
  gap: 12px;
  padding: 14px 15px;
  border-radius: 10px;
  border: 1px solid #1b2a3d;
  background: linear-gradient(135deg, #0c1524, #0a1220 70%);
}

.proof-ico {
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid #2a3f5e;
  background: rgba(92, 200, 255, 0.08);
  font-size: 19px;
}

.proof-card h3 {
  margin: 2px 0 5px;
  font-family: var(--pix);
  font-size: 10.5px;
  letter-spacing: 0.6px;
  color: #e6eefb;
}

.proof-card p { margin: 0; font-size: 11.5px; line-height: 1.55; color: #9fb0c4; }
.proof-card p b { color: #e8f0fa; }

.proof-note {
  margin: 8px 2px 0;
  font-size: 10.5px;
  color: var(--muted);
}

/* ── Animation ─────────────────────────────────────────────── */

@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes livePulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
@keyframes barStripes { from { background-position: 0 0, 0 0; } to { background-position: 24px 0, 0 0; } }
@keyframes rowIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes msgIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@keyframes flashFade { 0% { opacity: 0; } 12% { opacity: 0.85; } 70% { opacity: 0.4; } 100% { opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 1080px) {
  .lobby-cols { grid-template-columns: minmax(0, 1fr); }
  .lobby-side { position: static; }
  .chat-panel { height: 460px; }
  .vip-card { max-width: 520px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
  .invite-card { grid-template-columns: minmax(0, 1fr); }
  .invite-art { display: none; }
}

@media (max-width: 860px) {
  .tb-nav { display: none; }
  .tb-vip { display: none; }
  .topbar { height: 58px; }
  .brand-text { font-size: 11px; }
  .brand-text small { display: none; }
  .wallet { padding: 4px 9px 4px 6px; }
  .wallet-coin { width: 24px; height: 24px; }
  .wallet strong { font-size: 13px; }
  .wallet-label, .wallet-unit { display: none; }
  .btn-pix.ghost { display: none; }
  .icon-btn { width: 33px; height: 33px; }
  .hero-card { min-height: 260px; }
  .hero-user { top: 10px; right: 10px; }
  .hero-user strong { max-width: 90px; }
  .hero-user span { display: none; }
  .hero-inner { max-width: none; padding: 20px 16px 22px; }
  .hero-inner p { font-size: 12px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .game-thumb { height: 96px; }
  .game-thumb img { width: 74px; height: 74px; }
  .game-card h3 { font-size: 9.5px; }
  .game-card p { font-size: 10.5px; }
  .live-head, .live-row { grid-template-columns: 1fr 1.2fr 0.7fr; }
  .live-head span:nth-child(1), .live-row .live-game { display: none; }
  .chat-panel { height: 430px; }
  .sec-note { display: none; }
  .proof-cards { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 520px) {
  .proof-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proof-tile { padding: 10px 11px; }
  .proof-tile span { font-size: 16px; }
  .hero-actions .btn-pix.big { flex: 1; }
  .hero-stats { gap: 6px; }
  .hero-stat { min-width: 80px; padding: 6px 8px; }
  .chat-panel { height: 400px; }
  main.shell { padding: 10px 8px 34px; }
}

/* ── Tiến Lên Miền Nam ─────────────────────────────────────── */
.tl-setup { display: grid; gap: 12px; }
.tl-intro { padding: 14px 16px; }
.tl-h { margin: 0 0 6px; font: 700 12px/1.35 var(--pix); letter-spacing: .04em; color: var(--gold); }
.tl-intro .subline { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.tl-setup-card { padding: 14px; display: grid; gap: 12px; }
.tl-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tl-mode {
  display: flex; align-items: center; gap: 9px; padding: 10px 11px;
  border-radius: 9px; border: 1px solid #1d2d42; background: #0c1727; color: var(--text);
  text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .1s;
}
.tl-mode:hover { transform: translateY(-1px); }
.tl-mode.active { border-color: rgba(255, 207, 92, .7); background: #0f1c2e; box-shadow: 0 0 0 2px rgba(255, 207, 92, .16), 0 6px 16px rgba(0, 0, 0, .35); }
.tl-mode-ico { font-size: 20px; line-height: 1; }
.tl-mode-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tl-mode-text b { font: 700 10.5px/1.2 var(--pix); letter-spacing: .03em; }
.tl-mode-text small { color: var(--muted); font-size: 10.5px; line-height: 1.35; }
.tl-create { width: 100%; }
.tl-rooms { display: grid; gap: 8px; }
.tl-room { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid #16273a; background: linear-gradient(180deg, #0d1929, #0a1220); }
.tl-room-info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.tl-room-info b { font-size: 13px; }
.tl-room-info small { color: var(--muted); font-size: 11px; }
.tl-empty { margin: 0; padding: 14px; border-radius: 10px; border: 1px dashed #1d2d42; color: var(--muted); font-size: 12px; text-align: center; }

.tl-arena { display: grid; gap: 12px; }
.tl-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid #16273a; background: #0b1523; }
.tl-meta-left { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tl-meta-left strong { font: 700 12px/1.3 var(--pix); letter-spacing: .03em; color: var(--gold); }
.tl-meta-left small { color: var(--muted); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-actions .btn-pix.ghost, .tl-meta .btn-pix.ghost, .tl-result .btn-pix.ghost { display: inline-flex; }
.tl-leave { padding: 7px 11px; font-size: 10px; }

.tl-felt {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, 1fr);
  grid-template-rows: auto minmax(96px, 1fr) auto;
  grid-template-areas: "top top top" "left center right" "me me me";
  gap: 10px;
  padding: 14px 12px;
  border-radius: 16px;
  border: 1px solid rgba(61, 220, 132, .22);
  background:
    radial-gradient(120% 90% at 50% 40%, rgba(61, 220, 132, .13), transparent 62%),
    radial-gradient(80% 60% at 50% 100%, rgba(0, 0, 0, .45), transparent 70%),
    linear-gradient(180deg, #0d2330, #081722 62%, #061019);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .03), inset 0 18px 40px rgba(0, 0, 0, .45);
}
.tl-seat { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; border: 1px solid transparent; min-width: 0; transition: border-color .2s, background .2s, box-shadow .2s; }
.tl-seat.pos-2 { grid-area: top; justify-self: center; }
.tl-seat.pos-3 { grid-area: left; align-self: center; justify-self: start; }
.tl-seat.pos-1 { grid-area: right; align-self: center; justify-self: end; }
.tl-seat.pos-0 { grid-area: me; justify-self: center; }
.tl-seat.turn { border-color: rgba(255, 207, 92, .65); background: rgba(255, 207, 92, .07); box-shadow: 0 0 16px rgba(255, 207, 92, .18); }
.tl-seat.me .tl-name { color: var(--gold); }
.tl-seat.empty { opacity: .5; }
.tl-avatar { width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .14); background: linear-gradient(180deg, #8fd6ff, #4aa3d8) center / cover no-repeat; color: #0a1220; font-size: 14px; font-weight: 800; }
.tl-avatar.bot { background-image: none !important; background: linear-gradient(180deg, #b98cff, #6e42c4); }
.tl-seat-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tl-name { max-width: 118px; font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-sub { font-size: 9.5px; letter-spacing: .02em; color: var(--muted); white-space: nowrap; }
.tl-clock { min-width: 22px; text-align: right; font: 700 10px/1 var(--pix); color: var(--gold); }
.tl-center { grid-area: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; min-height: 96px; text-align: center; }
.tl-combo-label { font-size: 10.5px; letter-spacing: .04em; color: var(--muted); text-transform: uppercase; }
.tl-combo { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }

.tl-face { position: relative; display: block; width: 100%; height: 100%; border-radius: 6px; border: 1px solid #cfd8e6; background: linear-gradient(180deg, #ffffff, #e8edf6); color: #131b28; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .08); }
.tl-face.red { color: #d7263d; }
.tl-face.mini { width: 38px; height: 54px; }
.tl-head { position: absolute; top: 2px; left: 4px; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.tl-head b { font-size: 12px; font-weight: 800; }
.tl-head i { font-size: 9px; font-style: normal; }
.tl-pip { position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; opacity: .92; }
.tl-foot { position: absolute; right: 4px; bottom: 2px; font-size: 10px; font-weight: 800; transform: rotate(180deg); }

.tl-hand-wrap { display: grid; gap: 6px; padding: 10px 12px 12px; border-radius: 12px; border: 1px solid #16273a; background: #0a1421; }
.tl-hand-bar { display: flex; align-items: center; justify-content: space-between; font: 700 9.5px/1 var(--pix); letter-spacing: .04em; color: var(--muted); }
.tl-sel-hint { font-family: "Inter", sans-serif; font-size: 11px; text-transform: none; color: var(--gold); }
.tl-hand { display: flex; align-items: flex-end; min-height: 92px; padding-top: 16px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.tl-card { position: relative; flex: 0 0 auto; width: 50px; height: 70px; padding: 0; border: 2px solid #c9d2e0; border-radius: 8px; background: none; cursor: pointer; transition: transform .12s ease, border-color .12s, box-shadow .12s; }
.tl-card + .tl-card { margin-left: -14px; }
.tl-card .tl-face { border: none; box-shadow: none; }
.tl-card:hover { transform: translateY(-6px); }
.tl-card.sel { z-index: 40; transform: translateY(-16px); border-color: var(--gold); box-shadow: 0 10px 20px rgba(0, 0, 0, .45), 0 0 0 2px rgba(255, 207, 92, .35); }
.tl-card:disabled { cursor: default; }

.tl-actions { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; }
.tl-actions .btn-pix { padding: 12px; }
.tl-actions .btn-pix:disabled { opacity: .45; transform: none; cursor: not-allowed; filter: grayscale(.35); }
.tl-hint { margin: 0; text-align: center; font-size: 11.5px; color: var(--muted); }
.tl-log { display: grid; gap: 4px; padding: 10px 12px; border-radius: 10px; border: 1px solid #16273a; background: rgba(7, 14, 24, .7); }
.tl-log-line { font-size: 11px; line-height: 1.35; color: #a7b8cc; }
.tl-log-line:first-child { color: var(--text); }

.tl-wait { display: grid; gap: 10px; padding: 14px; border-radius: 12px; border: 1px dashed rgba(255, 207, 92, .35); background: rgba(255, 207, 92, .04); text-align: center; }
.tl-wait .subline { margin: 0; color: var(--muted); font-size: 12px; }
.tl-wait .btn-pix { justify-self: center; }

.tl-result { display: grid; gap: 8px; justify-items: center; padding: 18px 16px; border-radius: 14px; border: 1px solid rgba(255, 207, 92, .35); background: radial-gradient(90% 120% at 50% 0%, rgba(255, 207, 92, .14), transparent 65%), #0b1726; text-align: center; }
.tl-result-ico { font-size: 30px; line-height: 1; }
.tl-result h3 { margin: 0; font: 700 14px/1.3 var(--pix); letter-spacing: .03em; color: var(--gold); }
.tl-result p { margin: 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.tl-result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; }

@media (max-width: 520px) {
  .tl-modes { grid-template-columns: 1fr; }
  .tl-felt { gap: 6px; padding: 10px 8px; }
  .tl-avatar { width: 30px; height: 30px; font-size: 12px; }
  .tl-name { max-width: 86px; font-size: 11px; }
  .tl-sub { font-size: 8.5px; }
  .tl-card { width: 42px; height: 60px; }
  .tl-card + .tl-card { margin-left: -12px; }
  .tl-head b { font-size: 11px; }
  .tl-pip { font-size: 18px; }
  .tl-face.mini { width: 32px; height: 46px; }
  .tl-actions { grid-template-columns: 1fr 1fr; }
}
