/* 软件列表（Layui 栅格：md 一行 4、sm 一行 2、xs 一行 1） */
.soft-list-row { margin-bottom: 0; }
.soft-card {
    background: #fff;
    border: var(--surface-border);
    border-radius: 3px;
    overflow: hidden;
    box-shadow: var(--surface-shadow);
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 0;
}
/* 列表缩略图固定画幅 280×200，fill 铺满画幅（窄屏不超过列宽） */
.soft-card-thumb-wrap {
    width: 280px;
    max-width: 100%;
    height: 200px;
    margin: 0 auto;
    flex-shrink: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    overflow: hidden;
}
.soft-card-thumb-link {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}
.soft-card .thumb {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: fill;
    object-position: center;
    flex-shrink: 0;
}
.soft-card .thumb.thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    object-fit: none;
}
.soft-card .thumb.thumb-empty .layui-icon {
    font-size: 40px;
    color: #ddd;
}
.soft-card .info { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.soft-card .info h3 { font-size: 18px; margin: 0 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; flex-shrink: 0; font-weight: 500; }
.soft-card .info h3 a { color: #1989fa; text-decoration: none; font-weight: 600; }
.soft-card .info h3 a:hover { color: #0b6bcb; }
/* 描述固定占两行高度，不足两行也对齐 */
.soft-card .meta {
    color: #333;
    font-size: 15px;
    line-height: 1.55;
    min-height: 3em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    word-break: break-word;
    text-align: left;
}

/* 软件详情页（与在线工具详情统一：白卡片、3px 圆角、#1989fa、.tool-ip-back） */
.soft-detail-page {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0 0 40px;
    box-sizing: border-box;
}
.soft-detail-hero {
    position: relative;
    background: #fff;
    border: var(--surface-border);
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 6px 20px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    margin-bottom: 16px;
}
.soft-detail-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    opacity: 0.5;
    background: url(/static/soft/banner-bg.svg) center 0 no-repeat;
    pointer-events: none;
}
.soft-detail-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 24px;
    padding: 20px 22px;
    flex-wrap: wrap;
    align-items: flex-start;
}
.soft-detail-hero-thumb {
    width: 200px;
    height: 130px;
    border-radius: 3px;
    object-fit: cover;
    flex-shrink: 0;
    background: #fff;
    border: var(--surface-border);
    box-shadow: var(--surface-shadow);
}
.soft-detail-hero-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
}
.soft-detail-hero-main {
    flex: 1;
    min-width: 0;
}
.soft-detail-hero-main .tool-detail-page-h1 {
    margin: 0 0 10px;
    padding-left: 14px;
    margin-left: -4px;
    border-left: 4px solid #1989fa;
    font-size: 22px;
    font-weight: 700;
    color: #1e3a5f;
    letter-spacing: -0.02em;
    line-height: 1.3;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.soft-detail-hero-desc {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 12px;
    line-height: 1.65;
}
.soft-detail-hero-meta {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 16px;
}
.soft-detail-hero-meta i { margin-right: 4px; }
.soft-detail-hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.soft-detail-hero-actions .layui-btn { border-radius: 3px; }

/* 软件详情 - 主体布局 */
.soft-detail-body,
.soft-body { display: flex; gap: 20px; }
.soft-main { flex: 1; min-width: 0; }
.soft-sidebar { width: 300px; flex-shrink: 0; }

/* 软件详情 - 内容区块（与 .tool-time-h3 区块线一致） */
.soft-section {
    background: #fff;
    border-radius: 3px;
    padding: 20px 22px 22px;
    border: var(--surface-border);
    box-shadow: var(--surface-shadow);
    margin-bottom: 16px;
}
.soft-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #334155;
    margin: 0 0 16px;
    padding: 0 0 8px;
    border-bottom: 1px solid #e2e8f0;
    display: block;
}
.soft-content { font-size: 15px; line-height: 1.9; color: #475569; }
.soft-content img { max-width: 100%; border-radius: 3px; margin: 10px 0; }
.soft-content p { margin: 0 0 15px; }

/* 软件详情 - 侧边栏组件 */
.soft-widget {
    background: #fff;
    border-radius: 3px;
    padding: 18px 20px;
    border: var(--surface-border);
    box-shadow: var(--surface-shadow);
    margin-bottom: 16px;
}
.soft-widget-title {
    font-size: 15px;
    font-weight: 600;
    color: #334155;
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

/* 软件信息列表 */
.soft-info-list { list-style: none; margin: 0; padding: 0; }
.soft-info-list li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed #f0f0f0; }
.soft-info-list li:last-child { border-bottom: none; }
.soft-info-list li span { color: #999; font-size: 14px; }
.soft-info-list li strong { color: #333; font-size: 14px; font-weight: 500; }

/* 更新日志 */
.soft-changelog { max-height: 400px; overflow-y: auto; }
.changelog-item { padding: 12px 0; border-bottom: 1px solid #f5f5f5; }
.changelog-item:last-child { border-bottom: none; }
.changelog-date { font-size: 14px; color: #1989fa; font-weight: 500; margin-bottom: 6px; display: flex; align-items: center; gap: 10px; }
.changelog-ver { background: #f0f0f0; color: #666; font-size: 12px; padding: 2px 8px; border-radius: 6px; font-weight: normal; }
.changelog-content { font-size: 13px; color: #666; line-height: 1.7; }

/* 热门软件列表 */
.soft-hot-list { }
.soft-hot-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f5f5f5; text-decoration: none; transition: all .2s; }
.soft-hot-item:last-child { border-bottom: none; }
.soft-hot-item:hover { background: #fafafa; margin: 0 -10px; padding: 12px 10px; border-radius: 4px; }
.soft-hot-item img { width: 60px; height: 60px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.soft-hot-thumb-empty { width: 60px; height: 60px; border-radius: 6px; background: #f5f5f5; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.soft-hot-thumb-empty i { font-size: 24px; color: #ddd; }
.soft-hot-info { flex: 1; min-width: 0; }
.soft-hot-info h5 { font-size: 14px; color: #333; margin: 0 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.soft-hot-info p { font-size: 12px; color: #999; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 购买弹窗样式 */
.buy-modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 9999; }
.buy-modal-content { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #fff; border-radius: 8px; width: 420px; max-width: 90%; box-shadow: 0 10px 40px rgba(0,0,0,0.2); }
.buy-modal-header { padding: 20px 24px; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; }
.buy-modal-header h3 { margin: 0; font-size: 18px; }
.buy-modal-close { cursor: pointer; font-size: 24px; color: #999; line-height: 1; }
.buy-modal-close:hover { color: #333; }
.buy-modal-body { padding: 24px; }
.buy-form-body-wide { display: flex; flex-wrap: wrap; gap: 28px 40px; align-items: flex-start; }
.buy-form-body-wide > .buy-form-col-main,
.buy-form-body-wide > .buy-form-col-side { flex: 1 1 320px; min-width: 0; box-sizing: border-box; }
.buy-form-col-main .pay-method { margin-top: 20px; }
.buy-form-col-side .buy-account-email { margin-top: 0; }
.buy-form-col-side .buy-remark { margin-top: 16px; }
.buy-options { display: flex; flex-direction: row; flex-wrap: wrap; gap: 12px; align-items: stretch; }
.buy-option { display: flex; align-items: center; padding: 16px; border: 2px solid #e8e8e8; border-radius: 6px; margin-bottom: 0; flex: 1 1 0; min-width: 140px; cursor: pointer; transition: all 0.2s; box-sizing: border-box; }
.buy-option:hover { border-color: #667eea; }
.buy-option.active { border-color: #667eea; background: #f8f7ff; }
.buy-option input { display: none; }
.buy-option-radio { width: 20px; height: 20px; border: 2px solid #d9d9d9; border-radius: 50%; margin-right: 12px; position: relative; flex-shrink: 0; }
.buy-option.active .buy-option-radio { border-color: #667eea; }
.buy-option.active .buy-option-radio::after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 10px; height: 10px; background: #667eea; border-radius: 50%; }
.buy-option-info { flex: 1; }
.buy-option-name { font-size: 16px; font-weight: 500; color: #333; }
.buy-option-price { font-size: 20px; font-weight: bold; color: #ff5722; margin-top: 4px; }
.pay-method { margin-top: 20px; }
.pay-method-title { font-size: 14px; color: #666; margin-bottom: 12px; }
.buy-pay-other-tip { margin: 14px 0 0; font-size: 13px; color: #888; line-height: 1.5; display: flex; align-items: center; gap: 6px; }
.buy-pay-other-tip .layui-icon { font-size: 16px; color: #ff9800; flex-shrink: 0; }
.pay-method-list { display: flex; flex-wrap: wrap; gap: 12px; }
.pay-method-item { flex: 1; min-width: 100px; padding: 14px; border: 2px solid #e8e8e8; border-radius: 6px; text-align: center; cursor: pointer; transition: all 0.2s; box-sizing: border-box; }
.pay-method-item:hover { border-color: #667eea; }
.pay-method-item.active { border-color: #667eea; background: #f8f7ff; }
.pay-method-item i { font-size: 28px; display: block; margin-bottom: 6px; }
.pay-method-item.alipay img { width: 28px; height: 28px; display: block; margin: 0 auto 6px; }
.pay-method-item.balance i { color: #faad14; }
.pay-method-item span { font-size: 13px; color: #666; }
.buy-remark { margin-top: 20px; }
.buy-remark textarea { width: 100%; border: 1px solid #e8e8e8; border-radius: 4px; padding: 10px 12px; font-size: 14px; resize: none; height: 60px; box-sizing: border-box; }
.buy-remark textarea:focus { outline: none; border-color: #667eea; }
.buy-modal-footer { padding: 16px 24px; border-top: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; }
.buy-total { font-size: 14px; color: #666; }
.buy-total strong { font-size: 24px; color: #ff5722; }
.buy-submit { padding: 12px 36px; background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; border: none; border-radius: 6px; font-size: 16px; cursor: pointer; transition: all 0.2s; }
.buy-submit:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(102,126,234,0.4); }
.buy-submit:disabled { background: #d9d9d9; cursor: not-allowed; transform: none; box-shadow: none; }
.user-balance { font-size: 12px; color: #999; margin-top: 4px; }

/* 购买独立页 /soft/buy/{id} */
.buy-page { max-width: 1100px; margin: 24px auto; padding: 0 20px 48px; width: 100%; box-sizing: border-box; }
.buy-page-head { margin-bottom: 16px; }
.buy-page-head a { color: #666; text-decoration: none; font-size: 14px; }
.buy-page-head a:hover { color: #667eea; }
.buy-page-card { background: #fff; border-radius: 8px; box-shadow: 0 4px 24px rgba(0,0,0,0.05); overflow: hidden; }
.buy-page .buy-modal-header { padding: 22px 36px; }
.buy-page .buy-modal-body { padding: 32px 36px; }
.buy-page .buy-modal-footer { padding: 20px 36px; flex-wrap: wrap; gap: 16px; }
.buy-page-login-tip { padding: 40px 24px; text-align: center; }
.buy-page-login-tip p { margin: 0 0 20px; color: #666; }
.buy-page-back-link { display: inline-block; margin-top: 16px; color: #667eea; text-decoration: none; font-size: 14px; }
.buy-page-back-link:hover { text-decoration: underline; }

.buy-soft-form { margin: 0; }
.buy-required-mark { color: #e53935; text-decoration: none; font-weight: normal; font-style: normal; border: none; cursor: help; }
.buy-account-email { margin-top: 8px; margin-bottom: 4px; }
.buy-account-email-label { display: block; font-size: 14px; color: #666; margin-bottom: 8px; }
.buy-account-email-input { width: 100%; border: 1px solid #e8e8e8; border-radius: 6px; padding: 12px 14px; font-size: 15px; box-sizing: border-box; }
.buy-account-email-input:focus { outline: none; border-color: #667eea; }
.buy-account-email-hint { margin: 12px 0 0; padding: 14px 16px; font-size: 14px; color: #333; line-height: 1.75; background: linear-gradient(135deg, #f5f9ff 0%, #eef4ff 100%); border: 1px solid #c5d9f5; border-radius: 6px; box-shadow: 0 1px 3px rgba(64, 120, 200, 0.12); }
.buy-account-email-hint strong { color: #1565c0; font-weight: 600; }

.buy-paid-page { max-width: 1100px; }
.buy-paid-card { padding: 32px 28px 28px; text-align: center; }
.buy-paid-icon { font-size: 88px; line-height: 1; color: #4caf50; margin-bottom: 16px; }
.buy-paid-icon .layui-icon { font-size: inherit; }
.buy-paid-title { margin: 0 0 8px; font-size: 22px; color: #333; }
.buy-paid-order { margin: 0 0 20px; font-size: 13px; color: #999; }
.buy-paid-notice { text-align: left; background: #f8f9fa; border-radius: 6px; padding: 22px 20px; margin-bottom: 20px; font-size: 18px; color: #444; line-height: 1.75; }
.buy-paid-notice-strong { background: #fff8e6; border: 1px solid #ffe0a3; }
.buy-paid-notice p { margin: 0 0 12px; }
.buy-paid-notice p:last-child { margin-bottom: 0; }
.buy-paid-credentials { font-size: 18px; }
.buy-paid-credentials span { color: #888; margin-right: 8px; }
.buy-paid-credentials strong { color: #222; font-size: 24px; font-weight: 600; letter-spacing: 0.5px; word-break: break-all; }
.buy-paid-warn { font-size: 15px !important; color: #e65100 !important; margin-top: 14px !important; line-height: 1.6 !important; }
.buy-paid-auto-login { font-size: 15px !important; color: #2e7d32 !important; margin-top: 12px !important; margin-bottom: 0 !important; line-height: 1.6 !important; }
.buy-paid-tip { font-size: 16px; color: #555; margin: 0; line-height: 1.65; }
.buy-paid-actions { margin-top: 8px; }

/* 响应式适配 */
@media (max-width: 900px) {
    .buy-form-body-wide { flex-direction: column; gap: 24px; }
    .buy-form-body-wide > .buy-form-col-main,
    .buy-form-body-wide > .buy-form-col-side { flex: 1 1 auto; width: 100%; max-width: 100%; }
    .buy-page .buy-modal-header,
    .buy-page .buy-modal-body,
    .buy-page .buy-modal-footer { padding-left: 20px; padding-right: 20px; }
    .buy-page .buy-modal-body { padding-top: 24px; padding-bottom: 24px; }
}
@media (max-width: 768px) {
    .soft-detail-hero-inner { flex-direction: column; align-items: stretch; }
    .soft-detail-hero-thumb,
    .soft-detail-hero-thumb-empty { width: 100%; max-width: 200px; height: 130px; margin: 0 auto; }
    .soft-detail-hero-actions { justify-content: flex-start; }
    .soft-detail-body,
    .soft-body { flex-direction: column; }
    .soft-sidebar { width: 100%; }
}

/* 软件详情 - 下载弹窗（layer） */
.soft-dl-modal-wrap { padding: 15px; color: #333; }
.soft-dl-modal-wrap .soft-dl-tip { font-size: 13px; color: #666; margin: 0 0 14px; line-height: 1.6; text-align: center; }
.soft-dl-modal-wrap .soft-dl-ver { font-size: 13px; color: #999; margin: 0 0 6px; }
.soft-dl-modal-wrap ul { list-style: none; margin: 0; padding: 0; }
.soft-dl-modal-wrap li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid #f0f0f0; }
.soft-dl-modal-wrap li:last-child { border-bottom: none; }
.soft-dl-modal-wrap .soft-dl-meta { font-size: 14px; }
.soft-dl-modal-wrap .soft-dl-meta em { font-style: normal; color: #999; font-size: 12px; margin-left: 8px; }
.soft-dl-modal-wrap .soft-dl-link { flex-shrink: 0; }
