* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; color: #1f2937; background: #f8fafc; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* 导航 */
.topbar { background: #fff; border-bottom: 1px solid #e5e7eb; position: sticky; top: 0; z-index: 10; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-size: 20px; font-weight: 700; color: #2563eb; }
.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-links a:hover { color: #2563eb; }
.nav-search {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: border-color .2s;
}
.nav-search:focus-within { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.nav-search input {
    border: 0;
    outline: 0;
    padding: 6px 12px;
    width: 180px;
    font-size: 14px;
    background: transparent;
}
.nav-search button {
    border: 0;
    background: #2563eb;
    color: #fff;
    padding: 0 12px;
    height: 34px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.nav-search button:hover { background: #1d4ed8; }
.nav-search button svg { display: block; }

/* Hero */
.hero { text-align: center; padding: 64px 20px 40px; background: linear-gradient(180deg,#eff6ff,#f8fafc); border-radius: 0 0 24px 24px; margin-bottom: 40px; }
.hero h1 { font-size: 40px; margin-bottom: 12px; background: linear-gradient(90deg,#2563eb,#7c3aed); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: #64748b; font-size: 18px; margin-bottom: 24px; }
.stats { display: flex; justify-content: center; gap: 32px; flex-wrap: wrap; color: #475569; font-size: 14px; }
.stats b { color: #2563eb; font-size: 20px; }

/* Sections */
.section { margin-bottom: 56px; }
.section h2 { font-size: 24px; margin-bottom: 20px; }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.card { background: #fff; border-radius: 14px; overflow: hidden; border: 1px solid #e5e7eb; transition: all .2s; display: flex; flex-direction: column; padding: 20px; align-items: center; text-align: center; }
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.08); border-color: #bfdbfe; }
.card img { width: 64px; height: 64px; border-radius: 14px; object-fit: contain; background: #f1f5f9; padding: 4px; }
.card-body { margin-top: 12px; }
.card-body h3 { font-size: 16px; margin-bottom: 6px; }
.card-body p { color: #64748b; font-size: 13px; }

/* 分类 */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.cat { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px; display: flex; align-items: center; gap: 10px; transition: all .2s; }
.cat:hover { border-color: #bfdbfe; background: #eff6ff; }
.cat i { color: #2563eb; font-size: 20px; }
.cat em { margin-left: auto; color: #94a3b8; font-style: normal; font-size: 13px; }

/* Detail */
.breadcrumb { color: #94a3b8; font-size: 14px; margin: 16px 0; }
.breadcrumb a:hover { color: #2563eb; }
.detail { background: #fff; border-radius: 16px; padding: 32px; margin: 20px 0 40px; border: 1px solid #e5e7eb; }
.detail-head { display: flex; align-items: flex-start; gap: 24px; padding-bottom: 24px; border-bottom: 1px solid #f1f5f9; }
.detail-head > img { width: 96px; height: 96px; border-radius: 20px; background: #f1f5f9; padding: 8px; flex-shrink: 0; }
.detail-head h1 { font-size: 26px; margin-bottom: 8px; }
.detail-head h1 small { font-size: 14px; color: #94a3b8; font-weight: normal; }
.detail-head .tags { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.detail-actions {
    margin-left: auto;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.btn-secondary {
    display: inline-block;
    background: #fff;
    color: #2563eb;
    border: 1px solid #2563eb;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 600;
    transition: .2s;
}
.btn-secondary:hover {
    background: #eff6ff;
}
.tag { display: inline-block; background: #eff6ff; color: #2563eb; padding: 3px 10px; border-radius: 6px; font-size: 12px; }
.btn-primary { display: inline-block; background: #2563eb; color: #fff; padding: 10px 24px; border-radius: 10px; font-weight: 600; transition: .2s; }
.btn-primary:hover { background: #1d4ed8; }
.detail-body { padding: 24px 0; line-height: 1.9; }
.detail-body h2 { margin: 20px 0 12px; font-size: 20px; }
.detail-body p { margin-bottom: 12px; }
.gallery { padding: 20px 0; }
.gallery img {
    display: block;
    margin: 12px auto;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}
.notice { background: #fef3c7; color: #92400e; padding: 12px 16px; border-radius: 10px; font-size: 13px; margin-top: 16px; }

/* Page */
.page-title { font-size: 28px; margin: 24px 0 8px; }
.page-title small { color: #94a3b8; font-size: 16px; font-weight: normal; }
.page-desc { color: #64748b; margin-bottom: 24px; }
.search-bar { display: flex; gap: 8px; margin: 20px 0; }
.search-bar input { flex: 1; padding: 12px 16px; border: 1px solid #e5e7eb; border-radius: 10px; font-size: 15px; }
.search-bar button { padding: 12px 28px; background: #2563eb; color: #fff; border: 0; border-radius: 10px; cursor: pointer; }

/* Pager */
.pager { display: flex; gap: 8px; justify-content: center; margin: 32px 0; }
.pager a { padding: 8px 14px; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; }
.pager a.active { background: #2563eb; color: #fff; border-color: #2563eb; }

/* Rank */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.rank-list { list-style: none; }
.rank-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f1f5f9; }
.rank-num { width: 24px; height: 24px; border-radius: 6px; background: #f1f5f9; color: #64748b; text-align: center; font-size: 13px; line-height: 24px; font-weight: 600; }
.rank-list li:nth-child(-n+3) .rank-num { background: #fbbf24; color: #fff; }
.rank-list a { flex: 1; }
.rank-list a:hover { color: #2563eb; }
.rank-list em { font-style: normal; color: #94a3b8; font-size: 12px; }

/* Footer */
.footer { background: #fff; border-top: 1px solid #e5e7eb; padding: 32px 0; text-align: center; color: #64748b; margin-top: 64px; }
.footer .small { font-size: 12px; color: #94a3b8; margin-top: 6px; }

.error-page { text-align: center; padding: 80px 20px; }
.error-page h1 { font-size: 96px; color: #2563eb; }

@media (max-width: 768px) {
    .two-col { grid-template-columns: 1fr; }
    .hero h1 { font-size: 28px; }
    .detail-head { flex-direction: column; }
    .nav-search { display: none; }
    .stats { gap: 16px; }
}
.pager {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    margin: 40px 0;
    flex-wrap: wrap;
}
.pager a,
.pager span {
    min-width: 38px;
    height: 38px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #475569;
    font-size: 14px;
    transition: all .15s;
}
.pager a:hover {
    border-color: #2563eb;
    color: #2563eb;
}
.pager span.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
    cursor: default;
    font-weight: 600;
}
.pager span.pager-dots {
    border: 0;
    background: transparent;
    color: #94a3b8;
    cursor: default;
    min-width: 20px;
    padding: 0;
}
/* ==================== 全部软件页 ==================== */
.soft-page { margin: 24px 0 48px; }

.soft-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 32px;
    align-items: start;
}

/* -------- 左侧边栏 -------- */
.soft-sidebar {
    position: sticky;
    top: 88px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 20px;
}

.sidebar-block + .sidebar-block {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.sidebar-title {
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 10px;
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-list li + li { margin-top: 2px; }

.sidebar-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 14px;
    color: #475569;
    transition: background .15s, color .15s;
}

.sidebar-list a:hover {
    background: #f8fafc;
    color: #2563eb;
}

.sidebar-list a.active {
    background: #eff6ff;
    color: #2563eb;
    font-weight: 600;
}

.sidebar-list .cnt {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 400;
}

.sidebar-list a.active .cnt {
    color: #2563eb;
}

.sidebar-reset {
    display: block;
    margin-top: 16px;
    text-align: center;
    font-size: 13px;
    color: #94a3b8;
    padding: 7px;
    border-radius: 8px;
    border: 1px dashed #e5e7eb;
}
.sidebar-reset:hover { color: #2563eb; border-color: #bfdbfe; }

/* -------- 右侧主内容 -------- */
.soft-main { min-width: 0; }

.soft-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.soft-header .page-title { margin: 0 0 6px; font-size: 26px; }

.platform-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 500;
    color: #2563eb;
    background: #eff6ff;
    border-radius: 6px;
    vertical-align: middle;
}

.soft-empty {
    text-align: center;
    padding: 64px 20px;
    color: #94a3b8;
}
.soft-empty .btn-primary { margin-top: 16px; }

.tag-cat { background: #f1f5f9; color: #64748b; }

/* -------- 移动端 -------- */
@media (max-width: 768px) {
    .soft-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .soft-sidebar {
        position: static;
        display: flex;
        overflow-x: auto;
        gap: 16px;
        padding: 14px;
        border-radius: 12px;
    }
    .sidebar-block {
        flex: 0 0 auto;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
    }
    .sidebar-title { display: none; }
    .sidebar-list {
        display: flex;
        gap: 6px;
    }
    .sidebar-list a {
        white-space: nowrap;
        padding: 6px 12px;
        border: 1px solid #e5e7eb;
        border-radius: 20px;
    }
    .sidebar-list .cnt { margin-left: 4px; }
    .sidebar-reset { display: none; }
}
/* ==================== 下载按钮组 + 网盘提取码 ==================== */
.detail-actions {
    margin-left: auto;
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    align-items: flex-start;
}

.download-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 0 0 auto;
    min-width: 220px;
}
.download-group > a {
    display: block;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    min-width: 160px;
}

/* -------- 密码卡片基础 -------- */
.netdisk-pwd {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid;
    border-left-width: 4px;
    border-left-style: solid;
}

.netdisk-pwd-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
}

.netdisk-pwd-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 16px;
    font-weight: 700;
    background: #fff;
    padding: 4px 12px;
    border-radius: 6px;
    border-style: dashed;
    border-width: 1px;
    letter-spacing: 2px;
    user-select: all;
}

.netdisk-pwd-copy {
    margin-left: auto;
    padding: 6px 18px;
    color: #fff;
    border: 0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, transform .1s;
}

.netdisk-pwd-copy:active { transform: scale(.96); }

.netdisk-pwd-copy.copied,
.netdisk-pwd-copy.copied:hover {
    background: #16a34a;
}

/* -------- 官方（蓝色系，和 btn-primary 一致） -------- */
.netdisk-pwd-official {
    background: #eff6ff;
    border-color: #bfdbfe;
    border-left-color: #2563eb;
}
.netdisk-pwd-official .netdisk-pwd-label { color: #1e40af; }
.netdisk-pwd-official .netdisk-pwd-code {
    color: #1d4ed8;
    border-color: #93c5fd;
}
.netdisk-pwd-official .netdisk-pwd-copy { background: #2563eb; }
.netdisk-pwd-official .netdisk-pwd-copy:hover { background: #1d4ed8; }

/* -------- 备用（橙色系，和 btn-secondary 形成冷暖对比） -------- */
.netdisk-pwd-mirror {
    background: #fffbeb;
    border-color: #fde68a;
    border-left-color: #f59e0b;
}
.netdisk-pwd-mirror .netdisk-pwd-label { color: #92400e; }
.netdisk-pwd-mirror .netdisk-pwd-code {
    color: #b45309;
    border-color: #fbbf24;
}
.netdisk-pwd-mirror .netdisk-pwd-copy { background: #f59e0b; }
.netdisk-pwd-mirror .netdisk-pwd-copy:hover { background: #d97706; }

/* -------- 移动端 -------- */
@media (max-width: 640px) {
    .detail-actions { flex-direction: column; width: 100%; }
    .download-group { width: 100%; min-width: 0; }
    .netdisk-pwd-copy { margin-left: 0; width: 100%; text-align: center; margin-top: 4px; }
}
