/* ========================================
   CRAFT STYLES - Стили крафта в едином стиле проекта
   ======================================== */

/* ===== ОТДЕЛЬНОЕ МЕНЮ КРАФТА ===== */
/* Меню крафта должно открываться ПОВЕРХ инвентаря */
#craftMenu {
    z-index: 10000 !important; /* Выше чем у обычных slide-menu (9999) */
}

#craftMenu .slide-menu-content {
    height: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.craft-menu-body {
    flex: 1;
    overflow: hidden !important;
    padding: 10px !important;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Закрепленный футер с кнопкой крафта */
.craft-menu-footer {
    flex-shrink: 0;
    padding: 10px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.5) 100%);
    border-top: 1px solid rgba(0, 255, 255, 0.2);
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.3);
}

/* ===== КОМПАКТНЫЕ СЛОТЫ ДЛЯ ВЫБРАННЫХ ПРЕДМЕТОВ ===== */
.craft-selected-slots-compact {
    flex-shrink: 0;
    display: flex;
    gap: 6px;
    padding: 0;
}

.craft-slot-compact {
    flex: 1;
    aspect-ratio: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 2px dashed rgba(0, 255, 255, 0.25);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
    min-height: 60px;
}

.craft-slot-compact.empty i {
    font-size: 20px;
    color: rgba(0, 255, 255, 0.3);
}

.craft-slot-compact.filled {
    border-style: solid;
    border-color: rgba(0, 255, 0, 0.5);
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.1) 0%, rgba(0, 200, 0, 0.05) 100%);
}

.craft-slot-compact:hover {
    border-color: rgba(0, 255, 255, 0.4);
    background: rgba(0, 255, 255, 0.05);
}

/* ===== КОНТЕЙНЕР СО СКРОЛЛОМ ДЛЯ СПИСКА ПРЕДМЕТОВ ===== */
.craft-items-scroll-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    min-height: 0;
}

.craft-items-scroll-container::-webkit-scrollbar {
    width: 6px;
}

.craft-items-scroll-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.craft-items-scroll-container::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.3);
    border-radius: 3px;
}

.craft-items-scroll-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 255, 0.5);
}

.craft-section-title-compact {
    font-size: 10px;
    color: #00ffff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: rgba(0, 255, 255, 0.05);
    border-left: 2px solid rgba(0, 255, 255, 0.4);
    border-radius: 4px;
    flex-shrink: 0;
}

.craft-section-title-compact i {
    font-size: 10px;
}

/* ===== СЕКЦИЯ С ЗАГОЛОВКОМ (старый стиль) ===== */
.craft-section-title {
    font-size: 13px;
    color: #00ffff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 16px 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(0, 255, 255, 0.05);
    border-left: 3px solid rgba(0, 255, 255, 0.5);
    border-radius: 4px;
}

.craft-section-title i {
    font-size: 14px;
}

