:root {
  --bg: #09080f;
  --panel: #12101d;
  --card: #171425;
  --line: rgba(255, 255, 255, 0.07);
  --text: #f4f1ff;
  --muted: #9b93b8;
  --green: #3dff8a;
  --violet: #7c5cff;
  --gold: #e4ae39;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t: 0.28s;
  --t-slow: 0.45s;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background:
    radial-gradient(circle at 80% -5%, rgba(124, 92, 255, 0.12), transparent 34%),
    var(--bg);
  color: var(--text);
  font-family: Manrope, system-ui, sans-serif;
}

body {
  display: flex;
  overflow: hidden;
}

button, input { font-family: inherit; }
button { border: 0; cursor: pointer; }
img { max-width: 100%; }

.hidden { display: none !important; }

/* ---------- Ліва live-стрічка ---------- */
.live-rail {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  flex: 0 0 112px;
  width: 112px;
  height: 100vh;
  background: #07060c;
  border-right: 1px solid var(--line);
}

.live-rail-toggle { display: none; }
.live-scrim { display: none; }

.live-rail-online {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 8px 12px;
  border-bottom: 1px solid var(--line);
}
.live-rail-online b {
  font-size: 16px;
  line-height: 1;
}
.live-rail-online span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.live-rail-feed {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 8px 8px 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 92, 255, 0.35) transparent;
}

