/**
 * 论坛「软件发布」信息卡
 * 独立块级组件，宽度 100%，不影响帖子正文的排版与浮动。
 */

.ls-sw {
    --ls-sw-primary: #3b6ef5;
    --ls-sw-primary-dark: #2b57d4;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 0 20px;
    border: 1px solid #e6ebf3;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(27, 47, 92, .05), 0 16px 34px -26px rgba(27, 47, 92, .6);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: #22312a;
}

.ls-sw * { box-sizing: border-box; }

.ls-sw__hero {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 18px 16px;
    background: linear-gradient(120deg, #f4f7ff 0%, #fff 70%);
    border-bottom: 1px solid #eef1f7;
}

.ls-sw__icon {
    flex: none;
    width: 62px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: linear-gradient(140deg, #5f86ff, #3b6ef5);
    box-shadow: 0 8px 20px -10px rgba(59, 110, 245, .9);
    overflow: hidden;
    color: #fff;
    font-size: 28px;
    font-weight: 700;
}

.ls-sw__icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ls-sw__identity {
    flex: 1;
    min-width: 0;
}

.ls-sw__name {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 19px;
    font-weight: 700;
    color: #1d2a3d;
    line-height: 1.35;
    word-break: break-word;
}

.ls-sw__ver {
    padding: 1px 9px;
    border-radius: 999px;
    background: rgba(59, 110, 245, .12);
    color: #3b6ef5;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.ls-sw__sub {
    margin-top: 5px;
    color: #8792a3;
    font-size: 12px;
}

.ls-sw__sub i { margin-right: 3px; }
.ls-sw__dot { margin: 0 6px; }

.ls-sw__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 9px;
}

.ls-sw__tags span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border: 1px solid #e3e9f3;
    border-radius: 6px;
    background: #fff;
    color: #5d6a7d;
    font-size: 11px;
}

.ls-sw__tags i { color: #7b94c9; }

.ls-sw__count {
    flex: none;
    min-width: 72px;
    padding-left: 14px;
    border-left: 1px solid #e8edf5;
    text-align: center;
}

.ls-sw__count b {
    display: block;
    font-size: 22px;
    color: #3b6ef5;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.ls-sw__count span {
    font-size: 11px;
    color: #98a2b3;
}

/* 参数网格 */
.ls-sw__meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: #eef1f7;
}

.ls-sw__meta > div {
    padding: 11px 14px;
    background: #fff;
    min-width: 0;
}

.ls-sw__meta span {
    display: block;
    color: #98a2b3;
    font-size: 11px;
    margin-bottom: 3px;
}

.ls-sw__meta b {
    display: block;
    color: #2c3a4f;
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 下载按钮 */
.ls-sw__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 16px 18px;
}

.ls-sw__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    padding: 7px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .16s ease, background .16s ease;
}

.ls-sw__btn:active { transform: translateY(1px); }
.ls-sw__btn > i { font-size: 16px; }
.ls-sw__btn span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.3; }
.ls-sw__btn small { font-size: 10px; font-weight: 400; opacity: .8; }

