* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #0b0b0d;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Верхняя шапка */
.top-bar {
    height: 70px;
    background-color: #141418;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    border-bottom: 1px solid #22222a;
    flex-shrink: 0;
}

.logo {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #ffd700;
}

.user-panel {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #1c1c24;
    padding: 6px 15px;
    border-radius: 30px;
    cursor: pointer;
    border: 1px solid #2a2a35;
    transition: background 0.2s;
}

.user-avatar-container:hover {
    background: #252530;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #121214;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 15px;
}

.header-balance {
    font-weight: 600;
    color: #ffd700;
}

.auth-open-btn, .logout-btn {
    background-color: #ffd700;
    color: #121214;
    border: none;
    padding: 10px 20px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: filter 0.2s;
}

.auth-open-btn:hover, .logout-btn:hover {
    filter: brightness(1.1);
}

.logout-btn {
    background-color: #e74c3c;
    color: #fff;
    padding: 8px 15px;
}

.logout-btn:hover {
    background-color: #c0392b;
}

/* Главный контейнер */
.main-wrapper {
    width: 100%;
    max-width: 1300px;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0 20px;
}

.main-title {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    color: #e0e0e0;
}

/* ВЕРХНЯЯ ЗОНА АПГРЕЙДА */
.top-upgrade-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #141418;
    border: 1px solid #22222a;
    border-radius: 14px;
    padding: 25px;
    gap: 20px;
}

/* Слот предмета */
.upgrade-card-box {
    width: 340px;
    height: 180px;
    background-color: #1c1c24;
    border: 1px solid #2a2a35;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 15px;
    color: #7a7a8a;
    font-size: 15px;
    font-weight: 600;
    overflow: hidden;
    box-sizing: border-box;
    gap: 4px;
}

.upgrade-card-box img.item-image {
    width: 100%;
    height: 95px;
    object-fit: contain;
    margin: 0 auto;
}

.center-roulette-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.roulette-container {
    position: relative;
    width: 220px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, #18181f 0%, #0d0d11 100%);
    border-radius: 50%;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8), 0 0 25px rgba(0, 0, 0, 0.5);
    border: 2px solid #252530;
}

.roulette-svg {
    position: absolute;
    width: 190px;
    height: 190px;
    transform: rotate(-90deg);
}

.ring-bg {
    fill: none;
    stroke: #141419;
    stroke-width: 10;
}

