/* ========================================================
   ЧАСТЬ 1 ИЗ 2 (База, Космос, Меню поиска, Чат, Эмодзи, VIP)
   ======================================================== */

@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;
}

* {
  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;
}

#starfield-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  background: #000000;
}

.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;
  z-index: 2;
  width: 100%;
  max-width: 900px;
  height: 100%;
  height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.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;
}

.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;
}

/* ========================================================
   ЭКРАНЫ И ПРОЗРАЧНАЯ ПОДЛОЖКА ПОД 3D-КОСМОС
   ======================================================== */
.glass-panel,
#screen-setup,
#screen-search,
#screen-chat {
  background: rgba(3, 3, 5, 0.22) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.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);
}

/* ВАЖНО: Задаем block ТОЛЬКО когда у экрана есть класс .active, чтобы он не перекрывал чат! */
#screen-setup.screen.active {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* Верхняя капсула парит ПОВЕРХ скролла вкладок (элементы просвечивают сквозь матовое стекло!) */
#screen-setup .panel-header {
  position: absolute !important;
  top: 10px !important;
  left: 14px !important;
  right: 14px !important;
  margin: 0 !important;
  padding: 8px 14px !important;
  z-index: 50 !important;
  overflow: hidden !important;
  background: linear-gradient(180deg, rgba(24, 24, 32, 0.42) 0%, rgba(12, 12, 18, 0.56) 100%) !important;
  backdrop-filter: blur(18px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(190%) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 22px !important;
  box-shadow: 
    0 10px 28px rgba(0, 0, 0, 0.65),
    inset 0 1px 1px rgba(255, 255, 255, 0.28) !important;
}

/* Идеальная центровка верхней шапки (онлайн строго по центру экрана) */
.header-top-row {
  display: grid !important;
  grid-template-columns: 1fr auto 1fr !important;
  align-items: center !important;
  width: 100% !important;
  gap: 8px !important;
}

.header-top-row .brand-tag {
  justify-self: start !important;
  width: fit-content !important;
  cursor: default !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-touch-callout: none !important;
  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;
}

.header-top-row #stat-online-badge,
.center-stat-badge,
.live-counter {
  justify-self: center !important;
  margin: 0 auto !important;
  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;
  flex-shrink: 0 !important;
}

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

.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;
}

.header-top-row .user-economy-badges {
  justify-self: end !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.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));
}

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

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

/* ========================================================
   ТАБЫ ПОИСКА (БЫСТРЫЙ / ПОДРОБНЫЙ)
   ======================================================== */
.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 .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 !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 .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;
}

/* ========================================================
   ФОРМА И ФИЛЬТРЫ ПОИСКА
   ======================================================== */
.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: rgba(29, 29, 29, 0.6) !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;
}

.setup-grid {
  flex: 0 0 auto !important;
  overflow-y: visible !important;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px !important;
}

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

@media (min-width: 769px) {
  body {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .app-layout {
    height: 100dvh !important;
    max-height: 100dvh !important;
  }

  .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);
  }
}

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

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

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

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

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

.glass-btn {
  background: rgba(15, 15, 18, 0.85);
  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;
}

.glass-btn.sm {
  height: 32px !important;
  padding: 0 10px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  border-radius: 11px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
}

.glass-btn.icon-only {
  padding: 0 !important;
  width: 32px !important;
  min-width: 32px !important;
}

.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;
}

/* Сворачиваемые категории фильтров */
.filter-foldable {
  width: 100% !important;
  box-sizing: border-box !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !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(255, 255, 255, 0.16) !important;
  background: rgba(255, 255, 255, 0.06) !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;
}

.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;
}

.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;
}

.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;
}

.search-action-wrap {
  margin-top: 8px !important;
  margin-bottom: 16px !important;
  padding-top: 0 !important;
  padding-bottom: 18px !important;
  flex-shrink: 0 !important;
  display: flex;
  justify-content: center;
  width: 100%;
}

.search-action-wrap .submit-btn {
  max-width: 360px;
  width: 100%;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #dcdcdc 100%);
  color: #050505;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.2px;
  box-shadow: 0 4px 0 #8c8c8c, 0 10px 28px rgba(255, 255, 255, 0.16);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.search-action-wrap .submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #8c8c8c, 0 14px 34px rgba(255, 255, 255, 0.24);
}

.search-action-wrap .submit-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #8c8c8c, 0 4px 12px rgba(255, 255, 255, 0.15);
}

/* ========================================================
   ЭКРАН ОЖИДАНИЯ (РАДАР)
   ======================================================== */
#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;
}

/* ========================================================
   ЭКРАН ЧАТА: ПАРЯЩИЕ ОВАЛЬНЫЕ КАПСУЛЫ ПОВЕРХ СООБЩЕНИЙ
   ======================================================== */
