/**
 * 轻灵CMS - 前台样式
 * qlcms.cn
 */

/* 基础样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans SC', sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: #374151;
    background: #f3f4f6 url(/bj.png);
}

.container { max-width: 1400px; margin: 0 auto; padding: 0 20px; }

a { color: #4f46e5; text-decoration: none; transition: color .2s; }
a:hover { color: #4338ca; }

/* 头部导航 */
.header {
    background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
    box-shadow: 0 2px 12px rgba(99,102,241,0.25);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header .container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 30px;
    height: 64px;
}
.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo-text {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.5px;
}
.nav { display: flex; gap: 6px; }
.nav-item {
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 15px;
    color: #fff;
    transition: all .2s;
}
.nav-item:hover, .nav-item.active {
    background: rgba(255,255,255,0.18);
    color: #fff;
}
.nav-item > a,
.nav-dropdown > a {
    color: #fff;
}
.nav-item > a:hover,
.nav-dropdown > a:hover {
    color: #fff;
}
.nav-toggle {
    display: none;
    background: rgba(255,255,255,0.15);
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    font-size: 22px;
    cursor: pointer;
    color: #fff;
    margin-left: auto;
}

/* 英雄区 */
.hero {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #fff;
    padding: 30px 20px;
    text-align: center;
    margin-bottom: 20px;
}
.hero h1 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 6px;
}
.hero-desc {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    max-width: 720px;
    margin: 0 auto;
}

/* 首页幻灯片 */
.slideshow {
    position: relative;
    width: 1020px;
    height: 400px;
    margin: 20px auto 0;
    border-radius: 10px;
    overflow: hidden;
    background: #e5e7eb;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.slideshow-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform .5s ease-in-out;
}
.slideshow-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
}
.slideshow-slide a {
    display: block;
    width: 100%;
    height: 100%;
}
.slideshow-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.slideshow-prev,
.slideshow-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(0,0,0,0.35);
    color: #fff;
    font-size: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    z-index: 10;
    line-height: 1;
}
.slideshow-prev:hover,
.slideshow-next:hover { background: rgba(0,0,0,0.55); }
.slideshow-prev { left: 12px; }
.slideshow-next { right: 12px; }

.slideshow-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}
.slideshow-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.7);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background .2s, border-color .2s;
}
.slideshow-dot.active,
.slideshow-dot:hover {
    background: #fff;
    border-color: #fff;
}

/* 内容布局 */
.content-wrapper {
    display: flex;
    gap: 40px;
    padding: 15px 0 50px;
}
.content-main { flex: 0 0 1020px; width: 1020px; min-width: 0; }
.sidebar { flex: 0 0 300px; width: 300px; }

