.category-cards {
    margin-bottom: 30px;
}

.category-cards__grid {
    display: grid;
    gap: 20px;
}

.category-cards__grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.category-cards__grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.category-cards__grid--cols-4 { grid-template-columns: repeat(4, 1fr); }
.category-cards__grid--cols-5 { grid-template-columns: repeat(5, 1fr); }
.category-cards__grid--cols-6 { grid-template-columns: repeat(6, 1fr); }

.category-cards__item {
    display: flex;
    align-items: center;
    background-color: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--border-radius);
    padding: 20px;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.category-cards__item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.06);
    border-color: var(--theme-color);
}

.category-cards__item:hover .category-cards__icon-wrap {
    transform: scale(1.15) rotate(-5deg);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.category-cards__icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-sm);
    background-color: transparent; /* 默认背景色透明 */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 15px;
    color: var(--theme-color); /* 默认图标颜色 */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.category-cards__icon {
    font-size: 20px;
    width: 20px;
    height: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    fill: currentColor;
}

.category-cards__icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.category-cards__custom-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: block;
}

.category-cards__info {
    flex: 1;
    min-width: 0;
}

.category-cards__name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

.category-cards__item:hover .category-cards__name {
    color: var(--theme-color);
}

.category-cards__count {
    font-size: 0.85rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-cards__count--hot {
    color: #ff5722; /* 橙红色 */
}

/* 深色模式下适当提亮热门颜色 */
html[data-theme="dark"] .category-cards__count--hot {
    color: #ff784e;
}

.category-cards__count--normal {
    color: var(--text-muted);
}

.category-cards__arrow {
    width: 26px;
    height: 26px;
    opacity: 0;
    transform: translateX(-15px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 10px;
}

.category-cards__item:hover .category-cards__arrow {
    opacity: 1;
    transform: translateX(0);
}

.category-cards__arrow img {
    width: 100%;
    height: 100%;
    display: block;
}

@media (max-width: 1200px) {
    .category-cards__grid--cols-6,
    .category-cards__grid--cols-5 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .category-cards__grid--cols-6,
    .category-cards__grid--cols-5,
    .category-cards__grid--cols-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .category-cards__grid--cols-6,
    .category-cards__grid--cols-5,
    .category-cards__grid--cols-4,
    .category-cards__grid--cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    .category-cards__item {
        padding: 15px;
    }
    .category-cards__name {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .category-cards__grid--cols-6,
    .category-cards__grid--cols-5,
    .category-cards__grid--cols-4,
    .category-cards__grid--cols-3,
    .category-cards__grid--cols-2 {
        grid-template-columns: 1fr;
    }
}
