/* ================================================
   soft.css - 软件详情页样式
   参考：华军软件园详情页设计
================================================ */

/* 面包屑 */
.soft-breadcrumb {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 0;
    font-size: 13px;
    color: #64748b;
}
.soft-breadcrumb a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
}
.soft-breadcrumb a:hover { color: #1a6fdb; }
.soft-breadcrumb .sep { margin: 0 6px; color: #cbd5e1; }

/* 主布局：左(详情) 右(侧栏) */
.soft-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    padding: 24px 20px 80px;
    max-width: var(--max-w, 1200px);
    margin: 0 auto;
}
.soft-main { min-width: 0; }

/* ================================================
   软件信息头部
================================================ */
.soft-header {
    background: #fff;
    border-radius: 12px;
    padding: 28px;
    display: flex;
    align-items: flex-start;
    gap: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}
.soft-header-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10), 0 1px 4px rgba(0,0,0,0.06);
}
.soft-header-icon img {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: contain;
}
.soft-header-icon {
    color: #64748b;
    font-size: 36px;
}
.soft-header-info { flex: 1; min-width: 0; }
.soft-name {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px;
    line-height: 1.3;
}
.soft-tagline {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 12px;
    line-height: 1.6;
}
.soft-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.soft-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    color: #fff;
    font-weight: 500;
}
.badge-series { background: rgba(0,0,0,0.08); color: #475569; }
.badge-free { background: #22c55e; }
.badge-pay { background: #f59e0b; }

.soft-header-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.soft-dl-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #ff6200 0%, #e55a00 100%);
    color: #fff;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(255,98,0,0.3);
    white-space: nowrap;
}
.soft-dl-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255,98,0,0.4);
    color: #fff;
}
.soft-dl-btn.disabled {
    background: #cbd5e1;
    box-shadow: none;
    cursor: default;
    color: #94a3b8;
}
.dl-btn-icon { font-size: 20px; }
.soft-safe-tip {
    font-size: 11px;
    color: #94a3b8;
    margin: 0;
    white-space: nowrap;
}

/* ================================================
   软件信息卡片
================================================ */
.soft-detail-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px 28px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}
.soft-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

/* 信息表格 */
.soft-info-table {
    width: 100%;
    border-collapse: collapse;
}
.soft-info-table th,
.soft-info-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    vertical-align: top;
}
.soft-info-table th {
    width: 100px;
    color: #64748b;
    font-weight: 500;
    background: #f8fafc;
    border-radius: 6px;
}
.soft-info-table td { color: #1e293b; }
.soft-info-table tr:last-child th,
.soft-info-table tr:last-child td { border-bottom: none; }
.info-cat-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    color: #fff;
}
.info-link {
    color: #1a6fdb;
    text-decoration: none;
    font-weight: 500;
}
.info-link:hover { text-decoration: underline; }

/* 开发者信息 */
.dev-info-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.dev-info-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}
.dev-info-item:last-child { border-bottom: none; }
.dev-info-label {
    width: 100px;
    flex-shrink: 0;
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}
.dev-info-value {
    font-size: 14px;
    color: #1e293b;
    font-weight: 500;
}
.dev-info-link {
    font-size: 14px;
    color: #1a6fdb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}
.dev-info-link:hover {
    color: #0e4a8a;
    text-decoration: underline;
}

/* 软件介绍 */
.soft-intro p {
    font-size: 14px;
    line-height: 1.8;
    color: #334155;
    margin: 0 0 8px;
}
.soft-intro p:last-child { margin-bottom: 0; }
.soft-intro a {
    color: #1a6fdb;
    text-decoration: none;
}
.soft-intro a:hover { text-decoration: underline; }
/* 富文本详情样式 */
.soft-intro img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 8px 0;
}
.soft-intro table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 13px;
}
.soft-intro table th,
.soft-intro table td {
    border: 1px solid #e2e8f0;
    padding: 8px 12px;
    text-align: left;
}
.soft-intro table th {
    background: #f8fafc;
    font-weight: 600;
}
.soft-intro ul, .soft-intro ol {
    padding-left: 24px;
    margin: 8px 0;
}
.soft-intro li { line-height: 1.8; color: #334155; font-size: 14px; }
.soft-intro h1, .soft-intro h2, .soft-intro h3,
.soft-intro h4, .soft-intro h5, .soft-intro h6 {
    color: #0f172a;
    margin: 16px 0 8px;
    line-height: 1.4;
}
.soft-intro blockquote {
    border-left: 4px solid #1a6fdb;
    padding: 8px 16px;
    margin: 12px 0;
    background: #f0f7ff;
    border-radius: 0 8px 8px 0;
    color: #334155;
    font-size: 14px;
}

/* ================================================
   软件截图画廊
================================================ */
.soft-screenshots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}
.ss-item {
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
    background: #f8fafc;
}
.ss-item:hover {
    border-color: #1a6fdb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26,111,219,0.15);
}
.ss-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    background: #f8fafc;
}

/* 截图全屏查看器 */
.ss-viewer {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}
.ss-viewer.ss-viewer-active {
    display: flex;
}
.ss-viewer img {
    max-width: 92vw;
    max-height: 92vh;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
    object-fit: contain;
}
.ss-viewer-close {
    position: absolute;
    top: 20px; right: 24px;
    font-size: 36px;
    color: #fff;
    cursor: pointer;
    width: 44px; height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    transition: background 0.2s;
}
.ss-viewer-close:hover { background: rgba(255,255,255,0.3); }

/* ================================================
   关键词标签
================================================ */
.soft-keywords {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.soft-kw-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    flex-shrink: 0;
}
.soft-kw-tag {
    display: inline-block;
    padding: 3px 12px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 12px;
    color: #475569;
    transition: background 0.2s, border-color 0.2s;
}
.soft-kw-tag:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

