/* ============================================================
   工具详情页 —— 对齐单机游戏库详情页（game2.html）
   复用 index2.css：gm-crumb / gm-sec / gm-down / gm-card / gm-sim-item
   这里只补工具特有的信息卡与侧栏列表
   ============================================================ */

body.td-page { background: var(--nx-bg, #f5f6f8); }

/* 两栏布局，比例与游戏详情页一致 */
.td-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 26px;
    align-items: start;
    padding-bottom: 56px;
}
.td-main { min-width: 0; }

/* ---------- 软件信息卡（对齐 .gm-hero） ---------- */
.td-hero {
    position: relative;
    overflow: hidden;
    padding: 22px 24px;
    display: flex;
    align-items: center;
    gap: 22px;
    border-radius: 16px;
}
/* 封面模糊背景 */
.td-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}
.td-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.25);
    filter: blur(46px) saturate(1.6);
    opacity: .5;
}
.td-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, .6), rgba(255, 255, 255, .94) 76%, #fff);
}

/* 封面：与游戏页一致的 3:2 大图 */
.td-cover {
    flex: none;
    width: 340px;
    max-width: 42%;
    position: relative;
    z-index: 1;
    border-radius: 12px;
    overflow: hidden;
    background: #eef1f5;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .26), 0 0 0 1px rgba(255, 255, 255, .45);
}
.td-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, transparent 64%, rgba(13, 17, 23, .28));
    pointer-events: none;
}
.td-cover img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    transform: scale(1.03);
    transition: transform .5s cubic-bezier(.22, .61, .36, 1);
}
.td-cover:hover img { transform: scale(1.08); }
.td-cover-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 3 / 2;
    font-size: 64px;
    font-weight: 800;
    color: rgba(247, 99, 65, .4);
    background: linear-gradient(135deg, #fff3ed, #ffe8dc);
}
.td-cover-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #0c8b52;
    background: rgba(219, 246, 230, .95);
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(15, 23, 42, .18);
}