.live-rail-track {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tick {
  position: relative;
  padding: 8px 6px 7px;
  border-radius: 12px;
  background:
    linear-gradient(to top, color-mix(in srgb, var(--rc, #7c5cff) 28%, transparent), transparent 70%),
    var(--card);
  border: 1px solid color-mix(in srgb, var(--rc, #7c5cff) 35%, transparent);
  border-bottom: 2px solid var(--rc, #7c5cff);
  box-shadow: 0 0 14px color-mix(in srgb, var(--rc, #7c5cff) 28%, transparent);
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.tick.fresh { animation: liveIn 0.38s cubic-bezier(0.16, 1, 0.3, 1); }

.tick img.tick-skin { width: 100%; height: 48px; object-fit: contain; }

.tick-wear {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tick span {
  display: block;
  overflow: hidden;
  color: #d9d3ef;
  font-size: 10px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tick-hover {
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 160px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #120f1c;
  border: 1px solid var(--rc, var(--violet));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 16px color-mix(in srgb, var(--rc, var(--violet)) 40%, transparent);
  transform: translateY(-50%) translateX(-8px);
  text-align: left;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s;
}
.tick-hover img,
.tick-ava-ph {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--rc, var(--violet));
}
.tick-ava-ph {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ffb020, #7a1cff);
  font-size: 11px;
  font-weight: 800;
}
.tick-hover b { display: block; font-size: 11px; }
.tick-hover small { color: var(--muted); font-size: 10px; }

.tick:hover {
  z-index: 7;
  transform: translateY(-2px);
  border-color: var(--rc, var(--violet));
  box-shadow: 0 0 16px var(--rc, var(--violet));
}
.tick:hover .tick-hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%);
}

.tick.empty {
  padding: 14px 8px;
  color: var(--muted);
  font-size: 11px;
  border-bottom: 0;
  box-shadow: none;
}

@keyframes liveIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.92); }
  to { opacity: 1; transform: none; }
}

.app-shell {
  flex: 1;
  min-width: 0;
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
}

/* ---------- Шапка ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 22px;
  background: rgba(9, 8, 15, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: white;
  font-weight: 800;
  font-size: 18px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff7a18, #ff3d81);
  font-size: 12px;
}

.nav-links { display: flex; gap: 6px; flex-wrap: wrap; min-width: 0; }
.nav-btn { font-weight: 800; letter-spacing: 0.04em; white-space: nowrap; }

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(61, 255, 138, 0.7);
  animation: pulse 1.6s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 255, 138, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(61, 255, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 255, 138, 0); }
}

.nav-btn, .chip, .back {
  color: var(--muted);
  background: transparent;
  border-radius: 10px;
  padding: 8px 12px;
}

.nav-btn.active, .chip.active {
  color: white;
  background: rgba(124, 92, 255, 0.25);
}

.nav-side {
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.steam-btn,
.user-box {
  display: inline-flex;
  align-items: center;
  border-radius: 12px;
  background: #171a21;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.steam-btn {
  gap: 8px;
  padding: 9px 14px;
  color: white;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.steam-btn:hover { border-color: #66c0f4; background: #1b2838; }
.steam-btn svg { width: 18px; height: 18px; }

.user-box { padding: 3px; gap: 2px; }

.user-link {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 200px;
  padding: 4px 10px 4px 4px;
  border-radius: 10px;
  background: transparent;
  color: white;
  font-weight: 700;
}

.user-link:hover { background: rgba(255, 255, 255, 0.07); }

.user-link img {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  background: #2a2154;
}

.user-link span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.icon-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
}

.icon-btn:hover { background: rgba(255, 255, 255, 0.08); color: white; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.logout:hover { color: #ff8fa3; }
.sound-btn.is-on { color: var(--green); }
.sound-btn.is-muted { opacity: 0.62; }

.live-marquee { display: none; }

.balance-pill {
  padding: 9px 14px;
  border-radius: 12px;
  background: #1a1730;
  color: var(--green);
}

.topup-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #3dff8a, #b6ff3d);
  color: #06210f;
  font-weight: 800;
  box-shadow: 0 0 0 0 rgba(61, 255, 138, 0.5);
  animation: pulse 2.4s infinite;
}

.topup-btn span { font-size: 18px; line-height: 1; }
.topup-btn:hover { filter: brightness(1.08); }

@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgba(61, 255, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 255, 138, 0); }
}

.toast {
  position: fixed;
  top: 18px;
  left: calc((100vw + 112px) / 2);
  z-index: 60;
  transform: translateX(-50%);
  padding: 10px 16px;
  border-radius: 12px;
  background: #3b1f2b;
  border: 1px solid #ff8fa3;
  color: #ffd5dd;
  font-weight: 700;
}
.toast.is-ok {
  background: #15301f;
  border-color: rgba(61, 255, 138, 0.45);
  color: var(--green);
}
.toast.is-bad {
  background: #3b1f2b;
  border-color: #ff8fa3;
  color: #ffd5dd;
}

main { max-width: 1280px; margin: 0 auto; padding: 22px; }

/* ---------- Каталог ---------- */
.toolbar, .items-head, .open-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.toolbar input, .fair input {
  width: min(280px, 100%);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0d0b17;
  color: white;
}

.chips { display: flex; gap: 8px; flex-wrap: wrap; }

.case-grid, .drop-grid {
  display: grid;
  gap: 14px;
}

.case-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }

img.img-broken {
  opacity: 0.2;
  filter: grayscale(1);
}

/* Світіння категорії. Hue на обкладинках вимкнений: це реальні фото скінів CS2. */
[data-cat] {
  --glow: #7c5cff;
  --hue: 0deg;
}
[data-cat="budget"] { --glow: #2fb4ff; }
[data-cat="popular"] { --glow: #c24dff; }
[data-cat="weapons"] { --glow: #ff5a3d; }
[data-cat="knives"] { --glow: #ffc21a; }
[data-cat="farm"] { --glow: #35d07f; }
[data-cat="bonus"] { --glow: #e4ae39; }

.case-card {
  position: relative;
  padding: 18px 14px 18px;
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--glow) 45%, var(--line));
  background:
    radial-gradient(ellipse 80% 55% at 50% 38%, color-mix(in srgb, var(--glow) 22%, transparent), transparent 72%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 45%),
    var(--card);
  color: white;
  text-align: center;
  overflow: hidden;
  box-shadow: 0 0 15px color-mix(in srgb, var(--glow) 28%, transparent);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.case-card:hover {
  transform: translateY(-4px) scale(1.04);
  border-color: color-mix(in srgb, var(--glow) 80%, transparent);
  box-shadow: 0 0 22px var(--glow), 0 16px 44px color-mix(in srgb, var(--glow) 34%, transparent);
}

.case-art {
  height: 176px;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
}

.case-art img,
.case-hero-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: saturate(1.08) drop-shadow(0 14px 18px rgba(0, 0, 0, 0.55))
    drop-shadow(0 0 22px color-mix(in srgb, var(--glow) 45%, transparent));
  transition: transform 0.25s ease;
}

.case-card:hover .case-art img { transform: scale(1.08) rotate(-2deg); }

.case-card b { display: block; margin-bottom: 6px; font-size: 15px; letter-spacing: 0.01em; }
.case-card small { color: #fff; font-weight: 800; font-size: 15px; opacity: 0.9; }

/* Категорії каталогу */
.case-sections { display: grid; gap: 30px; }

.cat-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.cat-head h2 { margin: 0; font-size: 20px; }
.cat-head span { color: var(--muted); font-size: 13px; }

.case-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: white;
  background: color-mix(in srgb, var(--glow) 30%, #0b0818);
  border: 1px solid color-mix(in srgb, var(--glow) 60%, transparent);
}
.case-sale {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  padding: 4px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff4d6a, #ffb020);
  color: #1b0a00;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 0 16px rgba(255, 77, 106, 0.7), 0 0 4px rgba(255, 176, 32, 0.8);
  animation: salePulse 1.7s ease-in-out infinite;
}
@keyframes salePulse {
  0%, 100% { filter: brightness(1); box-shadow: 0 0 14px rgba(255, 77, 106, 0.55); }
  50% { filter: brightness(1.12); box-shadow: 0 0 22px rgba(255, 176, 32, 0.85); }
}
.case-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
}
.case-price s,
#openPrice s {
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  opacity: 0.75;
}

#viewOpen { min-width: 0; overflow-x: hidden; }

/* Шапка сторінки кейса */
.case-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 18px;
  padding: 14px 22px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse 45% 120% at 8% 50%, color-mix(in srgb, var(--glow) 24%, transparent), transparent 70%),
    var(--panel);
}
.case-hero-art { flex: 0 0 120px; height: 100px; }
.case-hero h1 { margin: 0 0 4px; font-size: 26px; }
.case-hero .case-blurb { margin: 0; }
.case-blurb { margin: -6px 0 16px; color: var(--muted); font-size: 14px; }
.section-title { margin: 26px 0 14px; font-size: 18px; }

.result-card .win { color: var(--green); font-weight: 800; margin-left: 6px; }
.result-card .loss { color: #ff6b81; font-weight: 800; margin-left: 6px; }

h1, h2 { margin: 0 0 14px; }

/* ---------- Рулетка ---------- */
.roulette-board {
  display: grid;
  gap: 10px;
  width: 100%;
  min-width: 0;
  margin: 8px 0 16px;
}
.roulette-board[data-cols="1"] { grid-template-columns: minmax(0, 1fr); }
.roulette-board[data-cols="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.roulette-board[data-cols="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.roulette-board[data-cols="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.roulette-shell {
  position: relative;
  margin: 0;
  min-width: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #0d0b17;
  border: 1px solid var(--line);
  transition: border-color 0.4s ease, box-shadow 0.45s ease;
}
.roulette-shell.landed {
  border-color: color-mix(in srgb, var(--rc, var(--green)) 55%, var(--line));
  box-shadow: 0 0 28px color-mix(in srgb, var(--rc, var(--green)) 28%, transparent);
}

.pointer {
  position: absolute;
  left: 50%;
  top: -2px;
  z-index: 4;
  width: 0;
  height: 0;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-top: 18px solid var(--green);
  transform: translateX(-50%);
  filter:
    drop-shadow(0 0 6px var(--green))
    drop-shadow(0 0 16px var(--green))
    drop-shadow(0 4px 10px rgba(61, 255, 138, 0.55));
}

.pointer-line {
  position: absolute;
  left: 50%;
  top: 16px;
  bottom: 10px;
  z-index: 4;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(var(--green), color-mix(in srgb, var(--green) 20%, transparent));
  box-shadow: 0 0 10px var(--green), 0 0 22px color-mix(in srgb, var(--green) 70%, transparent);
  pointer-events: none;
}

.roulette-shell::before,
.roulette-shell::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 3;
  width: 96px;
  pointer-events: none;
}
.roulette-shell::before {
  left: 0;
  background: linear-gradient(90deg, #0d0b17 8%, transparent);
}
.roulette-shell::after {
  right: 0;
  background: linear-gradient(270deg, #0d0b17 8%, transparent);
}

.roulette-window { overflow: hidden; height: 200px; }
.roulette-track { display: flex; height: 100%; will-change: transform; }

.roulette-board.multi .roulette-window { height: 148px; }
.roulette-board.multi .skin-card {
  flex-basis: 118px;
  width: 118px;
  margin: 8px 4px;
}
.roulette-board.multi .skin-card img { height: 56px; }
.roulette-board.multi .skin-card b { font-size: 11px; }
.roulette-board.multi .pointer {
  border-left-width: 8px;
  border-right-width: 8px;
  border-top-width: 12px;
}
.roulette-board.multi .roulette-shell::before,
.roulette-board.multi .roulette-shell::after { width: 40px; }

/* Картка скіна: фото, назва, стан; знизу кольорова рамка і підкладка за рідкісністю.
   Ціна на стрічці рулетки прихована — вона з’являється лише в результаті дропу. */
.skin-card,
.drop-item,
.inv-card,
.result-card,
.tick {
  --rc: #7c5cff;
}

.skin-card,
.drop-item {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10px 10px 9px;
  border-radius: 14px;
  border-bottom: 4px solid var(--rc);
  background:
    linear-gradient(to top, color-mix(in srgb, var(--rc) 30%, transparent), transparent 70%),
    var(--card);
}

.skin-card { flex: 0 0 150px; width: 150px; min-width: 0; overflow: hidden; margin: 14px 6px; transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease, box-shadow 0.45s ease; }
.skin-card.is-dim { opacity: 0.38; transform: scale(0.96); }
.skin-card.is-win {
  z-index: 2;
  transform: scale(1.05);
  box-shadow: 0 0 0 2px var(--rc), 0 0 22px color-mix(in srgb, var(--rc) 55%, transparent);
  animation: winPop 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.skin-card img,
.drop-item img {
  width: 100%;
  height: 84px;
  object-fit: contain;
  margin-bottom: 6px;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.5));
}

.skin-card b,
.drop-item b {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
  font-weight: 700;
}

.skin-wear {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.skin-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  margin-top: 3px;
  font-size: 11px;
}
.skin-meta span { color: var(--muted); font-weight: 700; text-transform: uppercase; }
.skin-meta em { font-style: normal; color: #fff; font-weight: 800; }

.open-btn {
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--green);
  color: #06210f;
  font-weight: 800;
}

.open-btn small { display: block; font-weight: 700; }
.open-btn small:empty { display: none; }
.open-btn:disabled { opacity: 0.55; cursor: wait; }

.open-controls {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.open-controls .open-row {
  margin-bottom: 0;
  flex-wrap: wrap;
  justify-content: center;
  width: min(560px, 100%);
}
.open-btn { flex: 1 1 180px; min-width: 0; }
.fast-toggle {
  width: auto;
  height: 44px;
  padding: 0 14px 0 10px;
  gap: 8px;
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.fast-toggle span { line-height: 1; }
.fast-toggle[aria-pressed="true"] { color: #ffd24d; }
.open-qty {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.open-qty button {
  min-width: 44px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--panel);
  color: var(--muted);
  font-weight: 800;
  border: 1px solid var(--line);
}
.open-qty button:hover { color: #fff; border-color: var(--violet); }
.open-qty button.active {
  color: #fff;
  border-color: var(--violet);
  background: rgba(124, 92, 255, 0.22);
}
.open-qty button:disabled { opacity: 0.35; cursor: not-allowed; }

.drop-results {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px 16px;
  background: rgba(5, 4, 12, 0.78);
  backdrop-filter: blur(14px);
  overflow: auto;
}
.drop-results-card {
  display: grid;
  justify-items: stretch;
  gap: 16px;
  width: min(920px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  padding: 24px 20px 20px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 0%, rgba(124, 92, 255, 0.16), transparent 42%),
    #110e1c;
}
.drop-multi-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  font-size: 18px;
}
.drop-multi-head em {
  font-style: normal;
  font-size: 20px;
  font-weight: 800;
  color: var(--green);
}
.drop-multi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 10px;
  width: 100%;
  min-width: 0;
}
.drop-results-ctas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.drop-results-ctas button,
.drop-results-card > .drop-again {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 800;
}
.drop-multi-card {
  padding: 10px 8px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--rc) 55%, var(--line));
  border-bottom: 3px solid var(--rc);
  background: linear-gradient(to top, color-mix(in srgb, var(--rc) 22%, transparent), transparent 70%), var(--card);
  text-align: center;
}
.drop-multi-card img { width: 100%; height: 56px; object-fit: contain; }
.drop-multi-card b { display: block; font-size: 11px; line-height: 1.3; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.drop-multi-card small { display: block; font-size: 10px; color: var(--muted); }
.drop-multi-card em { display: block; margin-top: 4px; font-style: normal; font-size: 13px; font-weight: 800; }
.drop-multi-card {
  animation: winPop 0.48s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}

.drop-inline {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin: -2px 0 18px;
  padding: 18px 16px 14px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--rc, var(--violet)) 42%, var(--line));
  background:
    linear-gradient(to top, color-mix(in srgb, var(--rc, var(--violet)) 22%, transparent), transparent 72%),
    var(--panel);
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  pointer-events: none;
}
.drop-inline.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition: opacity 0.38s ease, transform 0.48s cubic-bezier(0.16, 1, 0.3, 1);
}
.drop-inline-skin {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 4px;
}
.drop-inline-skin img {
  width: min(220px, 70vw);
  height: 96px;
  object-fit: contain;
  filter: drop-shadow(0 0 16px color-mix(in srgb, var(--rc, var(--violet)) 55%, transparent));
}
.drop-inline-skin b { font-size: 18px; line-height: 1.25; }
.drop-inline-skin .drop-wear { margin-top: 2px; }
.drop-inline-skin em {
  font-style: normal;
  font-size: 20px;
  font-weight: 800;
}
.drop-inline-ctas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: min(520px, 100%);
}
.drop-inline-ctas button {
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 800;
}
.drop-keep-link {
  background: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 2px 8px;
}
.drop-keep-link:hover { color: var(--text); }

.result-card, .fair, .fair-toggle {
  padding: 14px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.result-card {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  border-bottom: 4px solid var(--rc);
  background:
    linear-gradient(to top, color-mix(in srgb, var(--rc) 26%, transparent), transparent 80%),
    var(--panel);
}
.result-card img { width: 120px; height: 72px; object-fit: contain; }
.result-card b { font-size: 16px; }
.fair { margin: 14px 0 22px; }
.fair p, .hint { color: var(--muted); font-size: 13px; }
.fair pre { white-space: pre-wrap; color: var(--muted); font-size: 12px; }

.fair-toggle {
  display: grid;
  gap: 4px;
  width: 100%;
  margin: 14px 0 22px;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}
.fair-toggle span { font-weight: 800; letter-spacing: 0.04em; }
.fair-toggle small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fair-toggle:hover { border-color: var(--violet); }

.fair-card { width: min(640px, 100%); max-height: min(88vh, 860px); overflow: auto; }
.fair-card h2 { margin-bottom: 8px; }
.fair-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 12px;
}
.fair-tabs button {
  flex: 1;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #120f22;
  color: var(--muted);
  font-weight: 800;
}
.fair-tabs button.active {
  color: #fff;
  border-color: var(--violet);
  background: rgba(124, 92, 255, 0.18);
}
.fair-sub { margin: 16px 0 10px; font-size: 15px; }
.fair-field, .fair-verify label {
  display: grid;
  gap: 6px;
  margin: 10px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.fair-field input, .fair-verify input, .fair-verify select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0d0b17;
  color: white;
  font-weight: 700;
}
.fair-meta { margin: 6px 0; font-size: 13px; color: var(--muted); }
.fair-meta code, .fair-meta b { color: var(--text); word-break: break-all; }
.fair-card pre {
  margin: 10px 0 0;
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  white-space: pre-wrap;
  color: var(--muted);
  font-size: 12px;
}
.fair-verify {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}
.fair-verify-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 6px;
}
.fair-fill {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #120f22;
  color: var(--text);
  font-weight: 800;
}
.fair-run { width: auto; flex: 1; min-width: 160px; padding: 12px 16px; }
.fair-result {
  margin-top: 8px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(61, 255, 138, 0.08);
  font-weight: 700;
}
.fair-result.is-bad {
  background: rgba(255, 77, 109, 0.08);
  border-color: rgba(255, 77, 109, 0.28);
  color: #ff8aa8;
}

.help-fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 22;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, #7c5cff, #3dff8a);
  color: #07120c;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 10px 28px rgba(124, 92, 255, 0.35);
}
.help-fab:hover { filter: brightness(1.06); }
.help-fab { position: fixed; }
body:has(.modal:not(.hidden), .drop-modal:not(.hidden), .drop-results:not(.hidden)) .help-fab,
body:has(.modal:not(.hidden), .drop-modal:not(.hidden), .drop-results:not(.hidden)) .support-widget {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.support-widget {
  position: fixed;
  right: 16px;
  bottom: 84px;
  z-index: 23;
  display: grid;
  justify-items: end;
  gap: 10px;
}
.support-fab {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #171425;
  border: 1px solid rgba(228, 174, 57, 0.45);
  color: #ffd56a;
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}
.support-panel {
  width: min(260px, calc(100vw - 40px));
  padding: 14px;
  border-radius: 16px;
  background: #120f1c;
  border: 1px solid var(--line);
  display: grid;
  gap: 8px;
}
.support-panel.hidden { display: none; }
.support-panel b { font-size: 14px; }
.support-panel button,
.support-tg {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  background: #171425;
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 800;
  font-size: 13px;
  text-align: left;
  text-decoration: none;
}
.support-tg {
  background: linear-gradient(135deg, #2aabee, #229ed9);
  color: #fff;
  border: 0;
  text-align: center;
}
.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.faq-card {
  padding: 18px;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.faq-card h2 { margin: 0 0 10px; font-size: 18px; }
.faq-card details { margin: 0 0 8px; }
.faq-card summary {
  cursor: pointer;
  font-weight: 800;
  color: #c9b8ff;
}
.faq-card p { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.wd-PENDING_ADMIN { color: var(--gold); }
.chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ff4d6a;
  color: white;
  font-size: 10px;
  line-height: 18px;
  font-weight: 800;
}
.help-scrim {
  position: fixed;
  inset: 0;
  z-index: 21;
  background: rgba(5, 4, 14, 0.45);
}
.help-drawer {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 23;
  width: min(360px, 92vw);
  padding: 22px;
  background: #151225;
  border-left: 1px solid var(--line);
  transform: translateX(100%);
  transition: transform 0.32s var(--ease);
}
body.help-open .help-drawer { transform: none; }
.help-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.help-head h2 { font-size: 20px; }
.help-drawer p { color: var(--muted); font-size: 14px; line-height: 1.5; }
.help-telegram {
  display: block;
  margin: 16px 0;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2aabee, #229ed9);
  color: white;
  text-align: center;
  font-weight: 800;
  text-decoration: none;
}
.help-faq {
  display: grid;
  gap: 8px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .fair-verify { grid-template-columns: 1fr; }
}

.drop-grid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 12px; }

.drop-item { transition: transform 0.18s ease; }
.drop-item:hover { transform: translateY(-3px); }

/* ---------- Профіль ---------- */
.profile {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(0, 2fr);
  gap: 14px 22px;
  align-items: center;
  min-width: 0;
  overflow-x: hidden;
  margin-bottom: 22px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.14), transparent 60%), var(--panel);
  border: 1px solid var(--line);
}

.profile-who { display: flex; gap: 14px; align-items: center; min-width: 0; }

.profile-who b { display: block; font-size: 18px; overflow-wrap: anywhere; }
.profile-who span { color: var(--muted); font-size: 12px; }

.avatar {
  width: 64px;
  height: 64px;
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffb020, #7a1cff);
  font-weight: 800;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }

.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  min-width: 0;
}

.profile-stats div {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
}

.profile-stats dt { color: var(--muted); font-size: 11px; }
.profile-stats dd { margin: 4px 0 0; font-weight: 800; overflow-wrap: anywhere; }
.profile-stats #profileBalance { color: var(--green); }

.stat-best {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.stat-best dd { margin: 6px 0 0; }
.best-empty { color: var(--muted); font-weight: 700; }
.best-skin {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 6px 8px 6px 6px;
  border-radius: 12px;
  border-bottom: 3px solid var(--rc, var(--gold));
  background: linear-gradient(to top, color-mix(in srgb, var(--rc, var(--gold)) 28%, transparent), transparent 72%), rgba(0, 0, 0, 0.28);
}
.best-skin img {
  width: 56px;
  height: 36px;
  flex: none;
  object-fit: contain;
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--rc, var(--gold)) 55%, transparent));
}
.best-skin > :not(img) { min-width: 0; overflow: hidden; }
.best-skin b {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
}
.best-skin small { color: var(--muted); font-size: 11px; font-weight: 700; }