.ring-progress {
    fill: none;
    stroke: #ffd700;
    stroke-width: 10;
    stroke-dasharray: 251.2;
    stroke-dashoffset: 251.2;
    transition: stroke-dashoffset 0.4s ease;
}
.roulette-ticks {
    position: absolute;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: repeating-conic-gradient(
        from 0deg,
        rgba(255, 255, 255, 0.08) 0deg,
        rgba(255, 255, 255, 0.08) 2deg,
        transparent 2deg,
        transparent 10deg
    );
    -webkit-mask: radial-gradient(farthest-side, transparent 72%, #fff 73%);
    mask: radial-gradient(farthest-side, transparent 72%, #fff 73%);
    pointer-events: none;
}

.roulette-pointer {
    position: absolute;
    width: 220px;
    height: 220px;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 20;
    transition: transform 6s cubic-bezier(0.15, 0.9, 0.2, 1);
}

.pointer-arrow {
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 12px solid #ffd700;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.7));
}

/* Текст по центру */
.chance-center {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
    text-align: center;
}

.chance-display {
    font-size: 22px;
    font-weight: 900;
    color: #2ecc71;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 10px rgba(46, 204, 113, 0.3);
}

.chance-sub {
    font-size: 11px;
    color: #7a7a8c;
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 2px;
    letter-spacing: 1px;
}

.upgrade-btn {
    background: linear-gradient(135deg, #ffd700, #ff9900);
    border: none;
    border-radius: 8px;
    padding: 12px 30px;
    font-size: 14px;
    font-weight: 900;
    color: #121214;
    cursor: pointer;
    transition: filter 0.2s;
    text-transform: uppercase;
}

.upgrade-btn:hover:not(:disabled) {
    filter: brightness(1.1);
}

.upgrade-btn:disabled {
    background: #2a2a35;
    color: #555565;
    cursor: not-allowed;
}

/* Ниж з сетак */
.bottom-grids-area {
    display: flex;
    gap: 20px;
}

.grid-section {
    flex: 1;
    background-color: #141418;
    border: 1px solid #22222a;
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.section-nav {
    display: flex;
    gap: 10px;
}

.nav-tab {
    background-color: #1c1c24;
    border: 1px solid #2a2a35;
    color: #b0b0c0;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-tab.active {
    background-color: #ffd700;
    color: #121214;
    border-color: #ffd700;
}

/* Сетки 4х4 */
.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 10px;
    height: 400px;
}

.grid-item {
    background-color: #1c1c24;
    border: 1px solid #2a2a35;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s;
    overflow: hidden;
    box-sizing: border-box;
    text-align: center;
}

.grid-item.empty {
    background-color: #141418;
    border: 1px dashed #22222a;
    cursor: default;
}

.grid-item.clickable:hover {
    border-color: #ffd700;
    transform: translateY(-2px);
}

.grid-item.selected {
    border-color: #ffd700;
    background-color: #252530;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.grid-item img.item-image {
    width: 100%;
    height: 62px;
    object-fit: contain;
    margin: auto 0;
}

.item-price {
    font-size: 12px;
    color: #ffd700;
    font-weight: bold;
    flex-shrink: 0;
    margin: 2px 0;
}

.item-name {
    font-size: 11px;
    color: #8a8a93;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    width: 100%;
    margin: 0;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal-box {
    background-color: #141418;
    padding: 30px;
    border-radius: 14px;
    width: 360px;
    border: 1px solid #2a2a35;
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-box h2 {
    font-size: 18px;
    color: #ffffff;
    text-align: center;
}

.modal-box form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-box input {
    background-color: #0b0b0d;
    border: 1px solid #2a2a35;
    padding: 12px;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    width: 100%;
}

.modal-box input:focus {
    border-color: #ffd700;
    outline: none;
}

.modal-box button[type="submit"] {
    background-color: #ffd700;
    color: #121214;
    border: none;
    padding: 12px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
}

.switch-auth {
    display: flex;
    justify-content: center;
    gap: 5px;
    font-size: 13px;
    color: #8a8a93;
}

.switch-auth a {
    color: #ffd700;
    text-decoration: none;
}

.close-modal {
    background-color: #1c1c24;
    border: 1px solid #2a2a35;
    color: #b0b0c0;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    width: 100%;
}

.close-modal:hover {
    background-color: #252530;
    color: #fff;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
    color: #c0c0cb;
    background: #0b0b0d;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #2a2a35;
}

.profile-info span {
    color: #ffd700;
    font-weight: bold;
}

.upgrade-controls-bar {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 10px;
}

.control-toggle-btn {
    background: #1c1c24;
    border: 1px solid #2a2a35;
    color: #8a8a93;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}

.control-toggle-btn.active {
    border-color: #ffd700;
    color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
}
.header-stats {
    display: flex;
    align-items: center;
    gap: 25px;
}

.stat-block {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-icon {
    flex-shrink: 0;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.4));
}

.stat-texts {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.stat-label {
    font-size: 11px;
    color: #8a8a93;
    font-weight: 500;
}

.stat-value {
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
}
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left-group {
    display: flex;
    align-items: center;
    gap: 30px;
}

#left-grid, #store-grid {
    max-height: 420px; 
    overflow-y: auto;  
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 10px;
    padding-right: 5px; 
}


#left-grid::-webkit-scrollbar, #store-grid::-webkit-scrollbar {
    width: 6px;
}
#left-grid::-webkit-scrollbar-thumb, #store-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.grid-item {
    animation: fadeInGrid 0.3s ease-in-out;
}

@keyframes fadeInGrid {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --bg-card: #15171e;
    --bg-card-gradient: linear-gradient(180deg, #181a22 0%, #13151b 100%);
    --border-color: #212431;
    --border-hover: #2c3144;
    --accent-gold: #f1c40f;
    --accent-gold-glow: rgba(241, 196, 15, 0.25);
    --text-main: #ffffff;
    --text-muted: #8b949e;
    --radius-main: 12px;
    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-page-container {
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: -0.01em;
}

/* --- VIP BANNER --- */
.profile-vip-banner {
    background: linear-gradient(135deg, #1d202b 0%, #15171e 100%);
    border: 1px solid var(--border-color);
    padding: 16px 24px;
    border-radius: var(--radius-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: var(--transition-smooth);
}

.profile-vip-banner:hover {
    border-color: var(--border-hover);
}

.profile-vip-banner .vip-btn {
    background: linear-gradient(135deg, #f39c12, #d35400);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.35);
    transition: var(--transition-smooth);
}

.profile-vip-banner .vip-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.5);
    filter: brightness(1.1);
}

.profile-vip-banner .vip-btn:active {
    transform: translateY(0);
}

/* --- GRID TOP CARDS --- */
.profile-grid-top {
    display: grid;
    grid-template-columns: 2fr 2fr 2.2fr 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.profile-card {
    background: var(--bg-card-gradient);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: var(--radius-main);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-smooth);
}

.profile-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* --- USER CARD --- */
.user-card-box .user-profile-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-big-avatar {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #8e44ad, #3498db);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 4px 12px rgba(142, 68, 173, 0.3);
}

.profile-user-details {
    display: flex;
    flex-direction: column;
}

#prof-username {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.02em;
}

.verified-icon {
    color: #3498db;
    font-size: 13px;
    margin-left: 4px;
}

.profile-id-row {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 4px;
    font-weight: 500;
}

.notifications-btn {
    background: #1c1f2b;
    border: 1px solid transparent;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    margin-top: 15px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.notifications-btn:hover {
    background: #252836;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.08);
}

/* --- BALANCE CARD --- */
.card-subtitle {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
}

.balance-card-box h2 {
    color: var(--accent-gold);
    margin: 6px 0;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-shadow: 0 0 15px var(--accent-gold-glow);
}

.history-link {
    color: #3498db;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.history-link:hover {
    color: #5dede7;
}
/* --- COUPON INPUT --- */
.coupon-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.coupon-row input {
    background: #1c1f2b;
    border: 1px solid var(--border-color);
    padding: 10px 12px;
    border-radius: 8px;
    color: #fff;
    width: 100%;
    outline: none;
    font-size: 13px;
    font-family: inherit;
    transition: var(--transition-smooth);
}

.coupon-row input:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px var(--accent-gold-glow);
}

.coupon-row button {
    background: #252836;
    border: 1px solid transparent;
    color: #fff;
    padding: 0 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    transition: var(--transition-smooth);
}

.coupon-row button:hover {
    background: var(--accent-gold);
    color: #000;
    box-shadow: 0 4px 12px var(--accent-gold-glow);
}

/* --- BEST DROP CARD --- */
.best-drop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drop-chance {
    color: var(--accent-gold);
    font-size: 11px;
    font-weight: 700;
    background: rgba(241, 196, 15, 0.12);
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(241, 196, 15, 0.2);
}

.best-drop-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.drop-text-info div:first-child {
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 700;
}

#prof-best-name {
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    margin-top: 2px;
}

#prof-best-price {
    color: var(--accent-gold);
    font-size: 13px;
    font-weight: 800;
    margin-top: 4px;
    display: block;
}

#prof-best-img {
    max-height: 85px !important; 
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(241, 196, 15, 0.4));
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.profile-card:hover #prof-best-img {
    transform: scale(1.12) rotate(-2deg);
}

/* --- STATS CARDS --- */
.small-stat-box {
    justify-content: center;
    align-items: center;
    text-align: center;
}

.small-stat-box strong {
    font-size: 18px;
    font-weight: 800;
    margin-top: 4px;
    color: #fff;
}

.small-stat-box .stat-subvalue {
    color: var(--accent-gold);
    font-size: 12px;
    font-weight: 700;
    margin-top: 2px;
}

/* --- INVENTORY SECTION --- */
.profile-inventory-section {
    background: var(--bg-card-gradient);
    border: 1px solid var(--border-color);
    padding: 24px;
    border-radius: var(--radius-main);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.profile-inv-tabs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.profile-inv-tabs .nav-tab {
    background: #1c1f2b;
    border: 1px solid transparent;
    padding: 8px 18px;
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    font-family: inherit;
    transition: var(--transition-smooth);
}

.profile-inv-tabs .nav-tab:hover {
    color: #fff;
    background: #252836;
}

.profile-inv-tabs .nav-tab.active {
    background: var(--accent-gold);
    color: #000;
    font-weight: 700;
    box-shadow: 0 4px 15px var(--accent-gold-glow);
}

.sell-controls-right {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.sell-controls-right label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.sell-controls-right label:hover {
    color: #fff;
}
#profile-sell-all-btn {
    background: #1c1f2b;
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 8px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    transition: var(--transition-smooth);
}

#profile-sell-all-btn:hover {
    background: #e74c3c;
    border-color: #e74c3c;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

/* ==========================================================================
   ФИКС ИНВЕНТАРЯ: ЖЕСТКАЯ ВЫСОТА КАРТОЧЕК И СКРОЛЛ
   ========================================================================== */

#profile-inventory-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    grid-auto-rows: 140px !important; /* Принудительная высота каждой строки */
    gap: 12px !important;
    max-height: 480px !important;      /* Высота самого блока инвентаря */
    overflow-y: auto !important;       /* Включаем прокрутку */
    align-content: start !important;
    padding-right: 8px;
}

/* Запрещаем сжиматься самой карточке */
#profile-inventory-grid .grid-item,
#profile-inventory-grid > div {
    height: 140px !important;
    min-height: 140px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 12px 8px !important;
    flex-shrink: 0 !important;
}

