/* Bloody Tear — Cases & BC System */
:root {
  --bt-bg-panel: #212121;
  --bt-border: rgba(255, 255, 255, 0.08);
  --bt-text: #e1e3e6;
  --bt-text-muted: #8b95a8;
  --bt-text-dim: #6b7280;
  --bt-cyan: #00d4ff;
  --bt-red-bright: #ff2d2d;
  --bt-radius: 14px;
  --bt-glow-red: 0 0 12px rgba(230, 57, 70, 0.4);
  --bt-glow-split: 0 0 20px rgba(255, 45, 45, 0.25), 0 0 20px rgba(0, 212, 255, 0.15);
  --bt-gradient-split: linear-gradient(90deg, #ff2d2d, #9333ea, #00d4ff);
  --bt-gradient-btn: linear-gradient(135deg, #e63946 0%, #b71c1c 55%, #7c1a1a 100%);
}

.button_sortion--bt {
  position: relative !important;
  overflow: hidden !important;
  background-color: #2a2a2b !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  padding: 0 !important;
  width: 110px !important;
  height: 98px !important;
  min-height: 98px !important;
  max-height: 98px !important;
  flex: 0 0 110px !important;
  display: block !important;
  box-sizing: border-box !important;
}

.button_sortion--bt.bt-card-shop {
  background-image: url('../img/bt-card-shop.png') !important;
}

.button_sortion--bt.bt-card-support {
  background-image: url('../img/bt-card-support.png') !important;
}

.button_sortion--bt.bt-card-trophy {
  background-image: url('../img/bt-card-trophy.png') !important;
}

.button_sortion--bt:hover {
  opacity: 0.92;
  filter: brightness(1.05);
}

.button_sortion--bt .bt-card-img {
  display: none !important;
}

.button_sortion--bt .button_sortion__content {
  position: absolute !important;
  inset: 0 !important;
  z-index: 1;
  padding: 0 8px 7px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
  min-height: 0 !important;
  height: auto !important;
  box-sizing: border-box !important;
  background: linear-gradient(to top, rgba(10, 5, 5, 0.92) 0%, rgba(10, 5, 5, 0.55) 35%, transparent 62%) !important;
  pointer-events: none;
}

.button_sortion--bt .button_sortion__content > * {
  pointer-events: auto;
}

.bt-bc-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  border-radius: 50%;
  background: transparent;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.55));
  image-rendering: auto;
}

/* Убирает белый/светлый фон у PNG на тёмном UI (предметы) */
.bt-icon-nobg {
  background: transparent !important;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.45));
}

/* Убирает чёрный фон у PNG на тёмном UI (кейсы) — без правки файлов */
.bt-icon-nobg-dark {
  background: transparent !important;
  mix-blend-mode: screen;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.45));
}

/* BC в шапке — строка: ₽ | + | BC (без серого фона) */
.wapper .header ul.user-menu > li.balance {
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1.2 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin-right: 8px !important;
}

.wapper .header ul.user-menu > li.balance .balance-header-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
  line-height: 1;
}

.wapper .header ul.user-menu > li.balance .balance-rub {
  line-height: 1 !important;
  white-space: nowrap;
  position: static !important;
  top: auto !important;
  padding-left: 0 !important;
  font-size: 11px !important;
  display: inline !important;
}

.wapper .header ul.user-menu > li.balance .pursee-button {
  float: none !important;
  margin-left: 0 !important;
  margin-top: 0 !important;
  top: 0 !important;
  flex-shrink: 0;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 27px !important;
  height: 27px !important;
  padding: 0 !important;
  font-size: 18px;
  line-height: 1 !important;
}

.wapper .header ul.user-menu > li.balance .pursee-button:hover,
.wapper .header ul.user-menu > li.balance .pursee-button:active {
  float: none !important;
  margin-left: 0 !important;
  top: 0 !important;
}

.wapper .header ul.user-menu > li.balance a.balance-bc--header {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center;
  gap: 6px;
  width: auto !important;
  height: 27px !important;
  min-height: 27px !important;
  margin: 0 !important;
  padding: 0 8px 0 4px !important;
  box-sizing: border-box;
  background: rgba(230, 57, 70, 0.12);
  border: 1px solid rgba(230, 57, 70, 0.25);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  color: #e1e3e6;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1 !important;
  flex-shrink: 0;
  vertical-align: middle;
}

