/* ==========================================================================
   新派网络 · 内容组件（软件卡片 / 徽章 / 空状态）
   依赖：tokens.css、common.css
   卡片范式：App Store 图标行卡 — 信息密度优先，无杂色截图污染
   ========================================================================== */

/* --------------------------------------------------------------------------
   软件卡片（图标行卡）
   结构：
   ┌─────────────────────────────────┐
   │ [icon] 标题            免费/价格 │
   │        描述两行截断…              │
   │        [tag] [tag]    ♥ 1.2k ↓  │
   └─────────────────────────────────┘
   -------------------------------------------------------------------------- */

.software-card {
    display: block;
    height: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    transition: border-color var(--duration-fast) var(--ease),
        box-shadow var(--duration-normal) var(--ease),
        transform var(--duration-normal) var(--ease);
    position: relative;
}

.software-card:hover,
.software-card:focus-visible {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    color: inherit;
    text-decoration: none;
}

.card-body-row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

/* 应用图标：hover 联动放大 */
.software-icon {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    object-fit: cover;
    background: var(--gray-100);
    border: 1px solid var(--border-default);
    transition: transform var(--duration-normal) var(--ease);
}

.software-card:hover .software-icon {
    transform: scale(1.06);
}

.card-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.card-title-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.software-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.software-card:hover .software-title {
    color: var(--primary);
}

/* 价格语义：免费 = 绿色实心胶囊（醒目抢眼）；付费 = 深墨粗体（钱是信息不是错误） */
.price-badge {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    padding: 5px 11px;
    border-radius: var(--radius-full);
    color: #fff;
    white-space: nowrap;
    letter-spacing: .02em;
    background: linear-gradient(135deg, #00C077 0%, var(--success) 55%, #00905E 100%);
    box-shadow: 0 2px 8px rgba(0, 168, 112, .38), inset 0 1px 0 rgba(255, 255, 255, .28);
    text-shadow: 0 1px 1px rgba(0, 0, 0, .12);
}

.software-card:hover .price-badge:not(.price-paid) {
    box-shadow: 0 3px 12px rgba(0, 168, 112, .52), inset 0 1px 0 rgba(255, 255, 255, .32);
}

.price-badge.price-paid {
    background: none;
    padding: 0;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: normal;
    box-shadow: none;
    text-shadow: none;
}

.software-description {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 2px;
}

.software-tags {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    flex-wrap: nowrap;
}

.software-tag {
    flex-shrink: 0;
    font-size: 12px;
    line-height: 1;
    padding: 5px 10px;
    border-radius: var(--radius-full);
    background: var(--gray-100);
    color: var(--gray-600);
    font-weight: 500;
    white-space: nowrap;
}

/* 平台图标徽章（单色，不做彩色平台识别） */
.platform-tag {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    background: var(--gray-100);
    color: var(--gray-500);
    font-size: 11px;
}


/* --------------------------------------------------------------------------
   空状态
   -------------------------------------------------------------------------- */

.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: var(--bg-card);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
}

.empty-state .empty-icon {
    font-size: 40px;
    color: var(--gray-300);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* --------------------------------------------------------------------------
   面板（详情页信息块 / 表单卡通用）
   -------------------------------------------------------------------------- */

.panel {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.panel-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-title i {
    color: var(--primary);
    font-size: 14px;
}

/* --------------------------------------------------------------------------
   兼容：旧类名 → 新样式（历史模板过渡期）
   -------------------------------------------------------------------------- */

.software-image,
.software-info,
.software-actions,
.software-price {
    /* 旧截图卡结构已废弃；保留类名防报错，无视觉输出 */
    all: unset;
    display: contents;
}

.trust-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    text-align: center;
    height: 100%;
    transition: border-color var(--duration-fast) var(--ease),
        box-shadow var(--duration-normal) var(--ease);
}

.trust-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
}

.trust-card i {
    font-size: 20px;
    color: var(--primary);
    margin-bottom: 8px;
}

.trust-card h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.trust-card p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    white-space: nowrap;
}

/* ===== 会员入口按钮（navbar 右侧） ===== */
.member-entry-wrap {
    display: flex;
    align-items: center;
}

.member-entry-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--border-color, #d9dee7);
    background: rgba(255, 255, 255, 0.85);
    color: var(--text-primary, #1f2937);
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.member-entry-btn:hover,
.member-entry-btn:focus {
    border-color: var(--primary, #2563eb);
    color: var(--primary, #2563eb);
    background: rgba(37, 99, 235, 0.06);
    text-decoration: none;
    outline: none;
}

.member-entry-btn .member-entry-icon {
    font-size: 16px;
    color: var(--primary, #2563eb);
}

.member-entry-btn .member-entry-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.member-entry-btn.is-logged {
    border-color: rgba(37, 99, 235, 0.35);
    background: rgba(37, 99, 235, 0.06);
    color: var(--primary, #2563eb);
}

/* 移动端折叠菜单内自适应宽度 */
@media (max-width: 991.98px) {
    .member-entry-wrap {
        width: 100%;
    }

    .member-entry-btn {
        width: 100%;
        justify-content: center;
        padding: 10px 14px;
    }
}
