.extra-img{max-width:100%;height:auto;border-radius:14px;margin:12px 0}.detail-img{max-width:100%;height:auto;border-radius:14px;margin:12px 0}.card-img{max-width:100%;height:auto;border-radius:12px;margin:8px 0}.card{display:flex;flex-direction:column}.card-img{order:-1}.navmenu{list-style:none;margin:0;padding:0;display:flex;gap:22px;align-items:center;font-size:17px;font-weight:500}.navmenu li{list-style:none;margin:0;padding:0}.navmenu>li{position:relative;display:inline-block}.navmenu>li>a{display:inline-block;padding:6px 0;text-decoration:none}.navmenu a:hover{color:var(--red)}.submenu{list-style:none;margin:0;padding:0;display:none;position:absolute;top:100%;left:0;margin-top:0;background:#fff;border:1px solid var(--line);border-radius:12px;padding:8px 0;box-shadow:0 12px 40px rgba(0,0,0,.12);min-width:170px;z-index:9999}.submenu li{display:block;margin:0;padding:0}.submenu li a{display:block;padding:10px 22px;font-size:14px;line-height:1.5;color:var(--ink);white-space:nowrap;text-decoration:none}.submenu li a:hover{color:var(--red);background:var(--paper)}.has-sub:hover>.submenu{display:block}.forum-layout{display:flex;gap:28px}.forum-sidebar{width:200px;flex-shrink:0}.forum-sidebar h3{font-size:18px;margin:0 0 12px}.forum-sidebar ul{list-style:none;margin:0;padding:0}.forum-sidebar li{margin:0;padding:0}.forum-sidebar a{display:block;padding:8px 12px;border-radius:8px;text-decoration:none;color:var(--ink)}.forum-sidebar a:hover{background:var(--paper)}.forum-sidebar a.active{background:var(--red);color:#fff}.forum-main{flex:1}.reply-box{display:none}.reply-box.show{display:block}.reply-toggle{font-size:13px;padding:6px 16px}@media(max-width:820px){.navmenu{flex-direction:column;align-items:flex-start;gap:0}.navmenu>li{display:block;width:100%}.navmenu>li>a{padding:8px 0;display:block}.submenu{display:none;position:static;margin-top:0;background:transparent;border:0;box-shadow:none;padding:4px 0 4px 18px;min-width:auto}.submenu li a{padding:6px 0;font-size:14px}.submenu li a:hover{background:transparent}.has-sub.open>.submenu{display:block}.forum-layout{flex-direction:column}.forum-sidebar{width:100%}}

/* ҳڵı */
.prose h1 { font-size: 24px !important; font-weight:500 !important;}
.prose h2 { font-size: 22px !important; font-weight:500 !important;}
.prose h3 { font-size: 20px !important; font-weight:500 !important;}

/* ҳ涥Ĵ */
.pagehead h1 { font-size: 32px !important; }
/* Logo图片样式 */
.logo-img {
    height: 36px;
    width: auto;
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
    border-radius: 4px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}


/* ========================================
   文章内容排版优化 - 标题和段落间距
   ======================================== */
.prose h1 { margin: 1.8em 0 0.8em !important; }
.prose h2 { margin: 1.8em 0 0.8em !important; }
.prose h3 { margin: 1.5em 0 0.6em !important; }
.prose h4 { margin: 1.2em 0 0.5em !important; font-size: 18px !important; font-weight: 600 !important; }
.prose p { margin: 0 0 1.2em !important; }
.prose ul, .prose ol { margin: 0 0 1.2em !important; padding-left: 1.8em !important; }
.prose li { margin: 0.3em 0 !important; }
.prose blockquote { margin: 1.2em 0 !important; padding: 1em 1.5em !important; background: var(--paper) !important; border-left: 4px solid var(--red) !important; border-radius: 0 12px 12px 0 !important; }

/* 文章正文图片限制 */
.prose img,
.content-main img,
.detail img,
.detail-img {
    max-width: 800px !important;
    max-height: 600px !important;
    width: auto !important;
    height: auto !important;
    border-radius: 12px !important;
    margin: 16px 0 !important;
    object-fit: contain !important;
    display: block !important;
    float: none !important;
}

/* 案例列表卡片图片大小限制 */
.case-list .case-img,
.case-list img {
    width: 500px !important;
    max-width: 100% !important;
    height: 200px !important;
    max-height: 200px !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 12px !important;
}


/* ========================================
   侧边栏布局样式
   ======================================== */
.content-sidebar-layout {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

.content-main {
    flex: 1;
    min-width: 0;
}

.content-sidebar {
    width: 25%;
    flex-shrink: 0;
    position: sticky;
    top: 92px;
}

/* 论坛侧边栏也统一调整为1/4 */
.forum-layout {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

.forum-sidebar {
    width: 25% !important;
    flex-shrink: 0;
    position: sticky;
    top: 92px;
}

.forum-main {
    flex: 1;
    min-width: 0;
}

/* 侧边栏通用样式 */
.content-sidebar ul,
.forum-sidebar ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.content-sidebar li,
.forum-sidebar li {
    margin: 0;
    padding: 0;
}

.content-sidebar a,
.forum-sidebar a {
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--ink);
    font-size: 16px;
    line-height: 1.5;
}

.content-sidebar a:hover,
.forum-sidebar a:hover {
    background: var(--paper);
}

.content-sidebar a.active,
.forum-sidebar a.active {
    background: var(--red);
    color: #fff;
}

/* 最新文章/话题样式 */
.latest-article {
    margin-bottom: 12px;
}

.latest-article:last-child {
    margin-bottom: 0;
}

.latest-article a {
    display: block;
    padding: 0 !important;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 6px;
}

.latest-article a:hover {
    background: none !important;
    color: var(--red);
}

.latest-article .date {
    display: block;
    font-size: 14px;
    color: var(--muted);
}

/* ========================================
   响应式：移动端隐藏侧边栏
   ======================================== */
@media (max-width: 768px) {
    .content-sidebar,
    .forum-sidebar {
        display: none !important;
    }
    
    .content-sidebar-layout,
    .forum-layout {
        flex-direction: column;
    }
    
    /* 移动端图片自适应 */
    .prose img,
    .content-main img,
    .detail img,
    .detail-img {
        max-width: 100% !important;
        max-height: 400px !important;
    }
    
    /* 移动端表格滚动 */
    .prose table,
    .content-main table,
    .detail table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    /* 移动端文字换行防止溢出 */
    .prose,
    .content-main,
    .detail article {
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-all;
    }
}

/* sidebar widget no border */
.sidebar-widget {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin-bottom: 24px !important;
}

.sidebar-widget:last-child {
    margin-bottom: 0 !important;
}

.sidebar-widget h3 {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 14px !important;
    font-size: 18px !important;
    font-weight: 600 !important;
}

/* pagination styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    flex-wrap: wrap;
    grid-column: 1 / -1;
    width: 100%;
}

.pagination .page-prev,
.pagination .page-next,
.pagination .page-num {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    text-decoration: none;
    color: var(--ink);
    font-size: 14px;
    transition: all 0.2s;
    background: #fff;
}

.pagination .page-prev:hover,
.pagination .page-next:hover,
.pagination .page-num:hover {
    border-color: var(--red);
    color: var(--red);
    background: #fff5f5;
}

.pagination .page-current {
    display: inline-block;
    padding: 8px 16px;
    background: var(--red);
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}

.pagination .page-prev {
    margin-right: 8px;
}

.pagination .page-next {
    margin-left: 8px;
}

/* 文章列表 - 左图右文布局 */
.article-list-item {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
    align-items: flex-start;
}

.article-list-item:hover {
    background: #faf8f6;
}

.article-list-item:last-child {
    border-bottom: none;
}

.article-thumb {
    flex: 0 0 200px !important;
    width: 200px !important;
    max-width: 200px !important;
    min-width: 200px !important;
    height: 150px !important;
    max-height: 150px !important;
    min-height: 150px !important;
    border-radius: 8px;
    overflow: hidden !important;
    background: #f0f0f0;
}

.article-thumb img,
.article-thumb-img {
    width: 200px !important;
    height: 150px !important;
    max-width: 200px !important;
    max-height: 150px !important;
    object-fit: cover !important;
    display: block !important;
}

.article-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.article-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--ink);
}

