:root {
  --bg-dark: #0b0c10;
  --bg-panel: #13151a;
  --bg-panel-light: #1f2229;
  --gold: #ffd400;
  --gold-dark: #d4af37;
  --text-main: #e8f1f2;
  --text-muted: #6b8794;
  --border: #1f2229;
  --green: #00ff88;
  --pink: #ff2d95;

  --currency-size: 16px;
}

* { margin:0; padding:0; box-sizing:border-box; font-family:'Montserrat', 'Segoe UI', system-ui, sans-serif; }
body {
    background-color: var(--bg-dark);
    background-image: linear-gradient(rgba(11, 12, 16, 0.7), rgba(11, 12, 16, 0.7)), url('images/bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--text-main);
    min-height:100vh;
    display: flex;
    flex-direction: column;
}

/* ================= ИКОНКИ И ВАЛЮТА ================= */
.currency-img {
    width: var(--currency-size) !important;
    height: var(--currency-size) !important;
    object-fit: contain;
    margin: 0;
    display: inline-block;
    vertical-align: middle;
}

.ui-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    vertical-align: middle;
    display: inline-block;
    pointer-events: none;
    filter: brightness(0) invert(0.8) opacity(0.9);
    transition: filter 0.2s ease, opacity 0.2s ease;
}

.active .ui-icon,
button.active .ui-icon {
    filter: brightness(0) saturate(100%) invert(79%) sepia(33%) saturate(5585%) hue-rotate(353deg) brightness(101%) contrast(105%);
    opacity: 1;
}

button:hover .ui-icon {
    filter: brightness(0) invert(0.6) opacity(1);
}

.flex-center { display: flex; align-items: center; justify-content: center; gap: 6px; line-height: 1; }
.balance-pill, .balance-large, .card .price, .slot-content .item-price, .history-box-price, .dep-card-new .price, .dep-sel-price, .dep-input-wrapper, .cart-total span:last-child {
    display: flex; align-items: center; gap: 6px; line-height: 1;
}
.balance-large .currency-img { width: calc(var(--currency-size) * 1.5) !important; height: calc(var(--currency-size) * 1.5) !important; }

/* AUTH */
#authScreen { justify-content:center; align-items:center; display:flex; min-height:100vh; padding:20px; }
.auth-box { background:var(--bg-panel); border:1px solid var(--border); border-radius:16px; padding:32px; width:100%; max-width:400px; }
.auth-box h1 { text-align:center; margin-bottom:24px; font-size:2.2rem; font-weight: 900; letter-spacing: 2px; background: linear-gradient(180deg, #fff700 0%, var(--gold) 30%, #d4af37 60%, #13151a 100%); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
.auth-tabs { display:flex; gap:8px; margin-bottom:20px; background:var(--bg-dark); padding:4px; border-radius:10px; }
.auth-tabs button { flex:1; padding:10px; border:none; background:transparent; color:var(--text-muted); font-weight:700; border-radius:8px; cursor:pointer; transition:0.2s; }
.auth-tabs button.active { background:var(--bg-panel-light); color:var(--gold); }
#authForm { display:flex; flex-direction:column; gap:12px; }
#authForm input { background:var(--bg-dark); border:1px solid var(--border); color:var(--text-main); padding:14px; border-radius:10px; outline:none; }
#authForm input:focus { border-color:var(--gold); }
#authForm button { background:var(--gold); border:none; padding:14px; border-radius:10px; font-weight:900; color:#000; cursor:pointer; }
#authError { color:var(--pink); text-align:center; min-height:20px; margin-top:8px; font-size:.9rem; }

/* HEADER */
header { display:flex; justify-content:space-between; align-items:center; background:var(--bg-panel); border-bottom:1px solid var(--border); padding: 0 32px; height: 70px; }
.header-left { display:flex; align-items:center; gap:32px; }
.logo { font-weight:900; font-size:1.4rem; letter-spacing:2px; display:flex; align-items:center; gap:8px; }
.logo-img { height: 50px; width: auto; object-fit: contain; }
.logo-text { background: linear-gradient(180deg, #fff700 0%, var(--gold) 30%, #d4af37 60%, #13151a 100%); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
.header-nav { display:flex; gap:16px; }
.header-nav button { background:transparent; border:none; color:var(--text-muted); font-weight:700; font-size:.9rem; cursor:pointer; text-transform:uppercase; padding: 24px 0; border-bottom:2px solid transparent; }
.header-nav button.active { color:var(--gold); border-bottom-color:var(--gold); }
.header-right { display:flex; align-items:center; gap:12px; }
.balance-pill { background:var(--bg-dark); border:1px solid var(--border); padding:6px 16px; border-radius:8px; font-weight:700; font-size:.9rem; }
.btn-deposit { background:var(--gold); border:none; color:#000; padding:8px 16px; border-radius:8px; font-weight:800; cursor:pointer; transition:.2s; }
.btn-deposit:hover { background:#ffea00; }
.btn-profile { background:var(--bg-panel-light); border:none; color:#fff; width:36px; height:36px; border-radius:50%; cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:1.2rem; transition:.2s; }
.btn-profile:hover { background:var(--border); }

/* MAIN */
.main-content { padding: 32px 32px; display:flex; flex-direction:column; align-items:center; max-width: 1400px; margin: 0 auto; width: 100%; gap: 24px; }

/* UPGRADE AREA */
.upgrade-area { display:flex; justify-content:center; align-items:flex-start; gap:60px; width:100%; margin-top: 10px; }
.slot-wrapper { display:flex; flex-direction:column; gap:12px; align-items:flex-start; }
.slot-controls { display:flex; gap:10px; align-items:center; height: 40px; }

.fast-spin-btn { background: var(--bg-panel); border: 1px solid var(--border); color: var(--text-muted); padding: 0; width: 40px; height: 40px; border-radius: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
.fast-spin-btn.active { background: rgba(255, 215, 0, 0.15); color: var(--gold); border-color: var(--gold); }
.fast-spin-btn .ui-icon { width: 22px; height: 22px; }
.btn-settings-icon { background: var(--bg-panel); border: 1px solid var(--border); color: #fff; width: 40px; height: 40px; border-radius: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
.btn-settings-icon:hover { border-color: var(--gold); }
.btn-settings-icon .ui-icon { width: 22px; height: 22px; }

.slot-box { background:var(--bg-panel); border:1px solid var(--border); border-radius:20px; width:300px; height:300px; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:20px; position:relative; transition:.2s; }
.slot-box.active { border-color:var(--gold); box-shadow:0 0 25px rgba(255,215,0,0.15); }
.slot-title { font-size:.8rem; color:var(--text-muted); text-align:center; position:absolute; top:20px; width:100%; left:0; }
.slot-placeholder { display:flex; flex-direction:column; align-items:center; justify-content:center; opacity:0.8; }
.placeholder-icon { font-size:5rem; color:var(--gold); display: flex; align-items: center; justify-content: center; }
.placeholder-icon img { max-width: 180px; max-height: 180px; object-fit: contain; filter: drop-shadow(0 0 15px rgba(255,215,0,0.3)); }
.slot-content { display:flex; flex-direction:column; align-items:center; gap:10px; margin-top:20px; cursor: pointer; }
.slot-img { width: 120px; height: 120px; object-fit: contain; margin-bottom: 5px; }
.slot-content .item-name { font-size:1.1rem; font-weight:700; text-align:center; }
.slot-content .item-price { color:var(--gold); font-weight:900; font-size: 1.1rem; }

/* WHEEL */
.wheel-section { display:flex; flex-direction:column; align-items:center; margin-top: 5px; }
.wheel-container { position:relative; width:360px; height:360px; }
.wheel-ring { position: absolute; inset: 0; border-radius: 50%; transition: background 0.3s; z-index: 1; box-shadow: inset 0 0 20px rgba(0,0,0,0.8); }
.wheel-inner { position:absolute; inset:50px; border-radius:50%; display:flex; flex-direction:column; align-items:center; justify-content:center; border:2px solid #1f2229; background: var(--bg-panel); z-index: 2; overflow: hidden; }
.wheel-bg-img { position: absolute; width: 160px; height: 160px; object-fit: contain; opacity: 0.3; z-index: 0; pointer-events: none; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.wheel-chance { font-size:2.8rem; font-weight:900; color:var(--gold); text-shadow:0 0 20px rgba(255,215,0,0.4); position: relative; z-index: 1; line-height: 1;}
.wheel-label { font-size:.85rem; color:var(--text-muted); margin-top: 5px; position: relative; z-index: 1; }
.wheel-marker { position: absolute; color: rgba(255, 255, 255, 0.35); font-size: 0.65rem; font-weight: bold; z-index: 5; pointer-events: none; }
.marker-top { top: 16px; left: 50%; transform: translateX(-50%); }
.marker-bottom { bottom: 16px; left: 50%; transform: translateX(-50%); }
.marker-left { left: 16px; top: 50%; transform: translateY(-50%); }
.marker-right { right: 16px; top: 50%; transform: translateY(-50%); }
.pointer-wrapper { position:absolute; top:50%; left:50%; width:0; height:0; z-index:10; }
.pointer-arrow { position:absolute; top: -186px; left: -19px; width: 38px; height: 38px; background: var(--gold); clip-path: polygon(50% 100%, 0 0, 100% 0); filter: drop-shadow(0 0 10px var(--gold)); }

/* CONTROLS */
.controls-layout { display: grid; grid-template-columns: 300px 360px 300px; gap: 60px; align-items: center; justify-content: center; width: 100%; margin-top: 20px; }
.control-col { display: flex; flex-direction: column; }
.left-col .fake-slider { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 10px; padding: 16px 20px; height: 100%; display: flex; flex-direction: column; justify-content: center;}
.slider-header { display:flex; justify-content:space-between; font-size:.8rem; color:var(--text-muted); margin-bottom:12px; align-items: center;}
.real-slider { -webkit-appearance: none; width: 100%; height: 8px; background: var(--bg-dark); border-radius: 4px; outline: none; }
.real-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--gold); cursor: pointer; box-shadow: 0 0 10px rgba(255,215,0,0.6); }
.slider-footer { text-align: right; font-size: 0.7rem; color: var(--text-muted); margin-top: 8px; }
.center-col { align-items: center; gap: 16px; }
.btn-main-upgrade { width: 100%; background: var(--gold); border: none; padding: 20px; border-radius: 10px; font-weight: 900; font-size: 1.2rem; cursor: pointer; color: #000; transition: .15s; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-main-upgrade img.btn-custom-img { width: 36px; height: 36px; object-fit: contain; }
.btn-main-upgrade:disabled { opacity: .5; cursor: not-allowed; filter: grayscale(.8); }
.btn-main-upgrade:not(:disabled):hover { background: #ffea00; transform: translateY(-2px); }
.right-col .presets-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.presets-grid button { background: var(--bg-panel); border: 1px solid var(--border); color: var(--text-muted); height: 50px; border-radius: 10px; cursor: pointer; font-weight: 800; font-size: 1rem; transition: .2s; }
.presets-grid button:hover, .presets-grid button.active { border-color: var(--gold); color: var(--gold); }

/* BOTTOM SPLIT LAYOUT */
.bottom-split-layout { display: flex; gap: 24px; width: 100%; max-width: 1200px; margin-top: 20px; height: 500px; }
.panel { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 16px; display: flex; flex-direction: column; overflow: hidden; flex: 1; }
.panel-tabs { display: flex; align-items: center; background: rgba(0,0,0,0.3); border-bottom: 1px solid var(--border); padding: 10px 10px 0 10px; z-index: 2; gap: 5px; }
.tab-btn { background: transparent; border: none; color: var(--text-muted); padding: 14px 20px; font-weight: 700; font-size: 1rem; cursor: pointer; border-bottom: 2px solid transparent; transition: 0.2s; display: inline-flex; align-items: center; gap: 6px; }
.tab-btn:hover { color: #fff; }
.tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); }

.panel-content { flex: 1; overflow-y: auto; padding: 20px; }
.panel-content::-webkit-scrollbar { width: 8px; }
.panel-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* МАГАЗИН В ОДИН РЯД */
.shop-controls-row { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; background: #15171d; border: 1px solid #252830; padding: 8px; border-radius: 12px; flex-wrap: nowrap; overflow-x: auto; }
.mode-switch { display: flex; background: #0b0c10; border-radius: 8px; padding: 2px; flex-shrink: 0; }
.mode-switch button { background: transparent; border: none; color: var(--text-muted); padding: 6px 12px; border-radius: 6px; font-size: 0.75rem; font-weight: 700; cursor: pointer; transition: 0.2s; }
.mode-switch button.active { background: #2a2d35; color: var(--gold); }
.inputs-group { display: flex; gap: 6px; flex: 1; min-width: 0; }
.input-wrapper { display: flex; align-items: center; background: #0b0c10; border: 1px solid #252830; border-radius: 8px; padding: 0 10px; height: 32px; flex: 1; }
.input-wrapper span { font-size: 0.75rem; color: var(--text-muted); margin-right: 6px; }
.input-wrapper input { background: transparent; border: none; color: #fff; width: 100%; outline: none; font-size: 0.85rem; }
.sort-btn { background: transparent; border: 1px solid var(--border); color: var(--text-muted); width: 32px; height: 32px; border-radius: 6px; cursor: pointer; font-weight: bold; font-size: 1rem; transition: 0.2s; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sort-btn:hover { border-color: var(--gold); }
.sort-btn.active { background: rgba(255, 215, 0, 0.15); color: var(--gold); border-color: var(--gold); }

/* КОРЗИНА В ПАНЕЛИ УПРАВЛЕНИЯ */
.shop-actions-right { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.btn-yellow-cart { background: var(--gold); border: none; color: #000; padding: 0 12px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 1.2rem; cursor: pointer; position: relative; transition: 0.2s; }
.btn-yellow-cart:hover { background: #ffea00; }
.btn-yellow-cart .ui-icon { filter: brightness(0); }
.btn-yellow-cart .cart-badge { position: absolute; top: -6px; right: -6px; background: #ff2d95; color: #fff; font-size: 0.65rem; font-weight: 900; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 10px; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 5px rgba(0,0,0,0.3); }

.shop-bottom-bar { display: flex; justify-content: space-between; align-items: center; background: #15171d; border-top: 1px solid #252830; padding: 15px 20px; border-radius: 0 0 16px 16px; flex-shrink: 0; }
.shop-bottom-left { display: flex; align-items: center; gap: 15px; }
.pagination-arrows { display: flex; gap: 8px; }
.pagination-arrows button { background: #1f2229; border: none; color: #fff; width: 36px; height: 36px; border-radius: 8px; cursor: pointer; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
.pagination-arrows button:hover:not(:disabled) { background: #2a2d35; }
.pagination-arrows button:disabled { opacity: 0.3; cursor: not-allowed; }
.pagination-arrows button .ui-icon { width: 24px; height: 24px; }

.btn-trash-cart { background: #1f2229; border: none; color: #6b8794; width: 36px; height: 36px; border-radius: 8px; cursor: pointer; font-size: 1.1rem; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
.btn-trash-cart:hover { background: #2a2d35; }
.btn-trash-cart .ui-icon { width: 22px; height: 22px; }

.btn-shop-buy { background: var(--gold); border: none; color: #000; padding: 0 24px; height: 40px; border-radius: 8px; font-weight: 900; font-size: 1rem; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: 0.2s; }
.btn-shop-buy:disabled { background: #2a2d35; color: #6b8794; cursor: not-allowed; }
.btn-shop-buy:not(:disabled):hover { background: #ffea00; transform: translateY(-2px); }

/* ================= СЕТКА И КАРТОЧКИ ================= */
.grid-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; align-content: start; }
.card { background: linear-gradient(180deg, #1c1e26 0%, #13151a 100%); border: 2px solid #252830; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; cursor: pointer; position: relative; transition: .2s; height: 150px; overflow: hidden; }
.card:hover { transform: translateY(-3px); filter: brightness(1.1); }
.card.selected { box-shadow: 0 0 15px rgba(255,215,0,0.4); border-color: var(--gold) !important; }
.card.in-cart { border-color: var(--gold); box-shadow: inset 0 0 10px rgba(255,215,0,0.2); }
.card .brainrot-img { width: 100%; height: 70px; object-fit: contain; margin-bottom: 4px; }
.card .name { font-size: 0.7rem; color: #e8f1f2; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; font-weight: 600; line-height: 1.2; margin-bottom: 2px; }
.card .price { font-size: 0.85rem; font-weight: 900; color: var(--gold); }
.card .count-badge { position: absolute; top: 4px; right: 6px; color: var(--gold); font-size: .75rem; font-weight: 900; z-index: 2; text-shadow: 1px 1px 2px #000; }

.cart-controls { position: absolute; bottom: 0; left: 0; right: 0; background: var(--gold); border-radius: 0 0 10px 10px; display: flex; justify-content: space-between; align-items: center; padding: 2px 6px; height: 30px; z-index: 5; }
.cart-controls button { background: transparent; border: none; color: #000; font-size: 1.2rem; font-weight: 900; cursor: pointer; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: 0.1s; }
.cart-controls button:hover { background: rgba(0,0,0,0.15); }
.cart-controls .qty { color: #000; font-weight: 900; font-size: 0.9rem; }

.inv-actions-overlay { position: absolute; inset: 0; background: rgba(15, 17, 21, 0.95); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; opacity: 0; pointer-events: none; transition: 0.2s; z-index: 5; border-radius: 10px; }
.card:hover .inv-actions-overlay { opacity: 1; pointer-events: auto; }
.btn-card-action { width: 85%; padding: 8px; border-radius: 8px; border: none; font-weight: 900; font-size: 0.8rem; cursor: pointer; transition: 0.1s; text-transform: uppercase; }
.btn-sell { background: var(--pink); color: #fff; box-shadow: 0 0 15px rgba(255,45,149,0.4); }
.btn-sell:hover { background: #ff0044; }
.btn-withdraw { background: var(--gold); color: #000; box-shadow: 0 0 15px rgba(255,215,0,0.4); }
.btn-withdraw:hover { background: #ffea00; }

.card.rarity-common { border-color: #4b5563; }
.card.rarity-uncommon { border-color: #3b82f6; box-shadow: inset 0 0 10px rgba(59,130,246,0.1); }
.card.rarity-rare { border-color: #8b5cf6; box-shadow: inset 0 0 10px rgba(139,92,246,0.1); }
.card.rarity-epic { border-color: #ec4899; box-shadow: inset 0 0 10px rgba(236,72,153,0.1); }
.card.rarity-legendary { border-color: #f59e0b; box-shadow: inset 0 0 10px rgba(245,158,11,0.15); }
.card.rarity-secret { border-color: #ef4444; box-shadow: inset 0 0 15px rgba(239,68,68,0.2); }
.card.rarity-og { border-color: #fff; box-shadow: inset 0 0 20px rgba(255,255,255,0.2); }

/* ================= НОВЫЙ ДИЗАЙН КЕЙСОВ ================= */
.case-categories {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    position: relative;
    padding-top: 20px;
}

.case-categories::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
}

.case-cat-btn {
    background: linear-gradient(180deg, #1f1821 0%, #13151a 100%);
    border: 2px solid #ff7b00;
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 900;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 0 15px rgba(255, 123, 0, 0.2), inset 0 0 10px rgba(255, 123, 0, 0.1);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    outline: none;
}

.case-cat-btn span {
    font-size: 1.2rem;
    color: #ff7b00;
    filter: drop-shadow(0 0 5px rgba(255, 123, 0, 0.8));
}

.case-cat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(255, 123, 0, 0.5), inset 0 0 15px rgba(255, 123, 0, 0.3);
    border-color: #ffa500;
}

.case-cat-btn.active {
    background: linear-gradient(180deg, #3a1f10 0%, #1a0f0a 100%);
    border-color: var(--gold);
    box-shadow: 0 0 30px rgba(255, 204, 0, 0.6), inset 0 0 20px rgba(255, 204, 0, 0.3);
    color: var(--gold);
}

.case-cat-btn.active span {
    color: var(--gold);
    filter: drop-shadow(0 0 8px rgba(255, 204, 0, 1));
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1400px;
}

.case-card-new {
    background: linear-gradient(180deg, #1f1821 0%, #13151a 100%);
    border: 2px solid #3a2a3a;
    border-radius: 16px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: relative;
    transition: 0.3s;
    overflow: hidden;
    animation: slideUp 0.4s ease forwards;
}
.case-card-new:hover {
    border-color: var(--gold);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255,215,0,0.1);
}

.case-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #2a2d35;
    border: 1px solid #4a3a20;
    color: var(--gold);
    font-size: 0.75rem;
    font-weight: 900;
    padding: 4px 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.case-title {
    font-weight: 900;
    font-size: 1.1rem;
    color: #fff;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.case-image-wrapper {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}
.case-image-wrapper img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.6));
    transition: 0.3s;
}
.case-card-new:hover .case-image-wrapper img {
    transform: scale(1.05);
}
.case-image-wrapper .case-emoji {
    font-size: 5rem;
    line-height: 1;
}

.case-bottom-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #15171d;
    padding: 10px 12px;
    border-radius: 10px;
    margin-top: auto;
    border: 1px solid #252830;
}

.case-items-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.case-price-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #0b0c10;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 900;
    color: #fff;
    font-size: 0.9rem;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* КОРЗИНА (МОДАЛКА) */
.cart-modal-box { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 16px; width: 100%; max-width: 600px; display: flex; flex-direction: column; max-height: 85vh; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.cart-header { padding: 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.cart-title { font-size: 1.2rem; font-weight: 800; display: flex; align-items: center; }
.cart-title .ui-icon { width: 24px; height: 24px; margin-right: 8px; }
.cart-subheader { padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; background: #1b1d24; }
.cart-subheader span { font-size: 0.9rem; color: var(--text-muted); }
.clear-cart-btn { background: transparent; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.85rem; transition: 0.2s; display: flex; align-items: center; gap: 5px; }
.clear-cart-btn:hover { color: var(--pink); }
.cart-items-list { flex: 1; overflow-y: auto; padding: 10px 20px; display: flex; flex-direction: column; gap: 10px; }
.cart-items-list::-webkit-scrollbar { width: 6px; }
.cart-items-list::-webkit-scrollbar-thumb { background: #2a2d35; border-radius: 4px; }
.cart-item { display: flex; align-items: center; background: #1c1e26; border: 1px solid #2a2d35; border-radius: 12px; padding: 15px; gap: 15px; }
.cart-item-img { width: 60px; height: 60px; object-fit: contain; background: rgba(0,0,0,0.2); border-radius: 8px; }
.cart-item-info { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.cart-item-name { font-size: 0.95rem; font-weight: bold; color: #fff; }
.cart-item-price { font-size: 0.9rem; font-weight: 900; color: var(--gold); display: flex; align-items: center; gap: 4px; }
.cart-item-actions { display: flex; align-items: center; gap: 10px; }
.cart-qty { display: flex; align-items: center; background: #0b0c10; border-radius: 6px; padding: 2px; }
.cart-qty button { background: transparent; border: none; color: #fff; width: 24px; height: 24px; cursor: pointer; font-weight: bold; font-size: 1rem; }
.cart-qty span { min-width: 25px; text-align: center; font-weight: bold; font-size: 0.9rem; }
.btn-del-item { background: #2a1215; border: 1px solid #4a1a1f; color: #ff4d4d; width: 32px; height: 32px; border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; transition: 0.2s; }
.btn-del-item:hover { background: #ff4d4d; color: #000; }
.cart-footer-modal { padding: 20px; border-top: 1px solid var(--border); background: #1b1d24; border-radius: 0 0 16px 16px; }
.cart-total { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; font-size: 1rem; }
.cart-total span:last-child { font-size: 1.2rem; font-weight: 900; color: var(--gold); }
.cart-actions { display: flex; gap: 10px; }
.btn-cancel-cart { flex: 1; background: transparent; border: 2px solid var(--border); color: #fff; padding: 12px; border-radius: 8px; font-weight: 700; cursor: pointer; transition: 0.2s; }
.btn-cancel-cart:hover { background: rgba(255,255,255,0.05); }

/* ПРОФИЛЬ (НОВЫЙ ДИЗАЙН) */
.prof-main-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    display: flex;
    padding: 24px;
    gap: 24px;
    width: 100%;
    margin-bottom: 24px;
}
.prof-col-left { flex: 1; display: flex; flex-direction: column; justify-content: space-between; min-width: 220px; }
.prof-col-center { flex: 1.1; display: flex; flex-direction: column; justify-content: space-between; background: #13141a; border-radius: 12px; padding: 20px; border: 1px solid #252830; }
.prof-col-right { flex: 1.5; display: flex; flex-direction: column; gap: 15px; }

.user-header { display: flex; gap: 16px; align-items: center; }
.avatar-large { width: 70px; height: 70px; background: #13141a; border: 2px solid var(--border); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; }
.user-info { display: flex; flex-direction: column; gap: 4px; }
.user-name { font-size: 1.2rem; font-weight: 700; color: #fff; }
.user-id { font-size: 0.75rem; color: var(--text-muted); background: #2a2d35; padding: 4px 8px; border-radius: 6px; display: inline-block; }
.prof-actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.btn-logout { background: transparent; border: 1px solid #3a181c; color: #ff4d4d; padding: 12px; border-radius: 10px; cursor: pointer; font-size: 0.85rem; font-weight: 600; display: flex; align-items: center; gap: 8px; justify-content: center; transition: 0.2s; }
.btn-logout:hover { background: #2a1215; }

.prof-col-center .card-title { font-weight: 700; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 12px; text-transform: uppercase; }
.balance-large { font-size: 2.5rem; font-weight: 900; color: #fff; display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.coupon-wrapper { display: flex; gap: 8px; margin-bottom: 20px; background: #0b0c10; padding: 4px; border-radius: 8px; border: 1px solid var(--border); }
.coupon-wrapper input { flex: 1; background: transparent; border: none; padding: 10px 14px; color: #fff; outline: none; font-size: 0.9rem; }
.coupon-wrapper button { background: #2a2d35; border: none; color: #fff; padding: 0 16px; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 0.85rem; transition: 0.2s; }
.coupon-wrapper button:hover { background: #3a3d45; }
.btn-deposit-large { background: var(--gold); border: none; color: #000; padding: 14px; border-radius: 10px; font-weight: 900; font-size: 1rem; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 8px; transition: 0.2s; }
.btn-deposit-large:hover { background: #ffea00; transform: translateY(-2px); }

.best-drop-box { background: linear-gradient(90deg, #2d2316 0%, #1a1c22 100%); border: 1px solid #4a3a20; border-radius: 12px; padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; justify-content: space-between; }
.best-drop-title { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }
.best-drop-item { display: flex; gap: 12px; align-items: center; }
.best-drop-item img { width: 60px !important; height: 60px !important; object-fit: contain; filter: drop-shadow(0 0 10px rgba(255,215,0,0.3)); }
.best-drop-price { color: var(--gold); font-weight: 900; font-size: 1.4rem; display: flex; align-items: center; gap: 6px; margin-top: 5px; }

.mini-stats-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.mini-stat-box { background: #13141a; border: 1px solid var(--border); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; }
.mini-stat-title { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; margin-bottom: 12px; }
.mini-stat-val { font-weight: 900; color: #fff; display: flex; align-items: center; gap: 10px; }

.profile-inventory-section { background: #1b1d24; border-radius: 16px; width: 100%; overflow: hidden; border: 1px solid var(--border); }
.inv-tabs { display: flex; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); gap: 8px; width: 100%; background: rgba(0,0,0,0.2); }
.inv-tab { background: transparent; border: none; color: var(--text-muted); padding: 10px 16px; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 0.85rem; display: inline-flex; align-items: center; gap: 6px; transition: 0.2s; }
.inv-tab.active { background: rgba(255, 215, 0, 0.15); color: var(--gold); }
.inv-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.btn-sell-all { background: var(--bg-panel); border: 1px solid var(--border); color: var(--text-muted); padding: 10px 20px; border-radius: 8px; font-weight: 700; font-size: 0.85rem; cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; gap: 8px; }
.btn-sell-all:hover { background: #2a2d35; color: #fff; }

@media(max-width: 1000px) {
    .prof-main-card { flex-direction: column; }
    .prof-col-center { padding: 20px; }
}

/* ИСТОРИЯ ИГР (КАК В МАГАЗИНЕ) */
.history-card-shop {
    height: auto !important;
    min-height: 160px;
    padding: 10px !important;
    justify-content: flex-start !important;
}
.history-card-shop .hist-top {
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-bottom: 5px;
    z-index: 2;
}
.history-card-shop .brainrot-img {
    margin-top: 10px;
    height: 60px !important;
    width: 100%;
    object-fit: contain;
}
.history-card-shop .name {
    font-size: 0.75rem !important;
    margin-top: 5px;
}
.history-card-shop .price {
    font-size: 0.9rem !important;
    margin-bottom: 5px;
}
.history-card-shop .hist-base-info {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: auto;
    border-top: 1px solid #2a2d35;
    padding-top: 8px;
}

/* MODAL & DEPOSIT UI */
.modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.85); display:flex; align-items:center; justify-content:center; z-index:500; }
.deposit-modal-box { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 16px; width: 100%; max-width: 540px; height: 85vh; max-height: 850px; display: flex; flex-direction: column; overflow: hidden; }
.deposit-modal-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
.deposit-modal-header h2 { font-size: 1.2rem; font-weight: 800; margin: 0; }
.dep-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.close-modal-btn { font-size: 1.5rem; cursor: pointer; color: var(--text-muted); }
.close-modal-btn:hover { color: #fff; }
.dep-tabs { display: flex; padding: 0 20px; gap: 20px; border-bottom: 1px solid var(--border); flex-shrink: 0;}
.dep-tab { background: transparent; border: none; color: var(--text-muted); font-size: 0.95rem; font-weight: 600; padding: 15px 0; cursor: pointer; border-bottom: 2px solid transparent; display: flex; align-items: center; gap: 6px; }
.dep-tab.active { color: #fff; border-bottom-color: var(--gold); }

#depositSbp { padding: 24px; overflow-y: auto; }
.amount-input-wrapper { position: relative; margin-bottom: 15px; }
.dep-input { width: 100%; background: #0a0c10; border: 1px solid #2a2d35; border-radius: 8px; padding: 15px; color: #fff; font-size: 1.2rem; outline: none; font-weight: bold; }
.dep-input:focus { border-color: var(--gold); }
.min-amount { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); font-size: 0.75rem; color: var(--text-muted); }
.quick-amounts { display: flex; gap: 8px; margin-bottom: 20px; }
.quick-amounts button { flex: 1; background: transparent; border: 1px solid var(--border); color: var(--text-muted); padding: 8px; border-radius: 6px; cursor: pointer; transition: 0.2s; font-weight: 600; font-size: 0.85rem; }
.quick-amounts button.active { border-color: var(--gold); color: var(--gold); }
.terms-row { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--text-main); margin-bottom: 20px; }
.terms-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--gold); cursor: pointer; }

.pay-methods-row { display: flex; gap: 10px; margin-bottom: 20px; }
.pay-method { flex: 1; background: transparent; border: 1px solid var(--border); color: var(--text-muted); padding: 15px 10px; border-radius: 8px; font-weight: 600; cursor: pointer; transition: 0.2s; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.pay-method.active { border-color: var(--gold); color: var(--gold); background: rgba(255,215,0,0.05); }
.pay-icon { height: 30px; object-fit: contain; }
.promo-wrapper { display: flex; gap: 8px; margin-bottom: 20px; }
.promo-wrapper input { flex: 1; background: #0a0c10; border: 1px solid #2a2d35; border-radius: 8px; padding: 12px; color: #fff; outline: none; font-size: 0.9rem; }
.promo-wrapper button { background: #1f2229; border: none; color: var(--text-muted); width: 44px; border-radius: 8px; font-size: 1.2rem; cursor: pointer; }

#depositBrainrots { display: none; flex-direction: column; }
.dep-brainrot-header { padding: 20px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.dep-brainrot-header h3 { margin: 0 0 12px 0; font-size: 1rem; font-weight: 800; }
.dep-search input { width: 100%; background: #0a0c10; border: 1px solid #2a2d35; border-radius: 8px; padding: 12px; color: #fff; outline: none; font-size: 0.9rem; transition: 0.2s;}
.dep-search input:focus { border-color: var(--gold); }
.dep-grid-new { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; overflow-y: auto; padding: 20px; flex: 1; }
.dep-grid-new::-webkit-scrollbar { width: 6px; }
.dep-grid-new::-webkit-scrollbar-thumb { background: #2a2d35; border-radius: 4px; }
.dep-bottom-panel { flex-shrink: 0; background: #1b1d24; border-top: 1px solid var(--border); }
.dep-selected-bar { padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.05); }
.dep-sel-left { display: flex; align-items: center; gap: 15px; }
.dep-sel-left img { width: 45px; height: 45px; object-fit: contain; }
.dep-sel-info { display: flex; flex-direction: column; }
.dep-sel-name { font-size: 0.95rem; font-weight: bold; }
.dep-sel-price { color: var(--gold); font-size: 0.85rem; font-weight: bold; display: flex; align-items: center; gap: 3px; }
.dep-qty-controls { display: flex; align-items: center; background: #0a0c10; border-radius: 8px; padding: 2px; }
.dep-qty-controls button { background: transparent; border: none; color: #fff; width: 30px; height: 30px; font-size: 1.2rem; cursor: pointer; transition: 0.1s; }
.dep-qty-controls button:hover { color: var(--gold); }
.dep-qty-controls span { min-width: 30px; text-align: center; font-weight: bold; font-size: 1rem; }
.dep-inputs-area { padding: 20px; }
.dep-input-group { margin-bottom: 15px; }
.dep-input-group label { display: block; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 5px; font-weight: 600; }
.dep-input-group input { width: 100%; background: #0a0c10; border: 1px solid #2a2d35; border-radius: 8px; padding: 12px; color: #fff; outline: none; transition: 0.2s;}
.dep-input-group input:focus { border-color: var(--gold); }
.dep-hint { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 15px; line-height: 1.4; }
.dep-summary { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 15px; font-weight: bold; }
.dep-summary span:last-child { color: var(--gold); }

/* УЛУЧШЕННАЯ МОДАЛКА ВЫВОДА */
.withdraw-modal-box {
    background: linear-gradient(145deg, #1b1d24, #13151a);
    border: 1px solid var(--gold);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8), 0 0 40px rgba(255,215,0,0.15);
    width: 100%;
    max-width: 550px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    position: relative;
}
.withdraw-item-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0,0,0,0.4);
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 25px;
    border: 1px solid rgba(255,215,0,0.2);
    box-shadow: inset 0 0 20px rgba(255,215,0,0.05);
}
.withdraw-item-preview img:not(.currency-img) {
    width: 140px !important;
    height: 140px !important;
    object-fit: contain;
    margin-bottom: 15px;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
}

/* НАСТРОЙКИ */
.settings-box { background: #16181d; border: 1px solid var(--border); border-radius: 16px; width: 100%; max-width: 550px; display: flex; flex-direction: column; max-height: 90vh; }
.settings-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.settings-header h2 { font-size: 1.1rem; display: flex; align-items: center; gap: 8px; margin: 0; }
.settings-body { padding: 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 24px; }
.settings-section h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 12px; }
.preset-blocks { display: flex; gap: 12px; }
.preset-block { flex: 1; background: #1c1f26; border-radius: 12px; padding: 12px; }
.preset-block p { font-size: 0.7rem; color: var(--text-muted); margin-bottom: 8px; line-height: 1.3; }
.preset-inputs { display: flex; gap: 6px; align-items: center; }
.preset-inputs input { width: 100%; background: #0a0c10; border: 1px solid #2a2d35; color: #fff; padding: 6px; border-radius: 6px; outline: none; text-align: center; font-size: 0.85rem; }
.preset-inputs input:focus { border-color: var(--gold); }
.preset-inputs button { background: transparent; border: none; color: var(--gold); font-size: 1.2rem; cursor: pointer; padding: 4px; }
.radio-row { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; cursor: pointer; }
.radio-row input[type="radio"] { appearance: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #4b5563; background: transparent; cursor: pointer; position: relative; margin-top: 2px; flex-shrink: 0; }
.radio-row input[type="radio"]:checked { border-color: var(--gold); }
.radio-row input[type="radio"]:checked::after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.radio-title { display: block; font-size: 0.9rem; font-weight: 700; margin-bottom: 2px; }
.settings-footer { padding: 20px 24px; border-top: 1px solid var(--border); }
.settings-footer .btn-main-upgrade { padding: 14px; font-size: 1rem; }

.toast { position:fixed; bottom:24px; left:50%; transform:translateX(-50%) translateY(80px); background:var(--bg-panel); border:1px solid var(--border); padding:12px 24px; border-radius:8px; font-weight:600; opacity:0; transition:.3s; pointer-events:none; z-index:600; }
.toast.show { transform:translateX(-50%) translateY(0); opacity:1; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* =====================================================================
   UI v2 — оформление апгрейда по референсу (переопределяет стили выше)
   ===================================================================== */

/* --- шапка: меню слева, лого по центру, баланс справа --- */
header { display: grid; grid-template-columns: 1fr auto 1fr; height: 76px; background: rgba(11,12,16,.78); border-bottom: 1px solid #15171d; backdrop-filter: blur(6px); }
header .header-nav { justify-self: start; }
header .header-left { justify-content: center; }
header .header-right { justify-self: end; }
.header-nav button { padding: 29px 0; }

/* --- ряд маленьких кнопок над слотами --- */
.tool-row { display: flex; gap: 4px; align-self: flex-start; margin: -10px 0 -14px; }
.tool-btn { width: 34px; height: 34px; background: transparent; border: none; border-radius: 8px; color: #8a94a0; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: .2s; }
.tool-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tool-btn:hover { color: #fff; background: #15171d; }
.tool-btn.active { color: var(--gold); }
.tool-btn.muted { color: #5b636d; }

/* --- слоты --- */
.slot-wrapper { align-items: stretch; }
.slot-box { background: #0f1115; border: 1px solid #1f2229; border-radius: 14px; }
.slot-box.active { border-color: #4a3f1c; box-shadow: 0 0 25px rgba(255,215,0,.08); }
.slot-head { position: absolute; top: 18px; left: 0; width: 100%; text-align: center; padding: 0 16px; }
.slot-head .slot-title { position: static; font-size: .95rem; font-weight: 800; color: #fff; }
.slot-sub { font-size: .72rem; color: var(--text-muted); margin-top: 4px; }
.slot-placeholder { opacity: 1; }
.placeholder-icon img { filter: none; }

/* --- колесо --- */
.wheel-container::before { content: ''; position: absolute; inset: -16px; border-radius: 50%; pointer-events: none;
    background: repeating-conic-gradient(from -.4deg, rgba(255,255,255,.22) 0 .8deg, transparent .8deg 6deg);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 calc(100% - 8px));
            mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 calc(100% - 8px)); }
.wheel-ring { box-shadow: none; }
.wheel-inner { background: #0f1115; border: 2px solid #1b1d24; }
.wheel-chevron { position: absolute; width: 150px; height: 150px; color: #fff; opacity: .06; pointer-events: none; }
.wheel-chance { font-size: 3rem; color: #c6f24a; text-shadow: 0 0 22px rgba(198,242,74,.3); }
.wheel-label { color: #9fc24a; }
.marker-bottom { display: none; }
.pointer-arrow { top: -174px; left: -17px; width: 34px; height: 38px; background: linear-gradient(180deg, #fff06a, #ffb020);
    clip-path: polygon(50% 100%, 0 38%, 36% 46%, 36% 0, 64% 0, 64% 46%, 100% 38%); filter: drop-shadow(0 0 6px rgba(255,200,0,.8)); }

/* --- нижний ряд: баланс / кнопка / быстрые пресеты --- */
.controls-layout { grid-template-columns: 1fr 340px 1fr; gap: 40px; max-width: 1160px; }
.left-col .fake-slider { background: #0f1115; border: 1px solid #1f2229; border-radius: 12px; padding: 14px 18px; height: auto; }
.slider-header { margin-bottom: 14px; font-weight: 600; }
.slider-right { display: flex; align-items: center; gap: 10px; }
#sliderBalance { color: #fff; font-weight: 800; font-size: .85rem; }
#maxBalanceLabel { color: var(--text-muted); font-size: .72rem; font-weight: 600; }
.real-slider { height: 6px; background: linear-gradient(to right, var(--gold) var(--fill, 0%), #2a2d35 var(--fill, 0%)); }

.center-col .btn-main-upgrade { height: 54px; padding: 0; font-size: 1.05rem; border-radius: 12px; letter-spacing: .3px; }
.btn-ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.btn-main-upgrade:disabled { opacity: .72; filter: saturate(.7) brightness(.78); }

.right-col .presets-grid { display: flex; flex-wrap: nowrap; gap: 8px; justify-content: flex-end; }
.presets-grid button { width: 46px; height: 44px; padding: 0; border-radius: 10px; background: #16181d; border: 1px solid #1f2229; color: #9aa4ae; font-size: .85rem; }
.presets-grid button.c-low  { border-color: rgba(255,80,90,.45); }
.presets-grid button.c-mid  { border-color: rgba(255,200,0,.40); }
.presets-grid button.c-high { border-color: rgba(0,255,136,.40); }
.presets-grid button.active { color: var(--gold); border-color: var(--gold); }
.presets-grid button.preset-gear { display: flex; align-items: center; justify-content: center; color: #8a94a0; }
.presets-grid button.preset-gear svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.presets-grid button.preset-gear:hover { color: #fff; border-color: #3a3d45; }

/* --- нижние панели --- */
.bottom-split-layout { max-width: 1160px; gap: 8px; height: 520px; }
.panel { background: #16181d; border: 1px solid #1d2027; border-radius: 14px; }
.panel-tabs { background: transparent; border-bottom: none; padding: 12px 14px; gap: 10px; align-items: center; }
.tab-icons { display: flex; gap: 2px; background: #0f1115; border-radius: 10px; padding: 3px; }
.tab-icon-btn { width: 34px; height: 34px; border: none; border-radius: 8px; background: transparent; color: #8a94a0; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: .2s; }
.tab-icon-btn svg, .title-ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tab-icon-btn:hover { color: #fff; }
.tab-icon-btn.active { background: var(--gold); color: #000; }
.panel-title { font-weight: 800; font-size: .95rem; flex: 1; }
.target-title { display: flex; align-items: center; gap: 8px; }
.target-title .title-ico { color: var(--gold); }
.panel-tabs-right, .target-filters { display: flex; gap: 8px; align-items: center; }
.panel-tabs .sort-btn { width: 36px; height: 36px; border-radius: 10px; background: #0f1115; border-color: #1f2229; color: #8a94a0; }
.panel-tabs .sort-btn.active { background: #0f1115; color: #fff; border-color: #1f2229; }
.panel-tabs .sort-btn:hover { border-color: #3a3d45; }
.panel-tabs .sort-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
#btnTargetSearch.active { color: var(--gold); border-color: var(--gold); }
.inv-total { display: flex; align-items: center; gap: 6px; background: #0f1115; border: 1px solid #1f2229; border-radius: 10px; padding: 0 12px; height: 36px; font-size: .75rem; color: var(--text-muted); white-space: nowrap; }
.inv-total #invTotal { color: var(--gold); font-weight: 800; margin-left: 2px; }
.mini-input { display: flex; align-items: center; gap: 6px; background: #0f1115; border: 1px solid #1f2229; border-radius: 10px; padding: 0 12px; height: 36px; width: 76px; }
.mini-input span { font-size: .75rem; color: var(--text-muted); }
.mini-input input { width: 100%; min-width: 0; background: transparent; border: none; outline: none; color: #fff; font-size: .8rem; -moz-appearance: textfield; }
.mini-input input::-webkit-outer-spin-button, .mini-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#targetSearchRow { padding: 0 14px 10px; }
#targetSearchRow input { width: 100%; background: #0f1115; border: 1px solid #1f2229; border-radius: 10px; padding: 10px 14px; color: #fff; outline: none; font-size: .85rem; }
#targetSearchRow input:focus { border-color: var(--gold); }

/* --- карточки: цена сверху справа, название снизу --- */
.grid-container { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.card { height: 116px; border-width: 1.5px; border-radius: 10px; padding: 8px 6px 7px; justify-content: flex-end; }
.card .brainrot-img { height: 62px; margin: 8px 0 4px; }
.card .name { font-weight: 800; font-size: .68rem; color: #fff; }
.card:not(.history-card-shop) .price { position: absolute; top: 7px; right: 8px; font-size: .7rem; }
.card .count-badge { left: 8px; right: auto; }
.card.in-cart .name { margin-bottom: 30px; }

/* --- пустой инвентарь --- */
.empty-inv { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 70px 0 20px; color: #c9d1d9; font-weight: 700; }
.empty-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.btn-yellow-pill, .btn-dark-pill { border-radius: 10px; padding: 12px 18px; font-weight: 800; font-size: .85rem; cursor: pointer; transition: .2s; }
.btn-yellow-pill { background: var(--gold); color: #000; border: none; }
.btn-yellow-pill:hover { background: #ffea00; }
.btn-dark-pill { background: #1f2229; color: #fff; border: 1px solid #2a2d35; }
.btn-dark-pill:hover { background: #2a2d35; }

/* =====================================================================
   UI v3 — шапка как на референсе, стрелки, кейсы, лучи в слотах
   ===================================================================== */

/* --- шапка --- */
header { display: flex; align-items: center; gap: 22px; height: 68px; padding: 0 28px; background: #0b0c10; border-bottom: 1px solid #15171d; backdrop-filter: none; }
header .header-left { justify-content: flex-start; gap: 0; }
.logo { font-size: 1.35rem; letter-spacing: 1px; }
.logo-img { height: 34px; }
.logo-text { background: none; -webkit-text-fill-color: #fff; color: #fff; font-weight: 900; }
.header-stats { display: flex; gap: 18px; margin-left: 4px; }
.stat { display: flex; align-items: center; gap: 8px; color: #8a94a0; }
.stat svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stat-text { display: flex; flex-direction: column; line-height: 1.15; font-size: .72rem; }
.stat-text b { color: #fff; font-size: .85rem; font-weight: 800; }
header .header-nav { gap: 6px; justify-self: auto; margin-left: 6px; }
.header-nav button { padding: 9px 14px; border: none; border-bottom: none; border-radius: 9px; text-transform: none; font-size: .82rem; font-weight: 800; display: flex; align-items: center; gap: 8px; color: #8a94a0; background: transparent; }
.header-nav button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.header-nav button.active { background: #1c1d22; color: var(--gold); border-bottom: none; }
.header-nav button:not(.active):not(:disabled):hover { color: #fff; }
.nav-soon { cursor: default; opacity: .7; }
.nav-soon em { font-style: normal; font-size: .55rem; font-weight: 900; color: #fff; margin-left: -2px; align-self: flex-end; }
header .header-right { margin-left: auto; justify-self: auto; gap: 12px; }
.balance-group { display: flex; border: 1px solid #3a3320; border-radius: 10px; overflow: hidden; background: #111317; }
.balance-pill { border: none; border-radius: 0; background: #111317; padding: 0 14px; height: 40px; display: flex; align-items: center; gap: 8px; font-weight: 800; cursor: pointer; }
.balance-pill svg { width: 14px; height: 14px; fill: none; stroke: #8a94a0; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.btn-deposit { border-radius: 0; height: 40px; padding: 0 16px; display: flex; align-items: center; gap: 8px; font-weight: 900; }
.btn-deposit svg { width: 16px; height: 16px; fill: none; stroke: #000; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn-profile { background: #2a2314; color: var(--gold); border: 1px solid #3a3320; font-weight: 900; font-size: .95rem; }
.btn-profile:hover { background: #3a3018; }

/* --- верхняя часть апгрейда --- */
#upgradeView { max-width: 1160px; }
.page-logo { display: flex; align-items: center; gap: 10px; margin: 18px 0 8px; font-size: 1.25rem; font-weight: 900; letter-spacing: 1px; }
.page-logo-img { height: 30px; }
.tool-row { margin: 0 0 -8px; }
.tool-btn { color: #aeb5bf; }
#fastSpinBtn svg { fill: currentColor; }
.controls-layout { grid-template-columns: 1fr 336px 1fr; gap: 40px; max-width: none; }

/* --- колесо 320px: контур дуги, засечки, толстое кольцо --- */
.wheel-container { width: 320px; height: 320px; }
.wheel-container::before { inset: 7px; -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 7px)); mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 7px)); }
.wheel-outline { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; z-index: 1;
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
            mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px)); }
.wheel-ring { inset: 20px; }
.wheel-inner { inset: 60px; }
.marker-top { top: 13px; } .marker-left { left: 9px; } .marker-right { right: 9px; }
.wheel-chance { font-size: 2.6rem; }
.wheel-chevron { width: 120px; height: 150px; }
.pointer-arrow { top: -150px; left: -14px; width: 28px; height: 54px; background: none; clip-path: none; filter: drop-shadow(0 0 7px rgba(255,170,0,.75)); }
.pointer-arrow svg { display: block; width: 100%; height: 100%; }

/* --- пресеты на всю ширину колонки --- */
.right-col .presets-grid { gap: 5px; justify-content: stretch; }
.presets-grid button { flex: 1; width: auto; min-width: 0; background: #17191f; border: 1px solid transparent; }
.presets-grid button.c-low  { border-color: rgba(255,80,90,.45); }
.presets-grid button.c-mid  { border-color: rgba(255,200,0,.40); }
.presets-grid button.c-high { border-color: rgba(0,255,136,.40); }
.presets-grid button.active { border-color: var(--gold); color: var(--gold); }

/* --- нижние панели: левая по высоте содержимого, правая высокая, 5 колонок --- */
.bottom-split-layout { align-items: flex-start; height: auto; }
.left-panel { max-height: 520px; min-height: 219px; }
.left-panel.shop-mode { height: 520px; }
.right-panel { height: 520px; }
.panel-content { min-height: 0; padding: 4px 12px 12px; }
.panel .grid-container { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.panel .card { height: 108px; }
.panel .card .brainrot-img { height: 56px; margin: 6px 0 4px; }

/* --- стрелки сортировки и пагинации --- */
.sort-btn .ui-icon, .sort-btn .arrow-svg { width: 16px; height: 16px; }
.sort-arrow { transition: transform .25s ease; }
.sort-btn[data-dir="asc"] .sort-arrow { transform: rotate(180deg); }
.arrow-svg { filter: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* --- слоты: картинка в цвете + жёлтые лучи за ней --- */
.slot-box { overflow: hidden; }
.slot-box::before { content: ''; position: absolute; left: 50%; top: 54%; width: 340px; height: 340px; margin: -170px 0 0 -170px; border-radius: 50%; pointer-events: none; opacity: .8;
    background: repeating-conic-gradient(from 0deg, rgba(255,205,0,.30) 0deg 6deg, transparent 6deg 24deg);
    -webkit-mask: radial-gradient(circle, #000 0%, rgba(0,0,0,.6) 35%, transparent 70%);
            mask: radial-gradient(circle, #000 0%, rgba(0,0,0,.6) 35%, transparent 70%);
    animation: slotRays 30s linear infinite; }
.slot-box::after { content: ''; position: absolute; left: 50%; top: 54%; width: 230px; height: 230px; margin: -115px 0 0 -115px; border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle, rgba(255,214,10,.30) 0%, rgba(255,160,0,.10) 45%, transparent 70%); }
.slot-box.active::before { opacity: 1; }
.slot-placeholder, .slot-content { position: relative; z-index: 1; }
.slot-head { z-index: 2; }
@keyframes slotRays { to { transform: rotate(360deg); } }

/* =====================================================================
   КЕЙСЫ: плашки-заголовки категорий и экран открытия кейса
   ===================================================================== */
#casesGrid { display: block; }
.case-section-header { margin: 28px 0 14px; }
#casesGrid > .case-section-header:first-child { margin-top: 4px; }
.case-section-pill { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 22px; border-radius: 12px; border: 1px solid #3a3320;
    background: linear-gradient(90deg, #2a2210 0%, #16181d 55%, #13151a 100%); color: #fff; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; }
.case-icon-left { font-size: 1.3rem; }
.case-title-text { font-size: 1rem; }
.case-section-count { margin-left: auto; background: #0f1115; border: 1px solid #2a2d35; border-radius: 8px; padding: 4px 10px; font-size: .75rem; color: var(--gold); }
.cases-grid-inner { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }

.case-opening-layout { flex-direction: column; gap: 20px; width: 100%; max-width: 1160px; min-width: 0; margin: 0 auto; }
.case-opening-layout > * { min-width: 0; }
.case-open-header { display: flex; align-items: center; gap: 16px; }
.btn-back-case { background: #16181d; border: 1px solid #1f2229; color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 800; cursor: pointer; transition: .2s; }
.btn-back-case:hover { border-color: var(--gold); color: var(--gold); }
.case-title-main { font-size: 1.5rem; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; }
.case-hero { display: flex; justify-content: center; padding: 10px 0; }
.case-hero-img { max-height: 240px; max-width: 100%; object-fit: contain; filter: drop-shadow(0 12px 25px rgba(255,200,0,.25)); }
.case-roulettes-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; width: 100%; }
.case-spin-block { min-width: 0; width: 100%; box-sizing: border-box; background: #0f1115; border: 1px solid #1f2229; border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.case-ticker-wrap { width: 100%; min-width: 0; position: relative; height: 150px; overflow: hidden; border-radius: 10px; background: #0b0c10; }
.case-ticker-track { display: flex; height: 100%; will-change: transform; }
.case-ticker-item { flex: 0 0 120px; width: 120px; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 8px; border-right: 1px solid #16181d; }
.case-ticker-item img { width: 80px; height: 80px; object-fit: contain; }
.case-ticker-item span { font-size: .62rem; font-weight: 700; text-align: center; color: #c9d1d9; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.case-ticker-line { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--gold); transform: translateX(-50%); z-index: 3; box-shadow: 0 0 12px var(--gold); }
.case-ticker-indicator { position: absolute; left: 50%; top: -1px; transform: translateX(-50%); border-left: 9px solid transparent; border-right: 9px solid transparent; border-top: 12px solid var(--gold); z-index: 4; }
.spin-result { align-items: center; gap: 14px; background: #16181d; border: 1px solid #1f2229; border-radius: 12px; padding: 10px 14px; transition: .2s; }
.spin-result img { width: 56px; height: 56px; object-fit: contain; }
.res-info { flex: 1; }
.res-name { font-weight: 800; }
.res-price { color: var(--gold); font-weight: 900; display: flex; align-items: center; gap: 6px; }
.btn-sell-res { background: var(--pink); color: #fff; border: none; border-radius: 8px; padding: 10px 14px; font-weight: 800; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.case-controls-panel { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: #16181d; border: 1px solid #1d2027; border-radius: 14px; padding: 14px; }
.case-qty-tabs, .case-speed-tabs { display: flex; gap: 4px; background: #0f1115; padding: 3px; border-radius: 10px; }
.case-tab { background: transparent; border: none; color: #8a94a0; padding: 10px 16px; border-radius: 8px; font-weight: 800; cursor: pointer; transition: .2s; }
.case-tab:hover { color: #fff; }
.case-tab.active { background: var(--gold); color: #000; }
.btn-open-case-main { margin-left: auto; background: var(--gold); color: #000; border: none; border-radius: 10px; padding: 14px 28px; font-weight: 900; font-size: 1rem; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: .15s; }
.btn-open-case-main:not(:disabled):hover { background: #ffea00; transform: translateY(-2px); }
.btn-open-case-main:disabled { opacity: .5; cursor: not-allowed; }
.case-possible-prizes h3 { font-size: .9rem; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 12px; }

/* =====================================================================
   UI v4 — слоты как на референсе (мягкое жёлтое свечение), указатель-треугольник
   ===================================================================== */
.slot-box::before { width: 270px; height: 270px; margin: -135px 0 0 -135px; opacity: 1; animation: none;
    background: radial-gradient(circle, rgba(255,214,10,.30) 0%, rgba(255,170,0,.12) 38%, transparent 68%);
    -webkit-mask: none; mask: none; }
.slot-box::after { display: none; }
.slot-fallback { width: 84px; height: auto; filter: drop-shadow(0 0 14px rgba(255,200,0,.45)); }
.pointer-arrow { top: -160px; left: -12px; width: 24px; height: 40px; }
#soundBtn:not(.muted) { color: var(--gold); }

/* =====================================================================
   ИСТОРИЯ ИГР: ставка слева → результат справа (как на референсе)
   ===================================================================== */
#profileHistoryList { display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 14px; }
.hg-game { display: flex; align-items: center; gap: 8px; background: #16181d; border: 1px solid #1d2027; border-radius: 16px; padding: 12px; }
.hg-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.hg-card { position: relative; height: 150px; border: 1.5px solid #2a2d35; border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center;
    background: #0f1115 url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 30'><path d='M12 1 23 12v6L12 7 1 18v-6z' fill='%23ffffff' fill-opacity='.05'/><path d='M12 13 23 24v6L12 19 1 30v-6z' fill='%23ffffff' fill-opacity='.05'/></svg>") center / 50% no-repeat; }
.hg-card img { max-width: 84%; max-height: 84%; object-fit: contain; }
.hg-card.rarity-common { border-color: #4b5563; }
.hg-card.rarity-uncommon { border-color: #3b82f6; }
.hg-card.rarity-rare { border-color: #8b5cf6; }
.hg-card.rarity-epic { border-color: #ec4899; }
.hg-card.rarity-legendary { border-color: #f59e0b; }
.hg-card.rarity-secret { border-color: #ef4444; }
.hg-card.rarity-og { border-color: #fff; }
.hg-card.hg-case { border-color: #3a3320; }
.hg-emoji { font-size: 3.6rem; align-items: center; justify-content: center; }
.hg-date { position: absolute; top: 8px; left: 10px; font-size: .6rem; color: var(--text-muted); }
.hg-price { position: absolute; top: 8px; right: 10px; font-size: .72rem; font-weight: 800; color: var(--gold); display: flex; align-items: center; gap: 4px; }
.hg-badge { position: absolute; left: 10px; bottom: 10px; padding: 5px 10px; border-radius: 7px; font-size: .7rem; font-weight: 800; }
.hg-badge.win  { background: rgba(0,255,136,.12); color: var(--green); border: 1px solid rgba(0,255,136,.3); }
.hg-badge.lose { background: rgba(255,80,90,.12); color: var(--pink);  border: 1px solid rgba(255,80,90,.3); }
.hg-badge.comp { background: rgba(255,200,0,.12); color: var(--gold);  border: 1px solid rgba(255,200,0,.3); }
.hg-comp { position: absolute; right: 8px; bottom: 8px; width: 52px; height: 52px; padding: 4px; background: #0f1115; border: 1px solid #2a2d35; border-radius: 10px; transform: rotate(8deg); }
.hg-chev { width: 22px; display: flex; justify-content: center; color: #6b7280; }
.hg-chev svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.hg-stat { display: flex; flex-direction: column; align-items: center; gap: 4px; background: #0f1115; border: 1px solid #1f2229; border-radius: 10px; padding: 9px 12px; font-size: .72rem; color: var(--text-muted); }
.hg-stat b { color: #fff; display: flex; align-items: center; gap: 6px; font-size: .95rem; }
.hg-stat b.gold { color: var(--gold); }
.hg-stat b.pos  { color: var(--green); }
.hg-stat b.neg  { color: var(--pink); }

/* =====================================================================
   ПРОФИЛЬ (как на референсе) и пагинация истории
   ===================================================================== */
#profileView { max-width: 1180px !important; margin: 0 auto; align-items: stretch !important; padding: 28px 16px !important; }
.prof-main-card { gap: 12px; padding: 12px; border-radius: 26px; border: 1px solid #3a3a3e; background: linear-gradient(145deg, #2c2c2f 0%, #1d1d20 100%); box-shadow: 0 20px 50px rgba(0,0,0,.45); }
.prof-col-left, .prof-col-center, .mini-stat-box { background: #232326; border: 1px solid #2f2f33; border-radius: 18px; padding: 22px; }
.prof-col-left { flex: 1; justify-content: space-between; }
.prof-col-center { flex: 1.15; justify-content: flex-start; gap: 0; }
.prof-col-right { flex: 1.5; gap: 12px; }

.user-header { gap: 14px; align-items: flex-start; }
.avatar-large { width: 72px; height: 72px; border-radius: 16px; border: 3px solid #fff; background: #0b0c10; overflow: hidden; flex-shrink: 0; font-size: 2rem; }
.avatar-large img { width: 100%; height: 100%; object-fit: cover; }
.avatar-letter { width: 100%; height: 100%; align-items: center; justify-content: center; font-size: 2rem; font-weight: 900; color: var(--gold); }
.user-name { font-size: .95rem; font-weight: 700; margin-top: 6px; }
.user-id-row { display: flex; align-items: center; gap: 8px; }
.user-id { background: transparent; border: 1px solid #3a3a3e; padding: 3px 8px; font-size: .7rem; }
.icon-btn { width: 24px; height: 24px; padding: 0; background: transparent; border: none; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: .9; transition: .2s; }
.icon-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { color: var(--gold); opacity: 1; }
.btn-notif { width: 100%; background: #2d2d31; border: none; color: #fff; padding: 14px; border-radius: 12px; font-weight: 700; font-size: .85rem; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: .2s; }
.btn-notif:hover { background: #38383d; }
.btn-notif svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.bal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.prof-col-center .card-title { color: #fff; font-size: .95rem; text-transform: none; margin: 0; }
.bal-ico { color: #6b6b72; display: flex; }
.bal-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.balance-large { font-size: 2.3rem; margin-bottom: 18px; }
.balance-large .currency-img { width: 30px; height: 30px; }
.coupon-wrapper { align-items: center; gap: 10px; padding: 8px; border: 1.5px dashed #3a3a3e; background: transparent; border-radius: 12px; margin-bottom: 14px; }
.coupon-ico { width: 40px; height: 40px; border-radius: 10px; background: linear-gradient(135deg, var(--gold), #ffb300); color: #000; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.coupon-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.coupon-wrapper input { min-width: 0; padding: 8px 4px; }
.coupon-wrapper button { height: 40px; background: #3a3a3e; border-radius: 10px; }
.btn-deposit-large { border-radius: 12px; margin-top: auto; }
.btn-deposit-large svg { width: 18px; height: 18px; fill: none; stroke: #000; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.best-drop-box { flex-direction: row; align-items: stretch; justify-content: space-between; gap: 12px; min-height: 150px; padding: 20px 22px; border-radius: 18px; border: 1px solid #4a3a20;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 80'><path d='M30 2 58 28v14L30 16 2 42V28z' fill='%23ff9f1a' fill-opacity='.55'/><path d='M30 30 58 56v14L30 44 2 70V56z' fill='%23ff9f1a' fill-opacity='.9'/></svg>") right 18px center / 110px auto no-repeat, linear-gradient(100deg, #1f1c16 0%, #3a2a12 100%); }
.best-drop-text { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.best-drop-title { font-size: .85rem; color: #a0a0a8; }
.best-drop-name { font-size: 1.05rem; font-weight: 800; color: #fff; }
.best-drop-price { margin-top: 0; font-size: 1.15rem; }
.best-drop-art { flex: 1; display: flex; align-items: center; justify-content: center; min-width: 0; }
.best-drop-art img { width: 120px !important; height: 120px !important; object-fit: contain; filter: drop-shadow(0 0 18px rgba(255,170,0,.4)); }
.best-drop-empty { font-size: 3rem; opacity: .5; }

.mini-stats-row { gap: 12px; }
.mini-stat-box { padding: 18px 20px; gap: 14px; }
.mini-stat-head { display: flex; justify-content: space-between; align-items: center; }
.mini-stat-title { font-size: .95rem; font-weight: 800; color: #fff; margin: 0; }
.mini-ico { width: 34px; height: 34px; border-radius: 10px; background: #2f2f34; color: #b8b8c0; display: flex; align-items: center; justify-content: center; }
.mini-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.mini-stat-body { display: flex; flex-direction: column; gap: 4px; }
.mini-stat-sub { font-size: .85rem; color: #9a9aa2; }
.mini-stat-num { font-size: 1.35rem; font-weight: 900; display: flex; align-items: center; gap: 6px; }
.mini-stat-num.gold { color: var(--gold); }
.spin-chev svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; display: block; }

.profile-inventory-section { border-radius: 22px; background: #16181d; border: 1px solid #23252c; }
.inv-tabs { padding: 14px 18px; background: transparent; border-bottom: 1px solid #23252c; }
.inv-tab { padding: 10px 18px; border-radius: 10px; }
.inv-tab.active { background: #3a2f14; color: var(--gold); }
.tab-svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.history-pager { justify-content: center; align-items: center; margin-top: 18px; gap: 10px; }
.history-pager #historyPageInfo { min-width: 36px; height: 36px; padding: 0 10px; display: flex; align-items: center; justify-content: center; background: #15171d; border: 1px solid #252830; border-radius: 8px; font-weight: 800; font-size: .9rem; }

.mini-stat-box { padding: 16px 16px; }
.mini-stat-title { font-size: .85rem; }
.mini-ico { width: 30px; height: 30px; flex-shrink: 0; }

/* =====================================================================
   v5: категория в карточках, мультивыбор в апгрейде, бесплатные кейсы,
   результат кейса, Color Dice
   ===================================================================== */

/* --- карточки: «★ BRAINROT» над названием --- */
.card .cat { width: 100%; font-size: .52rem; font-weight: 700; color: #8a94a0; line-height: 1; margin-bottom: 2px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel .card { height: 116px; }
.panel .card .brainrot-img { height: 52px; margin: 8px 0 4px; }
.card.in-cart .name { margin-bottom: 0; }   /* картинка в магазине больше не «уезжает» вверх */
.sel-badge { position: absolute; bottom: 6px; right: 8px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--gold); color: #000; font-size: .65rem; font-weight: 900; display: flex; align-items: center; justify-content: center; z-index: 2; }

/* --- несколько предметов в левом слоте (2 — в две колонки, 3–6 — сетка 3×2) --- */
.slot-content.multi { width: 100%; height: calc(100% - 52px); margin-top: 52px; padding: 0 10px 10px; justify-content: flex-start; gap: 8px; }
.multi-grid { display: grid; gap: 6px; width: 100%; flex: 1; min-height: 0; }
.multi-grid.n2 { grid-template-columns: 1fr 1fr; }
.multi-grid.n3 { grid-template-columns: repeat(3, 1fr); }
.multi-grid.n4, .multi-grid.n5, .multi-grid.n6 { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, minmax(0, 1fr)); }
.multi-tile { position: relative; min-width: 0; min-height: 0; border-radius: 8px; overflow: hidden; border-top: 3px solid var(--gold); cursor: pointer; transition: filter .15s;
    background: linear-gradient(180deg, #a8923a 0%, #5b4d1c 45%, #15130a 100%); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 4px 3px; }
.multi-tile:hover { filter: brightness(1.2); }
.multi-tile img { flex: 1; min-height: 0; max-width: 90%; object-fit: contain; }
.tile-name { width: 100%; font-size: .55rem; font-weight: 900; color: #ffd84a; text-transform: uppercase; text-align: center; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tile-price { font-size: .58rem; color: #fff; font-weight: 800; display: flex; align-items: center; gap: 3px; margin-top: 1px; }
.multi-grid.n2 .tile-name { font-size: .8rem; margin-top: 4px; }
.multi-grid.n2 .tile-price { font-size: .8rem; }
.multi-total { font-weight: 900; color: #fff; display: flex; align-items: center; gap: 6px; font-size: .95rem; }

/* --- бесплатные кейсы --- */
.case-price-tag.free { color: var(--green); font-weight: 900; }
.case-price-tag.free.cooldown { color: var(--text-muted); }

/* --- результат кейса: просто кнопка «Продать за …» --- */
.spin-result { padding: 0; background: transparent; border: none; }
.btn-sell-wide { width: 100%; justify-content: center; padding: 15px; font-size: .95rem; border-radius: 12px; }
.res-coin { width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 14px; border-radius: 12px; background: rgba(0,255,136,.10); border: 1px solid rgba(0,255,136,.3); color: var(--green); font-weight: 800; }

/* --- история: ставка из нескольких предметов --- */
.hg-card.hg-multi { display: grid; gap: 4px; padding: 26px 8px 8px; align-content: center; justify-items: center; align-items: center; }
.hg-multi.n2 { grid-template-columns: 1fr 1fr; }
.hg-multi.n3, .hg-multi.n4, .hg-multi.n5, .hg-multi.n6 { grid-template-columns: repeat(3, 1fr); }
.hg-multi img { max-width: 100%; max-height: 54px; }

/* --- Color Dice --- */
#diceView { max-width: 1160px; width: 100%; flex-direction: column; gap: 18px; padding-top: 26px; }
.dice-head h2 { font-size: 1.6rem; font-weight: 900; letter-spacing: 1px; margin-bottom: 6px; }
.dice-head p { color: var(--text-muted); font-size: .85rem; max-width: 760px; line-height: 1.5; }
.dice-layout { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: stretch; }
.dice-stake-box { position: relative; overflow: hidden; background: #0f1115; border: 1px solid #1f2229; border-radius: 14px; min-height: 330px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 18px; }
.dice-stake-box::before { content: ''; position: absolute; left: 50%; top: 45%; width: 270px; height: 270px; margin: -135px 0 0 -135px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, rgba(255,214,10,.28) 0%, rgba(255,170,0,.10) 40%, transparent 68%); }
.dice-stake-box > * { position: relative; z-index: 1; }
.dice-stake-empty { text-align: center; font-weight: 800; color: #c9d1d9; line-height: 1.6; }
.dice-stake-empty span { font-weight: 600; font-size: .8rem; color: var(--text-muted); }
.dice-stake-card { width: 150px; height: 170px; border: 1.5px solid #2a2d35; border-radius: 12px; background: #0f1115; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 8px; gap: 2px; position: relative; }
.dice-stake-card img { width: 90px; height: 90px; object-fit: contain; margin-bottom: auto; }
.dice-stake-card .name { font-size: .78rem; font-weight: 800; text-align: center; }
.dice-stake-card .price { color: var(--gold); font-weight: 800; font-size: .8rem; display: flex; align-items: center; gap: 4px; }
.dice-stake-hint { font-size: .72rem; color: var(--text-muted); text-align: center; max-width: 220px; }
.dice-board { background: #16181d; border: 1px solid #1d2027; border-radius: 14px; padding: 22px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.dice-cubes { display: flex; gap: 22px; margin: 8px 0 2px; }
.die { width: 92px; height: 92px; border-radius: 20px; background: var(--c, #3a3d45); transition: transform .2s, box-shadow .2s, opacity .2s;
    box-shadow: inset 0 -8px 0 rgba(0,0,0,.28), inset 0 6px 0 rgba(255,255,255,.22), 0 10px 24px rgba(0,0,0,.45); }
.die.rolling { animation: dieShake .18s infinite; }
.die.match { transform: scale(1.12); box-shadow: 0 0 0 4px #fff, 0 0 30px var(--c); }
.die.miss { opacity: .5; }
@keyframes dieShake { 0% { transform: rotate(-9deg) translateY(0); } 50% { transform: rotate(9deg) translateY(-10px); } 100% { transform: rotate(-9deg) translateY(0); } }
.dice-result { min-height: 26px; font-weight: 800; text-align: center; color: var(--text-muted); }
.dice-result.win { color: var(--green); }
.dice-result.lose { color: var(--pink); }
.dice-colors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; max-width: 540px; }
.dice-color { display: flex; align-items: center; gap: 10px; background: #0f1115; border: 1.5px solid #1f2229; color: #c9d1d9; padding: 12px; border-radius: 12px; font-weight: 800; font-size: .85rem; cursor: pointer; transition: .15s; }
.dice-color i { width: 18px; height: 18px; border-radius: 6px; background: var(--c); flex-shrink: 0; }
.dice-color:hover:not(:disabled) { border-color: var(--c); }
.dice-color.active { border-color: var(--c); color: #fff; box-shadow: inset 0 0 0 1px var(--c), 0 0 16px rgba(255,255,255,.08); }
.dice-color:disabled { opacity: .6; cursor: default; }
.dice-info { color: var(--text-muted); font-size: .85rem; }
.dice-info b { color: var(--gold); }
.dice-board .btn-main-upgrade { width: 100%; max-width: 540px; height: 54px; border-radius: 12px; font-size: 1.05rem; }
.dice-inv { max-height: 520px; flex: none; }
@media (max-width: 900px) { .dice-layout { grid-template-columns: 1fr; } }

.panel .card .price { white-space: nowrap; font-size: .66rem; }

#diceView > * { width: 100%; box-sizing: border-box; }
.dice-stake-card .cat { font-size: .6rem; font-weight: 700; color: #8a94a0; }
.dice-inv .panel-content { padding: 4px 14px 14px; }

/* =====================================================================
   v6: предмет в слоте (категория + имя сверху), карточки-плитки, корзина
   ===================================================================== */
/* один предмет в слоте: «★ BRAINROT» и крупное имя сверху, картинка по центру, цена снизу */
.slot-box.has-item .slot-head { display: none; }
.slot-box.has-item .slot-content:not(.multi) { position: absolute; inset: 0; margin: 0; padding: 20px 18px 22px; justify-content: space-between; gap: 6px; }
.slot-item-head { width: 100%; text-align: center; }
.slot-cat { font-size: .78rem; font-weight: 600; color: #9aa1ab; margin-bottom: 4px; }
.slot-name { font-family: 'Montserrat', 'Segoe UI', system-ui, sans-serif; font-size: 1.35rem; font-weight: 800; line-height: 1.15; color: #fff; letter-spacing: -.2px;
    overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.slot-box.has-item .slot-img { width: 150px; height: 150px; margin: 0; }
.slot-box.has-item .item-price { font-family: 'Montserrat', 'Segoe UI', system-ui, sans-serif; font-size: 1.25rem; font-weight: 800; display: flex; align-items: center; gap: 6px; }

/* несколько предметов: плитки как карточки магазина (без жёлтого фона) */
.multi-tile { background: #0f1115; border: 1.5px solid #2a2d35; border-top-width: 1.5px; border-radius: 10px; justify-content: flex-end; padding: 16px 4px 5px; }
.multi-tile.rarity-common { border-color: #4b5563; }
.multi-tile.rarity-uncommon { border-color: #3b82f6; }
.multi-tile.rarity-rare { border-color: #8b5cf6; }
.multi-tile.rarity-epic { border-color: #ec4899; }
.multi-tile.rarity-legendary { border-color: #f59e0b; }
.multi-tile.rarity-secret { border-color: #ef4444; }
.multi-tile.rarity-og { border-color: #fff; }
.multi-tile:hover { filter: brightness(1.15); }
.multi-tile .tile-price { position: absolute; top: 4px; right: 6px; color: var(--gold); font-size: .55rem; font-weight: 800; margin: 0; }
.tile-cat { font-size: .45rem; font-weight: 700; color: #8a94a0; line-height: 1; margin-top: 2px; }
.tile-name { color: #fff; text-transform: none; font-family: 'Montserrat', 'Segoe UI', system-ui, sans-serif; font-weight: 800; }
.multi-grid.n2 .tile-price { font-size: .7rem; top: 6px; right: 8px; }
.multi-grid.n2 .tile-cat { font-size: .55rem; }
.multi-grid.n2 .tile-name { font-size: .78rem; }

/* корзина: аккуратная плашка «− 1 +» с круглыми кнопками */
.cart-controls { left: 6px; right: 6px; bottom: 6px; height: 30px; padding: 0 4px; border-radius: 999px; background: var(--gold); box-shadow: 0 4px 12px rgba(0,0,0,.35); }
.cart-controls button { width: 22px; height: 22px; border-radius: 50%; background: #111; color: var(--gold); padding: 0; }
.cart-controls button:hover { background: #000; transform: scale(1.06); }
.cart-controls button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
.cart-controls .qty { font-family: 'Montserrat', 'Segoe UI', system-ui, sans-serif; font-size: .95rem; font-weight: 800; color: #000; }
.card.in-cart { background: linear-gradient(180deg, rgba(255,215,0,.16) 0%, rgba(255,215,0,.04) 60%, #0f1115 100%); }

/* =====================================================================
   v7: слоты по ширине, крестик и «карточный» фон у выбранного предмета,
   пагинация инвентаря, магазин, корзина
   ===================================================================== */
/* слоты занимают колонки над ползунком и пресетами, колесо — над кнопкой */
.upgrade-area { display: grid; grid-template-columns: 1fr 336px 1fr; gap: 40px; width: 100%; max-width: 1160px; align-items: center; }
.upgrade-area .slot-wrapper { width: 100%; }
.slot-box { width: 100%; height: 345px; }
.wheel-section { display: flex; justify-content: center; }

/* выбранный предмет: тёплый фон, крестик в углу, крупнее картинка и имя */
.slot-box.has-item { background: linear-gradient(160deg, #3a3122 0%, #24211c 55%, #1a1a1d 100%); border-color: #3a3426; }
.slot-box.has-item::before { opacity: 0; }
.slot-box.has-item .slot-content:not(.multi) { padding: 26px 22px 26px; }
.slot-box.has-item .slot-img { width: 210px; height: 190px; }
.slot-box.has-item .slot-name { font-size: 1.5rem; }
.slot-box.has-item .slot-cat { font-size: .8rem; }
.slot-box.has-item .item-price { font-size: 1.3rem; }
.slot-close { position: absolute; top: 12px; right: 12px; z-index: 5; width: 32px; height: 32px; border-radius: 50%; border: none; cursor: pointer;
    background: rgba(255,255,255,.08); color: #b8bcc4; display: none; align-items: center; justify-content: center; transition: .15s; }
.slot-close:hover { background: rgba(255,255,255,.16); color: #fff; }
.slot-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.slot-box.active .slot-close { display: flex; }
.slot-content.multi { margin-top: 56px; height: calc(100% - 56px); }

/* инвентарь: 5 в ряд × 4 ряда на страницу, стрелки по центру снизу */
.left-panel { max-height: none; }
.left-panel.shop-mode, .right-panel { height: 612px; }
#inventoryGrid { overflow: visible; flex: none; }
.inv-pager { justify-content: center; align-items: center; gap: 10px; padding: 2px 0 14px; }
.inv-pager #invPageInfo { min-width: 54px; height: 36px; padding: 0 10px; display: flex; align-items: center; justify-content: center; background: #15171d; border: 1px solid #252830; border-radius: 8px; font-weight: 800; font-size: .85rem; }

/* магазин: мусорка рядом с кнопкой покупки */
.shop-bottom-right { display: flex; align-items: center; gap: 8px; }
.shop-bottom-right .btn-trash-cart { height: 40px; width: 40px; }

/* корзина как на референсе */
.cart-item { background: #1f2023; border: 1px solid #2a2b30; border-radius: 14px; padding: 16px 18px; gap: 18px; }
.cart-item-img { width: 96px; height: 64px; background: transparent; }
.cart-item-cat { font-size: .72rem; color: #9aa1ab; font-weight: 600; }
.cart-item-name { font-family: 'Montserrat', 'Segoe UI', system-ui, sans-serif; font-size: 1rem; font-weight: 800; }
.cart-item-price { font-family: 'Montserrat', 'Segoe UI', system-ui, sans-serif; font-size: 1.05rem; font-weight: 800; white-space: nowrap; }
.btn-del-item { width: 40px; height: 40px; border-radius: 10px; background: transparent; border: 1.5px solid #4a4c52; color: #d0d3d9; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: .15s; }
.btn-del-item:hover { border-color: var(--pink); color: var(--pink); }
.btn-del-item svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cart-footer-modal { background: #17181b; }
.cart-total { font-weight: 800; margin-bottom: 16px; }
.cart-actions { justify-content: center; gap: 8px; }
.btn-cancel-cart { flex: 0 0 124px; height: 48px; padding: 0; border: 1.5px solid var(--gold); color: var(--gold); border-radius: 10px; font-size: 1rem; }
.btn-cancel-cart:hover { background: rgba(255,215,0,.08); }
.btn-buy-cart { flex: 0 1 242px; height: 48px; border: none; border-radius: 10px; background: var(--gold); color: #000; font-weight: 800; font-size: 1.05rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 6px; box-shadow: 0 6px 20px rgba(255,200,0,.25); transition: .15s; }
.btn-buy-cart:not(:disabled):hover { background: #ffea00; transform: translateY(-1px); }
.btn-buy-cart:disabled { background: #2a2d35; color: #6b8794; box-shadow: none; cursor: not-allowed; }

/* --- Color Dice: 4 кубика + таблица исходов --- */
.dice-layout { grid-template-columns: 280px 1fr 230px; }
.dice-cubes { gap: 16px; }
.die { width: 84px; height: 84px; }
.dice-result.reroll { color: var(--gold); }
.dice-table-box { background: #16181d; border: 1px solid #1d2027; border-radius: 14px; padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; }
.dice-table-title { font-weight: 900; font-size: .95rem; }
.dice-table { display: flex; flex-direction: column; gap: 6px; }
.dt-head { display: flex; justify-content: space-between; font-size: .7rem; color: var(--text-muted); padding: 0 12px; text-transform: uppercase; letter-spacing: .5px; }
.dt-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 10px; background: #0f1115; border: 1.5px solid #1f2229; font-weight: 700; transition: .2s; }
.dt-row span { color: #c9d1d9; }
.dt-row.win b { color: var(--green); }
.dt-row.lose b { color: var(--pink); }
.dt-row.reroll b { color: var(--gold); }
.dt-row.hit { border-color: currentColor; transform: scale(1.03); box-shadow: 0 0 14px rgba(255,255,255,.08); }
.dt-row.win.hit { border-color: var(--green); background: rgba(0,255,136,.08); }
.dt-row.lose.hit { border-color: var(--pink); background: rgba(255,80,90,.08); }
.dt-row.reroll.hit { border-color: var(--gold); background: rgba(255,200,0,.08); }
.dt-note { margin-top: 4px; border-style: dashed; }
.dt-note span { font-size: .8rem; }
@media (max-width: 1100px) { .dice-layout { grid-template-columns: 1fr 1fr; } .dice-table-box { grid-column: 1 / -1; } }

.dt-note span { white-space: nowrap; }
.die.match { transform: scale(1.06); }

/* =====================================================================
   v9: анимация «Лучшего дропа», мини-игра «Ракета»
   ===================================================================== */
/* --- Лучший дроп: каждые 5 секунд стрелки «улетают» вверх и возвращаются снизу, по плашке проходит блик --- */
.best-drop-box { position: relative; overflow: hidden; background: linear-gradient(100deg, #1f1c16 0%, #3a2a12 100%); }
.best-drop-box > *:not(.bd-chev) { position: relative; z-index: 1; }
.bd-chev { position: absolute; right: 18px; top: 0; bottom: 0; width: 110px; display: flex; align-items: center; pointer-events: none; z-index: 0; }
.bd-chev svg { width: 110px; height: auto; overflow: visible; }
.bd-chev path { fill: #ff9f1a; transform-box: fill-box; transform-origin: center; animation: bdRise 5s cubic-bezier(.55, 0, .3, 1) infinite; }
.bd-chev .c1 { opacity: .55; animation-delay: .12s; }
.bd-chev .c2 { opacity: .9; }
@keyframes bdRise {
    0%, 70%   { transform: translateY(0);     opacity: var(--o, 1); }
    80%       { transform: translateY(-140%); opacity: 0; }
    80.1%     { transform: translateY(140%);  opacity: 0; }
    94%, 100% { transform: translateY(0);     opacity: var(--o, 1); }
}
.bd-chev .c1 { --o: .55; }
.bd-chev .c2 { --o: .9; }
.best-drop-box::after { content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; pointer-events: none; z-index: 2;
    background: linear-gradient(100deg, transparent 0%, rgba(255,220,140,.14) 50%, transparent 100%); transform: skewX(-18deg); animation: bdShine 5s ease-in-out infinite; }
@keyframes bdShine { 0%, 66% { left: -60%; } 86%, 100% { left: 130%; } }
.best-drop-art img { animation: bdFloat 5s ease-in-out infinite; }
@keyframes bdFloat { 0%, 66%, 100% { transform: translateY(0) scale(1); } 76% { transform: translateY(-8px) scale(1.05); } 88% { transform: translateY(0) scale(1); } }

/* --- Ракета --- */
#rocketView { max-width: 1160px; width: 100%; flex-direction: column; gap: 18px; padding-top: 26px; }
#rocketView > * { width: 100%; box-sizing: border-box; }
.rocket-layout { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: stretch; }
.rocket-side { background: #16181d; border: 1px solid #1d2027; border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.rocket-stake { flex: 1; min-height: 220px; background: #0f1115; border: 1.5px solid #1f2229; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; justify-content: center; gap: 10px; transition: box-shadow .25s, border-color .25s; }
.rocket-stake.cashed { border-color: var(--green); box-shadow: 0 0 0 2px var(--green), 0 0 22px rgba(0,255,136,.3); }
.rocket-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.rocket-tiles .multi-tile { height: 96px; }
.rocket-tiles .multi-tile img { max-height: 46px; }
.rocket-stake-total { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; background: #16181d; border-radius: 10px; font-size: .8rem; color: var(--text-muted); }
.rocket-stake-total b { color: #fff; display: flex; align-items: center; gap: 5px; font-size: .95rem; }
.rocket-auto { display: flex; align-items: center; gap: 10px; }
.rocket-auto-label { font-size: .85rem; font-weight: 700; color: #c9d1d9; flex: 1; }
.rocket-auto-input { width: 96px; }
.rocket-switch { position: relative; width: 40px; height: 22px; flex-shrink: 0; cursor: pointer; }
.rocket-switch input { display: none; }
.rocket-switch span { position: absolute; inset: 0; background: #2a2d35; border-radius: 11px; transition: .2s; }
.rocket-switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #8a94a0; transition: .2s; }
.rocket-switch input:checked + span { background: rgba(255,215,0,.25); }
.rocket-switch input:checked + span::after { left: 21px; background: var(--gold); }
.rocket-btn { width: 100%; height: 54px; border-radius: 12px; font-size: 1.05rem; }
.rocket-btn.cashout { background: var(--green); color: #00140a; box-shadow: 0 6px 22px rgba(0,255,136,.3); }
.rocket-btn.cashout:hover { filter: brightness(1.08); }
.rocket-potential { min-height: 20px; text-align: center; font-size: .85rem; color: var(--text-muted); }
.rocket-potential b { color: #fff; display: inline-flex; align-items: center; gap: 4px; }
.rocket-potential b.pos { color: var(--green); }
.rocket-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rocket-stage { position: relative; height: 380px; border-radius: 14px; overflow: hidden; border: 1.5px solid #1f2229; transition: box-shadow .25s, border-color .25s;
    background: radial-gradient(ellipse at 30% 110%, rgba(255,170,0,.10) 0%, transparent 55%), linear-gradient(180deg, #0b0d1a 0%, #121528 60%, #17112a 100%); }
.rocket-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.rocket-stage.cashed { border-color: var(--green); box-shadow: 0 0 0 2px var(--green), 0 0 30px rgba(0,255,136,.35); }
.rocket-stage.crashed:not(.cashed) { border-color: rgba(239,68,68,.6); }
.rocket-history { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 4px; }
.rh-chip { flex-shrink: 0; padding: 6px 10px; border-radius: 8px; font-family: 'Montserrat', 'Segoe UI', system-ui, sans-serif; font-size: .78rem; font-weight: 800; background: #16181d; border: 1px solid #23252c; }
.rh-chip.low { color: #f87171; }
.rh-chip.mid { color: var(--green); }
.rh-chip.high { color: var(--gold); border-color: rgba(255,200,0,.4); }
.rh-empty { font-size: .8rem; color: var(--text-muted); padding: 6px 2px; }
.hg-card.hg-rocket { flex-direction: column; background: radial-gradient(ellipse at 50% 120%, rgba(255,170,0,.12), transparent 60%), #0f1115; }
.hg-card.hg-rocket.win { border-color: var(--green); }
.hg-card.hg-rocket.lose { border-color: rgba(239,68,68,.6); }
.hg-mult { font-family: 'Montserrat', 'Segoe UI', system-ui, sans-serif; font-size: 2rem; font-weight: 900; }
.hg-rocket.win .hg-mult { color: var(--green); }
.hg-rocket.lose .hg-mult { color: #ef4444; }
.hg-rocket .hg-price { color: var(--text-muted); font-size: .65rem; }
#navRocket svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 900px) { .rocket-layout { grid-template-columns: 1fr; } }

.rocket-btn.cashout:not(:disabled):hover { background: #3dffa3; }

/* =====================================================================
   v10: квадратные карточки и пустые ячейки, крупнее предмет в слоте,
   анимация победы, кэшбек
   ===================================================================== */
/* квадратные карточки */
.panel .card, .profile-inventory-section .card { height: auto; aspect-ratio: 1 / 1; }
.panel .card .brainrot-img, .profile-inventory-section .card .brainrot-img { height: 46px; margin: 4px 0 3px; }
/* пустые ячейки инвентаря */
.card-empty { aspect-ratio: 1 / 1; border-radius: 10px; background: #121418; border: 1.5px solid #1c1f25; display: flex; align-items: center; justify-content: center; }
.card-empty svg { width: 42%; height: 42%; fill: none; stroke: #fff; stroke-width: 1.4; opacity: .06; }
#inventoryGrid { align-content: start; }

/* крупнее картинка выбранного предмета */
.slot-box.has-item .slot-content:not(.multi) { padding: 22px 22px 20px; }
.slot-box.has-item .slot-img { width: 250px; height: 205px; object-fit: contain; }
.multi-grid.n2 .multi-tile img { max-height: 120px; }

/* анимация победы: зелёный «апгрейд» с картинкой выигранного предмета */
.slot-fx { position: absolute; inset: 0; z-index: 6; border-radius: 14px; overflow: hidden; pointer-events: none; opacity: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    background: radial-gradient(circle at 50% 46%, rgba(0,255,136,.35) 0%, rgba(0,255,136,.10) 45%, rgba(10,14,12,.95) 78%); box-shadow: inset 0 0 0 2px var(--green), 0 0 40px rgba(0,255,136,.35); }
.slot-fx.show { animation: fxShow 3s ease forwards; }
@keyframes fxShow { 0% { opacity: 0; } 8% { opacity: 1; } 82% { opacity: 1; } 100% { opacity: 0; } }
.fx-rays { position: absolute; left: 50%; top: 46%; width: 420px; height: 420px; margin: -210px 0 0 -210px; border-radius: 50%;
    background: repeating-conic-gradient(rgba(0,255,136,.22) 0deg 8deg, transparent 8deg 24deg); -webkit-mask: radial-gradient(circle, #000 0%, transparent 65%); mask: radial-gradient(circle, #000 0%, transparent 65%);
    animation: fxSpin 6s linear infinite; }
@keyframes fxSpin { to { transform: rotate(360deg); } }
.fx-label { position: relative; font-family: 'Montserrat', 'Segoe UI', system-ui, sans-serif; font-weight: 900; font-size: 1.05rem; letter-spacing: 3px; color: var(--green); text-shadow: 0 0 14px rgba(0,255,136,.7); }
.fx-img { position: relative; width: 210px; height: 180px; object-fit: contain; filter: drop-shadow(0 0 22px rgba(0,255,136,.6)); }
.slot-fx.show .fx-img { animation: fxPop .7s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes fxPop { from { transform: scale(.3) translateY(30px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }
.fx-name { position: relative; font-family: 'Montserrat', 'Segoe UI', system-ui, sans-serif; font-weight: 800; font-size: 1.25rem; color: #fff; }
.fx-price { position: relative; font-weight: 900; color: var(--green); display: flex; align-items: center; gap: 6px; }

/* кэшбек */
.cb-overlay { position: fixed; inset: 0; z-index: 3000; background: rgba(5,6,10,.78); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; animation: cbFade .25s ease; }
@keyframes cbFade { from { opacity: 0; } to { opacity: 1; } }
.cb-stage { position: relative; width: min(760px, 94vw); height: 360px; display: flex; align-items: center; justify-content: center; }
.cb-box { position: absolute; left: 50%; top: 50%; width: 150px; height: 150px; margin: -75px 0 0 -75px; transform: translateY(-120vh); }
.cb-box img, .cb-box svg { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 12px 30px rgba(255,190,0,.45)); }
.cb-box.drop { animation: cbDrop .9s cubic-bezier(.3, 1.35, .5, 1) forwards; }
@keyframes cbDrop { 0% { transform: translateY(-120vh) rotate(-12deg); } 70% { transform: translateY(0) rotate(4deg); } 85% { transform: translateY(-14px) rotate(-2deg); } 100% { transform: translateY(0) rotate(0); } }
.cb-box.shake { animation: cbShake .6s ease forwards; transform: translateY(0); }
@keyframes cbShake { 0%, 100% { transform: rotate(0) scale(1); } 20% { transform: rotate(-10deg) scale(1.04); } 40% { transform: rotate(10deg) scale(1.08); } 60% { transform: rotate(-8deg) scale(1.12); } 80% { transform: rotate(8deg) scale(1.16); } }
.cb-box.pop { animation: cbPop .38s ease-in forwards; }
@keyframes cbPop { 0% { transform: scale(1.16); opacity: 1; filter: brightness(1); } 60% { transform: scale(1.5); opacity: .9; filter: brightness(2.2); } 100% { transform: scale(1.9); opacity: 0; filter: brightness(3); } }
.cb-burst { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.cb-burst i { position: absolute; width: 9px; height: 9px; margin: -4px; border-radius: 50%; opacity: 0; }
.cb-burst.go i { animation: cbParticle .8s ease-out forwards; }
@keyframes cbParticle { 0% { transform: translate(0, 0) scale(1.3); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }
.cb-panel { width: 100%; background: #16181d; border: 1px solid #2a2d35; border-radius: 18px; padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 14px;
    opacity: 0; transform: scale(.85); pointer-events: none; transition: opacity .3s ease, transform .35s cubic-bezier(.2, 1.4, .4, 1); box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.cb-panel.show { opacity: 1; transform: scale(1); pointer-events: auto; }
.cb-title { font-family: 'Montserrat', 'Segoe UI', system-ui, sans-serif; font-weight: 900; font-size: 1.3rem; letter-spacing: 3px; color: var(--gold); }
.cb-ticker { width: 100%; }
.cb-ticker .case-ticker-item b { font-size: .65rem; color: var(--gold); }
.case-ticker-item.cb-win { background: rgba(255,215,0,.12); box-shadow: inset 0 0 0 2px var(--gold); }
.cb-result { min-height: 22px; text-align: center; font-weight: 700; color: #c9d1d9; }
.cb-result b { color: var(--green); display: inline-flex; align-items: center; gap: 4px; }

.slot-fx { background-color: #0b0f0d; }

/* =====================================================================
   v11: отступы между карточками, картинка ближе к категории,
   кнопка отмены ставки в ракете, ошибка сервера
   ===================================================================== */
.panel .grid-container { gap: 9px; }
.panel .card .brainrot-img, .profile-inventory-section .card .brainrot-img { height: 44px; margin: 16px 0 2px; }
.panel .card .cat, .profile-inventory-section .card .cat { margin-top: 0; }
.rocket-btn.cancel { background: #2a2d35; color: #fff; }
.rocket-btn.cancel:not(:disabled):hover { background: #363a44; }
#toast.error { border-color: rgba(255,80,90,.6); color: #ffc2c8; box-shadow: 0 8px 30px rgba(255,60,80,.25); }

/* широкие панели (Color Dice, Ракета): больше колонок, чтобы квадратные карточки не были огромными */
.dice-inv .grid-container { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }

/* картинка в квадратной карточке: опущена к категории и ужимается, если места мало */
.panel .card .brainrot-img, .profile-inventory-section .card .brainrot-img { flex: 0 1 auto; min-height: 0; height: 44px; max-height: 44px; object-fit: contain; margin: 10px 0 2px; }
.panel .card .cat, .panel .card .name { flex-shrink: 0; }

/* несколько предметов в слоте — квадратные карточки как в магазине */
.multi-grid { flex: 0 0 auto; justify-content: center; align-content: center; gap: 8px; }
.multi-grid.n2 { grid-template-columns: repeat(2, 132px); }
.multi-grid.n3 { grid-template-columns: repeat(3, 104px); }
.multi-grid.n4, .multi-grid.n5, .multi-grid.n6 { grid-template-columns: repeat(3, 100px); grid-template-rows: none; }
.multi-tile { aspect-ratio: 1 / 1; min-height: 0; padding: 18px 5px 6px; }
.multi-tile img { flex: 1 1 auto; min-height: 0; max-height: 60%; object-fit: contain; }
.multi-grid.n2 .multi-tile img { max-height: 62%; }
.slot-content.multi { justify-content: center; gap: 10px; }
.tile-name { -webkit-line-clamp: 1; white-space: nowrap; display: block; }

/* =====================================================================
   v12: крупнее картинка-заглушка, анимация проигрыша, модель ракеты
   ===================================================================== */
.placeholder-icon img { max-width: none; max-height: none; width: 255px; height: 255px; object-fit: contain; }
.slot-placeholder { margin-top: 26px; }

/* проигрыш: красная вспышка, предмет трясётся, трескается и «падает» в серый */
.slot-fx.lose { background: radial-gradient(circle at 50% 46%, rgba(239,68,68,.35) 0%, rgba(239,68,68,.10) 45%, rgba(14,8,9,.96) 78%); background-color: #0e0809;
    box-shadow: inset 0 0 0 2px #ef4444, 0 0 40px rgba(239,68,68,.35); }
.slot-fx.lose .fx-label { color: #ef4444; text-shadow: 0 0 14px rgba(239,68,68,.7); }
.slot-fx.lose .fx-price { color: #f87171; }
.fx-lost { position: relative; display: flex; gap: 8px; align-items: center; justify-content: center; }
.fx-lost .fx-img { width: 190px; height: 165px; filter: drop-shadow(0 0 18px rgba(239,68,68,.5)); }
.fx-lost.n2 .fx-img { width: 120px; height: 120px; }
.fx-lost.n3 .fx-img { width: 90px; height: 90px; }
.slot-fx.lose.show .fx-img { animation: fxBreak 2.2s ease forwards; }
@keyframes fxBreak {
    0% { transform: scale(.9); filter: drop-shadow(0 0 18px rgba(239,68,68,.6)); }
    8% { transform: scale(1.05) rotate(-6deg); } 16% { transform: scale(1.05) rotate(6deg); }
    24% { transform: scale(1.05) rotate(-5deg); } 32% { transform: scale(1.05) rotate(4deg); }
    45% { transform: scale(1); filter: grayscale(.4) drop-shadow(0 0 10px rgba(239,68,68,.4)); opacity: 1; }
    100% { transform: translateY(46px) rotate(16deg) scale(.72); filter: grayscale(1) brightness(.5); opacity: .25; }
}
.fx-crack { position: absolute; inset: 0; pointer-events: none; opacity: 0;
    background: linear-gradient(115deg, transparent 47%, rgba(255,255,255,.55) 48%, transparent 49.5%),
                linear-gradient(62deg, transparent 52%, rgba(255,255,255,.4) 53%, transparent 54%),
                linear-gradient(160deg, transparent 40%, rgba(255,255,255,.35) 41%, transparent 42%); }
.slot-fx.lose.show .fx-crack { animation: fxCrack 2.4s ease forwards; }
@keyframes fxCrack { 0%, 38% { opacity: 0; } 45% { opacity: 1; } 100% { opacity: .15; } }
.slot-fx.lose.show { animation: fxShowLose 2.8s ease forwards; }
@keyframes fxShowLose { 0% { opacity: 0; transform: translateX(0); } 6% { opacity: 1; transform: translateX(-6px); } 10% { transform: translateX(6px); } 14% { transform: translateX(-4px); } 18% { transform: translateX(0); } 82% { opacity: 1; } 100% { opacity: 0; } }

/* выбор модели ракеты */
.rocket-skin { display: flex; align-items: center; gap: 10px; }
.rocket-skin-sel { flex: 0 0 140px; height: 36px; background: #0f1115; color: #fff; border: 1px solid #1f2229; border-radius: 10px; padding: 0 10px; font-weight: 700; cursor: pointer; outline: none; }
.rocket-skin-sel:focus { border-color: var(--gold); }

/* v13: карточки раздвинуты и по вертикали; картинка прежнего размера, стоит сразу над категорией */
.panel .grid-container, .profile-inventory-section .grid-container { row-gap: 14px; column-gap: 9px; align-content: start; }
.panel .card, .profile-inventory-section .card { justify-content: flex-end; padding-top: 6px; }
.panel .card .brainrot-img, .profile-inventory-section .card .brainrot-img { flex: 0 0 auto; height: 52px; max-height: 52px; margin: 0 0 2px; object-fit: contain; }
/* overflow: clip вместо hidden — тогда квадратная карточка правильно задаёт высоту ряда и зазор между рядами виден */
.panel .card, .profile-inventory-section .card, .card-empty { overflow: clip; }
/* 4 ряда магазина целиком помещаются по высоте */
.left-panel.shop-mode, .right-panel { height: 668px; }

/* v14: картинка опущена ЗА категорию — нижняя часть уходит под «★ BRAINROT», цену сверху не перекрывает */
.panel .card .brainrot-img, .profile-inventory-section .card .brainrot-img { position: relative; z-index: 0; margin: 0 0 -16px; }
.panel .card .cat, .panel .card .name, .profile-inventory-section .card .cat, .profile-inventory-section .card .name { position: relative; z-index: 1; text-shadow: 0 1px 3px rgba(0,0,0,.95), 0 0 8px rgba(0,0,0,.8); }
.panel .card .price, .profile-inventory-section .card .price { z-index: 2; }

/* =====================================================================
   v15: цвета по цене, свечение и знак апгрейда за картинкой, без «подпрыгивания»
   ===================================================================== */
.rarity-blue   { --tier: #3b82f6; --tier-rgb: 59, 130, 246; }
.rarity-purple { --tier: #a855f7; --tier-rgb: 168, 85, 247; }
.rarity-pink   { --tier: #ec4899; --tier-rgb: 236, 72, 153; }
.rarity-red    { --tier: #ef4444; --tier-rgb: 239, 68, 68; }
.rarity-gold   { --tier: #f5b301; --tier-rgb: 245, 179, 1; }

.card[class*="rarity-"], .multi-tile[class*="rarity-"], .hg-card[class*="rarity-"], .dice-stake-card[class*="rarity-"] { border-color: var(--tier); }
.card[class*="rarity-"] { box-shadow: inset 0 0 14px rgba(var(--tier-rgb), .12); }

/* наведение: без подъёма и вспышки — только появляется свечение за картинкой */
.card:hover { transform: none; filter: none; }

/* свечение и знак апгрейда за картинкой */
.card[class*="rarity-"], .multi-tile[class*="rarity-"], .dice-stake-card[class*="rarity-"] { position: relative; isolation: isolate; }
.card[class*="rarity-"]::before, .multi-tile[class*="rarity-"]::before, .dice-stake-card[class*="rarity-"]::before {
    content: ''; position: absolute; left: 50%; top: 50%; width: 115%; aspect-ratio: 1 / 1; transform: translate(-50%, -50%); z-index: -1; pointer-events: none;
    background: radial-gradient(circle, rgba(var(--tier-rgb), .5) 0%, rgba(var(--tier-rgb), .14) 34%, transparent 62%);
    opacity: .4; transition: opacity .25s ease, transform .25s ease; }
.card[class*="rarity-"]:hover::before, .multi-tile[class*="rarity-"]:hover::before { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
.card[class*="rarity-"]::after, .multi-tile[class*="rarity-"]::after, .dice-stake-card[class*="rarity-"]::after {
    content: ''; position: absolute; left: 50%; top: 46%; width: 44%; aspect-ratio: 24 / 30; transform: translate(-50%, -50%); z-index: -1; pointer-events: none;
    background: var(--tier); opacity: .16;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 30'><path d='M12 1 23 12v6L12 7 1 18v-6z'/><path d='M12 13 23 24v6L12 19 1 30v-6z'/></svg>") center / contain no-repeat;
            mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 30'><path d='M12 1 23 12v6L12 7 1 18v-6z'/><path d='M12 13 23 24v6L12 19 1 30v-6z'/></svg>") center / contain no-repeat;
    transition: opacity .25s ease; }
.card[class*="rarity-"]:hover::after { opacity: .26; }
/* выбранная карточка остаётся с золотой рамкой */
.card.selected { border-color: var(--gold) !important; }

/* =====================================================================
   v16: инструменты магазина в шапке панели; лупа плавно меняет «от/до» на поиск
   ===================================================================== */
.left-panel.shop-mode .panel-title { flex: 0 0 auto; }
.shop-tools { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; justify-content: flex-end; }
.shop-filter-box { position: relative; flex: 1; min-width: 0; max-width: 300px; height: 36px; overflow: hidden; }
.shop-filter-group { position: absolute; inset: 0; display: flex; gap: 8px; transition: opacity .25s ease, transform .3s cubic-bezier(.2, .8, .2, 1); }
.shop-filter-group .mini-input { flex: 1; width: auto; min-width: 0; }
.shop-filter-group.name { opacity: 0; transform: translateX(24px); pointer-events: none; }
.shop-filter-box.searching .shop-filter-group.price { opacity: 0; transform: translateX(-24px); pointer-events: none; }
.shop-filter-box.searching .shop-filter-group.name { opacity: 1; transform: translateX(0); pointer-events: auto; }
#btnShopSearch.active { color: var(--gold); border-color: var(--gold); }
.shop-cart-btn { position: relative; flex-shrink: 0; width: 38px; height: 36px; border: none; border-radius: 10px; background: var(--gold); color: #000; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: .15s; }
.shop-cart-btn:hover { background: #ffea00; }
.shop-cart-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.shop-cart-btn .cart-badge { position: absolute; top: -6px; right: -6px; background: #ff2d95; color: #fff; font-size: .65rem; font-weight: 900; min-width: 18px; height: 18px; border-radius: 9px; padding: 0 4px; display: flex; align-items: center; justify-content: center; }
#shopGrid { padding-top: 4px !important; }

/* v17: картинка масштабируется вместе с карточкой — занимает место между ценой и подписью
   и лишь слегка заходит за «★ BRAINROT» (раньше в больших карточках она была мелкой и пряталась под текст) */
.panel .card .brainrot-img, .profile-inventory-section .card .brainrot-img {
    flex: 1 1 0; min-height: 0; height: auto; max-height: none; width: 100%;
    object-fit: contain; margin: 16px 0 -8px; }

/* =====================================================================
   v18: свой ползунок прокрутки, панели без пустого места, страницы у целей
   ===================================================================== */
/* полоса прокрутки в стиле сайта (Chrome/Edge/Opera/Safari) */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a2d35; border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); background-clip: padding-box; border: 2px solid transparent; }
::-webkit-scrollbar-corner { background: transparent; }
/* Firefox */
@supports not selector(::-webkit-scrollbar) { * { scrollbar-width: thin; scrollbar-color: #2a2d35 transparent; } }

/* панели подстраиваются под содержимое и выравниваются по высоте — без пустого места снизу */
.bottom-split-layout { align-items: stretch; }
.left-panel, .left-panel.shop-mode, .right-panel { height: auto; max-height: none; }
#shopGrid { flex: none !important; overflow: visible !important; }
.right-panel .panel-content { flex: none; overflow: visible; }
.shop-bottom-bar { margin-top: auto; }
#targetPager { margin-top: auto; padding-top: 6px; }
#inventoryGrid:has(.empty-inv) { flex: 1; display: flex; align-items: center; justify-content: center; }

/* v24: название UPBRAINROT, логотип крупнее */
.logo { font-size: 1.6rem; gap: 10px; }
.logo-img { height: 44px; }
.page-logo { font-size: 1.6rem; gap: 12px; margin: 20px 0 10px; }
.page-logo-img { height: 42px; }
.auth-box h1 { font-size: 2.4rem; }

/* v25: значок валюты ближе к цене и балансу */
.flex-center, .balance-pill, .card .price, .slot-content .item-price, .history-box-price, .dep-card-new .price, .dep-sel-price,
.cart-total span:last-child, .cart-item-price, .res-price, .hg-price, .tile-price, .dice-stake-card .price, .slot-box.has-item .item-price,
.rocket-stake-total b, .rocket-potential b, .best-drop-price, .hg-stat b, .fx-price, .multi-total, .cb-result b, .case-price-tag,
#sliderBalance, .inv-total, .mini-stat-num { gap: 3px !important; }
.balance-large { gap: 5px !important; }
.balance-pill svg { margin-left: 5px; }
.inv-total #invTotal { margin-left: 4px; }

/* =====================================================================
   v28: ивент-валюта, ивентовые кейсы, мобильная версия
   ===================================================================== */
.event-pill { display: flex; align-items: center; gap: 4px; height: 40px; padding: 0 12px; border-radius: 10px; cursor: pointer;
    background: linear-gradient(135deg, rgba(160,60,255,.22), rgba(160,60,255,.08)); border: 1px solid rgba(170,90,255,.45); color: #e9d5ff; font-weight: 800; font-size: .9rem; }
.event-pill:hover { border-color: #c084fc; }
.evt-img { width: 18px !important; height: 18px !important; }
.case-price-tag.evt { color: #d8b4fe; }
.case-evt-tag { position: absolute; top: 12px; left: 12px; z-index: 3; display: flex; align-items: center; gap: 3px; padding: 4px 8px; border-radius: 8px;
    background: rgba(160,60,255,.2); border: 1px solid rgba(170,90,255,.5); color: #e9d5ff; font-size: .72rem; font-weight: 800; }
.pay-icon { width: 84px; height: auto; }

/* ---------------- телефон ---------------- */
@media (max-width: 760px) {
    body { padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
    header { height: 58px; padding: 0 10px; gap: 8px; }
    .header-stats { display: none; }
    .logo { font-size: 1.05rem; gap: 6px; }
    .logo-img { height: 28px; }
    /* меню — снизу, как в мобильном приложении */
    header .header-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; margin: 0; gap: 2px; justify-content: space-around;
        padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: rgba(12,13,17,.97); border-top: 1px solid #1d2027; backdrop-filter: blur(10px); }
    .header-nav button { flex: 1; flex-direction: column; gap: 3px; padding: 6px 2px; font-size: .64rem; border-radius: 10px; white-space: nowrap; }
    .header-nav button svg { width: 20px; height: 20px; }
    header .header-right { gap: 6px; }
    .event-pill { height: 34px; padding: 0 8px; font-size: .78rem; }
    .balance-group { border-radius: 9px; }
    .balance-pill { height: 34px; padding: 0 8px; font-size: .8rem; }
    .balance-pill svg { display: none; }
    .btn-deposit { height: 34px; padding: 0 10px; font-size: 0; gap: 0; }
    .btn-deposit svg { width: 18px; height: 18px; }
    .btn-profile { width: 32px; height: 32px; font-size: .85rem; }

    .main-content, #upgradeView, #casesView, #diceView, #rocketView, #profileView { padding: 12px 10px !important; }
    .page-logo { display: none; }
    .tool-row { margin: 0 0 4px; }

    /* апгрейд: колесо сверху, слоты рядом под ним */
    .upgrade-area { grid-template-columns: 1fr 1fr; grid-template-areas: "wheel wheel" "base target"; gap: 10px; }
    .upgrade-area > .slot-wrapper:first-child { grid-area: base; }
    .upgrade-area > .wheel-section { grid-area: wheel; }
    .upgrade-area > .slot-wrapper:last-child { grid-area: target; }
    .wheel-container { transform: scale(.84); margin: -24px auto; }
    .slot-box { height: 205px; }
    .slot-head { top: 12px; padding: 0 8px; }
    .slot-head .slot-title { font-size: .76rem; }
    .slot-sub { display: none; }
    .placeholder-icon img { width: 130px; height: 130px; }
    .slot-placeholder { margin-top: 14px; }
    .slot-box.has-item .slot-content:not(.multi) { padding: 14px 10px 12px; }
    .slot-box.has-item .slot-img { width: 110px; height: 96px; }
    .slot-name, .slot-box.has-item .slot-name { font-size: .95rem; }
    .slot-cat, .slot-box.has-item .slot-cat { font-size: .64rem; }
    .slot-box.has-item .item-price { font-size: .95rem; }
    .slot-close { width: 26px; height: 26px; top: 8px; right: 8px; }
    .slot-content.multi { margin-top: 38px; height: calc(100% - 38px); padding: 0 6px 6px; gap: 6px; }
    .multi-grid { gap: 4px; }
    .multi-grid.n2 { grid-template-columns: repeat(2, 66px); }
    .multi-grid.n3, .multi-grid.n4, .multi-grid.n5, .multi-grid.n6 { grid-template-columns: repeat(3, 46px); }
    .multi-tile { padding: 12px 2px 3px; }
    .tile-cat { display: none; }
    .tile-name { font-size: .5rem; }
    .multi-total { font-size: .8rem; }
    .fx-img { width: 120px; height: 100px; }
    .fx-lost .fx-img { width: 110px; height: 96px; }

    .controls-layout { grid-template-columns: 1fr; gap: 10px; }
    .center-col .btn-main-upgrade { height: 50px; }
    .right-col .presets-grid { gap: 4px; }
    .presets-grid button { height: 40px; font-size: .78rem; }

    /* панели инвентаря / магазина / целей — друг под другом, по 4 в ряд */
    .bottom-split-layout { flex-direction: column; gap: 12px; }
    .bottom-split-layout .panel { width: 100%; }
    .panel .grid-container { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 7px; row-gap: 10px; }
    .panel-tabs { flex-wrap: wrap; padding: 10px; }
    .shop-tools { flex-basis: 100%; }
    .shop-filter-box { max-width: none; }
    .target-filters { flex: 1; justify-content: flex-end; }
    .target-filters .mini-input { width: 64px; }
    .inv-total { font-size: .68rem; padding: 0 8px; }

    /* кейсы */
    .cases-grid-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .case-section-pill { padding: 10px 14px; }
    .case-title-text { font-size: .85rem; }
    .case-controls-panel { flex-direction: column; align-items: stretch; }
    .btn-open-case-main { margin-left: 0; justify-content: center; }
    .case-ticker-wrap { height: 120px; }
    .case-title-main { font-size: 1.15rem; }

    /* Color Dice и Ракета */
    .dice-layout, .rocket-layout { grid-template-columns: 1fr; }
    .dice-stake-box { min-height: 220px; }
    .dice-cubes { gap: 10px; }
    .die { width: 60px; height: 60px; border-radius: 14px; }
    .dice-colors { grid-template-columns: repeat(2, 1fr); }
    .dice-head h2 { font-size: 1.25rem; }
    .dice-head p { font-size: .78rem; }
    .rocket-stage { height: 260px; }
    .rocket-stake { min-height: 150px; }
    .dice-inv .grid-container { grid-template-columns: repeat(4, minmax(0, 1fr)); }

    /* профиль */
    .prof-main-card { flex-direction: column; border-radius: 20px; }
    .mini-stats-row { flex-direction: row; }
    #profileHistoryList { grid-template-columns: 1fr; }
    .hg-card { height: 120px; }
    .inv-tabs { flex-wrap: wrap; gap: 6px; }

    /* окна */
    .deposit-modal-box, .cart-modal-box { width: 96vw; max-width: 96vw; height: auto; max-height: 88vh; }
    .cb-stage { height: 320px; }
    #toast { bottom: calc(84px + env(safe-area-inset-bottom)); max-width: 92vw; }
}

/* метка ивент-монет — под названием кейса */
.case-evt-tag { position: static; align-self: center; margin: -8px auto 8px; }

@media (max-width: 760px) {
    .logo-text { font-size: .92rem; letter-spacing: .5px; }
    header { gap: 6px; }
    .panel .card .price, .profile-inventory-section .card .price { font-size: .56rem; right: 5px; top: 5px; }
    .panel .card .cat { font-size: .44rem; }
    .panel .card .name { font-size: .6rem; }
    /* карточки кейсов компактнее */
    .case-card-new { padding: 10px; border-radius: 14px; }
    .case-card-new:hover { transform: none; }
    .case-tag { top: 6px; right: 6px; font-size: .58rem; padding: 2px 6px; }
    .case-title { font-size: .8rem; margin: 22px 0 8px; letter-spacing: .5px; }
    .case-evt-tag { font-size: .6rem; padding: 2px 6px; margin: -4px auto 6px; }
    .case-image-wrapper { height: 86px; margin-bottom: 8px; }
    .case-image-wrapper .case-emoji { font-size: 3rem; }
    .case-bottom-info { padding: 6px 8px; }
    .case-items-count { font-size: .62rem; }
    .case-price-tag { font-size: .78rem; padding: 4px 8px; }
}

/* шапка на средних экранах: без переносов и обрезанного аватара */
.header-nav button { white-space: nowrap; }
@media (max-width: 1400px) and (min-width: 761px) {
    .header-stats { display: none; }
    header { gap: 14px; }
}
/* название кейса не прячется под верхними метками */
.case-title { margin-top: 26px; }
@media (max-width: 760px) { .case-title { margin-top: 22px; } }
@media (max-width: 760px) {
    .rocket-main { order: -1; }          /* на телефоне сначала ракета, потом ставка */
    .dice-board { order: -1; }           /* и в Color Dice сначала кубики */
    .rocket-stake { min-height: 120px; }
}

/* =====================================================================
   v29: лайв-лента, подвал, выбор валюты, язык
   ===================================================================== */
/* лайв-лента */
.live-feed { display: flex; align-items: stretch; gap: 8px; padding: 8px 16px; background: #0d0e12; border-bottom: 1px solid #16181d; overflow: hidden; }
.lf-label { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 46px; border-radius: 10px;
    background: #16181d; color: #ef4444; font-size: .62rem; font-weight: 900; letter-spacing: 1px; }
.lf-dot { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 8px #ef4444; animation: lfPulse 1.4s ease-in-out infinite; }
@keyframes lfPulse { 50% { opacity: .35; } }
.lf-track { flex: 1; display: flex; gap: 6px; overflow: hidden; min-width: 0; }
.lf-item { position: relative; flex: 0 0 72px; height: 64px; border-radius: 10px; border: 1.5px solid var(--tier, #2a2d35); cursor: pointer; isolation: isolate;
    background: radial-gradient(circle at 50% 45%, rgba(var(--tier-rgb, 120,120,120), .30), transparent 70%), #121419;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 3px 3px 4px; transition: border-color .2s, box-shadow .2s; }
.lf-item:hover { box-shadow: 0 0 14px rgba(var(--tier-rgb, 255,215,0), .45); }
.lf-item img { width: 44px; height: 38px; object-fit: contain; margin-bottom: auto; margin-top: 2px; }
.lf-price { font-size: .58rem; font-weight: 800; color: var(--gold); white-space: nowrap; }
.lf-mult { margin: auto 0; font-family: 'Montserrat', 'Segoe UI', system-ui, sans-serif; font-weight: 900; font-size: .95rem; color: var(--green); }
.lf-rocket::after { content: '🚀'; position: absolute; top: 2px; left: 4px; font-size: .7rem; }
.lf-new { animation: lfIn .5s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes lfIn { from { transform: translateX(-30px) scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
.lf-empty { color: var(--text-muted); font-size: .8rem; display: flex; align-items: center; padding-left: 6px; }
.lf-tip { position: fixed; z-index: 4000; display: none; min-width: 180px; max-width: 260px; padding: 10px 12px; border-radius: 12px; pointer-events: none;
    background: #1b1d23; border: 1px solid #2f323a; box-shadow: 0 12px 30px rgba(0,0,0,.55); }
.lt-user { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.lt-user b { color: #fff; font-size: .9rem; }
.lt-ava { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 900; border: 2px solid rgba(255,255,255,.25); }
.lt-item { font-size: .78rem; color: #e5e7eb; display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.lt-src { margin-top: 4px; font-size: .72rem; color: var(--gold); font-weight: 700; }

/* подвал */
.site-footer { margin-top: 40px; background: #121317; border-top: 1px solid #1d2027; padding: 34px 40px 24px; }
.sf-top { display: grid; grid-template-columns: 1.1fr 1fr 1fr 1.2fr auto; gap: 30px; align-items: start; padding-bottom: 26px; border-bottom: 1px solid #1d2027; }
.sf-brand { display: flex; align-items: center; gap: 10px; font-size: 1.4rem; font-weight: 900; letter-spacing: 1px; }
.sf-brand .logo-img { height: 34px; }
.sf-col { display: flex; flex-direction: column; gap: 10px; }
.sf-title { color: #7d8590; font-size: 1rem; margin-bottom: 4px; }
.sf-col a { color: #c9d1d9; text-decoration: none; font-size: .88rem; transition: color .15s; }
.sf-col a:hover { color: var(--gold); }
.sf-right { display: flex; flex-direction: column; align-items: flex-end; gap: 16px; }
.sf-social { display: flex; gap: 8px; }
.sf-social a { width: 34px; height: 34px; border-radius: 50%; background: #1d1f25; color: #c9d1d9; display: flex; align-items: center; justify-content: center; text-decoration: none; transition: .15s; }
.sf-social a:hover { background: #2a2d35; color: var(--gold); }
.sf-social svg { width: 16px; height: 16px; }
.sf-txt { font-weight: 900; font-size: .78rem; }
.sf-lang { position: relative; }
.sf-lang-btn { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border-radius: 9px; background: #1a1c22; border: 1px solid #2a2d35; color: #fff; font-weight: 800; cursor: pointer; }
.sf-lang-btn .chev { width: 14px; height: 14px; fill: none; stroke: #8a94a0; stroke-width: 2.4; }
.sf-lang-menu { display: none; position: absolute; right: 0; bottom: calc(100% + 6px); background: #1a1c22; border: 1px solid #2a2d35; border-radius: 10px; padding: 4px; min-width: 110px; z-index: 50; }
.sf-lang.open .sf-lang-menu { display: block; }
.sf-lang-menu button { width: 100%; display: flex; align-items: center; gap: 8px; padding: 8px; border: none; border-radius: 7px; background: transparent; color: #fff; font-weight: 700; cursor: pointer; }
.sf-lang-menu button:hover { background: #2a2d35; }
.flag { display: inline-block; width: 22px; height: 15px; border-radius: 3px; overflow: hidden; flex-shrink: 0; }
.flag-ru { background: linear-gradient(#fff 0 33.3%, #1d4ed8 33.3% 66.6%, #dc2626 66.6%); }
.flag-en { background:
    linear-gradient(90deg, transparent 42%, #fff 42% 58%, transparent 58%),
    linear-gradient(transparent 38%, #fff 38% 62%, transparent 62%),
    linear-gradient(90deg, transparent 45%, #c8102e 45% 55%, transparent 55%),
    linear-gradient(transparent 42%, #c8102e 42% 58%, transparent 58%), #012169;
    background-blend-mode: normal; }
.sf-bottom { padding-top: 20px; }
.sf-copy { font-weight: 800; color: #e5e7eb; margin-bottom: 10px; }
.sf-legal { color: #4b5563; font-size: .74rem; line-height: 1.5; margin-top: 6px; max-width: 900px; }

/* выбор валюты */
.currency-modal-box { width: min(420px, 94vw); background: #1a1c21; border: 1px solid #2a2d35; border-radius: 18px; padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.cm-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.cm-head h3 { font-size: 1.3rem; font-weight: 800; }
.cm-close { background: none; border: none; color: #8a94a0; font-size: 1.6rem; cursor: pointer; line-height: 1; }
.cm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.cm-opt { display: flex; align-items: center; gap: 8px; padding: 13px 14px; border-radius: 10px; background: #23252b; border: 1.5px solid transparent; color: #fff; font-weight: 900; cursor: pointer; transition: .15s; }
.cm-opt:hover { border-color: #3a3d45; }
.cm-opt.active { border-color: var(--gold); background: #26241b; }
.cm-opt span { flex: 1; text-align: left; }
.cm-radio { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #4b5563; flex-shrink: 0; }
.cm-opt.active .cm-radio { border-color: var(--gold); background: radial-gradient(circle, var(--gold) 45%, transparent 50%); }
.cm-apply { width: 100%; height: 50px; border-radius: 12px; font-size: 1rem; }
.cm-note { margin-top: 14px; text-align: center; color: #8a94a0; font-size: .8rem; line-height: 1.5; }

@media (max-width: 1000px) {
    .sf-top { grid-template-columns: 1fr 1fr; }
    .sf-right { align-items: flex-start; }
}
@media (max-width: 760px) {
    .live-feed { padding: 6px 8px; }
    .lf-label { width: 38px; }
    .lf-item { flex-basis: 60px; height: 56px; }
    .lf-item img { width: 36px; height: 32px; }
    .site-footer { padding: 24px 16px 16px; margin-top: 24px; }
    .sf-top { grid-template-columns: 1fr; gap: 20px; }
}
.flag-en { background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30'><rect width='60' height='30' fill='%23012169'/><path d='M0 0l60 30M60 0L0 30' stroke='%23fff' stroke-width='6'/><path d='M0 0l60 30M60 0L0 30' stroke='%23C8102E' stroke-width='2'/><path d='M30 0v30M0 15h60' stroke='%23fff' stroke-width='10'/><path d='M30 0v30M0 15h60' stroke='%23C8102E' stroke-width='6'/></svg>") center / cover no-repeat; }

/* =====================================================================
   v30: подтверждение 18+, регистрация с датой рождения и соглашением
   ===================================================================== */
.age-gate { position: fixed; inset: 0; z-index: 5000; display: flex; align-items: center; justify-content: center; padding: 16px;
    background: radial-gradient(circle at 50% 40%, rgba(255,200,0,.08), transparent 60%), rgba(6,7,10,.96); backdrop-filter: blur(6px); }
.age-box { width: min(420px, 100%); text-align: center; background: #16181d; border: 1px solid #2a2d35; border-radius: 20px; padding: 30px 26px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.age-badge { width: 74px; height: 74px; margin: 0 auto 14px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-family: 'Montserrat', 'Segoe UI', system-ui, sans-serif; font-weight: 900; font-size: 1.6rem; color: #000; background: var(--gold); box-shadow: 0 0 30px rgba(255,200,0,.35); }
.age-box h2 { font-size: 1.35rem; font-weight: 900; margin-bottom: 10px; }
.age-box p { color: #aab2bd; line-height: 1.5; margin-bottom: 20px; }
.age-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.auth-reg-extra { flex-direction: column; gap: 8px; text-align: left; }
.auth-label { font-size: .78rem; color: #8a94a0; }
.auth-reg-extra input[type="date"] { color-scheme: dark; }
.auth-terms { display: flex; align-items: flex-start; gap: 8px; font-size: .8rem; color: #c9d1d9; line-height: 1.4; cursor: pointer; }
.auth-terms input { margin-top: 2px; accent-color: var(--gold); width: 16px; height: 16px; flex-shrink: 0; }
.auth-terms a { color: var(--gold); }

/* =====================================================================
   v31: лайв-лента как на upgrader (слева на компьютере, сверху на телефоне),
   вход через Telegram, подтверждение 18+
   ===================================================================== */
.live-feed { gap: 0; }
.lf-track { display: flex; }
.lf-item { position: relative; border-radius: 12px; overflow: hidden; cursor: pointer; isolation: isolate; padding: 0; display: block;
    border: none; border-left: 3px solid var(--tier, #444); box-shadow: none;
    background: linear-gradient(100deg, rgba(var(--tier-rgb, 120,120,120), .30) 0%, #1a1c21 64%); }
.lf-item:hover { box-shadow: 0 0 16px rgba(var(--tier-rgb, 255,215,0), .3); }
.lf-face { position: absolute; inset: 0; transition: opacity .2s ease, transform .25s ease; z-index: 1; }
.lf-back { opacity: 0; transform: translateY(6px); }
.lf-item:hover .lf-front, .lf-item.flip .lf-front { opacity: 0; }
.lf-item:hover .lf-back, .lf-item.flip .lf-back { opacity: 1; transform: none; }
.lf-badge { position: absolute; top: 7px; left: 8px; display: flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 7px;
    background: rgba(0,0,0,.45); font-size: .62rem; font-weight: 800; color: #fff; }
.lf-badge svg { width: 11px; height: 11px; fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.lf-img { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 72px; height: 64px; object-fit: contain; margin: 0; }
.lf-rocket-big { font-size: 2rem; display: flex; align-items: center; justify-content: center; }
.lf-name { position: absolute; left: 10px; right: 84px; bottom: 21px; font-size: .68rem; font-weight: 900; text-transform: uppercase; color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: 'Montserrat', 'Segoe UI', system-ui, sans-serif; }
.lf-cat { position: absolute; left: 10px; bottom: 8px; font-size: .56rem; color: #9aa1ab; }
.lf-ava-mini { display: none; }
.lf-price { position: absolute; top: 7px; right: 9px; display: flex; align-items: center; gap: 3px; font-weight: 900; font-size: .74rem; color: #fff; }
.lf-src { position: absolute; right: 8px; bottom: 6px; width: 76px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.lf-src img, .lf-src .src-ico, .lf-src .src-emoji { width: 48px; height: 38px; object-fit: contain; }
.src-ico.up { fill: none; stroke: var(--gold); stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.src-emoji { font-size: 1.6rem; line-height: 38px; text-align: center; }
.lf-src span { max-width: 76px; font-size: .55rem; font-weight: 800; color: #e5e7eb; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lf-user { position: absolute; left: 10px; bottom: 8px; display: flex; flex-direction: column; gap: 5px; max-width: 104px; }
.lf-ava { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.22); }
.lf-ava-l { display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 900; font-size: .8rem; }
.lf-user b { font-size: .7rem; font-weight: 900; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
/* лучший дроп — жёлтая карточка с поднимающимися стрелками, как в профиле */
.lf-item.lf-best { border-left-color: var(--gold); background: linear-gradient(110deg, #3a3110 0%, #a8870a 52%, #f5c400 100%); }
.lf-best .bd-chev { right: 6px; width: 62px; z-index: 0; }
.lf-best .bd-chev svg { width: 62px; }
.lf-best .bd-chev path { fill: #ffe066; }
.lf-best-label { font-size: .66rem; font-weight: 800; color: var(--gold); padding: 0 2px 2px; }
.lf-sep { background: #23252c; }
.lf-new { animation: lfIn .5s cubic-bezier(.2, 1.3, .4, 1); }

@media (min-width: 761px) {
    #appScreen { padding-left: 214px; }
    #appScreen > header { margin-left: -214px; }
    .live-feed { position: fixed; top: 68px; left: 0; bottom: 0; width: 206px; z-index: 60; flex-direction: column; padding: 10px 8px 14px;
        border-right: 1px solid #16181d; border-bottom: none; overflow-y: auto; background: #0d0e12; }
    .lf-track { flex-direction: column; gap: 8px; overflow: visible; }
    .lf-item { flex: 0 0 auto; width: 100%; height: 86px; }
    .lf-sep { height: 1px; margin: 2px 0; }
    .lf-empty { padding: 10px 4px; }
}
@media (max-width: 760px) {
    .live-feed { padding: 8px 8px 10px; }
    .lf-track { flex-direction: row; gap: 6px; overflow-x: auto; align-items: stretch; padding-bottom: 2px; }
    .lf-best-label { display: none; }
    .lf-sep { width: 1px; margin: 0 2px; flex-shrink: 0; }
    .lf-item { flex: 0 0 108px; height: 84px; }
    .lf-best::after { content: '★ Лучший'; position: absolute; top: 4px; left: 6px; z-index: 2; font-size: .5rem; font-weight: 900; color: #3a2a00;
        background: rgba(255,240,170,.9); padding: 1px 5px; border-radius: 5px; }
    .lf-front .lf-img { right: auto; left: 50%; top: 44%; transform: translate(-50%, -50%); width: 66px; height: 54px; }
    .lf-name, .lf-cat { display: none; }
    .lf-badge { top: auto; bottom: 5px; left: auto; right: 5px; font-size: .55rem; padding: 2px 5px; }
    .lf-ava-mini { display: flex; position: absolute; left: 5px; bottom: 5px; width: 20px; height: 20px; border-radius: 50%; object-fit: cover; font-size: .6rem; border: 1px solid rgba(255,255,255,.25); }
    .lf-price { font-size: .6rem; top: 5px; right: 6px; }
    .lf-src { right: 4px; bottom: 4px; width: 56px; }
    .lf-src img, .lf-src .src-ico, .lf-src .src-emoji { width: 36px; height: 28px; line-height: 28px; font-size: 1.2rem; }
    .lf-src span { font-size: .48rem; max-width: 56px; }
    .lf-user { left: 6px; bottom: 5px; max-width: 48px; gap: 3px; }
    .lf-ava { width: 22px; height: 22px; }
    .lf-user b { font-size: .5rem; }
}

/* вход через Telegram */
.auth-sub { display: flex; align-items: center; justify-content: center; gap: 8px; color: #c9d1d9; font-weight: 700; margin: 6px 0 18px; }
.tg-dot { width: 26px; height: 26px; border-radius: 50%; background: #2aabee; color: #fff; display: flex; align-items: center; justify-content: center; }
.tg-dot svg { width: 14px; height: 14px; }
.tg-login-box { display: flex; justify-content: center; min-height: 44px; margin-bottom: 12px; }
.auth-note { font-size: .8rem; color: #8a94a0; line-height: 1.5; margin-bottom: 14px; text-align: center; }
.auth-alt { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.consent-date { width: 100%; padding: 10px 12px; border-radius: 10px; background: #0f1115; border: 1px solid #2a2d35; color: #fff; color-scheme: dark; font-size: .95rem; }
.consent-error { color: #f87171; font-size: .8rem; min-height: 18px; margin: 10px 0 4px; }
.btn-profile { overflow: hidden; padding: 0; }
.btn-profile .ava-img { width: 100%; height: 100%; object-fit: cover; }
.btn-profile .ava-img + span { display: none; }
html.in-telegram #logoutBtn { display: none !important; }
@media (min-width: 761px) { .lf-item .lf-ava-mini { display: none !important; } }

/* v33: лента крупнее и чуть левее (шире колонка, больше карточки и картинки) */
@media (min-width: 761px) {
    #appScreen { padding-left: 246px; }
    #appScreen > header { margin-left: -246px; }
    .live-feed { width: 238px; padding: 12px 10px 16px; }
    .lf-item { height: 104px; }
    .lf-img { width: 96px; height: 84px; right: 6px; }
    .lf-name { right: 96px; font-size: .72rem; bottom: 24px; }
    .lf-badge { font-size: .66rem; padding: 3px 8px; }
    .lf-best { height: 118px; }
    .lf-best .bd-chev { width: 76px; }
    .lf-best .bd-chev svg { width: 76px; }
}

/* v36: инструкция по пополнению брейнротом через трейд */
.dep-trade-info { margin-top: 14px; background: #0f1115; border: 1px solid #2a3320; border-radius: 12px; padding: 14px 16px; }
.dep-trade-title { font-weight: 800; color: var(--green); margin-bottom: 8px; }
.dep-trade-steps { margin: 0; padding-left: 18px; color: #c9d1d9; font-size: .86rem; line-height: 1.6; }
.dep-trade-steps a { color: var(--gold); }
.dep-bot { color: var(--gold); }
.dep-vip-btn { display: inline-block; margin-top: 12px; text-decoration: none; }

/* v37: вход по нику (режим без сервера) */
.name-login-box { display: flex; flex-direction: column; gap: 10px; }
.name-login-box input { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid #2a2d35; background: #0f1115; color: #fff; font-size: .95rem; text-align: center; }
.name-login-box input:focus { border-color: var(--gold); outline: none; }
.name-login-box .btn-yellow-pill { width: 100%; }
.auth-or { text-align: center; color: #6b7280; font-size: .78rem; margin: 6px 0 10px; }

/* =====================================================================
   v41: плашка тестирования, картинка в ленте, профиль игрока, админ-панель
   ===================================================================== */
.top-notice { position: sticky; top: 0; z-index: 1000; padding: 8px 14px; text-align: center; font-weight: 900; font-size: .82rem; letter-spacing: .5px;
    color: #1a1200; background: repeating-linear-gradient(135deg, var(--gold) 0 18px, #ffbf00 18px 36px); box-shadow: 0 2px 12px rgba(0,0,0,.4); }
@media (min-width: 761px) {
    #appScreen > .top-notice { margin-left: -246px; }
    html.has-notice .live-feed { top: 103px; }
}

/* лента: картинка брейнрота больше и левее (ближе к центру карточки) */
@media (min-width: 761px) {
    .lf-front .lf-img { width: 118px; height: 98px; right: 22px; top: 52%; }
    .lf-name { right: 112px; }
}
@media (max-width: 760px) {
    .lf-front .lf-img { width: 78px; height: 62px; left: 44%; }
}

/* профиль другого игрока */
.peer-modal-box { width: min(440px, 94vw); max-height: 88vh; overflow-y: auto; background: #1a1c21; border: 1px solid #2a2d35; border-radius: 18px; padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.pp-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.pp-ava { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold); font-size: 1.6rem; }
.pp-name { font-size: 1.25rem; font-weight: 900; color: #fff; }
.pp-id { font-size: .8rem; color: #8a94a0; margin-top: 2px; }
.pp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.pp-stats div { background: #23252b; border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.pp-stats span { font-size: .72rem; color: #8a94a0; }
.pp-stats b { color: #fff; font-size: .95rem; display: flex; align-items: center; gap: 3px; }
.pp-best { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; margin-bottom: 14px;
    border-left: 3px solid var(--tier, var(--gold)); background: linear-gradient(100deg, rgba(var(--tier-rgb, 255,212,0), .28), #1f2127 70%); }
.pp-best img { width: 64px; height: 56px; object-fit: contain; }
.pp-best span { display: block; font-size: .7rem; color: var(--gold); font-weight: 800; }
.pp-best b { display: block; color: #fff; }
.pp-best i { font-style: normal; color: var(--gold); font-weight: 800; font-size: .85rem; display: flex; align-items: center; gap: 3px; }
.pp-sub { font-size: .8rem; color: #8a94a0; margin-bottom: 8px; }
.pp-wins { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pp-win { aspect-ratio: 1 / 1; border-radius: 10px; border: 1.5px solid var(--tier, #333); background: radial-gradient(circle, rgba(var(--tier-rgb,120,120,120), .25), #15171b 70%);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.pp-win img { width: 70%; height: 60%; object-fit: contain; }
.pp-win i { font-style: normal; font-size: .6rem; font-weight: 800; color: var(--gold); }
.pp-rk { font-size: .7rem; font-weight: 900; color: var(--green); }
.pp-empty { grid-column: 1 / -1; color: #8a94a0; font-size: .85rem; }
.lf-item { cursor: pointer; }

/* админ-панель */
.admin-btn { font-size: 1rem; }
.admin-box .adm-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.admin-box label { flex-basis: 100%; font-size: .78rem; color: #8a94a0; }
.admin-box input, .admin-box select { flex: 1; min-width: 0; height: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid #2a2d35; background: #0f1115; color: #fff; }
.admin-box .adm-qty { flex: 0 0 70px; }
.admin-box .btn-yellow-pill { height: 40px; }
.adm-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.adm-danger { color: #f87171 !important; }

/* =====================================================================
   v42: липкая шапка, гостевой режим, окно входа поверх сайта, страница игрока
   ===================================================================== */
/* шапка всегда на экране */
#appScreen > header { position: sticky; top: var(--notice-h, 0px); z-index: 950; background: rgba(11,12,16,.97); backdrop-filter: blur(8px); }
.top-notice { position: sticky; top: 0; z-index: 960; }
@media (min-width: 761px) { .live-feed { top: calc(68px + var(--notice-h, 0px)) !important; } }

/* гость: вместо баланса и аватара — кнопка «Войти» */
.btn-login { display: none; height: 40px; padding: 0 22px; border: none; border-radius: 10px; background: var(--gold); color: #000; font-weight: 900; cursor: pointer; }
.btn-login:hover { background: #ffea00; }
html.guest .btn-login { display: inline-flex; align-items: center; }
html.guest .balance-group, html.guest .event-pill, html.guest #profileBtn { display: none !important; }

/* окно входа поверх сайта */
#authScreen.as-modal { position: fixed; inset: 0; z-index: 4500; background: rgba(5,6,9,.82); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; }
.auth-box { position: relative; }
.auth-close { display: none; position: absolute; top: 12px; right: 14px; background: none; border: none; color: #8a94a0; font-size: 1.7rem; cursor: pointer; line-height: 1; }
#authScreen.as-modal .auth-close { display: block; }
.g-btn { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 20px; border-radius: 22px; border: 1px solid #3a3d45; background: #1f2127; color: #fff; font-weight: 700; cursor: pointer; }
.g-btn svg { width: 20px; height: 20px; }
.g-btn:hover { background: #2a2d35; }

/* страница игрока — как на upgrader */
.peer-view { max-width: 1400px; width: 100%; flex-direction: column; align-items: stretch; gap: 16px; padding: 24px 32px !important; margin: 0 auto; }
.pv-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; background: none; border: none; color: #c9d1d9; font-weight: 800; cursor: pointer; font-size: .95rem; }
.pv-back svg { width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: #1d1f25; fill: none; stroke: currentColor; stroke-width: 2.5; }
.pv-back:hover { color: var(--gold); }
.pv-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 12px; padding: 14px; border-radius: 22px; background: #23252b; border: 1px solid #2f323a; }
.pv-card { position: relative; overflow: hidden; background: #2b2e35; border-radius: 16px; padding: 18px; min-height: 140px; }
.pv-user { display: flex; align-items: center; gap: 16px; }
.pv-ava { width: 100px; height: 100px; border-radius: 16px; object-fit: cover; border: 3px solid #0f1115; font-size: 2.4rem; }
.pv-uname { font-size: 1.35rem; font-weight: 900; color: #fff; }
.pv-id { display: inline-block; margin-top: 8px; padding: 3px 10px; border: 1px solid #4b4f58; border-radius: 8px; font-size: .8rem; font-weight: 700; color: #d1d5db; }
.pv-ct { font-size: 1.05rem; font-weight: 900; color: #fff; margin-bottom: 26px; }
.pv-sub { color: #9aa1ab; margin-bottom: 4px; }
.pv-val { color: var(--gold); font-weight: 900; display: flex; align-items: center; gap: 4px; }
.pv-big { font-size: 1.4rem; font-weight: 900; color: var(--gold); display: flex; align-items: center; gap: 6px; margin-top: 32px; }
.pv-big svg { width: 22px; height: 22px; fill: none; stroke: var(--gold); stroke-width: 3; }
.pv-best { background: linear-gradient(110deg, #2b2e35 0%, rgba(var(--tier-rgb, 255,212,0), .35) 100%); }
.pv-best .bd-chev { right: 10px; width: 110px; z-index: 0; opacity: .7; }
.pv-best > *:not(.bd-chev) { position: relative; z-index: 1; }
.pv-best .pv-ct { color: #c9d1d9; font-weight: 700; margin-bottom: 14px; }
.pv-bestch { position: absolute; top: 10px; right: 10px; display: flex; align-items: center; gap: 3px; padding: 3px 8px; border-radius: 8px; background: rgba(0,0,0,.45); color: #fff; font-size: .74rem; font-weight: 800; z-index: 2; }
.pv-bestch svg { width: 12px; height: 12px; fill: none; stroke: var(--gold); stroke-width: 3; }
.pv-bcat { font-size: .66rem; color: #b5bcc6; }
.pv-bname { font-weight: 900; color: #fff; margin: 2px 0 10px; max-width: 55%; }
.pv-bimg { position: absolute !important; right: 18px; bottom: 12px; width: 120px; height: 100px; object-fit: contain; }
.pv-panel { background: #17191e; border: 1px solid #23262d; border-radius: 22px; padding: 14px; }
.pv-tabs { display: inline-flex; gap: 4px; padding: 5px; background: #23252b; border-radius: 12px; margin-bottom: 14px; }
.pv-tabs button { border: none; background: none; color: #9aa1ab; font-weight: 800; padding: 9px 22px; border-radius: 9px; cursor: pointer; }
.pv-tabs button.active { background: var(--gold); color: #000; }
.pv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(134px, 1fr)); gap: 10px; }
.pv-tile { position: relative; aspect-ratio: 1 / 1.05; border-radius: 12px; border: 1.5px solid var(--tier, #333); overflow: hidden;
    background: radial-gradient(circle at 50% 45%, rgba(var(--tier-rgb,120,120,120), .30), #15171b 70%); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 8px; }
.pv-price { position: absolute; top: 7px; right: 8px; font-size: .7rem; font-weight: 800; color: var(--gold); display: flex; align-items: center; gap: 2px; }
.pv-tile img { width: 72%; height: 58%; object-fit: contain; margin-bottom: auto; margin-top: 18px; }
.pv-name { font-size: .66rem; font-weight: 800; color: #fff; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pv-label { margin-top: 5px; padding: 3px 10px; border-radius: 7px; background: rgba(0,0,0,.6); font-size: .64rem; font-weight: 800; color: #fff; }
.pv-label.comp { color: #fbbf24; }
.pv-games { display: flex; flex-direction: column; gap: 8px; }
.pv-game { display: grid; grid-template-columns: 110px 46px 1fr 70px 90px; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 12px; background: #1f2127; border-left: 3px solid #ef4444; }
.pv-game.win { border-left-color: var(--green); }
.pv-game img { width: 42px; height: 38px; object-fit: contain; }
.pv-gname { font-weight: 800; color: #c9d1d9; font-size: .85rem; }
.pv-game b { color: #fff; font-size: .85rem; }
.pv-game i { font-style: normal; color: #9aa1ab; font-size: .8rem; }
.pv-game em { font-style: normal; font-weight: 800; font-size: .8rem; color: #f87171; }
.pv-game.win em { color: var(--green); }
.pv-empty { grid-column: 1 / -1; color: #8a94a0; padding: 30px; text-align: center; }
@media (max-width: 1000px) { .pv-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) {
    .peer-view { padding: 12px 10px !important; }
    .pv-top { grid-template-columns: 1fr; }
    .pv-ava { width: 72px; height: 72px; }
    .pv-grid { grid-template-columns: repeat(3, 1fr); }
    .pv-game { grid-template-columns: 80px 36px 1fr 70px; } .pv-game i { display: none; }
}
.pv-best .pv-bestch { position: absolute !important; top: 10px; right: 10px; left: auto; width: auto; }

/* v43: картинка брейнрота чуть правее; «откуда выбит» — крупнее и на месте картинки */
@media (min-width: 761px) {
    .lf-front .lf-img { right: 8px; }
    .lf-back .lf-src { right: 8px; top: 26px; bottom: 6px; width: 118px; justify-content: center; gap: 4px; }
    .lf-back .lf-src img, .lf-back .lf-src .src-ico, .lf-back .lf-src .src-emoji { width: 92px; height: 54px; line-height: 54px; font-size: 2.4rem; object-fit: contain; }
    .lf-back .lf-src span { max-width: 118px; font-size: .72rem; }
}
@media (max-width: 760px) {
    .lf-front .lf-img { left: 52%; }
    .lf-back .lf-src { top: 20px; bottom: 4px; width: 64px; justify-content: center; }
    .lf-back .lf-src img, .lf-back .lf-src .src-ico, .lf-back .lf-src .src-emoji { width: 52px; height: 38px; line-height: 38px; font-size: 1.6rem; }
    .lf-back .lf-src span { font-size: .52rem; max-width: 64px; }
}

/* =====================================================================
   v44: телефон/планшет — шапка с балансом, «+», настройками и меню по аватарке;
   режим стримера; лучший дроп часа; автоподгонка интерфейса без вылезаний
   ===================================================================== */
/* overflow-x: clip (а не hidden) — hidden ломает «липкую» шапку и плашку */
html, body { max-width: 100%; overflow-x: clip; }
img, video, canvas { max-width: 100%; }

.hdr-icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid #23262d; background: #16181d; color: #c9d1d9; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.hdr-icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.hdr-icon-btn:hover { color: var(--gold); border-color: #3a3d45; }

/* меню по аватарке */
.mobile-menu { position: fixed; inset: 0; z-index: 5000; background: rgba(5,6,9,.6); backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .2s; }
.mobile-menu.open { opacity: 1; pointer-events: auto; }
.mm-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(360px, 92vw); background: #121318; border-left: 1px solid #23262d; padding: 16px 14px;
    overflow-y: auto; transform: translateX(100%); transition: transform .25s ease; }
.mobile-menu.open .mm-panel { transform: none; }
.mm-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.mm-head b { font-family: 'Montserrat', 'Segoe UI', sans-serif; font-weight: 900; font-size: 1.2rem; letter-spacing: 1px; }
.mm-close { background: none; border: none; color: #c9d1d9; font-size: 1.8rem; cursor: pointer; line-height: 1; }
.mm-user { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.mm-user:empty { display: none; }
.mm-user img, .mm-user > span { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: #2a2d35; display: flex; align-items: center; justify-content: center; font-weight: 900; color: var(--gold); border: 2px solid var(--gold); }
.mm-user b { display: block; color: #fff; } .mm-user i { font-style: normal; font-size: .78rem; color: #8a94a0; }
.mm-list { display: flex; flex-direction: column; gap: 8px; }
.mm-item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid #23262d; background: #1a1c22;
    color: #fff; font-weight: 800; font-size: 1rem; text-align: left; cursor: pointer; }
.mm-item:hover { border-color: var(--gold); }
.mm-item svg { width: 22px; height: 22px; fill: none; stroke: var(--gold); stroke-width: 2; flex-shrink: 0; }
.mm-item span { flex: 1; }
.mm-switch { width: 42px; height: 24px; border-radius: 12px; background: #2f323a; position: relative; transition: .2s; }
.mm-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #8a94a0; transition: .2s; }
.mm-switch.on { background: var(--gold); } .mm-switch.on::after { left: 21px; background: #000; }

/* переключатель в настройках */
.streamer-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.streamer-hint { margin: 4px 0 0; font-size: .78rem; color: #8a94a0; }
.switch { position: relative; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 13px; background: #2f323a; cursor: pointer; transition: .2s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #8a94a0; transition: .2s; }
.switch input:checked + span { background: var(--gold); }
.switch input:checked + span::after { left: 23px; background: #000; }

/* режим стримера: цены, баланс и картинки кейсов размыты */
html.streamer #balance, html.streamer #eventBalance, html.streamer #profBalance, html.streamer .price, html.streamer .lf-price,
html.streamer .pv-price, html.streamer .pv-val, html.streamer .item-price, html.streamer .case-price-tag, html.streamer .case-tag,
html.streamer .multi-total, html.streamer .hg-price, html.streamer .res-price, html.streamer .fx-price, html.streamer .tile-price,
html.streamer .rocket-stake-total, html.streamer .rocket-potential, html.streamer .best-drop-price, html.streamer .cart-total,
html.streamer .pp-stats b, html.streamer .pp-best i, html.streamer .pp-win i, html.streamer #invTotal, html.streamer .case-evt-tag,
html.streamer .hg-stat b, html.streamer .profile-balance-amount, html.streamer #sliderBalance { filter: blur(7px); user-select: none; }
html.streamer .case-image-wrapper, html.streamer #activeCaseImage, html.streamer .lf-src img, html.streamer .case-item-img-case { filter: blur(14px); }

/* лучший дроп часа */
.lf-best-label { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
#lfBestTimer { font-variant-numeric: tabular-nums; color: #c9d1d9; font-weight: 800; background: #1d1f25; padding: 1px 6px; border-radius: 6px; }
.lf-best-empty { padding: 14px 10px; border-radius: 12px; border: 1px dashed #3a3d45; color: #8a94a0; font-size: .74rem; text-align: center; }

/* подвал и широкие блоки не вылезают за экран */
.sf-top { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important; }
.sf-right { align-items: flex-start; }
.sf-social { flex-wrap: wrap; }
@media (max-width: 1300px) {
    .prof-main-card { flex-wrap: wrap; }
    .prof-main-card > * { min-width: 0; }
    .dice-layout { grid-template-columns: 1fr; }
}

/* ---------- планшет и телефон (до 1100px): шапка как на мобильных, меню по аватарке ---------- */
@media (max-width: 1100px) {
    body { padding-bottom: 0 !important; }
    #appScreen { padding-left: 0 !important; }
    #appScreen > header, #appScreen > .top-notice { margin-left: 0 !important; }
    header .header-nav { display: none !important; }
    #appScreen > header { height: 60px; padding: 0 12px; gap: 8px; }
    .header-stats { display: none !important; }
    header .header-right { gap: 6px; margin-left: auto; }
    .balance-group { display: flex; align-items: stretch; height: 40px; border-radius: 12px; overflow: hidden; }
    .balance-pill { height: 40px; padding: 0 12px; font-size: .9rem; }
    .balance-pill svg { display: none; }
    .btn-deposit { width: 40px; height: 40px; padding: 0; font-size: 0 !important; justify-content: center; }
    .btn-deposit svg { display: none; }
    .btn-deposit::before { content: '+'; font-size: 1.6rem; font-weight: 900; line-height: 1; }
    .event-pill { height: 40px; }
    .btn-profile { width: 40px; height: 40px; }
    html.guest #profileBtn { display: inline-flex !important; align-items: center; justify-content: center; }
    .btn-login { height: 40px; padding: 0 16px; }
    /* лента — горизонтальной полосой под шапкой */
    .live-feed { position: static !important; width: auto !important; flex-direction: row !important; border-right: none !important; border-bottom: 1px solid #16181d; padding: 8px 10px !important; overflow: visible; }
    .lf-track { flex-direction: row !important; gap: 8px !important; overflow-x: auto !important; align-items: stretch; padding-bottom: 4px; }
    .lf-item { flex: 0 0 132px !important; width: 132px !important; height: 96px !important; }
    .lf-best-label { display: none !important; }
    .lf-best-empty { display: none; }
    .lf-sep { width: 1px !important; height: auto !important; margin: 0 2px !important; flex-shrink: 0; }
    .lf-best::after { content: '★ Лучший за час'; position: absolute; top: 4px; left: 6px; z-index: 3; font-size: .5rem; font-weight: 900; color: #3a2a00; background: rgba(255,240,170,.92); padding: 1px 5px; border-radius: 5px; }
    .lf-front .lf-img { right: auto !important; left: 50% !important; top: 44% !important; transform: translate(-50%, -50%) !important; width: 80px !important; height: 64px !important; }
    .lf-name, .lf-cat { display: none !important; }
    .lf-badge { top: auto !important; bottom: 5px; left: auto !important; right: 5px; font-size: .56rem !important; padding: 2px 5px !important; }
    .lf-item .lf-ava-mini { display: flex !important; position: absolute; left: 5px; bottom: 5px; width: 22px; height: 22px; border-radius: 50%; object-fit: cover; font-size: .6rem; }
    .lf-back .lf-src { right: 6px !important; top: 22px !important; bottom: 4px !important; width: 70px !important; }
    .lf-back .lf-src img, .lf-back .lf-src .src-ico, .lf-back .lf-src .src-emoji { width: 56px !important; height: 40px !important; line-height: 40px; font-size: 1.7rem !important; }
    .lf-back .lf-src span { font-size: .54rem !important; max-width: 70px !important; }
    .lf-price { font-size: .64rem !important; }
    .lf-user { left: 6px !important; max-width: 56px; } .lf-ava { width: 24px !important; height: 24px !important; } .lf-user b { font-size: .52rem !important; }
    .controls-layout { grid-template-columns: 1fr !important; }
    .site-footer { margin-left: 0 !important; }
}
@media (max-width: 420px) {
    .logo-text { display: none; }
    .event-pill { display: none !important; }
    .balance-pill { padding: 0 9px; font-size: .82rem; }
    .hdr-icon-btn, .btn-profile, .btn-deposit { width: 36px !important; height: 36px !important; }
    .balance-group, .balance-pill { height: 36px !important; }
}

/* =====================================================================
   v45: окно авторизации в два столбца (как на образце), кнопки входа, 18+ в Mini App
   ===================================================================== */
.auth-modal { display: grid; grid-template-columns: 440px 440px; max-width: 94vw; min-height: 560px; background: #1e2028; border-radius: 6px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.7); }
.auth-art { position: relative; overflow: hidden; background: radial-gradient(circle at 50% 40%, rgba(255,212,0,.25), transparent 60%), linear-gradient(160deg, #2b2410 0%, #121318 70%); display: flex; align-items: center; justify-content: center; }
.auth-art > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.auth-art-logo { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.auth-art > img ~ .auth-art-logo { display: none; }
.auth-art-logo img { width: 150px; filter: drop-shadow(0 10px 30px rgba(255,200,0,.35)); }
.auth-art-logo b { font-family: 'Montserrat', 'Segoe UI', sans-serif; font-weight: 900; font-size: 2rem; letter-spacing: 2px; color: #fff; }
.auth-side { padding: 28px 24px; display: flex; flex-direction: column; gap: 12px; position: relative; }
.auth-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.auth-head h2 { margin: 0; font-family: 'Montserrat', 'Segoe UI', sans-serif; font-weight: 900; font-size: 1.5rem; color: #fff; }
.auth-head .auth-close { display: block !important; position: static; font-size: 2rem; color: #c9d1d9; background: none; border: none; cursor: pointer; line-height: 1; }
html:not(.guest) #authScreen:not(.as-modal) .auth-head .auth-close { visibility: hidden; }
.auth-providers { display: flex; flex-direction: column; gap: 8px; }
.auth-prov { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; height: 62px; padding: 0 16px; border: none; border-radius: 3px;
    background: #2b2f3c; color: #fff; font-size: 1.15rem; font-weight: 600; cursor: pointer; text-align: left; transition: background .15s; overflow: hidden; }
.auth-prov:hover { background: #343949; }
.al-ico { width: 30px; height: 30px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.al-ico img, .al-ico svg { width: 30px; height: 30px; object-fit: contain; border-radius: 50%; }
.g-overlay { position: absolute; inset: 0; opacity: 0.001; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.g-overlay > div, .g-overlay iframe { transform: scale(1.6); }
.auth-terms { display: flex; align-items: flex-start; gap: 10px; margin-top: 10px; font-size: .88rem; color: #e5e7eb; cursor: pointer; line-height: 1.35; }
.auth-terms input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--gold); flex-shrink: 0; }
.auth-terms a { color: var(--gold); text-decoration: none; }
.auth-terms.shake { animation: termsShake .45s; }
.auth-terms.shake span { color: #f87171; }
@keyframes termsShake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
#authError { color: #f87171; font-size: .82rem; min-height: 18px; }
#authScreen:not(.as-modal) { background: #0b0c10; }
@media (max-width: 920px) {
    .auth-modal { grid-template-columns: 1fr; width: min(440px, 94vw); min-height: 0; }
    .auth-art { height: 150px; }
    .auth-art-logo img { width: 70px; } .auth-art-logo b { font-size: 1.3rem; }
    .auth-prov { height: 54px; font-size: 1.02rem; }
}
/* 18+ в Mini App */
#tgAgeGate .age-btns { margin-bottom: 14px; }
#tgAgeGate .btn-yellow-pill, #tgAgeGate .btn-dark-pill { min-width: 120px; height: 46px; font-size: 1.05rem; }
#tgAgeGate .auth-terms { justify-content: center; text-align: left; }

/* =====================================================================
   v46: карточка «приза» в ракете, выбор интерфейса, хэллоуинское оформление
   ===================================================================== */
.rocket-stage { position: relative; }
.rocket-prize { position: absolute; top: 14px; right: 14px; z-index: 5; width: 150px; padding: 10px 10px 12px; border-radius: 14px;
    border: 2px solid var(--tier, var(--gold)); background: radial-gradient(circle at 50% 40%, rgba(var(--tier-rgb,255,212,0), .35), rgba(14,15,20,.92) 70%);
    display: flex; flex-direction: column; align-items: center; gap: 4px; opacity: 0; transform: scale(.9); transition: opacity .2s, transform .2s; pointer-events: none;
    box-shadow: 0 8px 30px rgba(0,0,0,.5), 0 0 24px rgba(var(--tier-rgb,255,212,0), .35); }
.rocket-prize.show { opacity: 1; transform: none; }
.rocket-prize.bump { animation: prizeBump .35s ease; }
@keyframes prizeBump { 0% { transform: scale(1.18); } 100% { transform: scale(1); } }
.rocket-prize span { font-size: .62rem; font-weight: 800; color: #c9d1d9; text-transform: uppercase; letter-spacing: .5px; }
.rocket-prize img { width: 96px; height: 80px; object-fit: contain; }
.rocket-prize b { font-size: .78rem; color: #fff; text-align: center; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rocket-prize i { font-style: normal; font-weight: 900; font-size: .8rem; color: var(--gold); display: flex; align-items: center; gap: 3px; }
@media (max-width: 760px) { .rocket-prize { width: 112px; top: 8px; right: 8px; } .rocket-prize img { width: 70px; height: 58px; } }

/* выбор интерфейса */
.theme-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.theme-opt { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; border: 2px solid #2a2d35; background: #16181d; color: #fff; font-weight: 800; cursor: pointer; }
.theme-opt.active { border-color: var(--gold); }
.theme-sw { width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0; }
.sw-normal { background: linear-gradient(135deg, var(--gold) 0 50%, #16181d 50%); }
.sw-hw { background: linear-gradient(135deg, #ff7a00 0 50%, #3b1a5a 50%); }

/* ---------- ХЭЛЛОУИН ---------- */
html.theme-halloween { --gold: #ff8a1f; --green: #a3e635; }
html.theme-halloween body { background: radial-gradient(1200px 600px at 70% -10%, rgba(140, 60, 220, .35), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(255, 110, 20, .18), transparent 60%), #0e0a16 !important; }
html.theme-halloween #appScreen > header { background: rgba(22, 12, 34, .96) !important; border-bottom: 1px solid #3b2156; }
html.theme-halloween .live-feed { background: rgba(18, 10, 28, .96) !important; border-color: #2c1842 !important; }
html.theme-halloween .panel, html.theme-halloween .slot-box, html.theme-halloween .case-card-new, html.theme-halloween .prof-main-card,
html.theme-halloween .pv-top, html.theme-halloween .pv-panel, html.theme-halloween .dice-board, html.theme-halloween .rocket-side,
html.theme-halloween .settings-box, html.theme-halloween .peer-modal-box, html.theme-halloween .auth-side, html.theme-halloween .site-footer {
    background-color: #1a1027 !important; border-color: #34204d !important; }
html.theme-halloween .top-notice { background: repeating-linear-gradient(135deg, #ff8a1f 0 18px, #6d28d9 18px 36px) !important; color: #fff; text-shadow: 0 1px 2px #000; }
html.theme-halloween .btn-main-upgrade, html.theme-halloween .btn-yellow-pill, html.theme-halloween .btn-deposit, html.theme-halloween .btn-login,
html.theme-halloween .pv-tabs button.active, html.theme-halloween .shop-cart-btn { background: linear-gradient(180deg, #ffa53a, #ff7a00) !important; color: #1a0b00 !important; }
html.theme-halloween .header-nav button.active { color: #ff8a1f !important; background: rgba(255,138,31,.12) !important; }
html.theme-halloween .logo-text, html.theme-halloween .auth-art-logo b { color: #ffb15c; text-shadow: 0 0 18px rgba(255,120,0,.5); }
html.theme-halloween .auth-art { background: radial-gradient(circle at 50% 30%, rgba(255,140,0,.35), transparent 55%), linear-gradient(170deg, #3b1a5a 0%, #120a1c 75%); }
html.theme-halloween .auth-prov { background: #2a1a3d; } html.theme-halloween .auth-prov:hover { background: #352250; }
/* украшения: паутина, летучие мыши, тыквы, луна */
.hw-deco { position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.hw-web { position: absolute; top: 0; width: 220px; height: 220px; opacity: .35;
    background: repeating-radial-gradient(circle at 0 0, transparent 0 22px, rgba(255,255,255,.55) 22px 23px),
                repeating-conic-gradient(from 0deg at 0 0, transparent 0 8deg, rgba(255,255,255,.5) 8deg 8.6deg);
    -webkit-mask: radial-gradient(circle at 0 0, #000 0 70%, transparent 71%); mask: radial-gradient(circle at 0 0, #000 0 70%, transparent 71%); }
.hw-web-l { left: 0; } .hw-web-r { right: 0; transform: scaleX(-1); }
.hw-bat { position: absolute; left: -60px; top: var(--y); font-size: calc(26px * var(--s)); filter: drop-shadow(0 0 6px rgba(160,80,255,.6)); animation: hwBat 16s linear infinite; animation-delay: var(--d); opacity: .8; }
@keyframes hwBat { 0% { transform: translateX(0) translateY(0); } 25% { transform: translateX(28vw) translateY(-30px); } 50% { transform: translateX(55vw) translateY(20px); }
    75% { transform: translateX(82vw) translateY(-15px); } 100% { transform: translateX(110vw) translateY(10px); } }
.hw-pumpkin { position: absolute; bottom: 12px; font-size: 54px; filter: drop-shadow(0 0 18px rgba(255,120,0,.75)); animation: hwGlow 2.4s ease-in-out infinite; }
.hw-p1 { left: 14px; } .hw-p2 { right: 16px; animation-delay: 1.1s; }
@keyframes hwGlow { 50% { filter: drop-shadow(0 0 30px rgba(255,140,0,1)); transform: translateY(-3px); } }
.hw-moon { position: absolute; top: 90px; right: 9%; width: 90px; height: 90px; border-radius: 50%; opacity: .25;
    background: radial-gradient(circle at 35% 35%, #fff7d6, #f2d27a 60%, #b8902f); box-shadow: 0 0 60px 20px rgba(255,230,150,.25); }
@media (max-width: 760px) { .hw-pumpkin { font-size: 34px; } .hw-web { width: 130px; height: 130px; } .hw-moon { display: none; } }
#appScreen { position: relative; z-index: 2; }
.rocket-prize { right: auto; left: 52px; }
@media (max-width: 760px) { .rocket-prize { left: 34px; right: auto; } }
html.theme-halloween .wheel-container, html.theme-halloween .placeholder-icon, html.theme-halloween .slot-fallback { filter: hue-rotate(-22deg) saturate(1.3); }
html.theme-halloween .card[class*="rarity-"]::after { filter: hue-rotate(-10deg); }

/* v47: аватарка в ленте — ровный заполненный круг */
.lf-ava, .lf-ava-mini, .pp-ava, .pv-ava { flex: 0 0 auto !important; align-self: flex-start; aspect-ratio: 1 / 1; border-radius: 50% !important; object-fit: cover; overflow: hidden; }
.lf-ava { width: 34px !important; height: 34px !important; min-width: 34px; border: 2px solid rgba(255,255,255,.35); box-sizing: border-box; }
.lf-ava.lf-ava-l, .lf-ava-mini.lf-ava-l { display: flex; align-items: center; justify-content: center; font-weight: 900; color: #fff; line-height: 1; }
.pv-ava { border-radius: 16px !important; }
@media (max-width: 1100px) { .lf-ava { width: 26px !important; height: 26px !important; min-width: 26px; } }

/* история предметов в профиле */
.il-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.il-filter { border: 1px solid #2a2d35; background: #16181d; color: #9aa1ab; font-weight: 800; padding: 8px 16px; border-radius: 10px; cursor: pointer; }
.il-filter.active { background: var(--gold); color: #000; border-color: var(--gold); }
.il-qty { position: absolute; top: 7px; left: 8px; font-size: .68rem; font-weight: 900; color: #fff; background: rgba(0,0,0,.55); padding: 1px 6px; border-radius: 6px; }
.pv-label.il-lbl-win, .pv-label.il-lbl-case { color: var(--green); }
.pv-label.il-lbl-lose { color: #f87171; }
.pv-label.il-lbl-buy { color: #60a5fa; }
.pv-label.il-lbl-sell { color: #fbbf24; }
.pv-label.il-lbl-comp { color: #fbbf24; }
.pv-label.il-lbl-spent { color: #c084fc; }
#itemLogPager { justify-content: center; margin-top: 14px; }

/* =====================================================================
   v48: хэллоуин — свой фон, больше тыкв, паутинная стрелка, всё оранжевое;
   окно тех. работ; выбор аккаунта Roblox; «Лучший дроп»
   ===================================================================== */
html.theme-halloween { --gold: #ff8a1f; }
html.theme-halloween body {
    background: linear-gradient(rgba(12, 6, 20, .55), rgba(12, 6, 20, .75)), url('images/event-fon.png') center top / cover fixed,
                radial-gradient(1200px 600px at 70% -10%, rgba(140, 60, 220, .35), transparent 60%), #0e0a16 !important; }
html.theme-halloween .btn-deposit:hover, html.theme-halloween .btn-login:hover { background: #ffa53a !important; }
html.theme-halloween .rarity-gold { --tier: #ff8a1f; --tier-rgb: 255, 138, 31; }
html.theme-halloween .lf-item.lf-best { background: linear-gradient(110deg, #3a1d05 0%, #b4530a 52%, #ff8a1f 100%); border-left-color: #ff8a1f; }
html.theme-halloween .lf-best .bd-chev path { fill: #ffc078; }
html.theme-halloween .pv-tabs button.active, html.theme-halloween .il-filter.active, html.theme-halloween .theme-opt.active { border-color: #ff8a1f; }
html.theme-halloween .ptr-normal { display: none; }
.ptr-web { display: none; }
html.theme-halloween .ptr-web { display: block; filter: drop-shadow(0 0 6px rgba(255,138,31,.8)); }
/* тыквы по всему низу экрана */
.hw-pk { position: absolute; bottom: 8px; left: var(--x); font-size: var(--sz); transform: translateX(-50%); animation: hwGlow 2.6s ease-in-out infinite; animation-delay: var(--dl); }
@media (max-width: 760px) { .hw-pk { font-size: calc(var(--sz) * .6); } .hw-pk:nth-child(even) { display: none; } }

/* «Лучший дроп»: пустая карточка того же размера */
.lf-best-none { display: flex !important; align-items: center; justify-content: center; text-align: center; padding: 10px 14px !important; }
.lf-best-none span { position: relative; z-index: 1; font-weight: 900; color: #fff; font-size: .82rem; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
@media (min-width: 1101px) { .lf-best-none { height: 118px !important; } }
#lfBestTimer { display: none; }

/* окно «Технические работы» */
.dep-maint { flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 60px 20px; text-align: center; color: #fff; font-size: 1.1rem; }
.dep-maint-ico { font-size: 3rem; animation: hwGlow 2.4s ease-in-out infinite; }

/* выбор аккаунта Roblox */
.rb-results { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; max-height: 230px; overflow-y: auto; }
.rb-results:empty { display: none; }
.rb-acc { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 10px; border: 2px solid #2a2d35; background: #16181d; color: #fff; cursor: pointer; text-align: left; }
.rb-acc:hover { border-color: #3a3d45; }
.rb-acc.active { border-color: var(--gold); background: rgba(255, 200, 0, .06); }
.rb-acc img, .rb-noava { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #23262d; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rb-acc b { display: block; font-size: .9rem; } .rb-acc i { font-style: normal; font-size: .75rem; color: #8a94a0; }
.rb-hint { font-size: .78rem; color: #8a94a0; padding: 4px 2px; }
#depTermsRow { margin: 4px 0 10px; }
/* статус заявки */
.dep-wait { color: #c9d1d9; font-size: .86rem; line-height: 1.5; margin: 6px 0; }
.dep-req-item { font-weight: 800; color: var(--gold); }
.dep-rej { color: #f87171 !important; }
.dep-bot-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: #1d1f25; border: 1px solid #2f323a; margin: 8px 0 10px; }
.dep-bot-card img, .dep-bot-card .rb-noava { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); }
.dep-bot-card span { display: block; font-size: .72rem; color: #8a94a0; } .dep-bot-card b { font-size: 1rem; color: #fff; }
.dep-join { margin-left: auto; text-decoration: none; padding: 10px 22px !important; }
.dep-profile { margin-left: auto; color: var(--gold); font-weight: 800; font-size: .82rem; text-decoration: none; }
.rb-manual i { color: var(--gold) !important; }

/* v50: уведомления, окно «заявка принята», минимальные суммы */
#notifyStack { position: fixed; top: 80px; right: 16px; z-index: 6000; display: flex; flex-direction: column; gap: 8px; width: min(340px, 92vw); pointer-events: none; }
.notify-card { pointer-events: auto; cursor: pointer; padding: 12px 14px; border-radius: 12px; background: #1d1f25; border: 1px solid #2f323a; border-left: 4px solid var(--gold);
    box-shadow: 0 10px 30px rgba(0,0,0,.5); transform: translateX(120%); opacity: 0; transition: transform .35s cubic-bezier(.2,1.2,.4,1), opacity .3s; }
.notify-card.show { transform: none; opacity: 1; }
.notify-card b { display: block; color: #fff; font-size: .92rem; margin-bottom: 2px; }
.notify-card span { color: #aab2bd; font-size: .8rem; }
html.theme-halloween .notify-card { background: #1f1330; border-color: #3b2156; }
.trade-modal-box { text-align: center; width: min(460px, 94vw); }
.tm-badge { font-size: 2.6rem; margin-bottom: 4px; animation: hwGlow 2.4s ease-in-out infinite; }
.trade-modal-box h2 { margin: 0 0 12px; font-size: 1.3rem; color: #fff; }
.tm-item { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 8px; }
.tm-item img { width: 64px; height: 56px; object-fit: contain; }
.tm-item b { color: var(--gold); }
.trade-modal-box .dep-trade-steps { text-align: left; }
.tm-ok { margin-top: 12px; min-width: 160px; height: 44px; }
.dep-min-hint { color: #f87171; font-size: .8rem; font-weight: 700; margin: 2px 0 6px; }
#wdTermsRow { margin: 0 0 14px; }
#wdResults { margin-top: 10px; }

/* v51: заявки в профиле, уведомления чуть ниже */
#notifyStack { top: calc(var(--notice-h, 0px) + 84px); }
.req-list { display: flex; flex-direction: column; gap: 8px; }
.req-row { display: grid; grid-template-columns: 56px 1fr auto auto; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px;
    background: #1d1f25; border: 1px solid #2a2d35; border-left: 4px solid #6b7280; }
.req-row img { width: 52px; height: 46px; object-fit: contain; }
.req-main b { display: block; color: #fff; }
.req-main span { font-size: .78rem; color: #8a94a0; }
.req-st { font-weight: 800; font-size: .84rem; color: #c9d1d9; white-space: nowrap; }
.req-row.st-pending { border-left-color: #fbbf24; } .req-row.st-pending .req-st { color: #fbbf24; }
.req-row.st-approved { border-left-color: var(--green); } .req-row.st-approved .req-st { color: var(--green); }
.req-row.st-done { border-left-color: #60a5fa; } .req-row.st-done .req-st { color: #60a5fa; }
.req-row.st-rejected { border-left-color: #f87171; opacity: .75; } .req-row.st-rejected .req-st { color: #f87171; }
.req-open { height: 38px; padding: 0 16px; }
html.theme-halloween .req-row { background: #1f1330; border-color: #3b2156; }
@media (max-width: 760px) {
    .req-row { grid-template-columns: 46px 1fr; }
    .req-st, .req-open { grid-column: 1 / -1; }
}

/* =====================================================================
   v52: исправления интерфейса на телефоне
   ===================================================================== */
/* кнопка во время отправки заявки */
.btn-main-upgrade.is-busy { background: #3a3d45 !important; color: #9aa1ab !important; cursor: wait; pointer-events: none; }
.btn-main-upgrade.is-busy::after { content: ''; display: inline-block; width: 14px; height: 14px; margin-left: 10px; vertical-align: -2px;
    border: 2px solid #9aa1ab; border-top-color: transparent; border-radius: 50%; animation: spinBusy .8s linear infinite; }
@keyframes spinBusy { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
    /* ---- профиль: карточки в одну колонку, ничего не вылезает за экран ---- */
    #profileView { padding: 12px 10px !important; }
    .prof-main-card { flex-direction: column !important; padding: 12px !important; gap: 12px !important; width: 100%; box-sizing: border-box; }
    .prof-col-left, .prof-col-center, .prof-col-right { flex: 1 1 auto !important; width: 100% !important; min-width: 0 !important; box-sizing: border-box; }
    .prof-col-center { padding: 14px !important; }
    .user-header { min-width: 0; }
    .profile-balance-amount, .balance-large { font-size: 1.9rem !important; }
    .coupon-box, .coupon-row, .prof-coupon { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
    .prof-col-center input, #couponInput { min-width: 0; flex: 1 1 140px; width: auto; }
    .prof-col-center button { flex: 0 0 auto; }
    .prof-col-right .mini-stats-row { display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px; }
    .prof-col-right .mini-stats-row > * { min-width: 0; }
    .profile-inventory-section { padding: 0 !important; }
    /* вкладки профиля — одной строкой с прокруткой вбок */
    .inv-tabs { flex-wrap: nowrap !important; overflow-x: auto; padding: 10px !important; gap: 6px !important; scrollbar-width: none; }
    .inv-tabs::-webkit-scrollbar { display: none; }
    .inv-tab { flex: 0 0 auto; white-space: nowrap; padding: 9px 12px !important; font-size: .82rem !important; }
    .inv-actions { margin-left: 0 !important; flex: 0 0 auto; }
    #profileInventoryGrid, #profileItemsContainer, #profileReqsContainer, #profileHistoryContainer { padding: 12px !important; }
    .empty-actions { flex-direction: column; align-items: stretch; width: 100%; max-width: 280px; margin: 0 auto; }
    .empty-actions button { width: 100%; }

    /* ---- окно пополнения: одна прокрутка на всё окно, сетка брейнротов нормального размера ---- */
    #depositModal { align-items: flex-end !important; padding: 0 !important; }
    .deposit-modal-box { height: auto !important; max-height: 92vh !important; border-radius: 18px 18px 0 0 !important; overflow-y: auto !important; width: 100% !important; max-width: 100% !important; }
    .deposit-modal-header { position: sticky; top: 0; z-index: 3; background: var(--bg-panel); padding: 14px 16px !important; }
    .dep-tabs { position: sticky; top: 52px; z-index: 3; background: var(--bg-panel); }
    #depositBrainrots, #depositSbp { overflow: visible !important; height: auto !important; flex: none !important; }
    .dep-grid-new { flex: none !important; max-height: 300px; overflow-y: auto; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; padding: 10px 14px !important; gap: 8px !important; }
    .dep-grid-new .card { aspect-ratio: 1 / 1; }
    .dep-inputs-area { padding: 10px 14px 18px !important; }
    .dep-selected-bar, #depSelectedBar { padding: 10px 14px !important; }
    .dep-maint { padding: 40px 16px; }

    /* ---- окно вывода ---- */
    #withdrawModal { align-items: flex-end !important; padding: 0 !important; }
    .withdraw-modal-box { width: 100% !important; max-width: 100% !important; max-height: 92vh; overflow-y: auto; border-radius: 18px 18px 0 0 !important; padding: 18px 16px !important; box-sizing: border-box; }
    .withdraw-modal-box h2 { font-size: 1.25rem !important; }
    .withdraw-modal-box > div:first-child { margin-bottom: 14px !important; }
    .withdraw-item-preview { padding: 14px !important; margin-bottom: 14px !important; }
    .withdraw-item-preview img:not(.currency-img) { width: 120px !important; height: 100px !important; }
    #withdrawItemName { font-size: 1.15rem !important; }
    .withdraw-modal-box .dep-qty-controls { transform: none !important; }
    .withdraw-modal-box > div:nth-child(3) { flex-wrap: wrap; gap: 8px; margin-bottom: 14px !important; padding: 0 !important; }
    .withdraw-modal-box .dep-input-group { margin-bottom: 14px !important; }
    #withdrawNick { padding: 13px !important; font-size: 1rem !important; }
    #withdrawActionBtn { padding: 15px !important; font-size: 1.05rem !important; }

    /* ---- остальные окна не шире экрана ---- */
    .settings-box, .cart-modal-box, .currency-modal-box, .peer-modal-box { width: 94vw !important; max-width: 94vw !important; max-height: 88vh; overflow-y: auto; box-sizing: border-box; }
    .modal-overlay { padding: 10px; box-sizing: border-box; }
}
@media (max-width: 380px) {
    .dep-grid-new { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .prof-col-right .mini-stats-row { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
    .theme-opts { grid-template-columns: 1fr !important; }
    .theme-opt { min-width: 0; }
    .cart-item { flex-wrap: wrap; gap: 8px; }
    .cart-item > * { min-width: 0; }
    .cart-item-actions { margin-left: auto; }
}
.maint-box { text-align: center; width: min(380px, 92vw); }
.maint-box h3 { margin: 10px 0 18px; color: #fff; font-size: 1.15rem; }
.maint-box .btn-yellow-pill { min-width: 140px; height: 44px; }
#nickInput { margin-bottom: 4px; }

/* v55: окно пополнения — одна прокрутка и авторазмер на любом экране (и в Telegram на компьютере) */
.deposit-modal-box { height: auto !important; max-height: min(92vh, 900px) !important; overflow-y: auto !important; }
.deposit-modal-header { position: sticky; top: 0; z-index: 3; background: var(--bg-panel); }
.dep-tabs { position: sticky; top: 62px; z-index: 3; background: var(--bg-panel); }
#depositBrainrots, #depositSbp { overflow: visible !important; height: auto !important; flex: none !important; }
.dep-grid-new { flex: none !important; max-height: min(320px, 38vh); min-height: 150px; overflow-y: auto; }
.withdraw-modal-box { max-height: 92vh; overflow-y: auto; }
/* админ-панель: выдача по ID */
.adm-section { display: flex; flex-direction: column; gap: 2px; margin: 10px 0 8px; }
.adm-section b { color: #fff; } .adm-section span { font-size: .76rem; color: #8a94a0; }

/* v56: админ-панель в профиле — заметная кнопка */
.admin-btn-big { display: none; align-items: center; gap: 6px; margin-left: 6px; height: 30px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--gold);
    background: rgba(255, 138, 31, .12); color: var(--gold); font-weight: 800; font-size: .8rem; cursor: pointer; white-space: nowrap; }
.admin-btn-big:hover { background: var(--gold); color: #000; }

/* окно пополнения: обычная (не flex) колонка — содержимое не сжимается, всё окно прокручивается
   и полоса прокрутки всегда видна */
.deposit-modal-box { display: block !important; height: auto !important; max-height: min(92vh, 900px) !important; overflow-y: scroll !important;
    scrollbar-width: auto; scrollbar-color: var(--gold) #15171c; }
.deposit-modal-box::-webkit-scrollbar { width: 10px; }
.deposit-modal-box::-webkit-scrollbar-track { background: #15171c; border-radius: 0 16px 16px 0; }
.deposit-modal-box::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 10px; border: 2px solid #15171c; }
#depositBrainrots { display: none; }
#depositBrainrots.dep-show { display: block !important; }
#depositBrainrots:not(.dep-show) { display: none !important; }
.dep-grid-new { min-height: 240px; max-height: min(330px, 40vh); overflow-y: auto; scrollbar-color: var(--gold) #15171c; }
.dep-grid-new::-webkit-scrollbar { width: 8px; } .dep-grid-new::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 8px; }
@media (max-width: 760px) { .dep-grid-new { min-height: 200px; } }

/* v57: блок «Выдать деньги игроку по ID» — первым в админ-панели */
.adm-give { display: flex; flex-direction: column; gap: 8px; padding: 14px; margin-bottom: 14px; border-radius: 12px; border: 1px solid var(--gold); background: rgba(255,138,31,.07); }
.adm-give-title { font-weight: 900; color: #fff; font-size: 1.05rem; }
.adm-give-hint { font-size: .76rem; color: #8a94a0; margin-bottom: 2px; }
.adm-give input { height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid #2a2d35; background: #0f1115; color: #fff; font-size: .95rem; width: 100%; box-sizing: border-box; }
.adm-give-btn { height: 46px; width: 100%; font-size: 1rem; }
/* кнопка админ-панели не должна залезать под соседнюю карточку */
.user-id-row { flex-wrap: wrap; row-gap: 6px; }
.prof-col-left .user-info { min-width: 0; }
.admin-btn-big { margin-left: 0; flex-basis: 100%; justify-content: center; position: relative; z-index: 2; }
.adm-give input { flex: none !important; height: 42px !important; min-height: 42px; }
.nick-row { display: flex; gap: 8px; }
.nick-row input { flex: 1; min-width: 0; height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid #2a2d35; background: #0f1115; color: #fff; font-size: .95rem; }
.nick-row .btn-yellow-pill { height: 42px; padding: 0 16px; flex-shrink: 0; }

/* v61 */ онлайн и счётчик апгрейдов */
.header-stats .stat b { font-variant-numeric: tabular-nums; }
.site-stats-bar { display: none; }
@media (max-width: 1400px) {
    .site-stats-bar { display: flex; justify-content: center; gap: 18px; padding: 6px 10px; font-size: .78rem; color: #aab2bd;
        background: rgba(12,13,17,.92); border-bottom: 1px solid #16181d; }
    html.theme-halloween .site-stats-bar { background: rgba(22,12,34,.92); border-color: #2c1842; }
    .site-stats-bar b { color: #fff; font-variant-numeric: tabular-nums; }
    .ss-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 8px #22c55e; margin-right: 6px; vertical-align: 1px; animation: lfPulse 1.6s ease-in-out infinite; }
}
.stat svg path[d^="m17 11"] { stroke: var(--gold); }

/* v62: причина отказа, отмена заявки, кнопка Join */
.req-reason { grid-column: 2 / -1; font-size: .8rem; color: #f87171; margin-top: -4px; }
.req-cancel { height: 38px; padding: 0 16px; color: #f87171 !important; }
.req-row { grid-template-columns: 56px 1fr auto auto auto; }
.req-row.st-cancelled { border-left-color: #6b7280; opacity: .6; }
.tm-join { display: flex; align-items: center; justify-content: center; height: 48px; margin: 4px 0 10px; text-decoration: none; font-size: 1.02rem; }
@media (max-width: 760px) { .req-row { grid-template-columns: 46px 1fr; } .req-reason, .req-cancel { grid-column: 1 / -1; } }

/* v64: партнёрская программа */
.btn-partner { display: none; width: 100%; align-items: center; justify-content: center; gap: 8px; height: 42px; margin-bottom: 8px; border-radius: 10px;
    border: 1px solid var(--gold); background: rgba(255,138,31,.12); color: var(--gold); font-weight: 900; cursor: pointer; }
.btn-partner:hover { background: var(--gold); color: #000; }
.prof-actions { flex-direction: column; }
.partner-box { width: min(520px, 94vw); }
.pt-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.pt-stats div { background: #23252b; border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 3px; }
.pt-stats span { font-size: .72rem; color: #8a94a0; } .pt-stats b { color: #fff; display: flex; align-items: center; gap: 3px; }
.pt-block { background: #1d1f25; border: 1px solid #2a2d35; border-radius: 12px; padding: 12px; margin-bottom: 10px; }
html.theme-halloween .pt-block, html.theme-halloween .pt-stats div { background: #1f1330; border-color: #3b2156; }
.pt-title { font-weight: 900; color: #fff; margin-bottom: 4px; display: flex; justify-content: space-between; align-items: center; }
.pt-count { font-size: .74rem; color: var(--gold); font-weight: 800; }
.pt-hint { font-size: .78rem; color: #9aa1ab; margin-bottom: 8px; line-height: 1.45; }
.pt-copy { display: flex; gap: 8px; }
.pt-copy input, .pt-row input { flex: 1; min-width: 0; height: 40px; padding: 0 10px; border-radius: 9px; border: 1px solid #2a2d35; background: #0f1115; color: #fff; font-weight: 700; }
.pt-copy .btn-yellow-pill { height: 40px; padding: 0 14px; white-space: nowrap; }
.pt-row { display: flex; gap: 8px; margin-bottom: 8px; }
.pt-row label { flex: 1; display: flex; flex-direction: column; gap: 4px; font-size: .74rem; color: #8a94a0; }
.pt-create { width: 100%; height: 44px; }
.pt-create:disabled { opacity: .5; cursor: not-allowed; }
.pt-coupons { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; max-height: 180px; overflow-y: auto; }
.pt-coupon { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 8px; background: #0f1115; }
.pt-coupon b { color: var(--gold); letter-spacing: .5px; } .pt-coupon span { flex: 1; font-size: .78rem; color: #9aa1ab; }
.pt-coupon button { background: none; border: none; cursor: pointer; font-size: 1rem; }

/* v65: красивая кнопка партнёрской программы */
.btn-partner { position: relative; overflow: hidden; display: none; align-items: center; gap: 12px; width: 100%; height: auto !important; min-height: 58px;
    padding: 10px 14px; margin-bottom: 10px; border-radius: 14px; border: 1px solid rgba(255,190,90,.55);
    background: linear-gradient(115deg, #3a1d05 0%, #7a3a08 45%, #ff8a1f 100%); color: #fff; text-align: left; cursor: pointer;
    box-shadow: 0 6px 22px rgba(255,138,31,.28), inset 0 1px 0 rgba(255,255,255,.18); transition: transform .15s, box-shadow .2s; }
.btn-partner::after { content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; transform: skewX(-20deg);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent); animation: bpShine 3.2s ease-in-out infinite; }
@keyframes bpShine { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.btn-partner:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(255,138,31,.42), inset 0 1px 0 rgba(255,255,255,.2); background: linear-gradient(115deg, #3a1d05 0%, #7a3a08 45%, #ff8a1f 100%); color: #fff; }
.bp-ico { width: 38px; height: 38px; flex-shrink: 0; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 1.35rem;
    background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.18); }
.bp-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bp-text b { font-size: .95rem; font-weight: 900; letter-spacing: .2px; }
.bp-text i { font-style: normal; font-size: .72rem; color: rgba(255,240,220,.85); display: flex; align-items: center; gap: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-text i .currency-img { width: 12px; height: 12px; }
.bp-arrow { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: #fff; stroke-width: 2.5; opacity: .85; }

/* =====================================================================
   v66: бейдж ивент-монет, картинка кейса ниже центра, условия бесплатных кейсов,
   уровни, страница партнёра, история игр чужих игроков
   ===================================================================== */
.case-tag.case-tag-evt { background: rgba(124, 58, 237, .25); border-color: rgba(167, 139, 250, .5); color: #e9d5ff; }
.case-tag.case-tag-task { background: rgba(34, 197, 94, .15); border-color: rgba(34, 197, 94, .45); color: #86efac; }
.case-evt-tag { display: none !important; }
.case-card-new .case-image-wrapper { display: flex; align-items: center; justify-content: center; padding-top: 12%; box-sizing: border-box; }
.case-card-new .case-emoji { font-size: 4.2rem; line-height: 1; }
.case-hero { display: flex; align-items: center; justify-content: center; padding-top: 3%; }
.case-hero-emoji { font-size: 7rem; line-height: 1; align-items: center; justify-content: center; filter: drop-shadow(0 10px 30px rgba(255,138,31,.35)); }

.case-task { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: #1d1f25; border: 1px dashed #3a3d45; max-width: 520px; width: 100%; box-sizing: border-box; }
html.theme-halloween .case-task { background: #1f1330; border-color: #4a2a6b; }
.case-task > b { display: block; color: #fff; margin-bottom: 8px; }
.case-task p { margin: 0; color: #c9d1d9; font-size: .86rem; }
.ct-step { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 0; color: #c9d1d9; font-size: .86rem; }
.ct-step > span { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #2f323a; color: #fff; font-weight: 900; font-size: .74rem; flex-shrink: 0; }
.ct-step.done > span { background: var(--green); color: #052e12; }
.ct-step .btn-dark-pill { margin-left: auto; height: 32px; padding: 0 12px; font-size: .78rem; }
.ct-step code { background: #0f1115; padding: 2px 6px; border-radius: 6px; color: var(--gold); }

/* уровни */
.prof-level { display: flex; align-items: center; gap: 8px; margin: 4px 0 6px; }
.lvl-badge { padding: 2px 8px; border-radius: 7px; background: linear-gradient(135deg, #ff8a1f, #ffd400); color: #1a0b00; font-weight: 900; font-size: .74rem; white-space: nowrap; }
.lvl-bar { width: 90px; height: 6px; border-radius: 4px; background: #2a2d35; overflow: hidden; }
.lvl-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ff8a1f, #ffd400); }
.lvl-text { font-size: .7rem; color: #8a94a0; white-space: nowrap; }
.btn-profile { position: relative; }
.lvl-dot { position: absolute; right: -4px; bottom: -4px; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 8px; background: linear-gradient(135deg, #ff8a1f, #ffd400);
    color: #1a0b00; font-size: .62rem; font-weight: 900; display: flex; align-items: center; justify-content: center; border: 2px solid #0b0c10; box-sizing: border-box; }

/* страница партнёра и баннер */
.partner-page h2 { margin: 4px 0 14px; color: #fff; }
.pt-banner { width: 100%; height: 40px; margin-top: 8px; }
/* история игр чужого игрока */
.pv-hist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 760px) { .pv-hist { grid-template-columns: 1fr; } }

/* =====================================================================
   v67: страница партнёра (слева купоны и промокоды, справа ник и аватар),
   режим стримера — баланс виден
   ===================================================================== */
.partner-layout { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; width: 100%; }
.partner-side { position: sticky; top: calc(var(--notice-h, 0px) + 84px); }
.ps-card { background: #1d1f25; border: 1px solid #2f323a; border-radius: 18px; padding: 22px 18px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
html.theme-halloween .ps-card { background: #1f1330; border-color: #3b2156; }
.ps-ava { width: 110px; height: 110px; border-radius: 22px; object-fit: cover; border: 3px solid var(--gold); box-shadow: 0 8px 30px rgba(255,138,31,.3); }
.ps-letter { display: flex; align-items: center; justify-content: center; font-size: 3rem; font-weight: 900; color: var(--gold); background: #0f1115; }
.ps-name { font-size: 1.35rem; font-weight: 900; color: #fff; margin-top: 6px; word-break: break-word; }
.ps-id { font-size: .8rem; color: #8a94a0; padding: 2px 10px; border: 1px solid #3a3d45; border-radius: 8px; }
.ps-level { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.ps-level span { color: #9aa1ab; font-size: .82rem; }
.ps-level b { min-width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; font-weight: 900;
    background: linear-gradient(135deg, #ff8a1f, #ffd400); color: #1a0b00; }
.ps-lvlbar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; width: 100%; }
.ps-lvlbar i { height: 8px; border-radius: 4px; background: #2f323a; }
.ps-lvlbar i.on { background: linear-gradient(90deg, #ff8a1f, #ffd400); }
.ps-perks { width: 100%; display: flex; flex-direction: column; gap: 6px; margin-top: 10px; text-align: left; }
.ps-perks div { font-size: .82rem; color: #8a94a0; padding: 8px 10px; border-radius: 9px; background: #0f1115; }
.ps-perks div.ok { color: #d1fae5; }
.pt-locked { padding: 12px; border-radius: 10px; background: #0f1115; color: #fbbf24; font-size: .84rem; font-weight: 700; }
.partner-page .pt-coupons { max-height: none; }
@media (max-width: 900px) {
    .partner-layout { grid-template-columns: 1fr; }
    .partner-side { position: static; order: -1; }
    .ps-card { flex-direction: row; flex-wrap: wrap; justify-content: center; }
}

/* режим стримера: баланс, цены и кейсы скрыты; при наведении — показываются (см. v75) */
.pt-row input { flex: none !important; height: 40px !important; min-height: 40px; width: 100%; box-sizing: border-box; }

/* v70: большой логотип (images/logo-big.png) в шапке и над колесом */
.logo-big { display: block; height: 46px; width: auto; object-fit: contain; filter: drop-shadow(0 4px 14px rgba(255,170,0,.25)); }
.logo.has-big .logo-img, .logo.has-big .logo-text { display: none !important; }
.page-logo .page-logo-big { height: 92px; }
.page-logo.has-big .page-logo-img, .page-logo.has-big .logo-text { display: none !important; }
@media (max-width: 1100px) { .logo-big { height: 36px; } .page-logo .page-logo-big { height: 70px; } }
@media (max-width: 420px) { .logo-big { height: 30px; max-width: 46vw; } .logo.has-big .logo-big { display: block !important; } }
/* кэшбек: крестик «пропустить» */
.cb-x { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 14px); right: 16px; z-index: 5; width: 44px; height: 44px; border-radius: 50%;
    border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.45); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.cb-x:hover { background: rgba(255,255,255,.15); }
.cb-overlay { cursor: pointer; }
.cb-overlay #cbPanel { cursor: default; }

/* v71: промокод активирован, сумма пополнения, таймер трейда */
.promo-active { display: none; flex-wrap: wrap; align-items: center; gap: 4px; margin: -6px 0 12px; padding: 9px 12px; border-radius: 10px;
    background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.4); color: #bbf7d0; font-size: .84rem; }
.promo-active b { color: #fff; }
.promo-active i { flex-basis: 100%; font-style: normal; font-size: .72rem; color: #86efac; opacity: .85; }
.dep-bonus { color: var(--green); font-weight: 800; margin-left: 6px; display: inline-flex; align-items: center; gap: 3px; }
#depSummaryText { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.tm-timer { margin: 4px auto 10px; padding: 8px 14px; border-radius: 10px; background: rgba(255,138,31,.12); border: 1px solid rgba(255,138,31,.45); color: #ffd7a8; font-size: .92rem; display: inline-block; }
.tm-timer b { color: #fff; font-variant-numeric: tabular-nums; font-size: 1.05rem; }
.tm-timer.late { background: rgba(248,113,113,.12); border-color: rgba(248,113,113,.5); color: #fecaca; }

/* v72: заявки в админ-панели */
.adm-reqs { border-color: #3b82f6; background: rgba(59,130,246,.07); }
.adm-req-list { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; }
.adm-req { display: grid; grid-template-columns: 44px 1fr; gap: 10px; padding: 10px; border-radius: 10px; background: #0f1115; border-left: 4px solid var(--green); }
.adm-req.wd { border-left-color: #60a5fa; } .adm-req.st-expired { border-left-color: #f87171; opacity: .85; }
.adm-req img { width: 44px; height: 40px; object-fit: contain; }
.adm-req-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.adm-req-main b { color: #fff; font-size: .86rem; } .adm-req-main span { font-size: .74rem; color: #9aa1ab; }
.adm-req-main code { color: var(--gold); font-weight: 800; font-size: .82rem; }
.adm-req-time { color: #fbbf24 !important; font-weight: 800; }
.adm-req-btns { grid-column: 1 / -1; display: flex; gap: 6px; align-items: center; }
.adm-req-btns .btn-yellow-pill { height: 36px; padding: 0 14px; flex: 1; }
.adm-req-btns .btn-dark-pill { height: 36px; width: 42px; padding: 0; }
.adm-req-btns select { height: 36px !important; flex: 0 0 auto !important; max-width: 150px; border-radius: 9px; background: #16181d; color: #fff; border: 1px solid #2a2d35; }
.adm-hint { font-size: .8rem; color: #8a94a0; padding: 6px 2px; }

/* =====================================================================
   v74: вкладка «Бонусы», галочка партнёра
   ===================================================================== */
.verified { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin-left: 4px; vertical-align: 2px;
    border-radius: 50%; background: #3b82f6; color: #fff; font-size: .62rem; font-weight: 900; box-shadow: 0 0 0 2px rgba(59,130,246,.25); }
.bonus-view { max-width: 1200px; width: 100%; flex-direction: column; align-items: stretch; gap: 18px; padding: 24px 32px !important; margin: 0 auto; }
.bonus-hero { position: relative; overflow: hidden; border-radius: 22px; min-height: 230px; padding: 34px 40px; display: flex; align-items: center;
    background: radial-gradient(500px 280px at 80% 50%, rgba(255,170,0,.35), transparent 70%), linear-gradient(120deg, #15161b 0%, #1d1a14 100%);
    border: 1px solid #2a2d35; }
.bonus-hero::after { content: ''; position: absolute; right: 30px; top: 50%; width: 260px; height: 260px; transform: translateY(-50%);
    background: url('images/fortunu_and_cashuru.png') center/contain no-repeat; filter: drop-shadow(0 10px 30px rgba(255,190,0,.35)); }
html.theme-halloween .bonus-hero { background: radial-gradient(500px 280px at 80% 50%, rgba(255,120,0,.35), transparent 70%), linear-gradient(120deg, #1a1027 0%, #241430 100%); border-color: #3b2156; }
.bh-sub { font-size: .72rem; font-weight: 900; letter-spacing: 2px; background: linear-gradient(90deg, #ff8a1f, #ffd400); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bonus-hero h1 { margin: 6px 0 20px; font-size: 3rem; font-weight: 900; color: #fff; }
.bh-btn { height: 46px; padding: 0 22px; font-size: 1rem; }
.bonus-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bonus-link, .bonus-channel { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 16px; background: #17191e; border: 1px solid #23262d;
    color: #fff; text-align: left; cursor: pointer; text-decoration: none; font: inherit; }
.bonus-link:hover, .bonus-channel:hover { border-color: var(--gold); }
html.theme-halloween .bonus-link, html.theme-halloween .bonus-channel { background: #1a1027; border-color: #34204d; }
.bl-ico { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; background: rgba(255,170,0,.12); flex-shrink: 0; }
.bonus-link div, .bonus-channel div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.bonus-link b, .bonus-channel b { font-weight: 800; } .bonus-link i, .bonus-channel i { font-style: normal; font-size: .8rem; color: #8a94a0; }
.bl-arrow { color: #8a94a0; font-size: 1.1rem; }
.bonus-head { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.bonus-head h2 { margin: 0; font-size: 1.5rem; color: #fff; } .bonus-head span { font-size: .84rem; color: #8a94a0; }
.bonus-cases { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bonus-case { display: grid; grid-template-columns: 45% 1fr; min-height: 210px; border-radius: 18px; overflow: hidden; cursor: pointer;
    background: linear-gradient(135deg, #15161b, #1b1d23); border: 1px solid #23262d; transition: border-color .15s, transform .15s; }
.bonus-case:hover { border-color: var(--gold); transform: translateY(-2px); }
html.theme-halloween .bonus-case { background: linear-gradient(135deg, #1a1027, #20132f); border-color: #34204d; }
.bc-img { display: flex; align-items: center; justify-content: center; padding: 14px; background: radial-gradient(circle, rgba(255,170,0,.12), transparent 70%); }
.bc-img img { max-width: 100%; max-height: 180px; object-fit: contain; }
.bc-emoji { font-size: 5rem; }
.bc-body { display: flex; flex-direction: column; padding: 18px 18px 16px; border-left: 1px dashed #2f323a; }
.bc-top { display: flex; justify-content: space-between; gap: 8px; font-size: .72rem; color: #8a94a0; margin-bottom: 10px; }
.bc-name { font-size: 1.3rem; font-weight: 900; color: #fff; margin-bottom: 6px; }
.bc-desc { font-size: .84rem; color: #9aa1ab; line-height: 1.45; flex: 1; }
.bc-open { margin-top: 12px; padding-top: 12px; border-top: 1px solid #2a2d35; display: flex; justify-content: space-between; font-weight: 800; color: #fff; font-size: .86rem; }
@media (max-width: 860px) {
    .bonus-view { padding: 14px 12px !important; }
    .bonus-row, .bonus-cases { grid-template-columns: 1fr; }
    .bonus-hero { padding: 24px; min-height: 170px; } .bonus-hero h1 { font-size: 2.2rem; }
    .bonus-hero::after { width: 150px; height: 150px; right: 10px; opacity: .6; }
    .bonus-case { grid-template-columns: 38% 1fr; min-height: 170px; }
}
.pt-partner-cta { border-color: rgba(59,130,246,.45); }

/* v75: колесо фортуны и режим «Азартная» */
.radio-sub { display: block; font-size: .74rem; color: #8a94a0; margin-top: 2px; }
.wheel-tile { display: flex; align-items: center; gap: 14px; width: 100%; padding: 18px 20px; border-radius: 16px; cursor: pointer; text-align: left; font: inherit; color: #fff;
    border: 1px solid rgba(255,170,0,.45); background: linear-gradient(120deg, rgba(255,138,31,.16), rgba(124,58,237,.14)); }
.wheel-tile:hover { border-color: var(--gold); }
.wt-ico { font-size: 2rem; width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.25); }
.wheel-tile div { flex: 1; display: flex; flex-direction: column; gap: 3px; } .wheel-tile b { font-size: 1.05rem; font-weight: 900; } .wheel-tile i { font-style: normal; font-size: .8rem; color: #c9d1d9; }
.wt-pill { padding: 6px 12px; border-radius: 9px; background: var(--gold); color: #1a0b00; font-weight: 900; font-size: .8rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wheel-box { text-align: center; width: min(430px, 94vw); }
.wheel-wrap { position: relative; width: min(360px, 80vw); margin: 4px auto 10px; }
.wheel-wrap canvas { width: 100%; height: auto; display: block; filter: drop-shadow(0 8px 30px rgba(255,138,31,.35)); }
.wheel-arrow { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); width: 0; height: 0; z-index: 2;
    border-left: 16px solid transparent; border-right: 16px solid transparent; border-top: 28px solid #ffd400; filter: drop-shadow(0 2px 4px rgba(0,0,0,.6)); }
.wheel-info { font-size: .84rem; color: #9aa1ab; margin-bottom: 8px; }
.wheel-result { margin: 6px 0 10px; padding: 10px; border-radius: 10px; background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.45); color: #bbf7d0; }
.wheel-btn { width: 100%; height: 48px; font-size: 1.02rem; }
.wheel-btn:disabled { opacity: .55; cursor: not-allowed; }

/* v76: квесты */
.quest-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.quest-tab { border: 1px solid #2a2d35; background: #16181d; color: #9aa1ab; font-weight: 800; padding: 9px 16px; border-radius: 10px; cursor: pointer; }
.quest-tab.active { background: var(--gold); color: #000; border-color: var(--gold); }
html.theme-halloween .quest-tab:not(.active) { background: #1a1027; border-color: #34204d; }
.quest-list { display: flex; flex-direction: column; gap: 8px; }
.quest-reset { font-size: .78rem; color: #8a94a0; }
.quest { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: #17191e; border: 1px solid #23262d; }
html.theme-halloween .quest { background: #1a1027; border-color: #34204d; }
.quest.done:not(.got) { border-color: var(--green); box-shadow: 0 0 0 1px rgba(34,197,94,.3) inset; }
.quest.got { opacity: .6; }
.q-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.q-main b { color: #fff; font-size: .95rem; }
.q-bar { height: 7px; border-radius: 4px; background: #2a2d35; overflow: hidden; max-width: 360px; }
.q-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ff8a1f, #ffd400); }
.quest.done .q-bar i { background: var(--green); }
.q-prog { font-size: .74rem; color: #8a94a0; font-variant-numeric: tabular-nums; }
.q-reward { font-weight: 900; color: var(--gold); display: flex; align-items: center; gap: 3px; white-space: nowrap; }
.q-btn { height: 38px; padding: 0 16px; min-width: 104px; }
.q-btn:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 600px) { .quest { grid-template-columns: 1fr auto; } .q-btn { grid-column: 1 / -1; width: 100%; } }

/* v76: взрыв иконки кейса перед рулеткой */
.case-burst { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; pointer-events: none; overflow: hidden; }
.cbu-case { position: relative; z-index: 2; width: 190px; height: 190px; display: flex; align-items: center; justify-content: center;
    animation: cbuIn .35s cubic-bezier(.2,1.4,.4,1) both, cbuShake .5s .35s linear both; }
.cbu-case img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 10px 30px rgba(255,170,0,.5)); }
.cbu-case .cb-emo { font-size: 7rem; }
.cbu-glow { position: absolute; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(255,190,60,.55), transparent 65%);
    animation: cbuGlow .85s ease-in both; }
.cbu-flash { position: absolute; inset: 0; background: radial-gradient(circle, rgba(255,255,255,.95), rgba(255,200,80,.6) 30%, transparent 65%); opacity: 0; z-index: 3; }
.cbu-p { position: absolute; width: 10px; height: 10px; border-radius: 2px; background: #ffd400; opacity: 0; z-index: 3; box-shadow: 0 0 10px #ff8a1f; }
.case-burst.boom .cbu-case { animation: cbuPop .3s ease-out forwards; }
.case-burst.boom .cbu-flash { animation: cbuFlash .4s ease-out forwards; }
.case-burst.boom .cbu-p { animation: cbuFly .45s var(--dl) ease-out forwards; }
.case-burst.out { animation: cbuOut .15s linear forwards; }
@keyframes cbuIn { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes cbuShake { 0%,100% { transform: rotate(0); } 20% { transform: rotate(-6deg) scale(1.03); } 40% { transform: rotate(6deg) scale(1.06); } 60% { transform: rotate(-8deg) scale(1.09); } 80% { transform: rotate(8deg) scale(1.12); } }
@keyframes cbuGlow { from { transform: scale(.4); opacity: 0; } to { transform: scale(1.3); opacity: 1; } }
@keyframes cbuPop { to { transform: scale(1.8); opacity: 0; filter: brightness(3); } }
@keyframes cbuFlash { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: 0; } }
@keyframes cbuFly { 0% { opacity: 1; transform: rotate(var(--a)) translateX(0) scale(1); } 100% { opacity: 0; transform: rotate(var(--a)) translateX(var(--d)) scale(.4); } }
@keyframes cbuOut { to { opacity: 0; } }

/* v77: Provably Fair — значок справа сверху с подсказкой при наведении */
.pf-badge { position: absolute; top: 14px; right: 14px; z-index: 30; width: 38px; height: 38px; border-radius: 11px; border: 1px solid rgba(34,197,94,.5);
    background: rgba(12,20,14,.85); color: #4ade80; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.pf-badge svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.pf-badge:hover { background: rgba(34,197,94,.18); }
.pf-tip { display: none; position: absolute; top: calc(100% + 8px); right: 0; width: 320px; max-width: 86vw; padding: 12px 14px; border-radius: 12px; text-align: left;
    background: #0f1115; border: 1px solid rgba(34,197,94,.45); box-shadow: 0 14px 40px rgba(0,0,0,.6); color: #c9d1d9; font-size: .76rem; line-height: 1.5; cursor: default; }
.pf-badge:hover .pf-tip, .pf-badge:focus .pf-tip { display: flex; flex-direction: column; gap: 4px; }
.pf-tip b { color: #4ade80; font-size: .86rem; margin-bottom: 2px; }
.pf-tip code, .fair-row code, .fair-p code, .fair-out code { font-family: ui-monospace, Consolas, monospace; color: #fde68a; word-break: break-all; }
.pf-tip i { font-style: normal; color: #8a94a0; margin-top: 4px; }
.fair-box { width: min(560px, 94vw); }
.fair-p { font-size: .82rem; color: #c9d1d9; line-height: 1.5; margin: 0 0 12px; }
.fair-row { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 9px; background: #0f1115; margin-bottom: 6px; }
.fair-row span { font-size: .72rem; color: #8a94a0; } .fair-row code { font-size: .8rem; }
.fair-btns { display: flex; gap: 8px; margin: 10px 0 14px; } .fair-btns button { flex: 1; height: 40px; }
.fair-prev, .fair-check { padding: 12px; border-radius: 12px; border: 1px dashed #3a3d45; margin-bottom: 10px; display: flex; flex-direction: column; gap: 6px; }
.fair-prev b, .fair-check b { color: #fff; font-size: .88rem; }
.fair-in { display: grid; grid-template-columns: 2fr 1fr 80px; gap: 6px; }
.fair-in input { height: 36px; padding: 0 8px; border-radius: 8px; border: 1px solid #2a2d35; background: #0f1115; color: #fff; font-size: .78rem; min-width: 0; }
.fair-check .btn-dark-pill { height: 36px; }
.fair-out { font-size: .8rem; color: #c9d1d9; line-height: 1.6; }
@media (max-width: 600px) { .fair-in { grid-template-columns: 1fr; } .pf-badge { top: 8px; right: 8px; } }
.pf-badge { left: auto !important; right: 14px !important; top: 14px !important; margin: 0 !important; }
@media (max-width: 600px) { .pf-badge { right: 8px !important; top: 8px !important; } }
.pf-badge { width: 38px !important; height: 38px !important; min-width: 0 !important; max-width: 38px !important; flex: none !important; }

/* =====================================================================
   v78: ивент «Хэллоуин» — босс
   ===================================================================== */
.nav-event { color: #ffb15c !important; }
.nav-event.active { background: rgba(255,138,31,.16) !important; color: #ff8a1f !important; }
.event-view { max-width: 1200px; width: 100%; flex-direction: column; align-items: stretch; gap: 16px; padding: 24px 32px !important; margin: 0 auto; }
.ev-head h1 { margin: 4px 0; font-size: 2.4rem; color: #fff; } .ev-head p { margin: 0; color: #c9d1d9; }
.ev-body { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.ev-boss { position: relative; border-radius: 22px; padding: 18px; background: radial-gradient(circle at 50% 40%, rgba(255,90,0,.35), transparent 60%), linear-gradient(160deg, #2a1236, #12081c);
    border: 1px solid #4a2a6b; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ev-boss-name { font-size: 1.3rem; font-weight: 900; color: #ffb15c; text-shadow: 0 0 18px rgba(255,120,0,.5); }
.ev-boss-img { position: relative; width: 100%; max-width: 380px; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.ev-boss-img img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 16px 40px rgba(255,90,0,.45)); animation: evFloat 3s ease-in-out infinite; }
.ev-boss-emo { font-size: 12rem; animation: evFloat 3s ease-in-out infinite; }
.ev-boss-img.hit img, .ev-boss-img.hit .ev-boss-emo { animation: evHit .35s ease-out; }
.ev-boss.dead .ev-boss-img { filter: grayscale(1) brightness(.6); }
@keyframes evFloat { 50% { transform: translateY(-10px); } }
@keyframes evHit { 0% { transform: translateX(0); filter: brightness(2.2) drop-shadow(0 0 30px #fff); } 25% { transform: translateX(-12px) rotate(-3deg); } 50% { transform: translateX(10px) rotate(3deg); } 100% { transform: none; } }
.ev-dmg { position: absolute; top: 40%; font-weight: 900; font-size: 1.6rem; color: #ff3b2f; text-shadow: 0 2px 0 #000, 0 0 10px rgba(255,60,40,.7); pointer-events: none; animation: evDmg .9s ease-out forwards; }
@keyframes evDmg { from { transform: translateY(0) scale(.6); opacity: 1; } to { transform: translateY(-90px) scale(1.2); opacity: 0; } }
.ev-hp { position: relative; width: 100%; height: 26px; border-radius: 13px; background: #1a0d10; border: 2px solid #5a1a1a; overflow: hidden; }
.ev-hp i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #b91c1c, #ef4444, #f97316); transition: width .5s ease; }
.ev-hp span { position: relative; display: block; text-align: center; line-height: 22px; font-weight: 900; font-size: .82rem; color: #fff; text-shadow: 0 1px 2px #000; }
.ev-timer { font-size: .84rem; color: #c9d1d9; } .ev-timer b { color: #ffb15c; font-variant-numeric: tabular-nums; }
.ev-side { display: flex; flex-direction: column; gap: 12px; }
.ev-me { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ev-energy { background: #1a1027; border: 1px solid #34204d; border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.ev-energy span { font-size: .74rem; color: #9aa1ab; } .ev-energy b { font-size: 1.3rem; color: #fff; font-variant-numeric: tabular-nums; }
.ev-rule { font-size: .82rem; color: #c9d1d9; line-height: 1.5; padding: 10px 12px; border-radius: 10px; background: rgba(255,138,31,.08); border: 1px solid rgba(255,138,31,.3); }
.ev-btns { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px; } .ev-btns button { height: 50px; font-size: 1.02rem; }
.ev-btns button:disabled { opacity: .45; cursor: not-allowed; }
.ev-login { width: 100%; height: 46px; }
.ev-prizes { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 12px; background: #1a1027; border: 1px solid #34204d; color: #e5e7eb; font-size: .88rem; }
.ev-prizes b { color: #fff; }
.ev-top { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 16px; background: #17101f; border: 1px solid #34204d; }
.ev-top > b { color: #fff; margin-bottom: 4px; }
.ev-row { display: grid; grid-template-columns: 50px 1fr auto; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: #1f1330; }
.ev-row.me { border: 1px solid var(--gold); background: rgba(255,138,31,.1); }
.ev-pl { font-weight: 900; font-size: 1.05rem; } .ev-nm { color: #fff; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ev-dm { color: #ffb15c; font-weight: 900; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .event-view { padding: 14px 12px !important; } .ev-body { grid-template-columns: 1fr; } .ev-head h1 { font-size: 1.9rem; } }

/* =====================================================================
   v79: Battle 1 на 1
   ===================================================================== */
.battle-view { max-width: 1200px; width: 100%; flex-direction: column; align-items: stretch; gap: 16px; padding: 24px 32px !important; margin: 0 auto; }
.bt-create { display: grid; grid-template-columns: 1fr 280px auto; gap: 12px; align-items: center; padding: 16px; border-radius: 18px; background: #17191e; border: 1px solid #23262d; }
html.theme-halloween .bt-create { background: #1a1027; border-color: #34204d; }
.bt-preview { display: flex; align-items: center; gap: 12px; min-width: 0; }
.bt-pcase { width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; font-size: 2.6rem; flex-shrink: 0; }
.bt-pcase img { max-width: 100%; max-height: 100%; object-fit: contain; }
.bt-preview b { display: block; color: #fff; } .bt-preview i { font-style: normal; font-size: .82rem; color: var(--gold); display: flex; align-items: center; gap: 3px; }
.bt-create select { height: 46px; border-radius: 11px; border: 1px solid #2a2d35; background: #0f1115; color: #fff; padding: 0 10px; font-weight: 700; min-width: 0; }
.bt-create .btn-yellow-pill { height: 46px; padding: 0 22px; white-space: nowrap; }
.bt-list, .bt-recent { display: flex; flex-direction: column; gap: 8px; }
.bt-card { display: grid; grid-template-columns: 56px 1fr auto auto auto; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: #17191e; border: 1px solid #23262d; }
html.theme-halloween .bt-card { background: #1a1027; border-color: #34204d; }
.bt-card.mine { border-color: var(--gold); }
.bt-thumb { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; font-size: 2rem; } .bt-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.bt-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .bt-info b { color: #fff; } .bt-info span, .bt-info i { font-size: .76rem; color: #9aa1ab; font-style: normal; }
.bt-price { font-weight: 900; color: var(--gold); display: flex; align-items: center; gap: 3px; white-space: nowrap; }
.bt-card .btn-yellow-pill, .bt-card .btn-dark-pill { height: 40px; padding: 0 16px; }
.bt-x { width: 40px; padding: 0 !important; color: #f87171 !important; }
.bt-rec { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: #15171c; font-size: .84rem; color: #c9d1d9; }
html.theme-halloween .bt-rec { background: #1f1330; }
.bt-rcase { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; } .bt-rcase img { max-width: 100%; max-height: 100%; object-fit: contain; }
.bt-rsum { font-weight: 900; color: var(--green); display: flex; align-items: center; gap: 3px; }
.battle-box { width: min(900px, 96vw); }
.bt-arena { display: grid; grid-template-columns: 1fr 60px 1fr; gap: 10px; align-items: center; }
.bt-side { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 16px; background: #0f1115; border: 2px solid #2a2d35; min-width: 0; transition: border-color .3s, box-shadow .3s; }
.bt-side.win { border-color: var(--green); box-shadow: 0 0 30px rgba(34,197,94,.35); } .bt-side.lose { opacity: .55; }
.bt-player { display: flex; align-items: center; gap: 10px; } .bt-player img, .bt-player span { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: #2a2d35; display: flex; align-items: center; justify-content: center; font-weight: 900; color: var(--gold); }
.bt-player b { color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bt-side .case-ticker-wrap { height: 120px; }
.bt-drop { min-height: 40px; text-align: center; color: #fff; font-weight: 800; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.bt-drop b { color: var(--gold); display: flex; align-items: center; gap: 3px; }
.bt-vs { font-size: 1.6rem; font-weight: 900; color: #ff8a1f; text-align: center; text-shadow: 0 0 18px rgba(255,138,31,.6); }
.bt-result { margin: 14px 0 8px; text-align: center; font-size: 1.15rem; font-weight: 900; color: #fff; } .bt-result.won { color: var(--green); } .bt-result.lost { color: #fca5a5; }
.bt-ok { display: block; margin: 0 auto; min-width: 160px; height: 44px; }
@media (max-width: 760px) {
    .battle-view { padding: 14px 12px !important; }
    .bt-create { grid-template-columns: 1fr; }
    .bt-card { grid-template-columns: 46px 1fr auto; } .bt-card .btn-yellow-pill, .bt-card .btn-dark-pill { grid-column: span 1; }
    .bt-arena { grid-template-columns: 1fr; } .bt-vs { font-size: 1.2rem; }
}

/* =====================================================================
   v80: шапка — кнопки по центру, логотип: ПК — logo-big, телефон — logo.png;
   кейс-батлы как на образце
   ===================================================================== */
@media (min-width: 1101px) {
    #appScreen > header { display: grid !important; grid-template-columns: 1fr auto 1fr; align-items: center; }
    #appScreen > header > .header-left, #appScreen > header > .logo-wrap { justify-self: start; }
    header .header-nav { justify-self: center; }
    header .header-right { justify-self: end; }
}
/* на телефоне и планшете — маленький logo.png, большой логотип прячем */
@media (max-width: 1100px) {
    .logo .logo-desktop { display: none !important; }
    .logo.has-big .logo-img { display: block !important; height: 34px; width: auto; }
    .page-logo .page-logo-big { display: none !important; }
    .page-logo.has-big .page-logo-img { display: block !important; }
}

.btl-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.btl-head h1 { margin: 0; font-size: 2rem; font-weight: 900; color: #fff; letter-spacing: .5px; }
.btl-head .vs { color: var(--gold); margin-right: 6px; }
.btl-count { padding: 10px 16px; border-radius: 12px; background: #1d1f25; border: 1px solid #2a2d35; color: #fff; font-weight: 800; font-size: .86rem; }
.btl-panel { border-radius: 18px; background: #1b1d22; border: 1px solid #23262d; overflow: hidden; }
html.theme-halloween .btl-panel { background: #1a1027; border-color: #34204d; }
.btl-toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px; background: rgba(0,0,0,.18); }
.btl-range { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 12px; background: #23262d; }
.btl-range input { width: 110px; height: 36px; border-radius: 9px; border: none; background: #2c2f37; color: #fff; padding: 0 10px; font-weight: 700; }
.btl-range span { color: #6b7280; }
.btl-check { display: flex; align-items: center; gap: 8px; color: #9aa1ab; font-size: .84rem; cursor: pointer; }
.btl-check input { width: 16px; height: 16px; accent-color: var(--gold); }
.btl-new { margin-left: auto; height: 46px; padding: 0 22px; font-size: .98rem; }
.btl-list { display: flex; flex-direction: column; gap: 10px; padding: 14px; min-height: 160px; }
.btl-row { display: grid; grid-template-columns: 96px 1fr auto 170px; align-items: center; gap: 14px; padding: 12px; border-radius: 14px; background: #23252b; }
html.theme-halloween .btl-row { background: #23163a; }
.btl-row.done { opacity: .75; }
.btl-state { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.btl-state span { font-size: .66rem; font-weight: 900; color: var(--gold); letter-spacing: .5px; }
.btl-row.done .btl-state span { color: #9aa1ab; }
.btl-ico { width: 52px; height: 52px; border-radius: 50%; background: #121318; display: flex; align-items: center; justify-content: center; border-bottom: 3px solid var(--gold); }
.btl-ico svg { width: 26px; height: 26px; fill: none; stroke: var(--gold); stroke-width: 3; }
.btl-state i { font-style: normal; font-size: .64rem; color: #8a94a0; font-weight: 800; font-variant-numeric: tabular-nums; }
.btl-cases { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 12px; background: #17191e; min-width: 0; overflow-x: auto; }
html.theme-halloween .btl-cases { background: #170e22; }
.btl-case { width: 70px; height: 70px; flex-shrink: 0; border-radius: 10px; border: 1.5px solid #7c3aed; background: radial-gradient(circle, rgba(124,58,237,.25), #121318 70%);
    display: flex; align-items: center; justify-content: center; font-size: 2rem; }
.btl-case img { max-width: 86%; max-height: 86%; object-fit: contain; }
.btl-price { margin-left: auto; padding-left: 10px; color: #fff; font-weight: 900; display: flex; align-items: center; gap: 3px; white-space: nowrap; }
.btl-players { display: flex; align-items: center; gap: 8px; }
.bt-ava, .bt-slot { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; overflow: hidden; font-weight: 900; }
.bt-ava { background: #2f323a; color: var(--gold); border: 2px solid #3a3d45; } .bt-ava img { width: 100%; height: 100%; object-fit: cover; }
.bt-slot { border: 2px dashed rgba(255,170,0,.6); color: var(--gold); font-size: 1.2rem; }
.btl-vs { font-size: .7rem; font-weight: 900; color: #6b7280; }
.btl-btns { display: flex; flex-direction: column; gap: 6px; }
.btl-btns button { height: 36px; width: 100%; font-size: .84rem; }
/* окно создания */
.bt-create-box { width: min(760px, 96vw); }
.btc-hint { font-size: .82rem; color: #9aa1ab; margin-bottom: 12px; }
.btc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; max-height: 52vh; overflow-y: auto; padding: 2px; }
.btc-case { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 8px; border-radius: 12px; background: #17191e; border: 1.5px solid #2a2d35; text-align: center; }
.btc-case.on { border-color: var(--gold); background: rgba(255,170,0,.08); }
.btc-img { width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; } .btc-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.btc-case b { font-size: .78rem; color: #fff; } .btc-case i { font-style: normal; font-size: .76rem; color: var(--gold); display: flex; align-items: center; gap: 3px; }
.btc-qty { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.btc-qty button { width: 26px; height: 26px; border-radius: 7px; border: none; background: #2a2d35; color: #fff; font-weight: 900; cursor: pointer; }
.btc-qty span { min-width: 14px; font-weight: 900; color: #fff; }
.btc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; flex-wrap: wrap; color: #c9d1d9; }
.btc-foot b { color: #fff; } .btc-foot .btn-yellow-pill { height: 44px; padding: 0 20px; } .btc-foot .btn-yellow-pill:disabled { opacity: .45; }
/* арена с несколькими кейсами */
.bt-player em { margin-left: auto; font-style: normal; font-weight: 900; color: var(--gold); display: flex; align-items: center; gap: 3px; }
.bt-drops { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; min-height: 54px; }
.bt-mini { width: 54px; display: flex; flex-direction: column; align-items: center; } .bt-mini img { width: 44px; height: 38px; object-fit: contain; }
.bt-mini i { font-style: normal; font-size: .64rem; color: var(--gold); font-weight: 800; }
@media (max-width: 860px) {
    .btl-row { grid-template-columns: 70px 1fr; } .btl-players, .btl-btns { grid-column: span 1; } .btl-btns { grid-column: 1 / -1; flex-direction: row; }
    .btl-new { margin-left: 0; width: 100%; } .btl-head h1 { font-size: 1.5rem; }
}

/* =====================================================================
   v81: исправления интерфейса
   ===================================================================== */
/* шапка: 4 блока (логотип, онлайн, меню, баланс) в одну строку — раньше баланс переносился на вторую строку и наезжал на страницу */
@media (min-width: 1101px) {
    #appScreen > header { grid-template-columns: auto auto minmax(0, 1fr) auto !important; grid-template-rows: 100%; column-gap: 18px; overflow: visible; }
    #appScreen > header > .header-left { grid-column: 1; grid-row: 1; }
    #appScreen > header > .header-stats { grid-column: 2; grid-row: 1; }
    #appScreen > header > .header-nav { grid-column: 3; grid-row: 1; justify-self: center; min-width: 0; }
    #appScreen > header > .header-right { grid-column: 4; grid-row: 1; justify-self: end; margin-left: 0; }
}
/* средние экраны: меню компактнее, чтобы всё влезало */
@media (min-width: 1101px) and (max-width: 1500px) {
    #appScreen > header { padding: 0 16px; column-gap: 10px; }
    .header-nav { gap: 2px !important; }
    .header-nav button { padding: 9px 9px; font-size: .78rem; gap: 6px; }
    .header-nav button svg { width: 14px; height: 14px; }
    header .header-right { gap: 8px !important; }
}
@media (min-width: 1101px) and (max-width: 1300px) {
    .header-nav button svg { display: none; }
}
/* онлайн: пока нет данных — блок не показываем (вместо «—») */
.header-stats .stat.no-data { display: none; }
/* квесты: незавершённый квест — серая кнопка с прогрессом, а не «Забрать» */
.q-btn.q-wait { background: #2a2235 !important; color: #8b8398 !important; border: 1px solid #3a2f4a !important; opacity: 1 !important; cursor: default; box-shadow: none !important; }
/* аватар в профиле: буква видна всегда, картинка (если есть) ложится сверху */
.avatar-large { position: relative; }
.avatar-large .avatar-letter { display: flex !important; }
.avatar-large img { position: absolute; inset: 0; z-index: 1; }
/* хэллоуин-декор не наезжает на блоки сайта: тыквы только по краям, луна — только на широких экранах и в углу */
.hw-pk:not(.hw-pk-edge) { display: none; }
.hw-moon { top: 78px; right: 2%; width: 70px; height: 70px; }
@media (max-width: 1799px) { .hw-moon { display: none; } }
/* ракета: длинная надпись кнопки в одну строку, лента множителей плавно обрезается справа */
.rocket-btn { white-space: nowrap; font-size: .82rem; letter-spacing: .2px; }
.rocket-history { -webkit-mask: linear-gradient(90deg, #000 88%, transparent); mask: linear-gradient(90deg, #000 88%, transparent); padding-right: 24px; }
@media (max-width: 1799px) { .hw-pk-edge { display: none; } }
/* кнопка сида слева сверху на апгрейде (над иконками настроек) */
.seed-btn { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; margin: 0 0 8px; border-radius: 10px; cursor: pointer;
    background: rgba(34,197,94,.08); border: 1px solid rgba(34,197,94,.45); color: #4ade80; font-weight: 800; font-size: .8rem; font-family: inherit; }
.seed-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.seed-btn code { color: #9aa1ab; font-size: .72rem; font-weight: 600; }
.seed-btn:hover { background: rgba(34,197,94,.18); }
#upgradeView .pf-badge { display: none !important; }
/* сид у каждой игры в истории */
.hg-card { position: relative; }
.hg-seed { position: absolute; top: 6px; right: 6px; z-index: 5; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px;
    border-radius: 7px; border: 1px solid rgba(34,197,94,.45); background: rgba(12,14,18,.85); color: #4ade80; font-size: .66rem; font-weight: 800; cursor: pointer; font-family: inherit; }
.hg-seed svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linejoin: round; }
.hg-seed:hover { background: rgba(34,197,94,.18); }
/* уведомление о cookie */
.cookie-bar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 5000; width: min(720px, calc(100% - 24px)); display: flex; align-items: center; gap: 14px;
    padding: 12px 14px 12px 18px; border-radius: 14px; background: #1f1330; border: 1px solid #3b2156; box-shadow: 0 12px 40px rgba(0,0,0,.5); color: #d6d0e0; font-size: .84rem; }
.cookie-bar a { color: #ff8a1f; }
.cookie-bar .btn-yellow-pill { height: 38px; padding: 0 18px; flex-shrink: 0; }
@media (max-width: 760px) { .cookie-bar { bottom: 76px; flex-direction: column; align-items: stretch; text-align: center; } }

/* v73: сид на апгрейде — просто щит с галочкой; в истории игр — на месте даты */
.seed-btn { width: 34px; padding: 0; justify-content: center; }
.seed-btn svg { width: 18px; height: 18px; }
.hg-date.hg-date-seed { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; pointer-events: auto; z-index: 5; padding: 2px 7px 2px 5px; border-radius: 7px;
    border: 1px solid rgba(34,197,94,.4); background: rgba(12,14,18,.7); color: #cbd5e1; }
.hg-date.hg-date-seed svg { width: 12px; height: 12px; fill: none; stroke: #4ade80; stroke-width: 2.2; stroke-linejoin: round; flex-shrink: 0; }
.hg-date.hg-date-seed:hover { background: rgba(34,197,94,.18); color: #fff; }

/* =====================================================================
   v74: стрелка колеса, большой логотип на планшете, панели на телефоне как в образце
   ===================================================================== */
/* стрелка: в обычной теме показывалась ещё и хэллоуинская (две стрелки одна на другой) */
.pointer-arrow .ptr-web { display: none; }
html.theme-halloween .pointer-arrow .ptr-web { display: block; }
html.theme-halloween .pointer-arrow .ptr-normal { display: none; }
.wheel-marker { z-index: 6; text-shadow: 0 1px 3px rgba(0,0,0,.85); }
/* меньше пустого места между кнопкой сида и иконками */
.seed-btn + .tool-row { margin-top: 4px; }

/* планшет (761–1100): в шапке и на странице — большой логотип */
@media (min-width: 761px) and (max-width: 1100px) {
    header .logo .logo-desktop { display: block !important; height: 34px; width: auto; }
    header .logo.has-big .logo-img { display: none !important; }
    .page-logo .page-logo-big { display: block !important; }
    .page-logo.has-big .page-logo-img { display: none !important; }
}

/* вкладки «Мои предметы / Желаемые предметы» — только на телефоне */
.up-mtabs { display: none; }
.tib-label { display: none; }
@media (max-width: 760px) {
    .up-mtabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; margin-top: 16px; }
    .up-mtabs button { height: 48px; border: none; border-radius: 14px 14px 0 0; background: transparent; color: #8a94a0; font-weight: 800; font-size: .92rem; font-family: inherit; cursor: pointer; }
    .up-mtabs button.active { background: #1a1b20; color: #fff; }
    html.theme-halloween .up-mtabs button.active { background: #1a1027; }
    #upPanels { margin-top: 0 !important; }
    #upPanels .left-panel { border-top-left-radius: 0; }
    #upPanels.mt-right .left-panel { display: none !important; }
    #upPanels:not(.mt-right) .right-panel { display: none !important; }
    #upPanels.mt-right .right-panel { border-top-right-radius: 0; }

    /* «Мои брейнроты | Магазин» — большой переключатель с подписями */
    .left-panel .panel-tabs { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
    .left-panel #leftPanelTitle { display: none; }
    .left-panel .tab-icons { width: 100%; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 14px; }
    .left-panel .tab-icon-btn { width: auto; height: 44px; gap: 8px; border-radius: 11px; font-weight: 800; font-size: .9rem; font-family: inherit; }
    .left-panel .tab-icon-btn svg { width: 20px; height: 20px; }
    .left-panel .tib-label { display: inline; }
    .left-panel .panel-tabs-right { width: 100%; display: flex; gap: 8px; }
    .left-panel .panel-tabs-right .sort-btn { flex: 0 0 40px; height: 40px; }
    .left-panel .inv-total { flex: 1; height: 40px; justify-content: space-between; padding: 0 14px; }
    .left-panel .shop-tools { width: 100%; }
    /* пустой инвентарь: кнопки в ряд */
    .empty-inv .empty-actions { flex-direction: row !important; flex-wrap: wrap; justify-content: center; gap: 10px; }
    .empty-inv .empty-actions button { width: auto !important; flex: 0 1 auto; height: 44px; padding: 0 18px; }
}
@media (max-width: 760px) {
    .up-mtabs { margin-bottom: -24px; position: relative; z-index: 2; }
    .up-mtabs button.active { background: #16181d; border: 1px solid #1d2027; border-bottom: none; margin-bottom: -1px; }
    html.theme-halloween .up-mtabs button.active { background: #1a1027; border-color: #34204d; }
    .empty-inv .empty-actions { max-width: none !important; width: 100%; }
    .left-panel .inv-total { justify-content: flex-start; }
    .left-panel .inv-total #invTotal { margin-left: auto; }
}
@media (max-width: 760px) { .right-panel .target-title { display: none; } .right-panel .target-filters { width: 100%; } .right-panel .target-filters .mini-input { flex: 1; } }

/* =====================================================================
   v75: подвал прижат к низу, без зазора; больше хэллоуина; режим стримера — показ при наведении
   ===================================================================== */
#appScreen { flex-direction: column; min-height: 100vh; }
#appScreen > .site-footer { margin-top: auto; }
#appScreen > main { flex: 0 0 auto; }
#appScreen > main + .site-footer, #appScreen .site-footer { margin-bottom: 0; }
body { margin: 0; }
@media (min-width: 1101px) { #appScreen > .site-footer { margin-left: -8px; padding-left: 48px; } }

/* хэллоуин: шляпы ведьмы на блоках апгрейда, паутина в углах, паук на нитке, привидения */
.hw-hat { display: none; }
html.theme-halloween .slot-wrapper, html.theme-halloween #upgradeView .wheel-container { position: relative; }
html.theme-halloween .hw-hat { display: block; position: absolute; z-index: 20; width: 74px; height: 64px; pointer-events: none; filter: drop-shadow(0 4px 8px rgba(0,0,0,.6)); }
html.theme-halloween .hw-hat svg { width: 100%; height: 100%; }
html.theme-halloween .hw-hat-0 { top: -34px; left: -14px; transform: rotate(-18deg); }
html.theme-halloween .hw-hat-1 { top: -46px; left: 50%; margin-left: -37px; transform: rotate(4deg); animation: hwHat 3.5s ease-in-out infinite; }
html.theme-halloween .hw-hat-2 { top: -34px; right: -14px; transform: rotate(18deg) scaleX(-1); }
@keyframes hwHat { 50% { transform: rotate(-4deg) translateY(-3px); } }
html.theme-halloween .hw-cweb { position: absolute; top: 0; right: 0; width: 90px; height: 90px; z-index: 19; pointer-events: none; opacity: .45; border-top-right-radius: 14px;
    background: repeating-radial-gradient(circle at 100% 0, transparent 0 13px, rgba(255,255,255,.6) 13px 14px),
                repeating-conic-gradient(from 180deg at 100% 0, transparent 0 13deg, rgba(255,255,255,.55) 13deg 14deg);
    -webkit-mask: radial-gradient(circle at 100% 0, #000 0 68%, transparent 70%); mask: radial-gradient(circle at 100% 0, #000 0 68%, transparent 70%); }
html.theme-halloween .slot-wrapper:first-child .hw-cweb { right: auto; left: 0; transform: scaleX(-1); }
.hw-spider { position: absolute; top: 0; left: 72%; font-size: 26px; display: flex; flex-direction: column; align-items: center; transform-origin: top center;
    animation: hwSpider 7s ease-in-out infinite; filter: drop-shadow(0 0 6px rgba(160,80,255,.5)); }
.hw-spider i { display: block; width: 1px; height: 140px; background: linear-gradient(rgba(255,255,255,.1), rgba(255,255,255,.6)); animation: hwThread 7s ease-in-out infinite; }
.hw-spider-2 { left: 30%; font-size: 20px; animation-delay: -3s; }
.hw-spider-2 i { height: 90px; animation-delay: -3s; }
@keyframes hwSpider { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@keyframes hwThread { 0%, 100% { height: 110px; } 50% { height: 170px; } }
.hw-ghost { position: absolute; left: -70px; top: var(--y); font-size: 34px; opacity: 0; animation: hwGhost 27s linear infinite; animation-delay: var(--d); filter: drop-shadow(0 0 10px rgba(255,255,255,.35)); }
@keyframes hwGhost { 0% { transform: translateX(0) translateY(0); opacity: 0; } 8% { opacity: .55; } 50% { transform: translateX(55vw) translateY(-40px); } 92% { opacity: .55; } 100% { transform: translateX(110vw) translateY(10px); opacity: 0; } }
@media (max-width: 760px) { .hw-spider-2, .hw-ghost:nth-child(odd) { display: none; } html.theme-halloween .hw-hat { width: 54px; height: 46px; } html.theme-halloween .hw-hat-1 { top: -34px; margin-left: -27px; } }

/* режим стримера: наведи на баланс, цену или кейс — значение показывается */
html.streamer #balance:hover, html.streamer #eventBalance:hover, html.streamer .balance-pill:hover #balance, html.streamer .event-pill:hover #eventBalance,
html.streamer .price:hover, html.streamer .card:hover .price, html.streamer .lf-item:hover .lf-price, html.streamer .item-price:hover,
html.streamer .case-card-new:hover .case-price-tag, html.streamer .case-card-new:hover .case-tag, html.streamer .case-card-new:hover .case-evt-tag,
html.streamer .case-card-new:hover .case-image-wrapper, html.streamer .case-card-new:hover .case-image-wrapper img,
html.streamer .case-image-wrapper:hover, html.streamer #activeCaseImage:hover, html.streamer .hg-card:hover .hg-price, html.streamer .hg-stat:hover b,
html.streamer .pv-price:hover, html.streamer .pv-val:hover, html.streamer .multi-total:hover, html.streamer .res-price:hover, html.streamer .fx-price:hover,
html.streamer .tile-price:hover, html.streamer .rocket-stake-total:hover, html.streamer .rocket-potential:hover, html.streamer .best-drop-price:hover,
html.streamer .cart-total:hover, html.streamer #invTotal:hover, html.streamer .inv-total:hover #invTotal, html.streamer #sliderBalance:hover,
html.streamer .profile-balance-amount:hover, html.streamer #profBalance:hover, html.streamer .lf-src:hover img, html.streamer .case-item-img-case:hover,
html.streamer .pp-stats b:hover, html.streamer .pp-best i:hover, html.streamer .pp-win i:hover {
    filter: none !important; transition: filter .15s; }

/* v76: кнопка «Прокачать» в хэллоуинском стиле — тыквенный градиент, паутина, тыква и летучая мышь, «капли», свечение */
html.theme-halloween #upgradeBtn { position: relative; overflow: visible; isolation: isolate; color: #2a0d00 !important; text-shadow: 0 1px 0 rgba(255,220,160,.6);
    background:
        repeating-radial-gradient(circle at 50% -40%, transparent 0 18px, rgba(60,15,0,.18) 18px 19px),
        repeating-conic-gradient(from 0deg at 50% -40%, transparent 0 9deg, rgba(60,15,0,.14) 9deg 9.6deg),
        linear-gradient(180deg, #ffb347 0%, #ff8a1f 45%, #e8590c 100%) !important;
    border: 2px solid #7a2e00 !important; box-shadow: 0 0 0 2px rgba(255,140,30,.25), 0 8px 24px rgba(255,100,0,.35), inset 0 -6px 0 rgba(90,25,0,.35), inset 0 2px 0 rgba(255,230,180,.6);
    animation: hwBtnGlow 2.4s ease-in-out infinite; }
html.theme-halloween #upgradeBtn::before, html.theme-halloween #upgradeBtn::after { position: absolute; top: 50%; transform: translateY(-50%); font-size: 26px; line-height: 1; pointer-events: none;
    filter: drop-shadow(0 2px 3px rgba(60,10,0,.6)); }
html.theme-halloween #upgradeBtn::before { content: '🎃'; left: 14px; animation: hwBtnBob 2.4s ease-in-out infinite; }
html.theme-halloween #upgradeBtn::after { content: '🦇'; right: 14px; font-size: 22px; animation: hwBtnBob 2.4s ease-in-out infinite reverse; }
html.theme-halloween #upgradeBtn .btn-ico { stroke: #2a0d00; }
/* «капли» снизу кнопки */
html.theme-halloween #upgradeBtn .hw-drips { position: absolute; left: 10%; right: 10%; bottom: -9px; height: 12px; pointer-events: none; z-index: -1;
    background:
        radial-gradient(5px 9px at 12% 0, #e8590c 98%, transparent) ,
        radial-gradient(4px 7px at 31% 0, #e8590c 98%, transparent),
        radial-gradient(6px 11px at 58% 0, #e8590c 98%, transparent),
        radial-gradient(4px 6px at 79% 0, #e8590c 98%, transparent),
        radial-gradient(5px 8px at 93% 0, #e8590c 98%, transparent); }
html.theme-halloween #upgradeBtn:not(:disabled):hover { transform: translateY(-2px) scale(1.01); filter: brightness(1.08); }
html.theme-halloween #upgradeBtn:disabled { animation: none; filter: saturate(.55) brightness(.7); }
@keyframes hwBtnGlow { 50% { box-shadow: 0 0 0 2px rgba(255,140,30,.35), 0 10px 34px rgba(255,110,0,.6), inset 0 -6px 0 rgba(90,25,0,.35), inset 0 2px 0 rgba(255,230,180,.6); } }
@keyframes hwBtnBob { 0%, 100% { transform: translateY(-50%) rotate(-6deg); } 50% { transform: translateY(-62%) rotate(6deg); } }
@media (max-width: 760px) { html.theme-halloween #upgradeBtn::before { font-size: 20px; left: 10px; } html.theme-halloween #upgradeBtn::after { font-size: 17px; right: 10px; } }
/* v77: отметка 0% внизу колеса */
/* 0% — внизу кольца, как 100% и 50%: такой же полупрозрачный и под стрелкой */
.wheel-marker.marker-bottom { display: block !important; top: auto; bottom: 13px; left: 50%; transform: translateX(-50%); }
html.theme-halloween #upgradeView .wheel-container { filter: none !important; }
html.theme-halloween #upgradeView .wheel-inner { filter: hue-rotate(-22deg) saturate(1.3); }

/* v81: свои иконки вместо эмодзи (бонусы, колесо, партнёрка) */
.ui-svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.14em; flex-shrink: 0; }
.bl-ico .ui-svg { width: 22px; height: 22px; }
.wt-ico .ui-svg { width: 28px; height: 28px; }
.bp-ico .ui-svg { width: 22px; height: 22px; }
.bl-ico.ico-coupon { color: #ff5a7a; background: rgba(255,90,122,.14); }
.bl-ico.ico-users { color: #a78bfa; background: rgba(167,139,250,.14); }
.bl-ico.ico-gift { color: #ff8a1f; background: rgba(255,138,31,.14); }
.wt-ico.ico-wheel { color: #ffb020; background: rgba(255,176,32,.12); }
.bp-ico { color: #ffd166; }
#partnerBtnSub .ui-svg { width: 13px; height: 13px; margin-right: 2px; color: #ffd166; }
.h-ico { display: flex; align-items: center; gap: 10px; }
.h-ico .ui-svg { width: 24px; height: 24px; color: #ffb020; }
.bp-text i, #partnerBtnSub { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; line-height: 1.25; display: block; }

/* v86: окно «Настройки» профиля (ник, язык, приватность, режим стримера) */
.ps-box { width: min(760px, calc(100% - 24px)); border-radius: 14px; background: #24252b; color: #fff; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
html.theme-halloween .ps-box { background: #1f1330; }
.ps-head { display: flex; align-items: center; justify-content: space-between; padding: 26px 28px; }
.ps-head h2 { margin: 0; font-size: 1.6rem; font-weight: 900; letter-spacing: .5px; }
.ps-close { background: none; border: none; color: #9aa1ab; font-size: 2.4rem; line-height: 1; cursor: pointer; }
.ps-close:hover { color: #fff; }
.ps-body { background: #1c1d22; padding: 24px 28px 22px; display: flex; flex-direction: column; gap: 12px; }
html.theme-halloween .ps-body { background: #170d24; }
.ps-field { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border: 1px solid #34363e; border-radius: 4px; background: #24252b; }
.ps-field span { font-size: .68rem; color: #8a94a0; font-weight: 700; }
.ps-field input { border: none; outline: none; background: transparent; color: #fff; font-weight: 700; font-size: .92rem; padding: 0; font-family: inherit; }
.ps-field input:disabled { color: #8a94a0; }
.ps-lang { position: relative; }
.ps-lang-btn { width: 100%; height: 50px; display: flex; align-items: center; gap: 12px; padding: 0 16px; border: 1px solid #34363e; border-radius: 4px; background: #24252b; color: #fff; cursor: pointer; font-family: inherit; }
.ps-lang-btn b { flex: 1; text-align: left; font-size: .9rem; }
.ps-lang-btn svg { width: 18px; height: 18px; fill: none; stroke: #9aa1ab; stroke-width: 2; }
.ps-lang-menu { display: none; position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 5; background: #24252b; border: 1px solid #34363e; border-radius: 4px; overflow: hidden; }
.ps-lang.open .ps-lang-menu { display: block; }
.ps-lang-menu button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: none; background: none; color: #fff; font-weight: 700; cursor: pointer; font-family: inherit; }
.ps-lang-menu button:hover { background: #2f3139; }
.ps-body h3 { margin: 8px 0 0; font-size: 1.05rem; }
.ps-radio { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.ps-radio input { appearance: none; width: 16px; height: 16px; margin: 2px 0 0; border: 2px solid #fff; border-radius: 50%; flex-shrink: 0; cursor: pointer; }
.ps-radio input:checked { border-color: #f0a030; background: radial-gradient(circle, #fff 0 2px, #f0a030 3px); }
.ps-radio span { display: flex; flex-direction: column; gap: 2px; }
.ps-radio b { font-size: .92rem; }
.ps-radio i, .ps-streamer i { font-style: normal; font-size: .72rem; color: #8a94a0; line-height: 1.4; }
.ps-streamer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 6px; }
.ps-streamer > div { display: flex; flex-direction: column; gap: 3px; }
.ps-streamer b { font-size: 1.05rem; }
.ps-foot { display: flex; justify-content: center; padding: 22px; }
.ps-save { width: auto !important; min-width: 250px; height: 52px; padding: 0 30px !important; border-radius: 2px !important; font-size: 1rem !important; }
@media (max-width: 600px) { .ps-head { padding: 18px; } .ps-body { padding: 18px; } .ps-save { width: 100% !important; } }
#psNickErr:empty { display: none; } #psNickErr { margin: -4px 0 0; }

/* v94: плашка «NEW» на новых кейсах (список — NEW_CASES в script.js) */
.case-card-new { position: relative; }
.case-new-badge { position: absolute; top: 10px; left: 10px; z-index: 4; padding: 3px 9px; border-radius: 7px; font-size: .68rem; font-weight: 900; letter-spacing: .8px;
    color: #fff; background: linear-gradient(135deg, #22c55e, #16a34a); box-shadow: 0 0 12px rgba(34,197,94,.55); animation: newPulse 2s ease-in-out infinite; }
@keyframes newPulse { 50% { box-shadow: 0 0 20px rgba(34,197,94,.9); } }

/* v101: «Тайный» кейс — кнопка «Что это?» и окно с объяснением */
.prizes-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.prizes-head h3 { margin: 0; }
.mystery-info-btn { align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 9px; border: 1px solid rgba(255,170,0,.5); background: rgba(255,170,0,.1);
    color: #ffb020; font-weight: 800; font-size: .78rem; cursor: pointer; font-family: inherit; }
.mystery-info-btn:hover { background: rgba(255,170,0,.2); }
.mystery-box { max-width: 460px; }
.mb-p { color: #c9d1d9; font-size: .9rem; line-height: 1.5; margin: 6px 0 14px; }
.mb-rows { display: flex; flex-direction: column; gap: 8px; }
.mb-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.mb-row b { font-size: .95rem; } .mb-row span { font-weight: 900; color: #9aa1ab; }
.mb-row.hot { border-color: rgba(255,170,0,.45); background: rgba(255,170,0,.08); } .mb-row.hot span { color: #ffb020; }
.mb-note { color: #8a94a0; font-size: .78rem; margin: 14px 0 0; line-height: 1.45; }

/* =====================================================================
   v102: рулетка кейсов в хэллоуинском стиле
   ===================================================================== */
/* цвет редкости у каждого предмета в ленте (в обеих темах) */
.case-ticker-item[class*="rarity-"] { position: relative; background: linear-gradient(0deg, rgba(var(--tier-rgb), .22), transparent 55%); }
.case-ticker-item[class*="rarity-"]::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--tier); box-shadow: 0 0 10px var(--tier); }

html.theme-halloween .case-spin-block { position: relative; background: linear-gradient(180deg, #24123a, #170c26) !important; border-color: #4a2770 !important;
    box-shadow: 0 0 0 1px rgba(255,138,31,.08), 0 10px 30px rgba(0,0,0,.45); overflow: hidden; }
/* паутина в углах блока */
html.theme-halloween .case-spin-block::before, html.theme-halloween .case-spin-block::after { content: ''; position: absolute; top: 0; width: 70px; height: 70px; z-index: 6; pointer-events: none; opacity: .4;
    background: repeating-radial-gradient(circle at 0 0, transparent 0 11px, rgba(255,255,255,.6) 11px 12px), repeating-conic-gradient(from 0deg at 0 0, transparent 0 13deg, rgba(255,255,255,.55) 13deg 14deg);
    -webkit-mask: radial-gradient(circle at 0 0, #000 0 68%, transparent 70%); mask: radial-gradient(circle at 0 0, #000 0 68%, transparent 70%); }
html.theme-halloween .case-spin-block::before { left: 0; }
html.theme-halloween .case-spin-block::after { right: 0; transform: scaleX(-1); }
/* лента: тёмно-фиолетовая с оранжевым свечением по центру и туманом по краям */
html.theme-halloween .case-ticker-wrap { background: radial-gradient(ellipse 30% 90% at 50% 50%, rgba(255,120,20,.22), transparent 70%), linear-gradient(180deg, #120a1e, #1c0f2e) !important;
    box-shadow: inset 0 0 0 1px #3b2156, inset 0 0 30px rgba(0,0,0,.6); }
html.theme-halloween .case-ticker-wrap::before, html.theme-halloween .case-ticker-wrap::after { content: ''; position: absolute; top: 0; bottom: 0; width: 18%; z-index: 2; pointer-events: none; }
html.theme-halloween .case-ticker-wrap::before { left: 0; background: linear-gradient(90deg, #120a1e, transparent); }
html.theme-halloween .case-ticker-wrap::after { right: 0; background: linear-gradient(-90deg, #120a1e, transparent); }
html.theme-halloween .case-ticker-item { border-right-color: rgba(255,255,255,.05) !important; }
html.theme-halloween .case-ticker-item span { color: #e9dcff; }
/* центральная линия — оранжевая, сверху тыква, снизу летучая мышь */
html.theme-halloween .case-ticker-line { background: linear-gradient(180deg, #ffb347, #ff6a00) !important; width: 3px; box-shadow: 0 0 14px #ff8a1f, 0 0 30px rgba(255,120,0,.6) !important; }
html.theme-halloween .case-ticker-indicator { border: none !important; top: -2px; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
    font-size: 22px; line-height: 1; filter: drop-shadow(0 0 8px rgba(255,120,0,.9)); animation: hwTick 1.6s ease-in-out infinite; }
html.theme-halloween .case-ticker-indicator::before { content: '🎃'; }
html.theme-halloween .case-ticker-wrap > .case-ticker-line::after { content: '🦇'; position: absolute; left: 50%; bottom: -2px; transform: translateX(-50%); font-size: 18px; filter: drop-shadow(0 0 6px rgba(160,80,255,.8)); }
@keyframes hwTick { 50% { transform: translateX(-50%) translateY(2px) scale(1.08); } }
/* выигранный предмет подсвечивается оранжевым */
html.theme-halloween .case-ticker-item[style*="border"] { border: 2px solid #ff8a1f !important; background: rgba(255,138,31,.16) !important; box-shadow: inset 0 0 18px rgba(255,138,31,.35); }

/* v103: анимация открытия — внутри каждого блока рулетки, а не на весь экран */
.case-spin-block { position: relative; overflow: hidden; }
.case-spin-block > .case-burst { position: absolute; inset: 0; z-index: 20; border-radius: inherit; }
.case-spin-block > .case-burst .cbu-case { width: 120px; height: 120px; animation-delay: var(--bdl, 0ms), calc(.35s + var(--bdl, 0ms)); }
.case-spin-block > .case-burst .cbu-case .cb-emo { font-size: 4.6rem; }
.case-spin-block > .case-burst .cbu-glow { width: 180px; height: 180px; }
.case-roulettes-grid.multi .case-spin-block > .case-burst .cbu-case { width: 96px; height: 96px; }
.case-roulettes-grid.multi .case-spin-block > .case-burst .cbu-case .cb-emo { font-size: 3.6rem; }

/* =====================================================================
   v106: ивент — герой с боссом, сегментная полоска HP, карточки справа, таблица «Лучшие по урону»;
   уведомления (и короткие тосты) — справа сверху
   ===================================================================== */
#toast { display: none !important; }
#notifyStack .notify-card span:empty { display: none; }
.event-view .ev-body { display: flex !important; flex-direction: column; gap: 28px; }
.evb-hero { position: relative; min-height: 560px; border-radius: 22px; overflow: hidden; border: 1px solid #34204d;
    background: linear-gradient(180deg, rgba(14,8,22,.15) 0%, rgba(14,8,22,.35) 55%, #120a1c 100%), url('images/event-fon.png') center/cover no-repeat, radial-gradient(circle at 50% 35%, #4a1f6e, #120a1c 70%);
    display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 24px 24px 28px; }
.evb-boss { position: absolute; left: 50%; top: 18px; transform: translateX(-50%); width: min(340px, 60%); aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
    filter: drop-shadow(0 18px 40px rgba(0,0,0,.6)) drop-shadow(0 0 40px rgba(168,85,247,.35)); animation: evbFloat 4s ease-in-out infinite; }
.evb-boss img { width: 100%; height: 100%; object-fit: contain; }
.evb-boss .ev-boss-emo { font-size: 10rem; }
.evb-hero.dead .evb-boss { filter: grayscale(1) brightness(.5); animation: none; }
@keyframes evbFloat { 50% { transform: translateX(-50%) translateY(-8px); } }
.evb-boss.hit { animation: evbHit .35s ease-out; }
@keyframes evbHit { 25% { transform: translateX(calc(-50% - 10px)) rotate(-3deg); filter: brightness(2) drop-shadow(0 0 30px #ff3b3b); } 60% { transform: translateX(calc(-50% + 8px)) rotate(2deg); } }
.evb-boss .ev-dmg { position: absolute; top: 30%; font-weight: 900; font-size: 1.6rem; color: #ff4d4d; text-shadow: 0 2px 6px #000; animation: evDmg .9s ease-out forwards; pointer-events: none; }
.evb-stats { position: absolute; right: 18px; top: 18px; display: flex; flex-direction: column; gap: 10px; width: 250px; z-index: 3; }
.evb-card { padding: 14px 18px; border-radius: 14px; background: rgba(20,10,30,.82); border: 1px solid rgba(239,68,68,.55); box-shadow: 0 0 18px rgba(239,68,68,.15); backdrop-filter: blur(4px); }
.evb-card span { display: block; font-weight: 800; font-size: .8rem; letter-spacing: .5px; text-transform: uppercase; color: #e5e7eb; }
.evb-card b { display: block; margin-top: 4px; font-size: 1.9rem; font-weight: 900; color: #fff; line-height: 1.1; }
.evb-card b small { font-size: .9rem; font-weight: 700; color: #cbd5e1; }
.evb-card i { display: block; margin-top: 4px; font-style: normal; font-size: .72rem; color: #9aa1ab; }
.evb-en { border-color: rgba(255,170,0,.6); box-shadow: 0 0 18px rgba(255,170,0,.18); } .evb-en b { color: #ffb020; }
.evb-bottom { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 8px; width: min(820px, 100%); }
.evb-name { font-size: 1.5rem; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; color: #fff; text-shadow: 0 2px 10px #000; }
.evb-bar { width: 100%; display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; padding: 10px 14px; border-radius: 12px;
    background: linear-gradient(180deg, #3a3d44, #1c1d22); border: 3px solid #5b5f68; box-shadow: inset 0 0 0 2px #0b0c10, 0 0 0 2px #7f1d1d, 0 0 24px rgba(239,68,68,.35); }
.evb-bar i { height: 34px; border-radius: 6px; background: linear-gradient(180deg, #2b2d33, #1a1b20); box-shadow: inset 0 2px 4px rgba(0,0,0,.6); }
.evb-bar i.on { background: linear-gradient(180deg, #ffd27a, #ff9a1f 45%, #e8590c); box-shadow: inset 0 2px 0 rgba(255,255,255,.4), 0 0 12px rgba(255,140,0,.6); }
.evb-hp { font-size: 1.15rem; color: #cbd5e1; } .evb-hp b { color: #fff; font-weight: 900; }
.evb-timer { font-size: .9rem; color: #f5c46b; } .evb-timer b { color: #fff; }
.evb-btn { margin-top: 10px; min-width: 340px; height: 64px; padding: 0 30px; border: 1px solid #ef4444; border-radius: 14px; cursor: pointer; font-family: inherit;
    font-size: 1.1rem; font-weight: 900; letter-spacing: .5px; text-transform: uppercase; color: #fff; background: linear-gradient(180deg, #dc2626, #991b1b); box-shadow: 0 8px 26px rgba(220,38,38,.45); }
.evb-btn:not(:disabled):hover { filter: brightness(1.12); transform: translateY(-1px); }
.evb-btn:disabled { opacity: .5; cursor: not-allowed; }
.evb-link { background: none; border: none; color: #ffb020; font-weight: 700; font-size: .85rem; cursor: pointer; font-family: inherit; text-decoration: underline dotted; }
/* таблица */
.evt { display: flex; flex-direction: column; gap: 8px; }
.evt h2 { margin: 0; text-align: center; font-size: 2.6rem; font-weight: 900; text-transform: uppercase; color: #fff; letter-spacing: 1px; }
.evt-sub { text-align: center; font-weight: 700; text-transform: uppercase; color: #e5e7eb; margin-bottom: 14px; }
.evt-head, .evt-row { display: grid; grid-template-columns: 70px 1fr 180px 220px; align-items: center; gap: 12px; padding: 0 24px; }
.evt-head { font-size: .72rem; font-weight: 800; color: #8a94a0; text-transform: uppercase; }
.evt-head span:nth-child(3), .evt-head span:nth-child(4), .evt-dmg, .evt-prize { text-align: right; justify-content: flex-end; }
.evt-row { min-height: 76px; border-radius: 12px; background: #1d1720; border: 1px solid #2a2230; border-left: 3px solid transparent; }
html.theme-halloween .evt-row { background: #1f1330; border-color: #34204d; }
.evt-row.p1 { border-left-color: #facc15; } .evt-row.p2 { border-left-color: #cbd5e1; } .evt-row.p3 { border-left-color: #f59e0b; }
.evt-row.me { box-shadow: inset 0 0 0 1px #ff8a1f; }
.evt-n { font-weight: 900; color: #8a94a0; text-align: center; } .p1 .evt-n { color: #facc15; } .p2 .evt-n { color: #e5e7eb; } .p3 .evt-n { color: #f59e0b; }
.evt-pl { display: flex; align-items: center; gap: 14px; min-width: 0; } .evt-pl b { font-weight: 900; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evt-ava { flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-style: normal; font-weight: 900; color: #fff;
    background: radial-gradient(circle at 50% 35%, #e0484d, #7f1d1d); border: 2px solid #2a2230; }
.p1 .evt-ava { border-color: #facc15; } .p2 .evt-ava { border-color: #cbd5e1; } .p3 .evt-ava { border-color: #f59e0b; }
.evt-dmg { font-weight: 900; font-size: 1.05rem; color: #fff; }
.evt-prize { display: flex; align-items: center; gap: 6px; font-weight: 900; color: #fbbf24; } .evt-prize img { width: 34px; height: 34px; object-fit: contain; }
.evt-prize em { font-style: normal; font-weight: 800; color: #fbbf24; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evt-more { margin-top: 4px; height: 56px; border-radius: 12px; border: 1px solid #2a2230; background: #1d1720; color: #c9d1d9; font-weight: 800; text-transform: uppercase; cursor: pointer; font-family: inherit; }
html.theme-halloween .evt-more { background: #1f1330; border-color: #34204d; }
@media (max-width: 900px) {
    .evb-hero { min-height: 0; padding-top: 330px; }
    .evb-boss { width: 260px; }
    .evb-stats { position: relative; right: auto; top: auto; width: 100%; flex-direction: row; order: 2; margin-top: 14px; }
    .evb-card { flex: 1; padding: 10px 12px; } .evb-card b { font-size: 1.3rem; }
    .evb-btn { min-width: 0; width: 100%; }
    .evt h2 { font-size: 1.7rem; }
    .evt-head, .evt-row { grid-template-columns: 34px 1fr 90px; padding: 0 12px; }
    .evt-head span:nth-child(4), .evt-prize { grid-column: 2 / -1; }
    .evt-row { padding: 10px 12px; }
    .evt-head span:nth-child(4) { display: none; }
}
.evb-hero { min-height: 680px; }
.evb-boss { width: min(320px, 55%); top: 14px; }
.evt-head, .evt-row { grid-template-columns: 70px 1fr 160px 260px; }
.evt-prize em { max-width: 180px; }
@media (max-width: 900px) { .evb-hero { min-height: 0; padding-top: 300px; } .evb-boss { width: 250px; } .evt-head, .evt-row { grid-template-columns: 34px 1fr 90px; } }
/* телефон: в шапке только большой логотип (раньше на узких экранах показывались оба сразу) */
@media (max-width: 760px) {
    header .logo.has-big .logo-img { display: none !important; }
    header .logo.has-big .logo-desktop { display: block !important; height: 30px; width: auto; max-width: 44vw; object-fit: contain; }
}

/* v107: цена ивентовых кейсов — в одну строку (была квадратной), блок ивентовых кейсов во вкладке «Хэллоуин» */
.case-price-tag.evt { flex-direction: row !important; flex-wrap: nowrap; white-space: nowrap; width: auto !important; height: auto !important; aspect-ratio: auto !important; gap: 6px; padding: 6px 10px; }
.case-price-tag.evt img { width: 18px !important; height: 18px !important; flex-shrink: 0; }
.ev-cases { display: flex; flex-direction: column; gap: 12px; }
.ev-cases-sub { margin: 0; color: #c9d1d9; font-size: .9rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ev-cases-sub img { width: 18px; height: 18px; }

/* v110: слоты апгрейда всегда одинаковые и квадратные — сколько бы брейнротов ни положили */
@media (min-width: 761px) {
    .upgrade-area { grid-template-columns: minmax(0, 1fr) 336px minmax(0, 1fr) !important; }
    .upgrade-area .slot-wrapper { min-width: 0; }
    .upgrade-area .slot-box { width: 100% !important; height: auto !important; aspect-ratio: 1 / 1; min-width: 0; overflow: hidden; }
}
.slot-box .multi-grid { min-width: 0; max-width: 100%; }
.slot-box .multi-grid.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.slot-box .multi-grid.n3, .slot-box .multi-grid.n4, .slot-box .multi-grid.n5, .slot-box .multi-grid.n6 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.slot-box .multi-tile { min-width: 0; }

/* v111: вкладка ивента в меню телефона — оранжевая */
.mm-item.mm-event { background: linear-gradient(135deg, #ff9a2e, #e8650a); border-color: #ffb15c; color: #fff; box-shadow: 0 4px 16px rgba(255,138,31,.3); }
.mm-item.mm-event svg { stroke: #fff; }
.mm-item.mm-event:hover { border-color: #ffd29a; filter: brightness(1.06); }

/* ===== кейс «Биткоин»: таймер смены курса ===== */
.case-tag.case-tag-btc { background: rgba(247, 147, 26, .18); border-color: rgba(247, 147, 26, .55); color: #ffd08a; font-variant-numeric: tabular-nums; }
.case-btc-timer { display: inline-flex; align-items: center; gap: 4px; margin-right: 8px; padding: 2px 10px; border-radius: 999px; font-size: .8rem; vertical-align: middle;
  background: rgba(247, 147, 26, .18); border: 1px solid rgba(247, 147, 26, .55); color: #ffd08a; font-variant-numeric: tabular-nums; }

/* ===== окно кейса: название по центру, «Что это?» рядом с названием ===== */
.case-open-header { position: relative; justify-content: center; min-height: 44px; }
.case-open-header .btn-back-case { position: absolute; left: 0; top: 50%; transform: translateY(-50%); }
.case-title-wrap { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; text-align: center; padding: 0 110px; min-width: 0; }
.case-title-wrap .case-title-main { margin: 0; }
.case-title-wrap .mystery-info-btn { flex: none; }
@media (max-width: 640px) {
  .case-open-header { flex-direction: column; gap: 10px; }
  .case-open-header .btn-back-case { position: static; transform: none; align-self: flex-start; }
  .case-title-wrap { padding: 0; }
}
/* окно «Что это?» у кейса «Биткоин» */
.btc-rows .mb-row.now { border-color: rgba(247, 147, 26, .7); background: rgba(247, 147, 26, .14); }
.btc-rows .mb-row span { font-variant-numeric: tabular-nums; }

/* ===== ивент «Школа»: зелёная «доска» вместо хэллоуинского фиолетового ===== */
.evb-hero { border-color: #1f4d36 !important;
    background: linear-gradient(180deg, rgba(8,20,14,.10) 0%, rgba(8,20,14,.35) 55%, #0b1a12 100%), url('images/event-fon.png?v=2') center/cover no-repeat, radial-gradient(circle at 50% 35%, #1f5a3d, #0b1a12 70%) !important; }

/* =====================================================================
   v30 (upd3): карточки предметов в стиле «скинов» — серый градиент, цена справа сверху,
   название и подпись снизу слева, цветная полоска редкости. Свечение за картинкой оставлено.
   ===================================================================== */
.card, .card[class*="rarity-"] {
    background: linear-gradient(180deg, #5a5e66 0%, #44474e 45%, #33363c 100%) !important;
    border: none !important; border-radius: 4px !important;
    box-shadow: inset 0 -4px 0 var(--tier, #6b7280) !important;
    align-items: stretch !important; justify-content: flex-end !important;
    padding: 8px 9px 12px !important;
}
.card:hover { filter: brightness(1.08) !important; }
.card.selected, .card.in-cart { box-shadow: inset 0 -4px 0 var(--tier, #6b7280), 0 0 0 2px var(--gold) !important; }
/* свечение за картинкой — чуть ярче на сером фоне */
.card[class*="rarity-"]::before { opacity: .55; }
.card[class*="rarity-"]::after { opacity: .10; }
/* цена — белая, справа сверху */
.card .price, .card:not(.history-card-shop) .price, .panel .card .price, .profile-inventory-section .card .price {
    position: absolute !important; top: 6px !important; right: 8px !important; left: auto !important;
    color: #fff !important; font-weight: 800 !important; font-size: .74rem !important; letter-spacing: .2px;
    text-shadow: 0 1px 2px rgba(0,0,0,.55) !important; display: flex; align-items: center; gap: 3px; z-index: 3;
}
/* иконка валюты — в своём цвете */
/* название и подпись — снизу слева: название жирное белое, под ним серая подпись */
.card .name, .panel .card .name, .profile-inventory-section .card .name {
    order: 2; text-align: left !important; color: #fff !important; font-weight: 800 !important;
    font-size: .7rem !important; margin: 0 !important; text-shadow: 0 1px 2px rgba(0,0,0,.5) !important;
}
.card .cat, .panel .card .cat, .profile-inventory-section .card .cat {
    order: 3; text-align: left !important; color: #b9bcc2 !important; font-weight: 700 !important;
    font-size: .58rem !important; margin: 1px 0 0 !important; text-shadow: none !important;
}
.card .brainrot-img { order: 1; filter: drop-shadow(0 6px 8px rgba(0,0,0,.35)); }
.card .count-badge { color: #fff !important; left: 8px !important; right: auto !important; top: 6px !important; }

/* пополнение брейнротами: −/количество/+ на карточке */
.dep-card { justify-content: flex-end !important; height: auto !important; min-height: 150px; }
.dep-card .brainrot-img { height: 64px !important; margin: 14px 0 6px !important; }
.dep-card .dep-qty { order: 4; display: flex; align-items: center; justify-content: space-between; margin-top: 8px;
    background: rgba(0,0,0,.28); border-radius: 6px; overflow: hidden; }
.dep-card .dep-qty button { width: 30px; height: 26px; border: none; background: transparent; color: #fff; font-size: 1rem; font-weight: 900; cursor: pointer; }
.dep-card .dep-qty button:hover { background: rgba(255,255,255,.12); }
.dep-card .dep-qty span { flex: 1; text-align: center; color: #fff; font-weight: 800; font-size: .8rem; }
.dep-card.selected .dep-qty { background: rgba(255,212,0,.22); }
.dep-grid-new { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)) !important; }
.panel .card .brainrot-img, .profile-inventory-section .card .brainrot-img, .card .brainrot-img { margin: 16px 0 -4px !important; position: relative; z-index: 0; }

/* v31 (upd3): карточки-прямоугольники, 4 в ряд × 4 ряда на страницу */
.panel .grid-container, .profile-inventory-section .grid-container { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 8px !important; }
.panel .grid-container .card, .profile-inventory-section .grid-container .card {
    height: auto !important; min-height: 0 !important; aspect-ratio: 4 / 3; }
.panel .card .brainrot-img, .profile-inventory-section .card .brainrot-img { flex: 1 1 0 !important; min-height: 0 !important; height: auto !important; max-height: none !important; margin: 14px 0 0 !important; }
.panel .card .name, .profile-inventory-section .card .name { font-size: .74rem !important; }
.panel .card .price, .profile-inventory-section .card .price { font-size: .78rem !important; }
.dep-grid-new { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.panel .card .brainrot-img, .profile-inventory-section .card .brainrot-img { flex: none !important; height: 60% !important; margin: 12px 0 -2px !important; }
.panel .grid-container > *, .profile-inventory-section .grid-container > * { aspect-ratio: 4 / 3; height: auto !important; min-height: 0 !important; }

/* v32 (upd3): окна выбора шире — карточки крупнее */
#upgradeView { max-width: 1400px !important; }
.bottom-split-layout { max-width: 1400px !important; gap: 16px !important; }
.panel .grid-container { gap: 10px !important; }
.panel .card .name { font-size: .82rem !important; }
.panel .card .cat { font-size: .64rem !important; }
.panel .card .price { font-size: .86rem !important; top: 8px !important; right: 10px !important; }
.panel .card .price img, .panel .card .price .currency-img { width: 15px !important; height: 15px !important; }
/* окно пополнения шире, список брейнротов выше — карточки крупнее (на компьютере) */
@media (min-width: 900px) {
    .deposit-modal-box { max-width: 880px !important; }
    .dep-grid-new { max-height: min(460px, 52vh) !important; min-height: 300px !important; gap: 10px !important; }
    .dep-card .brainrot-img { height: 78px !important; }
    .dep-card .name { font-size: .78rem !important; }
    .dep-card .price { font-size: .82rem !important; }
}

/* v33 (upd3): кнопка мутации под ценой и окно выбора мутации */
.card .mut-btn { position: absolute; top: 30px; right: 8px; z-index: 4; width: 28px; height: 28px; padding: 4px; border-radius: 7px;
    border: 1px solid rgba(255,255,255,.14); background: rgba(20,22,27,.72); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: .15s; }
.card .mut-btn:hover { background: rgba(20,22,27,.95); border-color: var(--gold); }
.mut-cube { width: 100%; height: 100%; display: block; }
.mut-box { width: min(440px, 94vw); max-height: 88vh; overflow-y: auto; background: #17191f; border: 1px solid #2a2d35; border-radius: 16px; padding: 18px; }
.mut-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mut-head h3 { margin: 0; font-size: 1.05rem; font-weight: 800; color: #fff; }
.mut-close { width: 34px; height: 34px; border: none; border-radius: 9px; background: #2a2d35; color: #fff; font-size: 1.1rem; cursor: pointer; }
.mut-list { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.mut-opt { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 10px; border: 1px solid #2c2f37; background: #1d2027; color: #fff; text-align: left; cursor: pointer; transition: .15s; }
.mut-opt:hover { border-color: #4a4e58; }
.mut-opt.active { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.mut-opt .mut-cube { width: 22px; height: 22px; flex: none; }
.mut-opt span { display: flex; flex-direction: column; min-width: 0; }
.mut-opt b { font-size: .88rem; font-weight: 800; }
.mut-opt i { font-style: normal; font-size: .72rem; color: #9097a3; font-weight: 600; }

/* v34 (upd3): кнопка мутации слева, иконки мутаций с вики */
.card .mut-btn { top: 6px; left: 8px; right: auto; width: 32px; height: 32px; padding: 3px; }
.mut-ico { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; }
.mut-opt .mut-ico { width: 30px; height: 30px; flex: none; }

/* v35 (upd3): иконка мутации слева от цены (в инвентаре и т.п.), не нажимается */
.mut-tag { display: inline-flex; align-items: center; margin-right: 4px; vertical-align: middle; pointer-events: none; }
.mut-tag .mut-ico { width: 16px; height: 16px; }
.card .mut-btn.mut-static { cursor: default; pointer-events: none; }

/* v36 (upd3): колесо апгрейда как на референсе — тонкий круг с рисками снаружи, серая полоса шанса,
   тёмное кольцо с делениями, внутри диск со шевроном, золотая стрелка снизу */
#upgradeView .wheel-container { width: 330px; height: 330px; }
#upgradeView .wheel-container::before { inset: -9px;
    background: repeating-conic-gradient(from -.5deg, rgba(255,255,255,.2) 0 1deg, transparent 1deg 7.5deg);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 6px));
            mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 6px)); }
#upgradeView .wheel-outline { inset: 0; background: #2a2c31; }
#upgradeView .wheel-ring { inset: 18px; background: #202226; }
#upgradeView .wheel-inner { inset: 52px; background: #1c1d21; border: 2px solid #0e0f11; }
#upgradeView .wheel-inner::before { content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
    background: repeating-conic-gradient(from 0deg, #101113 0 8.5deg, #1a1b1f 8.5deg 10deg);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 15px), #000 calc(100% - 15px));
            mask: radial-gradient(farthest-side, transparent calc(100% - 15px), #000 calc(100% - 15px)); }
#upgradeView .wheel-chevron { width: 118px; height: 150px; opacity: .07; transform: none; }
#upgradeView .wheel-chance { font-size: 2.7rem; color: #c6f24a; }
#upgradeView .wheel-label { color: #a7c64e; font-size: .9rem; }
#upgradeView .wheel-marker { color: rgba(170,175,185,.6); font-size: .62rem; }
#upgradeView .marker-top { top: 4px; } #upgradeView .marker-left { left: -2px; } #upgradeView .marker-right { right: -2px; }
#upgradeView .marker-left, #upgradeView .marker-right { top: 50%; transform: translateY(-50%); }
#upgradeView .wheel-marker.marker-bottom { display: none !important; }
#upgradeView .pointer-arrow { top: -163px; left: -11px; width: 22px; height: 46px; filter: drop-shadow(0 0 5px rgba(255,205,0,.6)); }

/* v37 (upd3): фон сайта — ровный тёмно-серый, без картинки */
body { background: #131418 !important; background-image: none !important; }

/* v38 (upd3): профиль — широкий, три блока сверху, вкладки, 8 предметов в ряд × 2 ряда на страницу */
#profileView { max-width: min(1860px, 96vw) !important; width: 100%; padding: 26px 0 !important; }
#profileView .pr2 { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; width: 100%; min-height: 268px;
    padding: 0; border: none; border-radius: 0; background: none; box-shadow: none; }
#profileView .pr2-card { position: relative; overflow: hidden; border-radius: 14px; border: 1px solid #262830;
    background: linear-gradient(160deg, #22242b 0%, #191a1f 100%); }
#profileView .pr2-lbl { color: #8d929c; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; }

/* — игрок — */
#profileView .pr2-user { display: flex; flex-direction: column; }
#profileView .pr2-top { display: flex; gap: 18px; padding: 22px 22px 18px; align-items: center; }
#profileView .pr2 .avatar-large { width: 92px; height: 92px; border-radius: 14px; border: 3px solid #fff; background: #0b0c10; font-size: 2.4rem; flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(0,0,0,.45); }
#profileView .pr2-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
#profileView .pr2 .user-name { font-size: 1.5rem; font-weight: 900; color: #fff; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#profileView .pr2-id { align-self: flex-start; padding: 4px 10px; border-radius: 7px; background: #15161a; border: 1px solid #2a2c33; color: #9aa0aa; font-size: .8rem; font-weight: 700; }
#profileView .pr2 .admin-btn-big { align-self: flex-start; }
#profileView .pr2-icons { display: flex; gap: 6px; align-self: flex-start; }
#profileView .pr2-icons .icon-btn { width: 36px; height: 36px; border-radius: 10px; background: #15161a; border: 1px solid #2a2c33; color: #9aa0aa; display: flex; align-items: center; justify-content: center; }
#profileView .pr2-icons .icon-btn:hover { color: #fff; border-color: #464a54; }
#profileView .pr2-icons .icon-btn svg { width: 18px; height: 18px; }
#profileView .pr2-bal { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 22px; padding: 16px 18px;
    border-radius: 12px; background: #15161a; border: 1px solid #25272d; }
#profileView .pr2-balv { display: flex; align-items: center; gap: 8px; font-size: 1.7rem; font-weight: 900; color: #fff; margin-top: 4px; }
#profileView .pr2-balv .currency-img, #profileView .pr2-outv .currency-img, #profileView .pr2-best .currency-img { width: 22px; height: 22px; }
#profileView .pr2-dep { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 11px; cursor: pointer; border: none;
    background: linear-gradient(180deg, #ffe14a, #ffc400); color: #17140a; font: inherit; font-weight: 900; font-size: .98rem; box-shadow: 0 6px 20px rgba(255,200,0,.25); transition: .15s; }
#profileView .pr2-dep:hover { transform: translateY(-1px); box-shadow: 0 8px 26px rgba(255,200,0,.38); }
#profileView .pr2-dep svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 3; fill: none; }
#profileView .pr2-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px 22px 20px; margin-top: auto; }
#profileView .pr2-stats span { display: flex; align-items: center; justify-content: center; gap: 9px; height: 44px; border-radius: 10px; background: #15161a; border: 1px solid #25272d;
    color: #fff; font-weight: 900; font-size: 1.05rem; }
#profileView .pr2-stats svg { width: 19px; height: 19px; stroke: var(--gold); stroke-width: 2; fill: none; }

/* — лучший дроп (анимации шевронов и блика сохранены) — */
#profileView .pr2-best { display: flex; flex-direction: row; align-items: stretch; gap: 18px; padding: 22px; min-height: 0;
    border: 1px solid #3a2f1c; background: radial-gradient(120% 140% at 85% 50%, rgba(255,170,0,.16), transparent 55%), linear-gradient(110deg, #1d1d21 0%, #2a2216 100%); }
#profileView .pr2-best .best-drop-text { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; position: relative; z-index: 1; }
#profileView .pr2-best .best-drop-title { color: #c9a24a; font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; }
#profileView .pr2-best-sub { color: #8d929c; font-size: .8rem; font-weight: 700; margin-bottom: 6px; }
#profileView .pr2-best .best-drop-name { font-size: 1.7rem; font-weight: 900; color: #fff; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#profileView .pr2-best .best-drop-price { display: inline-flex; align-self: flex-start; align-items: center; gap: 7px; margin-top: 12px; padding: 8px 14px; border-radius: 10px;
    background: rgba(255,200,0,.1); border: 1px solid rgba(255,200,0,.3); font-size: 1.1rem; font-weight: 900; color: var(--gold); }
#profileView .pr2-best .best-drop-art { height: 100%; aspect-ratio: 1; width: auto; max-width: 52%; flex-shrink: 0; border-radius: 12px;
    background: radial-gradient(circle at 50% 55%, rgba(255,200,0,.28), transparent 65%), linear-gradient(180deg, #4a4e56, #2c2f35); box-shadow: inset 0 -4px 0 var(--gold);
    display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; }
#profileView .pr2-best .best-drop-art img { width: 80%; height: 80%; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(0,0,0,.5)); }
#profileView .pr2-best .bd-chev { left: 38%; right: auto; width: 90px; opacity: .35; }
#profileView .pr2-best .bd-chev svg { width: 90px; }

/* — выведено / купон / кнопки — */
#profileView .pr2-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
#profileView .pr2-out { flex: 1; padding: 20px 22px; display: flex; flex-direction: column; }
#profileView .pr2-out-bg { position: absolute; right: -10px; top: 50%; transform: translateY(-50%); width: 130px; height: 160px; fill: #fff; opacity: .05; pointer-events: none; }
#profileView .pr2-outv { display: flex; align-items: center; gap: 10px; font-size: 2.1rem; font-weight: 900; color: #fff; margin-top: 6px; }
#profileView .pr2-outn { margin-top: auto; align-self: flex-start; padding: 6px 12px; border-radius: 8px; background: #15161a; border: 1px solid #25272d; color: #c9ccd2; font-weight: 700; font-size: .88rem; }
#profileView .pr2-outn span { color: #fff; font-weight: 900; }
#profileView .pr2-coupon { display: flex; gap: 6px; padding: 6px; border-radius: 12px; }
#profileView .pr2-coupon input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border-radius: 9px; border: none; background: transparent; color: #fff; font: inherit; font-size: .95rem; }
#profileView .pr2-coupon input:focus { outline: none; }
#profileView .pr2-coupon button { height: 44px; padding: 0 18px; border-radius: 9px; border: none; background: #2c2e35; color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
#profileView .pr2-coupon button:hover { background: #3a3d46; }
#profileView .pr2 .prof-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
#profileView .pr2 .prof-actions > * { min-width: 0; margin: 0 !important; }
#profileView .pr2 .prof-actions .btn-notif { width: 100%; height: 56px; border-radius: 12px; background: #1d1e24; border: 1px solid #262830; font-size: .88rem; }
#profileView .pr2 .prof-actions .btn-partner { height: 56px; padding: 0 12px; border-radius: 12px; gap: 10px; }
#profileView .pr2 .prof-actions .btn-partner .bp-text i { display: none; }
#profileView .pr2 .prof-actions .btn-partner .bp-text b { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* — вкладки и сетка — */
#profileView .profile-inventory-section { margin-top: 18px; width: 100%; background: none; border: none; box-shadow: none; border-radius: 0; }
#profileView .inv-tabs { background: none; border: none; padding: 0 0 14px; gap: 10px; align-items: center; }
#profileView .inv-tab { height: 44px; padding: 0 16px; border-radius: 11px; border: 1px solid #262830; background: #1b1c21; color: #9aa0aa; font-weight: 800; font-size: .9rem; }
#profileView .inv-tab:hover { color: #fff; }
#profileView .inv-tab.active { background: rgba(255,200,0,.12); border-color: rgba(255,200,0,.45); color: var(--gold); box-shadow: none; }
#profileView .btn-sell-all { height: 44px; border-radius: 11px; background: #1b1c21; border: 1px solid #262830; color: #fff; font-weight: 800; }
#profileView #profileInventoryGrid { padding: 0 !important; grid-template-columns: repeat(8, minmax(0, 1fr)) !important; gap: 12px; min-height: 0 !important; }
#profileView #profileInventoryGrid .card { aspect-ratio: 4 / 3; height: auto; }
#profileView #profileInventoryGrid .card-empty { display: none; }
#profileView #profileInventoryGrid .empty-inv { grid-column: 1 / -1; }
#profileView .prof-inv-pager { justify-content: center; margin-top: 16px; }
@media (max-width: 1500px) { #profileView #profileInventoryGrid { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; } }
@media (max-width: 1200px) {
    #profileView .pr2 { grid-template-columns: 1fr 1fr; }
    #profileView .pr2-col { grid-column: 1 / -1; }
    #profileView #profileInventoryGrid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}
@media (max-width: 720px) {
    #profileView { max-width: 100% !important; }
    #profileView .pr2 { grid-template-columns: 1fr; }
    #profileView .pr2 .avatar-large { width: 72px; height: 72px; }
    #profileView .pr2-best .best-drop-art { height: 150px; max-width: 45%; }
    #profileView .pr2 .prof-actions { grid-template-columns: 1fr; }
    #profileView #profileInventoryGrid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* v39 (upd3): карточка как в магазине — везде (кейсы, рулетка кейса, история игр, история предметов,
   профиль игрока, апгрейд с несколькими предметами, Color Dice). Серый градиент, полоска редкости снизу,
   цена белая справа сверху, название снизу слева. */
.case-ticker-item, .pv-tile, .hg-card[class*="rarity-"], .multi-tile, .dice-stake-card {
    background: linear-gradient(180deg, #5a5e66 0%, #44474e 45%, #33363c 100%) !important;
    border: none !important; border-radius: 4px !important;
    box-shadow: inset 0 -4px 0 var(--tier, #6b7280) !important; }
.case-ticker-item img, .pv-tile img, .hg-card[class*="rarity-"] img, .multi-tile img, .dice-stake-card img { filter: drop-shadow(0 6px 8px rgba(0,0,0,.35)); }

/* рулетка кейса: ширину не трогаем (на ней считается прокрутка), разделитель — тёмная полоса справа */
.case-ticker-item { border-right: 6px solid #15161a !important; align-items: flex-start !important; padding: 8px 9px 12px !important; }
.case-ticker-item img { align-self: center; }
.case-ticker-item span { text-align: left !important; color: #fff !important; font-weight: 800 !important; font-size: .66rem !important; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.case-ticker-item b { color: #fff; font-size: .66rem; }

/* история предметов, профиль игрока */
.pv-tile { aspect-ratio: 4 / 3 !important; display: flex !important; flex-direction: column; align-items: stretch !important; justify-content: flex-end !important; padding: 8px 9px 12px !important; }
.pv-tile img { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); width: 62% !important; height: 58% !important; margin: 0 !important; }
.pv-tile .pv-price { position: absolute !important; top: 6px !important; right: 8px !important; left: auto !important; color: #fff !important; font-weight: 800 !important; font-size: .74rem !important;
    text-shadow: 0 1px 2px rgba(0,0,0,.55); display: flex; align-items: center; gap: 3px; z-index: 2; }
.pv-tile .pv-name { position: relative; z-index: 1; text-align: left !important; color: #fff !important; font-weight: 800 !important; font-size: .72rem !important; text-shadow: 0 1px 2px rgba(0,0,0,.5);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0 !important; }
.pv-tile .pv-label { position: absolute !important; top: 6px !important; left: 8px !important; bottom: auto !important; right: auto !important; transform: none !important; margin: 0 !important; z-index: 2;
    font-size: .6rem !important; padding: 3px 7px !important; border-radius: 5px !important; background: rgba(0,0,0,.45) !important; }
.pv-tile .il-qty { position: absolute; left: 8px; bottom: 26px; z-index: 2; }

/* история игр */
.hg-card[class*="rarity-"] { background-image: linear-gradient(180deg, #5a5e66 0%, #44474e 45%, #33363c 100%) !important; }
.hg-card[class*="rarity-"] .hg-price { color: #fff !important; text-shadow: 0 1px 2px rgba(0,0,0,.55); }
.hg-card[class*="rarity-"] .hg-date { color: #e3e5e9 !important; text-shadow: 0 1px 2px rgba(0,0,0,.55); }
.hg-card.hg-case, .hg-card.hg-rocket, .hg-card.hg-multi { border-radius: 4px !important; }

/* апгрейд несколькими предметами */
.multi-tile { align-items: stretch !important; padding: 16px 6px 8px !important; }
.multi-tile img { align-self: center; }
.multi-tile .tile-name { color: #fff !important; text-align: left !important; text-transform: none !important; font-size: .6rem !important; }
.multi-tile .tile-cat { text-align: left !important; color: #b9bcc2 !important; }
.multi-tile .tile-price { position: absolute; top: 4px; right: 6px; color: #fff !important; margin: 0 !important; }

/* Color Dice: ставка */
.dice-stake-card { align-items: stretch !important; padding: 8px 9px 12px !important; }
.dice-stake-card img { align-self: center; }
.dice-stake-card .name { order: 2; text-align: left !important; color: #fff !important; }
.dice-stake-card .cat { order: 3; text-align: left !important; color: #b9bcc2 !important; }
.dice-stake-card .price { position: absolute; top: 6px; right: 8px; color: #fff !important; }
.pv-tile .pv-price img, .pv-tile .pv-price .currency-img { position: static !important; width: 13px !important; height: 13px !important; margin: 0 !important; transform: none !important; }
.pv-tile .pv-label { top: auto !important; bottom: 11px !important; left: auto !important; right: 8px !important; }
.pv-tile .pv-name { padding-right: 70px; }

/* v40 (upd3): прямоугольные карточки (как в магазине) в рулетке кейса и истории игр; лучший дроп без карточки */
.case-ticker-item { flex: 0 0 200px !important; width: 200px !important; }
.case-ticker-item img { flex: 1 1 0; min-height: 0; width: 76% !important; height: auto !important; max-height: 100%; object-fit: contain; }
.case-ticker-item[class*="rarity-"]::after { display: none !important; }
.hg-card { height: clamp(150px, 12vw, 220px) !important; }
.dice-stake-card { width: 200px !important; height: 150px !important; }
.dice-stake-card img { width: 70px !important; height: 70px !important; }

/* лучший дроп: брейнрот крупно, без серой карточки, шевроны-анимация — прямо за ним */
#profileView .pr2-best .best-drop-art { background: none !important; box-shadow: none !important; border-radius: 0; overflow: visible; max-width: 55%; }
#profileView .pr2-best .best-drop-art img { width: 112% !important; height: 112% !important; max-width: none; position: relative; z-index: 2;
    filter: drop-shadow(0 14px 22px rgba(0,0,0,.55)); }
#profileView .pr2-best .bd-chev { left: auto !important; right: 22px !important; top: 22px !important; bottom: 22px !important; width: auto !important; aspect-ratio: 1;
    height: calc(100% - 44px); max-width: 55%; justify-content: center; opacity: .6 !important; z-index: 1 !important; }
#profileView .pr2-best .bd-chev svg { width: 62% !important; height: auto; }
#profileHistoryList { grid-template-columns: repeat(auto-fill, minmax(480px, 1fr)) !important; }
.hg-card img { max-height: 62% !important; max-width: 70% !important; margin-top: 8%; }
.hg-badge { bottom: 12px !important; left: 8px !important; padding: 3px 8px !important; font-size: .64rem !important; }
.hg-game { align-items: flex-start; }
#profileHistoryList { align-content: start !important; align-items: start !important; min-height: 0 !important; height: auto !important; grid-auto-rows: auto !important; }
.hg-card > img { position: absolute; left: 50%; top: 54%; transform: translate(-50%, -50%); max-height: 64% !important; max-width: 70% !important; margin: 0 !important; }
#profileHistoryList .hg-game { aspect-ratio: auto !important; height: auto !important; }

/* v41 (upd3): «Возможные призы» в кейсах — прямоугольники 4:3, как в магазине */
#casePossiblePrizesGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)) !important; gap: 10px !important; }
#casePossiblePrizesGrid .card { aspect-ratio: 4 / 3 !important; height: auto !important; min-height: 0 !important; }
#casePossiblePrizesGrid .card .brainrot-img { flex: 1 1 0 !important; min-height: 0 !important; height: auto !important; max-height: none !important; margin: 14px 0 0 !important; object-fit: contain; }
#casePossiblePrizesGrid .card .name { font-size: .74rem !important; }
#casePossiblePrizesGrid .card .price { font-size: .78rem !important; }
@media (max-width: 720px) { #casePossiblePrizesGrid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
#casePossiblePrizesGrid .card .brainrot-img { margin: 24px 0 2px !important; }

/* v42 (upd3): ставка из нескольких предметов в истории игр — сеткой, а не друг на друге */
.hg-card.hg-multi > img { position: static !important; transform: none !important; left: auto; top: auto;
    width: 100% !important; height: 100% !important; max-width: 100% !important; max-height: 100% !important; min-height: 0; object-fit: contain; margin: 0 !important; }
.hg-card.hg-multi { padding: 30px 10px 12px !important; gap: 6px !important;
    background: linear-gradient(180deg, #5a5e66 0%, #44474e 45%, #33363c 100%) !important; border: none !important; box-shadow: inset 0 -4px 0 var(--gold) !important; }
.hg-card.hg-multi.n2 { grid-template-columns: repeat(2, 1fr); grid-template-rows: 1fr; }
.hg-card.hg-multi.n3, .hg-card.hg-multi.n4 { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); }
.hg-card.hg-multi.n5, .hg-card.hg-multi.n6 { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); }
.hg-card.hg-multi.n3 { grid-template-columns: repeat(3, 1fr) !important; grid-template-rows: 1fr !important; }

/* v43 (upd3): история предметов и профиль игрока — та же карточка, что в магазине (4:3), метка слева сверху */
.pv-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)) !important; gap: 10px !important; }
#profileView #profileItemsList { grid-template-columns: repeat(8, minmax(0, 1fr)) !important; }
@media (max-width: 1500px) { #profileView #profileItemsList { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; } }
@media (max-width: 1200px) { #profileView #profileItemsList { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; } }
@media (max-width: 720px) { .pv-grid, #profileView #profileItemsList { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
.il-card { aspect-ratio: 4 / 3 !important; height: auto !important; min-height: 0 !important; cursor: default; }
.il-card .brainrot-img { flex: 1 1 0 !important; min-height: 0 !important; height: auto !important; max-height: none !important; margin: 24px 0 2px !important; object-fit: contain; }
.il-card .name { font-size: .74rem !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.il-card .price { font-size: .78rem !important; }
.il-tag { position: absolute; top: 6px; left: 8px; z-index: 3; padding: 3px 8px; border-radius: 5px; background: rgba(0,0,0,.45);
    font-size: .64rem; font-weight: 800; color: #e3e5e9; white-space: nowrap; }
.il-tag.il-lbl-win, .il-tag.il-lbl-case { color: var(--green); }
.il-tag.il-lbl-lose { color: #f87171; }
.il-tag.il-lbl-buy { color: #60a5fa; }
.il-tag.il-lbl-sell, .il-tag.il-lbl-comp, .il-tag.comp { color: #fbbf24; }
.il-tag.il-lbl-spent { color: #c084fc; }
.il-card .mut-btn.mut-static { top: 30px !important; }
.il-tag { top: 27px !important; left: auto !important; right: 8px !important; }
.il-card .mut-btn.mut-static { top: 6px !important; }

/* v44 (upd3): появление зелёной X2-зоны — вспышка и мягкое свечение колеса */
#upgradeView .wheel-container.green-flash .wheel-ring { animation: greenGlow 1.6s ease-out; }
#upgradeView .wheel-container.green-flash::after { content: ''; position: absolute; left: 50%; bottom: 6px; width: 120px; height: 120px; transform: translateX(-50%); border-radius: 50%;
    pointer-events: none; z-index: 3; background: radial-gradient(circle, rgba(255,215,60,.6), rgba(255,215,60,0) 65%); animation: greenBurst 1.4s ease-out forwards; }
@keyframes greenGlow {
    0% { filter: none; }
    25% { filter: drop-shadow(0 0 18px rgba(255,205,40,.9)) brightness(1.15); }
    100% { filter: drop-shadow(0 0 6px rgba(255,205,40,.4)); }
}
@keyframes greenBurst { 0% { opacity: 0; transform: translateX(-50%) scale(.3); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateX(-50%) scale(1.6); } }


/* v45 (upd3): слоты апгрейда как на upgrader — светлее панели без рамки, тёмный силуэт и три шеврона (средний яркий) */
#upgradeView .slot-box { background: #1b1c20 !important; border: none !important; border-radius: 12px !important; }
#upgradeView .slot-title { font-size: .95rem; font-weight: 800; color: #fff; }
#upgradeView .slot-sub { font-size: .74rem; color: #8b909a; }

/* v46 (upd3): раскладка как на upgrader — кнопки над левым слотом, слоты крупнее, логотип без свечения */
#upgradeView .slot-wrapper { position: relative; }
#upgradeView .slot-wrapper > .tool-row { position: absolute; left: 0; bottom: 100%; margin: 0 0 8px !important; display: flex; align-items: center; gap: 6px; }
#upgradeView .tool-row .seed-btn { margin: 0 0 0 4px !important; height: 30px; width: 30px; }
#upgradeView .upgrade-area { margin-top: 48px; }
@media (min-width: 761px) {
    #upgradeView .upgrade-area { max-width: 1320px !important; grid-template-columns: minmax(0, 1fr) 340px minmax(0, 1fr) !important; gap: 34px !important; }
    #upgradeView .upgrade-area .slot-box { aspect-ratio: auto !important; height: 420px !important; }
    #upgradeView .placeholder-icon img { width: 290px !important; height: 290px !important; }
    #upgradeView .bottom-split-layout { max-width: 1320px; }
}
@media (max-width: 760px) {
    #upgradeView .slot-wrapper > .tool-row { position: static; margin: 0 0 6px !important; }
    #upgradeView .upgrade-area { margin-top: 6px; }
}
.logo-big, .page-logo .page-logo-big { filter: none !important; }
.page-logo::before, .page-logo::after { display: none !important; }

/* v47 (upd3): зелёная зона — лучи как от солнца и знак вопроса (видны, пока зона активна) */
#upgradeView .green-fx { position: absolute; left: 50%; top: calc(50% + 130px); width: 0; height: 0; z-index: 4; pointer-events: none; opacity: 0; transition: opacity .5s ease; }
#upgradeView .wheel-container.green-on .green-fx { opacity: 1; }
#upgradeView .gfx-rays { position: absolute; left: -110px; top: -110px; width: 220px; height: 220px; border-radius: 50%;
    background: repeating-conic-gradient(from 0deg, rgba(255,215,90,.6) 0deg 5deg, rgba(255,215,90,0) 5deg 18deg);
    -webkit-mask: radial-gradient(circle, #000 0%, rgba(0,0,0,.7) 30%, transparent 70%); mask: radial-gradient(circle, #000 0%, rgba(0,0,0,.7) 30%, transparent 70%);
    animation: gfxSpin 6s linear infinite, gfxBreath 1.6s ease-in-out infinite; mix-blend-mode: screen; }
#upgradeView .gfx-glow { position: absolute; left: -60px; top: -60px; width: 120px; height: 120px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,240,170,.95) 0%, rgba(255,190,30,.5) 30%, rgba(255,190,30,0) 70%); animation: gfxBreath 1.6s ease-in-out infinite; mix-blend-mode: screen; }
#upgradeView .gfx-q { position: absolute; left: -15px; top: -15px; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at 35% 30%, #fff1a8, #ffc21a 60%, #c98a00); color: #fff; font-weight: 900; font-size: 1.05rem; line-height: 1;
    text-shadow: 0 1px 2px rgba(120,70,0,.9); box-shadow: 0 0 0 2px rgba(255,255,255,.7), 0 0 18px rgba(255,200,40,.95); animation: gfxQ 1.6s ease-in-out infinite; }
#upgradeView .wheel-container.green-on .wheel-ring { filter: drop-shadow(0 0 8px rgba(255,200,40,.5)); }
@keyframes gfxSpin { to { transform: rotate(360deg); } }
@keyframes gfxBreath { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }
@keyframes gfxQ { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }

/* v48 (upd3): профиль не во всю ширину — поля по бокам */
#profileView { max-width: min(1640px, calc(100vw - 80px)) !important; padding: 26px 32px !important; box-sizing: border-box; }
@media (max-width: 760px) { #profileView { max-width: 100% !important; padding: 12px 10px !important; } }
#profileView .pr2-best .best-drop-name { white-space: normal !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 1.5rem !important; }

/* v49 (upd3): кнопки подбора поменьше, без шестерёнки; слева зелёная «Мистери»; слот мистери; зона — золотая */
#presetsContainer { display: flex !important; flex-wrap: wrap; gap: 6px !important; align-items: center; justify-content: flex-end; }
#presetsContainer > button { height: 42px !important; min-width: 0 !important; width: auto !important; padding: 0 14px !important; font-size: .82rem !important; border-radius: 7px !important; flex: 0 0 auto; }
#presetsContainer .preset-gear { display: none !important; }
#presetsContainer .preset-mystery { width: 54px !important; padding: 0 !important; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #1f8f5f, #2fd08a) !important; border: 1px solid #45f0a6 !important; color: #d9fff0 !important;
    box-shadow: inset 0 0 12px rgba(255,255,255,.12); position: relative; overflow: hidden; }
#presetsContainer .preset-mystery svg { width: 22px; height: 22px; fill: currentColor; }
#presetsContainer .preset-mystery::before { content: ''; position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.18) 1px, transparent 1.2px); background-size: 6px 6px; pointer-events: none; }
#presetsContainer .preset-mystery:hover { filter: brightness(1.12); }
#presetsContainer .preset-mystery.active { box-shadow: 0 0 0 2px #fff, 0 0 18px rgba(47,224,138,.7); }
#targetSlot.mystery-on > .slot-head, #targetSlot.mystery-on > .slot-close { display: none !important; }

/* v50 (upd3): мистери как на кейсере — зелёный дымчатый слот с кольцами, брейнроты сменяются каждые 3 с; зелёное колесо и кнопка */
#targetSlot.mystery-on { background: radial-gradient(circle at 50% 55%, #3fcf8c 0%, #1f7d55 45%, #0f3d2a 100%) !important; box-shadow: inset 0 0 0 2px #3fe09a, 0 0 30px rgba(47,224,138,.25) !important; }
#targetSlot.mystery-on::before, #targetSlot.mystery-on::after { opacity: 0 !important; }
.mystery-view { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; overflow: hidden; border-radius: inherit; }
.mystery-view::before { content: ''; position: absolute; inset: -20%; pointer-events: none; opacity: .55;
    background: radial-gradient(40% 30% at 25% 70%, rgba(200,255,225,.35), transparent 70%), radial-gradient(35% 28% at 75% 35%, rgba(200,255,225,.3), transparent 70%);
    animation: mySmoke 9s ease-in-out infinite alternate; }
.mystery-view .my-top { position: relative; z-index: 2; padding: 14px 18px; background: rgba(8,30,20,.45); color: #d8ffe9; font-size: .86rem; font-weight: 700; text-align: left; }
.mystery-view .my-stage { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; }
.mystery-view .my-ring { position: absolute; left: 50%; top: 50%; border-radius: 50%; border: 2px solid rgba(210,255,230,.35); transform: translate(-50%, -50%); }
.mystery-view .my-ring.r1 { width: 92%; aspect-ratio: 1; max-height: 115%; }
.mystery-view .my-ring.r2 { width: 64%; aspect-ratio: 1; border-color: rgba(210,255,230,.28); }
.mystery-view .my-ring.r3 { width: 36%; aspect-ratio: 1; border-color: rgba(210,255,230,.22); }
.mystery-view .my-q { position: absolute; top: 4%; left: 50%; transform: translateX(-50%); width: 26px; height: 22px; border-radius: 4px; background: rgba(8,30,20,.7);
    color: #d8ffe9; font-weight: 900; font-size: .8rem; display: flex; align-items: center; justify-content: center; }
.mystery-view .my-img { position: relative; z-index: 2; width: 62%; height: 70%; object-fit: contain; filter: drop-shadow(0 14px 22px rgba(0,0,0,.45));
    opacity: 0; transform: scale(.85); transition: opacity .25s ease, transform .35s cubic-bezier(.2,1.4,.4,1); }
.mystery-view .my-img.show { opacity: 1; transform: scale(1); }
.mystery-view .my-info { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 12px 14px; background: rgba(8,30,20,.45); }
.mystery-view .my-info b { color: #fff; font-size: .9rem; }
.mystery-view .my-info span { color: #a6f5cb; font-size: .78rem; font-weight: 700; }
@keyframes mySmoke { 0% { transform: translate(-3%, 2%) scale(1); } 100% { transform: translate(3%, -2%) scale(1.08); } }
/* колесо в режиме мистери — сплошное зелёное, тёмно-зелёный центр */
#upgradeView .wheel-container.mystery-wheel .wheel-ring { background: linear-gradient(180deg, #46d996, #2fb878) !important; }
#upgradeView .wheel-container.mystery-wheel .wheel-outline { background: #2fe08a !important; }
#upgradeView .wheel-container.mystery-wheel .wheel-inner { background: radial-gradient(circle, #1f5a3f, #123526 70%) !important; border-color: #0d2a1d !important; }
#upgradeView .wheel-container.mystery-wheel .wheel-inner::before { opacity: .35; }
#upgradeView .wheel-container.mystery-wheel .wheel-chance { color: #bfffd9; text-shadow: 0 0 20px rgba(80,255,160,.5); }
#upgradeView .wheel-container.mystery-wheel .wheel-label { color: #8ff0bd; }
#upgradeView .wheel-container.mystery-wheel .wheel-marker { opacity: 0; }
#upgradeBtn.mystery-btn { background: linear-gradient(180deg, #3fd08a, #24a86b) !important; color: #06281a !important; box-shadow: 0 6px 22px rgba(47,224,138,.3) !important; }
#upgradeBtn.mystery-btn:disabled { opacity: .55; }

/* v51 (upd3): мистери без прокрутки — 3 с «портал»: закручивающийся свет в колесе, пульс слота; нижнего поля в слоте нет */
.mystery-view .my-info { display: none !important; }
#upgradeView .wheel-container.portal .wheel-inner::after { content: ''; position: absolute; inset: -30%; border-radius: 50%; pointer-events: none; z-index: 0;
    background: conic-gradient(from 0deg, rgba(160,255,210,0), rgba(160,255,210,.75), rgba(160,255,210,0) 30%, rgba(160,255,210,.6) 55%, rgba(160,255,210,0) 75%, rgba(160,255,210,.7), rgba(160,255,210,0));
    animation: portalSpin .6s linear infinite; mix-blend-mode: screen; }
#upgradeView .wheel-container.portal .wheel-ring { animation: portalPulse .5s ease-in-out infinite alternate; }
#upgradeView .wheel-container.portal .wheel-chance { animation: portalQ .4s ease-in-out infinite alternate; }
#targetSlot.portal { animation: portalSlot .45s ease-in-out infinite alternate; }
#targetSlot.portal .my-ring { animation: portalRings 1s linear infinite; }
#targetSlot.portal .my-img { transition: none; filter: drop-shadow(0 0 18px rgba(170,255,210,.9)); }
#targetSlot.portal-done .my-img { animation: portalPop .8s cubic-bezier(.2,1.5,.4,1); }
@keyframes portalSpin { to { transform: rotate(360deg); } }
@keyframes portalPulse { from { filter: brightness(1) drop-shadow(0 0 6px rgba(60,255,160,.4)); } to { filter: brightness(1.35) drop-shadow(0 0 22px rgba(60,255,160,.9)); } }
@keyframes portalQ { from { transform: scale(1) rotate(-6deg); } to { transform: scale(1.25) rotate(6deg); } }
@keyframes portalSlot { from { box-shadow: inset 0 0 0 2px #3fe09a, 0 0 20px rgba(47,224,138,.3); } to { box-shadow: inset 0 0 0 3px #b8ffd9, 0 0 46px rgba(47,224,138,.8); } }
@keyframes portalRings { from { transform: translate(-50%, -50%) scale(1); opacity: 1; } to { transform: translate(-50%, -50%) scale(1.25); opacity: .2; } }
@keyframes portalPop { 0% { transform: scale(.6); filter: brightness(2) drop-shadow(0 0 30px #fff); } 100% { transform: scale(1); } }

/* v52 (upd3): мистери — зелёный дым до запуска; после — брейнрот с ценой/названием/категорией и лучами за ним */
.mystery-view .my-smoke { position: absolute; border-radius: 50%; pointer-events: none; filter: blur(22px); mix-blend-mode: screen; z-index: 0; }
.mystery-view .my-smoke.s1 { width: 70%; height: 55%; left: -10%; bottom: -10%; background: rgba(170,255,210,.42); animation: smk1 7s ease-in-out infinite alternate; }
.mystery-view .my-smoke.s2 { width: 60%; height: 50%; right: -12%; top: 0; background: rgba(140,255,195,.35); animation: smk2 9s ease-in-out infinite alternate; }
.mystery-view .my-smoke.s3 { width: 50%; height: 40%; left: 25%; top: 30%; background: rgba(200,255,225,.28); animation: smk3 6s ease-in-out infinite alternate; }
@keyframes smk1 { 0% { transform: translate(0, 0) scale(1); opacity: .7; } 100% { transform: translate(18%, -14%) scale(1.25); opacity: 1; } }
@keyframes smk2 { 0% { transform: translate(0, 0) scale(1.1); opacity: .6; } 100% { transform: translate(-22%, 18%) scale(.9); opacity: 1; } }
@keyframes smk3 { 0% { transform: translate(-10%, 8%) scale(.9); opacity: .5; } 100% { transform: translate(12%, -10%) scale(1.2); opacity: .9; } }

/* лучи и яркий центр — при портале и у выпавшего брейнрота */
.mystery-view .my-rays, .mystery-view .my-core { position: absolute; left: 50%; top: 50%; pointer-events: none; z-index: 1; opacity: 0; transition: opacity .4s ease; }
.mystery-view .my-rays { width: 150%; aspect-ratio: 1; transform: translate(-50%, -50%);
    background: repeating-conic-gradient(from 0deg, rgba(220,255,235,.55) 0deg 4deg, rgba(220,255,235,0) 4deg 22deg);
    -webkit-mask: radial-gradient(circle, #000 8%, rgba(0,0,0,.6) 30%, transparent 62%); mask: radial-gradient(circle, #000 8%, rgba(0,0,0,.6) 30%, transparent 62%);
    animation: myRays 14s linear infinite; }
.mystery-view .my-core { width: 55%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.95) 0%, rgba(200,255,225,.7) 25%, rgba(120,255,180,0) 70%); }
#targetSlot.my-has-result .my-rays { opacity: 1; }
#targetSlot.my-has-result .my-core { opacity: 1; animation: myCore 2s ease-in-out infinite; }
#targetSlot.my-has-result .my-ring { border-color: rgba(120,255,180,.6); box-shadow: 0 0 14px rgba(80,255,160,.35); }
#targetSlot.my-has-result .my-q { display: none; }
@keyframes myRays { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes myCore { 0%, 100% { opacity: .85; } 50% { opacity: 1; } }
.mystery-view .my-res-price, .mystery-view .my-res-name { position: absolute; z-index: 3; display: none; text-shadow: 0 2px 6px rgba(0,40,20,.7); }
.mystery-view .my-res-price { top: 12px; right: 16px; color: #fff; font-weight: 900; font-size: 1.25rem; align-items: center; gap: 5px; }
.mystery-view .my-res-name { left: 16px; bottom: 16px; flex-direction: column; text-align: left; }
.mystery-view .my-res-name b { color: #fff; font-size: 1.25rem; font-weight: 900; }
.mystery-view .my-res-name span { color: rgba(225,255,238,.75); font-size: .9rem; font-weight: 700; }
#targetSlot.my-has-result .my-res-price, #targetSlot.my-has-result .my-res-name { display: flex; }
#targetSlot.my-has-result .my-img { animation: portalPop .8s cubic-bezier(.2,1.5,.4,1); }

/* v53 (upd3): «?» мистери — в строке «Вам может выпасть любой предмет», справа */
.mystery-view .my-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 0 0 18px !important; height: 46px; }
.mystery-view .my-faq { width: 46px; height: 46px; flex: none; border: none; border-left: 1px solid rgba(160,255,210,.2); background: rgba(8,30,20,.35);
    color: #d8ffe9; font: inherit; font-weight: 900; font-size: 1rem; cursor: pointer; pointer-events: auto; }
.mystery-view .my-faq:hover { background: rgba(8,30,20,.6); color: #fff; }
.mystery-view .my-q { display: none !important; }

/* v54 (upd3): дым в мистери всегда; лучи — только после выпадения; картинки одного размера; Provably Fair над правым слотом; кнопки подбора ближе к слотам */
.mystery-view .my-smoke { opacity: 1 !important; }
.mystery-view .my-img { width: 240px !important; height: 240px !important; max-width: 68% !important; max-height: 68% !important; object-fit: contain; }
#upgradeView .slot-img, #upgradeView #targetImage { width: 240px !important; height: 240px !important; max-width: 70% !important; max-height: 62% !important; object-fit: contain !important; margin-left: auto; margin-right: auto; }
#upgradeView .slot-wrapper > .tool-row-right { left: auto; right: 0; }
#upgradeView .tool-row-right .seed-btn { margin: 0 !important; }
#upgradeView .controls-layout { margin-top: -12px; }
@media (max-width: 760px) { #upgradeView .slot-wrapper > .tool-row-right { display: flex; justify-content: flex-end; } #upgradeView .controls-layout { margin-top: 0; } }
@media (max-width: 760px) { #upgradeView .slot-img, #upgradeView #targetImage { width: 120px !important; height: 110px !important; } }

/* v55 (upd3): слоты поменьше; нижний ряд по тем же колонкам, что слоты — кнопки подбора на всю ширину слота цели */
@media (min-width: 761px) {
    #upgradeView .upgrade-area .slot-box { height: 360px !important; }
    #upgradeView .placeholder-icon img { width: 240px !important; height: 240px !important; }
    #upgradeView .slot-img, #upgradeView #targetImage { width: 200px !important; height: 200px !important; }
    .mystery-view .my-img { width: 210px !important; height: 210px !important; }
    #upgradeView .controls-layout { max-width: 1320px !important; width: 100%; grid-template-columns: minmax(0, 1fr) 340px minmax(0, 1fr) !important; gap: 34px !important; }
    #upgradeView .controls-layout .right-col { width: 100%; }
    #presetsContainer { display: flex !important; flex-wrap: nowrap !important; width: 100%; justify-content: stretch !important; gap: 6px !important; }
    #presetsContainer > button { flex: 1 1 0 !important; width: auto !important; min-width: 0 !important; padding: 0 !important; }
    #presetsContainer .preset-mystery { flex: 1.2 1 0 !important; }
}

/* v56 (upd3): шрифт Montserrat (тоньше); мелкие правки под него */
#targetGrid .card .mut-btn, #shopGrid .card .mut-btn { width: 24px !important; height: 24px !important; top: 6px !important; left: 6px !important; padding: 2px !important; }
@media (max-width: 1750px) {
    #profileView .pr2 .prof-actions { grid-template-columns: 1fr; gap: 8px; }
    #profileView .pr2 .prof-actions .btn-notif, #profileView .pr2 .prof-actions .btn-partner { height: 46px; }
}

/* v57 (upd3): картинка кейса всегда на одном месте — название фиксированной высоты (2 строки), картинка в рамке фиксированного размера */
.case-card-new { display: flex !important; flex-direction: column !important; justify-content: flex-start !important; }
.case-card-new .case-title { height: 2.5em; min-height: 2.5em; display: flex !important; align-items: center; justify-content: center; text-align: center; line-height: 1.2; overflow: hidden; flex: none; }
.case-card-new .case-image-wrapper { flex: none !important; height: 150px !important; margin: 10px 0 !important; display: flex !important; align-items: center; justify-content: center; }
.case-card-new .case-image-wrapper img { width: 150px !important; height: 150px !important; object-fit: contain !important; margin: 0 !important; }
.case-card-new .case-bottom-info { margin-top: auto !important; }
/* v58 (upd3): картинка кейса чуть выше */
.case-card-new .case-image-wrapper { margin: -6px 0 18px !important; }

/* v59 (upd3): подписи 0/50/100% — внутри серой полосы колеса (не вылезают наружу), 0% снова видно */
#upgradeView .wheel-marker { display: block !important; z-index: 7; color: rgba(225,228,235,.75) !important; font-size: .62rem; font-weight: 700;
    text-shadow: 0 1px 3px rgba(0,0,0,.9); line-height: 1; }
#upgradeView .marker-top { top: 17px !important; left: 50% !important; right: auto !important; bottom: auto !important; transform: translate(-50%, -50%) !important; }
#upgradeView .marker-bottom { top: auto !important; bottom: 17px !important; left: 50% !important; right: auto !important; transform: translate(-50%, 50%) !important; }
#upgradeView .marker-left { left: 17px !important; right: auto !important; top: 50% !important; bottom: auto !important; transform: translate(-50%, -50%) !important; }
#upgradeView .marker-right { right: 17px !important; left: auto !important; top: 50% !important; bottom: auto !important; transform: translate(50%, -50%) !important; }
#upgradeView .wheel-marker.marker-bottom { display: block !important; }
#upgradeView .wheel-container.mystery-wheel .wheel-marker { opacity: 0 !important; }

/* значок мутации в слоте — слева сверху, как на карточке */
#upgradeView .slot-box .slot-mut { position: absolute; top: 14px; left: 14px; z-index: 6; width: 36px; height: 36px; padding: 4px; border-radius: 8px;
    background: rgba(20,22,27,.72); border: 1px solid rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center; pointer-events: none; }
#upgradeView .slot-box .slot-mut .mut-ico { width: 100%; height: 100%; }
#upgradeView .marker-bottom { left: 50% !important; }
.mut-opt.off { opacity: .35; cursor: not-allowed; }
/* тест-режим админа — видимая плашка над колесом */
#upgradeView .wheel-section { position: relative; }

/* v61: окно пополнения как на образце — компактное, сегментные вкладки, плитки способов оплаты */
.deposit-modal-box.dep-pay-mode { max-width: 540px !important; height: auto !important; min-height: 0 !important; border-radius: 22px !important; background: #1b1d22 !important; }
.deposit-modal-box .deposit-modal-header { border-bottom: none !important; padding: 22px 24px 14px !important; background: transparent; }
.deposit-modal-box .deposit-modal-header h2 { font-size: 1.15rem !important; font-weight: 700 !important; }
.deposit-modal-box .dep-tabs { position: static !important; margin: 0 24px 18px; padding: 4px !important; gap: 4px !important; background: #141518; border: 1px solid #26282e; border-radius: 12px; border-bottom: 1px solid #26282e !important; }
.deposit-modal-box .dep-tab { flex: 1; justify-content: center; padding: 10px 0 !important; border: none !important; border-radius: 9px; color: #8b9099; font-weight: 600; font-size: .95rem; transition: background .2s, color .2s; }
.deposit-modal-box .dep-tab:hover { color: #d8dbe0; }
.deposit-modal-box .dep-tab.active { background: #2a2c33; color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.dep-pay { padding: 0 !important; overflow: visible !important; }
.dp-currency { display: flex; align-items: center; justify-content: space-between; margin: 0 24px 14px; padding: 8px 8px 8px 14px; background: #24262c; border-radius: 10px; color: #c9ccd2; font-weight: 500; font-size: .95rem; }
.dp-currency b { background: var(--gold, #ffd400); color: #111; font-weight: 800; font-size: .85rem; padding: 6px 14px; border-radius: 7px; }
.dp-methods { display: grid !important; grid-template-columns: repeat(3, 1fr) !important; gap: 8px; margin: 0 24px 20px !important; }
.dp-method { position: relative; height: 98px; flex: none !important; width: auto !important; padding: 0 !important; flex-direction: row !important; gap: 10px !important; background: #26282e !important; border: 1px solid transparent !important; border-radius: 10px !important; color: #fff !important; overflow: hidden; }
.dp-method:hover { background: #2c2f36 !important; }
.dp-method.active { border-color: var(--gold, #ffd400) !important; background: #2a2a24 !important; }
.dp-method .pay-icon { width: 38px !important; height: 38px !important; object-fit: contain; }
.dp-mname { display: flex; flex-direction: column; align-items: flex-start; font-weight: 900; font-size: 1.05rem; line-height: 1; letter-spacing: .5px; }
.dp-mname small { font-size: .62rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #c9ccd2; margin-top: 3px; }
.dp-pop { position: absolute; top: 0; right: 0; background: var(--gold, #ffd400); color: #111; font-size: .55rem; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; padding: 2px 6px; border-radius: 0 0 0 7px; }
.dp-bottom { background: #16171b; border-top: 1px solid #23252b; padding: 18px 20px 16px; border-radius: 0 0 22px 22px; }
.dp-sum-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; color: #d8dbe0; font-weight: 600; font-size: .9rem; }
.dp-quick { margin: 0 !important; gap: 4px !important; }
.dp-quick button { flex: none !important; padding: 4px 8px !important; border: none !important; border-radius: 5px !important; background: transparent !important; color: #7d828c !important; font-size: .75rem !important; font-weight: 600 !important; }
.dp-quick button:hover { color: #fff !important; }
.dp-quick button.active { background: var(--gold, #ffd400) !important; color: #111 !important; }
.dp-amount { display: flex; align-items: center; gap: 6px; height: 62px; padding: 0 16px; margin-bottom: 10px; background: #24262c; border-radius: 10px; cursor: text; }
.dp-amount input { width: 4.3ch; min-width: 1.3ch !important; max-width: 60% !important; flex: 0 0 auto !important; font-variant-numeric: tabular-nums; background: transparent !important; border: none !important; outline: none; padding: 0 !important; color: #fff; font-size: 1.6rem; font-weight: 700; font-family: inherit; -moz-appearance: textfield; }
.dp-amount input::-webkit-outer-spin-button, .dp-amount input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dp-rub { color: #9aa0aa; font-size: 1.4rem; font-weight: 600; }
.dp-amount .min-amount { position: static !important; transform: none !important; margin-left: auto; color: #fff; font-size: .78rem; font-weight: 600; }
.dp-promo { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 6px 0 14px; margin-bottom: 12px; background: #24262c; border-radius: 10px; color: #6f7480; }
.dp-promo input { flex: 1; min-width: 0; background: transparent; border: none; outline: none; color: #fff; font-size: .9rem; font-family: inherit; }
.dp-promo input::placeholder { color: #6f7480; }
.dp-promo button { width: 38px; height: 36px; display: grid; place-items: center; background: #33363e; border: none; border-radius: 8px; color: #fff; cursor: pointer; }
.dp-promo button:hover { background: #3d4049; }
.dp-terms { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: #c9ccd2; font-size: .82rem; cursor: pointer; }
.dp-terms input { width: 16px; height: 16px; accent-color: var(--gold, #ffd400); cursor: pointer; }
.dp-terms a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.dp-btn { width: 100%; height: 52px; border: none; border-radius: 10px; background: var(--gold, #ffd400); color: #111; font-family: inherit; font-size: 1.05rem; font-weight: 600; cursor: pointer; transition: filter .2s, transform .1s; }
.dp-btn:hover { filter: brightness(1.06); }
.dp-btn:active { transform: scale(.99); }
.dp-btn:disabled { opacity: .6; cursor: default; }
.dp-note { margin: 12px 0 0; text-align: center; color: #6f7480; font-size: .68rem; line-height: 1.5; }
@media (max-width: 768px) {
  .deposit-modal-box.dep-pay-mode { border-radius: 18px 18px 0 0 !important; }
  .deposit-modal-box .dep-tabs, .dp-currency, .dp-methods { margin-left: 14px !important; margin-right: 14px !important; }
  .dp-method { height: 84px; }
  .dp-bottom { padding: 16px 14px; border-radius: 0; }
  .dp-sum-head { flex-direction: column; align-items: flex-start; }
}

/* v62: вкладка «Брейнроты» в том же компактном окне */
.deposit-modal-box.dep-pay-mode { overflow-y: auto !important; }
.deposit-modal-box.dep-pay-mode .dep-maint { min-height: 260px; margin: 0 24px 24px; border-radius: 14px; background: #16171b; border: 1px solid #23252b; }
@media (max-width: 768px) { .deposit-modal-box.dep-pay-mode .dep-maint { margin: 0 14px 18px; } }
.deposit-modal-box.dep-pay-mode { scrollbar-width: none; }
.deposit-modal-box.dep-pay-mode::-webkit-scrollbar { display: none; }

/* v63: Color Dice — последние 10 бросков */
.dice-hist { margin: 18px 0; padding: 14px 16px; background: #16181d; border: 1px solid #1d2027; border-radius: 14px; }
.dice-hist-title { font-weight: 800; font-size: .95rem; margin-bottom: 12px; }
.dice-hist-title span { font-weight: 500; font-size: .78rem; color: var(--text-muted); }
.dice-hist-row { display: grid; grid-template-columns: repeat(10, minmax(64px, 1fr)); gap: 8px; overflow-x: auto; scrollbar-width: none; }
.dice-hist-row::-webkit-scrollbar { display: none; }
.dh-roll { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 6px 8px; background: #0f1115; border: 1.5px solid #1f2229; border-bottom-width: 3px; border-radius: 10px; animation: dhIn .35s ease both; }
.dh-roll.win { border-bottom-color: var(--green, #00ff88); }
.dh-roll.lose { border-bottom-color: var(--pink, #ff505a); }
.dh-roll.reroll { border-bottom-color: var(--gold, #ffd400); }
.dh-faces { display: grid; grid-template-columns: repeat(2, 20px); gap: 5px; }
.dh-faces i { width: 20px; height: 20px; border-radius: 6px; background: var(--c); box-shadow: inset 0 -3px 0 rgba(0,0,0,.25); opacity: .55; }
.dh-faces i.on { opacity: 1; outline: 2px solid #fff; outline-offset: 1px; }
.dh-meta { display: flex; align-items: center; gap: 5px; font-size: .75rem; color: #c9d1d9; }
.dh-meta i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.dice-hist-empty { grid-column: 1 / -1; color: var(--text-muted); font-size: .85rem; padding: 8px 0; }
@keyframes dhIn { from { opacity: 0; transform: translateY(6px); } }
@media (max-width: 768px) { .dice-hist { margin: 14px 0; padding: 12px; } .dice-hist-row { grid-template-columns: repeat(10, 58px); } }
.dice-hist { margin: 0 0 18px; }
@media (max-width: 768px) { .dice-hist { margin: 0 0 14px; } }

/* v64: мистери — большой красивый «?» в центре колеса без подписи */
#chanceText.myst-q { font-size: 5.2rem !important; line-height: 1 !important; font-weight: 900 !important; letter-spacing: 0 !important;
  background: linear-gradient(180deg, #ffffff 0%, #b9ffd9 35%, #2fe08a 70%, #ffd400 100%); -webkit-background-clip: text; background-clip: text; color: transparent !important;
  filter: drop-shadow(0 0 14px rgba(47,224,138,.65)) drop-shadow(0 4px 0 rgba(0,0,0,.35));
  animation: mystQ 2.4s ease-in-out infinite; transform-origin: 50% 60%; }
#chanceText.myst-q + #chanceLabel:empty { display: none; }
@keyframes mystQ { 0%, 100% { transform: translateY(0) rotate(-4deg) scale(1); } 50% { transform: translateY(-5px) rotate(4deg) scale(1.06); filter: drop-shadow(0 0 22px rgba(47,224,138,.9)) drop-shadow(0 4px 0 rgba(0,0,0,.35)); } }
@media (max-width: 768px) { #chanceText.myst-q { font-size: 3.6rem !important; } }

/* v65: аккуратность интерфейса — строки сетки по высоте карточки (в Color Dice / Ракете карточки налезали друг на друга) */
.grid-container, .dep-grid-new, .prof-inv-grid, #profInventoryGrid { grid-auto-rows: max-content !important; align-content: start !important; }
/* v66: инвентари 4×2 на странице, ровные пейджеры, мелкие правки */
.dice-inv { max-height: none !important; }
.dice-inv .grid-container, #diceInvGrid, #rocketInvGrid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; overflow: visible !important; }
.pagination-arrows { align-items: center !important; }
.pagination-arrows > span { min-width: 58px; height: 36px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center;
  background: #15171d; border: 1px solid #252830; border-radius: 8px; font-weight: 800; font-size: .85rem; color: #fff; line-height: 1; }
.pagination-arrows > button { height: 36px; display: inline-flex; align-items: center; justify-content: center; }
/* заголовок «Мои брейнроты» в одну строку */
.panel-title, .inv-title { white-space: nowrap; }
/* профиль: кнопка «Пополнить» не вылезает за карточку баланса */
#profileView .pr2-bal { min-width: 0; }
#profileView .pr2-bal > div:first-child { min-width: 0; }
#profileView .pr2-balv { white-space: nowrap; font-size: clamp(1.2rem, 2.2vw, 1.7rem); }
#profileView .pr2-dep { flex-shrink: 0; padding: 0 16px; }
@media (max-width: 768px) {
  #profileView .pr2-bal { margin: 0 14px; padding: 12px 14px; }
  #profileView .pr2-dep { height: 42px; padding: 0 14px; font-size: .85rem; }
  /* мелкие карточки 4 в ряд на телефоне: цена и имя помещаются */
  .grid-container .card .price { font-size: .66rem !important; top: 5px !important; right: 6px !important; gap: 2px !important; }
  .grid-container .card .price img, .grid-container .card .price .currency-img { width: 10px !important; height: 10px !important; }
  .grid-container .card .name { font-size: .64rem !important; }
  .grid-container .card .cat { font-size: .5rem !important; }
  .grid-container .card .brainrot-img { transform: translateY(6px) scale(.9); }
}
/* мелкие карточки в апгрейде: картинка между ценой и названием, не залезает на текст */
#inventoryGrid .card .brainrot-img, #targetGrid .card .brainrot-img, #shopGrid .card .brainrot-img { height: 44% !important; margin: 24px 0 2px !important; }
@media (max-width: 768px) {
  #inventoryGrid .card .brainrot-img, #targetGrid .card .brainrot-img, #shopGrid .card .brainrot-img { height: 38% !important; margin: 17px 0 1px !important; transform: none; }
}
@media (max-width: 768px) {
  /* кнопки шанса в один ряд */
  #presetsContainer { flex-wrap: nowrap !important; gap: 5px !important; }
  #presetsContainer > * { flex: 1 1 0 !important; min-width: 0 !important; padding: 0 !important; font-size: .78rem !important; }
}
@media (max-width: 768px) {
  .control-col.right-col { min-width: 0 !important; max-width: 100% !important; }
  #presetsContainer { width: 100% !important; max-width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; box-sizing: border-box; }
  #presetsContainer .preset-mystery { width: auto !important; }
}
@media (max-width: 768px) { #presetsContainer .preset-mystery { max-width: none !important; margin: 0 !important; flex: 0 0 48px !important; } }
@media (max-width: 768px) {
  #diceInvGrid .card, #rocketInvGrid .card { aspect-ratio: 1 / 1 !important; height: auto !important; }
  #diceInvGrid .card .brainrot-img, #rocketInvGrid .card .brainrot-img { height: 46% !important; margin: 18px 0 1px !important; transform: none; }
}
/* профиль: инвентарь 4 в ряд × 2 ряда */
#profileView #profileInventoryGrid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; grid-auto-rows: max-content !important; }
@media (max-width: 768px) { #profileView #profileInventoryGrid { gap: 8px !important; } }
/* профиль: сумма баланса не прячется под кнопкой — если тесно, кнопка уходит на строку ниже */
#profileView .pr2-bal { flex-wrap: wrap; row-gap: 10px; }
#profileView .pr2-bal > div:first-child { flex: 1 1 auto; }
@media (max-width: 768px) {
  #profileView #profileInventoryGrid { padding: 0 2px !important; }
  #profileView #profileInventoryGrid .card { aspect-ratio: 3 / 4 !important; height: auto !important; }
  #profileView #profileInventoryGrid .card .brainrot-img { height: 48% !important; margin: 20px 0 2px !important; transform: none; }
  #profileView #profileInventoryGrid .card .name { font-size: .6rem !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
}
/* профиль: 8 в ряд × 2 ряда на всю ширину */
#profileView #profileInventoryGrid { grid-template-columns: repeat(8, minmax(0, 1fr)) !important; gap: 10px !important; }
#profileView #profileInventoryGrid .card { aspect-ratio: 4 / 3.6 !important; height: auto !important; }
#profileView #profileInventoryGrid .card .brainrot-img { height: 50% !important; margin: 22px 0 2px !important; }
@media (max-width: 1100px) { #profileView #profileInventoryGrid { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; } }
@media (max-width: 768px) { #profileView #profileInventoryGrid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 6px !important; } }
/* подвал: большой логотип вместо иконки и надписи */
.site-footer .sf-logo-big { height: 40px; width: auto; display: block; }
@media (max-width: 768px) { .site-footer .sf-logo-big { height: 32px; } }
@media (max-width: 768px) {
  #profileView #profileInventoryGrid .card { aspect-ratio: 3 / 4 !important; }
  #profileView #profileInventoryGrid .card .brainrot-img { height: 46% !important; margin: 20px 0 2px !important; }
}