/* Фикс картинок внутри карточек */
#profile-inventory-grid img {
    max-height: 60px !important;
    height: 60px !important;
    width: auto !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
}

/* Кастомный ползунок прокрутки */
#profile-inventory-grid::-webkit-scrollbar {
    width: 6px;
}

#profile-inventory-grid::-webkit-scrollbar-track {
    background: #111318;
    border-radius: 4px;
}

#profile-inventory-grid::-webkit-scrollbar-thumb {
    background: #2c3144;
    border-radius: 4px;
}

#profile-inventory-grid::-webkit-scrollbar-thumb:hover {
    background: var(--accent-gold, #f1c40f);
}
#custom-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #1e1e2d;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border-left: 4px solid #3498db;
    font-family: inherit;
    font-size: 14px;
    z-index: 99999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

#custom-toast.show {
    opacity: 1;
    transform: translateY(0);
}

#custom-toast.error {
    border-left-color: #e74c3c;
}

#custom-toast.success {
    border-left-color: #2ecc71;
}
.confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100000;
}
.confirm-content {
    background: #1e1e2d;
    padding: 20px;
    border-radius: 10px;
    width: 300px;
    text-align: center;
    color: #fff;
    box-shadow: 0 5px 20px rgba(0,0,0,0.4);
}
.confirm-buttons {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
}
.confirm-buttons button {
    padding: 8px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}