#screen-chat.chat-screen.active {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: transparent !important;
}

#screen-chat .chat-feed {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  padding: 72px 14px calc(76px + env(safe-area-inset-bottom, 0px)) 14px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box !important;
  background: transparent !important;
  z-index: 1 !important;
}

#screen-chat .chat-bar {
  position: absolute !important;
  top: 10px !important;
  left: 10px !important;
  right: 10px !important;
  margin: 0 !important;
  width: auto !important;
  height: 50px !important;
  padding: 0 14px !important;
  border-radius: 24px !important;
  overflow: hidden !important;
  background: linear-gradient(180deg, rgba(24, 24, 32, 0.42) 0%, rgba(12, 12, 18, 0.55) 100%) !important;
  backdrop-filter: blur(18px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(190%) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 
    0 10px 28px rgba(0, 0, 0, 0.65),
    inset 0 1px 1px rgba(255, 255, 255, 0.28) !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 8px !important;
  z-index: 30 !important;
}

#screen-chat .chat-input-bar {
  position: absolute !important;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
  left: 10px !important;
  right: 10px !important;
  margin: 0 !important;
  width: auto !important;
  padding: 6px 8px !important;
  border-radius: 24px !important;
  overflow: hidden !important;
  background: linear-gradient(180deg, rgba(24, 24, 32, 0.45) 0%, rgba(12, 12, 18, 0.58) 100%) !important;
  backdrop-filter: blur(18px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(190%) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 
    0 12px 30px rgba(0, 0, 0, 0.7),
    inset 0 1px 1px rgba(255, 255, 255, 0.26) !important;
  display: flex !important;
  align-items: flex-end !important;
  gap: 8px !important;
  box-sizing: border-box !important;
  z-index: 30 !important;
}

textarea#msg-input {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  width: 100% !important;
  background: rgba(255, 255, 255, 0.05) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  border-radius: 17px !important;
  outline: none !important;
  font-family: inherit !important;
  font-size: 14px !important;
  line-height: 20px !important;
  padding: 8px 13px !important;
  box-sizing: border-box !important;
  resize: none !important;
  overflow-x: hidden !important;
  overflow-y: hidden;
  word-wrap: break-word !important;
  white-space: pre-wrap !important;
  min-height: 38px !important;
  height: 38px;
  max-height: 138px !important;
  transition: border-color 0.2s ease, background 0.2s ease !important;
}

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

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

textarea#msg-input::-webkit-scrollbar {
  width: 4px;
}

textarea#msg-input::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
}

.send-action {
  width: 38px;
  height: 38px;
  border-radius: 16px !important;
  background: #ffffff;
  border: none;
  color: #050505;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(255, 255, 255, 0.22);
  transition: transform 0.15s ease;
}

.send-action:active {
  transform: scale(0.92);
}

.user-meta,
.preview-meta {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0 !important;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  vertical-align: middle !important;
}

.online-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  flex-shrink: 0;
  margin-right: 7px !important;
  box-shadow: 0 0 8px #10b981;
}

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

.sub-title-badge {
  font-size: 11px;
  color: #64748b;
  font-weight: normal;
  margin-left: 2px;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

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

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

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

.contact-btn.shared {
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: rgba(16, 185, 129, 0.4) !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;
}

@media (max-width: 540px) {
  #btn-share-contact .btn-text-hide {
    display: none !important;
  }

  #btn-share-contact {
    padding: 0 !important;
    width: 32px !important;
    min-width: 32px !important;
  }

  #btn-next {
    padding: 0 12px !important;
  }

  #screen-chat .chat-bar {
    padding: 0 10px !important;
    gap: 6px !important;
  }

  .chat-controls {
    gap: 4px !important;
  }
}

/* Парящие плашки над капсулой ввода (ответ, печатает, баннер сети) */
#screen-chat .input-action-bar {
  position: absolute !important;
  bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important;
  left: 14px !important;
  right: 14px !important;
  margin: 0 !important;
  padding: 7px 14px;
  display: none;
  align-items: center;
  justify-content: space-between;
  background: rgba(18, 20, 28, 0.65) !important;
  backdrop-filter: blur(16px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 3px solid #ffffff;
  border-radius: 16px !important;
  overflow: hidden !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65);
  font-size: 12px;
  z-index: 29 !important;
}

#screen-chat .input-action-bar.show {
  display: flex !important;
}

.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;
}

#screen-chat .typing-notice {
  position: absolute !important;
  bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important;
  left: 16px !important;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 5px 12px !important;
  font-size: 11px;
  color: #cbd5e1;
  background: rgba(14, 14, 20, 0.62) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 14px !important;
  z-index: 28 !important;
}

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