/* ===== ЗАКРЕПЛЕННАЯ КНОПКА КРАФТА ===== */
.craft-action-button-fixed {
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, #00ffff, #0080ff);
    border: none;
    border-radius: 6px;
    color: #000000;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 
        0 4px 15px rgba(0, 255, 255, 0.4),
        0 0 30px rgba(0, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.craft-action-button-fixed:hover:not(:disabled) {
    background: linear-gradient(135deg, #00ffff, #00b3ff);
    box-shadow: 
        0 6px 25px rgba(0, 255, 255, 0.6),
        0 0 40px rgba(0, 255, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transform: translateY(-2px) scale(1.01);
}

.craft-action-button-fixed:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

.craft-action-button-fixed:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: linear-gradient(135deg, rgba(100, 100, 100, 0.3), rgba(80, 80, 80, 0.3));
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    box-shadow: none;
    transform: none;
}

.craft-action-button-fixed i {
    font-size: 13px;
}

/* ===== КНОПКА КРАФТА В МЕНЮ (старый стиль) ===== */
.craft-action-button {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #00ffff, #0080ff);
    border: none;
    border-radius: 8px;
    color: #000000;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    box-shadow: 
        0 4px 15px rgba(0, 255, 255, 0.4),
        0 0 30px rgba(0, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.craft-action-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #00ffff, #00b3ff);
    box-shadow: 
        0 6px 25px rgba(0, 255, 255, 0.6),
        0 0 40px rgba(0, 255, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transform: translateY(-3px) scale(1.02);
}

.craft-action-button:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

.craft-action-button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: linear-gradient(135deg, rgba(100, 100, 100, 0.3), rgba(80, 80, 80, 0.3));
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    box-shadow: none;
    transform: none;
}

.craft-action-button i {
    font-size: 15px;
}

/* ===== ОСНОВНОЙ КОНТЕЙНЕР КРАФТА ===== */
.craft-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0;
}

/* ===== ТАБЫ КРАФТА (ПОДИКИ/ЖИЖИ) ===== */
.craft-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.craft-tab {
    flex: 1;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.craft-tab:hover {
    background: rgba(0, 255, 255, 0.05);
    border-color: rgba(0, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.8);
}

.craft-tab.active {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.15) 0%, rgba(0, 200, 255, 0.1) 100%);
    border-color: rgba(0, 255, 255, 0.5);
    color: #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.craft-tab i {
    font-size: 14px;
}

/* ===== КНОПКА ИНФОРМАЦИИ О ШАНСАХ ===== */
.craft-info-button {
    flex-shrink: 0;
    width: 100%;
    padding: 6px 10px;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1) 0%, rgba(0, 128, 255, 0.08) 100%);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 6px;
    color: #00ffff;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.craft-info-button:hover {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.15) 0%, rgba(0, 128, 255, 0.12) 100%);
    border-color: rgba(0, 255, 255, 0.5);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
    transform: translateY(-1px);
}

.craft-info-button i {
    font-size: 11px;
}

.craft-info-rules {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}

.craft-info-rule {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    padding: 6px 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    border-left: 2px solid rgba(0, 255, 255, 0.3);
}

.craft-info-rule i {
    color: #00ffff;
    font-size: 10px;
    margin-top: 2px;
}

/* ===== ВЫБРАННЫЕ ПРЕДМЕТЫ ===== */
.craft-selected-items {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 255, 255, 0.15);
    border-radius: 8px;
    margin-bottom: 12px;
}

.craft-selected-slot {
    flex: 1;
    aspect-ratio: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 2px dashed rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.craft-selected-slot.empty {
    border-color: rgba(0, 255, 255, 0.2);
}

.craft-selected-slot.filled {
    border-style: solid;
    border-color: rgba(0, 255, 0, 0.4);
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.08) 0%, rgba(0, 200, 0, 0.05) 100%);
}

.craft-selected-slot-empty {
    font-size: 24px;
    color: rgba(0, 255, 255, 0.3);
}

.craft-selected-item-mini {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
    position: relative;
}

.craft-selected-item-icon {
    font-size: 28px;
    color: #00ffff;
    margin-bottom: 4px;
}

