@charset "utf-8";

/* =========================================================
   资源库主题 · main.css
   ========================================================= */

/* ---------- 变量 ---------- */
:root {
    --primary: #007bf5;
    --primary-hover: #1b8eff;
    --primary-soft: rgba(0, 123, 245, .08);
    --bg: #f2f5f9;
    --card: #ffffff;
    --card-sub: #fbfcfe;
    --text: #2c2c2c;
    --text-2: #666666;
    --text-3: #999999;
    --line: #f1f3f6;
    --line-2: #e9edf2;
    --radius: 6px;
    --radius-lg: 10px;
    --shadow: 0 2px 12px rgba(17, 38, 71, .05);
    --shadow-hover: 0 22px 34px -22px rgba(17, 38, 71, .16);
    --head-h: 70px;
    --container: 1300px;
    --ease: cubic-bezier(.32, .72, .33, .99);
}

[data-theme="night"] {
    --bg: #1f2023;
    --card: #2b2d31;
    --card-sub: #313338;
    --text: #d6d9de;
    --text-2: #a9adb4;
    --text-3: #7c8188;
    --line: #3a3d42;
    --line-2: #44474d;
    --shadow: 0 2px 12px rgba(0, 0, 0, .25);
    --shadow-hover: 0 22px 34px -22px rgba(0, 0, 0, .6);
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    padding: var(--head-h) 0 0;
    background: var(--bg);
    color: var(--text);
    font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    transition: background .3s, color .3s;
}

a { color: inherit; text-decoration: none; transition: color .25s var(--ease); }
a:hover { color: var(--primary); }

ul, ol { margin: 0; padding: 0; list-style: none; }
img { border: 0; max-width: 100%; vertical-align: middle; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; }
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }

.clearfix::after { content: ""; display: block; clear: both; }

.page-body { padding: 24px 0 44px; }

/* ---------- 卡片 ---------- */
.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
}

.card-title h3 {
    position: relative;
    padding-left: 12px;
    font-size: 17px;
    line-height: 30px;
    white-space: nowrap;
}

.card-title h3::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 4px;
    height: 16px;
    margin-top: -8px;
    border-radius: 3px;
    background: var(--primary);
}

.title-more {
    font-size: 12px;
    color: var(--text-3);
    white-space: nowrap;
}
.title-more:hover { color: var(--primary); }

/* ---------- 按钮 ---------- */
.btn-primary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 22px;
    height: 40px;
    border-radius: 22px;
    font-size: 14px;
    border: 1px solid transparent;
    transition: all .25s var(--ease);
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--text-2); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

/* =========================================================
   顶部导航
   ========================================================= */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--head-h);
    background: rgba(255, 255, 255, .82);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    box-shadow: 0 1px 0 rgba(17, 38, 71, .06), 0 6px 18px -12px rgba(17, 38, 71, .18);
    transition: height .3s var(--ease), background .3s;
}

[data-theme="night"] .site-header {
    background: rgba(30, 31, 34, .86);
    box-shadow: 0 1px 0 rgba(0, 0, 0, .4);
}

.site-header.shrink { height: 56px; }

.header-inner {
    display: flex;
    align-items: center;
    gap: 26px;
    height: 100%;
}

.logo { flex: 0 0 auto; display: flex; align-items: center; }
.logo a { display: flex; align-items: center; gap: 8px; height: 100%; }
.logo img { height: 40px; width: auto; display: block; transition: height .3s var(--ease); }
.site-header.shrink .logo img { height: 32px; }

