/*
Theme Name: LD Download
Theme URI: https://example.com/
Author: LD Download
Author URI: https://example.com/
Description: 面向安卓模拟器的轻量中文软件下载主题（第三方非官方网站）。原生 HTML5/CSS3，无任何远程框架依赖，内置 Schema.org 结构化数据、SEO 插件兼容、Core Web Vitals 与 WCAG 2.2 可访问性优化。
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ld-download
Tags: one-column, two-columns, custom-colors, custom-menu, featured-images, threaded-comments, translation-ready, seo-friendly, accessibility-ready
*/

/* ==========================================================================
   1. 设计令牌 (Design Tokens)
   ========================================================================== */
:root {
    /* 品牌色 —— 琥珀黄 */
    --brand: #ffc300;
    --brand-hover: #e6b000;
    --brand-soft: rgba(255, 195, 0, 0.12);
    --on-brand: #1a1a1a;          /* 黄色面上的深色文字，保证对比度 */

    /* 背景与表面 */
    --bg: #1a1a1a;
    --surface: #2d2d2d;
    --surface-2: #232323;
    --overlay: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
    --border-brand: rgba(255, 195, 0, 0.3);

    /* 文字 */
    --text: #e8e8e8;
    --text-muted: #b3b3b3;
    --text-dim: #8a8a8a;

    /* 状态 */
    --success: #22c55e;
    --danger: #ef4444;

    /* 排版 */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    --fs-xs: 0.75rem;
    --fs-sm: 0.875rem;
    --fs-base: 1rem;
    --fs-lg: 1.125rem;
    --fs-xl: 1.25rem;
    --fs-2xl: 1.5rem;
    --fs-3xl: clamp(1.75rem, 1.2rem + 2vw, 2.25rem);
    --fs-hero: clamp(2.25rem, 1.5rem + 3vw, 4rem);
    --lh: 1.65;

    /* 间距 / 圆角 / 阴影 */
    --space: 1rem;
    --container: 1200px;
    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --shadow-brand: 0 0 20px rgba(255, 195, 0, 0.35);

    /* 头部高度（用于锚点偏移） */
    --header-h: 80px;
}

/* ==========================================================================
   2. 重置 & 基础
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    line-height: var(--lh);
    color: var(--text);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: var(--brand); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--brand-hover); }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; color: #fff; }
h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }

button { font: inherit; cursor: pointer; }

::selection { background: var(--brand); color: var(--on-brand); }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--brand); border-radius: var(--radius-full); }

/* ==========================================================================
   3. 可访问性
   ========================================================================== */
/* 跳到正文链接（键盘用户） */
.skip-link {
    position: absolute;
    left: 0;
    top: 0;
    transform: translateY(-150%);
    z-index: 1000;
    background: var(--brand);
    color: var(--on-brand);
    padding: .75rem 1.25rem;
    font-weight: 700;
    border-radius: 0 0 var(--radius) 0;
    transition: transform .2s ease;
}
.skip-link:focus { transform: translateY(0); }

/* 统一可见焦点态（WCAG 2.4.11 / 2.4.7） */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 2px;
    border-radius: 3px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}

/* 尊重用户的动效偏好（WCAG 2.2 / 2.3.3） */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   4. 布局
   ========================================================================== */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 1rem;
}
@media (min-width: 640px) { .container { padding-inline: 1.5rem; } }
@media (min-width: 1024px) { .container { padding-inline: 2rem; } }

.section { padding-block: clamp(3rem, 8vw, 5rem); }
.section--tight { padding-block: 2.5rem; }
.section--surface { background: var(--surface); }
.section--gradient { background: linear-gradient(to bottom, var(--bg), #000); }

.grid { display: grid; gap: 1.5rem; }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: repeat(2, 1fr); }
.grid--6 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) {
    .grid--2 { grid-template-columns: repeat(2, 1fr); }
    .grid--3 { grid-template-columns: repeat(3, 1fr); }
    .grid--4 { grid-template-columns: repeat(4, 1fr); }
    .grid--6 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
    .grid--6 { grid-template-columns: repeat(6, 1fr); }
}

.section-head { text-align: center; margin-bottom: 2.5rem; }
.section-head h2 { margin-bottom: .5rem; }
.section-head p { color: var(--text-muted); margin: 0; }
.archive-desc { color: var(--text-muted); max-width: 42rem; margin: 1rem auto 0; }
.text-brand { color: var(--brand); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }

main { display: block; min-height: 60vh; }

/* ==========================================================================
   5. 按钮（触摸目标 ≥ 44px，WCAG 2.5.8）
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 44px;
    padding: .65rem 1.25rem;
    font-size: var(--fs-base);
    font-weight: 700;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background .2s ease, color .2s ease, transform .15s ease, box-shadow .2s ease;
    text-align: center;
}
.btn:hover { transform: translateY(-1px); }
.btn .icon { width: 1.15em; height: 1.15em; }

.btn--primary {
    background: var(--brand);
    color: var(--on-brand);
    box-shadow: var(--shadow-brand);
}
.btn--primary:hover { background: var(--brand-hover); color: var(--on-brand); }

.btn--secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: var(--border);
    backdrop-filter: blur(6px);
}
.btn--secondary:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }

.btn--ghost {
    background: var(--surface);
    color: #fff;
}
.btn--ghost:hover { background: var(--brand); color: var(--on-brand); }

.btn--lg { min-height: 56px; padding: .9rem 2rem; font-size: var(--fs-lg); border-radius: var(--radius-full); }
.btn--block { display: flex; width: 100%; }
.btn--sm { min-height: 36px; padding: .4rem .9rem; font-size: var(--fs-sm); }

.badge {
    display: inline-block;
    padding: .2rem .6rem;
    font-size: var(--fs-xs);
    font-weight: 700;
    border-radius: var(--radius-sm);
    background: var(--brand-soft);
    color: var(--brand);
    letter-spacing: .03em;
}
.badge--outline { border: 1px solid var(--border); background: transparent; color: var(--text-dim); }

/* ==========================================================================
   6. 图标（内联 SVG 尺寸控制）
   ========================================================================== */
.icon {
    width: 1em;
    height: 1em;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
    vertical-align: middle;
}
.icon--lg { width: 1.75rem; height: 1.75rem; }
.icon--xl { width: 2.5rem; height: 2.5rem; }
.icon--fill { fill: currentColor; stroke: none; }

/* ==========================================================================
   7. 头部 / 导航
   ========================================================================== */
