/* ==========================================================================
   AiCMS 默认主题  v4 —— 大气 · 简约 · 简洁
   设计语言：白底留白 / 墨色主色 / 单一克制蓝点缀 / 细线分隔
   ========================================================================== */

:root {
    --ink: #1b1b1f;            /* 墨色：标题、主按钮 */
    --ink-2: #3a3a40;          /* 次级文字 */
    --text: #4b4b52;           /* 正文 */
    --muted: #9a9aa2;          /* 弱化文字 */
    --line: #e9e9ed;           /* 发丝线 */
    --line-2: #f0f0f2;         /* 更浅分隔线 */
    --bg: #f7f7f8;             /* 页面底色（微暖纸白） */
    --white: #ffffff;
    --accent: #1d4ed8;         /* 克制蓝，仅作点缀 */
    --accent-soft: rgba(29, 78, 216, 0.06);

    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 2px rgba(18, 18, 26, 0.05);
    --shadow-md: 0 10px 30px rgba(18, 18, 26, 0.08);
    --header-h: 72px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
            "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.75;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color .2s ease; }
ul, ol { list-style: none; }
input, button, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
::selection { background: rgba(29, 78, 216, .12); }

/* 滚动条（细、极简） */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d5d5da; border-radius: 5px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #bfbfc6; }
::-webkit-scrollbar-track { background: transparent; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.main { min-height: 62vh; }

/* ==========================================================================
   顶部导航
   ========================================================================== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    background: rgba(255, 255, 255, .86);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--line);
    transition: box-shadow .3s ease, background .3s ease;
}
.header.is-scrolled {
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 6px 24px rgba(18, 18, 26, .06);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 32px;
    height: var(--header-h);
}

/* Logo */
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-mark {
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    background: var(--ink);
    color: #fff;
    font-size: 19px;
    font-weight: 700;
    border-radius: 10px;
    letter-spacing: .5px;
    transition: transform .25s ease, background .25s ease;
}
.logo:hover .logo-mark { transform: translateY(-2px); background: #000; }
.logo-text {
    font-size: 21px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: 1.5px;
}
.logo-img {
    max-height: 40px;
    width: auto;
    display: block;
    object-fit: contain;
}

/* 导航 */
.nav { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; }
.nav-link {
    position: relative;
    display: inline-block;
    padding: 10px 15px;
    font-size: 15px;
    color: #55555c;
    font-weight: 500;
    letter-spacing: .5px;
}
.nav-link:hover { color: var(--ink); }
.nav-link.active { color: var(--ink); font-weight: 600; }
.nav-link.active::after { transform: scaleX(1); }
.nav-link::after {
    content: "";
    position: absolute;
    left: 15px; right: 15px; bottom: 6px;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
}
.nav-link:hover::after { transform: scaleX(1); }

/* 用户区 */
.user-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.user-chip {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 12px 5px 5px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 13px;
    color: var(--ink-2);
    transition: border-color .2s ease;
}
.user-chip:hover { border-color: #c9c9d0; }
.user-avatar {
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
/* 顶部纯文字导航（登录/注册/退出） */
.nav-link--text {
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-2);
    padding: 6px 4px;
    border-radius: 4px;
    transition: color .2s ease;
}
.nav-link--text:hover { color: var(--accent); }
.nav-divider {
    display: inline-block;
    margin: 0 2px;
    color: var(--line);
    font-weight: 400;
    user-select: none;
}
/* 兼容旧类名（无实际作用，避免其他模板引用报错） */
.nav-btn { display: inline-flex; align-items: center; }

/* 汉堡按钮 */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px; height: 40px;
    padding: 10px;
    border-radius: 8px;
}
.nav-toggle span {
    display: block;
    width: 100%; height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform .3s ease, opacity .3s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   首页 Hero 三列（第一列轮播图 / 第二列头条 / 第三列随机推荐）
   前两列对半分，第三列与侧边栏等宽（300px）
   ========================================================================== */
.hero-slider {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) 300px;
    gap: 16px;
    align-items: stretch;
    width: 100%;
	
}

/* ---- 第一列：轮播图 ---- */
.hero-stage {
    position: relative;
    min-width: 0;
    display: flex;
   margin-top: 18px;
    border-radius: var(--radius);
    overflow: hidden;
    background: #e9e9ed;
    box-shadow: var(--shadow-sm);
}
.hero-track {
    display: flex;
    flex: 1;
    min-height: 330px;
    transition: transform .6s cubic-bezier(.4, 0, .2, 1);
}
.hero-slide {
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    min-height: 330px;
    margin-top: 10px;
    overflow: hidden;
    background: #e9e9ed;
}
.hero-slide > a { display: block; width: 100%; height: 100%; }
.hero-slide img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.01);
    transition: transform 6s linear;
}
.hero-slider .hero-slide.active img { transform: scale(1.08); }

/* 图片底部渐变遮罩（承载标题信息） */
.hero-slide::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 60%;
    background: linear-gradient(180deg, rgba(12, 12, 18, 0) 0%, rgba(12, 12, 18, .85) 100%);
    pointer-events: none;
}
.hero-slide-info {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 1;
    padding: 26px 26px 24px;
}
.hero-slide-info .hero-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.hero-tag {
    flex-shrink: 0;
    padding: 3px 12px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
}
.hero-slide-info .hero-date {
    font-size: 13px;
    color: rgba(255, 255, 255, .82);
    letter-spacing: .5px;
}
.hero-slide-info .hero-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.45;
    letter-spacing: .5px;
    color: #fff;
}