.logo-text {
    font-size: 21px;
    font-weight: 700;
    letter-spacing: .5px;
    color: var(--text);
    white-space: nowrap;
    background: linear-gradient(92deg, var(--primary), #4aa8ff 70%, #7cc4ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-nav { flex: 1 1 auto; min-width: 0; }
.main-nav ul { display: flex; align-items: center; gap: 4px; }

.nav-item { position: relative; }

.nav-item > a {
    display: block;
    padding: 0 15px;
    line-height: 36px;
    font-size: 15px;
    color: var(--text-2);
    border-radius: 18px;
    white-space: nowrap;
    transition: all .25s var(--ease);
}

.nav-item > a:hover { color: var(--primary); background: var(--primary-soft); }
.nav-item.active > a { background: var(--primary); color: #fff; }

.nav-child {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 150px;
    padding: 8px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: 0 12px 30px -8px rgba(17, 38, 71, .2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: all .25s var(--ease);
}
.nav-item.has-child:hover .nav-child { opacity: 1; visibility: visible; transform: none; }
.nav-child li a {
    display: block;
    padding: 0 12px;
    line-height: 34px;
    font-size: 14px;
    border-radius: 6px;
}
.nav-child li a:hover { background: var(--primary-soft); color: var(--primary); }
.nav-child li { display: block; }
.nav-child li a.nav-all { color: var(--text-3); }

.header-tools { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; margin-left: auto; }

.tool {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 0;
    background: transparent;
    border-radius: 50%;
    color: var(--text);
    transition: all .25s var(--ease);
}
.tool svg { width: 20px; height: 20px; fill: currentColor; }
.tool:hover { background: var(--primary-soft); color: var(--primary); }

.tool .ico-sun { display: none; }
[data-theme="night"] .tool .ico-moon { display: none; }
[data-theme="night"] .tool .ico-sun { display: block; }

.menu-btn { display: none; }

/* 移动端抽屉 */
.mobile-nav {
    position: fixed;
    top: var(--head-h);
    left: 0;
    right: 0;
    max-height: 0;
    overflow: hidden;
    background: var(--card);
    box-shadow: 0 12px 24px -16px rgba(17, 38, 71, .4);
    transition: max-height .35s var(--ease);
}
.mobile-nav.open { max-height: 70vh; overflow-y: auto; }
.mobile-nav ul { padding: 10px 16px 16px; }
.mobile-nav .nav-item > a { padding: 0 14px; line-height: 44px; font-size: 15px; }
.mobile-nav .nav-item { position: static; display: block; }
.mobile-nav .nav-item > a { display: inline-flex; align-items: center; width: calc(100% - 44px); }
.mobile-nav .nav-child {
    position: static;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    padding: 0 0 6px 14px;
    background: transparent;
}
.mobile-nav .nav-item.open .nav-child { display: block; }
.nav-arrow {
    display: none;
    width: 34px;
    height: 34px;
    margin-left: 6px;
    border-radius: 50%;
    color: var(--text-3);
    background: transparent;
    border: 0;
    vertical-align: middle;
}
.nav-arrow svg { width: 16px; height: 16px; fill: currentColor; transition: transform .25s var(--ease); }
.mobile-nav .nav-arrow { display: inline-flex; align-items: center; justify-content: center; }
.mobile-nav .nav-item.open .nav-arrow svg { transform: rotate(180deg); }

/* ---------- 搜索弹层 ---------- */
.search-mask {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 14vh 20px 0;
    background: rgba(11, 18, 30, .5);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all .28s var(--ease);
}
.search-mask.open { opacity: 1; visibility: visible; }

.search-panel {
    position: relative;
    width: 100%;
    max-width: 680px;
    padding: 34px 36px 30px;
    background: var(--card);
    border-radius: 14px;
    box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .35);
    transform: translateY(-14px) scale(.98);
    transition: transform .28s var(--ease);
}
.search-mask.open .search-panel { transform: none; }

.search-panel h3 { font-size: 22px; margin-bottom: 18px; }

.search-close {
    position: absolute;
    top: 14px;
    right: 18px;
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    font-size: 26px;
    line-height: 1;
    color: var(--text-3);
    border-radius: 50%;
}
.search-close:hover { color: var(--primary); background: var(--primary-soft); }

.search-form { position: relative; }
.search-form input {
    width: 100%;
    height: 48px;
    padding: 0 56px 0 18px;
    border: 1px solid var(--line-2);
    border-radius: 24px;
    background: var(--bg);
    outline: none;
    transition: all .25s var(--ease);
}
.search-form input:focus { border-color: var(--primary); background: var(--card); box-shadow: 0 0 0 4px var(--primary-soft); }
.search-form button {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.search-form button:hover { background: var(--primary-hover); }
.search-form button svg { width: 18px; height: 18px; fill: currentColor; }

.search-hot { margin-top: 22px; }
.search-hot p { margin: 0 0 10px; font-size: 13px; color: var(--text-3); }
.search-hot a {
    display: inline-block;
    margin: 0 8px 8px 0;
    padding: 4px 12px;
    font-size: 13px;
    border-radius: 14px;
    background: var(--card-sub);
    color: var(--text-2);
}
.search-hot a:hover { background: var(--primary); color: #fff; }

/* =========================================================
   首页顶部：快捷图标 / 广告
   ========================================================= */
.quick-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 22px;
}

.quick-item {
    flex: 1 1 110px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 16px 6px 14px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: all .3s var(--ease);
}
.quick-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    color: var(--primary);
}
.quick-ico {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--card);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .5s var(--ease);
}
.quick-item:hover .quick-ico { transform: rotate(360deg); }
.quick-ico img { width: 100%; height: 100%; object-fit: cover; }
.quick-name {
    font-size: 14px;
    color: var(--text-2);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.quick-item:hover .quick-name { color: var(--primary); }

.ad-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 22px;
}
.ad-item {
    position: relative;
    display: block;
    height: 70px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--card);
}
.ad-item img { width: 100%; height: 100%; object-fit: cover; }
.ad-item i {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 30px;
    height: 20px;
    font-size: 11px;
    font-style: normal;
    line-height: 20px;
    text-align: center;
    color: #fff;
    background: rgba(0, 123, 245, .35);
    border-radius: 6px 0 0 0;
}

.text-link-card {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 26px;
    padding: 12px 18px;
    margin-bottom: 22px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.text-link-card a { font-size: 13px; color: var(--text-2); }
.text-link-card a:hover { color: var(--primary); }

/* =========================================================
   首页主体两栏
   ========================================================= */
.index-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 20px;
    align-items: start;
}

.index-left { min-width: 0; display: flex; flex-direction: column; gap: 20px; }

/* ---------- 最近更新 ---------- */
.card-stat { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--text-3); }
.card-stat span { display: inline-flex; align-items: center; gap: 5px; }
.card-stat b { font-weight: 600; color: var(--text-2); }
.card-stat .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ff5722;
    box-shadow: 0 0 0 3px rgba(255, 87, 34, .15);
}