.wapper .header ul.user-menu > li.balance a.balance-bc--header:hover {
  color: #fff;
  text-decoration: none;
  box-shadow: 0 0 8px rgba(230, 57, 70, 0.25);
}

.wapper .header ul.user-menu > li.balance a.balance-bc--header .bt-bc-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: block;
}

.wapper .header ul.user-menu > li.balance a.balance-bc--header .balance-bc__text {
  display: inline-block;
  line-height: 1 !important;
  font-size: 11px;
  font-weight: 600;
  position: static !important;
  top: auto !important;
  padding: 0 !important;
  margin: 0;
  white-space: nowrap;
}

.wapper .header ul.user-menu > li.balance a.balance-bc--header .balance-bc__text span {
  position: static !important;
  top: auto !important;
  padding-left: 0 !important;
  line-height: 1 !important;
  font-size: inherit !important;
  font-weight: inherit;
  display: inline !important;
}

/* ── Сайдбар: BC как строка баланса ── */
.balance-bc-sidebar {
  margin-bottom: 6px;
  border-color: rgba(230, 57, 70, 0.35);
  background: rgba(230, 57, 70, 0.06);
}

.balance-bc-sidebar__link {
  display: block;
  width: 100%;
  color: inherit;
  text-decoration: none;
}

.balance-bc-sidebar__link:hover {
  color: #fff;
  text-decoration: none;
}

.balance-bc-sidebar__left {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.balance-bc-sidebar .bt-bc-icon {
  width: 38px;
  height: 38px;
}

.balance-bc-sidebar .setting-sidebar {
  line-height: 1.2;
}

/* BC в меню EDIT профиля (админ) */
.block_fbrs--profile {
  position: relative;
  flex-direction: column;
  align-items: stretch;
  height: auto;
  min-height: 88px;
  padding: 16px;
  overflow: visible;
}

.block_fbrs--profile .block_fbrs__row {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 64px;
  gap: 12px;
}

.block_fbrs--profile .block_fbrs__row > .bt-avatar-frame,
.block_fbrs--profile .block_fbrs__row > img.avatarprofile {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.block_fbrs--profile .block_fbrs__row .texxt {
  flex: 1;
  min-width: 0;
  margin-left: 0;
  line-height: 1.35 !important;
  gap: 6px;
}

.block_fbrs--profile .block_fbrs__edit {
  margin: 0;
  flex-shrink: 0;
}

.block_fbrs--profile .block_fbrs__menu {
  position: relative;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  margin-top: 10px;
  z-index: 20;
}

.block_fbrs--profile .block_fbrs__menu:not(.show) {
  display: none;
}

.dropdown-content--wide {
  min-width: 0;
  width: 100%;
}

.bt-profile-admin-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 10px 10px 6px;
  margin: 0;
}

.bt-profile-admin-stats--cols3 {
  grid-template-columns: repeat(3, 1fr);
}

.profile-stat-card {
  background: #2a2a2b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px 6px 8px;
  text-align: center;
  min-height: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.profile-stat-card__value {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #e1e3e6;
  line-height: 1.25;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-stat-card__label {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 600;
  color: #939393;
  line-height: 1.2;
}

.profile-stat-card--bc {
  border-color: rgba(230, 57, 70, 0.22);
  background: rgba(230, 57, 70, 0.08);
}

.profile-stat-card--bc .profile-stat-card__value {
  color: #ff9a9a;
}

.profile-stat-card--bc .profile-stat-card__label {
  color: #c08080;
}

/* Live feed — прозрачная лента над шапкой */
.bt-live-feed-banner {
  background: transparent;
  border: none;
  overflow: hidden;
  position: relative;
  z-index: 20;
  padding: 8px 0 4px;
}

.bt-live-feed-banner__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  overflow: hidden;
  padding: 0 12px;
}

.bt-live-feed-banner__label {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(255, 45, 45, 0.15);
  border: 1px solid rgba(255, 80, 80, 0.35);
  border-radius: 20px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #ff6b6b;
  backdrop-filter: blur(6px);
}

.bt-live-feed-banner__pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff2d2d;
  box-shadow: 0 0 8px #ff2d2d;
  animation: btLivePulse 1.4s ease-in-out infinite;
}

@keyframes btLivePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.bt-live-feed-banner__track-wrap {
  flex: 1;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
}

.bt-live-feed-banner__track {
  display: inline-flex;
  align-items: center;
  animation: btLiveScroll 50s linear infinite;
  white-space: nowrap;
}

.bt-live-feed-banner__track:hover {
  animation-play-state: paused;
}

@keyframes btLiveScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.bt-live-ticker__entry {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 14px 3px 3px;
  margin-right: 20px;
  white-space: nowrap;
  background: transparent;
  border: none;
  font-size: 12px;
  color: rgba(225, 227, 230, 0.88);
}

.bt-live-ticker__ava {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.bt-live-ticker__text {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.bt-live-ticker__user {
  font-weight: 700;
  color: #fff;
}

.bt-live-ticker__case {
  font-style: normal;
  color: rgba(0, 212, 255, 0.9);
  font-weight: 600;
}

.bt-live-ticker__arrow {
  color: rgba(255, 255, 255, 0.25);
  font-size: 11px;
}

.bt-live-ticker__item-name {
  font-weight: 700;
}

.bt-live-ticker__icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

.bt-live-feed-wrap {
  margin: 20px 0;
  padding: 16px;
  background: var(--bt-bg-panel);
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius, 14px);
}

.bt-live-feed__title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--bt-cyan, #00d4ff);
}

.bt-live-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
}

