@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Roboto:wght@400;500;700;900&display=swap');

:root {
    --bg-main: #0a0f0a;
    --bg-panel: #111811;
    --bg-sidebar: #081008;
    --bg-header: #081008;
    --bg-card: #141c14;
    --text-main: #9ca3af;
    --text-white: #ffffff;
    --text-muted: #6b7280;
    --border: #2a2e3b;
    --border-light: #363b4a;
    --success: #22c55e;
    --danger: #ef4444;
    
    /* Цвета редкостей */
    --rarity-common: #8c92a6;
    --rarity-rare: #3b82f6;
    --rarity-epic: #a855f7;
    --rarity-legendary: #ef4444;
    --rarity-mythic: #f59e0b;

    /* Цвета орбов/дыма (динамические, переключаются темой) */
    --orb1: #1a5a2a;
    --orb1b: #0f2a14;
    --orb2: #2a5a1a;
    --orb2b: #1a3a0f;
    --orb3: #3a7a2a;
    --orb3b: #1a3d14;
    --orb4: #1a5a3a;
    --orb4b: #0f2a1a;
    --orb5: #2a5a1a;
    --orb5b: #142a0f;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { overflow-x: hidden; }
body { font-family: 'Inter', 'Roboto', sans-serif; background-color: var(--bg-main); color: var(--text-main); position: relative; }
img, video, svg { max-width: 100%; height: auto; }

/* --- ПЛАВАЮЩИЙ ГРАДИЕНТ ФОН --- */
.ambient-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.ambient-bg::before {
    content: '';
    position: absolute;
    inset: -24%;
    z-index: 2;
    pointer-events: none;
    opacity: 0.12;
    filter: blur(32px);
    mix-blend-mode: screen;
    background:
        radial-gradient(ellipse at 18% 22%, rgba(var(--accent-rgb),0.22) 0%, rgba(var(--accent-rgb),0.09) 18%, transparent 42%),
        radial-gradient(ellipse at 72% 18%, rgba(var(--accent-rgb),0.16) 0%, rgba(var(--accent-rgb),0.06) 20%, transparent 44%),
        radial-gradient(ellipse at 45% 64%, rgba(var(--accent-rgb),0.18) 0%, rgba(var(--accent-rgb),0.055) 24%, transparent 52%),
        radial-gradient(ellipse at 86% 78%, rgba(var(--accent-rgb),0.13) 0%, rgba(var(--accent-rgb),0.045) 22%, transparent 48%);
}

/* Шары с насыщенными цветами */
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.22; animation: none; }
.orb-1 { width: 700px; height: 700px; background: radial-gradient(circle, var(--orb1) 0%, var(--orb1b) 40%, transparent 70%); top: -15%; left: -10%; }
.orb-2 { width: 600px; height: 600px; background: radial-gradient(circle, var(--orb2) 0%, var(--orb2b) 40%, transparent 70%); bottom: -15%; right: -10%; }
.orb-3 { width: 500px; height: 500px; background: radial-gradient(circle, var(--orb3) 0%, var(--orb3b) 40%, transparent 70%); top: 35%; left: 55%; opacity: 0.18; }
.orb-4 { width: 450px; height: 450px; background: radial-gradient(circle, var(--orb4) 0%, var(--orb4b) 40%, transparent 70%); top: 55%; left: 15%; opacity: 0.18; }
.orb-5 { width: 400px; height: 400px; background: radial-gradient(circle, var(--orb5) 0%, var(--orb5b) 40%, transparent 70%); top: 10%; right: 30%; opacity: 0.15; }

/* Виньетка — затемнение по краям */
.ambient-bg::after { content: ''; position: absolute; inset: 0; z-index: 5; background: radial-gradient(ellipse at center, transparent 40%, rgba(5,6,8,0.7) 100%); pointer-events: none; }

/* Мерцающие частицы */
.stars { position: absolute; inset: 0; background-image: 
    radial-gradient(1.5px 1.5px at 20px 30px, rgba(255,255,255,0.25), transparent),
    radial-gradient(1.5px 1.5px at 50px 120px, rgba(255,255,255,0.15), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.2), transparent),
    radial-gradient(1.5px 1.5px at 130px 80px, rgba(255,255,255,0.1), transparent),
    radial-gradient(1px 1px at 160px 20px, rgba(255,255,255,0.18), transparent),
    radial-gradient(1.5px 1.5px at 200px 150px, rgba(255,255,255,0.12), transparent),
    radial-gradient(1px 1px at 250px 60px, rgba(255,255,255,0.22), transparent),
    radial-gradient(1.5px 1.5px at 300px 110px, rgba(255,255,255,0.14), transparent),
    radial-gradient(1px 1px at 340px 30px, rgba(255,255,255,0.2), transparent),
    radial-gradient(1.5px 1.5px at 380px 90px, rgba(255,255,255,0.1), transparent),
    radial-gradient(1px 1px at 420px 140px, rgba(255,255,255,0.16), transparent),
    radial-gradient(1.5px 1.5px at 460px 50px, rgba(255,255,255,0.2), transparent),
    radial-gradient(1px 1px at 500px 130px, rgba(255,255,255,0.12), transparent),
    radial-gradient(1.5px 1.5px at 550px 20px, rgba(255,255,255,0.18), transparent),
    radial-gradient(1px 1px at 600px 100px, rgba(255,255,255,0.14), transparent),
    radial-gradient(1.5px 1.5px at 640px 70px, rgba(255,255,255,0.22), transparent),
    radial-gradient(1px 1px at 680px 160px, rgba(255,255,255,0.1), transparent),
    radial-gradient(1.5px 1.5px at 720px 40px, rgba(255,255,255,0.16), transparent),
    radial-gradient(1px 1px at 760px 120px, rgba(255,255,255,0.2), transparent),
    radial-gradient(1.5px 1.5px at 800px 80px, rgba(255,255,255,0.12), transparent),
    radial-gradient(1px 1px at 850px 30px, rgba(255,255,255,0.18), transparent),
    radial-gradient(1.5px 1.5px at 900px 150px, rgba(255,255,255,0.14), transparent),
    radial-gradient(1px 1px at 950px 60px, rgba(255,255,255,0.2), transparent),
    radial-gradient(1.5px 1.5px at 1000px 110px, rgba(255,255,255,0.1), transparent);
    background-size: 100% 100%; background-repeat: repeat; opacity: 0.25; animation: none; }
.stars::before,
.stars::after {
    display: none;
}

/* Лёгкая сетка */
.grid-overlay { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px); background-size: 80px 80px; pointer-events: none; }

/* Оптимизация фона: ограничиваем перерисовку */
.ambient-bg,
.ambient-bg::before,
.ambient-bg::after,
.orb,
.stars,
.grid-overlay {
    backface-visibility: hidden;
    contain: paint;
}

/* Оптимизация скролла основных контейнеров */
.content-area,
.live-items {
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

/* Изоляция карточек для меньшей перерисовки */
.case-card,
.live-item {
    contain: layout paint style;
}

/* Уважение пользовательских настроек и отключение анимаций для экономии ресурсов */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(50px, -40px) scale(1.1); }
    50% { transform: translate(-30px, 60px) scale(0.92); }
    75% { transform: translate(40px, 30px) scale(1.06); }
}

@keyframes smokeDrift {
    0% { transform: translate3d(-2%, -1%, 0) scale(1); opacity: 0.18; }
    35% { transform: translate3d(3%, 1.5%, 0) scale(1.04); opacity: 0.26; }
    70% { transform: translate3d(-1%, 3%, 0) scale(1.02); opacity: 0.22; }
    100% { transform: translate3d(2%, -2%, 0) scale(1.06); opacity: 0.28; }
}

@keyframes particleFloatSlow {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-70px, -110px, 0); }
}

@keyframes particleFloatWide {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(90px, -140px, 0) scale(1.03); }
}

@keyframes pulseOrb {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.55; }
}

@keyframes twinkle {
    0% { opacity: 0.4; }
    100% { opacity: 0.7; }
}

/* --- ГЛОБАЛЬНАЯ СЕТКА --- */
.app-layout { display: flex; height: 100vh; width: 100vw; }

/* --- ЛЕВАЯ ПАНЕЛЬ (LIVE FEED) --- */
.live-sidebar { width: 170px; background: var(--bg-sidebar); border-right: 1px solid var(--border); display: flex; flex-direction: column; z-index: 10; position: relative; }
.live-header { background: linear-gradient(180deg, #1a1d24, #13151b); padding: 12px; text-align: center; font-size: 10px; font-weight: 900; color: var(--text-white); text-transform: uppercase; border-bottom: 1px solid var(--border); letter-spacing: 0.5px; }
.live-items { flex: 1; overflow-y: auto; overflow-x: hidden; }
.live-items::-webkit-scrollbar { display: none; }
.live-items.is-loading {
    position: relative;
    overflow: hidden;
}
.live-items.is-loading > .live-item {
    display: none !important;
}
.live-items.is-loading::before {
    content: '';
    display: block;
    height: 100%;
    min-height: 520px;
    background:
        linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.06) 50%, transparent 100%) 0 0 / 220px 100% no-repeat,
        repeating-linear-gradient(
            to bottom,
            rgba(18,20,26,0.98) 0,
            rgba(18,20,26,0.98) 104px,
            rgba(10,12,18,0.98) 104px,
            rgba(10,12,18,0.98) 105px,
            rgba(14,17,24,0.98) 105px,
            rgba(14,17,24,0.98) 128px
        );
    animation: liveFeedLoadingSweep 1.25s ease-in-out infinite;
}
@keyframes liveFeedLoadingSweep {
    0% { background-position: -240px 0, 0 0; }
    100% { background-position: 240px 0, 0 0; }
}
.live-item { padding: 12px 8px; border-bottom: 1px solid var(--border); border-left: 3px solid var(--rarity-common); text-align: center; position: relative; background: #12141a; transition: transform 0.2s ease; animation: none; overflow: hidden; contain: layout paint style; }
.live-item-server { font-size: 10px; font-weight: 700; letter-spacing: 0.5px; color: #9ca3af; margin-top: 2px; opacity: 0.7; }
.live-item:hover { background: #1a1d24; cursor: pointer; transform: translateX(3px); }
.live-item-new {
    animation: liveDropReveal 0.82s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.live-item-new::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.24) 48%, rgba(255,255,255,0) 100%);
    transform: translateX(-130%);
    animation: liveDropFlash 0.82s ease forwards;
    pointer-events: none;
    z-index: 1;
}
.live-item-new .live-item-icon,
.live-item-new .item-name,
.live-item-new .item-price {
    position: relative;
    z-index: 2;
    animation: liveDropContentRise 0.72s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.live-item-new .item-name { animation-delay: 0.05s; }
.live-item-new .item-price { animation-delay: 0.1s; }
@keyframes liveDropReveal {
    0% { opacity: 0; transform: translateY(-26px) scale(0.92); filter: saturate(0.85); }
    55% { opacity: 1; transform: translateY(3px) scale(1.02); filter: saturate(1.08); }
    100% { opacity: 1; transform: translateY(0) scale(1); filter: saturate(1); }
}
@keyframes liveDropFlash {
    0% { opacity: 0; transform: translateX(-140%); }
    20% { opacity: 1; }
    100% { opacity: 0; transform: translateX(140%); }
}
@keyframes liveDropContentRise {
    0% { opacity: 0; transform: translateY(12px); }
    100% { opacity: 1; transform: translateY(0); }
}
.live-item.is-premium {
    background: linear-gradient(180deg, rgba(27,30,38,0.98), rgba(18,20,26,0.98));
    box-shadow: inset 0 0 0 1px rgba(245,158,11,0.08);
}
.live-item.is-jackpot {
    background: linear-gradient(180deg, rgba(36,22,18,0.98), rgba(19,17,22,0.98));
    box-shadow: inset 0 0 0 1px rgba(245,158,11,0.14), inset 0 0 28px rgba(239,68,68,0.08);
}
.live-item.is-premium::after,
.live-item.is-jackpot::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
}
.live-item.is-premium::after {
    background: linear-gradient(120deg, transparent 0%, rgba(245,158,11,0.12) 45%, transparent 100%);
    animation: livePremiumSweep 2.8s ease-in-out infinite;
}
.live-item.is-jackpot::after {
    background:
        radial-gradient(circle at 18% 18%, rgba(245,158,11,0.16), transparent 32%),
        radial-gradient(circle at 78% 28%, rgba(239,68,68,0.14), transparent 36%),
        linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.12) 50%, transparent 100%);
    animation: liveJackpotPulse 2.1s ease-in-out infinite;
}
.live-item.is-premium.live-item-new::after,
.live-item.is-jackpot.live-item-new::after,
.live-item.is-premium:hover::after,
.live-item.is-jackpot:hover::after {
    opacity: 1;
}
@keyframes livePremiumSweep {
    0%, 100% { transform: translateX(-115%); opacity: 0; }
    20% { opacity: 1; }
    55% { transform: translateX(115%); opacity: 0.95; }
    100% { opacity: 0; }
}
@keyframes liveJackpotPulse {
    0%, 100% { transform: scale(1); opacity: 0.45; }
    50% { transform: scale(1.035); opacity: 1; }
}
.live-item-icon {
    width: 54px;
    height: 38px;
    margin: 0 auto 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.live-item-icon-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(255,255,255,0.08)) drop-shadow(0 3px 10px rgba(0,0,0,0.35));
}
.live-item-icon-fallback {
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 5px currentColor);
}
.live-item .item-name { font-size: 10px; color: var(--text-white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: bold; }
.live-item .item-price { font-size: 9px; color: var(--accent); margin-top: 3px; }

/* Hover overlay for live items — narrow elongated preview */
.live-hover {
    position: fixed;
    width: 340px;
    min-height: 148px;
    border-radius: 0 12px 12px 0;
    overflow: hidden;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease, transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.24s ease;
    box-shadow: 10px 14px 34px rgba(0,0,0,0.48);
    transform: translateY(calc(-50% + 8px)) scale(0.96);
    transform-origin: left center;
    border: 1px solid rgba(255,255,255,0.08);
    background: #a7afc0;
}
.live-hover.is-visible {
    opacity: 1;
    transform: translateY(-50%) scale(1);
    box-shadow: 12px 18px 44px rgba(0,0,0,0.52), 0 0 0 1px rgba(255,255,255,0.04);
}
.live-hover.is-premium.is-visible {
    box-shadow: 12px 18px 44px rgba(0,0,0,0.52), 0 0 26px rgba(245,158,11,0.22), 0 0 0 1px rgba(245,158,11,0.18);
}
.live-hover.is-jackpot.is-visible {
    box-shadow: 12px 18px 44px rgba(0,0,0,0.56), 0 0 34px rgba(239,68,68,0.22), 0 0 20px rgba(245,158,11,0.18), 0 0 0 1px rgba(255,255,255,0.08);
}
.lhv-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.06) 42%, rgba(5,8,12,0.2) 100%),
        linear-gradient(90deg, var(--rarity-color, var(--rarity-common)) 0%, #b1b8c8 100%);
    z-index: 0;
}
.lhv-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10,13,18,0.02) 0%, rgba(10,13,18,0.16) 100%);
}
.lhv-bg::before {
    content: '';
    position: absolute;
    inset: -40% auto -40% -30%;
    width: 110px;
    background: linear-gradient(90deg, rgba(255,255,255,0.22), rgba(255,255,255,0));
    transform: rotate(16deg) translateX(-70px);
    opacity: 0;
}
.live-hover.is-visible .lhv-bg::before {
    opacity: 1;
    transition: transform 0.55s ease, opacity 0.3s ease;
    transform: rotate(16deg) translateX(250px);
}
.lhv-inner {
    position: relative;
    z-index: 1;
    padding: 14px 16px 16px;
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    grid-template-areas:
        'case case'
        'img name'
        'img actions';
    align-items: center;
    column-gap: 15px;
    row-gap: 10px;
}
.lhv-case,
.lhv-img,
.lhv-name,
.lhv-actions {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.22s ease, transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}
.live-hover.is-visible .lhv-case,
.live-hover.is-visible .lhv-img,
.live-hover.is-visible .lhv-name,
.live-hover.is-visible .lhv-actions {
    opacity: 1;
    transform: translateY(0);
}
.live-hover.is-visible .lhv-case { transition-delay: 0.03s; }
.live-hover.is-visible .lhv-img { transition-delay: 0.07s; }
.live-hover.is-visible .lhv-name { transition-delay: 0.1s; }
.live-hover.is-visible .lhv-actions { transition-delay: 0.14s; }
.lhv-case {
    grid-area: case;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: rgba(255,255,255,0.78);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lhv-img {
    grid-area: img;
    width: 108px;
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    justify-self: center;
}
.lhv-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.35));
}
.lhv-img .lhv-fallback {
    font-size: 42px;
    align-items: center;
    justify-content: center;
}
.lhv-name {
    grid-area: name;
    align-self: end;
    font-size: 14px;
    font-weight: 900;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0;
    line-height: 1.2;
    text-align: left;
    text-wrap: balance;
    text-shadow: 0 1px 3px rgba(0,0,0,0.28);
}
.lhv-actions {
    grid-area: actions;
    display: flex;
    gap: 8px;
    width: 100%;
    align-self: start;
}
.lhv-actions a {
    flex: 1;
    min-width: 0;
    text-align: center;
    background: rgba(58,64,79,0.92);
    color: white;
    text-decoration: none;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 10px 0;
    border-radius: 6px;
    transition: 0.18s ease;
    border: 1px solid rgba(255,255,255,0.08);
}
.lhv-actions a:only-child {
    max-width: 120px;
}
.lhv-actions a:hover {
    background: rgba(71,79,98,0.98);
    transform: translateY(-1px);
}
.lhv-q {
    position: absolute;
    top: 9px;
    right: 10px;
    width: 28px;
    height: 28px;
    background: rgba(70,76,92,0.92);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 900;
    color: white;
    z-index: 2;
    border: 1px solid rgba(255,255,255,0.1);
    cursor: help;
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.lhv-q:hover,
.lhv-q:focus-visible {
    background: rgba(88,96,116,0.96);
    transform: scale(1.08);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.08);
    outline: none;
}
.lhv-q-panel {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    padding: 22px 18px 16px;
    background: linear-gradient(180deg, rgba(12,16,22,0.88), rgba(10,13,18,0.94));
    backdrop-filter: blur(7px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.live-hover.show-meta .lhv-q-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.lhv-q-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2px;
    padding-right: 24px;
}
.lhv-q-avatar {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(34,197,94,0.34), rgba(20,83,45,0.95));
    color: white;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.3px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), 0 8px 18px rgba(0,0,0,0.2);
    flex-shrink: 0;
    overflow: hidden;
}
.lhv-q-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.lhv-q-userbox {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.lhv-q-user {
    color: white;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lhv-q-time {
    color: rgba(255,255,255,0.58);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}
.lhv-q-title {
    color: white;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    padding-right: 26px;
}
.lhv-q-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    font-size: 11px;
}
.lhv-q-row span {
    color: rgba(255,255,255,0.58);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.lhv-q-row strong {
    color: white;
    font-weight: 800;
    text-align: right;
    max-width: 128px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- ПРАВАЯ ЧАСТЬ (ШАПКА + КОНТЕНТ) --- */
.main-wrapper { flex: 1; display: flex; flex-direction: column; position: relative; }

/* --- ШАПКА --- */
.top-nav { min-height: 72px; background: var(--bg-header); border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; padding: 4px 25px; box-shadow: 0 2px 20px rgba(0,0,0,0.3); }
.nav-left { display: flex; align-items: center; gap: 28px; }
.logo { font-size: 24px; font-weight: 900; color: var(--text-white); letter-spacing: -1px; display: flex; flex-direction: column; align-items: center; text-transform: uppercase; line-height: 0.9; }
.logo-main { display: flex; align-items: baseline; justify-content: center; }
.logo-main span { color: var(--accent); margin-right: 6px; }
.logo-beta {
    display: block;
    margin-top: 4px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.8px;
    color: rgba(148, 163, 184, 0.9);
    line-height: 1;
    text-align: center;
}

.nav-links { display: flex; gap: 8px; align-items: center; }
.nav-links a { color: #8e95a5; text-decoration: none; font-size: 12px; font-weight: 700; text-transform: uppercase; display: flex; flex-direction: column; align-items: center; gap: 4px; transition: 0.2s; letter-spacing: 0.5px; }
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.nav-tile {
    width: 74px;
    min-height: 52px;
    padding: 3px 2px 2px;
    border-radius: 10px;
    position: relative;
    justify-content: center;
    gap: 4px;
    overflow: visible;
}
.nav-tile::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: transparent;
    border: 1px solid transparent;
    opacity: 1;
    transition: 0.2s;
}
.nav-tile:hover::before {
    border-color: rgba(92,104,128,0.2);
    background: rgba(255,255,255,0.015);
}
.nav-tile.active::before {
    border-color: rgba(92,104,128,0.26);
    background: rgba(255,255,255,0.02);
}
.nav-tile-icon { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; }
.nav-tile-label { position: relative; z-index: 1; color: #9ea7b8; font-size: 10px; line-height: 1; }
.nav-tile:hover .nav-tile-label, .nav-tile.active .nav-tile-label { color: #dbe5f3; text-shadow: none; }
.nav-png-icon {
    max-width: 36px;
    max-height: 36px;
    object-fit: contain;
    display: block;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.22));
    transition: 0.2s;
}
.nav-tile:hover .nav-png-icon, .nav-tile.active .nav-png-icon { transform: translateY(-1px); }
.nav-icon-svg { width: 28px; height: 28px; overflow: visible; filter: none; }
.nav-svg-fallback { display: block; }
.nav-icon-stroke {
    fill: none;
    stroke: #8c88af;
    stroke-width: 9;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.nav-icon-line {
    fill: none;
    stroke: #1eff2e;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.nav-icon-core {
    fill: none;
    stroke: #1eff2e;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.nav-icon-chest .nav-icon-stroke, .nav-icon-book .nav-icon-stroke { filter: none; }
.nav-icon-chest .nav-icon-core, .nav-icon-chest .nav-icon-line,
.nav-icon-book .nav-icon-core, .nav-icon-book .nav-icon-line { filter: drop-shadow(0 0 2px rgba(30,255,46,0.18)); }
.nav-tile:hover .nav-icon-svg, .nav-tile.active .nav-icon-svg { transform: translateY(-1px); }
.nav-icon-svg, .nav-icon-svg * { transition: 0.2s; }
.nav-tile:hover .nav-icon-stroke, .nav-tile.active .nav-icon-stroke { stroke: #9a96c1; }
.nav-tile:hover .nav-icon-core, .nav-tile.active .nav-icon-core,
.nav-tile:hover .nav-icon-line, .nav-tile.active .nav-icon-line { stroke: #24ff37; }
.online-stats {
    width: 54px;
    min-height: 58px;
    margin-left: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0;
    box-sizing: border-box;
    background: none;
    border: none;
    box-shadow: none;
    position: relative;
    cursor: default;
}
.online-stats-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
    image-rendering: auto;
    filter: drop-shadow(0 0 8px rgba(34,197,94,0.22));
}
.online-stats-value {
    color: #22c55e;
    font-weight: 900;
    font-size: 13px;
    line-height: 1;
    text-align: center;
    text-shadow: 0 0 10px rgba(34,197,94,0.35);
}
.online-stats.no-icon { justify-content: center; }
.online-stats.no-icon .online-stats-value { margin-top: 0; }
.online-hidden .online-stats { display: none !important; }
.online-stats[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    top: calc(100% + 10px);
    bottom: auto;
    transform: translate(-50%, -4px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text-white);
    font-size: 11px;
    font-weight: 800;
    padding: 7px 10px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    z-index: 35;
    box-shadow: 0 8px 20px rgba(0,0,0,0.35);
    transition: opacity 0.18s ease, transform 0.18s ease;
}
.online-stats[data-tooltip]::before {
    content: '';
    position: absolute;
    left: 50%;
    top: calc(100% + 5px);
    bottom: auto;
    width: 9px;
    height: 9px;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    border-top: 1px solid var(--border);
    transform: translateX(-50%) rotate(45deg);
    opacity: 0;
    pointer-events: none;
    z-index: 36;
    transition: opacity 0.18s ease;
}
.online-stats[data-tooltip]:hover::after,
.online-stats[data-tooltip]:hover::before {
    opacity: 1;
}
.online-stats[data-tooltip]:hover::after {
    transform: translate(-50%, 0);
}

.nav-right { display: flex; align-items: center; gap: 20px; }
.nav-socials { display: flex; align-items: center; gap: 8px; }
.nav-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.10);
    color: var(--accent);
    transition: .2s;
}
.nav-social:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    transform: translateY(-1px);
}
.nav-social svg { width: 18px; height: 18px; fill: currentColor; }
.user-name-row { display: flex; align-items: center; gap: 8px; }
.user-role-prefix {
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
    white-space: nowrap;
}
.user-role-prefix.role-admin { background: linear-gradient(135deg, #ef4444, #b91c1c); color: #fff; }
.user-role-prefix.role-moderator { background: linear-gradient(135deg, #38bdf8, #0ea5e9); color: #fff; }
.user-role-prefix.role-media_partner { background: linear-gradient(90deg, #7f1d1d, #b91c1c, #7f1d1d, #b91c1c); background-size: 200% 100%; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.85); animation: mediaShine 2.5s linear infinite; }
.user-role-prefix.role-user { background: rgba(255,255,255,0.08); color: var(--text-muted); border: 1px solid rgba(255,255,255,0.08); }
.user-profile { display: flex; align-items: center; gap: 12px; background: var(--bg-panel); padding: 6px 16px; border-radius: 8px; border: 1px solid var(--border); transition: 0.2s; cursor: pointer; }
.user-profile:hover { border-color: var(--accent); background: var(--bg-card); }
.wallet-trigger {
    width: 52px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 22, 31, 0.92);
    border: 1px solid rgba(255, 215, 0, 0.35);
    border-radius: 8px;
    cursor: pointer;
    transition: 0.18s ease;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 0 16px rgba(212,160,23,0.08);
}
.wallet-trigger:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 0 20px rgba(255,215,0,0.12);
}
.wallet-trigger svg { display: block; }
.coin-inline {
    display: inline-block;
    object-fit: contain;
    vertical-align: -0.18em;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.25));
}
.coin-inline-sm { width: 15px; height: 15px; }
.coin-inline-md { width: 18px; height: 18px; }
.coin-inline-lg { width: 24px; height: 24px; }
.user-info { display: flex; flex-direction: column; font-size: 12px; }
.user-name { color: var(--text-white); font-weight: 700; }
.user-balance { color: var(--text-main); margin-top: 2px; font-weight: 500; }
.user-balance .balance { color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }
.user-avatar { width: 38px; height: 38px; background: linear-gradient(135deg, #2a2e3b, #1a1d24); border-radius: 6px; font-size: 20px; text-align: center; line-height: 38px; border: 1px solid var(--border-light); }
.user-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; display: block; }
.user-profile-mini {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 14px 5px 5px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 9px;
    text-decoration: none;
    transition: 0.2s;
    min-width: 0;
}
.user-profile-mini:hover { border-color: var(--accent); background: var(--bg-card); box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.18); }
.user-avatar-mini { width: 38px; height: 38px; background: linear-gradient(135deg, #2a2e3b, #1a1d24); border-radius: 8px; font-size: 20px; text-align: center; line-height: 38px; border: 1px solid var(--border-light); overflow: hidden; transition: 0.2s; flex-shrink: 0; }
.user-avatar-mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.user-mini-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.user-name-mini {
    color: var(--text-white);
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 110px;
    line-height: 1.2;
}
.user-balance-mini {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1.2;
}
.user-balance-mini .coin-inline-sm { width: 14px; height: 14px; }
.btn-deposit { background: transparent; border: 1px solid var(--accent); color: var(--accent); padding: 8px 14px; border-radius: 6px; cursor: pointer; transition: 0.2s; font-weight: 700; font-size: 16px; }
.btn-deposit:hover { background: var(--accent); color: #fff; box-shadow: 0 0 15px rgba(255,107,53,0.4); }

.admin-link { color: var(--danger); text-decoration: none; font-weight: 900; font-size: 12px; text-transform: uppercase; transition: 0.2s; }
.admin-link:hover { text-shadow: 0 0 10px rgba(239,68,68,0.5); }

.role-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
    margin-left: 8px;
}
.role-badge:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,0.25); }
.role-admin { background: linear-gradient(135deg, #ef4444, #b91c1c); color: #fff; }
.role-moderator { background: linear-gradient(135deg, #38bdf8, #0ea5e9); color: #fff; }
.role-media {
    background: linear-gradient(90deg, #7f1d1d, #b91c1c, #7f1d1d, #b91c1c);
    background-size: 200% 100%;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.85);
    font-size: 12px;
    font-weight: 900;
    border: 1px solid rgba(255,255,255,0.2);
    animation: mediaShine 2.5s linear infinite;
}
@keyframes mediaShine {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}
.role-player { background: rgba(255,255,255,0.08); color: var(--text-muted); border: 1px solid rgba(255,255,255,0.08); cursor: default; }
.role-badge.role-player {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.45);
    font-weight: 900;
    border: 1px solid rgba(255,255,255,0.18);
    cursor: pointer;
}

/* --- ОСНОВНОЙ КОНТЕНТ --- */
.content-area { flex: 1; overflow-y: auto; padding: 30px 30px 0; display: flex; flex-direction: column; }
.content-area > * { flex-shrink: 0; }
.content-area::-webkit-scrollbar { width: 8px; }
.content-area::-webkit-scrollbar-track { background: var(--bg-main); }
.content-area::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.content-area::-webkit-scrollbar-thumb:hover { background: var(--border-light); }
.site-footer {
    margin-top: auto;
    margin-left: -30px;
    margin-right: -30px;
    padding: 28px 30px 34px;
    background: rgba(7, 11, 17, 0.98);
    border: none;
    border-radius: 0;
    box-shadow: none;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.site-footer-copy {
    min-width: 0;
    flex: 1 1 auto;
}
.site-footer-brand {
    color: #d8e2f2;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0.4px;
    margin-bottom: 12px;
}
.site-footer-line {
    color: #9aa7bc;
    font-size: 14px;
    line-height: 1.6;
    margin-top: 6px;
}
.site-footer-line a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}
.site-footer-line a:hover {
    text-decoration: underline;
}
.site-footer-payments {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
}
.site-footer-payments b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 25px;
    padding: 0 10px;
    border-radius: 7px;
    border: 1px solid rgba(var(--accent-rgb),0.28);
    color: var(--text-white);
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.015));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
    letter-spacing: 0.02em;
}
.site-footer-socials {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}
.site-footer-telegram {
    width: 84px;
    height: 76px;
    flex: 0 0 84px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
    border-radius: 18px;
    background: rgba(255, 107, 26, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 138, 61, 0.16);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.site-footer-telegram:hover {
    transform: translateY(-2px) scale(1.03);
    background: rgba(255, 107, 26, 0.14);
    box-shadow: inset 0 0 0 1px rgba(255, 138, 61, 0.25), 0 0 22px rgba(255, 107, 26, 0.18);
}
.site-footer-telegram img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 0 10px rgba(255,107,26,0.22));
}
.site-footer-telegram span {
    color: var(--text-white);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Баннер */
.banner-slot { width: 100%; aspect-ratio: 4 / 1; flex-shrink: 0; background: linear-gradient(180deg, rgba(10,16,23,0.98), rgba(9,14,20,0.98)); border-radius: 14px; border: none; display: flex; align-items: center; justify-content: center; margin-bottom: 35px; overflow: hidden; position: relative; box-shadow: 0 0 12px rgba(34,197,94,0.10); }
.banner-slot img, .banner-slot video { width: 100%; height: 100%; object-fit: cover; display: block; position: relative; z-index: 1; }
.banner-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--bg-panel); position: relative; z-index: 1; }
.banner-size { color: var(--text-muted); font-size: 24px; font-weight: 900; letter-spacing: 2px; text-transform: uppercase; }
.banner-carousel { position: relative; overflow: hidden; cursor: grab; }
.banner-carousel.is-dragging { cursor: grabbing; }
.banner-carousel-track { width: 100%; height: 100%; display: flex; transform: translate3d(0,0,0); transition: transform 0.62s cubic-bezier(0.16, 1, 0.3, 1); will-change: transform; }
.banner-carousel-slide { position: relative; width: 100%; min-width: 100%; height: 100%; flex: 0 0 100%; overflow: hidden; background: linear-gradient(180deg, rgba(10,16,23,0.98), rgba(9,14,20,0.98)); contain: paint; }
.banner-carousel-slide video { will-change: transform; transform: translateZ(0); }
.banner-carousel-slide video, .banner-carousel-slide img, .banner-carousel-slide .banner-placeholder { width: 100%; height: 100%; object-fit: cover; }
.banner-carousel-dots { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; gap: 8px; z-index: 5; }
.banner-carousel-dots button { width: 10px; height: 10px; border-radius: 999px; border: 0; background: rgba(255,255,255,0.32); cursor: pointer; transition: 0.2s ease; }
.banner-carousel-dots button.is-active { width: 24px; background: var(--accent); box-shadow: 0 0 10px rgba(var(--accent-rgb),0.45); }

/* Заголовки */
.section-title { text-align: center; color: var(--text-white); font-size: 16px; text-transform: uppercase; font-weight: 900; margin-bottom: 35px; letter-spacing: 2px; position: relative; }
.section-title::after { content: ''; display: block; width: 250px; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); margin: 12px auto 0; }

/* Поиск кейсов */
.case-search-shell { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 30px; flex-wrap: wrap; }
.case-search-label { color: #aeb8ca; font-size: 15px; font-weight: 700; }
.case-search { display: flex; justify-content: center; }
.case-search input { width: 100%; min-width: 280px; max-width: 420px; background: #111722; border: 1px solid #1d2431; border-radius: 0; padding: 13px 16px; font-size: 15px; color: var(--text-white); outline: none; transition: 0.2s; box-shadow: inset 0 1px 0 rgba(255,255,255,0.03); }
.case-search input:focus { border-color: var(--accent); box-shadow: 0 4px 25px rgba(255,107,53,0.2); }
.case-search input::placeholder { color: var(--text-muted); }
.fav-only-toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.fav-only-toggle input { display: none; }
.fav-only-slider { width: 38px; height: 22px; border-radius: 999px; background: #4b5563; position: relative; transition: 0.2s; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08); }
.fav-only-slider::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: white; transition: 0.2s; box-shadow: 0 2px 8px rgba(0,0,0,0.35); }
.fav-only-toggle input:checked + .fav-only-slider { background: var(--accent); }
.fav-only-toggle input:checked + .fav-only-slider::after { transform: translateX(16px); }
.fav-only-text { color: #c2cad8; font-size: 15px; font-weight: 600; }

/* --- КЕЙСЫ --- */
.cases-grid { display: flex; flex-wrap: wrap; gap: 25px; justify-content: center; padding: 10px; }
.case-card { width: 260px; min-height: 358px; background: var(--bg-card); border-radius: 12px; display: flex; flex-direction: column; align-items: center; position: relative; text-decoration: none; transition: transform 0.24s ease; border: 1px solid var(--border); padding: 22px; overflow: hidden; contain: layout paint style; }
.case-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--rarity-epic), var(--accent)); opacity: 0; transition: 0.3s; }
.case-card:hover { transform: translateY(-6px); border-color: var(--border-light); box-shadow: 0 8px 16px rgba(0,0,0,0.22); }
.case-card:hover::before { opacity: 1; }
.case-title { color: var(--text-white); font-size: 15px; font-weight: 900; text-transform: uppercase; margin-bottom: 6px; text-align: center; min-height: 19px; display: flex; align-items: center; justify-content: center; line-height: 1.15; }
.case-items-count { font-size: 11px; color: var(--text-muted); margin-bottom: 14px; min-height: 18px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.case-badge { background: var(--danger); color: white; padding: 2px 6px; border-radius: 3px; font-size: 9px; font-weight: 900; }
.case-img-box { position: relative; width: 100%; height: 218px; display: flex; justify-content: center; align-items: center; margin-bottom: 8px; flex: 0 0 218px; }
.case-card-image { width: 100%; height: 100%; object-fit: contain; object-position: center 48%; transform: translateY(-4px) scale(1.34); transform-origin: center center; filter: drop-shadow(0 0 6px rgba(255,255,255,0.08)) drop-shadow(0 0 12px rgba(34,197,94,0.12)); transition: transform 0.24s ease, filter 0.24s ease; will-change: transform; }
.case-card-image-large { object-position: center 47%; transform: translateY(-6px) scale(1.70); }
.case-card-image-spooky { object-position: center 47%; transform: translateY(-7px) scale(1.78); }
.case-card-image-fundon { object-position: center 47%; transform: translateY(-4px) scale(1.62); }
.case-img-box > div:first-child { font-size: 90px; filter: drop-shadow(0 0 12px rgba(255,107,53,0.10)); transition: transform 0.24s ease, filter 0.24s ease; }
.case-card:hover .case-img-box > div:first-child { filter: drop-shadow(0 0 18px rgba(255,107,53,0.18)); transform: scale(1.04); }
.case-card:hover .case-card-image { transform: translateY(-6px) scale(1.39); filter: drop-shadow(0 0 8px rgba(255,255,255,0.10)) drop-shadow(0 0 16px rgba(34,197,94,0.18)); }
.case-card:hover .case-card-image-large { transform: translateY(-8px) scale(1.76); }
.case-card:hover .case-card-image-spooky { transform: translateY(-9px) scale(1.84); }
.case-card:hover .case-card-image-fundon { transform: translateY(-6px) scale(1.70); }
.case-price { position: absolute; left: auto; bottom: 0; right: 28px; transform: none; min-width: 116px; max-width: calc(100% - 20px); display: inline-flex; align-items: center; justify-content: center; gap: 4px; text-align: center; white-space: nowrap; background: var(--bg-panel); border: 1px solid var(--accent); color: var(--accent); padding: 6px 14px; font-size: 14px; line-height: 1; font-weight: 900; border-radius: 6px; box-shadow: 0 4px 15px rgba(0,0,0,0.4); }
.case-btn { margin-top: 20px; background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
 border: none; color: white; padding: 12px 35px; font-size: 13px; font-weight: 900; border-radius: 6px; cursor: pointer; text-transform: uppercase; width: 100%; transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease; box-shadow: 0 3px 10px rgba(var(--accent-rgb),0.18); }
.case-btn:hover { filter: brightness(1.15); transform: translateY(-2px); }

/* --- СТРАНИЦА КЕЙСА --- */
.case-page { max-width: 1000px; margin: 0 auto; }
.case-page-header { text-align: center; margin-bottom: 30px; }
.case-page-title { color: var(--text-white); font-size: 32px; font-weight: 900; text-transform: uppercase; margin-bottom: 10px; }
.case-page-subtitle { color: var(--text-muted); font-size: 14px; }

.roulette-section { width: min(100%, 1520px); margin: 8px auto 22px; text-align: center; background: rgba(13,17,24,0.72); border: 1px solid rgba(255,255,255,0.08); border-radius: 18px; padding: 18px 14px 12px; box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 24px 60px rgba(0,0,0,0.22); }
.roulette-container { display: grid; grid-template-columns: 1fr; gap: 18px; margin-bottom: 16px; min-height: 208px; }
.roulette-container.is-multi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.roulette-window { position: relative; height: 208px; background: rgba(12,16,22,0.86); border-radius: 14px; overflow: hidden; border: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03); }
.roulette-window::before, .roulette-window::after { content: ''; position: absolute; top: 0; bottom: 0; width: 60px; z-index: 2; pointer-events: none; }
.roulette-window::before { left: 0; background: linear-gradient(90deg, rgba(12,16,22,0.98), rgba(12,16,22,0)); }
.roulette-window::after { right: 0; background: linear-gradient(-90deg, rgba(12,16,22,0.98), rgba(12,16,22,0)); }
.roulette-center { position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; background: var(--accent); transform: translateX(-50%); z-index: 3; box-shadow: 0 0 8px var(--accent); transition: box-shadow 0.35s ease, filter 0.35s ease; }
.roulette-window.is-winner .roulette-center { box-shadow: 0 0 14px var(--accent), 0 0 28px var(--accent); filter: brightness(1.25); }
.roulette-track { display: flex; gap: 16px; position: absolute; left: 0; }
.roulette-item { width: 168px; min-width: 168px; height: 184px; background: rgba(20,24,33,0.92); border: 2px solid var(--border); border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; flex-shrink: 0; transition: 0.2s; padding-top: 12px; position: relative; }
.roulette-item.is-winner { transform: scale(1.04); z-index: 4; filter: brightness(1.12); transition: transform 0.35s ease, filter 0.35s ease; }
.roulette-item .item-icon { width: 118px; height: 102px; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.roulette-item .item-icon img { max-width: 100%; max-height: 100%; object-fit: contain; }
.roulette-item .item-name { font-size: 12px; color: var(--text-white); font-weight: 800; text-align: center; padding: 0 10px; margin-top: auto; margin-bottom: 4px; line-height: 1.2; }
.roulette-item .item-price { font-size: 11px; color: var(--accent); font-weight: 800; margin-bottom: 10px; }
.roulette-container.is-multi-grid .roulette-window { height: 176px; }
.roulette-container.is-multi-grid .roulette-item { width: 138px; min-width: 138px; height: 156px; padding-top: 10px; }
.roulette-container.is-multi-grid .roulette-item .item-icon { width: 94px; height: 82px; margin-bottom: 6px; }
.roulette-container.is-multi-grid .roulette-item .item-name { font-size: 11px; padding: 0 8px; }
.roulette-container.is-multi-grid .roulette-item .item-price { font-size: 10px; margin-bottom: 8px; }

@media (min-width: 1101px) {
    .roulette-container.is-multi-grid .roulette-window:last-child:nth-child(odd),
    .roulette-container.is-many-grid .roulette-window:last-child:nth-child(odd) {
        grid-column: 1 / -1;
        justify-self: center;
        width: 100%;
    }
}

/* Редкости для рулетки */
.roulette-item.rarity-common { border-color: var(--rarity-common); }
.roulette-item.rarity-common .item-icon { color: var(--rarity-common); }
.roulette-item.rarity-rare { border-color: var(--rarity-rare); box-shadow: 0 0 12px rgba(0,191,255,0.3); }
.roulette-item.rarity-rare .item-icon { color: var(--rarity-rare); }
.roulette-item.rarity-epic { border-color: var(--rarity-epic); box-shadow: 0 0 16px rgba(163,53,238,0.4); }
.roulette-item.rarity-epic .item-icon { color: var(--rarity-epic); }
.roulette-item.rarity-legendary { border-color: var(--rarity-legendary); box-shadow: 0 0 20px rgba(255,140,0,0.5); }
.roulette-item.rarity-legendary .item-icon { color: var(--rarity-legendary); }
.roulette-item.rarity-mythic { border-color: var(--rarity-mythic); box-shadow: 0 0 24px rgba(255,0,110,0.6), inset 0 0 20px rgba(255,0,110,0.1); }
.roulette-item.rarity-mythic .item-icon { color: var(--rarity-mythic); animation: mythic-pulse 2s infinite; }

@keyframes mythic-pulse {
    0%, 100% { filter: drop-shadow(0 0 8px var(--rarity-mythic)) drop-shadow(0 0 16px var(--rarity-mythic)); }
    50% { filter: drop-shadow(0 0 16px var(--rarity-mythic)) drop-shadow(0 0 32px var(--rarity-mythic)); }
}
.roulette-placeholder { height: 208px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-muted); font-size: 14px; }
.roulette-result { font-size: 18px; color: var(--text-white); font-weight: 800; margin: 12px 0; min-height: 28px; }
.roulette-result.win { color: var(--success); }
.roulette-result.error { color: var(--danger); }

.controls-row { display: flex; flex-direction: column; align-items: center; gap: 15px; margin-top: 15px; }
.speed-selector { display: flex; gap: 8px; align-items: center; color: var(--text-muted); font-size: 12px; font-weight: 700; }
.speed-btn { background: var(--bg-panel); border: 1px solid var(--border); color: var(--text-main); padding: 6px 12px; border-radius: 5px; cursor: pointer; font-weight: 700; font-size: 12px; transition: 0.2s; }
.speed-btn.active { background: var(--accent); border-color: var(--accent); color: white; }
.speed-btn:hover { border-color: var(--accent); }

.bulk-buttons { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.bulk-btn { background: linear-gradient(180deg, var(--accent) 0%, #e55a2b 100%); border: none; color: white; padding: 8px 14px; font-size: 13px; font-weight: 900; border-radius: 6px; cursor: pointer; text-transform: uppercase; transition: 0.2s; box-shadow: 0 3px 10px rgba(255,107,53,0.25); min-width: 65px; line-height: 1.3; }
.bulk-btn:hover { filter: brightness(1.15); transform: translateY(-2px); }
.bulk-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; filter: none; }
.bulk-btn small { font-size: 10px; font-weight: 700; opacity: 0.9; }
.bulk-summary { display: flex; gap: 12px; justify-content: center; margin-bottom: 12px; flex-wrap: wrap; }
.drop-sell-card {
    min-width: 150px;
    max-width: 220px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(var(--accent-rgb),0.34);
    background: linear-gradient(180deg, rgba(18,24,33,0.92), rgba(10,14,20,0.92));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 24px rgba(0,0,0,0.22);
    text-align: center;
}
.drop-sell-name {
    color: var(--text-white);
    font-size: 12px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 5px;
}
.drop-sell-price {
    color: var(--accent);
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 8px;
}
.drop-sell-btn {
    width: 100%;
    min-height: 30px;
    border: 1px solid rgba(var(--accent-rgb),0.65);
    border-radius: 7px;
    color: #fff;
    background: linear-gradient(180deg, var(--accent), var(--accent-dark));
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(var(--accent-rgb),0.22);
    transition: transform .18s ease, filter .18s ease;
}
.drop-sell-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn-sell { background: linear-gradient(180deg, var(--danger) 0%, #cc3333 100%); border: none; color: white; padding: 12px 25px; font-size: 13px; font-weight: 900; border-radius: 6px; cursor: pointer; text-transform: uppercase; transition: 0.2s; box-shadow: 0 4px 15px rgba(239,68,68,0.3); }
.btn-sell:hover { filter: brightness(1.15); transform: translateY(-2px); }
.btn-again { background: linear-gradient(180deg, var(--accent) 0%, #e55a2b 100%); border: none; color: white; padding: 12px 25px; font-size: 13px; font-weight: 900; border-radius: 6px; cursor: pointer; text-transform: uppercase; transition: 0.2s; box-shadow: 0 4px 15px rgba(255,107,53,0.3); }
.btn-again:hover { filter: brightness(1.15); transform: translateY(-2px); }

@media (min-width: 900px) {
    .roulette-container { grid-template-columns: repeat(auto-fit, minmax(560px, 1fr)); }
}

@media (max-width: 1100px) {
    .roulette-container.is-multi-grid { grid-template-columns: 1fr; }
}

.items-grid { display: flex; flex-wrap: wrap; gap: 15px; justify-content: center; }
.item-card { width: 160px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 15px; text-align: center; transition: 0.2s; border-bottom: 4px solid var(--rarity-common); }
.item-card:hover { transform: translateY(-3px); border-color: var(--border-light); }
.item-card .item-icon { font-size: 40px; margin-bottom: 8px; }
.item-card .item-name { color: var(--text-white); font-size: 13px; font-weight: 700; margin-bottom: 5px; }
.item-card .item-price { color: var(--accent); font-size: 13px; font-weight: 700; margin-bottom: 3px; }
.item-card .item-chance { color: var(--text-muted); font-size: 11px; }
.item-card.rarity-common { border-bottom-color: var(--rarity-common); }
.item-card.rarity-rare { border-bottom-color: var(--rarity-rare); }
.item-card.rarity-epic { border-bottom-color: var(--rarity-epic); }
.item-card.rarity-legendary { border-bottom-color: var(--rarity-legendary); }
.item-card.rarity-mythic { border-bottom-color: var(--rarity-mythic); }

/* --- ПРОФИЛЬ --- */
.profile-header { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; margin-bottom: 40px; }
.profile-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 25px; position: relative; }
.p-avatar-block { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.p-avatar-block .user-avatar { width: 85px; height: 85px; font-size: 42px; line-height: 85px; margin-bottom: 12px; border: 2px solid var(--accent); }
.p-balance-big { font-size: 28px; color: var(--text-white); font-weight: 900; margin: 12px 0; }
.p-btn { background: var(--bg-panel); border: 1px solid var(--border); color: var(--text-white); padding: 10px 18px; cursor: pointer; border-radius: 6px; font-weight: 700; transition: 0.2s; }
.p-btn:hover { border-color: var(--border-light); background: var(--bg-header); }
.p-btn-orange { background: linear-gradient(180deg, var(--accent) 0%, #e55a2b 100%); border: none; color: #fff; padding: 10px 25px; cursor: pointer; font-weight: 900; border-radius: 6px; transition: 0.2s; box-shadow: 0 4px 15px rgba(255,107,53,0.3); }
.p-btn-orange:hover { filter: brightness(1.15); transform: translateY(-2px); }
.chat-send-btn { background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%); border: none; color: #fff; padding: 10px 25px; cursor: pointer; font-weight: 900; border-radius: 6px; transition: 0.2s; box-shadow: 0 4px 15px rgba(var(--accent-rgb), 0.35); }
.chat-send-btn:hover { filter: brightness(1.15); transform: translateY(-2px); }

.input-field { flex: 1; background: var(--bg-panel); border: 1px solid var(--border); color: var(--text-white); padding: 12px; border-radius: 6px; font-size: 13px; outline: none; transition: 0.2s; }
.input-field:focus { border-color: var(--accent); }
.input-field:disabled { opacity: 0.6; cursor: not-allowed; }
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

.inventory-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.inv-item { background: var(--bg-card); width: 150px; height: 185px; border: 1px solid var(--border); border-radius: 8px; border-bottom: 4px solid var(--rarity-common); position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 15px 10px 40px; transition: 0.2s; }
.inv-item:hover { transform: translateY(-3px); border-color: var(--border-light); }
.inv-price { position: absolute; top: 12px; left: 12px; font-size: 12px; color: var(--text-white); font-weight: 900; }
.inv-icon { font-size: 55px; margin-bottom: 5px; }
.inv-name { font-size: 12px; text-align: center; padding: 0 10px; margin-bottom: 5px; color: var(--text-white); font-weight: 700; }
.inv-lock { position: absolute; bottom: 8px; right: 8px; font-size: 11px; color: var(--text-muted); }
.sell-btn { position: absolute; bottom: 8px; left: 8px; right: 8px; background: var(--danger); border: none; color: white; padding: 6px; font-size: 11px; font-weight: 900; border-radius: 4px; cursor: pointer; opacity: 0; transition: 0.2s; text-transform: uppercase; }
.inv-item:hover .sell-btn { opacity: 1; }
.sell-btn:hover { background: #ff3333; }
.sell-all-btn { background: linear-gradient(180deg, var(--danger) 0%, #cc3333 100%); border: none; color: white; padding: 10px 20px; font-size: 13px; font-weight: 900; border-radius: 6px; cursor: pointer; text-transform: uppercase; transition: 0.2s; box-shadow: 0 4px 15px rgba(239,68,68,0.3); }
.sell-all-btn:hover { filter: brightness(1.15); transform: translateY(-2px); }

/* --- АДМИН --- */
.admin-page { max-width: 1200px; margin: 0 auto; }
.admin-title { color: var(--text-white); font-size: 28px; font-weight: 900; text-transform: uppercase; margin-bottom: 25px; text-align: center; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 30px; }
.admin-stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 20px; text-align: center; }
.admin-stat-value { font-size: 28px; font-weight: 900; color: var(--accent); }
.admin-stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; margin-top: 5px; }
.admin-table { width: 100%; border-collapse: separate; border-spacing: 0 8px; }
.admin-table th { color: var(--text-muted); font-size: 12px; text-transform: uppercase; text-align: left; padding: 12px 15px; font-weight: 700; }
.admin-table td { background: var(--bg-card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 15px; font-size: 14px; color: var(--text-main); }
.admin-table tr td:first-child { border-left: 1px solid var(--border); border-radius: 8px 0 0 8px; }
.admin-table tr td:last-child { border-right: 1px solid var(--border); border-radius: 0 8px 8px 0; }
.admin-table tr:hover td { background: var(--bg-panel); }
.admin-username { color: var(--text-white); font-weight: 700; }
.admin-withdraw-item-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.admin-withdraw-item-img { width: 38px; height: 38px; object-fit: contain; display: block; flex: 0 0 38px; filter: drop-shadow(0 0 8px rgba(255,255,255,0.08)); }
.admin-withdraw-item-fallback { width: 38px; height: 38px; flex: 0 0 38px; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.admin-status { font-weight: 700; font-size: 12px; }
.admin-status.banned { color: var(--danger); }
.admin-status.active { color: var(--success); }
.admin-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
#admin-withdrawals-table th:last-child,
#admin-withdrawals-table td:last-child,
#mod-withdrawals-table th:last-child,
#mod-withdrawals-table td:last-child { min-width: 300px; }
#users-table th:last-child,
#users-table td:last-child { width: 200px; min-width: 200px; }
.admin-notice { margin-bottom: 18px; padding: 14px 16px; border: 1px solid rgba(34,197,94,0.35); background: rgba(34,197,94,0.08); border-radius: 10px; color: var(--text-white); font-weight: 700; }
.admin-tools-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 34px; }
.admin-tool-card { background: linear-gradient(180deg, rgba(20,28,20,0.96), rgba(10,15,10,0.96)); border: none; border-radius: 14px; padding: 20px; box-shadow: 0 20px 40px rgba(0,0,0,0.18); }
.admin-tool-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.admin-tool-title { color: var(--text-white); font-size: 18px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.5px; }
.admin-tool-subtitle { margin-top: 7px; color: var(--text-muted); font-size: 13px; line-height: 1.45; }
.admin-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 98px; padding: 8px 12px; border-radius: 999px; font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.7px; }
.admin-pill.is-on { background: rgba(239,68,68,0.14); border: 1px solid rgba(239,68,68,0.35); color: #fca5a5; }
.admin-pill.is-off { background: rgba(34,197,94,0.14); border: 1px solid rgba(34,197,94,0.35); color: #86efac; }
.admin-inline-form { display: flex; gap: 10px; align-items: center; }
.admin-grant-form { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) 90px 140px; gap: 12px; align-items: center; }
.btn-small { background: var(--bg-panel); color: var(--text-white); border: 1px solid var(--border); padding: 8px 14px; border-radius: 5px; cursor: pointer; font-weight: 700; font-size: 12px; transition: 0.2s; }
.btn-small:hover { background: var(--bg-header); border-color: var(--border-light); }
.btn-small.ban { border-color: var(--danger); color: var(--danger); }
.btn-small.ban:hover { background: var(--danger); color: #fff; }
.btn-small.give { border-color: var(--accent); color: var(--accent); }
.btn-small.give:hover { background: var(--accent); color: #fff; }
.btn-small.danger { border-color: var(--danger); color: var(--danger); }
.btn-small.danger:hover { background: var(--danger); color: #fff; }

/* Общие кнопки */
.btn-primary { background: linear-gradient(180deg, var(--accent) 0%, #e55a2b 100%); border: none; color: white; padding: 18px 50px; font-size: 18px; font-weight: 900; border-radius: 8px; cursor: pointer; text-transform: uppercase; box-shadow: 0 8px 25px rgba(255,107,53,0.35); transition: 0.2s; width: 100%; }
.btn-primary:hover { filter: brightness(1.15); transform: translateY(-2px); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; filter: none; }

/* --- АВТОРИЗАЦИЯ --- */
.auth-page { display: flex; justify-content: center; align-items: center; min-height: 60vh; }
.auth-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 40px; width: 100%; max-width: 400px; }
.auth-card h1 { color: var(--text-white); text-align: center; margin-bottom: 25px; font-size: 24px; text-transform: uppercase; font-weight: 900; }
.auth-card form { display: flex; flex-direction: column; gap: 15px; }
.auth-card p { text-align: center; margin-top: 20px; color: var(--text-muted); font-size: 13px; }
.auth-card a { color: var(--accent); text-decoration: none; font-weight: 700; }
.auth-card a:hover { text-decoration: underline; }
.auth-error { background: rgba(239,68,68,0.1); border: 1px solid var(--danger); color: var(--danger); padding: 12px; border-radius: 6px; font-size: 13px; margin-bottom: 15px; text-align: center; }

/* --- ТЕХРАБОТЫ --- */
.maintenance-body { min-height: 100vh; overflow: auto; }
.maintenance-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.maintenance-card { width: min(680px, 100%); padding: 38px; border-radius: 24px; border: 1px solid rgba(34,197,94,0.18); background: linear-gradient(180deg, rgba(13,20,13,0.96), rgba(8,12,8,0.94)); box-shadow: 0 30px 80px rgba(0,0,0,0.45); text-align: center; position: relative; overflow: hidden; }
.maintenance-card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at top, rgba(34,197,94,0.14), transparent 55%); pointer-events: none; }
.maintenance-badge { position: relative; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 18px; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(34,197,94,0.22); background: rgba(34,197,94,0.08); color: #bbf7d0; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: 1.2px; }
.maintenance-hero-img { position: relative; display: block; width: min(220px, 72vw); max-height: 180px; object-fit: contain; margin: 0 auto 18px; filter: drop-shadow(0 18px 34px rgba(34,197,94,0.18)); }
.maintenance-card h1 { position: relative; color: var(--text-white); font-size: 36px; font-weight: 900; text-transform: uppercase; margin-bottom: 14px; }
.maintenance-card p { position: relative; color: #d1d5db; font-size: 16px; line-height: 1.7; max-width: 520px; margin: 0 auto; }
.maintenance-status-row { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 28px 0 24px; }
.maintenance-status-box { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 68px; padding: 16px; border-radius: 16px; border: 1px solid rgba(34,197,94,0.14); background: rgba(17,24,17,0.9); color: var(--text-white); font-size: 14px; }
.maintenance-status-box.muted { color: var(--text-main); }
.maintenance-status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 18px rgba(34,197,94,0.8); animation: pulse 1.5s infinite; }
.maintenance-actions { position: relative; display: flex; justify-content: center; }
.maintenance-btn { max-width: 260px; }

/* Анимации */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.pulse { animation: pulse 2s infinite; }

/* --- АПГРЕЙД --- */
.upgrade-page { max-width: 1280px; margin: 0 auto; padding: 0px 20px 26px; }
.upgrade-title { text-align: center; color: var(--text-white); font-size: 24px; font-weight: 900; text-transform: uppercase; margin: 0 0 24px; letter-spacing: 1px; transform: translateY(-16px); }
.upgrade-icons { display: flex; gap: 12px; margin-bottom: 6px; padding-left: 0; transform: translateY(-8px); }
.upgrade-icon { position: relative; width: 36px; height: 36px; border-radius: 50%; background: var(--bg-panel); border: 1px solid rgba(var(--accent-rgb), 0.35); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.2s; color: var(--text-muted); font-size: 16px; }
.upgrade-icon:hover { border-color: var(--accent); color: var(--accent); }
.upgrade-icon.theme-img { background-size: contain; background-repeat: no-repeat; background-position: center; color: transparent; border: none; }
.upgrade-icon.theme-img:hover { filter: brightness(1.2); }
.upgrade-toolbar-img { width: 32px; height: 32px; object-fit: contain; pointer-events: none; filter: drop-shadow(0 0 5px rgba(var(--accent-rgb),0.45)); }
.upgrade-icon::after { content: attr(data-tooltip); position: absolute; left: 50%; top: calc(100% + 10px); transform: translateX(-50%) translateY(-4px); min-width: max-content; max-width: 220px; padding: 8px 10px; border-radius: 8px; background: rgba(12,18,15,0.96); border: 1px solid rgba(var(--accent-rgb),0.24); color: #e7f8ec; font-size: 11px; font-weight: 700; line-height: 1.35; white-space: nowrap; opacity: 0; pointer-events: none; box-shadow: 0 10px 30px rgba(0,0,0,0.35); transition: opacity 0.18s ease, transform 0.18s ease; z-index: 50; }
.upgrade-icon::before { content: ''; position: absolute; left: 50%; top: calc(100% + 5px); width: 10px; height: 10px; background: rgba(12,18,15,0.96); border-left: 1px solid rgba(var(--accent-rgb),0.24); border-top: 1px solid rgba(var(--accent-rgb),0.24); transform: translateX(-50%) rotate(45deg); opacity: 0; pointer-events: none; transition: opacity 0.18s ease, transform 0.18s ease; z-index: 49; }
.upgrade-icon:hover::after, .upgrade-icon:hover::before { opacity: 1; transform: translateX(-50%) translateY(0); }

.upgrade-main { display: grid; grid-template-columns: 1fr 300px 1fr; gap: 24px; margin-bottom: 16px; align-items: stretch; }
.upgrade-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 18px; min-height: 340px; display: flex; flex-direction: column; }
.upgrade-panel-title { color: var(--text-white); font-size: 14px; font-weight: 800; text-align: center; margin-bottom: 16px; }
.upgrade-panel-title sup { color: var(--accent); font-size: 9px; }
.upgrade-selected-area { flex: 1; display: flex; flex-wrap: wrap; gap: 8px; align-content: center; align-items: center; justify-content: center; overflow-y: auto; overflow-x: hidden; padding-right: 6px; scrollbar-width: thin; scrollbar-color: var(--accent) #101915; }
.upgrade-target-area { flex: 1; display: flex; align-items: center; justify-content: center; }
.upgrade-selected-area.is-single .upgrade-item-card.small { width: min(240px, 78%); padding: 18px 16px 16px; }
.upgrade-selected-area.is-single .upgrade-item-card.small .ui-icon { width: 88px; height: 88px; margin-bottom: 12px; }
.upgrade-selected-area.is-single .upgrade-item-card.small .ui-name { font-size: 14px; margin-bottom: 8px; }
.upgrade-selected-area.is-single .upgrade-item-card.small .ui-price { font-size: 14px; }
.upgrade-selected-area.is-double .upgrade-item-card.small { width: calc(50% - 8px); max-width: 170px; padding: 14px 10px 12px; }
.upgrade-selected-area.is-double .upgrade-item-card.small .ui-icon { width: 62px; height: 62px; margin-bottom: 8px; }
.upgrade-selected-area.is-few .upgrade-item-card.small { width: calc(50% - 8px); max-width: 148px; padding: 11px 8px 10px; }
.upgrade-selected-area.is-few .upgrade-item-card.small .ui-icon { width: 52px; height: 52px; margin-bottom: 7px; }
.upgrade-selected-area.is-many .upgrade-item-card.small { width: calc(33.333% - 6px); max-width: 126px; padding: 8px 6px; }
.upgrade-selected-area.is-many .upgrade-item-card.small .ui-icon { width: 40px; height: 40px; margin-bottom: 6px; }
.upgrade-target-area.has-item .upgrade-item-card.large { width: min(92%, 360px); max-width: 360px; padding: 34px 22px 24px; }
.upgrade-target-area.has-item .upgrade-item-card.large .ui-icon { width: 122px; height: 122px; margin: 0 auto 16px; }
.upgrade-target-area.has-item .upgrade-item-card.large .ui-name { font-size: 16px; margin-bottom: 8px; white-space: normal; }
.upgrade-target-area.has-item .upgrade-item-card.large .ui-price { font-size: 15px; }
.upgrade-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.placeholder-dirt-block {
    position: relative;
    width: 78px;
    height: 78px;
    border-radius: 6px;
    opacity: 0.34;
    image-rendering: pixelated;
    background:
        linear-gradient(180deg, #63b945 0 18%, #4d9736 18% 24%, transparent 24%),
        linear-gradient(90deg, rgba(255,255,255,0.13) 0 12%, transparent 12% 88%, rgba(0,0,0,0.18) 88%),
        linear-gradient(180deg, #8c5a32 0%, #714526 100%);
    box-shadow: 0 0 0 2px rgba(255,255,255,0.04), 0 18px 40px rgba(0,0,0,0.28);
}
.placeholder-dirt-block::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 6px;
    background-image:
        radial-gradient(circle at 18% 36%, rgba(61, 33, 18, 0.75) 0 6%, transparent 7%),
        radial-gradient(circle at 44% 58%, rgba(92, 52, 28, 0.9) 0 7%, transparent 8%),
        radial-gradient(circle at 72% 38%, rgba(56, 29, 15, 0.7) 0 5%, transparent 6%),
        radial-gradient(circle at 28% 76%, rgba(97, 57, 31, 0.85) 0 6%, transparent 7%),
        radial-gradient(circle at 78% 70%, rgba(66, 36, 19, 0.8) 0 6%, transparent 7%),
        linear-gradient(180deg, rgba(255,255,255,0.08), transparent 38%);
}

.upgrade-center { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 15px; position: relative; }
.chance-circle-wrapper { position: relative; display: flex; align-items: center; justify-content: center; width: 300px; height: 292px; }
.chance-arrow-marker { position: absolute; top: 50%; left: 50%; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; transform: translate(-50%, -50%) translateY(-134px); transform-origin: 50% 50%; font-size: 18px; line-height: 1; color: #fff; z-index: 100; filter: drop-shadow(0 0 10px rgba(34,197,94,1)) drop-shadow(0 0 4px #000); pointer-events: none; text-shadow: 0 0 4px rgba(0,0,0,0.9); }
.chance-arrow-marker svg { width: 100%; height: 100%; display: block; overflow: visible; }
.chance-arrow-marker.arrow-triangle { color: #f59e0b; filter: drop-shadow(0 0 10px rgba(245,158,11,0.9)) drop-shadow(0 0 4px #000); font-size: 20px; }
.chance-arrow-marker.arrow-diamond { color: #a855f7; filter: drop-shadow(0 0 10px rgba(168,85,247,0.9)) drop-shadow(0 0 4px #000); font-size: 20px; }
.chance-arrow-marker.arrow-lightning { color: #ef4444; filter: drop-shadow(0 0 12px rgba(239,68,68,1)) drop-shadow(0 0 4px #000); font-size: 22px; animation: lightningPulse 0.8s ease-in-out infinite; }
@keyframes lightningPulse { 0%, 100% { filter: drop-shadow(0 0 12px rgba(239,68,68,1)); } 50% { filter: drop-shadow(0 0 20px rgba(239,68,68,1)); } }
.chance-circle { width: 260px; height: 260px; position: relative; display: flex; align-items: center; justify-content: center; }
.chance-circle.v2-design .circle-svg { filter: drop-shadow(0 0 12px rgba(var(--accent-rgb),0.12)); }
.chance-circle.v2-design #circle-ticks line { stroke: #3a4050 !important; }
.chance-circle.v2-design #circle-ticks line[stroke-width="2"] { stroke: #6b7280 !important; }
.circle-svg { position: absolute; width: 100%; height: 100%; top: 0; left: 0; filter: drop-shadow(0 0 14px rgba(var(--accent-rgb),0.08)); }
.circle-content { position: relative; z-index: 10; text-align: center; pointer-events: none; margin-top: 5px; }
.circle-percent { font-size: 42px; font-weight: 900; color: #4a5568; text-shadow: 0 2px 10px rgba(0,0,0,0.5); transition: 0.3s; line-height: 1; }
.chance-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 6px; transition: 0.3s; }

/* Метки СНАРУЖИ круга */
.outer-label { position: absolute; color: #6b7280; font-size: 11px; font-weight: 700; z-index: 20; background: transparent; padding: 0; border-radius: 0; text-shadow: 0 1px 2px rgba(0,0,0,0.8); pointer-events: none; }
.outer-label.top { top: 6px; left: 50%; transform: translateX(-50%); }
.outer-label.bottom { bottom: 6px; left: 50%; transform: translateX(-50%); }
.outer-label.left { left: 2px; top: 48%; transform: translateY(-50%); }
.outer-label.right { right: 2px; top: 48%; transform: translateY(-50%); }

.upgrade-btn-main { width: 100%; padding: 14px 20px; background: linear-gradient(180deg, #c45c2e 0%, #8b3a15 100%); border: none; border-radius: 8px; color: white; font-size: 14px; font-weight: 900; text-transform: uppercase; cursor: pointer; transition: 0.2s; box-shadow: 0 4px 15px rgba(196,92,46,0.3); letter-spacing: 1px; }
.upgrade-btn-main:hover:not(:disabled) { filter: brightness(1.15); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(196,92,46,0.4); }
.upgrade-btn-main:disabled { opacity: 0.4; cursor: not-allowed; }
.upgrade-btn-main.win { background: linear-gradient(180deg, var(--success) 0%, #166534 100%) !important; box-shadow: 0 4px 15px rgba(34,197,94,0.3) !important; }
.upgrade-btn-main.fail { background: linear-gradient(180deg, var(--danger) 0%, #991b1b 100%) !important; box-shadow: 0 4px 15px rgba(239,68,68,0.3) !important; }

.upgrade-balance-add { display: flex; align-items: center; gap: 10px; padding: 12px; background: var(--bg-panel); border-radius: 8px; margin-top: 10px; font-size: 13px; color: var(--text-muted); }
.upgrade-balance-add input[type="range"] { flex: 1; height: 4px; -webkit-appearance: none; background: var(--border); border-radius: 2px; outline: none; }
.upgrade-balance-add input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; background: var(--accent); border-radius: 50%; cursor: pointer; }
.balance-max { font-size: 11px; color: var(--text-muted); }

.upgrade-quick-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.quick-btn { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 5px; padding: 7px 12px; color: var(--text-muted); font-size: 12px; font-weight: 800; cursor: pointer; transition: 0.2s; min-width: 40px; text-align: center; }
.quick-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--bg-card); }
.quick-btn.active { border-color: #166534; color: #f0fdf4; background: rgba(22,163,74,0.18); box-shadow: inset 0 0 0 1px rgba(34,197,94,0.18), 0 0 14px rgba(22,163,74,0.16); }
.quick-btn.shuffle { font-size: 14px; }
.upgrade-filter-status { min-height: 38px; margin-top: 12px; padding: 0 10px; color: var(--text-muted); font-size: 12px; text-align: center; line-height: 1.45; }

.upgrade-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.upgrade-bottom-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.bottom-panel-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 15px; border-bottom: 1px solid var(--border); background: var(--bg-panel); }
.panel-title { color: var(--text-white); font-size: 13px; font-weight: 800; }
.bottom-panel-controls { display: flex; gap: 5px; }
.view-btn { width: 42px; height: 38px; background: #172030; border: 1px solid #2b3548; border-radius: 8px; padding: 0; color: #7f8aa1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: 0.18s ease; }
.view-btn:hover { border-color: #3a4761; color: #dfe6f3; }
.view-btn svg { width: 18px; height: 18px; display: block; }
.view-btn.active { background: linear-gradient(180deg, var(--accent-hover) 0%, var(--accent) 100%); color: white; border-color: var(--accent); box-shadow: 0 0 14px rgba(var(--accent-rgb),0.22); }
.bottom-panel-filters { display: flex; gap: 8px; align-items: center; }
.bottom-panel-filters select { padding: 5px 10px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px; color: var(--text-white); font-size: 12px; cursor: pointer; accent-color: var(--accent); outline: none; transition: 0.2s; }
.bottom-panel-filters select:hover { border-color: rgba(var(--accent-rgb), 0.5); }
.bottom-panel-filters select:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.2); }
.bottom-panel-filters select option { background: var(--bg-card); color: var(--text-white); }
.bottom-panel-filters select option:checked { background: var(--accent); color: #fff; }
.bottom-panel-filters select option:hover { background: rgba(var(--accent-rgb), 0.25); color: var(--text-white); }
.price-input { width: 55px; padding: 5px 8px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px; color: var(--text-white); font-size: 11px; }
.search-btn { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 4px; padding: 5px 12px; color: var(--text-muted); cursor: pointer; font-size: 12px; transition: 0.2s; }
.search-btn:hover { border-color: var(--accent); color: var(--accent); }
.bottom-panel-body { padding: 15px; min-height: 230px; max-height: 390px; overflow-y: auto; display: flex; flex-wrap: wrap; gap: 10px; align-content: flex-start; scrollbar-width: thin; scrollbar-color: var(--accent) #101915; }
.bottom-panel-body::-webkit-scrollbar, .upgrade-selected-area::-webkit-scrollbar { width: 10px; }
.bottom-panel-body::-webkit-scrollbar-track, .upgrade-selected-area::-webkit-scrollbar-track { background: linear-gradient(180deg, #0f1712 0%, #15211a 100%); border-radius: 999px; }
.bottom-panel-body::-webkit-scrollbar-thumb, .upgrade-selected-area::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%); border: 2px solid #101915; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), 0 0 12px rgba(var(--accent-rgb),0.28); }
.bottom-panel-body::-webkit-scrollbar-thumb:hover, .upgrade-selected-area::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, var(--accent-hover) 0%, var(--accent) 100%); }

.upgrade-item-card { width: calc(25% - 8px); min-width: 90px; background: var(--bg-panel); border-radius: 8px; padding: 10px 8px; border-left: 3px solid var(--rarity-color, var(--rarity-common)); cursor: pointer; transition: 0.2s; text-align: center; position: relative; border: 1px solid transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.upgrade-item-card:hover { background: var(--bg-card); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.upgrade-item-card.selected { border: 1px solid var(--accent); background: rgba(255,107,53,0.08); box-shadow: 0 0 15px rgba(255,107,53,0.15); }
.upgrade-item-card.target { border: 1px solid var(--success); background: rgba(34,197,94,0.08); box-shadow: 0 0 15px rgba(34,197,94,0.15); }
.upgrade-item-card.small { width: calc(33% - 6px); padding: 8px 5px; }
.upgrade-item-card.large { width: 78%; padding: 28px 18px; margin: 0 auto; }
.upgrade-item-card .ui-icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.upgrade-item-card .ui-icon img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 0 6px var(--rarity-color, transparent)); }
.upgrade-item-card .ui-icon .fb { width: 100%; height: 100%; align-items: center; justify-content: center; }
.upgrade-item-card.large .ui-icon { width: 72px; height: 72px; margin: 0 auto 10px; }
.upgrade-item-card .ui-name { width: 100%; font-size: 11px; color: var(--text-white); font-weight: 700; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.upgrade-item-card .ui-source { width: 100%; font-size: 10px; color: var(--text-muted); margin-bottom: 5px; text-align: center; line-height: 1.25; white-space: normal; overflow-wrap: anywhere; }
.upgrade-item-card .ui-price { font-size: 11px; color: var(--accent); font-weight: 900; }
.bottom-panel-body.list-view { display: flex; flex-direction: column; flex-wrap: nowrap; gap: 7px; align-content: stretch; }
.bottom-panel-body.list-view .upgrade-item-card {
    width: 100%;
    min-width: 0;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 9px 12px;
    text-align: left;
    border-left-width: 4px;
}
.bottom-panel-body.list-view .upgrade-item-card .ui-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 0;
    flex: 0 0 40px;
}
.bottom-panel-body.list-view .upgrade-item-card .ui-name {
    flex: 1 1 auto;
    min-width: 0;
    margin-bottom: 0;
    text-align: left;
    white-space: nowrap;
    font-size: 12px;
}
.bottom-panel-body.list-view .upgrade-item-card .ui-price {
    flex: 0 0 auto;
    margin-left: auto;
    white-space: nowrap;
    font-size: 12px;
    padding-left: 10px;
}
.remove-btn { position: absolute; top: 3px; right: 3px; background: rgba(0,0,0,0.5); border: none; color: var(--danger); cursor: pointer; font-size: 10px; width: 18px; height: 18px; line-height: 18px; padding: 0; border-radius: 3px; opacity: 0; transition: 0.2s; }
.upgrade-item-card:hover .remove-btn { opacity: 1; }
.selected-total { width: 100%; text-align: center; padding: 10px; color: var(--accent); font-weight: 900; font-size: 13px; border-top: 1px solid var(--border); margin-top: 5px; }

.empty-upgrade-msg { width: 100%; text-align: center; padding: 50px 20px; color: var(--text-muted); font-size: 13px; font-weight: 700; }
.btn-open-case-link { display: inline-block; margin-top: 15px; background: transparent; border: 1px solid var(--accent); color: var(--accent); padding: 10px 25px; border-radius: 6px; text-decoration: none; font-size: 12px; font-weight: 900; text-transform: uppercase; transition: 0.2s; }
.btn-open-case-link:hover { background: var(--accent); color: white; }

/* --- МОДАЛЬНЫЕ ОКНА --- */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.8); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.modal-content { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.deposit-modal {
    max-width: 980px;
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    padding: 0;
    border-radius: 0;
    background: #1a1f2a;
    border: 1px solid #2b3345;
    overflow: hidden;
}
.deposit-sidebar {
    background: #202636;
    border-right: 1px solid #31394d;
    display: flex;
    flex-direction: column;
}
.deposit-side-tab {
    background: transparent;
    border: none;
    border-left: 3px solid transparent;
    color: #7f8798;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 86px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.18s ease;
}
.deposit-side-tab.active {
    color: #f2f5fb;
    background: #252c3e;
    border-left-color: #ff9b3d;
}
.deposit-side-icon { font-size: 28px; line-height: 1; }
.deposit-main {
    padding: 20px 30px 24px;
    background: #1c2230;
}
.deposit-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}
.deposit-modal-header h3 {
    color: #f1f5fb;
    font-size: 18px;
    font-weight: 500;
    margin: 0;
}
.deposit-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.deposit-currency-select {
    min-width: 100px;
    height: 38px;
    background: #21283a;
    border: 1px solid #46506a;
    color: #ff9b3d;
    padding: 0 12px;
    font-size: 15px;
    outline: none;
}
.deposit-methods {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    padding-bottom: 20px;
    border-bottom: 1px solid #31394d;
}
.deposit-method {
    min-height: 110px;
    background: #222a3b;
    border: 1px solid #39425a;
    color: #eef2f8;
    padding: 14px 12px 10px;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: 1fr auto;
    align-items: end;
    text-align: left;
    cursor: pointer;
    transition: 0.18s ease;
}
.deposit-method.active {
    border-color: #ff9b3d;
    box-shadow: inset 0 0 0 1px rgba(255,155,61,0.35);
}
.deposit-method-logo {
    grid-column: 1 / -1;
    align-self: center;
    justify-self: center;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 1px;
}
.deposit-method-name,
.deposit-method-currency {
    font-size: 14px;
    color: #dfe5f1;
}
.deposit-method-currency { color: #9ea7ba; justify-self: end; }
.deposit-method-empty { cursor: default; }
.deposit-form-grid {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 16px 20px;
    align-items: center;
    padding: 22px 0 16px;
}
.deposit-label {
    display: block;
    color: #f2f5fb;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}
.deposit-note {
    color: #7d8798;
    font-size: 13px;
}
.deposit-input-wrap {
    position: relative;
    width: 100%;
}
.deposit-input {
    width: 100%;
    height: 42px;
    background: #20283a;
    border: 1px solid #20283a;
    color: #f1f5fb;
    padding: 0 44px 0 14px;
    font-size: 15px;
    outline: none;
}
.deposit-input:focus { border-color: #ff9b3d; }
.deposit-input-suffix {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #7d8798;
    font-weight: 700;
    pointer-events: none;
}
.deposit-submit-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}
.deposit-submit-btn {
    min-width: 286px;
    height: 46px;
    background: linear-gradient(180deg, #ffa448 0%, #ff8f32 100%);
    border: none;
    color: white;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    transition: 0.18s ease;
}
.deposit-submit-btn:hover {
    filter: brightness(1.08);
}
.deposit-help-text {
    margin-top: 28px;
    color: #9ca6b8;
    font-size: 14px;
    line-height: 1.55;
}
.deposit-help-text a {
    color: #ff9b3d;
    text-decoration: none;
}
.deposit-help-text a:hover { text-decoration: underline; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid var(--border); }
.modal-header h3 { color: var(--text-white); font-size: 16px; text-transform: uppercase; font-weight: 900; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 24px; cursor: pointer; line-height: 1; transition: 0.2s; }
.modal-close:hover { color: var(--danger); }
.modal-body { padding: 20px; }
.withdraw-chat-scroll {
    scrollbar-width: thin;
    scrollbar-color: var(--accent) rgba(255,255,255,0.06);
}
.withdraw-chat-scroll::-webkit-scrollbar {
    width: 10px;
}
.withdraw-chat-scroll::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.06);
    border-radius: 999px;
}
.withdraw-chat-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
    border: 2px solid rgba(8,13,20,0.92);
    border-radius: 999px;
    box-shadow: 0 0 12px rgba(var(--accent-rgb),0.28);
}
.withdraw-chat-scroll::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--accent-hover) 0%, var(--accent) 100%);
}
.upgrade-modal-header h3 { font-size: 18px; letter-spacing: 0.7px; }
.upgrade-settings-modal { max-width: 560px; max-height: calc(100vh - 48px); overflow-y: auto; }
.upgrade-info-modal {
    max-width: 620px;
    background: var(--bg-card);
    border: 1px solid rgba(var(--accent-rgb), 0.35);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 24px rgba(var(--accent-rgb), 0.12);
}
.upgrade-info-modal .upgrade-modal-header {
    border-bottom: 1px solid rgba(var(--accent-rgb), 0.25);
}
.upgrade-info-modal .upgrade-modal-header h3 {
    color: var(--accent);
}
.upgrade-rule-text strong { color: var(--accent); }
.upgrade-modal-body { padding: 24px 26px 28px; }
.upgrade-info-modal .upgrade-modal-body {
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) rgba(255,255,255,0.06);
    padding-right: 30px;
}
.upgrade-info-modal .upgrade-modal-body::-webkit-scrollbar,
.upgrade-settings-modal .upgrade-modal-body::-webkit-scrollbar { width: 8px; }
.upgrade-info-modal .upgrade-modal-body::-webkit-scrollbar-track,
.upgrade-settings-modal .upgrade-modal-body::-webkit-scrollbar-track { background: rgba(255,255,255,0.06); border-radius: 4px; }
.upgrade-info-modal .upgrade-modal-body::-webkit-scrollbar-thumb,
.upgrade-settings-modal .upgrade-modal-body::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 4px; }
.upgrade-info-modal .upgrade-modal-body::-webkit-scrollbar-thumb:hover,
.upgrade-settings-modal .upgrade-modal-body::-webkit-scrollbar-thumb:hover { background: var(--accent-hover); }
.upgrade-settings-modal .upgrade-modal-body {
    scrollbar-width: thin;
    scrollbar-color: var(--accent) rgba(255,255,255,0.06);
    padding-right: 30px;
}
.upgrade-settings-body { padding-top: 22px; }
.upgrade-settings-group { margin-bottom: 22px; }
.upgrade-settings-label { display: block; color: var(--text-white); font-size: 15px; font-weight: 900; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.6px; }
.upgrade-settings-hint { color: var(--text-muted); font-size: 12px; line-height: 1.4; margin-bottom: 12px; }
.upgrade-settings-radio { display: flex; align-items: flex-start; gap: 12px; color: var(--text-main); font-size: 14px; line-height: 1.4; cursor: pointer; margin-bottom: 8px; padding: 10px 12px; border-radius: 10px; border: 1px solid transparent; background: rgba(255,255,255,0.02); transition: 0.2s; }
.upgrade-settings-radio:hover { border-color: rgba(var(--accent-rgb),0.28); background: rgba(var(--accent-rgb),0.06); }
.upgrade-settings-radio input[type="radio"] { appearance: none; width: 18px; height: 18px; flex: 0 0 18px; margin-top: 1px; border-radius: 50%; border: 2px solid #333; background: #1a1a1a; box-shadow: inset 0 0 0 4px transparent; transition: 0.2s; }
.upgrade-settings-radio input[type="radio"]:checked { border-color: var(--accent); background: rgba(var(--accent-rgb),0.2); box-shadow: inset 0 0 0 4px var(--accent), 0 0 10px rgba(var(--accent-rgb),0.22); }
.upgrade-settings-save { width: 100%; display: inline-flex; align-items: center; justify-content: center; padding: 12px 16px; font-size: 13px; letter-spacing: 0.7px; }

/* Upgrade settings redesign */
.upgrade-settings-modal-v2 {
    max-width: 600px;
    background: #202938;
    border: 1px solid rgba(148,163,184,0.16);
    border-radius: 0;
    box-shadow: 0 26px 70px rgba(0,0,0,0.62);
}
.upgrade-settings-modal-v2 .upgrade-modal-header {
    background: rgba(15,23,42,0.26);
    border-bottom: 1px solid rgba(148,163,184,0.14);
}
.upgrade-settings-modal-v2 .upgrade-modal-header h3 {
    color: #fff;
    font-size: 19px;
    font-weight: 900;
    letter-spacing: 0;
}
.upgrade-settings-modal-v2 .upgrade-settings-body {
    max-height: calc(100vh - 126px);
    overflow-y: auto;
    padding: 26px 30px 24px;
}
.upgrade-settings-modal-v2 .upgrade-settings-group {
    margin: 0;
    padding: 0 0 22px;
    border-bottom: 1px solid rgba(148,163,184,0.18);
}
.upgrade-settings-modal-v2 .upgrade-settings-group + .upgrade-settings-group {
    padding-top: 18px;
}
.upgrade-settings-modal-v2 .upgrade-settings-group:last-of-type {
    border-bottom: none;
}
.upgrade-settings-modal-v2 .upgrade-settings-label {
    margin-bottom: 3px;
    color: #f1f5f9;
    font-size: 20px;
    line-height: 1.12;
    text-transform: none;
    letter-spacing: 0;
}
.upgrade-settings-modal-v2 .upgrade-settings-hint {
    margin-bottom: 8px;
    color: #aebbd0;
    font-size: 12px;
    line-height: 1.28;
}
.upgrade-settings-modal-v2 .upgrade-settings-hint b {
    color: #d6b84a;
    font-weight: 900;
}
.upgrade-settings-modal-v2 .upgrade-settings-radio {
    align-items: flex-start;
    gap: 8px;
    margin: 8px 0 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}
.upgrade-settings-modal-v2 .upgrade-settings-radio:hover {
    background: transparent;
    border-color: transparent;
}
.upgrade-settings-modal-v2 .upgrade-settings-radio input[type="radio"] {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
    margin-top: 1px;
    border-color: #8b9ab0;
    background: transparent;
}
.upgrade-settings-modal-v2 .upgrade-settings-radio input[type="radio"]:checked {
    border-color: #cbd5e1;
    background: #263244;
    box-shadow: inset 0 0 0 4px #263244, inset 0 0 0 7px #d6b84a, 0 0 6px rgba(214,184,74,0.18);
}
.upgrade-settings-modal-v2 .upgrade-settings-radio span {
    display: grid;
    gap: 2px;
    color: #cbd5e1;
}
.upgrade-settings-modal-v2 .upgrade-settings-radio strong {
    color: #edf2f7;
    font-size: 15px;
    line-height: 1.05;
}
.upgrade-settings-modal-v2 .upgrade-settings-radio small {
    color: #aebbd0;
    font-size: 11px;
    line-height: 1.25;
}
.arrow-picker {
    display: flex;
    align-items: end;
    gap: 18px;
    padding-top: 8px;
}
.arrow-option {
    display: grid;
    gap: 8px;
    justify-items: center;
    cursor: pointer;
}
.arrow-option input {
    appearance: none;
    order: 2;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #8b9ab0;
    background: transparent;
    box-shadow: inset 0 0 0 4px transparent;
}
.arrow-option input:checked {
    border-color: #cbd5e1;
    box-shadow: inset 0 0 0 3px #263244, inset 0 0 0 6px #d6b84a;
}
.arrow-preview {
    position: relative;
    width: 28px;
    height: 38px;
    filter: drop-shadow(0 0 5px color-mix(in srgb, currentColor 52%, transparent));
}
.arrow-preview::before,
.arrow-preview::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}
.arrow-preview::before {
    top: 0;
    width: 3px;
    height: 28px;
    background: currentColor;
    box-shadow: 0 0 6px color-mix(in srgb, currentColor 45%, transparent);
}
.arrow-preview::after {
    bottom: 0;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 13px solid currentColor;
}
.arrow-preview-default { color: #d6a64a; }
.arrow-preview-triangle { color: #c95b4f; }
.arrow-preview-diamond { color: #d18452; }
.arrow-preview-lightning { color: #5fc97a; }
.arrow-preview-slim { color: #74c98b; }
.arrow-preview-diamond::after {
    width: 13px;
    height: 13px;
    border: none;
    background: currentColor;
    transform: translateX(-50%) rotate(45deg);
}
.arrow-preview-lightning::before {
    width: 5px;
    height: 30px;
    transform: translateX(-50%) skewX(-18deg);
}
.arrow-preview-slim::before {
    width: 4px;
    height: 32px;
}
.arrow-preview-slim::after {
    border-left-width: 6px;
    border-right-width: 6px;
    border-top-width: 11px;
}
.upgrade-settings-fast-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}
.upgrade-settings-subtitle {
    margin-bottom: 8px;
    color: #b8c4d5;
    font-size: 12px;
    line-height: 1.15;
}
.upgrade-settings-btns {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.upgrade-settings-btns button {
    min-width: 64px;
    padding: 9px 13px;
    border-radius: 7px;
    border: 1px solid rgba(148,163,184,0.30);
    background: rgba(39,50,67,0.88);
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    transition: 0.18s ease;
}
.upgrade-settings-btns button:hover {
    border-color: #d6b84a;
    color: #f8fafc;
    transform: translateY(-1px);
}
.upgrade-settings-modal-v2 .upgrade-settings-save {
    width: auto;
    min-width: 208px;
    margin: 2px auto 0;
    padding: 9px 18px;
    border: 2px solid #d6b84a;
    border-radius: 0;
    background: transparent;
    color: #f8fafc;
    box-shadow: none;
}

/* Upgrade v2 chance wheel */
.chance-circle-wrapper.v2-wheel {
    width: 320px;
    height: 314px;
}
.chance-circle.v2-design {
    width: 286px;
    height: 286px;
}
.chance-circle.v2-design::before {
    content: none;
}
.chance-circle.v2-design .circle-svg {
    filter: drop-shadow(0 0 18px rgba(56,189,248,0.25)) drop-shadow(0 0 20px rgba(250,204,21,0.12));
}
.chance-circle.v2-design .chance-v2-shadow {
    opacity: 0.86;
}
.chance-circle.v2-design .chance-v2-track {
    opacity: 0.94;
    filter: drop-shadow(0 0 12px rgba(250,204,21,0.22));
}
.chance-circle.v2-design .chance-v2-inner {
    opacity: 1;
}
.chance-circle.v2-design.is-empty .circle-svg {
    opacity: 0;
    filter: none;
}
.chance-circle.v2-design.is-empty {
    width: 300px;
    height: 300px;
}
.chance-circle.v2-design.is-empty::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background: url('/nav-icons/upgrade-wheel-bg.png') center / contain no-repeat;
    filter: drop-shadow(0 12px 22px rgba(0,0,0,0.32));
}
.chance-circle.v2-design.is-empty::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 124px;
    height: 124px;
    z-index: 1;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background:
        url('/nav-icons/apple.png') center 55% / 92px 92px no-repeat,
        url('/nav-icons/minecraft-apple.svg') center / 66px 66px no-repeat,
        radial-gradient(circle at 50% 48%, rgba(40,54,72,0.92) 0 38%, rgba(20,29,41,0.96) 62%, rgba(12,18,27,0.98) 100%);
    box-shadow:
        inset 0 0 0 1px rgba(117,132,154,0.18),
        inset 0 0 28px rgba(0,0,0,0.58),
        0 0 18px rgba(15,23,42,0.36);
}
.chance-circle.v2-design.is-empty .chance-v2-shadow {
    opacity: 0.96;
    stroke: #2d3748;
    stroke-width: 24px;
}
.chance-circle.v2-design.is-empty .chance-v2-track {
    opacity: 0;
    filter: none;
}
.chance-circle.v2-design.is-empty .chance-v2-inner {
    opacity: 0.82;
}
.chance-circle.v2-design.is-empty #circle-ticks line {
    opacity: 0.86;
    stroke: #2f3b4f !important;
}
.chance-circle.v2-design.is-empty .circle-outer-ticks line {
    opacity: 0.82;
    stroke: #44536a !important;
}
.chance-circle.v2-design.is-empty .chance-v2-empty-grid {
    opacity: 0.62;
}
.chance-circle.v2-design.is-empty .chance-v2-empty-icon {
    opacity: 0.54;
}
.chance-circle.v2-design.is-empty .chance-v2-base-outline {
    opacity: 0.72;
    stroke: #3a4658;
    stroke-width: 2px;
}
.chance-circle.v2-design.is-empty .chance-v2-dash-ring {
    opacity: 0.72;
    stroke: #2c3749;
    stroke-dasharray: 2 5;
}
.chance-circle.v2-design.is-empty .chance-v2-inner-ring {
    opacity: 0.62;
    stroke: #1d2735;
}
.chance-circle.v2-design.is-empty .chance-v2-center-glow {
    opacity: 0.16;
    fill: #1e293b;
}
.chance-circle.v2-design.is-empty .circle-content {
    opacity: 0;
    visibility: hidden;
}
.chance-circle.v2-design.is-empty .circle-percent {
    color: #7d8ca3 !important;
    text-shadow: 0 2px 8px rgba(0,0,0,0.55);
}
.chance-circle.v2-design.is-empty .chance-label {
    color: #8a98ad !important;
    text-shadow: none;
}
.chance-circle-wrapper.v2-wheel.is-empty .outer-label,
.chance-circle-wrapper.v2-wheel:has(.chance-circle.is-empty) .outer-label {
    opacity: 0;
}
.chance-circle-wrapper.v2-wheel.is-empty .chance-arrow-marker,
.chance-circle-wrapper.v2-wheel:has(.chance-circle.is-empty) .chance-arrow-marker {
    opacity: 0;
    filter: grayscale(1) drop-shadow(0 1px 3px rgba(0,0,0,0.8));
}
.chance-circle.v2-design #chance-arc {
    opacity: 0.98;
}
.chance-circle.v2-design .circle-content {
    margin-top: 6px;
}
.chance-circle.v2-design .circle-percent {
    color: #fff84a;
    font-size: 40px;
    text-shadow: 0 0 18px rgba(250,204,21,0.28), 0 2px 8px rgba(0,0,0,0.72);
}
.chance-circle.v2-design .chance-label {
    color: #6dff80;
    font-size: 12px;
    font-weight: 900;
}
.chance-circle-wrapper.v2-wheel .outer-label {
    color: #fff85a;
    font-size: 12px;
    text-shadow: 0 0 8px rgba(250,204,21,0.58), 0 1px 3px rgba(0,0,0,0.75);
}
.chance-circle-wrapper.v2-wheel .outer-label.top {
    color: #6dff80;
    top: 12px;
}
.chance-circle-wrapper.v2-wheel .outer-label.bottom {
    color: #ff5757;
    bottom: 12px;
}
.chance-circle-wrapper.v2-wheel .outer-label.left {
    left: 12px;
}
.chance-circle-wrapper.v2-wheel .outer-label.right {
    right: 12px;
}
.chance-circle-wrapper.v2-wheel .chance-arrow-marker {
    transform: translate(-50%, -50%) translateY(-140px);
}
.chance-arrow-marker.arrow-slim {
    color: #4ade80;
    filter: drop-shadow(0 0 12px rgba(74,222,128,1)) drop-shadow(0 0 4px #000);
    font-size: 21px;
}

/* Bigger case badge in live drop previews */
.live-hover .lhv-inner {
    grid-template-columns: 1fr 66px;
}
.live-hover .lhv-case {
    max-width: 196px;
}
.live-hover .lhv-avatar.is-case-avatar {
    width: 58px;
    height: 58px;
    padding: 2px;
    margin-top: -5px;
    border-width: 1px;
    background: radial-gradient(circle, rgba(255,255,255,0.18), rgba(255,255,255,0.06));
    box-shadow:
        0 9px 18px rgba(0,0,0,0.36),
        0 0 18px color-mix(in srgb, var(--rarity-color, var(--accent)) 28%, transparent),
        inset 0 0 0 1px rgba(255,255,255,0.12);
}
.live-hover .lhv-avatar.is-case-avatar .lhv-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    transform: scale(1.18);
}

.upgrade-info-body { padding-top: 22px; }
.upgrade-rule-row { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.upgrade-rule-row:last-child { border-bottom: none; padding-bottom: 0; }
.upgrade-rule-index { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(var(--accent-rgb),0.14); color: var(--accent); font-size: 13px; font-weight: 900; }
.upgrade-rule-text { color: var(--text-main); font-size: 14px; line-height: 1.5; }
.upgrade-rule-text strong { color: var(--text-white); }

/* --- ВЫВОД --- */
.withdraw-items-list { display: flex; flex-direction: column; gap: 8px; max-height: 250px; overflow-y: auto; padding-right: 5px; scrollbar-width: thin; scrollbar-color: #22c55e #101915; }
.withdraw-items-list::-webkit-scrollbar { width: 10px; }
.withdraw-items-list::-webkit-scrollbar-track { background: linear-gradient(180deg, #0f1712 0%, #15211a 100%); border-radius: 999px; }
.withdraw-items-list::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #22c55e 0%, #15803d 100%); border: 2px solid #101915; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), 0 0 10px rgba(34,197,94,0.22); }
.withdraw-items-list::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #34d399 0%, #16a34a 100%); }
.withdraw-item { display: flex; align-items: center; gap: 12px; background: var(--bg-panel); border-radius: 8px; padding: 12px; cursor: pointer; transition: 0.2s; border: 2px solid transparent; }
.withdraw-item:hover { background: var(--bg-card); }
.withdraw-item.selected { border-color: var(--accent); background: var(--bg-card); }
.withdraw-item.selected .wi-check { transform: scale(1.08); text-shadow: 0 0 10px rgba(34,197,94,0.25); }
.wi-icon { font-size: 28px; width: 50px; height: 50px; text-align: center; display: flex; align-items: center; justify-content: center; flex: 0 0 50px; }
.wi-real-img { max-width: 42px; max-height: 42px; object-fit: contain; display: block; filter: drop-shadow(0 0 8px rgba(255,255,255,0.08)); }
.wi-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.wi-info { flex: 1; }
.wi-name { color: var(--text-white); font-weight: 700; font-size: 14px; }
.wi-price { color: var(--accent); font-size: 12px; font-weight: 700; }
.wi-check { color: var(--accent); font-size: 18px; font-weight: 900; }

@keyframes glow { 0%, 100% { box-shadow: 0 0 5px var(--accent); } 50% { box-shadow: 0 0 20px var(--accent); } }
.glow { animation: glow 2s infinite; }

/* --- HISTORY --- */
.history-page { padding: 20px; max-width: 900px; margin: 0 auto; }
.history-title { font-size: 24px; font-weight: 900; text-align: center; color: var(--text-white); margin-bottom: 25px; text-transform: uppercase; letter-spacing: 2px; }
.history-tabs { display: flex; gap: 8px; margin-bottom: 20px; justify-content: center; }
.history-tab { background: var(--bg-panel); border: 1px solid var(--border); color: var(--text-muted); padding: 10px 24px; border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer; transition: 0.2s; text-transform: uppercase; }
.history-tab:hover { background: var(--bg-card); color: var(--text-white); }
.history-tab.active { background: var(--accent); color: #000; border-color: var(--accent); }
.history-content { background: var(--bg-card); border-radius: 16px; border: 1px solid var(--border); padding: 20px; min-height: 300px; }
.history-item { display: grid; grid-template-columns: 40px 1fr 1fr auto; gap: 15px; align-items: center; padding: 14px 16px; background: var(--bg-panel); border-radius: 10px; margin-bottom: 8px; font-size: 14px; transition: 0.2s; }
.history-item:hover { background: var(--bg-card); transform: translateX(5px); }
.history-icon { width: 40px; height: 40px; font-size: 22px; text-align: center; display: flex; align-items: center; justify-content: center; }
.history-real-img { max-width: 34px; max-height: 34px; object-fit: contain; display: block; filter: drop-shadow(0 0 8px rgba(255,255,255,0.08)); }
.history-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.history-name { color: var(--text-white); font-weight: 700; }
.history-drop { font-weight: 700; }
.history-time { color: var(--text-muted); font-size: 12px; text-align: right; }
.history-empty { text-align: center; color: var(--text-muted); padding: 40px; font-size: 14px; }

/* --- НОВЫЙ ДИЗАЙН КЕЙСА V2 --- */
.case-v2-page { padding: 20px; max-width: 1200px; margin: 0 auto; }

/* ВЕРХНЯЯ ПАНЕЛЬ */
.case-v2-top-bar { display: flex; justify-content: space-between; align-items: center; max-width: 600px; margin: 0 auto 10px; padding: 0 10px; }

/* Info + Tooltip */
.case-v2-info-wrap { position: relative; }
.case-v2-info-btn { display: flex; align-items: center; gap: 8px; color: var(--accent); font-size: 12px; font-weight: 700; text-transform: uppercase; cursor: help; transition: 0.2s; letter-spacing: 1px; padding: 6px 0; }
.case-v2-info-btn:hover { color: var(--accent-hover); }
.info-icon { width: 20px; height: 20px; border: 2px solid var(--accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 900; flex-shrink: 0; }
.case-v2-tooltip { position: absolute; top: calc(100% + 8px); left: 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; min-width: 180px; opacity: 0; pointer-events: none; transform: translateY(-5px); transition: 0.2s; z-index: 100; box-shadow: 0 8px 25px rgba(0,0,0,0.4); }
.case-v2-tooltip::before { content: ''; position: absolute; top: -6px; left: 16px; width: 10px; height: 10px; background: var(--bg-card); border-left: 1px solid var(--border); border-top: 1px solid var(--border); transform: rotate(45deg); }
.case-v2-info-wrap:hover .case-v2-tooltip { opacity: 1; transform: translateY(0); pointer-events: auto; }
.tt-row { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 4px; font-size: 12px; }
.tt-row:last-child { margin-bottom: 0; }
.tt-label { color: var(--text-muted); font-weight: 700; }
.tt-val { color: var(--text-white); font-weight: 700; }

/* Heart */
.case-v2-fav-wrap { position: relative; }
.case-v2-fav-btn { background: none; border: none; cursor: pointer; font-size: 32px; padding: 4px; transition: 0.2s; color: var(--text-muted); line-height: 1; }
.case-v2-fav-btn:hover { transform: scale(1.15); }
.fav-tooltip { position: absolute; top: calc(100% + 8px); right: 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; padding: 6px 12px; font-size: 11px; font-weight: 700; color: var(--text-white); white-space: nowrap; opacity: 0; pointer-events: none; transform: translateY(-5px); transition: 0.2s; z-index: 100; box-shadow: 0 4px 15px rgba(0,0,0,0.3); }
.fav-tooltip::before { content: ''; position: absolute; top: -6px; right: 10px; width: 10px; height: 10px; background: var(--bg-card); border-left: 1px solid var(--border); border-top: 1px solid var(--border); transform: rotate(45deg); }
.case-v2-fav-wrap:hover .fav-tooltip { opacity: 1; transform: translateY(0); }

/* ЦЕНТРАЛЬНЫЙ БЛОК */
.case-v2-header { text-align: center; padding: 10px 20px 30px; }
.case-v2-label { color: var(--text-muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 8px; }
.case-v2-title { font-size: 28px; font-weight: 900; color: var(--text-white); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 25px; }
.case-server-badge { display: inline-block; padding: 4px 14px; margin: -15px 0 15px; font-size: 13px; font-weight: 700; letter-spacing: 1.5px; color: #fff; background: var(--accent); border-radius: 6px; text-transform: uppercase; }

.case-v2-image-wrap { position: relative; width: 280px; height: 280px; margin: 0 auto 25px; display: flex; align-items: center; justify-content: center; }
.case-v2-ring { position: absolute; inset: -12px; border-radius: 50%; border: 3px dashed rgba(var(--case-glow-r2), var(--case-glow-g2), var(--case-glow-b2), 0.4); animation: spinRing 20s linear infinite; }
.case-v2-ring::before { content: ''; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid rgba(var(--case-glow-r2), var(--case-glow-g2), var(--case-glow-b2), 0.15); }
@keyframes spinRing { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.case-v2-image { width: 390px; height: 390px; object-fit: contain; object-position: center center; position: relative; z-index: 2; filter: drop-shadow(0 0 36px rgba(var(--case-glow-r2), var(--case-glow-g2), var(--case-glow-b2), 0.55)); transform: translate(5px, -6px); transition: transform 0.3s; }
.case-v2-image:hover { transform: translate(5px, -6px) scale(1.03); }

/* СЕЛЕКТОР КОЛИЧЕСТВА */
.case-v2-open-sources { max-width: 430px; }
.case-v2-source-switch { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.case-source-btn { min-width: 150px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-panel); color: var(--text-muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; cursor: pointer; transition: 0.2s; }
.case-source-btn:hover { border-color: var(--accent); color: var(--accent); }
.case-source-btn.active { background: rgba(34,197,94,0.16); border-color: var(--accent); color: var(--accent); box-shadow: 0 0 18px rgba(34,197,94,0.18); }
.case-v2-quantity { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 18px; margin-bottom: 15px; }
.qty-label { color: var(--text-muted); font-size: 13px; font-weight: 500; }
.qty-btn { width: 36px; height: 36px; background: var(--bg-panel); border: 1px solid var(--border); border-radius: 6px; color: var(--text-muted); font-size: 14px; font-weight: 700; cursor: pointer; transition: 0.2s; display: flex; align-items: center; justify-content: center; }
.qty-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(255,107,53,0.08); }
.qty-btn.active { background: var(--accent); border-color: var(--accent); color: white; box-shadow: 0 0 12px rgba(255,107,53,0.3); }
.qty-btn:disabled { opacity: 0.35; cursor: not-allowed; filter: grayscale(0.2); }

/* КНОПКИ ОТКРЫТИЯ */
.case-v2-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.case-v2-open-btn { background: linear-gradient(180deg, var(--accent) 0%, #e55a2b 100%); border: none; color: white; padding: 11px 18px; font-size: 12px; font-weight: 900; border-radius: 7px; cursor: pointer; text-transform: uppercase; transition: 0.2s; box-shadow: 0 4px 15px rgba(255,107,53,0.3); display: flex; align-items: center; gap: 7px; letter-spacing: 0.35px; min-width: 230px; justify-content: center; }
.case-v2-open-btn:hover { filter: brightness(1.15); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255,107,53,0.4); }
.case-v2-open-btn span { font-size: 14px; }
.case-v2-fast-btn { background: var(--bg-panel); border: 1px solid var(--accent); color: var(--accent); padding: 11px 18px; font-size: 12px; font-weight: 900; border-radius: 7px; cursor: pointer; text-transform: uppercase; transition: 0.2s; display: flex; align-items: center; gap: 7px; letter-spacing: 0.35px; min-width: 230px; justify-content: center; }
.case-v2-fast-btn:hover { background: var(--accent); color: white; transform: translateY(-2px); box-shadow: 0 4px 15px rgba(255,107,53,0.3); }
.case-v2-fast-btn span { font-size: 14px; }
.case-v2-open-btn:disabled, .case-v2-fast-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; filter: none; box-shadow: none; }
.case-v2-header.is-opening .case-v2-image-wrap { display: none; }
.case-v2-header.is-opening .roulette-section { display: block; animation: caseRouletteReveal 0.28s ease; }
.case-celebration-layer { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 9998; }
.case-drop-aura {
    position: fixed;
    width: 150px;
    height: 150px;
    margin-left: -75px;
    margin-top: -75px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34,197,94,0.36) 0%, rgba(56,189,248,0.22) 34%, rgba(34,197,94,0.08) 58%, rgba(34,197,94,0) 78%);
    filter: blur(2px);
    animation: caseAuraPulse 1.05s ease-out forwards;
}
.case-burst-flash {
    position: fixed;
    width: 22px;
    height: 22px;
    margin-left: -11px;
    margin-top: -11px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.98) 0%, rgba(125,211,252,0.92) 30%, rgba(34,197,94,0.28) 64%, rgba(34,197,94,0) 100%);
    animation: caseBurstFlash 0.76s ease-out forwards;
}
.case-burst-ring {
    position: fixed;
    width: 32px;
    height: 32px;
    margin-left: -16px;
    margin-top: -16px;
    border-radius: 50%;
    border: 2px solid #22c55e;
    box-shadow: 0 0 18px currentColor;
    animation: caseBurstRing 1s ease-out forwards;
}
.case-burst-rune {
    position: fixed;
    width: 18px;
    height: 18px;
    margin-left: -9px;
    margin-top: -9px;
    color: #22c55e;
    animation: caseBurstRune 1.22s ease-out forwards;
}
.case-burst-rune::before {
    content: '✦';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    text-shadow: 0 0 12px currentColor, 0 0 22px currentColor;
}
.case-burst-spark {
    position: fixed;
    width: 7px;
    height: 7px;
    margin-left: -3.5px;
    margin-top: -3.5px;
    border-radius: 50%;
    box-shadow: 0 0 10px currentColor, 0 0 18px currentColor;
    animation: caseBurstSpark 1.18s ease-out forwards;
}
.case-burst-beam {
    position: fixed;
    width: 9px;
    height: 88px;
    margin-left: -4.5px;
    margin-top: -70px;
    border-radius: 999px;
    transform-origin: 50% 100%;
    filter: blur(1px);
    opacity: 0.88;
    animation: caseBurstBeam 0.9s ease-out forwards;
}
.case-shard-fall {
    position: fixed;
    width: 10px;
    height: 22px;
    border-radius: 3px;
    box-shadow: 0 0 14px currentColor;
    opacity: 0;
    animation: caseShardFall linear forwards;
}
.case-star-fall {
    position: fixed;
    width: 20px;
    height: 20px;
    color: #fde047;
    opacity: 0;
    animation: caseStarFall linear forwards;
}
.case-star-fall::before {
    content: '✦';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    text-shadow: 0 0 12px currentColor, 0 0 18px currentColor;
}

@keyframes caseRouletteReveal {
    from { opacity: 0; transform: translateY(10px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes caseAuraPulse {
    0% { transform: scale(0.35); opacity: 0.15; }
    50% { transform: scale(0.96); opacity: 0.9; }
    100% { transform: scale(1.25); opacity: 0; }
}
@keyframes caseBurstFlash {
    0% { transform: scale(0.25); opacity: 0.95; }
    60% { transform: scale(5.4); opacity: 0.78; }
    100% { transform: scale(7.5); opacity: 0; }
}
@keyframes caseBurstRing {
    0% { transform: scale(0.2); opacity: 0.95; }
    100% { transform: scale(6.4); opacity: 0; }
}
@keyframes caseBurstRune {
    0% { transform: translate(0, 0) rotate(0deg) scale(0.35); opacity: 0; }
    25% { opacity: 1; }
    100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(1.2); opacity: 0; }
}
@keyframes caseBurstSpark {
    0% { transform: translate(0, 0) scale(0.4); opacity: 1; }
    100% { transform: translate(var(--dx), var(--dy)) scale(0.1); opacity: 0; }
}
@keyframes caseBurstBeam {
    0% { transform: rotate(var(--rot)) scaleY(0.15); opacity: 0; }
    30% { opacity: 0.92; }
    100% { transform: rotate(var(--rot)) scaleY(1.08); opacity: 0; }
}
@keyframes caseShardFall {
    0% { transform: translate3d(0, 0, 0) rotate(0deg) scale(0.8); opacity: 0; }
    12% { opacity: 1; }
    100% { transform: translate3d(var(--drift), 110vh, 0) rotate(var(--spin)) scale(1.05); opacity: 0; }
}
@keyframes caseStarFall {
    0% { transform: translate3d(0, 0, 0) rotate(0deg) scale(0.55); opacity: 0; }
    12% { opacity: 1; }
    100% { transform: translate3d(var(--drift), 112vh, 0) rotate(var(--spin)) scale(1.12); opacity: 0; }
}

.case-v2-balance-info { background: var(--bg-panel); border-radius: 12px; padding: 20px; max-width: 400px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 12px; border: 1px solid var(--border); }
.case-v2-balance-text { color: var(--text-muted); font-size: 13px; text-align: center; line-height: 1.5; }
.case-v2-balance-text a { color: var(--accent); text-decoration: none; font-weight: 700; }
.case-v2-deposit-btn { background: transparent; border: 1px solid var(--accent); color: var(--accent); padding: 10px 35px; border-radius: 6px; font-size: 12px; font-weight: 900; text-transform: uppercase; text-decoration: none; transition: 0.2s; letter-spacing: 1px; }
.case-v2-deposit-btn:hover { background: var(--accent); color: white; }

.case-v2-section-title { text-align: center; font-size: 18px; font-weight: 900; color: var(--text-white); text-transform: uppercase; letter-spacing: 2px; margin: 40px 0 25px; }

.case-v2-items { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.case-v2-item { background: var(--bg-panel); border-radius: 8px; overflow: hidden; position: relative; transition: 0.2s; border: 1px solid var(--border); display: flex; flex-direction: column; }
.case-v2-item:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0,0,0,0.4); border-color: var(--rarity-color); }
.cv2-item-img { height: 138px; display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, transparent 100%); position: relative; padding: 8px 0 26px; box-sizing: border-box; }
.cv2-item-img img { max-width: 96% !important; max-height: 96% !important; }
.fallback-icon-silent {
    width: 76px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: radial-gradient(circle at 50% 35%, rgba(168,85,247,0.25), rgba(15,23,42,0.82) 68%);
    border: 1px solid rgba(168,85,247,0.28);
    box-shadow: 0 0 22px rgba(168,85,247,0.22);
    color: #c084fc;
    font-size: 32px;
    line-height: 1;
}
.cv2-item-price { position: absolute; bottom: 4px; left: 8px; background: var(--rarity-color); color: white; padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: 900; box-shadow: 0 2px 8px rgba(0,0,0,0.4); z-index: 5; }
.cv2-item-name { min-height: 38px; padding: 10px 10px 2px; font-size: 12px; line-height: 1.25; color: var(--text-white); font-weight: 700; white-space: normal; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.cv2-item-server { padding: 0 10px 5px; font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: 1.5px; text-transform: uppercase; opacity: 0.9; }
.roulette-item-server { font-size: 9px; font-weight: 800; color: var(--accent); letter-spacing: 1px; text-transform: uppercase; text-align: center; margin-top: 2px; opacity: 0.85; }
.cv2-item-bar { height: 3px; background: var(--rarity-color); width: 100%; margin-top: auto; }

/* --- ПРОФИЛЬ V2 (Case-Battle стиль) --- */
.profile-v2-page { max-width: 1200px; margin: 0 auto; padding: 20px; }
.profile-v2-title {
    position: relative;
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    font-size: 22px;
    font-weight: 900;
    color: var(--text-white);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 28px;
    background: linear-gradient(90deg, var(--text-white), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.profile-v2-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -13px;
    width: 240px;
    height: 1px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.82), transparent);
    box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.34);
    pointer-events: none;
}

.profile-v2-grid { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 20px; margin-bottom: 25px; align-items: start; }
.pv2-side-stack { display: flex; flex-direction: column; gap: 28px; }

.pv2-card {
    position: relative;
    background:
        radial-gradient(120% 120% at 100% 0%, rgba(var(--accent-rgb), 0.07) 0%, transparent 45%),
        linear-gradient(160deg, #1a1f2b 0%, #14181f 100%);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    padding: 20px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 8px 24px rgba(0,0,0,0.28);
    transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}
.pv2-card:hover {
    border-color: rgba(var(--accent-rgb), 0.35);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 12px 30px rgba(0,0,0,0.4);
}
.pv2-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.pv2-card-icon {
    font-size: 18px;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(var(--accent-rgb), 0.12);
    border: 1px solid rgba(var(--accent-rgb), 0.28);
    color: var(--accent);
}
.pv2-card-title { font-size: 12px; font-weight: 900; color: var(--text-white); text-transform: uppercase; letter-spacing: 0.8px; }
.pv2-card-sub { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

.pv2-input { flex: 1; background: rgba(8,12,18,0.76); border: 1px solid rgba(255,255,255,0.08); color: var(--text-white); padding: 12px 14px; border-radius: 10px; font-size: 13px; outline: none; transition: 0.2s; width: 100%; box-shadow: inset 0 1px 0 rgba(255,255,255,0.03); }
.pv2-input:focus { border-color: rgba(var(--accent-rgb), 0.7); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12); }
.pv2-btn-outline { background: rgba(var(--accent-rgb), 0.07); border: 1px solid rgba(var(--accent-rgb), 0.42); color: var(--accent); padding: 10px 14px; border-radius: 10px; font-size: 11px; font-weight: 900; text-transform: uppercase; cursor: pointer; transition: 0.2s; white-space: nowrap; box-shadow: inset 0 1px 0 rgba(255,255,255,0.03); }
.pv2-btn-outline:hover { background: var(--accent); color: white; transform: translateY(-1px); box-shadow: 0 8px 18px rgba(var(--accent-rgb), 0.24); }
.pv2-key-icon { width: 18px; height: 18px; object-fit: contain; vertical-align: -0.2em; margin-right: 5px; filter: drop-shadow(0 0 4px rgba(var(--accent-rgb),0.25)); }
/* центр */
.pv2-user-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 26px 24px 24px;
    background:
        radial-gradient(80% 70% at 50% 0%, rgba(var(--accent-rgb), 0.14) 0%, transparent 60%),
        linear-gradient(180deg, #18201d 0%, #12181a 100%);
}
.pv2-user-top { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-bottom: 18px; gap: 12px; }
.pv2-user-info { display: flex; align-items: center; gap: 8px; }
.pv2-user-nick { font-size: 15px; font-weight: 900; color: var(--text-white); text-transform: uppercase; letter-spacing: 0.8px; }
.pv2-user-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.pv2-link { font-size: 11px; font-weight: 800; color: var(--accent); text-decoration: none; transition: 0.2s; padding: 7px 11px; border-radius: 999px; background: rgba(var(--accent-rgb), 0.07); border: 1px solid rgba(var(--accent-rgb), 0.18); }
.pv2-link:hover { text-decoration: none; background: rgba(var(--accent-rgb), 0.16); border-color: rgba(var(--accent-rgb), 0.32); }

.pv2-avatar-wrap { position: relative; width: 128px; height: 128px; margin-bottom: 12px; }
.pv2-avatar { width: 128px; height: 128px; border-radius: 50%; background: linear-gradient(145deg, #222a39, #141821); border: 3px solid rgba(var(--accent-rgb), 0.8); display: flex; align-items: center; justify-content: center; font-size: 52px; box-shadow: 0 0 0 8px rgba(var(--accent-rgb), 0.08), 0 16px 30px rgba(0,0,0,0.42), 0 0 24px rgba(var(--accent-rgb), 0.2); overflow: hidden; }
.pv2-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.pv2-level { position: absolute; bottom: 4px; right: 2px; width: 34px; height: 34px; background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 900; color: #fff; border: 3px solid #151a22; box-shadow: 0 6px 16px rgba(0,0,0,0.35); }
.pv2-avatar-tools { width: 100%; display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.pv2-avatar-form { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
.pv2-avatar-input { max-width: 100%; color: var(--text-muted); font-size: 12px; }
.pv2-avatar-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; color: var(--text-main); padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); margin: 0 auto; }
.pv2-avatar-msg { min-height: 16px; font-size: 11px; color: var(--text-muted); }
.chat-msg-row { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 6px; }
.chat-msg-row.is-user { justify-content: flex-end; }
.chat-msg-row.is-user .chat-msg-avatar { order: 2; }
.chat-msg-row.is-user > div:last-child { margin-left: auto; }
.chat-msg-avatar { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #2a2e3b, #1a1d24); border: 1px solid var(--border-light); }
.chat-avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chat-avatar-fallback { font-size: 14px; line-height: 1; }

.pv2-balance-row { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; margin-bottom: 6px; flex-wrap: wrap; }
.pv2-balance-main { display: flex; align-items: center; gap: 12px; background: linear-gradient(180deg, rgba(17,22,31,0.94) 0%, rgba(11,15,22,0.96) 100%); padding: 12px 16px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.08); min-width: min(100%, 280px); justify-content: center; box-shadow: inset 0 1px 0 rgba(255,255,255,0.03); }
.pv2-balance-icon { font-size: 21px; }
.pv2-balance-copy { display: grid; gap: 2px; text-align: left; }
.pv2-balance-label { font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); }
.pv2-balance-num { font-size: 22px; font-weight: 900; color: var(--text-white); line-height: 1.1; }
.pv2-deposit-btn { background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%); border: 1px solid rgba(var(--accent-rgb), 0.7); color: white; padding: 0 18px; min-height: 52px; border-radius: 14px; font-size: 12px; font-weight: 900; text-transform: uppercase; text-decoration: none; transition: 0.2s; box-shadow: 0 10px 24px rgba(var(--accent-rgb), 0.24); cursor: pointer; }
.pv2-deposit-btn:hover { filter: brightness(1.07); transform: translateY(-1px); }

.pv2-best-drop { position: relative; background: radial-gradient(130% 130% at 100% 0%, rgba(var(--accent-rgb), 0.14) 0%, transparent 48%), linear-gradient(160deg, #191f2a 0%, #13171f 100%); border-radius: 18px; padding: 16px; width: 100%; text-align: left; border: 1px solid rgba(var(--accent-rgb),0.24); box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 10px 26px rgba(0,0,0,0.28); }
.pv2-best-drop::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb),0.08); }
.pv2-best-label { font-size: 11px; font-weight: 900; color: var(--accent); text-transform: uppercase; letter-spacing: 1.3px; margin-bottom: 10px; }
.pv2-best-drop-icon { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; flex: 0 0 42px; }
.pv2-best-drop-img { max-width: 40px; max-height: 40px; object-fit: contain; display: block; filter: drop-shadow(0 0 12px rgba(var(--accent-rgb),0.22)); }
.pv2-best-drop-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 28px; }

/* статистика */
.pv2-stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 10px; }
.pv2-stat {
    background: linear-gradient(180deg, rgba(18,24,34,0.98) 0%, rgba(13,18,27,0.96) 100%);
    border-radius: 14px;
    padding: 14px 10px;
    text-align: center;
    border: 1px solid rgba(var(--accent-rgb), 0.18);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 0 14px rgba(var(--accent-rgb), 0.08);
    transition: border-color 0.22s ease, box-shadow 0.22s ease;
}
.pv2-stat:hover {
    border-color: rgba(var(--accent-rgb), 0.35);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 0 22px rgba(var(--accent-rgb), 0.14);
}
.pv2-stat-icon {
    font-size: 22px;
    margin-bottom: 6px;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    width: 52px;
    height: 52px;
    margin: 0 auto 8px;
    border-radius: 14px;
    background: rgba(var(--accent-rgb), 0.10);
    border: 1px solid rgba(var(--accent-rgb), 0.22);
    box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.12), inset 0 0 12px rgba(var(--accent-rgb), 0.06);
    transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.pv2-stat:hover .pv2-stat-icon {
    background: rgba(var(--accent-rgb), 0.18);
    border-color: rgba(var(--accent-rgb), 0.42);
    box-shadow: 0 0 22px rgba(var(--accent-rgb), 0.22), inset 0 0 16px rgba(var(--accent-rgb), 0.10);
}
.pv2-stat-img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 0 6px rgba(var(--accent-rgb), 0.30)) brightness(1.1);
    transition: filter 0.22s ease;
}
.pv2-stat:hover .pv2-stat-img {
    filter: drop-shadow(0 0 10px rgba(var(--accent-rgb), 0.50)) brightness(1.2);
}
.pv2-coin-stat-img {
    filter: drop-shadow(0 0 6px rgba(234,179,8,0.35)) brightness(1.1);
}
.pv2-stat:hover .pv2-coin-stat-img {
    filter: drop-shadow(0 0 10px rgba(234,179,8,0.55)) brightness(1.2);
}
.pv2-stat-num { font-size: 18px; font-weight: 900; color: var(--text-white); }

/* заявки */
.pv2-withdraw-card { background: linear-gradient(180deg, rgba(18,26,23,0.96), rgba(13,20,17,0.96)); border: 1px solid rgba(var(--accent-rgb),0.18); border-radius: 14px; padding: 14px; box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 14px 34px rgba(0,0,0,0.22); }
.pv2-withdraw-item-preview { width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; margin: 10px 0 6px; border-radius: 14px; background: radial-gradient(circle, rgba(var(--accent-rgb),0.14), transparent 68%); }
.pv2-withdraw-item-img { max-width: 58px; max-height: 58px; object-fit: contain; display: block; filter: drop-shadow(0 0 10px rgba(var(--accent-rgb),0.14)); }
.pv2-withdraw-item-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 30px; }
.pv2-withdraw-fallback-img { width: 100%; height: 100%; object-fit: contain; }
.pv2-btn-icon { width: 14px; height: 14px; object-fit: contain; vertical-align: -0.2em; }
.pv2-withdraw-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.pv2-withdraw-status { font-size: 10px; font-weight: 900; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; }
.pv2-withdraw-status.pending { background: rgba(245,158,11,0.15); color: #f59e0b; }
.pv2-withdraw-status.completed { background: rgba(34,197,94,0.15); color: #22c55e; }
.pv2-withdraw-status.rejected { background: rgba(239,68,68,0.15); color: #ef4444; }
.pv2-withdraw-status.archived { background: rgba(107,114,128,0.18); color: #d1d5db; }
.pv2-chat-btn { width: 100%; margin-top: 8px; background: rgba(255,255,255,0.035); border: 1px solid rgba(var(--accent-rgb),0.24); color: var(--text-main); padding: 9px 10px; border-radius: 10px; font-size: 11px; font-weight: 900; cursor: pointer; transition: 0.2s; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.pv2-chat-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(var(--accent-rgb),0.10); transform: translateY(-1px); }
.pv2-cancel-btn { flex: 1; margin-top: 8px; background: rgba(239,68,68,0.045); border: 1px solid rgba(239,68,68,0.65); color: var(--danger); padding: 9px 10px; border-radius: 10px; font-size: 11px; font-weight: 900; cursor: pointer; transition: 0.2s; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.pv2-cancel-btn:hover { background: var(--danger); color: white; }
.pv2-btn-glyph { width: 14px; height: 14px; display: inline-block; position: relative; flex: 0 0 14px; }
.pv2-btn-glyph-chat::before { content: ''; position: absolute; inset: 2px 1px 4px; border-radius: 8px; border: 2px solid currentColor; }
.pv2-btn-glyph-chat::after { content: ''; position: absolute; left: 3px; bottom: 1px; width: 6px; height: 6px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: skew(-18deg); }
.pv2-btn-glyph-cancel::before,
.pv2-btn-glyph-cancel::after { content: ''; position: absolute; left: 1px; right: 1px; top: 6px; height: 2px; border-radius: 999px; background: currentColor; }
.pv2-btn-glyph-cancel::before { transform: rotate(45deg); }
.pv2-btn-glyph-cancel::after { transform: rotate(-45deg); }
.pv2-withdraw-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }

/* фильтры */
.profile-v2-section-title { text-align: center; font-size: 16px; font-weight: 900; color: var(--text-white); text-transform: uppercase; letter-spacing: 2px; margin: 18px 0 12px; }
.pv2-items-filters { display: flex; gap: 10px; margin-bottom: 15px; flex-wrap: wrap; }
.pv2-filter { background: var(--bg-panel); border: 1px solid var(--border); color: var(--text-muted); padding: 8px 14px; border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; transition: 0.2s; }
.pv2-filter.active { background: var(--accent); border-color: var(--accent); color: white; }
.pv2-filter:hover { border-color: var(--accent); color: var(--accent); }

.pv2-sell-all { display: flex; align-items: center; justify-content: center; gap: 10px; background: linear-gradient(180deg, var(--danger) 0%, #cc3333 100%); border: none; color: white; padding: 12px 22px; border-radius: 8px; font-size: 13px; font-weight: 900; text-transform: uppercase; cursor: pointer; transition: 0.2s; box-shadow: 0 4px 15px rgba(239,68,68,0.3); width: 100%; max-width: 400px; margin: 0 auto 20px; }
.pv2-sell-all:hover { filter: brightness(1.15); transform: translateY(-2px); }

/* сетка предметов */
.pv2-items-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
@media (max-width: 1200px) { .pv2-items-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 768px) { .pv2-items-grid { grid-template-columns: repeat(3, 1fr); } }
.pv2-item-card {
    background: linear-gradient(180deg, var(--bg-card) 0%, #14161d 100%);
    border: 1px solid var(--border);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: 0.25s;
    border-bottom: none;
}
.pv2-item-card.is-withdrawal {
    opacity: 0.95;
}
.pv2-item-status-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
    background: rgba(245, 158, 11, 0.18);
    border: 1px solid rgba(245, 158, 11, 0.45);
    color: #fbbf24;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 3px 7px;
    border-radius: 6px;
    pointer-events: none;
}
.pv2-item-card.status-rejected .pv2-item-status-badge,
.pv2-item-card.status-failed .pv2-item-status-badge,
.pv2-item-card.status-error .pv2-item-status-badge {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.45);
    color: #f87171;
}
.pv2-item-card.status-completed .pv2-item-status-badge {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.45);
    color: #4ade80;
}
.pv2-item-actions.is-withdrawal-actions {
    display: flex;
    gap: 6px;
    padding: 0 8px 10px;
}
.pv2-item-actions.is-withdrawal-actions .pv2-chat-btn,
.pv2-item-actions.is-withdrawal-actions .pv2-cancel-btn {
    flex: 1;
    justify-content: center;
    font-size: 10px;
    padding: 7px 6px;
}
.pv2-item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.5);
    border-color: var(--rarity-color);
}
.pv2-item-img {
    height: 85px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 60%, rgba(255,255,255,0.05) 0%, transparent 60%);
    position: relative;
}
.pv2-item-real-img { max-width: 78%; max-height: 78%; object-fit: contain; display: block; filter: drop-shadow(0 0 10px var(--rarity-color)); }
.pv2-item-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 36px; filter: drop-shadow(0 0 8px var(--rarity-color)60); }
.pv2-item-price {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--rarity-color);
    color: white;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 900;
    z-index: 5;
    letter-spacing: 0.3px;
}
.pv2-item-name {
    padding: 6px 10px 0;
    font-size: 12px;
    color: var(--text-white);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}
.pv2-item-source {
    padding: 4px 10px 0;
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.25;
    min-height: 28px;
    overflow-wrap: anywhere;
}
.pv2-item-actions {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 8px 8px 10px;
    position: relative;
}
.pv2-act-btn {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    font-size: 14px;
    color: var(--text-muted);
    position: relative;
}
.pv2-act-btn:hover {
    background: var(--rarity-color);
    border-color: var(--rarity-color);
    color: white;
    transform: scale(1.1);
}
.pv2-act-btn[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 9px);
    transform: translate(-50%, 4px);
    min-width: max-content;
    max-width: 180px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text-white);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    padding: 7px 10px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    z-index: 30;
    box-shadow: 0 8px 20px rgba(0,0,0,0.35);
    transition: opacity 0.18s ease, transform 0.18s ease;
}
.pv2-act-btn[data-tooltip]::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: calc(100% + 4px);
    width: 9px;
    height: 9px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    transform: translateX(-50%) rotate(45deg);
    opacity: 0;
    pointer-events: none;
    z-index: 31;
    transition: opacity 0.18s ease;
}
.pv2-act-btn[data-tooltip]:hover::after,
.pv2-act-btn[data-tooltip]:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, 0);
}
.pv2-act-btn[data-tooltip]:hover::before,
.pv2-act-btn[data-tooltip]:focus-visible::before {
    opacity: 1;
}
.pv2-item-bar {
    height: 4px;
    background: var(--rarity-color);
    width: 100%;
    margin-top: auto;
}

.pv2-empty { grid-column: 1 / -1; text-align: center; color: var(--text-muted); padding: 40px; font-size: 14px; font-weight: 700; }

/* --- Requested UI upgrades --- */
.banner-slot { margin-bottom: 18px; }
.cases-sections { display: flex; flex-direction: column; gap: 34px; align-items: center; }
.case-section { width: min(100%, 1540px); margin: 0 auto; }
.case-section-title { margin: 0 0 18px; }
.case-section .cases-grid { padding: 0 10px; }

.bottom-panel-header { min-height: 64px; }
.bottom-panel-filters select,
.bottom-panel-filters .price-input,
.bottom-panel-filters .search-btn {
    min-height: 40px;
    border-radius: 6px;
    font-size: 13px;
}
.bottom-panel-filters select { min-width: 96px; }
.bottom-panel-filters .price-input { width: 92px; padding: 0 10px; }
.bottom-panel-filters .search-btn { width: 44px; font-size: 18px; display: flex; align-items: center; justify-content: center; padding: 0; }
.bottom-panel-filters .search-btn .upgrade-search-icon { width: 20px; height: 20px; object-fit: contain; display: block; }
.quick-btn.shuffle { width: 44px; height: 34px; padding: 4px; display: inline-flex; align-items: center; justify-content: center; }
.quick-btn.shuffle img { width: 26px; height: 26px; object-fit: contain; display: block; }
.quick-btn.shuffle img {
    filter: brightness(1.25) drop-shadow(0 0 5px rgba(var(--accent-rgb),0.20));
    transition: transform 0.2s ease, filter 0.2s ease;
}
.quick-btn.shuffle:hover img {
    transform: rotate(8deg) scale(1.08);
    filter: brightness(1.55) drop-shadow(0 0 7px rgba(var(--accent-rgb),0.42));
}

.profile-v2-page { padding-top: 8px; }
.profile-v2-title { margin-bottom: 18px; }
.profile-v2-grid { align-items: start; margin-bottom: 18px; }
.pv2-inline-icon { width: 26px; height: 26px; object-fit: contain; display: block; }
.pv2-inventory-count { margin-top: 14px; font-size: 13px; color: var(--text-muted); text-align: center; }
.pv2-withdrawn-total { margin-top: 12px; padding: 12px 14px; border: 1px solid rgba(var(--accent-rgb), 0.18); border-radius: 12px; background: rgba(var(--accent-rgb), 0.05); color: var(--text-muted); font-size: 12px; text-align: center; }
.pv2-withdrawn-total span { color: var(--accent); font-weight: 900; }
.pv2-avatar-toggle input { accent-color: #22c55e; }
.pv2-settings-open { width: min(100%, 280px); margin: 0 auto; background: rgba(255,255,255,0.04); border: 1px solid rgba(var(--accent-rgb), 0.4); color: var(--accent); padding: 12px 14px; border-radius: 12px; font-size: 12px; font-weight: 900; text-transform: uppercase; cursor: pointer; transition: 0.2s; box-shadow: inset 0 1px 0 rgba(255,255,255,0.03); }
.pv2-settings-open:hover { background: rgba(var(--accent-rgb), 0.14); color: white; transform: translateY(-1px); }
.pv2-avatar-upload-help { position: relative; }
.pv2-avatar-upload-help::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translate(-50%, 4px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text-white);
    padding: 8px 10px;
    font-size: 11px;
    line-height: 1.25;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 10px 24px rgba(0,0,0,0.35);
    transition: 0.18s ease;
    z-index: 40;
}
.pv2-avatar-upload-help:hover::after { opacity: 1; transform: translate(-50%, 0); }
.pv2-best-drop-wide { display: none; }
.pv2-best-drop-panel { min-height: 132px; margin-top: 2px; }
.pv2-best-drop-content { display: flex; align-items: center; justify-content: flex-start; gap: 16px; }
.pv2-best-drop-panel .pv2-best-drop-icon { width: 64px; height: 64px; flex-basis: 64px; border-radius: 14px; background: radial-gradient(circle at 50% 50%, rgba(var(--accent-rgb),0.16) 0%, transparent 72%); }
.pv2-best-drop-panel .pv2-best-drop-img { max-width: 58px; max-height: 58px; }
.pv2-best-name { color: var(--text-white); font-size: 20px; font-weight: 900; line-height: 1.1; }
.pv2-best-price { color: var(--accent); font-size: 16px; font-weight: 900; margin-top: 5px; }
.pv2-best-source { color: color-mix(in srgb, var(--accent) 48%, var(--text-muted)); font-size: 12px; margin-top: 6px; }
.pv2-code {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(var(--accent-rgb), 0.08);
    border: 1px dashed rgba(var(--accent-rgb), 0.4);
    color: var(--text-white);
    box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.10);
}
.profile-v2-left,
.profile-v2-center,
.profile-v2-right {
    display: block;
}
.profile-v2-left.pv2-side-stack,
.profile-v2-right.pv2-side-stack {
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.pv2-items-filters { margin-bottom: 6px; }
.pv2-sell-all { max-width: none; margin: 0 0 10px; border-radius: 6px; justify-content: flex-start; color: #fff; }
.profile-v2-section-title { margin-bottom: 6px; }

.pv2-settings-modal {
    position: relative;
    max-width: 860px;
    width: min(92vw, 860px);
    max-height: calc(100vh - 40px);
    background: linear-gradient(145deg, #0b0f16 0%, #151b26 50%, #090c12 100%);
    border: 1px solid rgba(var(--accent-rgb), 0.22);
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 0 0 1px rgba(var(--accent-rgb), 0.06), 0 32px 90px rgba(0,0,0,0.7), 0 0 80px rgba(var(--accent-rgb), 0.14);
}
.pv2-settings-modal::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -25%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(var(--accent-rgb), 0.16), transparent 55%);
    pointer-events: none;
    z-index: 0;
}
.pv2-settings-modal::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -20%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(255,255,255,0.03), transparent 55%);
    pointer-events: none;
    z-index: 0;
}
.pv2-settings-modal > * { position: relative; z-index: 1; }
#profile-settings-modal.modal-overlay,
#deposit-modal.modal-overlay {
    background: rgba(6, 8, 12, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.pv2-settings-modal .modal-header {
    background: linear-gradient(90deg, rgba(8, 12, 18, 0.98), rgba(12, 16, 24, 0.98));
    border-bottom: 1px solid rgba(var(--accent-rgb), 0.14);
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.pv2-settings-modal .modal-header h3 { color: #f8fafc; font-size: 16px; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; text-shadow: 0 0 16px rgba(var(--accent-rgb), 0.35); }
.pv2-settings-modal .modal-close {
    color: #64748b;
    font-size: 26px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: 0.2s;
    background: transparent;
    border: none;
    cursor: pointer;
}
.pv2-settings-modal .modal-close:hover { color: var(--danger); background: rgba(239,68,68,0.08); }
.pv2-settings-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 0;
    padding: 0;
    min-height: 480px;
}
.pv2-settings-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px;
    background:
        radial-gradient(circle at 10% 20%, rgba(var(--accent-rgb), 0.06), transparent 30%),
        rgba(9, 13, 20, 0.96);
    border-right: 1px solid rgba(var(--accent-rgb), 0.12);
}
.pv2-settings-menu-btn,
.pv2-theme-btn {
    background: transparent;
    border: 1px solid transparent;
    border-left: 3px solid transparent;
    color: #94a3b8;
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    text-align: left;
    transition: 0.18s ease;
}
.pv2-settings-menu-btn:hover,
.pv2-settings-menu-btn.active,
.pv2-theme-btn:hover,
.pv2-theme-btn.active {
    color: var(--accent);
    background: rgba(var(--accent-rgb), 0.10);
    border-left-color: var(--accent);
}
.pv2-settings-menu-btn.active {
    background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.16), rgba(var(--accent-rgb), 0.04));
    box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.18), inset 0 0 14px rgba(var(--accent-rgb), 0.06);
    text-shadow: 0 0 12px rgba(var(--accent-rgb), 0.35);
}
.pv2-settings-menu-btn.danger { color: var(--danger); }
.pv2-settings-menu-btn.danger:hover,
.pv2-settings-menu-btn.danger.active { background: rgba(239,68,68,0.10); border-left-color: var(--danger); }
.pv2-settings-content {
    background:
        radial-gradient(circle at 20% 15%, rgba(var(--accent-rgb), 0.08), transparent 28%),
        radial-gradient(circle at 85% 85%, rgba(var(--accent-rgb), 0.05), transparent 28%),
        rgba(12, 16, 24, 0.96);
    border: none;
    border-radius: 0;
    padding: 24px;
    min-height: 360px;
    max-height: calc(100vh - 130px);
    overflow-y: auto;
    box-shadow: inset 0 0 80px rgba(var(--accent-rgb), 0.04);
}
.pv2-settings-content::-webkit-scrollbar { width: 8px; }
.pv2-settings-content::-webkit-scrollbar-track { background: rgba(255,255,255,0.04); border-radius: 4px; }
.pv2-settings-content::-webkit-scrollbar-thumb { background: rgba(var(--accent-rgb), 0.35); border-radius: 4px; }
.pv2-settings-content::-webkit-scrollbar-thumb:hover { background: rgba(var(--accent-rgb), 0.55); }
.pv2-settings-back {
    display: none;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    padding: 0;
    margin-bottom: 10px;
}
.pv2-settings-back:hover { color: #fff; }
.pv2-settings-panel { display: none; flex-direction: column; gap: 14px; }
.pv2-settings-panel.active { display: flex; }
.pv2-settings-msg { font-size: 12px; min-height: 18px; margin-top: 2px; font-weight: 800; }
.pv2-settings-content .pv2-card-title {
    font-size: 14px;
    font-weight: 900;
    color: #f8fafc;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 4px;
    text-shadow: 0 0 12px rgba(var(--accent-rgb), 0.25);
}
.pv2-settings-content .pv2-card-sub {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.45;
}
.pv2-settings-content .pv2-input {
    background: rgba(8,12,18,0.6);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 13px 16px;
    font-size: 13px;
    transition: 0.2s;
    width: 100%;
}
.pv2-settings-content .pv2-input:focus { border-color: rgba(var(--accent-rgb), 0.7); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12), 0 0 20px rgba(var(--accent-rgb), 0.12); }
.pv2-settings-content .pv2-input:disabled { opacity: 0.7; cursor: not-allowed; }
.pv2-settings-content .pv2-btn-outline {
    width: 100%;
    padding: 13px 16px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.5px;
    border: 1px solid rgba(var(--accent-rgb), 0.45);
    background: rgba(var(--accent-rgb), 0.08);
    box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.06);
}
.pv2-settings-content .pv2-btn-outline:hover { background: var(--accent); color: white; transform: translateY(-1px); box-shadow: 0 10px 26px rgba(var(--accent-rgb), 0.28), 0 0 20px rgba(var(--accent-rgb), 0.16); }
.pv2-switch-row,
.pv2-session-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 14px 16px;
    color: var(--text-main);
    font-size: 13px;
    transition: 0.2s;
}
.pv2-switch-row:hover,
.pv2-session-card:hover { border-color: rgba(var(--accent-rgb), 0.28); background: rgba(var(--accent-rgb), 0.06); box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.06); }
.pv2-switch-row input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 44px;
    height: 26px;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
    position: relative;
    cursor: pointer;
    transition: 0.2s;
    flex: 0 0 44px;
}
.pv2-switch-row input[type="checkbox"]::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.pv2-switch-row input[type="checkbox"]:checked { background: var(--accent); box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.45); }
.pv2-switch-row input[type="checkbox"]:checked::after { left: 21px; box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.35); }
.pv2-session-card { align-items: flex-start; flex-direction: column; gap: 10px; }
.pv2-session-card b { color: #f8fafc; font-size: 13px; }
.pv2-session-card span { color: #94a3b8; font-size: 11px; }
.pv2-session-card .pv2-btn-outline { width: auto; margin-top: 4px; }
.pv2-volume-row input[type="range"] {
    -webkit-appearance: none;
    width: 160px;
    height: 5px;
    background: rgba(148,163,184,0.22);
    border-radius: 3px;
    outline: none;
}
.pv2-volume-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.7);
}
.pv2-volume-row input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    cursor: pointer;
    box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.7);
}
.pv2-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pv2-choice-grid .pv2-theme-btn,
.pv2-choice-grid .pv2-btn-outline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    min-height: 48px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transition: 0.2s;
}
.pv2-choice-grid .pv2-theme-btn:hover,
.pv2-choice-grid .pv2-btn-outline:hover {
    border-color: rgba(var(--accent-rgb), 0.35);
    background: rgba(var(--accent-rgb), 0.08);
    box-shadow: 0 6px 18px rgba(0,0,0,0.18), 0 0 16px rgba(var(--accent-rgb), 0.10);
    transform: translateY(-2px);
}
.pv2-choice-grid .pv2-language-btn.active { background: var(--accent); border-color: var(--accent); color: white; box-shadow: 0 0 22px rgba(var(--accent-rgb), 0.35), inset 0 0 14px rgba(255,255,255,0.12); }
.pv2-choice-grid .pv2-theme-btn.active { color: var(--accent); background: rgba(var(--accent-rgb), 0.14); border-color: rgba(var(--accent-rgb), 0.5); border-left-color: var(--accent); box-shadow: 0 0 22px rgba(var(--accent-rgb), 0.22), inset 0 0 14px rgba(var(--accent-rgb), 0.08); text-shadow: 0 0 12px rgba(var(--accent-rgb), 0.25); }
.pv2-delete-warning { color: var(--danger); font-size: 13px; font-weight: 800; background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.35); border-radius: 8px; padding: 12px; }
.pv2-delete-btn { background: var(--danger); border: none; color: white; padding: 12px 16px; border-radius: 7px; font-size: 12px; font-weight: 900; cursor: pointer; text-transform: uppercase; }

.case-v2-header { padding-top: 0; }
.case-v2-top-bar { max-width: 680px; margin: 0 auto 2px; }
.case-v2-label { font-size: 15px; color: var(--accent); margin-bottom: 6px; }
.case-v2-title { margin-bottom: 14px; }
.case-v2-image-wrap { margin-bottom: 10px; }
.case-v2-image { width: 430px; height: 430px; transform: translate(5px, -10px); }
.case-v2-image:hover { transform: translate(5px, -10px) scale(1.03); }
.case-action-icon { width: 20px; height: 20px; object-fit: contain; display: block; }
.case-v2-header.is-opening { padding-bottom: 24px; }
.case-v2-header.is-opening .roulette-section { max-height: none; overflow: visible; padding: 12px 12px 10px; margin: 0 auto 10px; }
.case-v2-header.is-opening .roulette-container { min-height: 0; margin-bottom: 8px; align-items: start; }
.case-v2-header.is-opening .roulette-container.is-single-grid { min-height: 136px; margin-bottom: 4px; }
.case-v2-header.is-opening .roulette-container.is-single-grid .roulette-window { height: 136px; }
.case-v2-header.is-opening .roulette-container.is-multi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.case-v2-header.is-opening .roulette-window { height: 136px; min-width: 0; }
.case-v2-header.is-opening .roulette-item { height: 118px; width: 118px; min-width: 118px; padding-top: 8px; border-radius: 9px; }
.case-v2-header.is-opening .roulette-item .item-icon { width: 68px; height: 54px; margin-bottom: 4px; }
.case-v2-header.is-opening .roulette-item .item-name { font-size: 9px; line-height: 1.15; padding: 0 6px; }
.case-v2-header.is-opening .roulette-item .item-price { font-size: 9px; margin-bottom: 6px; }
.case-v2-header.is-opening .roulette-container.is-many-grid { gap: 8px 10px; }
.case-v2-header.is-opening .roulette-container.is-many-grid .roulette-window { height: 118px; }
.case-v2-header.is-opening .roulette-container.is-many-grid .roulette-item { height: 102px; width: 104px; min-width: 104px; padding-top: 6px; }
.case-v2-header.is-opening .roulette-container.is-many-grid .roulette-item .item-icon { width: 56px; height: 44px; }
.case-v2-header.is-opening .roulette-container.is-many-grid .roulette-item .item-name { font-size: 8px; }
.case-v2-header.is-opening .roulette-container.is-many-grid .roulette-item .item-price { font-size: 8px; margin-bottom: 5px; }
.case-v2-header.is-opening .roulette-result { margin: 6px 0 4px; font-size: 15px; min-height: 0; }
.case-v2-header.is-opening .bulk-summary { margin: 4px 0 6px; }
.case-v2-header.is-opening .roulette-container.is-single-grid + .roulette-result + .bulk-summary { display: none; }
.case-v2-header.is-opening .case-v2-actions { margin-top: 6px; }
.case-v2-header.is-opening + .case-v2-content,
.case-v2-header.is-opening ~ .case-v2-content {
    margin-top: 0 !important;
}
.case-v2-items { grid-template-columns: repeat(6, minmax(0, 1fr)); justify-content: center; }

.withdraw-modal .modal-header h3 { width: 100%; text-align: center; }
.withdraw-modal .modal-body { display: flex; flex-direction: column; align-items: center; }
.withdraw-modal .modal-body > div { width: min(100%, 520px); }
.withdraw-modal label { text-align: center; }
.withdraw-modal .input-field { flex: 0 0 auto; min-height: 46px; font-size: 15px; text-align: center; }
.withdraw-modal #withdraw-nick {
    display: block;
    width: min(100%, 380px);
    margin: 0 auto;
}
.withdraw-modal #withdraw-btn { width: min(100%, 520px); min-height: 48px; font-size: 13px; }
.withdraw-items-list { width: 100%; }

/* Global theme tint overrides */
.banner-slot { box-shadow: 0 0 12px rgba(var(--accent-rgb),0.10); }
.case-card-image { filter: drop-shadow(0 0 6px rgba(255,255,255,0.08)) drop-shadow(0 0 12px rgba(var(--accent-rgb),0.12)); }
.case-card:hover .case-card-image { filter: drop-shadow(0 0 8px rgba(255,255,255,0.10)) drop-shadow(0 0 16px rgba(var(--accent-rgb),0.18)); }
.case-btn,
.view-btn.active,
.case-v2-open-btn,
.bulk-btn,
.btn-again { background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%); }
.case-btn,
.view-btn.active,
.case-v2-open-btn,
.case-v2-fast-btn:hover,
.pv2-language-btn.active { box-shadow: 0 0 14px rgba(var(--accent-rgb),0.22); }
.case-source-btn.active,
.pv2-theme-btn.active,
.pv2-theme-btn:hover,
.pv2-settings-menu-btn.active,
.pv2-settings-menu-btn:hover { background: rgba(var(--accent-rgb),0.12); }
.bottom-panel-body,
.upgrade-selected-area,
.withdraw-items-list { scrollbar-color: var(--accent) #101915; }
.bottom-panel-body::-webkit-scrollbar-thumb,
.upgrade-selected-area::-webkit-scrollbar-thumb,
.withdraw-items-list::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), 0 0 12px rgba(var(--accent-rgb),0.28); }
.bottom-panel-body::-webkit-scrollbar-thumb:hover,
.upgrade-selected-area::-webkit-scrollbar-thumb:hover,
.withdraw-items-list::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, var(--accent-hover) 0%, var(--accent) 100%); }
.quick-btn.active,
.upgrade-item-card.target,
.admin-notice { background: rgba(var(--accent-rgb),0.10); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb),0.18), 0 0 14px rgba(var(--accent-rgb),0.16); }

.admin-economy-panel {
    margin: 0 0 34px;
    padding: 22px;
    border: 1px solid rgba(var(--accent-rgb),0.22);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(var(--accent-rgb),0.12), transparent 34%),
        linear-gradient(180deg, rgba(18,24,34,0.96), rgba(9,14,18,0.96));
    box-shadow: 0 24px 70px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.04);
}
.admin-economy-head {
    display: flex;
    justify-content: space-between;
    gap: 22px;
    align-items: flex-start;
    margin-bottom: 18px;
}
.admin-economy-kicker {
    color: var(--accent);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}
.admin-economy-title {
    margin-top: 4px;
    color: var(--text-white);
    font-size: 24px;
    font-weight: 900;
    text-transform: uppercase;
}
.admin-economy-subtitle {
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.45;
}
.admin-economy-balance {
    min-width: 230px;
    padding: 14px 16px;
    border: 1px solid rgba(var(--accent-rgb),0.28);
    border-radius: 14px;
    background: rgba(6,10,14,0.62);
    text-align: right;
}
.admin-economy-balance span,
.admin-economy-card span,
.admin-economy-mini span {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}
.admin-economy-balance b {
    display: block;
    margin-top: 4px;
    font-size: 24px;
    color: var(--text-white);
}
.admin-economy-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.admin-economy-card,
.admin-economy-mini,
.admin-period-card,
.admin-economy-table-card {
    border: 1px solid rgba(148,163,184,0.16);
    border-radius: 14px;
    background: rgba(8,13,20,0.72);
}
.admin-economy-card {
    padding: 15px;
}
.admin-economy-card b {
    display: block;
    margin: 7px 0 4px;
    color: var(--text-white);
    font-size: 20px;
    font-weight: 900;
}
.admin-economy-card small {
    color: var(--text-muted);
    font-size: 11px;
}
.admin-economy-split {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}
.admin-economy-mini {
    padding: 16px;
}
.admin-mini-title {
    margin-bottom: 12px;
    color: var(--text-white);
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.admin-economy-mini div:not(.admin-mini-title) {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-top: 1px solid rgba(148,163,184,0.10);
}
.admin-economy-mini b {
    color: var(--text-white);
}
.admin-period-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.admin-period-card {
    padding: 14px;
}
.admin-period-card b,
.admin-period-card span {
    display: block;
}
.admin-period-card b {
    color: var(--text-white);
    margin-bottom: 8px;
}
.admin-period-card span {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.7;
}
.admin-economy-chart {
    height: 150px;
    display: flex;
    align-items: flex-end;
    gap: 7px;
    padding: 18px 18px 14px;
    margin-bottom: 16px;
    border: 1px solid rgba(148,163,184,0.14);
    border-radius: 18px;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(var(--accent-rgb),0.08), transparent 34%),
        repeating-linear-gradient(to top, rgba(148,163,184,0.08) 0 1px, transparent 1px 32px),
        radial-gradient(circle at 50% 0, rgba(var(--accent-rgb),0.16), transparent 55%),
        linear-gradient(180deg, rgba(15,23,42,0.62), rgba(2,6,10,0.72));
}
.admin-economy-chart::before {
    content: "Прибыль за 30 дней";
    position: absolute;
    top: 12px;
    left: 18px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.admin-economy-chart span {
    flex: 1;
    min-width: 5px;
    height: var(--h, 8%);
    border-radius: 999px 999px 5px 5px;
    background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(var(--accent-rgb),1) 28%, rgba(var(--accent-rgb),0.72));
    box-shadow: 0 0 18px rgba(var(--accent-rgb),0.35), inset 0 1px 0 rgba(255,255,255,0.45);
    transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}
.admin-economy-chart span:hover {
    transform: translateY(-4px) scaleY(1.04);
    filter: brightness(1.12);
    box-shadow: 0 0 26px rgba(var(--accent-rgb),0.52), inset 0 1px 0 rgba(255,255,255,0.6);
}
.admin-economy-chart span.is-loss {
    background: linear-gradient(180deg, rgba(255,255,255,0.88), #ef4444 30%, rgba(127,29,29,0.86));
    box-shadow: 0 0 18px rgba(239,68,68,0.34), inset 0 1px 0 rgba(255,255,255,0.35);
}
.admin-chart-empty {
    width: 100%;
    align-self: center;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 800;
}
.admin-economy-columns {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 12px;
}
.admin-economy-table-card {
    padding: 16px;
    overflow: hidden;
}
.admin-mini-table {
    width: 100%;
    border-collapse: collapse;
}
.admin-mini-table th,
.admin-mini-table td {
    padding: 9px 8px;
    border-bottom: 1px solid rgba(148,163,184,0.10);
    color: var(--text-muted);
    font-size: 12px;
    text-align: left;
}
.admin-mini-table th {
    color: var(--text-white);
    font-size: 10px;
    text-transform: uppercase;
}
.admin-mini-table td:first-child {
    color: var(--text-white);
    font-weight: 800;
}
.admin-user-rtp-form {
    min-width: 170px;
}
.admin-user-rtp-form-compact {
    min-width: 150px;
    margin-top: 8px;
}
.admin-user-rtp-current {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    white-space: nowrap;
}
.admin-user-rtp-current span {
    color: var(--text-muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.admin-user-rtp-tools {
    display: flex;
    align-items: center;
    gap: 6px;
}
.admin-user-rtp-tools .input-field {
    width: 66px;
    min-width: 66px;
    height: 30px;
    padding: 6px 8px;
}
.admin-user-rtp-tools .btn-small {
    height: 30px;
    padding: 5px 8px;
    font-size: 10px;
}
.admin-top-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.admin-top-grid div {
    padding: 12px;
    border-radius: 12px;
    background: rgba(2,6,10,0.35);
}
.admin-top-grid b,
.admin-top-grid span,
.admin-records span {
    display: block;
}
.admin-top-grid b {
    color: var(--text-white);
    font-size: 12px;
    margin-bottom: 7px;
}
.admin-top-grid span,
.admin-records span {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.65;
}
.admin-records {
    display: grid;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(148,163,184,0.12);
}
.is-profit { color: var(--accent) !important; }
.is-loss { color: #ef4444 !important; }

@media (max-width: 1100px) {
    .admin-economy-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .admin-economy-split,
    .admin-period-grid,
    .admin-economy-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .admin-economy-panel {
        padding: 16px;
        border-radius: 14px;
    }
    .admin-economy-head {
        flex-direction: column;
    }
    .admin-economy-balance {
        width: 100%;
        min-width: 0;
        text-align: left;
    }
    .admin-economy-summary,
    .admin-top-grid {
        grid-template-columns: 1fr;
    }
    .admin-mini-table {
        min-width: 620px;
    }
    .admin-economy-table-card {
        overflow-x: auto;
    }
}
.chance-arrow-marker,
.circle-svg,
.chance-circle.v2-design .circle-svg { filter: drop-shadow(0 0 12px rgba(var(--accent-rgb),0.22)); }

/* Profile inventory: CS-like drop layout */
.pv2-inventory-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 8px 0 20px;
}
.pv2-items-filters {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin: 0;
}
.pv2-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    color: #b8c0d2;
    font-size: 15px;
    font-weight: 600;
    text-transform: none;
    line-height: 22px;
}
.pv2-filter::before {
    content: '';
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    background: #141a23;
    border: 1px solid #333b4a;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.25);
}
.pv2-filter.active,
.pv2-filter:hover {
    background: transparent;
    border-color: transparent;
    color: #d8dfec;
}
.pv2-filter.active::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-color: #ff8a24;
    color: #ff8a24;
    font-size: 18px;
    font-weight: 900;
}
.pv2-sell-all {
    width: auto;
    max-width: none;
    min-height: 38px;
    margin: 0;
    padding: 9px 16px;
    border: 2px solid #ff8a24;
    border-radius: 0;
    background: transparent;
    color: #f6f8ff;
    box-shadow: none;
    justify-content: center;
    gap: 8px;
    font-size: 11px;
    letter-spacing: 0;
    white-space: nowrap;
}
.pv2-sell-all:hover {
    filter: none;
    transform: none;
    background: rgba(255,138,36,0.08);
    box-shadow: 0 0 18px rgba(255,138,36,0.14);
}
.pv2-sell-all .sell-icon,
.pv2-sell-all .sell-amount {
    color: #ff8a24;
    font-weight: 900;
}
.pv2-sell-all .sell-icon { font-size: 17px; }
.pv2-sell-all .sell-amount { font-size: 15px; }
.pv2-items-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 24px 20px;
}
.pv2-item-card {
    min-height: 210px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.06);
    background:
        radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--rarity-color) 22%, transparent) 0%, transparent 55%),
        linear-gradient(160deg, #1b2333 0%, #141a27 48%, #10141d 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 6px 18px rgba(0,0,0,0.35);
    overflow: hidden;
}
.pv2-item-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(70% 55% at 50% 42%, color-mix(in srgb, var(--rarity-color) 30%, transparent) 0%, transparent 70%);
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 0;
}
.pv2-item-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--rarity-color), transparent);
    opacity: 0.85;
    pointer-events: none;
    z-index: 3;
}
.pv2-item-card:hover {
    transform: translateY(-5px);
    border-color: color-mix(in srgb, var(--rarity-color) 55%, transparent);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 16px 34px rgba(0,0,0,0.5), 0 0 22px color-mix(in srgb, var(--rarity-color) 30%, transparent);
}
.pv2-item-card:hover::before { opacity: 0.85; }
.pv2-item-img {
    height: 102px;
    padding: 18px 12px 0;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 50% 55%, rgba(255,255,255,0.06) 0%, transparent 62%);
    z-index: 1;
}
.pv2-item-real-img {
    max-width: 88%;
    max-height: 86%;
    filter: drop-shadow(0 8px 12px rgba(0,0,0,0.38));
}
.pv2-item-fallback { font-size: 44px; }
.pv2-item-price {
    position: relative;
    top: auto;
    left: auto;
    align-self: flex-start;
    margin: 0 0 0 10px;
    padding: 4px 9px;
    border-radius: 0;
    background: rgba(22,30,42,0.95);
    color: #ff7d2b;
    font-size: 15px;
    letter-spacing: 0;
    z-index: 2;
}
.pv2-item-name {
    padding: 7px 10px 0;
    font-size: 15px;
    line-height: 1.15;
    text-align: left;
    white-space: nowrap;
    z-index: 2;
}
.pv2-item-source {
    padding: 3px 10px 8px;
    min-height: 25px;
    font-size: 12px;
    line-height: 1.2;
    text-align: left;
    color: #f2f4f8;
    z-index: 2;
}
.pv2-item-status {
    padding: 0 10px 10px;
    font-size: 11px;
    color: var(--danger);
    font-weight: 800;
    z-index: 2;
}
.pv2-item-actions {
    display: flex;
    gap: 8px;
    padding: 10px;
    margin-top: auto;
    border-top: 1px solid rgba(255,255,255,0.05);
    z-index: 2;
}
.pv2-act-btn {
    flex: 1;
    height: 36px;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 9px;
    background: rgba(255,255,255,0.04);
    color: #8b93a5;
    font-size: 16px;
    transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.pv2-act-btn:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.07);
    box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}
.pv2-act-btn img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
    pointer-events: none;
    filter: none;
    transition: transform 0.16s ease;
}
.pv2-act-btn:hover img {
    transform: scale(1.08);
}
.pv2-act-btn:active { transform: translateY(0); }
/* апгрейд */
.pv2-act-btn:nth-child(1):hover {
    color: #a855f7 !important;
    border-color: rgba(168,85,247,0.55);
    box-shadow: 0 4px 14px rgba(168,85,247,0.28);
}
/* продать */
.pv2-act-btn:nth-child(2):hover {
    color: #f59e0b !important;
    border-color: rgba(245,158,11,0.55);
    box-shadow: 0 4px 14px rgba(245,158,11,0.28);
}
/* вывод */
.pv2-act-btn:nth-child(3):hover {
    color: #3b82f6 !important;
    border-color: rgba(59,130,246,0.55);
    box-shadow: 0 4px 14px rgba(59,130,246,0.28);
}
.pv2-item-bar {
    height: 3px;
    margin-top: 0;
    background: linear-gradient(90deg, var(--rarity-color), #8b5cf6);
    z-index: 2;
}
.pv2-logout-note {
    color: var(--text-main);
    font-size: 13px;
    font-weight: 700;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 16px;
    line-height: 1.5;
}
.pv2-logout-btn {
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
    border: none;
    color: white;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: 0.2s;
}
.pv2-logout-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(var(--accent-rgb), 0.28); }

@media (max-width: 1200px) {
    .pv2-inventory-head { align-items: flex-start; flex-direction: column; }
    .pv2-items-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
    .pv2-items-filters { gap: 12px; }
    .pv2-filter { font-size: 13px; }
    .pv2-sell-all { width: 100%; white-space: normal; }
    .pv2-items-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
}
.pv2-avatar-toggle input,
.pv2-switch-row input { accent-color: var(--accent); }
.language-flag { display: inline-flex; width: 24px; flex: 0 0 24px; font-size: 18px; line-height: 1; }
.pv2-language-btn { display: flex; align-items: center; justify-content: flex-start; gap: 8px; }

/* ===== МОБИЛЬНОЕ МЕНЮ (базовые стили, скрыто на десктопе) ===== */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 0 9px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 9px;
    cursor: pointer;
    transition: 0.2s;
}
.mobile-menu-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--text-white);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}
.mobile-menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-toggle.open span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(4, 7, 12, 0.6);
    backdrop-filter: blur(2px);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.mobile-drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}
.mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 82%;
    max-width: 320px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    z-index: 999;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    padding: 16px;
    gap: 14px;
    overflow-y: auto;
    box-shadow: 8px 0 40px rgba(0,0,0,0.5);
}
.mobile-drawer.open { transform: translateX(0); }
.mobile-drawer-head { display: flex; align-items: center; justify-content: space-between; }
.mobile-drawer-close {
    background: none; border: none; color: var(--text-muted);
    font-size: 30px; line-height: 1; cursor: pointer; padding: 0 6px;
}
.mobile-drawer-close:hover { color: var(--text-white); }
.mobile-drawer-user {
    display: flex; align-items: center; gap: 12px; text-decoration: none;
    background: var(--bg-panel); border: 1px solid var(--border);
    border-radius: 10px; padding: 10px 12px;
}
.mobile-drawer-user .user-info { display: flex; flex-direction: column; }
.mobile-drawer-links { display: flex; flex-direction: column; gap: 8px; }
.mobile-drawer-link {
    display: block; width: 100%; text-align: left;
    padding: 13px 14px; border-radius: 10px;
    background: var(--bg-panel); border: 1px solid var(--border);
    color: var(--text-white); text-decoration: none;
    font-size: 15px; font-weight: 700; cursor: pointer;
    transition: 0.18s;
}
.mobile-drawer-link:hover, .mobile-drawer-link.active {
    border-color: var(--accent); color: var(--accent);
    background: rgba(var(--accent-rgb), 0.08);
}
.mobile-drawer-link.is-admin { color: var(--danger); border-color: rgba(239,68,68,0.4); }
.mobile-drawer-btn { text-align: left; font-family: inherit; }
body.no-scroll { overflow: hidden; }

/* ===== Адаптивность ===== */
@media (max-width: 900px) {
    html:has(.admin-page), html:has(.moderator-page), html:has(.media-page),
    body:has(.admin-page), body:has(.moderator-page), body:has(.media-page) {
        overflow-x: auto;
    }
    .admin-page, .moderator-page, .media-page {
        min-width: 1200px;
        padding: 10px;
        margin: 0;
    }
}

@media (max-width: 1200px) {
    .profile-header { grid-template-columns: 1fr; }
    .case-v2-items { grid-template-columns: repeat(4, 1fr); }
    .profile-v2-page { max-width: 640px; margin: 0 auto; padding: 16px; }
    .profile-v2-grid { grid-template-columns: 1fr; gap: 16px; }
    .profile-v2-left,
    .profile-v2-center,
    .profile-v2-right { width: 100%; }
    .pv2-items-grid { grid-template-columns: repeat(3, 1fr); }
    .live-sidebar { width: 150px; }
}

/* Планшеты и телефоны: убираем боковую ленту, включаем бургер-меню */
@media (max-width: 900px) {
    .app-layout { height: auto; min-height: 100vh; min-height: 100dvh; width: 100%; }
    .main-wrapper { min-height: 100vh; min-height: 100dvh; }
    .live-sidebar { display: none; }
    .nav-links { display: none; }
    .mobile-menu-toggle { display: flex; }
    .mobile-drawer-overlay { display: block; }
    .content-area { overflow-y: visible; padding: 18px 16px 0; }
    .top-nav { padding: 6px 14px; }
    .nav-left { gap: 12px; }
    .logo { font-size: 20px; }
    .nav-right { gap: 10px; }
    .user-profile { padding: 5px 10px; gap: 8px; }
    .user-avatar { width: 32px; height: 32px; line-height: 32px; font-size: 17px; }
    .user-info { font-size: 11px; }
    .site-footer { flex-direction: column; align-items: center; gap: 18px; text-align: center; }
    .site-footer-copy { text-align: center; }
    .site-footer-socials { align-self: center; margin: 0 auto; }
    /* модалка пополнения */
    .deposit-modal { grid-template-columns: 1fr; max-width: 94vw; }
    .deposit-sidebar { flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid #31394d; }
    .deposit-side-tab { flex: 1; min-height: 64px; min-width: 78px; font-size: 11px; }
    .deposit-side-icon { font-size: 22px; }
    /* Prevent iOS zoom on inputs */
    input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="tel"], input[type="search"], textarea, select {
        font-size: 16px;
    }
    /* Settings mobile: menu first, detail panels overlay */
    .pv2-settings-layout { grid-template-columns: 1fr; min-height: 0; }
    .pv2-settings-menu { display: flex; border-right: none; min-height: 360px; }
    .pv2-settings-content { display: none; max-height: calc(100vh - 110px); padding: 16px; }
    .pv2-settings-layout.panel-open .pv2-settings-menu { display: none; }
    .pv2-settings-layout.panel-open .pv2-settings-content { display: block; }
    .pv2-settings-back { display: inline-flex; }
    .pv2-settings-content .pv2-card-title { font-size: 13px; }
    .pv2-settings-content .pv2-card-sub { font-size: 11px; }
    .pv2-settings-content .pv2-input { padding: 10px 12px; font-size: 12px; }
    .pv2-settings-content .pv2-btn-outline { padding: 10px 12px; font-size: 11px; }
    .pv2-switch-row, .pv2-session-card { padding: 10px 12px; }
    .pv2-switch-row span { font-size: 12px; }
    .pv2-user-top { flex-direction: column; align-items: flex-start; }
    .pv2-user-actions { width: 100%; justify-content: flex-start; }
    .pv2-balance-row { flex-direction: column; }
    .pv2-balance-main { width: 100%; }
    .pv2-deposit-btn { width: 100%; }
    .pv2-best-drop-content { justify-content: flex-start; }
    /* Profile: keep desktop 3-column layout, just scaled down */
    .profile-v2-page { max-width: none; padding: 8px; }
    .profile-v2-title { font-size: 16px; letter-spacing: 2px; margin-bottom: 14px; }
    .profile-v2-title::after { width: 140px; }
    .profile-v2-grid { grid-template-columns: 1fr 1.2fr 1fr; gap: 8px; align-items: start; }
    .profile-v2-left,
    .profile-v2-center,
    .profile-v2-right { width: auto; }
    .pv2-side-stack { gap: 10px; }
    .pv2-card { padding: 10px; border-radius: 12px; }
    .pv2-card-header { gap: 8px; margin-bottom: 8px; }
    .pv2-card-icon { width: 28px; height: 28px; font-size: 14px; }
    .pv2-card-title { font-size: 9px; letter-spacing: 0.4px; }
    .pv2-card-sub { font-size: 9px; }
    .pv2-input { padding: 8px 10px; font-size: 11px; }
    .pv2-btn-outline { padding: 6px 10px; font-size: 9px; }
    .pv2-user-card { padding: 12px; }
    .pv2-user-top { flex-direction: column; align-items: center; gap: 8px; }
    .pv2-user-actions { justify-content: center; }
    .pv2-user-nick { font-size: 11px; }
    .pv2-avatar-wrap { width: 64px; height: 64px; margin-bottom: 8px; }
    .pv2-avatar { width: 64px; height: 64px; font-size: 26px; border-width: 2px; box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.08), 0 8px 16px rgba(0,0,0,0.42), 0 0 12px rgba(var(--accent-rgb), 0.2); }
    .pv2-level { width: 20px; height: 20px; font-size: 8px; border-width: 2px; }
    .pv2-avatar-form { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 6px; }
    .pv2-avatar-form .pv2-btn-outline { width: auto; }
    .pv2-settings-open { padding: 8px 12px; font-size: 10px; }
    .pv2-balance-row { flex-direction: row; flex-wrap: wrap; gap: 8px; }
    .pv2-balance-main { min-width: 0; padding: 8px 10px; gap: 8px; }
    .pv2-balance-icon { font-size: 16px; }
    .pv2-balance-num { font-size: 14px; }
    .pv2-deposit-btn { min-height: 40px; padding: 0 12px; font-size: 10px; width: auto; }
    .pv2-stats-row { gap: 6px; }
    .pv2-stat { padding: 6px 4px; }
    .pv2-stat-icon { width: 32px; height: 32px; margin-bottom: 4px; }
    .pv2-stat-img { width: 18px; height: 18px; }
    .pv2-stat-num { font-size: 12px; }
    .pv2-best-drop { padding: 10px; }
    .pv2-best-label { font-size: 9px; }
    .pv2-best-name { font-size: 14px; }
    .pv2-items-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
}

@media (max-width: 768px) {
    .banner-slot { aspect-ratio: 4 / 1; height: auto; }
    .banner-slot img, .banner-slot video, .banner-carousel-slide video, .banner-carousel-slide img { object-fit: contain; background: #07110a; }
    .cases-grid {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 10px !important;
        padding: 4px 0 0 !important;
    }

    .case-card {
        width: calc(50% - 5px) !important;
        min-width: 0 !important;
        min-height: 0 !important;
        padding: 12px 10px 13px !important;
        border-radius: 10px !important;
    }

    .case-title {
        font-size: 12px;
        min-height: 16px;
        margin-bottom: 4px;
    }

    .case-items-count {
        font-size: 9px;
        min-height: 14px;
        gap: 4px;
        margin-bottom: 10px;
    }

    .case-badge {
        padding: 2px 5px;
        font-size: 8px;
    }

    .case-img-box {
        height: clamp(114px, 27vw, 154px);
        flex: 0 0 auto;
        margin-bottom: 6px;
    }

    .case-card-image {
        transform: translateY(-3px) scale(1.18);
    }

    .case-card-image-large {
        transform: translateY(-4px) scale(1.38);
    }

    .case-card-image-spooky {
        transform: translateY(-5px) scale(1.42);
    }

    .case-card-image-fundon {
        transform: translateY(-4px) scale(1.30);
    }

    .case-price {
        right: 10px;
        min-width: 72px;
        padding: 5px 8px;
        font-size: 11px;
    }

    .case-btn {
        margin-top: 14px;
        padding: 10px 12px;
        font-size: 11px;
        border-radius: 8px;
    }

    .case-section .cases-grid {
        padding: 0 4px;
    }
}

@media (max-width: 768px) {
    .profile-header { grid-template-columns: 1fr; }
    .admin-stats { grid-template-columns: repeat(2, 1fr); }
    .admin-tools-grid { grid-template-columns: 1fr; }
    .admin-tool-head { flex-direction: column; }
    .admin-grant-form { grid-template-columns: 1fr; }
    .maintenance-card { padding: 28px 20px; border-radius: 18px; }
    .maintenance-card h1 { font-size: 28px; }
    .maintenance-card p { font-size: 15px; }
    .maintenance-status-row { grid-template-columns: 1fr; }
    .history-item { grid-template-columns: 1fr; gap: 5px; }
    .history-item .history-time { text-align: left; }
    .case-v2-items { grid-template-columns: repeat(2, 1fr); }
    .case-v2-title { font-size: 20px; }
    .pv2-items-grid { grid-template-columns: repeat(2, 1fr); }
    .pv2-stats-row { grid-template-columns: repeat(3, 1fr); }
    .case-v2-image { width: 260px; height: 260px; max-width: 80vw; transform: none; }
    .case-v2-image:hover { transform: scale(1.03); }
    .case-v2-top-bar { max-width: 100%; }
    /* Wider, shorter roulette track on phones */
    .content-area:has(.case-v2-page) { padding: 0; }
    .case-v2-page { padding: 10px; }
    .case-v2-header.is-opening { padding: 8px 0 12px; }
    .case-v2-header.is-opening .roulette-section { width: 100%; border-radius: 10px; padding: 6px 2px; }
    .case-v2-header.is-opening .roulette-window { height: 96px; }
    .case-v2-header.is-opening .roulette-item { height: 82px; width: 82px; min-width: 82px; padding-top: 3px; border-radius: 7px; border-width: 1px; }
    .case-v2-header.is-opening .roulette-item .item-icon { width: 44px; height: 36px; margin-bottom: 2px; }
    .case-v2-header.is-opening .roulette-item .item-name { font-size: 6px; padding: 0 2px; }
    .case-v2-header.is-opening .roulette-item .item-price { font-size: 6px; margin-bottom: 2px; }
    .case-v2-header.is-opening .roulette-item .roulette-item-server { font-size: 5px; }
    .case-v2-header.is-opening .roulette-window::before, .case-v2-header.is-opening .roulette-window::after { width: 24px; }
    .case-v2-header.is-opening .roulette-container.is-multi-grid { gap: 6px 8px; }
    .case-v2-header.is-opening .roulette-container.is-multi-grid .roulette-window { height: 96px; }
    .case-v2-header.is-opening .roulette-container.is-multi-grid .roulette-item { height: 82px; width: 82px; min-width: 82px; }
    .case-v2-header.is-opening .roulette-container.is-many-grid .roulette-window { height: 82px; }
    .case-v2-header.is-opening .roulette-container.is-many-grid .roulette-item { height: 70px; width: 72px; min-width: 72px; padding-top: 2px; }
    .case-v2-header.is-opening .roulette-container.is-many-grid .roulette-item .item-icon { width: 36px; height: 30px; }
    .case-v2-header.is-opening .roulette-container.is-many-grid .roulette-item .item-name { font-size: 5px; }
    .case-v2-header.is-opening .roulette-container.is-many-grid .roulette-item .item-price { font-size: 5px; }
    .case-v2-header.is-opening .case-v2-actions { gap: 6px; }
    .case-v2-header.is-opening .case-v2-open-btn, .case-v2-header.is-opening .case-v2-fast-btn { min-width: 0; flex: 1 1 calc(50% - 3px); padding: 9px 10px; font-size: 10px; }
    .pv2-user-card { padding: 22px 16px 18px; }
    .pv2-avatar-wrap { width: 112px; height: 112px; }
    .pv2-avatar { width: 112px; height: 112px; font-size: 46px; }
    .pv2-best-drop-content { flex-direction: column; text-align: center; }
}

/* Телефоны: содержимое кейса — 5 предметов в ряд */
@media (max-width: 640px) {
    .case-v2-items {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 7px !important;
    }
    .case-v2-item {
        flex: 0 0 calc(20% - 6px) !important;
        min-width: 0 !important;
        min-height: auto !important;
    }
    .case-v2-item .cv2-item-img { height: 72px; padding: 5px 0 12px; }
    .case-v2-item .cv2-item-img img { max-width: 90% !important; max-height: 90% !important; }
    .case-v2-item .cv2-item-name { font-size: 9px; padding: 5px 4px; height: auto; min-height: 24px; }
    .case-v2-item .cv2-item-price { font-size: 9px; padding: 3px 5px; bottom: 4px; left: 4px; }
    .case-v2-item .cv2-item-server { font-size: 8px; height: auto; min-height: 13px; padding: 0 4px 2px; }
    .case-v2-item .cv2-item-bar { height: 2px; }
}

/* Узкие телефоны */
@media (max-width: 480px) {
    .content-area { padding: 14px 10px 0; }
    .top-nav { padding: 6px 10px; }
    .logo { font-size: 18px; }
    .user-info { display: none; }
    .user-profile { padding: 5px; }
    .user-profile-mini { padding: 4px 10px 4px 4px; gap: 6px; }
    .user-avatar-mini { width: 32px; height: 32px; line-height: 32px; font-size: 17px; border-radius: 7px; }
    .user-name-mini { max-width: 85px; font-size: 13px; font-weight: 600; }
    .user-balance-mini { font-size: 12px; gap: 3px; }
    .user-balance-mini .coin-inline-sm { width: 12px; height: 12px; }
    .wallet-trigger { width: 44px; height: 40px; }
    .btn-deposit { padding: 7px 10px; font-size: 13px; }
    .nav-right { gap: 8px; }
    .pv2-items-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .pv2-stats-row { grid-template-columns: repeat(2, 1fr); }
    .admin-stats { grid-template-columns: 1fr; }
    .modal-content { max-width: 94vw; }
    .deposit-methods { grid-template-columns: 1fr 1fr; }
    .auth-card { padding: 26px 20px; }
    .auth-card h1 { font-size: 20px; }
    .profile-v2-page { padding: 10px 6px; }
    .profile-v2-title { font-size: 18px; letter-spacing: 2px; }
    .pv2-card { padding: 16px; border-radius: 14px; }
    .pv2-user-nick { font-size: 14px; }
    .pv2-user-actions { gap: 8px; }
    .pv2-link { display: inline-flex; width: auto; text-align: center; justify-content: center; }
    .pv2-avatar-wrap { width: 100px; height: 100px; }
    .pv2-avatar { width: 100px; height: 100px; font-size: 42px; }
    .pv2-level { width: 30px; height: 30px; font-size: 10px; }
    .pv2-avatar-form { flex-direction: column; }
    .pv2-avatar-form .pv2-btn-outline { width: 100%; }
    .pv2-balance-num { font-size: 18px; }
    .pv2-balance-main { min-width: 0; width: 100%; }
    .pv2-balance-row { width: 100%; }
    .pv2-stats-row { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .pv2-stat { padding: 10px 6px; }
    .pv2-stat-icon { width: 44px; height: 44px; margin-bottom: 6px; }
    .pv2-stat-img { width: 24px; height: 24px; }
    .pv2-stat-num { font-size: 15px; }
    .pv2-best-name { font-size: 18px; }
    .pv2-best-drop-wide { padding: 18px 16px; }
}

/* Case page blue frame and stronger prices */
.case-v2-image-wrap {
    width: clamp(240px, 28vw, 315px);
    height: clamp(240px, 28vw, 315px);
    margin-bottom: 14px;
}
.case-v2-ring {
    inset: clamp(18px, 2.2vw, 26px);
    border: 4px dashed rgba(var(--case-glow-r), var(--case-glow-g), var(--case-glow-b), 0.78);
    box-shadow:
        0 0 18px rgba(var(--case-glow-r), var(--case-glow-g), var(--case-glow-b), 0.52),
        inset 0 0 18px rgba(var(--case-glow-r2), var(--case-glow-g2), var(--case-glow-b2), 0.28);
}
.case-v2-ring::before {
    inset: clamp(-12px, -1.1vw, -8px);
    border: 2px solid rgba(var(--case-glow-r2), var(--case-glow-g2), var(--case-glow-b2), 0.26);
    box-shadow: 0 0 28px rgba(var(--case-glow-r), var(--case-glow-g), var(--case-glow-b), 0.22);
}
.case-v2-ring::after {
    content: none;
}
.case-v2-image {
    width: auto;
    height: auto;
    max-width: min(148%, 430px);
    max-height: min(124%, 380px);
    object-fit: contain;
    object-position: center center;
    transform: translate(0, -2%);
    filter:
        drop-shadow(0 14px 18px rgba(0,0,0,0.40))
        drop-shadow(0 0 34px rgba(var(--case-glow-r), var(--case-glow-g), var(--case-glow-b), 0.54));
}
.case-v2-image:hover { transform: translate(0, -2%) scale(1.03); }

.case-v2-items {
    gap: 14px;
}
.case-v2-item {
    min-height: 204px;
    border-radius: 7px;
    border-color: #25344a;
    background:
        radial-gradient(circle at 50% 35%, rgba(255,255,255,0.045), transparent 40%),
        linear-gradient(180deg, rgba(15,23,34,0.98) 0%, rgba(12,18,27,0.98) 100%);
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.018),
        0 0 calc(10px + 20px * var(--glow-power, 0.12)) rgba(0,0,0,0.22);
}
.case-v2-item::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 46%;
    width: calc(72px + 46px * var(--glow-power, 0.12));
    height: calc(72px + 46px * var(--glow-power, 0.12));
    border-radius: 50%;
    background:
        radial-gradient(circle, var(--rarity-glow) 0%, rgba(255,255,255,0.05) 36%, transparent 72%);
    transform: translate(-50%, -50%);
    filter: blur(5px);
    opacity: calc(0.55 + var(--glow-power, 0.12));
    animation: cv2AuraPulse 2.8s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}
.case-v2-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 18%, rgba(255,255,255,0.10) 44%, transparent 62%);
    transform: translateX(-120%);
    opacity: calc(var(--glow-power, 0.12) * 1.4);
    animation: cv2Shine 4.8s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}
.case-v2-item:hover {
    box-shadow:
        0 10px 28px rgba(0,0,0,0.42),
        0 0 calc(14px + 42px * var(--glow-power, 0.12)) var(--rarity-glow);
}
.cv2-item-img,
.cv2-item-name,
.cv2-item-bar {
    position: relative;
    z-index: 1;
}
.cv2-item-img {
    height: 146px;
    padding: 10px 0 34px;
    background: transparent;
}
.cv2-item-img::before {
    content: none;
}
.cv2-item-img img {
    max-width: 92% !important;
    max-height: 94% !important;
    filter:
        drop-shadow(0 10px 12px rgba(0,0,0,0.42))
        drop-shadow(0 0 calc(7px + 18px * var(--glow-power, 0.12)) var(--rarity-glow)) !important;
    animation: cv2ItemFloat 3.4s ease-in-out infinite;
}
.case-v2-item.rarity-l4 .cv2-item-img img,
.case-v2-item.rarity-l5 .cv2-item-img img {
    animation: cv2ItemFloat 3.2s ease-in-out infinite, cv2RareGlow 2.2s ease-in-out infinite;
}
.cv2-item-price {
    bottom: 8px;
    left: 9px;
    padding: 6px 10px;
    border-radius: 5px;
    background: linear-gradient(180deg, #ff5a5f 0%, #ef3348 100%);
    color: #fff;
    font-size: 13px;
    line-height: 1;
    letter-spacing: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.42);
    box-shadow: 0 6px 16px rgba(239,51,72,0.30);
}
.case-v2-item.rarity-l5 .cv2-item-price {
    background: linear-gradient(180deg, #fbbf24 0%, #f97316 100%);
    box-shadow: 0 0 18px rgba(245,158,11,0.46);
}
.case-v2-item.rarity-l4 .cv2-item-price {
    background: linear-gradient(180deg, #ff5a5f 0%, #dc2626 100%);
    box-shadow: 0 0 16px rgba(239,68,68,0.40);
}
.case-v2-item.rarity-l3 .cv2-item-price {
    background: linear-gradient(180deg, #b86bff 0%, #8b5cf6 100%);
    box-shadow: 0 0 14px rgba(168,85,247,0.34);
}
.cv2-item-name {
    padding: 11px 10px 9px;
    font-size: 13px;
    line-height: 1.2;
    text-align: left;
    height: 42px;
    min-height: 42px;
    box-sizing: border-box;
}
.cv2-item-server {
    position: relative;
    z-index: 1;
    height: 18px;
    min-height: 18px;
    padding: 0 10px 3px;
    box-sizing: border-box;
    display: flex;
    align-items: flex-start;
}
.cv2-item-bar {
    height: 3px;
    background: linear-gradient(90deg, var(--rarity-color), #3b82f6);
}
@keyframes cv2AuraPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(0.92); opacity: calc(0.45 + var(--glow-power, 0.12)); }
    50% { transform: translate(-50%, -50%) scale(1.15); opacity: calc(0.68 + var(--glow-power, 0.12)); }
}
@keyframes cv2Shine {
    0%, 58% { transform: translateX(-130%); }
    76%, 100% { transform: translateX(130%); }
}
@keyframes cv2ItemFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
@keyframes cv2RareGlow {
    0%, 100% { filter: drop-shadow(0 10px 12px rgba(0,0,0,0.42)) drop-shadow(0 0 14px var(--rarity-glow)); }
    50% { filter: drop-shadow(0 12px 14px rgba(0,0,0,0.46)) drop-shadow(0 0 28px var(--rarity-glow)); }
}
.case-v2-open-btn #open-price,
.case-v2-fast-btn #fast-price {
    font-size: 16px;
    color: #fff;
    text-shadow: 0 0 10px rgba(255,255,255,0.28);
}

/* Premium open button on case cards */
.case-btn {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 35px;
    border-radius: 9px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0) 42%),
        linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.22),
        inset 0 -2px 0 rgba(0,0,0,0.16),
        0 8px 18px rgba(var(--accent-rgb),0.22),
        0 0 0 1px rgba(var(--accent-rgb),0.08);
    text-shadow: 0 1px 2px rgba(0,0,0,0.34);
    letter-spacing: 0.4px;
    line-height: 1;
    text-align: center;
}
.case-btn::before {
    content: '';
    position: absolute;
    inset: 1px 1px auto;
    height: 42%;
    border-radius: 8px 8px 18px 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.26), rgba(255,255,255,0));
    pointer-events: none;
    z-index: -1;
}
.case-btn::after {
    content: '';
    position: absolute;
    top: -30%;
    bottom: -30%;
    left: -45%;
    width: 34%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,0.44), transparent);
    transform: skewX(-18deg);
    opacity: 0;
    pointer-events: none;
}
.case-card:hover .case-btn {
    transform: translateY(-2px);
    filter: brightness(1.08);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.26),
        inset 0 -2px 0 rgba(0,0,0,0.18),
        0 12px 26px rgba(var(--accent-rgb),0.32),
        0 0 22px rgba(var(--accent-rgb),0.20);
}
.case-card:hover .case-btn::after {
    opacity: 1;
    animation: caseBtnSheen 0.82s ease forwards;
}
.case-card:active .case-btn {
    transform: translateY(0);
    box-shadow:
        inset 0 2px 5px rgba(0,0,0,0.18),
        0 5px 12px rgba(var(--accent-rgb),0.20);
}
@keyframes caseBtnSheen {
    from { left: -45%; }
    to { left: 112%; }
}

@media (max-width: 768px) {
    .case-v2-image-wrap { width: clamp(220px, 74vw, 270px); height: clamp(220px, 74vw, 270px); }
    .case-v2-ring { inset: clamp(16px, 6vw, 22px); }
    .case-v2-image { max-width: min(146%, 360px); max-height: min(126%, 330px); }
    .cv2-item-price { font-size: 12px; padding: 5px 8px; }
}

/* Larger live drops feed */
.live-sidebar {
    width: 205px;
}
.live-header {
    min-height: 42px;
    padding: 14px 12px;
    font-size: 12px;
    letter-spacing: 0.45px;
}
.live-items {
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--accent-rgb),0.72) #0b1119;
}
.live-items::-webkit-scrollbar {
    display: block;
    width: 7px;
}
.live-items::-webkit-scrollbar-track {
    background: #0b1119;
}
.live-items::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
    border-radius: 999px;
}
.live-item {
    min-height: 118px;
    padding: 15px 10px 13px;
    border-left-width: 4px;
}
.live-item:hover {
    transform: translateX(4px);
}
.live-item-icon,
.live-item > div:first-child:not(.live-hover):not(.live-item-icon) {
    width: 78px;
    height: 58px;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    line-height: 1;
}
.live-item-icon-img {
    max-width: 100%;
    max-height: 100%;
    transform: scale(1.12);
    filter:
        drop-shadow(0 6px 10px rgba(0,0,0,0.42))
        drop-shadow(0 0 12px rgba(var(--accent-rgb),0.16));
}
.live-item:hover .live-item-icon-img {
    transform: scale(1.22) translateY(-2px);
    filter:
        drop-shadow(0 8px 12px rgba(0,0,0,0.46))
        drop-shadow(0 0 16px rgba(var(--accent-rgb),0.24));
}
.live-item-icon-fallback {
    font-size: 42px;
}
.live-item .item-name {
    padding: 0 5px;
    font-size: 12px;
    line-height: 1.18;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.live-item .item-price {
    margin-top: 5px;
    font-size: 11px;
    font-weight: 900;
}
.live-item.is-premium,
.live-item.is-jackpot {
    min-height: 124px;
}

@media (max-width: 1100px) {
    .live-sidebar { width: 185px; }
    .live-item { min-height: 108px; }
    .live-item-icon,
    .live-item > div:first-child:not(.live-hover):not(.live-item-icon) {
        width: 68px;
        height: 52px;
    }
}

/* Move upgrade percentage labels outside the wheel */
.chance-circle-wrapper .outer-label.top,
.chance-circle-wrapper.v2-wheel .outer-label.top {
    top: -5px;
}

.chance-circle-wrapper .outer-label.bottom,
.chance-circle-wrapper.v2-wheel .outer-label.bottom {
    bottom: -5px;
}

.chance-circle-wrapper .outer-label.left,
.chance-circle-wrapper.v2-wheel .outer-label.left {
    left: -10px;
}

.chance-circle-wrapper .outer-label.right,
.chance-circle-wrapper.v2-wheel .outer-label.right {
    right: -10px;
}

/* Payment return pages */
.payment-status-page {
    min-height: 62vh;
    display: grid;
    place-items: center;
    padding: 44px 16px 70px;
}

.payment-status-card {
    width: min(100%, 520px);
    padding: 38px 34px;
    border: 1px solid rgba(148,163,184,0.16);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(20,27,39,0.98), rgba(10,15,23,0.98));
    box-shadow: 0 24px 60px rgba(0,0,0,0.34);
    text-align: center;
}

.payment-status-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin: 0 auto 18px;
    border: 1px solid rgba(52,211,153,0.38);
    border-radius: 50%;
    background: rgba(52,211,153,0.10);
    color: #34d399;
    font-size: 30px;
    font-weight: 900;
}

.payment-status-card.is-fail .payment-status-icon {
    border-color: rgba(251,77,93,0.38);
    background: rgba(251,77,93,0.10);
    color: #fb4d5d;
}

.payment-status-kicker {
    margin-bottom: 7px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}

.payment-status-card.is-fail .payment-status-kicker {
    color: #fb7185;
}

.payment-status-card h1 {
    margin: 0 0 12px;
    color: #f5f7fb;
    font-size: 27px;
    line-height: 1.15;
}

.payment-status-card p {
    margin: 0;
    color: #929daf;
    font-size: 14px;
    line-height: 1.6;
}

.payment-status-card p strong {
    color: var(--accent);
}

.payment-status-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
    margin-top: 26px;
}

.payment-status-actions .btn-primary,
.payment-status-actions .pv2-btn-outline {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    font-size: 12px;
    text-decoration: none;
}

/* Registration legal consent */
.auth-card:has(.register-consents) {
    max-width: 520px;
}

.register-consents {
    display: grid;
    gap: 9px;
    margin: 4px 0 16px;
    padding: 14px;
    border: 1px solid rgba(148,163,184,0.14);
    border-radius: 10px;
    background: rgba(8,13,20,0.54);
}

.register-consent-row {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: start;
    gap: 9px;
    color: #9ba6b6;
    font-size: 11px;
    line-height: 1.45;
    cursor: pointer;
}

.register-consent-row input {
    appearance: none;
    width: 17px;
    height: 17px;
    margin: 0;
    border: 1px solid rgba(148,163,184,0.34);
    border-radius: 4px;
    background: #0a0f17;
    cursor: pointer;
}

.register-consent-row input:checked {
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: inset 0 0 0 3px #0a0f17, 0 0 10px rgba(var(--accent-rgb),0.20);
}

.register-consent-row a,
.register-legal-note a {
    color: var(--accent);
    text-decoration: none;
}

.register-consent-row a:hover,
.register-legal-note a:hover {
    text-decoration: underline;
}

.register-legal-note {
    padding-top: 8px;
    border-top: 1px solid rgba(148,163,184,0.10);
    color: #707c8e;
    font-size: 10px;
    line-height: 1.45;
}

.site-footer-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 14px;
    margin-top: 10px;
}

.site-footer-legal a {
    color: #8994a6;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

.site-footer-legal a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* Cinematic live-drop hover interaction */
.live-item {
    isolation: isolate;
    transition:
        background 0.32s ease,
        transform 0.38s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.38s ease,
        border-color 0.32s ease;
}

.live-item::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 28% 42%, color-mix(in srgb, var(--rarity-color, var(--accent)) 24%, transparent), transparent 48%),
        linear-gradient(105deg, transparent 20%, rgba(255,255,255,0.08) 48%, transparent 72%);
    opacity: 0;
    transform: translateX(-22%) scale(0.96);
    transition: opacity 0.34s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.live-item:hover {
    z-index: 5;
    transform: translateX(5px) scale(1.025);
    border-left-color: var(--rarity-color, var(--accent));
    background: #171e29;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.04),
        inset 12px 0 26px color-mix(in srgb, var(--rarity-color, var(--accent)) 10%, transparent),
        0 10px 24px rgba(0,0,0,0.28);
}

.live-item:hover::before {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.live-item .live-item-icon,
.live-item .item-name,
.live-item .item-price {
    position: relative;
    z-index: 1;
    transition:
        transform 0.42s cubic-bezier(0.16, 1, 0.3, 1),
        filter 0.32s ease,
        color 0.28s ease;
}

.live-item:hover .live-item-icon {
    transform: translateY(-3px) scale(1.13);
    filter: saturate(1.15) brightness(1.08);
}

.live-item:hover .item-name {
    transform: translateY(-1px);
    color: #fff;
}

.live-item:hover .item-price {
    transform: translateY(1px);
    text-shadow: 0 0 10px color-mix(in srgb, var(--rarity-color, var(--accent)) 54%, transparent);
}

.live-hover {
    clip-path: inset(8% 10% 8% 0 round 10px);
    transform: translate3d(-22px, calc(-50% + 12px), 0) perspective(700px) rotateY(-5deg) scale(0.92) !important;
    filter: saturate(0.76) brightness(0.82) blur(1px);
    transition:
        opacity 0.32s ease,
        transform 0.48s cubic-bezier(0.16, 1, 0.3, 1),
        clip-path 0.46s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.46s ease,
        filter 0.4s ease !important;
}

.live-hover.is-visible {
    clip-path: inset(0 round 10px);
    transform: translate3d(0, -50%, 0) perspective(700px) rotateY(0) scale(1) !important;
    filter: saturate(1.06) brightness(1) blur(0);
}

.live-hover::before {
    content: '';
    position: absolute;
    inset: -1px;
    z-index: 3;
    border-radius: inherit;
    background: linear-gradient(110deg, transparent 18%, rgba(255,255,255,0.34) 44%, transparent 66%);
    opacity: 0;
    transform: translateX(-125%);
    pointer-events: none;
}

.live-hover.is-visible::before {
    animation: liveHoverEdgeSweep 0.82s 0.06s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.live-hover .lhv-bg {
    transform: scale(1.12) translateX(-8px);
    filter: saturate(0.84);
    transition: opacity 0.4s ease, transform 0.62s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
}

.live-hover.is-visible .lhv-bg {
    transform: scale(1) translateX(0);
    filter: saturate(1);
}

.live-hover .lhv-case {
    transform: translate3d(-14px, -7px, 0);
}

.live-hover .lhv-avatar {
    transform: translate3d(10px, -8px, 0) scale(0.82) rotate(8deg);
}

.live-hover .lhv-img {
    transform: translate3d(-10px, 13px, 0) scale(0.78) rotate(-2deg);
}

.live-hover .lhv-name {
    transform: translate3d(0, 11px, 0) scale(0.94);
}

.live-hover.is-visible .lhv-case,
.live-hover.is-visible .lhv-avatar,
.live-hover.is-visible .lhv-img,
.live-hover.is-visible .lhv-name {
    transform: translate3d(0, 0, 0) scale(1) rotate(0);
}

.live-hover.is-visible .lhv-case { transition-delay: 0.04s; }
.live-hover.is-visible .lhv-avatar { transition-delay: 0.09s; }
.live-hover.is-visible .lhv-img { transition-delay: 0.12s; }
.live-hover.is-visible .lhv-name { transition-delay: 0.17s; }

.live-hover.is-visible .lhv-img img {
    animation: liveHoverDropArrive 0.68s 0.08s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Admin treasury controls */
.admin-economy-control-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 10px 0;
    align-items: stretch;
}

.admin-economy-control-card {
    background: rgba(10, 16, 24, 0.72);
    border: none;
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.22);
    min-height: 0;
}

.admin-economy-control-card-compact {
    padding: 8px 10px;
    gap: 6px;
}

/* Формы/контейнеры внутри карточки растягиваются, кнопка прижимается к низу — ровные карточки */
.admin-economy-control-card form,
.admin-economy-control-card > a,
.admin-economy-control-card > div {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 6px;
}

.admin-economy-control-card form .btn-small,
.admin-economy-control-card > a .btn-small,
.admin-economy-control-card > div .btn-small {
    margin-top: auto;
}

/* Вложенные inline-гриды внутри форм остаются гридами со своим gap */
.admin-economy-control-card form .admin-economy-inline-grid,
.admin-economy-control-card > div .admin-economy-inline-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}


.admin-economy-control-card b {
    color: var(--text-white);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .6px;
}

.admin-economy-control-card small {
    color: var(--text-muted);
    font-size: 10px;
    line-height: 1.25;
}

.admin-input-label {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
    margin-bottom: 4px;
    line-height: 1.2;
}

.admin-settings-buttons-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 12px 0;
}

.admin-settings-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 10px 14px;
    border-radius: 10px;
    border: none;
    background: rgba(10, 16, 24, 0.72);
    color: var(--text-white);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s;
    box-shadow: none;
    text-align: center;
    line-height: 1.25;
}

.admin-settings-btn:hover {
    background: rgba(var(--accent-rgb), 0.14);
    transform: translateY(-1px);
}

.admin-settings-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.admin-settings-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(3px);
}

.admin-settings-modal-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    background: rgba(10, 16, 24, 0.96);
    border: none;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.55);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.admin-settings-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: none;
    background: rgba(var(--accent-rgb), 0.08);
}

.admin-settings-modal-header b {
    color: var(--text-white);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .6px;
}

.admin-settings-modal-close {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: none;
    background: rgba(var(--accent-rgb), 0.10);
    color: var(--accent);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: .2s;
}

.admin-settings-modal-close:hover {
    background: var(--accent);
    color: #fff;
}

.admin-settings-modal-body {
    padding: 18px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--accent-rgb), 0.35) transparent;
}

.admin-settings-modal-body::-webkit-scrollbar {
    width: 6px;
}

.admin-settings-modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.admin-settings-modal-body::-webkit-scrollbar-thumb {
    background: rgba(var(--accent-rgb), 0.35);
    border-radius: 3px;
}

.admin-settings-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--accent-rgb), 0.55);
}

.admin-settings-modal-body .admin-economy-control-card {
    border: none;
    box-shadow: none;
    background: transparent;
    padding: 0;
    margin: 0;
}

.admin-settings-modal-body .admin-tool-head {
    display: none;
}

.admin-settings-modal-body .admin-economy-control-grid,
.admin-settings-cards-container {
    display: none;
}

@media (max-width: 980px) {
    .admin-settings-buttons-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .admin-settings-buttons-grid {
        grid-template-columns: 1fr;
    }

    .admin-settings-modal {
        padding: 10px;
    }

    .admin-settings-modal-content {
        max-height: 95vh;
        border-radius: 12px;
    }
}

.admin-economy-inline-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.admin-economy-control-card .input-field,
.admin-economy-control-card-compact .input-field {
    height: 36px;
    min-height: 36px;
    padding: 8px 12px;
    font-size: 13px;
}

.admin-economy-control-card .btn-small,
.admin-economy-control-card-compact .btn-small {
    min-height: 34px;
    padding: 8px 12px;
    font-size: 13px;
}

.admin-economy-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 2px 0 0;
    color: var(--text-main);
    font-size: 12px;
    line-height: 1.2;
}

.admin-economy-check input {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

.admin-luck-control-card {
    border-color: color-mix(in srgb, var(--accent) 34%, var(--border));
    background:
        radial-gradient(circle at 16% 0%, rgba(var(--accent-rgb), 0.16), transparent 44%),
        linear-gradient(180deg, rgba(18,24,36,0.98), rgba(12,18,28,0.98));
}

.admin-luck-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(var(--accent-rgb), 0.24);
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--text-white);
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.admin-luck-toggle input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.admin-luck-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.admin-luck-help {
    display: grid;
    gap: 6px;
    padding: 10px 12px;
    border: 1px solid rgba(var(--accent-rgb), 0.18);
    border-radius: 10px;
    background: rgba(0,0,0,0.16);
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.35;
}

.admin-luck-help b {
    color: var(--accent);
    font-size: inherit;
    letter-spacing: 0;
    text-transform: none;
}

.admin-luck-active {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.admin-luck-active span {
    padding: 5px 8px;
    border-radius: 999px;
    border: 1px solid rgba(var(--accent-rgb), 0.28);
    background: rgba(var(--accent-rgb), 0.09);
    color: var(--accent);
    font-size: 10px;
    font-weight: 800;
}

/* Case contents: keep 6 items per row and center short last rows */
.case-v2-items {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
}

.case-v2-item {
    flex: 0 1 calc((100% - 70px) / 6);
    min-width: 148px;
}

@media (max-width: 1100px) {
    .case-v2-item {
        flex-basis: calc((100% - 42px) / 4);
    }
}

@media (max-width: 640px) {
    .case-v2-item {
        flex-basis: calc((100% - 12px) / 2);
        min-width: 0;
    }
}

.admin-withdraw-economy-card {
    margin: 14px 0 6px;
}

/* Upgrade top spacing tune */
.upgrade-page {
    margin-top: -34px;
}

.upgrade-icons {
    justify-content: center;
    margin: 4px auto 18px;
    transform: translateY(-4px);
}

.upgrade-main {
    margin-top: -8px;
    align-items: stretch;
}

.upgrade-panel {
    transform: translateY(-12px);
    min-height: 340px;
}

.upgrade-center {
    transform: translateY(-20px);
}

@media (max-width: 980px) {
    .admin-economy-control-grid {
        grid-template-columns: 1fr;
    }

    .admin-economy-control-card,
    .admin-economy-control-card-compact {
        padding: 8px;
    }

    /* На мобильных не растягиваем формы и не прижимаем кнопку — карточки остаются компактными */
    .admin-economy-control-card form,
    .admin-economy-control-card > a,
    .admin-economy-control-card > div {
        flex: 0 0 auto;
    }

    .admin-economy-control-card form .btn-small,
    .admin-economy-control-card > a .btn-small,
    .admin-economy-control-card > div .btn-small {
        margin-top: 0;
    }

    .admin-luck-row {
        grid-template-columns: 1fr;
    }

    .upgrade-panel,
    .upgrade-center,
    .upgrade-icons {
        transform: none;
    }
}

/* Mobile upgrade layout: keep desktop 3-column look, scaled down */
@media (max-width: 1200px) {
    .upgrade-page { padding: 0 8px 18px; }
    .upgrade-title { font-size: 16px; margin-bottom: 10px; transform: none; }
    .upgrade-icons { margin: 0 auto 10px; gap: 6px; }
    .upgrade-icon { width: 28px; height: 28px; }
    .upgrade-toolbar-img { width: 14px; height: 14px; }
    .upgrade-main { grid-template-columns: 1fr 220px 1fr; gap: 8px; align-items: stretch; margin-bottom: 10px; }
    .upgrade-panel { min-height: 0; padding: 8px; }
    .upgrade-panel-title { font-size: 9px; margin-bottom: 8px; }
    .upgrade-center { gap: 6px; }
    .chance-circle-wrapper { width: 190px; height: auto; aspect-ratio: 1 / 1; margin: 0 auto; }
    .chance-circle { width: 162px; height: auto; aspect-ratio: 1 / 1; }
    .chance-arrow-marker { top: 6px; left: 50%; transform: translateX(-50%); width: 16px; height: 16px; }
    .outer-label { font-size: 8px; }
    .circle-percent { font-size: 24px; }
    .chance-label { font-size: 7px; }
    .upgrade-btn-main { padding: 8px 12px; font-size: 10px; border-radius: 6px; }
    .upgrade-balance-add { padding: 6px; font-size: 9px; gap: 4px; margin-top: 6px; }
    .upgrade-balance-add input[type="range"] { width: 100%; height: 3px; }
    .upgrade-balance-add input[type="range"]::-webkit-slider-thumb { width: 10px; height: 10px; }
    .upgrade-quick-btns { gap: 4px; margin-top: 6px; }
    .quick-btn { padding: 4px 7px; font-size: 9px; min-width: 0; }
    .upgrade-filter-status { font-size: 8px; margin-top: 6px; min-height: 0; }
    .upgrade-bottom { grid-template-columns: 1fr 1fr; gap: 8px; }
    .upgrade-bottom-panel { border-radius: 8px; }
    .bottom-panel-header { padding: 6px 8px; gap: 6px; }
    .panel-title { font-size: 9px; }
    .view-btn { width: 28px; height: 24px; }
    .view-btn svg { width: 14px; height: 14px; }
    .bottom-panel-filters { gap: 4px; }
    .bottom-panel-filters select { padding: 3px 5px; font-size: 9px; }
    .bottom-panel-filters .price-input { width: 44px; padding: 3px 5px; font-size: 9px; }
    .bottom-panel-filters .search-btn { padding: 3px 6px; font-size: 10px; }
    .bottom-panel-body { padding: 8px; min-height: 100px; max-height: 200px; gap: 6px; }
    .upgrade-item-card { min-width: 0; padding: 5px 3px; border-radius: 5px; }
    .upgrade-item-card .ui-icon { width: 26px; height: 26px; margin-bottom: 3px; }
    .upgrade-item-card .ui-name { font-size: 8px; }
    .upgrade-item-card .ui-source { font-size: 7px; margin-bottom: 2px; }
    .upgrade-item-card .ui-price { font-size: 8px; }
    .upgrade-selected-area.is-single .upgrade-item-card.small { padding: 10px 8px; }
    .upgrade-selected-area.is-single .upgrade-item-card.small .ui-icon { width: 44px; height: 44px; margin-bottom: 6px; }
    .upgrade-selected-area.is-single .upgrade-item-card.small .ui-name { font-size: 10px; }
    .upgrade-selected-area.is-single .upgrade-item-card.small .ui-price { font-size: 10px; }
    .upgrade-target-area.has-item .upgrade-item-card.large { padding: 16px 10px; }
    .upgrade-target-area.has-item .upgrade-item-card.large .ui-icon { width: 56px; height: 56px; margin-bottom: 8px; }
    .upgrade-target-area.has-item .upgrade-item-card.large .ui-name { font-size: 11px; }
    .upgrade-target-area.has-item .upgrade-item-card.large .ui-price { font-size: 10px; }
}

@media (max-width: 640px) {
    .upgrade-main { grid-template-columns: 1fr 170px 1fr; gap: 6px; }
    .chance-circle-wrapper { width: 150px; }
    .chance-circle { width: 128px; }
    .circle-percent { font-size: 20px; }
    .upgrade-bottom { grid-template-columns: 1fr; gap: 8px; }
    .upgrade-btn-main { font-size: 9px; padding: 6px 9px; border-radius: 6px; letter-spacing: 0.5px; }
}

@media (max-width: 480px) {
    .upgrade-main { grid-template-columns: 1fr 130px 1fr; gap: 4px; }
    .upgrade-panel { padding: 6px; }
    .upgrade-panel-title { font-size: 8px; }
    .chance-circle-wrapper { width: 120px; }
    .chance-circle { width: 102px; }
    .circle-percent { font-size: 16px; }
    .chance-label { font-size: 6px; }
    .upgrade-btn-main { font-size: 8px; padding: 5px 6px; border-radius: 5px; letter-spacing: 0.5px; }
    .upgrade-balance-add { font-size: 8px; }
    .quick-btn { font-size: 8px; padding: 3px 5px; }
}

/* Polished deposit wallet modal */
.deposit-modal {
    max-width: 940px !important;
    grid-template-columns: 118px minmax(0, 1fr) !important;
    border-radius: 22px !important;
    border: 1px solid rgba(var(--accent-rgb),0.24) !important;
    background:
        radial-gradient(circle at 78% 14%, rgba(var(--accent-rgb),0.18), transparent 34%),
        linear-gradient(145deg, rgba(18,25,34,0.98), rgba(7,12,16,0.98)) !important;
    box-shadow: 0 34px 90px rgba(0,0,0,0.62), inset 0 1px 0 rgba(255,255,255,0.05) !important;
    overflow: hidden !important;
}

.deposit-sidebar {
    padding: 14px 10px !important;
    gap: 8px !important;
    background: linear-gradient(180deg, rgba(6,10,14,0.86), rgba(11,17,24,0.72)) !important;
    border-right: 1px solid rgba(148,163,184,0.14) !important;
}

.deposit-side-tab {
    min-height: 82px !important;
    border: 1px solid transparent !important;
    border-radius: 14px !important;
    color: var(--text-muted) !important;
    background: transparent !important;
    text-transform: none !important;
    font-size: 12px !important;
    letter-spacing: 0 !important;
}

.deposit-side-tab:hover {
    color: var(--text-white) !important;
    background: rgba(255,255,255,0.04) !important;
    border-color: rgba(148,163,184,0.16) !important;
}

.deposit-side-tab.active {
    color: var(--text-white) !important;
    background: linear-gradient(180deg, rgba(var(--accent-rgb),0.22), rgba(var(--accent-rgb),0.08)) !important;
    border-color: rgba(var(--accent-rgb),0.42) !important;
    box-shadow: 0 12px 26px rgba(var(--accent-rgb),0.16), inset 0 1px 0 rgba(255,255,255,0.08) !important;
}

.deposit-side-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    font-size: 20px !important;
}

.deposit-main {
    padding: 24px 28px 26px !important;
    background: transparent !important;
}

.deposit-modal-header {
    padding: 0 !important;
    border-bottom: 0 !important;
    margin-bottom: 16px !important;
}

.deposit-kicker {
    color: var(--accent);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.3px;
    text-transform: uppercase;
}

.deposit-modal-header h3 {
    margin-top: 4px !important;
    color: var(--text-white) !important;
    font-size: 25px !important;
    font-weight: 900 !important;
    text-transform: uppercase;
    letter-spacing: 0 !important;
}

.deposit-modal-header p {
    margin: 7px 0 0;
    max-width: 520px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.45;
}

.deposit-currency-select {
    border-radius: 12px !important;
    border-color: rgba(var(--accent-rgb),0.30) !important;
    background: rgba(3,7,10,0.54) !important;
    color: var(--accent) !important;
    font-weight: 900;
}

.deposit-wallet-preview {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    padding: 14px;
    border: 1px solid rgba(var(--accent-rgb),0.22);
    border-radius: 16px;
    background:
        linear-gradient(90deg, rgba(var(--accent-rgb),0.13), transparent),
        rgba(2,6,10,0.34);
}

.deposit-wallet-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: rgba(var(--accent-rgb),0.13);
    box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb),0.22);
}

.deposit-wallet-icon img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(var(--accent-rgb),0.4));
}

.deposit-wallet-preview span,
.deposit-wallet-preview small {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
}

.deposit-wallet-preview b {
    display: block;
    margin-top: 2px;
    color: var(--text-white);
    font-size: 18px;
    font-weight: 900;
}

.deposit-wallet-preview small {
    padding: 7px 10px;
    border-radius: 999px;
    color: var(--accent);
    background: rgba(var(--accent-rgb),0.11);
}

.deposit-methods {
    gap: 12px !important;
    padding-bottom: 16px !important;
    border-bottom: 1px solid rgba(148,163,184,0.13) !important;
}

.deposit-method {
    position: relative;
    min-height: 112px !important;
    border-radius: 16px !important;
    border-color: rgba(148,163,184,0.16) !important;
    background: linear-gradient(180deg, rgba(18,26,36,0.92), rgba(7,12,18,0.86)) !important;
    overflow: hidden;
}

.deposit-method::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: radial-gradient(circle at 50% 10%, rgba(var(--accent-rgb),0.20), transparent 52%);
    opacity: 0;
    transition: opacity 0.22s ease;
}

.deposit-method > * {
    position: relative;
    z-index: 1;
}

.deposit-method:hover::before,
.deposit-method.active::before {
    opacity: 1;
}

.deposit-method:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--accent-rgb),0.34) !important;
}

.deposit-method.active {
    border-color: rgba(var(--accent-rgb),0.74) !important;
    box-shadow: 0 18px 34px rgba(var(--accent-rgb),0.14), inset 0 0 0 1px rgba(var(--accent-rgb),0.18) !important;
}

.deposit-method-muted {
    opacity: 0.62;
    cursor: default !important;
}

.deposit-method-logo {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: rgba(var(--accent-rgb),0.12);
    color: var(--accent);
    font-size: 17px !important;
    box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb),0.18);
}

.deposit-method-name {
    font-weight: 900;
    color: var(--text-white) !important;
}

.deposit-method-currency {
    font-weight: 900;
    color: var(--text-muted) !important;
}

.deposit-method-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 7px;
    border-radius: 999px;
    color: var(--accent);
    background: rgba(var(--accent-rgb),0.12);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.deposit-quick-amounts {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin: 16px 0 0;
}

.deposit-quick-amounts button {
    height: 40px;
    border: 1px solid rgba(148,163,184,0.16);
    border-radius: 12px;
    background: rgba(2,6,10,0.40);
    color: var(--text-main);
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.deposit-quick-amounts button::after {
    content: ' ₽';
    color: var(--text-muted);
}

.deposit-quick-amounts button:hover,
.deposit-quick-amounts button.active {
    transform: translateY(-1px);
    border-color: rgba(var(--accent-rgb),0.48);
    background: rgba(var(--accent-rgb),0.14);
    color: var(--text-white);
}

.deposit-form-grid {
    grid-template-columns: 130px minmax(0, 1fr) !important;
    gap: 14px 18px !important;
    padding: 18px 0 16px !important;
}

.deposit-label {
    color: var(--text-white) !important;
    font-size: 14px !important;
    font-weight: 900 !important;
}

.deposit-note {
    color: var(--text-muted) !important;
    font-size: 12px !important;
}

.deposit-input {
    height: 48px !important;
    border-radius: 14px !important;
    border: 1px solid rgba(148,163,184,0.16) !important;
    background: rgba(2,6,10,0.48) !important;
    font-weight: 800;
}

.deposit-input:focus {
    border-color: rgba(var(--accent-rgb),0.62) !important;
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb),0.09);
}

.deposit-submit-btn {
    min-width: 310px !important;
    height: 52px !important;
    border-radius: 15px !important;
    background: linear-gradient(180deg, var(--accent-hover), var(--accent-dark)) !important;
    box-shadow: 0 18px 34px rgba(var(--accent-rgb),0.24), inset 0 1px 0 rgba(255,255,255,0.18) !important;
    text-transform: uppercase;
}

.deposit-submit-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.deposit-help-text {
    margin-top: 18px !important;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(2,6,10,0.32);
    color: var(--text-muted) !important;
    font-size: 12px !important;
}

.deposit-help-text a {
    color: var(--accent) !important;
    font-weight: 900;
}

@media (max-width: 760px) {
    .deposit-modal {
        grid-template-columns: 1fr !important;
        max-width: 95vw !important;
        border-radius: 22px !important;
        border: 1px solid rgba(var(--accent-rgb),0.24) !important;
        background:
            radial-gradient(circle at 78% 14%, rgba(var(--accent-rgb),0.18), transparent 34%),
            linear-gradient(145deg, rgba(18,25,34,0.98), rgba(7,12,16,0.98)) !important;
        box-shadow: 0 34px 90px rgba(0,0,0,0.62), inset 0 1px 0 rgba(255,255,255,0.05) !important;
        overflow: hidden !important;
    }
    .deposit-sidebar {
        flex-direction: row !important;
        overflow-x: auto;
        border-right: 0 !important;
        border-bottom: 1px solid rgba(148,163,184,0.14) !important;
        background: linear-gradient(180deg, rgba(6,10,14,0.86), rgba(11,17,24,0.72)) !important;
        padding: 12px 10px !important;
        gap: 8px !important;
    }
    .deposit-side-tab {
        min-width: 78px;
        min-height: 64px !important;
        border-radius: 14px !important;
        border: 1px solid transparent !important;
        font-size: 11px !important;
    }
    .deposit-side-tab.active {
        background: rgba(255,255,255,0.06) !important;
        border-color: rgba(var(--accent-rgb),0.45) !important;
    }
    .deposit-main {
        padding: 18px !important;
    }
    .deposit-methods {
        gap: 10px !important;
    }
    .deposit-method {
        min-height: 92px !important;
        border-radius: 14px !important;
        padding: 12px 10px !important;
    }
    .deposit-wallet-preview,
    .deposit-form-grid {
        grid-template-columns: 1fr !important;
    }
    .deposit-wallet-preview small {
        width: fit-content;
    }
    .deposit-methods,
    .deposit-quick-amounts {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    .deposit-submit-row,
    .deposit-submit-btn {
        width: 100%;
    }
    .deposit-submit-btn {
        min-width: 0 !important;
    }
}

/* Deposit v3: full checkout redesign */
.deposit-v3 {
    width: min(980px, calc(100vw - 28px)) !important;
    max-width: 980px !important;
    display: block !important;
    padding: 0 !important;
    border-radius: 24px !important;
    overflow: hidden !important;
    border: 1px solid rgba(var(--accent-rgb),0.26) !important;
    background:
        radial-gradient(circle at 16% 0%, rgba(var(--accent-rgb),0.22), transparent 32%),
        radial-gradient(circle at 92% 16%, rgba(59,130,246,0.15), transparent 34%),
        linear-gradient(145deg, #111821 0%, #070b0f 100%) !important;
    box-shadow: 0 36px 110px rgba(0,0,0,0.70), inset 0 1px 0 rgba(255,255,255,0.06) !important;
    backdrop-filter: blur(10px);
}

.deposit-v3-close {
    position: absolute;
    top: 18px;
    right: 20px;
    z-index: 5;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255,255,255,0.06) !important;
    border: 1px solid rgba(255,255,255,0.09) !important;
    color: var(--text-white) !important;
    font-size: 22px !important;
}
.deposit-v3-handle { display: none; }

.deposit-v3-hero {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 72px 16px 22px;
    border-bottom: 1px solid rgba(148,163,184,0.14);
}

.deposit-v3-brand,
.deposit-v3-rate {
    display: flex;
    align-items: center;
    gap: 14px;
}

.deposit-v3-logo {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(var(--accent-rgb),0.24), rgba(var(--accent-rgb),0.08));
    box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb),0.25), 0 14px 28px rgba(var(--accent-rgb),0.16);
}

.deposit-v3-logo img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(var(--accent-rgb),0.42));
}

.deposit-v3-brand span,
.deposit-v3-rate span,
.deposit-v3-section-head small,
.deposit-v3-summary span {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
}

.deposit-v3-brand b {
    display: block;
    margin-top: 3px;
    color: var(--text-white);
    font-size: 27px;
    font-weight: 900;
    text-transform: uppercase;
}

.deposit-v3-rate {
    padding: 12px 16px;
    border-radius: 16px;
    background:
        radial-gradient(circle at 20% 50%, rgba(var(--accent-rgb),0.16), transparent 55%),
        rgba(2,6,10,0.40);
    border: 1px solid rgba(var(--accent-rgb),0.24);
}

.deposit-v3-rate b {
    color: var(--accent);
    font-size: 16px;
    font-weight: 900;
}

.deposit-v3-body {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 12px;
    padding: 14px;
}

.deposit-v3-panel {
    border-radius: 20px;
    border: 1px solid rgba(148,163,184,0.14);
    background: rgba(8,13,19,0.68);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.deposit-v3-main {
    padding: 18px;
}

.deposit-v3-checkout {
    padding: 18px;
    background:
        linear-gradient(180deg, rgba(var(--accent-rgb),0.09), transparent 44%),
        rgba(8,13,19,0.76);
}

.deposit-v3-section-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
}

.deposit-v3-section-head span {
    color: var(--text-white);
    font-size: 15px;
    font-weight: 900;
    text-transform: uppercase;
}

.deposit-v3-amount-box {
    position: relative;
    margin-bottom: 14px;
}

.deposit-v3-amount-input {
    height: 72px !important;
    padding: 0 66px 0 20px !important;
    border-radius: 18px !important;
    font-size: 34px !important;
    font-weight: 900 !important;
    border-color: rgba(var(--accent-rgb),0.24) !important;
    background:
        radial-gradient(circle at 88% 50%, rgba(var(--accent-rgb),0.12), transparent 30%),
        linear-gradient(180deg, rgba(2,6,10,0.72), rgba(2,6,10,0.42)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 0 0 1px rgba(var(--accent-rgb),0.04) !important;
}

.deposit-v3-amount-input::-webkit-outer-spin-button,
.deposit-v3-amount-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.deposit-v3-amount-input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.deposit-v3-amount-box > span {
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent);
    font-size: 28px;
    font-weight: 900;
}

.deposit-v3-packs {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 12px !important;
    margin: 0 0 16px !important;
}

.deposit-v3-packs button {
    height: 82px !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 5px;
    padding: 0 16px;
    border-radius: 16px !important;
    text-align: left;
}

.deposit-v3-packs button::after {
    display: none;
}

.deposit-v3-packs button b {
    color: var(--text-white);
    font-size: 19px;
}

.deposit-v3-packs button span {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
}

.deposit-v3-packs button.active span,
.deposit-v3-packs button:hover span {
    color: rgba(255,255,255,0.78);
}

.deposit-v3-promo {
    display: block;
    margin-top: 8px;
}

.deposit-v3-promo .deposit-input {
    height: 50px !important;
    border-radius: 16px !important;
    width: 100%;
}

.deposit-apply-promo-btn {
    width: 100%;
    margin-top: 10px;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid rgba(var(--accent-rgb), 0.45);
    background: rgba(var(--accent-rgb), 0.10);
    color: var(--accent);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.2s;
}

.deposit-apply-promo-btn:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(var(--accent-rgb), 0.24);
}

.deposit-promo-msg {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 800;
    min-height: 18px;
}

.deposit-v3-methods {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 0 !important;
    border: 0 !important;
}

.deposit-v3-methods .deposit-method {
    min-height: 90px !important;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 12px;
    padding: 16px !important;
    border-radius: 18px !important;
    border: 2px solid rgba(148,163,184,0.18) !important;
    background: rgba(7,12,18,0.84) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.04),
        0 4px 12px rgba(0,0,0,0.25) !important;
    transition: all 0.25s ease !important;
    position: relative;
    overflow: hidden;
}

.deposit-v3-methods .deposit-method:hover {
    border-color: rgba(var(--accent-rgb),0.35) !important;
    background:
        radial-gradient(circle at 12% 50%, rgba(var(--accent-rgb),0.10), transparent 34%),
        rgba(7,12,18,0.84) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.06),
        0 0 0 1px rgba(var(--accent-rgb),0.06),
        0 8px 24px rgba(var(--accent-rgb),0.08) !important;
    transform: translateY(-1px);
}

.deposit-v3-methods .deposit-method.active {
    border-color: rgba(var(--accent-rgb),0.85) !important;
    background:
        radial-gradient(circle at 12% 50%, rgba(var(--accent-rgb),0.25), transparent 34%),
        linear-gradient(135deg, rgba(var(--accent-rgb),0.15), rgba(7,12,18,0.84) 48%, rgba(var(--accent-rgb),0.10)) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.08),
        0 0 0 2px rgba(var(--accent-rgb),0.30),
        0 0 20px rgba(var(--accent-rgb),0.18),
        0 14px 34px rgba(var(--accent-rgb),0.15) !important;
    transform: translateY(-2px);
}

.deposit-v3-methods .deposit-method.active::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(var(--accent-rgb),0.16), transparent 58%);
    pointer-events: none;
}

.deposit-v3-methods .deposit-method-logo {
    grid-row: 1 / 3;
    grid-column: 1;
}

.deposit-v3-methods .deposit-method-logo-img {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: rgba(2,6,10,0.40);
    border: 1px solid rgba(148,163,184,0.16);
}

.deposit-v3-methods .deposit-method-logo-img img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: none;
}

.deposit-v3-methods .deposit-method-name,
.deposit-v3-methods .deposit-method-currency {
    grid-column: 2;
}

.deposit-v3-methods .deposit-method-name {
    font-size: 17px;
    font-weight: 900;
    line-height: 1.1;
}

.deposit-v3-methods .deposit-method-currency {
    justify-self: start;
    font-size: 12px;
    color: rgba(226,232,240,0.72);
}

.deposit-v3-methods .deposit-method-logo-visa {
    display: inline-flex;
    width: 52px;
    height: 52px;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(135deg, #0b4fb7, #0a79f6);
    border: 1px solid rgba(147,197,253,0.40);
    color: #ffffff;
    font-size: 13px;
    font-weight: 950;
    font-style: italic;
    letter-spacing: 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 8px 18px rgba(10,121,246,0.20);
}

.deposit-v3-methods .deposit-method[data-provider="foreign-card"] .deposit-method-name {
    font-size: 15px;
    line-height: 1.18;
    overflow-wrap: anywhere;
}

.deposit-v3-summary {
    display: grid;
    gap: 10px;
    margin: 16px 0;
}

.deposit-v3-summary div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px;
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(var(--accent-rgb),0.08), rgba(2,6,10,0.36) 52%),
        rgba(2,6,10,0.36);
    border: 1px solid rgba(var(--accent-rgb),0.14);
}

.deposit-v3-summary b {
    color: var(--text-white);
    font-size: 15px;
    font-weight: 900;
    text-align: right;
}

.deposit-age-confirm {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 4px 0 12px;
    padding: 11px 12px;
    border-radius: 14px;
    border: 1px solid rgba(var(--accent-rgb), 0.22);
    background: rgba(var(--accent-rgb), 0.07);
    color: rgba(226,232,240,0.86);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
    cursor: pointer;
}

.deposit-age-confirm input {
    width: 16px;
    height: 16px;
    margin-top: 1px;
    accent-color: var(--accent);
    flex: 0 0 auto;
}

#deposit-summary-coins {
    color: var(--accent);
    font-size: 18px;
}

.deposit-v3-pay-btn {
    width: 100%;
    min-width: 0 !important;
    margin-top: 2px;
    height: 56px;
    font-size: 17px;
    font-weight: 900;
    letter-spacing: .2px;
}

.deposit-v3 .deposit-help-text {
    margin: 12px 0 0 !important;
    text-align: center;
    background: transparent;
    padding: 0;
    color: rgba(148,163,184,0.90);
    font-size: 12px;
    line-height: 1.45;
}

@media (max-width: 860px) {
    .deposit-v3-hero,
    .deposit-v3-body {
        grid-template-columns: 1fr;
    }
    .deposit-v3-hero {
        flex-direction: column;
        align-items: flex-start;
        padding-right: 66px;
    }
    .deposit-v3-rate {
        width: 100%;
        justify-content: space-between;
    }
    .deposit-v3-body {
        display: grid;
    }
}

@media (max-width: 620px) {
    .deposit-v3 {
        width: calc(100vw - 18px) !important;
        border-radius: 18px !important;
    }
    .deposit-v3-hero { padding: 14px 52px 12px 16px; gap: 10px; }
    .deposit-v3-brand { gap: 10px; }
    .deposit-v3-logo { width: 40px; height: 40px; }
    .deposit-v3-logo img { width: 24px; height: 24px; }
    .deposit-v3-brand b {
        font-size: 18px;
    }
    .deposit-v3-brand span, .deposit-v3-rate span { font-size: 10px; }
    .deposit-v3-rate { padding: 8px 12px; border-radius: 12px; }
    .deposit-v3-rate b { font-size: 13px; }
    .deposit-v3-main,
    .deposit-v3-checkout {
        padding: 12px;
    }
    .deposit-v3-section-head { margin-bottom: 10px; }
    .deposit-v3-section-head span { font-size: 12px; }
    .deposit-v3-section-head small { font-size: 9px; }
    .deposit-v3-amount-input {
        height: 56px !important;
        font-size: 24px !important;
        padding: 0 48px 0 14px !important;
    }
    .deposit-v3-amount-box > span { font-size: 20px; right: 16px; }
    .deposit-v3-packs {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }
    .deposit-v3-packs button {
        height: 60px !important;
        padding: 0 10px;
        border-radius: 12px !important;
    }
    .deposit-v3-packs button b { font-size: 14px; }
    .deposit-v3-packs button span { font-size: 10px; }
    .deposit-v3-promo .deposit-input { height: 42px !important; border-radius: 12px !important; }
    .deposit-apply-promo-btn { padding: 10px 12px; font-size: 11px; }
    .deposit-v3-methods .deposit-method { min-height: 64px !important; padding: 10px 12px !important; border-radius: 12px !important; }
    .deposit-v3-methods .deposit-method-logo-img img { width: 26px; height: 26px; }
    .deposit-v3-methods .deposit-method-logo-visa { width: 40px; height: 40px; font-size: 10px; }
    .deposit-v3-methods .deposit-method-name { font-size: 13px; }
    .deposit-v3-methods .deposit-method-currency { font-size: 10px; }
    .deposit-v3-summary { gap: 8px; margin: 10px 0; }
    .deposit-v3-summary div { padding: 8px 10px; border-radius: 10px; }
    .deposit-v3-summary b { font-size: 13px; }
    .deposit-age-confirm { padding: 8px 10px; font-size: 10px; gap: 8px; }
    .deposit-age-confirm input { width: 14px; height: 14px; }
    .deposit-v3-pay-btn { height: 46px; font-size: 14px; }
    .deposit-v3 .deposit-help-text { font-size: 10px !important; }
}

@media (max-width: 480px) {
    #deposit-modal.modal-overlay { padding: 10px; align-items: flex-start; overflow-y: auto; -webkit-overflow-scrolling: touch; }
    #deposit-modal .modal-content.deposit-modal {
        width: 100%;
        max-width: none !important;
        max-height: calc(100vh - 20px) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    .deposit-v3-handle { display: flex; justify-content: center; padding: 8px 0 4px; }
    .deposit-v3-handle span { width: 36px; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.25); }
    .deposit-v3 {
        width: calc(100vw - 40px) !important;
        max-width: none !important;
        border-radius: 16px !important;
        max-height: none !important;
        overflow: visible !important;
    }
    .deposit-v3-hero { padding: 12px 44px 10px 14px; gap: 8px; }
    .deposit-v3-logo { width: 34px; height: 34px; border-radius: 10px; }
    .deposit-v3-logo img { width: 20px; height: 20px; }
    .deposit-v3-brand { gap: 8px; }
    .deposit-v3-brand b { font-size: 15px; }
    .deposit-v3-brand span, .deposit-v3-rate span { font-size: 9px; }
    .deposit-v3-rate { padding: 6px 10px; border-radius: 10px; }
    .deposit-v3-rate b { font-size: 12px; }
    .deposit-v3-body { padding: 10px; gap: 10px; }
    .deposit-v3-main, .deposit-v3-checkout { padding: 12px; border-radius: 14px; }
    .deposit-v3-section-head { margin-bottom: 8px; }
    .deposit-v3-section-head span { font-size: 11px; }
    .deposit-v3-section-head small { font-size: 9px; }
    .deposit-v3-amount-input {
        height: 48px !important;
        font-size: 20px !important;
        padding: 0 40px 0 12px !important;
    }
    .deposit-v3-amount-box > span { font-size: 18px; right: 14px; }
    .deposit-v3-packs { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px !important; }
    .deposit-v3-packs button { height: 48px !important; padding: 0 8px; border-radius: 10px !important; }
    .deposit-v3-packs button b { font-size: 12px; }
    .deposit-v3-packs button span { font-size: 9px; }
    .deposit-v3-promo .deposit-input { height: 38px !important; font-size: 16px !important; border-radius: 10px !important; }
    .deposit-apply-promo-btn { padding: 8px 10px; font-size: 10px; border-radius: 10px; }
    .deposit-v3-methods .deposit-method { min-height: 56px !important; padding: 8px 10px !important; border-radius: 10px !important; }
    .deposit-v3-methods .deposit-method-logo-img { width: 36px; height: 36px; border-radius: 10px; }
    .deposit-v3-methods .deposit-method-logo-img img { width: 20px; height: 20px; }
    .deposit-v3-methods .deposit-method-logo-visa { width: 36px; height: 36px; font-size: 9px; }
    .deposit-v3-methods .deposit-method-name { font-size: 12px; }
    .deposit-v3-methods .deposit-method-currency { font-size: 9px; }
    .deposit-v3-methods .deposit-method[data-provider="foreign-card"] .deposit-method-name { font-size: 11px; }
    .deposit-v3-summary { margin: 10px 0; }
    .deposit-v3-summary div { padding: 8px 10px; border-radius: 10px; }
    .deposit-v3-summary b { font-size: 12px; }
    #deposit-summary-coins { font-size: 14px; }
    .deposit-age-confirm { padding: 8px 10px; font-size: 9px; gap: 8px; }
    .deposit-age-confirm input { width: 14px; height: 14px; }
    .deposit-v3-pay-btn { height: 44px; font-size: 13px; }
    .deposit-v3 .deposit-help-text { font-size: 9px !important; }
}

@keyframes liveHoverEdgeSweep {
    0% { opacity: 0; transform: translateX(-125%); }
    22% { opacity: 0.52; }
    100% { opacity: 0; transform: translateX(125%); }
}

@keyframes liveHoverDropArrive {
    0% { opacity: 0.35; transform: translateY(10px) scale(0.78); }
    62% { opacity: 1; transform: translateY(-3px) scale(1.06); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .live-item,
    .live-item::before,
    .live-item .live-item-icon,
    .live-item .item-name,
    .live-item .item-price,
    .live-hover,
    .live-hover::before,
    .live-hover .lhv-bg,
    .live-hover .lhv-case,
    .live-hover .lhv-avatar,
    .live-hover .lhv-img,
    .live-hover .lhv-name,
    .live-hover .lhv-img img {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}

/* Adaptive opening roulette size */
.case-v2-header.is-opening .roulette-section {
    width: min(100%, 1560px);
    padding: 18px 16px 14px;
    margin: 6px auto 18px;
}
.case-v2-header.is-opening .roulette-container {
    min-height: 0;
    gap: 16px;
    margin-bottom: 12px;
    align-items: start;
}
.case-v2-header.is-opening .roulette-window {
    height: 214px;
    min-width: 0;
    border-radius: 16px;
}
.case-v2-header.is-opening .roulette-item {
    width: 172px;
    min-width: 172px;
    height: 190px;
    padding-top: 12px;
    border-radius: 13px;
}
.case-v2-header.is-opening .roulette-item .item-icon {
    width: 122px;
    height: 104px;
    margin-bottom: 8px;
}
.case-v2-header.is-opening .roulette-item .item-name {
    font-size: 12px;
    line-height: 1.15;
    padding: 0 10px;
}
.case-v2-header.is-opening .roulette-item .item-price {
    font-size: 11px;
    margin-bottom: 10px;
}

.case-v2-header.is-opening .roulette-container.is-multi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}
.case-v2-header.is-opening .roulette-container.is-multi-grid .roulette-window {
    height: 168px;
}
.case-v2-header.is-opening .roulette-container.is-multi-grid .roulette-item {
    width: 136px;
    min-width: 136px;
    height: 148px;
    padding-top: 9px;
    border-radius: 11px;
}
.case-v2-header.is-opening .roulette-container.is-multi-grid .roulette-item .item-icon {
    width: 92px;
    height: 76px;
    margin-bottom: 6px;
}
.case-v2-header.is-opening .roulette-container.is-multi-grid .roulette-item .item-name {
    font-size: 10px;
    padding: 0 7px;
}
.case-v2-header.is-opening .roulette-container.is-multi-grid .roulette-item .item-price {
    font-size: 9px;
    margin-bottom: 7px;
}

.case-v2-header.is-opening .roulette-container.is-many-grid {
    gap: 10px 12px;
}
.case-v2-header.is-opening .roulette-container.is-many-grid .roulette-window {
    height: 130px;
}
.case-v2-header.is-opening .roulette-container.is-many-grid .roulette-item {
    width: 108px;
    min-width: 108px;
    height: 112px;
    padding-top: 6px;
}
.case-v2-header.is-opening .roulette-container.is-many-grid .roulette-item .item-icon {
    width: 62px;
    height: 48px;
    margin-bottom: 4px;
}
.case-v2-header.is-opening .roulette-container.is-many-grid .roulette-item .item-name {
    font-size: 8px;
}
.case-v2-header.is-opening .roulette-container.is-many-grid .roulette-item .item-price {
    font-size: 8px;
    margin-bottom: 5px;
}

@media (min-width: 1101px) {
    .case-v2-header.is-opening .roulette-container.is-multi-grid .roulette-window:last-child:nth-child(odd),
    .case-v2-header.is-opening .roulette-container.is-many-grid .roulette-window:last-child:nth-child(odd) {
        grid-column: 1 / -1;
        justify-self: center;
        width: 100%;
    }
}

@media (max-width: 1100px) {
    .case-v2-header.is-opening .roulette-container.is-multi-grid {
        grid-template-columns: 1fr;
    }
    .case-v2-header.is-opening .roulette-container.is-multi-grid .roulette-window {
        height: 154px;
    }
}

/* Pull case page closer to the top nav */
.content-area:has(.case-v2-page) {
    padding-top: 0;
}
.case-v2-page {
    padding-top: 0;
    margin-top: -2px;
}
.case-v2-header {
    padding-top: 0;
}
.case-v2-top-bar {
    margin-top: 0;
    margin-bottom: 0;
}
.case-v2-label {
    margin-top: 0;
}
.case-v2-header.is-opening {
    padding-top: 0;
}
.case-v2-header.is-opening .case-v2-title {
    margin-bottom: 8px;
}

.case-v2-header.is-opening {
    padding-bottom: 8px !important;
}

.case-v2-header.is-opening .roulette-section {
    padding: 10px 12px 8px !important;
    margin: 0 auto 8px !important;
    border-radius: 14px;
}

.case-v2-header.is-opening .roulette-container {
    gap: 10px !important;
    margin-bottom: 4px !important;
}

.case-v2-header.is-opening .roulette-container.is-single-grid {
    min-height: 200px !important;
}

.case-v2-header.is-opening .roulette-container.is-single-grid .roulette-window {
    height: 200px !important;
}

.case-v2-header.is-opening .roulette-container.is-single-grid .roulette-item {
    width: 170px !important;
    min-width: 170px !important;
    height: 178px !important;
    padding-top: 10px !important;
}

.case-v2-header.is-opening .roulette-container.is-single-grid .roulette-item .item-icon {
    width: 110px !important;
    height: 92px !important;
    margin-bottom: 6px !important;
}

.case-v2-header.is-opening .roulette-container.is-single-grid .roulette-item .item-name {
    font-size: 11px !important;
    padding: 0 8px !important;
}

.case-v2-header.is-opening .roulette-container.is-single-grid .roulette-item .item-price {
    font-size: 10px !important;
    margin-bottom: 8px !important;
}

.case-v2-header.is-opening .roulette-result {
    margin: 5px 0 3px !important;
    min-height: 0 !important;
    font-size: 15px !important;
    line-height: 1.25;
}

.case-v2-header.is-opening .bulk-summary {
    margin: 4px 0 6px !important;
}

.case-v2-header.is-opening .roulette-container.is-single-grid + .roulette-result + .bulk-summary {
    display: none !important;
}

.case-v2-header.is-opening .case-v2-quantity {
    margin-top: 10px !important;
    margin-bottom: 8px !important;
}

.case-v2-header.is-opening .case-v2-actions {
    margin-top: 4px !important;
}

.case-v2-header.is-opening + .case-v2-section-title {
    margin-top: 14px !important;
}

/* Better case open controls */
.case-v2-actions {
    gap: 14px;
}
.case-v2-open-btn,
.case-v2-fast-btn {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 50px;
    min-width: 252px;
    padding: 0 22px;
    border-radius: 11px;
    line-height: 1;
    transform: translateZ(0);
    transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.case-v2-open-btn {
    border: 1px solid rgba(255,255,255,0.12);
    background:
        radial-gradient(circle at 50% 0%, rgba(255,255,255,0.22), transparent 44%),
        linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0) 44%),
        linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
    background-size: 100% 100%;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.24),
        inset 0 -2px 0 rgba(0,0,0,0.18),
        0 10px 24px rgba(var(--accent-rgb),0.28),
        0 0 18px rgba(var(--accent-rgb),0.14);
}
.case-v2-fast-btn {
    border: 1px solid rgba(var(--accent-rgb),0.54);
    background:
        radial-gradient(circle at 50% 0%, rgba(var(--accent-rgb),0.30), transparent 46%),
        linear-gradient(180deg, rgba(var(--accent-rgb),0.18), rgba(var(--accent-rgb),0.04)),
        linear-gradient(180deg, #111923 0%, #0b1118 100%);
    background-size: 100% 100%;
    color: #d8ffe6;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.08),
        0 8px 22px rgba(0,0,0,0.32),
        0 0 18px rgba(var(--accent-rgb),0.18);
}
.case-v2-open-btn::before,
.case-v2-fast-btn::before {
    content: '';
    position: absolute;
    inset: 1px 1px auto;
    height: 42%;
    border-radius: 10px 10px 18px 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.24), rgba(255,255,255,0));
    pointer-events: none;
    z-index: -1;
}
.case-v2-open-btn::after,
.case-v2-fast-btn::after {
    content: '';
    position: absolute;
    left: 12%;
    right: 12%;
    bottom: 7px;
    height: 2px;
    background:
        linear-gradient(90deg, transparent, rgba(255,255,255,0.48), transparent);
    transform: none;
    opacity: 0.46;
    mix-blend-mode: screen;
    pointer-events: none;
    animation: caseBtnGlowLine 2.8s ease-in-out infinite;
}
.case-v2-open-btn:hover,
.case-v2-fast-btn:hover {
    transform: translateY(-3px);
    filter: brightness(1.08);
}
.case-v2-open-btn:hover {
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.28),
        inset 0 -2px 0 rgba(0,0,0,0.18),
        0 14px 30px rgba(var(--accent-rgb),0.38),
        0 0 28px rgba(var(--accent-rgb),0.22);
}
.case-v2-fast-btn:hover {
    background:
        radial-gradient(circle at 50% 0%, rgba(var(--accent-rgb),0.38), transparent 48%),
        linear-gradient(180deg, rgba(var(--accent-rgb),0.25), rgba(var(--accent-rgb),0.08)),
        linear-gradient(180deg, #121f2b 0%, #0a121a 100%);
    background-size: 100% 100%;
    color: #fff;
    border-color: var(--accent);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.12),
        0 14px 30px rgba(0,0,0,0.34),
        0 0 30px rgba(var(--accent-rgb),0.28);
}
.case-v2-open-btn:hover::after,
.case-v2-fast-btn:hover::after {
    opacity: 1;
    animation-duration: 1.35s;
}
.case-v2-open-btn:active,
.case-v2-fast-btn:active {
    transform: translateY(0);
}
.case-v2-open-btn span,
.case-v2-fast-btn span {
    position: relative;
    z-index: 1;
}
.case-v2-fast-btn > span:first-child {
    color: #fde047;
    font-size: 18px;
    filter: drop-shadow(0 0 8px rgba(250,204,21,0.65));
}
.case-v2-open-btn:disabled,
.case-v2-fast-btn:disabled {
    opacity: 0.48;
    transform: none;
    filter: grayscale(0.25);
    box-shadow: none;
}
.case-v2-open-btn,
.case-v2-fast-btn {
    animation: caseBtnBreath 2.7s ease-in-out infinite;
}
@keyframes caseBtnBreath {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.07); }
}
@keyframes caseBtnGlowLine {
    0%, 100% { opacity: 0.34; transform: scaleX(0.72); }
    50% { opacity: 0.86; transform: scaleX(1); }
}

/* Case info icon */
.case-v2-info-btn {
    position: relative;
    min-height: 28px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--accent);
    letter-spacing: 1px;
}
.case-v2-info-btn::after {
    content: none;
}
.case-v2-info-btn:hover {
    color: var(--accent-hover);
    transform: none;
}
.case-v2-info-btn:hover::after {
    opacity: 0;
}
.info-icon {
    position: relative;
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 50%;
    background: transparent;
    box-shadow: 0 0 12px rgba(var(--accent-rgb),0.18);
    color: transparent;
    font-size: 12px;
    overflow: hidden;
}
.info-icon::before {
    content: none;
}
.info-icon::after {
    content: none;
}
.info-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.case-v2-info-btn:hover .info-icon {
    transform: scale(1.08);
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.08),
        0 0 18px rgba(var(--accent-rgb),0.42);
}

/* Live drop hover cards like compact banners */
.live-hover {
    width: 278px;
    min-height: 104px;
    border-radius: 0;
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: 12px 14px 34px rgba(0,0,0,0.42);
    background: #b91f2a;
}
.live-hover.is-visible {
    box-shadow: 14px 16px 38px rgba(0,0,0,0.48), 0 0 0 1px rgba(255,255,255,0.05);
}
.live-hover.is-case-drop,
.live-hover.is-case-drop .lhv-bg {
    background: linear-gradient(135deg, #d6b300 0%, #b99a00 100%);
}
.live-hover.is-upgrade-drop,
.live-hover.is-upgrade-drop .lhv-bg {
    background: linear-gradient(135deg, #cf2a31 0%, #b82029 100%);
}
.lhv-bg {
    background:
        radial-gradient(circle at 88% 12%, rgba(255,255,255,0.20), transparent 20%),
        linear-gradient(135deg, rgba(255,255,255,0.08), rgba(0,0,0,0.08));
}
.lhv-bg::after {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.06), rgba(0,0,0,0.12)),
        linear-gradient(90deg, rgba(168,85,247,0.95) 0 2px, transparent 2px);
}
.lhv-inner {
    min-height: 104px;
    padding: 8px 10px 9px 12px;
    display: grid;
    grid-template-columns: 1fr 82px;
    grid-template-rows: 24px 1fr;
    grid-template-areas:
        'case avatar'
        'img img';
    column-gap: 8px;
    row-gap: 2px;
    align-items: center;
}
.lhv-case {
    align-self: start;
    justify-self: center;
    width: 100%;
    padding-left: 26px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.22);
}
.lhv-avatar {
    grid-area: avatar;
    justify-self: end;
    align-self: start;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.18);
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    border: 2px solid rgba(255,255,255,0.32);
    box-shadow: 0 5px 12px rgba(0,0,0,0.24), inset 0 0 0 1px rgba(255,255,255,0.08);
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.lhv-avatar.is-case-avatar {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.22);
    padding: 3px;
}
.lhv-avatar:hover {
    transform: scale(1.07);
    box-shadow: 0 7px 15px rgba(0,0,0,0.28), 0 0 12px rgba(255,255,255,0.18);
}
.lhv-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}
.lhv-avatar.is-case-avatar .lhv-avatar-img {
    object-fit: contain;
    border-radius: 50%;
}
.lhv-img {
    width: 170px;
    height: 72px;
    justify-self: center;
    align-self: end;
    transform: translateX(-24px);
}
.live-hover.is-upgrade-drop .lhv-img {
    width: 120px;
    height: 72px;
    transform: translateX(-10px);
}
.lhv-img img {
    max-width: 100%;
    max-height: 100%;
    filter: drop-shadow(0 7px 9px rgba(0,0,0,0.40));
}
.lhv-name {
    position: absolute;
    left: 18px;
    right: 78px;
    bottom: 6px;
    display: block;
    max-width: none;
    font-size: 11px;
    font-weight: 800;
    text-transform: none;
    color: rgba(255,255,255,0.9);
    text-align: center;
    line-height: 1.1;
    pointer-events: none;
}
.lhv-actions {
    display: none;
}
.lhv-actions a,
.lhv-actions a:only-child {
    flex: 0 0 auto;
    min-width: 62px;
    max-width: 86px;
    padding: 7px 10px;
    border-radius: 0;
    background: rgba(9,13,18,0.92);
    border: 1px solid rgba(255,255,255,0.72);
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: 0 5px 10px rgba(0,0,0,0.22);
}
.lhv-actions a + a {
    display: none;
}
.lhv-actions a:hover {
    background: rgba(15,22,31,0.98);
}
.lhv-q {
    display: none;
}
.lhv-q-panel {
    display: none;
}
.live-hover.show-meta .lhv-q-panel {
    display: none;
    opacity: 0;
    pointer-events: none;
}

/* Polished live drop preview */
.live-hover {
    width: 292px;
    min-height: 132px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    background: #0e141c;
    box-shadow: 0 18px 44px rgba(0,0,0,0.54), 0 0 0 1px rgba(255,255,255,0.04);
}
.live-hover.is-visible {
    box-shadow:
        0 20px 48px rgba(0,0,0,0.58),
        0 0 28px color-mix(in srgb, var(--rarity-color, var(--accent)) 28%, transparent),
        0 0 0 1px rgba(255,255,255,0.06);
}
.live-hover.is-case-drop,
.live-hover.is-case-drop .lhv-bg,
.live-hover.is-upgrade-drop,
.live-hover.is-upgrade-drop .lhv-bg {
    background:
        radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--rarity-color, var(--accent)) 30%, transparent), transparent 38%),
        linear-gradient(135deg, rgba(19,27,37,0.98) 0%, rgba(9,13,18,0.98) 58%, rgba(15,22,31,0.98) 100%);
}
.lhv-bg::after {
    background:
        radial-gradient(circle at 42% 48%, color-mix(in srgb, var(--rarity-color, var(--accent)) 22%, transparent) 0 18%, transparent 42%),
        radial-gradient(circle at 56% 42%, rgba(255,255,255,0.10) 0 10%, transparent 28%),
        radial-gradient(circle at 34% 62%, color-mix(in srgb, var(--rarity-color, var(--accent)) 18%, transparent) 0 14%, transparent 34%),
        linear-gradient(90deg, var(--rarity-color, var(--accent)) 0 3px, transparent 3px),
        linear-gradient(180deg, rgba(255,255,255,0.05), rgba(0,0,0,0.14));
    filter: blur(3px);
    opacity: 0.95;
    animation: liveHoverSmokeDrift 5.8s ease-in-out infinite;
}
.lhv-bg::before {
    inset: 18px 14px 12px 26px;
    width: auto;
    height: auto;
    border-radius: 50%;
    background:
        radial-gradient(circle at 48% 48%, color-mix(in srgb, var(--rarity-color, var(--accent)) 36%, transparent) 0 12%, transparent 36%),
        radial-gradient(circle at 30% 54%, color-mix(in srgb, var(--rarity-color, var(--accent)) 24%, transparent) 0 10%, transparent 32%),
        radial-gradient(circle at 68% 48%, rgba(255,255,255,0.12) 0 8%, transparent 30%);
    filter: blur(16px);
    transform: none;
    opacity: 0.86;
    animation: liveHoverSmokePulse 4.6s ease-in-out infinite;
}
.live-hover.is-visible .lhv-bg::before {
    transform: none;
    opacity: 0.94;
}
@keyframes liveHoverSmokePulse {
    0%, 100% {
        transform: translate3d(-5px, 2px, 0) scale(0.98);
        opacity: 0.72;
    }
    50% {
        transform: translate3d(8px, -5px, 0) scale(1.12);
        opacity: 0.98;
    }
}
@keyframes liveHoverSmokeDrift {
    0%, 100% {
        background-position: 0 0, 0 0, 0 0, 0 0, 0 0;
        opacity: 0.82;
    }
    50% {
        background-position: 18px -8px, -14px 10px, 10px 6px, 0 0, 0 0;
        opacity: 1;
    }
}
.lhv-inner {
    min-height: 132px;
    padding: 10px 12px 12px;
    display: grid;
    grid-template-columns: 1fr 48px;
    grid-template-rows: 24px 72px 20px;
    grid-template-areas:
        'case avatar'
        'img img'
        'name name';
    column-gap: 8px;
    row-gap: 2px;
}
.lhv-case {
    grid-area: case;
    align-self: center;
    justify-self: start;
    width: auto;
    max-width: 210px;
    padding: 0 0 0 10px;
    text-align: left;
    font-size: 12px;
    font-weight: 800;
    color: rgba(255,255,255,0.92);
    text-shadow: 0 1px 3px rgba(0,0,0,0.35);
}
.lhv-avatar {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255,255,255,0.22);
    background: rgba(255,255,255,0.10);
    box-shadow: 0 8px 16px rgba(0,0,0,0.34), 0 0 16px color-mix(in srgb, var(--rarity-color, var(--accent)) 18%, transparent);
}
.lhv-avatar.is-case-avatar {
    padding: 4px;
    border-color: color-mix(in srgb, var(--rarity-color, var(--accent)) 42%, rgba(255,255,255,0.22));
}
.lhv-img,
.live-hover.is-upgrade-drop .lhv-img {
    grid-area: img;
    width: 188px;
    height: 76px;
    justify-self: center;
    align-self: center;
    transform: none;
}
.lhv-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter:
        drop-shadow(0 10px 12px rgba(0,0,0,0.48))
        drop-shadow(0 0 12px color-mix(in srgb, var(--rarity-color, var(--accent)) 34%, transparent));
}
.lhv-name {
    grid-area: name;
    position: static;
    align-self: end;
    justify-self: center;
    max-width: 248px;
    padding: 3px 9px;
    border-radius: 6px;
    background: rgba(5,8,12,0.58);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.1;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0,0,0,0.42);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lhv-actions,
.lhv-actions a {
    display: none !important;
}

/* Final override: keep case image readable without changing the badge zone */
.live-hover .lhv-avatar.is-case-avatar .lhv-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    transform: scale(1.55);
}

/* Disable manual scrolling in live drops */
.live-items {
    overflow: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}
.live-items::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
}

/* Tomorrow fixes: case sections, themed controls, and cleaner open buttons */
.case-section-really .cases-grid {
    display: grid;
    grid-template-columns: repeat(4, 260px);
    justify-content: center;
    gap: 25px;
}

.case-section-really .case-card:nth-child(5) {
    grid-column: 2;
}

.case-section-really .case-card:nth-child(6) {
    grid-column: 3;
}

/* Smooth live-drop hover reveal */
.live-hover {
    opacity: 0 !important;
    pointer-events: none;
    transform: translate3d(-16px, calc(-50% + 10px), 0) scale(0.94) !important;
    transform-origin: left center;
    transition:
        opacity 0.34s ease,
        transform 0.38s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.38s ease,
        filter 0.38s ease !important;
    will-change: opacity, transform;
    filter: saturate(0.88) brightness(0.92);
}

.live-hover.is-visible {
    opacity: 1 !important;
    pointer-events: auto;
    transform: translate3d(0, -50%, 0) scale(1) !important;
    filter: saturate(1) brightness(1);
}

.live-hover .lhv-bg {
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 0.36s ease, transform 0.42s ease;
}

.live-hover.is-visible .lhv-bg {
    opacity: 1;
    transform: scale(1);
}

.live-hover .lhv-case,
.live-hover .lhv-avatar,
.live-hover .lhv-img,
.live-hover .lhv-name {
    opacity: 0;
    transform: translate3d(-8px, 10px, 0) scale(0.97);
    transition:
        opacity 0.28s ease,
        transform 0.36s cubic-bezier(0.16, 1, 0.3, 1);
}

.live-hover.is-visible .lhv-case,
.live-hover.is-visible .lhv-avatar,
.live-hover.is-visible .lhv-img,
.live-hover.is-visible .lhv-name {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

.live-hover.is-visible .lhv-case { transition-delay: 0.03s; }
.live-hover.is-visible .lhv-avatar { transition-delay: 0.05s; }
.live-hover.is-visible .lhv-img { transition-delay: 0.08s; }
.live-hover.is-visible .lhv-name { transition-delay: 0.11s; }

@media (prefers-reduced-motion: reduce) {
    .live-hover,
    .live-hover .lhv-bg,
    .live-hover .lhv-case,
    .live-hover .lhv-avatar,
    .live-hover .lhv-img,
    .live-hover .lhv-name {
        transition: none !important;
    }
}

.case-v2-open-btn,
.case-v2-fast-btn {
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), 0 10px 22px rgba(var(--accent-rgb),0.18) !important;
}

.case-v2-open-btn::before,
.case-v2-open-btn::after,
.case-v2-fast-btn::before,
.case-v2-fast-btn::after {
    content: none !important;
    display: none !important;
}

.case-v2-open-btn {
    background: linear-gradient(180deg, var(--accent-hover) 0%, var(--accent) 54%, var(--accent-dark) 100%) !important;
}

.case-v2-fast-btn {
    background: rgba(var(--accent-rgb),0.08) !important;
    border-color: var(--accent) !important;
    color: var(--accent) !important;
}

.case-v2-fast-btn:hover {
    background: linear-gradient(180deg, var(--accent-hover) 0%, var(--accent-dark) 100%) !important;
    color: #fff !important;
}

.pv2-sell-all {
    border-color: var(--accent) !important;
    background: rgba(var(--accent-rgb),0.04) !important;
    box-shadow: 0 0 0 1px rgba(var(--accent-rgb),0.08) !important;
}

.pv2-sell-all:hover {
    background: rgba(var(--accent-rgb),0.10) !important;
    box-shadow: 0 0 18px rgba(var(--accent-rgb),0.16) !important;
}

.pv2-sell-all .sell-icon,
.pv2-sell-all .sell-amount {
    color: var(--accent) !important;
}

.pv2-filter.active::before {
    border-color: var(--accent) !important;
    color: var(--accent) !important;
}

.withdraw-modal .modal-body > div,
.withdraw-modal #withdraw-btn {
    margin-left: auto;
    margin-right: auto;
}

.pv2-promo-box {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.pv2-promo-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin-top: 10px;
    align-items: center;
}

.pv2-promo-row .pv2-input {
    min-width: 0;
}

.admin-promo-list {
    display: grid;
    gap: 6px;
    margin-top: 12px;
}

.admin-promo-row {
    display: grid;
    grid-template-columns: 1fr 1.4fr auto;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--bg-panel);
    color: var(--text-main);
    font-size: 12px;
}

.admin-promo-row b {
    color: var(--accent);
}

.pv2-session-card > div {
    display: grid;
    gap: 4px;
}

.pv2-session-card span {
    color: var(--text-muted);
    font-size: 12px;
}

.pv2-session-card .pv2-btn-outline {
    align-self: flex-start;
}

.upgrade-rule-index {
    background: rgba(var(--accent-rgb),0.14) !important;
    color: var(--accent) !important;
}

.upgrade-settings-radio:hover {
    border-color: rgba(var(--accent-rgb),0.28) !important;
    background: rgba(var(--accent-rgb),0.06) !important;
}

.upgrade-settings-radio input[type="radio"] {
    border-color: var(--accent-dark) !important;
    background: rgba(var(--accent-rgb),0.08) !important;
}

.upgrade-settings-radio input[type="radio"]:checked {
    border-color: var(--accent) !important;
    background: rgba(var(--accent-rgb),0.14) !important;
    box-shadow: inset 0 0 0 4px var(--accent), 0 0 10px rgba(var(--accent-rgb),0.22) !important;
}

.upgrade-btn-main,
.upgrade-settings-save {
    border-color: var(--accent) !important;
}

@media (max-width: 768px) {
    .pv2-promo-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1160px) {
    .case-section-really .cases-grid {
        grid-template-columns: repeat(2, minmax(240px, 260px));
    }

    .case-section-really .case-card:nth-child(5),
    .case-section-really .case-card:nth-child(6) {
        grid-column: auto;
    }
}

/* Keep profile item action tooltips inside the visible card area */
.pv2-items-grid,
.pv2-item-card,
.pv2-item-actions {
    overflow: visible !important;
}

.pv2-item-card:hover,
.pv2-item-card:focus-within {
    z-index: 60;
}

.pv2-item-actions {
    z-index: 70;
}

.pv2-act-btn[data-tooltip]::after {
    width: max-content;
    max-width: min(190px, calc(100vw - 28px));
    white-space: normal;
    overflow-wrap: break-word;
    text-align: center;
    z-index: 120;
}

.pv2-act-btn[data-tooltip]::before {
    z-index: 121;
}

.pv2-item-actions .pv2-act-btn:first-child[data-tooltip]::after {
    left: 0;
    transform: translate(0, 4px);
}

.pv2-item-actions .pv2-act-btn:first-child[data-tooltip]:hover::after,
.pv2-item-actions .pv2-act-btn:first-child[data-tooltip]:focus-visible::after {
    transform: translate(0, 0);
}

.pv2-item-actions .pv2-act-btn:first-child[data-tooltip]::before {
    left: 15px;
    transform: rotate(45deg);
}

.pv2-item-actions .pv2-act-btn:last-child[data-tooltip]::after {
    left: auto;
    right: 0;
    transform: translate(0, 4px);
}

.pv2-item-actions .pv2-act-btn:last-child[data-tooltip]:hover::after,
.pv2-item-actions .pv2-act-btn:last-child[data-tooltip]:focus-visible::after {
    transform: translate(0, 0);
}

.pv2-item-actions .pv2-act-btn:last-child[data-tooltip]::before {
    left: auto;
    right: 15px;
    transform: rotate(45deg);
}

/* Hard guard against stale/mismatched profile CSS on production caches */
.pv2-item-actions .pv2-act-btn img,
.pv2-sell-all .coin-inline,
.user-balance .coin-inline,
.pv2-balance-icon .coin-inline {
    width: 22px !important;
    height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    object-fit: contain !important;
    display: inline-block !important;
}

.pv2-sell-all .coin-inline,
.user-balance .coin-inline {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
}

.pv2-item-img > .pv2-item-real-img {
    width: auto !important;
    height: auto !important;
    max-width: 96% !important;
    max-height: 96% !important;
    object-fit: contain !important;
}

/* Profile stats explanations */
.pv2-card,
.pv2-stats-row,
.pv2-stat {
    overflow: visible;
}

.pv2-stat {
    position: relative;
}

.pv2-stat[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translate(-50%, 5px);
    width: max-content;
    max-width: 180px;
    padding: 8px 10px;
    border: 1px solid rgba(var(--accent-rgb),0.38);
    border-radius: 8px;
    background: rgba(10, 15, 23, 0.98);
    color: var(--text-white);
    box-shadow: 0 10px 24px rgba(0,0,0,0.34), 0 0 14px rgba(var(--accent-rgb),0.14);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
    white-space: normal;
    opacity: 0;
    pointer-events: none;
    z-index: 140;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.pv2-stat[data-tooltip]::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: calc(100% + 5px);
    width: 9px;
    height: 9px;
    border-right: 1px solid rgba(var(--accent-rgb),0.38);
    border-bottom: 1px solid rgba(var(--accent-rgb),0.38);
    background: rgba(10, 15, 23, 0.98);
    transform: translateX(-50%) rotate(45deg);
    opacity: 0;
    pointer-events: none;
    z-index: 141;
    transition: opacity 0.18s ease;
}

.pv2-stat[data-tooltip]:hover::after,
.pv2-stat[data-tooltip]:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, 0);
}

.pv2-stat[data-tooltip]:hover::before,
.pv2-stat[data-tooltip]:focus-visible::before {
    opacity: 1;
}

.pv2-stats-row .pv2-stat:first-child[data-tooltip]::after {
    left: 0;
    transform: translate(0, 5px);
}

.pv2-stats-row .pv2-stat:first-child[data-tooltip]:hover::after,
.pv2-stats-row .pv2-stat:first-child[data-tooltip]:focus-visible::after {
    transform: translate(0, 0);
}

.pv2-stats-row .pv2-stat:first-child[data-tooltip]::before {
    left: 24px;
    transform: rotate(45deg);
}

.pv2-stats-row .pv2-stat:last-child[data-tooltip]::after {
    left: auto;
    right: 0;
    transform: translate(0, 5px);
}

.pv2-stats-row .pv2-stat:last-child[data-tooltip]:hover::after,
.pv2-stats-row .pv2-stat:last-child[data-tooltip]:focus-visible::after {
    transform: translate(0, 0);
}

.pv2-stats-row .pv2-stat:last-child[data-tooltip]::before {
    left: auto;
    right: 24px;
    transform: rotate(45deg);
}

/* Admin panel polish */
.admin-page {
    max-width: 1280px;
    padding: 10px 12px 42px;
}

.admin-title {
    position: relative;
    width: max-content;
    margin: 4px auto 28px;
    color: var(--text-white);
    font-size: 30px;
    letter-spacing: 2.5px;
    text-shadow: 0 0 18px rgba(var(--accent-rgb),0.18);
}

.admin-title::after {
    content: '';
    position: absolute;
    left: 14%;
    right: 14%;
    bottom: -10px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    box-shadow: 0 0 14px rgba(var(--accent-rgb),0.45);
}

.admin-notice {
    border-color: rgba(var(--accent-rgb),0.28) !important;
    background: linear-gradient(135deg, rgba(var(--accent-rgb),0.12), rgba(13,18,27,0.92)) !important;
    border-radius: 14px !important;
}

.admin-stats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.admin-stat-card {
    position: relative;
    overflow: hidden;
    min-height: 112px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 16px;
    border-color: rgba(var(--accent-rgb),0.16);
    background:
        radial-gradient(circle at 50% 0%, rgba(var(--accent-rgb),0.16), transparent 58%),
        linear-gradient(180deg, rgba(22,28,42,0.96), rgba(10,15,23,0.98));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 14px 34px rgba(0,0,0,0.20);
}

.admin-stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.045) 42%, transparent 62%);
    opacity: 0;
    transition: opacity 0.22s ease;
}

.admin-stat-card:hover::before {
    opacity: 1;
}

.admin-stat-value {
    position: relative;
    font-size: 30px;
    line-height: 1;
    color: var(--accent);
    text-shadow: 0 0 16px rgba(var(--accent-rgb),0.22);
}

.admin-stat-label {
    position: relative;
    margin-top: 10px;
    letter-spacing: 0.7px;
}

.admin-tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    align-items: stretch;
}

.admin-tool-card {
    position: relative;
    overflow: hidden;
    min-height: 186px;
    padding: 20px 20px;
    border-radius: 18px;
    border-color: rgba(var(--accent-rgb),0.18);
    background:
        radial-gradient(circle at 14% 0%, rgba(var(--accent-rgb),0.14), transparent 42%),
        radial-gradient(circle at 100% 12%, rgba(139,92,246,0.10), transparent 34%),
        linear-gradient(180deg, rgba(22,28,42,0.96), rgba(10,15,23,0.98));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.045), 0 22px 48px rgba(0,0,0,0.24);
}

.admin-tool-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(130deg, rgba(255,255,255,0.055), transparent 34%, rgba(var(--accent-rgb),0.06));
    opacity: 0.35;
    pointer-events: none;
}

.admin-tool-card > * {
    position: relative;
    z-index: 1;
}

.admin-tool-head {
    margin-bottom: 10px;
}

.admin-tool-title {
    font-size: 19px;
    letter-spacing: 0.8px;
}

.admin-tool-subtitle {
    max-width: 620px;
    color: #8f9aaa;
    font-size: 13px;
}

.admin-pill {
    border-radius: 10px;
    min-width: 112px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.admin-inline-form,
.admin-grant-form {
    gap: 8px;
}

.admin-case-form {
    grid-template-columns: minmax(170px, 1.1fr) minmax(190px, 1.25fr) 92px minmax(150px, auto);
}

.admin-case-form-compact {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-content: start;
}

.admin-case-form-compact .admin-field > span {
    display: none;
}

.admin-case-form-compact .admin-field-case {
    grid-column: 1 / 2;
}

.admin-case-form-compact .admin-field-count {
    grid-column: 2 / 3;
}

.admin-case-form-compact .admin-case-submit {
    grid-column: 1 / -1;
    width: 100%;
}

.admin-promo-form {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    align-items: stretch;
}

.admin-promo-form {
    min-height: 90px;
    align-content: start;
}

.admin-promo-type-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.admin-promo-tab {
    flex: 1;
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid rgba(var(--accent-rgb), 0.22);
    background: rgba(8,13,20,0.55);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: .15s;
}

.admin-promo-tab:hover,
.admin-promo-tab.active {
    background: rgba(var(--accent-rgb), 0.14);
    color: var(--text-white);
    border-color: rgba(var(--accent-rgb), 0.5);
}

.admin-promo-form .input-field {
    min-width: 0;
    height: 42px;
}

.admin-promo-form .btn-small {
    grid-column: span 2;
    justify-self: start;
    min-width: 200px;
}

.admin-promo-form-deposit {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-case-form .admin-select-search {
    grid-column: span 2;
}

.admin-cleanup-form {
    flex-wrap: wrap;
}

.admin-cleanup-form .input-field {
    width: 150px !important;
}

.admin-tool-card .input-field {
    height: 44px;
    border-radius: 8px;
    border-color: rgba(var(--accent-rgb),0.18);
    background: rgba(8,13,20,0.74);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
    color: var(--text-white);
}

.admin-tool-card .input-field:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb),0.12), inset 0 1px 0 rgba(255,255,255,0.04);
}

.admin-tool-card select.input-field {
    cursor: pointer;
}

.admin-tool-card .btn-small,
.admin-actions .btn-small {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 9px 16px;
    font-weight: 900;
    text-decoration: none;
}

.admin-tool-card .btn-small.give,
.admin-actions .btn-small.give {
    background: rgba(var(--accent-rgb),0.08);
    box-shadow: 0 0 0 1px rgba(var(--accent-rgb),0.08), 0 10px 22px rgba(var(--accent-rgb),0.08);
}

.admin-tool-card .btn-small.give:hover,
.admin-actions .btn-small.give:hover {
    background: linear-gradient(180deg, var(--accent-hover), var(--accent-dark));
    border-color: var(--accent-hover);
    color: #fff;
    transform: translateY(-1px);
}

.admin-tool-card .btn-small:not(.give):not(.ban) {
    border-color: rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.035);
}

.admin-balance-cell {
    min-width: 300px;
    display: grid;
    gap: 8px;
}

.admin-balance-now {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(var(--accent-rgb),0.18);
    background: rgba(var(--accent-rgb),0.07);
    color: var(--accent);
    font-size: 12px;
    font-weight: 900;
}

.admin-balance-form {
    display: grid;
    grid-template-columns: minmax(108px, 0.9fr) minmax(82px, 0.7fr) auto;
    gap: 8px;
    align-items: center;
}

.admin-balance-form .input-field {
    height: 36px;
    min-width: 0;
    border-radius: 8px;
    background: rgba(8,13,20,0.74);
    border-color: rgba(var(--accent-rgb),0.16);
}

.admin-balance-form .btn-small {
    min-height: 36px;
    padding: 8px 12px;
}

.maintenance-btn {
    max-width: 320px;
}

.admin-promo-list {
    margin-top: 18px;
    gap: 8px;
}

.admin-promo-row {
    grid-template-columns: minmax(100px, 0.75fr) minmax(0, 1.15fr) minmax(100px, 0.9fr) minmax(120px, 1fr) auto auto auto auto;
    min-height: 42px;
    border-radius: 10px;
    border-color: rgba(var(--accent-rgb),0.16);
    background: rgba(8,13,20,0.60);
}

.admin-promo-toggle {
    margin: 0;
}

.partner-page .admin-table {
    margin-bottom: 28px;
}

.admin-table {
    border-spacing: 0 10px;
}

.admin-table th {
    padding: 12px 14px;
    letter-spacing: 0.7px;
}

.admin-table td {
    background: rgba(15,21,32,0.92);
    border-color: rgba(255,255,255,0.07);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
}

.admin-table tr:hover td {
    background: rgba(22,30,44,0.96);
    border-color: rgba(var(--accent-rgb),0.18);
}

.admin-table tr td:first-child {
    border-radius: 10px 0 0 10px;
}

.admin-table tr td:last-child {
    border-radius: 0 10px 10px 0;
}

@media (max-width: 1120px) {
    .admin-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .admin-tools-grid {
        grid-template-columns: 1fr;
    }

    .admin-case-form,
    .admin-promo-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-promo-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .admin-promo-toggle .btn-small {
        width: 100%;
    }

    #users-table .admin-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .admin-stats,
    .admin-case-form,
    .admin-promo-form,
    .admin-promo-form.admin-promo-form-media,
    .admin-promo-edit-form,
    .admin-promo-edit-form.admin-promo-edit-form-media {
        grid-template-columns: 1fr;
    }

    .admin-promo-form .btn-small,
    .admin-promo-form.admin-promo-form-media .btn-small,
    .admin-promo-edit-form .btn-small,
    .admin-promo-edit-form.admin-promo-edit-form-media .btn-small {
        grid-column: auto;
        width: 100%;
    }

    .admin-case-form .admin-select-search {
        grid-column: auto;
    }

    .admin-balance-cell {
        min-width: 0;
    }

    .admin-balance-form {
        grid-template-columns: 1fr;
    }

    .admin-inline-form {
        align-items: stretch;
    }

    .admin-cleanup-form .input-field,
    .admin-cleanup-form .btn-small {
        width: 100% !important;
    }
}

/* Site-wide visual polish: warmer copy, cleaner surfaces, less template-like UI */
html {
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
}

body {
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

::selection {
    background: rgba(var(--accent-rgb),0.28);
    color: var(--text-white);
}

.content-area {
    color: #a9b2c1;
}

.section-title,
.profile-v2-title,
.case-v2-title,
.case-v2-section-title,
.upgrade-title,
.admin-title,
.profile-v2-section-title,
.history-title {
    letter-spacing: 1.2px !important;
    text-wrap: balance;
}

.section-title,
.case-v2-section-title,
.profile-v2-section-title {
    font-size: clamp(16px, 1.5vw, 21px) !important;
    line-height: 1.25;
}

.profile-v2-title,
.upgrade-title,
.admin-title {
    font-size: clamp(24px, 2.4vw, 34px) !important;
    line-height: 1.1;
}

.case-v2-title {
    font-size: clamp(28px, 3vw, 44px) !important;
    line-height: 1.05;
    letter-spacing: 0.4px !important;
}

.case-v2-label,
.pv2-best-label,
.pv2-card-title,
.admin-tool-title,
.upgrade-panel-title,
.bottom-panel-header .panel-title,
.live-header,
.case-title {
    letter-spacing: 0.35px !important;
    text-wrap: balance;
}

.case-items-count,
.case-page-subtitle,
.admin-tool-subtitle,
.upgrade-filter-status,
.pv2-card-sub,
.site-footer-line,
.case-v2-balance-text,
.empty-upgrade-msg,
.pv2-empty,
.history-empty {
    line-height: 1.55;
}

.case-card,
.pv2-card,
.pv2-best-drop,
.admin-tool-card,
.admin-stat-card,
.upgrade-panel,
.upgrade-bottom-panel,
.case-v2-item,
.profile-v2-center .pv2-card,
.case-v2-balance-info {
    backdrop-filter: blur(10px);
    border-color: rgba(148,163,184,0.14) !important;
}

.case-card,
.pv2-card,
.admin-tool-card,
.upgrade-panel,
.upgrade-bottom-panel,
.case-v2-item {
    transition:
        transform 0.22s ease,
        border-color 0.22s ease,
        box-shadow 0.22s ease,
        background 0.22s ease;
}

.case-card:hover,
.pv2-card:hover,
.admin-tool-card:hover,
.upgrade-panel:hover,
.upgrade-bottom-panel:hover,
.case-v2-item:hover {
    border-color: rgba(var(--accent-rgb),0.30) !important;
    box-shadow: 0 18px 46px rgba(0,0,0,0.26), 0 0 22px rgba(var(--accent-rgb),0.08);
}

.case-btn,
.case-v2-open-btn,
.case-v2-fast-btn,
.pv2-deposit-btn,
.pv2-settings-open,
.pv2-btn-outline,
.btn-small,
.btn-primary,
.upgrade-btn-main,
.case-v2-deposit-btn,
.btn-deposit {
    letter-spacing: 0.2px !important;
    text-transform: none !important;
}

.case-btn,
.case-v2-open-btn,
.pv2-deposit-btn,
.upgrade-btn-main,
.btn-primary {
    font-weight: 900;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.16),
        0 12px 26px rgba(var(--accent-rgb),0.18);
}

.case-btn:hover,
.case-v2-open-btn:hover,
.pv2-deposit-btn:hover,
.upgrade-btn-main:not(:disabled):hover,
.btn-primary:hover {
    transform: translateY(-2px);
    filter: saturate(1.08) brightness(1.05);
}

.input-field,
.pv2-input,
.deposit-input,
.bottom-panel-filters select,
.bottom-panel-filters input,
.case-search input,
.price-input {
    font-family: inherit;
    letter-spacing: 0;
    color: #d8dee9;
}

.input-field::placeholder,
.pv2-input::placeholder,
.deposit-input::placeholder,
.bottom-panel-filters input::placeholder,
.case-search input::placeholder,
.price-input::placeholder {
    color: #778195;
}

.case-search-shell,
.bottom-panel-header,
.pv2-filter-row,
.deposit-modal-header {
    border-color: rgba(148,163,184,0.12) !important;
}

.empty-upgrade-msg,
.pv2-empty,
.history-empty {
    color: #8f9aab !important;
    font-weight: 700;
}

.pv2-empty,
.history-empty {
    border: 1px solid rgba(148,163,184,0.12);
    border-radius: 14px;
    background: rgba(12,18,28,0.46);
}

.pv2-empty span {
    display: inline-block;
    margin-top: 4px;
    color: #737f91;
    font-size: 12px;
    font-weight: 600;
}

.case-badge {
    border-radius: 6px !important;
    padding: 3px 6px !important;
    letter-spacing: 0.2px !important;
    text-transform: none !important;
}

.site-footer {
    border-top: 1px solid rgba(148,163,184,0.10);
    background: linear-gradient(180deg, rgba(8,12,18,0.58), rgba(5,8,12,0.78));
}

.site-footer-brand {
    color: #e5e7eb;
    font-weight: 800;
}

.site-footer-line {
    color: #8d96a8;
}

.site-footer a {
    color: var(--accent);
}

.case-v2-info-btn,
.upgrade-icon,
.nav-tile,
.online-stats,
.wallet-trigger {
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.case-v2-info-btn:hover,
.upgrade-icon:hover,
.nav-tile:hover,
.online-stats:hover,
.wallet-trigger:hover {
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .section-title,
    .profile-v2-title,
    .case-v2-title,
    .case-v2-section-title,
    .upgrade-title,
    .admin-title {
        letter-spacing: 0.8px !important;
    }
}

/* Upgrade page cleanup: keep tooltips above panels and improve the header area */
.upgrade-page {
    position: relative;
    overflow: visible;
}

.upgrade-title {
    margin-bottom: 14px !important;
    background: linear-gradient(180deg, #ffffff 0%, #d7dee9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    text-shadow: none !important;
}

.upgrade-icons {
    position: relative;
    z-index: 300;
    width: max-content;
    margin: 0 auto 18px !important;
    padding: 8px !important;
    border: 1px solid rgba(148,163,184,0.12);
    border-radius: 999px;
    background: rgba(8,13,20,0.56);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.035), 0 14px 32px rgba(0,0,0,0.18);
    overflow: visible;
}

.upgrade-main {
    position: relative;
    z-index: 1;
}

.upgrade-icon {
    z-index: 301;
    width: 38px !important;
    height: 38px !important;
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(19,27,39,0.98), rgba(10,15,23,0.98)) !important;
    border-color: rgba(148,163,184,0.18) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.upgrade-icon:hover {
    border-color: var(--accent) !important;
    background: rgba(var(--accent-rgb),0.10) !important;
    box-shadow: 0 0 0 1px rgba(var(--accent-rgb),0.14), 0 0 18px rgba(var(--accent-rgb),0.16);
}

.upgrade-icon::after {
    top: auto !important;
    bottom: calc(100% + 12px) !important;
    min-width: auto !important;
    width: max-content;
    max-width: 180px !important;
    padding: 8px 11px !important;
    border-radius: 9px !important;
    background: rgba(9,14,22,0.98) !important;
    border-color: rgba(var(--accent-rgb),0.34) !important;
    color: #f1f5f9 !important;
    font-size: 11px !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    z-index: 1000 !important;
    box-shadow: 0 14px 34px rgba(0,0,0,0.42), 0 0 18px rgba(var(--accent-rgb),0.10) !important;
    transform: translateX(-50%) translateY(6px) scale(0.96) !important;
}

.upgrade-icon::before {
    top: auto !important;
    bottom: calc(100% + 7px) !important;
    background: rgba(9,14,22,0.98) !important;
    border-color: rgba(var(--accent-rgb),0.34) !important;
    border-left: 0 !important;
    border-top: 0 !important;
    border-right: 1px solid rgba(var(--accent-rgb),0.34) !important;
    border-bottom: 1px solid rgba(var(--accent-rgb),0.34) !important;
    z-index: 999 !important;
}

.upgrade-icon:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1) !important;
}

.upgrade-icon:hover::before {
    opacity: 1;
    transform: translateX(-50%) rotate(45deg) !important;
}

.upgrade-panel-title {
    max-width: 100%;
    padding: 0 8px;
    line-height: 1.35 !important;
    white-space: normal;
    overflow-wrap: break-word;
    color: #f5f7fb !important;
}

.upgrade-panel {
    border-radius: 16px !important;
    background:
        radial-gradient(circle at 50% 0%, rgba(var(--accent-rgb),0.09), transparent 48%),
        linear-gradient(180deg, rgba(17,24,34,0.94), rgba(9,14,20,0.97)) !important;
}

.upgrade-filter-status {
    color: #8c97aa !important;
}

/* Admin workspace: compact controls, readable hierarchy and safer actions */
.admin-page {
    max-width: 1380px;
    padding: 18px 24px 56px;
}

.admin-tools-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
}

.admin-tool-card {
    min-height: 0;
    padding: 16px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(20, 27, 39, 0.98), rgba(12, 18, 27, 0.98));
    box-shadow: 0 14px 34px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.035);
}

.admin-tool-card::before {
    opacity: 0.16;
}

.admin-tool-title {
    font-size: 16px;
    line-height: 1.2;
    text-transform: none;
    color: #f4f7fb;
}

.admin-tool-subtitle {
    max-width: 720px;
    margin-top: 5px;
    color: #8994a6;
    font-size: 11px;
    line-height: 1.35;
}

.admin-case-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 118px;
    gap: 12px;
    align-items: end;
}

.admin-field {
    display: grid;
    min-width: 0;
    gap: 7px;
}

.admin-field > span {
    color: #a6b0bf;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.55px;
    text-transform: uppercase;
}

.admin-case-form .admin-field-user,
.admin-case-form .admin-field-account {
    grid-column: span 1;
}

.admin-case-form .admin-field-case {
    grid-column: span 2;
}

.admin-case-form .admin-field-count {
    grid-column: span 1;
}

.admin-case-form .admin-select-search {
    grid-column: auto;
}

.admin-case-submit {
    grid-column: span 3;
    width: 100%;
    min-height: 44px !important;
}

.admin-section-bar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin: 44px 0 14px;
    padding: 0 2px;
}

.admin-section-bar .section-title {
    margin: 0 !important;
    color: #f5f7fa;
    font-size: 20px !important;
    text-transform: none;
}

.admin-section-note {
    margin-top: 5px;
    color: #778295;
    font-size: 12px;
    font-weight: 600;
}

.admin-user-search {
    position: relative;
    flex: 0 0 260px;
}

.admin-user-search::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 50%;
    width: 7px;
    height: 7px;
    border: 2px solid #778295;
    border-radius: 50%;
    transform: translateY(-65%);
    pointer-events: none;
}

.admin-user-search::after {
    content: '';
    position: absolute;
    left: 22px;
    top: 56%;
    width: 6px;
    height: 2px;
    border-radius: 2px;
    background: #778295;
    transform: rotate(45deg);
    pointer-events: none;
}

.admin-user-search .input-field {
    width: 100%;
    height: 42px;
    padding-left: 38px;
    border-radius: 9px;
    background: rgba(10,15,23,0.9);
}

#users-table {
    table-layout: fixed;
    border-spacing: 0 8px;
}

#users-table th:nth-child(1) { width: 54px; }
#users-table th:nth-child(2) { width: 210px; }
#users-table th:nth-child(3) { width: 132px; }
#users-table th:nth-child(4) { width: 420px; }
#users-table th:nth-child(5) { width: 132px; }
#users-table th:nth-child(6) { width: 250px; }

#users-table td {
    padding: 12px 14px;
    vertical-align: middle;
}

#users-table .user-row td {
    background: rgba(14, 20, 30, 0.96);
}

#users-table .user-row:hover td {
    background: rgba(18, 26, 38, 0.98);
}

.admin-user-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.admin-user-avatar {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    flex: 0 0 36px;
    border: 1px solid rgba(var(--accent-rgb),0.28);
    border-radius: 9px;
    background: rgba(var(--accent-rgb),0.09);
    color: var(--accent);
    font-size: 14px;
    font-weight: 900;
}

.admin-user-identity > div {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.admin-username {
    overflow: hidden;
    color: #f4f7fb;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-user-id {
    color: #687488;
    font-size: 10px;
    font-weight: 700;
}

.admin-role,
.admin-account-state {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 28px;
    padding: 5px 9px;
    border: 1px solid rgba(148,163,184,0.14);
    border-radius: 7px;
    background: rgba(255,255,255,0.025);
    color: #9aa5b5;
    font-size: 10px;
    font-weight: 800;
}

.admin-role.is-admin {
    border-color: rgba(var(--accent-rgb),0.24);
    background: rgba(var(--accent-rgb),0.08);
    color: var(--accent);
}

.admin-role.is-partner {
    border-color: rgba(59,130,246,0.28);
    background: rgba(59,130,246,0.08);
    color: #60a5fa;
}

.admin-role.is-moderator {
    border-color: rgba(56,189,248,0.28);
    background: rgba(56,189,248,0.08);
    color: #38bdf8;
}

.admin-account-state {
    gap: 7px;
    border: 0;
    background: transparent;
    padding-inline: 0;
}

.admin-account-state i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 9px rgba(52,211,153,0.55);
}

.admin-account-state.is-banned {
    color: #fb7185;
}

.admin-account-state.is-banned i {
    background: #fb4d5d;
    box-shadow: 0 0 9px rgba(251,77,93,0.45);
}

.admin-account-action {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.admin-account-select {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(8,13,20,0.76);
    border: 1px solid rgba(148,163,184,0.18);
    color: var(--text-white);
    font-size: 12px;
    cursor: pointer;
}

.admin-account-select optgroup {
    color: var(--text-muted);
    background: var(--bg-card);
}

.admin-account-select option:disabled {
    color: #4b5563;
}

.admin-account-action .btn-small {
    flex: 0 0 auto;
    padding: 7px 12px;
}

.admin-balance-cell {
    min-width: 0;
    grid-template-columns: 114px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.admin-balance-now {
    min-height: 34px;
    justify-content: center;
    padding: 6px 8px;
    font-size: 11px;
    white-space: nowrap;
}

.admin-balance-form {
    grid-template-columns: minmax(105px, 1fr) minmax(82px, .8fr) 92px;
    gap: 7px;
}

.admin-balance-form .input-field,
.admin-balance-form .btn-small {
    height: 36px;
    min-height: 36px;
}

.admin-balance-form .btn-small {
    padding-inline: 10px;
    font-size: 10px;
}

#users-table .admin-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

#users-table .admin-actions form,
#users-table .admin-actions .btn-small {
    width: 100%;
}

#users-table .admin-actions .btn-small {
    min-height: 36px;
    padding: 7px 9px;
    font-size: 10px;
}

/* Consistent editorial hierarchy across utility pages */
.admin-page,
.profile-v2-page,
.upgrade-page,
.case-v2-page,
.cases-page {
    font-variant-numeric: tabular-nums;
}

.admin-title,
.profile-v2-title,
.upgrade-title,
.case-v2-title {
    font-weight: 900;
    letter-spacing: 0.7px !important;
}

.admin-stat-label,
.pv2-card-title,
.case-v2-label,
.upgrade-panel-title {
    font-weight: 800;
}

@media (max-width: 1220px) {
    #users-table {
        min-width: 1120px;
    }

    .admin-page {
        overflow-x: auto;
    }
}

@media (max-width: 820px) {
    .admin-page {
        padding-inline: 12px;
    }

    .admin-tools-grid,
    .admin-case-form {
        grid-template-columns: 1fr;
    }

    .admin-case-form .admin-field-user,
    .admin-case-form .admin-field-account,
    .admin-case-form .admin-field-case,
    .admin-case-form .admin-field-count,
    .admin-case-submit {
        grid-column: auto;
    }

    .admin-section-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-user-search {
        flex-basis: auto;
        width: 100%;
    }
}

/* Upgrade arrow artwork */
.chance-circle-wrapper {
    overflow: visible;
}

.chance-arrow-marker {
    width: 20px;
    height: 48px;
    transform: translate(-50%, -50%) translateY(-142px);
    transform-origin: 50% 50%;
    filter: drop-shadow(0 0 9px rgba(var(--accent-rgb),0.38)) drop-shadow(0 2px 3px rgba(0,0,0,0.8));
}

.chance-circle-wrapper.v2-wheel .chance-arrow-marker {
    transform: translate(-50%, -50%) translateY(-142px);
}

.chance-arrow-marker img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center;
}

.chance-arrow-marker.arrow-triangle,
.chance-arrow-marker.arrow-diamond,
.chance-arrow-marker.arrow-lightning {
    color: inherit;
    animation: none;
    filter: drop-shadow(0 0 9px rgba(var(--accent-rgb),0.38)) drop-shadow(0 2px 3px rgba(0,0,0,0.8));
}

.upgrade-arrow-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.upgrade-arrow-option {
    position: relative;
    display: block;
    min-width: 0;
    margin: 0 !important;
    cursor: pointer;
}

.upgrade-arrow-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.upgrade-arrow-option > span {
    min-height: 112px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 7px;
    padding: 10px 8px 8px;
    border: 1px solid rgba(148,163,184,0.16);
    border-radius: 9px;
    background: rgba(8,13,20,0.65);
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.upgrade-arrow-option img {
    width: 28px;
    height: 72px;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 0 7px rgba(255,110,45,0.24));
}

.upgrade-arrow-option b {
    overflow: hidden;
    max-width: 100%;
    color: #9aa5b5;
    font-size: 10px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upgrade-arrow-option:hover > span {
    border-color: rgba(var(--accent-rgb),0.38);
    background: rgba(var(--accent-rgb),0.06);
    transform: translateY(-2px);
}

.upgrade-arrow-option input:checked + span {
    border-color: var(--accent);
    background: rgba(var(--accent-rgb),0.10);
    box-shadow: 0 0 0 2px rgba(var(--accent-rgb),0.10), 0 10px 24px rgba(0,0,0,0.24);
}

.upgrade-arrow-option input:checked + span b {
    color: var(--accent);
}

@media (max-width: 600px) {
    .upgrade-arrow-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Keep upgrade utilities away from the wheel pointer */
@media (min-width: 901px) {
    .upgrade-page {
        position: relative;
        padding-top: 4px;
    }

    .upgrade-icons {
        position: absolute;
        top: 0;
        right: 8px;
        margin: 0 !important;
        z-index: 320;
    }

    .upgrade-icon::after {
        top: calc(100% + 12px) !important;
        bottom: auto !important;
        transform: translateX(-50%) translateY(-6px) scale(0.96) !important;
    }

    .upgrade-icon::before {
        top: calc(100% + 7px) !important;
        bottom: auto !important;
        border: 0 !important;
        border-left: 1px solid rgba(var(--accent-rgb),0.34) !important;
        border-top: 1px solid rgba(var(--accent-rgb),0.34) !important;
    }

    .upgrade-icon:hover::after {
        transform: translateX(-50%) translateY(0) scale(1) !important;
    }
}

@media (max-width: 900px) {
    .upgrade-icons {
        position: relative;
        top: auto;
        right: auto;
        margin: 0 auto 24px !important;
    }
}

/* Final upgrade header layout: title, controls and wheel never overlap */
.upgrade-page {
    margin: 0 auto !important;
    padding-top: 0px !important;
}

.upgrade-title {
    margin: 0 auto 24px !important;
    transform: translateY(-16px);
}

@media (min-width: 901px) {
    .upgrade-icons {
        position: relative;
        top: auto;
        right: auto;
        left: auto;
        margin: 0 auto 58px !important;
    }
}

.upgrade-main {
    margin-top: 16px;
}

@media (max-width: 900px) {
    .upgrade-page {
        margin-top: 4px !important;
    }

    .upgrade-icons {
        margin-bottom: 52px !important;
    }
}

/* Upgrade utilities moved into the left inventory selection panel */
.upgrade-panel:first-child {
    position: relative;
    margin-top: 14px !important;
    padding-top: 18px !important;
}

.upgrade-panel .upgrade-panel-tools {
    position: absolute !important;
    top: -72px !important;
    left: 0 !important;
    right: auto !important;
    z-index: 330 !important;
    width: max-content !important;
    margin: 0 !important;
    padding: 8px !important;
    transform: none !important;
    border-radius: 18px !important;
}

.upgrade-panel .upgrade-panel-tools .upgrade-icon {
    width: 42px !important;
    height: 42px !important;
    font-size: 18px !important;
}

.upgrade-panel .upgrade-panel-tools .upgrade-toolbar-img {
    width: 36px !important;
    height: 36px !important;
}

.upgrade-panel .upgrade-panel-tools .upgrade-icon::after {
    top: calc(100% + 12px) !important;
    bottom: auto !important;
    transform: translateX(-22px) translateY(-6px) scale(0.96) !important;
}

.upgrade-panel .upgrade-panel-tools .upgrade-icon::before {
    top: calc(100% + 7px) !important;
    bottom: auto !important;
    border: 0 !important;
    border-left: 1px solid rgba(var(--accent-rgb),0.34) !important;
    border-top: 1px solid rgba(var(--accent-rgb),0.34) !important;
}

.upgrade-panel .upgrade-panel-tools .upgrade-icon:hover::after {
    transform: translateX(-22px) translateY(0) scale(1) !important;
}

.upgrade-panel .upgrade-panel-tools .upgrade-icon:hover::before {
    transform: translateX(-50%) rotate(45deg) !important;
}

html[data-theme="standard"] .upgrade-panel .upgrade-panel-tools .upgrade-icon {
    border-color: rgba(42, 62, 51, 0.9) !important;
    background: rgba(10, 16, 13, 0.98) !important;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.02),
        0 0 0 1px rgba(0, 0, 0, 0.12) !important;
}

html[data-theme="standard"] .upgrade-panel .upgrade-panel-tools .upgrade-icon:hover {
    border-color: rgba(54, 79, 66, 0.98) !important;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.03),
        0 0 0 1px rgba(0, 0, 0, 0.16) !important;
}

html[data-theme="standard"] .upgrade-panel .upgrade-panel-tools .upgrade-toolbar-img {
    filter: none !important;
    opacity: 1 !important;
}

html[data-theme="standard"] .upgrade-panel .upgrade-panel-tools .upgrade-icon::after,
html[data-theme="standard"] .upgrade-panel .upgrade-panel-tools .upgrade-icon::before {
    border-color: rgba(42, 62, 51, 0.72) !important;
    background: rgba(10, 16, 13, 0.99) !important;
}

@media (max-width: 900px) {
    .upgrade-panel:first-child {
        margin-top: 12px !important;
        padding-top: 18px !important;
    }

    .upgrade-panel .upgrade-panel-tools {
        top: -60px !important;
        left: 0 !important;
        margin: 0 !important;
    }
}

/* Stronger selected states for upgrade controls */
.upgrade-quick-btns .quick-btn.active {
    border-color: var(--accent) !important;
    color: #f8fafc !important;
    background: linear-gradient(180deg, rgba(var(--accent-rgb),0.32) 0%, rgba(var(--accent-rgb),0.13) 100%) !important;
    box-shadow:
        inset 0 0 0 1px rgba(var(--accent-rgb),0.22),
        0 0 0 1px rgba(var(--accent-rgb),0.14),
        0 0 18px rgba(var(--accent-rgb),0.28) !important;
    transform: translateY(-1px);
}

.upgrade-quick-btns .quick-btn.active:hover {
    transform: translateY(-2px);
}

.upgrade-settings-modal-v2 .upgrade-settings-body {
    padding-top: 28px !important;
}

.upgrade-settings-modal-v2 .upgrade-settings-radio {
    padding: 10px 12px !important;
    border: 1px solid transparent !important;
    border-radius: 10px !important;
    background: rgba(255,255,255,0.02) !important;
}

.upgrade-settings-modal-v2 .upgrade-settings-radio:hover {
    background: rgba(var(--accent-rgb),0.06) !important;
    border-color: rgba(var(--accent-rgb),0.28) !important;
}

.upgrade-settings-radio input[type="radio"]:checked + span,
.upgrade-settings-radio input[type="radio"]:checked + span b {
    color: #f8fafc !important;
    font-weight: 900;
}

.upgrade-settings-radio:has(input[type="radio"]:checked) {
    border-color: rgba(var(--accent-rgb),0.36) !important;
    background: rgba(var(--accent-rgb),0.10) !important;
    box-shadow:
        inset 0 0 0 1px rgba(var(--accent-rgb),0.12),
        0 0 16px rgba(var(--accent-rgb),0.12) !important;
}

.upgrade-settings-modal-v2 .upgrade-settings-radio:has(input[type="radio"]:checked) {
    border-color: rgba(214,184,74,0.34) !important;
    background: linear-gradient(180deg, rgba(214,184,74,0.12), rgba(214,184,74,0.05)) !important;
    box-shadow:
        inset 0 0 0 1px rgba(214,184,74,0.10),
        0 0 18px rgba(214,184,74,0.10) !important;
}

.upgrade-settings-modal-v2 .upgrade-settings-save:hover {
    background: rgba(214,184,74,0.08) !important;
    box-shadow: 0 0 18px rgba(214,184,74,0.12) !important;
}

/* Site-style upgrade settings overlay */
.upgrade-settings-modal-v2 {
    max-width: 680px !important;
    border-radius: 20px !important;
    background:
        radial-gradient(circle at 18% 8%, rgba(var(--accent-rgb),0.14), transparent 34%),
        linear-gradient(180deg, rgba(18,26,23,0.98), rgba(13,18,22,0.98)) !important;
    border: 1px solid rgba(var(--accent-rgb),0.22) !important;
    box-shadow: 0 26px 80px rgba(0,0,0,0.66), inset 0 1px 0 rgba(255,255,255,0.04) !important;
    overflow: hidden;
}
.upgrade-settings-modal-v2 .upgrade-modal-header {
    background: rgba(255,255,255,0.025) !important;
    border-bottom: 1px solid rgba(var(--accent-rgb),0.16) !important;
    padding: 20px 24px !important;
}
.upgrade-settings-modal-v2 .upgrade-modal-header h3 {
    font-size: 20px !important;
    letter-spacing: .4px !important;
}
.upgrade-settings-modal-v2 .upgrade-settings-body {
    padding: 24px !important;
}
.upgrade-settings-modal-v2 .upgrade-settings-group {
    padding: 18px !important;
    margin-bottom: 14px !important;
    border: 1px solid rgba(255,255,255,0.07) !important;
    border-radius: 16px !important;
    background: rgba(255,255,255,0.035) !important;
}
.upgrade-settings-modal-v2 .upgrade-settings-group + .upgrade-settings-group {
    padding-top: 18px !important;
}
.upgrade-settings-modal-v2 .upgrade-settings-group:last-of-type {
    border-bottom: 1px solid rgba(255,255,255,0.07) !important;
}
.upgrade-settings-modal-v2 .upgrade-settings-label {
    color: #fff !important;
    font-size: 18px !important;
    text-transform: uppercase !important;
    letter-spacing: .4px !important;
    margin-bottom: 5px !important;
}
.upgrade-settings-modal-v2 .upgrade-settings-hint {
    color: var(--text-muted) !important;
    margin-bottom: 12px !important;
}
.upgrade-settings-modal-v2 .upgrade-settings-save {
    width: 100% !important;
    border-radius: 12px !important;
    border: 1px solid rgba(var(--accent-rgb),0.72) !important;
    color: #fff !important;
    background: linear-gradient(180deg, var(--accent), var(--accent-dark)) !important;
    box-shadow: 0 14px 30px rgba(var(--accent-rgb),0.22) !important;
}

/* Final live-drop motion layer */
.live-hover {
    clip-path: inset(8% 10% 8% 0 round 10px);
    transform: translate3d(-22px, calc(-50% + 12px), 0) perspective(700px) rotateY(-5deg) scale(0.92) !important;
    filter: saturate(0.76) brightness(0.82) blur(1px) !important;
    transition: opacity 0.32s ease, transform 0.48s cubic-bezier(0.16, 1, 0.3, 1), clip-path 0.46s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.46s ease, filter 0.4s ease !important;
}

.live-hover.is-visible {
    clip-path: inset(0 round 10px);
    transform: translate3d(0, -50%, 0) perspective(700px) rotateY(0) scale(1) !important;
    filter: saturate(1.06) brightness(1) blur(0) !important;
}

.live-hover .lhv-bg {
    transform: scale(1.12) translateX(-8px) !important;
    filter: saturate(0.84);
    transition: opacity 0.4s ease, transform 0.62s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease !important;
}

.live-hover.is-visible .lhv-bg {
    transform: scale(1) translateX(0) !important;
    filter: saturate(1);
}

.live-hover .lhv-case { transform: translate3d(-14px, -7px, 0) !important; }
.live-hover .lhv-avatar { transform: translate3d(10px, -8px, 0) scale(0.82) rotate(8deg) !important; }
.live-hover .lhv-img { transform: translate3d(-10px, 13px, 0) scale(0.78) rotate(-2deg) !important; }
.live-hover .lhv-name { transform: translate3d(0, 11px, 0) scale(0.94) !important; }

.live-hover.is-visible .lhv-case,
.live-hover.is-visible .lhv-avatar,
.live-hover.is-visible .lhv-img,
.live-hover.is-visible .lhv-name {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1) rotate(0) !important;
}

.live-hover.is-visible .lhv-case { transition-delay: 0.04s; }
.live-hover.is-visible .lhv-avatar { transition-delay: 0.09s; }
.live-hover.is-visible .lhv-img { transition-delay: 0.12s; }
.live-hover.is-visible .lhv-name { transition-delay: 0.17s; }

.live-hover.is-visible::before {
    animation: liveHoverEdgeSweep 0.82s 0.06s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.live-hover.is-visible .lhv-img img {
    animation: liveHoverDropArrive 0.68s 0.08s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* === MOBILE PERFORMANCE === */
@media (max-width: 768px) {
    .orb, .orb-1, .orb-2, .orb-3, .orb-4, .orb-5 { display: none !important; }
    .bg-particles, .particle, .particle-line, .smoke-layer { display: none !important; }
    .case-v2-ring { animation: none !important; border-style: solid !important; opacity: 0.3; }
    .case-v2-image { filter: none !important; }
    .case-card-image { filter: none !important; will-change: auto !important; }
    .case-card:hover { transform: none !important; box-shadow: none !important; }
    .roulette-item.rarity-rare,
    .roulette-item.rarity-epic,
    .roulette-item.rarity-legendary,
    .roulette-item.rarity-mythic { box-shadow: none !important; }
    .roulette-item.rarity-mythic .item-icon { animation: none !important; }
    .case-celebration-layer { display: none !important; }
    .chance-arrow-marker.arrow-lightning { animation: none !important; filter: none !important; }
    .maintenance-status-dot { animation: none !important; }
    .live-item-new { animation: none !important; }
    .live-item-new .item-price,
    .live-item-new .item-name,
    .live-item-new .live-item-server { animation: none !important; opacity: 1 !important; }
    .live-premium-item::after { animation: none !important; }
    .glow { animation: none !important; }
    .btn-deposit:hover { box-shadow: none !important; }
    .case-v2-open-btn:hover { transform: none !important; box-shadow: none !important; }
    .upgrade-btn-main:hover:not(:disabled) { transform: none !important; box-shadow: none !important; }
    .roulette-section { box-shadow: none !important; }
    .case-v2-header.is-opening .roulette-section { animation: none !important; }
    .bottom-panel-body { -webkit-overflow-scrolling: touch; }
    .upgrade-selected-area { -webkit-overflow-scrolling: touch; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .orb, .orb-1, .orb-2, .orb-3, .orb-4, .orb-5 { display: none !important; }
    .bg-particles, .particle, .particle-line, .smoke-layer { display: none !important; }
    .case-celebration-layer { display: none !important; }
}

/* Admin panel redesign windows */
.admin-page * {
    scrollbar-width: thin;
    scrollbar-color: var(--accent) rgba(255,255,255,0.06);
}
.admin-page ::-webkit-scrollbar { width: 8px; height: 8px; }
.admin-page ::-webkit-scrollbar-track { background: rgba(255,255,255,0.04); border-radius: 4px; }
.admin-page ::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 4px; }
.admin-page ::-webkit-scrollbar-thumb:hover { background: var(--accent-hover); }

.admin-win {
    margin-bottom: 20px;
    padding: 16px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(180deg, rgba(22,28,42,0.96), rgba(10,15,23,0.98));
    box-shadow: 0 22px 48px rgba(0,0,0,0.24);
}

.admin-win-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.admin-win-head-collapsible {
    cursor: pointer;
    user-select: none;
}

.admin-win-kicker {
    color: var(--accent);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.admin-win-title {
    margin-top: 4px;
    color: var(--text-white);
    font-size: 22px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.admin-win-subtitle {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.35;
}

.admin-win-balance {
    min-width: 230px;
    padding: 14px 16px;
    border: none;
    border-radius: 14px;
    background: rgba(6,10,14,0.62);
    text-align: right;
}

.admin-win-balance span {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.admin-win-balance b {
    display: block;
    margin-top: 4px;
    font-size: 24px;
    color: var(--text-white);
}

.admin-win-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-win-actions .input-field {
    height: 40px;
    border-radius: 10px;
    background: rgba(8,13,20,0.74);
    border-color: rgba(var(--accent-rgb),0.18);
    color: var(--text-white);
}

.admin-collapse-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(var(--accent-rgb),0.35);
    background: rgba(var(--accent-rgb),0.10);
    color: var(--accent);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: .2s;
}

.admin-collapse-btn:hover {
    background: var(--accent);
    color: #fff;
}

.admin-table-scroll {
    overflow-x: auto;
    border-radius: 12px;
}

.admin-table-scroll .admin-table {
    min-width: max-content;
}

/* Chart */
.admin-chart-wrap {
    position: relative;
    height: 320px;
    border-radius: 16px;
    border: none;
    background: linear-gradient(180deg, rgba(15,23,42,0.62), rgba(2,6,10,0.72));
    overflow: hidden;
}

.admin-chart-wrap canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.admin-chart-tooltip {
    position: absolute;
    display: none;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(var(--accent-rgb),0.25);
    background: rgba(6,10,14,0.92);
    color: var(--text-white);
    font-size: 12px;
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.admin-chart-controls {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.admin-chart-selectors {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.admin-chart-select {
    position: relative;
    min-width: 180px;
}

.admin-chart-selected {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(var(--accent-rgb),0.35);
    background: rgba(var(--accent-rgb),0.10);
    color: var(--text-white);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    transition: .2s;
}

.admin-chart-selected:hover {
    background: rgba(var(--accent-rgb),0.18);
}

.admin-chart-selected span {
    font-size: 10px;
    color: var(--accent);
}

.admin-chart-options {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 20;
    display: none;
    flex-direction: column;
    border-radius: 10px;
    border: 1px solid rgba(var(--accent-rgb),0.25);
    background: rgba(10,15,23,0.98);
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(0,0,0,0.35);
}

.admin-chart-options.is-open { display: flex; }

.admin-chart-options button {
    padding: 10px 14px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    text-align: left;
    cursor: pointer;
    transition: .15s;
}

.admin-chart-options button:hover,
.admin-chart-options button.active {
    background: rgba(var(--accent-rgb),0.14);
    color: var(--text-white);
}

.admin-chart-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-chart-metric {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(8,13,20,0.60);
    color: var(--text-white);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s;
    user-select: none;
}

.admin-chart-metric input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.admin-check-box {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 2px solid var(--m-color);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .2s;
}

.admin-check-box::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--m-color);
    opacity: 0;
    transform: scale(0);
    transition: .2s;
}

.admin-chart-metric input:checked + .admin-check-box {
    background: rgba(var(--accent-rgb),0.08);
}

.admin-chart-metric input:checked + .admin-check-box::after {
    opacity: 1;
    transform: scale(1);
}

/* Extra settings grid */
.admin-tools-grid-v2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-items: stretch;
}

.admin-tools-grid-v2 > .admin-tool-card {
    grid-area: auto !important;
    align-self: stretch;
    display: flex;
    flex-direction: column;
}

.admin-tool-card-sm {
    min-height: 138px;
    align-self: stretch;
}

.admin-tool-card-tall {
    min-height: 0;
    align-self: stretch;
}

/* Checkbox accent */
.admin-page input[type="checkbox"] {
    accent-color: var(--accent);
}

/* Users table balance controls */
#users-table { table-layout: fixed; width: 100%; }
#users-table th,
#users-table td { vertical-align: middle; }
#users-table th:nth-child(1),
#users-table td:nth-child(1) { width: 50px; }
#users-table th:nth-child(2),
#users-table td:nth-child(2) { width: 160px; }
#users-table th:nth-child(3),
#users-table td:nth-child(3) { width: 110px; }
#users-table th:nth-child(4),
#users-table td:nth-child(4) { width: 120px; }
#users-table th:nth-child(5),
#users-table td:nth-child(5) { width: 130px; }
#users-table th:nth-child(6),
#users-table td:nth-child(6) { width: 170px; }
#users-table th:nth-child(7),
#users-table td:nth-child(7) { width: 90px; }
#users-table th:nth-child(8),
#users-table td:nth-child(8) { width: 400px; }

#users-table .admin-balance-now {
    white-space: nowrap;
    font-size: 12px;
    font-weight: 700;
}

#users-table .admin-balance-action,
#users-table .admin-balance-amount {
    padding: 6px 8px;
    font-size: 12px;
}

#users-table .admin-balance-action { width: 100%; }
#users-table .admin-balance-amount { flex: 1 1 auto; width: auto; min-width: 0; }

/* Upgrade page theme-colored panels */
.upgrade-panel,
.upgrade-bottom-panel,
.upgrade-balance-add {
    background: linear-gradient(180deg, rgba(var(--accent-rgb),0.10), rgba(var(--accent-rgb),0.04)) !important;
    border: 1px solid rgba(var(--accent-rgb),0.22) !important;
}

.bottom-panel-header {
    background: rgba(var(--accent-rgb),0.08) !important;
    border-color: rgba(var(--accent-rgb),0.15) !important;
}

.upgrade-selected-area::-webkit-scrollbar-track,
.bottom-panel-body::-webkit-scrollbar-track {
    background: linear-gradient(180deg, rgba(var(--accent-rgb),0.10), rgba(var(--accent-rgb),0.04)) !important;
}

/* Upgrade settings modal selected state */
.upgrade-settings-modal-v2 .upgrade-settings-radio:has(input[type="radio"]:checked) {
    border-color: rgba(var(--accent-rgb),0.45) !important;
    background: linear-gradient(180deg, rgba(var(--accent-rgb),0.12), rgba(var(--accent-rgb),0.05)) !important;
    box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb),0.10), 0 0 18px rgba(var(--accent-rgb),0.12) !important;
}

.upgrade-settings-modal-v2 .upgrade-settings-save {
    border-color: var(--accent) !important;
}

.upgrade-settings-modal-v2 .upgrade-settings-save:hover {
    background: rgba(var(--accent-rgb),0.10) !important;
    box-shadow: 0 0 18px rgba(var(--accent-rgb),0.15) !important;
}

/* Final admin finance/promocode/users polish */
.admin-win-balance-stack {
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-win-balance-net {
    border-color: rgba(34,197,94,0.34) !important;
    background: linear-gradient(180deg, rgba(34,197,94,0.08), rgba(7,12,18,0.92)) !important;
}

.admin-win-balance small {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
}

.admin-promo-list {
    gap: 6px !important;
}

.admin-promo-row {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 6px 10px !important;
    padding: 8px 10px !important;
    border: none !important;
    background: rgba(8,13,20,0.45) !important;
    border-radius: 10px !important;
}

.admin-promo-row-media {
    align-items: center !important;
}

.admin-promo-code,
.admin-promo-main {
    min-width: 0;
    display: grid;
    gap: 2px;
    flex: 1 1 120px;
}

.admin-promo-code {
    flex: 0 1 100px;
}

.admin-promo-main {
    flex-basis: 130px;
}

.admin-promo-code b,
.admin-promo-main b {
    color: var(--text-white);
    font-size: 11px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.admin-promo-code span,
.admin-promo-label {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.3;
    word-break: break-word;
}

.admin-promo-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
    flex: 1 0 auto;
}

.admin-promo-actions .btn-small {
    min-width: 84px;
    padding: 6px 10px;
    font-size: 11px;
    white-space: nowrap;
}

.admin-promo-edit-form {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid rgba(var(--accent-rgb), 0.08);
}

.admin-promo-edit-form-media {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-promo-edit-form-v2 {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    width: 100%;
    grid-column: 1 / -1;
}

.admin-promo-edit-form-v2 .input-field,
.admin-promo-edit-form-v2 select.input-field {
    flex: 1 1 0;
    min-width: 0;
    height: 40px;
    padding: 10px 12px;
    font-size: 13px;
}

.admin-promo-edit-form-v2 .btn-small {
    flex: 0 0 auto;
    min-width: 100px;
    height: 40px;
    padding: 8px 16px;
    font-size: 12px;
}

.admin-promo-edit-form .input-field {
    width: 100%;
    min-width: 0;
    height: 32px;
    padding: 6px 8px;
    font-size: 11px;
}

.admin-promo-edit-form-media .input-field {
    height: 30px;
}

@media (max-width: 900px) {
    .admin-promo-edit-form-v2 {
        flex-wrap: wrap;
    }
    .admin-promo-edit-form-v2 .input-field,
    .admin-promo-edit-form-v2 select.input-field {
        flex: 1 1 calc(50% - 5px);
    }
    .admin-promo-edit-form-v2 .btn-small {
        flex: 1 1 100%;
    }
}

.admin-promo-edit-form .btn-small {
    min-width: 84px;
    height: 32px;
    padding: 6px 10px;
    font-size: 11px;
    white-space: nowrap;
}

.admin-bulk-users-panel {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(170px, 0.8fr) minmax(130px, 0.6fr) auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid rgba(var(--accent-rgb),0.18);
    border-radius: 10px;
    background: rgba(var(--accent-rgb),0.05);
}

.admin-bulk-users-panel > div {
    display: grid;
    gap: 3px;
}

.admin-bulk-users-panel span {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.admin-bulk-users-panel b {
    color: var(--text-white);
    font-size: 14px;
}

.admin-staff-whitelist-form {
    display: grid;
    gap: 12px;
}

.admin-staff-whitelist-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px;
    border: 1px solid rgba(var(--accent-rgb),0.20);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(var(--accent-rgb),0.08), rgba(255,255,255,0.025));
}

.admin-staff-whitelist-toolbar > div:first-child {
    display: grid;
    gap: 3px;
}

.admin-staff-whitelist-toolbar span {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.admin-staff-whitelist-toolbar b {
    color: var(--text-white);
    font-size: 14px;
}

.admin-staff-whitelist-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-staff-whitelist-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
    max-height: 360px;
    overflow: auto;
    padding: 2px 6px 2px 2px;
}

.admin-staff-card {
    display: grid;
    grid-template-columns: 18px 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 62px;
    padding: 10px;
    border: 1px solid rgba(var(--accent-rgb),0.16);
    border-radius: 12px;
    background: rgba(8,13,20,0.74);
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.admin-staff-card:hover {
    border-color: rgba(var(--accent-rgb),0.40);
    background: rgba(var(--accent-rgb),0.07);
    transform: translateY(-1px);
}

.admin-staff-card input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

.admin-staff-info {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.admin-staff-info b {
    overflow: hidden;
    color: var(--text-white);
    font-size: 13px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-staff-info small {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 800;
}

#users-table th:nth-child(1),
#users-table td:nth-child(1) { width: 46px; text-align: center; }
#users-table th:nth-child(2),
#users-table td:nth-child(2) { width: 56px; }
#users-table th:nth-child(3),
#users-table td:nth-child(3) { width: 160px; }
#users-table th:nth-child(4),
#users-table td:nth-child(4) { width: 120px; }
#users-table th:nth-child(5),
#users-table td:nth-child(5) { width: 128px; }
#users-table th:nth-child(6),
#users-table td:nth-child(6) { width: 132px; }
#users-table th:nth-child(7),
#users-table td:nth-child(7) { width: 170px; }
#users-table th:nth-child(8),
#users-table td:nth-child(8) { width: 110px; }
#users-table th:nth-child(9),
#users-table td:nth-child(9) { width: 400px; }

.upgrade-page.is-upgrade-rolling .upgrade-item-card,
.upgrade-page.is-upgrade-rolling .quick-btn,
.upgrade-page.is-upgrade-rolling .search-btn,
.upgrade-page.is-upgrade-rolling .price-input,
.upgrade-page.is-upgrade-rolling #sort-select {
    pointer-events: none;
    opacity: 0.72;
}

.upgrade-page.is-upgrade-rolling .upgrade-item-card.selected,
.upgrade-page.is-upgrade-rolling .upgrade-item-card.target {
    opacity: 1;
}

.withdraw-toast-stack {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 10050;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(420px, calc(100vw - 32px));
    pointer-events: none;
}

.withdraw-success-toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(34,197,94,0.36);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(9,14,20,0.98), rgba(12,31,22,0.98));
    box-shadow: 0 18px 44px rgba(0,0,0,0.45), 0 0 22px rgba(34,197,94,0.12);
    transform: translateX(18px);
    opacity: 0;
    transition: 0.25s ease;
    pointer-events: auto;
}

.withdraw-success-toast > div:last-child,
.withdraw-toast-body {
    min-width: 0;
    flex: 1;
}

.withdraw-success-toast.is-visible {
    transform: translateX(0);
    opacity: 1;
}

.withdraw-chat-toast {
    border-color: rgba(96,165,250,0.42);
    background: linear-gradient(135deg, rgba(9,14,20,0.98), rgba(14,24,42,0.98));
    box-shadow: 0 18px 44px rgba(0,0,0,0.45), 0 0 22px rgba(96,165,250,0.12);
}

.withdraw-chat-toast .withdraw-toast-img {
    background: rgba(96,165,250,0.10);
}

.withdraw-chat-toast b {
    color: #93c5fd;
}

.withdraw-request-toast {
    cursor: pointer;
    border-color: rgba(168,85,247,0.46);
    background: linear-gradient(135deg, rgba(9,14,20,0.98), rgba(36,18,54,0.98));
    box-shadow: 0 18px 44px rgba(0,0,0,0.45), 0 0 22px rgba(168,85,247,0.14);
}

.withdraw-request-toast .withdraw-toast-img {
    background: rgba(168,85,247,0.12);
}

.withdraw-request-toast b {
    color: #c084fc;
}

.withdraw-toast-img {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(34,197,94,0.10);
}

.withdraw-toast-img img {
    max-width: 42px;
    max-height: 42px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(34,197,94,0.24));
}

.withdraw-success-toast b {
    display: block;
    color: #34d399;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.withdraw-success-toast span {
    display: block;
    margin-top: 2px;
    color: var(--text-main);
    font-size: 12px;
    line-height: 1.35;
}

.withdraw-success-toast .withdraw-toast-message {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    white-space: normal;
}

.withdraw-success-toast .withdraw-toast-kind,
.withdraw-success-toast .withdraw-toast-item,
.withdraw-success-toast .withdraw-toast-id {
    display: inline;
    margin: 0;
    color: inherit;
    font: inherit;
}

/* Cleaner admin promo cards and compact users table */
.admin-promo-row {
    display: grid !important;
    grid-template-columns: 120px minmax(0, 1fr) auto !important;
    align-items: start !important;
    gap: 12px !important;
    padding: 12px 14px !important;
    min-height: 84px;
    border-radius: 10px !important;
}

.admin-promo-code {
    flex: none;
    align-self: center;
}

.admin-promo-code b {
    color: var(--text-white) !important;
    font-size: 13px;
}

.admin-promo-code span {
    margin-top: 4px;
    color: var(--text-muted);
}

.admin-promo-fields {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px 10px;
}

.admin-promo-main {
    flex: none;
    min-width: 0;
    overflow: hidden;
}

.admin-promo-main b,
.admin-promo-main span {
    display: block;
    line-height: 1.3;
    word-break: break-word;
}

.admin-promo-main b {
    font-size: 12px;
    line-height: 1.28;
}

.admin-promo-actions {
    flex: none;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: nowrap;
}

.admin-promo-actions .btn-small {
    min-width: 84px;
    padding-inline: 12px;
}

@media (max-width: 1200px) {
    .admin-promo-fields {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

#admin-users-body .admin-table-scroll {
    overflow-x: hidden;
}

#users-table {
    min-width: 0 !important;
    width: 100% !important;
}

#users-table th,
#users-table td {
    padding: 10px 8px !important;
}

#users-table th:nth-child(1),
#users-table td:nth-child(1) { width: 34px !important; }
#users-table th:nth-child(2),
#users-table td:nth-child(2) { width: 46px !important; }
#users-table th:nth-child(3),
#users-table td:nth-child(3) { width: 150px !important; }
#users-table th:nth-child(4),
#users-table td:nth-child(4) { width: 118px !important; }
#users-table th:nth-child(5),
#users-table td:nth-child(5) { width: 120px !important; }
#users-table th:nth-child(6),
#users-table td:nth-child(6) { width: 118px !important; }
#users-table th:nth-child(7),
#users-table td:nth-child(7) { width: 142px !important; }
#users-table th:nth-child(8),
#users-table td:nth-child(8) { width: 100px !important; }
#users-table th:nth-child(9),
#users-table td:nth-child(9) { width: 210px !important; }

#users-table .admin-user-avatar {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
}

#users-table .admin-role,
#users-table .admin-account-state {
    font-size: 9px;
    padding: 5px 7px;
}

#users-table .admin-balance-now {
    font-size: 11px;
}

#users-table .admin-balance-action,
#users-table .admin-balance-amount,
#users-table .admin-account-select {
    min-height: 32px;
    height: 32px;
    padding: 5px 8px;
    font-size: 11px;
}

#users-table .admin-actions,
#users-table .admin-account-action {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 40px;
    gap: 6px;
    align-items: center;
}

#users-table .admin-account-action .btn-small,
#users-table .admin-balance-form .btn-small,
#users-table td .btn-small[form^="balance-form-"] {
    min-width: 40px;
    height: 32px;
    padding: 5px 8px;
    font-size: 11px;
}

#users-table td:nth-child(7) > div {
    gap: 6px !important;
}

@media (max-width: 760px) {
    .admin-promo-row {
        grid-template-columns: 1fr !important;
    }

    .admin-promo-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 1100px) {
    .admin-tools-grid-v2 {
        grid-template-columns: 1fr;
        grid-template-areas:
            "maintenance"
            "autoarchive"
            "grant"
            "promos"
            "media";
    }
}

@media (max-width: 720px) {
    .admin-win-head {
        flex-direction: column;
    }
    .admin-win-balance {
        width: 100%;
        text-align: left;
    }
    .admin-win-actions {
        width: 100%;
    }
    .admin-chart-wrap {
        height: 260px;
    }
}

/* Profile withdraw modal polish */
#withdraw-modal.modal-overlay {
    background: rgba(6, 8, 12, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.pv2-withdraw-modal {
    position: relative;
    max-width: 900px;
    width: min(94vw, 900px);
    max-height: calc(100vh - 40px);
    padding: 0;
    overflow: hidden;
    background: linear-gradient(145deg, #0b0f16 0%, #151b26 52%, #090c12 100%);
    border: 1px solid rgba(var(--accent-rgb), 0.24);
    border-radius: 20px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 0 0 1px rgba(var(--accent-rgb), 0.06), 0 32px 90px rgba(0,0,0,0.7), 0 0 80px rgba(var(--accent-rgb), 0.14);
}

.pv2-withdraw-modal::before {
    content: '';
    position: absolute;
    top: -36%;
    right: -22%;
    width: 72%;
    height: 72%;
    background: radial-gradient(circle, rgba(var(--accent-rgb), 0.16), transparent 58%);
    pointer-events: none;
}

.pv2-withdraw-modal::after {
    content: '';
    position: absolute;
    bottom: -28%;
    left: -18%;
    width: 58%;
    height: 58%;
    background: radial-gradient(circle, rgba(255,255,255,0.035), transparent 56%);
    pointer-events: none;
}

.pv2-withdraw-modal > * {
    position: relative;
    z-index: 1;
}

.pv2-withdraw-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 24px;
    background: linear-gradient(90deg, rgba(8, 12, 18, 0.98), rgba(12, 16, 24, 0.98));
    border-bottom: 1px solid rgba(var(--accent-rgb), 0.14);
}

.pv2-withdraw-modal .modal-header h3 {
    margin: 0;
    color: #f8fafc;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: left;
    text-shadow: 0 0 16px rgba(var(--accent-rgb), 0.35);
}

.withdraw-kicker {
    display: block;
    margin-bottom: 3px;
    color: var(--accent);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

.pv2-withdraw-modal .modal-close {
    color: #64748b;
    font-size: 26px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: 0.2s;
    background: transparent;
    border: none;
    cursor: pointer;
    flex: 0 0 36px;
}

.pv2-withdraw-modal .modal-close:hover {
    color: var(--danger);
    background: rgba(239,68,68,0.08);
}

.pv2-withdraw-modal .modal-body {
    padding: 0;
    display: block;
}

.pv2-withdraw-modal .modal-body > div,
.pv2-withdraw-modal #withdraw-btn {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.withdraw-modal-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    min-height: 470px;
}

.withdraw-picker-panel {
    padding: 22px;
    background:
        radial-gradient(circle at 20% 15%, rgba(var(--accent-rgb), 0.08), transparent 28%),
        rgba(12, 16, 24, 0.96);
    box-shadow: inset 0 0 80px rgba(var(--accent-rgb), 0.04);
}

.withdraw-summary-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px;
    background:
        radial-gradient(circle at 12% 20%, rgba(var(--accent-rgb), 0.07), transparent 32%),
        rgba(9, 13, 20, 0.96);
    border-left: 1px solid rgba(var(--accent-rgb), 0.12);
}

.withdraw-label {
    display: block;
    margin-bottom: 10px;
    color: #f8fafc;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    text-align: left;
}

.pv2-withdraw-modal .withdraw-items-list {
    max-height: 390px;
    padding: 2px 8px 2px 0;
    gap: 10px;
    scrollbar-color: rgba(var(--accent-rgb), 0.55) rgba(255,255,255,0.04);
}

.pv2-withdraw-modal .withdraw-items-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.04);
}

.pv2-withdraw-modal .withdraw-item {
    position: relative;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.07);
    border-left: 3px solid var(--withdraw-color, var(--accent));
    border-radius: 12px;
    background: rgba(255,255,255,0.035);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.pv2-withdraw-modal .withdraw-item:hover {
    border-color: rgba(var(--accent-rgb), 0.32);
    border-left-color: var(--withdraw-color, var(--accent));
    background: rgba(var(--accent-rgb), 0.07);
    transform: translateY(-1px);
}

.pv2-withdraw-modal .withdraw-item.selected {
    border-color: rgba(var(--accent-rgb), 0.58);
    border-left-color: var(--accent);
    background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.15), rgba(var(--accent-rgb), 0.05));
    box-shadow: 0 0 22px rgba(var(--accent-rgb), 0.14), inset 0 0 14px rgba(var(--accent-rgb), 0.06);
}

.pv2-withdraw-modal .wi-icon {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
    border-radius: 14px;
    background: radial-gradient(circle, rgba(var(--accent-rgb),0.15), transparent 70%);
}

.pv2-withdraw-modal .wi-real-img {
    max-width: 48px;
    max-height: 48px;
    filter: drop-shadow(0 0 10px rgba(var(--accent-rgb),0.22));
}

.pv2-withdraw-modal .wi-info {
    min-width: 0;
}

.pv2-withdraw-modal .wi-name {
    overflow: hidden;
    color: #f8fafc;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pv2-withdraw-modal .wi-price {
    margin-top: 4px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 900;
}

.pv2-withdraw-modal .wi-check {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    color: #fff;
    background: rgba(var(--accent-rgb), 0.16);
    border: 1px solid rgba(var(--accent-rgb), 0.22);
    font-size: 15px;
}

.withdraw-summary-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 16px;
    border: 1px solid rgba(var(--accent-rgb), 0.18);
    border-radius: 16px;
    background: rgba(var(--accent-rgb), 0.06);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 0 20px rgba(var(--accent-rgb),0.08);
}

.withdraw-summary-icon {
    width: 74px;
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: radial-gradient(circle, rgba(var(--accent-rgb),0.18), transparent 72%);
    color: var(--accent);
    font-size: 34px;
}

.withdraw-summary-icon img {
    width: 66px;
    height: 66px;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(var(--accent-rgb),0.22));
}

.withdraw-selected-count {
    min-height: 34px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
    text-align: center;
}

.withdraw-selected-count.has-selection {
    color: #f8fafc;
    text-shadow: 0 0 12px rgba(var(--accent-rgb), 0.25);
}

.pv2-withdraw-modal #withdraw-nick.withdraw-nick-input {
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 13px 16px;
    border-radius: 12px;
    background: rgba(8,12,18,0.62);
    border: 1px solid rgba(255,255,255,0.08);
    text-align: left;
}

.pv2-withdraw-modal #withdraw-nick.withdraw-nick-input:focus {
    border-color: rgba(var(--accent-rgb), 0.7);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12), 0 0 20px rgba(var(--accent-rgb), 0.12);
}

.withdraw-submit-btn {
    width: 100%;
    min-height: 50px;
    margin-top: 4px;
    border-radius: 12px;
    font-size: 12px;
    letter-spacing: 0.7px;
    box-shadow: 0 10px 26px rgba(var(--accent-rgb), 0.28), 0 0 20px rgba(var(--accent-rgb), 0.16);
}

.withdraw-submit-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(0.25);
    transform: none;
    box-shadow: none;
}

.withdraw-msg {
    min-height: 18px;
    margin-top: 2px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
    text-align: center;
}

.withdraw-empty {
    padding: 32px 18px;
    border: 1px dashed rgba(var(--accent-rgb), 0.24);
    border-radius: 14px;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    background: rgba(255,255,255,0.025);
}

@media (max-width: 760px) {
    .pv2-withdraw-modal {
        width: min(94vw, 520px);
        max-height: calc(100vh - 22px);
        border-radius: 16px;
    }

    .pv2-withdraw-modal .modal-header {
        padding: 16px;
    }

    .withdraw-modal-layout {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .withdraw-picker-panel,
    .withdraw-summary-panel {
        padding: 16px;
    }

    .withdraw-summary-panel {
        border-left: none;
        border-top: 1px solid rgba(var(--accent-rgb), 0.12);
    }

    .pv2-withdraw-modal .withdraw-items-list {
        max-height: 260px;
    }

    .pv2-withdraw-modal .wi-name {
        white-space: normal;
    }
}

/* History page v2 */
.history-page {
    max-width: 960px !important;
    padding: 28px 20px !important;
}

.history-title {
    margin-bottom: 22px !important;
    color: #f8fafc !important;
    font-size: 28px !important;
    text-shadow: 0 0 18px rgba(var(--accent-rgb),0.18);
}

.history-tabs {
    gap: 10px !important;
    margin-bottom: 20px !important;
}

.history-tab {
    min-width: 132px;
    border-radius: 10px !important;
    border: 1px solid rgba(var(--accent-rgb),0.35) !important;
    background: rgba(8,13,20,0.72) !important;
    color: #94a3b8 !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.history-tab:hover,
.history-tab.active {
    background: linear-gradient(180deg, var(--accent), var(--accent-dark)) !important;
    color: #0b0f16 !important;
    border-color: var(--accent) !important;
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(var(--accent-rgb),0.22);
}

.history-content {
    padding: 20px !important;
    border-radius: 18px !important;
    border: 1px solid rgba(var(--accent-rgb),0.22) !important;
    background:
        radial-gradient(circle at 20% 10%, rgba(var(--accent-rgb),0.08), transparent 30%),
        linear-gradient(145deg, #0b0f16 0%, #101722 52%, #090c12 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 24px 70px rgba(0,0,0,0.32), 0 0 46px rgba(var(--accent-rgb),0.10);
}

.history-card-v2 {
    grid-template-columns: 56px minmax(150px, 1fr) minmax(260px, 1.35fr) auto !important;
    min-height: 66px;
    margin-bottom: 10px !important;
    border: 1px solid rgba(255,255,255,0.06);
    border-left: 3px solid var(--history-color, var(--accent));
    border-radius: 12px !important;
    background: rgba(255,255,255,0.035) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
}

.history-card-v2:hover {
    transform: translateY(-1px) !important;
    border-color: rgba(var(--accent-rgb),0.28);
    background: rgba(var(--accent-rgb),0.06) !important;
}

.history-card-v2 .history-icon {
    width: 50px;
    height: 50px;
    border-radius: 13px;
    background: radial-gradient(circle, rgba(var(--accent-rgb),0.13), transparent 72%);
}

.history-card-v2 .history-real-img {
    max-width: 44px;
    max-height: 44px;
    filter: drop-shadow(0 0 10px rgba(var(--accent-rgb),0.18));
}

.history-card-v2 .history-name {
    color: #f8fafc;
    font-weight: 900;
}

.history-card-v2 .history-drop {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 900;
}

.history-mini-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(var(--accent-rgb),0.25));
}

.history-status-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
}

.history-status-dollar {
    background: linear-gradient(180deg, #34d399, #15803d);
    box-shadow: 0 0 12px rgba(34,197,94,0.24);
}

.history-status-cross {
    background: linear-gradient(180deg, #ff4a54, #991b1b);
    box-shadow: 0 0 12px rgba(239,68,68,0.24);
}

@media (max-width: 760px) {
    .history-card-v2 {
        grid-template-columns: 48px 1fr !important;
    }

    .history-card-v2 .history-drop,
    .history-card-v2 .history-time {
        grid-column: 2;
        text-align: left !important;
    }
}

/* Keep upgrade rules modal synced with active theme */
.upgrade-info-modal {
    background: linear-gradient(145deg, #0b0f16 0%, #151b26 52%, #090c12 100%) !important;
    border-color: rgba(var(--accent-rgb), 0.35) !important;
    box-shadow:
        0 20px 60px rgba(0,0,0,0.55),
        0 0 28px rgba(var(--accent-rgb), 0.14) !important;
}

.upgrade-info-modal .upgrade-modal-header {
    background: linear-gradient(90deg, rgba(8, 12, 18, 0.98), rgba(12, 16, 24, 0.98)) !important;
    border-bottom-color: rgba(var(--accent-rgb), 0.25) !important;
}

.upgrade-info-modal .upgrade-modal-body {
    background:
        radial-gradient(circle at 18% 18%, rgba(var(--accent-rgb), 0.08), transparent 30%),
        radial-gradient(circle at 86% 82%, rgba(var(--accent-rgb), 0.05), transparent 34%),
        rgba(12, 16, 24, 0.96) !important;
    scrollbar-color: var(--accent) rgba(255,255,255,0.06) !important;
}

.upgrade-info-modal .upgrade-modal-header h3,
.upgrade-info-modal .upgrade-rule-text strong {
    color: var(--accent) !important;
}

.upgrade-info-modal .upgrade-rule-row {
    border-bottom-color: rgba(var(--accent-rgb), 0.10) !important;
}

.upgrade-info-modal .upgrade-rule-index {
    background: rgba(var(--accent-rgb), 0.16) !important;
    color: var(--accent) !important;
}

.upgrade-info-modal .upgrade-modal-body::-webkit-scrollbar-thumb {
    background: var(--accent) !important;
}

.upgrade-info-modal .upgrade-modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover) !important;
}

.upgrade-panel-title-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    vertical-align: -0.25em;
    filter: drop-shadow(0 0 7px rgba(var(--accent-rgb),0.28));
}

.pv2-withdraw-status.pending {
    background: linear-gradient(180deg, rgba(245,158,11,0.22), rgba(120,74,12,0.26)) !important;
    color: #ffbf4a !important;
    border: 1px solid rgba(245,158,11,0.28);
    border-radius: 7px;
    padding: 5px 9px;
    letter-spacing: 0.4px;
}

#admin-users-body .admin-bulk-users-panel {
    position: sticky;
    top: 8px;
    z-index: 15;
    grid-template-columns: minmax(110px, 0.8fr) minmax(150px, 1fr) minmax(100px, 0.65fr) auto auto;
    background: linear-gradient(180deg, rgba(10, 18, 20, 0.96), rgba(10, 15, 22, 0.94));
    border-color: rgba(var(--accent-rgb), 0.28);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(10px);
}

#admin-users-body .admin-bulk-users-panel .btn-small {
    min-width: 118px;
    height: 34px;
    padding-inline: 12px;
    white-space: nowrap;
}

#users-table .admin-row-balance-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px;
    gap: 6px;
    align-items: center;
}

#users-table .admin-row-balance-tools .btn-small {
    width: 38px;
    min-width: 38px;
    padding-inline: 0;
}

.admin-user-role-filter {
    width: 150px;
    min-width: 150px;
}

@media (max-width: 760px) {
    .admin-user-role-filter {
        width: 100%;
        min-width: 0;
    }
}

/* Case pages: centered premium hero case */
.case-v2-page {
    padding-top: 0;
}

.case-v2-header {
    padding-bottom: 6px;
}

.case-v2-label {
    font-size: 10px;
    line-height: 1;
    margin-bottom: 2px;
    letter-spacing: 1.1px;
    color: var(--accent);
}

.case-v2-title {
    font-size: clamp(23px, 2.25vw, 34px);
    line-height: 0.96;
    margin-bottom: 2px;
    letter-spacing: 0;
}

.case-v2-image-wrap {
    width: clamp(276px, 28vw, 352px);
    height: clamp(276px, 28vw, 352px);
    margin-top: -2px;
    margin-bottom: -14px;
    isolation: isolate;
    align-items: center;
    justify-content: center;

    /* Дым/свечение под цвет кейса */
    --case-glow-r: 56;
    --case-glow-g: 189;
    --case-glow-b: 248;
    --case-glow-r2: 59;
    --case-glow-g2: 130;
    --case-glow-b2: 246;
    --case-glow-r3: 0;
    --case-glow-g3: 210;
    --case-glow-b3: 255;
}

.case-v2-image-wrap.case-theme-red {
    --case-glow-r: 239;
    --case-glow-g: 68;
    --case-glow-b: 68;
    --case-glow-r2: 220;
    --case-glow-g2: 38;
    --case-glow-b2: 38;
    --case-glow-r3: 255;
    --case-glow-g3: 0;
    --case-glow-b3: 0;
}

.case-v2-image-wrap.case-theme-green {
    --case-glow-r: 34;
    --case-glow-g: 197;
    --case-glow-b: 94;
    --case-glow-r2: 22;
    --case-glow-g2: 163;
    --case-glow-b2: 74;
    --case-glow-r3: 50;
    --case-glow-g3: 255;
    --case-glow-b3: 50;
}

.case-v2-image-wrap.case-theme-yellow {
    --case-glow-r: 245;
    --case-glow-g: 158;
    --case-glow-b: 11;
    --case-glow-r2: 234;
    --case-glow-g2: 179;
    --case-glow-b2: 8;
    --case-glow-r3: 255;
    --case-glow-g3: 215;
    --case-glow-b3: 0;
}

.case-v2-image-wrap::before {
    content: '';
    position: absolute;
    inset: 18%;
    z-index: 0;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%, rgba(var(--case-glow-r), var(--case-glow-g), var(--case-glow-b), 0.14), transparent 48%),
        rgba(6, 15, 18, 0.08);
    box-shadow:
        inset 0 0 34px rgba(var(--case-glow-r), var(--case-glow-g), var(--case-glow-b), 0.08),
        0 0 26px rgba(var(--case-glow-r), var(--case-glow-g), var(--case-glow-b), 0.10);
    pointer-events: none;
}

.case-v2-image-wrap::after {
    content: none;
    pointer-events: none;
}

.case-v2-image-wrap.case-hero-large {
    --case-hero-scale: 1.12;
    --case-hero-hover-scale: 1.14;
}

.case-v2-image-wrap.case-hero-extra-large {
    --case-hero-scale: 1.16;
    --case-hero-hover-scale: 1.18;
}

.case-v2-image-wrap.case-hero-spooky {
    --case-hero-scale: 1.06;
    --case-hero-hover-scale: 1.08;
}

.case-v2-ring {
    z-index: 1;
    position: absolute;
    inset: auto;
    width: min(90%, 320px) !important;
    height: min(90%, 320px) !important;
    display: block;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    object-fit: contain;
    object-position: center center;
    opacity: 0.92;
    filter:
        saturate(1.18)
        drop-shadow(0 0 16px rgba(var(--case-glow-r3), var(--case-glow-g3), var(--case-glow-b3), 0.34))
        drop-shadow(0 0 28px rgba(var(--case-glow-r2), var(--case-glow-g2), var(--case-glow-b2), 0.20));
    animation: spinRing 22s linear infinite;
    pointer-events: none;
    user-select: none;
}

.case-v2-ring::after {
    content: none;
}

.case-v2-image {
    z-index: 3;
    width: min(124%, 410px);
    height: min(104%, 330px);
    max-width: none;
    max-height: none;
    object-fit: contain;
    object-position: center center;
    transform: translate(var(--case-visual-x, 0px), var(--case-visual-y, 0px)) scale(var(--case-hero-scale, 1));
    transform-origin: center center;
    filter:
        drop-shadow(0 14px 16px rgba(0,0,0,0.40))
        drop-shadow(0 0 18px rgba(var(--case-glow-r), var(--case-glow-g), var(--case-glow-b), 0.24))
        drop-shadow(0 0 12px rgba(var(--accent-rgb),0.18));
    pointer-events: none;
}

.case-v2-image:hover {
    transform: translate(var(--case-visual-x, 0px), var(--case-visual-y, 0px)) scale(var(--case-hero-hover-scale, 1.02));
}

@keyframes spinRingReverse {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

.case-v2-section-title {
    font-size: 19px;
    line-height: 1;
    margin: 12px 0 12px;
}

.case-v2-items {
    margin-top: 0;
}

.case-v2-balance-info {
    max-width: 380px;
    padding: 14px 18px;
    gap: 8px;
    position: relative;
    z-index: 5;
    box-shadow:
        0 12px 30px rgba(0,0,0,0.34),
        0 0 0 1px rgba(var(--accent-rgb),0.12);
}

.case-v2-balance-info[style] {
    margin-top: 2px !important;
}

.case-v2-balance-text {
    font-size: 12px;
    line-height: 1.35;
}

.case-v2-deposit-btn {
    padding: 8px 28px;
    font-size: 11px;
}

@media (max-width: 768px) {
    .case-v2-image-wrap {
        width: clamp(248px, 70vw, 310px);
        height: clamp(248px, 70vw, 310px);
        margin-top: -6px;
        margin-bottom: -10px;
    }

    .case-v2-image {
        width: min(122%, 335px);
        height: min(102%, 285px);
    }
}

/* Larger item art in profile inventory and withdrawal lists */
.pv2-item-img {
    height: 110px;
    padding: 18px 8px 0;
}

.pv2-item-img > .pv2-item-real-img,
.pv2-item-real-img {
    max-width: 94% !important;
    max-height: 94% !important;
}

.pv2-withdraw-modal .wi-icon {
    width: 64px;
    height: 64px;
    flex-basis: 64px;
}

.pv2-withdraw-modal .wi-real-img,
.wi-real-img {
    max-width: 58px !important;
    max-height: 58px !important;
}

/* Compact and stable extra settings cards */
.admin-tools-grid-v2 {
    align-items: stretch !important;
}

.admin-tools-grid-v2 > .admin-tool-card {
    align-self: stretch !important;
}

.admin-tools-grid-v2 .admin-tool-head {
    min-height: 58px;
}

.admin-case-form.admin-case-form-compact {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 10px 12px !important;
}

.admin-case-form.admin-case-form-compact .admin-field > span {
    display: none !important;
}

.admin-case-form.admin-case-form-compact .admin-select-search,
.admin-case-form.admin-case-form-compact .admin-field-user,
.admin-case-form.admin-case-form-compact .admin-field-account,
.admin-case-form.admin-case-form-compact .admin-field-case,
.admin-case-form.admin-case-form-compact .admin-field-count {
    grid-column: auto !important;
}

.admin-case-form.admin-case-form-compact .admin-case-submit {
    grid-column: 1 / -1 !important;
    width: 100% !important;
}

.admin-promo-form {
    min-height: 152px !important;
}