/* 使用说明 */
.soft-guide {
    display: flex;
    align-items: center;
    gap: 0;
    justify-content: center;
}
.guide-step {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #f8fafc;
    border-radius: 12px;
    padding: 18px 20px;
    flex: 1;
    min-width: 0;
    border: 1px solid #f1f5f9;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.guide-step:hover {
    border-color: #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.guide-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1a6fdb, #0e4a8a);
    color: #fff;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.guide-step-content { min-width: 0; }
.guide-step-content h4 {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 3px;
}
.guide-step-content p {
    font-size: 12px;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}
.guide-arrow {
    flex-shrink: 0;
    width: 36px;
    text-align: center;
    font-size: 18px;
    color: #cbd5e1;
    margin: 0 -2px;
}

/* ================================================
   底部固定下载栏
================================================ */
.soft-dl-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    z-index: 100;
    display: none; /* 默认隐藏，滚动后显示 */
}
.soft-dl-bar.visible { display: block; }
.soft-dl-bar-inner {
    max-width: var(--max-w, 1200px);
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.soft-dl-bar-info { display: flex; align-items: baseline; gap: 12px; }
.dl-bar-name { font-size: 15px; font-weight: 600; color: #0f172a; }
.dl-bar-meta { font-size: 12px; color: #94a3b8; }
.soft-dl-bar-btn {
    display: inline-block;
    padding: 8px 24px;
    background: linear-gradient(135deg, #ff6200, #e55a00);
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.soft-dl-bar-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255,98,0,0.3);
    color: #fff;
}
.soft-dl-bar-btn.disabled {
    background: #cbd5e1;
    color: #94a3b8;
    cursor: default;
}

/* ================================================
   右侧边栏
================================================ */
.soft-sidebar { display: flex; flex-direction: column; gap: 20px; }
.soft-side-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.soft-side-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}

/* 侧栏下载卡片 */
.soft-side-dl {
    text-align: center;
    padding: 24px 20px;
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}
.side-dl-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    overflow: hidden;
    color: #64748b;
    font-size: 32px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10), 0 1px 4px rgba(0,0,0,0.06);
}
.side-dl-icon img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: contain;
}
.soft-side-dl h3 {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 10px;
}
.side-dl-meta { display: flex; gap: 6px; justify-content: center; margin-bottom: 16px; }
.side-dl-meta span {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    color: #fff;
}
.side-series { background: rgba(0,0,0,0.08); color: #475569 !important; }
.side-dl-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #ff6200, #e55a00);
    color: #fff;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(255,98,0,0.25);
}
.side-dl-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(255,98,0,0.35);
    color: #fff;
}
.side-dl-btn.disabled {
    background: #cbd5e1;
    box-shadow: none;
    color: #94a3b8;
    cursor: default;
}
.side-dl-safe {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.side-dl-safe span {
    font-size: 11px;
    color: #94a3b8;
}

/* 相关推荐列表 */
.soft-side-list { list-style: none; padding: 0; margin: 0; }
.soft-side-list li { margin-bottom: 0; }
.soft-side-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    transition: background 0.2s;
}
.soft-side-list a:last-child { border-bottom: none; }
.soft-side-list a:hover { background: #f8fafc; margin: 0 -12px; padding: 10px 12px; border-radius: 8px; }
.side-item-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    font-size: 20px;
}
.side-item-icon img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: contain;
}
.side-item-info { min-width: 0; }
.side-item-name {
    font-size: 13px;
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.side-item-cat {
    display: flex;
    gap: 6px;
    font-size: 11px;
}
.side-item-cat span {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 20px;
    color: #fff;
}
.side-item-cat span:last-child {
    background: rgba(0,0,0,0.06);
    color: #64748b;
}

/* ================================================
   响应式
================================================ */
@media (max-width: 1024px) {
    .soft-layout {
        grid-template-columns: 1fr 280px;
        gap: 20px;
    }
}
@media (max-width: 800px) {
    .soft-layout {
        grid-template-columns: 1fr;
        padding: 16px 14px 80px;
    }
    .soft-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px;
        gap: 16px;
    }
    .soft-badges { justify-content: center; }
    .soft-header-action { align-items: center; }

    .soft-info-table th,
    .soft-info-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
    .soft-info-table th {
        border-bottom: none;
        padding-bottom: 2px;
        font-size: 12px;
    }
    .soft-info-table td {
        padding-top: 2px;
        padding-bottom: 14px;
    }

    /* 使用说明移动端：纵向排列 */
    .soft-guide {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }
    .guide-arrow {
        display: flex;
        justify-content: center;
        padding: 4px 0;
        font-size: 14px;
        transform: rotate(90deg);
        margin: 0;
    }
    .guide-step {
        padding: 14px 16px;
    }
    .guide-icon { width: 38px; height: 38px; font-size: 18px; border-radius: 10px; }

    /* 截图画廊移动端 */
    .soft-screenshots {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .soft-keywords { gap: 4px; }
    .soft-kw-tag { font-size: 11px; padding: 2px 8px; }

    /* 侧栏下载卡片在移动端隐藏（已有顶部下载） */
    .soft-sidebar { display: none; }

    .soft-dl-bar {
        display: block;
        left: 0;
        right: 0;
    }
    .soft-dl-bar-inner {
        padding: 10px 14px;
    }
    .soft-layout { padding-bottom: 70px; }
}
@media (max-width: 480px) {
    .soft-name { font-size: 20px; }
    .soft-dl-btn { padding: 10px 20px; font-size: 14px; }
    .soft-detail-card { padding: 16px; }
    .soft-header { padding: 16px; }
}