.dots-anim span {
  width: 4px;
  height: 4px;
  background: #e5e5e5;
  border-radius: 50%;
  opacity: 0.6;
  animation: typingWave 1.2s infinite ease-in-out;
}

.dots-anim span:nth-child(2) {
  animation-delay: 0.15s;
}

.dots-anim span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typingWave {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.chat-net-banner {
  position: absolute !important;
  top: 66px !important;
  left: 16px !important;
  right: 16px !important;
  border-radius: 12px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(220, 38, 38, 0.92);
  color: #ffffff;
  padding: 6px 12px;
  font-size: 11.5px;
  font-weight: 600;
  z-index: 35 !important;
  backdrop-filter: blur(8px);
}

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

.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); }
}

/* ========================================================
   ПУЗЫРИ СООБЩЕНИЙ И АНИМАЦИИ В ЧАТЕ
   ======================================================== */
.msg-row-wrapper {
  width: 100%;
  display: flex;
  position: relative;
  touch-action: pan-y;
  box-sizing: border-box;
  animation: msgPopIn 0.22s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  will-change: transform, opacity;
}

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

.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;
}

.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,
.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-text {
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.35;
  word-break: break-word;
  position: relative;
  overflow: hidden;
}

.bubble-row .actual-text {
  white-space: pre-wrap !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
}

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

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

.edited-tag {
  font-size: 9px;
  color: #94a3b8;
  font-style: italic;
  margin-right: 3px;
}

.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;
}

.check-status.status-error svg {
  stroke: #ef4444;
}

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

.bubble-row.me.error .bubble-text {
  background: #dc2626 !important;
}

.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 3px #38bdf8, 0 0 25px rgba(56, 189, 248, 0.85);
    background-color: rgba(56, 189, 248, 0.25) !important;
  }
  50% {
    box-shadow: 0 0 0 2px #38bdf8, 0 0 15px rgba(56, 189, 248, 0.5);
    background-color: rgba(56, 189, 248, 0.15) !important;
  }
  100% {
    box-shadow: none;
    background-color: transparent;
  }
}

.bubble-row.highlighted .bubble-text {
  animation: highlightSmooth 2s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

.bubble-row.highlighted {
  animation: none !important;
}


/* Системные сообщения и карточки рандомных тем */
.bubble-row.system {
  display: block !important;
  align-self: center !important;
  font-size: 12px !important;
  color: #8b99ad !important;
  text-align: center !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 {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 8px 12px;
  border-radius: 10px;
  color: #e5e5e5;
}

/* Карточка случайной темы в чате */
.bubble-row.system.highlight.topic-card {
  position: relative !important;
  background: linear-gradient(145deg, rgba(18, 22, 34, 0.75) 0%, rgba(10, 12, 20, 0.85) 100%) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  border-radius: 18px !important;
  padding: 14px 20px !important;
  color: #f1f5f9 !important;
  text-align: center !important;
  max-width: 82% !important;
  margin: 12px auto !important;
  box-shadow: 
    0 12px 32px rgba(0, 0, 0, 0.7),
    0 0 24px rgba(56, 189, 248, 0.15),
    inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
  animation: topicCardPop 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

/* Заголовок с кубиком */
.bubble-row.system.highlight.topic-card strong {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  color: #38bdf8 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.6px !important;
  margin-bottom: 8px !important;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.6) !important;
}

.bubble-row.system.highlight.topic-card span {
  display: block !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6) !important;
}

@keyframes topicCardPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

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

/* Плавающая кнопка возврата вниз */
.scroll-bottom-fab {
  position: absolute;
  right: 18px;
  bottom: calc(74px + env(safe-area-inset-bottom, 0px));
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(20, 20, 26, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 55;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.9);
  transition: opacity 0.2s ease, transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0.2s, border-color 0.2s;
}

.scroll-bottom-fab.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.scroll-bottom-fab:hover {
  background: rgba(34, 34, 44, 0.95);
  border-color: #ffffff;
}

.scroll-bottom-fab:active {
  transform: scale(0.92);
}

.scroll-bottom-fab.has-return-target {
  border-color: #38bdf8;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.8), 0 0 12px rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

/* ========================================================
   ЭМОДЗИ, ШТОРКА СМАЙЛИКОВ И ВСПЛЫВАЮЩИЕ МЕНЮ ЧАТА
   ======================================================== */
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 .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;
}

.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;
}

.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;
}

.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));
}

.chat-tool-btn,
.emoji-toggle-btn {
  background: transparent;
  border: none;
  color: #8b99ad;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 12px;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}

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

.emoji-sheet {
  position: absolute;
  bottom: 72px !important;
  right: 12px !important;
  left: auto !important;
  width: 360px;
  max-width: calc(100% - 24px);
  height: 270px;
  background: rgba(19, 19, 24, 0.92);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.8);
  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: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  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: rgba(0, 0, 0, 0.25);
  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: #ffffff;
}