.bt-live-feed__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  font-size: 13px;
  isolation: isolate;
}

.bt-live-feed__avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
}

.bt-live-feed__avatar-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.bt-live-feed__body {
  flex: 1;
  min-width: 0;
}

.bt-live-feed__user {
  font-weight: 600;
}

.bt-live-feed__item-name {
  font-weight: 700;
}

.bt-live-feed__item-img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  vertical-align: middle;
  margin-left: 4px;
  flex-shrink: 0;
}

.bt-live-feed__item-img.bt-icon-nobg-dark {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.bt-live-feed__time {
  display: block;
  font-size: 11px;
  color: var(--bt-text-muted, #8b95a8);
  margin-top: 2px;
}

/* Cases page header */
.bt-cases-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin: 20px 0;
  padding: 20px;
  background: var(--bt-bg-panel);
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
}

.bt-cases-header__balance {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bt-cases-header__balance img {
  width: 48px;
  height: 48px;
}

.bt-cases-header__label {
  display: block;
  font-size: 12px;
  color: var(--bt-text-muted);
}

.bt-cases-header__amount {
  font-size: 28px;
  font-weight: 700;
  color: var(--bt-red-bright, #ff2d2d);
}

.bt-cases-header__currency {
  font-size: 14px;
  color: var(--bt-text-muted);
  margin-left: 4px;
}

.bt-cases-header__hint {
  max-width: 400px;
  font-size: 12px;
  color: var(--bt-text-muted);
  margin: 0;
}

/* Sections */
.bt-cases-section {
  margin-bottom: 28px;
}

.bt-cases-section__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--bt-text);
  margin-bottom: 8px;
}

.bt-cases-section__title i {
  color: var(--bt-cyan);
  font-size: 22px;
}

.bt-cases-section__hint {
  font-size: 12px;
  color: var(--bt-text-muted);
  margin: 0 0 16px;
}

/* BC purchase packs */
.bt-bc-packs {
  margin-bottom: 32px;
  padding: 20px;
  background: var(--bt-bg-panel);
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
}

.bt-bc-packs--compact {
  margin-bottom: 24px;
  padding: 16px;
}

.bt-bc-packs__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  color: var(--bt-text);
  margin-bottom: 8px;
}

.bt-bc-packs__hint {
  font-size: 12px;
  color: var(--bt-text-muted);
  margin: 0 0 16px;
}

.bt-bc-packs__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.bt-bc-pack-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--bt-border);
  border-radius: 12px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.bt-bc-pack-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--bt-glow-split);
}

.bt-bc-pack-card__img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.45));
}