.trade { grid-column: 1 / -1; display: grid; gap: 6px; }
.trade label { color: var(--muted); font-size: 12px; font-weight: 700; }
.trade-row { display: flex; gap: 8px; }

.trade-row input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0d0b17;
  color: white;
}

.trade-row input:focus { outline: 0; border-color: var(--violet); }

.save-btn {
  padding: 10px 18px;
  min-height: 40px;
  border-radius: 10px;
  background: var(--violet);
  color: white;
  font-weight: 800;
}

.save-btn:hover { filter: brightness(1.1); }

.trade-status-ok { color: var(--green); }
.trade-status-bad { color: #ff8fa3; }

.items-head { justify-content: space-between; }
.items-head h2 { margin: 0; }

.sell-all {
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--green);
  color: #06210f;
  font-weight: 800;
}

/* ---------- Сітка інвентарю 5 в ряд ---------- */
.inv-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.inv-empty { grid-column: 1 / -1; }

.inv-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--rc) 55%, var(--line));
  border-bottom: 4px solid var(--rc);
  background:
    linear-gradient(to top, color-mix(in srgb, var(--rc) 30%, transparent), transparent 70%),
    var(--card);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--rc) 22%, transparent),
    0 0 18px color-mix(in srgb, var(--rc) 42%, transparent);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.inv-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 18px var(--rc), 0 10px 26px color-mix(in srgb, var(--rc) 30%, transparent);
}

.inv-card.picked {
  border-color: color-mix(in srgb, var(--green) 55%, var(--line));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--green) 45%, transparent);
}

.inv-check {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(8, 6, 14, 0.72);
  border: 1px solid var(--line);
  cursor: pointer;
}
.inv-check input { accent-color: var(--green); margin: 0; cursor: pointer; }

.rar {
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--rc) 28%, #0c0a1c);
  color: color-mix(in srgb, var(--rc) 70%, white);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.inv-art {
  height: 84px;
  margin: 4px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.inv-art img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.5));
}

.inv-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5em;
  font-size: 12px;
  line-height: 1.25;
}

