body { font-family: 'Segoe UI', Arial, sans-serif; margin: 20px; background: #f5f7fa; }
        .container { max-width: 1200px; margin: 0 auto; background: #fff; padding: 25px; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
        h1, h2 { color: #2a3f5e; }
        .form-group { margin-bottom: 20px; }
        label { font-weight: 600; display: block; margin-bottom: 5px; }
        input[type="text"] { width: 100%; padding: 10px; border: 1px solid #ccd7e4; border-radius: 5px; font-size: 14px; box-sizing: border-box; }
        button { background: #2a6e9b; color: white; border: none; padding: 12px 30px; border-radius: 5px; font-size: 16px; cursor: pointer; }
        button:hover { background: #1e4f73; }
        .error { background: #f8d7da; color: #721c24; padding: 12px; border-radius: 5px; margin: 20px 0; }
        .info-section { background: #f8fafc; border: 1px solid #e1e8f0; border-radius: 8px; padding: 20px; margin-top: 25px; }
        .avatar { width: 120px; border-radius: 50%; border: 3px solid #2a6e9b; }
        .profile-header { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
        .badge { background: #2a6e9b; color: white; padding: 3px 8px; border-radius: 12px; font-size: 12px; display: inline-block; margin: 2px; }
        .games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; margin-top: 10px; }
        .game-item { background: white; border: 1px solid #e1e8f0; border-radius: 6px; padding: 10px; text-align: center; }
        .game-item img { width: 60px; height: 60px; border-radius: 10px; }
        .game-name { font-weight: 600; margin: 5px 0; font-size: 13px; }
        .game-hours { color: #5a6f7d; font-size: 12px; }
        .friends-list { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 15px; }
        .friend-card {  text-align: center; background: white; border: 1px solid #e1e8f0; border-radius: 6px; padding: 10px; }
        .friend-card img { width: 64px; height: 64px; border-radius: 50%; }
        .friend-name { font-size: 13px; font-weight: 600; margin-top: 5px; word-break: break-word; }
        hr { border: 0; border-top: 1px solid #d9e2ef; margin: 25px 0; }
        .note { font-size: 13px; color: #6b7a8a; background: #f0f4f9; padding: 10px; border-radius: 5px; }

        .recent-list { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 20px; }
        .recent-item { width: 160px; text-align: center; background: white; border: 1px solid #e1e8f0; border-radius: 8px; padding: 15px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
        .recent-item img { width: 80px; height: 80px; border-radius: 50%; }
        .recent-item .name { font-weight: 600; margin: 8px 0 4px; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .recent-item .time { font-size: 12px; color: #6b7a8a; }
        .recent-item .steamid { font-size: 11px; color: #8e9eb0; word-break: break-all; }
        .recent-item a { display: inline-block; margin-top: 8px; background: #2a6e9b; color: white; text-decoration: none; padding: 5px 12px; border-radius: 20px; font-size: 12px; }
        .recent-item a:hover { background: #1e4f73; }

        /* 库存网格样式（用于模态框） */
        .inventory-grid { 
            display: grid; 
            grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); 
            gap: 15px; 
            margin-top: 15px; 
            max-height: 600px; 
            overflow-y: auto; 
            padding: 10px; 
            background: #f8fafc; 
            border-radius: 8px; 
        }
        .inventory-item { 
            border-radius: 8px; 
            padding: 10px; 
            display: flex; 
            gap: 10px; 
            transition: transform 0.2s, box-shadow 0.2s; 
            position: relative;
            cursor: pointer;
            border: 1px solid rgba(0,0,0,0.1);
        }
        .inventory-item:hover { 
            transform: translateY(-2px); 
            box-shadow: 0 4px 8px rgba(0,0,0,0.2); 
        }
        .item-icon-container { 
            position: relative; 
            width: 60px; 
            height: 60px; 
            flex-shrink: 0; 
        }
        .item-icon { 
            width: 60px; 
            height: 60px; 
            border-radius: 8px; 
            object-fit: contain; 
        }
        .item-amount { 
            position: absolute; 
            bottom: -5px; 
            right: -5px; 
            background: #2a6e9b; 
            color: white; 
            border-radius: 12px; 
            padding: 2px 6px; 
            font-size: 11px; 
            font-weight: bold; 
            min-width: 20px; 
            text-align: center; 
        }
        .item-info { 
            flex: 1; 
            min-width: 0; 
        }
        .item-name { 
            font-weight: 600; 
            font-size: 13px; 
            margin-bottom: 4px; 
            color: inherit; 
            word-break: break-word; 
        }
        .item-type { 
            font-size: 11px; 
            padding: 2px 6px; 
            border-radius: 10px; 
            display: inline-block; 
            margin-bottom: 4px; 
            background: rgba(255,255,255,0.3);
        }
        .item-type.tradable { 
            background: #d4edda; 
            color: #155724; 
        }
        .item-type.non-tradable { 
            background: #f8d7da; 
            color: #721c24; 
        }
        .item-price {
            font-size: 12px;
            font-weight: bold;
            color: inherit;
            margin-top: 5px;
        }
        .error-message { 
            background: #f8d7da; 
            color: #721c24; 
            padding: 10px; 
            border-radius: 5px; 
            margin: 10px 0; 
        }

        /* 品质背景色 - 物品卡片 */
        .inventory-item.quality-违禁 { background: #E33E3E; color: white; }
        .inventory-item.quality-隐秘级 { background: #C93E3E; color: white; }
        .inventory-item.quality-保密级 { background: #A825B8; color: white; }
        .inventory-item.quality-受限级 { background: #6A2EE0; color: white; }
        .inventory-item.quality-军规级 { background: #2A4CFF; color: white; }
        .inventory-item.quality-工业级 { background: #3B7ABF; color: white; }
        .inventory-item.quality-普通 { background: #7f8c8d; color: white; }
        .inventory-item.quality-非凡 { background: #E6B800; color: white; }
        .inventory-item.quality-大师 { background: #eb4b4b; color: white; }
        .inventory-item.quality-卓越 { background: #8847ff; color: white; }
        .inventory-item.quality-奇异 { background: #d32ce6; color: white; }
        .inventory-item.quality-消费级 { background: #b0c3d9; color: #155724; }
        .inventory-item.quality-普通级 { background: #dde7f2; color: #155724; }
        .inventory-item.quality-高级 { background: #4b69ff; color: white; }

        /* 品质背景色 - 模态框（物品详情弹窗） */
        .modal-content.quality-违禁 { background: #E33E3E; color: white; }
        .modal-content.quality-隐秘级 { background: #C93E3E; color: white; }
        .modal-content.quality-保密级 { background: #A825B8; color: white; }
        .modal-content.quality-受限级 { background: #6A2EE0; color: white; }
        .modal-content.quality-军规级 { background: #2A4CFF; color: white; }
        .modal-content.quality-工业级 { background: #3B7ABF; color: white; }
        .modal-content.quality-普通 { background: #7f8c8d; color: white; }
        .modal-content.quality-非凡 { background: #E6B800; color: white; }
        .modal-content.quality-大师 { background: #eb4b4b; color: white; }
        .modal-content.quality-卓越 { background: #8847ff; color: white; }
        .modal-content.quality-奇异 { background: #d32ce6; color: white; }
        .modal-content.quality-消费级 { background: #d32ce6; color: #155724; }
        .modal-content.quality-普通级 { background: #d32ce6; color: #155724; }
        .modal-content.quality-高级 { background: #4b69ff; color: white; }
        
        /* 分类筛选按钮样式 */
        .filter-buttons {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-bottom: 15px;
        }
        .filter-btn {
            padding: 5px 12px;
            border: 1px solid #ccc;
            border-radius: 20px;
            background: #f0f0f0;
            cursor: pointer;
            font-size: 13px;
            transition: all 0.2s;
            color: unset;
        }
        .filter-btn.active {
            background: #2a6e9b;
            color: white;
            border-color: #1e4f73;
        }
        .filter-btn:hover {
            background: #ddd;
        }
        .filter-btn.active:hover {
            background: #1e4f73;
        }

        /* 模态框样式（全屏背包） */
        #inventory-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,0.8);
            z-index: 10000;
            overflow-y: auto;
            padding: 20px;
            box-sizing: border-box;
        }
        #inventory-modal .modal-content {
            background: #fff;
            max-width: 1200px;
            margin: 40px auto;
            border-radius: 10px;
            padding: 20px;
            position: relative;
            max-height: 90vh;
            overflow-y: auto;
        }
        #inventory-modal .close {
            position: absolute;
            top: 10px;
            right: 20px;
            font-size: 28px;
            font-weight: bold;
            color: #aaa;
            cursor: pointer;
        }
        #inventory-modal .close:hover {
            color: black;
        }

        /* 物品详情弹窗样式（原有） */
        .modal {
            display: none;
            position: fixed;
            z-index: 10001;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            overflow: auto;
            background-color: rgba(0,0,0,0.5);
        }
        .modal .modal-content {
            margin: 5% auto;
            padding: 20px;
            border: 1px solid #888;
            border-radius: 10px;
            width: 500px;
            max-width: 90%;
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
            text-align: center;
            transition: background-color 0.2s;
        }
        .modal .close {
            color: #aaa;
            float: right;
            font-size: 28px;
            font-weight: bold;
            cursor: pointer;
        }
        .modal .close:hover {
            color: black;
        }
        .modal-img {
            width: 200px;
            height: 200px;
            object-fit: contain;
            margin: 10px 0;
            border-radius: 10px;
        }
        .modal-info {
            margin: 10px 0;
            font-size: 14px;
            text-align: left;
            color: inherit;
        }
        .modal-info p {
            margin: 8px 0;
        }
        .modal-info small {
            font-size: 12px;
            opacity: 0.9;
        }
        .platform-list {
            margin-top: 15px;
            border-top: 1px solid rgba(255,255,255,0.3);
            padding-top: 10px;
        }
        .platform-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 8px 0;
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }
        .platform-item:last-child {
            border-bottom: none;
        }
        .platform-name {
            font-weight: bold;
            min-width: 60px;
        }
        .platform-price {
            font-size: 14px;
            flex: 1;
            text-align: right;
            margin-right: 10px;
        }
        .platform-link {
            background-color: rgba(255,255,255,0.2);
            padding: 4px 12px;
            border-radius: 20px;
            color: white;
            text-decoration: none;
            font-size: 12px;
            transition: background-color 0.2s;
        }
        .platform-link:hover {
            background-color: rgba(255,255,255,0.3);
        }
        .inspect-btn {
            display: inline-block;
            margin-top: 10px;
            padding: 10px 20px;
            background-color: #2a6e9b;
            color: white;
            text-decoration: none;
            border-radius: 5px;
            font-weight: bold;
            border: none;
        }
        .inspect-btn:hover {
            background-color: #1e4f73;
        }

        /* 加载遮罩 */
        #loading-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.7);
            z-index: 9999;
            display: none;
            justify-content: center;
            align-items: center;
            color: white;
            font-size: 24px;
            font-weight: bold;
            flex-direction: column;
        }
        #loading-overlay .spinner {
            border: 8px solid #f3f3f3;
            border-top: 8px solid #2a6e9b;
            border-radius: 50%;
            width: 60px;
            height: 60px;
            animation: spin 2s linear infinite;
            margin-bottom: 20px;
        }
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        @media (max-width: 768px) {
            .inventory-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
            .inventory-item { flex-direction: column; align-items: center; text-align: center; }
            .item-icon-container { margin-bottom: 5px; }
        }