.btn-yes { background: #2ecc71; color: #fff; }
.btn-no { background: #e74c3c; color: #fff; }

.app-layout {
    display: flex;
    min-height: calc(100vh - 60px);
    width: 100%;
}

.live-feed-sidebar {
    width: 250px;
    min-width: 250px;
    background: #11131a;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px;
    box-sizing: border-box;
    position: sticky;
    top: 60px;
    height: calc(100vh - 60px);
    overflow-y: auto;
}

.live-feed-sidebar::-webkit-scrollbar {
    width: 4px;
}

.live-feed-sidebar {
    width: 250px;
    min-width: 250px;
    background: #11131a;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px;
    box-sizing: border-box;

    position: relative;
    top: 0;
    margin-top: 0;
    align-self: flex-start; 
    min-height: calc(100vh - 60px);
}

.live-feed-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feed-item {
    background: #181b26;
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    border-left: 4px solid #3b4259;
    box-sizing: border-box;
    transition: transform 0.2s ease, background 0.2s ease;
}

.feed-item-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-width: 140px;
}

.feed-chance {
    font-size: 11px;
    font-weight: bold;
    color: #ffd700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.feed-item-name {
    font-size: 12px;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
}

.feed-user {
    font-size: 11px;
    color: #6c7284;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.feed-item img {
    width: 55px;
    height: 55px;
    object-fit: contain;
}

.feed-item.rarity-legendary {
    border-left-color: #ffd700;
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.12) 0%, #181b26 100%);
}
.feed-item.rarity-rare {
    border-left-color: #a335ee;
    background: linear-gradient(90deg, rgba(163, 53, 238, 0.12) 0%, #181b26 100%);
}
.feed-item.rarity-common {
    border-left-color: #4b69ff;
    background: linear-gradient(90deg, rgba(75, 105, 255, 0.12) 0%, #181b26 100%);
}

.page-content {
    flex: 1;
    min-width: 0;
}

.target-slot-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.preset-chances-bar {
    position: absolute !important;
    
    transform: translateY(200px) !important;

    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 280px;
    width: 100%;
    z-index: 99;
}

.preset-btn {
    background: #1e222d;
    border: 1px solid #2d3345;
    color: #a0a7ba;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.preset-btn:hover {
    background: #ffd700;
    color: #111;
    border-color: #ffd700;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.25);
}

.preset-btn:active {
    transform: translateY(0);
}
.header-right-block {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.header-icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    background: #1e222d;
    border: 1px solid #2d3345;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #a0a7ba;
    padding: 0;
}

.header-icon-btn:hover {
    background: #282e3d;
    border-color: #ffd700;
    color: #ffd700;
}

.header-icon-btn img, .btn-custom-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.notify-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #e74c3c;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 10px;
    border: 2px solid #11141a;
    line-height: 1;
    display: none; 
}

.notify-badge.active {
    display: block;
}

.notify-wrapper {
    position: relative;
    display: inline-block;
}

.header-icon-btn,
#notifyBtn {
    position: relative;
    background: #242733;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.header-icon-btn:hover,
#notifyBtn:hover {
    background: #2c303e;
    border-color: rgba(255, 255, 255, 0.15);
}