.ls-sw__btn--main {
    flex: 1 1 220px;
    background: linear-gradient(135deg, #5a83ff, #3564e8);
    color: #fff;
    box-shadow: 0 12px 24px -12px rgba(53, 100, 232, .9);
}

.ls-sw__btn--main:hover {
    background: linear-gradient(135deg, #5179f5, #2d59d6);
    color: #fff;
    box-shadow: 0 14px 26px -12px rgba(53, 100, 232, 1);
}

.ls-sw__btn--ghost {
    border: 1px solid #d8e1f0;
    background: #f8faff;
    color: #3b6ef5;
    font-size: 13px;
}

.ls-sw__btn--ghost:hover { border-color: #3b6ef5; background: #f0f5ff; }

.ls-sw__code {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 40px;
    padding: 0 12px;
    border: 1px dashed #c9d6ec;
    border-radius: 9px;
    background: #fbfcff;
    color: #5d6a7d;
    font-size: 12px;
    cursor: pointer;
}

.ls-sw__code b { color: #3b6ef5; letter-spacing: 1px; }
.ls-sw__code:hover { border-color: #3b6ef5; }

.ls-sw__official {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #6b7c73;
    font-size: 12px;
    text-decoration: none;
}

.ls-sw__official:hover { color: #3b6ef5; }

/* 截图 */
.ls-sw__screens { padding: 0 18px 16px; }

.ls-sw__section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    color: #4b5b6d;
    font-size: 13px;
    font-weight: 600;
}

.ls-sw__section-title span { color: #a3adba; font-size: 11px; font-weight: 400; }

.ls-sw__screen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
}

.ls-sw__screen-grid a {
    display: block;
    border: 1px solid #e9eef6;
    border-radius: 9px;
    overflow: hidden;
    background: #f5f7fb;
    aspect-ratio: 16 / 10;
}

.ls-sw__screen-grid img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .2s ease;
}

.ls-sw__screen-grid a:hover img { transform: scale(1.04); }

/* 更新日志 */
.ls-sw__changelog {
    margin: 0 18px 14px;
    border: 1px solid #e9eef6;
    border-radius: 9px;
    background: #fbfcff;
}

.ls-sw__changelog summary {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 12px;
    color: #4b5b6d;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.ls-sw__changelog summary::-webkit-details-marker { display: none; }
.ls-sw__changelog summary > .fa-chevron-down { margin-left: auto; transition: transform .2s ease; }
.ls-sw__changelog[open] summary > .fa-chevron-down { transform: rotate(180deg); }

.ls-sw__changelog-body {
    padding: 0 12px 12px;
    color: #6b7a8d;
    font-size: 12px;
    line-height: 1.9;
    white-space: normal;
    word-break: break-word;
}

.ls-sw__tip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-top: 1px solid #eef1f7;
    background: #fafbfd;
    color: #98a2b3;
    font-size: 11px;
    line-height: 1.6;
}

.ls-sw__tip i { color: #8fa3c4; }
.ls-sw__uniq { margin-left: auto; white-space: nowrap; }

@media (max-width: 700px) {
    .ls-sw__hero { padding: 14px; gap: 10px; flex-wrap: wrap; }
    .ls-sw__icon { width: 52px; height: 52px; border-radius: 13px; font-size: 23px; }
    .ls-sw__name { font-size: 16px; }
    .ls-sw__count { border-left: 0; padding-left: 0; min-width: 60px; }
    .ls-sw__meta { grid-template-columns: repeat(2, 1fr); }
    .ls-sw__actions { padding: 14px; }
    .ls-sw__btn--main { flex: 1 1 100%; }
    .ls-sw__screen-grid { grid-template-columns: repeat(2, 1fr); }
    .ls-sw__tip { flex-wrap: wrap; }
}

/* 发帖弹层里的软件信息表单 */
.jinsom-publish-software {
    margin: 12px 0 4px;
    padding: 12px 14px;
    border: 1px solid #dfe9fa;
    border-radius: 10px;
    background: linear-gradient(180deg, #f7faff, #fff);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

.jinsom-publish-software__title {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 12px;
    padding-bottom: 9px;
    border-bottom: 1px dashed #dfe9fa;
    color: #3b6ef5;
    font-size: 14px;
    font-weight: 600;
}

.jinsom-publish-software__title span {
    margin-left: auto;
    color: #98a2b3;
    font-size: 11px;
    font-weight: 400;
}

.jinsom-publish-software__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 12px;
}

.jinsom-publish-software .layui-form-item {
    margin-bottom: 10px;
    clear: none;
}

.jinsom-publish-software .layui-form-item--wide {
    grid-column: 1 / -1;
}

.jinsom-publish-software .layui-form-label {
    width: 84px;
    padding: 8px 8px 8px 0;
    font-size: 12px;
    text-align: right;
}

.jinsom-publish-software .layui-input-inline,
.jinsom-publish-software .layui-input-block {
    width: auto !important;
    min-width: 0;
    margin-left: 84px !important;
}

.jinsom-publish-software input.layui-input,
.jinsom-publish-software select,
.jinsom-publish-software textarea.layui-textarea {
    width: 100%;
    max-width: 100%;
    border-radius: 6px;
    border-color: #dfe7e3;
    font-size: 12px;
}

.jinsom-publish-software input.layui-input:focus,
.jinsom-publish-software textarea.layui-textarea:focus {
    border-color: #3b6ef5;
}

@media (max-width: 700px) {
    .jinsom-publish-software__grid { grid-template-columns: 1fr; }
    .jinsom-publish-software__title { flex-wrap: wrap; }
}