.bt-bc-pack-card__amount {
  font-size: 16px;
  font-weight: 700;
  color: var(--bt-cyan);
}

.bt-bc-pack-card__price {
  font-size: 13px;
  color: var(--bt-text-muted);
}

.bt-bc-pack-card__btn {
  width: 100%;
  margin-top: 4px;
}

.bt-case-card--bc .bt-case-card__glow {
  background: radial-gradient(circle at 50% 0%, rgba(0, 212, 255, 0.15), transparent 60%);
}

.bt-case-card--bc .bt-case-card__mode {
  color: var(--bt-cyan);
}

/* Case cards grid */
.bt-cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.bt-case-card {
  position: relative;
  padding: 20px;
  background: var(--bt-bg-panel);
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  text-align: center;
  transition: transform 0.25s, box-shadow 0.25s;
  overflow: hidden;
  isolation: isolate;
}

.bt-case-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--bt-glow-split);
}

.bt-case-card__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(230,57,70,0.12), transparent 60%);
  pointer-events: none;
}

.bt-case-card__img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  margin: 0 auto 12px;
  background: transparent !important;
  mix-blend-mode: normal;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5));
  transition: transform 0.3s;
}

.bt-case-card:hover .bt-case-card__img {
  transform: scale(1.05) rotate(-2deg);
}

.bt-case-card__mode {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--bt-cyan);
  margin-bottom: 4px;
}

.bt-case-card__name {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--bt-text);
}

.bt-case-card__desc {
  font-size: 12px;
  color: var(--bt-text-muted);
  margin-bottom: 12px;
  min-height: 32px;
}

.bt-case-card__preview {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
}

.bt-case-card__preview-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.bt-case-card__price {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--bt-red-bright);
  margin-bottom: 14px;
}

.bt-case-card__price img {
  width: 24px;
  height: 24px;
}

.bt-case-card__btn {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: var(--bt-gradient-btn);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}

.bt-case-card__actions {
  display: flex;
  gap: 8px;
}

.bt-case-card__btn--secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--bt-border);
  color: var(--bt-text);
}

.bt-case-card__btn--secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.35);
  opacity: 1;
}

.bt-case-card__btn:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

.bt-case-card__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.bt-cases-empty {
  text-align: center;
  padding: 40px;
  color: var(--bt-text-muted);
}

/* CS2-style case opening modal */
.bt-case-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bt-case-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
}

.bt-case-modal__inner {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: 900px;
  text-align: center;
}

.bt-case-modal__roulette-wrap {
  position: relative;
  overflow: hidden;
  height: 160px;
  background: linear-gradient(180deg, #0d1119 0%, #1a1f2e 50%, #0d1119 100%);
  border: 2px solid var(--bt-border);
  border-radius: 12px;
  margin-bottom: 24px;
}

.bt-case-modal__pointer {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 100%;
  background: var(--bt-red-bright);
  box-shadow: 0 0 12px var(--bt-red-bright);
  z-index: 5;
}

.bt-case-modal__pointer::before,
.bt-case-modal__pointer::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
}

.bt-case-modal__pointer::before {
  top: 0;
  border-top-color: var(--bt-red-bright);
}

.bt-case-modal__pointer::after {
  bottom: 0;
  border-bottom-color: var(--bt-red-bright);
}

.bt-case-modal__roulette {
  display: flex;
  gap: 8px;
  padding: 20px 0;
  will-change: transform;
}

.bt-case-modal__slot {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 2px solid var(--slot-color, #b0c3d9);
  border-radius: 10px;
  transition: border-color 0.2s;
  isolation: isolate;
}

.bt-case-modal__slot img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  background: transparent !important;
}

