@font-face {
  font-family: 'RedRing';
  src: url('/fonts/RedRing-Black.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('/fonts/manrope-0.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('/fonts/manrope-2.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('/fonts/manrope-4.ttf') format('truetype');
  font-weight: 800;
  font-display: swap;
}

@font-face {
  font-family: 'AppleColorEmoji';
  src: url('/fonts/AppleColorEmoji.ttf') format('truetype');
  unicode-range: U+1F000-1FAFF, U+2600-27BF, U+2300-23FF, U+2B50, U+200D, U+FE0F;
  font-display: swap;
}

@font-face {
  font-family: 'AppleColorEmoji';
  src: url('/fonts/AppleColorEmoji.ttf') format('truetype');
  unicode-range: U+1F000-1FAFF, U+2600-27BF, U+2300-23FF, U+2B50, U+200D, U+FE0F;
  font-display: swap;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, 'AppleColorEmoji', sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

input, button, select, textarea, .glass-btn, .submit-btn, .user-title, .bubble-text {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, 'AppleColorEmoji', sans-serif !important;
}


::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #2e2e2e;
  border-radius: 4px;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  min-height: 100dvh;
  background-color: #000000;
  color: #ededed;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.bg-gradient {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  opacity: 0.05;
}

.bg-1 {
  width: 600px;
  height: 600px;
  top: -150px;
  left: -150px;
  background: radial-gradient(circle, #ffffff 0%, transparent 65%);
}

.bg-2 {
  width: 600px;
  height: 600px;
  bottom: -150px;
  right: -150px;
  background: radial-gradient(circle, #ffffff 0%, transparent 65%);
}

.app-layout {
  position: relative;
  width: 100%;
  max-width: 900px;
  height: 100%;
  height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}



.msg-row-wrapper.me-wrapper .bubble-row.emoji-jumbo .meta-row,
.msg-row-wrapper.me-wrapper .bubble-row.emoji-multi .meta-row {
  margin-right: 0 !important;
  margin-left: auto !important;
}
/* --- КОНФЕТТИ АНИМАЦИЯ ДЛЯ VIP --- */
.confetti-canvas {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  pointer-events: none !important;
  z-index: 9999999 !important;
}

/* Полноширинная строка для захвата свайпа на всем уровне экрана */
.msg-row-wrapper {
  width: 100%;
  display: flex;
  position: relative;
  touch-action: pan-y;
  box-sizing: border-box;
}
.msg-row-wrapper.me-wrapper {
  justify-content: flex-end;
}

.msg-row-wrapper.partner-wrapper {
  justify-content: flex-start;
}

.msg-row-wrapper.system-wrapper {
  justify-content: center;
}


.glass-panel {
  background: #000000 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#screen-setup {
  padding: 14px 16px;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #000000 !important;
}

.panel-header {
  flex-shrink: 0;
  text-align: center;
  margin-bottom: 8px;
}

.header-top-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
  gap: 4px !important;
  flex-wrap: nowrap !important;
}

.screen {
  display: none !important;
  width: 100%;
  height: 100%;
  flex-direction: column;
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.screen.active {
  display: flex !important;
  opacity: 1;
  transform: scale(1);
}
/* Секретная кнопка в шапке */
.brand-tag {
  cursor: default !important;         /* Обычная стандартная стрелочка мыши */
  user-select: none !important;        /* Запрет выделения текста синим при кликах */
  -webkit-user-select: none !important;
  -webkit-touch-callout: none !important; /* Убирает всплывающее меню на смартфонах при долгом тапе */
}

.isometric-3d-case {
  filter: drop-shadow(0 14px 22px rgba(2, 6, 23, 0.7));
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
}

.case-card-item:hover .isometric-3d-case {
  transform: translateY(-6px) scale(1.04);
  filter: drop-shadow(0 20px 28px rgba(255, 255, 255, 0.25));
}


/* Границы и бейджи редкостей рулетки */
.roulette-card.rarity-common { border-bottom: 3px solid #94a3b8; }
.roulette-card.rarity-rare { border-bottom: 3px solid #22c55e; }
.roulette-card.rarity-epic { border-bottom: 3px solid #a855f7; }
.roulette-card.rarity-legendary { border-bottom: 3px solid #ef4444; }
.roulette-card.rarity-mythic { 
  border-bottom: 3px solid #facc15; 
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.45);
}

/* Окно выигрыша */
.win-display-card.rarity-common { border: 1px solid #94a3b8; box-shadow: 0 0 25px rgba(148, 163, 184, 0.2); }
.win-display-card.rarity-rare { border: 1px solid #22c55e; box-shadow: 0 0 30px rgba(34, 197, 94, 0.3); }
.win-display-card.rarity-epic { border: 1px solid #a855f7; box-shadow: 0 0 35px rgba(168, 85, 247, 0.4); }
.win-display-card.rarity-legendary { border: 1px solid #ef4444; box-shadow: 0 0 45px rgba(239, 68, 68, 0.5); }
.win-display-card.rarity-mythic { 
  border: 1px solid #facc15; 
  box-shadow: 0 0 60px rgba(250, 204, 21, 0.65);
  animation: mythicPulse 2s infinite alternate;
}

@keyframes mythicPulse {
  0% { box-shadow: 0 0 35px rgba(250, 204, 21, 0.4); }
  100% { box-shadow: 0 0 70px rgba(250, 204, 21, 0.8); }
}

/* Кнопка админки (скрыта по дефолту) */
.admin-badge-btn {
  display: none;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.admin-badge-btn.visible {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Модалка Админ-песочницы */
.admin-card {
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.8), 0 0 25px rgba(239, 68, 68, 0.2) !important;
}

.admin-actions-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.admin-action-btn {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  font-size: 12.5px;
  justify-content: flex-start;
  border-color: rgba(255, 255, 255, 0.15);
}

.admin-action-btn:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.08);
}

.brand-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  color: #a1a1aa;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

/* Фикс: онлайн не ломается и не сжимается в 3 строки */
.live-counter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 20px;
  font-size: 11px;
  color: #34d399;
  font-weight: 600;
  white-space: nowrap !important; /* Запрещаем перенос строк */
  flex-shrink: 0 !important;      /* Запрещаем flexbox'у сжимать блок */
}

h2 {
  font-size: 16px;
  font-weight: 700;
}

.subtitle {
  font-size: 11px;
  color: #7b889b;
}

/* ========================================================
   ТАБЫ ПОИСКА (ИЗОЛИРОВАНО: СТРОГО ВНУТРИ .mode-tabs)
   ======================================================== */
.mode-tabs {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  align-items: center !important;
  background: #141414 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px !important;
  padding: 0px !important;
  height: 32px !important;
  width: 300px !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin: 6px auto 0 auto !important;
  z-index: 1;
}

/* Белый ползунок */
.mode-tabs::before {
  content: '';
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 2px;
  width: calc(50% - 2px);
  background: #ededed;
  border-radius: 6px;
  transform: translateX(0);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 0;
  pointer-events: none;
}

.mode-tabs.detailed-active::before {
  transform: translateX(100%) !important;
}

/* Кнопки СТРОГО внутри .mode-tabs (не трогают инвентарь и модалки) */
.mode-tabs .tab-btn {
  position: relative !important;
  z-index: 2 !important;
  width: 100% !important;
  height: 100% !important;
  background: transparent !important;
  border: none !important;
  color: #a1a1aa !important;
  padding: 0 0px !important;
  border-radius: 6px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  line-height: 1 !important;
  cursor: pointer;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  transition: color 0.18s ease !important;
  user-select: none;
}

.mode-tabs .tab-btn svg {
  flex-shrink: 0 !important;
  width: 13px !important;
  height: 13px !important;
  stroke: currentColor !important;
}

/* Только активная кнопка внутри .mode-tabs черная (поверх белого ползунка) */
.mode-tabs .tab-btn.active {
  color: #050505 !important;
}

.mode-tabs .tab-btn.active svg {
  stroke: #050505 !important;
}

.tab-btn {
  position: relative !important;
  z-index: 2 !important;
  flex: 1 1 auto !important;
  height: 100% !important;
  background: transparent !important;
  border: none !important;
  color: #a1a1aa !important;
  padding: 0 20px !important;
  border-radius: 6px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  line-height: 1 !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: color 0.18s ease !important;
  user-select: none;
}


.tab-btn.active {
  color: #050505 !important;            /* Чёрный текст на белом бегунке */
}

.tab-btn.active svg {
  stroke: #050505 !important;
}

.tab-btn:not(.active) svg {
  stroke: currentColor;
}
.setup-grid {
  flex: 1 0 auto; /* Позволяет сетке растягиваться и скроллиться вместе с экраном */
  overflow-y: visible !important; /* Убираем конфликт внутреннего скролла */
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

@media (min-width: 769px) {
  body {
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .app-layout {
    height: 92vh;
    max-height: 860px;
  }
  #screen-setup {
    overflow-y: auto !important;
  }

  /* Честная сетка 2 колонки попарно без утягивания возраста на весь правый бок */
  .setup-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-areas: 
      "mysex    wishsex"
      "age      geo"
      "mindset  goal"
      "checks   checks" !important;
    gap: 12px 16px !important;
    align-items: start !important; /* ЗАПРЕЩАЕТ соседям растягиваться по высоте */
    align-content: start !important;
  }

  /* Точная привязка каждого блока к своей ячейке */
  .area-my-sex   { grid-area: mysex !important; }
  .area-wish-sex { grid-area: wishsex !important; }
  .area-age      { grid-area: age !important; align-self: start !important; }
  .area-geo      { grid-area: geo !important; align-self: start !important; }
  .area-mindset  { grid-area: mindset !important; align-self: start !important; }
  .area-goal     { grid-area: goal !important; align-self: start !important; }
  .area-checks   { grid-area: checks !important; }

  .btn-row.four-btns {
    grid-template-columns: repeat(4, 1fr);
  }
  .glass-panel {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  }
}

.setup-grid.mode-quick .detailed-only {
  display: none !important;
}

.field-box {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field-label {
  font-size: 11px;
  font-weight: 600;
  color: #ffffff;
  text-transform: uppercase;
}

.btn-row {
  display: flex;
  gap: 6px;
}

.btn-row.four-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}


.glass-btn {
  background: #0f0f0f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #a3a3a3;
  padding: 9px 12px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.glass-btn:hover {
  background: #1a1a1a;
  color: #ffffff;
}

.glass-btn.active {
  background: #ededed;
  border-color: #ffffff;
  color: #0a0a0a;
  font-weight: 700;
}

.btn-row .glass-btn {
  flex: 1;
}


.glass-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.age-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: stretch;
}

.age-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0; /* предотвращает распирание грида */
}

.age-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.age-list .age-btn {
  width: 100%;
  min-height: 38px;
  padding: 6px 8px !important;
  font-size: 11.5px !important;
  line-height: 1.25 !important;
  white-space: normal !important; /* перенос слов, чтобы не съезжала сетка */
  text-align: center;
}

.geo-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.region-box {
  width: 100%;
}

.glass-select {
    width: 100%;
    background: #1b1b1b;
    border: 1px solid #000000;
    color: #cbd5e1;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
    outline: none;
}

.glass-select option {
  background: #10141e;
  color: #f1f5f9;
}

.inset-box {
  background: #131313;
  border: 1px solid #4f4f4f;
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.children-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.custom-cb {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.custom-cb input {
  display: none;
}

.cb-box {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid #4f4f4f;
  background: #1f1f1f;;
  position: relative;
  flex-shrink: 0;
}

.custom-cb input:checked ~ .cb-box {
  background: #e5e5e5;
  border-color: #ffffff;
}

.custom-cb input:checked ~ .cb-box::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 2px;
  width: 4px;
  height: 7px;
  border: solid #0a0a0a;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.cb-text {
  font-size: 12px;
  color: #cbd5e1;
}

.panel-footer {
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, rgba(15, 19, 28, 0.8) 0%, #0f131c 100%);
  padding-top: 8px;
  padding-bottom: 6px;
  z-index: 10;
}

.submit-btn {
  width: 100%;
  padding: 12px;
  background: #e5e5e5;
  border: 1px solid #ffffff;
  border-radius: 10px;
  color: #0a0a0a;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.submit-btn:hover {
  background: #ffffff;
}

/* Радар */
#screen-search {
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
}

.center-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.radar-scan-box {
  position: relative;
  width: 120px;
  height: 120px;
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.radar-circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.circle-1 {
  width: 70px;
  height: 70px;
  animation: radarWave 2.4s ease-out infinite;
}

.circle-2 {
  width: 120px;
  height: 120px;
  animation: radarWave 2.4s ease-out 1.2s infinite;
}

@keyframes radarWave {
  0% { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(1.3); opacity: 0; }
}

.radar-sweep {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(255, 255, 255, 0.45) 0deg, transparent 90deg);
  animation: radarSpin 2s linear infinite;
}

@keyframes radarSpin {
  100% { transform: rotate(360deg); }
}

.radar-center-icon {
  position: relative;
  z-index: 2;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #1a1a1a;
  border: 1.5px solid #ffffff;
  color: #e5e5e5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cancel-btn {
  margin-top: 18px;
  padding: 8px 20px;
}

/* Чат */
.chat-screen {
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.chat-bar {
  flex-shrink: 0;
  height: 52px !important;              /* Вместо гигантских 67px */
  padding: 0 12px !important;
  background: rgba(12, 12, 12, 0.95) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 8px !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  z-index: 30;
}

.user-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
}

.online-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  flex-shrink: 0;
  margin-right: 8px !important; /* Отодвигает ник от точки онлайна */
}


/* Выравнивание шапки */
.chat-bar .user-meta {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0 !important;
}

.preview-meta {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0 !important;
}

.user-title {
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-controls {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-shrink: 0 !important;
}

.glass-btn.sm {
  height: 32px !important;              /* Аккуратная высота кнопок вместо 40px */
  padding: 0 9px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
}

.glass-btn.icon-only {
  padding: 6px 8px;
}

.contact-btn {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #a1a1aa !important;
  box-shadow: none !important;
  transition: all 0.2s ease !important;
}

.contact-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
}

.contact-btn.shared {
  background: rgba(16, 185, 129, 0.12) !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
  color: #34d399 !important;
}

.report-btn {
  color: #94a3b8;
}

.report-btn:hover {
  border-color: #ef4444;
  color: #f87171;
}

.warn-btn:hover:not(:disabled) {
  border-color: #f59e0b;
  color: #fbbf24;
}

.stop-btn:hover {
  border-color: #ef4444;
  color: #f87171;
}

/* Фикс ленты сообщений */
.chat-feed {
  flex: 1 1 auto;
  padding: 10px 12px;
  overflow-y: auto;
  overflow-x: hidden !important;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.desktop-banner {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  padding: 6px 12px;
  font-size: 11.5px;
  color: #cbd5e1;
  z-index: 50;
  backdrop-filter: blur(8px);
}

.banner-content {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.banner-content svg {
  color: #d4d4d4;
  flex-shrink: 0;
}

.banner-link {
  color: #d4d4d4;
  font-weight: 700;
  text-decoration: underline;
}

.banner-link:hover {
  color: #e5e5e5;
}

.banner-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.banner-close-btn:hover {
  color: #fff;
}


/* Сам пузырь внутри строки */
.bubble-row {
  position: relative;
  max-width: 82%;
  box-sizing: border-box;
  transition: transform 0.15s ease-out;
  user-select: none;
  -webkit-user-select: none;
}

.msg-row-wrapper.swiping .bubble-row {
  transition: none;
}

.bubble-row.swiping {
  transition: none;
}

/* Индикатор свайпа для ответа */
.bubble-reply-indicator {
  position: absolute;
  right: -36px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e5e5e5;
  color: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
}
.bubble-row.me {
  align-self: flex-end;
  align-items: flex-end;
}

.bubble-row.me .bubble-text {
  background: #e5e5e5;
  color: #0a0a0a;
  border-radius: 12px 12px 3px 12px;
}

.bubble-row.partner {
  align-self: flex-start;
  align-items: flex-start;
}

.bubble-row.partner .bubble-text {
  background: #171d2b;
  border: 1px solid #232d40;
  color: #e2e8f0;
  border-radius: 12px 12px 12px 3px;
}

/* ========================================================
   ИСПРАВЛЕНИЕ СИСТЕМНОГО ТЕКСТА
   ======================================================== */
.bubble-row.system {
  display: block !important;
  align-self: center !important;
  font-size: 12px !important;
  color: #8b99ad !important;
  text-align: center !important;
  word-spacing: normal !important;
  letter-spacing: normal !important;
  max-width: 90% !important;
  line-height: 1.4 !important;
  margin: 6px auto !important;
}

.bubble-row.system .sys-icon {
  display: inline-flex;
  vertical-align: -2px;
  margin-right: 4px;
}

/* Карточка темы по центру экрана */
.bubble-row.system.highlight.topic-card {
  background: rgba(14, 18, 27, 0.95) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 16px rgba(56, 189, 248, 0.1) !important;
  color: #94a3b8 !important;
  padding: 12px 16px !important;
  border-radius: 14px !important;
  line-height: 1.5 !important;
  font-size: 13px !important;
  text-align: center !important;
  max-width: 85% !important;
  margin: 10px auto !important;
  animation: viewFadeIn 0.25s ease-out forwards;
}

.bubble-row.system.highlight.topic-card strong {
  color: #38bdf8 !important;
  font-weight: 800 !important;
  font-size: 12.5px !important;
  letter-spacing: 0.3px;
  display: inline-block;
  margin-bottom: 4px;
}

.bubble-row.system.highlight {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 8px 12px;
  border-radius: 10px;
  color: #e5e5e5;
}

.contact-link {
  color: #d4d4d4;
  font-weight: 700;
  text-decoration: underline;
  word-break: break-all;
}

.bubble-text {
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.35;
  word-break: break-word;
  position: relative;
  overflow: hidden;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  padding: 0 4px;
}

.time-stamp {
  font-size: 9.5px;
  color: #556275;
}

.check-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 2px;
}

.check-status svg {
  display: block;
}

.clock-spin {
  animation: clockRotate 2s linear infinite;
  color: #94a3b8;
}

@keyframes clockRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.check-double path:first-child {
  opacity: 0.9;
}

.check-double path:last-child {
  filter: drop-shadow(0 0 2px rgba(16, 185, 129, 0.5));
}

.bubble-row.me.pending {
  opacity: 0.65;
}

.typing-notice {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  font-size: 11px;
  color: #7b889b;
  flex-shrink: 0;
}

.dots-anim {
  display: flex;
  gap: 3px;
}

.dots-anim span {
  width: 4px;
  height: 4px;
  background: #e5e5e5;
  border-radius: 50%;
  opacity: 0.6;
}

.chat-input-bar {
  display: flex !important;
  align-items: flex-end !important; /* Кнопки прижаты к низу при росте поля */
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

/* Сам textarea: делаем прозрачным/темным, как старый инпут */
textarea#msg-input {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  width: 100% !important;

  /* Цвет и фон - возвращаем темный стеклянный стиль */
  background: rgba(255, 255, 255, 0.06) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 12px !important;
  outline: none !important;

  font-family: inherit !important;
  font-size: 14px !important;
  line-height: 20px !important;
  padding: 8px 12px !important;
  box-sizing: border-box !important;

  /* Ресайз и скролл */
  resize: none !important;
  overflow-x: hidden !important;
  overflow-y: hidden; /* Переключится на auto скриптом при > 6 строк */
  word-wrap: break-word !important;
  white-space: pre-wrap !important;

  /* 1 строка: 20px текст + 16px паддинг + 2px рамка = 38px */
  min-height: 38px !important;
  height: 38px;
  /* 6 строк: 6 * 20px (120px) + 16px + 2px = 138px */
  max-height: 138px !important;
}
.bubble-row .actual-text {
  white-space: pre-wrap !important; /* Учитывает переносы строк \n */
  word-break: break-word !important; /* Переносит слишком длинные слова */
  overflow-wrap: anywhere !important;
}

textarea#msg-input:focus {
  border-color: rgba(56, 189, 248, 0.5) !important;
  background: rgba(255, 255, 255, 0.09) !important;
}

textarea#msg-input::placeholder {
  color: #71717a !important;
}

textarea#msg-input::-webkit-scrollbar {
  width: 4px;
}
textarea#msg-input::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
}
.chat-input-bar input {
  flex: 1;
  background: #19191919;
  border: 1px solid #232b3b;
  border-radius: 8px;
  padding: 9px 12px;
  color: white;
  outline: none;
  font-size: 13px;
  height: 38px;
}

.chat-input-bar input:focus {
  border-color: #2e384c;
}

.send-action {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #e5e5e5;
  border: none;
  color: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

/* ========================================================
   РАЗМЕРЫ TWEMOJI SVG
   ======================================================== */
img.emoji {
  height: 1.25em;
  width: 1.25em;
  margin: 0 0.12em;
  vertical-align: -0.22em;
  display: inline-block;
  pointer-events: none;
}

.emoji-btn img.emoji {
  width: 24px;
  height: 24px;
}

.emoji-sheet-tabs .tab-item img.emoji {
  height: 1.1em;
  width: 1.1em;
  margin-right: 4px;
}




/* --- ПЛАВНЫЙ И АККУРАТНЫЙ СМАЙЛИК БЕЗ РАСТЯГИВАНИЯ СТРОКИ --- */
.bubble-row.emoji-jumbo,
.bubble-row.emoji-multi {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  width: auto !important;
  max-width: max-content !important;
  overflow: visible !important; /* Убирает обрезку глифа */
}
.msg-row-wrapper.me-wrapper .bubble-row.emoji-jumbo,
.msg-row-wrapper.me-wrapper .bubble-row.emoji-multi {
  align-self: flex-end !important;
  align-items: flex-end !important;
}
/* Сама плашка с галочками строго по размеру текста */
.bubble-row.emoji-jumbo .meta-row,
.bubble-row.emoji-multi .meta-row {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: fit-content !important;
  max-width: fit-content !important;
  margin: 2px 0 0 0 !important;
  padding: 2px 7px !important;
  background: rgba(10, 13, 20, 0.75) !important;
  border-radius: 10px !important;
  box-sizing: border-box !important;
}

/* Кнопка вызова смайликов */
.emoji-toggle-btn {
  background: transparent;
  border: none;
  color: #7b889b;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}

.emoji-toggle-btn:hover {
  color: #d4d4d4;
  background: rgba(255, 255, 255, 0.04);
}

/* Выдвижная шторка эмодзи */
.emoji-sheet {
    position: absolute;
    bottom: 58px;
    left: 12px;
    width: 360px;
    max-width: calc(100% - 24px);
    height: 270px;
    background: #131313;
    border: 1px solid #232323;
    border-radius: 14px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7);
    display: none;
    flex-direction: column;
    z-index: 60;
    overflow: hidden;
    animation: sheetFadeUp 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.emoji-sheet.show {
  display: flex;
}

@keyframes sheetFadeUp {
  0% { transform: translateY(10px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.emoji-sheet-header {
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #191919;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
}
.emoji-close-btn {
  background: transparent;
  border: none;
  color: #7b889b;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}

.emoji-sheet-tabs {
    display: flex;
    gap: 4px;
    padding: 6px 8px;
    background: #1f1f1f;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    overflow-x: auto;
}

.emoji-sheet-tabs .tab-item {
  background: transparent;
  border: none;
  color: #8b99ad;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.emoji-sheet-tabs .tab-item.active {
  background: rgba(255, 255, 255, 0.2);
  color: #d4d4d4;
}

.emoji-sheet-grid {
  flex: 1;
  padding: 10px 8px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  overflow-y: auto;
  overflow-x: hidden;
  user-select: none;
}

.emoji-btn {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  font-family: 'AppleColorEmoji', sans-serif !important;
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 8px;
  padding: 6px 0;
  aspect-ratio: 1;
  transition: transform 0.1s ease, background-color 0.15s ease;
  -webkit-user-select: none;
  user-select: none;
}

.emoji-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  transform: scale(1.15);
}

.emoji-btn:active {
  transform: scale(0.92);
}

/* Мобильная адаптация */
/* Компактный режим для телефонов (экраны до 480px) */
@media (max-width: 480px) {
  .header-top-row {
    gap: 4px;
  }
  .brand-tag span {
    display: none; /* Скрываем надпись "ANONROULETTE" на мобилках, оставляя только иконку */
  }
  .brand-tag {
    padding: 5px 7px;
  }
  .live-counter {
    padding: 3px 8px;
    font-size: 10px;
  }
  .coins-badge {
    padding: 0 6px;
    font-size: 11px;
  }
  .cases-mini-btn {
    padding: 0 7px;
    font-size: 10px;
  }
}

/* Облегчённое окно без нагрузки на GPU */
.session-kick-backdrop {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, 0.85) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 99999999 !important;
  padding: 16px !important;
}

.session-kick-card {
  background: #0f1117 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 14px !important;
  padding: 20px !important;
  max-width: 340px !important;
  width: 100% !important;
  text-align: center !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8) !important;
}

.modal-backdrop {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  background: rgba(9, 11, 16, 0.85) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  z-index: 99999 !important;
  padding: 14px !important;
  box-sizing: border-box !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 0.22s ease, visibility 0.22s ease !important;
}
.modal-backdrop.show {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.modal-card {
  background: rgba(0, 0, 0, 0.9) !important;
  backdrop-filter: blur(32px) !important;
  -webkit-backdrop-filter: blur(32px) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 16px !important;
  padding: 20px !important;
  width: 100% !important;
  max-width: 420px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85) !important;
  transform: scale(0.95);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  will-change: transform;
  position: relative !important;
  z-index: 100000 !important;
}

.modal-backdrop.show .modal-card {
  transform: scale(1) !important;
}
/* --- АДАПТИВНОЕ VIP МЕНЮ СО СКРОЛЛОМ --- */
.vip-card {
  border: 1px solid rgba(250, 204, 21, 0.35) !important;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.85), 0 0 25px rgba(234, 179, 8, 0.15) !important;
  max-height: 88vh !important;
  max-height: 88dvh !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  padding: 14px 14px 18px 14px !important;
}

/* Компактный вид секций VIP при нехватке места */
@media (max-height: 720px) {
  .vip-card {
    max-height: 92vh !important;
    max-height: 92dvh !important;
    padding: 10px 12px 14px 12px !important;
  }
  .vip-preview-box {
    margin: 6px 0 !important;
    padding: 6px 10px !important;
  }
  .vip-status-purchase-box {
    margin-bottom: 8px !important;
    padding: 8px 10px !important;
  }
  .custom-section {
    margin-bottom: 8px !important;
  }
  .vip-bubble-preview-wrap {
    margin: 6px 0 !important;
    padding: 6px !important;
  }
}

.modal-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.12);
  border: 1.5px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px auto;
}

.modal-icon.warn {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.modal-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.modal-desc {
  font-size: 11.5px;
  color: #8b99ad;
  line-height: 1.4;
  margin-bottom: 12px;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-btn {
  padding: 9px;
  font-size: 12.5px;
}

.report-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.report-opt-btn {
  width: 100%;
  text-align: left;
  justify-content: flex-start;
  padding: 8px 10px;
  font-size: 11.5px;
  border-color: #26334a;
}

.report-opt-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #fca5a5;
} 

.glass-input {
  width: 100%;
  background: #1f1f1f;
  border: 1px solid #191919;
  border-radius: 8px;
  padding: 8px 10px;
  color: white;
  outline: none;
  font-size: 12.5px;
}

.toast-alert {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.65);
  z-index: 999999;
  max-width: calc(100% - 32px);
  width: max-content;
  touch-action: pan-x;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  user-select: none;
}

.toast-alert.show {
  display: flex !important;
}

/* Вне чата: снизу, мягкий изумрудно-зеленый */
.toast-alert.menu-notice {
  bottom: 84px;
  top: auto;
  background: rgba(16, 185, 129, 0.95);
  border: 1px solid rgba(167, 243, 208, 0.35);
  color: #ffffff;
  animation: toastSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Внутри активного чата: сверху, контрастный красный */
.toast-alert.chat-error {
  top: 16px;
  bottom: auto;
  background: rgba(220, 38, 38, 0.95);
  border: 1px solid rgba(254, 202, 202, 0.35);
  color: #ffffff;
  animation: toastSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastSlideUp {
  0% { transform: translate(-50%, 25px); opacity: 0; }
  100% { transform: translate(-50%, 0); opacity: 1; }
}

@keyframes toastSlideDown {
  0% { transform: translate(-50%, -25px); opacity: 0; }
  100% { transform: translate(-50%, 0); opacity: 1; }
}

.toast-text {
  flex: 1;
  line-height: 1.3;
}

.toast-close-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  flex-shrink: 0;
}

.toast-close-btn:hover {
  color: #ffffff;
}

/* Зона дропа файлов в админке */
.file-drop-zone {
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px dashed #334155;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.file-drop-zone:hover {
  border-color: #e5e5e5;
  background: rgba(255, 255, 255, 0.08);
}
.file-drop-zone .drop-text {
  font-size: 11.5px;
  color: #94a3b8;
  pointer-events: none;
}

/* Иконка в нике пользователя: авто-подгонка PNG, SVG и GIF */
.vip-crown img,
.vip-crown svg {
  width: 15px !important;
  height: 15px !important;
  object-fit: contain !important;
  display: inline-block !important;
  vertical-align: middle !important;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
}

/* Превью иконок в рулетке и инвентаре */
.card-icon-preview img,
.inv-card-preview img {
  max-width: 32px;
  max-height: 32px;
  object-fit: contain;
}

/* --- АНИМАЦИИ ПУЗЫРЕЙ СООБЩЕНИЙ --- */
/* 1. Плавный перелив */
.bubble-anim-flow {
  background-size: 200% 200%, 200% 200% !important;
  animation: animFlow 4s ease infinite !important;
}
@keyframes animFlow {
  0% { background-position: 0% 50%, 0% 50%; }
  50% { background-position: 100% 50%, 100% 50%; }
  100% { background-position: 0% 50%, 0% 50%; }
}


/* Breathing Glow: пульсация с амплитудой от ползунка */
.bubble-anim-pulse {
  animation: animPulse 1.8s ease-in-out infinite alternate !important;
}

@keyframes animPulse {
  0% {
    box-shadow: 0 0 4px var(--bubble-glow-color, rgba(255, 255, 255, 0.4)) !important;
  }
  100% {
    box-shadow: 0 0 var(--bubble-glow-blur, 18px) var(--bubble-glow-spread, 4px) var(--bubble-glow-color, rgba(255, 255, 255, 0.95)),
                0 0 calc(var(--bubble-glow-blur, 18px) * 1.5) var(--bubble-glow-color, rgba(255, 255, 255, 0.45)) !important;
  }
}
.bubble-anim-rainbow {
  animation: animRainbowShift 8s linear infinite !important;
}
@keyframes animRainbowShift {
  0% {
    filter: hue-rotate(0deg);
  }
  100% {
    filter: hue-rotate(360deg);
  }
}
/* Защищаем текст от выцветания при RGB-радуге: текст остается контрастным */
.bubble-anim-rainbow,
.bubble-anim-rainbow .actual-text {
  /* Текст держится чисто белым или черным */
  -webkit-font-smoothing: antialiased;
}

.tab-emoji-icon {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  margin-right: 4px;
  display: inline-block;
  pointer-events: none;
}
.bubble-row.emoji-jumbo .bubble-text,
.bubble-row.emoji-multi .bubble-text {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  padding: 4px 6px !important;
  margin: 0 !important;
  width: auto !important;
  display: block !important;
  text-align: center !important;
  font-size: 56px !important;
  line-height: 1.25 !important; /* Дает запас по высоте сверху и снизу */
  overflow: visible !important;  /* Чтобы челюсть черепа и края не срезались */
}

.apple-emoji-msg.jumbo {
  width: 58px;
  height: 58px;
  display: inline-block;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
}

.apple-emoji-msg.multi {
  width: 38px;
  height: 38px;
  display: inline-block;
  margin: 0 3px;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
}

/* --- КРЕСТИК ОШИБКИ ОТПРАВКИ (МУТ/СПАМ) --- */
.check-status.status-error svg {
  stroke: #ef4444;
}

.bubble-row.me.error {
  opacity: 0.9;
}

.bubble-row.me.error .bubble-text {
  background: #dc2626 !important; /* Красный оттенок при сбое */
}

/* Метка «изм.» */
.edited-tag {
  font-size: 9px;
  color: #94a3b8;
  font-style: italic;
  margin-right: 3px;
}

/* Оболочка цитаты внутри пузыря (ровно от края до края без вылета) */
.bubble-reply-box {
  background: rgba(0, 0, 0, 0.25);
  border-left: 3px solid #e5e5e5;
  border-radius: 4px;
  padding: 4px 8px;
  margin: 0 0 6px 0;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  transition: background 0.15s ease;
}

.bubble-reply-box:hover {
  background: rgba(0, 0, 0, 0.35);
}

.bubble-reply-author {
  font-size: 11px;
  font-weight: 700;
  color: #e5e5e5;
  line-height: 1.2;
  margin-bottom: 2px;
}

.bubble-reply-text {
  font-size: 11.5px;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
/* Эффект вспышки при переходе к цитируемому сообщению */
@keyframes highlightSmooth {
  0% {
    box-shadow: 0 0 0 2px #38bdf8, 0 0 15px rgba(56, 189, 248, 0.45);
  }
  50% {
    box-shadow: 0 0 0 2px #38bdf8, 0 0 20px rgba(56, 189, 248, 0.3);
  }
  100% {
    box-shadow: none;
  }
}

.bubble-row.highlighted {
  animation: highlightSmooth 1.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
  border-radius: 12px !important;
}

/* --- ВСПЛЫВАЮЩАЯ ПАНЕЛЬ НАД ПОЛЕМ ВВОДА (ОТВЕТ / РЕДАКТИРОВАНИЕ) --- */
.input-action-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: #151a26;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid #ffffff;
  font-size: 12px;
}

.input-action-bar.show {
  display: flex;
}

.input-action-content {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.input-action-title {
  font-weight: 700;
  color: #d4d4d4;
}

.input-action-snippet {
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
}

.input-action-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
}

/* Меню действий сообщений с SVG */
.msg-context-menu {
  position: fixed;
  background: #171d2c;
  border: 1px solid #28354d;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.75);
  z-index: 10000;
  display: none;
  flex-direction: column;
  min-width: 155px;
  padding: 4px;
}

.msg-context-menu.show {
  display: flex;
}

.msg-context-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: #cbd5e1;
  background: transparent;
  border: none;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.msg-context-item svg {
  color: #d4d4d4;
  flex-shrink: 0;
}

.msg-context-item:hover, .msg-context-item:active {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.profile-setup-box {
  margin: 8px 0 14px 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.nick-input-wrap {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* Поле никнейма становится самостоятельной плиткой */
.nick-input {
  flex: 1 1 auto !important;
  min-width: 0 !important; /* Предотвращает распирание флекс-контейнера на узких экранах */
  height: 38px !important;
      background: rgb(29 29 29 / 60%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 10px !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
  color: #f1f5f9 !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4) !important;
  outline: none !important;
  transition: border-color 0.15s ease, background 0.15s ease !important;
}

.nick-input:focus {
  border-color: rgba(255, 255, 255, 0.25) !important;
  background: rgba(24, 28, 40, 0.8) !important;
}

/* --- Кнопка «Стиль» в строке профиля (монохром) --- */
.custom-workshop-btn {
  position: relative !important;
  overflow: hidden !important;
  background: linear-gradient(135deg, #3a3a3a 0%, #1a1a1a 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: 20px !important;
  padding: 8px 16px !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  font-size: 12.5px !important;
  height: 38px !important;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.12), 0 2px 6px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.18) !important;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.15s ease !important;
  flex-shrink: 0;
}

.custom-workshop-btn:hover {
  background: linear-gradient(135deg, #4a4a4a 0%, #262626 100%) !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.22), inset 0 1px 2px rgba(255, 255, 255, 0.3) !important;
  transform: scale(1.04);
}

.custom-workshop-btn:active {
  transform: scale(0.96);
}

/* --- ПОЛНОСТЬЮ ЗОЛОТАЯ VIP КНОПКА (исключение из ч/б темы — статусный акцент) --- */
.vip-gear-btn {
  position: relative !important;
  overflow: hidden !important;
  background: linear-gradient(135deg, #fde047 0%, #eab308 50%, #ca8a04 100%) !important;
  border: 1px solid #fef08a !important;
  border-radius: 20px !important;
  padding: 8px 16px !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 800;
  box-shadow: 0 0 16px rgba(234, 179, 8, 0.55), 0 2px 6px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.6) !important;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.15s ease !important;
  height: 38px !important;
  flex-shrink: 0;
}

/* Медленный, солидный блик внутри кнопки */
.vip-gear-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -70%;
  width: 45%;
  height: 200%;
  background: linear-gradient(
    90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.75) 50%, 
    transparent 100%
  );
  transform: rotate(25deg);
  animation: vipShine 6.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  pointer-events: none;
}

@keyframes vipShine {
  0% { left: -70%; }
  22% { left: 150%; }
  100% { left: 150%; }
}

.vip-gear-btn:hover {
  background: linear-gradient(135deg, #fef08a 0%, #facc15 50%, #d97706 100%) !important;
  border-color: #fef9c3 !important;
  color: inherit !important;
  transform: scale(1.04);
  box-shadow: 0 0 24px rgba(250, 204, 21, 0.75), inset 0 1px 2px rgba(255, 255, 255, 0.8) !important;
  filter: brightness(1.05);
}
.vip-gear-btn:hover .vip-gear-text {
  color: #451a03 !important;
}
.vip-gear-btn:active {
  transform: scale(0.96);
}

/* Текст внутри золотой кнопки — глубокий и рельефный */
.vip-gear-text {
  color: #451a03 !important; /* Глубокий тёмно-шоколадный цвет для максимального контраста на золоте */
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.4px;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(254, 240, 138, 0.6);
  -webkit-text-fill-color: initial !important;
}

.vip-btn-icon {
  font-size: 14px;
  line-height: 1;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.3));
}

/* --- НАСТРАИВАЕМЫЙ VIP-ПУЗЫРЬ СООБЩЕНИЯ --- */
.bubble-row.vip-bubble-custom .bubble-text {
  background: var(--vip-bg) !important;
  color: var(--vip-text) !important;
  box-shadow: 0 4px 14px var(--vip-glow, rgba(0, 0, 0, 0.3));
}

.bubble-row.vip-bubble-custom.emoji-jumbo .bubble-text,
.bubble-row.vip-bubble-custom.emoji-multi .bubble-text {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

.bubble-row.vip-bubble-custom .time-stamp,
.bubble-row.vip-bubble-custom .edited-tag {
  color: var(--vip-meta, #94a3b8) !important;
}

.bubble-row.vip-bubble-custom .check-status svg path,
.bubble-row.vip-bubble-custom .check-status svg line {
  stroke: var(--vip-check, #10b981) !important;
}

/* Превью пузыря в модалке */
.vip-bubble-preview-wrap {
  margin: 10px 0;
  padding: 10px;
  background: #090c14;
  border-radius: 12px;
  border: 1px solid #1e293b;
  display: flex;
  justify-content: flex-end;
}

.vip-bubble-preview {
  padding: 8px 12px;
  border-radius: 12px 12px 3px 12px;
  font-size: 13px;
  font-weight: 500;
  max-width: 80%;
  word-break: break-word;
  transition: all 0.2s ease;
}

/* Единое ровное выравнивание для строки превью и шапки */
.preview-meta, .user-meta {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0 !important;
  vertical-align: middle !important;
}

/* Идеальное положение никнейма без сжатия */
.vip-gradient-text {
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800 !important;
  display: inline-block !important;
  line-height: 1.2 !important;
  padding: 1px 0 !important;
  vertical-align: middle !important;
}

/* Иконка: точный размер и выравнивание по центру текста */
.vip-crown {
  font-size: 14px !important;
  margin-left: 4px !important;
  margin-right: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  vertical-align: middle !important;
  transform: translateY(-0.5px) !important;
}

/* Кнопка открытия палитры */
.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.custom-color-picker-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  padding: 4px 12px;
  cursor: pointer;
  position: relative;
  transition: all 0.15s;
}

.custom-color-picker-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #e5e5e5;
}

.picker-label-text {
  font-size: 11.5px;
  font-weight: 600;
  color: #e2e8f0;
}

.custom-color-picker-btn input[type="color"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  cursor: pointer;
}

.sub-title-badge {
  font-size: 11px;
  color: #64748b;
  font-weight: normal;
  margin-left: 2px;
}

/* Модалка кастомизации */
.modal-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 20px;
  cursor: pointer;
}

.vip-preview-box {
  background: #090c14;
  border: 1px solid #1e293b;
  border-radius: 10px;
  padding: 10px 14px;
  margin: 10px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.preview-label {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
}

.vip-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 12.5px;
  color: #cbd5e1;
}

.custom-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  text-align: left;
}

.color-palette-grid {
  display: flex !important;
  align-items: center;
  gap: 8px !important;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px 4px 10px 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.color-palette-grid::-webkit-scrollbar {
  display: none;
}

.color-chip {
  flex: 0 0 28px !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  background: var(--chip) !important;
  border: 2px solid rgba(255, 255, 255, 0.15) !important;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.18s ease;
  box-sizing: border-box;
}

.color-chip:hover {
  transform: scale(1.15);
}

.color-chip.active {
  border-color: #ffffff !important;
  transform: scale(1.18);
  box-shadow: 0 0 12px var(--chip), 0 2px 6px rgba(0, 0, 0, 0.5) !important;
}

/* Палитра иконок */
.icon-palette-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
}

.icon-chip {
  background: #141a29;
  border: 1px solid #243049;
  border-radius: 8px;
  padding: 6px 0;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.icon-chip:hover {
  background: #1e273d;
}

.icon-chip.active {
  border-color: #facc15;
  background: rgba(234, 179, 8, 0.15);
}

.user-economy-badges {
  display: inline-flex;
  align-items: center !important;
  gap: 6px;
}
.economy-right-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.coins-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.35);
  border-radius: 9px;
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  color: #facc15;
}


.gold-coin-icon {
  flex-shrink: 0;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

.cases-mini-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #e5e5e5;
  font-size: 11px;
  font-weight: 700;
  border-radius: 9px;
  height: 30px;
  padding: 0 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.15s;
}

.cases-mini-btn:hover {
  background: #ffffff;
  color: #0a0a0a;
  border-color: #ffffff;
  transform: scale(1.03);
}

.daily-bonus-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  height: 30px;
  padding: 0 8px;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.daily-bonus-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: scale(1.05);
} 

/* Блокировка кастомизации если VIP выключен */
.vip-locked-section {
  opacity: 0.35 !important;
  pointer-events: none !important;
  filter: grayscale(1) !important;
  transition: all 0.25s ease;
  user-select: none;
}

.vip-locked-badge {
  font-size: 10.5px;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
  padding: 1px 6px;
  border-radius: 6px;
  margin-left: 6px;
}

/* --- СТИЛИ ДЛЯ ИКОНКИ ПОДАРКА --- */
.gift-svg-icon {
  display: block;
  filter: drop-shadow(0 2px 5px rgba(239, 68, 68, 0.45));
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.daily-bonus-btn:hover .gift-svg-icon {
  transform: scale(1.18) rotate(-6deg);
}

.daily-bonus-btn:active .gift-svg-icon {
  transform: scale(0.92);
}

/* --- СВОРАЧИВАЕМЫЕ КАТЕГОРИИ ФИЛЬТРОВ --- */
.filter-foldable {
  width: 100% !important;
  box-sizing: border-box !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgb(0 0 0 / 8%) !important;
  border-radius: 12px;
  overflow: hidden;
  height: fit-content !important;
  align-self: stretch !important;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.filter-foldable[open] {
  border-color: rgba(0, 0, 0, 0.15) !important;
  background: rgba(115, 115, 115, 0.05) !important;
}

.fold-summary {
  width: 100% !important;
  box-sizing: border-box !important;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}

.fold-summary::-webkit-details-marker {
  display: none;
}

.fold-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.fold-badge {
  font-size: 11px;
  color: #ededed !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 600;
}

.fold-chevron {
  color: #71717a !important;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-foldable[open] .fold-chevron {
  transform: rotate(180deg);
  color: #ffffff !important;
}

.filter-foldable.is-closing .fold-chevron {
  transform: rotate(0deg) !important;
  color: #71717a !important;
}

/* В скрытом состоянии вертикальные отступы и рамка убираются в 0 */
.fold-content {
  box-sizing: border-box !important;
  padding: 0 14px !important;
  border-top: 1px solid transparent !important;
  margin-top: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              padding 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.28s ease,
              opacity 0.2s ease;
}

/* При открытии плавно возвращаются ваши 10px сверху и 14px снизу + полоска */
.filter-foldable[open] .fold-content {
  max-height: 500px;
  padding: 10px 14px 14px 14px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  margin-top: 2px;
  opacity: 1;
}

/* При закрытии сразу анимируем всё в чистый ноль без остатков */
.filter-foldable.is-closing .fold-content {
  max-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border-top-color: transparent !important;
  margin-top: 0 !important;
  opacity: 0 !important;
}

.field-sublabel {
  font-size: 10.5px;
  font-weight: 700;
  color: #71717a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  display: block;
}

.vip-status-purchase-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vip-status-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: #94a3b8;
}

.vip-status-chip {
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 11px;
}

.vip-status-chip.active {
  background: rgba(234, 179, 8, 0.2);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.4);
}

.vip-status-chip.locked {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
}

.stars-buy-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: 1px solid #fde047;
  color: #fff;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
  transition: transform 0.15s, filter 0.15s;
}

.stars-buy-btn:hover {
  transform: scale(1.02);
  filter: brightness(1.08);
}

.stars-buy-btn:active {
  transform: scale(0.98);
}

.vip-disclaimer-text {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.4;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vip-session-warning {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  padding: 6px 8px;
  border-radius: 6px;
  margin-top: 4px;
}

/* --- CS:GO РУЛЕТКА КЕЙСОВ --- */
.case-box-card {
  max-width: 440px !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.8), 0 0 25px rgba(255, 255, 255, 0.2) !important;
}

.roulette-viewport {
  position: relative;
  isolation: isolate;

  width: 100%;
  height: 125px;

  background: #1b1b1b;
  border: 2px solid #676767;
  border-radius: 12px;

  overflow: hidden;

  margin: 14px 0;

  box-shadow:
    inset 0 0 18px rgba(0, 0, 0, 0.8);
}


.roulette-track {
    display: flex;
    flex-direction: row;
    align-items: center;

    width: max-content;
    height: 100%;

    gap: 0;
    padding: 0;

    flex-shrink: 0;

    will-change: transform;
    transform: translate3d(0, 0, 0);

    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;

    contain: layout style paint;
}

.roulette-card {
    width: 100px;
    min-width: 100px;
    max-width: 100px;

    flex: 0 0 100px;

    height: 105px;

    margin: 0;
    padding: 6px;

    box-sizing: border-box;

    background: #111111;
    border: 1.5px solid #353535;
    border-radius: 10px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 8px;
}

.roulette-pointer-line {
    position: absolute !important;

    top: 0 !important;
    bottom: 0 !important;
    left: 50% !important;

    width: 1px !important;
    height: 100% !important;

    margin: 0 !important;

    transform: translateX(-50%) !important;

    display: block !important;

    background: #ffffff !important;

    border-radius: 999px !important;

    z-index: 999 !important;
    pointer-events: none !important;

    box-shadow:
        0 0 4px rgba(255,255,255,1),
        0 0 9px rgba(255,255,255,.8),
        0 0 16px rgba(255,255,255,.35) !important;
}

.roulette-pointer-line::before {
    content: '' !important;

    position: absolute !important;

    top: 0 !important;
    left: 50% !important;

    width: 0 !important;
    height: 0 !important;

    transform: translateX(-50%) !important;

    border-left: 7px solid transparent !important;
    border-right: 7px solid transparent !important;
    border-top: 11px solid #ffffff !important;

    filter:
        drop-shadow(0 0 3px rgba(255,255,255,.8)) !important;
}

.roulette-pointer-line::after {
    content: '' !important;

    position: absolute !important;

    bottom: 0 !important;
    left: 50% !important;

    width: 0 !important;
    height: 0 !important;

    transform: translateX(-50%) !important;

    border-left: 7px solid transparent !important;
    border-right: 7px solid transparent !important;
    border-bottom: 11px solid #ffffff !important;

    filter:
        drop-shadow(0 0 3px rgba(255,255,255,.8)) !important;
}

/* ========================================================
   ПОДСВЕТКА РЕДКОСТЕЙ (РУЛЕТКА + ИНВЕНТАРЬ)
   ======================================================== */

/* 1. Белый (Common) */
.roulette-card.rarity-common,
.inv-item-card.rarity-common {
  border-bottom: 3.5px solid #94a3b8 !important;
}

/* 2. Зелёный (Rare) */
.roulette-card.rarity-rare,
.inv-item-card.rarity-rare {
  border-bottom: 3.5px solid #22c55e !important;
  box-shadow: inset 0 -5px 5px rgba(34, 197, 94, 0.12);
}

/* 3. Фиолетовый (Epic) */
.roulette-card.rarity-epic,
.inv-item-card.rarity-epic {
  border-bottom: 3.5px solid #a855f7 !important;
  box-shadow: inset 0 -5px 5px rgba(168, 85, 247, 0.18);
}

/* 4. Красный (Legendary) */
.roulette-card.rarity-legendary,
.inv-item-card.rarity-legendary {
  border-bottom: 3.5px solid #ef4444 !important;
  box-shadow: inset 0 -5px 5px rgba(239, 68, 68, 0.22);
}

/* 5. Золотой (Mythic) */
.roulette-card.rarity-mythic,
.inv-item-card.rarity-mythic {
  border-bottom: 3.5px solid #facc15 !important;
  box-shadow: inset 0 -5px 5px rgba(250, 204, 21, 0.3), 0 0 1px rgba(250, 204, 21, 0.35);
}


/* Значок надетого предмета не должен ломать нижнюю цветную полоску */
.inv-item-card.equipped {
  border-top-color: #10b981 !important;
  border-left-color: #10b981 !important;
  border-right-color: #10b981 !important;
}
.card-icon-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
}

.card-item-name {
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.mini-bubble-sample {
  width: 44px;
  height: 24px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.large-bubble-preview {
  padding: 10px 16px !important;
  border-radius: 14px 14px 3px 14px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  display: inline-block !important;
  max-width: 90% !important;
  word-break: break-word !important;
}



.case-open-btn {
  background: linear-gradient(135deg, #ffffff 0%, #c7c7c7 100%) !important;
  font-size: 14px;
}

.duplicate-notice {
  font-size: 12px;
  color: #facc15;
  margin: 8px 0;
}



.inventory-card {
  max-width: 420px !important;
  max-height: 85vh !important;
  display: flex;
  flex-direction: column;
}

.inv-preview-box {
  background: #090d16;
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 10px 12px;
  margin: 8px 0 12px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inv-bubble-sample {
  padding: 8px 12px;
  border-radius: 12px 12px 3px 12px;
  font-size: 12.5px;
  font-weight: 600;
  width: fit-content;
  max-width: 90%;
  align-self: flex-end;
  background: #e5e5e5;
  color: #0a0a0a;
  transition: all 0.2s ease;
}

.workshop-tabs,
.inv-tabs {
  display: flex !important;
  gap: 6px !important;
  margin-bottom: 10px !important;
}

.workshop-tabs .tab-btn,
.inv-tabs .tab-btn {
  flex: 1 !important;
  background: #141414 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #888888 !important;
  padding: 8px 12px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  transition: all 0.2s ease !important;
}

.workshop-tabs .tab-btn:hover:not(.active),
.inv-tabs .tab-btn:hover:not(.active) {
  background: #1c1c1c !important;
  color: #ededed !important;
}

.workshop-tabs .tab-btn.active,
.inv-tabs .tab-btn.active {
  background: #ededed !important;
  border-color: #ffffff !important;
  color: #0a0a0a !important;
}

.workshop-tabs .tab-btn.active svg,
.inv-tabs .tab-btn.active svg {
  stroke: #0a0a0a !important;
}

#ws-items-grid,
.inv-items-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(95px, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
  padding-right: 0 !important;
}

.inv-item-card {
  background: #0b0b0b;
  border: 1.5px solid #373737;
  border-radius: 10px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  position: relative;
  transition: all 0.18s ease;
}
/* Карточка "По умолчанию" */
.inv-item-card.card-default {
  border-bottom: 3.5px solid #64748b !important;
}

.inv-item-card:hover {
  transform: translateY(-2px);
  border-color: #e5e5e5;
}

.inv-item-card.equipped {
  background: #080b12 !important;
  border-top-color: rgba(255, 255, 255, 0.12) !important;
  border-left-color: rgba(255, 255, 255, 0.08) !important;
  border-right-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6) !important;
  transform: scale(0.97);
}

.inv-item-card.equipped::after {
  content: '✓';
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 11px;
  font-weight: 800;
  color: #94a3b8;
  opacity: 0.9;
}

.inv-item-card.rarity-common.equipped::after { color: #cbd5e1; }
.inv-item-card.rarity-rare.equipped::after { color: #22c55e; }
.inv-item-card.rarity-epic.equipped::after { color: #a855f7; }
.inv-item-card.rarity-legendary.equipped::after { color: #ef4444; }
.inv-item-card.rarity-mythic.equipped::after { color: #facc15; }

/* Дополнительное мягкое свечение по контуру цвета редкости */
.inv-item-card.rarity-rare.equipped { box-shadow: inset 0 0 12px rgba(34, 197, 94, 0.15) !important; }
.inv-item-card.rarity-epic.equipped { box-shadow: inset 0 0 14px rgba(168, 85, 247, 0.2) !important; }
.inv-item-card.rarity-legendary.equipped { box-shadow: inset 0 0 16px rgba(239, 68, 68, 0.25) !important; }
.inv-item-card.rarity-mythic.equipped { box-shadow: inset 0 0 20px rgba(250, 204, 21, 0.3) !important; }
.inv-card-preview {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inv-card-name {
  font-size: 10px;
  color: #cbd5e1;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

/* Модалка выпавшего дропа */
.win-display-card {
  text-align: center;
  position: relative;
  overflow: hidden;
  max-width: 320px !important;
}

.win-item-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70px;
  margin: 10px 0;
}

.win-icon-large svg,
.win-icon-large img,
.win-item-preview img {
  width: 58px !important;
  height: 58px !important;
  max-width: 58px !important;
  max-height: 58px !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto !important;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.6)) !important;
}

.win-rarity-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.inventory-notice {
  font-size: 12px;
  color: #34d399;
  margin: 6px 0;
}


/* Витрина VIP */
.vip-showcase-card {
  max-width: 380px !important;
}

.vip-perks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0 14px 0;
}

.vip-perk-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 8px 10px;
}

.perk-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.perk-info {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.perk-info strong {
  font-size: 12.5px;
  color: #f1f5f9;
}

.perk-info span {
  font-size: 11px;
  color: #94a3b8;
}

/* Мастерская стиля */
.custom-workshop-card {
  max-width: 440px !important;
  width: 95vw !important;
  min-height: 620px !important; /* Высота под размер VIP-палитры */
  max-height: 90dvh !important;
  padding: 16px 14px !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}


.inv-item-card {
  min-width: 0 !important; /* Не дает внутреннему тексту выпирать и растягивать грид */
  width: 100% !important;
  box-sizing: border-box !important;
}

.inv-card-name {
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* На экранах до 380px аккуратно уменьшаем отступы табов */
@media (max-width: 400px) {
  .custom-workshop-card {
    padding: 12px 10px !important;
  }
  .workshop-tabs .tab-btn {
    padding: 6px 8px !important;
    font-size: 11px !important;
  }
  #ws-items-grid,
  .inv-items-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
  }
  .inv-item-card {
    padding: 6px 4px !important;
  }
}
.custom-live-preview-box {
    background: #050505;
    border: 1px solid #1b1c1d;
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.workshop-bubble-preview {
  padding: 8px 14px;
  border-radius: 12px 12px 3px 12px;
  font-size: 13px;
  font-weight: 600;
  width: fit-content;
  max-width: 90%;
  align-self: flex-end;
  background: #e5e5e5; /* Базовый цвет по умолчанию */
  color: #0a0a0a;
  transition: all 0.2s ease;
  word-break: break-word;
}

.workshop-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.workshop-section-content {
  display: none;
  flex: 1 1 auto;
}

.workshop-section-content.active {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  min-height: 380px !important; /* Полностью соответствует высоте тела VIP-палитры */
}

#section-ws-inventory.active {
  justify-content: flex-start !important;
}

.inv-category-toggle {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

/* Предупреждение о блокировке кастомизации из-за экипированного предмета */
.custom-lock-notice {
  font-size: 11px;
  color: #facc15;
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.25);
  border-radius: 8px;
  padding: 5px 8px;
  margin: 4px 0 6px 0;
  line-height: 1.3;
}

.custom-section.disabled-by-equip {
  opacity: 0.45 !important;
  user-select: none;
}

.custom-section.disabled-by-equip .color-palette-grid,
.custom-section.disabled-by-equip .icon-palette-grid,
.custom-section.disabled-by-equip .custom-color-picker-btn {
  pointer-events: none !important;
  filter: grayscale(0.8);
}

/* ========================================================
   ИСПРАВЛЕННЫЙ БЛОК МАГАЗИНА КЕЙСОВ
   ======================================================== */
.case-store-card {
  max-width: 520px !important;
  width: 95vw !important;
  max-height: 88dvh !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 16px 14px !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
}

.cases-store-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
  gap: 12px !important;
  margin: 14px 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.case-card-item {
    position: relative;
    background: #0d0d0d;
    border: 1.5px solid #1b1b1b;
    border-radius: 14px;
    padding: 16px 12px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: space-between !important;
    text-align: center !important;
    gap: 8px !important;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: visible !important;
    box-sizing: border-box !important;
}

.case-card-item:hover {
  transform: translateY(-3px);
  border-color: #ffffff;
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.25);
}

.case-card-item h4 {
  font-size: 13.5px !important;
  margin: 4px 0 2px 0 !important;
  text-align: center !important;
  width: 100% !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Фиксированный контейнер для центрирования 3D кейсов/иконок */
.case-card-icon {
  width: 130px !important;
  height: 100px !important;
  min-width: 130px !important;
  min-height: 100px !important;
  margin: 0 auto 6px auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important; /* УБРАНО ОБРЕЗАНИЕ СВЕЧЕНИЯ */
  position: relative;
}

.case-card-icon img,
.case-card-icon svg {
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
  overflow: visible !important; /* Разрешаем фильтрам выходить за viewBox */
}

.case-price-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  color: #facc15 !important;
  background: rgba(234, 179, 8, 0.15) !important;
  padding: 4px 10px !important;
  border-radius: 8px !important;
  white-space: nowrap !important;
  margin: 2px auto 8px auto !important;
}

.case-price-badge svg {
  flex-shrink: 0 !important;
  display: block !important;
}

.case-open-action-btn {
  margin-top: 6px;
  padding: 8px 12px;
  font-size: 11.5px;
  width: 100%;
}

/* ========================================================
   НЕДОСТАЮЩИЕ СТИЛИ ПРЕВЬЮ РЕДАКТОРА ПРЕДМЕТОВ
   ======================================================== */
.loot-preview-box {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.loot-live-preview {
  min-height: 70px;
  background: #111111;
  border: 1px dashed #334155;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

/* Мобильная адаптация рулетки прокрутки */
@media (max-width: 480px) {
  .case-box-card {
    width: 95vw !important;
    padding: 14px 10px !important;
  }
  .roulette-viewport {
    height: 110px !important;
  }
  .roulette-card {
    flex: 0 0 85px !important;
    height: 95px !important;
  }
}

/* Редактор лута */
.loot-editor-card {
  max-width: 520px !important;
  width: 96vw !important;
  max-height: 90dvh !important;
  overflow-y: auto !important;
  padding: 14px !important;
  box-sizing: border-box !important;
}

.loot-editor-body {
  width: 100%;
  box-sizing: border-box;
}

.loot-editor-body .field-box {
  width: 100%;
  box-sizing: border-box;
}

.loot-editor-body .glass-input,
.loot-editor-body .glass-select,
.loot-editor-body .loot-textarea {
  max-width: 100%;
  box-sizing: border-box;
}

.chat-net-banner {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(220, 38, 38, 0.95);
  color: #ffffff;
  padding: 6px 12px;
  font-size: 11.5px;
  font-weight: 600;
  z-index: 50;
  backdrop-filter: blur(6px);
}

.chat-net-banner.warning {
  background: rgba(217, 119, 6, 0.95);
}

.net-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spinNetAnim 0.75s linear infinite;
}

@keyframes spinNetAnim {
  to { transform: rotate(360deg); }
}



:root {
  --cassette-png: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAAqCAYAAAADBl3iAAAQAElEQVR4AdSZeZBV1Z3Hv+e91/3e672b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Zj+O+nj/hl7/AwAA///cfyd2AAAABklEQVQDAHmAaEZz+5ryAAAAAElFTkSuQmCC");
}

/* 1. Общий контейнер кассеты */
.cassette-badge-wrap {
  position: relative;
  display: inline-block;
  width: 19px;
  height: 12px;
  transform: rotate(-12deg);
  filter: drop-shadow(0 0 3px rgba(239, 68, 68, 0.7));
  vertical-align: middle;
  line-height: 0;
  flex-shrink: 0;
}

/* 2. Защита от глобального правила .vip-crown img (чтобы картинка не ужималась криво) */
.vip-crown .cassette-badge-wrap {
    width: 19px !important;
    height: 12px !important;
}

.cassette-badge-wrap .cassette-img,
.vip-crown .cassette-badge-wrap img.cassette-img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  display: block !important;
  object-fit: fill !important;
}

/* 3. Блик: привязан ТОЧНО к 100% ширины и высоты кассеты */
/* 3. Блик: привязан ТОЧНО к 100% ширины и высоты кассеты */
.cassette-gleam {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;

  /* Маска строго повторяет контур и отверстия */
  -webkit-mask-image: var(--cassette-png);
  mask-image: var(--cassette-png);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center center;
  mask-position: center center;

  /* Одиночный тонкий луч под углом 115deg */
  background: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0) 42%,
    rgba(255, 255, 255, 0.95) 50%,
    rgba(255, 255, 255, 0) 58%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 350% 100%;
  background-repeat: no-repeat;
  mix-blend-mode: screen;

  /* Общая длительность цикла 5 секунд: ~1 секунда пробег луча, ~4 секунды пауза */
  animation: cassetteShine 8s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes cassetteShine {
  0% {
    /* Полностью скрыт слева */
    background-position: 250% 0;
  }
  90% {
    /* Полностью ушел вправо */
    background-position: -150% 0;
  }
  100% {
    /* Держим луч за границей видимости (длинная пауза) */
    background-position: -150% 0;
  }
}

/* 4. В окне выигрыша (win-item-preview) масштабируем ВЕСЬ блок пропорционально */
.win-item-preview .cassette-badge-wrap {
  width: 58px !important;
  height: calc(58px * (15 / 19)) !important;
}

/* 5. В окне предпросмотра кейса */
.case-inspect-item .cassette-badge-wrap {
  transform: scale(2) rotate(-12deg);
  margin: 10px 0;
}

/* --- СТИЛИ ДЛЯ МОДАЛКИ ЕЖЕДНЕВНОГО ПОДАРКА --- */
.daily-gift-card {
  text-align: center;
  position: relative;
  overflow: hidden;
  max-width: 340px !important;
  border: 1px solid rgba(254, 240, 138, 0.25) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(239, 68, 68, 0.2) !important;
}

.daily-gift-glow {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.35) 0%, rgba(250, 204, 21, 0.2) 50%, transparent 75%);
  pointer-events: none;
  filter: blur(14px);
}

.daily-gift-box {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0 16px 0;
}
.daily-3d-gift {
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 14px 25px rgba(0, 0, 0, 0.7));
  animation: giftHover 3.2s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes giftHover {
  0% { transform: translateY(0); }
  100% { transform: translateY(-7px); }
}

.daily-reward-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(250, 204, 21, 0.12);
  border: 1.5px solid rgba(250, 204, 21, 0.35);
  border-radius: 12px;
  padding: 8px 18px;
  font-size: 15px;
  font-weight: 800;
  color: #facc15;
  box-shadow: 0 4px 15px rgba(234, 179, 8, 0.2);
}

/* Просмотр содержимого кейса */
.case-preview-card {
  max-width: 440px !important;
}
.case-odds-row {
  display: flex !important;
  flex-wrap: wrap !important; /* Разрешаем перенос на новую строку, если не хватает места */
  gap: 4px !important;
  justify-content: center !important;
  margin-bottom: 10px !important;
}

.case-odds-badge {
  flex: 1 1 18% !important; /* Каждая плашка занимает примерно 1/5 строки с возможностью сжиматься */
  min-width: 58px !important; /* Минимальная ширина, чтобы текст не ломался сильно */
  text-align: center;
  border-radius: 6px;
  font-weight: 350;
  font-size: 10px !important;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
}

.case-inspect-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* Контейнер действий под рулеткой */
.spin-actions-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: relative;
  z-index: 2;
}

/* Кнопка "Крутить" находится поверх выплывающей кнопки */
.case-open-btn {
  position: relative;
  z-index: 3;
}

/* Слот кнопки: изначально имеет нулевую высоту и плавно раздвигает панель вниз */
.skip-btn-slot {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s cubic-bezier(0.16, 1, 0.3, 1), margin-top 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  margin-top: 0px;
  position: relative;
  z-index: 1;
}

.skip-slot-inner {
  overflow: hidden;
  min-height: 0;
}

/* Сама кнопка: прячется под кнопкой "Крутить" и выезжает из-под неё */
.skip-anim-btn {
  width: 100% !important;
  height: 38px !important;
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* АКТИВНОЕ СОСТОЯНИЕ (во время прокрутки рулетки) */
/* 1. Панель плавно раздвигается */
.skip-btn-slot.active {
  grid-template-rows: 1fr;
  margin-top: 8px;
}

/* 2. Кнопка выплывает вниз и проявляется */
.skip-btn-slot.active .skip-anim-btn {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* --- ЦЕНТРАЛЬНАЯ ПЛАШКА ОНЛАЙНА В ШАПКЕ --- */
.center-stat-badge {
  background: rgba(16, 185, 129, 0.08) !important;
  border: 1px solid rgba(16, 185, 129, 0.25) !important;
  color: #34d399 !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  padding: 4px 10px !important;
  border-radius: 20px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
}

.center-stat-badge .live-pulse {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
}

/* --- КНОПКА ТРОЕТОЧИЯ СЛЕВА В ЧАТЕ --- */
.chat-tool-btn {
  background: transparent;
  border: none;
  color: #7b889b;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}

.chat-tool-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

/* Перенос открывающейся шторки смайликов направо */
.emoji-sheet {
  left: auto !important;
  right: 12px !important;
}

/* --- ВСПЛЫВАЮЩЕЕ МЕНЮ ДЕЙСТВИЙ (...) --- */
.chat-actions-popup {
  position: absolute;
  bottom: 58px;
  left: 12px;
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
  display: none;
  flex-direction: column;
  padding: 6px;
  z-index: 65;
  min-width: 250px;
  animation: sheetFadeUp 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.chat-actions-popup.show {
  display: flex;
}

.chat-action-popup-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: #e5e5e5;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, transform 0.1s ease;
  width: 100%;
}

.chat-action-popup-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.chat-action-popup-item:active {
  transform: scale(0.98);
}

.action-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.question-icon-wrap {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.action-item-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.action-item-text strong {
  font-size: 12.5px;
  color: #f1f5f9;
}

.action-item-text span {
  font-size: 10.5px;
  color: #94a3b8;
}

.chat-action-popup-item.disabled,
.chat-action-popup-item:disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  filter: grayscale(0.5);
}

/* Бейдж реального онлайна только для админа */
.admin-only-counter {
  margin-left: 6px;
  padding: 1px 6px;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

/* 1. Жесткая фиксация кнопки переключения языка */
.lang-switch-btn {
  width: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  height: 28px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
}

/* 2. Защита элементов шапки от сдвигов */
.header-top-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
}

.center-stat-badge, #stat-online-badge {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}

.user-economy-badges {
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

/* 3. Жесткая фиксация кнопок нижнего бара */
.bottom-nav {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.bottom-nav .nav-btn {
  flex: 1 1 0 !important; /* Каждая кнопка занимает ровно 25% ширины независимо от длины текста */
  width: 25% !important;
  min-width: 0 !important;
  padding: 6px 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  color: #71717a !important;
}

.bottom-nav .nav-btn span {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
}

/* 4. БЕЛАЯ подсветка активной вкладки вместо синей */
.bottom-nav .nav-btn.active {
  color: #ffffff !important;
}

.bottom-nav .nav-btn.active .nav-icon {
  fill: #ffffff !important;
  stroke: #ffffff !important;
  transform: translateY(-2px);
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(18, 18, 20, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: space-around;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  z-index: 1000;
}

.nav-btn {
  background: none;
  border: none;
  outline: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #888;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 12px;
  transition: all 0.2s ease;
}

.nav-btn .nav-icon {
  width: 22px;
  height: 22px;
  fill: currentColor;
  transition: transform 0.2s ease;
}

.nav-btn.active {
  color: #fff;
}

.nav-btn.active .nav-icon {
  transform: translateY(-2px);
  fill: #3b82f6; /* Акцентный синий цвет */
}

/* Контейнеры страниц под навбар */
.tab-content {
  display: none;
  padding-bottom: 75px; /* Чтобы контент не перекрывался нижним баром */
}

.tab-content.active {
  display: block;
}
/* 1. ПОЛНОЕ ОБНУЛЕНИЕ ВНЕШНЕГО ПУЗЫРЯ ЧАТА ДЛЯ ПОДАРКОВ (Убирает огромную внешнюю рамку) */
.bubble-row.system:has(.gift-banner),
.bubble-row.system.highlight.topic-card:has(.gift-banner),
.bubble-row.system.gift-msg {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 6px auto !important;
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

.bubble-row.system:has(.gift-banner) .bubble-text,
.bubble-row.system.gift-msg .bubble-text {
  background: transparent !important;
  padding: 0 !important;
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
}

.bubble-row.system:has(.gift-banner) .actual-text,
.bubble-row.system.gift-msg .actual-text {
  display: flex !important;
  justify-content: center !important;
  width: 100% !important;
}

/* Центрируем время строго под карточкой подарка */
.bubble-row.system:has(.gift-banner) .meta-row,
.bubble-row.system.gift-msg .meta-row {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  margin-top: 3px !important;
}

.bubble-row.system:has(.gift-banner) .meta-row .time-stamp,
.bubble-row.system.gift-msg .meta-row .time-stamp {
  font-size: 11px !important;
  color: #64748b !important;
  text-align: center !important;
}

.bubble-row.system:has(.gift-banner) .bubble-reply-indicator,
.bubble-row.system.gift-msg .bubble-reply-indicator,
.bubble-row.system:has(.gift-banner) .check-status,
.bubble-row.system.gift-msg .check-status {
  display: none !important;
}

/* 2. БАЗОВАЯ КАРТОЧКА ПОДАРКА (Адаптивная под любые экраны) */
.gift-banner {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  background: rgba(15, 23, 42, 0.95) !important;
  border-radius: 18px !important;
  padding: 12px 14px !important;
  width: 250px !important;         /* Компактный размер под экраны смартфонов */
  max-width: 82vw !important;
  box-sizing: border-box !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: giftPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
}

/* -------------------------------------------------------------
   КАРТОЧКА МОНЕТ (УВЕЛИЧЕНА ШИРИНА И ОТСТУПЫ)
------------------------------------------------------------- */
.gift-coins-anim {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: left !important;
  gap: 14px !important;
  width: 325px !important;          /* Сделали шире, чтобы текст дышал */
  max-width: 92vw !important;
  padding: 12px 18px !important;
  box-sizing: border-box !important;
  border: 1px solid rgba(234, 179, 8, 0.45) !important;
  box-shadow: 0 4px 22px rgba(0, 0, 0, 0.55), 0 0 18px rgba(234, 179, 8, 0.28) !important;
}

.gift-banner-icon {
  font-size: 38px !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  animation: coinSpin 1.4s infinite ease-in-out alternate !important;
}

.gift-banner-body {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.gift-banner-body strong {
  color: #fde047 !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  white-space: nowrap !important;   /* Заголовок не будет переноситься */
}

.gift-banner-body p {
  margin: 0 !important;
  color: #e2e8f0 !important;
  font-size: 12.5px !important;
  line-height: 1.35 !important;
  white-space: nowrap !important;   /* Вся строка с суммой умещается в одну линию */
}

/* 4. ЗАГОЛОВОК И ВНУТРЕННИЙ БЛОК */
.gift-header {
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px !important;
  color: #facc15 !important;
  margin-bottom: 8px !important;
  text-transform: uppercase !important;
  text-shadow: 0 0 8px rgba(250, 204, 21, 0.6) !important;
  white-space: nowrap !important;
}

.gift-item-card-inner {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  padding: 8px 12px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.gift-item-card-inner .cassette-badge-wrap,
.gift-item-card-inner img,
.gift-item-card-inner svg {
  margin: 2px auto 4px auto !important;
  display: block !important;
}

.gift-item-card-inner strong {
  font-size: 13.5px !important;
  line-height: 1.25 !important;
}

.gift-item-card-inner span {
  font-size: 10.5px !important;
  margin-top: 2px !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
}

.gift-footer-text,
.gift-banner > div:last-child {
  font-size: 11px !important;
  color: #94a3b8 !important;
  margin-top: 8px !important;
  line-height: 1.3 !important;
  white-space: nowrap !important;
}

/* 5. РЕМОНТ СВЕЧЕНИЙ РЕДКОСТЕЙ */
.gift-item-anim.rarity-mythic {
  border: 1px solid #facc15 !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 16px rgba(250, 204, 21, 0.35) !important;
}

.gift-item-anim.rarity-legendary {
  border: 1px solid #ef4444 !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 16px rgba(239, 68, 68, 0.35) !important;
}

.gift-item-anim.rarity-epic {
  border: 1px solid #a855f7 !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 16px rgba(168, 85, 247, 0.35) !important;
}

.gift-item-anim.rarity-rare {
  border: 1px solid #22c55e !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 14px rgba(34, 197, 94, 0.3) !important;
}

.gift-item-anim.rarity-common {
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
}

@keyframes giftPop {
  0% { transform: scale(0.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes coinSpin {
  0% { transform: rotate(-8deg) scale(0.96); }
  100% { transform: rotate(8deg) scale(1.1); }
}

/* ========================================================
   МОНОХРОМНЫЙ ПРЕЛОАДЕР И ЭКРАН БАНА
   ======================================================== */
.app-preloader {
  position: fixed;
  inset: 0;
  z-index: 99999999;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
}

.app-preloader.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
  padding: 20px;
  max-width: 320px;
  box-sizing: border-box;
}

/* Киберпанк / Нео-брутализм куб-индикатор */
.preloader-anim-box {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.cube-wireframe {
  width: 42px;
  height: 42px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cube-wireframe .wire-face {
  position: absolute;
  inset: 0;
  border: 1.5px solid #ffffff;
  border-radius: 6px;
  box-sizing: border-box;
}

.cube-wireframe .face-1 {
  animation: monoSpin1 2.8s cubic-bezier(0.77, 0, 0.175, 1) infinite;
}

.cube-wireframe .face-2 {
  border-color: rgba(255, 255, 255, 0.35);
  animation: monoSpin2 2.8s cubic-bezier(0.77, 0, 0.175, 1) infinite;
}

.cube-wireframe .wire-core {
  width: 6px;
  height: 6px;
  background: #ffffff;
  border-radius: 50%;
  animation: coreBlink 1.4s ease-in-out infinite alternate;
}

@keyframes monoSpin1 {
  0% { transform: rotate(0deg) scale(0.9); }
  50% { transform: rotate(180deg) scale(1.1); }
  100% { transform: rotate(360deg) scale(0.9); }
}

@keyframes monoSpin2 {
  0% { transform: rotate(45deg) scale(1.1); }
  50% { transform: rotate(225deg) scale(0.9); }
  100% { transform: rotate(405deg) scale(1.1); }
}

@keyframes coreBlink {
  0% { opacity: 0.2; transform: scale(0.7); }
  100% { opacity: 1; transform: scale(1.3); }
}

/* Статус и типографика */
.preloader-status-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.preloader-title {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #ededed;
  text-transform: uppercase;
}

.preloader-desc-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.preloader-indicator {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ffffff;
  opacity: 0.8;
  animation: coreBlink 1s infinite alternate;
}

.preloader-status-text {
  font-size: 12px;
  color: #71717a;
  font-weight: 500;
  letter-spacing: 0.2px;
}

/* Состояние БАНА */
.app-preloader.banned {
  background: #000000 !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.app-preloader.banned .cube-wireframe {
  display: none !important;
}

.app-preloader.banned .preloader-anim-box {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  background: #0d0d0d;
}

.app-preloader.banned .preloader-anim-box::after {
  content: "✕";
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  display: block;
  line-height: 1;
}

.app-preloader.banned .preloader-title {
  color: #ffffff !important;
  font-size: 16px !important;
  letter-spacing: 3px !important;
}

.app-preloader.banned .preloader-desc-wrap {
  display: none !important;
}

.app-preloader.banned .preloader-subtext {
  display: block !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
  color: #a1a1aa !important;
  margin-top: 4px;
}