.notify-badge,
#notifyBadge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #e74c3c;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #1a1c23;
    box-sizing: border-box;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.notify-popup,
#notifyPopup {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 99999;
    
    width: 320px;
    background: #1a1c23;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    padding: 15px;
    box-sizing: border-box;

    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    pointer-events: none;

    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.notify-popup.active,
#notifyPopup.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.notify-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
}

.notify-clear-btn,
#clearNotifyBtn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #95a5a6;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.notify-clear-btn:hover,
#clearNotifyBtn:hover {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border-color: rgba(231, 76, 60, 0.4);
}

.notify-clear-btn:active,
#clearNotifyBtn:active {
    transform: scale(0.95);
}

.notify-list,
#notifyList {
    max-height: 280px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notify-list::-webkit-scrollbar {
    width: 4px;
}

.notify-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.notify-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px 12px;
    color: #ffffff;
    font-size: 13px;
    line-height: 1.4;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    transition: background 0.2s ease;
}

.notify-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.notify-item-time {
    font-size: 11px;
    color: #7f8c8d;
    white-space: nowrap;
    margin-top: 2px;
}

.notify-empty {
    padding: 20px;
    text-align: center;
    color: #7f8c8d;
    font-size: 13px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 25px 0;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
}

.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    background-color: #2c3e50;
    transition: .3s;
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: #ffffff;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #f1c40f;
}

input:checked + .slider:before {
    transform: translateX(22px);
}