/* 右侧信息 */
.td-info {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.td-title {
    margin: 0;
    font-size: 22px;
    line-height: 1.4;
    font-weight: 800;
    color: var(--nx-text);
    word-break: break-all;
}
.td-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.td-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 24px;
    padding: 0 11px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #7a8494;
    background: #f3f5f8;
}
.td-badge .layui-icon { font-size: 13px; }
.td-badge.plat { color: #1e6fd9; background: #e8f2fe; }
.td-badge.cat { color: #0c8b52; background: #e4f6ec; }
.td-badge.ver { color: #8b5cf6; background: #f1ecfe; }
.td-badge.hit { color: #e5680f; background: #fff1e2; }

.td-lead {
    margin: 12px 0 0;
    font-size: 13px;
    line-height: 1.7;
    color: var(--nx-text2);
}

/* 参数表：与 .gm-meta 同款 2 列 / 3 列 */
.td-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 14px;
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .72);
    box-shadow: inset 0 0 0 1px rgba(31, 35, 41, .05), 0 2px 10px rgba(31, 35, 41, .04);
}
@media (min-width: 980px) and (max-width: 1200px), (min-width: 1320px) {
    .td-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.td-meta-row { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.td-meta-row dt { flex: none; font-size: 12px; color: #97a0b0; }
.td-meta-row dd {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--nx-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.td-safe {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 9px 14px;
    border-radius: 10px;
    font-size: 12.5px;
    color: #0c8b52;
    background: #e9f8ef;
    box-shadow: inset 0 0 0 1px rgba(12, 139, 82, .07);
}
.td-safe .layui-icon {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    font-size: 15px;
    background: rgba(12, 139, 82, .12);
}
.td-safe b { font-weight: 700; }

/* 内容区块间距与 gm-sec 一致 */
.td-sec, .td-down { margin-top: 18px; }

/* 介绍正文 */
.td-article { font-size: 14.5px; line-height: 2; color: #3d4654; }
.td-article p { margin: 0 0 12px; }
.td-article p:last-child { margin-bottom: 0; }
.td-article h3 {
    margin: 24px 0 10px;
    font-size: 14.5px;
    font-weight: 800;
    color: var(--nx-text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.td-article h3:first-child { margin-top: 0; }
.td-article h3::before {
    content: "";
    width: 4px;
    height: 14px;
    border-radius: 2px;
    background: #ffc4a8;
}
.td-article ul { margin: 0 0 12px; padding: 0; list-style: none; }
.td-article ul li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 6px;
    color: #4a525e;
}
.td-article ul li::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 12px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #ffc4a8;
}

/* ---------- 多版本下载列表 ---------- */
.td-vers { display: grid; gap: 12px; }
.td-ver {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 16px 20px;
    border-radius: 12px;
    background: #fafbfc;
    border: 1px solid #eef0f4;
    transition: border-color .18s, background .18s;
}
.td-ver:hover { border-color: #ffd2c2; background: #fffaf7; }
/* 第一个版本做主推：淡橙底 */
.td-ver.is-first {
    background: linear-gradient(120deg, #fff6f1, #fffbf9);
    border-color: #ffdccd;
}
.td-ver-main { flex: 1; min-width: 0; }
.td-ver-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
}
.td-ver-no {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: #eef1f5;
    color: #9099a8;
    font-size: 12px;
    font-weight: 700;
}
.td-ver.is-first .td-ver-no {
    background: linear-gradient(135deg, #f76341, #ff8a5c);
    color: #fff;
}
.td-ver-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--nx-text);
}
.td-ver-tag {
    padding: 2px 8px;
    border-radius: 5px;
    background: #e9f8ef;
    color: #0c8b52;
    font-size: 11.5px;
    font-weight: 600;
}
.td-ver-size {
    font-size: 12px;
    color: #97a0b0;
}
.td-ver-desc {
    margin: 7px 0 0;
    font-size: 12.5px;
    line-height: 1.6;
    color: #7a8494;
}
.td-ver-code {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 8px 0 0;
    font-size: 12.5px;
    color: #97a0b0;
}
.td-ver-code b {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 14px;
    letter-spacing: .08em;
    color: #e8552d;
}
.td-copy {
    padding: 0 9px;
    height: 23px;
    border: 1px solid #ffd2c2;
    border-radius: 6px;
    background: #fff;
    color: #e8552d;
    font-size: 11.5px;
    cursor: pointer;
    transition: .18s;
}
.td-copy:hover { background: #e8552d; border-color: #e8552d; color: #fff; }
.td-copy.is-done { border-color: #3fbf75; background: #f2fbf6; color: #2f9e60; }

.td-ver-btn {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 42px;
    padding: 0 26px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f76341, #ff8a5c);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(247, 99, 65, .28);
    transition: transform .18s, box-shadow .18s;
}
.td-ver-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(247, 99, 65, .38);
    color: #fff;
}
.td-ver-btn .layui-icon { font-size: 17px; }

.td-down-empty {
    margin: 0;
    padding: 22px;
    border-radius: 12px;
    background: #fafbfc;
    color: #97a0b0;
    font-size: 13.5px;
    text-align: center;
}
.td-down-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px dashed #eef0f4;
    font-size: 12.5px;
    color: #a6adb8;
}
.td-down-foot .layui-icon { color: #4ade80; font-size: 13px; margin-right: 3px; }

/* ---------- 侧栏 ---------- */
.td-side { min-width: 0; }
.td-side .gm-card + .gm-card { margin-top: 18px; }
.td-side-list { margin: 0; padding: 0; list-style: none; }
.td-side-list li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed #f0f2f5;
    font-size: 12.5px;
}
.td-side-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.td-side-list span { flex: none; color: #97a0b0; }
.td-side-list b {
    min-width: 0;
    font-weight: 600;
    color: var(--nx-text);
    text-align: right;
    word-break: break-word;
}
.td-side-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 16px;
    height: 40px;
    border-radius: 10px;
    background: #fff6f2;
    color: var(--nx-primary);
    font-size: 13px;
    font-weight: 600;
    transition: background .18s;
}
.td-side-link:hover { background: #ffe9df; color: var(--nx-primary-dark); }

/* 同类工具缩略图占位 */
.td-th-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #fff3ed, #ffe8dc);
    color: rgba(247, 99, 65, .45);
    font-size: 20px;
    font-weight: 800;
}

/* 下载提示 */
.td-notes { margin: 0; padding: 0; list-style: none; }
.td-notes li {
    position: relative;
    padding-left: 15px;
    margin-bottom: 9px;
    font-size: 12.5px;
    line-height: 1.7;
    color: #97a0b0;
}
.td-notes li:last-child { margin-bottom: 0; }
.td-notes li::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 8px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #d5dae2;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1200px) {
    .td-layout { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
    .td-hero { flex-direction: column; align-items: stretch; padding: 16px; }
    .td-cover { width: 100%; max-width: 100%; }
    .td-title { font-size: 19px; }
    .td-meta { grid-template-columns: 1fr; }
    .gm-down-in { flex-wrap: wrap; }
}
