/* STREAMERDROP — тёмная фиолетовая тема под логотип */

:root {
  --bg: #0e0e10;          /* палитра Twitch: почти чёрный фон, графитовые панели */
  --bg2: #18181b;
  --panel: #1f1f23;
  --panel2: #26262c;
  --line: rgba(255, 255, 255, .07);
  --line2: rgba(255, 255, 255, .13);
  --text: #efeff1;
  --muted: #adadb8;
  --violet: #9146ff;      /* фирменный фиолетовый Twitch */
  --violet2: #bf94ff;
  --pink: #ff4fb8;        /* розовый — только как в лого, точечно */
  --green: #2fe39a;
  --red: #ff4d6d;
  --gold: #ffc53d;
  --grad: linear-gradient(135deg, #772ce8 0%, #9146ff 55%, #a970ff 100%);
  --grad-soft: linear-gradient(180deg, #e5d4ff, #bf94ff);

  --r-grey: #b0b8c6;     /* ширпотреб */
  --r-cyan: #5eb4ff;     /* промышленное */
  --r-blue: #4b69ff;     /* армейское */
  --r-purple: #8847ff;   /* запрещённое */
  --r-pink: #d32ce6;     /* засекреченное */
  --r-red: #eb4b4b;      /* тайное */
  --r-gold: #ffc21a;     /* ★ нож / перчатки */

  --rad: 14px;
  --rad-sm: 9px;
  --head-h: 72px;
  --wrap: 1360px;
  --f-head: 'Russo One', 'Rubik', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { overflow-y: scroll; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(145, 70, 255, .10), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(145, 70, 255, .05), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.45 'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-family: var(--f-head); font-weight: 400; letter-spacing: .01em; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ------------------------------------------------------------ кнопки ---- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border: 0; border-radius: 11px; cursor: pointer;
  background: var(--panel2); color: var(--text); font-weight: 600; white-space: nowrap;
  transition: transform .12s, filter .15s, background .15s, opacity .15s;
}
.btn:hover:not(:disabled) { filter: brightness(1.12); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--main { background: var(--grad); box-shadow: 0 6px 24px -8px rgba(169, 112, 255, .8); }
.btn--twitch { background: #9146ff; box-shadow: 0 6px 22px -8px rgba(145, 70, 255, .9); }
.btn--sell { background: linear-gradient(135deg, #1fbf7a, #2fe39a); color: #06231a; }
.btn--sell .pts__n { color: #06231a; }
.btn--ghost { background: transparent; border: 1px solid var(--line2); }
.btn--lg { height: 52px; padding: 0 26px; font-size: 16px; border-radius: 13px; }
.btn--xs { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn--wide { width: 100%; }
.btn .tw { display: inline-flex; }

.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--bg2); border: 1px solid var(--line); border-radius: 11px; }
.seg__b {
  border: 0; background: transparent; padding: 6px 11px; border-radius: 8px; cursor: pointer;
  color: var(--muted); font-weight: 600; font-size: 13px;
}
.seg__b:hover:not(:disabled) { color: var(--text); }
.seg__b.is-on { background: var(--panel2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line2); }
.seg__b:disabled { opacity: .4; cursor: default; }
.seg--lg .seg__b { padding: 11px 16px; font-size: 15px; }

.inp {
  width: 100%; height: 44px; padding: 0 14px; border-radius: 11px;
  background: var(--bg2); border: 1px solid var(--line2); color: var(--text); font: inherit; outline: none;
}
.inp:focus { border-color: var(--violet2); box-shadow: 0 0 0 3px rgba(145, 70, 255, .25); }
.inp--sm { height: 36px; max-width: 240px; font-size: 14px; }

.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--muted); user-select: none; }
.check input { accent-color: var(--violet); width: 17px; height: 17px; }

.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge--on { background: rgba(47, 227, 154, .14); color: var(--green); }
.badge--off { background: rgba(255, 255, 255, .06); color: var(--muted); }
.badge--wait { background: rgba(255, 197, 61, .14); color: var(--gold); }

/* баллы: монета-сундук + число */
.pts { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pts__ico { width: 1.05em; height: 1.05em; object-fit: contain; flex: none; }
.pts--xl { font-size: 24px; }
.pts--xxl { font-size: 38px; font-family: var(--f-head); font-weight: 400; }

.ava { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; background: var(--panel2); }
.ava--txt { display: inline-grid; place-items: center; background: var(--grad); font-weight: 800; color: #fff; }
.ava--xs { width: 20px; height: 20px; font-size: 11px; }
.ava--sm { width: 30px; height: 30px; font-size: 14px; }
.ava--xl { width: 88px; height: 88px; font-size: 38px; box-shadow: 0 0 0 3px var(--violet), 0 0 30px rgba(145, 70, 255, .5); }

/* ------------------------------------------------------------- шапка ---- */

.head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(24, 24, 27, .94); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
/* логотип с разделами — ровно по центру, баланс и профиль — справа */
.head__in {
  position: relative; height: 104px; padding: 0 28px;
  display: flex; align-items: center; gap: 24px;
}
.head__left { display: none; }
.head__mid { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 24px; }
.logo img { height: 52px; width: auto; filter: drop-shadow(0 0 16px rgba(169, 112, 255, .35)); }
.nav { display: flex; gap: 6px; }
.nav__a {
  display: flex; align-items: center; gap: 12px; height: 70px; padding: 0 20px 0 12px; border-radius: 18px;
  color: var(--muted); font-family: var(--f-head); font-size: 20px; letter-spacing: .01em;
  transition: color .35s ease, background-color .35s ease, box-shadow .35s ease;
}
.nav__a:hover { color: var(--text); background: rgba(145, 70, 255, .08); }
.nav__a:hover .nav__ico { transform: translateY(-3px) scale(1.06); }
.nav__a.is-on { color: #fff; background: linear-gradient(180deg, rgba(145, 70, 255, .26), rgba(145, 70, 255, .08)); box-shadow: inset 0 0 0 1px rgba(255, 122, 196, .45), inset 0 -3px 0 var(--violet), 0 8px 30px -12px rgba(145, 70, 255, .9); }
.nav__ico { width: 54px; height: 54px; object-fit: contain; flex: none; filter: saturate(.85); transition: transform .5s cubic-bezier(.22, .8, .3, 1), filter .4s ease; will-change: transform; }
.nav__a.is-on .nav__ico, .nav__a:hover .nav__ico { filter: none; }
.head__right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.caret { color: var(--muted); font-size: 11px; }
.stchip {
  display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 12px 0 8px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line2); border-radius: 13px;
}
.stchip:hover { border-color: var(--violet2); }
.stchip__txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.stchip__txt small { color: var(--muted); font-size: 11px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stchip__txt .pts { font-size: 16px; }

.drop { position: relative; }
.prefbtn {
  display: flex; align-items: center; gap: 6px; height: 56px; padding: 0 12px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line2); border-radius: 13px; color: var(--muted);
}
.prefbtn:hover { border-color: var(--violet2); color: var(--text); }
.prefbtn b { color: var(--text); font-size: 13px; }
.prefbtn__ic { display: inline-flex; }
.drop__menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 220px; padding: 8px;
  background: var(--panel); border: 1px solid var(--line2); border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .55);
  opacity: 0; pointer-events: none; transform: translateY(-6px); transition: opacity .15s, transform .15s;
}
.drop__menu.is-open { opacity: 1; pointer-events: auto; transform: none; }
.drop__cap { display: block; padding: 8px 8px 4px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.drop__list { display: grid; gap: 2px; margin-bottom: 4px; }
.drop__opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; background: none; border-radius: 9px; cursor: pointer; text-align: left; color: var(--muted); }
.drop__opt b { width: 28px; color: var(--text); }
.drop__opt:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.drop__opt.is-on { background: rgba(145, 70, 255, .18); color: var(--text); }

.user__btn {
  display: flex; align-items: center; gap: 9px; height: 56px; padding: 0 12px 0 8px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line2); border-radius: 13px;
}
.user__btn:hover { border-color: var(--violet2); }
.user__name { font-weight: 600; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.umenu { width: 250px; }
.umenu__head { display: flex; align-items: center; gap: 10px; padding: 8px 8px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.umenu__head div { display: flex; flex-direction: column; }
.umenu__a { display: block; width: 100%; text-align: left; padding: 10px; border: 0; background: none; border-radius: 9px; cursor: pointer; font-weight: 600; }
.umenu__a:hover { background: rgba(255, 255, 255, .05); }
.umenu__out { color: var(--red); }
.head .btn--twitch { height: 56px; border-radius: 14px; }

:where(.item, .scard, .mini, .uptarget, .won__it) { --c: var(--r-grey); }
[data-r="grey"] { --c: var(--r-grey); }
[data-r="cyan"] { --c: var(--r-cyan); }
[data-r="blue"] { --c: var(--r-blue); }
[data-r="purple"] { --c: var(--r-purple); }
[data-r="pink"] { --c: var(--r-pink); }
[data-r="red"] { --c: var(--r-red); }
[data-r="gold"] { --c: var(--r-gold); }

/* -------------------------------------------------------- страница ---- */

.page { max-width: var(--wrap); margin: 0 auto; padding: 26px 20px 60px; min-height: 60vh; }
.ph { font-size: 30px; margin-bottom: 18px; }
.back { display: inline-block; color: var(--muted); font-weight: 600; margin-bottom: 14px; }
.back:hover { color: var(--text); }
.empty { text-align: center; padding: 80px 20px; display: grid; justify-items: center; gap: 14px; }
.empty__img { width: 120px; opacity: .8; filter: grayscale(.4); }

/* баннер-заглушка */
.banner {
  position: relative; overflow: hidden; height: 260px; border-radius: 20px; margin-bottom: 34px;
  display: flex; align-items: center; justify-content: center; gap: 28px;
  background:
    radial-gradient(500px 220px at 20% 50%, rgba(145, 70, 255, .35), transparent 70%),
    radial-gradient(500px 220px at 85% 40%, rgba(169, 112, 255, .25), transparent 70%),
    var(--panel);
  border: 1px dashed var(--line2);
}
.banner__grid {
  position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
}
.banner__q {
  position: relative; z-index: 1; width: 130px; height: 130px; border-radius: 30px; display: grid; place-items: center;
  font: 88px/1 var(--f-head); color: #fff; background: var(--grad);
  box-shadow: 0 20px 60px -10px rgba(169, 112, 255, .8), inset 0 -6px 0 rgba(0, 0, 0, .2);
  transform: rotate(-6deg); animation: qfloat 4s ease-in-out infinite;
}
@keyframes qfloat { 50% { transform: rotate(4deg) translateY(-8px); } }
.banner__txt { position: relative; z-index: 1; display: grid; gap: 4px; }
.banner__txt b { font: 28px/1.15 var(--f-head); }
.banner__txt span { color: var(--muted); }

/* категории и карточки кейсов */
.cats { margin-bottom: 38px; }
.cats__h { display: flex; align-items: center; gap: 12px; font-size: 24px; margin: 0 0 16px; }
.cats__bar { width: 6px; height: 26px; border-radius: 3px; background: var(--grad); box-shadow: 0 0 14px rgba(169, 112, 255, .7); }
.cats--novice .cats__bar { background: linear-gradient(#2fe39a, #1fa3c9); box-shadow: 0 0 14px rgba(47, 227, 154, .6); }
.cats--sharit .cats__bar { background: linear-gradient(#ffb114, #ff6a3d); box-shadow: 0 0 14px rgba(255, 150, 40, .6); }
.cats--old .cats__bar { background: linear-gradient(#ff3b3b, #b00050); box-shadow: 0 0 14px rgba(255, 59, 59, .6); }

.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.ccard {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 12px 16px;
  border-radius: 18px; background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.ccard:hover { border-color: var(--line2); box-shadow: 0 18px 40px -18px rgba(145, 70, 255, .8); }
.ccard__name { font-family: var(--f-head); font-size: 17px; text-align: center; line-height: 1.2; }
.ccard__price { padding: 6px 12px; border-radius: 10px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); }
.ccard__ava { position: absolute; top: 12px; left: 12px; }
.ccard__ava .ava { width: 34px; height: 34px; box-shadow: 0 0 0 2px var(--violet); }

/* арт кейса: сундук + скин за ним */
.cart { position: relative; width: 100%; aspect-ratio: 1.15; display: grid; place-items: center; }
.cart__halo {
  position: absolute; inset: 12% 14%; border-radius: 50%;
  background: radial-gradient(circle, hsl(calc(270deg + var(--hue)) 100% 60% / .45), transparent 70%);
  filter: blur(10px);
}
.cart__chest {
  position: relative; width: 70%; margin: 0 14% 8% 0;
  filter: hue-rotate(var(--hue)) drop-shadow(0 10px 18px rgba(0, 0, 0, .55));
  transition: transform .3s;
}
.cart__skin {
  position: absolute; z-index: 1; right: 0; bottom: 4%; width: 60%; transform: rotate(-14deg);
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .7));
  transition: transform .3s;
}
.ccard:hover .cart__skin { transform: rotate(-8deg) translate(-4px, -8px) scale(1.06); }
.ccard:hover .cart__chest { transform: scale(1.03) rotate(-2deg); }
.cart--big { width: 300px; flex: none; }

/* ------------------------------------------------------ карточка скина ---- */

.igrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.igrid--sm { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; }
.item {
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 10px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line);
  box-shadow: inset 0 -3px 0 var(--c);
}
.item__glow { position: absolute; inset: auto 10% -40% 10%; height: 70%; background: radial-gradient(ellipse, color-mix(in srgb, var(--c) 45%, transparent), transparent 70%); pointer-events: none; }
.item__top { align-self: stretch; display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); font-weight: 600; }
.item__img { position: relative; width: 100%; aspect-ratio: 1.45; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .5)); transition: transform .2s; }
.item__name { position: relative; text-align: center; display: grid; line-height: 1.2; min-height: 32px; width: 100%; }
.item__name b { font-size: 12px; color: var(--muted); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item__name span { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item__pts { position: relative; font-size: 13px; }
.item.is-click { cursor: pointer; transition: border-color .15s, transform .15s; }
.item.is-click:hover { border-color: color-mix(in srgb, var(--c) 70%, transparent); }
.item.is-click:hover .item__img { transform: scale(1.06); }
.item.is-sel { border-color: var(--violet2); box-shadow: inset 0 -3px 0 var(--c), 0 0 0 2px var(--violet2), 0 0 24px -6px var(--violet2); }
.item.is-sel::after { content: '✓'; position: absolute; top: 6px; right: 8px; width: 20px; height: 20px; border-radius: 50%; background: var(--violet); display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.item__ch { position: absolute; top: 8px; right: 8px; font-size: 11px; font-weight: 700; color: var(--green); }
.item.is-sel .item__ch { display: none; }
.item__min { font-size: 11px; color: var(--muted); padding: 4px 6px; border-radius: 7px; background: rgba(255, 255, 255, .05); cursor: help; }
.item__acts { position: relative; display: flex; gap: 6px; margin-top: 4px; }
.item__st { position: absolute; top: 8px; right: 8px; }
.item__worth { position: relative; font-size: 11px; color: var(--muted); }
.item--big { width: 250px; padding: 16px; }
.item--big .item__name b { font-size: 13px; }
.item--big .item__name span { font-size: 15px; }
.item--big .item__pts { font-size: 15px; }
.stage--won .won { gap: 16px; }
.contents .igrid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.contents .item { padding: 12px 12px 14px; }
.contents .item__name span { font-size: 14px; }
.worth { color: var(--muted); font-size: 12px; }

/* ------------------------------------------------------------- кейс ---- */

.case { margin-bottom: 36px; }
.case__top { display: flex; align-items: center; gap: 30px; margin-bottom: 20px; }
.case__info { display: grid; gap: 10px; }
.case__cat { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: 12px; letter-spacing: .08em; }
.case__name { font-size: 44px; line-height: 1.05; }
.case__actions { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 18px; }

.stage { display: grid; gap: 10px; }
.strip {
  position: relative; height: 236px; overflow: hidden; border-radius: 16px;
  background: linear-gradient(180deg, var(--panel), var(--bg2)); border: 1px solid var(--line);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.stage--n2 .strip, .stage--n3 .strip { height: 214px; }
.stage--n5 .strip { height: 196px; }
.strip__track { position: absolute; top: 0; bottom: 0; left: 0; display: flex; gap: 8px; padding: 10px 0; will-change: transform; }
.strip.is-idle .strip__track { left: 50%; transform: translateX(-50%); }
.strip__mark {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; transform: translateX(-50%);
  background: linear-gradient(transparent, var(--pink) 20%, var(--pink) 80%, transparent);
  box-shadow: 0 0 16px var(--pink);
}
.strip__mark::before, .strip__mark::after {
  content: ''; position: absolute; left: 50%; transform: translateX(-50%); border: 9px solid transparent;
}
.strip__mark::before { top: 0; border-top-color: var(--pink); }
.strip__mark::after { bottom: 0; border-bottom-color: var(--pink); }
.scard {
  flex: none; width: 210px; height: 100%; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: linear-gradient(180deg, transparent 40%, color-mix(in srgb, var(--c) 28%, transparent)), var(--panel2);
  box-shadow: inset 0 -3px 0 var(--c);
}
.scard img { width: 92%; aspect-ratio: 1.45; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .5)); }
.scard__n { display: grid; text-align: center; line-height: 1.15; max-width: 190px; }
.scard__n b { font-size: 11px; color: var(--muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scard__n span { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scard.is-win { box-shadow: inset 0 -3px 0 var(--c), 0 0 0 2px var(--c), 0 0 30px var(--c); animation: winPop .5s ease-out; }
@keyframes winPop { 40% { transform: scale(1.08); } }

.stage--won { min-height: 176px; }
.won { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; padding: 10px 0; }
.won__it { display: grid; justify-items: center; gap: 6px; animation: wonIn .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.won__it:nth-child(2) { animation-delay: .07s; } .won__it:nth-child(3) { animation-delay: .14s; }
.won__it:nth-child(4) { animation-delay: .21s; } .won__it:nth-child(5) { animation-delay: .28s; }
@keyframes wonIn { from { transform: scale(.6) translateY(20px); opacity: 0; } }
.won .item { box-shadow: inset 0 -3px 0 var(--c), 0 0 40px -10px var(--c); }

.contents { margin-top: 10px; }

/* ----------------------------------------------------------- апгрейд ---- */

.eyebrow { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.upstage { display: grid; grid-template-columns: 1fr minmax(300px, 360px) 1fr; gap: 20px; align-items: start; margin-bottom: 22px; }
.upcol { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.upcol--mid { align-items: center; gap: 16px; }
.upcol__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 28px; }

.upslot {
  position: relative; min-height: 400px; display: flex; flex-direction: column; padding: 16px;
  background: radial-gradient(100% 80% at 50% 0%, rgba(145, 70, 255, .08), transparent 60%), linear-gradient(180deg, var(--panel2), var(--panel));
  border: 1px solid var(--line); border-radius: 18px; transition: box-shadow .3s, border-color .3s;
}
.upslot.is-won { border-color: var(--green); box-shadow: 0 0 0 1px var(--green), 0 0 60px -10px var(--green); }
.upslot.is-lost { animation: shake .5s; }
.upslot__empty {
  flex: 1; display: grid; place-content: center; justify-items: center; text-align: center; gap: 6px;
  border: 1px dashed var(--line2); border-radius: 12px; padding: 22px; color: var(--muted);
}
.upslot__empty b { font-family: var(--f-head); font-weight: 400; font-size: 16px; color: var(--text); }
.upslot__empty span { font-size: 13px; max-width: 240px; }
.upslot__coin { width: 70px; opacity: .14; margin-bottom: 10px; animation: coinfloat 4s ease-in-out infinite; }
.upslot__coin.is-flip { animation-delay: -2s; }
@keyframes coinfloat { 50% { transform: translateY(-8px) rotate(6deg); } }
.upslot__list { flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; align-content: start; max-height: 330px; overflow-y: auto; }
.upslot__list.is-tight { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
.upslot__list.is-tight .item__name { min-height: 0; }
.upslot__sum { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.upslot__sum .pts { font-size: 18px; }
.upcash-card .item__img { width: 56%; aspect-ratio: 1.45; object-fit: contain; }

.uptarget {
  flex: 1; display: grid; grid-template-rows: auto 1fr; justify-items: center; align-content: center; gap: 8px; text-align: center;
  padding: 10px; border-radius: 14px; background: radial-gradient(85% 62% at 50% 55%, color-mix(in srgb, var(--c) 26%, transparent), transparent 72%);
}
.uptarget--pick { cursor: pointer; }
.uptarget--pick:hover { background-color: rgba(255, 255, 255, .03); }
.uptarget__head { display: grid; gap: 3px; max-width: 100%; }
.uptarget__weapon { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.uptarget__name { font: 22px/1.15 var(--f-head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uptarget__wear { font-size: 12px; color: var(--muted); }
.uptarget__img { display: grid; place-items: center; width: 100%; }
.uptarget__img img { max-height: 230px; width: auto; filter: drop-shadow(0 20px 34px rgba(0, 0, 0, .72)); animation: skinin .45s ease-out; }
@keyframes skinin { from { opacity: 0; transform: translateY(12px) scale(.9); } }

.upcash { padding: 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); display: grid; gap: 10px; }
.upcash__head { display: flex; justify-content: space-between; align-items: center; }
.upcash__hint { display: none; font-size: 12px; color: var(--muted); }
.upcash.is-locked .upcash__hint { display: block; }
.upcash.is-locked .slider, .upcash.is-locked .chips { opacity: .4; pointer-events: none; }
.chip:disabled { cursor: default; }
.slider { --fill: 0%; width: 100%; height: 6px; appearance: none; -webkit-appearance: none; border-radius: 3px; outline: none; cursor: pointer;
  background: linear-gradient(90deg, var(--violet) 0 var(--fill), rgba(255, 255, 255, .08) var(--fill)); }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(145, 70, 255, .45), 0 0 14px rgba(169, 112, 255, .8); }
.slider::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(145, 70, 255, .45); }
.slider:disabled { opacity: .4; cursor: default; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { flex: 1; padding: 7px 10px; border-radius: 9px; background: var(--bg2); border: 1px solid var(--line2); cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); }
.chip:hover { color: var(--text); border-color: var(--violet2); }

.upmults { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.upmult { padding: 12px 4px; border-radius: 11px; background: var(--panel); border: 1px solid var(--line2); cursor: pointer; font-weight: 800; font-size: 15px; transition: transform .15s, border-color .15s; }
.upmult:hover { transform: translateY(-2px); border-color: var(--violet2); }
.upmult.is-on { background: rgba(145, 70, 255, .22); border-color: var(--violet2); }

.upbrand .brand__img { height: 44px; width: auto; }
.upgo-row { display: flex; gap: 10px; width: 100%; max-width: 320px; }
.upgo { flex: 1; min-width: 0; }
.sqtoggle {
  flex: none; width: 58px; display: grid; place-content: center; justify-items: center; gap: 3px; cursor: pointer;
  border-radius: 13px; background: var(--panel); border: 1px solid var(--line2); color: var(--muted);
}
.sqtoggle__ic { font-size: 16px; line-height: 1; filter: grayscale(1); opacity: .6; }
.sqtoggle__state { font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.sqtoggle.is-on { border-color: var(--violet2); color: var(--text); background: rgba(145, 70, 255, .18); }
.sqtoggle.is-on .sqtoggle__ic { filter: none; opacity: 1; }
.upnote { min-height: 18px; font-size: 13px; color: var(--red); text-align: center; }

/* колесо: шкала по ободу, стрелка-игла с ромбом и шлейфом */
.wheel { position: relative; width: 306px; height: 306px; display: grid; place-items: center; }
.wheel__halo { position: absolute; inset: -8%; border-radius: 50%; background: radial-gradient(circle, rgba(169, 112, 255, .16), transparent 62%); opacity: 0; transition: opacity .5s; }
.wheel[data-state='ready'] .wheel__halo, .wheel.is-spin .wheel__halo { opacity: 1; }
.wheel__dial { position: absolute; inset: 0; pointer-events: none; }
.wheel__svg { width: 100%; height: 100%; overflow: visible; }
.wheel__track { stroke: #2a2a31; }
.wheel__rim { stroke: #3d3d47; }
.wheel__sector { stroke: #a970ff; }
.wheel__ticks line { stroke: rgba(255, 255, 255, .35); stroke-width: 1.3; }
.wheel[data-result='win'] .wheel__sector { stroke: var(--green); }
.wheel[data-result='lose'] .wheel__sector { stroke: var(--red); }

.wheel__needle { position: absolute; inset: 0; z-index: 5; will-change: transform; transform-origin: 50% 50%; pointer-events: none; }
/* шлейф: дуга по ободу позади стрелки, видна только пока крутится */
.wheel__trail {
  position: absolute; inset: 0; border-radius: 50%; opacity: 0;
  background: conic-gradient(from 290deg, transparent 0deg, rgba(169, 112, 255, .55) 70deg, transparent 70.5deg);
  -webkit-mask: radial-gradient(circle closest-side, transparent 76%, #000 77%, #000 91%, transparent 92%);
          mask: radial-gradient(circle closest-side, transparent 76%, #000 77%, #000 91%, transparent 92%);
}
.wheel.is-spin .wheel__trail { opacity: 1; }
/* игла от обода к ядру */
.wheel__pin {
  position: absolute; top: 14px; left: 50%; width: 3px; height: 46px; margin-left: -1.5px; border-radius: 2px;
  background: linear-gradient(#fff, rgba(255, 255, 255, 0));
}
/* ромб-указатель */
.wheel__tip {
  position: absolute; top: -8px; left: 50%; width: 22px; height: 30px; margin-left: -11px;
  background: linear-gradient(180deg, #fff, #e5d4ff 60%, #9146ff);
  clip-path: polygon(50% 100%, 100% 42%, 50% 0, 0 42%);
}
.wheel.is-stop .wheel__tip { animation: tipclick .5s ease-out; }
@keyframes tipclick { 30% { transform: translateY(5px) scale(1.18); } }

.wheel__core {
  position: relative; z-index: 4; width: 186px; height: 186px; display: grid; place-content: center; justify-items: center; gap: 2px;
  border-radius: 50%; background: radial-gradient(circle at 42% 32%, #1f1f23, #0e0e10 78%);
  border: 1px solid rgba(255, 255, 255, .06); box-shadow: inset 0 0 30px rgba(0, 0, 0, .8);
}
.wheel__logo { width: 34px; height: 34px; margin-bottom: 8px; opacity: .9; }
.wheel__pct { font: 32px/1 var(--f-head); font-variant-numeric: tabular-nums; }
.wheel__mult { font-size: 12px; color: var(--muted); letter-spacing: .06em; }
.wheel[data-result='win'] .wheel__core { animation: winglow 1s ease-out; border-color: rgba(47, 227, 154, .6); }
.wheel[data-result='win'] .wheel__pct { color: var(--green); }
.wheel[data-result='lose'] .wheel__core { animation: shake .5s; border-color: rgba(255, 77, 109, .5); }
.wheel[data-result='lose'] .wheel__pct { color: var(--red); }
@keyframes winglow { 50% { box-shadow: 0 0 60px rgba(47, 227, 154, .5); transform: scale(1.05); } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.upcols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.upanel { padding: 16px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); align-self: start; }
.upanel__h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.upanel__h h3 { font-size: 18px; }
.upanel__empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 12px; padding: 40px 10px; text-align: center; }
.igrid__more { grid-column: 1 / -1; }
.stmini { display: inline-flex; align-items: center; gap: 7px; background: var(--bg2); border: 1px solid var(--line2); border-radius: 10px; padding: 5px 10px; cursor: pointer; font-weight: 600; }

/* ---------------------------------------------------------- стример ---- */

/* узкая полоса стримера под баннером */
.banner + .ststrip { margin-top: -18px; }
.ststrip {
  position: relative; display: flex; align-items: center; gap: 22px; padding: 12px 16px; margin-bottom: 30px;
  border-radius: 16px; background: linear-gradient(90deg, rgba(145, 70, 255, .18), rgba(169, 112, 255, .06) 60%, var(--panel)); border: 1px solid var(--line2);
}
.ststrip__who { display: flex; align-items: center; gap: 12px; flex: none; }
.ststrip__who:hover .ststrip__tw { color: #fff; }
.ava--md { width: 46px; height: 46px; font-size: 20px; box-shadow: 0 0 0 2px var(--violet); }
.ststrip__id { display: grid; line-height: 1.2; }
.ststrip__id b { font: 18px var(--f-head); }
.ststrip__tw { display: inline-flex; align-items: center; gap: 5px; color: var(--violet2); font-size: 13px; font-weight: 600; transition: color .15s; }
.ststrip__how { flex: 1; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.ststrip__step { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: rgba(0, 0, 0, .28); font-size: 13px; color: var(--muted); }
.ststrip__step i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 12px var(--f-head); font-style: normal; color: #fff; background: var(--grad); }
.ststrip__bal { flex: none; display: grid; justify-items: end; line-height: 1.2; }
.ststrip__bal small { color: var(--muted); font-size: 12px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 16px 16px 16px 58px; border-radius: 14px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); }
.steps li::before {
  content: counter(s); position: absolute; left: 14px; top: 14px; width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center; font-family: var(--f-head); background: var(--grad);
}
.steps--big { margin-bottom: 20px; }
.rewards { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.reward { padding: 3px 9px; border-radius: 8px; background: rgba(145, 70, 255, .25); font-weight: 700; font-size: 13px; }

/* ---------------------------------------------------- сотрудничество ---- */

.pthero {
  display: flex; align-items: center; gap: 34px; padding: 34px; border-radius: 22px; margin-bottom: 20px;
  background: radial-gradient(600px 300px at 0% 50%, rgba(145, 70, 255, .35), transparent 70%), var(--panel);
  border: 1px solid var(--line2);
}
.pthero__chest { width: 200px; flex: none; filter: drop-shadow(0 20px 40px rgba(145, 70, 255, .6)); animation: qfloat 5s ease-in-out infinite; }
.pthero h1 { font-size: 38px; margin-bottom: 12px; }
.pthero__lead { color: var(--muted); font-size: 17px; max-width: 640px; }
.pthero__btns { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 36px; }
.feat { padding: 20px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); display: grid; gap: 6px; }
.feat__n { font: 26px var(--f-head); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.feat b { font-size: 17px; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 36px; }
.plan { padding: 26px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); display: grid; gap: 12px; align-content: start; }
.plan--paid { border-color: var(--violet2); background: radial-gradient(400px 200px at 100% 0%, rgba(169, 112, 255, .2), transparent 70%), var(--panel); box-shadow: 0 20px 50px -25px rgba(169, 112, 255, .8); }
.plan__tag { justify-self: start; padding: 4px 12px; border-radius: 999px; background: rgba(145, 70, 255, .2); color: var(--violet2); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.plan__price b { font: 42px var(--f-head); }
.plan__price span { color: var(--muted); }

/* ----------------------------------------------------------- профиль ---- */

.prof { display: grid; gap: 22px; }
.prof section { padding: 20px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.prof h3 { font-size: 18px; margin-bottom: 12px; }
.prof__head { display: flex; align-items: center; gap: 20px; }
.prof__id { display: grid; gap: 4px; }
.prof__id h1 { font-size: 32px; }
.balrow { display: flex; gap: 12px; flex-wrap: wrap; }
.balcard { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line2); }
.balcard:hover { border-color: var(--violet2); }
.row { display: flex; gap: 10px; margin-bottom: 8px; }
.prof__inv .upanel__h h3 { margin: 0; }

/* ------------------------------------------------------------ модалки ---- */

.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(5, 2, 10, .7); backdrop-filter: blur(6px); animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal__box { position: relative; width: min(440px, 100%); max-height: 90vh; overflow: auto; padding: 26px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line2); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); animation: pop .2s ease-out; }
@keyframes pop { from { transform: scale(.95); opacity: 0; } }
.modal__x { position: absolute; top: 10px; right: 12px; border: 0; background: none; font-size: 28px; line-height: 1; color: var(--muted); cursor: pointer; }
.mform { display: grid; gap: 14px; text-align: center; }
.mform__logo { width: 90px; margin: 0 auto; }
.mform h3 { font-size: 22px; }
.stlist { display: grid; gap: 8px; }
.stlist__row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line2); cursor: pointer; text-align: left; }
.stlist__row:hover { border-color: var(--violet2); }
.stlist__row b { flex: 1; }

.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: grid; gap: 8px; }
.toast { max-width: 340px; padding: 12px 16px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line2); box-shadow: 0 12px 30px rgba(0, 0, 0, .5); animation: toastIn .25s ease-out; transition: opacity .4s, transform .4s; }
.toast.good { border-color: rgba(47, 227, 154, .5); }
.toast.bad { border-color: rgba(255, 77, 109, .6); }
.toast.is-out { opacity: 0; transform: translateX(20px); }
@keyframes toastIn { from { transform: translateX(30px); opacity: 0; } }

/* ------------------------------------------------------------- подвал ---- */

.foot { border-top: 1px solid var(--line); background: #18181b; }
.foot__in { max-width: var(--wrap); margin: 0 auto; padding: 28px 20px 36px; display: grid; gap: 10px; justify-items: start; }
.foot__logo .brand__img { height: 34px; width: auto; }
.foot p { max-width: 720px; font-size: 13px; }

/* ------------------------------------------------ подсветка по редкости ---- */

.item {
  border-color: color-mix(in srgb, var(--c) 38%, transparent);
  background:
    radial-gradient(90% 60% at 50% 42%, color-mix(in srgb, var(--c) 30%, transparent), transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--c) 10%, var(--panel)), var(--panel));
}
.item::before {
  content: ''; position: absolute; top: 0; left: 12%; right: 12%; height: 3px; border-radius: 0 0 3px 3px;
  background: var(--c); box-shadow: 0 0 14px var(--c);
}
.item__img { filter: drop-shadow(0 0 12px color-mix(in srgb, var(--c) 55%, transparent)) drop-shadow(0 6px 10px rgba(0, 0, 0, .5)); }
.item__rar { color: var(--c); font-weight: 700; letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item__top { gap: 6px; }
.item.is-click:hover { border-color: var(--c); box-shadow: inset 0 -3px 0 var(--c), 0 0 26px -8px var(--c); }
.scard {
  background: radial-gradient(80% 70% at 50% 45%, color-mix(in srgb, var(--c) 38%, transparent), transparent 72%), linear-gradient(180deg, transparent 40%, color-mix(in srgb, var(--c) 30%, transparent)), var(--panel2);
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
}
.scard img { filter: drop-shadow(0 0 12px color-mix(in srgb, var(--c) 60%, transparent)) drop-shadow(0 6px 10px rgba(0, 0, 0, .5)); }
.mini { border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); }
.uptarget__img img { filter: drop-shadow(0 0 22px color-mix(in srgb, var(--c) 65%, transparent)) drop-shadow(0 20px 34px rgba(0, 0, 0, .7)); }
.uptarget__weapon { color: var(--c); }

/* сайт без ссылки стримера */
.nost { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 22px; margin-bottom: 30px;
  border-radius: 18px; border: 1px dashed var(--line2); background: var(--panel); }
.nost__coin { width: 40px; opacity: .6; margin-bottom: 4px; animation: coinfloat 4s ease-in-out infinite; }
.upanel__empty .nost { margin: 0; border: 0; background: none; }
.nost__list { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.case__note { max-width: 520px; padding: 14px 18px; border-radius: 13px; background: var(--panel); border: 1px dashed var(--line2); color: var(--muted); text-align: center; }
a.stchip { color: inherit; }

/* панель владельца канала на его странице */
.owner { position: relative; margin: -12px 0 30px; padding: 18px 20px; border-radius: 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: rgba(145, 70, 255, .14); border: 1px solid var(--violet2); }
.owner.is-ok { background: rgba(47, 227, 154, .08); border-color: rgba(47, 227, 154, .5); }
.owner b { font-size: 16px; }
.owner p { max-width: 640px; margin-top: 4px; }
.balcard .pts { margin-left: 8px; }

/* переключатель скорости ленты в кейсе: ползунок едет под выбранный вариант */
.speed { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line2); }
.speed__pill {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 10px;
  background: var(--panel2); box-shadow: inset 0 0 0 1px var(--line2), 0 4px 14px -6px rgba(0, 0, 0, .6);
  transition: transform .4s cubic-bezier(.22, .8, .3, 1), background .4s ease;
}
.speed.is-fast .speed__pill { transform: translateX(100%); background: rgba(145, 70, 255, .28); box-shadow: inset 0 0 0 1px rgba(169, 112, 255, .5), 0 4px 18px -6px rgba(145, 70, 255, .8); }
.speed__b { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 7px; height: 42px; padding: 0 16px; border: 0; background: none; cursor: pointer; color: var(--muted); font-weight: 600; transition: color .3s ease; }
.speed__b.is-on { color: var(--text); }
.speed__b:disabled { cursor: default; opacity: .6; }
.speed__ic { display: inline-flex; }
.speed.is-fast .speed__b.is-on .speed__ic { color: #d6bcff; }

/* ------------------------------------------------------ кабинет стримера ---- */

.studio { display: grid; gap: 20px; }
.studio__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.studio__head h1 { font-size: 32px; }
.studio__head a { color: var(--violet2); font-weight: 600; }
.studio__stats { display: flex; gap: 26px; color: var(--muted); font-size: 13px; }
.studio__stats b { display: block; color: var(--text); font: 22px var(--f-head); }
.sbox { padding: 20px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); display: grid; gap: 14px; }
.sbox h3 { font-size: 18px; }
.sbox--row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sbox--row.is-ok { border-color: rgba(47, 227, 154, .35); }
.sbox .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sbox .row .inp { flex: 1; min-width: 220px; }
.mode { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode__b { display: grid; gap: 4px; text-align: left; padding: 14px 16px; border-radius: 12px; cursor: pointer; background: var(--bg2); border: 1px solid var(--line2); transition: border-color .3s ease, background-color .3s ease; }
.mode__b b { font-size: 15px; }
.mode__b small { color: var(--muted); }
.mode__b:hover { border-color: var(--violet2); }
.mode__b.is-on { background: rgba(145, 70, 255, .14); border-color: var(--violet); box-shadow: inset 0 0 0 1px var(--violet); }
.sgrid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.fld { display: grid; gap: 6px; }
.fld > span { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.fld a { color: var(--violet2); }
.inp--num { max-width: 140px; }
.small.ok { color: var(--green); } .small.bad { color: var(--red); }

.otable { display: grid; gap: 6px; }
.otable__h, .otable__r { display: grid; grid-template-columns: 1.3fr 1fr 1.8fr .9fr 1.1fr 1.2fr; gap: 12px; align-items: center; }
.otable__h { padding: 0 12px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.otable__r { padding: 12px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); }
.oview { display: flex; align-items: center; gap: 10px; min-width: 0; }
.oview > div { display: grid; min-width: 0; }
.oview a { color: var(--violet2); }
.otrade { display: grid; gap: 6px; justify-items: start; }
.otrade a { color: var(--violet2); font-weight: 600; }
.oskin { display: flex; align-items: center; gap: 10px; min-width: 0; }
.oskin img { width: 72px; aspect-ratio: 1.45; object-fit: contain; flex: none; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--c) 55%, transparent)); }
.oskin > div { display: grid; gap: 4px; justify-items: start; min-width: 0; }
.oskin b { font-size: 13px; line-height: 1.25; }
.osum { display: grid; gap: 2px; }
.osum b { font-size: 16px; }
.osum .pts { font-size: 12px; color: var(--muted); }
.olog { display: block; margin-top: 4px; font-size: 11px; line-height: 1.3; }
.oacts { display: flex; gap: 6px; flex-wrap: wrap; }
.badge--ok { background: rgba(47, 227, 154, .14); color: var(--green); }
.badge--bad { background: rgba(255, 77, 109, .14); color: var(--red); }
.umenu__studio { color: var(--violet2); }

@media (max-width: 1100px) {
  .otable__h { display: none; }
  .otable__r { grid-template-columns: 1fr 1fr; }
  .oskin { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .mode, .sgrid { grid-template-columns: 1fr; }
  .otable__r { grid-template-columns: 1fr; }
}

/* «Выбор цели»: поиск + стрелки листания */
.shopnav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pager { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line2); }
.pgbtn {
  width: 34px; height: 30px; border: 0; border-radius: 9px; cursor: pointer; background: var(--panel2);
  color: var(--text); font-size: 22px; line-height: 1; display: grid; place-items: center;
  transition: background-color .25s ease, transform .25s cubic-bezier(.22, .8, .3, 1);
}
.pgbtn:hover:not(:disabled) { background: var(--violet); }
.pgbtn:active:not(:disabled) { transform: scale(.92); }
.pgbtn:disabled { opacity: .35; cursor: default; }
.pglbl { min-width: 64px; text-align: center; font-size: 13px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.igrid.is-right > * { animation: pgInR .35s cubic-bezier(.22, .8, .3, 1) both; }
.igrid.is-left > * { animation: pgInL .35s cubic-bezier(.22, .8, .3, 1) both; }
@keyframes pgInR { from { opacity: 0; translate: 24px 0; } }
@keyframes pgInL { from { opacity: 0; translate: -24px 0; } }

/* сотрудничество: бесплатно, вывод, курс */
.freetag { display: inline-block; margin-bottom: 10px; padding: 5px 12px; border-radius: 999px; background: rgba(47, 227, 154, .14); color: var(--green); font-weight: 700; font-size: 13px; }
.tgi { display: inline-flex; }
.steps--4 { grid-template-columns: repeat(4, 1fr); margin-bottom: 30px; }
.plan h3 { font-size: 20px; }
.plan__list { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--muted); }
.ratebox { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding: 20px 24px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line2); margin-bottom: 36px; }
.ratebox > div { display: grid; gap: 4px; }
.ratebox__big { display: inline-flex; align-items: center; gap: 8px; font: 30px var(--f-head); }
.ratebox__big .pts { font-size: 30px; font-family: var(--f-head); font-weight: 400; }
.ratebox p { max-width: 560px; }
.ptcta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 24px; border-radius: 16px; background: rgba(145, 70, 255, .12); border: 1px solid rgba(169, 112, 255, .35); }
.ptcta p { font-size: 16px; }
@media (max-width: 980px) { .steps--4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .steps--4 { grid-template-columns: 1fr; } }

/* выпадашка стримеров в шапке: переключение — ссылками */
.stmenu { min-width: 300px; }
.stmenu__a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; transition: background-color .25s ease; }
.stmenu__a:hover { background: rgba(255, 255, 255, .05); }
.stmenu__a.is-on { background: rgba(145, 70, 255, .16); }
.stmenu__n { flex: 1; display: grid; line-height: 1.2; min-width: 0; }
.stmenu__n small { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stmenu__a .pts { font-size: 13px; }
.banner { cursor: pointer; }

/* своя картинка кейса поверх заглушки-сундука */
.cart__art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; z-index: 2; opacity: 0; transition: opacity .3s ease, transform .3s; }
.cart.has-art .cart__art { opacity: 1; }
.cart.has-art .cart__chest, .cart.has-art .cart__skin { visibility: hidden; }
.ccard:hover .cart.has-art .cart__art { transform: translateY(-6px) scale(1.04); }

/* ------------------------------------------------------------ анимации ---- */

.page, .foot { position: relative; z-index: 1; }

/* логотип: дыхание свечением + блик по буквам (маска из самого PNG) */
.brand { position: relative; display: inline-block; line-height: 0; }
.brand__img { animation: brandGlow 4s ease-in-out infinite; transition: transform .35s cubic-bezier(.2, 1.6, .4, 1); }
.logo:hover .brand__img { transform: scale(1.06) rotate(-2deg); }
.brand__shine {
  position: absolute; inset: 0; pointer-events: none;
  -webkit-mask: url(/assets/logo.png?v=4) center / 100% 100% no-repeat;
          mask: url(/assets/logo.png?v=4) center / 100% 100% no-repeat;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .95) 48%, rgba(255, 220, 255, .9) 52%, transparent 62%);
  background-size: 260% 100%; background-position: 160% 0;
  animation: shine 5s ease-in-out infinite;
}
.logo:hover .brand__shine { animation-duration: 1.4s; }
.logo:hover .brand__img, .logo:hover .brand__shine { transform: scale(1.06) rotate(-2deg); }
.brand__shine { transition: transform .35s cubic-bezier(.2, 1.6, .4, 1); }
.upbrand .brand__shine { animation-delay: 1.2s; }
@keyframes shine { 0%, 50% { background-position: 160% 0; } 80%, 100% { background-position: -70% 0; } }
@keyframes brandGlow {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(145, 70, 255, .22)); }
  50% { filter: drop-shadow(0 0 14px rgba(169, 112, 255, .45)); }
}

/* фон: плывущие ромбы и искры */
.bgfx { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bgfx__coin, .bgfx__spark { position: absolute; bottom: -60px; animation: drift linear infinite; will-change: transform; }
.bgfx__spark { aspect-ratio: 1; border-radius: 50%; background: #e5d4ff; box-shadow: 0 0 10px #a970ff, 0 0 2px #fff; }
@keyframes drift {
  from { transform: translate(0, 0) rotate(0); }
  to { transform: translate(var(--dx), -115vh) rotate(var(--rot)); }
}

/* появление блоков волной при прокрутке */
.rv { opacity: 0; }
.rv.is-in { animation: rvIn .6s cubic-bezier(.2, .9, .3, 1.1) var(--d, 0ms) both; }
@keyframes rvIn { from { opacity: 0; translate: 0 22px; scale: .97; } to { opacity: 1; translate: 0 0; scale: 1; } }

/* меню: подчёркивание выезжает, иконка подпрыгивает */
.nav__a { position: relative; }
.nav__a::after {
  content: ''; position: absolute; left: 16px; right: 16px; bottom: 6px; height: 2px; border-radius: 2px;
  background: var(--grad); transform: scaleX(0); opacity: 0; transition: transform .45s cubic-bezier(.22, .8, .3, 1), opacity .35s ease;
}
.nav__a:hover::after { transform: scaleX(1); opacity: 1; }
.nav__a.is-on::after { display: none; }

/* кнопки: бегущий блик */
.btn--main, .btn--twitch, .btn--sell { position: relative; overflow: hidden; isolation: isolate; }
.btn--main::after, .btn--twitch::after, .btn--sell::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
  transform: translateX(-120%); animation: btnShine 3.6s ease-in-out infinite;
}
.btn:disabled::after { animation: none; }
.btn--main:hover::after, .btn--twitch:hover::after, .btn--sell:hover::after { animation-duration: 1.1s; }
@keyframes btnShine { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.btn--main:not(:disabled):hover { box-shadow: 0 10px 34px -8px rgba(169, 112, 255, .95); }

/* карточка кейса: 3D-наклон за курсором, блик, покачивание сундука */
.ccard {
  transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .25s ease-out, border-color .2s, box-shadow .2s;
  overflow: hidden;
}
.ccard:hover { transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-6px); }
.ccard::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 30%), rgba(255, 255, 255, .13), transparent 60%);
}
.ccard:hover::after { opacity: 1; }
.ccard:hover .cart__chest { animation: chestBob 1.2s ease-in-out infinite; }
.ccard:hover .cart__halo { animation: haloPulse 1.2s ease-in-out infinite; }
@keyframes chestBob { 0%, 100% { transform: translateY(0) rotate(-2deg) scale(1.03); } 50% { transform: translateY(-7px) rotate(1deg) scale(1.05); } }
@keyframes haloPulse { 50% { transform: scale(1.18); opacity: .8; } }

/* большой кейс на своей странице парит */
.cart--big .cart__chest { animation: chestFloat 3.4s ease-in-out infinite; }
.cart--big .cart__skin { animation: skinFloat 3.4s ease-in-out infinite; }
.cart--big .cart__halo { animation: haloPulse 3.4s ease-in-out infinite; }
@keyframes chestFloat { 50% { transform: translateY(-10px); } }
@keyframes skinFloat { 0%, 100% { transform: rotate(-14deg); } 50% { transform: rotate(-9deg) translate(-4px, -16px); } }

/* скины в сетках приподнимаются */
.item.is-click:hover { transform: translateY(-3px); }

/* баннер: вращающийся ореол за «?» и пробегающий свет */
.banner::before {
  content: ''; position: absolute; width: 420px; height: 420px; left: calc(50% - 330px); top: 50%; margin-top: -210px; pointer-events: none;
  background: conic-gradient(from 0deg, transparent, rgba(169, 112, 255, .35), transparent 30%, rgba(169, 112, 255, .3), transparent 60%);
  border-radius: 50%; filter: blur(30px); animation: spin 12s linear infinite;
}
.banner::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 40%, rgba(255, 255, 255, .06) 50%, transparent 60%);
  background-size: 250% 100%; animation: shine 7s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* баланс в шапке: число катится, монета подпрыгивает */
.stchip.is-up .pts__n { color: var(--green); transition: color .2s; }
.stchip.is-down .pts__n { color: #ffb3c4; transition: color .2s; }
.stchip.is-up .pts__ico, .stchip.is-down .pts__ico { animation: coinPop .7s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes coinPop { 40% { transform: scale(1.5) rotate(-18deg); } }

/* выигрыш из кейса: лучи цвета редкости */
.won__it { position: relative; }
.won__it .item { position: relative; z-index: 1; }
.won__rays {
  position: absolute; inset: -40px; z-index: 0; pointer-events: none; opacity: .55;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--c) 55%, transparent) 0 8deg, transparent 8deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 20%, transparent 68%);
          mask: radial-gradient(circle, #000 20%, transparent 68%);
  animation: spin 9s linear infinite;
}
.won__it.is-good .won__rays { opacity: 1; inset: -60px; }
.won__it.is-good .item { animation: goodPulse 1.6s ease-in-out infinite; }
@keyframes goodPulse { 50% { box-shadow: inset 0 -3px 0 var(--c), 0 0 60px -6px var(--c); } }

/* апгрейд: ореол и ядро дышат во время прокрутки */
.wheel.is-spin .wheel__halo { animation: haloPulse 1s ease-in-out infinite; }
.wheel.is-spin .wheel__core { animation: coreSpin 1.2s ease-in-out infinite; }
@keyframes coreSpin { 50% { box-shadow: inset 0 0 30px rgba(0, 0, 0, .8), 0 0 40px rgba(169, 112, 255, .45); } }
.upslot.is-won .uptarget__img img { animation: wonJump .9s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes wonJump { 40% { transform: translateY(-18px) scale(1.12) rotate(-4deg); } }

/* аватар стримера: пульсирующее кольцо */
.ststrip .ava--md { animation: avaRing 2.6s ease-in-out infinite; }
@keyframes avaRing {
  50% { box-shadow: 0 0 0 3px var(--pink), 0 0 0 9px rgba(169, 112, 255, .18), 0 0 40px rgba(169, 112, 255, .6); }
}

/* салют */
.burst { position: fixed; inset: 0; z-index: 300; pointer-events: none; }
.burst__bit, .burst__coin { position: absolute; width: 9px; height: 9px; margin: -4.5px; animation: burstFly 1.35s cubic-bezier(.12, .7, .3, 1) both; }
.burst__bit { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.burst__coin { width: 20px; height: 20px; margin: -10px; }
@keyframes burstFly {
  0% { transform: translate(0, 0) scale(.3) rotate(0); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(var(--x), var(--y)) scale(1) rotate(var(--r)); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .rv { opacity: 1; }
}

/* ------------------------------------------------------------ адаптив ---- */

@media (max-width: 1900px) {
  .head__in { padding: 0 20px; }
  .head__mid { position: static; transform: none; }
  .user__name { display: none; }
}
@media (max-width: 1640px) {
  .head__in { display: grid; grid-template-columns: 1fr auto; height: auto; padding: 10px 16px; row-gap: 6px; }
  .head__mid { display: contents; }
  .logo { grid-column: 1; grid-row: 1; }
  .head__right { grid-column: 2; grid-row: 1; }
  .nav { grid-column: 1 / -1; grid-row: 2; justify-content: center; }
}
@media (max-width: 1180px) {
  .upstage { grid-template-columns: 1fr 1fr; }
  .upcol--mid { grid-column: 1 / -1; order: -1; }
}
@media (max-width: 980px) {
  .ststrip { flex-wrap: wrap; }
  .ststrip__how { order: 3; flex-basis: 100%; justify-content: flex-start; }
  .ststrip__bal { margin-left: auto; }
  .nav { justify-content: space-between; }
  .nav__a { flex: 1; justify-content: center; }
  .upcols { grid-template-columns: 1fr; }
  .steps, .feats { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .page { padding: 18px 16px 50px; }
  .logo img { height: 28px; }
  .hide-sm { display: none; }
  .head__right { gap: 6px; }
  .prefbtn { height: 42px; padding: 0 8px; }
  .prefbtn b, .prefbtn .caret { display: none; }
  .stchip { height: 42px; padding: 0 8px 0 6px; gap: 6px; }
  .stchip__txt small { display: none; }
  .stchip .caret { display: none; }
  .nav__a { flex-direction: column; gap: 2px; height: 74px; padding: 4px; font-size: 13px; }
  .user__btn .caret { display: none; }
  .head .btn--twitch { height: 42px; }
  .user__btn { padding: 0 6px; }
  .user__btn { height: 42px; }
  .btn--twitch { padding: 0 12px; }
  .banner { height: auto; padding: 30px 20px; flex-direction: column; text-align: center; gap: 18px; margin-bottom: 26px; }
  .banner__q { width: 96px; height: 96px; font-size: 64px; border-radius: 24px; }
  .banner__txt b { font-size: 21px; }
  .cgrid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .ccard { padding: 10px 8px 12px; border-radius: 14px; }
  .ccard__name { font-size: 14px; }
  .ccard__price { padding: 4px 8px; font-size: 13px; }
  .cats__h { font-size: 20px; }
  .case__top { flex-direction: column; text-align: center; gap: 8px; }
  .case__info { justify-items: center; }
  .cart--big { width: 220px; }
  .case__name { font-size: 32px; }
  .strip, .stage--n2 .strip, .stage--n3 .strip, .stage--n5 .strip { height: 176px; }
  .scard { width: 150px; }
  .contents .igrid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .nav__ico { width: 42px; height: 42px; }
  .igrid { grid-template-columns: repeat(2, 1fr); }
  .igrid--sm { grid-template-columns: repeat(2, 1fr); }
  .item--big { width: calc(50% - 8px); min-width: 150px; }
  .upstage { grid-template-columns: 1fr; }
  .wheel { width: 270px; height: 270px; }
  .wheel__core { width: 160px; height: 160px; }
  .upslot { min-height: 260px; }
  .uptarget__img img { max-height: 150px; }
  .pts--xxl { font-size: 30px; }
  .pthero { flex-direction: column; text-align: center; padding: 24px 18px; }
  .pthero__chest { width: 140px; }
  .pthero h1 { font-size: 28px; }
  .pthero__btns { justify-content: center; }
  .plans { grid-template-columns: 1fr; }
  .row { flex-direction: column; }
  .inp--sm { max-width: none; }
  .case__actions .btn--lg { width: 100%; }
}
@media (max-width: 400px) {
  .ava--xl { width: 70px; height: 70px; }
}