.update-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 20px;
    padding: 16px 20px 20px;
}

.update-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 8px 12px;
    background: var(--card-sub);
    border-radius: 30px 0 0 30px;
    transition: all .25s var(--ease);
}
.update-item:nth-child(2n) { border-radius: 0 30px 30px 0; }
.update-item:hover { background: var(--primary-soft); }

.u-ico {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--card);
}
.u-ico img { width: 100%; height: 100%; object-fit: cover; }

.u-flag {
    flex: 0 0 auto;
    padding-right: 10px;
    font-size: 12px;
    color: var(--text-3);
    border-right: 1px solid var(--line-2);
    line-height: 12px;
}
.u-flag.is-top { color: #ff5722; }

.u-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 14px;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.u-title:hover { color: var(--primary); }

.u-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 1px;
    height: 24px;
    padding: 0 10px;
    font-size: 12px;
    color: var(--text-2);
    border: 1px solid var(--line-2);
    border-radius: 14px;
    transition: all .25s var(--ease);
}
.u-btn svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; }
.u-btn:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

.empty-state { grid-column: 1 / -1; padding: 40px 0; text-align: center; color: var(--text-3); }
.empty-state span { font-size: 15px; color: var(--text-2); }
.empty-state p { margin: 6px 0 0; font-size: 13px; }

/* ---------- 分页 ---------- */
.page {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 20px 22px;
    font-size: 14px;
    border-top: 0;
}
.page a, .page span, .page em {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 8px;
    background: var(--card-sub);
    color: var(--text-2);
    font-style: normal;
    transition: all .25s var(--ease);
}
.page a:hover { background: var(--primary); color: #fff; }
.page .current, .page .on, .page a.current { background: var(--primary); color: #fff; }

/* =========================================================
   下载专区
   ========================================================= */
.zone-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.zone-tabs::-webkit-scrollbar { display: none; }
.zone-tabs a {
    flex: 0 0 auto;
    padding: 5px 12px;
    font-size: 13px;
    color: var(--text-2);
    border-radius: 14px;
    background: var(--card-sub);
    white-space: nowrap;
}
.zone-tabs a:hover { background: var(--primary); color: #fff; }

.zone-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 30px;
    padding: 8px 20px 12px;
}

.zone-item {
    display: flex;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}
.zone-item:last-child, .zone-item:nth-last-child(2):nth-child(odd) { border-bottom: 0; }

.z-ico {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--card);
}
.z-ico img { width: 100%; height: 100%; object-fit: cover; }

.z-body { flex: 1 1 auto; min-width: 0; position: relative; padding-right: 92px; }
.z-body h4 { font-size: 15px; line-height: 20px; margin-bottom: 6px; }
.z-body h4 a {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 500;
}
.z-body p { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }
.z-body p .sep { color: var(--line-2); }
.z-body .stars { font-style: normal; color: #ffb80f; letter-spacing: 1px; }

.z-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: inline-block;
    padding: 4px 15px;
    font-size: 12px;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 14px;
    transition: all .25s var(--ease);
}
.z-btn:hover { background: var(--primary); color: #fff; }

/* =========================================================
   侧边栏
   ========================================================= */
.index-side {
    position: sticky;
    top: calc(var(--head-h) + 16px);
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.side-card .tool-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px 6px;
    padding: 18px 10px 14px;
}

.tool-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-2);
    text-align: center;
}
.tool-cell img {
    width: 56px;
    height: 56px;
    border-radius: 15px;
    border: 1px solid var(--line);
    object-fit: cover;
    transition: transform .3s var(--ease);
}
.tool-cell:hover { color: var(--primary); }
.tool-cell:hover img { transform: translateY(-3px); }

/* 登录卡 */
.login-card {
    position: relative;
    padding: 34px 24px 26px;
    text-align: center;
    background: linear-gradient(160deg, #eaf4ff 0%, #f7fbff 46%, #ffffff 100%);
    overflow: hidden;
}
[data-theme="night"] .login-card { background: linear-gradient(160deg, #23303f, #2b2d31 60%); }
.login-card::after {
    content: "";
    position: absolute;
    right: -40px;
    top: -40px;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 123, 245, .14), transparent 70%);
}
.login-thumb {
    width: 62px;
    height: 62px;
    margin: 0 auto 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(140deg, var(--primary), #4fb0ff);
    box-shadow: 0 10px 20px -10px rgba(0, 123, 245, .8);
}
.login-thumb svg { width: 34px; height: 34px; }
.login-title { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.login-desc { margin: 0 0 16px; font-size: 12px; color: var(--text-3); line-height: 1.7; }
.login-btn {
    display: block;
    height: 38px;
    line-height: 38px;
    text-align: center;
    border-radius: 19px;
    background: var(--primary);
    color: #fff;
    font-size: 14px;
    box-shadow: 0 12px 22px -14px rgba(0, 123, 245, .9);
}
.login-btn:hover { background: var(--primary-hover); color: #fff; }

/* 小工具 */
.widget-list { padding: 10px 18px 14px; }
.widget-list li { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.widget-list li:last-child { border-bottom: 0; }
.widget-list a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-2);
}
.widget-list a:hover { color: var(--primary); }
.widget-list em {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    font-size: 12px;
    font-style: normal;
    border-radius: 5px;
    background: var(--card-sub);
    color: var(--text-3);
}
.widget-list em.hot { background: var(--primary); color: #fff; }
.widget-list em.hot:nth-child(1) { background: #ff5722; }
.widget-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 18px 18px; }
.tag-cloud a {
    padding: 4px 12px;
    font-size: 12px;
    border-radius: 13px;
    background: var(--card-sub);
    color: var(--text-2);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tag-cloud a:hover { background: var(--primary); color: #fff; }

.widget-cate { padding: 8px 18px 14px; }
.widget-cate li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 0;
    font-size: 13px;
    color: var(--text-2);
    border-bottom: 1px dashed var(--line);
}
.widget-cate li:last-child a { border-bottom: 0; }
.widget-cate .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--primary); opacity: .6; }
.widget-cate em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--text-3); }

.widget-search { display: flex; gap: 8px; padding: 14px 18px 18px; }
.widget-search input {
    flex: 1;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--line-2);
    border-radius: 18px;
    background: var(--card-sub);
    outline: none;
}
.widget-search input:focus { border-color: var(--primary); background: var(--card); }
.widget-search button {
    flex: 0 0 auto;
    width: 56px;
    border: 0;
    border-radius: 18px;
    background: var(--primary);
    color: #fff;
}
.widget-search button:hover { background: var(--primary-hover); }

