/*
 * Eogee CMS 前台样式
 * 主题色: #16baaa
 * 设计风格: 科技风、美观大气、适配移动端
 * 注意: 不使用任何emoji
 */

/* ===== 基础重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; overflow: -moz-scrollbars-none; -ms-overflow-style: none; scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
body::-webkit-scrollbar { display: none; }
body { font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 15px; line-height: 1.6; color: #333; background: #f8faff; -webkit-font-smoothing: antialiased;
    display: flex; flex-direction: column; min-height: 100vh; }
a { color: #333; text-decoration: none; transition: color 0.3s; }
/* 固定导航栏偏移量：点击锚点/目录时标题不被 64px 的 header 遮挡 */
.article-body h2, .article-body h3, .article-body h4 { scroll-margin-top: 25px; }
a:hover { color: #16baaa; }
img { max-width: 100%; height: auto; }
ul, ol { list-style: none; }
input, button, textarea { font-family: inherit; font-size: inherit; outline: none; }
button { cursor: pointer; border: none; background: none; }
.container { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 20px; }

/* ===== 头部导航 ===== */
.site-header { position: sticky; top: 0; z-index: 1000; background: #fff;
    border-bottom: 1px solid #e8e8e8; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
.header-inner { display: flex; align-items: center; justify-content: space-between;
    height: 64px; position: relative; }

.logo-h1 { margin: 0; font-size: 0; line-height: 0; }
.logo-img { height: 38px; padding-left: 20px; vertical-align: middle; }
@media (min-width: 769px) {
    .logo picture .logo-img { max-width: 125px; height: auto; width: auto; }
}
.logo-text { font-size: 22px; font-weight: 700; color: #16baaa; letter-spacing: 1px; }

.main-nav .nav-list { display: flex; gap: 4px; }
.main-nav .nav-list > li { position: relative; }
.main-nav .nav-list > li > a { display: block; padding: 8px 16px; color: #444; font-size: 15px;
    border-radius: 10px; transition: all 0.3s; }
.main-nav .nav-list > li > a:hover,
.main-nav .nav-list > li.active > a { color: #16baaa; }
.main-nav .nav-list > li > a::after { content: ''; display: block; height: 2px; background: #16baaa;
    border-radius: 1px; transform: scaleX(0); transition: transform 0.25s ease; margin-top: 2px; }
.main-nav .nav-list > li > a:hover::after,
.main-nav .nav-list > li.active > a::after { transform: scaleX(1); }

.sub-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 150px;
    background: #fff; border: 1px solid #eee; border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    padding: 6px 0; z-index: 100; }
.has-sub:hover .sub-menu, .has-sub.active .sub-menu { display: block; }
.sub-menu li a { display: block; padding: 8px 18px; color: #444; font-size: 14px; white-space: nowrap; }
.sub-menu li a:hover { color: #16baaa; background: rgba(22,186,170,0.05); }
.sub-menu li.active > a { color: #16baaa; background: rgba(22,186,170,0.06); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.search-toggle { padding: 8px; border-radius: 10px; color: #555; transition: all 0.3s; }
.search-toggle:hover { color: #16baaa; }

/* 汉堡菜单 */
.menu-toggle { display: none; flex-direction: column; gap: 4px; padding: 8px; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: #444;
    border-radius: 1px; transition: all 0.3s; }
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

@media (max-width: 992px) {
    .menu-toggle { margin-left: auto; }
}

/* 搜索面板 */
.search-panel { display: none; background: #F8FAFF; border-top: 1px solid #eee;
    padding: 20px 0; }
.search-panel.active { display: block; }
.search-form { display: flex; gap: 10px; }
.search-input { flex: 1; padding: 8px 14px; border: 1px solid #ddd; border-radius: 10px;
    font-size: 14px; height: 36px; transition: border-color 0.3s; }
.search-input:focus { border-color: #16baaa; }
.search-submit { padding: 8px 20px; background: #16baaa; color: #fff; border-radius: 10px;
    font-size: 14px; height: 36px; line-height: 20px; transition: background 0.3s; white-space: nowrap; }
.search-submit:hover { background: #14a89a; }

/* ===== 主体 ===== */
.site-main { flex: 1; }

/* ===== 底部 ===== */
.site-footer { background: #2F363C; color: rgba(255,255,255,0.7); padding: 40px 0;
    position: relative; z-index: 1001; }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-info p { margin-bottom: 6px; font-size: 14px; }
.footer-info a { color: rgba(255,255,255,0.6); }
.footer-info a:hover { color: #16baaa; }
.footer-links h4 { color: #fff; margin-bottom: 12px; font-size: 16px; }
.footer-links ul { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.footer-links a { color: rgba(255,255,255,0.6); font-size: 14px; }
.footer-links a:hover { color: #16baaa; }

/* ===== 按钮 ===== */
.btn-primary { display: inline-block; padding: 12px 32px; background: #16baaa; color: #fff;
    border-radius: 10px; font-size: 16px; text-decoration: none; transition: background 0.3s; }
.btn-primary:hover { background: #14a89a; color: #fff; }

/* ========================================================================
   首页样式
   ======================================================================== */

/* ----- 首页公告条 ----- */
.notice-bar { background: #F8FAFF; border-bottom: 1px solid #eee; }
.notice-inner { display: flex; align-items: center; gap: 10px; height: 38px; position: relative; padding-right: 30px; }
.notice-icon { color: #16baaa; flex-shrink: 0; display: flex; align-items: center; }
.notice-track { flex: 1; overflow: hidden; height: 38px; }
.notice-item { display: none; height: 38px; line-height: 38px; font-size: 14px; color: #555;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notice-item.active { display: block; }
.notice-item a { color: inherit; text-decoration: none; }
.notice-item a:hover { color: #16baaa; text-decoration: none; }
.notice-dots { display: flex; gap: 5px; flex-shrink: 0; margin-right: 24px; }
.notice-dots button { width: 5px; height: 5px; border-radius: 50%; background: #cfe6e5;
    border: none; padding: 0; cursor: pointer; transition: background 0.2s; }
.notice-dots button.active { background: #16baaa; }
.notice-close { position: absolute; right: 24px; top: 50%; transform: translateY(-50%);
    color: #555; font-size: 12px; font-weight: bold; background: none; border: none; cursor: pointer; padding: 4px; }
.notice-close:hover { color: #16baaa; }
/* 公告跑马灯：移动端从右向左持续滚动 */
@keyframes notice-marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@media (max-width: 768px) {
    .notice-dots { display: none; }
    .notice-inner { height: 34px; padding-right: 24px; }
    .notice-item, .notice-track { height: 34px; line-height: 34px; }
    .notice-close { right: 62px; }

    /* 移动端：全部公告以跑马灯方式持续右→左滚动（内容由 JS 复制两份实现无缝循环） */
    .notice-track .notice-marquee {
        display: flex;
        width: max-content;
        animation: notice-marquee 30s linear infinite;
        will-change: transform;
    }
    .notice-track .notice-marquee .notice-item {
        display: inline-block;
        flex-shrink: 0;
        padding-right: 48px;
        overflow: visible;
        text-overflow: clip;
    }
}

/* ----- 轮播图 ----- */
.carousel { position: relative; overflow: hidden; background: #1a1a2e; margin-top: 0; }
.carousel-slides { display: flex; transition: transform 0.6s ease; }
.carousel-slide { min-width: 100%; position: relative; }
.carousel-slide img { width: 100%; height: 420px; object-fit: cover; display: block; }
.carousel-overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 40px 0 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7)); color: #fff; }
.carousel-overlay h2 { font-size: 24px; margin-bottom: 8px; padding-left: 20px;}
.carousel-overlay p { font-size: 14px; opacity: 0.9; padding-left: 20px;}
.carousel-dots { position: absolute; bottom: 15px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 8px; }
.carousel-dots button { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.5);
    cursor: pointer; transition: all 0.3s; border: none; padding: 0; }
.carousel-dots button.active { background: #16baaa; width: 28px; border-radius: 5px; }
.carousel-dots button:focus-visible { outline: 2px solid #16baaa; outline-offset: 2px; }

/* ----- 置顶文章（推荐阅读） ----- */
.top-articles { background: #eefafa; padding: 40px 0; }
.top-articles .section-title { color: #16baaa; }
.top-article-card { display: flex; gap: 20px; background: #fff; border-radius: 8px; padding: 20px;
    box-shadow: 0 2px 12px rgba(22,186,170,0.08); margin-bottom: 15px; transition: transform 0.3s; }
.top-article-card:hover { transform: translateY(-2px); }
a.top-article-card, a.article-card { text-decoration: none; color: inherit; display: block; }
a.top-article-card { display: flex; }
.top-article-card .badge { background: #16baaa; color: #fff; font-size: 12px; padding: 2px 10px;
    border-radius: 4px; display: inline-block; margin-bottom: 8px; }
.top-article-card h3 { font-size: 18px; margin-bottom: 8px; color: #333; }
a.top-article-card:hover h3 { color: #16baaa; }
.top-article-card p { color: #666; font-size: 14px; line-height: 1.6; }
.top-article-card .meta { color: #999; font-size: 13px; margin-top: 10px; }

/* ----- 文章列表（最新教程 & 通用卡片） ----- */
.latest-articles { padding: 50px 0; }
.section-title { font-size: 26px; text-align: center; margin-bottom: 10px; color: #333; }
.section-subtitle { text-align: center; color: #999; margin-bottom: 35px; font-size: 15px; }
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
.article-card { background: #fff; border-radius: 8px; overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06); transition: transform 0.3s, box-shadow 0.3s; }
.article-card:hover { transform: translateY(-4px); box-shadow: 0 6px 20px rgba(22,186,170,0.12); }
.view-all-wrapper { text-align: right; margin-top: 20px; }
.view-all-link { color: #16baaa; text-decoration: none; font-size: 14px; font-weight: 500; transition: color 0.3s; }
.view-all-link:hover { color: #2ed4c3; text-decoration: underline; }

/* ----- 子分类卡片网格（首页最新教程区域） ----- */
.sub-cat-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: var(--sub-cat-align, center);
    gap: 20px;
}
.sub-cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px 20px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
    /* 每行恰好 --sub-cat-cols 个：卡片基础宽度 = (容器宽 - (N-1)个间距) / N */
    flex: 0 1 calc((100% - (var(--sub-cat-cols, 5) - 1) * 20px) / var(--sub-cat-cols, 5));
}
.sub-cat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.sub-cat-card .cat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    flex-shrink: 0;
}
.sub-cat-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}
.sub-cat-card p {
    font-size: 13px;
    color: #999;
    margin: 0;
    line-height: 1.4;
}
@media (max-width: 768px) {
    .sub-cat-grid {
        gap: 14px;
    }
    .sub-cat-card {
        flex: 0 1 calc(50% - 7px);
        padding: 22px 14px;
    }
    .sub-cat-card .cat-icon {
        width: 44px;
        height: 44px;
    }
    .sub-cat-card h3 {
        font-size: 14px;
    }
}
@media (max-width: 480px) {
    .sub-cat-grid {
        flex-direction: column;
        align-items: stretch;
    }
    .sub-cat-card {
        flex-basis: auto;
    }
}

/* ----- 前沿资讯 ----- */
.news-section { padding: 40px 0; background: #EEFAFA; }
.news-list { border-top: 2px solid #eee; }
.news-item { display: flex; align-items: center; padding: 14px 16px; border-bottom: 1px solid #eee;
    text-decoration: none; color: #444; transition: color 0.3s, background 0.3s; font-size: 15px; border-radius: 4px; }
.news-item:hover { color: #16baaa; }
.news-item:last-child { border-bottom: none; }
.news-category { display: inline-block; font-size: 12px; padding: 1px 10px; margin-right: 12px;
    white-space: nowrap; flex-shrink: 0; color: #b85c00; background: #fef0d9; border-radius: 10px; font-weight: 500; }
.news-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-date { color: #999; font-size: 13px; margin-left: auto; white-space: nowrap; flex-shrink: 0; padding-left: 16px; }

.article-card .card-body { padding: 20px; }
.article-card h3 { font-size: 16px; margin-bottom: 10px; }
a.article-card h3 { color: #333; display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden; line-clamp: 2; }
a.article-card:hover h3 { color: #16baaa; }
.article-card p { color: #666; font-size: 14px; line-height: 1.6; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-clamp: 2; }
.article-card .meta { color: #999; font-size: 13px; margin-top: 12px;
    display: flex; justify-content: space-between; }

/* ----- 分类板块（首页下方） ----- */
.cat-section { padding: 40px 0; background: #fff; }
.cat-section:nth-child(even) { background: #fff; }
.cat-section-title { font-size: 22px; margin-bottom: 20px; padding-bottom: 10px;
    border-bottom: 2px solid #16baaa; display: inline-block; }
.cat-section .article-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.cat-section .article-item { padding: 12px 0; border-bottom: 1px solid #eee; display: block; color: #444; font-size: 15px; text-decoration: none; transition: color 0.3s; }
.cat-section .article-item:hover { color: #16baaa; }
.cat-section .article-item .date { float: right; color: #999; font-size: 13px; }

/* ========================================================================
   分类页样式
   ======================================================================== */
.category-page { padding: 40px 0; }
.category-header { margin-bottom: 30px; }
.category-header h1 { font-size: 26px; color: #222; margin-bottom: 8px; }
.category-header p { color: #666; font-size: 15px; }

/* 分类页文章卡片（覆盖通用 .article-card） */
.category-page .article-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.category-page .article-card { padding: 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.category-page .article-card:hover { transform: translateY(-2px); box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.category-page .article-card h3 { font-size: 17px; margin-bottom: 10px; }
.category-page a.article-card h3 { color: #333; display: block; }
.category-page a.article-card:hover h3 { color: #16baaa; }
.category-page .article-card p { color: #666; font-size: 14px; line-height: 1.6;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-clamp: 2; }
.category-page .article-card .meta { color: #999; font-size: 13px; margin-top: 12px;
    display: flex; justify-content: space-between; }

/* 分页（分类页 & 搜索页共用） */
.pagination { text-align: center; }
.category-page .pagination { margin-top: 40px; }
.search-page .pagination { margin-top: 30px; }
.pagination a, .pagination span { display: inline-block; padding: 4px 10px; margin: 0 2px;
    border: 1px solid #ddd; border-radius: 6px; color: #333; text-decoration: none;
    font-size: 13px; transition: all 0.3s; }
.pagination a:hover { border-color: #16baaa; color: #16baaa; }
.pagination .current { background: #16baaa; color: #fff; border-color: #16baaa; }

/* ========================================================================
   搜索页样式
   ======================================================================== */
.search-page { padding: 40px 0; min-height: 500px; }
.search-page h1 { font-size: 24px; margin-bottom: 25px; }
.search-page h1 span { color: #16baaa; }
.search-result-item { padding: 20px 0; border-bottom: 1px solid #eee; display: block; text-decoration: none; color: inherit; transition: color 0.3s; }
.search-result-item:hover h3 { text-decoration: underline; }
.search-result-item h3 { font-size: 18px; margin-bottom: 8px; }
a.search-result-item h3 { color: #16baaa; }
.search-result-item p { color: #666; font-size: 14px; line-height: 1.6; }
.search-result-item .meta { color: #999; font-size: 13px; margin-top: 8px; }

/* ========================================================================
   文章详情页样式
   ======================================================================== */
.article-container { max-width: 1400px; margin: 0 auto; padding: 0 20px; }
.article-wrapper { display: flex; gap: 0; min-height: calc(100vh - 64px - 200px); position: relative; }

/* 左侧目录栏 */
.article-sidebar { width: 230px; flex-shrink: 0; border-right: 1px solid #e8e8e8;
    background: transparent; position: relative; }
.article-sidebar .sidebar-inner { position: sticky; top: 64px; max-height: calc(100vh - 64px - 44px);
    overflow-y: auto; padding: 20px 0 50px;
    -ms-overflow-style: none; scrollbar-width: none; }
.article-sidebar .sidebar-inner::-webkit-scrollbar { display: none; }

.sidebar-header { padding: 0 5px 10px; margin-top: 30px; }
.sidebar-header h3 { margin: 0; }
.sidebar-header h3 a { color: #222; text-decoration: none; font-size: 16px; font-weight: 600;
    display: block; }
.sidebar-header h3 a:hover { color: #16baaa; }

.sidebar-list { list-style: none; padding: 0; margin: 0; }
.sidebar-list li a { display: block; padding: 10px 5px 10px 0px; font-size: 14px; color: #777;
    text-decoration: none; line-height: 1.4; transition: all 0.15s; border-left: 3px solid transparent; }
.sidebar-list li a:hover { color: #333; background: rgba(0,0,0,0.02); }
.sidebar-list li + li { border-top: 1px solid #f0f0f0; }
.sidebar-list li.current a { color: #16baaa; font-weight: 600; }
.sidebar-list li.current + li { border-top-color: transparent; }

/* 正文内容 */
.article-main { flex: 1; min-width: 0; padding: 40px 25px; }

.article-header { margin-bottom: 30px; }
.article-header h1 { font-size: 28px; color: #222; margin-bottom: 12px; line-height: 1.4; }
.article-header .meta { color: #999; font-size: 14px; }
.article-header .meta span { margin-right: 18px; }
.article-header .meta a { color: #16baaa; text-decoration: none; }

.article-body { max-width: 860px; font-size: 16px; line-height: 1.65; color: #333; }
.article-body h1, .article-body h2, .article-body h3 { margin: 28px 0 16px; color: #222; }
.article-body h1 { font-size: 24px; }
.article-body h2 { font-size: 20px; padding-bottom: 8px; border-bottom: 1px solid #eee; }
.article-body h3 { font-size: 18px; }
.article-body p { margin-bottom: 12px; }
.article-body img { max-width: 100%; height: auto; border-radius: 6px; margin: 16px 0; }
.article-body a { color: #16baaa; text-decoration: underline; }
.article-body a:hover { color: #2ed4c3; text-decoration: underline; }
.article-body blockquote { border-left: 4px solid #16baaa; padding: 10px 20px; margin: 16px 0;
    background: #f8fdfc; color: #555; border-radius: 0 4px 4px 0; }
.article-body blockquote p{ margin: 0; }
.article-body pre { background: #2f363c; color: #e2e8f0; padding: 20px; border-radius: 8px;
    overflow-x: auto; margin: 16px 0; font-size: 15px; line-height: 1.7; font-family: "Source Code Pro", "JetBrains Mono", "Fira Code", "Consolas", monospace; letter-spacing: 0.3px; }
.article-body code { font-family: "Source Code Pro", "JetBrains Mono", "Fira Code", "Consolas", monospace; }
.article-body p code, .article-body li > code { background: #ccf1f1; color: #2f363c; padding: 2px 5px; border-radius: 10px; font-size: 15px; font-family: "Source Code Pro", "JetBrains Mono", "Fira Code", "Consolas", monospace; }
.article-body table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.article-body th, .article-body td { border: 1px solid #ddd; padding: 10px 12px; text-align: left; font-size: 14px; }
.article-body th { background: #f5f5f5; font-weight: 600; }
.article-body ul { margin: 8px 0; padding-left: 25px; }
.article-body ol { margin: 8px 0; padding-left: 25px; }
.article-body li { margin-bottom: 5px; }
.article-body li > p { margin-bottom: 4px; }
/* 覆盖 LayUI li { list-style: none; }，标记直接设置在 li 上 */
.article-body ul > li { list-style: disc outside !important; }
.article-body ul ul > li { list-style: circle outside !important; }
.article-body ul ul ul > li { list-style: square outside !important; }
.article-body ol > li { list-style: decimal outside !important; }
.article-body ol ol > li { list-style: lower-alpha outside !important; }
.article-body ol ol ol > li { list-style: lower-roman outside !important; }
.article-body ol ul > li { list-style: circle outside !important; }
.article-body ul ol > li { list-style: lower-alpha outside !important; }
.article-body ol ul ul > li { list-style: square outside !important; }
.article-body ul ol ol > li { list-style: lower-roman outside !important; }
/* 代码块在列表中保留间距 */
.article-body li .codehilite,
.article-body li .highlight { margin: 6px 0; }

.article-nav { display: flex; justify-content: space-between; margin-top: 40px; padding-top: 20px;
    border-top: 1px solid #eee; max-width: 860px; }
.article-nav a { color: #16baaa; font-size: 15px; max-width: 45%; text-decoration: none; }
.article-nav a:hover { color: #2ed4c3; text-decoration: underline; }
.article-nav .nav-next { text-align: right; }

.related-articles { margin-top: 40px; border-radius: 8px; max-width: 860px; }
.related-articles h3 { font-size: 18px; margin-bottom: 15px; color: #333; }
.related-articles ul { list-style: none; padding: 0; }
.related-articles li { padding: 8px 0; border-bottom: 1px solid #eee; }
.related-articles li:last-child { border-bottom: none; }
.related-articles li a { color: #444; text-decoration: none; font-size: 15px; }
.related-articles li a:hover { color: #16baaa; }
.related-articles li .date { float: right; color: #999; font-size: 13px; }

/* 右侧作者信息栏 */
.article-author-bar { width: 240px; flex-shrink: 0; position: relative; }

.article-author-bar .author-bar-inner {
    position: fixed; top: 105px; width: 240px; z-index: 100;
    right: calc(max(20px, (100vw - 1400px) / 2 + 20px));
    max-height: calc(100vh - 125px); overflow-y: auto;
    -ms-overflow-style: none; scrollbar-width: none;
}
.article-author-bar .author-bar-inner::-webkit-scrollbar { display: none; }

.article-author-bar .author-card {
    border-radius: 12px; padding: 10px 15px; text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06); border: 1px solid #eee;
    margin-bottom: 12px;
}
.author-card .author-avatar { width: 60px; height: 60px; margin: 0 auto 14px;
    border-radius: 50%; overflow: hidden; border: 3px solid #e8f5f4; }
.author-card .author-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.author-card .author-avatar-placeholder { width: 100%; height: 100%; display: flex;
    align-items: center; justify-content: center; background: #16baaa; color: #fff;
    font-size: 28px; font-weight: 600; }
.author-card .author-name { font-size: 16px; font-weight: 600; color: #333; margin-bottom: 16px; }
.author-card .author-stats { display: flex; justify-content: center; gap: 20px;
    border-top: 1px solid #f0f0f0; padding-top: 14px; }
.author-card .stat-item { display: flex; flex-direction: column; align-items: center; }
.author-card .stat-value { font-size: 14px; font-weight: 700; color: #16baaa; line-height: 1.2; }
.author-card .stat-label { font-size: 12px; color: #999; margin-top: 2px; }
.author-card .author-popular { margin-top: 14px; border-top: 1px solid #f0f0f0; padding-top: 12px; text-align: left; }
.author-card .author-popular-title { font-size: 12px; color: #999; margin-bottom: 8px; font-weight: 500; }
.author-card .author-popular-list { list-style: none; padding: 0; margin: 0; }
.author-card .author-popular-list li { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; }
.author-card .author-popular-list li a { font-size: 12px; color: #555; line-height: 1.4; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.author-card .author-popular-list li a:hover { color: #16baaa; }
.author-card .popular-count { font-size: 11px; color: #bbb; white-space: nowrap; margin-left: 6px; display: inline-flex; align-items: center; gap: 2px; }
.author-card .popular-count .layui-icon { font-size: 11px; color: #f5c518; }

/* 广告区块 */
.ad-list { display: flex; flex-direction: column; gap: 12px; }
.ad-item { border-radius: 12px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.06); border: 1px solid #eee; }
.ad-item a { display: block; text-decoration: none; }
.ad-item .ad-image-wrapper { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; }
.ad-item .ad-image-wrapper img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ad-item .ad-text-only { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 16 / 9; padding: 16px; color: #666; font-size: 14px; text-align: center; }

/* 低高度广告（32:9 = 16:9 高度的一半，适合纯文字） */
.ad-item.ad-short .ad-image-wrapper { aspect-ratio: 32 / 9; }
.ad-item.ad-short .ad-text-only { aspect-ratio: 32 / 9; padding: 6px 12px; font-size: 13px; }

/* 文章目录导航 */
.article-toc {
    display: none; margin-top: 12px; border-radius: 12px; border: 1px solid #eee;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06); overflow: hidden;
}
.article-toc .toc-title {
    padding: 12px 16px 8px; font-size: 13px; font-weight: 600; color: #333;
    border-bottom: 1px solid #f0f0f0;
}
.article-toc .toc-list {
    padding: 6px 0;
}
.article-toc .toc-item {
    display: block; padding: 7px 16px; font-size: 12px; color: #555;
    text-decoration: none; line-height: 1.4; transition: all 0.15s;
    border-left: 2px solid transparent;
}
.article-toc .toc-item:hover { color: #16baaa; border-left-color: #16baaa; background: rgba(22,186,170,0.04); }

@media (max-width: 1200px) {
    .article-author-bar { width: 180px; }
    .article-author-bar .author-bar-inner { width: 180px; }
}
@media (max-width: 992px) {
    /* 右侧栏：原位置隐藏；由 JS 移入正文后以 .mobile-inline 显示（移动端不显示目录导航） */
    .article-author-bar { display: none; }
    .article-author-bar.mobile-inline {
        display: block; width: 100%; position: static; margin-top: 30px;
    }
    .article-author-bar.mobile-inline .author-bar-inner {
        position: static; width: 100%; max-height: none; top: auto; right: auto; overflow: visible;
    }
    #articleToc { display: none !important; }
}

/* 移动端左侧目录收起/展开按钮（仅移动端显示，视窗左侧垂直居中悬浮） */
.mobile-sidebar-toggle { display: none; }
@media (max-width: 992px) {
    .mobile-sidebar-toggle {
        display: flex; align-items: center; justify-content: center;
        position: fixed; left: 12px; top: 50%; transform: translateY(-50%);
        width: 40px; height: 40px; border-radius: 10px;
        background: #16baaa; color: #fff; border: none; cursor: pointer;
        font-size: 20px; opacity: 0.5; z-index: 998;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    }
    .mobile-sidebar-toggle:hover { opacity: 1; }
}

/* ========================================================================
   封面图卡片样式（有封面时：背景图 + 黑色蒙版）
   ======================================================================== */
.article-card.has-cover,
.cat-section .article-card.has-cover {
    background-size: cover;
    background-position: center;
    background-color: #1a1a2e;
    position: relative;
}
.article-card.has-cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.75) 100%);
    z-index: 1;
    pointer-events: none;
}
.article-card.has-cover .card-body {
    position: relative;
    z-index: 2;
}
.article-card.has-cover .card-body h3 {
    color: #fff;
}
a.article-card.has-cover:hover .card-body h3 {
    color: #16baaa;
}
.article-card.has-cover .card-body p {
    color: rgba(255,255,255,0.88);
}
.article-card.has-cover .card-body .meta {
    color: rgba(255,255,255,0.7);
}
.article-card.has-cover .card-body span[style*="color:#16baaa"] {
    color: #ff8800 !important;
}

/* 置顶文章卡片封面 */
.top-article-card.has-cover {
    background-size: cover;
    background-position: center;
    background-color: #1a1a2e;
    position: relative;
}
.top-article-card.has-cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.4) 100%);
    z-index: 1;
    pointer-events: none;
    border-radius: 8px;
}
.top-article-card.has-cover .top-article-body {
    position: relative;
    z-index: 2;
}
.top-article-card.has-cover .top-article-body h3 {
    color: #fff;
}
a.top-article-card.has-cover:hover .top-article-body h3 {
    color: #16baaa;
}
.top-article-card.has-cover .top-article-body p {
    color: rgba(255,255,255,0.88);
}
.top-article-card.has-cover .top-article-body .meta {
    color: rgba(255,255,255,0.7);
}

/* 分类页卡片封面 */
.category-page .article-card.has-cover {
    background-size: cover;
    background-position: center;
    background-color: #1a1a2e;
    position: relative;
}
.category-page .article-card.has-cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.75) 100%);
    z-index: 1;
    pointer-events: none;
    border-radius: 8px;
}
.category-page .article-card.has-cover h3,
.category-page .article-card.has-cover p,
.category-page .article-card.has-cover .meta {
    position: relative;
    z-index: 2;
}
.category-page .article-card.has-cover h3 {
    color: #fff;
}
.category-page a.article-card.has-cover:hover h3 {
    color: #16baaa;
}
.category-page .article-card.has-cover p {
    color: rgba(255,255,255,0.88);
}
.category-page .article-card.has-cover .meta {
    color: rgba(255,255,255,0.7);
}

/* ========================================================================
   响应式适配
   ======================================================================== */

/* 992px 以下 */
@media (max-width: 992px) {
    .main-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: #fff;
        border-bottom: 1px solid #eee; box-shadow: 0 4px 12px rgba(0,0,0,0.08); z-index: 999;
        max-height: calc(100vh - 64px); overflow-y: auto; }
    .main-nav.active { display: block; }
    .main-nav .nav-list { flex-direction: column; padding: 10px 20px; }
    .main-nav .nav-list > li > a { padding: 12px 0; border-bottom: 1px solid #f0f0f0; border-radius: 0; }
    .sub-menu { position: static; display: none; box-shadow: none; border: none;
        padding-left: 15px; background: #fff; border-radius: 0; margin-top: 0; }
    .has-sub.active .sub-menu { display: block; }
    .menu-toggle { display: flex; }
    .header-actions { gap: 5px; }

    .article-grid { grid-template-columns: repeat(2, 1fr); }
    .cat-section .article-list { grid-template-columns: repeat(2, 1fr); }

    .article-sidebar { width: 0; overflow: hidden; border-right: none;
        position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 999;
        background: rgba(0,0,0,0.35); opacity: 0; pointer-events: none; transition: opacity 0.3s; }
    .article-sidebar .sidebar-inner { position: fixed; top: 0; left: -280px; width: 280px;
        height: 100vh; background: #fff; z-index: 1000; padding: 50px 10px 0 10px;
        transition: left 0.3s; max-height: 100vh; box-shadow: 2px 0 12px rgba(0,0,0,0.1); }
    .article-sidebar.mobile-open { width: 100vw; opacity: 1; pointer-events: auto; }
    .article-sidebar.mobile-open .sidebar-inner { left: 0; }
    .article-main { padding: 30px 0px; }
}

/* 768px 以下 */
@media (max-width: 768px) {
    .carousel-slide img { height: 220px; }
    .carousel-overlay h2 { font-size: 18px; }
    .article-grid { grid-template-columns: 1fr; }
    .cat-section .article-list { grid-template-columns: 1fr; }
    .top-article-card { flex-direction: column; }
    .category-page .article-list { grid-template-columns: 1fr; }
    .article-header h1 { font-size: 22px; }
    .article-body { font-size: 15px; }
    .article-nav { flex-direction: column; gap: 10px; }
}

/* 576px 以下 */
@media (max-width: 576px) {
    .container { padding: 0 15px; }
    .header-inner { height: 56px; }
    .logo-text { font-size: 18px; }
    .logo-img { height: 30px; }
    .search-form { flex-direction: column; }
    .search-submit { width: 100%; }
    .footer-inner { flex-direction: column; gap: 20px; }
}

/* ===== 边看边学标签 ===== */
.video-tag {
    display: inline-block;
    padding: 2px 10px;
    background: #FF6899;
    color: #fff !important;
    font-size: 12px;
    border-radius: 4px;
    transition: all 0.25s ease;
    text-decoration: none;
    vertical-align: middle;
    line-height: 1.6;
    margin-top: 4px;
}
.video-tag:hover {
    color: #fff !important;
    box-shadow: 0 3px 10px rgba(255,104,153,0.4);
    transform: translateY(-1px);
}
.article-header .meta .video-tag {
    margin-top: 0;
}

/* ===== 视频催更标签（视频未上线时） ===== */
.urge-tag {
    background: #16baaa;
}
.urge-tag:hover {
    box-shadow: 0 3px 10px rgba(22,186,170,0.4);
}
.urge-tag.urged::before {
    content: "✓ ";
    font-weight: 600;
}
/* 催更标签容器：缩小 margin-right，让"0次"紧挨着标签按钮 */
.article-header .meta .urge-tag-item {
    margin-right: 6px;
}
/* 催更次数：独立 span 渲染，与"x次阅读"同款基线对齐，无背景、无额外定位 */
/* 覆盖 .meta span 的 margin-right，确保数字与"次"之间无间距 */
.urge-count #urgeCount {
    margin-right: 0;
}

