<view
    class="detail-card"
    hover-class="detail-card--active"
    hover-stay-time="100"
    bindtap="onTap"
>
    <view class="detail-card__preview" style="background-color: {{previewBg}}">
        <text class="detail-card__preview-text">{{previewText}}</text>
    </view>
    <view class="detail-card__body">
        <view class="detail-card__title">{{title}}</view>
        <view class="detail-card__meta">
            <view wx:if="{{ageRange}}" class="detail-card__badge detail-card__badge--age">{{ageRange}}</view>
            <view wx:if="{{difficulty}}" class="detail-card__badge detail-card__badge--diff">{{difficulty}}</view>
        </view>
        <view wx:if="{{downloads}}" class="detail-card__stats">{{downloads}}</view>
        <view class="detail-card__actions">
            <view class="detail-card__btn detail-card__btn--primary" catchtap="onGenerate">生成</view>
            <view class="detail-card__btn detail-card__btn--ghost" catchtap="onFav">收藏</view>
        </view>
    </view>
</view>