.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);
}

.chat-actions-popup {
  position: absolute !important;
  bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important;
  left: 14px !important;
  background: linear-gradient(145deg, rgba(22, 24, 34, 0.82) 0%, rgba(12, 14, 22, 0.92) 100%) !important;
  backdrop-filter: blur(24px) saturate(200%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(200%) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 18px !important;
  padding: 8px !important;
  box-shadow: 
    0 16px 40px rgba(0, 0, 0, 0.85),
    0 0 20px rgba(56, 189, 248, 0.12),
    inset 0 1px 1px rgba(255, 255, 255, 0.25) !important;
  display: none;
  flex-direction: column;
  z-index: 100 !important;
  min-width: 260px;
  animation: sheetFadeUp 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

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

/* Пункт меню (кнопка) */
.chat-action-popup-item {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 10px 12px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  color: #f1f5f9 !important;
  cursor: pointer;
  text-align: left !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.chat-action-popup-item:hover {
  background: rgba(56, 189, 248, 0.12) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
  transform: translateY(-1px) scale(1.01) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 12px rgba(56, 189, 248, 0.25) !important;
}

.chat-action-popup-item:active {
  transform: scale(0.97) !important;
}

.chat-action-popup-item.disabled,
.chat-action-popup-item:disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  background: rgba(255, 255, 255, 0.02) !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
  filter: grayscale(0.4) !important;
}

.chat-action-popup-item.disabled strong,
.chat-action-popup-item:disabled strong {
  color: #cbd5e1 !important;
}

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

.question-icon-wrap {
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px !important;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, rgba(56, 189, 248, 0.08) 100%) !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
  color: #38bdf8 !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}
.question-icon-wrap svg {
  filter: drop-shadow(0 0 4px rgba(56, 189, 248, 0.6));
}

.action-item-text {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.action-item-text strong {
  font-size: 13px !important;
  color: #ffffff !important;
  letter-spacing: 0.2px;
}

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

.msg-context-menu {
  position: fixed;
  background: rgba(22, 25, 36, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.8);
  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: 9px;
  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.18);
  color: #ffffff;
}

/* ========================================================
   КАСТОМИЗАЦИЯ ПУЗЫРЕЙ И 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-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;
}

.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));
}

.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%; }
}

.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); }
}

.bubble-anim-matrix {
  position: relative !important;
  overflow: hidden !important;
  box-shadow: 0 0 14px var(--bubble-glow-color, rgba(16, 185, 129, 0.5)), inset 0 0 12px rgba(255, 255, 255, 0.08) !important;
}

.bubble-anim-matrix::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: 
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.35) 0px, rgba(0, 0, 0, 0.35) 2px, transparent 2px, transparent 7px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.35) 0px, rgba(0, 0, 0, 0.35) 2px, transparent 2px, transparent 7px);
  background-size: 7px 7px;
  opacity: 0.75;
}

.bubble-anim-matrix::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255, 255, 255, 0.05) 35%,
    var(--bubble-glow-color, rgba(74, 222, 128, 0.45)) 48%,
    rgba(255, 255, 255, 0.85) 50%,
    transparent 54%,
    transparent 100%
  );
  mix-blend-mode: overlay;
  transform: translateY(-120%);
  animation: matrixScannerPass 3.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.bubble-anim-matrix > * {
  position: relative;
  z-index: 2;
}

@keyframes matrixScannerPass {
  0% { transform: translateY(-110%); }
  65% { transform: translateY(110%); }
  100% { transform: translateY(110%); }
}
/* ========================================================
   ЧАСТЬ 2 ИЗ 2 (Мастерская, Рулетка, Навигация, Магазин, Модалки)
   ======================================================== */

.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-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;
  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: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-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;
}

.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;
}

.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;
}

.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);
}

.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;
}

.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;
}

/* ========================================================
   МАСТЕРСКАЯ СТИЛЯ И ГАРДЕРОБ (ИНВЕНТАРЬ)
   ======================================================== */
.custom-workshop-card {
  max-width: 440px !important;
  width: 95vw !important;
  min-height: 620px !important;
  max-height: 90dvh !important;
  padding: 16px 14px !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

.custom-live-preview-box {
  background: rgba(8, 8, 12, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 12px 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,
.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;
}

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

.workshop-section-content.active {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  min-height: 380px !important;
}

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

#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: rgba(12, 12, 16, 0.9);
  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;
  min-width: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  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: #10b981 !important;
  border-left-color: #10b981 !important;
  border-right-color: #10b981 !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: #10b981;
  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;
}

.card-icon-preview img,
.inv-card-preview img {
  max-width: 32px;
  max-height: 32px;
  object-fit: contain;
}

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

.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);
}

@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;
  }
}

