/* 1. 整体自适应布局 */
.md-typeset table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto; /* 允许浏览器智能计算列宽 */
}

/* 2. 边框与间距（缩小左右内边距，挤出更多空间） */
.md-typeset table th,
.md-typeset table td {
    border: 1px solid var(--md-default-fg-color--lightest, #e0e0e0);
    padding: 0.5em 0.8em; /* 左右间距从 1em 缩减到 0.8em */
}

/* 3. 表头保持不换行，防止排序图标掉下去 */
.md-typeset table th {
    background-color: var(--md-default-bg-color--light, #f5f6f7);
    font-weight: bold;
    white-space: nowrap; 
}

/* 4. 精细控制每一列的内容折行规则 */

/* 第1列（Name）：强烈建议不换行，保持名字完整 */
.md-typeset table td:nth-child(1) {
    white-space: nowrap; 
}

/* 第2、3、4列（分类、语言、Stars）：允许在极端情况下换行 */
.md-typeset table td:nth-child(2),
.md-typeset table td:nth-child(3),
.md-typeset table td:nth-child(4) {
    white-space: normal; /* 解除不换行限制 */
    word-break: break-word; /* 允许像 JavaScript/Python 这样的长词换行 */
}

/* 第5列（Description）：自适应剩余所有空间 */
.md-typeset table td:nth-child(5) {
    white-space: normal; 
    line-height: 1.5;
    /* 移除了之前的 350px 限制，改为更柔和的 150px，完全交给浏览器去填满屏幕 */
    min-width: 150px; 
}