.inventory-panel {
    background: rgba(20, 20, 25, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.inventory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.inventory-title {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.inventory-capacity {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 12px;
}

.inventory-capacity.full {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.equipped-section {
    margin-bottom: 16px;
}

.equipped-title {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.equipped-slots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.equipped-slot {
    background: rgba(30, 30, 35, 0.6);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.equipped-slot.filled {
    border-style: solid;
    border-color: rgba(139, 92, 246, 0.3);
    background: rgba(139, 92, 246, 0.08);
    cursor: pointer;
}

.equipped-slot.filled:hover {
    border-color: rgba(139, 92, 246, 0.5);
}

.equipped-slot-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.equipped-slot-empty {
    font-size: 20px;
    opacity: 0.3;
}

.equipped-item-name {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
}

.equipped-item-effect {
    font-size: 10px;
    color: #4ade80;
    margin-top: 2px;
}

.inventory-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 12px;
}

.inventory-tab {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 8px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
}

.inventory-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.inventory-tab.active {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.4);
    color: #a78bfa;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 4px;
}

.inventory-grid::-webkit-scrollbar {
    width: 4px;
}

.inventory-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.inventory-grid::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 2px;
}

.item-card {
    background: rgba(30, 30, 35, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.item-card:hover {
    background: rgba(40, 40, 50, 0.9);
    border-color: rgba(139, 92, 246, 0.3);
}

.item-card.selected {
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.15);
}

.item-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}

.item-name {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.item-type-badge {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.item-type-gear {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

.item-type-consumable {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.item-type-tool {
    background: rgba(96, 165, 250, 0.2);
    color: #93c5fd;
}

.item-type-weapon {
    background: rgba(249, 115, 22, 0.2);
    color: #fb923c;
}

.item-effect {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 4px;
}

.item-durability {
    font-size: 10px;
    color: #60a5fa;
    margin-top: 4px;
}

.item-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.item-action-btn {
    flex: 1;
    padding: 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.item-action-btn.use {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.item-action-btn.use:hover {
    background: rgba(34, 197, 94, 0.4);
}

.item-action-btn.equip {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

.item-action-btn.equip:hover {
    background: rgba(139, 92, 246, 0.4);
}

.item-action-btn.unequip {
    background: rgba(250, 204, 21, 0.2);
    color: #fcd34d;
}

.item-action-btn.unequip:hover {
    background: rgba(250, 204, 21, 0.4);
}

.item-action-btn.sell {
    background: rgba(249, 115, 22, 0.2);
    color: #fb923c;
}

.item-action-btn.sell:hover {
    background: rgba(249, 115, 22, 0.4);
}

.item-action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.shop-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.shop-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.shop-money {
    font-size: 12px;
    color: #4ade80;
    background: rgba(34, 197, 94, 0.15);
    padding: 4px 10px;
    border-radius: 12px;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    max-height: 250px;
    overflow-y: auto;
}

.shop-item-card {
    background: rgba(30, 30, 35, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 12px;
    transition: all 0.2s ease;
}

.shop-item-card:hover {
    background: rgba(40, 40, 50, 0.9);
    border-color: rgba(34, 197, 94, 0.3);
}

.shop-item-card.cannot-afford {
    opacity: 0.6;
}

.shop-item-name {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.shop-item-price {
    font-size: 14px;
    font-weight: 700;
    color: #4ade80;
    margin-bottom: 6px;
}

.shop-item-price.expensive {
    color: #f87171;
}

.shop-item-effect {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
}

.shop-price-note {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
    margin-bottom: 8px;
}

.shop-buy-btn {
    width: 100%;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.8), rgba(22, 163, 74, 0.8));
    border: none;
    border-radius: 6px;
    padding: 8px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shop-buy-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(34, 197, 94, 1), rgba(22, 163, 74, 1));
}

.shop-buy-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.inventory-empty {
    text-align: center;
    padding: 30px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
    grid-column: 1 / -1;
}

.empty-icon {
    font-size: 32px;
    margin-bottom: 8px;
    opacity: 0.5;
}

.empty-title {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 4px;
}

.empty-hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.inventory-loading {
    text-align: center;
    padding: 30px;
    color: rgba(255, 255, 255, 0.5);
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.item-badges {
    display: flex;
    gap: 6px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.item-equipped-badge {
    font-size: 9px;
    font-weight: 600;
    background: rgba(139, 92, 246, 0.25);
    color: #a78bfa;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.item-quantity-badge {
    font-size: 9px;
    font-weight: 700;
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    padding: 2px 6px;
    border-radius: 4px;
}

.item-card.is-equipped {
    border-color: rgba(139, 92, 246, 0.3);
    background: rgba(139, 92, 246, 0.08);
}

.item-description {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    margin: 6px 0;
    line-height: 1.4;
}

.item-compare {
    font-size: 10px;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.item-durability {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
}

.item-durability.good {
    color: #4ade80;
}

.item-durability.low {
    color: #fbbf24;
}

.item-durability.critical {
    color: #f87171;
}

.shop-filters {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.shop-filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: capitalize;
}

.shop-filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.shop-filter-btn.active {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.4);
    color: #a78bfa;
}

.shop-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.shop-prices {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.shop-buy-price {
    font-size: 13px;
    font-weight: 700;
    color: #4ade80;
}

.shop-buy-price.expensive {
    color: #f87171;
}

.shop-sell-price {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

.shop-item-desc {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
    margin-bottom: 6px;
    line-height: 1.3;
}

.shop-item-status {
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.shop-item-status.warning {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.shop-item-status.info {
    background: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
}

.shop-buy-btn.cannot-afford {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.shop-buy-btn.inventory-full {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

@media (max-width: 480px) {
    .inventory-panel {
        padding: 12px;
    }
    
    .equipped-slots {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    
    .equipped-slot {
        padding: 8px;
        min-height: 60px;
    }
    
    .inventory-grid,
    .shop-grid {
        grid-template-columns: 1fr;
    }
    
    .item-card,
    .shop-item-card {
        padding: 10px;
    }
}