.craft-selected-item-name {
    font-size: 10px;
    color: #fff;
    text-align: center;
    font-weight: 600;
    line-height: 1.2;
    max-height: 24px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.craft-selected-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: rgba(255, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.craft-selected-remove:hover {
    background: rgba(255, 0, 0, 0.9);
    transform: scale(1.1);
}

/* ===== СПИСОК ПРЕДМЕТОВ ДЛЯ КРАФТА ===== */
#craftItemsContainer {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.craft-rarity-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.craft-rarity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    border-left: 3px solid;
}

.craft-rarity-header.rarity-common {
    border-left-color: #9b9b9b;
}

.craft-rarity-header.rarity-uncommon {
    border-left-color: #1eff00;
}

.craft-rarity-header.rarity-rare {
    border-left-color: #0070dd;
}

.craft-rarity-header.rarity-epic {
    border-left-color: #a335ee;
}

.craft-rarity-header.rarity-legendary {
    border-left-color: #ff8000;
}

.craft-rarity-header.rarity-mythic {
    border-left-color: #e6cc80;
}

.craft-rarity-name {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.craft-rarity-name.rarity-common { color: #9b9b9b; }
.craft-rarity-name.rarity-uncommon { color: #1eff00; }
.craft-rarity-name.rarity-rare { color: #0070dd; }
.craft-rarity-name.rarity-epic { color: #a335ee; }
.craft-rarity-name.rarity-legendary { color: #ff8000; }
.craft-rarity-name.rarity-mythic { color: #e6cc80; }

.craft-rarity-count {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    padding: 2px 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.craft-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}

/* ===== КАРТОЧКИ ПРЕДМЕТОВ (используем стиль инвентаря) ===== */
.craft-item-card {
    position: relative;
    background: linear-gradient(135deg, 
        rgba(15, 15, 25, 0.85) 0%, 
        rgba(25, 25, 35, 0.8) 50%, 
        rgba(20, 20, 30, 0.85) 100%);
    border: 1px solid rgba(0, 255, 255, 0.25);
    border-radius: 8px;
    padding: 6px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.craft-item-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);
}

.craft-item-card.selected {
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.15) 0%, rgba(0, 200, 0, 0.1) 100%);
    border-color: rgba(0, 255, 0, 0.6);
    box-shadow: 
        0 0 20px rgba(0, 255, 0, 0.4),
        0 4px 15px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.craft-item-card.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(0.5);
}

.craft-item-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    position: relative;
}

.craft-item-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #00ffff, #0080ff);
    border-radius: 6px;
    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;
}

.craft-item-card:hover .craft-item-icon {
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.6);
    transform: scale(1.08);
}

.craft-item-select {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: rgba(0, 255, 255, 0.5);
    transition: all 0.2s ease;
}

.craft-item-card.selected .craft-item-select {
    color: #00ff00;
    transform: scale(1.2);
}

.craft-item-name {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
    max-height: 32px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.craft-item-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
}

.craft-item-stat {
    font-size: 9px;
    color: #00ffff;
    padding: 3px 4px;
    background: rgba(0, 255, 255, 0.08);
    border: 1px solid rgba(0, 255, 255, 0.15);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-weight: 700;
    transition: all 0.2s ease;
    line-height: 1;
}

.craft-item-stat:hover {
    background: rgba(0, 255, 255, 0.12);
    border-color: rgba(0, 255, 255, 0.3);
}

.craft-item-stat i {
    font-size: 10px;
    color: #00ffff;
}

.craft-item-stat.boosted {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
}

.craft-item-stat.boosted:hover {
    background: rgba(255, 215, 0, 0.15);
}

.craft-item-stat.boosted i {
    color: #ffd700;
}

.craft-item-badges {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.craft-item-badge {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.craft-item-badge.crafted {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.craft-item-badge.quality-silver {
    background: rgba(192, 192, 192, 0.2);
    color: #c0c0c0;
    border: 1px solid rgba(192, 192, 192, 0.3);
}

.craft-item-badge.quality-gold {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

/* ===== КНОПКА КРАФТА ===== */
#craftButton {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2) 0%, rgba(0, 200, 255, 0.15) 100%);
    border: 2px solid rgba(0, 255, 255, 0.5);
    border-radius: 8px;
    color: #00ffff;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

#craftButton:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.3) 0%, rgba(0, 200, 255, 0.25) 100%);
    border-color: rgba(0, 255, 255, 0.7);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
    transform: translateY(-2px);
}

#craftButton:active:not(:disabled) {
    transform: translateY(0);
}

#craftButton:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
}

#craftButton i {
    font-size: 16px;
}

/* ===== МОДАЛЬНОЕ ОКНО РЕЗУЛЬТАТА ===== */
.craft-result-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10500;
    padding: 16px;
}

.craft-result-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.craft-result-content {
    background: rgba(12, 12, 22, 0.95);
    border: 2px solid rgba(0, 255, 255, 0.4);
    border-radius: 12px;
    padding: 20px;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6);
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-40px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#craftResultTitle {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: #00ffff;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#craftResultTitle i {
    font-size: 24px;
}