.inv-actions {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  display: grid;
  gap: 5px;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.inv-card:hover .inv-actions,
.inv-card:focus-within .inv-actions {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

@media (hover: none), (max-width: 900px) {
  .inv-actions {
    position: static;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    margin-top: 6px;
  }
  .act {
    height: auto;
    min-height: 28px;
    padding: 6px 8px;
    white-space: normal;
    overflow: hidden;
  }
}

.act {
  height: 28px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.act.sell { background: var(--green); color: #06210f; }
.act.take { background: rgba(8, 6, 14, 0.88); color: var(--text); border: 1px solid var(--line); }
.act.take:hover { border-color: #66c0f4; color: #66c0f4; }
.act:hover { filter: brightness(1.08); }

#viewInventory { padding-bottom: 88px; }

.inv-bar {
  position: fixed;
  left: calc(112px + 20px);
  right: 88px;
  bottom: 18px;
  z-index: 24;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(12, 10, 22, 0.94);
  border: 1px solid rgba(124, 92, 255, 0.45);
  box-shadow: 0 0 24px rgba(124, 92, 255, 0.22), 0 16px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
}
.inv-bar span { margin-right: auto; font-weight: 800; }
.inv-bar-sell {
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--green);
  color: #06210f;
  font-weight: 800;
}
.inv-bar-clear {
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-weight: 700;
}

@media (hover: none) {
  .inv-actions { opacity: 1; transform: none; pointer-events: auto; position: static; margin-top: 8px; }
}

/* ---------- Модальне вікно поповнення ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: auto;
  padding: 16px;
  background: rgba(6, 4, 16, 0.76);
  backdrop-filter: blur(6px);
}

.modal-card {
  position: relative;
  width: min(460px, 100%);
  margin: auto;
  max-height: none;
  overflow: visible;
  padding: 24px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(61, 255, 138, 0.08), transparent 40%), #1a1533;
  border: 1px solid var(--line);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.modal-card h2 {
  padding-right: 40px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}

.modal-close:hover { background: rgba(255, 255, 255, 0.08); color: white; }

.pay-card { width: min(520px, 100%); }
.trade-card { width: min(520px, 100%); }

.pay-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 14px 0 10px;
}
.pay-tabs button {
  padding: 10px 8px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0d0b17;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}
.pay-tabs button:hover { border-color: var(--violet); color: white; }
.pay-tabs button.active {
  border-color: var(--green);
  background: rgba(61, 255, 138, 0.12);
  color: var(--green);
}

.crypto-pick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}
.crypto-pick.hidden { display: none; }
.crypto-pick button {
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #120f22;
  color: var(--muted);
  font-weight: 800;
}
.crypto-pick button.active {
  border-color: #26a17b;
  color: #3dff8a;
  background: rgba(38, 161, 123, 0.12);
}

.usdt-networks {
  margin: 0 0 12px;
  padding: 10px 10px 8px;
  border-radius: 14px;
  border: 1px solid rgba(38, 161, 123, 0.22);
  background: rgba(38, 161, 123, 0.06);
}
.usdt-networks.hidden { display: none; }
.network-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.network-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.network-tabs button {
  display: grid;
  gap: 2px;
  justify-items: center;
  padding: 8px 6px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0d0b17;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.network-tabs button .net-hint {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.network-tabs button:hover { border-color: #26a17b; color: white; }
.network-tabs button.active {
  border-color: #26a17b;
  background: rgba(38, 161, 123, 0.16);
  color: #3dff8a;
}
.network-tabs button.active .net-hint { color: rgba(61, 255, 138, 0.72); }

.fee-warn {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 196, 80, 0.35);
  background: rgba(255, 196, 80, 0.08);
  color: #ffd27a;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}
.fee-warn.hidden { display: none; }

.min-deposit {
  margin: 14px 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.amounts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 0 12px;
}
.amounts.hidden { display: none; }
.amounts button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 52px;
  padding: 10px 8px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0d0b17;
  color: white;
  font-weight: 800;
}
.amounts button:hover { border-color: var(--violet); }
.amounts button.active {
  border-color: var(--green);
  background: rgba(61, 255, 138, 0.1);
  color: var(--green);
}
.amount-bonus {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(61, 255, 138, 0.16);
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.amounts button.active .amount-bonus {
  background: rgba(61, 255, 138, 0.28);
}

.custom-amount {
  display: grid;
  gap: 6px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.custom-amount input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0d0b17;
  color: white;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.custom-amount input:focus {
  outline: none;
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.18);
}
.custom-amount input.is-bad {
  border-color: rgba(255, 77, 109, 0.7);
  box-shadow: 0 0 0 3px rgba(255, 77, 109, 0.14);
}
.amount-error {
  margin: 0 0 12px;
  color: #ff8aa8;
  font-size: 12px;
  font-weight: 700;
}
.amount-error.hidden { display: none; }
.pay-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  filter: grayscale(0.25);
}

.skins-status {
  display: grid;
  gap: 12px;
  justify-items: start;
  margin: 14px 0 12px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(124, 92, 255, 0.28);
  background: rgba(124, 92, 255, 0.1);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}
.skins-status.hidden { display: none; }
.skins-status-copy { margin: 0; }
.skins-min-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(61, 255, 138, 0.28);
  background: rgba(61, 255, 138, 0.1);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.skins-pay-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 2px;
}
.skins-steam-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #1b2838;
  color: #66c0f4;
  flex-shrink: 0;
}
.skins-steam-badge svg {
  width: 16px;
  height: 16px;
}

.promo-field {
  display: grid;
  gap: 6px;
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.promo-row {
  display: flex;
  gap: 8px;
  min-width: 0;
}
.promo-field input {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0d0b17;
  color: white;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.promo-field input:focus {
  outline: none;
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.18);
}
.promo-apply {
  flex: 0 0 auto;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--violet);
  background: rgba(124, 92, 255, 0.18);
  color: white;
  font-weight: 800;
}
.promo-apply:hover { filter: brightness(1.08); }
.promo-apply-status {
  margin: -6px 0 10px;
  font-size: 12px;
  font-weight: 700;
}
.promo-apply-status.is-ok { color: var(--green); }
.promo-apply-status.is-bad { color: #ff8aa8; }

.pay-breakdown {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
}
.pay-breakdown > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}
.pay-breakdown b { color: var(--text); }
.pay-breakdown-total {
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--text) !important;
}
.pay-breakdown-total b { color: var(--green); font-size: 16px; }

.topup-formula {
  margin-bottom: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(124, 92, 255, 0.08);
  border: 1px solid rgba(124, 92, 255, 0.22);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}
.topup-formula.has-bonus { color: var(--green); }
.topup-formula.is-bad { color: #ff8aa8; background: rgba(255, 77, 109, 0.08); border-color: rgba(255, 77, 109, 0.28); }

.topup-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
}

.topup-total span { color: var(--muted); }
.topup-total b { font-size: 20px; }

.pay-btn {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #3dff8a, #b6ff3d);
  color: #06210f;
  font-size: 16px;
  font-weight: 800;
}

.pay-btn:hover { filter: brightness(1.08); }

/* ---------- Модалка випавшего скіна ---------- */
body.drop-open { overflow: hidden; }

.drop-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 4, 12, 0.72);
  backdrop-filter: blur(14px);
  animation: dropIn 0.28s ease;
}

.drop-modal-card {
  position: relative;
  display: grid;
  justify-items: center;
  width: min(420px, 100%);
  padding: 42px 28px 28px;
  border-radius: 24px;
  border: 1px solid color-mix(in srgb, var(--rc, var(--violet)) 45%, transparent);
  background:
    radial-gradient(circle at 50% 32%, color-mix(in srgb, var(--rc, var(--violet)) 28%, transparent), transparent 62%),
    #110e1c;
  text-align: center;
  overflow: hidden;
}

.drop-glow {
  position: absolute;
  inset: 8% 12% 42%;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--rc, var(--violet)) 55%, transparent), transparent 70%);
  filter: blur(8px);
  animation: dropPulse 2.2s ease-in-out infinite;
  pointer-events: none;
}

