/**
 * cards.css - 网页卡片样式
 */
/* 卡片展示区 */
.cards-area {
    flex: 1;
    min-width: 0;
}
.cards-grid {
    display: grid;
    /* 列宽由 JS adjustCardWidths() 动态设置为固定宽度（= 当页最宽卡片标题宽度），
       保证所有卡片等宽且标题单行不换行；未触发时回退到 minmax */
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--card-gap);
}
/* 网页卡片 */
.web-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-decoration: none;
    color: var(--text-color);
    position: relative;
    overflow: hidden;
}
.web-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}
.web-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}
.web-card:hover::before {
    transform: scaleX(1);
}
.web-card .card-name {
    font-size: calc(15px * var(--font-scale));
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 6px;
    /* 标题保持单行，宽度由最宽卡片决定（配合 JS adjustCardWidths） */
    white-space: nowrap;
    line-height: 1.4;
}
.web-card .card-category {
    font-size: calc(12px * var(--font-scale));
    color: var(--text-muted);
}
