/* ========================================
   INVENTORY STYLES - Современный UI инвентаря
   ======================================== */

/* ===== ИСПРАВЛЕНИЕ ПОЗИЦИОНИРОВАНИЯ ===== */
#inventoryMenu .slide-menu-body {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 15px !important;
}

#inventoryMenu .slide-menu-content {
    height: 100%;
    min-height: 100vh;
}

/* ===== КОМПАКТНЫЕ БУСТЫ В РЯД ===== */
.inventory-effects-compact {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 8px;
    margin-bottom: 8px;
    padding: 6px 8px;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.05) 0%, rgba(0, 128, 255, 0.02) 100%);
    border-radius: 6px;
    border: 1px solid rgba(0, 255, 255, 0.2);
    flex-wrap: wrap;
}

.effect-compact {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    transition: all 0.2s ease;
}

.effect-compact:hover {
    transform: scale(1.05);
}

.effect-compact i {
    font-size: 12px;
    color: #00ffff;
    opacity: 0.9;
}

.effect-compact span {
    font-size: 11px;
    font-weight: 700;
    color: #00ffff;
    text-shadow: 0 0 6px rgba(0, 255, 255, 0.6);
    white-space: nowrap;
}

/* ===== АКТИВНЫЕ СЛОТЫ В РЯД С ИНФОРМАЦИЕЙ ===== */
.inventory-active-slots {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 255, 0.15);
}

.active-slot {
    flex: 1;
    min-height: 110px;
    background: rgba(0, 0, 0, 0.25);
    border: 2px dashed rgba(0, 255, 255, 0.25);
    border-radius: 8px;
    padding: 10px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.active-slot:hover {
    border-color: rgba(0, 255, 255, 0.5);
    background: rgba(0, 255, 255, 0.05);
}

.active-slot.occupied {
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.08) 0%, rgba(0, 200, 0, 0.05) 100%);
    border: 1px solid rgba(0, 255, 0, 0.3);
    border-style: solid;
}

.slot-label {
    font-size: 11px;
    color: #00ffff;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    opacity: 0.9;
}

.slot-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.slot-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 100%;
    color: rgba(255, 255, 255, 0.4);
}

.slot-empty-state i {
    font-size: 28px;
    opacity: 0.5;
}

.slot-empty-state span {
    font-size: 12px;
}

.slot-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.slot-item-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 255, 255, 0.2);
    border-radius: 6px;
    color: #00ffff;
    font-size: 22px;
    flex-shrink: 0;
}

.slot-item-info {
    flex: 1;
    min-width: 0;
}