[class*="rarity-"]:not(.feed-item) img {
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

/* 1. Common - Серый */
.rarity-common:not(.feed-item) img { 
    background-image: radial-gradient(circle closest-side at center, rgba(127, 140, 141, 0.45) 0%, transparent 95%) !important; 
}

/* 2. Uncommon - Голубой */
.rarity-uncommon:not(.feed-item) img { 
    background-image: radial-gradient(circle closest-side at center, rgba(52, 152, 219, 0.5) 0%, transparent 95%) !important; 
}

/* 3. Rare - Синий */
.rarity-rare:not(.feed-item) img { 
    background-image: radial-gradient(circle closest-side at center, rgba(31, 97, 141, 0.5) 0%, transparent 95%) !important; 
}

/* 4. Epic - Фиолетовый */
.rarity-epic:not(.feed-item) img { 
    background-image: radial-gradient(circle closest-side at center, rgba(142, 68, 173, 0.55) 0%, transparent 95%) !important; 
}

/* 5. Legendary - Ярко-фиолетовый */
.rarity-legendary:not(.feed-item) img { 
    background-image: radial-gradient(circle closest-side at center, rgba(224, 86, 253, 0.55) 0%, transparent 95%) !important; 
}

/* 6. Arcane - Красный */
.rarity-arcane:not(.feed-item) img { 
    background-image: radial-gradient(circle closest-side at center, rgba(231, 76, 60, 0.6) 0%, transparent 95%) !important; 
}

/* 7. Nameless - Золотой */
.rarity-nameless:not(.feed-item) img { 
    background-image: radial-gradient(circle closest-side at center, rgba(241, 196, 15, 0.6) 0%, transparent 95%) !important; 
}

.skin-card, 
.feed-item, 
.item-card, 
.upgrade-card, 
.upgrade-slot, 
.selected-skin, 
.inventory-card, 
[class*="rarity-"] {
    position: relative !important;
}

.st-badge {
    position: absolute !important;
    top: 5px !important;
    left: 5px !important;
    right: auto !important;
    bottom: auto !important;
    
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
    
    z-index: 99999 !important;
    pointer-events: none !important;
    transform: none !important;
    margin: 0 !important;
    
    background: rgba(255, 170, 0, 0.3) !important;
    color: #ffb700 !important;
    border: 1px solid #ffb700 !important;
    font-size: 8px !important;
    font-weight: 900 !important;
    padding: 1px 4px !important;
    border-radius: 3px !important;
    line-height: 1 !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
    box-shadow: 0 0 6px rgba(255, 183, 0, 0.4) !important;
    backdrop-filter: blur(2px) !important;
}

.skin-card:hover .st-badge,
.feed-item:hover .st-badge,
.item-card:hover .st-badge,
.upgrade-card:hover .st-badge,
.upgrade-slot:hover .st-badge,
.inventory-card:hover .st-badge {
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.upgrade-card .st-badge:not(:first-child),
.upgrade-slot .st-badge:not(:first-child) {
    display: none !important;
}

.upgrade-card .price .st-badge,
.upgrade-card .name .st-badge,
.upgrade-slot .price .st-badge,
.upgrade-slot .name .st-badge {
    display: none !important;
}

.feed-item .st-badge,
.feed-card .st-badge {
    left: auto !important;
    right: 5px !important;
}

.best-drop .st-badge,
.top-drop .st-badge,
.drop-item .st-badge,
.win-item .st-badge,
.profit-item .st-badge,
[class*="best"] .st-badge,
[class*="drop"] .st-badge,
[class*="win"] .st-badge {
    left: auto !important;
    right: 5px !important;
}

/* .всем ку */

.shop-cart-bar {
    position: absolute;
    bottom: 3px;
    left: 15px;
    right: 15px;
    background: #1e222d;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 10;
    backdrop-filter: blur(10px);
    
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.shop-cart-bar.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.cart-clear-btn {
    background: rgba(231, 76, 60, 0.12);
    border: 1px solid rgba(231, 76, 60, 0.25);
    border-radius: 10px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #e74c3c;
    transition: all 0.25s ease;
}

.cart-clear-btn:hover {
    background: #e74c3c;
    color: #fff;
    transform: scale(1.08) rotate(6deg);
}

.cart-clear-btn:active {
    transform: scale(0.92);
}

.cart-total-btn {
    position: relative;
    background: linear-gradient(135deg, #f3ba2f 0%, #d49f1d 100%);
    border: none;
    border-radius: 10px;
    padding: 12px 28px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 6px 20px rgba(243, 186, 47, 0.35);
    transition: all 0.25s ease;
}

.cart-total-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(243, 186, 47, 0.5);
}

.cart-total-btn:active {
    transform: translateY(-1px);
}

.cart-badge-count {
    background: #1a1a1a;
    color: #f3ba2f;
    font-size: 12px;
    font-weight: 800;
    padding: 2px 9px;
    border-radius: 20px;
    min-width: 22px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes badgePop {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.grid-item .item-quantity-controls {
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 8px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex !important;
    pointer-events: none;
}

.grid-item.in-cart .item-quantity-controls {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0) scale(1);
    pointer-events: auto;
}

.grid-item .item-quantity-controls {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(243, 186, 47, 0.95);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 4px 10px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 5;
    box-shadow: 0 4px 15px rgba(243, 186, 47, 0.3);
}
.item-quantity-controls .qty-btn {
    background: transparent;
    border: none;
    color: #1a1a1a;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    padding: 0 4px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.item-quantity-controls .qty-btn:hover {
    transform: scale(1.2);
    opacity: 0.7;
}

.item-quantity-controls .qty-btn:active {
    transform: scale(0.9);
}

.item-quantity-controls .qty-value {
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 800;
    min-width: 16px;
    text-align: center;
}
body.is-upgrading *, 
.upgrade-locked {
    pointer-events: none !important;
    opacity: 0.7;
    cursor: not-allowed !important;
}

#upgrade-btn:disabled, 
.upgrade-btn-loading {
    opacity: 0.8 !important;
    cursor: wait !important;
}
.selected-upgrade-card {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.remove-target-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    background: rgba(231, 76, 60, 0.85);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0.8;
    transition: all 0.2s ease;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.remove-target-btn:hover {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.15);
    background: #e74c3c;
}