/* GRAMMEGA — battleship.css (морская дуэль) */

#tab-content .bs-wrap,
.bs-wrap {
  padding: 12px;
  max-width: 560px;
  margin: 0 auto;
}

/* --- header --- */
.bs-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.bs-back {
  background: var(--panel2, #1a1a1a);
  color: var(--text, #fff);
  border: 1px solid #333;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}
.bs-title {
  font-weight: 800;
  font-size: 16px;
  color: var(--text, #fff);
}

/* --- stats row --- */
.bs-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.bs-stat {
  background: var(--panel2, #1a1a1a);
  border: 1px solid #333;
  border-radius: 10px;
  padding: 10px 6px;
  text-align: center;
}
.bs-stat b { display: block; font-size: 16px; color: var(--blue, #29A9EB); }
.bs-stat span { font-size: 10px; color: var(--text-muted, #888); text-transform: uppercase; letter-spacing: 0.5px; }

/* --- stakes --- */
.bs-stakes { display: flex; gap: 8px; margin-bottom: 12px; }
.bs-stake {
  flex: 1;
  padding: 12px;
  text-align: center;
  border-radius: 10px;
  background: var(--panel2, #1a1a1a);
  border: 1px solid #333;
  font-weight: 700;
  cursor: pointer;
  transition: 0.15s;
}
.bs-stake.active {
  border-color: var(--blue, #29A9EB);
  background: rgba(41,169,235,0.1);
  color: var(--blue, #29A9EB);
}

/* --- create button --- */
.bs-create {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #29A9EB, #1d78a8);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  border: none;
  cursor: pointer;
  margin-bottom: 16px;
}

/* --- list --- */
.bs-section {
  font-size: 12px;
  color: var(--text-muted, #888);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin: 12px 0 8px;
}
.bs-rooms { display: flex; flex-direction: column; gap: 8px; }
.bs-room-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--panel2, #1a1a1a);
  border: 1px solid #333;
  border-radius: 12px;
  padding: 12px;
}
.bs-room-info { flex: 1; }
.bs-room-name { font-weight: 700; font-size: 14px; }
.bs-room-name small { color: var(--text-muted, #888); font-size: 11px; }
.bs-room-bet { color: var(--blue, #29A9EB); font-weight: 600; font-size: 13px; margin-top: 2px; }
.bs-join {
  background: var(--blue, #29A9EB);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}
.bs-join.mine { background: #f59e0b; }
.bs-empty {
  text-align: center;
  padding: 24px;
  color: var(--text-muted, #888);
  font-size: 14px;
}

/* --- waiting --- */
.bs-waiting {
  text-align: center;
  padding: 40px 20px;
}
.bs-spinner {
  width: 44px; height: 44px;
  border: 3px solid #333;
  border-top-color: var(--blue, #29A9EB);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: bs-spin 0.9s linear infinite;
}
@keyframes bs-spin { to { transform: rotate(360deg); } }
.bs-waiting-text { font-weight: 700; font-size: 16px; margin-bottom: 8px; }
.bs-waiting-hint { color: var(--text-muted, #888); font-size: 12px; }

/* --- board --- */
.bs-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  max-width: 260px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
}
.bs-cell {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 4px;
  padding: 0;
  cursor: pointer;
  transition: 0.1s;
}
.bs-cell.ship { background: #475569; }
.bs-cell.miss { background: #64748b; cursor: default; }
.bs-cell.hit  { background: #f97316; cursor: default; }
.bs-cell.sunk { background: #b91c1c; cursor: default; }
.bs-cell:disabled { cursor: not-allowed; }

/* --- placing controls --- */
.bs-controls {
  display: flex;
  gap: 6px;
  margin: 10px 0;
}
.bs-ctl {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  background: var(--panel2, #1a1a1a);
  border: 1px solid #333;
  color: var(--text, #fff);
  cursor: pointer;
  font-size: 12px;
}
.bs-ctl.active { border-color: var(--blue, #29A9EB); color: var(--blue, #29A9EB); }
.bs-ready {
  display: block;
  width: 100%;
  padding: 14px;
  margin-top: 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #22c55e, #15803d);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  border: none;
  cursor: pointer;
}
.bs-hint {
  color: var(--text-muted, #888);
  font-size: 12px;
  text-align: center;
  margin: 8px 0;
}

/* --- battle --- */
.bs-timer {
  margin-left: auto;
  font-weight: 700;
  color: var(--text-muted, #888);
}
.bs-timer.mine { color: #22c55e; }
.bs-turn {
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  margin: 10px 0;
}
.bs-boards { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.bs-side { flex: 1; min-width: 200px; }
.bs-side-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted, #888);
  text-align: center;
  margin-bottom: 6px;
}

/* --- result --- */
.bs-result {
  text-align: center;
  padding: 40px 20px;
}
.bs-result-title { font-size: 26px; font-weight: 900; margin-bottom: 8px; }
.bs-result.win .bs-result-title { color: #22c55e; }
.bs-result.lose .bs-result-title { color: #f87171; }
.bs-result.draw .bs-result-title { color: #facc15; }
.bs-result-bank { color: var(--text-muted, #888); font-size: 13px; margin-bottom: 20px; }
.bs-again {
  padding: 14px 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #29A9EB, #1d78a8);
  color: #fff;
  font-weight: 800;
  border: none;
  cursor: pointer;
}

/* --- dock --- */
.bs-dock {
  display: flex;
  gap: 12px;
  justify-content: center;
  padding: 10px;
  margin-bottom: 12px;
  min-height: 70px;
  background: var(--panel2, #1a1a1a);
  border-radius: 12px;
  border: 1px dashed #333;
  flex-wrap: wrap;
  align-items: center;
}
.bs-dock-empty {
  color: #22c55e;
  font-weight: 600;
  font-size: 13px;
  padding: 10px;
}
.bs-dock-ship {
  display: flex;
  gap: 3px;
  cursor: grab;
  user-select: none;
  touch-action: none;
  padding: 4px;
  border-radius: 6px;
  transition: transform 0.1s;
}

.bs-dock-cell {
  width: 34px;
  height: 34px;
  background: #475569;
  border: 1px solid #64748b;
  border-radius: 4px;
}

.bs-board-wrap {
  max-width: 300px;
  margin: 0 auto;
}

.bs-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.bs-actions .bs-ctl { flex: 1; }
.bs-actions .bs-ready { flex: 2; margin-top: 0; }

/* --- battle UI v2 --- */
.bs-battle-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding: 10px 12px;
  background: var(--panel2, #1a1a1a);
  border: 1px solid #333;
  border-radius: 10px;
}
.bs-battle-title { font-weight: 800; font-size: 14px; }
.bs-battle-shots { font-size: 13px; color: var(--text-muted, #888); }
.bs-battle-shots b { color: var(--blue, #29A9EB); font-size: 15px; }

.bs-turn {
  text-align: center;
  font-weight: 800;
  font-size: 15px;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 12px;
}
.bs-turn.mine {
  background: rgba(34,197,94,0.18);
  color: #22c55e;
  border: 1px solid rgba(34,197,94,0.45);
  /* без анимации — статика, чтобы не мерцало */
}
.bs-turn.waiting {
  background: rgba(148,163,184,0.1);
  color: #94a3b8;
}
.bs-timer-small { font-size: 12px; opacity: 0.8; }

.bs-side-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted, #888);
  text-align: center;
  margin: 10px 0 6px;
}
.bs-side-label.enemy { color: #f87171; margin-top: 16px; }

.bs-board {
  max-width: 320px;
  margin: 0 auto;
  grid-template-columns: repeat(5, 1fr);
}
.bs-board.my-board .bs-cell { cursor: default; }
.bs-board.enemy-board .bs-cell.clickable { cursor: crosshair; }
/* hover/active убраны — в Telegram они залипают и выглядят как мерцание */
.bs-board.enemy-board .bs-cell.clickable {
  /* лёгкая рамка — видно, что клетка кликабельна, без hover-эффекта */
  box-shadow: inset 0 0 0 1px rgba(41,169,235,0.18);
}

/* --- selected ship in dock (tap-tap режим) --- */
.bs-dock-ship.selected {
  background: rgba(34,197,94,0.15);
  border-radius: 8px;
  box-shadow: 0 0 0 2px #22c55e;
}
.bs-dock-ship {
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: background 0.15s;
}

/* --- поля рядом (мобильный ряд) --- */
.bs-boards-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: flex-start;
}
.bs-board-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.bs-boards-row .bs-board {
  width: 100%;
  max-width: 100%;
  margin: 0;
}
.bs-boards-row .bs-side-label {
  margin: 6px 0 4px;
}

/* --- панель поворота --- */
.bs-orient-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 10px 0;
  padding: 8px 10px;
  background: var(--panel2, #1a1a1a);
  border: 1px solid #333;
  border-radius: 10px;
}
.bs-orient-info {
  flex: 1;
  font-size: 13px;
  color: var(--text-muted, #888);
  font-weight: 600;
}
.bs-orient-btn {
  background: linear-gradient(135deg, #29A9EB, #1d78a8);
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

/* --- красивый промах (крестик) --- */
.bs-cell.miss {
  background: #1e293b;
  position: relative;
}
.bs-cell.miss::before,
.bs-cell.miss::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 60%;
  height: 2px;
  background: #64748b;
  border-radius: 1px;
  transform-origin: center;
}
.bs-cell.miss::before { transform: translate(-50%, -50%) rotate(45deg); }
.bs-cell.miss::after  { transform: translate(-50%, -50%) rotate(-45deg); }

/* --- красивое попадание (точка + свечение) --- */
.bs-cell.hit {
  background: #f97316;
  position: relative;
  box-shadow: inset 0 0 8px rgba(0,0,0,0.3);
}
.bs-cell.hit::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: 40%; height: 40%;
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 6px rgba(255,255,255,0.9);
}

/* --- потоплен (крест красный) --- */
.bs-cell.sunk {
  background: #b91c1c;
  position: relative;
}
.bs-cell.sunk::before,
.bs-cell.sunk::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: 70%; height: 3px;
  background: #fff;
  border-radius: 1px;
}
.bs-cell.sunk::before { transform: translate(-50%, -50%) rotate(45deg); }
.bs-cell.sunk::after  { transform: translate(-50%, -50%) rotate(-45deg); }

/* --- кнопка отмены в комнате --- */
.bs-header-wait { justify-content: space-between; }
.bs-close {
  background: rgba(239,68,68,0.15);
  color: #ef4444;
  border: 1px solid rgba(239,68,68,0.4);
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
  font-size: 14px;
}
.bs-close:hover { background: rgba(239,68,68,0.25); }

/* --- клетка вокруг потопленного (крестик auto) --- */
.bs-cell.miss.auto {
  background: #0f172a;
  opacity: 0.7;
}
.bs-cell.miss.auto::before,
.bs-cell.miss.auto::after {
  background: #334155;
}

/* --- оверлей 3-2-1 --- */
.bs-countdown-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 20px;
}
.bs-countdown-num {
  font-size: 96px;
  font-weight: 900;
  color: #29A9EB;
  line-height: 1;
  text-shadow: 0 0 40px rgba(41,169,235,0.6);
}
.bs-countdown-num.pop {
  animation: bsCdPop 0.9s ease-out;
}
@keyframes bsCdPop {
  0%   { transform: scale(1.6); opacity: 0; }
  30%  { transform: scale(1);   opacity: 1; }
  100% { transform: scale(1);   opacity: 1; }
}
.bs-countdown-label {
  color: #94a3b8;
  font-size: 14px;
  letter-spacing: 0.5px;
}

/* --- модалка результата --- */
.bs-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2147483000;
  padding: 20px;
  animation: bsFadeIn 0.3s ease-out;
}
@keyframes bsFadeIn { from { opacity: 0; } to { opacity: 1; } }

.bs-modal {
  background: var(--panel2, #1a1a1a);
  border-radius: 20px;
  padding: 28px 22px;
  width: 100%;
  max-width: 380px;
  text-align: center;
  border: 1px solid #333;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
  animation: bsModalIn 0.4s cubic-bezier(0.34,1.56,0.64,1);
}


.bs-modal-icon { font-size: 64px; line-height: 1; margin-bottom: 8px; }
.bs-modal-title {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.bs-modal.win .bs-modal-title    { color: #22c55e; }
.bs-modal.lose .bs-modal-title   { color: #ef4444; }
.bs-modal.draw .bs-modal-title   { color: #facc15; }

.bs-modal-sub {
  color: #94a3b8;
  font-size: 14px;
  margin-bottom: 18px;
}
.bs-modal-sub b { color: #fff; }

.bs-modal-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 22px;
  background: rgba(255,255,255,0.03);
  padding: 12px;
  border-radius: 12px;
}
.bs-modal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}
.bs-modal-row span { color: #94a3b8; }
.bs-modal-row b { color: #fff; font-weight: 700; }
.bs-modal-row.gold b  { color: #fbbf24; font-size: 16px; }
.bs-modal-row.green b { color: #4ade80; }
.bs-modal-row.red b   { color: #f87171; }
.bs-modal-row.muted { opacity: 0.5; }

.bs-modal-actions {
  display: flex;
  gap: 10px;
}
.bs-modal-btn {
  flex: 1;
  padding: 14px;
  border-radius: 12px;
  border: none;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
}
.bs-modal-btn.secondary {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid #333;
}
.bs-modal-btn.primary {
  background: linear-gradient(135deg, #29A9EB, #1d78a8);
  color: #fff;
}

/* ============================================================
   TAB BUTTONS: родной размер + скролл + data-active
   ============================================================ */

.top-tabs-scroll {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  gap: 6px !important;
  padding: 0 8px 6px 8px !important;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
.top-tabs-scroll::-webkit-scrollbar { display: none; }

.top-tabs-scroll .tab-btn {
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  white-space: nowrap !important;
  padding: 8px 16px !important;
  font-size: 13px !important;
  border-radius: 12px !important;
  gap: 4px !important;
}

.top-tabs-scroll .tab-btn .svg-icon {
  width: 18px !important;
  height: 18px !important;
}

.tab-btn[data-active="1"] {
  background: linear-gradient(135deg, #0088cc, #00d4ff) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(0,136,204,0.4) !important;
  opacity: 1 !important;
}
.tab-btn:not([data-active="1"]) {
  background: var(--panel2, #1a1a1a) !important;
  border-color: #333 !important;
  color: var(--text-muted, #888) !important;
  box-shadow: none !important;
  opacity: 1 !important;
}

/* --- баланс в шапке открытого кейса --- */
.case-header-balance {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(41,169,235,0.15);
  border: 1px solid rgba(41,169,235,0.35);
  border-radius: 10px;
  font-weight: 800;
  font-size: 13px;
  color: #29A9EB;
  white-space: nowrap;
}
.case-header-balance .htb-coin { flex-shrink: 0; }

/* ============================================================
   HEADER: balance слева, кнопки справа
   ============================================================ */

/* контейнер: всё по умолчанию слева */
.header {
  display: flex !important;
  justify-content: flex-start !important;
  align-items: center !important;
}

/* баланс: первым слева, невидим вне кейса */
.header > .balances,
.header > #balance {
  display: flex !important;
  align-items: center !important;
  visibility: hidden;
}
.header > .balances[data-visible="1"],
.header > #balance[data-visible="1"] {
  visibility: visible;
}

/* кнопки: margin-left:auto толкает ИХ вправо, остальное остаётся слева */
.header > .header-right {
  margin-left: auto !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

/* ============================================================
   body.bs-home: ГАРАНТИРОВАННО все табы серые
   ============================================================ */
body.bs-home .tab-btn {
  background: var(--panel2, #1a1a1a) !important;
  background-image: none !important;
  border-color: #333 !important;
  color: var(--text-muted, #888) !important;
  box-shadow: none !important;
  outline: none !important;
  transform: none !important;
  opacity: 1 !important;
}
body.bs-home .tab-btn.active,
body.bs-home .tab-btn[data-active="1"],
body.bs-home .tab-btn[data-active] {
  background: var(--panel2, #1a1a1a) !important;
  background-image: none !important;
  border-color: #333 !important;
  color: var(--text-muted, #888) !important;
  box-shadow: none !important;
}
body.bs-home .tab-btn.active::after,
body.bs-home .tab-btn.active::before {
  content: none !important;
}

/* ───── BS STATS BLOCK (новый, как в Сапёре) ───── */
.bs-stats-block {
    background: rgba(30, 30, 50, 0.7);
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 14px;
    padding: 14px 12px;
    margin-bottom: 12px;
}
.bs-stats-block .bs-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.bs-stats-block .bs-stat {
    text-align: center;
}
.bs-stats-block .bs-stat b {
    display: block;
    font-size: 20px;
    font-weight: 900;
    color: #e8e8f0;
    margin-bottom: 2px;
}
.bs-stats-block .bs-stat span {
    font-size: 10px;
    color: #8b8ba7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.bs-stats-block .bs-stat-win b { color: #10b981; }
.bs-stats-block .bs-stat-lose b { color: #ef4444; }
.bs-stats-empty {
    font-size: 13px;
    color: #8b8ba7;
    text-align: center;
    font-style: italic;
}
.bs-stats-winnings {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(167, 139, 250, 0.15);
    text-align: center;
    font-size: 13px;
    color: #8b8ba7;
}
.bs-stats-winnings b {
    font-size: 16px;
    font-weight: 900;
    color: #10b981;
}

/* ───── NAV ROW ───── */
.bs-nav-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 8px; }
.bs-nav-btn {
    padding: 14px 12px;
    background: rgba(30, 30, 50, 0.9);
    border: 1.5px solid rgba(167, 139, 250, 0.3);
    border-radius: 12px;
    font-weight: 700; font-size: 14px;
    color: #c4b5fd; cursor: pointer;
    transition: all 0.15s;
}
.bs-nav-btn:hover { background: rgba(124, 58, 237, 0.2); border-color: #a78bfa; }

/* ───── HISTORY ───── */
.bs-hist-card {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; margin-bottom: 8px;
    background: rgba(30, 30, 50, 0.9);
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 12px;
}
.bs-hist-win { border-left: 4px solid #10b981; }
.bs-hist-lose { border-left: 4px solid #ef4444; }
.bs-hist-draw { border-left: 4px solid #fbbf24; }
.bs-hist-icon { font-size: 26px; flex-shrink: 0; }
.bs-hist-info { flex: 1; min-width: 0; }
.bs-hist-title { font-weight: 800; font-size: 14px; margin-bottom: 2px; }
.bs-hist-win .bs-hist-title { color: #10b981; }
.bs-hist-lose .bs-hist-title { color: #ef4444; }
.bs-hist-draw .bs-hist-title { color: #fbbf24; }
.bs-hist-sub { font-size: 12px; color: #8b8ba7; }
.bs-hist-delta {
    font-size: 16px; font-weight: 900;
    flex-shrink: 0; text-align: right; min-width: 70px;
}
.bs-hist-delta small { font-size: 10px; font-weight: 700; opacity: 0.7; margin-left: 2px; }
.bs-hd-win { color: #10b981; }
.bs-hd-lose { color: #ef4444; }
.bs-hd-zero { color: #8b8ba7; }

/* ───── LEADERBOARD ───── */
.bs-lb-row {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; margin-bottom: 6px;
    background: rgba(30, 30, 50, 0.9);
    border: 1px solid rgba(167, 139, 250, 0.15);
    border-radius: 10px;
}
.bs-lb-row.bs-lb-me {
    background: rgba(124, 58, 237, 0.2);
    border-color: #a78bfa;
    box-shadow: 0 0 20px rgba(167, 139, 250, 0.3);
}
.bs-lb-rank {
    font-size: 22px; font-weight: 900;
    width: 42px; text-align: center;
    color: #a78bfa;
}
.bs-lb-name {
    flex: 1; font-weight: 700; font-size: 14px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bs-lb-wins { font-weight: 800; font-size: 14px; color: #fbbf24; }

/* ───── МОРСКОЙ ФОН ДЛЯ ИГРОВОГО ПОЛЯ ───── */
.bs-board-wrap {
    background: radial-gradient(circle at 30% 20%, rgba(41, 169, 235, 0.15), transparent 60%),
                radial-gradient(circle at 70% 80%, rgba(16, 185, 129, 0.1), transparent 50%),
                linear-gradient(180deg, #0a1628 0%, #0d1f3a 50%, #061020 100%);
    border-radius: 16px;
    padding: 8px;
    position: relative;
    overflow: hidden;
}
.bs-board-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 2px,
            rgba(255,255,255,0.02) 2px,
            rgba(255,255,255,0.02) 4px
        );
    pointer-events: none;
    border-radius: 16px;
}
/* Анимация волн (лёгкая пульсация) */



/* Код комнаты */
.bs-code-block {
    margin: 8px 0 12px;
    padding: 14px;
    background: rgba(41, 169, 235, 0.1);
    border: 1px dashed rgba(41, 169, 235, 0.5);
    border-radius: 12px;
    text-align: center;
}
.bs-code-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #6b8ba7;
    letter-spacing: 1px;
    margin-bottom: 6px;
}
.bs-code-value {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 4px;
    color: #29A9EB;
    margin: 8px 0;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 12px rgba(41, 169, 235, 0.5);
}
.bs-code-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 8px;
}
.bs-code-btn {
    padding: 8px 14px;
    background: rgba(41, 169, 235, 0.2);
    border: 1px solid rgba(41, 169, 235, 0.5);
    color: #29A9EB;
    border-radius: 8px;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
}
.bs-code-btn:hover { background: rgba(41, 169, 235, 0.35); }
.bs-code-hint {
    font-size: 11px;
    color: #6b8ba7;
    margin-top: 8px;
}

.bs-create-private {
    width: 100%;
    padding: 14px;
    margin-top: 8px;
    background: rgba(60, 60, 90, 0.9);
    color: #c4b5fd;
    border: 1.5px solid rgba(167, 139, 250, 0.3);
    border-radius: 14px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}
.bs-create-private:hover { background: rgba(80, 80, 120, 0.9); }

/* ───── ACTION CARDS (2 в ряд) ───── */
.bs-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
}
.bs-action-card {
    padding: 18px 12px;
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.12s, box-shadow 0.12s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.bs-action-card:active { transform: scale(0.97); }
.bs-action-auto {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}
.bs-action-private {
    background: linear-gradient(135deg, #7c3aed, #a78bfa);
    color: #fff;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
}
.bs-action-icon {
    font-size: 32px;
    margin-bottom: 6px;
    line-height: 1;
}
.bs-action-title {
    font-weight: 800;
    font-size: 15px;
    margin-bottom: 2px;
}
.bs-action-sub {
    font-size: 11px;
    opacity: 0.9;
}
.bs-join-code-btn {
    width: 100%;
    margin-top: 12px;
    padding: 12px;
    background: transparent;
    border: 1.5px dashed rgba(167, 139, 250, 0.4);
    color: #c4b5fd;
    border-radius: 12px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}
.bs-join-code-btn:hover { background: rgba(167, 139, 250, 0.1); }