.drop-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.drop-sparkles i {
  position: absolute;
  left: 50%;
  top: 38%;
  width: 5px;
  height: 5px;
  margin: -2px;
  border-radius: 50%;
  background: var(--rc, #fff);
  box-shadow: 0 0 10px var(--rc, #fff);
  transform: rotate(var(--a)) translateY(var(--r));
  animation: twinkle 1.8s ease-in-out infinite;
  animation-delay: var(--d);
}

.drop-modal-card img {
  position: relative;
  z-index: 1;
  width: min(280px, 70vw);
  height: 150px;
  object-fit: contain;
  filter:
    drop-shadow(0 0 18px color-mix(in srgb, var(--rc, var(--violet)) 70%, transparent))
    drop-shadow(0 16px 20px rgba(0, 0, 0, 0.55));
}
.drop-modal-card b {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  font-size: 20px;
  line-height: 1.25;
}
.drop-wear {
  position: relative;
  z-index: 1;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}
.drop-modal-card em {
  position: relative;
  z-index: 1;
  margin-top: 4px;
  font-style: normal;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
}

.drop-ctas {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  width: 100%;
  margin-top: 22px;
}
.drop-ctas button {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 800;
}
.drop-sell { background: var(--green); color: #06210f; }
.drop-again { background: var(--violet); color: white; }
.drop-keep { background: rgba(255, 255, 255, 0.06); color: var(--text); border: 1px solid var(--line); }
.drop-ctas button:hover { filter: brightness(1.1); }
.drop-ctas button:disabled { opacity: 0.55; cursor: wait; }

@keyframes dropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes winPop {
  from { transform: scale(0.92); opacity: 0.7; }
  to { transform: scale(1.05); opacity: 1; }
}
@keyframes dropPulse {
  0%, 100% { transform: scale(1); opacity: 0.75; }
  50% { transform: scale(1.08); opacity: 1; }
}
@keyframes twinkle {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 1; }
}

/* ---------- Адаптивність ---------- */
@media (max-width: 1100px) {
  .inv-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .profile { grid-template-columns: 1fr; }
  .roulette-board[data-cols="4"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .nav { flex-wrap: wrap; gap: 10px; padding: 10px 14px; }
  .nav-links {
    order: 3;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-btn { flex: none; }
  .profile-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .upgrade-stage,
  .upgrade-action-row,
  .upgrade-pickers { grid-template-columns: 1fr; }
  .upgrade-tools { justify-items: start; }
  .upgrade-cta { width: 100%; }
  .live-rail { flex-basis: 88px; width: 88px; }
  .toast { left: calc((100vw + 88px) / 2); }
  .roulette-board[data-cols="3"],
  .roulette-board[data-cols="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .roulette-board.multi .roulette-window { height: 132px; }
}

@media (max-width: 767px) {
  .live-rail {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 18;
    flex: 0 0 0;
    width: min(268px, 86vw);
    transform: translateX(-100%);
    transition: transform 0.32s var(--ease), box-shadow 0.32s var(--ease);
    box-shadow: none;
  }
  body.live-open .live-rail {
    transform: none;
    box-shadow: 18px 0 40px rgba(0, 0, 0, 0.45);
  }
  .live-rail-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: none;
    width: auto;
    height: 36px;
    padding: 0 10px;
    border-radius: 10px;
    background: #12101d;
    color: var(--green);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    border: 1px solid rgba(61, 255, 138, 0.35);
  }
  .live-burger,
  .live-burger::before,
  .live-burger::after {
    display: block;
    width: 14px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
  }
  .live-burger {
    position: relative;
  }
  .live-burger::before,
  .live-burger::after {
    content: "";
    position: absolute;
    left: 0;
  }
  .live-burger::before { top: -5px; }
  .live-burger::after { top: 5px; }
  body.live-open .live-burger { background: transparent; }
  body.live-open .live-burger::before { top: 0; transform: rotate(45deg); }
  body.live-open .live-burger::after { top: 0; transform: rotate(-45deg); }
  .live-marquee {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #07060c;
    border-bottom: 1px solid var(--line);
    overflow: hidden;
  }
  .live-marquee-label {
    flex: none;
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(61, 255, 138, 0.12);
    color: var(--green);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
  }
  .live-marquee-viewport {
    flex: 1;
    min-width: 0;
    overflow: hidden;
  }
  .live-marquee-track {
    display: flex;
    gap: 8px;
    width: max-content;
    animation: liveMarquee 36s linear infinite;
  }
  .live-marquee-track:hover { animation-play-state: paused; }
  .tick.marquee {
    flex: 0 0 76px;
    padding: 5px 4px 4px;
  }
  .tick.marquee img.tick-skin { height: 30px; }
  .tick.marquee span { font-size: 9px; }
  .tick.marquee .tick-hover,
  .tick.marquee .tick-wear { display: none; }
  @keyframes liveMarquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
  }
  .live-scrim {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 17;
    background: rgba(5, 4, 14, 0.55);
    backdrop-filter: blur(4px);
  }
  body.live-open .live-scrim { display: block; }
  .inv-bar { left: 12px; right: 12px; bottom: 72px; }
  .toast { left: 50%; }
  .help-fab { width: 48px; height: 48px; right: 10px; bottom: 10px; }
  .support-widget { right: 10px; bottom: 66px; }
  .support-fab { width: 42px; height: 42px; }
  main { padding-bottom: 24px; }
  #viewInventory { padding-bottom: 128px; }
  #viewInventory .trade {
    max-width: 100%;
  }
  #viewInventory #openTradeModal {
    width: auto;
    max-width: calc(100% - 56px);
  }
  .site-footer { padding-bottom: 84px; }
  .crash-max24 {
    max-width: min(210px, calc(100% - 20px));
    padding: 8px 10px;
  }
  .crash-chart-wrap { min-height: 240px; height: min(42vh, 360px); }
  .crash-bet { padding-right: 18px; padding-bottom: 18px; }
  .crash-chips,
  .crash-auto-pills {
    padding-right: 56px;
  }
  .crash-chips button {
    padding: 7px 8px;
    font-size: 11px;
  }
}

@media (max-width: 760px) {
  .inv-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  main { padding: 14px 14px 28px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar input { width: 100%; }
  .chips { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .chip { flex: none; }
  .roulette-board[data-cols="2"],
  .roulette-board[data-cols="3"],
  .roulette-board[data-cols="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .drop-results-ctas { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .inv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trade-row { flex-direction: column; }
  .save-btn { padding: 10px; }
  .nav-side { flex-wrap: wrap; }
  .user-link { max-width: 110px; }
  .nick-badge { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .drop-inline-ctas { gap: 8px; }
  .drop-inline-ctas button { padding: 11px 10px; font-size: 13px; }
  .pay-tabs button { font-size: 11px; padding: 8px 4px; }
  .promo-row { flex-direction: column; }
  .promo-apply { width: 100%; padding: 12px; }
  .crypto-pick { grid-template-columns: repeat(2, 1fr); }
  .roulette-board.multi .roulette-window { height: 118px; }
  .roulette-board.multi .skin-card { flex-basis: 96px; width: 96px; margin: 6px 3px; }
  .drop-multi-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .fast-toggle { width: 100%; justify-content: center; }
}

/* ---------- Промо-акаунт: завжди видно відкрито ---------- */
.promo-badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffb020, #ff4d6a);
  color: #1b0a00;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.nick-badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #3dff8a, #36fff3);
  color: #04140c;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.nick-note {
  margin: 0 0 10px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(61, 255, 138, 0.35);
  background: rgba(61, 255, 138, 0.08);
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.promo-note {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 176, 32, 0.45);
  background: rgba(255, 176, 32, 0.08);
  color: #ffd27a;
  font-size: 13px;
}
.promo-note b { margin-right: 8px; letter-spacing: 0.08em; }

.tick em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ffb020;
}
.tick.promo { border-bottom-color: #ffb020; }

/* ---------- Мої заявки на виведення ---------- */
.wd-list { display: grid; gap: 8px; }

.wd-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  font-size: 13px;
}
.wd-row em { font-style: normal; color: var(--muted); font-weight: 700; }

.wd-status { padding: 3px 10px; border-radius: 999px; font-size: 11px; }
.wd-pending,
.wd-PENDING_TRADE,
.wd-PENDING_P2P,
.wd-PROCESSING { background: rgba(255, 176, 32, 0.15); color: #ffb020; }
.wd-PENDING_ADMIN { background: rgba(102, 192, 244, 0.16); color: #66c0f4; }
.wd-sent,
.wd-COMPLETED,
.wd-DELIVERED { background: rgba(61, 255, 138, 0.14); color: var(--green); }
.wd-rejected,
.wd-CANCELLED,
.wd-AVAILABLE { background: rgba(255, 107, 129, 0.15); color: #ff6b81; }

.trade-open {
  margin-top: 8px;
  width: auto;
  max-width: 100%;
  justify-self: start;
  white-space: nowrap;
}
.trade-card {
  max-width: 520px;
}
.trade-card code {
  font-size: 11px;
  word-break: break-all;
}

/* ---------- Промо-банер ---------- */
.promo-slider { position: relative; margin-bottom: 18px; overflow: hidden; border-radius: 18px; }
.promo-track { display: flex; transition: transform 0.5s ease; }
.promo-slide {
  flex: 0 0 100%;
  display: grid;
  gap: 6px;
  padding: 22px 28px;
  min-height: 96px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c, var(--gold)) 22%, #12101d), #12101d 70%);
  border: 1px solid color-mix(in srgb, var(--c, var(--gold)) 40%, transparent);
  box-shadow: inset 0 0 40px color-mix(in srgb, var(--c, var(--gold)) 12%, transparent);
}
.promo-slide.gold { --c: #ffc21a; }
.promo-slide.violet { --c: #c24dff; }
.promo-slide.green { --c: #3dff8a; }
.promo-slide b { font-size: 22px; }
.promo-slide span { color: var(--muted); }
.promo-dots { position: absolute; right: 16px; bottom: 12px; display: flex; gap: 6px; }
.promo-dots button {
  width: 8px; height: 8px; padding: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}
.promo-dots button.active { background: white; }

/* ---------- Апгрейд / контракти ---------- */
.page-hero { margin-bottom: 18px; }
.page-hero h1 { margin-bottom: 6px; }

.free-case {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 22px;
  padding: 18px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(61, 255, 138, 0.12), transparent 42%),
    linear-gradient(180deg, #1a1533, #12101d);
  border: 1px solid rgba(61, 255, 138, 0.22);
  box-shadow: 0 0 28px rgba(61, 255, 138, 0.08);
}
.free-case-art {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: radial-gradient(circle at 40% 30%, rgba(61, 255, 138, 0.35), #0d0b17 70%);
  border: 1px solid rgba(61, 255, 138, 0.35);
  color: var(--green);
  font-weight: 800;
  letter-spacing: 0.12em;
}
.free-case-copy b { display: block; font-size: 20px; margin-bottom: 4px; }
.free-case-copy p { margin: 0 0 8px; color: var(--muted); }
.reward-timer {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0.06em;
}
.reward-timer.ready { color: var(--green); }
.reward-btn {
  padding: 12px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, #3dff8a, #b6ff3d);
  color: #06210f;
  font-weight: 800;
}
.reward-btn:disabled {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  cursor: not-allowed;
}

.deposit-cases {
  margin: 8px 0 28px;
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(228, 174, 57, 0.28);
  background:
    linear-gradient(135deg, rgba(228, 174, 57, 0.1), transparent 46%),
    linear-gradient(180deg, #1a1533, #12101d);
}
.deposit-cases-head h2 { margin: 0 0 4px; font-size: 22px; }
.deposit-cases-head .hint { margin: 0 0 16px; }
.deposit-progress { margin-bottom: 18px; }
.deposit-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 10px;
}
.deposit-progress-meta b { font-size: 16px; }
.deposit-progress-meta span { color: var(--muted); font-size: 13px; font-weight: 600; }
.deposit-bar {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.deposit-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #cd7f32, #c0c7d1 22%, #e4ae39 44%, #9fd3ff 72%, #7c5cff);
  transition: width 0.45s ease;
}
.deposit-marks {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  gap: 6px;
}
.deposit-mark {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.deposit-mark.on { color: var(--gold); }
.deposit-case-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.deposit-case {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  background: #171425;
  border: 1px solid var(--line);
  min-width: 0;
}
.deposit-case.unlocked { border-color: rgba(61, 255, 138, 0.35); box-shadow: 0 0 22px rgba(61, 255, 138, 0.08); }
.deposit-case.claimed { border-color: rgba(228, 174, 57, 0.4); }
.deposit-case.locked { opacity: 0.78; }
.deposit-case-art {
  height: 84px;
  display: grid;
  place-items: center;
}
.deposit-case-art img {
  max-height: 80px;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.45));
}
.deposit-case b { font-size: 14px; line-height: 1.25; }
.deposit-case .pool { margin: 0; color: var(--muted); font-size: 12px; font-weight: 600; }
.deposit-badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold);
}
.deposit-badge.ok { color: #06210f; background: linear-gradient(135deg, #3dff8a, #b6ff3d); }
.deposit-previews {
  display: flex;
  gap: 4px;
  min-height: 36px;
}
.deposit-previews img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}
.deposit-case .reward-btn { width: 100%; padding: 10px 12px; font-size: 13px; }

.giveaway-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.giveaway-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  background: #171425;
  border: 1px solid var(--line);
  box-shadow: 0 0 24px rgba(124, 92, 255, 0.08);
}
.giveaway-card.hourly { border-color: rgba(61, 255, 138, 0.22); }
.giveaway-card.daily { border-color: rgba(124, 92, 255, 0.35); }
.giveaway-card.weekly { border-color: rgba(228, 174, 57, 0.4); }
.giveaway-card img {
  width: 100%;
  height: 110px;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.45));
}
.giveaway-card h3 { margin: 0; font-size: 16px; }
.giveaway-card .hint { margin: 0; }
.giveaway-prize { font-weight: 800; color: var(--gold); }
.giveaway-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; font-weight: 700; }

@media (max-width: 980px) {
  .giveaway-grid { grid-template-columns: 1fr; }
  .deposit-case-grid { grid-template-columns: 1fr; }
  .free-case { grid-template-columns: 1fr; }
  .deposit-progress-meta { flex-direction: column; gap: 4px; }
  .inv-bar { left: 12px; right: 12px; }
}

.upgrade-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.upgrade-hero h1 { margin: 0 0 6px; text-transform: uppercase; letter-spacing: 0.04em; }
.upgrade-hero .hint { margin: 0; max-width: 640px; }
.skip-btn {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #12101d;
  color: #6f6a82;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.skip-btn svg { width: 22px; height: 22px; }
.skip-btn:hover { color: #ffd24d; border-color: rgba(255, 210, 77, 0.4); }
.skip-btn[aria-pressed="true"] {
  color: #ffd24d;
  border-color: #ffd24d;
  background: rgba(255, 210, 77, 0.2);
  box-shadow: 0 0 22px rgba(255, 210, 77, 0.55);
}
.skip-btn.fast-toggle {
  width: auto;
  min-width: 44px;
  padding: 0 14px 0 10px;
  gap: 8px;
  display: inline-flex;
  place-items: unset;
  align-items: center;
}

.upgrade-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 240px) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  min-width: 0;
}
.upgrade-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin: 18px 0 8px;
  min-width: 0;
}
.upgrade-action-meta {
  font-weight: 800;
  color: var(--muted);
}
.upgrade-cta {
  min-width: 220px;
  padding: 14px 28px;
  font-size: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.upgrade-pickers {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 12px;
  min-width: 0;
}
.upgrade-pane {
  padding: 14px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  min-height: 280px;
}
.upgrade-pane h2 {
  margin: 0 0 10px;
  font-size: 16px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.upgrade-pane h2 small { color: var(--muted); font-size: 12px; font-weight: 700; }
.upgrade-empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 36px 16px;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
  grid-column: 1 / -1;
}
.upgrade-empty-cta {
  padding: 10px 16px;
  border-color: #ff7a18;
  color: #ff7a18;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.upgrade-empty-cta:hover { background: rgba(255, 122, 24, 0.12); }
.slot-ghost {
  width: 140px;
  height: 56px;
  opacity: 0.18;
  color: #9aa3b8;
}

.upgrade-col h2 { font-size: 16px; display: flex; align-items: baseline; gap: 8px; }
.upgrade-col h2 small { color: var(--muted); font-size: 12px; font-weight: 700; }
.upgrade-slot {
  min-height: 220px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  border: 1px dashed var(--line);
  background: var(--panel);
}
.upgrade-slot .mini {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
  padding: 8px 12px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--rc, var(--line)) 55%, var(--line));
  box-shadow: 0 0 18px color-mix(in srgb, var(--rc, transparent) 42%, transparent);
}
.upgrade-slot img { width: 140px; height: 80px; object-fit: contain; }
.upgrade-stake-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 8px;
  width: 100%;
}
.upgrade-stake-grid .mini {
  width: 100%;
  padding: 8px 6px;
  cursor: pointer;
  background: transparent;
  color: inherit;
}
.upgrade-stake-grid .mini img { width: 100%; height: 48px; }
.upgrade-stake-grid .mini b { font-size: 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 100%; }
.upgrade-stake-sum {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

.upgrade-inv {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
}
.upgrade-pick {
  padding: 8px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--rc) 55%, var(--line));
  border-bottom: 3px solid var(--rc);
  background: linear-gradient(to top, color-mix(in srgb, var(--rc) 22%, transparent), transparent 70%), var(--card);
  box-shadow: 0 0 14px color-mix(in srgb, var(--rc) 40%, transparent);
  cursor: pointer;
}
.upgrade-pick.active { border-color: var(--green); box-shadow: 0 0 14px var(--green); }
.upgrade-pick img { width: 100%; height: 48px; object-fit: contain; }
.upgrade-pick b { display: block; font-size: 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.upgrade-pick small { display: block; font-size: 9px; color: var(--muted); }

.upgrade-wheel-wrap { display: grid; justify-items: center; align-content: center; }
.upgrade-wheel {
  position: relative;
  width: 220px;
  height: 220px;
  display: grid;
  place-items: center;
}
.wheel-mark {
  position: absolute;
  z-index: 2;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  pointer-events: none;
}
.wheel-mark-100 { top: 8px; }
.wheel-mark-0 { bottom: 8px; }
.wheel-mark-50l { left: 0; top: 50%; transform: translateY(-50%); }
.wheel-mark-50r { right: 0; top: 50%; transform: translateY(-50%); }
.wheel-pointer {
  position: absolute;
  top: -2px;
  left: 50%;
  z-index: 3;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 14px solid #fff;
  transform: translateX(-50%);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.55));
}
.wheel-rotor {
  width: 200px;
  height: 200px;
  transform-origin: 50% 50%;
}
.wheel-rotor svg { width: 200px; height: 200px; transform: rotate(-90deg); }
.wheel-bg { fill: none; stroke: #241c3a; stroke-width: 10; }
.wheel-lose {
  fill: none;
  stroke: #eb4b4b;
  stroke-width: 10;
  stroke-dasharray: 100 0;
  opacity: 0.38;
}
.wheel-arc {
  fill: none;
  stroke: var(--green);
  stroke-width: 10;
  stroke-linecap: butt;
  stroke-dasharray: 0 100;
  transition: stroke-dasharray 0.4s ease;
  filter: drop-shadow(0 0 8px var(--green));
}
.upgrade-wheel b { position: absolute; font-size: 32px; pointer-events: none; }
.upgrade-wheel small { position: absolute; top: 62%; color: var(--muted); font-size: 11px; pointer-events: none; }
.upgrade-wheel.spinning .wheel-arc { transition: none; }
.upgrade-wheel.won { filter: drop-shadow(0 0 18px var(--green)); }
.upgrade-wheel.lost { filter: drop-shadow(0 0 18px #eb4b4b); }
.upgrade-wheel.lost .wheel-arc { stroke: #eb4b4b; filter: drop-shadow(0 0 8px #eb4b4b); }

.upgrade-tools { display: grid; gap: 8px; justify-items: end; }
.upgrade-search {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0d0b17;
  color: white;
}
.mini-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mini-chip {
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--line);
}
.mini-chip.active { color: white; border-color: var(--violet); background: rgba(124, 92, 255, 0.2); }
.upgrade-db {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
  max-height: 420px;
  overflow: auto;
  margin-top: 10px;
  padding-right: 4px;
}
.upgrade-db-more { grid-column: 1 / -1; }
.upgrade-mults { display: flex; flex-wrap: wrap; gap: 8px; }
.upgrade-mults button {
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--panel);
  color: var(--muted);
  font-weight: 800;
  border: 1px solid var(--line);
}
.upgrade-mults button.active { color: white; border-color: var(--violet); background: rgba(124, 92, 255, 0.2); }

.contract-slots {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.contract-slot {
  min-height: 110px;
  display: grid;
  place-items: center;
  padding: 8px;
  border-radius: 14px;
  border: 1px dashed var(--line);
  background: var(--panel);
  font-size: 12px;
  color: var(--muted);
}
.contract-slot.filled {
  border-style: solid;
  border-color: color-mix(in srgb, var(--rc) 50%, var(--line));
  box-shadow: 0 0 12px color-mix(in srgb, var(--rc) 30%, transparent);
  color: var(--text);
}
.contract-slot img { width: 100%; height: 52px; object-fit: contain; }
.contract-slot small { font-size: 10px; color: var(--muted); }
.contract-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.contract-meta span { font-weight: 800; display: block; }
.contract-meta .hint { margin: 4px 0 0; }

/* ---------- Плавні анімації по всьому UI ---------- */
button,
a,
input,
.chip,
.nav-btn,
.icon-btn,
.save-btn,
.act,
.reward-btn,
.pay-btn,
.open-btn,
.inv-bar-sell,
.inv-bar-clear,
.sell-all,
.mini-chip,
.upgrade-mults button,
.steam-btn,
.user-link,
.balance-pill,
.topup-btn,
.drop-keep-link {
  transition:
    transform var(--t) var(--ease),
    background var(--t) var(--ease),
    border-color var(--t) var(--ease),
    box-shadow var(--t) var(--ease),
    color var(--t) var(--ease),
    filter var(--t) var(--ease),
    opacity var(--t) var(--ease);
}

button:hover:not(:disabled),
a:hover,
.nav-btn:hover,
.chip:hover,
.mini-chip:hover,
.upgrade-mults button:hover {
  transform: translateY(-1px);
}
button:active:not(:disabled),
.nav-btn:active,
.chip:active {
  transform: translateY(0) scale(0.98);
}

.nav-btn.active,
.chip.active,
.mini-chip.active,
.upgrade-mults button.active {
  transition: transform var(--t) var(--ease), background var(--t) var(--ease), color var(--t) var(--ease), border-color var(--t) var(--ease);
}

main > section:not(.hidden) {
  animation: viewIn 0.42s var(--ease);
}

@keyframes viewIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(18px) scale(0.94); }
  to { opacity: 1; transform: none; }
}

@keyframes fadeScrim {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  to { opacity: 0; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  to { opacity: 1; transform: translateX(-50%); }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 16px rgba(61, 255, 138, 0.12); }
  50% { box-shadow: 0 0 28px rgba(61, 255, 138, 0.28); }
}

.case-grid .case-card,
.drop-grid .drop-item,
.inv-grid .inv-card,
.giveaway-grid .giveaway-card {
  animation: riseIn 0.46s var(--ease) both;
}
.case-grid .case-card:nth-child(1), .drop-grid .drop-item:nth-child(1), .inv-grid .inv-card:nth-child(1), .giveaway-grid .giveaway-card:nth-child(1) { animation-delay: 0.02s; }
.case-grid .case-card:nth-child(2), .drop-grid .drop-item:nth-child(2), .inv-grid .inv-card:nth-child(2), .giveaway-grid .giveaway-card:nth-child(2) { animation-delay: 0.06s; }
.case-grid .case-card:nth-child(3), .drop-grid .drop-item:nth-child(3), .inv-grid .inv-card:nth-child(3), .giveaway-grid .giveaway-card:nth-child(3) { animation-delay: 0.1s; }
.case-grid .case-card:nth-child(4), .drop-grid .drop-item:nth-child(4), .inv-grid .inv-card:nth-child(4) { animation-delay: 0.14s; }
.case-grid .case-card:nth-child(5), .drop-grid .drop-item:nth-child(5), .inv-grid .inv-card:nth-child(5) { animation-delay: 0.18s; }
.case-grid .case-card:nth-child(6), .drop-grid .drop-item:nth-child(6), .inv-grid .inv-card:nth-child(6) { animation-delay: 0.22s; }
.case-grid .case-card:nth-child(n+7), .drop-grid .drop-item:nth-child(n+7), .inv-grid .inv-card:nth-child(n+7) { animation-delay: 0.26s; }

.case-card {
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.case-art img,
.case-hero-art img {
  transition: transform 0.4s var(--ease), filter 0.4s var(--ease);
}

.drop-item,
.inv-card,
.giveaway-card,
.upgrade-pick,
.upgrade-stake-grid .mini,
.contract-slot,
.crash-pick {
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), border-color 0.28s var(--ease);
}

.giveaway-card:hover,
.upgrade-pick:hover,
.upgrade-stake-grid .mini:hover,
.contract-slot:hover,
.crash-pick:hover {
  transform: translateY(-3px);
}

.giveaway-card img,
.inv-art img,
.upgrade-pick img,
.crash-pick img {
  transition: transform 0.35s var(--ease);
}
.giveaway-card:hover img,
.inv-card:hover .inv-art img,
.upgrade-pick:hover img,
.crash-pick:hover img {
  transform: scale(1.06);
}

.free-case {
  animation: riseIn 0.42s var(--ease);
  transition: border-color var(--t) var(--ease), box-shadow var(--t-slow) var(--ease);
}
.free-case-art { animation: glowPulse 2.4s ease-in-out infinite; }

.inv-bar:not(.hidden) { animation: slideUp 0.32s var(--ease); }
.inv-card.picked { transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), border-color 0.28s var(--ease); }