.archive-select {
    margin: 14px 18px 18px;
    width: calc(100% - 36px);
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--line-2);
    border-radius: 8px;
    background: var(--card-sub);
    outline: none;
}

.widget-custom { padding: 12px 18px 16px; font-size: 13px; color: var(--text-2); line-height: 1.8; }

.widget-link { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 12px 18px 18px; }
.widget-link a { font-size: 13px; color: var(--text-2); }
.widget-link a:hover { color: var(--primary); }

.side-ad { display: block; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.side-ad img { width: 100%; display: block; }
.side-ad:hover { transform: translateY(-2px); transition: transform .3s var(--ease); }

.side-sticky-tip {
    padding: 14px 18px;
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
    font-size: 12px;
    color: var(--text-3);
    line-height: 1.7;
}
.side-sticky-tip b { display: block; font-size: 14px; color: var(--text-2); margin-bottom: 2px; }

/* =========================================================
   列表页头部（分类 / 搜索 / 归档）
   ========================================================= */
.page-head {
    padding: 26px 0 4px;
    background: linear-gradient(180deg, rgba(0, 123, 245, .07), transparent);
    margin-bottom: 18px;
}
[data-theme="night"] .page-head { background: linear-gradient(180deg, rgba(0, 123, 245, .12), transparent); }

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-3);
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-2); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb em { font-style: normal; color: var(--text); }

.page-title { font-size: 26px; line-height: 1.4; }
.page-desc { margin: 6px 0 0; font-size: 13px; color: var(--text-3); }
.page-desc b { color: var(--primary); }

/* =========================================================
   文章页
   ========================================================= */
.article-breadcrumb { margin: 0 0 14px; }

.article-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 20px;
    align-items: start;
}
.article-main > .article-left:only-child,
.article-main.single-col { grid-template-columns: 1fr; }

.article-left { min-width: 0; display: flex; flex-direction: column; gap: 20px; }

.article-card { padding: 0; }

.article-title {
    padding: 26px 30px 10px;
    font-size: 25px;
    line-height: 1.5;
    font-weight: 600;
    word-break: break-word;
}
.article-title .flag-top {
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
    padding: 1px 8px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    border-radius: 5px;
    background: #ff5722;
    transform: translateY(-3px);
}

.article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 30px 20px;
    font-size: 13px;
    color: var(--text-3);
    border-bottom: 1px solid var(--line);
}
.article-meta a { color: var(--text-2); }
.article-meta a:hover { color: var(--primary); }
.article-meta .sep { color: var(--line-2); }
.article-meta .flag-edit {
    margin-left: auto;
    padding: 2px 10px;
    font-size: 12px;
    border: 1px solid var(--line-2);
    border-radius: 12px;
}

