/* ========== 软件分享站 - PC 全局样式 ========== */
/* 统一提取自 index.html / demo.html / detail.html */
/* 主强调色: #34d399 */

*, *::before, *::after { box-sizing: border-box; }

:root {
    --bg: #f5f6f8;
    --panel: #fff;
    --text: #202124;
    --muted: #6b7280;
    --line: #e3e6eb;
    --soft: #f8fafc;
    --green: #22C98B;
    --green-dark: #1aa87a;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, "Microsoft YaHei", sans-serif;
}

html, body { height: 100%; }
body {
    margin: 0;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.65;
}

a { color: inherit; text-decoration: none; }

/* ==================== 顶部导航 ==================== */
.header-outer {
    background: #fff;
}
.header-card {
    max-width: 1180px;
    margin: 0 auto;
}
.header-main {
    display: flex;
    align-items: center;
    padding: 22px 18px;
    min-height: 72px;
    gap: 24px;
}

/* --- 品牌区 --- */
.brand {
    display: flex;
    align-items: center;
    width: 260px;
    flex-shrink: 0;
    text-decoration: none;
}
.brand-logo {
    width: 240px;
    height: 56px;
    object-fit: contain;
}

/* --- 主导航 --- */
.main-nav {
    display: flex;
    gap: 2px;
    flex: 1;
    justify-content: center;
}
.nav-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    height: 44px;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 700;
    color: #111827;
    text-decoration: none;
    transition: all .2s;
    position: relative;
    white-space: nowrap;
}
.nav-item:hover { color: var(--green); }
.nav-icon {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.nav-item .nav-icon {
    width: 18px;
    height: 18px;
    display: block;
    flex-shrink: 0;
}
.nav-item.active {
    background: #ECFDF5;
    color: var(--green);
}


/* --- 搜索框 --- */
.search-box {
    width: 300px;
    height: 46px;
    flex-shrink: 0;
    position: relative;
}
.search-box input {
    width: 100%;
    height: 100%;
    border: 1.5px solid #E5E7EB;
    border-radius: 999px;
    background: #fff;
    padding: 0 56px 0 48px;
    font-size: 14px;
    color: #374151;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.search-box input:focus {
    border-color: var(--green);
    box-shadow: 0 1px 8px rgba(34,201,139,0.12);
}
.search-box .search-icon-left {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
    pointer-events: none;
}
.search-box button {
    position: absolute;
    right: 3px;
    top: 3px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: var(--green);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: transform .15s;
}
.search-box button:hover { transform: scale(1.05); }
.search-box button svg { display: block; }
.search-inline-icon {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.search-submit-icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #fff;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* --- 分割线 --- */
.header-divider {
    height: 1px;
    background: #E5E7EB;
    margin: 0 28px;
}

/* --- 二级分类导航 --- */
.sub-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 18px 16px;
    height: 46px;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    background: #FBFFFD;
    overflow: hidden;
}
.sub-nav-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 10px;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    text-decoration: none;
    height: 100%;
    position: relative;
    transition: color .15s;
}
.sub-nav-item:hover { color: var(--green); }
.sub-nav-item.active {
    color: var(--green);
}
.sub-nav-item + .sub-nav-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 14px;
    bottom: 14px;
    width: 1px;
    background: #E5E7EB;
}
.sub-nav-icon-box {
    width: 26px;
    height: 26px;
    border-radius: 9px;
    background: #ECFDF5;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.sub-nav-icon-box svg {
    width: 15px;
    height: 15px;
    color: var(--green);
}
.sub-icon {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.sub-nav-software,
.sub-nav-mobile {
    color: #111827;
}
.sub-nav-software:hover,
.sub-nav-mobile:hover {
    color: var(--green);
}

/* --- 响应式 --- */
@media (max-width: 1200px) {
    .brand { width: 60px; }

    .nav-item { width: 260px; font-size: 15px; }
    .search-box { width: 280px; }
}
@media (max-width: 900px) {
    .header-outer { padding: 12px 12px 0; }
    .header-main { flex-wrap: wrap; padding: 16px 20px; min-height: auto; gap: 12px; }
    .brand { width: 100%; }
    .main-nav { order: 3; overflow-x: auto; justify-content: flex-start; padding-bottom: 2px; }
    .search-box { width: 100%; order: 2; }
    .header-divider { margin: 0 28px; }
    .sub-nav { margin: 0 12px 12px; overflow-x: auto; }
    .sub-nav-item { font-size: 14px; gap: 6px; flex: 0 0 auto; padding: 0 16px; }
}

/* ==================== 页面布局 ==================== */
.page { flex: 1; max-width: 1180px; width: 100%; margin: 0 auto; padding: 18px 18px 42px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.main, .side { min-width: 0; overflow: hidden; }

/* ==================== 卡片容器 ==================== */
.box {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 14px;
}
.side .box { padding: 0 0 16px; }
.side .box:last-child { margin-bottom: 0; }

/* ==================== 标题 ==================== */
h1 { font-size: 22px; line-height: 1.35; margin: 0 0 4px; font-weight: 800; }
h2 { font-size: 20px; line-height: 1.35; margin: 0; font-weight: 800; padding: 16px 18px 8px; }
.side h3 { font-size: 19px; line-height: 1.35; margin: 0 0 12px; font-weight: 800; padding: 16px 18px 0; }

/* ==================== 面包屑 ==================== */
.crumb { font-size: 13px; color: #777; margin: 0 0 12px; }
.crumb a { color: #4b5563; }
.crumb span { color: #777; }

/* ==================== 图片4列网格（首页用） ==================== */
.section-head { display: flex; align-items: center; justify-content: space-between; padding: 0 18px 8px; }
.section-head a { color: var(--green); font-size: 13px; font-weight: 600; }
.section-head a:hover { color: var(--green-dark); }
.section-count { color: #858b96; font-size: 13px; font-weight: 600; }
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px 20px; padding: 4px 18px 18px; min-width: 0; }
.card { display: block; text-align: center; min-width: 0; }
.card-img-wrap { display: block; width: 120px; height: 120px; overflow: hidden; border-radius: 16px; margin: 0 auto; }
.card-img { display: block; width: 120px; height: 120px; object-fit: cover; transition: transform .18s ease; }
.card-img-wrap:hover .card-img { transform: scale(1.04); }
.card-body { padding: 10px 0 0; }
.card-body strong {
    display: block; font-size: 14px; line-height: 1.35;
    color: #2f3237; font-weight: 700;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-title-link:hover strong { color: var(--green); }
.card-body .card-desc {
    display: block; color: #858b96; font-size: 12px; margin-top: 5px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-tag-link:hover { color: var(--green); }
.card-body .card-intro {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
    overflow: hidden; color: #6b7280; font-size: 12px; line-height: 1.5; margin-top: 6px;
}

/* ==================== 列表网格（分类页用） ==================== */
.grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; overflow: hidden; }

/* ==================== 分页 ==================== */
.pagination {
    display: flex; align-items: center; justify-content: center;
    gap: 6px; padding: 16px 18px; flex-wrap: wrap;
    overflow: hidden;
}
.tag-index-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;padding:12px 18px 24px}.tag-index-grid a{display:flex;flex-direction:column;gap:5px;padding:14px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--text);min-width:0}.tag-index-grid a:hover{border-color:var(--green);color:var(--green)}.tag-index-grid strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tag-index-grid span{font-size:12px;color:var(--text2)}
.tag-nav-box {
    padding: 24px 24px 24px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .96);
}
.tag-nav-list { display: flex; flex-wrap: wrap; gap: 26px 18px; min-width: 0; }
.tag-nav-link {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 100px; max-width: 172px; height: 50px; padding: 0 22px;
    border: 1px solid #e0e6ec; border-radius: 10px; background: #fff;
    color: #1f2937; font-size: 15px; font-weight: 800; line-height: 1;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    box-shadow: 0 10px 22px rgba(15, 23, 42, .06);
    position: relative;
    transition: border-color .15s ease, color .15s ease, background .15s ease, box-shadow .15s ease, transform .15s ease;
}
.tag-nav-link::after {
    content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px;
    height: 2px; border-radius: 999px; background: transparent;
}
.tag-nav-link:hover {
    border-color: #c9eee0; color: #059669; background: #f3fffb;
    box-shadow: 0 16px 26px rgba(15, 118, 110, .12); transform: translateY(-1px);
}
.tag-nav-link.active {
    border-color: #d8efe9; background: #e8faf5; color: #008f73;
    box-shadow: 0 18px 30px rgba(15, 118, 110, .16);
}
.tag-nav-link.active::after {
    background: #14b88a;
}
.detail-tag-nav-box { margin-top: 18px; padding: 34px 36px 40px; }
.page-btn {
    display: grid; place-items: center; min-width: 32px; height: 32px;
    padding: 0 6px; border-radius: 6px; background: #f3f4f6;
    color: #4b5563; font-size: 13px; font-weight: 600; transition: .15s ease; white-space: nowrap;
}
.page-btn:hover { background: #e5e7eb; color: #111827; }
.page-btn.active { background: var(--green); color: #fff; }
.page-btn.first-last { background: none; color: #4b5563; font-weight: 700; font-size: 13px; }
.page-btn.first-last:hover { color: var(--green); }
.page-dots { display: grid; place-items: center; min-width: 32px; height: 32px; color: #9ca3af; font-size: 14px; }

/* ==================== 侧边栏热门资源 ==================== */
.hot-feature {
    display: grid; grid-template-columns: 70px minmax(0, 1fr);
    gap: 12px; align-items: center; padding: 0 18px 12px;
    border-bottom: 1px dashed #e1e5eb;
}
.hot-feature img {
    width: 70px; height: 70px; border-radius: 14px;
    object-fit: cover; background: #f1f5f9; transition: transform .18s ease;
}
.hot-img:hover img { transform: scale(1.06); }
.hot-feature strong {
    display: block; font-size: 15px; line-height: 1.3;
    color: #2f3237; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px;
}
.hot-title-link:hover strong { color: var(--green); }
.hot-feature span:last-child span {
    display: block; color: #858b96; font-size: 13px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hot-tag-link:hover { color: var(--green); }

/* ==================== 侧边栏列表 ==================== */
.side-list { padding: 12px 18px 0; list-style: none; margin: 0; }
.side-list li {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 7px; align-items: center; font-size: 14px;
}
.side-list li + li { border-top: 1px dashed #e1e5eb; margin-top: 12px; padding-top: 12px; }
.side-list a { min-width: 0; color: #2f3237; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-list a:hover strong { color: var(--green); }
.side-list strong { font-weight: 500; color: #2f3237; }
.side-list span:last-child { color: #777; font-size: 12px; }

/* ==================== 序号徽标 ==================== */
.rank {
    display: inline-grid; place-items: center; width: 20px; height: 20px;
    border-radius: 6px; background: #f3f4f6; color: #555;
    font-size: 12px; font-weight: 800; flex: 0 0 20px;
}
.rank.hot { background: #ecfdf5; color: #047857; }


/* ==================== 底部标签导航 ==================== */


/* ==================== 页脚 ==================== */


/* ==================== 首页底部标签导航（左列） ==================== */
.footer-tags-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 20px; padding: 4px 18px 18px;
}
.ft-group { margin-bottom: 16px; }
.ft-group:last-child { margin-bottom: 0; }
.ft-parent {
    display: block; font-size: 15px; font-weight: 700; color: #111827;
    margin-bottom: 8px; padding-left: 4px;
}
.ft-parent:hover { color: var(--green); }
.ft-kids {
    display: flex; flex-wrap: wrap; gap: 4px;
}
.ft-kids a {
    font-size: 13px; color: #6b7280; padding: 2px 10px;
    border: 1px solid #e5e7eb; border-radius: 12px;
    white-space: nowrap; transition: all .15s;
}
.ft-kids a:hover { color: var(--green); border-color: var(--green); background: #ECFDF5; }

footer { border-top: 1px solid var(--line); background: #fff; color: #777; width: 100%; }
.footer-inner {
    max-width: 1180px; margin: 0 auto; padding: 18px;
    font-size: 13px; display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
}
.footer-links { display: flex; gap: 12px; flex-wrap: wrap; color: #6b7280; }
.footer-links a:hover { color: var(--green); }
.copyright { margin-left: auto; color: #777; }

/* ==================== 辅助类（对用户不可见，对搜索引擎可见） ==================== */
.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
    white-space: nowrap;
}

/* 分类页标题与首页保持一致 */
.section-head h1 { font-size: 22px; line-height: 1.35; margin: 0; font-weight: 800; padding: 16px 18px 8px; }

/* ==================== 详情页专用 ==================== */
.page-detail .grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; overflow: hidden; }
.page-detail h1 { font-size: 26px; line-height: 1.25; margin: 0 0 12px; font-weight: 800; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.page-detail h2 { font-size: 19px; line-height: 1.35; margin: 0; font-weight: 800; padding: 16px 18px 8px; }
.summary {
    padding: 18px;
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}
.summary > div { min-width: 0; overflow: hidden; }
.summary-main { min-width: 0; }
.logo {
    width: 130px; height: 130px; border-radius: 22px;
    background: #fff; object-fit: cover; transition: transform .18s ease;
}
.logo:hover { transform: scale(1.04); }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.tags span,
.tags a {
    font-size: 13px; color: #1f2937; background: #f8fbfa;
    border: 1px solid #d6e4df; border-radius: 999px; padding: 3px 9px;
    box-shadow: 0 2px 7px rgba(15, 23, 42, .05);
}
.tags a:hover {
    color: #008f73; border-color: #78d8c2; background: #eefbf7;
}
.content { padding: 0 18px 18px; }
.content p { margin: 0 0 10px; }
.intro-lead {
    margin: 0 0 14px; padding: 0 18px; color: #4b5563; line-height: 1.7;
    text-indent: 2em;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3;
    overflow: hidden;
}
.pan-card {
    display: grid;
    grid-template-columns: 58px 1fr 124px;
    gap: 16px; align-items: center;
    background: #f1f3f6; border-radius: 14px;
    padding: 14px 16px; margin: 0 18px 18px;
}
.apk-icon {
    width: 58px; height: 58px; border-radius: 12px;
    background: #ecfdf5; display: flex; align-items: center;
    justify-content: center; border: 1px solid #bbf7d0; overflow: hidden;
}
.apk-icon img { width: 46px; height: 46px; object-fit: contain; transition: transform .18s ease; }
.pan-card:hover .apk-icon img { transform: scale(1.07); }
.pan-date-single { display: block; color: #7b8493; font-size: 15px; }
.pan-date-single b { color: #6b7280; font-weight: 500; }
.open-btn {
    height: 48px; margin: 0; border-radius: 24px;
    background: linear-gradient(90deg, #10b981, #059669);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 800; color: #fff;
    box-shadow: 0 8px 18px rgba(5,150,105,.28);
    transition: transform .18s ease;
}
.pan-card:hover .open-btn { transform: scale(1.04); }
/* 核心亮点 — 双列网格，计数器自动编号 */
.features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    counter-reset: feature-num;
    padding: 0 18px 18px;
}
.features > div {
    position: relative;
    background: linear-gradient(180deg, #fbfcfd, #f6f8fb);
    border-radius: 10px;
    padding: 14px 15px 14px 16px;
    overflow: hidden;
    counter-increment: feature-num;
}
.features > div::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: #34d399;
}
.features h3 {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #111827;
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.4;
    max-height: 2.8em;
    overflow: hidden;
}
.features h3::before {
    content: counter(feature-num);
    width: 24px; height: 24px; border-radius: 8px;
    background: #ecfdf5; color: #047857;
    display: grid; place-items: center;
    font-size: 13px; font-weight: 800;
    flex: 0 0 auto;
}
.features p {
    margin: 0;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.7;
    max-height: 3.4em;
    overflow: hidden;
}
/* 热门资源图片包装 */
.hot-img { display: block; }

/* ==================== 404 页面 ==================== */
.page-404 { display: flex; align-items: center; justify-content: center; text-align: center; max-width: 600px; }
.page-404 .e404-wrap { padding: 40px 18px; transform: translateY(-10%); }
.page-404 .e404-code { font-size: 72px; color: #34d399; margin: 0 0 8px; }
.page-404 .e404-msg { font-size: 18px; color: #6b7280; margin: 0 0 32px; }
.e404-links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.e404-btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 28px; border-radius: 22px; font-size: 15px; text-decoration: none; }
.e404-btn-main { background: linear-gradient(90deg,#10b981,#059669); color: #fff; font-weight: 700; }
.e404-btn-sub { background: #f1f5f9; color: #374151; font-weight: 600; }
.e404-btn-main:hover { filter: brightness(1.1); }
.e404-btn-sub:hover { background: #e5e7eb; }