.bt-case-modal__slot img.bt-icon-nobg-dark {
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.bt-case-modal__slot span {
  font-size: 10px;
  margin-top: 4px;
  color: var(--bt-text-muted);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bt-case-modal__result {
  position: relative;
  padding: 30px;
  animation: btResultPop 0.6s ease-out;
  isolation: isolate;
}

@keyframes btResultPop {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.bt-case-modal__result-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  opacity: 0.4;
  filter: blur(40px);
  z-index: -1;
}

.bt-case-modal__result img {
  width: 160px;
  height: 160px;
  object-fit: contain;
  background: transparent !important;
  filter: drop-shadow(0 0 20px currentColor);
}

.bt-case-modal__result h3 {
  font-size: 24px;
  font-weight: 700;
  margin: 16px 0 8px;
  color: #fff;
}

.bt-case-modal__result span {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.bt-case-modal__result-desc {
  max-width: 420px;
  margin: 14px auto 0;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(225, 227, 230, 0.88);
}

.bt-case-modal__close {
  padding: 14px 48px;
  border: none;
  border-radius: 10px;
  background: var(--bt-gradient-btn);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

/* Просмотр содержимого кейса */
.bt-contents-modal {
  position: fixed;
  inset: 0;
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.bt-contents-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(6px);
}

.bt-contents-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 920px;
  max-height: 90vh;
  overflow: auto;
  padding: 24px;
  background: var(--bt-bg-panel);
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  box-shadow: var(--bt-glow-split);
}

.bt-contents-modal__close-x {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--bt-text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.bt-contents-modal__close-x:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.bt-contents-modal__head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  padding-right: 36px;
  isolation: isolate;
}

.bt-contents-modal__head img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  flex-shrink: 0;
  mix-blend-mode: normal;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
}

.bt-contents-modal__mode {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--bt-cyan);
  margin-bottom: 4px;
}

.bt-contents-modal__head h2 {
  margin: 0 0 6px;
  font-size: 22px;
  color: var(--bt-text);
}

.bt-contents-modal__price {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--bt-red-bright);
}

.bt-contents-modal__price .bt-bc-icon {
  width: 22px;
  height: 22px;
}

.bt-contents-modal__hint {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--bt-text-muted);
}