/* 箭头按钮（悬浮于轮播图内） */
.hero-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    border: 1px solid var(--line);
    color: var(--ink);
    box-shadow: var(--shadow-sm);
    opacity: 0;
    transition: opacity .3s ease, background .3s ease;
}
.hero-btn:hover { background: #fff; }
.hero-stage:hover .hero-btn { opacity: 1; }
.hero-prev { left: 14px; }
.hero-next { right: 14px; }
.hero-btn svg { width: 20px; height: 20px; }
.hero-btn { font-size: 17px; line-height: 1; }

/* 指示点（位于轮播图左下角） */
.hero-dots {
    position: absolute;
    left: 26px; bottom: 18px;
    z-index: 3;
    display: flex; align-items: center; gap: 8px;
}
.hero-dots button {
    width: 8px; height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .5);
    transition: width .3s ease, background .3s ease;
}
.hero-dots button.active { width: 24px; background: #fff; }

/* ---- 第二、三列：推荐列表（门户风） ---- */
.hero-list {
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 18px 18px 10px;
	  margin-top: 18px;
}
.hero-list-title {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--ink);
    padding-bottom: 11px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--line-2);
}
.hero-list-title > span {
    display: flex;
    align-items: center;
    gap: 9px;
}
.hero-list-title > span::before {
    content: "";
    width: 4px; height: 15px;
    border-radius: 2px;
    background: var(--accent);
}
.hero-list-title::after {
    content: "";
    position: absolute;
    left: 0; bottom: -1px;
    width: 32px; height: 2px;
    border-radius: 1px;
    background: var(--accent);
}
.hero-list-more {
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0;
    color: var(--muted);
    transition: color .2s ease;
}
.hero-list-more:hover { color: var(--accent); }

.hero-list-items {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
}
.hero-list-items a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 2px;
    border-bottom: 1px solid var(--line-2);
    transition: background .2s ease;
}
.hero-list-items li:last-child a { border-bottom: none; }
.hero-list-items a:hover { background: rgba(0, 0, 0, .02); }
.hero-list-num {
    flex-shrink: 0;
    width: 20px; height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    background: #f2f2f5;
    color: #b4b4bc;
    transition: background .2s ease, color .2s ease;
}
.hero-list-items li:nth-child(-n+3) .hero-list-num {
    background: var(--accent);
    color: #fff;
}
.hero-list-items a:hover .hero-list-num {
    background: var(--accent);
    color: #fff;
}
.hero-list-t {
    flex: 1;
    min-width: 0;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color .2s ease;
}
.hero-list-items a:hover .hero-list-t { color: var(--accent); }
.hero-list-date {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--muted);
}

/* ---- 头条列（含摘要）：编号置顶 + 标题/日期一行 + 摘要两行 ---- */
.hero-list-feature .hero-list-items a {
    align-items: flex-start;
    gap: 10px;
    padding: 9px 2px;
}
.hero-list-feature .hero-list-num { margin-top: 2px; }
.hero-list-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.hero-list-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}
.hero-list-feature .hero-list-t {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
}
.hero-list-cat {
    flex-shrink: 0;
    max-width: 80px;
    padding: 1px 7px;
    border-radius: 3px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hero-list-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--muted);
    transition: color .2s ease;
}
.hero-list-feature a:hover .hero-list-desc { color: #8f8f98; }

/* ---- 头条列第 4 位：文字广告位 ---- */
.hero-ad {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 9px 0;
    padding: 11px 12px;
    border: 1px dashed #d7d7de;
    border-radius: 6px;
    background: #fafafc;
    transition: border-color .2s ease, background .2s ease;
}
.hero-ad:hover { border-color: var(--accent); background: var(--accent-soft); }
.hero-ad-badge {
    flex-shrink: 0;
    padding: 1px 6px;
    border-radius: 3px;
    background: #e8e8ee;
    color: #9a9aa2;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
}
.hero-ad-text {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color .2s ease;
}
.hero-ad:hover .hero-ad-text { color: var(--accent); }

/* ---- 头条列第 4 位：广告系统插槽（渲染后台广告内容的容器） ---- */
.hero-ad-slot { margin: 9px 0; }
.hero-ad-slot > a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 11px 12px;
    border: 1px dashed #d7d7de;
    border-radius: 6px;
    background: #fafafc;
    font-size: 13px;
    color: var(--muted);
    text-align: center;
    transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.hero-ad-slot > a:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}