.modal:not(.hidden) { animation: fadeScrim 0.28s ease; }
.modal:not(.hidden) .modal-card { animation: popIn 0.38s var(--ease); }
.modal.is-leaving { animation: fadeOut 0.2s ease forwards; }

.drop-modal:not(.hidden) { animation: fadeScrim 0.32s ease; }
.drop-modal:not(.hidden) .drop-modal-card { animation: popIn 0.42s var(--ease); }
.drop-modal.is-leaving { animation: fadeOut 0.2s ease forwards; }
.drop-results:not(.hidden) { animation: fadeScrim 0.32s ease; }
.drop-results:not(.hidden) .drop-results-card { animation: popIn 0.42s var(--ease); }

.toast:not(.hidden) { animation: toastIn 0.35s var(--ease); }
.toast.is-leaving { animation: fadeOut 0.22s ease forwards; }

.promo-track { transition: transform 0.65s var(--ease); }
.promo-dots button { transition: background 0.25s var(--ease), transform 0.25s var(--ease); }
.promo-dots button.active { transform: scale(1.25); }

.topup-formula,
.topup-total,
.custom-amount input,
.promo-field input,
.toolbar input,
.trade-row input,
.upgrade-search {
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), background var(--t) var(--ease), color var(--t) var(--ease);
}