.bt-contents-modal__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.bt-contents-item {
  padding: 12px 10px;
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 3px solid var(--item-color, #b0c3d9);
  border-radius: 10px;
  transition: transform 0.2s, box-shadow 0.2s;
  isolation: isolate;
  cursor: pointer;
  width: 100%;
  color: inherit;
  font: inherit;
}

.bt-contents-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 12px color-mix(in srgb, var(--item-color, #b0c3d9) 35%, transparent);
  border-color: rgba(255, 255, 255, 0.12);
}

.bt-contents-item__img-wrap {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.bt-contents-item__img-wrap img {
  max-width: 64px;
  max-height: 64px;
  object-fit: contain;
}

.bt-contents-item__img-wrap img.bt-icon-nobg-dark {
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

.bt-contents-item__rarity {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  margin-bottom: 4px;
}

.bt-contents-item__name {
  font-size: 12px;
  font-weight: 600;
  color: var(--bt-text);
  line-height: 1.3;
  margin-bottom: 6px;
}

.bt-contents-item__desc {
  font-size: 11px;
  line-height: 1.45;
  color: var(--bt-text-muted);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 48px;
  text-align: left;
  padding: 0 2px;
}

.bt-contents-item__chance {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--bt-cyan);
}

.bt-contents-item__more {
  display: inline-block;
  margin-top: 6px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--bt-text-dim);
}

.bt-contents-modal__footer .bt-case-card__btn {
  width: 100%;
}

.bt-contents-modal__loading,
.bt-contents-modal__empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 24px;
  color: var(--bt-text-muted);
}

/* Profile inventory */
.bt-inventory {
  padding: 16px 0;
}

.bt-inventory__toggle {
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
}

.bt-inventory__toggle label {
  cursor: pointer;
  font-size: 13px;
  color: var(--bt-text-muted);
}

.bt-inventory__empty {
  text-align: center;
  padding: 30px;
  color: var(--bt-text-muted);
}

.bt-inventory__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.bt-inventory__card {
  padding: 12px;
  background: var(--bt-bg-panel);
  border: 1px solid var(--rarity-color, #b0c3d9);
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 0 12px color-mix(in srgb, var(--rarity-color) 30%, transparent);
  isolation: isolate;
  cursor: pointer;
  width: 100%;
  color: inherit;
  font: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}

.bt-inventory__card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 16px color-mix(in srgb, var(--rarity-color) 45%, transparent);
}

.bt-inventory__card-img img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.bt-inventory__card-img img.bt-icon-nobg-dark {
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

.bt-inventory__card-name {
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
  color: var(--bt-text);
}

.bt-inventory__card-rarity {
  font-size: 10px;
  color: var(--rarity-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.bt-inventory__card-desc {
  font-size: 11px;
  line-height: 1.45;
  color: var(--bt-text-muted);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 48px;
  text-align: left;
}

.bt-inventory__card-case {
  font-size: 10px;
  color: var(--bt-text-muted);
  margin-top: 4px;
}

.bt-inventory__card-date {
  font-size: 9px;
  color: var(--bt-text-dim, #6b7280);
  margin-top: 4px;
}

.bt-inventory__card-more {
  display: inline-block;
  margin-top: 8px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--bt-cyan);
}

/* Карточка предмета — модальное окно */
.bt-item-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.bt-item-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(6px);
}

.bt-item-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow: auto;
  padding: 24px 22px;
  background: var(--bt-bg-panel);
  border: 1px solid var(--bt-border);
  border-top: 3px solid var(--item-color, #b0c3d9);
  border-radius: var(--bt-radius);
  text-align: center;
  box-shadow: var(--bt-glow-split);
}

.bt-item-modal__close-x {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--bt-text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.bt-item-modal__close-x:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.bt-item-modal__img-wrap {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.bt-item-modal__img-wrap img {
  max-width: 120px;
  max-height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
}

.bt-item-modal__rarity {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 700;
  margin-bottom: 6px;
}

.bt-item-modal__name {
  margin: 0 0 8px;
  font-size: 20px;
  color: var(--bt-text);
}

.bt-item-modal__meta {
  font-size: 12px;
  color: var(--bt-text-muted);
  margin-bottom: 14px;
  line-height: 1.5;
}

.bt-item-modal__desc {
  text-align: left;
  font-size: 14px;
  line-height: 1.6;
  color: var(--bt-text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--bt-border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 16px;
  white-space: pre-wrap;
}

.bt-item-modal__close-btn {
  width: 100%;
}

/* Admin */
.bt-admin-user-results {
  position: absolute;
  z-index: 100;
  background: #fff;
  border: 1px solid #ddd;
  max-height: 200px;
  overflow-y: auto;
  width: 100%;
}

.bt-admin-user-results div {
  padding: 8px 12px;
  cursor: pointer;
}

.bt-admin-user-results div:hover {
  background: #f0f0f0;
}

/* Admin panel — миниатюры в таблицах (без .page тоже работает) */
.bt-admin-cases-page .bt-admin-item-thumb,
.bt-admin-cases-page #bt-admin-cases-table img,
.bt-admin-cases-page #bt-admin-packs-table img,
.bt-admin-cases-page #bt-items-table img,
.bt-admin-cases-page .bt-admin-items-table img,
.page .bt-admin-item-thumb,
#bt-admin-cases-table img,
#bt-admin-packs-table img,
#bt-items-table img,
.bt-admin-items-table img {
  width: 28px !important;
  height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
  object-fit: contain !important;
  display: block;
  margin: 0 auto;
  background: #f4f4f4;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 1px;
  box-sizing: border-box;
}

.bt-admin-cases-page .bt-admin-items-table td:nth-child(2),
.bt-admin-cases-page #bt-admin-cases-table td:nth-child(2),
.bt-admin-cases-page #bt-admin-packs-table td:nth-child(4) {
  width: 44px;
  max-width: 44px;
  text-align: center;
  vertical-align: middle;
  padding: 4px !important;
}

.bt-admin-cases-page .bt-admin-item-thumb--sm,
.page .bt-admin-item-thumb--sm {
  width: 28px !important;
  height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
}

.bt-admin-cases-page .bt-admin-item-thumb--lg,
.page .bt-admin-item-thumb--lg {
  width: 48px !important;
  height: 48px !important;
  max-width: 48px !important;
  max-height: 48px !important;
}

/* Admin panel (светлый фон) — таблица предметов и превью */
.page .bt-admin-items-table {
  margin-bottom: 0;
}

.page .bt-admin-items-table__row {
  cursor: pointer;
}

.page .bt-admin-items-table__row:hover td {
  background: #f5f9ff;
}

.page .bt-admin-items-table__id {
  color: #2a5ec1;
  font-size: 14px;
}

.page .bt-admin-edit-form {
  padding: 12px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}

.page .bt-admin-edit-form--active {
  border-color: #2a5ec1;
  background: #f5f9ff;
}

.page .modal {
  z-index: 1060 !important;
}

.page .modal-backdrop {
  z-index: 1050 !important;
}

.page .bt-admin-item-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  margin: 10px 0 14px;
  padding: 10px 12px;
  background: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.page .bt-admin-item-preview:empty {
  display: none;
}

.profile-inventory-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  margin-top: 10px;
  background: rgba(230, 57, 70, 0.15);
  border: 1px solid rgba(230, 57, 70, 0.3);
  border-radius: 10px;
  color: var(--bt-text);
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s;
}

.profile-inventory-toggle-btn:hover {
  background: rgba(230, 57, 70, 0.25);
}

.bt-inventory-collapsed {
  display: none;
}

/* ── Cases page layout v2 ── */
.bt-cases-hero {
  margin-bottom: 20px;
}

.bt-cases-hero .bt-cases-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.bt-cases-header__buy-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.bt-cases-header__balance--rub {
  margin-left: 16px;
}

.bt-live-feed-wrap--featured {
  margin-bottom: 28px;
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(230, 57, 70, 0.08), rgba(0, 212, 255, 0.06));
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
}

.bt-cases-section--bc,
.bt-cases-section--modes {
  margin-bottom: 28px;
  padding: 18px;
  background: var(--bt-bg-panel);
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
}

.bt-cases-section--bc {
  border-color: rgba(0, 212, 255, 0.2);
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.06);
}

.bt-cases-section--modes {
  border-color: rgba(230, 57, 70, 0.2);
  box-shadow: 0 0 24px rgba(230, 57, 70, 0.06);
}

.bt-inventory__public-note {
  margin: 0 0 14px;
  color: var(--bt-text-muted);
  font-size: 13px;
}

.bt-admin-items-catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  max-height: 420px;
  overflow-y: auto;
  padding: 4px;
}

.bt-admin-items-catalog__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--bt-border);
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s;
}