.hero-ad-slot img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 64px;
    object-fit: cover;
    border-radius: 4px;
}

/* ---- 通用横幅广告位（首页/文章页/列表页） ---- */
.ad-banner { margin: 16px 0; }
.ad-banner > a {
    display: block;
    padding: 14px 20px;
    border: 1px dashed #d7d7de;
    border-radius: 6px;
    background: #fafafc;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
    transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.ad-banner > a:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}
.ad-banner img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
}

/* ---- 侧边栏广告位 ---- */
.sidebar-ad { margin-bottom: 24px; }

/* ---- 侧边栏跟随广告位（滚动吸附） ---- */
.sidebar-follow-slot { position: relative; min-height: 180px; margin-bottom: 24px; }
.sidebar-follow-ad {
    position: absolute; top: 0; left: 0; width: 100%; margin-bottom: 0; z-index: 9;
    transition: opacity .45s ease, visibility .45s ease;
}
.sidebar-follow-ad.is-fixed {
    position: fixed;
    top: 16px;
    left: auto;
    z-index: 99;
    box-shadow: var(--shadow-md, 0 8px 24px rgba(18, 18, 26, .12));
}
.sidebar-follow-ad.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.sidebar-ad-follow {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 180px;
    border: 1px dashed #d7d7de;
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-size: 13px;
    text-align: center;
    transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.sidebar-ad-follow:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.sidebar-ad-follow .ad-label { padding: 2px 9px; font-size: 12px; color: #fff; background: var(--accent); border-radius: 4px; }
.sidebar-ad > a {
    display: block;
    padding: 16px 12px;
    border: 1px dashed #d7d7de;
    border-radius: 6px;
    background: #fafafc;
    text-align: center;
    font-size: 12.5px;
    color: var(--muted);
    transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.sidebar-ad > a:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}
.sidebar-ad img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
}

/* ---- 随机推荐列：随 grid 等高拉伸 + 行内容内缩 ---- */
.hero-list-random .hero-list-items a {
    padding-left: 6px;
    padding-right: 6px;
}

/* ---- 头条列：列表容器默认随 grid 等高拉伸 ---- */
.hero-list-feature .hero-list-items { margin: 0; }

/* ==========================================================================
   通用区块
   ========================================================================== */
.section {
    background: var(--bg);
    border: 0;
    border-radius: var(--radius);
    box-shadow: none;
    padding: 26px 0;
    margin-bottom: 24px;
}
.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line-2);
}
.section-title span {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: 2px;
}
.section-title span::before {
    content: "";
    width: 3px; height: 17px;
    border-radius: 2px;
    background: var(--accent);
}
.section-more {
    font-size: 13px;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color .2s ease;
}
.section-more:hover { color: var(--ink); }
.section-more::after { content: "→"; }

/* ==========================================================================
   文章列表（淡卡片：卡片间上下分割）
   ========================================================================== */