.contract-slot { transition: transform 0.28s var(--ease), border-color 0.28s var(--ease), box-shadow 0.28s var(--ease), color 0.28s var(--ease); }
.upgrade-wheel { transition: filter 0.4s var(--ease); }
.reward-timer { transition: color var(--t) var(--ease), background var(--t) var(--ease); }

.pointer {
  animation: pointerBob 1.8s ease-in-out infinite;
}
@keyframes pointerBob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(3px); }
}

.tick.gold-win {
  border-color: #e4ae39;
  box-shadow:
    0 0 0 1px rgba(228, 174, 57, 0.85),
    0 0 18px rgba(228, 174, 57, 0.75),
    0 0 36px rgba(255, 210, 80, 0.4);
  animation: goldFlash 1.1s ease-in-out 4;
}
@keyframes goldFlash {
  0%, 100% { box-shadow: 0 0 10px rgba(228, 174, 57, 0.4); filter: saturate(1); }
  50% { box-shadow: 0 0 28px rgba(255, 214, 90, 1); filter: saturate(1.25) brightness(1.08); }
}

.bigwin-banner {
  position: fixed;
  top: 14px;
  left: calc((100vw + 112px) / 2);
  z-index: 40;
  transform: translateX(-50%);
  max-width: min(720px, 86vw);
  padding: 12px 22px;
  border-radius: 16px;
  background: linear-gradient(135deg, #3a2a08, #8a6414 45%, #e4ae39);
  border: 1px solid #ffd56a;
  color: #fff8dc;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 12px 40px rgba(228, 174, 57, 0.45);
}
.bigwin-banner:not(.hidden) { animation: toastIn 0.4s var(--ease); }
.bigwin-banner.is-leaving { animation: fadeOut 0.22s ease forwards; }

.chat-drawer {
  display: flex;
  flex-direction: column;
  width: min(400px, 94vw);
  padding: 0;
  background:
    linear-gradient(180deg, rgba(124, 92, 255, 0.08), transparent 120px),
    #12101d;
}
.chat-drawer .help-head {
  margin: 0;
  padding: 16px 16px 10px;
  border-bottom: 1px solid var(--line);
}
.chat-sub {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.chat-log {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
}
.chat-msg {
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}
.chat-msg b { display: block; font-size: 12px; }
.chat-msg p { margin: 4px 0 0; font-size: 13px; line-height: 1.4; }
.chat-msg.sys { background: rgba(124, 92, 255, 0.12); }
.chat-msg.rain {
  background: linear-gradient(135deg, rgba(228, 174, 57, 0.18), rgba(124, 92, 255, 0.12));
  border-color: rgba(228, 174, 57, 0.45);
}
.chat-msg.bot { opacity: 0.92; }
.chat-skin {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 6px 8px;
  width: 100%;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
  text-align: left;
}
.chat-skin img { width: 42px; height: 32px; object-fit: contain; }
.chat-claim {
  margin-top: 8px;
  width: 100%;
  padding: 8px;
  border-radius: 10px;
  background: linear-gradient(135deg, #e4ae39, #ffd56a);
  color: #2a1c00;
  font-weight: 800;
}
.chat-form {
  display: grid;
  gap: 8px;
  padding: 10px 14px 6px;
  border-top: 1px solid var(--line);
}
.chat-form select,
.chat-form input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0d0b16;
  color: var(--text);
}
.chat-row { display: flex; gap: 8px; }
.chat-row input { flex: 1; }
.chat-send { width: auto; padding: 10px 14px; }
.chat-tg { margin: 0 14px 14px; padding: 10px; font-size: 13px; }

.battle-create {
  padding: 16px;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.battle-mode { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.battle-picks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.battle-case {
  padding: 10px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  color: inherit;
  text-align: left;
}
.battle-case.active {
  border-color: var(--violet);
  box-shadow: 0 0 0 1px var(--violet);
}
.battle-case img { width: 100%; height: 64px; object-fit: contain; }
.battle-case b, .battle-case span { display: block; }
.battle-case span { color: var(--muted); font-size: 12px; font-weight: 700; }
.battle-create-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.battle-lobby { display: grid; gap: 10px; }
.battle-room {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.battle-arena {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: start;
}
.battle-col {
  padding: 14px;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  min-width: 0;
}
.battle-col.win { border-color: var(--gold); box-shadow: 0 0 24px rgba(228, 174, 57, 0.28); }
.battle-vs {
  align-self: center;
  font-weight: 800;
  color: var(--gold);
}
.battle-reels { display: grid; gap: 8px; margin: 10px 0; }
.battle-reel {
  overflow: hidden;
  height: 92px;
  border-radius: 12px;
  background: #0d0b16;
  border: 1px solid var(--line);
}
.battle-reel-track {
  display: flex;
  flex-direction: column;
  animation: battleSpin 0.7s linear infinite;
}
.battle-reel-track.done { animation: none; }
.battle-drop {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 92px;
  padding: 8px;
}
.battle-drop img { width: 72px; height: 54px; object-fit: contain; }
.battle-total { font-size: 18px; }
@keyframes battleSpin {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}

.aff-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 12px;
}
.aff-card {
  padding: 16px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.aff-card span { color: var(--muted); font-size: 12px; font-weight: 700; }
.aff-card b {
  display: block;
  margin: 8px 0 12px;
  font-size: 18px;
  word-break: break-all;
}
.aff-card.gold { border-color: rgba(228, 174, 57, 0.45); }
.aff-tier-card small,
.aff-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}
.aff-progress {
  height: 8px;
  margin: 8px 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.aff-progress i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #7c5cff, #3dff8a);
  transition: width 0.35s ease;
}
.aff-card .reward-btn,
.aff-card .promo-apply { margin-top: 10px; width: 100%; }
.aff-code-field { display: block; margin: 8px 0 0; }
.aff-code-field input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0d0b16;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.aff-payouts {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}
.aff-payout {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  background: #171425;
  border: 1px solid var(--line);
}
.aff-payout b { font-size: 14px; }
.aff-payout span { color: var(--muted); font-size: 12px; font-weight: 700; }
.aff-payout em {
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  color: var(--gold);
}
.aff-friends {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.aff-friend {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #171425;
  border: 1px solid var(--line);
}
.aff-friend span { color: var(--muted); font-size: 12px; font-weight: 700; }

/* ---------- Crash ---------- */
.crash-hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.crash-fair {
  padding: 10px 14px;
  border-radius: 14px;
  background: #12101d;
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.crash-fair { min-width: 0; max-width: 100%; }
.crash-fair b { color: var(--text); font-family: ui-monospace, monospace; overflow-wrap: anywhere; }
.crash-fair small { display: block; margin-top: 4px; }
.crash-history {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 14px;
  scrollbar-width: thin;
}
.crash-pill {
  flex: 0 0 auto;
  min-width: 62px;
  padding: 7px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  border: 1px solid var(--line);
  background: #171425;
  color: var(--text);
}
.crash-pill.blue { color: #6aa8ff; background: rgba(47, 180, 255, 0.12); border-color: rgba(47, 180, 255, 0.35); }
.crash-pill.purple { color: #c9b8ff; background: rgba(124, 92, 255, 0.16); border-color: rgba(124, 92, 255, 0.4); }
.crash-pill.green { color: var(--green); background: rgba(61, 255, 138, 0.12); border-color: rgba(61, 255, 138, 0.35); }
.crash-pill.gold { color: #2a1c00; background: linear-gradient(135deg, #e4ae39, #ffd56a); border-color: #e4ae39; }
.crash-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
  gap: 16px;
  align-items: start;
  min-width: 0;
}
.crash-stage { min-width: 0; width: 100%; }
.crash-chart-wrap {
  position: relative;
  height: min(52vh, 460px);
  min-height: 280px;
  min-width: 0;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 20%, rgba(124, 92, 255, 0.16), transparent 36%),
    linear-gradient(180deg, #141225, #0b0a12);
  border: 1px solid var(--line);
}
#crashChart { display: block; width: 100%; height: 100%; max-width: 100%; }
.crash-hud {
  position: absolute;
  left: 18px;
  top: 16px;
  z-index: 2;
  pointer-events: none;
}
.crash-hud b {
  display: block;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1;
  letter-spacing: -0.03em;
  text-shadow: 0 0 24px rgba(124, 92, 255, 0.35);
}
.crash-hud b[data-tone="green"] { color: var(--green); }
.crash-hud b[data-tone="gold"] { color: var(--gold); }
.crash-hud b[data-tone="blue"] { color: #6aa8ff; }
.crash-hud span { color: var(--muted); font-weight: 700; }
.crash-max24 {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
  display: grid;
  justify-items: end;
  gap: 2px;
  padding: 10px 14px 9px;
  border-radius: 16px;
  border: 1px solid rgba(228, 174, 57, 0.45);
  background: linear-gradient(160deg, rgba(42, 22, 72, 0.92), rgba(12, 10, 22, 0.88));
  box-shadow: 0 0 22px rgba(124, 92, 255, 0.28), inset 0 0 18px rgba(228, 174, 57, 0.08);
  color: inherit;
  text-align: right;
  cursor: pointer;
}
.crash-max24 small {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c9b8ff;
}
.crash-max24 b {
  font-size: clamp(22px, 3.2vw, 34px);
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #ffd56a, #e4ae39, #c24dff, #ffd56a);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: crashMaxShine 3.6s linear infinite, crashMaxGlow 2.2s ease-in-out infinite;
}
.crash-max24 span {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.crash-max24.is-new {
  animation: crashMaxPulse 0.7s var(--ease);
}
.crash-max24-pop {
  position: absolute;
  top: 88px;
  right: 14px;
  z-index: 5;
  width: min(280px, calc(100% - 28px));
  padding: 16px 16px 14px;
  border-radius: 16px;
  border: 1px solid rgba(228, 174, 57, 0.4);
  background: #120f1c;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.crash-max24-pop.hidden { display: none; }
.crash-max24-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
}
.crash-max24-kicker {
  margin: 0 24px 4px 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c9b8ff;
}
.crash-max24-pop > b {
  display: block;
  margin-bottom: 10px;
  font-size: 28px;
  background: linear-gradient(90deg, #ffd56a, #c24dff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.crash-max24-pop dl {
  display: grid;
  gap: 8px;
  margin: 0;
}
.crash-max24-pop div {
  display: grid;
  gap: 1px;
}
.crash-max24-pop dt {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.crash-max24-pop dd {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}
@keyframes crashMaxShine {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
@keyframes crashMaxGlow {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(228, 174, 57, 0.45)); }
  50% { filter: drop-shadow(0 0 16px rgba(194, 77, 255, 0.7)); }
}
@keyframes crashMaxPulse {
  0% { transform: scale(0.96); box-shadow: 0 0 8px rgba(228, 174, 57, 0.2); }
  50% { transform: scale(1.04); box-shadow: 0 0 28px rgba(228, 174, 57, 0.55); }
  100% { transform: scale(1); }
}
.crash-boom {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(40px, 8vw, 84px);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #ff4d6a;
  text-shadow: 0 0 32px rgba(255, 77, 106, 0.55);
  background: radial-gradient(circle at 50% 40%, rgba(255, 77, 106, 0.18), transparent 55%);
  pointer-events: none;
  animation: crashPulse 0.55s var(--ease);
}
@keyframes crashPulse {
  0% { transform: scale(0.7); opacity: 0; }
  45% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.crash-bet {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 16px;
  border-radius: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.crash-tabs { display: flex; gap: 6px; }
.crash-tabs button {
  flex: 1;
  padding: 8px;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}
.crash-tabs button.active {
  background: rgba(124, 92, 255, 0.25);
  color: #fff;
}
.crash-field { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.crash-field input {
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0d0b16;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
}
.crash-skin-field { display: grid; gap: 8px; }
.crash-skin-field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.crash-skin-slot {
  min-height: 118px;
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 10px;
  border-radius: 16px;
  border: 1px dashed var(--line);
  background: #0d0b16;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
.crash-skin-slot.has-skin {
  border-style: solid;
  border-color: var(--green);
  box-shadow: 0 0 18px rgba(61, 255, 138, 0.28);
  display: grid;
  gap: 8px;
  place-items: stretch;
}
.crash-slot-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.crash-skin-slot .crash-pick {
  width: auto;
  flex: 1 1 72px;
  max-width: 108px;
  cursor: pointer;
}
.crash-skin-slot .crash-pick img { height: 48px; }
.crash-slot-sum {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}
.crash-skin-slot .hint { margin: 0; }
.crash-inv-wrap { margin: 8px 0 18px; }
.crash-inv-wrap .section-title small {
  margin-left: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.crash-skin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
}
.crash-pick {
  padding: 10px 8px 8px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--rc) 55%, var(--line));
  border-bottom: 3px solid var(--rc);
  background: linear-gradient(to top, color-mix(in srgb, var(--rc) 22%, transparent), transparent 70%), var(--card);
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.crash-pick img { width: 100%; height: 56px; object-fit: contain; }
.crash-pick b {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.crash-pick small { display: block; font-size: 10px; color: var(--muted); font-weight: 700; }
.crash-pick em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
}
.crash-pick.active {
  border-color: var(--green);
  box-shadow: 0 0 16px rgba(61, 255, 138, 0.45);
  outline: 2px solid var(--green);
}
.crash-pick.is-low { opacity: 0.55; }
.crash-inv-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 28px 16px;
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}
.crash-inv-empty-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.crash-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.crash-chips button {
  padding: 7px 10px;
  border-radius: 10px;
  background: #171425;
  color: var(--text);
  border: 1px solid var(--line);
  font-weight: 800;
  font-size: 12px;
}
.crash-auto-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.crash-auto-pills button {
  flex: 1 1 44px;
  padding: 7px 8px;
  border-radius: 999px;
  background: #171425;
  color: var(--text);
  border: 1px solid var(--line);
  font-weight: 800;
  font-size: 12px;
}
.crash-auto-pills button.active {
  background: rgba(61, 255, 138, 0.18);
  border-color: var(--green);
  color: #b6ffd0;
  box-shadow: 0 0 12px rgba(61, 255, 138, 0.28);
}
.crash-auto-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.crash-forget {
  padding: 13px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ff4d6a, #ff8a3d);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 22px rgba(255, 77, 106, 0.35);
}
.crash-forget:disabled {
  opacity: 0.45;
  box-shadow: none;
}
.crash-cta {
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #3dff8a, #b6ff3d);
  color: #06210f;
  font-size: 16px;
  font-weight: 800;
}
.crash-cta.is-cash {
  background: linear-gradient(135deg, #e4ae39, #ffd56a);
  color: #2a1c00;
}
.crash-cta.is-wait {
  background: #2a243c;
  color: var(--text);
}
.crash-live { display: grid; gap: 8px; }
.crash-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto auto 52px;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.crash-row b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crash-chip-skin {
  display: flex;
  align-items: center;
  gap: 6px;
}
.crash-chip-skin img {
  width: 42px;
  height: 32px;
  object-fit: contain;
}
.crash-chip-skin img + img {
  margin-left: -14px;
  width: 28px;
  height: 24px;
}
.crash-chip-skin small { color: var(--muted); font-weight: 700; }
.crash-win-skin {
  width: 48px;
  height: 36px;
  object-fit: contain;
  justify-self: end;
  filter: drop-shadow(0 0 8px rgba(61, 255, 138, 0.35));
}
.crash-win-empty {
  width: 48px;
  height: 8px;
  justify-self: end;
}
.crash-row.mine { border-color: var(--violet); }
.crash-row.is-win { border-color: rgba(61, 255, 138, 0.35); }
.crash-row.is-lose { opacity: 0.55; }
.crash-row em { font-style: normal; font-weight: 800; font-size: 12px; }
.crash-row em.win { color: var(--green); }
.crash-row em.lose { color: #ff4d6a; }
.crash-row em.fly { color: #6aa8ff; }
.crash-row em.wait { color: var(--gold); }

@media (max-width: 900px) {
  .aff-payout { grid-template-columns: 1fr; }
  .aff-grid, .battle-arena, .crash-layout,
  .upgrade-stage, .upgrade-action-row, .upgrade-pickers {
    grid-template-columns: minmax(0, 1fr);
  }
  .upgrade-cta { min-width: 0; width: 100%; }
  .upgrade-wheel { width: min(220px, 100%); height: auto; aspect-ratio: 1; }
  .upgrade-hero { flex-wrap: wrap; }
  .bigwin-banner { left: calc((100vw + 88px) / 2); }
  .crash-max24 { padding: 8px 10px; }
  .crash-max24 b { font-size: 20px; }
  .crash-max24-pop { top: 76px; }
}
@media (max-width: 767px) {
  .bigwin-banner { left: 50%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  body:not(.fast-anim) .roulette-track { transition-duration: 5s !important; }
  body:not(.fast-anim) .wheel-rotor { transition-duration: 2.8s !important; }
  body.fast-anim .roulette-track { transition-duration: 0.5s !important; }
  body.fast-anim .wheel-rotor { transition-duration: 0.4s !important; }
}

/* ---------- Legal / footer / FAQ accordion ---------- */
body.legal-page {
  display: block;
  overflow: auto;
  height: auto;
  min-height: 100%;
}
.legal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 8, 15, 0.92);
}
.legal-bar nav { display: flex; flex-wrap: wrap; gap: 12px 16px; }
.legal-bar a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 800;
}
.legal-bar a[aria-current="page"], .legal-bar a:hover { color: var(--text); }
.legal-wrap {
  width: min(760px, calc(100% - 32px));
  margin: 28px auto 48px;
}
.legal-wrap h1 { margin: 0 0 8px; font-size: 32px; }
.legal-wrap h2 { margin: 28px 0 10px; font-size: 18px; }
.legal-wrap p, .legal-wrap li { color: var(--muted); line-height: 1.65; }
.legal-wrap ul { padding-left: 18px; }
.legal-kicker {
  display: inline-block;
  margin: 0 0 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 77, 109, 0.16);
  color: #ff8aa8;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.08em;
}
.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  align-items: center;
  justify-content: center;
  padding: 18px 16px 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.site-footer a, .site-footer button {
  background: none;
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
}
.site-footer a:hover, .site-footer button:hover { color: var(--text); }
.faq-card summary::-webkit-details-marker { color: var(--violet); }
.faq-card details[open] summary { color: var(--text); }
.faq-card code {
  font-size: 12px;
  word-break: break-all;
  color: var(--gold);
}