/* 软件信息卡 */
.soft-info {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 20px 30px 0;
    padding: 16px 20px;
    background: var(--card-sub);
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
}
.soft-ico {
    flex: 0 0 auto;
    width: 72px;
    height: 72px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--card);
}
.soft-ico img { width: 100%; height: 100%; object-fit: cover; }
.soft-data { flex: 1 1 auto; display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.soft-tag {
    padding: 4px 12px;
    font-size: 12px;
    color: var(--text-2);
    background: var(--card);
    border: 1px solid var(--line-2);
    border-radius: 13px;
}
.soft-star { color: #ffb80f; font-size: 14px; letter-spacing: 1px; padding: 4px 4px; }
.soft-download {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 22px;
    border-radius: 20px;
    background: var(--primary);
    color: #fff;
    font-size: 14px;
    box-shadow: 0 12px 22px -14px rgba(0, 123, 245, .9);
}
.soft-download svg { width: 17px; height: 17px; fill: currentColor; }
.soft-download:hover { background: var(--primary-hover); color: #fff; }

/* 正文排版 */
.article-body {
    padding: 22px 30px 8px;
    font-size: 16px;
    line-height: 1.95;
    color: var(--text);
    word-break: break-word;
    overflow: hidden;
}
.article-body p { margin: 0 0 16px; }
.article-body h2, .article-body h3, .article-body h4 {
    position: relative;
    margin: 30px 0 14px;
    padding-left: 14px;
    font-size: 18px;
    line-height: 1.6;
}
.article-body h2::before, .article-body h3::before, .article-body h4::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 4px;
    height: 18px;
    border-radius: 3px;
    background: var(--primary);
}
.article-body a { color: var(--primary); border-bottom: 1px dashed rgba(0, 123, 245, .5); }
.article-body a:hover { border-bottom-style: solid; }
.article-body img { height: auto; max-width: 100%; border-radius: 8px; display: block; margin: 16px auto; }
.article-body blockquote {
    margin: 18px 0;
    padding: 12px 18px;
    border-left: 4px solid var(--primary);
    background: var(--card-sub);
    border-radius: 0 8px 8px 0;
    color: var(--text-2);
    font-size: 15px;
}
.article-body ul, .article-body ol { margin: 0 0 16px; padding-left: 24px; list-style: revert; }
.article-body li { margin-bottom: 6px; }
.article-body table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.article-body th, .article-body td { border: 1px solid var(--line-2); padding: 10px 12px; text-align: left; }
.article-body th { background: var(--card-sub); }
.article-body pre {
    padding: 16px 18px;
    margin: 16px 0;
    background: #21252b;
    color: #d7dae0;
    border-radius: 8px;
    overflow: auto;
    font-size: 13px;
    line-height: 1.7;
}
.article-body code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.article-body pre code { background: transparent; padding: 0; color: inherit; }
.article-body :not(pre) > code {
    padding: 2px 6px;
    font-size: 14px;
    border-radius: 4px;
    background: var(--card-sub);
    color: #d6336c;
}

/* 下载盒子 */
.down-box {
    margin: 26px 30px 0;
    padding: 20px 22px 22px;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(0, 123, 245, .06), rgba(0, 123, 245, .02));
    border: 1px dashed rgba(0, 123, 245, .35);
}
.down-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.down-head h3 { font-size: 17px; }
.down-head span { font-size: 12px; color: var(--text-3); }
.down-list { display: flex; flex-direction: column; gap: 10px; }
.down-list li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.down-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 42px;
    padding: 0 26px;
    border-radius: 21px;
    font-size: 14px;
    color: var(--primary);
    background: var(--card);
    border: 1px solid rgba(0, 123, 245, .45);
    transition: all .25s var(--ease);
}
.down-btn svg { width: 18px; height: 18px; fill: currentColor; }
.down-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.down-btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 12px 22px -14px rgba(0, 123, 245, .9); }
.down-btn.primary:hover { background: var(--primary-hover); }
.down-pwd { font-size: 12px; color: var(--text-3); }
.down-pwd b { color: var(--text); font-weight: 600; user-select: all; }

/* 版权 */
.copyright-box {
    margin: 22px 30px 0;
    padding: 14px 18px;
    border-radius: 8px;
    background: var(--card-sub);
    border-left: 3px solid var(--text-3);
    font-size: 13px;
    color: var(--text-3);
    line-height: 1.8;
}
.copyright-box b { display: block; margin-bottom: 2px; color: var(--text-2); }

/* 标签 */
.article-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 20px 30px 24px;
}
.tags-label { font-size: 13px; color: var(--text-3); }
.article-tags a.tags,
.article-body .tags {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    border-radius: 13px;
    background: var(--card-sub);
    color: var(--text-2);
}
.article-tags a.tags:hover { background: var(--primary); color: #fff; }

/* 上下篇 */
.neighbor-wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.neighbor {
    display: block;
    padding: 16px 20px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: all .25s var(--ease);
    min-width: 0;
}
.neighbor:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); color: inherit; }
.neighbor b { display: block; font-size: 12px; font-weight: 400; color: var(--text-3); margin-bottom: 4px; }
.neighbor span {
    display: block;
    font-size: 14px;
    color: var(--text-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.neighbor.next { text-align: right; }

/* 评论 */
.comment-card { padding: 22px 26px 26px; }
.comment-form-card { margin-bottom: 26px; }
.comment-head h3 { font-size: 17px; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.comment-head .num { font-size: 13px; color: var(--primary); margin-left: 4px; }

.cm-textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--line-2);
    border-radius: 10px;
    background: var(--card-sub);
    resize: vertical;
    outline: none;
    line-height: 1.8;
    transition: all .25s var(--ease);
}
.cm-textarea:focus { border-color: var(--primary); background: var(--card); box-shadow: 0 0 0 4px var(--primary-soft); }

.cm-info { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.cm-input {
    flex: 1 1 180px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--line-2);
    border-radius: 20px;
    background: var(--card-sub);
    outline: none;
    transition: all .25s var(--ease);
}
.cm-input:focus { border-color: var(--primary); background: var(--card); }
.cm-captcha { display: flex; align-items: center; gap: 8px; }
.cm-captcha input {
    width: 120px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--line-2);
    border-radius: 20px;
    background: var(--card-sub);
    outline: none;
}
.cm-captcha img { height: 40px; border-radius: 8px; cursor: pointer; }