.article-list { display: block; }
.article-item {
    display: flex;
    gap: 22px;
    padding: 18px 20px;
    margin-bottom: 12px;
    background: #fafafb;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    transition: background .25s ease, border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.article-item:last-child { margin-bottom: 0; }
.article-item:hover {
    background: var(--white);
    border-color: #d9d9e0;
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

/* 列表内嵌广告卡片（第 4 条位，宽度高度与文章条目对应） */
.article-ad {
    align-items: center;
    justify-content: center;
    min-height: 184px;
    background: #fafafb;
    border-style: dashed;
}
.article-ad:hover {
    background: #fafafb;
    border-color: var(--line);
    box-shadow: none;
    transform: none;
}
.article-ad .article-ad-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
/* 预设广告模板（ai_ad code=list_article_ad 默认内容） */
.list-inline-ad {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 146px;
    font-size: 14px;
    color: var(--muted);
    letter-spacing: .5px;
}
.list-inline-ad .ad-label {
    padding: 2px 9px;
    font-size: 12px;
    color: #fff;
    background: var(--accent);
    border-radius: 4px;
    letter-spacing: 1px;
}

.article-thumb {
    flex: 0 0 230px;
    width: 230px;
    height: 148px;
    overflow: hidden;
    border-radius: 10px;
    background: #eeeef1;
}
.article-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.article-item:hover .article-thumb img { transform: scale(1.05); }

.article-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.article-info h2 {
    font-size: 19px;
    font-weight: 600;
    line-height: 1.55;
    letter-spacing: .3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-info h2 a { color: var(--ink); transition: color .2s ease; }
.article-info h2 a:hover { color: var(--accent); }

.meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 18px;
    margin-top: 10px;
    font-size: 13px;
    color: var(--muted);
}
.meta-item { display: inline-flex; align-items: center; gap: 5px; }
.meta-item svg { width: 14px; height: 14px; opacity: .65; }
.meta-cat {
    color: var(--accent);
    font-weight: 600;
    letter-spacing: .5px;
}

.desc {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.8;
    color: #828289;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.desc a {
    color: inherit;
    text-decoration: none;
    transition: color .2s ease;
}
.desc a:hover { color: var(--accent); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tags a {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: .5px;
    transition: color .2s ease;
}
.tags a:hover { color: var(--accent); }
.tags a::before { content: "#"; opacity: .6; }

/* ==========================================================================
   侧边栏
   ========================================================================== */
.sidebar-widget {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 22px 24px;
    margin-bottom: 24px;
}
.sidebar-widget h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: 2px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--line-2);
}
.sidebar-widget h3::before {
    content: "";
    width: 3px; height: 15px;
    border-radius: 2px;
    background: var(--accent);
}

/* 搜索 */
.search-form { display: flex; gap: 8px; }
.search-form .btn {
    width: 80px;
    flex-shrink: 0;
    justify-content: center;
    padding: 0;
}
.form-control {
    flex: 1;
    min-width: 0;
    height: 42px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    outline: none;
    font-size: 14px;
    background: var(--bg);
    color: var(--ink-2);
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.form-control:focus {
    border-color: var(--accent);
    background: var(--white);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-control::placeholder { color: var(--muted); }
textarea.form-control { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; line-height: 1.8; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 42px;
    padding: 0 26px;
    font-size: 14px;
    letter-spacing: 1px;
    border-radius: var(--radius-sm);
    transition: all .25s ease;
    border: 1px solid transparent;
}
.btn-primary {
    background: var(--ink);
    color: #fff;
    font-weight: 500;
}
.btn-primary:hover { background: #000; }
.btn-outline {
    background: transparent;
    border-color: var(--line);
    color: var(--ink-2);
}
.btn-outline:hover { color: var(--ink); border-color: #c9c9d0; }

/* 热门排行 */
/* 最新/随机推荐文章列表 */
.side-list { display: flex; flex-direction: column; }
.side-list li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--line-2);
}
.side-list li:last-child { border-bottom: none; padding-bottom: 2px; }
.side-list a {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    color: var(--ink-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color .2s ease;
}
.side-list a:hover { color: var(--accent); }
.side-date { flex-shrink: 0; font-size: 12px; color: var(--muted); }

.hot-list { display: flex; flex-direction: column; }
.hot-list li { display: flex; align-items: baseline; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line-2); }
.hot-list li:last-child { border-bottom: none; padding-bottom: 2px; }
.hot-list a {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    color: var(--ink-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color .2s ease;
}
.hot-list a:hover { color: var(--accent); }
.hot-num {
    font-size: 13px;
    font-weight: 700;
    color: #c4c4cb;
    font-variant-numeric: tabular-nums;
}
.hot-top { color: var(--accent); }

/* 标签云 */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a {
    padding: 4px 14px;
    font-size: 13px;
    color: var(--ink-2);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 999px;
    letter-spacing: .5px;
    transition: all .25s ease;
}
.tag-cloud a:hover { color: #fff; background: var(--ink); border-color: var(--ink); }

/* 友情链接 */
.flinks { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.flinks li a { font-size: 13px; color: var(--muted); transition: color .2s ease; }
.flinks li a:hover { color: var(--ink); }

/* ==========================================================================
   内容布局
   ========================================================================== */
.content-wrapper {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-top: 24px;
}
.content-main { flex: 1; min-width: 0; }
.sidebar { width: 348px; flex-shrink: 0; }

/* 面包屑 */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 0 0;
    font-size: 13px;
    color: var(--muted);
}
.breadcrumb a { color: var(--muted); transition: color .2s ease; }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb span { color: #bfbfc6; }
.breadcrumb > * + *::before {
    content: "›";
    margin-right: 8px;
    color: #c9c9cf;
}

/* 页面标题（列表页/搜索页） */
.page-title {
    font-size: 30px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: 2px;
    padding: 6px 0 18px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--line);
}
.search-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 14px 22px;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--ink-2);
}
.search-info strong { color: var(--accent); font-weight: 600; }
/* 搜索信息条放进 section 卡片后，收起独立白卡样式 */
.section .search-info {
    background: transparent;
    box-shadow: none;
    padding: 0 0 16px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

/* 空状态 */
.empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--muted);
}
.empty .empty-icon { font-size: 44px; margin-bottom: 12px; opacity: .6; }
.empty p { font-size: 15px; }

/* ==========================================================================
   文章详情
   ========================================================================== */
.article-detail {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 46px 28px;
}
.article-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.45;
    color: var(--ink);
    letter-spacing: .8px;
}
.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 22px;
    margin-top: 18px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--line-2);
    font-size: 13px;
    color: var(--muted);
}
.article-meta .meta-cat { font-size: 14px; }
.article-description {
    margin-top: 22px;
    padding: 14px 20px;
    background: var(--bg);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 14px;
    line-height: 1.9;
    color: #6d6d76;
}