/* ========================================================
   РУЛЕТКА КЕЙСОВ И ПОДСВЕТКА РЕДКОСТЕЙ
   ======================================================== */
.roulette-card.rarity-common,
.inv-item-card.rarity-common {
  border-bottom: 3.5px solid #94a3b8 !important;
}

.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);
}

.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);
}

.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);
}

.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);
}

.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;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.roulette-card.active-center {
  transform: scale(1.06);
  filter: brightness(1.25);
  z-index: 5;
}

.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;
}

.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, 0.8), 0 0 16px rgba(255, 255, 255, 0.35) !important;
  transition: box-shadow 0.08s ease, background-color 0.08s ease !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, 0.8)) !important;
  transition: transform 0.07s ease-out !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, 0.8)) !important;
  transition: transform 0.07s ease-out !important;
}

.roulette-pointer-line.tick-kick {
  background: #ffffff !important;
  box-shadow: 0 0 8px #ffffff, 0 0 18px var(--pointer-glow, #ffffff), 0 0 32px var(--pointer-glow, #ffffff) !important;
}

.roulette-pointer-line.tick-kick::before {
  transform: translateX(-50%) translateY(2px) scale(1.18) !important;
}

.roulette-pointer-line.tick-kick::after {
  transform: translateX(-50%) translateY(-2px) scale(1.18) !important;
}

.spin-actions-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: relative;
  z-index: 2;
}

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

.skip-btn-slot.active {
  grid-template-rows: 1fr;
  margin-top: 8px;
}

.skip-btn-slot.active .skip-anim-btn {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@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;
  }
}

/* ========================================================
   ПЛАВАЮЩИЙ ОСТРОВОК НАВИГАЦИИ И ВКЛАДКИ ЭКРАНОВ
   ======================================================== */
.main-tabs-viewport {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  z-index: 1 !important;
}

.nav-tab-page {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
  /* Сверху 76px запаса под верхнюю матовую шапку, снизу 105px под нижний островок */
  padding: 76px 16px calc(105px + env(safe-area-inset-bottom, 0px)) 16px !important;
  display: none;
  flex-direction: column;
  box-sizing: border-box !important;
}

.nav-tab-page.active {
  display: flex !important;
}

.nav-tab-page.slide-in-right {
  animation: tabSlideInRight 0.28s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.nav-tab-page.slide-in-left {
  animation: tabSlideInLeft 0.28s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes tabSlideInRight {
  0% { opacity: 0; transform: translateX(34px); }
  100% { opacity: 1; transform: translateX(0); }
}

@keyframes tabSlideInLeft {
  0% { opacity: 0; transform: translateX(-34px); }
  100% { opacity: 1; transform: translateX(0); }
}

.floating-bottom-island {
  position: absolute;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 390px;
  height: 60px;
  background: rgba(22, 22, 26, 0.52) !important;
  backdrop-filter: blur(24px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(190%) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 24px !important;
  padding: 5px !important;
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 4px !important;
  z-index: 900;
  box-shadow: 
    0 18px 40px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.24) !important;
}

.island-nav-btn {
  background: transparent;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  border-radius: 19px !important;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  transition: all 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  user-select: none;
  -webkit-user-select: none;
}

.island-nav-btn:focus,
.island-nav-btn:focus-visible {
  outline: none !important;
}

.island-nav-btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1), stroke 0.2s ease;
}

.island-nav-btn:hover:not(.active) {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.06);
}

.island-nav-btn.active {
  background: #ffffff !important;
  color: #050505 !important;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.28) !important;
}

.island-nav-btn.active svg {
  stroke: #050505 !important;
  transform: translateY(-1px) scale(1.06);
}

/* ========================================================
   МАГАЗИН В СТИЛЕ CLASH ROYALE И ЦЕНТР ЗАДАНИЙ
   ======================================================== */
.cr-shop-container {
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 4px;
}

.cr-vip-banner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(38, 26, 6, 0.92) 0%, rgba(15, 12, 8, 0.96) 60%, rgba(28, 19, 5, 0.92) 100%);
  border: 1.5px solid rgba(250, 204, 21, 0.45);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 
    0 14px 35px rgba(0, 0, 0, 0.75),
    0 0 28px rgba(234, 179, 8, 0.14),
    inset 0 1px 0 rgba(254, 240, 138, 0.35);
}

.cr-vip-glow {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(250, 204, 21, 0.28) 0%, transparent 70%);
  pointer-events: none;
}