.cm-actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.cm-submit {
    height: 40px;
    padding: 0 28px;
    border: 0;
    border-radius: 20px;
    background: var(--primary);
    color: #fff;
    transition: all .25s var(--ease);
}
.cm-submit:hover { background: var(--primary-hover); }
.cm-cancel {
    height: 40px;
    padding: 0 20px;
    border: 1px solid var(--line-2);
    border-radius: 20px;
    background: transparent;
    color: var(--text-2);
}
.cm-cancel:hover { border-color: var(--primary); color: var(--primary); }
.cm-login-tip { font-size: 13px; color: var(--text-3); }

.comment-item { display: flex; flex-wrap: wrap; gap: 12px; padding: 18px 0; border-top: 1px solid var(--line); }
.comment-item:first-of-type { border-top: 0; }
.comment-item.children { flex-basis: 100%; margin-left: 44px; padding: 14px 0 0; border-top: 1px dashed var(--line); }
.comment-avatar { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; }
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-body { flex: 1 1 auto; min-width: 0; }
.comment-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); }
.comment-meta b { font-size: 14px; color: var(--text); font-weight: 600; }
.com-reply {
    border: 0;
    background: transparent;
    padding: 0;
    font-size: 12px;
    color: var(--primary);
}
.comment-text { margin-top: 6px; font-size: 14px; line-height: 1.8; color: var(--text-2); word-break: break-word; }
.comment-text a { color: var(--primary); }
.comment-empty { padding: 20px 0; font-size: 13px; color: var(--text-3); }
.comment-closed { padding: 18px 0; font-size: 13px; color: var(--text-3); }
.comment-page { padding: 18px 0 0; }

/* 独立页面 */
.single-wrap { display: block; }
.page-single .article-card { padding-bottom: 10px; }

/* =========================================================
   页脚
   ========================================================= */
.site-footer {
    margin-top: 10px;
    padding: 34px 0 50px;
    background: var(--card);
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: 13px;
    color: var(--text-3);
}
.site-footer a { color: var(--text-3); }
.site-footer a:hover { color: var(--primary); }

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0 4px;
    margin-bottom: 20px;
}
.footer-links li { display: flex; align-items: center; }
.footer-links li + li::before {
    content: "";
    width: 1px;
    height: 12px;
    margin: 0 12px;
    background: var(--line-2);
}
.footer-links a { font-size: 13px; }

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-2);
}
.footer-brand img { height: 26px; width: auto; }

.footer-copy p { margin: 4px 0; line-height: 1.8; }
.footer-copy .powered { margin-top: 10px; font-size: 12px; color: var(--text-3); opacity: .8; }

/* 悬浮工具 */
.float-tools {
    position: fixed;
    right: 18px;
    bottom: 46px;
    z-index: 900;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.float-btn {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--card);
    color: var(--text-3);
    box-shadow: 0 8px 20px -10px rgba(17, 38, 71, .35);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all .3s var(--ease);
}
.float-btn svg { width: 20px; height: 20px; fill: currentColor; }
.float-btn.show { opacity: 1; visibility: visible; transform: none; }
.float-btn:hover { background: var(--primary); color: #fff; }

/* =========================================================
   404
   ========================================================= */
.error-page {
    padding: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 0%, rgba(0, 123, 245, .1), transparent 60%), var(--bg);
}
.error-wrap { text-align: center; padding: 40px 24px; }
.error-code {
    font-size: 108px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -4px;
    background: linear-gradient(180deg, var(--primary), #8cc7ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.error-wrap h1 { font-size: 22px; margin: 20px 0 8px; }
.error-wrap p { margin: 0 0 26px; color: var(--text-3); font-size: 14px; }
.error-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 1360px) {
    :root { --container: 1200px; }
    .nav-item > a { padding: 0 12px; font-size: 14px; }
    .quick-grid { grid-template-columns: repeat(8, 1fr); }
    .update-item { padding: 8px 10px; }
}

@media (max-width: 1200px) {
    .index-main, .article-main { grid-template-columns: minmax(0, 1fr) 300px; }
    .quick-grid { grid-template-columns: repeat(6, 1fr); }
    .card-stat span:nth-child(2) { display: none; }
}

@media (max-width: 1024px) {
    .header-tools { margin-left: auto; }

    :root { --head-h: 60px; }
    .main-nav { display: none; }
    .menu-btn { display: flex; }
    .logo img { height: 34px; }
    .logo-text { font-size: 18px; }
    .quick-grid { gap: 12px; }
    .quick-item { flex: 1 1 calc(25% - 12px); }
    .quick-ico { width: 54px; height: 54px; }
    .update-list { grid-template-columns: 1fr; gap: 6px; }
    .update-item, .update-item:nth-child(2n) { border-radius: 30px; }
    .index-main, .article-main { grid-template-columns: 1fr; }
    .index-side { position: static; }
    .hide-side-mobile .index-side { display: none; }
    .zone-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
    .zone-item:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid var(--line); }
    .article-title { padding: 20px 20px 10px; font-size: 21px; }
    .article-meta { padding: 0 20px 16px; }
    .soft-info { margin: 16px 20px 0; flex-wrap: wrap; }
    .soft-ico { width: 58px; height: 58px; }
    .article-body { padding: 18px 20px 6px; font-size: 15.5px; }
    .down-box { margin: 20px 20px 0; padding: 16px; }
    .copyright-box { margin: 18px 20px 0; }
    .article-tags { padding: 16px 20px 20px; }
    .comment-card { padding: 18px 20px 22px; }
    .article-body pre { font-size: 12.5px; }
}

