/* Bloody Tear — games / clans / gifts */
.bt-extra-hero {
  background: linear-gradient(135deg, rgba(40, 12, 12, 0.95), rgba(12, 18, 32, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}
.bt-extra-balance {
  display: flex;
  align-items: center;
  gap: 12px;
}
.bt-extra-balance__label {
  display: block;
  color: #8b95a8;
  font-size: 11px;
}
.bt-extra-balance__amount {
  font-size: 22px;
  font-weight: 700;
  color: #ffd166;
}
.bt-extra-hint {
  color: #8b95a8;
  font-size: 12px;
  margin: 0;
  max-width: 420px;
}
.bt-extra-panel {
  background: #212121;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
}
.bt-extra-panel__title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 12px;
  color: #e1e3e6;
  display: flex;
  align-items: center;
  gap: 8px;
}
.bt-extra-btn {
  background: linear-gradient(135deg, #e63946 0%, #b71c1c 55%, #7c1a1a 100%);
  border: 0;
  color: #fff;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}
.bt-extra-btn:hover { opacity: 0.9; color: #fff; }
.bt-extra-btn--sm { padding: 6px 10px; font-size: 11px; }
.bt-extra-btn--ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.bt-extra-btn--war {
  background: linear-gradient(135deg, #7c3aed, #4c1d95);
}
.bt-extra-empty { color: #6b7280; font-size: 12px; padding: 8px 0; }

/* /games + /blackjack — do NOT set width/max-width:100% (breaks col-lg-9 → wraps under sidebar) */
.container > .row:has(> .bt-games-page),
.container > .row:has(> .bt-bj-page) {
  align-items: flex-start !important;
}
.bt-games-page,
.bt-bj-page {
  min-width: 0;
  align-self: flex-start !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}
.bt-games-sidebar,
.bt-bj-sidebar {
  min-width: 0;
  align-self: flex-start !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}
@media (min-width: 992px) {
  .bt-games-page.col-lg-9,
  .bt-bj-page.col-lg-9 {
    flex: 0 0 75%;
    max-width: 75%;
    width: auto;
  }
  .bt-games-sidebar.col-lg-3,
  .bt-bj-sidebar.col-lg-3 {
    flex: 0 0 25%;
    max-width: 25%;
    width: auto;
  }
}
.bt-games-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(40, 12, 12, 0.92), rgba(12, 14, 22, 0.92));
  border: 1px solid rgba(230, 57, 70, 0.28);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}
.bt-games-hero__balance {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bt-games-hero__hint {
  margin: 0;
  color: #8b95a8;
  font-size: 12px;
  max-width: 420px;
  line-height: 1.35;
}

/* 2×2 — four games, no orphan row */
.bt-game-card__choices--wrap {
  max-height: 76px;
  overflow-y: auto;
  overflow-x: hidden;
  align-content: flex-start;
}
.bt-games-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
  align-items: stretch;
  grid-auto-rows: 1fr;
}
@media (max-width: 767px) {
  .bt-games-grid { grid-template-columns: 1fr; }
}
.bt-game-card {
  background: linear-gradient(180deg, #242426 0%, #1b1b1d 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
  min-width: 0;
  height: 100%;
}
.bt-game-card.is-hidden { display: none !important; }
.bt-game-card__head {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
}
.bt-game-card__head h3 {
  margin: 0 0 4px;
  font-size: 15px;
  color: #fff;
}
.bt-game-card__head p {
  margin: 0;
  color: #8b95a8;
  font-size: 12px;
}
.bt-game-card__stage {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  min-height: 120px;
  height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 40%, rgba(230, 57, 70, 0.16), transparent 68%);
  overflow: hidden;
  padding: 4px 0 2px;
}
.bt-game-card__controls {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}
.bt-game-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.bt-game-card > p {
  color: #8b95a8;
  font-size: 12px;
  margin-bottom: 12px;
}
.bt-game-card__choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}
.bt-game-chip {
  background: #2a2a2b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e1e3e6;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  cursor: pointer;
}
.bt-game-chip.is-active {
  border-color: #e63946;
  box-shadow: 0 0 0 1px rgba(230, 57, 70, 0.4);
  color: #fff;
}
.bt-game-chip--red.is-active { border-color: #ef4444; background: rgba(239, 68, 68, 0.2); }
.bt-game-chip--black.is-active { border-color: #94a3b8; background: rgba(15, 23, 42, 0.8); }
.bt-game-chip--green.is-active { border-color: #22c55e; background: rgba(34, 197, 94, 0.2); }
.bt-game-bet {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  z-index: 3;
  color: #8b95a8;
  font-size: 11px;
  margin: 0;
}
.bt-game-bet__label {
  display: block;
  letter-spacing: 0.02em;
}
.bt-game-bet input,
.bt-game-bet-input,
.bt-game-bet select,
.bt-form-full,
.bt-form-row input {
  width: 100%;
  margin-top: 0;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #e1e3e6;
  padding: 9px 12px;
  box-sizing: border-box;
}
.bt-form-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0;
  align-items: center;
}
.bt-form-row input { flex: 1; min-width: 120px; margin-top: 0; }
.bt-game-card__result {
  margin-top: 12px;
  min-height: 24px;
  font-size: 13px;
}
.bt-game-card__result .is-win { color: #4ade80; }
.bt-game-card__result .is-lose { color: #f87171; }

.bt-extra-feed__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 6px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
  font-size: 12px;
  color: #c7cdd8;
  animation: btFeedRowIn 0.45s ease both;
}
.bt-extra-feed__row:nth-child(1) { animation-delay: 0.02s; }
.bt-extra-feed__row:nth-child(2) { animation-delay: 0.05s; }
.bt-extra-feed__row:nth-child(3) { animation-delay: 0.08s; }
.bt-extra-feed__row:nth-child(4) { animation-delay: 0.11s; }
.bt-extra-feed__row:nth-child(5) { animation-delay: 0.14s; }
.bt-extra-feed__icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 15px;
}
.bt-extra-feed__win .bt-extra-feed__icon {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
}
.bt-extra-feed__lose .bt-extra-feed__icon {
  color: #f87171;
  background: rgba(248, 113, 113, 0.12);
}
.bt-extra-feed__who {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.bt-extra-feed__who b {
  color: #fff;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bt-extra-feed__who small {
  color: #8b95a8;
  font-size: 11px;
}
.bt-extra-feed__amount {
  font-weight: 700;
  font-size: 13px;
  flex: 0 0 auto;
}
.bt-extra-feed__win .bt-extra-feed__amount { color: #4ade80; }
.bt-extra-feed__lose .bt-extra-feed__amount { color: #f87171; }
.bt-extra-feed__win span { color: #4ade80; }
.bt-extra-feed__lose span { color: #f87171; }

.bt-feed-panel {
  position: relative;
  margin-top: 8px;
  padding: 16px 16px 12px;
  border-radius: 16px;
  border: 1px solid rgba(230, 57, 70, 0.22);
  background:
    linear-gradient(135deg, rgba(230, 57, 70, 0.12), transparent 42%),
    linear-gradient(180deg, #232326 0%, #18181a 100%);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}
.bt-feed-panel::before {
  content: '';
  position: absolute;
  inset: -40% auto auto -20%;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(230, 57, 70, 0.28), transparent 70%);
  animation: btFeedGlow 4.5s ease-in-out infinite;
  pointer-events: none;
}
.bt-feed-panel__head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.bt-feed-panel__title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
}
.bt-feed-panel__title i {
  color: #e63946;
  animation: btPulseSoft 1.6s ease-in-out infinite;
}
.bt-feed-panel__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #ffd166;
  background: rgba(255, 209, 102, 0.1);
  border: 1px solid rgba(255, 209, 102, 0.28);
}
.bt-feed-panel__badge i {
  color: #ef4444;
  animation: btPulseSoft 1.2s ease-in-out infinite;
}
.bt-feed-panel .bt-extra-feed {
  position: relative;
  z-index: 1;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}

@keyframes btFeedRowIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes btFeedGlow {
  0%, 100% { opacity: 0.55; transform: translate(0, 0) scale(1); }
  50% { opacity: 1; transform: translate(18px, 10px) scale(1.08); }
}

.bt-clan-top__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.bt-clan-top__pos {
  width: 36px;
  color: #ffd166;
  font-weight: 700;
}
.bt-clan-top__info { flex: 1; }
.bt-clan-top__info b { display: block; color: #fff; }
.bt-clan-top__info small { color: #8b95a8; }
.bt-clan-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 12px 0;
}
.bt-clan-stats div {
  background: #1a1a1a;
  border-radius: 10px;
  padding: 10px;
}
.bt-clan-stats span { display: block; color: #8b95a8; font-size: 11px; }
.bt-clan-stats b { color: #fff; }
.bt-clan-cols {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 14px;
}
@media (max-width: 991px) {
  .bt-clan-cols { grid-template-columns: 1fr; }
}
.bt-clan-member {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12px;
}
.bt-clan-member span { color: #8b95a8; }
.bt-clan-chat {
  max-height: 260px;
  overflow: auto;
  margin-bottom: 10px;
  background: #1a1a1a;
  border-radius: 10px;
  padding: 10px;
}
.bt-clan-chat__msg {
  margin-bottom: 8px;
  font-size: 12px;
}
.bt-clan-chat__msg b { color: #ff6b6b; margin-right: 6px; }
.bt-clan-chat__msg span { color: #e1e3e6; }
.bt-clan-war {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
}
.bt-clan-war b { display: block; color: #fff; margin-bottom: 4px; }
.bt-clan-war span { color: #8b95a8; }
.bt-clan-war__btns { margin-top: 8px; display: flex; gap: 8px; }

.bt-gifts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 991px) {
  .bt-gifts-grid { grid-template-columns: 1fr; }
}
.bt-gift-hist__row {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12px;
  color: #c7cdd8;
}

/* ── Banners & art ── */
.bt-extra-banner {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 18px;
  min-height: 160px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.bt-extra-banner > img {
  width: 100%;
  height: 180px;
  max-height: 180px;
  object-fit: cover;
  display: block;
  filter: saturate(1.1) contrast(1.05);
  transform: scale(1.02);
  animation: btBannerKen 18s ease-in-out infinite alternate;
}
/* Games used to show a 1920×1280 banner; keep any leftover markup capped */
.bt-extra-banner--games {
  min-height: 0;
  margin-bottom: 12px;
}
.bt-extra-banner--games > img {
  height: 110px !important;
  max-height: 110px !important;
}
.bt-extra-banner__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 18px 20px;
  background: linear-gradient(180deg, rgba(8, 4, 4, 0.15) 0%, rgba(8, 4, 4, 0.82) 100%);
}
.bt-clan-banner-crest {
  position: absolute;
  right: 18px;
  top: 10px;
  width: 96px;
  height: 96px;
  object-fit: contain;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 8px 18px rgba(230, 57, 70, 0.45));
  pointer-events: none;
}
.bt-game-card__art {
  position: relative;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -4px 0 12px;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 40%, rgba(230, 57, 70, 0.18), transparent 65%);
  overflow: hidden;
}
.bt-game-visual {
  width: 96px;
  height: 96px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.55));
  transition: transform 0.25s ease, filter 0.25s ease;
  will-change: transform;
}
.bt-game-card:hover .bt-game-visual {
  transform: translateY(-4px) scale(1.04);
}
.bt-game-fx {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
}
.bt-spark {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  left: 0;
  top: 0;
  opacity: 0;
  animation: btSpark 0.75s ease-out forwards;
}

/* ── Game animations ── */
.bt-game-visual.is-flip {
  animation: btCoinFlip 1.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.bt-game-visual.is-spin {
  animation: btRouletteSpin 2.15s cubic-bezier(0.12, 0.75, 0.08, 1);
}
.bt-game-visual.is-shake {
  animation: btMapShake 0.85s ease-in-out;
}
.bt-game-visual.is-reveal {
  animation: btMapReveal 0.5s ease-out;
}
.bt-game-visual.is-win {
  filter: drop-shadow(0 0 18px rgba(74, 222, 128, 0.75)) drop-shadow(0 10px 18px rgba(0, 0, 0, 0.55));
}
.bt-game-visual.is-lose {
  filter: drop-shadow(0 0 14px rgba(248, 113, 113, 0.55)) grayscale(0.25);
}
.bt-game-card.is-playing {
  border-color: rgba(230, 57, 70, 0.55);
  box-shadow: 0 0 0 1px rgba(230, 57, 70, 0.25), 0 12px 30px rgba(230, 57, 70, 0.12);
}
.bt-extra-btn.is-loading {
  opacity: 0.7;
  pointer-events: none;
  position: relative;
}
.bt-extra-btn.is-loading::after {
  content: '';
  width: 14px;
  height: 14px;
  margin-left: 8px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  display: inline-block;
  vertical-align: -2px;
  animation: btSpin 0.7s linear infinite;
}
.bt-result-pop { animation: btPopIn 0.45s cubic-bezier(0.2, 1.2, 0.3, 1); }
.is-wait { color: #ffd166; animation: btPulseSoft 1s ease-in-out infinite; }
.bt-bc-flash { animation: btBcFlash 0.65s ease; }
.bt-feed-flash { animation: btFeedFlash 0.45s ease; }

/* ── Clan animations / art ── */
.bt-clan-create-art,
.bt-clan-mine__crest {
  width: 96px;
  height: auto;
  filter: drop-shadow(0 8px 16px rgba(230, 57, 70, 0.35));
}
.bt-clan-create-art {
  text-align: center;
  margin-bottom: 8px;
}
.bt-clan-create-art img { width: 110px; }
.bt-clan-mine__head {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 8px;
}
.bt-clan-war-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.bt-clan-war-icon {
  width: 64px;
  height: auto;
  filter: drop-shadow(0 6px 14px rgba(124, 58, 237, 0.45));
}
.bt-clan-top__row {
  transition: transform 0.2s ease, background 0.2s ease;
  border-radius: 10px;
  padding-left: 8px;
  padding-right: 8px;
}
.bt-clan-top__row:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.03);
}
.bt-clan-chat__msg {
  animation: btPopIn 0.3s ease;
}

/* ── Entrance motion ── */
.bt-anim-fade-in {
  animation: btFadeUp 0.7s ease both;
}
.bt-anim-card {
  animation: btFadeUp 0.65s ease both;
  animation-delay: calc(var(--i, 0) * 0.08s);
}
.bt-anim-pop {
  animation: btPopIn 0.5s cubic-bezier(0.2, 1.3, 0.3, 1) both;
  animation-delay: calc(var(--i, 0) * 0.07s);
}
.bt-anim-float {
  animation: btFloat 3.2s ease-in-out infinite;
}
.bt-anim-pulse {
  animation: btPulseSoft 2s ease-in-out infinite;
}
.bt-anim-clash {
  animation: btClash 2.8s ease-in-out infinite;
}
.bt-anim-clash-strong {
  animation: btClashStrong 0.7s ease;
}
.bt-anim-pulse.bt-bc-icon { width: 36px; height: 36px; }

@keyframes btCoinFlip {
  0% { transform: rotateY(0) scale(1); }
  35% { transform: rotateY(720deg) scale(1.15) translateY(-18px); }
  70% { transform: rotateY(1260deg) scale(1.05) translateY(-6px); }
  100% { transform: rotateY(1440deg) scale(1); }
}
@keyframes btRouletteSpin {
  0% { transform: rotate(0) scale(1); }
  80% { transform: rotate(1180deg) scale(1.08); }
  100% { transform: rotate(1260deg) scale(1); }
}
@keyframes btMapShake {
  0%, 100% { transform: translateX(0) rotate(0); }
  20% { transform: translateX(-10px) rotate(-4deg); }
  40% { transform: translateX(10px) rotate(4deg); }
  60% { transform: translateX(-8px) rotate(-3deg); }
  80% { transform: translateX(8px) rotate(3deg); }
}
@keyframes btMapReveal {
  0% { transform: scale(0.7); opacity: 0.4; filter: blur(4px); }
  100% { transform: scale(1); opacity: 1; filter: blur(0); }
}
@keyframes btSpark {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}
@keyframes btFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes btPopIn {
  0% { opacity: 0; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes btFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes btPulseSoft {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.06); opacity: 0.85; }
}
@keyframes btClash {
  0%, 100% { transform: rotate(-3deg) scale(1); }
  50% { transform: rotate(3deg) scale(1.05); }
}
@keyframes btClashStrong {
  0% { transform: scale(1) rotate(0); }
  30% { transform: scale(1.25) rotate(-12deg); }
  60% { transform: scale(1.15) rotate(10deg); }
  100% { transform: scale(1) rotate(0); }
}
@keyframes btBcFlash {
  0% { color: #fff; text-shadow: 0 0 12px #ffd166; transform: scale(1.15); }
  100% { color: #ffd166; text-shadow: none; transform: scale(1); }
}
@keyframes btFeedFlash {
  0% { background: rgba(230, 57, 70, 0.12); }
  100% { background: transparent; }
}
@keyframes btSpin {
  to { transform: rotate(360deg); }
}
@keyframes btBannerKen {
  from { transform: scale(1.02) translateY(0); }
  to { transform: scale(1.08) translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
  .bt-game-visual.is-flip,
  .bt-game-visual.is-spin,
  .bt-game-visual.is-shake,
  .bt-anim-float,
  .bt-anim-pulse,
  .bt-anim-clash,
  .bt-extra-banner > img {
    animation: none !important;
  }
}

/* ── Coin 3D (орёл / решка) ── */
.bt-game-card__art--stage {
  height: 190px;
  flex-direction: column;
  gap: 6px;
}
.bt-coin-stage {
  width: 100px;
  height: 100px;
  perspective: 900px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bt-coin {
  width: 88px;
  height: 88px;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateY(0deg);
}
.bt-coin__face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.55), inset 0 0 0 2px rgba(255, 209, 102, 0.35);
  background: radial-gradient(circle at 35% 30%, #3a2a12, #1a1208 70%);
}
.bt-coin__face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  pointer-events: none;
}
.bt-coin__face span {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #ffd166;
  text-shadow: 0 1px 3px #000;
  background: rgba(0, 0, 0, 0.55);
  padding: 2px 8px;
  border-radius: 999px;
}
.bt-coin__face--tails { transform: rotateY(180deg); }
.bt-coin.is-win { filter: drop-shadow(0 0 16px rgba(74, 222, 128, 0.8)); }
.bt-coin.is-lose { filter: drop-shadow(0 0 12px rgba(248, 113, 113, 0.55)); }

/* ── Roulette wheel ── */
.bt-roulette-stage {
  position: relative;
  width: 108px;
  height: 108px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bt-roulette-pointer {
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 16px solid #ffd166;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}
.bt-roulette-pointer::after {
  content: "";
  position: absolute;
  top: -18px;
  left: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffd166;
  box-shadow: 0 0 8px #ffd166;
}
.bt-roulette-wheel {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  position: relative;
  background: conic-gradient(
    from -12deg,
    #16a34a 0deg 24deg,
    #dc2626 24deg 48deg,
    #dc2626 48deg 72deg,
    #dc2626 72deg 96deg,
    #dc2626 96deg 120deg,
    #dc2626 120deg 144deg,
    #dc2626 144deg 168deg,
    #dc2626 168deg 192deg,
    #111827 192deg 216deg,
    #111827 216deg 240deg,
    #111827 240deg 264deg,
    #111827 264deg 288deg,
    #111827 288deg 312deg,
    #111827 312deg 336deg,
    #111827 336deg 360deg
  );
  box-shadow:
    0 0 0 3px #1f2937,
    0 0 0 5px rgba(255, 209, 102, 0.45),
    0 12px 24px rgba(0, 0, 0, 0.55);
  border: 3px solid #374151;
}
.bt-roulette-hub {
  position: absolute;
  inset: 34%;
  border-radius: 50%;
  overflow: hidden;
  background: #111;
  border: 2px solid #ffd166;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.bt-roulette-hub img {
  width: 120%;
  height: 120%;
  object-fit: cover;
  opacity: 0.85;
}
.bt-roulette-glow {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}
.bt-roulette-glow.is-on { opacity: 1; }
.bt-roulette-glow.is-red { box-shadow: inset 0 0 28px rgba(220, 38, 38, 0.85), 0 0 22px rgba(220, 38, 38, 0.55); }
.bt-roulette-glow.is-black { box-shadow: inset 0 0 28px rgba(148, 163, 184, 0.55), 0 0 18px rgba(255, 255, 255, 0.2); }
.bt-roulette-glow.is-green { box-shadow: inset 0 0 28px rgba(22, 163, 74, 0.9), 0 0 22px rgba(74, 222, 128, 0.55); }
.bt-roulette-stage.is-spinning .bt-roulette-pointer {
  animation: btPointerNudge 0.2s ease-in-out infinite;
}

.bt-game-outcome {
  min-height: 28px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1px;
  opacity: 0;
  transform: scale(0.8);
  transition: 0.25s ease;
  text-align: center;
}
.bt-game-outcome.is-show {
  opacity: 1;
  transform: scale(1);
  animation: btPopIn 0.45s cubic-bezier(0.2, 1.3, 0.3, 1);
}
.bt-game-outcome.is-heads strong { color: #ffd166; }
.bt-game-outcome.is-tails strong { color: #fca5a5; }
.bt-game-outcome.is-red strong { color: #f87171; }
.bt-game-outcome.is-black strong { color: #e5e7eb; }
.bt-game-outcome.is-green strong { color: #4ade80; }
.bt-game-outcome.is-win strong { text-shadow: 0 0 12px rgba(74, 222, 128, 0.55); }
.bt-game-outcome.is-lose strong { text-shadow: 0 0 10px rgba(248, 113, 113, 0.35); }

@keyframes btPointerNudge {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(2px); }
}

/* ── Clan HQ ── */
.bt-clan-hq {
  position: relative;
  margin-bottom: 16px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(230, 57, 70, 0.22);
  background:
    linear-gradient(135deg, rgba(230, 57, 70, 0.14), transparent 40%),
    linear-gradient(180deg, #242426 0%, #171719 100%);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
  isolation: isolate;
  max-width: 100%;
  box-sizing: border-box;
}
.bt-clan-hq__hero {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
  position: relative;
  z-index: 2;
  overflow: hidden;
  min-width: 0;
}
.bt-clan-hq__meta {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.bt-clan-hq__crest {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: contain;
  border: 3px solid rgba(255, 209, 102, 0.45);
  box-shadow: 0 0 0 4px rgba(230, 57, 70, 0.18), 0 10px 24px rgba(0, 0, 0, 0.45);
  background: transparent;
  flex: 0 0 auto;
  padding: 4px;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
}
.bt-clan-hq__title {
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.25;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.bt-clan-hq__desc {
  color: #9aa3b5;
  font-size: 13px;
  margin: 4px 0 8px;
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: anywhere;
  max-width: 100%;
}
.bt-clan-hq__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.bt-clan-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  color: #c7cdd8;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.bt-clan-stats--hq {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 14px;
}
@media (max-width: 991px) {
  .bt-clan-stats--hq { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bt-clan-hq__hero { flex-direction: column; text-align: center; }
  .bt-clan-hq__chips { justify-content: center; }
}

.bt-clan-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  margin-bottom: 14px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  max-width: 100%;
}
.bt-clan-tabs::-webkit-scrollbar { height: 4px; }
.bt-clan-tabs::-webkit-scrollbar-thumb {
  background: rgba(230, 57, 70, 0.45);
  border-radius: 4px;
}
.bt-clan-tab {
  border: 0;
  background: transparent;
  color: #9aa3b5;
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
  white-space: nowrap;
  flex: 0 0 auto;
}
.bt-clan-tab:hover { color: #fff; background: rgba(255, 255, 255, 0.04); }
.bt-clan-tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, rgba(230, 57, 70, 0.85), rgba(124, 58, 237, 0.55));
  box-shadow: 0 6px 16px rgba(230, 57, 70, 0.25);
}
.bt-clan-pane { display: none !important; }
.bt-clan-pane.is-active { display: block !important; animation: btFadeUp 0.35s ease; }
.bt-clan-tabpanes {
  position: relative;
  z-index: 1;
  overflow: visible;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.bt-clan-role {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #d1d5db;
}
.bt-clan-role--leader {
  color: #ffd166;
  border-color: rgba(255, 209, 102, 0.35);
  background: rgba(255, 209, 102, 0.12);
}
.bt-clan-role--officer {
  color: #c084fc;
  border-color: rgba(192, 132, 252, 0.35);
  background: rgba(192, 132, 252, 0.12);
}
.bt-clan-role--member {
  color: #93c5fd;
  border-color: rgba(147, 197, 253, 0.28);
  background: rgba(96, 165, 250, 0.1);
}

.bt-clan-member {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.bt-clan-member__av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}
.bt-clan-member__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bt-clan-member__info b a { color: #fff; }
.bt-clan-member__info small { color: #8b95a8; font-size: 11px; }
.bt-clan-member__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}

.bt-extra-btn--xs {
  padding: 5px 8px;
  font-size: 11px;
  border-radius: 8px;
}
.bt-extra-btn--danger {
  background: linear-gradient(135deg, #b91c1c, #ef4444);
  border: 0;
  color: #fff;
}
.bt-extra-btn--danger:hover { filter: brightness(1.08); }

.bt-clan-top-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.bt-clan-sort {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.bt-clan-sort__btn {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: #9aa3b5;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}
.bt-clan-sort__btn:hover { color: #fff; border-color: rgba(230, 57, 70, 0.35); }
.bt-clan-sort__btn.is-active {
  color: #fff;
  border-color: rgba(230, 57, 70, 0.55);
  background: rgba(230, 57, 70, 0.22);
  box-shadow: 0 0 0 1px rgba(230, 57, 70, 0.2);
}
.bt-clan-top.is-loading { opacity: 0.55; pointer-events: none; }
.bt-clan-top__crest {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: contain;
  border: 1px solid rgba(255, 209, 102, 0.35);
  flex: 0 0 auto;
  background: transparent;
}

/* Crest editor */
.bt-crest-editor {
  position: relative;
  z-index: 2;
  isolation: isolate;
  margin-top: 4px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bt-crest-editor__stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
  overflow: visible;
}
@media (max-width: 767px) {
  .bt-crest-editor__stage { grid-template-columns: 1fr; justify-items: center; }
}
#bt-crest-canvas {
  width: 100%;
  max-width: 360px;
  height: auto;
  aspect-ratio: 1;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background-color: #1a1a1c;
  background-image:
    linear-gradient(45deg, #2a2a2e 25%, transparent 25%),
    linear-gradient(-45deg, #2a2a2e 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #2a2a2e 75%),
    linear-gradient(-45deg, transparent 75%, #2a2a2e 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  cursor: crosshair;
  touch-action: none;
  display: block;
  position: relative;
  z-index: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.bt-crest-preview {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 209, 102, 0.4);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  background:
    linear-gradient(45deg, #2a2a2e 25%, transparent 25%),
    linear-gradient(-45deg, #2a2a2e 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #2a2a2e 75%),
    linear-gradient(-45deg, transparent 75%, #2a2a2e 75%);
  background-size: 12px 12px;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
  background-color: #1a1a1c;
}
.bt-crest-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: transparent;
}
.bt-crest-editor__tools {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bt-crest-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  position: relative;
}
.bt-crest-tool {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #2a2a2b;
  color: #e1e3e6;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  position: relative;
}
.bt-crest-tool.is-active {
  border-color: #e63946;
  box-shadow: 0 0 0 1px rgba(230, 57, 70, 0.35);
  color: #fff;
}
.bt-crest-size-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 420px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 3;
}
.bt-crest-size-label {
  flex: 0 0 auto;
  color: #c7cdd8;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
#bt-crest-size {
  flex: 1;
  min-width: 0;
  width: auto;
  margin: 0;
  position: relative;
  z-index: 1;
  accent-color: #e63946;
}
.bt-crest-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  position: relative;
}
.bt-crest-color {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
}
.bt-crest-color.is-active {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(230, 57, 70, 0.55);
}
#bt-crest-color-pick {
  width: 34px;
  height: 28px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.bt-crest-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  position: relative;
  z-index: 3;
}
.bt-crest-actions .bt-extra-btn {
  position: relative;
  z-index: 1;
}

/* Crest quick layers */
.bt-crest-quick {
  margin: 0 0 16px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.bt-crest-quick__head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 10px;
}
.bt-crest-quick__head b { color: #fff; font-size: 14px; }
.bt-crest-quick__head span { color: #9aa3b2; font-size: 12px; }
.bt-crest-layer-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.bt-crest-layer-tab {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #2a2a2b;
  color: #c7cdd8;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.bt-crest-layer-tab.is-active {
  border-color: #e63946;
  color: #fff;
  background: rgba(230, 57, 70, 0.2);
}
.bt-crest-layer-grid {
  display: none;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.bt-crest-layer-grid.is-active { display: grid; }
@media (max-width: 560px) {
  .bt-crest-layer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.bt-crest-layer-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
  cursor: pointer;
  color: #c7cdd8;
  font-size: 11px;
}
.bt-crest-layer-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 8px;
  background:
    linear-gradient(45deg, #2a2a2e 25%, transparent 25%),
    linear-gradient(-45deg, #2a2a2e 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #2a2a2e 75%),
    linear-gradient(-45deg, transparent 75%, #2a2a2e 75%);
  background-size: 12px 12px;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
  background-color: #1a1a1c;
}
.bt-crest-layer-item.is-active {
  border-color: #e63946;
  box-shadow: 0 0 0 1px rgba(230, 57, 70, 0.35);
  color: #fff;
}
.bt-crest-layer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.bt-crest-upload-hint {
  margin: 0;
  color: #9aa3b2;
  font-size: 12px;
  line-height: 1.4;
}
.bt-crest-upload-hint b { color: #ffd166; }

/* Ready emblems */
.bt-crest-ready-block,
.bt-crest-text-block {
  margin: 0 0 14px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  position: relative;
  z-index: 2;
  isolation: isolate;
  overflow: visible;
}
.bt-crest-ready-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
@media (max-width: 700px) {
  .bt-crest-ready-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.bt-crest-ready-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
  cursor: pointer;
  color: #c7cdd8;
  font-size: 11px;
}
.bt-crest-ready-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  background: #1a1a1c;
}
.bt-crest-ready-item.is-active {
  border-color: #e63946;
  box-shadow: 0 0 0 1px rgba(230, 57, 70, 0.35);
  color: #fff;
}
.bt-crest-text-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  position: relative;
  z-index: 2;
}
.bt-crest-text-fields #bt-crest-text {
  flex: 1 1 180px;
  min-width: 160px;
  margin: 0;
  position: relative;
  z-index: 1;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #e1e3e6;
  padding: 9px 12px;
  box-sizing: border-box;
}
.bt-crest-text-controls {
  display: grid;
  grid-template-columns: minmax(160px, 1.4fr) auto auto auto;
  gap: 12px;
  align-items: end;
  position: relative;
  z-index: 2;
}
@media (max-width: 700px) {
  .bt-crest-text-controls {
    grid-template-columns: 1fr 1fr;
  }
  .bt-crest-text-control--btns {
    grid-column: 1 / -1;
  }
}
.bt-crest-text-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  z-index: 1;
  min-width: 0;
}
.bt-crest-text-control__label {
  display: block;
  color: #c7cdd8;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
.bt-crest-text-control--color {
  width: 72px;
}
.bt-crest-text-control--btns {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
#bt-crest-text-size {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  height: 28px;
  position: relative;
  z-index: 1;
  accent-color: #e63946;
  background: transparent;
  border: 0;
  box-shadow: none;
}
#bt-crest-text-color,
#bt-crest-text-stroke {
  display: block;
  width: 48px !important;
  min-width: 48px !important;
  max-width: 48px !important;
  height: 36px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 8px !important;
  background: #2a2a2b !important;
  cursor: pointer;
  position: relative !important;
  z-index: 2 !important;
  float: none !important;
  flex: none !important;
  box-sizing: border-box !important;
  -webkit-appearance: none;
  appearance: none;
}
#bt-crest-text-color::-webkit-color-swatch-wrapper,
#bt-crest-text-stroke::-webkit-color-swatch-wrapper {
  padding: 3px;
}
#bt-crest-text-color::-webkit-color-swatch,
#bt-crest-text-stroke::-webkit-color-swatch {
  border: 0;
  border-radius: 5px;
}
#bt-crest-font {
  flex: 0 0 150px;
  min-width: 140px;
  margin: 0;
  background: #2a2a2b;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 10px;
  position: relative;
  z-index: 1;
}
#bt-crest-canvas {
  max-width: 360px;
}

/* Clan chat tabs */
.bt-clan-chat-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.bt-clan-chat-tab {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #2a2a2b;
  color: #c7cdd8;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.bt-clan-chat-tab.is-active {
  border-color: #e63946;
  color: #fff;
  background: rgba(230, 57, 70, 0.2);
}
.bt-clan-chat-pane { display: none; }
.bt-clan-chat-pane.is-active { display: block; }
.bt-clan-chat-locked { opacity: 0.55; }

/* Clan HQ extension */
.bt-clan-role--deputy {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.15);
}
.bt-clan-chat--rich {
  position: relative;
  max-height: 480px;
  min-height: 280px;
  overflow: auto;
  padding: 10px;
}
.bt-clan-chat__msg--rich {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
}
.bt-clan-chat__avwrap {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  position: relative;
  display: block;
  text-decoration: none;
}
/* Override main-chat absolute frame (--chat) that was pulling avatars onto the input */
.bt-clan-chat .bt-avatar-frame--chat,
.bt-clan-chat .bt-avatar-frame--clan-msg,
.bt-clan-chat__avwrap .bt-avatar-frame {
  position: relative !important;
  bottom: auto !important;
  left: auto !important;
  top: auto !important;
  right: auto !important;
  width: 40px !important;
  height: 40px !important;
  padding: 2px;
  display: block;
  box-sizing: border-box;
  overflow: hidden;
}
.bt-clan-chat .bt-avatar-frame--chat::before,
.bt-clan-chat .bt-avatar-frame--chat::after,
.bt-clan-chat .bt-avatar-frame--clan-msg::before,
.bt-clan-chat .bt-avatar-frame--clan-msg::after {
  /* keep frame effects inside the avatar cell */
  pointer-events: none;
}
.bt-clan-chat__av,
.bt-clan-chat__avwrap img,
.bt-clan-chat .bt-avatar-frame img {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto;
  position: relative !important;
  bottom: auto !important;
  float: none !important;
}
.bt-clan-chat__body { flex: 1; min-width: 0; }
.bt-clan-chat__head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 2px;
}
.bt-clan-chat__role {
  font-size: 10px;
  color: #9aa3b2;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
}
.bt-clan-chat__text { color: #e1e3e6; font-size: 13px; word-break: break-word; }
.bt-clan-chat-pane .bt-form-row {
  position: relative;
  z-index: 2;
  flex-wrap: nowrap;
  overflow: visible;
}
.bt-clan-chat-pane .bt-form-row input {
  flex: 1 1 auto;
  min-width: 0;
  padding-left: 12px;
}
.bt-clan-rules-view {
  white-space: pre-wrap;
  color: #c7cdd8;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  padding: 12px;
  min-height: 48px;
  margin: 8px 0 14px;
  font-family: inherit;
  font-size: 13px;
}
.bt-clan-app {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 10px;
  margin-bottom: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}
.bt-clan-app span { display: block; color: #9aa3b2; font-size: 12px; margin-top: 4px; }
.bt-clan-app__btns { display: flex; gap: 6px; flex-shrink: 0; }
.bt-clan-wall__post {
  padding: 12px;
  margin: 10px 0;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.bt-clan-wall__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.bt-clan-wall__img {
  max-width: 100%;
  border-radius: 10px;
  margin-top: 8px;
}
.bt-clan-wall-compose {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  position: relative;
}
/* Completely remove native file picker from layout (theme styles it as a blue bar) */
.bt-clan-wall-compose > input[type="file"],
.bt-clan-wall-file-hidden {
  display: none !important;
}
.bt-clan-wall-compose textarea,
#bt-clan-wall-body {
  display: block;
  width: 100%;
  min-height: 96px;
  max-width: 100%;
  box-sizing: border-box;
  resize: vertical;
  margin: 0;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #e1e3e6;
  padding: 12px 14px;
  position: relative;
  z-index: 1;
}
.bt-clan-wall-compose__bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
  position: relative;
  z-index: 2;
}
.bt-clan-wall-filebtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #2a2a2b;
  color: #e1e3e6;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
  position: relative;
  float: none;
  margin: 0;
  line-height: 1.2;
  overflow: hidden;
}
.bt-clan-wall-filebtn:hover {
  background: #343436;
  color: #fff;
}
.bt-clan-wall-filebtn.has-file {
  border-color: rgba(230, 57, 70, 0.55);
  color: #fff;
  background: rgba(230, 57, 70, 0.18);
}
/* Invisible native input over the Фото button — works without display:none */
.bt-clan-wall-filebtn input[type="file"],
#bt-clan-wall-file {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  margin-left: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 10px !important;
  opacity: 0 !important;
  cursor: pointer !important;
  font-size: 100px !important;
  line-height: 1 !important;
  background: transparent !important;
  box-shadow: none !important;
  display: block !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  z-index: 3;
}
.bt-clan-wall-filename {
  flex: 1 1 auto;
  min-width: 0;
  color: #9aa3b2;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bt-clan-wall-filename[hidden] {
  display: none !important;
}
.bt-clan-wall-publish {
  flex: 0 0 auto;
  margin-left: auto;
  white-space: nowrap;
  box-sizing: border-box;
  padding: 8px 16px;
  font-size: 12px;
}
@media (max-width: 520px) {
  .bt-clan-wall-compose__bar {
    flex-wrap: wrap;
  }
  .bt-clan-wall-publish {
    width: 100%;
    margin-left: 0;
  }
}
.bt-clan-forum__topic {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px;
  margin: 6px 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
  color: #e1e3e6;
  cursor: pointer;
}
.bt-clan-forum__topic span { display: block; color: #9aa3b2; font-size: 12px; margin-top: 4px; }
.bt-clan-forum__post {
  padding: 10px;
  margin: 8px 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}
.bt-clan-forum__post span { display: block; margin-top: 4px; color: #c7cdd8; }
.bt-clan-ach {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  margin: 8px 0;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 209, 102, 0.08), rgba(230, 57, 70, 0.08));
  border: 1px solid rgba(255, 209, 102, 0.2);
}
.bt-clan-ach__icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(230, 57, 70, 0.2);
  color: #ffd166;
  font-size: 22px;
}
.bt-clan-ach span { display: block; color: #9aa3b2; font-size: 12px; margin-top: 2px; }
.bt-clan-perms {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0;
  position: relative;
  z-index: 1;
}
@media (max-width: 900px) {
  .bt-clan-perms { grid-template-columns: 1fr; }
}
.bt-clan-perms__col {
  padding: 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
  min-width: 0;
}
.bt-clan-perms__title {
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
  line-height: 1.3;
}
.bt-clan-perms__item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12px;
  color: #c7cdd8;
  margin: 6px 0;
  cursor: pointer;
  line-height: 1.35;
  position: relative;
}
/* Override GrayMound global checkbox offset that leaks into HQ */
.bt-clan-hq input[type="checkbox"],
.bt-clan-perms input[type="checkbox"],
.bt-clan-perms__item input[type="checkbox"] {
  position: static !important;
  top: auto !important;
  left: auto !important;
  margin: 2px 0 0 0 !important;
  margin-left: 0 !important;
  float: none !important;
  width: 16px !important;
  height: 16px !important;
  flex: 0 0 16px;
  accent-color: #e63946;
}
#bt-clan-join-mode {
  width: 100%;
  margin: 8px 0;
  background: #1a1a1a;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 9px 12px;
}
.bt-clan-public { margin-bottom: 16px; }

/* Home clans top */
.bt-home-clans-block {
  padding: 12px;
  margin-top: 12px;
  min-height: 220px;
}
.bt-home-clans__icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-block;
  flex: 0 0 auto;
  background: linear-gradient(135deg, #3b82f6, #ef4444);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.35);
  animation: btHomeClanPulse 2.4s ease-in-out infinite;
  position: relative;
}
.bt-home-clans__icon::after {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.85);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  animation: btHomeClanGlyph 2.4s ease-in-out infinite;
}
@keyframes btHomeClanPulse {
  0%, 100% {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.45);
    transform: scale(1);
  }
  50% {
    background: linear-gradient(135deg, #ef4444, #e63946);
    box-shadow: 0 0 14px rgba(230, 57, 70, 0.55);
    transform: scale(1.06);
  }
}
@keyframes btHomeClanGlyph {
  0%, 100% { opacity: 0.95; filter: hue-rotate(0deg); }
  50% { opacity: 1; filter: hue-rotate(-20deg); }
}
.bt-home-clans {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  max-height: 210px;
  overflow: auto;
}
.bt-home-clans__row {
  display: grid;
  grid-template-columns: 28px 28px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 8px;
  text-decoration: none !important;
  color: #e1e3e6 !important;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}
.bt-home-clans__row:hover {
  border-color: rgba(230, 57, 70, 0.35);
  background: rgba(230, 57, 70, 0.08);
}
.bt-home-clans__rank {
  font-size: 11px;
  font-weight: 800;
  color: #60a5fa;
  animation: btHomeRankShift 3s ease-in-out infinite;
}
.bt-home-clans__row--1 .bt-home-clans__rank { animation-delay: 0s; }
.bt-home-clans__row--2 .bt-home-clans__rank { animation-delay: 0.2s; }
.bt-home-clans__row--3 .bt-home-clans__rank { animation-delay: 0.4s; }
@keyframes btHomeRankShift {
  0%, 100% { color: #60a5fa; }
  50% { color: #e63946; }
}
.bt-home-clans__crest {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: contain;
  border: 1px solid rgba(255, 209, 102, 0.3);
  background: transparent;
}
.bt-home-clans__info {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bt-home-clans__info b { color: #ffd166; margin-right: 4px; }
.bt-home-clans__rating {
  font-size: 12px;
  font-weight: 800;
  color: #e63946;
}
.bt-home-clans__empty {
  color: #9aa3b2;
  font-size: 12px;
  padding: 10px 0;
}
.bt-home-clans__more {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  color: #60a5fa !important;
  text-decoration: none !important;
}
.bt-home-clans__more:hover { color: #e63946 !important; }

/* Chat / profile / sidebar clan tags */
.bt-chat-clan {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ffd166 !important;
  background: rgba(230, 57, 70, 0.18);
  border: 1px solid rgba(255, 209, 102, 0.28);
  text-decoration: none !important;
  vertical-align: middle;
  transition: 0.2s ease;
}
.bt-chat-clan:hover {
  background: rgba(230, 57, 70, 0.32);
  color: #fff !important;
}
.bt-clan-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
  padding: 5px 10px 5px 5px;
  border-radius: 999px;
  background: rgba(230, 57, 70, 0.12);
  border: 1px solid rgba(230, 57, 70, 0.28);
  color: #ffd166;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3 !important;
  max-width: 100%;
  position: relative;
  z-index: 1;
}
.bt-clan-badge img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.bt-clan-badge span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bt-clan-badge:hover { color: #fff; border-color: rgba(255, 209, 102, 0.45); }

/* Profile: .texxt has line-height:0 globally — restore for clan badge */
.block_fbrs--profile {
  height: auto !important;
  min-height: 88px;
  overflow: visible !important;
  align-items: flex-start !important;
}
.block_fbrs--profile .block_fbrs__row {
  align-items: flex-start;
}
.block_fbrs--profile .texxt {
  line-height: 1.35 !important;
  gap: 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding-top: 2px;
}
.block_fbrs--profile .username {
  line-height: 1.3 !important;
  margin: 0;
}
.block_fbrs--profile .lastname {
  line-height: 1.3 !important;
  margin: 0;
  display: block;
}
.block_fbrs--profile .block_fbrs__edit {
  align-self: flex-start;
  margin-top: 4px;
}

/* Sidebar clan row */
.bt-sidebar-clan {
  display: flex !important;
  align-items: center;
  justify-content: flex-start !important;
  gap: 10px;
  margin-top: 8px !important;
  margin-bottom: 8px !important;
  text-decoration: none !important;
  border-color: rgba(230, 57, 70, 0.55) !important;
}
.bt-sidebar-clan__left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.bt-sidebar-clan__crest {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 209, 102, 0.35);
  flex-shrink: 0;
}
.bt-sidebar-clan .setting-sidebar {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.block_mini_profile > a.balance_navigation {
  margin-top: 2px;
}

/* BJ entry on /games — same footprint as other cards in 2×2 grid */
.bt-game-card--link {
  text-decoration: none !important;
  color: inherit !important;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s;
}
.bt-game-card--link:hover {
  transform: translateY(-2px);
  border-color: rgba(200, 160, 70, 0.55);
  color: inherit !important;
}
.bt-game-card--link .bt-extra-btn {
  display: block;
  text-align: center;
  pointer-events: none;
  margin-top: auto;
}
.bt-game-card--link .bt-bj-card-thumb {
  width: auto;
  max-width: 110px;
  max-height: 80px;
  height: 80px;
  min-height: 0;
  object-fit: cover;
  object-position: center 42%;
  border-radius: 10px;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.45));
}
.bt-games-page .bt-feed-panel {
  margin-top: 4px;
}
.bt-games-page > .top_info,
.bt-bj-page > .top_info {
  margin-top: 0 !important;
  margin-bottom: 8px;
}

