@import url('https://fonts.googleapis.com/css2?family=Exo+2:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,700&family=Tektur:wght@700&display=swap');

:root {
  /* ЧИСТЫЙ ТЕМНЫЙ УГОЛЬНЫЙ СТИЛЬ БЕЗ СИНЕВЫ */
  --bg-dark: #08080a;
  --bg-header: #0e0e11;
  --bg-card: #111114;
  --panel-bg: #111114;
  --control-bg: #18181d;
  --control-hover: #222226;
  --border: transparent; /* УБРАНЫ ЛИШНИЕ ОБВОДКИ */
  --yellow-accent: #facc15;
  --yellow-hover: #fde047;
  --text: #ffffff;
  --text-muted: #7c7f8a;
  --text-bright: #ffffff;
  --danger-color: #ef4444;
  --success: #22c55e;
  --font-main: 'Exo 2', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; user-select: none; }
body, button, input, select { font-family: var(--font-main); font-weight: 400; }

body { 
  background-color: var(--bg-dark); 
  color: var(--text); 
  min-height: 100vh; 
  display: flex; 
  flex-direction: column; 
  overflow-x: hidden; 
  overflow-y: auto; 
}

.logo-text { 
  font-family: "Tektur", sans-serif; 
  font-weight: 700; 
  color: #ffffff; 
  letter-spacing: 1px;
}

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #222228; border-radius: 4px; }