@media (max-width: 768px) {
    .container { padding: 0 14px; }
    .page-body { padding: 16px 0 30px; }
    .header-inner { gap: 10px; }
    .header-tools .tool { width: 34px; height: 34px; }
    .header-tools .tool svg { width: 18px; height: 18px; }
    .quick-grid { gap: 10px; margin-bottom: 16px; }
    .quick-item { flex: 1 1 calc(25% - 10px); }
    .quick-item { padding: 12px 4px 10px; gap: 8px; }
    .quick-ico { width: 48px; height: 48px; }
    .quick-name { font-size: 12px; }
    .ad-row { grid-template-columns: 1fr; gap: 8px; margin-bottom: 16px; }
    .ad-item { height: 62px; }
    .card-title { padding: 12px 14px; gap: 10px; }
    .card-title h3 { font-size: 16px; }
    .card-stat { font-size: 12px; gap: 10px; }
    .update-list { padding: 12px 14px 16px; }
    .u-title { font-size: 13.5px; }
    .zone-grid { grid-template-columns: 1fr; padding: 4px 14px 10px; }
    .z-body { padding-right: 0; }
    .z-btn { position: static; transform: none; margin-top: 9px; }
    .index-side { flex-direction: column; }
    .hide-side-mobile .index-side { display: none; }
    .neighbor-wrap { grid-template-columns: 1fr; gap: 10px; }
    .neighbor.next { text-align: left; }
    .article-body img { border-radius: 6px; }
    .down-btn { width: 100%; justify-content: center; }
    .down-pwd { padding-left: 4px; }
    .comment-item.children { margin-left: 16px; }
    .footer-copy p { font-size: 12px; }
    .float-tools { right: 12px; bottom: 24px; }
    .float-btn { width: 38px; height: 38px; }
    .page-head { padding: 18px 0 2px; }
    .page-title { font-size: 21px; }
    .search-panel { padding: 26px 20px 22px; border-radius: 12px; }
    .search-panel h3 { font-size: 18px; }
    .error-code { font-size: 76px; }
}

@media (max-width: 480px) {
    .quick-grid { gap: 8px; }
    .quick-item { flex: 1 1 calc(25% - 8px); }
    .quick-ico { width: 42px; height: 42px; }
    .quick-name { font-size: 11px; }
    .update-item { gap: 8px; padding: 7px 10px; }
    .u-ico { width: 26px; height: 26px; }
    .u-flag { font-size: 11px; padding-right: 7px; }
    .u-title { font-size: 13px; }
    .u-btn { padding: 0 8px; height: 22px; font-size: 11px; }
    .card-stat span:nth-child(3) { display: none; }
    .article-title { font-size: 19px; }
    .article-meta { font-size: 12px; gap: 6px; }
    .soft-download { width: 100%; justify-content: center; }
    .article-body { font-size: 15px; line-height: 1.85; }
    .footer-brand img { height: 22px; }
    .login-card { padding: 26px 18px 20px; }
}

/* 打印 */
@media print {
    .site-header, .index-side, .float-tools, .comment-card, .site-footer, .artifact, .down-box { display: none !important; }
    body { padding: 0; background: #fff; }
    .card { box-shadow: none; }
}

/* =========================================================
   PJAX 无刷新
   ========================================================= */
.pjax-bar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 2000;
    width: 0;
    height: 2px;
    opacity: 0;
    background: linear-gradient(90deg, var(--primary), #7cc4ff);
    box-shadow: 0 0 10px rgba(0, 123, 245, .55);
    transition: width .45s cubic-bezier(.4, 0, .2, 1), opacity .3s ease;
    pointer-events: none;
}
.pjax-bar.show { opacity: 1; }
.pjax-bar.done { opacity: 0; }

#pjax-container { transition: opacity .18s ease; }
#pjax-container.is-loading { opacity: .55; }

/* =========================================================
   下载专区：分类切换态 / 免费游戏板块 / AJAX 加载态
   ========================================================= */
.zone-tabs a.is-active {
    background: var(--primary);
    color: #fff;
}
.card.is-loading .zone-grid,
.card.is-loading .update-list,
.card.is-loading .game-grid {
    opacity: .5;
    transition: opacity .2s ease;
    pointer-events: none;
}

.game-card .more-link {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 13px;
    color: var(--text-3);
}
.game-card .more-link:hover { color: var(--primary); }
.game-card .more-link svg { width: 13px; height: 13px; }

.game-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding: 16px 20px 20px;
}
.game-item {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    background: var(--card-sub);
    transition: transform .2s ease, box-shadow .2s ease;
}
.game-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(16, 36, 68, .1);
}
.g-img {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--card-sub);
}
.g-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}
.game-item:hover .g-img img { transform: scale(1.05); }
.g-tit {
    display: block;
    padding: 10px 12px 4px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-1);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.g-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px 12px;
    font-size: 12px;
    color: var(--text-3);
}
.g-meta i {
    font-style: normal;
    margin-left: auto;
    color: var(--text-3);
}