.cr-vip-comets {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.vip-comet {
  position: absolute;
  top: -20px;
  width: 95px;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, #fde047 65%, #ffffff 100%);
  border-radius: 999px;
  filter: drop-shadow(0 0 6px #facc15);
  transform: rotate(32deg);
  opacity: 0;
}

.vip-comet.comet-1 {
  left: -15%;
  animation: cometFly 4.2s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.vip-comet.comet-2 {
  left: 25%;
  width: 120px;
  animation: cometFly 5.5s cubic-bezier(0.22, 1, 0.36, 1) 1.8s infinite;
}

.vip-comet.comet-3 {
  left: 55%;
  width: 75px;
  animation: cometFly 4.8s cubic-bezier(0.22, 1, 0.36, 1) 3.1s infinite;
}

@keyframes cometFly {
  0% {
    transform: translate(0, 0) rotate(28deg) scaleX(0.4);
    opacity: 0;
  }
  12% {
    opacity: 0.95;
  }
  45%, 100% {
    transform: translate(340px, 190px) rotate(28deg) scaleX(1.1);
    opacity: 0;
  }
}

.vip-sparkle {
  position: absolute;
  color: #fef08a;
  font-size: 13px;
  text-shadow: 0 0 8px #facc15;
  animation: sparkleTwinkle 2.4s ease-in-out infinite alternate;
}

.vip-sparkle.sp-1 {
  top: 22%;
  right: 24%;
}

.vip-sparkle.sp-2 {
  bottom: 28%;
  left: 42%;
  animation-delay: 1.1s;
  font-size: 10px;
}

@keyframes sparkleTwinkle {
  0% { opacity: 0.15; transform: scale(0.7) rotate(0deg); }
  100% { opacity: 0.9; transform: scale(1.25) rotate(45deg); }
}

.cr-vip-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  position: relative;
  z-index: 2;
}

.cr-vip-tag {
  display: inline-block;
  background: linear-gradient(90deg, #facc15 0%, #f59e0b 100%);
  color: #090601;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.6px;
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 6px;
  text-transform: uppercase;
  box-shadow: 0 2px 10px rgba(250, 204, 21, 0.4);
}

.cr-vip-title-group h3 {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #fef08a;
  margin: 0 0 3px 0;
  text-shadow: 0 2px 12px rgba(234, 179, 8, 0.45);
}

.cr-vip-title-group p {
  font-size: 12px;
  color: #d6d3d1;
  margin: 0;
}

.cr-vip-crown-emblem {
  font-size: 38px;
  line-height: 1;
  filter: drop-shadow(0 6px 14px rgba(234, 179, 8, 0.5));
  animation: giftHover 3s ease-in-out infinite alternate;
}

.cr-vip-perks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
}

.cr-perk-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(254, 240, 138, 0.14);
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.cr-perk-pill span {
  font-size: 18px;
  flex-shrink: 0;
}

.cr-perk-pill div {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.cr-perk-pill strong {
  font-size: 11.5px;
  color: #ffffff;
}

.cr-perk-pill small {
  font-size: 10px;
  color: #a8a29e;
  margin-top: 2px;
}

.cr-vip-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(254, 240, 138, 0.14);
  position: relative;
  z-index: 2;
}

.cr-vip-status-info {
  display: flex;
  flex-direction: column;
  font-size: 11px;
  color: #a8a29e;
}

.cr-vip-status-info strong {
  font-size: 12.5px;
  color: #facc15;
}

.cr-buy-vip-btn {
  background: linear-gradient(135deg, #fde047 0%, #eab308 55%, #ca8a04 100%);
  border: 1px solid #fef9c3;
  color: #291002;
  font-weight: 900;
  font-size: 12.5px;
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(234, 179, 8, 0.45), inset 0 1px 1px #ffffff;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.cr-buy-vip-btn:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.08);
}

.cr-buy-vip-btn:active {
  transform: scale(0.97);
}

.cr-buy-vip-btn.vip-already-owned {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(74, 222, 128, 0.45);
  color: #4ade80;
  box-shadow: none;
}

.cr-section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0;
}

.cr-divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14), transparent);
}

.cr-divider-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: #a1a1aa;
  text-transform: uppercase;
}

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

.cr-chest-card {
  position: relative;
  background: linear-gradient(180deg, rgba(22, 24, 34, 0.9) 0%, rgba(12, 13, 18, 0.95) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 16px 14px 14px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s ease, box-shadow 0.22s ease;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.cr-chest-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 255, 255, 0.08);
}

.cr-chest-info-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
  cursor: pointer;
  z-index: 3;
  transition: all 0.15s ease;
}

.cr-chest-info-btn:hover {
  background: #ffffff;
  color: #050505;
  border-color: #ffffff;
}

.cr-chest-visual-wrap {
  position: relative;
  width: 120px;
  height: 105px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0 6px 0;
}

.cr-chest-pedestal-glow {
  position: absolute;
  width: 90px;
  height: 90px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.22) 0%, rgba(168, 85, 247, 0.12) 50%, transparent 72%);
  border-radius: 50%;
  filter: blur(8px);
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.cr-chest-card:hover .cr-chest-pedestal-glow {
  transform: scale(1.2);
  background: radial-gradient(circle, rgba(250, 204, 21, 0.3) 0%, rgba(56, 189, 248, 0.15) 55%, transparent 75%);
}