/* 正文排版 */
.article-body {
    margin-top: 28px;
    font-size: 16px;
    line-height: 2;
    color: #333338;
}
.article-body > p { margin: 0 0 20px; }
.article-body h2,
.article-body h3,
.article-body h4 {
    color: var(--ink);
    font-weight: 700;
    line-height: 1.5;
    margin: 34px 0 14px;
    letter-spacing: .5px;
}
.article-body h2 { font-size: 23px; }
.article-body h3 { font-size: 19px; }
.article-body h4 { font-size: 17px; }
.article-body img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 12px auto;
    border-radius: var(--radius-sm);
}
.article-body a { color: var(--accent); border-bottom: 1px solid rgba(29, 78, 216, .3); }
.article-body a:hover { color: #163d9e; border-bottom-color: #163d9e; }
.article-body blockquote {
    margin: 22px 0;
    padding: 14px 22px;
    background: var(--bg);
    border-left: 3px solid var(--line);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: #6d6d76;
    font-size: 15px;
}
.article-body code {
    padding: 2px 7px;
    background: #f1f1f3;
    border-radius: 5px;
    font-size: .9em;
    color: #c02b5a;
    font-family: Consolas, Menlo, monospace;
}
.article-body pre {
    margin: 22px 0;
    padding: 18px 20px;
    background: #17171b;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    line-height: 1.7;
}
.article-body pre code { background: transparent; color: #d7d7de; padding: 0; font-size: 13.5px; }
.article-body table {
    width: 100%;
    margin: 22px 0;
    border-collapse: collapse;
    font-size: 14.5px;
}
.article-body th, .article-body td {
    padding: 10px 14px;
    border: 1px solid var(--line);
    text-align: left;
}
.article-body th { background: var(--bg); color: var(--ink); font-weight: 600; }
.article-body ul, .article-body ol { margin: 0 0 20px; padding-left: 26px; }
.article-body ul li { list-style: disc; }
.article-body ol li { list-style: decimal; }
.article-body li { margin-bottom: 6px; }

/* 文章标签（独立成行，置于正文与上下篇之间） */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    margin-top: 36px;
    padding: 16px 20px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    font-size: 13px;
    line-height: 1.6;
}
.article-tags .tags-label {
    flex-shrink: 0;
    font-weight: 600;
    color: var(--ink-2);
    letter-spacing: 1px;
}
.article-tags .tag {
    display: inline-block;
    padding: 4px 12px;
    color: var(--muted);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 12.5px;
    letter-spacing: .3px;
    transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.article-tags .tag:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: #fff;
}
.article-tags .tag::before { content: "#"; opacity: .55; margin-right: 1px; }

/* 上一篇/下一篇 */
.article-nav {
    display: flex;
    gap: 20px;
    margin-top: 40px;
    padding-top: 22px;
    border-top: 1px solid var(--line-2);
    font-size: 14px;
}
.article-nav .prev,
.article-nav .next {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.article-nav a { flex: 1; min-width: 0; }
.article-nav .nav-label {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 2px;
}
.article-nav .nav-title {
    display: block;
    color: var(--ink-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color .2s ease;
}
.article-nav a:hover .nav-title { color: var(--accent); }
.article-nav .next { margin-left: auto; justify-content: flex-end; }
.article-nav .nav-next { justify-content: flex-end; }

/* 相关文章 */
.related-articles { margin-top: 28px; }
.related-articles h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: 2px;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--line-2);
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.related-item {
    display: flex;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line-2);
    border-radius: var(--radius-sm);
    transition: border-color .25s ease, background .25s ease;
}
.related-item:hover { border-color: #d4d4db; background: var(--bg); }
.related-item img {
    width: 104px; height: 72px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 6px;
    background: #eeeef1;
}
.related-item .related-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-2);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .2s ease;
}
.related-item:hover .related-title { color: var(--accent); }