#craftResultItem {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
    text-align: center;
}

.craft-result-item-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.15) 0%, rgba(0, 200, 255, 0.1) 100%);
    border: 2px solid rgba(0, 255, 255, 0.4);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #00ffff;
    margin: 0 auto 12px;
}

.craft-result-item-name {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.craft-result-item-rarity {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.craft-result-item-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.craft-result-stat {
    background: rgba(0, 0, 0, 0.3);
    padding: 8px;
    border-radius: 6px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.craft-result-stat i {
    color: #00ffff;
    font-size: 14px;
}

.craft-result-stat-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 10px;
}

.craft-result-stat-value {
    font-weight: 700;
    color: #00ffff;
}

#craftResultSummary {
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
}

.craft-result-summary-title {
    font-size: 12px;
    color: #00ffff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.craft-result-summary-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.craft-result-summary-item {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 8px;
}

.craft-result-summary-item i {
    color: #00ffff;
    font-size: 10px;
}

.craft-result-close {
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2) 0%, rgba(0, 200, 255, 0.15) 100%);
    border: 2px solid rgba(0, 255, 255, 0.5);
    border-radius: 8px;
    color: #00ffff;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.craft-result-close:hover {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.3) 0%, rgba(0, 200, 255, 0.25) 100%);
    border-color: rgba(0, 255, 255, 0.7);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
}

/* ===== ПРОВАЛ КРАФТА ===== */
.craft-failed-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 20px;
    text-align: center;
}

.craft-failed-icon {
    font-size: 60px;
    color: #ff4444;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
    20%, 40%, 60%, 80% { transform: translateX(8px); }
}

.craft-failed-message {
    font-size: 16px;
    color: #ff6b6b;
    font-weight: 600;
    max-width: 400px;
    line-height: 1.4;
}

.craft-failed-items {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.deleted-items-title {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.deleted-item {
    padding: 8px 12px;
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #fff;
    transition: all 0.3s ease;
}

.deleted-item i {
    font-size: 14px;
    opacity: 0.7;
}

/* Цвета редкости для удаленных предметов */
.deleted-item.rarity-common { border-color: rgba(155, 155, 155, 0.3); }
.deleted-item.rarity-uncommon { border-color: rgba(30, 255, 0, 0.3); }
.deleted-item.rarity-rare { border-color: rgba(0, 112, 221, 0.3); }
.deleted-item.rarity-epic { border-color: rgba(163, 53, 238, 0.3); }
.deleted-item.rarity-legendary { border-color: rgba(255, 128, 0, 0.3); }
.deleted-item.rarity-mythic { border-color: rgba(230, 204, 128, 0.3); }

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .craft-selected-items {
        gap: 6px;
        padding: 8px;
    }
    
    .craft-selected-item-icon {
        font-size: 20px;
    }
    
    .craft-selected-item-name {
        font-size: 9px;
    }
    
    .craft-items-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 6px;
    }
    
    #craftButton {
        padding: 12px 20px;
        font-size: 13px;
    }
    
    .craft-result-content {
        padding: 20px;
        max-width: 100%;
    }
}

/* ===== ЭФФЕКТЫ КАЧЕСТВА ===== */
.quality-silver {
    position: relative;
}

.quality-silver::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.2) 0%, rgba(169, 169, 169, 0.1) 100%);
    border-radius: inherit;
    z-index: -1;
    opacity: 0.6;
}

.quality-gold {
    position: relative;
}