/* 非官方声明横幅（每页可见，醒目） */
.non-official-banner {
    background: #fff7d6;
    color: #5a4500;
    border-bottom: 2px solid var(--brand);
    font-size: var(--fs-xs);
    text-align: center;
    padding: .4rem 1rem;
    line-height: 1.45;
}
.non-official-banner strong { color: #7a5c00; }
.non-official-banner a { color: #5a4500; text-decoration: underline; font-weight: 700; }

.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    background: rgba(26, 26, 26, 0.96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    transition: top .2s ease;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    gap: 1rem;
}
.logo { display: inline-flex; align-items: center; gap: .6rem; font-weight: 800; font-size: var(--fs-2xl); color: #fff; letter-spacing: -.02em; }
.logo:hover { color: #fff; }
.logo-mark {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    background: var(--brand); color: var(--on-brand);
    border-radius: var(--radius);
    font-weight: 800; font-size: var(--fs-xl);
    transition: transform .25s ease;
}
.logo:hover .logo-mark { transform: rotate(12deg); }
.logo-img { display: flex; align-items: center; }
.logo-img img, img.custom-logo { max-height: 40px; width: auto; }

/* 桌面导航 */
.nav-wrap { flex: 1; }
.nav { list-style: none; display: none; align-items: center; justify-content: center; gap: 2rem; margin: 0; padding: 0; }
.nav li { margin: 0; }
.nav li a, .nav-link { display: inline-block; color: var(--text-muted); font-weight: 500; font-size: var(--fs-sm); }
.nav li a:hover, .nav-link:hover { color: var(--brand); }
.nav li.current-menu-item > a, .nav-link--active { color: #fff; }
@media (min-width: 768px) { .nav { display: flex; } }

.header-actions { display: none; align-items: center; gap: 1rem; }
@media (min-width: 768px) { .header-actions { display: flex; } }

.icon-btn {
    display: inline-grid; place-items: center;
    width: 44px; height: 44px;
    background: rgba(255, 255, 255, 0.08);
    border: none; border-radius: var(--radius-full);
    color: var(--brand); font-size: var(--fs-lg);
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.16); color: var(--brand); }

.lang-btn {
    background: none; border: none; color: var(--text-dim);
    font-size: var(--fs-sm);
}

/* 移动菜单按钮 */
.menu-toggle {
    display: inline-grid; place-items: center;
    width: 44px; height: 44px;
    background: none; border: none; color: var(--text-muted);
    font-size: var(--fs-2xl);
}
@media (min-width: 768px) { .menu-toggle { display: none; } }

.mobile-nav { display: none; background: var(--surface); border-top: 1px solid var(--border); }
.mobile-nav.is-open { display: block; }
.mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.mobile-nav a {
    display: block;
    padding: .75rem 1rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}
.mobile-nav li:first-child a { color: var(--brand); font-weight: 700; }
.mobile-nav a:hover { background: var(--overlay); color: #fff; }

/* 头部折叠搜索 */
.header-search { display: none; background: var(--surface); border-top: 1px solid var(--border); padding: 1rem; }
.header-search.is-open { display: block; }
.search-form { display: flex; gap: .5rem; max-width: 480px; margin: 0 auto; }
.search-field { flex: 1; min-width: 0; background: rgba(0,0,0,.3); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .6rem .75rem; color: var(--text); font: inherit; }
.search-field:focus { outline: none; border-color: var(--brand); }
.search-submit { display: inline-grid; place-items: center; width: 44px; background: var(--brand); color: var(--on-brand); border: none; border-radius: var(--radius-sm); }
.search-submit:hover { background: var(--brand-hover); }

/* ==========================================================================
   8. Hero
   ========================================================================== */
.hero {
    position: relative;
    min-height: clamp(520px, 80vh, 800px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding: calc(var(--header-h) + 2rem) 1rem 3rem;
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.hero-overlay {
    position: absolute; inset: 0; z-index: 0;
    background: linear-gradient(to bottom, rgba(26,26,26,.6), rgba(26,26,26,.4), var(--bg));
}
.hero-content { position: relative; z-index: 1; max-width: 900px; margin: 0 auto; }
.hero-title {
    font-size: var(--fs-hero);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.25rem;
    text-shadow: 0 2px 12px rgba(0,0,0,.55);
}
.hero-subtitle {
    font-size: var(--fs-lg);
    color: #e5e5e5;
    margin-bottom: 2rem;
    max-width: 50rem;
    margin-inline: auto;
    text-shadow: 0 1px 6px rgba(0,0,0,.5);
}
@media (min-width: 768px) { .hero-subtitle { font-size: var(--fs-xl); } }

.hero-cta { display: flex; flex-direction: column; gap: 1rem; justify-content: center; align-items: stretch; }
@media (min-width: 480px) { .hero-cta { flex-direction: row; align-items: center; } }

.hero-cta-label { display: block; font-size: var(--fs-sm); font-weight: 400; opacity: .85; }

.hero-trust {
    margin-top: 1.5rem;
    display: inline-flex; align-items: center; gap: .5rem;
    color: var(--text-muted); font-size: var(--fs-sm);
}
.hero-trust .icon { color: var(--success); }

/* ==========================================================================
   9. 特性卡片
   ========================================================================== */
.feature-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
    transition: background .2s ease, border-color .2s ease;
}
.feature-card:hover { background: var(--overlay); border-color: var(--border-brand); }
.feature-icon {
    width: 64px; height: 64px;
    display: grid; place-items: center;
    background: var(--brand-soft);
    color: var(--brand);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: var(--fs-2xl);
}
.feature-card h3 { margin-bottom: .75rem; }
.feature-card p { color: var(--text-muted); margin: 0; }

/* ==========================================================================
   10. 游戏卡片
   ========================================================================== */
.section-head-row {
    display: flex; justify-content: space-between; align-items: flex-end;
    flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem;
}
.section-head-row h2 { margin: 0; }
.section-head-row p { color: var(--text-dim); font-size: var(--fs-sm); margin: .25rem 0 0; }
.link-more { color: var(--brand); font-weight: 700; font-size: var(--fs-sm); letter-spacing: .03em; }
.link-more:hover { color: #fff; }

.game-card {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
}
.game-card-thumb { position: absolute; inset: 0; z-index: 0; display: block; }
.game-card-thumb img, .game-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.game-card-ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--text-dim); background: var(--surface-2); font-size: var(--fs-2xl); }
.game-card:hover .game-card-thumb img { transform: scale(1.08); }
.game-card-overlay {
    position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(to top, #000 0%, rgba(0,0,0,.5) 50%, transparent 100%);
    pointer-events: none;
}
.game-card-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 1rem; }
.game-card-body h3 { font-size: var(--fs-base); margin: 0 0 .25rem; }
.game-card-body h3 a { color: #fff; }
.game-card-body h3 a:hover { color: var(--brand); }
.game-card-cat { font-size: var(--fs-xs); color: var(--text-dim); margin: 0; }
.game-card-btn {
    display: block;
    text-align: center;
    margin-top: .75rem;
    padding: .45rem;
    font-size: var(--fs-xs);
    font-weight: 700;
    background: var(--brand); color: var(--on-brand);
    border-radius: var(--radius-sm);
    opacity: 0; transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease;
}
.game-card:hover .game-card-btn,
.game-card:focus-within .game-card-btn { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   11. 文章卡片 / 资讯
   ========================================================================== */
.post-card {
    display: flex; flex-direction: column;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid transparent;
    transition: border-color .2s ease, transform .15s ease;
    height: 100%;
}
.post-card:hover { border-color: var(--border-brand); }
.post-card-thumb { display: block; position: relative; height: 192px; overflow: hidden; }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-card:hover .post-card-thumb img { transform: scale(1.08); }
.post-card-body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.post-card-cat { color: var(--brand); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin-bottom: .5rem; }
.post-card-title { font-size: var(--fs-xl); margin: 0 0 .75rem; }
.post-card-title a { color: #fff; }
.post-card-title a:hover { color: var(--brand); }
.post-card-excerpt { color: var(--text-muted); font-size: var(--fs-sm); margin-bottom: 1.5rem; flex: 1; }
.post-card-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 1rem; border-top: 1px solid var(--border); font-size: var(--fs-xs); color: var(--text-dim); }
.post-card-foot a { color: #fff; font-weight: 600; display: inline-flex; align-items: center; gap: .25rem; }
.post-card-foot a:hover { color: var(--brand); }

/* 横向 tips 列表（首页） */
.tip-list { display: flex; flex-direction: column; gap: 1.5rem; }
.tip-item {
    display: flex; gap: 1rem;
    background: var(--bg);
    padding: 1rem; border-radius: var(--radius);
    border: 1px solid transparent;
    transition: border-color .2s ease;
}
.tip-item:hover { border-color: var(--border-brand); }
.tip-thumb { width: 128px; height: 96px; flex-shrink: 0; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--text-dim); }
.tip-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tip-body { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.tip-title { font-size: var(--fs-lg); margin: 0 0 .25rem; }
.tip-title a { color: #fff; }
.tip-title a:hover { color: var(--brand); }
.tip-excerpt { color: var(--text-muted); font-size: var(--fs-xs); margin: 0 0 .5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tip-meta { display: flex; align-items: center; gap: 1rem; font-size: var(--fs-xs); color: var(--text-dim); }
.tip-meta .read-more { color: var(--brand); display: inline-flex; align-items: center; gap: .25rem; font-weight: 600; }

.seo-block { background: var(--bg); padding: 2rem; border-radius: var(--radius); border: 1px solid var(--border); height: 100%; }
.seo-block h3 { margin-bottom: 1rem; }
.seo-block p { color: var(--text-muted); }
.seo-block ul { color: var(--text-muted); }
.seo-block ul li { margin-bottom: .35rem; }

.empty-state { grid-column: 1 / -1; text-align: center; padding: 5rem 2rem; background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--border); color: var(--text-muted); }
.empty-state .icon { font-size: 3rem; color: var(--text-dim); margin-bottom: 1rem; }
.empty-state h2 { color: #fff; }

/* ==========================================================================
   12. 单文章布局
   ========================================================================== */
.breadcrumb-bar {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding-top: calc(var(--header-h) + 1.5rem);
    padding-bottom: 1rem;
}
.breadcrumb ol {
    list-style: none;
    display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
    margin: 0; padding: 0;
    font-size: var(--fs-xs); color: var(--text-dim);
}
.breadcrumb li { display: inline-flex; align-items: center; gap: .5rem; }
.breadcrumb li .icon { font-size: .7em; opacity: .5; }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb .current { color: var(--text-muted); max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.single-wrap { display: flex; flex-direction: column; gap: 2rem; padding-block: 2rem; }
@media (min-width: 1024px) {
    .single-wrap { flex-direction: row; gap: 3rem; }
    .single-main { flex: 0 0 68%; max-width: 68%; }
    .single-aside { flex: 1; }
}

.entry-header { margin-bottom: 2rem; }
.entry-title { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); font-weight: 800; margin-bottom: 1.25rem; }
.entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); font-size: var(--fs-sm); color: var(--text-dim); }
.entry-meta .author { display: inline-flex; align-items: center; gap: .5rem; color: var(--text-muted); }
.entry-meta .author img { border-radius: var(--radius-full); }
.entry-meta .meta-item { display: inline-flex; align-items: center; gap: .4rem; }
.entry-meta .icon { color: var(--brand); }

.entry-thumb { margin-bottom: 2.5rem; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.entry-thumb img { width: 100%; }

/* 文章正文排版 */
.entry-content { color: var(--text); font-size: var(--fs-lg); line-height: 1.8; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 { font-size: var(--fs-2xl); margin-top: 2rem; }
.entry-content h3 { font-size: var(--fs-xl); margin-top: 1.5rem; }
.entry-content h4 { font-size: var(--fs-lg); margin-top: 1.25rem; }
.entry-content p { color: var(--text-muted); }
.entry-content a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.entry-content a:hover { color: var(--brand-hover); }
.entry-content ul, .entry-content ol { color: var(--text-muted); }
.entry-content img { border-radius: var(--radius); margin: 1.5rem 0; }
.entry-content blockquote { margin: 1.5rem 0; padding: .5rem 1.5rem; border-left: 4px solid var(--brand); background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--text-muted); }
.entry-content pre { background: var(--surface-2); padding: 1rem; border-radius: var(--radius-sm); overflow-x: auto; }
.entry-content code { background: var(--surface-2); padding: .15rem .4rem; border-radius: 4px; font-size: .9em; }
.entry-content pre code { background: none; padding: 0; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.entry-content th, .entry-content td { border: 1px solid var(--border); padding: .6rem .75rem; text-align: left; }
.entry-content th { background: var(--surface); }
.entry-content figure { margin: 1.5rem 0; }
.entry-content figcaption { font-size: var(--fs-sm); color: var(--text-dim); text-align: center; }

/* 文内转化卡（移动端） */
.inline-cta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; padding: 1rem; background: var(--surface); border-radius: var(--radius); border-left: 4px solid var(--brand); }
@media (min-width: 1024px) { .inline-cta { display: none; } }
.inline-cta-title { font-weight: 700; color: #fff; }
.inline-cta-sub { font-size: var(--fs-xs); color: var(--text-dim); }

/* 作者卡片（E-E-A-T） */
.author-box { display: flex; gap: 1rem; align-items: flex-start; margin-top: 3rem; padding: 1.5rem; background: var(--overlay); border-radius: var(--radius); border: 1px solid var(--border); }
.author-box img { border-radius: var(--radius-full); border: 2px solid var(--brand); }
.author-box-title { font-size: var(--fs-lg); margin: 0 0 .25rem; color: #fff; }
.author-box p { color: var(--text-dim); font-size: var(--fs-sm); margin-bottom: .5rem; }
.author-box a { font-size: var(--fs-xs); }

.tag-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.tag-chip { display: inline-flex; align-items: center; gap: .25rem; padding: .35rem .75rem; font-size: var(--fs-xs); background: var(--surface); color: var(--text-dim); border-radius: var(--radius-sm); }
.tag-chip:hover { background: var(--brand); color: var(--on-brand); }

.related { margin-top: 3rem; }
.related-title { font-size: var(--fs-2xl); padding-left: 1rem; border-left: 4px solid var(--brand); margin-bottom: 1.5rem; }
.related-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 768px) { .related-grid { grid-template-columns: 1fr 1fr; } }
.related-item { display: flex; gap: 1rem; padding: .75rem; background: var(--surface); border-radius: var(--radius-sm); transition: background .2s ease; }
.related-item:hover { background: var(--overlay); }
.related-thumb { width: 80px; height: 64px; flex-shrink: 0; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.related-thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-item .related-title-h4 { display: block; font-size: var(--fs-sm); font-weight: 700; margin: 0 0 .25rem; color: #fff; }
.related-item:hover .related-title-h4 { color: var(--brand); }
.related-item .date { display: block; font-size: var(--fs-xs); color: var(--text-dim); }

/* 侧边栏 */
.aside-card { background: var(--surface); border-radius: var(--radius-lg); padding: 1.5rem; border: 1px solid var(--border); margin-bottom: 2rem; }
.aside-card--cta { border-color: var(--border-brand); box-shadow: var(--shadow); position: sticky; top: 6rem; }
.aside-cta-logo { width: 80px; height: 80px; margin: 0 auto 1rem; display: grid; place-items: center; background: var(--brand); color: var(--on-brand); border-radius: var(--radius-lg); font-weight: 800; font-size: var(--fs-3xl); box-shadow: var(--shadow-brand); }
.aside-cta-title { text-align: center; font-size: var(--fs-xl); margin-bottom: .5rem; }
.aside-cta-sub { text-align: center; font-size: var(--fs-sm); color: var(--text-dim); margin-bottom: 1.25rem; }
.aside-cta-meta { text-align: center; font-size: var(--fs-xs); color: var(--text-dim); }
.aside-cta-list { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border); list-style: none; padding-left: 0; }
.aside-cta-list li { display: flex; align-items: center; font-size: var(--fs-xs); color: var(--text-dim); margin-bottom: .5rem; }
.aside-cta-list .icon { color: var(--success); margin-right: .5rem; }
.aside-title { font-size: var(--fs-lg); display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.aside-title .icon { color: var(--danger); }

.hot-list { list-style: none; margin: 0; padding: 0; }
.hot-item { display: flex; align-items: center; justify-content: space-between; padding: .5rem 0; }
.hot-rank { font-weight: 700; font-size: var(--fs-xs); color: var(--text-dim); width: 1rem; }
.hot-thumb { width: 32px; height: 32px; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); margin: 0 .75rem; }
.hot-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hot-name { font-size: var(--fs-sm); color: var(--text-muted); flex: 1; }
.hot-item:hover .hot-name { color: var(--brand); }
.hot-row { display: flex; align-items: center; }

/* ==========================================================================
   13. 下载页
   ========================================================================== */
.download-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: calc(var(--header-h) + 3rem) 1rem 3rem; position: relative; overflow: hidden; }
.download-card { position: relative; z-index: 1; width: 100%; max-width: 800px; background: rgba(45, 45, 45, .85); backdrop-filter: blur(10px); border-radius: var(--radius-lg); padding: 2.5rem; border: 1px solid var(--border-brand); box-shadow: var(--shadow); text-align: center; }
.download-icon { font-size: 3rem; color: var(--success); margin-bottom: 1rem; }
.download-card h1 { margin-bottom: .5rem; }
.download-card .lead { color: var(--text-dim); margin-bottom: 2rem; }
.download-checksum { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem 2rem; font-size: var(--fs-xs); color: var(--text-dim); }
.download-checksum .icon { color: var(--success); }
.download-note { margin-top: 1.5rem; font-size: var(--fs-xs); color: var(--text-dim); background: var(--surface-2); padding: .75rem 1rem; border-radius: var(--radius-sm); }

.tutorial-grid { margin-top: 3rem; display: grid; grid-template-columns: 1fr; gap: 1rem; text-align: left; }
@media (min-width: 768px) { .tutorial-grid { grid-template-columns: repeat(3, 1fr); } }
.tutorial-grid-head { grid-column: 1 / -1; text-align: center; color: #fff; font-weight: 700; margin-bottom: .5rem; }
.tutorial-item { display: flex; align-items: center; gap: .75rem; padding: 1rem; background: var(--overlay); border: 1px solid var(--border); border-radius: var(--radius); }
.tutorial-item:hover { background: rgba(255,255,255,.1); }
.tutorial-ico { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); border-radius: var(--radius-full); }
.tutorial-item:hover .tutorial-ico { background: var(--brand); color: var(--on-brand); }
.tutorial-item span { color: var(--text-muted); font-size: var(--fs-sm); font-weight: 500; }
.tutorial-item:hover span { color: #fff; }

/* ==========================================================================
   14. 404
   ========================================================================== */
.error-page { display: flex; align-items: center; justify-content: center; min-height: 80vh; text-align: center; padding: calc(var(--header-h) + 2rem) 1rem; }
.error-page .inner { max-width: 480px; }
.error-code { font-size: clamp(6rem, 20vw, 9rem); font-weight: 800; color: rgba(255,255,255,.06); line-height: 1; }
.error-body { position: relative; margin-top: -4rem; }
.error-body h1 { margin-bottom: 1rem; }
.error-body p { color: var(--text-muted); margin-bottom: 2rem; }
.error-actions { display: flex; flex-direction: column; gap: 1rem; justify-content: center; }
@media (min-width: 480px) { .error-actions { flex-direction: row; } }
.search-box { position: relative; max-width: 320px; margin: 3rem auto 0; }
.search-box input { width: 100%; background: rgba(0,0,0,.3); border: 1px solid var(--border); border-radius: var(--radius-full); padding: .6rem 2.5rem .6rem 1rem; color: var(--text-muted); }
.search-box input:focus { outline: none; border-color: var(--brand); }
.search-box button { position: absolute; right: .75rem; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-dim); }
.search-box button:hover { color: var(--brand); }

/* ==========================================================================
   15. 分页
   ========================================================================== */
.pagination { margin-top: 4rem; }
.pagination .nav-links { display: flex; justify-content: center; flex-wrap: wrap; gap: .5rem; }
.pagination .page-numbers {
    display: inline-grid; place-items: center;
    min-width: 44px; min-height: 44px;
    padding: .5rem .9rem;
    background: var(--surface); color: #fff;
    border-radius: var(--radius-sm); font-size: var(--fs-sm);
}
.pagination .page-numbers.current { background: var(--brand); color: var(--on-brand); font-weight: 700; }
.pagination .page-numbers:hover:not(.current) { background: var(--brand); color: var(--on-brand); }
.pagination .dots { background: none; }

/* ==========================================================================
   16. Footer
   ========================================================================== */
.site-footer { background: #000; border-top: 1px solid var(--border); padding-block: 3rem; font-size: var(--fs-sm); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; margin-bottom: 3rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }
.footer-heading { color: #fff; font-weight: 700; margin-bottom: 1rem; font-size: var(--fs-sm); letter-spacing: .04em; text-transform: uppercase; }
.footer-list { list-style: none; margin: 0; padding: 0; }
.footer-list li { margin-bottom: .5rem; }
.footer-link { color: var(--text-dim); }
.footer-link:hover { color: var(--brand); }
.footer-social { display: flex; gap: 1rem; margin-top: .5rem; }
.social-link { width: 40px; height: 40px; display: grid; place-items: center; background: var(--surface); border-radius: var(--radius-full); color: var(--text-muted); font-size: var(--fs-lg); }
.social-link:hover { background: var(--brand); color: var(--on-brand); }
.footer-bottom { display: flex; flex-direction: column; gap: 1rem; align-items: center; justify-content: space-between; padding-top: 2rem; border-top: 1px solid var(--border); color: var(--text-dim); }
@media (min-width: 768px) { .footer-bottom { flex-direction: row; } }
.footer-bottom a { color: var(--text-dim); }
.footer-bottom a:hover { color: var(--text-muted); }
.footer-badge { border: 1px solid var(--border); padding: .15rem .5rem; border-radius: var(--radius-sm); font-size: var(--fs-xs); }
.footer-official-notice { margin-top: 1.5rem; padding: 1rem; background: var(--surface); border-radius: var(--radius-sm); border-left: 3px solid var(--brand); font-size: var(--fs-xs); color: var(--text-dim); line-height: 1.6; }

/* ==========================================================================
   17. 评论
   ========================================================================== */
.comments-area { margin-top: 3rem; }
.comment-form input, .comment-form textarea { width: 100%; padding: .6rem .75rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font: inherit; }
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--brand); }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment-body { padding: 1rem; margin-bottom: 1rem; background: var(--surface); border-radius: var(--radius); }

/* ==========================================================================
   18. 管理工具栏偏移
   ========================================================================== */
body.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) {
    body.admin-bar .site-header { top: 46px; }
}

/* 打印 */
@media print {
    .site-header, .site-footer, .non-official-banner, .single-aside, .hero-cta { display: none !important; }
    body { background: #fff; color: #000; }
}