.slot-item-name {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.slot-item-rarity {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
}

.slot-item-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.slot-item-stat {
    font-size: 12px;
    color: #00ffff;
    background: rgba(0, 255, 255, 0.15);
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    white-space: nowrap;
    font-weight: 600;
}

.slot-remove-btn {
    width: 32px;
    height: 32px;
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid rgba(255, 0, 0, 0.4);
    border-radius: 6px;
    color: #ff0000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 15px;
    flex-shrink: 0;
}

.slot-remove-btn:hover {
    background: rgba(255, 0, 0, 0.3);
    transform: scale(1.1);
}

/* ===== КОМПАКТНАЯ ПАНЕЛЬ ЭФФЕКТОВ ===== */
.inventory-effects {
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.effects-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.effects-title {
    font-size: 10px;
    color: #00ffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.effects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.effect-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px;
    background: rgba(0, 255, 255, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(0, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.effect-stat:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: rgba(0, 255, 255, 0.3);
}

.effect-label {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    margin-bottom: 3px;
}

.effect-value {
    font-size: 13px;
    font-weight: 700;
    color: #00ffff;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.6);
}

/* ===== ТАБЫ КАТЕГОРИЙ ===== */
.inventory-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.inventory-tab {
    flex: 1;
    padding: 8px 12px;
    background: linear-gradient(135deg, rgba(15, 15, 25, 0.8), rgba(25, 25, 35, 0.7));
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.inventory-tab:hover {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1), rgba(0, 128, 255, 0.08));
    border-color: rgba(0, 255, 255, 0.4);
    color: #00ffff;
}

.inventory-tab.active {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2), rgba(0, 128, 255, 0.15));
    border-color: rgba(0, 255, 255, 0.6);
    color: #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

.inventory-tab i {
    margin-right: 6px;
    font-size: 14px;
}

/* ===== СЕТКА ПРЕДМЕТОВ (КОМПАКТНАЯ) ===== */
.inventory-items-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin-bottom: 16px;
}

.inventory-card {
    background: rgba(20, 20, 30, 0.9);
    border: 1px solid rgba(0, 255, 255, 0.25);
    border-radius: 8px;
    padding: 6px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.inventory-card:hover {
    background: linear-gradient(135deg, 
        rgba(0, 255, 255, 0.12) 0%, 
        rgba(0, 128, 255, 0.08) 50%, 
        rgba(0, 200, 255, 0.1) 100%);
    border-color: rgba(0, 255, 255, 0.5);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 8px 24px rgba(0, 255, 255, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.inventory-card.active {
    background: linear-gradient(135deg, 
        rgba(0, 255, 0, 0.08) 0%, 
        rgba(0, 200, 0, 0.05) 50%, 
        rgba(0, 255, 100, 0.06) 100%);
    border-color: rgba(0, 255, 0, 0.4);
}

.inventory-card.active::before {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #00ff00;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.6);
    animation: activePulse 2s infinite;
}

@keyframes activePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Новая компактная структура карточек */
.card-top {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    position: relative;
}

.card-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: linear-gradient(135deg, #00ffff, #0080ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #000000;
    box-shadow: 0 2px 10px rgba(0, 255, 255, 0.4);
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.inventory-card:hover .card-icon {
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.6);
    transform: scale(1.08);
}

.card-info {
    flex: 1;
    min-width: 0;
}

.card-name {
    font-size: 11px;
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.quality-emoji {
    font-size: 10px;
    margin-right: 2px;
}

.card-rarity {
    font-size: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.85;
    line-height: 1;
}

.boost-count {
    position: absolute;
    top: -2px;
    right: 0;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000000;
    font-size: 8px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    line-height: 1;
}

/* Редкости */
.rarity-common { color: #ffffff; }
.rarity-uncommon { color: #00ff00; }
.rarity-rare { color: #0080ff; }
.rarity-legendary { color: #ff8000; }
.rarity-mythic { color: #ff00ff; }

/* Компактная сетка статов */
.card-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px 2px;
    background: rgba(0, 255, 255, 0.05);
    border-radius: 4px;
    border: 1px solid rgba(0, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.stat-item:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: rgba(0, 255, 255, 0.3);
}

.stat-item.boosted {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
}

.stat-item.boosted:hover {
    background: rgba(255, 215, 0, 0.15);
}

.stat-item i {
    font-size: 10px;
    color: #00ffff;
    opacity: 0.9;
}

.stat-item.boosted i {
    color: #ffd700;
}

.stat-item span {
    font-size: 9px;
    font-weight: 700;
    color: #00ffff;
    text-shadow: 0 0 4px rgba(0, 255, 255, 0.3);
    line-height: 1;
}

.stat-item.boosted span {
    color: #ffd700;
    text-shadow: 0 0 6px rgba(255, 215, 0, 0.5);
}

/* Убрали card-hint для компактности */

/* ===== ПУСТОЕ СОСТОЯНИЕ ===== */
.empty-inventory {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    grid-column: 1 / -1;
}

.empty-inventory i {
    font-size: 48px;
    color: rgba(0, 255, 255, 0.3);
    margin-bottom: 15px;
}

.empty-inventory p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    text-align: center;
    margin: 0;
}

/* ===== КОНТЕЙНЕРЫ С СКРОЛЛОМ ===== */
.items-container {
    display: none;
    height: calc(100vh - 250px); /* Максимум места под список (шапка и статы компактнее) */
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
}

.items-container.active {
    display: block;
}

/* Кастомный скроллбар */
.items-container::-webkit-scrollbar {
    width: 6px;
}

.items-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

.items-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #00ffff, #0080ff);
    border-radius: 3px;
}

.items-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #00cccc, #0066cc);
}

/* ===== АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ ===== */
@media (max-width: 768px) {
    #inventoryMenu .slide-menu-body {
        padding: 8px !important;
    }
    
    .inventory-effects-compact {
        gap: 6px;
        padding: 5px 6px;
        justify-content: space-between;
    }
    
    .effect-compact {
        gap: 3px;
    }
    
    .effect-compact i {
        font-size: 11px;
    }
    
    .effect-compact span {
        font-size: 10px;
    }
    
    .inventory-active-slots {
        flex-direction: row;
        gap: 6px;
        padding: 6px;
    }
    
    .active-slot {
        min-height: 110px;
        padding: 12px;
    }
    
    .slot-label {
        font-size: 10px;
    }
    
    .slot-item-icon {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }
    
    .slot-item-name {
        font-size: 14px;
    }
    
    .slot-item-rarity {
        font-size: 10px;
    }
    
    .slot-item-stat {
        font-size: 11px;
        padding: 3px 7px;
    }
    
    .slot-remove-btn {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    .items-container {
        height: calc(100vh - 210px); /* Больше места на мобильных */
    }
    
    .inventory-tabs {
        flex-direction: row;
        gap: 6px;
    }
    
    .inventory-tab {
        padding: 10px 12px;
        font-size: 11px;
    }
    
    .inventory-tab i {
        font-size: 12px;
    }
    
    .inventory-items-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .inventory-card {
        padding: 10px;
    }
    
    .card-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .card-name {
        font-size: 13px;
    }
    
    .card-stat {
        font-size: 10px;
    }
    
    .card-btn {
        padding: 7px 10px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .inventory-effects-compact {
        gap: 4px;
        padding: 4px;
        justify-content: space-between;
    }
    
    .effect-compact {
        gap: 2px;
        flex-direction: column;
        align-items: center;
    }
    
    .effect-compact i {
        font-size: 10px;
    }
    
    .effect-compact span {
        font-size: 8px;
    }
    
    .inventory-active-slots {
        padding: 6px;
        flex-direction: row;
        gap: 5px;
    }
    
    .active-slot {
        min-height: 105px;
        padding: 10px;
    }
    
    .slot-label {
        font-size: 9px;
        margin-bottom: 6px;
    }
    
    .slot-item-icon {
        width: 36px;
        height: 36px;
        font-size: 17px;
    }
    
    .slot-item-name {
        font-size: 13px;
    }
    
    .slot-item-rarity {
        font-size: 9px;
    }
    
    .slot-item-stat {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .slot-remove-btn {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }
    
    .items-container {
        height: calc(100vh - 240px); /* Адаптация для маленьких экранов */
    }
    
    .modal-content {
        width: 320px;
    }
    
    .modal-item-icon {
        width: 70px;
        height: 70px;
        font-size: 32px;
    }
    
    .inventory-tab {
        padding: 8px 10px;
        font-size: 10px;
    }
    
    .inventory-items-grid {
        gap: 6px;
    }
    
    .inventory-card {
        padding: 8px;
    }
    
    .card-icon {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .card-name {
        font-size: 12px;
    }
}

/* ===== АНИМАЦИИ ===== */
@keyframes cardAppear {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.inventory-card {
    animation: cardAppear 0.3s ease;
}

@keyframes slotActivate {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.active-slot.activating {
    animation: slotActivate 0.3s ease;
}

/* ===== МОДАЛЬНОЕ МЕНЮ ПРЕДМЕТА ===== */
.item-action-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.item-action-modal.show {
    display: flex;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
}

.modal-content {
    position: relative;
    z-index: 10001;
    background: rgba(20, 20, 30, 0.95);
    border: 1px solid rgba(0, 255, 255, 0.4);
    border-radius: 12px;
    padding: 0;
    max-width: 90%;
    width: 320px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: modalSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideUp {
    from {
        transform: translateY(30px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.25);
    background: rgba(0, 255, 255, 0.03);
}

.modal-header h4 {
    margin: 0;
    font-size: 14px;
    color: #ffffff;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.modal-close {
    width: 28px;
    height: 28px;
    background: rgba(255, 0, 0, 0.15);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 6px;
    color: #ff4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 13px;
}

.modal-close:hover {
    background: rgba(255, 0, 0, 0.25);
    border-color: rgba(255, 0, 0, 0.5);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
}

.modal-body {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Компактная шапка модалки */
.modal-header-compact {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.15);
}

.modal-item-icon-inline {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: linear-gradient(135deg, #00ffff, #0080ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #000000;
    box-shadow: 
        0 4px 15px rgba(0, 255, 255, 0.5),
        0 0 20px rgba(0, 255, 255, 0.3),
        inset 0 -2px 8px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
    position: relative;
}

.modal-item-info-inline {
    flex: 1;
    min-width: 0;
}

.modal-item-title-inline {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.quality-marker {
    font-size: 12px;
}

.quality-marker.quality-silver {
    color: #c0c0c0;
    text-shadow: 0 0 8px rgba(192, 192, 192, 0.6);
}

.quality-marker.quality-gold {
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

.boost-badge-inline {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000000;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(255, 215, 0, 0.4);
}

.modal-item-rarity-inline {
    font-size: 10px;
    font-weight: 600;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Компактные статы модалки */
.modal-stats-compact {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.modal-stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: rgba(0, 255, 255, 0.06);
    border-radius: 6px;
    border: 1px solid rgba(0, 255, 255, 0.15);
    transition: all 0.2s ease;
}

.modal-stat-row:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: rgba(0, 255, 255, 0.3);
    transform: translateX(2px);
}

.modal-stat-row.boosted {
    background: rgba(255, 215, 0, 0.08);
    border-color: rgba(255, 215, 0, 0.3);
}

.modal-stat-row.boosted:hover {
    background: rgba(255, 215, 0, 0.12);
}

.stat-row-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.stat-row-label i {
    font-size: 11px;
    color: #00ffff;
    width: 16px;
    text-align: center;
}

.modal-stat-row.boosted .stat-row-label i {
    color: #ffd700;
}

.stat-row-value {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #00ffff;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.5);
}

.modal-stat-row.boosted .stat-row-value {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

.boost-icon {
    font-size: 10px;
    color: #ffd700;
}

.modal-actions {
    padding: 12px 16px;
    border-top: 1px solid rgba(0, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-action-btn {
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, #00ffff, #0080ff);
    color: #000000;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 
        0 2px 8px rgba(0, 255, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.modal-action-btn:hover {
    background: linear-gradient(135deg, #00ffff, #00b3ff);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 6px 20px rgba(0, 255, 255, 0.5),
        0 0 30px rgba(0, 255, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.modal-action-btn:active {
    transform: translateY(0) scale(0.98);
}

.modal-action-btn.deactivate {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: #ffffff;
    box-shadow: 
        0 2px 8px rgba(255, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.modal-action-btn.deactivate:hover {
    background: linear-gradient(135deg, #ff5555, #dd0000);
    box-shadow: 
        0 6px 20px rgba(255, 0, 0, 0.5),
        0 0 30px rgba(255, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.modal-action-btn.craft {
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    color: #ffffff;
    box-shadow: 
        0 2px 8px rgba(168, 85, 247, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.modal-action-btn.craft:hover {
    background: linear-gradient(135deg, #b565ff, #8b5cf6);
    box-shadow: 
        0 6px 20px rgba(168, 85, 247, 0.5),
        0 0 30px rgba(168, 85, 247, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Компактный блок улучшений */
.modal-boosts-compact {
    padding: 8px;
    background: rgba(255, 215, 0, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 6px;
    margin-top: 4px;
}

.boosts-compact-title {
    font-size: 10px;
    font-weight: 700;
    color: #ffd700;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.boosts-compact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
}

.boost-item-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 6px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 4px;
    font-size: 9px;
}

.boost-item-compact span:first-child {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.boost-item-compact .boost-value {
    color: #ffd700;
    font-weight: 700;
}

.modal-action-btn i {
    font-size: 14px;
}

/* ===== КАЧЕСТВО ПРЕДМЕТОВ (АУРЫ) ===== */
.quality-aura {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 15px;
    pointer-events: none;
    z-index: 0;
    animation: pulseAura 2s ease-in-out infinite;
}

.quality-aura-compact {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    pointer-events: none;
    z-index: 0;
    animation: pulseAura 2s ease-in-out infinite;
}

/* Серебряная аура */
.aura-silver {
    box-shadow: 
        0 0 20px rgba(192, 192, 192, 0.6),
        inset 0 0 20px rgba(192, 192, 192, 0.2);
    background: radial-gradient(circle at 50% 50%, rgba(192, 192, 192, 0.1) 0%, transparent 70%);
}

/* Золотая аура */
.aura-gold {
    box-shadow: 
        0 0 30px rgba(255, 215, 0, 0.8),
        inset 0 0 30px rgba(255, 215, 0, 0.3);
    background: radial-gradient(circle at 50% 50%, rgba(255, 215, 0, 0.15) 0%, transparent 70%);
}

@keyframes pulseAura {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Стили для карточек с качеством */
.inventory-card.quality-silver,
.craft-item.quality-silver {
    position: relative;
    border-color: rgba(192, 192, 192, 0.6);
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.1) 0%, rgba(0, 0, 0, 0.5) 100%);
}

.inventory-card.quality-gold,
.craft-item.quality-gold {
    position: relative;
    border-color: rgba(255, 215, 0, 0.8);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(0, 0, 0, 0.5) 100%);
}

/* Бейдж с количеством улучшений */
.boost-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.5);
    animation: boostPulse 2s ease-in-out infinite;
}

.boost-badge.compact {
    padding: 3px 6px;
    font-size: 10px;
}

.boost-badge i {
    font-size: 10px;
    color: #ffd700;
}

@keyframes boostPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Бейдж качества */
.quality-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    z-index: 2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.quality-badge.quality-silver {
    background: linear-gradient(135deg, #c0c0c0, #ffffff);
    color: #333;
    box-shadow: 0 2px 10px rgba(192, 192, 192, 0.6);
}

.quality-badge.quality-gold {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.6);
}

/* Индикатор улучшения статов */
.card-stat.boosted,
.craft-item-stat.boosted,
.modal-stat.boosted {
    color: #4caf50;
    font-weight: 700;
}

.boost-indicator {
    color: #4caf50;
    font-size: 10px;
    margin-left: 4px;
    animation: boostBlink 1.5s ease-in-out infinite;
}

@keyframes boostBlink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Карточки крафтовых предметов */
.inventory-card.crafted {
    position: relative;
}

.card-badge.crafted-badge {
    background: rgba(103, 58, 183, 0.3);
    color: #ba68c8;
}

/* Детали улучшений в модалке */
.modal-boost-details {
    margin-top: 15px;
    padding: 12px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 10px;
}

.boost-details-title {
    color: #667eea;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.boost-detail {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    color: #bbb;
    font-size: 13px;
}

.boost-value {
    color: #4caf50;
    font-weight: 700;
}

.modal-crafted-badge {
    margin-top: 12px;
    padding: 8px;
    background: rgba(103, 58, 183, 0.2);
    border-radius: 8px;
    color: #ba68c8;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
}

.modal-item-title {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    margin: 10px 0;
    text-align: center;
}
.modal-item-rarity {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 15px;
}