/* ЗАГРУЗКА */
.loading-overlay {
  position: fixed; inset: 0; background: var(--bg-dark); z-index: 20000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.loading-overlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-spinner {
  width: 48px; height: 48px; border-radius: 50%;
  border: 3px solid #1c1c22; border-top-color: var(--yellow-accent);
  animation: spin 0.8s linear infinite;
}
.loading-text { color: var(--text-muted); font-size: 14px; font-weight: 500; }
@keyframes spin { to { transform: rotate(360deg); } }

/* TOS */
.tos-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(8px); z-index: 10000; display: flex; justify-content: center; align-items: center; }
html.tos-agreed .tos-overlay { display: none !important; }
.tos-modal { background: #111114; padding: 35px; border-radius: 16px; width: 560px; max-width: 90vw; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,0.9); }
.tos-modal h2 { color: var(--yellow-accent); margin-bottom: 16px; font-weight: 700; font-size: 22px; }
.tos-content { color: #ccc; font-size: 13.5px; line-height: 1.6; margin-bottom: 24px; text-align: left; }
.tos-content p { margin-bottom: 10px; }
.tos-link { color: var(--yellow-accent); font-weight: 600; text-decoration: none; }
.btn-agree { background: #22c55e; color: #000; font-size: 16px; font-weight: 700; border: none; border-radius: 8px; padding: 14px; width: 100%; cursor: pointer; transition: 0.2s; }
.btn-agree:hover { background: #16a34a; }

/* HEADER */
.header { background: var(--bg-header); height: 70px; padding: 0 30px; display: flex; justify-content: space-between; align-items: center; z-index: 100; box-shadow: 0 4px 20px rgba(0,0,0,0.5); }
.header-left, .header-right { display: flex; align-items: center; gap: 20px; }
.logo { font-size: 24px; display: flex; align-items: center; gap: 10px; }
.logo-img { width: 24px; height: 24px; }
.icon-flipped { transform: rotate(180deg); }

.stat-badge { font-size: 13px; font-weight: 500; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.stat-badge span { color: #fff; font-weight: 600; }
.dot-online { width: 8px; height: 8px; background: #22c55e; border-radius: 50%; box-shadow: 0 0 10px #22c55e; }

/* ПОЛУПРОЗРАЧНЫЙ ЖЕЛТЫЙ БАЛАНС С ЖЕЛТОЙ ОБВОДКОЙ */
.balance-box {
  background: rgba(250, 204, 21, 0.08);
  border: 1px solid rgba(250, 204, 21, 0.4);
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 16.5px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 0 15px rgba(250, 204, 21, 0.1);
}
.balance-box.flash-up { animation: flashGreen 0.5s ease; }
.balance-box.flash-down { animation: flashRed 0.5s ease; }
@keyframes flashGreen { 30% { box-shadow: 0 0 16px rgba(34, 197, 94, 0.6); } }
@keyframes flashRed { 30% { box-shadow: 0 0 16px rgba(239, 68, 68, 0.6); } }

.btn-deposit { background: var(--yellow-accent); color: #000; font-size: 13.5px; font-weight: 700; border: none; padding: 10px 20px; border-radius: 8px; cursor: pointer; transition: 0.15s; display: flex; align-items: center; gap: 6px; }
.btn-deposit:hover { background: var(--yellow-hover); transform: translateY(-1px); }

/* КНОПКА СТИМ И ПРОФИЛЬ В ШАПКЕ */
.btn-steam-login {
  background: var(--yellow-accent);
  color: #000;
  font-size: 13.5px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: 0.15s;
}
.btn-steam-login:hover { background: var(--yellow-hover); transform: translateY(-1px); }

.header-user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #141418;
  padding: 5px 12px 5px 6px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid #22222a;
  transition: 0.15s;
}
.header-user-badge:hover { background: #1c1c24; }
.header-user-avatar { width: 28px; height: 28px; border-radius: 6px; }
.header-user-name { font-size: 13px; font-weight: 600; color: #fff; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* САЙДБАР ДРОПОВ */
.app-layout { display: flex; flex: 1; flex-direction: row; }
.live-drops-sidebar { width: 220px; background: var(--bg-header); overflow-y: auto; padding: 12px; position: sticky; top: 0; max-height: calc(100vh - 70px); }
.drops-container { display: flex; flex-direction: column; gap: 8px; }
.live-drop-card { background: #131317; border-radius: 10px; padding: 10px; display: flex; flex-direction: column; position: relative; }
.live-drop-card.win { border: 1px solid rgba(34, 197, 94, 0.35); }
.live-drop-card.lose { opacity: 0.55; }
.drop-chance-badge { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,0.85); padding: 3px 6px; border-radius: 4px; font-size: 10px; font-weight: 600; color: var(--yellow-accent); }
.drop-img { width: 95px; height: 68px; object-fit: contain; margin: 6px auto; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.6)); }
.drop-name { font-size: 11.5px; font-weight: 400; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }

/* ГЛАВНАЯ ОБЛАСТЬ */
.upgrader-main { flex: 1; display: flex; flex-direction: column; padding: 24px 32px 36px; gap: 24px; }

/* ВЕРХНЯЯ СЕКЦИЯ СО СЛОТАМИ И БАРАБАНОМ */
.stage-top { display: flex; justify-content: center; align-items: flex-start; gap: 36px; }

/* ОБЕРТКИ КВАДРАТНЫХ СЛОТОВ */
.stage-card-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 360px;
}

/* Иконки звука и быстрого режима над левым слотом (прозрачные, без фона) */
.top-slot-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  align-self: flex-start;
  height: 24px;
}
.tool-btn-ghost {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.15s ease, transform 0.1s ease;
}
.tool-btn-ghost:hover { opacity: 1; transform: scale(1.1); }
.tool-btn-ghost.active img { filter: drop-shadow(0 0 6px var(--yellow-accent)); }

/* КВАДРАТНЫЕ СЛОТЫ ВЫБОРА СКИНОВ (360x360) */
.stage-card {
  width: 360px;
  height: 360px;
  background: var(--bg-card);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  padding: 22px;
  position: relative;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.65);
}
.card-header-label { font-size: 14px; font-weight: 700; color: #fff; text-align: center; line-height: 1.3; }
.sub-label { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; text-align: center; min-height: 16px; }

.stage-slot { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; overflow-y: auto; }

/* БОЛЬШИЕ ШЕВРОНЫ DOWN.SVG / UP.SVG С ГЛОУ */
.placeholder-large-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}
.placeholder-svg-large {
  width: 130px;
  height: 130px;
  filter: drop-shadow(0 0 32px rgba(250, 204, 21, 0.45));
}

.slot-item-single { display: flex; flex-direction: column; align-items: center; width: 100%; }
.slot-item-single img { width: 160px; height: 115px; object-fit: contain; filter: drop-shadow(0 12px 18px rgba(0,0,0,0.85)); }
.slot-item-price { font-size: 20px; font-weight: 700; color: #fff; margin-top: 10px; }
.slot-item-name { font-size: 13px; font-weight: 400; color: var(--text-muted); margin-top: 3px; text-align: center; }

.slot-multi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; max-height: 150px; overflow-y: auto; padding: 2px; }
.multi-mini-card { background: #18181d; border-radius: 8px; padding: 6px; display: flex; flex-direction: column; align-items: center; }
.multi-mini-card img { width: 52px; height: 40px; object-fit: contain; }
.multi-mini-price { font-size: 11px; font-weight: 600; color: var(--yellow-accent); margin-top: 4px; }

.slider-balance-container { padding-top: 12px; }
.slider-info { display: flex; justify-content: space-between; font-size: 12px; font-weight: 500; color: var(--text-muted); margin-bottom: 6px; }
.custom-slider { -webkit-appearance: none; width: 100%; height: 5px; background: #1c1c22; border-radius: 3px; outline: none; }
.custom-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--yellow-accent); cursor: pointer; transition: 0.15s; }
.custom-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }

/* БАРАБАН БЕЗ ЛИШНЕГО ВНЕШНЕГО ФРЕЙМА */
.stage-center { display: flex; flex-direction: column; align-items: center; gap: 18px; }

.wheel-container {
  position: relative;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle at 50% 50%, #141416 0%, #0d0d0f 70%, #08080a 100%);
  border-radius: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.wheel-svg { width: 100%; height: 100%; display: block; z-index: 1; }

.bg-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 135px;
  height: auto;
  transform: translate(-50%, -50%) rotate(180deg);
  opacity: 0.12;
  filter: grayscale(100%) brightness(0.7);
  pointer-events: none;
  z-index: 2;
}

.center-info {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  z-index: 10;
}

.chance-val {
  font-family: var(--font-main);
  font-size: 41px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1;
  background: linear-gradient(180deg, #d8f73b 0%, #a2ee2e 45%, #5ce425 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 14px rgba(120, 235, 45, 0.4));
}

.chance-label {
  font-family: var(--font-main);
  margin-top: 2px;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.3px;
  background: linear-gradient(180deg, #b7e858 0%, #68b832 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tick-label {
  font-family: var(--font-main);
  fill: #5a5d66;
  font-size: 11px;
  font-weight: 600;
  text-anchor: middle;
  dominant-baseline: central;
}

.pointer-rotation-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
  transform-origin: 50% 50%;
  will-change: transform;
}

.wheel-pointer {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) rotate(180deg);
  width: 55px;
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 0 10px rgba(255, 170, 0, 0.75));
}

.action-bar { display: flex; flex-direction: column; align-items: center; width: 100%; }

.btn-upgrade-main {
  background: var(--yellow-accent);
  color: #000;
  font-size: 18px;
  font-weight: 800;
  border: none;
  border-radius: 10px;
  padding: 14px 0;
  width: 320px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(250, 204, 21, 0.25);
  transition: opacity 0.2s ease, transform 0.1s ease;
}
.btn-upgrade-main:hover:not(:disabled) { background: var(--yellow-hover); transform: scale(1.02); }
.btn-upgrade-main:active:not(:disabled) { transform: scale(0.98); }
.btn-upgrade-main:disabled {
  background: var(--yellow-accent);
  color: rgba(0, 0, 0, 0.55);
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}
.btn-icon-black { width: 20px; height: 20px; filter: brightness(0); }

/* ИКСЫ И ПРОЦЕНТЫ: СТРОГО ПОД ПРАВЫМ ФРЕЙМОМ */
.under-target-controls {
  display: flex;
  gap: 4px;
  justify-content: center;
  width: 100%;
}

.button-group { display: flex; gap: 4px; }
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 40px;
  cursor: pointer;
  user-select: none;
  border: none;
  outline: none;
  overflow: hidden;
  transform: skewX(-8deg);
  transform-origin: center center;
  border-radius: 8px;
  background: transparent;
  --border-color: rgba(255, 255, 255, 0.2);
  transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn:active { transform: skewX(-8deg) scale(0.93); }
.btn::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%; width: 200%; height: 200%;
  background: conic-gradient(from 250deg, transparent 0deg, var(--border-color) 65deg, transparent 145deg);
  transform: rotate(0deg);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.btn:hover::before { transform: rotate(360deg); transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
.btn::after {
  content: '';
  position: absolute;
  inset: 1.2px;
  background: #141518;
  border-radius: 7px;
  transition: background-color 0.2s ease;
}
.btn:hover::after { background: #1a1b20; }
.btn span {
  position: relative;
  z-index: 2;
  transform: skewX(8deg);
  font-family: var(--font-main);
  font-weight: 400;
  font-size: 15px;
  color: #9da3af;
  letter-spacing: -0.3px;
  transition: color 0.2s ease;
}
.btn-percent span { color: #d1d5db; font-weight: 400; }
.btn-red { --border-color: #f87171; }
.btn-yellow { --border-color: #facc15; }
.btn-green { --border-color: #4ade80; }

/* ПАНЕЛИ ИНВЕНТАРЯ (УМЕНЬШЕНА ШИРИНА) */
.stage-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 1140px;
  margin: 0 auto;
  width: 100%;
  min-height: 460px;
}
.inventory-panel {
  background: var(--panel-bg);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.65);
}

/* ==========================================
   CS2 MARKET BARS
   ========================================== */
.filter-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--panel-bg);
  padding: 5px 7px;
  border-radius: 10px;
  user-select: none;
  min-height: 48px;
}

.tabs-pill-wrapper {
  position: relative;
  display: inline-flex;
  background: var(--control-bg);
  border-radius: 7px;
  padding: 3px;
  transform: skewX(-7deg);
  gap: 2px;
}
.tabs-glider {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 32px;
  height: 28px;
  background: var(--yellow-accent);
  border-radius: 5px;
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.35);
  pointer-events: none;
  transition: left 0.15s cubic-bezier(0.4, 0, 0.2, 1), width 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: left, width;
}
.tab-btn {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 28px;
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  border-radius: 5px;
}
.tab-btn img {
  width: 17px;
  height: 17px;
  transform: skewX(7deg);
  opacity: 0.5;
  transition: opacity 0.15s ease, filter 0.15s ease;
}
.tab-btn:hover:not(.active) img { opacity: 0.85; }
.tab-btn.active img { opacity: 1; filter: brightness(0.08); }

.panel-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #f3f4f6;
  padding: 0 6px 0 2px;
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.logo-inverted { width: 16px; height: 16px; transform: rotate(180deg); display: inline-block; }

/* КНОПКА «ПРОДАТЬ ВСЁ» НА НОРМАЛЬНОЙ ПОЗИЦИИ */
.inv-actions-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.btn-sell-selected {
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid var(--yellow-accent);
  color: var(--yellow-accent);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.15s;
}
.btn-sell-selected:hover { background: var(--yellow-accent); color: #000; }
.btn-sell-all {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.15s;
}
.btn-sell-all:hover { background: #ef4444; color: #000; }

.shop-only-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateX(-4px);
  transition: max-width 0.24s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s ease, transform 0.22s ease;
  margin-left: auto;
}
.shop-only-controls.active {
  max-width: 260px;
  opacity: 1;
  transform: translateX(0);
  pointer-events: all;
  overflow: visible;
}

.sort-wrapper { position: relative; }
.sort-toggle-btn {
  width: 30px;
  height: 34px;
  background: var(--control-bg);
  border: none;
  border-radius: 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  gap: 1px;
  transform: skewX(-7deg);
  transition: background-color 0.15s, transform 0.08s;
}
.sort-toggle-btn:hover { background: var(--control-hover); }
.sort-toggle-btn:active { transform: skewX(-7deg) scale(0.93); }
.sort-arrow { width: 12px; height: 12px; transform: skewX(7deg); opacity: 0.35; transition: opacity 0.15s; }
.sort-arrow.active { opacity: 1; }

.sort-tooltip {
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #151518;
  color: #d1d5db;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 100;
}
.sort-wrapper:hover .sort-tooltip { opacity: 1; transform: translateX(-50%) translateY(0); }

.inputs-wrapper { position: relative; width: 121px; height: 34px; }
.price-range-group { display: flex; align-items: center; gap: 5px; width: 100%; height: 100%; transition: opacity 0.16s ease, transform 0.16s ease; }
.search-input-group {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transform: scaleX(0.94);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.inputs-wrapper.search-mode .price-range-group { opacity: 0; pointer-events: none; transform: scaleX(0.94); }
.inputs-wrapper.search-mode .search-input-group { opacity: 1; pointer-events: all; transform: scaleX(1); }

.input-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--control-bg);
  border-radius: 7px;
  height: 34px;
  padding: 0 7px;
  transform: skewX(-7deg);
  transition: background-color 0.15s, box-shadow 0.2s;
}
.input-box.price-box { width: 58px; }
.input-box.search-box { width: 100%; }
.input-box.error { box-shadow: inset 0 0 0 1px var(--danger-color); }
.input-box:focus-within { background: #202026; }
.input-box input {
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-main);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-bright);
  width: 100%;
  transform: skewX(7deg);
}
.input-box input::placeholder { color: var(--text-muted); }

.price-tooltip {
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #181214;
  color: #fca5a5;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 100;
}
.price-tooltip.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.search-action-btn {
  width: 34px;
  height: 34px;
  background: var(--control-bg);
  border: none;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transform: skewX(-7deg);
  transition: background-color 0.15s, transform 0.08s;
}
.search-action-btn:hover { background: var(--control-hover); }
.search-action-btn.active { background: #25252b; }
.search-action-btn:active { transform: skewX(-7deg) scale(0.93); }
.search-action-btn img { width: 16px; height: 16px; transform: skewX(7deg); opacity: 0.65; transition: opacity 0.15s; }
.search-action-btn:hover img, .search-action-btn.active img { opacity: 1; }

/* КОРЗИНА И ВЫПАДАЮЩИЙ ФРЕЙМ */
.cart-container { position: relative; }
.cart-btn {
  position: relative;
  width: 36px;
  height: 34px;
  background: var(--yellow-accent);
  border: none;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transform: skewX(-7deg);
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.25);
  transition: background-color 0.15s, transform 0.08s;
}
.cart-btn:hover { background: #fde047; }
.cart-btn:active { transform: skewX(-7deg) scale(0.93); }
.cart-btn img { width: 17px; height: 17px; transform: skewX(7deg); filter: brightness(0.08); }
.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #0f1013;
  color: #facc15;
  font-family: var(--font-main);
  font-size: 10px;
  font-weight: 800;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--yellow-accent);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
  transform: skewX(7deg);
}

.cart-flyout {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 280px;
  background: #151518;
  border-radius: 10px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.85);
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px) scale(0.96);
  transform-origin: top right;
  transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.2, 0.9, 0.3, 1), visibility 0.18s;
  z-index: 500;
}
.cart-flyout.open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.cart-flyout-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; border-bottom: 1px solid #1e1e23; font-size: 14px; font-weight: 700; color: #fff; }
.cart-flyout-close { background: transparent; border: none; color: var(--text-muted); cursor: pointer; font-size: 18px; line-height: 1; }
.cart-flyout-body { padding: 16px 0; text-align: center; color: var(--text-muted); font-size: 13px; max-height: 180px; overflow-y: auto; }
.cart-item-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: 12px; color: #fff; }
.cart-item-row span { max-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-del { background: none; border: none; color: #ef4444; cursor: pointer; font-weight: 700; }
.cart-flyout-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px solid #1e1e23; }
.cart-total-price { font-weight: 700; font-size: 13px; color: var(--yellow-accent); }
.cart-checkout-btn { background: var(--yellow-accent); color: #0c0c0e; font-family: var(--font-main); font-weight: 700; font-size: 12px; border: none; padding: 7px 14px; border-radius: 6px; cursor: pointer; }

/* КАРТОЧКИ СКИНОВ */
.skins-grid { padding: 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; overflow-y: auto; flex: 1; align-content: start; }
.skin-card {
  background: #141417; border-radius: 10px; padding: 10px; display: flex; flex-direction: column; align-items: center; cursor: pointer; position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease; overflow: hidden;
}
.skin-card:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(0,0,0,0.5); }
.skin-card:active { transform: translateY(-1px) scale(0.98); }
.skin-card.selected { box-shadow: inset 0 0 0 2px var(--yellow-accent), 0 0 16px rgba(250, 204, 21, 0.2); }
.skin-card.disabled-card { opacity: 0.25; cursor: not-allowed; filter: grayscale(1); pointer-events: none; }

.card-rarity-bg { position: absolute; inset: 0; opacity: 0.12; pointer-events: none; }
.card-price-tag { width: 100%; display: flex; justify-content: space-between; font-size: 12px; font-weight: 400; z-index: 2; }
.tag-wear { color: var(--text-muted); font-size: 11px; }
.tag-price { color: var(--yellow-accent); font-weight: 600; }
.card-img { width: 90px; height: 64px; object-fit: contain; margin: 6px 0; z-index: 2; transition: 0.15s; filter: drop-shadow(0 6px 10px rgba(0,0,0,0.8)); }
.skin-card:not(.disabled-card):hover .card-img { transform: scale(1.08); }
.card-name { font-size: 11px; font-weight: 400; color: #fff; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; z-index: 2; }

.selected-check {
  position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; background: var(--yellow-accent); border-radius: 5px;
  display: flex; align-items: center; justify-content: center; color: #000; font-weight: 700; z-index: 10; font-size: 13px;
}
.selected-check::after { content: '✓'; }

/* МОДАЛЬНЫЕ ОКНА */
.modal {
  display: flex; position: fixed; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(8px);
  z-index: 1000; justify-content: center; align-items: center;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}
.modal.show { opacity: 1; visibility: visible; pointer-events: all; }

.modal-content {
  background: var(--bg-card); padding: 32px; border-radius: 20px; text-align: center; width: 440px; position: relative;
  transform: scale(0.94); transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.modal.show .modal-content { transform: scale(1); }

.modal-close-icon {
  position: absolute; top: 16px; right: 16px; background: none; border: none; cursor: pointer;
  opacity: 0.65; transition: opacity 0.15s ease, transform 0.15s ease;
}
.modal-close-icon:hover { opacity: 1; transform: scale(1.08); }

.bonus-modal-box { width: 540px; max-width: 95vw; background: radial-gradient(circle at top, #1c1a0c 0%, #121217 70%); }
.bonus-badge { display: inline-block; background: rgba(250, 204, 21, 0.12); border: 1px solid var(--yellow-accent); color: var(--yellow-accent); font-size: 10.5px; font-weight: 700; padding: 3px 10px; border-radius: 20px; letter-spacing: 1px; margin-bottom: 10px; }
.modal-title { color: #fff; font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.modal-sub { color: var(--text-muted); font-size: 13px; margin-bottom: 20px; }

.bonus-roulette-wrapper {
  position: relative; height: 125px; background: #0c0c10; border-radius: 12px; margin-bottom: 20px; overflow: hidden;
  box-shadow: inset 0 0 25px rgba(0,0,0,0.9);
}
.bonus-center-line {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; transform: translateX(-50%);
  background: var(--yellow-accent); box-shadow: 0 0 10px var(--yellow-accent); z-index: 10; pointer-events: none;
}
.bonus-pointer { position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 15; pointer-events: none; }
.bonus-pointer-arrow {
  width: 0; height: 0;
  border-left: 12px solid transparent; border-right: 12px solid transparent; border-top: 15px solid var(--yellow-accent);
}

.bonus-roulette-track { display: flex; height: 100%; position: absolute; left: 0; top: 0; will-change: transform; }
.bonus-card { min-width: 120px; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; border-right: 1px solid #1a1a20; position: relative; background: #111116; }
.bonus-card-val { font-size: 22px; font-weight: 700; z-index: 2; }
.bonus-card-sub { font-size: 10px; font-weight: 600; color: var(--text-muted); margin-top: 3px; z-index: 2; }
.bonus-card-bg { position: absolute; inset: 0; opacity: 0.12; pointer-events: none; }

.btn-bonus-spin {
  background: var(--yellow-accent); font-size: 17px; font-weight: 800; color: #000; border: none; border-radius: 10px; padding: 15px; width: 100%; cursor: pointer; transition: 0.15s;
}
.btn-bonus-spin:hover:not(:disabled) { background: var(--yellow-hover); transform: translateY(-1px); }
.btn-bonus-spin:disabled { opacity: 0.4; cursor: not-allowed; }

/* ПРОФИЛЬ ИЗ МАКЕТА СКРИНШОТА */
.profile-modal-box {
  width: 760px;
  max-width: 95vw;
  background: #111114;
  padding: 28px;
  border-radius: 18px;
}
.profile-dashboard-grid {
  display: grid;
  grid-template-columns: 230px 1fr 180px 120px;
  gap: 14px;
  margin-bottom: 24px;
  text-align: left;
}
.profile-box {
  background: #17171d;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
}
.user-info-box { display: flex; flex-direction: row; gap: 14px; align-items: center; }
.profile-avatar-img { width: 68px; height: 68px; border-radius: 12px; }
.profile-username { font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.profile-id-tag { font-size: 11px; color: #7c7f8a; display: flex; align-items: center; gap: 6px; }

.balance-promo-box { grid-column: span 1; }
.profile-box-title { font-size: 12px; color: #7c7f8a; font-weight: 600; margin-bottom: 6px; }
.profile-balance-num { font-size: 24px; font-weight: 800; color: #fff; margin-bottom: 12px; }
.promo-input-row { display: flex; gap: 6px; margin-bottom: 10px; }
.promo-input-row input { background: #1f1f26; border: none; color: #fff; font-size: 12px; padding: 8px 10px; border-radius: 6px; flex: 1; outline: none; }
.btn-apply-promo { background: #262630; color: #fff; border: none; border-radius: 6px; font-size: 11px; font-weight: 700; padding: 0 12px; cursor: pointer; }
.btn-apply-promo:hover { background: #323240; }
.btn-deposit-profile { background: var(--yellow-accent); color: #000; font-size: 13px; font-weight: 700; border: none; border-radius: 8px; padding: 10px; width: 100%; cursor: pointer; }

.best-drop-box { position: relative; background: linear-gradient(135deg, #25162a 0%, #17171d 100%); }
.best-drop-header { display: flex; justify-content: space-between; font-size: 12px; color: #7c7f8a; font-weight: 600; margin-bottom: 8px; }
.best-drop-badge { background: rgba(250, 204, 21, 0.15); color: var(--yellow-accent); padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: 700; }
.best-drop-img { width: 70px; height: 50px; object-fit: contain; margin: 4px auto; }
.best-drop-name { font-size: 11px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.best-drop-price { font-size: 12px; color: var(--yellow-accent); font-weight: 700; text-align: center; margin-top: 4px; }

.stats-count-box { justify-content: space-between; }
.profile-stat-number { font-size: 28px; font-weight: 800; color: #fff; }
.profile-stat-number span { color: var(--yellow-accent); font-size: 20px; }

.profile-tabs-bar { display: flex; gap: 8px; border-bottom: 1px solid #1c1c24; padding-bottom: 10px; margin-bottom: 14px; }
.p-tab { background: transparent; border: none; color: #7c7f8a; font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 6px; cursor: pointer; }
.p-tab.active { background: var(--yellow-accent); color: #000; font-weight: 700; }

.profile-inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; max-height: 220px; overflow-y: auto; }
.profile-mini-skin { background: #17171d; border-radius: 8px; padding: 8px; text-align: center; font-size: 11px; }
.profile-mini-skin img { width: 60px; height: 45px; object-fit: contain; }

.history-list { display: flex; flex-direction: column; gap: 8px; max-height: 220px; overflow-y: auto; }
.history-row { display: flex; justify-content: space-between; background: #17171d; padding: 10px 14px; border-radius: 8px; font-size: 12px; }

#toasts { position: fixed; bottom: 25px; right: 25px; display: flex; flex-direction: column; gap: 10px; z-index: 9999; }
.toast { background: #1c1c24; border-left: 4px solid var(--yellow-accent); padding: 14px 20px; border-radius: 8px; font-size: 13.5px; font-weight: 500; animation: slideIn 0.25s ease; box-shadow: 0 8px 25px rgba(0,0,0,0.7); }
@keyframes slideIn { from { transform: translateX(50px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }