:root {
    --bg: #f6f8fc;
    --bg-soft: #eef2fa;
    --card: #ffffff;
    --text: #141b2d;
    --text-soft: #64708b;
    --border: #e6eaf3;
    --primary: #4f7cff;
    --primary-dark: #3461e8;
    --primary-soft: rgba(79, 124, 255, .1);
    --success: #16a34a;
    --danger: #e5484d;
    --grad: linear-gradient(135deg, #4f7cff 0%, #7c5cff 55%, #a855f7 100%);
    --grad-warm: linear-gradient(135deg, #ff7a45, #ff4d6d);
    --grad-green: linear-gradient(135deg, #22c55e, #16a34a);
    --shadow: 0 4px 16px rgba(20, 30, 60, .06);
    --shadow-md: 0 10px 30px rgba(20, 30, 60, .09);
    --shadow-lg: 0 20px 48px rgba(20, 30, 60, .14);
    --ring: 0 0 0 3px rgba(79, 124, 255, .16);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 22px;
}

html[data-theme="dark"] {
    --bg: #0c111c;
    --bg-soft: #141b2b;
    --card: #161e2e;
    --text: #e9eef8;
    --text-soft: #98a4bb;
    --border: #243048;
    --primary: #6f9bff;
    --primary-dark: #5b8cff;
    --primary-soft: rgba(111, 155, 255, .16);
    --shadow: 0 4px 16px rgba(0, 0, 0, .3);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, .38);
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, .5);
    --ring: 0 0 0 3px rgba(111, 155, 255, .22);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "PingFang SC", "HarmonyOS Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI",
                 "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 18px; }
.muted { color: var(--text-soft); }
.main { padding: 26px 18px 60px; }

/* 全局滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--text-soft); }

::selection { background: var(--primary); color: #fff; }

/* 入场动画 */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.reveal { animation: fadeUp .5s cubic-bezier(.22,.68,.36,1) both; }
@media (prefers-reduced-motion: reduce) {
    .reveal { animation: none; }
    * { transition-duration: .01ms !important; }
}

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    backdrop-filter: saturate(180%) blur(14px);
    box-shadow: 0 1px 0 rgba(20, 30, 60, .03);
}
.header-inner { display: flex; align-items: center; gap: 18px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -.2px; }
.brand img { height: 34px; width: 34px; border-radius: 10px; object-fit: cover; box-shadow: var(--shadow); }
.brand-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 10px; font-size: 15px; color: #fff; font-weight: 800;
    background: var(--grad); box-shadow: 0 4px 12px rgba(79, 124, 255, .35);
}
.brand-name { white-space: nowrap; }

.search-box { flex: 1; display: flex; max-width: 480px; }
.search-box input {
    flex: 1; height: 42px; padding: 0 16px; font-size: 14px;
    border: 1px solid var(--border); border-right: 0;
    border-radius: 999px 0 0 999px; background: var(--bg-soft); color: var(--text);
    outline: none; transition: border-color .16s, background .16s;
}
.search-box input:focus { border-color: var(--primary); background: var(--card); }
.search-box input::placeholder { color: var(--text-soft); }
.search-box button {
    height: 42px; padding: 0 22px; border: 0; cursor: pointer; color: #fff; font-size: 14px; font-weight: 600;
    background: var(--grad); border-radius: 0 999px 999px 0;
    transition: filter .16s;
}
.search-box button:hover { filter: brightness(1.08); }

.header-nav { display: flex; align-items: center; gap: 20px; font-size: 14px; }
.header-nav > a { position: relative; padding: 4px 0; font-weight: 500; transition: color .16s; }
.header-nav > a::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
    border-radius: 2px; background: var(--grad); transform: scaleX(0); transition: transform .2s ease;
}
.header-nav > a:hover::after { transform: scaleX(1); }

.lang-switch { position: relative; }
.lang-btn {
    border: 1px solid var(--border); background: var(--bg-soft); color: var(--text);
    border-radius: 9px; height: 32px; padding: 0 10px; cursor: pointer; font-size: 13px;
}
.lang-menu {
    display: none; position: absolute; right: 0; top: 38px; z-index: 60; min-width: 148px;
    background: var(--card); border: 1px solid var(--border); border-radius: 12px;
    box-shadow: var(--shadow); padding: 6px;
}
.lang-switch.open .lang-menu { display: block; }
.lang-menu a {
    display: block; padding: 7px 10px; border-radius: 8px; font-size: 13px; white-space: nowrap;
}
.lang-menu a:hover { background: var(--bg-soft); }
.lang-menu a.active { color: var(--primary); font-weight: 600; background: var(--primary-soft); }
.header-nav a:hover { color: var(--primary); }


.notice-bar {
    background: linear-gradient(90deg, rgba(79,124,255,.12), rgba(168,85,247,.12));
    border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text);
    padding: 9px 0;
}

/* ---------- Hero ---------- */
.hero {
    position: relative; overflow: hidden; isolation: isolate;
    background: linear-gradient(135deg, #1c2650 0%, #3734a0 45%, #6d3bd6 100%);
    color: #fff; padding: 66px 0 84px;
}
.hero::before {
    content: ''; position: absolute; inset: 0; z-index: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(circle at 50% 35%, #000 0%, transparent 72%);
    mask-image: radial-gradient(circle at 50% 35%, #000 0%, transparent 72%);
}
.hero-glow {
    position: absolute; z-index: 0; border-radius: 50%; filter: blur(90px); pointer-events: none;
}
.hero-glow.g1 { width: 520px; height: 520px; top: -240px; left: -110px; background: rgba(124, 92, 255, .75); }
.hero-glow.g2 { width: 460px; height: 460px; right: -130px; bottom: -220px; background: rgba(255, 122, 69, .45); }
.hero-glow.g3 { width: 360px; height: 360px; right: 24%; top: -140px; background: rgba(34, 211, 238, .35); }
.hero-wave {
    position: absolute; left: -5%; right: -5%; bottom: -2px; height: 70px; z-index: 1;
    background: var(--bg); border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.hero-inner { text-align: center; position: relative; z-index: 2; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 7px; margin-bottom: 18px;
    padding: 5px 14px; border-radius: 999px; font-size: 13px; font-weight: 500;
    background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22);
    backdrop-filter: blur(6px);
}
.hero-badge .dot {
    width: 7px; height: 7px; border-radius: 50%; background: #4ade80;
    box-shadow: 0 0 0 4px rgba(74, 222, 128, .25);
}
.hero h1 {
    margin: 0 0 12px; font-size: clamp(28px, 5vw, 46px); font-weight: 800;
    letter-spacing: -.5px; line-height: 1.2;
    background: linear-gradient(180deg, #fff 30%, #cfd8ff 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-slogan { margin: 0 auto 26px; max-width: 620px; font-size: 16px; opacity: .9; line-height: 1.7; }
.hero-stats {
    display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center;
    padding: 8px; border-radius: 18px;
    background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16);
    backdrop-filter: blur(10px);
}
.hero-stat {
    min-width: 118px; padding: 10px 22px; border-radius: 12px;
    background: rgba(255, 255, 255, .1);
}
.hero-stat b { display: block; font-size: 26px; font-weight: 800; line-height: 1.2; letter-spacing: -.5px; }
.hero-stat span { font-size: 12.5px; opacity: .82; }

@media (max-width: 720px) {
    .hero { padding: 44px 0 62px; }
    .hero-stat { min-width: 96px; padding: 8px 14px; }
    .hero-stat b { font-size: 21px; }
}

/* ---------- Tabs ---------- */
.cat-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.cat-tab {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 500;
    background: var(--card); border: 1px solid var(--border); color: var(--text-soft);
    box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease, color .18s ease, border-color .18s ease;
}
.cat-tab .ico { font-size: 14px; line-height: 1; }
.cat-tab:hover { transform: translateY(-2px); border-color: var(--primary); color: var(--primary); box-shadow: var(--shadow-md); }
.cat-tab.active {
    background: var(--grad); border-color: transparent; color: #fff;
    box-shadow: 0 6px 18px rgba(79, 124, 255, .32);
}

.result-bar {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 18px; font-size: 14px; color: var(--text-soft);
}

/* ---------- Cards ---------- */
.grid {
    display: grid; gap: 18px;
    grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
}
.card {
    position: relative; overflow: hidden;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 18px; box-shadow: var(--shadow);
    transition: transform .24s cubic-bezier(.22,.68,.36,1), box-shadow .24s, border-color .24s;
    display: flex; flex-direction: column;
}
.card::before {
    content: ''; position: absolute; inset: 0 0 auto; height: 3px;
    background: var(--grad); transform: scaleX(0); transform-origin: left;
    transition: transform .3s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card:hover::before { transform: scaleX(1); }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; }
.app-icon {
    width: 56px; height: 56px; border-radius: 16px; object-fit: cover; background: var(--bg-soft);
    display: inline-flex; align-items: center; justify-content: center; font-size: 30px;
    box-shadow: var(--shadow); transition: transform .24s ease;
}
.card:hover .app-icon { transform: scale(1.07) rotate(-2deg); }
.app-icon.big {
    width: 92px; height: 92px; font-size: 48px; border-radius: 22px;
    box-shadow: var(--shadow-md); flex: 0 0 auto;
}
.icon-fallback { background: var(--grad); color: #fff; font-size: 25px; font-weight: 700; }
.card-title { margin: 14px 0 6px; font-size: 16.5px; font-weight: 700; letter-spacing: -.2px; }
.card-desc {
    margin: 0 0 12px; font-size: 13px; color: var(--text-soft); min-height: 42px; line-height: 1.6;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tag {
    font-size: 12px; padding: 3px 9px; border-radius: 7px;
    background: var(--bg-soft); color: var(--text-soft);
}
.tag.platform { background: var(--primary-soft); color: var(--primary); font-weight: 500; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; gap: 10px; }
.dl-count { font-size: 12px; color: var(--text-soft); }
.badge-hot {
    font-size: 11px; padding: 3px 9px; border-radius: 999px; color: #fff; font-weight: 600;
    background: var(--grad-warm); box-shadow: 0 3px 10px rgba(255, 77, 109, .3);
}

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px 18px; border-radius: 12px; font-size: 14px; font-weight: 500;
    border: 1px solid var(--border); background: var(--bg-soft); color: var(--text); cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, color .16s, border-color .16s, filter .16s;
}
.btn:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-primary { background: var(--grad); border: 0; color: #fff; box-shadow: 0 4px 14px rgba(79, 124, 255, .28); }
.btn-primary:hover { color: #fff; filter: brightness(1.07); box-shadow: 0 6px 18px rgba(79, 124, 255, .36); }
.btn-lg { padding: 13px 30px; font-size: 16px; }
.btn-sm { padding: 6px 13px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-disabled { opacity: .55; pointer-events: none; }

/* ---------- Detail ---------- */
.breadcrumb { font-size: 13px; color: var(--text-soft); margin-bottom: 16px; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--text); }

.detail-head {
    position: relative; overflow: hidden;
    display: flex; gap: 22px; background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-md); margin-bottom: 18px;
}
.detail-head::after {
    content: ''; position: absolute; top: 0; right: 0; width: 240px; height: 240px;
    background: radial-gradient(circle at 70% 30%, var(--primary-soft), transparent 70%);
    pointer-events: none;
}
.detail-info { min-width: 0; position: relative; z-index: 1; }
.detail-info h1 { margin: 0 0 10px; font-size: 28px; font-weight: 800; letter-spacing: -.4px; line-height: 1.3; }
.detail-desc { margin: 0 0 14px; color: var(--text-soft); line-height: 1.7; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 7px; }
.sub-url { margin-top: 12px; font-size: 13px; color: var(--text-soft); }
.sub-url a { color: var(--primary); word-break: break-all; }
.sub-url a:hover { text-decoration: underline; }

/* ---------- 醒目下载按钮 ---------- */
.download-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 18px; }
.btn-download {
    display: inline-flex; align-items: center; gap: 12px;
    padding: 13px 28px; border-radius: 14px; color: #fff; font-weight: 700;
    background: var(--grad-green);
    box-shadow: 0 8px 22px rgba(22, 163, 74, .32);
    transition: transform .18s cubic-bezier(.22,.68,.36,1), box-shadow .18s ease, filter .18s ease;
}
.btn-download:hover {
    color: #fff; transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(22, 163, 74, .42); filter: brightness(1.05);
}
.btn-download:active { transform: translateY(0); }
.btn-download .dl-ico {
    width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .22); font-size: 17px; font-weight: 700;
}
.btn-download .dl-body { display: flex; flex-direction: column; line-height: 1.3; text-align: left; }
.btn-download .dl-title { font-size: 17px; font-weight: 700; }
.btn-download .dl-meta { font-size: 12px; font-weight: 500; opacity: .88; margin-top: 2px; }

.btn-download.ghost {
    background: var(--card); color: var(--text);
    border: 1px solid var(--border); box-shadow: var(--shadow); font-weight: 600;
}
.btn-download.ghost:hover {
    color: var(--primary); border-color: var(--primary);
    box-shadow: 0 10px 24px rgba(59, 109, 251, .16);
}
.btn-download.ghost .dl-ico { background: var(--primary-soft); color: var(--primary); }

.btn-download.sm { padding: 8px 16px; border-radius: 10px; box-shadow: 0 4px 12px rgba(22, 163, 74, .22); }
.btn-download.sm .dl-ico { width: 24px; height: 24px; font-size: 14px; }
.btn-download.sm .dl-title { font-size: 14px; }

@media (max-width: 560px) {
    .download-cta .btn-download { width: 100%; justify-content: flex-start; }
}

.panel {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 22px; box-shadow: var(--shadow); margin-bottom: 18px;
}
.panel-title {
    margin: 0 0 16px; font-size: 17px; font-weight: 700;
    display: flex; align-items: center; gap: 9px;
}
.panel-title::before {
    content: ''; width: 4px; height: 17px; border-radius: 3px; background: var(--grad);
}

.link-list { display: flex; flex-direction: column; gap: 12px; }
.link-item {
    position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    border: 1px solid var(--border); border-radius: 14px; padding: 15px 18px;
    background: var(--bg-soft); transition: border-color .18s, box-shadow .18s, transform .18s;
}
.link-item::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--grad);
}
.link-item:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.link-title { font-weight: 700; margin-bottom: 4px; }
.link-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; }
.link-note { font-size: 12px; color: var(--text-soft); margin-top: 6px; }

.rich-text { color: var(--text); font-size: 14.5px; }
.delay-box { text-align: center; padding: 40px 20px; }
.delay-box h2 { margin: 14px 0 6px; }
.dl-name { font-weight: 600; }



.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.page-link {
    min-width: 36px; text-align: center; padding: 7px 12px; border-radius: var(--radius-sm); font-size: 14px;
    border: 1px solid var(--border); background: var(--card); color: var(--text-soft);
    box-shadow: var(--shadow); transition: transform .16s, color .16s, border-color .16s, box-shadow .16s;
}
.page-link:hover { transform: translateY(-2px); color: var(--primary); border-color: var(--primary); box-shadow: var(--shadow-md); }
.page-link.active {
    background: var(--grad); color: #fff; border-color: transparent; font-weight: 600;
    box-shadow: 0 5px 16px rgba(79, 124, 255, .3);
}
.page-dots { padding: 6px 4px; color: var(--text-soft); }

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--border); background: var(--card);
    padding: 38px 0 26px; margin-top: 20px;
}
.footer-inner {
    display: grid; gap: 30px;
    grid-template-columns: minmax(220px, 1.4fr) repeat(2, minmax(140px, 1fr));
}
.footer-brand .brand { margin-bottom: 10px; }
.footer-slogan { margin: 0 0 10px; font-size: 13px; color: var(--text-soft); line-height: 1.7; max-width: 320px; }
.footer-col h4 { margin: 0 0 12px; font-size: 14px; font-weight: 700; }
.footer-col a, .footer-col p { display: block; font-size: 13.5px; color: var(--text-soft); margin: 0 0 8px; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
    margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
    font-size: 13px; color: var(--text-soft);
}
.copy, .icp { margin: 0; font-size: 13px; color: var(--text-soft); }

@media (max-width: 720px) {
    .footer-inner { grid-template-columns: 1fr; gap: 22px; }
}

/* ---------- Footer 友情链接 ---------- */
.footer-friends { margin: 14px auto 4px; max-width: 900px; }
.ff-title { font-size: 13px; color: var(--text-soft); margin-bottom: 8px; }
.ff-list { display: flex; flex-wrap: wrap; gap: 8px 12px; justify-content: flex-start; font-size: 13px; }
.ff-list a {
    padding: 3px 10px; border: 1px solid var(--border); border-radius: 14px;
    color: var(--text-soft); background: var(--bg); transition: all .15s;
}
.ff-list a:hover { color: var(--primary); border-color: var(--primary); background: var(--card); }

/* ---------- 友链页 ---------- */
.friend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.friend-card {
    display: flex; align-items: center; gap: 12px; padding: 14px;
    background: var(--card); border: 1px solid var(--border); border-radius: 12px;
    transition: all .15s;
}
.friend-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.friend-logo {
    width: 40px; height: 40px; flex: 0 0 40px; border-radius: 10px; object-fit: cover;
    background: var(--primary); color: #fff; display: flex; align-items: center;
    justify-content: center; font-weight: 700; font-size: 17px;
}
.friend-name { font-weight: 600; font-size: 14px; }
.friend-desc { font-size: 12px; color: var(--text-soft); margin-top: 2px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Admin ---------- */
.admin-wrap { display: flex; min-height: 100vh; }
.admin-side {
    width: 216px; flex: 0 0 216px; background: var(--card); border-right: 1px solid var(--border);
    padding: 18px 12px;
}
.admin-side .brand { margin-bottom: 22px; padding: 0 8px; }
.admin-menu { display: flex; flex-direction: column; gap: 4px; }
.admin-menu a {
    display: flex; align-items: center; gap: 9px;
    padding: 10px 13px; border-radius: 11px; font-size: 14px; color: var(--text-soft);
    transition: background .16s, color .16s, transform .16s;
}
.admin-menu a .ico { font-size: 15px; line-height: 1; width: 18px; text-align: center; }
.admin-menu a:hover { background: var(--bg-soft); color: var(--text); transform: translateX(2px); }
.admin-menu a.active {
    background: var(--grad); color: #fff; font-weight: 600;
    box-shadow: 0 4px 14px rgba(79, 124, 255, .28);
}
.admin-main { flex: 1; min-width: 0; background: var(--bg); }
.admin-top {
    height: 58px; display: flex; align-items: center; justify-content: space-between;
    padding: 0 22px; background: var(--card); border-bottom: 1px solid var(--border);
}
.admin-top .who { font-size: 13px; color: var(--text-soft); }
.admin-content { padding: 22px; }

.stat-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 18px; }
.stat-card {
    position: relative; overflow: hidden;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 18px 20px; box-shadow: var(--shadow);
    transition: transform .18s ease, box-shadow .18s ease;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-card::after {
    content: ''; position: absolute; right: -28px; top: -28px; width: 92px; height: 92px;
    border-radius: 50%; background: var(--primary-soft);
}
.stat-card .label { font-size: 13px; color: var(--text-soft); position: relative; z-index: 1; }
.stat-card .value {
    font-size: 28px; font-weight: 800; margin-top: 4px; letter-spacing: -.6px; position: relative; z-index: 1;
}

.admin-panel {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 20px; margin-bottom: 18px; box-shadow: var(--shadow);
}
.admin-panel h3 { margin: 0 0 14px; font-size: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 10px; flex-wrap: wrap; }
.panel-head h3 { margin: 0; }

table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.table th, table.table td { padding: 10px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
table.table th { color: var(--text-soft); font-weight: 600; font-size: 13px; background: var(--bg-soft); }
table.table tbody tr:hover { background: var(--bg-soft); }
.table .app-icon { width: 34px; height: 34px; font-size: 20px; border-radius: 9px; }
td.nowrap { white-space: nowrap; }

.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; margin-bottom: 6px; color: var(--text-soft); }
.input, textarea.input, select.input {
    width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px;
    background: var(--bg-soft); color: var(--text); font-size: 14px; font-family: inherit; outline: none;
}
.input:focus { border-color: var(--primary); }
textarea.input { min-height: 90px; resize: vertical; }
.form-grid { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.form-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.help { font-size: 12px; color: var(--text-soft); margin-top: 4px; }

.alert { padding: 10px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 14px; }
.alert-success { background: rgba(22,163,74,.12); color: var(--success); }
.alert-error { background: rgba(229,72,77,.12); color: var(--danger); }

.badge { font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--bg-soft); color: var(--text-soft); }
.badge-on { background: rgba(22,163,74,.14); color: var(--success); }
.badge-off { background: rgba(229,72,77,.14); color: var(--danger); }

.login-wrap { max-width: 380px; margin: 90px auto; padding: 28px; }
.login-wrap h1 { text-align: center; margin: 0 0 20px; font-size: 22px; }

.link-rows { display: flex; flex-direction: column; gap: 12px; }
.link-row { border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: var(--bg-soft); }
.link-row-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 13px; color: var(--text-soft); }
.link-row .form-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.remove-row { border: 0; background: transparent; color: var(--danger); cursor: pointer; font-size: 13px; }

.cat-head, .cat-row {
    display: flex; gap: 10px; align-items: center;
}
.cat-head { font-size: 13px; color: var(--text-soft); padding: 0 4px 6px; }
.cat-row { padding: 8px 4px; border-bottom: 1px solid var(--border); }
.cat-row > div { flex: 1; min-width: 0; }
.cat-head > div { flex: 1; }

.chart { display: flex; align-items: flex-end; gap: 4px; height: 160px; padding-top: 10px; }
.chart .bar { flex: 1; background: linear-gradient(180deg, #6a5cff, #3b6dfb); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; }
.chart .bar span { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--text-soft); }
.chart-x { display: flex; gap: 4px; font-size: 10px; color: var(--text-soft); margin-top: 6px; }
.chart-x div { flex: 1; text-align: center; overflow: hidden; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .input { width: auto; min-width: 160px; }

/* ---------- 文章 / 教程 ---------- */
.page-head { margin: 26px 0 18px; }
.page-head h1 { font-size: 28px; margin: 0 0 8px; }
.page-head p { margin: 0; font-size: 14px; }
.post-toolbar { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.post-search { max-width: 430px; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.post-grid.small { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.post-card {
    display: flex; flex-direction: column; background: var(--card);
    border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow);
    transition: transform .18s ease, box-shadow .18s ease;
}
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.post-cover {
    width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--bg-soft);
    transition: transform .4s ease;
}
.post-card:hover .post-cover { transform: scale(1.05); }
.post-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.post-cat {
    display: inline-block; align-self: flex-start; font-size: 12px; padding: 2px 9px;
    border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-weight: 600;
}
.post-title {
    font-size: 16.5px; margin: 0; line-height: 1.5; font-weight: 700; letter-spacing: -.2px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-summary {
    margin: 0; font-size: 13.5px; color: var(--text-soft); line-height: 1.65;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-meta { font-size: 12px; color: var(--text-soft); margin-top: auto; }
.home-posts { margin-top: 48px; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.section-head h2 {
    font-size: 21px; margin: 0; font-weight: 800; letter-spacing: -.3px;
    display: flex; align-items: center; gap: 10px;
}
.section-head h2::before {
    content: ''; width: 4px; height: 19px; border-radius: 3px; background: var(--grad);
}
.more-link {
    font-size: 13px; color: var(--text-soft); padding: 5px 12px; border-radius: 999px;
    border: 1px solid var(--border); transition: all .16s;
}
.more-link:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }

/* 列表入场动画（轻微错开，不影响性能） */
.grid > .card { animation: fadeUp .42s cubic-bezier(.22,.68,.36,1) both; }
.grid > .card:nth-child(2n) { animation-delay: .04s; }
.grid > .card:nth-child(3n) { animation-delay: .08s; }
.grid > .card:nth-child(4n) { animation-delay: .12s; }

.page-head { margin: 30px 0 20px; }
.page-head h1 { margin: 0 0 6px; font-size: 28px; font-weight: 800; letter-spacing: -.4px; }

.empty-box {
    text-align: center; padding: 84px 20px; color: var(--text-soft);
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.empty-box::before { content: '🔍'; display: block; font-size: 40px; margin-bottom: 14px; opacity: .55; }
.empty-box h2 { color: var(--text); }
.empty-box .btn { margin-top: 16px; }

.article-wrap { max-width: 820px; margin: 20px auto 40px; }
.article-head { margin-bottom: 6px; }
.article-head h1 { font-size: 32px; font-weight: 800; line-height: 1.4; margin: 10px 0; letter-spacing: -.5px; }
.article-cover { margin: 18px 0 26px; }
.article-hero { width: 100%; border-radius: var(--radius-lg); display: block; box-shadow: var(--shadow-md); }
.article-content { font-size: 16px; line-height: 1.95; }
.article-content h2 {
    font-size: 21px; font-weight: 700; margin: 34px 0 14px; padding-left: 12px;
    border-left: 4px solid var(--primary); line-height: 1.5; letter-spacing: -.2px;
}
.article-content blockquote {
    margin: 0 0 16px; padding: 12px 18px; border-left: 3px solid var(--primary);
    background: var(--bg-soft); border-radius: 0 12px 12px 0; color: var(--text-soft);
}
.article-content img { border-radius: var(--radius); box-shadow: var(--shadow); margin: 8px 0; }
.article-content a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.article-content h3 { font-size: 17px; margin: 22px 0 10px; }
.article-content p { margin: 0 0 14px; }
.article-content ul, .article-content ol { padding-left: 22px; margin: 0 0 16px; }
.article-content li { margin-bottom: 6px; }
.article-content code {
    background: var(--bg-soft); padding: 2px 6px; border-radius: 5px; font-size: 14px;
}
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0; }
.article-product {
    display: flex; justify-content: space-between; align-items: center; gap: 14px;
    padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary-soft), var(--bg-soft));
    margin: 26px 0; box-shadow: var(--shadow);
}
.theme-toggle {
    border: 1px solid var(--border); background: var(--bg-soft); color: var(--text);
    border-radius: 50%; height: 34px; width: 34px; cursor: pointer; font-size: 14px;
    transition: transform .35s ease, background .16s, border-color .16s;
}
.theme-toggle:hover { transform: rotate(-25deg); border-color: var(--primary); }
.ap-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.article-back { margin-top: 16px; }

@media (max-width: 720px) {
    .post-grid { grid-template-columns: 1fr; }
    .article-head h1 { font-size: 24px; }
    .article-content { font-size: 15.5px; }
}

@media (max-width: 900px) {
    .admin-wrap { flex-direction: column; }
    .admin-side { width: 100%; flex: none; border-right: 0; border-bottom: 1px solid var(--border); }
    .admin-menu { flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 720px) {
    .header-inner { flex-wrap: wrap; height: auto; padding: 10px 0; gap: 10px; }
    .search-box { order: 3; max-width: none; width: 100%; }
    .hero h1 { font-size: 26px; }
    .detail-head { flex-direction: column; align-items: flex-start; }
    .link-item { flex-direction: column; align-items: flex-start; }
}