.case-card-icon,
.floating-chest-svg {
  width: 110px !important;
  height: 95px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
  position: relative;
  animation: chestFloatIdle 3.2s ease-in-out infinite alternate !important;
  will-change: transform;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.65));
}

.cr-chest-card:nth-child(even) .case-card-icon {
  animation-delay: 1.2s !important;
}

.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;
}

@keyframes chestFloatIdle {
  0% { transform: translateY(3px) rotate(-1deg); }
  100% { transform: translateY(-7px) rotate(1.5deg); }
}

.cr-chest-title {
  font-size: 14.5px;
  font-weight: 800;
  color: #ffffff;
  margin: 2px 0;
}

.cr-chest-sub {
  font-size: 11px;
  color: #71717a;
  margin-bottom: 12px;
}

.cr-chest-buy-btn {
  width: 100%;
  height: 38px;
  background: linear-gradient(180deg, #ededed 0%, #cfcfcf 100%);
  border: 1px solid #ffffff;
  border-radius: 11px;
  color: #050505;
  font-weight: 900;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 0 #8a8a8a, 0 6px 14px rgba(0, 0, 0, 0.5);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.15s ease;
}

.cr-chest-buy-btn:hover {
  filter: brightness(1.06);
}

.cr-chest-buy-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #8a8a8a, 0 2px 6px rgba(0, 0, 0, 0.5);
}

/* Карточки Заданий */
.task-card-modern {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: linear-gradient(145deg, rgba(18, 19, 26, 0.9) 0%, rgba(11, 12, 16, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.task-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.task-icon-box.gold { background: rgba(250, 204, 21, 0.12); border-color: rgba(250, 204, 21, 0.3); }
.task-icon-box.cyan { background: rgba(56, 189, 248, 0.12); border-color: rgba(56, 189, 248, 0.3); }
.task-icon-box.purple { background: rgba(168, 85, 247, 0.12); border-color: rgba(168, 85, 247, 0.3); }
.task-icon-box.blue { background: rgba(59, 130, 246, 0.12); border-color: rgba(59, 130, 246, 0.3); }

.task-info-col {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.task-info-col strong {
  font-size: 13.5px;
  color: #ffffff;
}

.task-info-col span {
  font-size: 11.5px;
  color: #94a3b8;
}

.task-reward-pill {
  color: #facc15 !important;
  font-weight: 800;
  font-size: 11px !important;
  border-radius: 8px;
  white-space: nowrap;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.task-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 3px;
}

.task-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8 0%, #4ade80 100%);
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.cr-task-action-btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  background: #ededed;
  color: #050505;
  font-weight: 800;
  font-size: 12px;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.cr-task-action-btn.gold {
  background: linear-gradient(135deg, #fde047 0%, #eab308 100%);
  color: #291002;
  box-shadow: 0 4px 12px rgba(234, 179, 8, 0.35);
}

.cr-task-action-btn:disabled,
.cr-task-action-btn.claimed {
  background: rgba(255, 255, 255, 0.06);
  color: #64748b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
  cursor: default;
}

/* ========================================================
   МОДАЛКИ, ПОДАРКИ АДМИНА, ТОСТЫ И ПРЕЛОАДЕР
   ======================================================== */
.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(8, 8, 12, 0.94) !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;
}

.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;
}

.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 #2e2e2e;
  border-radius: 8px;
  padding: 8px 10px;
  color: white;
  outline: none;
  font-size: 12.5px;
}

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

.win-display-card.rarity-common { border: 1px solid #94a3b8 !important; box-shadow: 0 0 25px rgba(148, 163, 184, 0.2) !important; }
.win-display-card.rarity-rare { border: 1px solid #22c55e !important; box-shadow: 0 0 30px rgba(34, 197, 94, 0.3) !important; }
.win-display-card.rarity-epic { border: 1px solid #a855f7 !important; box-shadow: 0 0 35px rgba(168, 85, 247, 0.4) !important; }
.win-display-card.rarity-legendary { border: 1px solid #ef4444 !important; box-shadow: 0 0 45px rgba(239, 68, 68, 0.5) !important; }
.win-display-card.rarity-mythic {
  border: 1px solid #facc15 !important;
  box-shadow: 0 0 60px rgba(250, 204, 21, 0.65) !important;
  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); }
}

.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;
}

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

.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;
  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;
}

/* Ежедневная награда */
.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);
}

/* Подарки разработчика в чате */
.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) .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;
}

.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;
}

.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-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;
}

.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); }
}

/* Админка и Редактор лута */
.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);
}