.bt-admin-items-catalog__item:hover {
  border-color: var(--bt-cyan);
}

.bt-admin-items-catalog__item img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.bt-admin-items-catalog__id {
  font-size: 11px;
  color: var(--bt-cyan);
  font-weight: 700;
}

.bt-admin-items-catalog__name {
  font-size: 11px;
  line-height: 1.3;
  color: var(--bt-text-muted);
}

.bt-cases-empty {
  color: var(--bt-text-muted);
  font-size: 13px;
  padding: 12px 0;
}

/* ── Inventory tabs & expiry ── */
.bt-inventory__warn {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.35);
  border-radius: 10px;
  color: #f0d78c;
  font-size: 13px;
  line-height: 1.45;
}

.bt-inventory__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.bt-inventory__tab {
  padding: 8px 14px;
  border: 1px solid var(--bt-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--bt-text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.bt-inventory__tab--active {
  color: #fff;
  border-color: rgba(230, 57, 70, 0.5);
  background: rgba(230, 57, 70, 0.15);
}

.bt-inventory__tab-count {
  opacity: 0.75;
  font-size: 11px;
}

.bt-inventory__panel {
  display: none;
}

.bt-inventory__panel--active {
  display: block;
}

.bt-inventory__card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  border: none;
  background: transparent;
}

.bt-inventory__card-main {
  width: 100%;
  text-align: left;
  border: 1px solid var(--bt-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
  cursor: pointer;
  color: inherit;
}

.bt-inventory__card-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bt-inventory__card-actions .bt-case-card__btn {
  width: 100%;
  font-size: 12px;
  padding: 8px 10px;
}

.bt-inventory__card-expires {
  font-size: 11px;
  color: #ffb347;
  margin-top: 4px;
}

.bt-inventory__card-badge {
  font-size: 11px;
  text-align: center;
  padding: 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--bt-text-muted);
}

.bt-inventory__card-badge--ok {
  color: #7dffb3;
  background: rgba(46, 204, 113, 0.12);
}
