/* ============================================================
   极软库 - 软件下载站样式（仿 hapnext.cn 风格）
   ============================================================ */

:root {
    --primary: #2196f3;
    --primary-dark: #1976d2;
    --primary-light: #e3f2fd;
    --primary-gradient: linear-gradient(145deg, #00a4ff 22%, #67c7fc 100%);
    --accent: #FF6B35;
    --bg: #f0f2f5;
    --card-bg: #ffffff;
    --text: #212121;
    --text-secondary: #666666;
    --text-light: #999999;
    --border: #e8ecf1;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
    --radius: 15px;
    --radius-sm: 8px;
    --transition: 0.3s ease;
    --header-bg: rgba(255, 255, 255, 0.92);
    --card-subtle: #fbfcfe;
    --card-border: #eef1f5;
    --divider: #f0f2f5;
    --input-bg: #f7f9fc;
    --tab-bg: #f4f6f9;
}

html[data-theme="dark"] {
    --primary: #42a5f5;
    --primary-dark: #67c7fc;
    --primary-light: rgba(66, 165, 245, 0.16);
    --bg: #121417;
    --card-bg: #1d2126;
    --card-subtle: #23272d;
    --card-border: #2b3037;
    --divider: #2a2e34;
    --input-bg: #23272d;
    --tab-bg: #262b31;
    --header-bg: rgba(24, 27, 31, 0.92);
    --text: #e8eaed;
    --text-secondary: #a9b1b9;
    --text-light: #78828c;
    --border: #2b3037;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.55);
}

html[data-theme="dark"] .badge-featured { background: rgba(255, 193, 7, 0.18); color: #ffd666; }
html[data-theme="dark"] .badge-hot { background: rgba(220, 53, 69, 0.22); color: #ff8f96; }
html[data-theme="dark"] .badge-new { background: rgba(40, 167, 69, 0.2); color: #6fdc92; }
html[data-theme="dark"] .badge-light { background: rgba(23, 162, 184, 0.2); color: #6fd5e8; }
html[data-theme="dark"] .badge-ai { background: rgba(171, 71, 188, 0.22); color: #d7a6f0; }

.theme-toggle {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--tab-bg);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
}

.theme-toggle:hover { color: var(--primary); background: var(--primary-light); transform: rotate(15deg); }

.theme-toggle svg { width: 18px; height: 18px; display: block; }
.theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

* { box-sizing: border-box; }

html { scrollbar-gutter: stable; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }

/* ==================== 头部 ==================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 var(--border);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 21px;
    font-weight: 800;
    color: var(--text);
    flex-shrink: 0;
}
.site-logo:hover { color: var(--text); }

.logo-mark {
    width: 30px;
    height: 30px;
    display: block;
}

.site-logo em { font-style: normal; color: var(--primary); }

.header-search {
    flex: 1;
    max-width: 560px;
    margin: 0 auto;
    position: relative;
}

.header-search input {
    width: 100%;
    height: 38px;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    padding: 0 16px 0 40px;
    font-size: 14px;
    background: var(--input-bg);
    color: var(--text);
    outline: none;
    transition: var(--transition);
}

.header-search input:focus {
    border-color: var(--primary);
    background: var(--card-bg);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.12);
}

.header-search .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    display: flex;
    align-items: center;
    pointer-events: none;
}

.search-icon svg { width: 16px; height: 16px; display: block; }

.search-panel .search-icon { align-self: center; flex-shrink: 0; color: var(--text-light); display: flex; align-items: center; }

.main-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.main-nav a {
    padding: 7px 14px;
    border-radius: 18px;
    color: var(--text-secondary);
    font-size: 14.5px;
    font-weight: 500;
    transition: var(--transition);
}

.main-nav a:hover { color: var(--primary); background: var(--primary-light); }
.main-nav a.active { color: var(--primary); background: var(--primary-light); }

/* ==================== 公告条 ==================== */
.announcement-bar {
    max-width: 1400px;
    margin: 16px auto 0;
    padding: 0 24px;
}

.announcement-inner {
    background: linear-gradient(90deg, #e8f6ff, #f2fbff);
    border: 1px solid #d5edff;
    border-radius: var(--radius);
    padding: 10px 18px;
    color: #0a7bc4;
    font-size: 14px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* ==================== 主容器 ==================== */
.home-layout {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 24px 60px;
}

.category-sections {
    min-width: 0;
}

/* 横向分类导航（首页，sticky 于第一个分类上方） */
.category-nav-horizontal {
    position: sticky;
    top: 72px;
    z-index: 90;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 10px 16px;
    margin-bottom: 24px;
}

.category-nav-horizontal .category-nav-list {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.category-nav-horizontal .category-nav-list::-webkit-scrollbar { display: none; }

.category-nav-horizontal .category-nav-list a {
    display: block;
    white-space: nowrap;
    padding: 6px 16px;
    border-radius: 17px;
    color: var(--text-secondary);
    font-size: 14px;
    transition: var(--transition);
}

.category-nav-horizontal .category-nav-list a:hover { background: var(--primary-light); color: var(--primary); }
.category-nav-horizontal .category-nav-list a.active { background: var(--primary-gradient); color: #fff; font-weight: 600; }

/* ==================== 分类区块 ==================== */
.category-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px 22px 26px;
    margin-bottom: 24px;
    scroll-margin-top: 84px;
}

.cat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.cat-title-group { display: flex; align-items: baseline; gap: 10px; }

.category-section-title { margin: 0; font-size: 21px; font-weight: 700; }
.category-section-title a { color: var(--text); }
.category-section-title a:hover { color: var(--primary); }

.cat-subtitle { font-size: 13px; color: var(--text-light); }

.cat-view-all {
    font-size: 13.5px;
    color: var(--text-light);
    flex-shrink: 0;
    transition: var(--transition);
}
.cat-view-all:hover { color: var(--primary); }

/* 子标签筛选 */
.cat-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.cat-tab {
    padding: 5px 14px;
    border-radius: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--tab-bg);
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.cat-tab:hover { color: var(--primary); background: var(--primary-light); }
.cat-tab.active { background: var(--primary-gradient); color: #fff; font-weight: 500; }

/* ==================== 软件卡片 ==================== */
.software-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 14px;
}

.software-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
    background: var(--card-subtle);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 20px;
    color: var(--text);
    transition: var(--transition);
    overflow: hidden;
}

.software-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: #d9ecff;
    color: var(--text);
}

.software-card-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
    border-radius: 18px;
    background: var(--card-bg);
    overflow: hidden;
    flex-shrink: 0;
}

.software-card-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.software-card-info { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; }

.software-card-info h3 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 600;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-badges { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; min-height: 0; }

.card-badge {
    font-size: 10.5px;
    padding: 1px 7px;
    border-radius: 4px;
    font-weight: 500;
    line-height: 1.6;
}

.badge-cat { background: var(--primary-light); color: var(--primary); font-size: 11.5px; padding: 1.5px 9px; }

.badge-featured { background: #fff3cd; color: #856404; }
.badge-hot { background: #f8d7da; color: #721c24; }
.badge-new { background: #d4edda; color: #155724; }
.badge-light { background: #d1ecf1; color: #0c5460; }
.badge-ai { background: #f3e8ff; color: #6b21a8; }

.card-desc {
    margin: 0;
    font-size: 12px;
    color: var(--text-light);
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.software-card.hidden { display: none; }

/* ==================== Hero 横幅 ==================== */
.hero-banner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px 0;
}

.hero-inner {
    position: relative;
    border-radius: 16px;
    background: var(--primary-gradient);
    color: #fff;
    padding: 34px 40px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.hero-inner::after {
    content: "";
    position: absolute;
    right: -60px;
    top: -80px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
}

.hero-inner::before {
    content: "";
    position: absolute;
    right: 120px;
    bottom: -120px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.hero-text h1 { margin: 0 0 8px; font-size: 26px; letter-spacing: 1px; position: relative; z-index: 1; }
.hero-text p { margin: 0; font-size: 14.5px; opacity: 0.92; position: relative; z-index: 1; }

.hero-tags { position: relative; z-index: 1; display: flex; gap: 10px; flex-wrap: wrap; }

.hero-tags span {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
}

/* ==================== 面包屑 ==================== */
.breadcrumb {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 24px 0;
    font-size: 13px;
    color: var(--text-light);
}

.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { margin: 0 8px; color: #c5cdd6; }

/* ==================== 软件详情页 ==================== */
.detail-page {
    max-width: 1100px;
    margin: 16px auto 60px;
    padding: 0 24px;
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.detail-main { flex: 1; min-width: 0; }

/* 详情页：hero 全宽横跨在侧栏上方 */
.detail-hero-wrap {
    max-width: 1100px;
    margin: 16px auto 0;
    padding: 0 24px;
}

.detail-hero {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
    display: flex;
    gap: 22px;
    align-items: flex-start;
}

.detail-logo {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--card-bg);
}

.detail-logo-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    align-self: stretch;
}

.detail-logo-col .like-btn {
    margin-top: auto;
    width: 100px;
    padding: 8px 0;
    font-size: 13px;
    justify-content: center;
}

.detail-cta .like-m { display: none; }

.detail-logo img { width: 100%; height: 100%; object-fit: cover; }

.detail-head-info { flex: 1; min-width: 0; }

.detail-head-info h1 {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.35;
}

.detail-head-info h1 small { font-size: 15px; color: var(--text-light); font-weight: 500; margin-left: 8px; }

.detail-sub { color: var(--text-secondary); font-size: 14.5px; margin: 0 0 10px; }

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 12.5px;
    color: var(--text-light);
}

.detail-meta .chip {
    background: var(--tab-bg);
    border-radius: 12px;
    padding: 2px 10px;
    color: var(--text-secondary);
}

.detail-meta .chip.link { color: var(--primary); background: var(--primary-light); }

.detail-badges { display: inline-flex; gap: 5px; margin-right: 6px; }

/* 详情区块 */
.detail-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px 28px;
    margin-top: 18px;
}

.detail-section h2 {
    margin: 0 0 14px;
    font-size: 18px;
    line-height: 1.4;
}

.detail-main .detail-section:first-child { margin-top: 0; }

.detail-section p { margin: 0 0 12px; color: var(--text-secondary); font-size: 14.5px; }
.detail-section p:last-child { margin-bottom: 0; }

/* 信息表格 */
.info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.info-table th, .info-table td {
    text-align: left;
    padding: 9px 12px;
    border-bottom: 1px solid var(--divider);
}

.info-table th { color: var(--text-light); font-weight: 500; width: 110px; white-space: nowrap; }
.info-table td { color: var(--text-secondary); }
.info-table tr:last-child th, .info-table tr:last-child td { border-bottom: none; }

/* 下载按钮 */
.download-list { display: flex; flex-wrap: wrap; gap: 12px; }

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 26px;
    border-radius: 10px;
    background: var(--primary-gradient);
    color: #fff;
    font-size: 14.5px;
    font-weight: 500;
    transition: var(--transition);
}

.download-btn:hover {
    transform: translateY(-2px);
    color: #fff;
}

.download-btn.dl-alt {
    background: var(--card-bg);
    color: var(--primary);
    border: 1.5px solid var(--primary);
    box-shadow: none;
}
.download-btn.dl-alt:hover { background: var(--primary-light); color: var(--primary-dark); }

.download-tip { margin-top: 12px; font-size: 12.5px; color: var(--text-light); }

/* 教程链接 */
.intros-list { list-style: none; margin: 0; padding: 0; }

.intros-list li {
    padding: 9px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 14px;
}

.intros-list li:last-child { border-bottom: none; }
.intros-list a { color: var(--text-secondary); }
.intros-list a:hover { color: var(--primary); }

/* 相关推荐 */
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.related-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    background: var(--card-subtle);
    transition: var(--transition);
    color: var(--text);
    min-width: 0;
}

.related-item:hover { border-color: #d9ecff; box-shadow: var(--shadow); color: var(--text); transform: translateY(-2px); }

.related-item img { width: 38px; height: 38px; border-radius: 9px; object-fit: cover; flex-shrink: 0; }

.related-item .r-name {
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.related-item .r-desc {
    font-size: 11.5px;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 详情页侧栏 */
.detail-aside {
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 84px;
}

/* 头部主操作区（参考 crxsoso） */
.detail-cta {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    min-width: 190px;
    flex-shrink: 0;
    align-self: center;
}

.detail-cta .download-btn { justify-content: center; white-space: nowrap; }

.download-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.overview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.overview-table th,
.overview-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.overview-table tr:last-child th,
.overview-table tr:last-child td { border-bottom: none; }

.overview-table th {
    width: 90px;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

.overview-table td { color: var(--text); }
.overview-table td a { color: var(--primary); }

.cat-nav { display: flex; flex-wrap: wrap; gap: 8px; }

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    line-height: 2;
}

.tag-cloud a {
    font-size: 13px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.tag-cloud a:nth-child(5n+1) { color: #0a84ff; }
.tag-cloud a:nth-child(5n+2) { color: #8e6df5; }
.tag-cloud a:nth-child(5n+3) { color: #16a34a; }
.tag-cloud a:nth-child(5n+4) { color: #ea580c; }
.tag-cloud a:nth-child(5n+5) { color: #db2777; }

.tag-cloud a:nth-child(5n+1):nth-child(-n+6),
.tag-cloud a:nth-child(5n+2):nth-child(-n+6),
.tag-cloud a:nth-child(5n+3):nth-child(-n+6),
.tag-cloud a:nth-child(5n+4):nth-child(-n+6),
.tag-cloud a:nth-child(5n+5):nth-child(-n+6) {
    font-size: 15px;
    font-weight: 600;
}

.tag-cloud a:hover { opacity: 0.75; }

:root[data-theme="dark"] .tag-cloud a:nth-child(5n+1) { color: #4da3ff; }
:root[data-theme="dark"] .tag-cloud a:nth-child(5n+2) { color: #a68bff; }
:root[data-theme="dark"] .tag-cloud a:nth-child(5n+3) { color: #34d399; }
:root[data-theme="dark"] .tag-cloud a:nth-child(5n+4) { color: #fb923c; }
:root[data-theme="dark"] .tag-cloud a:nth-child(5n+5) { color: #f472b6; }

.like-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: var(--card-bg);
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.like-btn svg { width: 15px; height: 15px; }

.like-btn:hover { color: #e0245e; border-color: #e0245e; transform: translateY(-1px); }

.like-btn.liked { color: #e0245e; border-color: #e0245e; background: rgba(224, 36, 94, 0.08); }

.like-btn.liked svg { fill: currentColor; }

.cta-alt {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cta-alt a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 9px 15px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: var(--card-bg);
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 500;
    transition: var(--transition);
}

.cta-alt a:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-light); transform: translateY(-1px); }

/* 信息表（侧栏紧凑版） */
.info-table.compact { font-size: 13px; }
.info-table.compact th { width: 78px; padding: 7px 8px; }
.info-table.compact td { padding: 7px 8px; word-break: break-all; }

.aside-box {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 20px;
    margin-bottom: 16px;
}

.aside-box h3 { margin: 0 0 12px; font-size: 15px; }

.aside-list { list-style: none; margin: 0; padding: 0; }

.aside-list li {
    padding: 6px 0;
    border-bottom: 1px dashed var(--divider);
    font-size: 13.5px;
}

.aside-list li:last-child { border-bottom: none; }
.aside-list a { color: var(--text-secondary); display: flex; align-items: center; gap: 8px; }
.aside-list a:hover { color: var(--primary); }
.aside-list img { width: 22px; height: 22px; border-radius: 5px; object-fit: cover; }

/* ==================== 列表/关于页 ==================== */
.page-wrap {
    max-width: 1100px;
    margin: 16px auto 60px;
    padding: 0 24px;
}

.page-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px 32px;
}

.page-card h1 { margin: 0 0 8px; font-size: 24px; }
.page-card .page-sub { color: var(--text-light); font-size: 14px; margin: 0 0 20px; }
.page-card h2 { font-size: 18px; margin: 24px 0 10px; }
.page-card p { color: var(--text-secondary); font-size: 14.5px; }
.page-card ul { padding-left: 20px; color: var(--text-secondary); font-size: 14.5px; }

/* 日期分组（最近更新页） */
.recent-date-heading {
    font-size: 18px;
    font-weight: 700;
    color: #555;
    margin: 26px 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.recent-date-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-gradient);
    box-shadow: 0 0 6px rgba(0, 164, 255, 0.4);
    flex-shrink: 0;
}

/* ==================== 搜索结果浮层 ==================== */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 200;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 90px 20px 20px;
}

.search-overlay.open { display: flex; }

.search-panel {
    background: var(--card-bg);
    border-radius: 14px;
    width: 100%;
    max-width: 560px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.search-panel .sp-head { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; gap: 10px; }

.search-panel input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    background: transparent;
    color: var(--text);
}

.search-panel .sp-close {
    border: none;
    background: none;
    font-size: 18px;
    color: var(--text-light);
    cursor: pointer;
}

.search-results { overflow-y: auto; padding: 8px; }

.search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text);
}

.search-item:hover { background: var(--primary-light); color: var(--text); }
.search-item img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; }
.search-item .si-name { font-size: 14px; font-weight: 600; }
.search-item .si-desc { font-size: 12px; color: var(--text-light); }
.search-empty { text-align: center; color: var(--text-light); padding: 30px 0; font-size: 14px; }

/* ==================== 返回顶部 ==================== */
.back-top {
    position: fixed;
    right: 28px;
    bottom: 40px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--primary-gradient);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 164, 255, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 150;
}

.back-top.show { opacity: 1; visibility: visible; }
.back-top:hover { transform: translateY(-3px); }

/* ==================== 页脚 ==================== */
.site-footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    padding: 26px 24px 34px;
    text-align: center;
    color: var(--text-light);
    font-size: 13px;
    margin-top: 20px;
}

.site-footer a { color: var(--text-light); margin: 0 4px; }
.site-footer a:hover { color: var(--primary); }
.site-footer .fl-sep { color: #d8dee5; margin: 0 4px; }
.site-footer .disclaimer { margin-top: 10px; font-size: 12px; color: #98a4b0; max-width: 900px; margin-left: auto; margin-right: auto; }

/* ==================== 首页筛选布局（参考 filter.php） ==================== */
.filter-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px 60px;
}

.filter-main { min-width: 0; }

.filter-head {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 20px;
}

.filter-title-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.filter-title { margin: 0; font-size: 20px; color: var(--text); }
.filter-count { font-size: 13px; color: var(--text-light); white-space: nowrap; }

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.chips-tags { margin-top: 10px; }
.chips-tags .filter-chip { padding: 4px 11px; font-size: 12px; border-radius: 13px; }

.filter-title-right { display: flex; align-items: center; gap: 16px; }

.sort-switch { display: flex; gap: 16px; }

.sort-btn {
    border: none;
    background: none;
    padding: 2px 0;
    position: relative;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.sort-btn::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    height: 2px;
    border-radius: 2px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: var(--transition);
}

.sort-btn:hover { color: var(--primary); }

.sort-btn.active { color: var(--primary); font-weight: 600; background: none; }

.sort-btn.active::after { transform: scaleX(1); }

.filter-chip {
    padding: 5px 14px;
    border-radius: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--tab-bg);
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.filter-chip:hover { background: var(--primary-light); color: var(--primary); }
.filter-chip.active { background: var(--primary-gradient); color: #fff; font-weight: 600; }

.filter-software-grid { margin-top: 20px; }

@media (max-width: 900px) {
    .filter-page { padding: 16px 14px 50px; }
}

/* ==================== 响应式 ==================== */
@media (max-width: 1100px) {
    .detail-page { flex-wrap: wrap; }
    .detail-aside { display: block; width: 100%; position: static; }
}

@media (max-width: 768px) {
    .header-inner { padding: 0 14px; gap: 10px; }
    .header-search { flex: 1; max-width: none; }
    .main-nav a { padding: 6px 9px; font-size: 13.5px; }
    .home-layout { padding: 14px 14px 40px; gap: 0; }
    .announcement-bar { padding: 0 14px; }
    .announcement-inner { font-size: 12.5px; }
    .hero-banner { padding: 12px 14px 0; }
    .hero-inner { padding: 22px 22px; flex-direction: column; align-items: flex-start; }
    .hero-text h1 { font-size: 20px; }
    .category-section { padding: 16px 14px 18px; }
    .category-section-title { font-size: 18px; }
    .software-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
    .breadcrumb { padding: 12px 14px 0; }
    .detail-page { padding: 0 14px; margin-top: 12px; }
    .detail-hero-wrap { padding: 0 14px; margin-top: 12px; }
    .detail-logo-col .like-btn { display: none; }
    .detail-cta .like-m { display: inline-flex; width: 100%; }
    .detail-hero { flex-direction: column; align-items: center; text-align: center; padding: 22px 16px; }
    .detail-badges, .detail-meta { justify-content: center; }
    .detail-section { padding: 18px 16px; }
    .detail-cta { align-self: stretch; min-width: 0; }
    .cta-alt { flex-direction: row; flex-wrap: wrap; justify-content: center; }
    .page-card { padding: 20px 16px; }
    .download-list { justify-content: center; }
    .back-top { right: 16px; bottom: 24px; }
}