/* 单页（page） */
.page-detail {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 46px 28px;
}
.page-detail .page-title {
    border-bottom: none;
    margin-bottom: 8px;
    padding: 0 0 24px;
}
.page-detail .article-body { margin-top: 10px; }

/* 支付提示 / 预览 */
.pay-notice {
    margin-top: 28px;
    padding: 20px 24px;
    background: var(--bg);
    border: 1px dashed var(--line);
    border-radius: var(--radius-sm);
    text-align: center;
    color: var(--ink-2);
}
.pay-notice .btn { margin-top: 14px; }
.preview { max-width: 100%; }

/* ==========================================================================
   评论
   ========================================================================== */
.comments-section { margin-top: 24px; }
.comments-section h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: 2px;
    padding-bottom: 12px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--line);
}
.comment-form {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 22px 24px;
    margin-bottom: 20px;
}
.comment-form .form-control { margin-bottom: 12px; }
.comment-form .btn { margin-top: 2px; }
.comments-list { display: flex; flex-direction: column; gap: 14px; }
.comment-item {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 20px 24px;
}
.comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.comment-header strong { color: var(--ink); font-size: 14px; font-weight: 600; }
.comment-header span { font-size: 12px; color: var(--muted); }
.comment-body { font-size: 14.5px; line-height: 1.85; color: var(--text); }

/* ==========================================================================
   分页
   ========================================================================== */
.pagination { margin-top: 28px; }
.pagination ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.pagination li { display: inline-flex; }
.pagination li a,
.pagination li.disabled span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 14px;
    font-size: 14px;
    color: var(--ink-2);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    transition: all .25s ease;
}
.pagination li a:hover {
    color: #fff;
    background: var(--ink);
    border-color: var(--ink);
}
.pagination li.active a {
    color: #fff;
    background: var(--ink);
    border-color: var(--ink);
    font-weight: 600;
}
.pagination li.disabled span { color: var(--muted); background: var(--bg); }

/* 首页最新文章：滚动加载更多 */
.load-more-wrap {
    padding: 16px 0 6px;
    text-align: center;
    min-height: 22px;
}
.load-more-tip {
    font-size: 13px;
    color: var(--muted);
    letter-spacing: .5px;
}
.load-more-tip:empty { display: none; }

/* ==========================================================================
   页脚
   ========================================================================== */