.quality-gold::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3) 0%, rgba(255, 185, 0, 0.2) 100%);
    border-radius: inherit;
    z-index: -1;
    animation: goldGlow 2s ease-in-out infinite;
}

@keyframes goldGlow {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.7; }
}

/* ===== ПУСТОЕ СОСТОЯНИЕ ===== */
.craft-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.5);
}

.craft-empty-state i {
    font-size: 48px;
    color: rgba(0, 255, 255, 0.3);
    margin-bottom: 12px;
}

.craft-empty-state p {
    font-size: 13px;
    line-height: 1.5;
}

/* ===== КАРТОЧКИ ПРЕДМЕТОВ В КРАФТЕ ===== */
.inventory-card.selected-for-craft {
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.15) 0%, rgba(0, 200, 0, 0.1) 100%);
    border-color: rgba(0, 255, 0, 0.5);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
}

.inventory-card.selected-for-craft::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: #00ff00;
    border-radius: 50%;
    color: #000;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.6);
    z-index: 10;
}

.inventory-card.disabled {
    opacity: 0.4;
    pointer-events: none;
    cursor: not-allowed;
}

/* ===== МОДАЛЬНОЕ ОКНО ИНФОРМАЦИИ О КРАФТЕ ===== */
.craft-info-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10600;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.craft-info-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.craft-info-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
}

.craft-info-modal-content {
    position: relative;
    z-index: 1;
    background: rgba(12, 12, 22, 0.95);
    border: 2px solid rgba(0, 255, 255, 0.4);
    border-radius: 12px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6);
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.craft-info-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.05);
}

.craft-info-modal-header h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: #00ffff;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.craft-info-modal-header h4 i {
    font-size: 12px;
}

.modal-close-small {
    width: 26px;
    height: 26px;
    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 ease;
    font-size: 12px;
}

.modal-close-small:hover {
    background: rgba(255, 0, 0, 0.25);
    border-color: rgba(255, 0, 0, 0.5);
    transform: scale(1.1) rotate(90deg);
}

.craft-info-modal-body {
    padding: 14px 16px;
    max-height: 60vh;
    overflow-y: auto;
}

.craft-info-modal-body::-webkit-scrollbar {
    width: 6px;
}

.craft-info-modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.craft-info-modal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.3);
    border-radius: 3px;
}

.craft-info-section {
    margin-bottom: 14px;
}

.craft-info-section:last-child {
    margin-bottom: 0;
}

.craft-info-section-title {
    font-size: 11px;
    font-weight: 700;
    color: #00ffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.craft-info-section-title i {
    font-size: 10px;
}

.craft-info-section p {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    margin: 0;
}

.craft-info-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.craft-info-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.15);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.craft-info-item:hover {
    background: rgba(0, 255, 255, 0.08);
    border-color: rgba(0, 255, 255, 0.25);
}

.craft-info-item-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    gap: 6px;
}

.craft-info-item-label i {
    font-size: 9px;
    color: #00ffff;
    width: 14px;
    text-align: center;
}

.craft-info-item-value {
    font-size: 11px;
    font-weight: 700;
    color: #00ffff;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.5);
}

.craft-info-warning {
    padding: 8px 10px;
    background: rgba(255, 100, 0, 0.1);
    border: 1px solid rgba(255, 100, 0, 0.3);
    border-radius: 6px;
    color: #ff9944;
    font-size: 10px;
    line-height: 1.4;
    margin: 0;
}

.craft-info-modal-close {
    width: calc(100% - 32px);
    margin: 0 16px 12px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #00ffff, #0080ff);
    border: none;
    border-radius: 6px;
    color: #000000;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 
        0 4px 15px rgba(0, 255, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.craft-info-modal-close:hover {
    background: linear-gradient(135deg, #00ffff, #00b3ff);
    box-shadow: 
        0 6px 20px rgba(0, 255, 255, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.craft-info-modal-close i {
    font-size: 12px;
}