.page span.disabled { color: var(--text-3); opacity: .55; padding: 0 10px; }
.page span.dots { color: var(--text-3); padding: 0 4px; }

@media (max-width: 1024px) {
    .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
    .game-grid { gap: 12px; padding: 12px 14px 16px; }
}

/* =========================================================
   分类 / 搜索页：分类切换 + 大图文卡片
   ========================================================= */
.sort-tabs-card {
    margin: 0 0 14px;
    padding: 14px 16px;
    background: var(--card);
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(16, 36, 68, .05);
}
.sort-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 8px;
}
.sort-tabs a {
    display: block;
    padding: 8px 6px;
    text-align: center;
    font-size: 13px;
    color: var(--text-2);
    background: var(--card-sub);
    border-radius: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background .2s ease, color .2s ease;
}
.sort-tabs a:hover { background: rgba(0, 123, 245, .1); color: var(--primary); }
.sort-tabs a.is-active { background: var(--primary); color: #fff; }

.update-card.is-plain {
    background: transparent;
    border: 0;
    box-shadow: none;
}
.update-card.is-plain .card-title,
.update-card.is-plain .card-stat { display: none; }

.post-list { padding: 0; margin: 0; list-style: none; }
.post-card {
    display: flex;
    gap: 16px;
    padding: 12px;
    margin-bottom: 14px;
    background: var(--card);
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(16, 36, 68, .05);
    transition: transform .2s ease, box-shadow .2s ease;
}
.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(16, 36, 68, .1);
}
.p-cover {
    position: relative;
    flex: 0 0 212px;
    height: 140px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--card-sub);
}
.p-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.p-top {
    position: absolute;
    left: 8px;
    top: 8px;
    padding: 2px 8px;
    font-style: normal;
    font-size: 11px;
    color: #fff;
    background: var(--primary);
    border-radius: 6px;
}
.p-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.p-main h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-1);
}
.p-main h3 a { color: inherit; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-main h3 a:hover { color: var(--primary); }

.p-tags { display: flex; gap: 8px; flex-wrap: wrap; overflow: hidden; }
.p-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    font-size: 13px;
    color: var(--text-2);
    background: var(--card-sub);
    border-radius: 8px;
    white-space: nowrap;
}
.p-tag svg { width: 14px; height: 14px; stroke: var(--text-3); fill: none; stroke-width: 1.6; }
.p-tag:hover { color: var(--primary); background: rgba(0, 123, 245, .1); }
.p-tag:hover svg { stroke: var(--primary); }
.p-tag.is-empty { color: var(--text-3); cursor: default; }

.p-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.p-author { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.p-author img { width: 24px; height: 24px; border-radius: 50%; background: var(--card-sub); }
.p-author span { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-author em { font-style: normal; color: var(--text-3); white-space: nowrap; }
.p-stats { display: flex; align-items: center; gap: 16px; font-size: 13px; color: var(--text-3); }
.p-stats span { display: inline-flex; align-items: center; gap: 5px; }
.p-stats svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.6; }

@media (max-width: 768px) {
    .post-card { gap: 12px; padding: 10px; border-radius: 12px; margin-bottom: 12px; }
    .p-cover { flex: 0 0 128px; height: 92px; }
    .p-main h3 { font-size: 15px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
    .p-main { gap: 8px; }
    .p-tag { font-size: 12px; padding: 3px 8px; }
    .p-tags .p-tag:nth-child(n+3) { display: none; }
    .p-author { gap: 6px; font-size: 12px; }
    .p-author img { width: 20px; height: 20px; }
    .p-author span { max-width: 78px; }
    .p-author em { font-size: 12px; white-space: nowrap; }
    .p-foot { gap: 6px; }
    .p-stats { gap: 6px; font-size: 12px; flex: 0 0 auto; }
    .p-stats svg { width: 13px; height: 13px; }
    .sort-tabs-card { padding: 10px 12px; }
    .sort-tabs { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }
    .sort-tabs a { font-size: 12px; padding: 7px 4px; }
}

/* 分类页父分类下的子分类切换（更紧凑） */
.sort-tabs.is-compact {
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 8px;
}
.sort-tabs.is-compact a {
    padding: 8px 6px;
    font-size: 13px;
    border-radius: 8px;
}
@media (max-width: 768px) {
    .sort-tabs.is-compact { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; }
    .sort-tabs.is-compact a { padding: 7px 4px; font-size: 12px; }
    .sort-tabs-card { padding: 12px; }
}

/* 侧栏：已登录用户卡 */
.login-card.is-login .login-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 18px 14px;
}
.login-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--primary-soft);
    flex: 0 0 56px;
}
.login-info { min-width: 0; }
.login-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.login-sub { font-size: 12px; color: var(--text-3); }
.login-card.is-login { padding: 16px 18px 20px; text-align: left; }
.login-card.is-login .login-user { padding: 4px 0 14px; }
.login-card.is-login .login-btn { margin-top: 6px; }
.login-btn.is-out {
    background: #fff;
    color: var(--text-2);
    border: 1px solid var(--line);
    box-shadow: none;
}
.login-btn.is-out:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
[data-theme="night"] .login-btn.is-out { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); }