.footer {
    margin-top: 48px;
    background: #15151a;
    color: #9c9ca5;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 40px;
    padding: 56px 0 44px;
}
.footer-col h4 {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 2px;
    margin-bottom: 18px;
}
.footer-col p { font-size: 13.5px; line-height: 1.9; color: #8b8b94; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { font-size: 13.5px; color: #8b8b94; transition: color .2s ease; }
.footer-col ul li a:hover { color: #fff; }
.footer-about .logo-mark { margin-bottom: 14px; }
.footer-about .footer-logo {
    max-height: 36px;
    width: auto;
    margin-bottom: 14px;
    object-fit: contain;
}
.footer-about .footer-slogan { margin-top: 2px; }
.footer-source { margin-top: 8px; font-size: 12px; }
.footer-source a { color: rgba(255, 255, 255, .45); text-decoration: none; }
.footer-source a:hover { color: rgba(255, 255, 255, .75); }
.footer-icp::before { content: "·"; margin: 0 6px; color: #55555c; }
.footer-bottom {
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, .08);
    text-align: center;
    font-size: 13px;
    color: #6f6f78;
}
.footer-bottom a { color: #8b8b94; transition: color .2s ease; }
.footer-bottom a:hover { color: #fff; }

/* 返回顶部 */
.back-top {
    position: fixed;
    right: 28px;
    bottom: 34px;
    z-index: 90;
    width: 42px; height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--ink);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all .3s ease;
}
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { background: var(--ink); color: #fff; }
.back-top svg { width: 18px; height: 18px; }

/* ==========================================================================
   404 错误页
   ========================================================================== */
.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 62vh;
    text-align: center;
    padding: 60px 20px;
}
.error-code {
    font-size: 120px;
    font-weight: 800;
    line-height: 1;
    color: var(--ink);
    letter-spacing: 6px;
}
.error-icon {
    margin-bottom: 18px;
    color: #d1d1d7;
}
.error-page h1 {
    margin-top: 12px;
    font-size: 22px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: 2px;
}
.error-page p { margin-top: 12px; color: var(--muted); font-size: 14px; }
.error-page .btn { margin-top: 28px; }

/* ==========================================================================
   会员登录 / 注册
   ========================================================================== */
.auth-page {
    display: flex;
    justify-content: center;
    padding: 56px 20px 80px;
}
.auth-card {
    width: 100%;
    max-width: 430px;
    padding: 40px 38px 36px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}
.auth-head { text-align: center; margin-bottom: 30px; }
.auth-icon {
    width: 52px; height: 52px;
    margin: 0 auto 14px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
}
.auth-icon svg { width: 24px; height: 24px; }
.auth-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: 3px;
}
.auth-sub {
    margin-top: 6px;
    font-size: 13px;
    color: var(--muted);
    letter-spacing: 1px;
}
.auth-alert {
    margin-bottom: 22px;
    padding: 10px 14px;
    border: 1px solid #fecaca;
    border-radius: var(--radius-sm);
    background: #fef2f2;
    color: #b91c1c;
    font-size: 13.5px;
}
.auth-field { margin-bottom: 18px; }
.auth-label {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-2);
    letter-spacing: .5px;
}
.auth-label svg { width: 14px; height: 14px; color: var(--muted); }
.auth-input-wrap { position: relative; }
.auth-input {
    width: 100%;
    height: 46px;
    padding: 0 14px 0 42px;
    font-size: 14px;
    color: var(--ink);
    background: #fcfcfd;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.auth-input::placeholder { color: var(--muted); }
.auth-input:focus {
    border-color: var(--accent);
    background: var(--white);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.auth-input-icon {
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    width: 17px; height: 17px;
    color: var(--muted);
    pointer-events: none;
    transition: color .2s ease;
}
.auth-input-wrap:focus-within .auth-input-icon { color: var(--accent); }
.auth-btn {
    width: 100%;
    height: 46px;
    margin-top: 6px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 4px;
    color: #fff;
    background: var(--ink);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background .25s ease, box-shadow .25s ease, transform .15s ease;
}
.auth-btn:hover { background: #000; box-shadow: 0 8px 20px rgba(18, 18, 26, .18); }
.auth-btn:active { transform: translateY(1px); }
.auth-switch {
    margin-top: 22px;
    text-align: center;
    font-size: 13.5px;
    color: var(--muted);
}
.auth-switch a { color: var(--accent); font-weight: 500; }
.auth-switch a:hover { text-decoration: underline; }

@media (max-width: 480px) {
    .auth-page { padding: 32px 14px 60px; }
    .auth-card { padding: 30px 22px 28px; }
}

/* ==========================================================================
   在线投稿页
   ========================================================================== */
.contribute-card { max-width: 780px; }
.contribute-card .auth-input { padding: 0 14px; }
.contribute-card select.auth-input {
    padding: 0 10px;
    appearance: auto;
    -webkit-appearance: auto;
    cursor: pointer;
}
.contribute-editor {
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: var(--white);
    z-index: 1;
}
.contribute-editor .w-e-toolbar { border-bottom: 1px solid var(--line); }
.contribute-section { margin: 18px 0 4px; }
.contribute-section-title {
    font-size: 13.5px;
    color: var(--muted);
    margin-bottom: 10px;
}
.contribute-contacts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0 14px;
}
.w-e-fullscreen { z-index: 9999 !important; }
@media (max-width: 640px) {
    .contribute-contacts { grid-template-columns: 1fr; }
}

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1024px) {
    .header-inner { gap: 16px; }
    .sidebar { width: 260px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }

    /* Hero 三列 → 两列（前两列保持 2:3），随机推荐换行整行展示 */
    .hero-slider { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
    .hero-list-random { grid-column: 1 / -1; }
    .hero-list-random .hero-list-items {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 22px;
    }
}

@media (max-width: 900px) {
    :root { --header-h: 60px; }

    .header-inner { gap: 12px; }
    .logo-text { font-size: 18px; letter-spacing: 1px; }
    .logo-img { max-height: 34px; }

    .nav-toggle { display: flex; margin-left: auto; }
    .user-actions { order: 3; }
    .nav-toggle { order: 4; }

    .nav {
        position: fixed;
        top: var(--header-h);
        left: 0; right: 0;
        z-index: 99;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--white);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 18px 30px rgba(18, 18, 26, .1);
        max-height: 0;
        overflow: hidden;
        transition: max-height .35s ease;
    }
    .nav.open { max-height: 420px; overflow-y: auto; }
    .nav-link {
        padding: 15px 24px;
        font-size: 15px;
        border-bottom: 1px solid var(--line-2);
    }
    .nav-link::after { display: none; }
    .nav-link.active { color: var(--accent); background: var(--bg); }

    .hero-slider { grid-template-columns: 1fr; gap: 14px; }
    .hero-list-random { grid-column: auto; margin-bottom: 0; }
    .hero-list-random .hero-list-items { display: flex; }
    .hero-slide { height: 400px; }
    .hero-btn { width: 38px; height: 38px; opacity: 1; }
    .hero-prev { left: 12px; }
    .hero-next { right: 12px; }
    .hero-dots { left: 22px; bottom: 16px; }
    .hero-slide-info .hero-title { font-size: 20px; }
    .hero-list { padding: 16px 14px 8px; }

    .content-wrapper { flex-direction: column; }
    .sidebar { width: 100%; }

    .article-item { gap: 16px; }
    .article-thumb { flex-basis: 200px; width: 200px; height: 128px; }

    .article-detail { padding: 30px 28px; }
    .article-title { font-size: 25px; }

    .related-grid { grid-template-columns: 1fr; }

    .back-top { right: 16px; bottom: 20px; }
}

@media (max-width: 640px) {
    .container { padding: 0 14px; }
    .main { padding-top: 14px; }

    /* 预设广告位移动端兜底：强匹配（容器宽度=视口）无法适应则强截断（裁掉溢出，防止撑破布局/横向滚动） */
    .ad-banner,
    .home-load-more-ad,
    .sidebar-ad,
    .sidebar-follow-ad,
    .article-ad-inner,
    .hero-ad-slot {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    .ad-banner img,
    .sidebar-ad img,
    .sidebar-follow-ad img,
    .article-ad-inner img,
    .hero-ad-slot img {
        max-width: 100%;
        height: auto;
    }
    .ad-banner iframe,
    .ad-banner video,
    .ad-banner embed,
    .ad-banner object,
    .sidebar-ad iframe,
    .sidebar-ad video,
    .sidebar-ad embed,
    .sidebar-ad object,
    .sidebar-follow-ad iframe,
    .article-ad-inner iframe,
    .article-ad-inner video,
    .article-ad-inner embed,
    .article-ad-inner object,
    .hero-ad-slot iframe {
        max-width: 100%;
        border: 0;
        display: block;
    }

    .hero-slider { margin-top: 14px; }
    .hero-slide { height: 340px; }
    .hero-slide-info { padding: 20px 18px 18px; }
    .hero-slide-info .hero-meta { margin-bottom: 10px; }
    .hero-slide-info .hero-title { font-size: 17px; }
    .hero-tag { font-size: 11px; padding: 2px 9px; }
    .hero-slide-info .hero-date { font-size: 12px; }
    .hero-dots { left: 18px; bottom: 12px; }
    .hero-list-title { font-size: 14px; }
    .hero-list-t { font-size: 13px; }
    .hero-list-desc { font-size: 12px; }

    .section { padding: 20px 18px; margin-bottom: 16px; }
    .section-title span { font-size: 16px; letter-spacing: 1px; }

    .article-item { flex-direction: column; gap: 12px; padding: 16px; }
    .article-ad { min-height: 150px; }
    .article-thumb { width: 100%; flex-basis: auto; height: 180px; }
    .article-info h2 { font-size: 17px; }

    .page-title { font-size: 24px; }
    .article-detail { padding: 24px 18px; border-radius: 10px; }
    .page-detail { padding: 24px 18px; border-radius: 10px; }
    .article-title { font-size: 22px; }
    .article-meta { gap: 4px 14px; }
    .article-body { font-size: 15px; }
    .article-nav { flex-direction: column; }
    .article-nav .next { justify-content: flex-start; margin-left: 0; }

    .footer-grid { grid-template-columns: 1fr; gap: 28px; padding: 40px 0 28px; }
    .footer-about { order: 1; }
    .user-chip { padding-left: 5px; }
    .nav-link--text { font-size: 13px; }
    .user-actions { gap: 6px; }
}