.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-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;
}

.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;
}

/* Тосты, Сессия и Прелоадер */
.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;
}

.session-kick-backdrop {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, 0.85) !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;
}

.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,
.app-preloader.banned .preloader-desc-wrap {
  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-subtext {
  display: block !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
  color: #a1a1aa !important;
  margin-top: 4px;
}

/* Иконка кассеты */
:root {
  --cassette-png: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAAqCAYAAAADBl3iAAAQAElEQVR4AdSZeZBV1Z3Hv+e91/3e672b3uhuoA2CUXEbQSNqDcSESqwxzpJEa+KaDE4QTDQVdcohGU2MkWhVIopjzGIqMZGoxBhjBFzAHRRBICooSNP0vq9vf+/O53d7EQj4TyaTzK3zu2f/nd9+zrk3oP9Hj+d5QaAEqASqDHY1N9e9u3fvlzs7Olr7e3tzff39Xm9fnzfa1+t5g4M3Myb/w1j8mxQARDugGpgPLDBIp9MLXn799c+uXbv2sW2vvNL2xratXZu3bOl68/XXW6+86qr/PnnWrLoFc+e6eZ84T/PmztX1Z52lju9//xt6+eXz9CHPX10AMFcIfAJYAiw12Ldv39JbV6y4/ScrVz619pFHNjyxdu2Gx558csP6detW/+dNN338kiuvyLvkiit00aWX6tqvfU1Nu95RqKREPamUmts7FO9o15reXj1z//0BLVniPoR/BT6s83+zD8ZMqyeTrwDumYAnN2xYteTaa+/5wQ033vPjVavu+cF9993zk1/84u6n16278q6VK0vuuOMO3XGnwZ166ve/12BenjpDIQ319SozPKRgJqO0C2gom5EbGVWBcxrNjygaiykTjUjh4Iey8RcRAMwVAzcAGyags7PzuauvueaXn1u48LpvfvGLS2/8xvKlS6//+tKf/ehHl7/2ysvHPbJubeDnDz2kX//yQa1/6g+Kj44qUlGhYciPD/FOJDSUy6l1eFjDbe3q6e7RcE+P8gcHFYXp4khU/cVFCqP5wqJCZUtKFUtl1FNQUv7www8fVQp/lgBgzrS6kPxtoGsCVj/++PuNJ510y6ePPXbBlZ/7/IILL7t0wRcW/9uC7Vu3ztk/PJz37Ntv6/lnn9MbL72k5r17FZRTOj9fiWRK6WRSLpMVLOsttLht507t2LZNHTt2SE37VJtMqK68XFNrp6oCCFRWKohVRAMBVYFD1dUK9PYol5+nh3JZvZnL3XT+gw9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4fEnJwi/X1CzkG/7CRCq1aI3nXVd02WUr3ebNq9zWravyR0buvbSvb82uXbvsngO2v146qgB8ks4+ezdXyrUmgBem1ujAicfrhxyQGuPx7ucDwZv2htX4sXS6+sySkuqCVGpqSza76K558x50f/zjRrdp00bX0rIRbb/8nb6+A7r5Zj+O+nj/hl7/AwAA///cfyd2AAAABklEQVQDAHmAaEZz+5ryAAAAAElFTkSuQmCC");
}

.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;
}

.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;
}

.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;
  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;
  animation: cassetteShine 8s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes cassetteShine {
  0% { background-position: 250% 0; }
  90%, 100% { background-position: -150% 0; }
}

.win-item-preview .cassette-badge-wrap {
  width: 58px !important;
  height: calc(58px * (15 / 19)) !important;
}

.case-inspect-item .cassette-badge-wrap {
  transform: scale(2) rotate(-12deg);
  margin: 10px 0;
}

@media (max-width: 520px) {
  .brand-tag span {
    display: none;
  }

  .brand-tag {
    padding: 5px 7px;
  }

  .live-counter {
    padding: 3px 8px;
    font-size: 10px;
  }

  .coins-badge {
    padding: 0 6px;
    font-size: 11px;
  }

  .cr-vip-perks-grid {
    grid-template-columns: 1fr;
  }

  .cr-vip-footer {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .cases-store-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
}

/* Внеси в конец public/chat/style.css */
.floating-bottom-island {
  max-width: 440px !important;
  grid-template-columns: repeat(5, 1fr) !important;
}

.settings-card-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.setting-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  background: linear-gradient(145deg, rgba(18, 19, 26, 0.9) 0%, rgba(11, 12, 16, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.setting-info-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.setting-info-col strong {
  font-size: 14px;
  color: #ffffff;
}

.setting-info-col span {
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.35;
}

.setting-lang-switch {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.setting-toggle-btn {
  min-width: 76px;
  height: 36px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 12px;
  transition: all 0.18s ease;
}