/* 文章卡片 - 左侧缩略图模式 */
.article-list { display: flex; flex-direction: column; gap: 16px; }
.article-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: box-shadow .3s, transform .2s;
    position: relative;
    display: flex;
    overflow: hidden;
}
.article-card:hover {
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* CSS伪缩略图 */
.article-thumb {
    width: 180px;
    min-height: 130px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    line-height: 1.5;
    position: relative;
    overflow: hidden;
}
.article-thumb::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
}
.article-thumb span {
    position: relative;
    z-index: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-all;
}
/* 多种配色循环 */
.article-card:nth-child(5n+1) .article-thumb { background: linear-gradient(135deg, #10b981, #059669); }
.article-card:nth-child(5n+2) .article-thumb { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.article-card:nth-child(5n+3) .article-thumb { background: linear-gradient(135deg, #f59e0b, #d97706); }
.article-card:nth-child(5n+4) .article-thumb { background: linear-gradient(135deg, #ec4899, #db2777); }
.article-card:nth-child(5n+5) .article-thumb { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

.article-body {
    flex: 1;
    padding: 18px 20px;
    min-width: 0;
}
.article-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.45;
}
.article-title a { color: #1f2937; }
.article-title a:hover { color: #4f46e5; }
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: #9ca3af;
    margin-bottom: 10px;
}
.meta-category a {
    color: #4f46e5;
    background: #eef2ff;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
}
.article-excerpt {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.read-more {
    display: inline-block;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #4f46e5;
}

/* 徽章 */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}
.badge-top {
    background: #fef3c7;
    color: #d97706;
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
}

/* 文章详情 */
.article-detail {
    background: #fff;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.breadcrumb {
    font-size: 14px;
    color: #9ca3af;
    margin-bottom: 18px;
}
.breadcrumb a { color: #6b7280; }
.breadcrumb .separator { margin: 0 8px; }
.breadcrumb .current { color: #4b5563; }
.article-header { margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid #f3f4f6; }
.article-header .article-title { font-size: 26px; margin-bottom: 10px; }
.article-content { font-size: 16px; line-height: 1.9; color: #374151; }
.article-content h2 { font-size: 22px; margin: 24px 0 12px; color: #1f2937; }
.article-content h3 { font-size: 18px; margin: 20px 0 10px; }
.article-content p { margin-bottom: 16px; }
.article-content img { max-width: 100%; border-radius: 8px; margin: 12px 0; }
.article-content pre {
    background: #1f2937;
    color: #e5e7eb;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 16px 0;
}
.article-content code { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; font-size: 14px; }
.article-content pre code { background: none; padding: 0; }
.article-content blockquote { border-left: 4px solid #4f46e5; padding: 8px 16px; margin: 16px 0; background: #f9fafb; color: #6b7280; }

/* 文章标签 */
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; padding-top: 20px; border-top: 1px solid #f3f4f6; }
.tag { display: inline-block; padding: 4px 12px; background: #f3f4f6; border-radius: 20px; font-size: 13px; color: #6b7280; transition: all .2s; }
.tag:hover { background: #4f46e5; color: #fff; }

/* 上一篇/下一篇 */
.article-nav {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}
.nav-box {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-rows: 1.6em 1.6em 1.6em 1.6em;
    gap: 0;
    align-items: start;
    padding: 16px 20px;
    border-radius: 8px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s;
}
.nav-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
}
.nav-box.nav-empty {
    background: #94a3b8;
    cursor: default;
}
.nav-title {
    grid-row: 1 / 3;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.6;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.nav-meta {
    grid-row: 4;
    align-self: end;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.92;
}


/* 相关文章 */
.related-card {
    background: #fff;
    border-radius: 12px;
    padding: 22px 24px;
    margin-top: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.related-articles { margin-top: 0; }
.related-list { list-style: none; padding: 0; margin: 0; }
.related-item { border-bottom: 1px solid #f0f0f0; }
.related-item:last-child { border-bottom: none; }
.related-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 0;
    text-decoration: none;
    color: #374151;
    font-size: 15px;
    transition: color .2s;
}
.related-link:hover { color: #4f46e5; }
.related-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.related-date { flex-shrink: 0; margin-left: 20px; color: #9ca3af; font-size: 13px; }

/* 分类/搜索头部 */
.category-header, .search-header {
    background: #fff;
    border-radius: 12px;
    padding: 22px 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.category-header h1, .search-header h1 { font-size: 22px; color: #1f2937; }
.category-desc { color: #6b7280; margin-top: 6px; font-size: 14px; }
.category-count, .search-count { font-size: 13px; color: #9ca3af; margin-top: 4px; }
.search-inline { margin-bottom: 20px; }

/* 侧边栏 */
.widget {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.widget-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 14px;
    color: #1f2937;
    padding-bottom: 10px;
    border-bottom: 2px solid #eef2ff;
    position: relative;
}
.widget-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 40px;
    height: 2px;
    background: #4f46e5;
}

/* 搜索框 - 简洁 pill 式 */
.search-form {
    display: flex;
    width: 100%;
    height: 40px;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}
.search-form:focus-within {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}
.search-input {
    flex: 1;
    height: 100%;
    padding: 0 14px;
    border: none;
    border-radius: 20px 0 0 20px;
    background: transparent;
    font-size: 14px;
    outline: none;
    color: #374151;
}
.search-input::placeholder { color: #9ca3af; }
.search-btn {
    height: 100%;
    padding: 0 18px;
    border: none;
    border-radius: 0 20px 20px 0;
    background: #4f46e5;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
.search-btn:hover { background: #4338ca; }

/* 搜索页内联搜索框保持较大宽度 */
.search-inline .search-form {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.search-inline .search-input { border-radius: 20px 0 0 20px; }

/* 栏目导航 - 大气下拉 */
.category-select-wrapper { position: relative; }
.category-select {
    width: 100%;
    padding: 13px 42px 13px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    color: #374151;
    background: #f9fafb;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    outline: none;
    transition: all .2s;
    line-height: 1.5;
}
.category-select:hover { border-color: #a5b4fc; background: #fff; }
.category-select:focus { border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }
.category-select-wrapper::after {
    content: '';
    position: absolute;
    right: 18px;
    top: 50%;
    margin-top: -5px;
    width: 10px;
    height: 10px;
    border-right: 2px solid #9ca3af;
    border-bottom: 2px solid #9ca3af;
    transform: rotate(45deg);
    pointer-events: none;
}

.category-list { list-style: none; }
.category-list li { border-bottom: 1px solid #f9fafb; }
.category-list li:last-child { border-bottom: none; }
.category-list a { display: block; padding: 10px 0; font-size: 14px; color: #4b5563; transition: color .2s; }
.category-list a:hover, .category-list a.active { color: #4f46e5; }

.hot-list { list-style: none; }
.hot-list li { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #f9fafb; font-size: 14px; }
.hot-list li:last-child { border-bottom: none; }
.hot-list a { flex: 1; color: #4b5563; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 8px; }
.hot-list a:hover { color: #4f46e5; }
.hot-views { font-size: 12px; color: #9ca3af; flex-shrink: 0; }

/* 二维码 */
.qr-code { text-align: center; }
.qr-code img { max-width: 100%; height: auto; border-radius: 8px; }
.qr-code p { font-size: 13px; color: #9ca3af; margin-top: 8px; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 32px; }
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #4b5563;
    background: #fff;
    transition: all .2s;
}
.page-btn:hover { background: #f3f4f6; color: #4f46e5; }
.page-btn.active { background: #4f46e5; color: #fff; border-color: #4f46e5; }

/* 空状态 */
.empty-state {
    background: #fff;
    border-radius: 12px;
    text-align: center;
    padding: 70px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.empty-icon { font-size: 64px; margin-bottom: 16px; }
.empty-state h3 { font-size: 20px; color: #374151; margin-bottom: 8px; }
.empty-state p { color: #9ca3af; }

/* 错误页 */
.error-page { text-align: center; padding: 80px 20px; }
.error-code { font-size: 120px; font-weight: 800; color: #e5e7eb; line-height: 1; }
.error-page h2 { font-size: 24px; color: #374151; margin: 16px 0; }
.error-page p { color: #9ca3af; margin-bottom: 24px; }
.btn-home { display: inline-block; padding: 10px 24px; background: #4f46e5; color: #fff; border-radius: 8px; font-size: 15px; font-weight: 600; transition: all .3s; }
.btn-home:hover { background: #4338ca; color: #fff; transform: translateY(-1px); }

/* 底部 */
.footer {
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 35px 0;
    text-align: center;
}
.footer-info { font-size: 14px; color: #6b7280; line-height: 2; }
.footer-info p { margin-bottom: 2px; }
.footer-info a { color: #4f46e5; }
.footer-info a:hover { color: #4338ca; }
.footer-contact { color: #374151; }
.footer-slogan { color: #4b5563; }
.footer-beian { font-size: 13px; color: #9ca3af; }
.footer-beian a { color: #9ca3af; }
.footer-beian a:hover { color: #4f46e5; }
.footer-copyright-line { font-size: 13px; color: #9ca3af; }
.footer-sep { margin: 0 8px; color: #d1d5db; }
.footer-powered { font-size: 13px; }
.footer-powered a { color: #9ca3af; }
.footer-powered a:hover { color: #4f46e5; }
.footer-stats { margin-top: 6px; }

/* 友情链接 */
.friend-links {
    text-align: center;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px dashed #e5e7eb;
    font-size: 14px;
    line-height: 2.2;
}
.friend-links-label {
    color: #6b7280;
    font-weight: 600;
}
.friend-links a {
    display: inline-block;
    color: #4f46e5;
    margin: 0 8px;
    transition: color .2s;
}
.friend-links a:hover {
    color: #4338ca;
    text-decoration: underline;
}

/* 导航下拉菜单（级联多列，支持无限层级） */
.nav-dropdown { position: relative; }
.nav-dropdown > a {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #fff;
}

/* 级联菜单容器 */
.nav-menu-cascade {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 160px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    padding: 8px 0;
    margin-top: 6px;
    z-index: 200;
}

/* 顶级下拉箭头 */
.nav-dropdown > .nav-menu-cascade::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 24px;
    border-width: 0 6px 6px;
    border-style: solid;
    border-color: transparent transparent #fff;
}

/* 单列 */
.nav-col {
    min-width: 160px;
    max-width: 220px;
    padding: 4px 0;
}
.nav-col + .nav-col {
    border-left: 1px solid #e5e7eb;
}

/* 列头：显示当前父级名称 */
.nav-col-header {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 4px;
    white-space: nowrap;
}

/* 列项 */
.nav-col-item {
    position: relative;
    padding: 0;
    font-size: 14px;
}
.nav-col-item > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 16px;
    color: #4b5563;
    white-space: nowrap;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.nav-col-item:hover > a {
    background: #f3f4f6;
    color: #4f46e5;
}

/* 有下级菜单的项：蓝色三角箭头 */
.nav-col-item.has-children > a::after {
    content: '';
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 5px solid #3b82f6;
    flex-shrink: 0;
}

/* 下级菜单在右侧展开 */
.nav-col-item > .nav-menu-cascade {
    top: -8px;
    left: 100%;
    margin-top: 0;
    margin-left: 0;
}
.nav-col-item > .nav-menu-cascade::before {
    display: none;
}

/* 鼠标悬停显示下级菜单 */
.nav-dropdown:hover > .nav-menu-cascade,
.nav-col-item:hover > .nav-menu-cascade {
    display: flex;
}

/* 侧边栏分类树 */
.category-tree li { padding-left: 0; }
.category-tree li.cat-level-1 { padding-left: 14px; }
.category-tree li.cat-level-2 { padding-left: 28px; }
.category-tree li.cat-level-3 { padding-left: 42px; }

/* 响应式 */
@media (max-width: 1024px) {
    .slideshow { width: 100%; height: auto; aspect-ratio: 1020/400; }
    .content-wrapper { flex-direction: column; }
    .content-main { flex: 1; width: 100%; }
    .sidebar { flex: 0 0 auto; width: 100%; }
    .article-thumb { width: 150px; }
    .search-inline .search-form { max-width: 100%; }
}
@media (max-width: 768px) {
    .header .container { height: 56px; }
    .nav {
        display: none;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        background: #7c3aed;
        flex-direction: column;
        padding: 12px;
    }
    .nav.open { display: flex; }
    .nav-item { border-radius: 8px; }
    .nav-toggle { display: block; }
    .hero { padding: 20px 16px; }
    .hero h1 { font-size: 22px; }
    .content-wrapper { padding: 20px 0 30px; }
    .article-card { flex-direction: column; }
    .article-thumb { width: 100%; min-height: 90px; }
    .article-detail { padding: 20px; }
    .article-header .article-title { font-size: 20px; }
    .article-nav { flex-direction: column; gap: 12px; }
    .nav-box { width: 100%; }
}

/* 加密内容块 */
.encrypted-block {
    margin: 20px 0;
    border: 2px dashed #f59e0b;
    border-radius: 10px;
    overflow: hidden;
}
.encrypted-lock {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
}
.encrypted-icon { font-size: 40px; margin-bottom: 10px; }
.encrypted-title {
    font-size: 18px;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 6px;
}
.encrypted-desc {
    font-size: 14px;
    color: #a16207;
    margin-bottom: 16px;
}
.encrypted-input-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    max-width: 320px;
    margin: 0 auto;
}
.encrypted-input {
    flex: 1;
    padding: 8px 14px;
    border: 1px solid #fcd34d;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color .2s;
    background: #fff;
}
.encrypted-input:focus { border-color: #f59e0b; }
.encrypted-btn {
    padding: 8px 20px;
    background: #f59e0b;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background .2s;
    white-space: nowrap;
}
.encrypted-btn:hover { background: #d97706; }
.encrypted-error {
    color: #ef4444;
    font-size: 13px;
    margin-top: 10px;
}
.encrypted-content {
    padding: 20px;
    background: #fffbeb;
    border-top: 1px dashed #fcd34d;
}

/* 侧边栏标签云 */
.tag-cloud-sidebar{display:flex;flex-wrap:wrap;gap:8px}
.tag-sidebar-item{display:inline-block;padding:5px 12px;background:#f3f4f6;border-radius:20px;font-size:13px;color:#4b5563;text-decoration:none;transition:all .2s}
.tag-sidebar-item:hover{background:#4f46e5;color:#fff}
@media(max-width:991px){.qr-desktop{display:none}}

/* 评论区 */
.comment-section {
    margin: 40px 0 0;
    width: 100%;
}

.comment-section .section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1f2937;
}
.comment-list {
    margin-bottom: 30px;
}
.comment-item {
    display: flex;
    gap: 14px;
    padding: 18px 0;
    border-bottom: 1px solid #f3f4f6;
}
.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
}
.comment-body { flex: 1; min-width: 0; }
.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.comment-nickname {
    font-weight: 600;
    font-size: 14px;
    color: #374151;
}
.comment-time {
    font-size: 12px;
    color: #9ca3af;
}
.comment-content {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.7;
}
.comment-empty {
    color: #9ca3af;
    text-align: center;
    padding: 30px;
    font-size: 14px;
}
.comment-msg {
    padding: 10px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}
.comment-msg-success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.comment-msg-error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.comment-form-wrapper {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.comment-form-wrapper h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 18px;
    color: #1f2937;
}
.comment-form .form-group { margin-bottom: 14px; }
.comment-form .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="number"],
.comment-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #374151;
    font-family: inherit;
    outline: none;
    transition: border-color .2s;
}
.comment-form input:focus,
.comment-form textarea:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}
.comment-form textarea { resize: vertical; min-height: 100px; }
.comment-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.comment-submit-btn {
    display: inline-block;
    padding: 10px 28px;
    background: #4f46e5;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
.comment-submit-btn:hover { background: #4338ca; }
@media (max-width: 768px) {
    .comment-section {
        padding: 0 16px;
        max-width: 100%;
    }
    .comment-form-grid {
        grid-template-columns: 1fr;
    }
}

/* 广告位容器 */
.ad-slot {
    text-align: center;
    margin: 16px 0;
    overflow: hidden;
}
.ad-slot > * { max-width: 100%; }