.article-list-item:hover .article-title {
    color: var(--red);
}

.article-meta {
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--muted);
}

.article-meta span {
    margin-right: 15px;
}

.article-category {
    color: var(--red);
    font-weight: 500;
}

.article-summary {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .article-list-item {
        flex-direction: column;
        gap: 12px;
    }
    
    .article-thumb {
        width: 100%;
        height: 180px;
    }
}

/* 分类按钮选中状态 */
.pill.active {
    background-color: var(--red, #b00020) !important;
    color: #fff !important;
    border-color: var(--red, #b00020) !important;
}

/* ========================================
   首页数据展示区
   ======================================== */
.stats-section {
    padding: 48px 0;
    background: var(--paper, #faf8f6);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    color: var(--red, #b00020);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 100%;
    height: 100%;
    stroke-width: 1.5;
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--red, #b00020);
    line-height: 1.2;
}

.stat-number span {
    font-size: 20px;
    font-weight: 600;
    margin-left: 2px;
    color: var(--red, #b00020);
}

.stat-label {
    font-size: 16px;
    color: var(--muted, #666);
    font-weight: 600;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .stats-section {
        padding: 32px 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    
    .stat-number {
        font-size: 32px;
    }
    
    .stat-number span {
        font-size: 18px;
    }
}

/* 返回顶部按钮 */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 60px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 9999;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#back-to-top:hover {
    background-color: var(--red, #b00020);
    border-color: var(--red, #b00020);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(176,0,32,0.3);
}

#back-to-top .arrow {
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
    color: var(--red, #b00020);
    transition: color 0.3s ease;
}

#back-to-top:hover .arrow {
    color: #fff;
}

#back-to-top .text {
    font-size: 12px;
    line-height: 1;
    color: #666;
    transition: color 0.3s ease;
}

#back-to-top:hover .text {
    color: #fff;
}

/* 移动端适配 */
@media (max-width: 768px) {
    #back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 52px;
    }
    
    #back-to-top .arrow {
        font-size: 18px;
    }
    
    #back-to-top .text {
        font-size: 11px;
    }
}

/* ========================================
   表格样式
   ======================================== */
.prose table,
.content-main table,
.detail table,
.topic-body table,
.reply-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
    line-height: 1.6;
}

.prose table th,
.content-main table th,
.detail table th,
.topic-body table th,
.reply-body table th {
    background-color: var(--paper, #faf8f6);
    font-weight: 600;
    text-align: left;
    padding: 10px 14px;
    border: 1px solid var(--line, #e5e5e5);
    color: var(--ink, #1a1a1a);
}

.prose table td,
.content-main table td,
.detail table td,
.topic-body table td,
.reply-body table td {
    padding: 10px 14px;
    border: 1px solid var(--line, #e5e5e5);
    color: var(--ink, #1a1a1a);
}

.prose table tr:nth-child(even) td,
.content-main table tr:nth-child(even) td,
.detail table tr:nth-child(even) td,
.topic-body table tr:nth-child(even) td,
.reply-body table tr:nth-child(even) td {
    background-color: #fafafa;
}

.prose table tr:hover td,
.content-main table tr:hover td,
.detail table tr:hover td,
.topic-body table tr:hover td,
.reply-body table tr:hover td {
    background-color: #fff5f5;
}

/* 分页省略号样式 */
.pagination .page-ellipsis {
    display: inline-block;
    padding: 8px 8px;
    color: #999;
    font-size: 14px;
    letter-spacing: 2px;
}
