/* ========================================
   博客模板样式 - CATBEI风格
   主色调: #2997f7
   ======================================== */

/* ---------- 全局重置 ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial,
        sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f6f7;
    -webkit-font-smoothing: antialiased;
}

a {
    color: #2997f7;
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: #1a7dd8;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    border: 0;
    display: block;
}

ul,
ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: #222;
    line-height: 1.4;
}

h1 { font-size: 24px; }
h2 { font-size: 20px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }
h5 { font-size: 14px; }
h6 { font-size: 12px; }

p {
    margin-bottom: 15px;
}

/* ---------- 通用工具类 ---------- */
.clearfix::after {
    content: "";
    display: block;
    clear: both;
}

.container {
    width: 1200px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}

.fl { float: left; }
.fr { float: right; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.text-ellipsis-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.text-ellipsis-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- 卡片基础样式 ---------- */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* ---------- 顶部导航 ---------- */
.header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 60px;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo a {
    font-size: 22px;
    font-weight: 700;
    color: #2997f7;
    display: flex;
    align-items: center;
}

.logo a:hover {
    color: #1a7dd8;
}

.logo img {
    height: 36px;
    margin-right: 10px;
    border-radius: 6px;
}

.nav-menu {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.nav-menu li {
    position: relative;
}

.nav-menu li a {
    display: block;
    padding: 0 20px;
    line-height: 60px;
    color: #333;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-menu li a:hover,
.nav-menu li.active a {
    color: #2997f7;
}

.nav-menu li.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: #2997f7;
    border-radius: 2px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.search-box {
    position: relative;
}

.search-box input {
    width: 200px;
    height: 36px;
    padding: 0 40px 0 15px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    font-size: 13px;
    background: #f5f6f7;
    transition: all 0.2s ease;
    outline: none;
}

.search-box input:focus {
    border-color: #2997f7;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(41, 151, 247, 0.1);
}

.search-box button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #999;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-box button:hover {
    color: #2997f7;
}

.btn-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 18px;
    background: #2997f7;
    color: #fff;
    border-radius: 18px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-login:hover {
    background: #1a7dd8;
    color: #fff;
    box-shadow: 0 4px 12px rgba(41, 151, 247, 0.3);
}

.mobile-menu-btn {
    display: none;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 20px;
    color: #333;
}

/* ---------- 主内容区域布局 ---------- */
.main-wrapper {
    padding: 20px 0;
}

.main-content {
    display: flex;
    gap: 20px;
}

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

.content-right {
    width: 320px;
    flex-shrink: 0;
}

/* ---------- 轮播图Banner ---------- */
.banner {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.banner-slider {
    position: relative;
    height: 360px;
    overflow: hidden;
}

.banner-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.banner-item.active {
    opacity: 1;
}

.banner-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-item .banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 30px 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    color: #fff;
}

.banner-item .banner-category {
    display: inline-block;
    padding: 4px 12px;
    background: #2997f7;
    color: #fff;
    font-size: 12px;
    border-radius: 4px;
    margin-bottom: 12px;
}

.banner-item .banner-title {
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.banner-item .banner-title a {
    color: #fff;
}

.banner-item .banner-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
}

.banner-dots {
    position: absolute;
    bottom: 20px;
    right: 30px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.banner-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
}

.banner-dots span.active {
    background: #fff;
    width: 24px;
    border-radius: 5px;
}

.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
}

.banner:hover .banner-arrow {
    opacity: 1;
}

.banner-arrow:hover {
    background: rgba(0, 0, 0, 0.5);
}

.banner-arrow.prev { left: 20px; }
.banner-arrow.next { right: 20px; }

/* ---------- 推荐/置顶文章区 ---------- */
.featured-section {
    margin-bottom: 20px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.section-title h2 {
    font-size: 18px;
    font-weight: 600;
    color: #222;
    position: relative;
    padding-left: 12px;
}

.section-title h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 18px;
    background: #2997f7;
    border-radius: 2px;
}

.section-title .more {
    font-size: 13px;
    color: #999;
}

.section-title .more:hover {
    color: #2997f7;
}

/* 置顶文章大图 */
.sticky-article {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.sticky-article:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.sticky-article .sticky-thumb {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.sticky-article .sticky-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.sticky-article:hover .sticky-thumb img {
    transform: scale(1.05);
}

.sticky-article .sticky-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 4px 12px;
    background: #ff6b6b;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
}

.sticky-article .sticky-body {
    padding: 20px;
}

.sticky-article .sticky-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.sticky-article .sticky-title a {
    color: #222;
}

.sticky-article .sticky-title a:hover {
    color: #2997f7;
}

.sticky-article .sticky-desc {
    color: #666;
    font-size: 14px;
    margin-bottom: 12px;
    line-height: 1.7;
}

.sticky-article .sticky-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 12px;
    color: #999;
}

.sticky-article .sticky-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ---------- 文章卡片列表 ---------- */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.article-card {
    display: flex;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.article-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.article-card .article-thumb {
    width: 240px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.article-card .article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-thumb img {
    transform: scale(1.08);
}

.article-card .article-thumb .category-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 10px;
    background: rgba(41, 151, 247, 0.9);
    color: #fff;
    font-size: 11px;
    border-radius: 3px;
}

.article-card .article-body {
    flex: 1;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.article-card .article-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 10px;
}

.article-card .article-title a {
    color: #222;
}

.article-card .article-title a:hover {
    color: #2997f7;
}

.article-card .article-excerpt {
    color: #666;
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 12px;
}

.article-card .article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 12px;
    color: #999;
}

.article-card .article-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.article-card .article-meta .meta-category a {
    color: #2997f7;
}

.article-card .article-meta .meta-category a:hover {
    color: #1a7dd8;
}

/* 上图下文卡片样式 */
.article-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.article-grid .article-card {
    flex-direction: column;
    min-width: 0;
}

.article-grid .article-thumb {
    width: 100%;
    height: 180px;
}

.article-grid .article-body {
    padding: 15px;
}

.article-grid .article-title {
    font-size: 15px;
}

/* ---------- 侧边栏模块 ---------- */
.sidebar-widget {
    background: #fff;
    border-radius: 8px;
    margin-bottom: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.widget-title {
    padding: 15px 18px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 15px;
    font-weight: 600;
    color: #222;
    position: relative;
}

.widget-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    background: #2997f7;
    border-radius: 0 2px 2px 0;
}

.widget-body {
    padding: 15px 18px;
}

/* 热门文章 */
.hot-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

.hot-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.hot-list li:first-child {
    padding-top: 0;
}

.hot-list .hot-rank {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    background: #e5e7eb;
    color: #999;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    margin-top: 2px;
}

.hot-list li:nth-child(1) .hot-rank { background: #ff4d4f; color: #fff; }
.hot-list li:nth-child(2) .hot-rank { background: #ff7a45; color: #fff; }
.hot-list li:nth-child(3) .hot-rank { background: #ffa940; color: #fff; }

.hot-list .hot-info {
    flex: 1;
    min-width: 0;
}

.hot-list .hot-title {
    font-size: 13px;
    color: #333;
    line-height: 1.5;
    margin-bottom: 4px;
}

.hot-list .hot-title a {
    color: #333;
}

.hot-list .hot-title a:hover {
    color: #2997f7;
}

.hot-list .hot-views {
    font-size: 11px;
    color: #bbb;
}

/* 随机文章 */
.random-list li {
    padding: 8px 0;
    border-bottom: 1px dashed #f0f0f0;
    font-size: 13px;
}

.random-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.random-list li:first-child {
    padding-top: 0;
}

.random-list li a {
    color: #555;
    display: flex;
    align-items: center;
    gap: 6px;
}

.random-list li a::before {
    content: "";
    width: 4px;
    height: 4px;
    background: #2997f7;
    border-radius: 50%;
    flex-shrink: 0;
}

.random-list li a:hover {
    color: #2997f7;
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud a {
    display: inline-block;
    padding: 5px 12px;
    background: #f5f6f7;
    color: #666;
    font-size: 12px;
    border-radius: 14px;
    transition: all 0.2s ease;
}

.tag-cloud a:hover {
    background: #2997f7;
    color: #fff;
    transform: translateY(-1px);
}

/* 分类列表 */
.category-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed #f0f0f0;
    font-size: 13px;
}

.category-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.category-list li:first-child {
    padding-top: 0;
}

.category-list li a {
    color: #555;
    display: flex;
    align-items: center;
    gap: 6px;
}

.category-list li a:hover {
    color: #2997f7;
}

.category-list li .count {
    color: #bbb;
    font-size: 12px;
    background: #f5f6f7;
    padding: 2px 8px;
    border-radius: 10px;
}

/* 友情链接 */
.links-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.links-list a {
    display: inline-block;
    padding: 5px 12px;
    background: #f5f6f7;
    color: #666;
    font-size: 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.links-list a:hover {
    background: #2997f7;
    color: #fff;
}

/* ---------- 面包屑导航 ---------- */
.breadcrumb {
    padding: 15px 0;
    font-size: 13px;
    color: #999;
}

.breadcrumb a {
    color: #666;
}

.breadcrumb a:hover {
    color: #2997f7;
}

.breadcrumb .separator {
    margin: 0 8px;
    color: #ccc;
}

.breadcrumb .current {
    color: #333;
}

/* ---------- 页面标题区 ---------- */
.page-header {
    background: #fff;
    border-radius: 8px;
    padding: 25px 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.page-header h1 {
    font-size: 22px;
    margin-bottom: 8px;
}

.page-header .page-desc {
    color: #888;
    font-size: 13px;
}

/* ---------- 详情页样式 ---------- */
.article-detail {
    background: #fff;
    border-radius: 8px;
    padding: 30px 35px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
}

.article-detail .article-header {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.article-detail .article-header h1 {
    font-size: 26px;
    line-height: 1.4;
    margin-bottom: 15px;
    color: #222;
}

.article-detail .article-header .article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 13px;
    color: #999;
}

.article-detail .article-header .article-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-detail .article-header .article-meta a {
    color: #2997f7;
}

.article-detail .article-header .article-meta a:hover {
    color: #1a7dd8;
}

/* 文章正文 */
.article-content {
    font-size: 15px;
    line-height: 1.8;
    color: #333;
    word-wrap: break-word;
}

.article-content p {
    margin-bottom: 18px;
    text-align: justify;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    margin: 25px 0 15px;
    font-weight: 600;
    color: #222;
}

.article-content h1 { font-size: 22px; }
.article-content h2 { font-size: 20px; }
.article-content h3 { font-size: 18px; }
.article-content h4 { font-size: 16px; }

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 15px auto;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.article-content a {
    color: #2997f7;
    text-decoration: none;
    border-bottom: 1px solid rgba(41, 151, 247, 0.2);
}

.article-content a:hover {
    color: #1a7dd8;
    border-bottom-color: #1a7dd8;
}

.article-content blockquote {
    padding: 15px 20px;
    margin: 20px 0;
    background: #f8f9fa;
    border-left: 4px solid #2997f7;
    border-radius: 0 6px 6px 0;
    color: #666;
}

.article-content blockquote p {
    margin-bottom: 0;
}

.article-content ul,
.article-content ol {
    margin-bottom: 18px;
    padding-left: 25px;
}

.article-content ul li,
.article-content ol li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.article-content ul li {
    list-style-type: disc;
}

.article-content ol li {
    list-style-type: decimal;
}

.article-content code {
    padding: 2px 6px;
    background: #f5f6f7;
    color: #e83e8c;
    font-size: 13px;
    font-family: Consolas, Monaco, "Courier New", monospace;
    border-radius: 4px;
}

.article-content pre {
    padding: 18px;
    background: #2d2d2d;
    color: #f8f8f2;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 18px;
    font-size: 13px;
    line-height: 1.6;
}

.article-content pre code {
    padding: 0;
    background: transparent;
    color: inherit;
    font-size: inherit;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 18px;
}

.article-content table th,
.article-content table td {
    padding: 10px 15px;
    border: 1px solid #e5e7eb;
    text-align: left;
}

.article-content table th {
    background: #f8f9fa;
    font-weight: 600;
}

.article-content table tr:nth-child(even) {
    background: #fafbfc;
}

/* 文章标签 */
.article-tags {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.article-tags .tags-label {
    font-size: 13px;
    color: #666;
    margin-right: 10px;
    font-weight: 500;
}

.article-tags a {
    display: inline-block;
    padding: 4px 12px;
    margin-right: 8px;
    margin-bottom: 6px;
    background: #f0f7ff;
    color: #2997f7;
    font-size: 12px;
    border-radius: 14px;
    transition: all 0.2s ease;
}

.article-tags a:hover {
    background: #2997f7;
    color: #fff;
}

/* 版权声明 */
.copyright-notice {
    margin-top: 25px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 13px;
    color: #666;
    line-height: 1.7;
    border-left: 3px solid #2997f7;
}

.copyright-notice p {
    margin-bottom: 5px;
}

.copyright-notice p:last-child {
    margin-bottom: 0;
}

.copyright-notice strong {
    color: #333;
}

/* 上一篇/下一篇 */
.article-navigation {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.article-navigation .nav-item {
    flex: 1;
    background: #fff;
    border-radius: 8px;
    padding: 18px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.article-navigation .nav-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.article-navigation .nav-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 6px;
}

.article-navigation .nav-title {
    font-size: 14px;
    line-height: 1.5;
}

.article-navigation .nav-title a {
    color: #333;
}

.article-navigation .nav-title a:hover {
    color: #2997f7;
}

.article-navigation .nav-next {
    text-align: right;
}

/* 相关推荐 */
.related-posts {
    background: #fff;
    border-radius: 8px;
    padding: 25px 25px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
}

.related-posts h3 {
    font-size: 17px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.related-posts .related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.related-card {
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
    min-width: 0;
}

.related-card:hover {
    transform: translateY(-3px);
}

.related-card .related-thumb {
    width: 100%;
    height: 130px;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 10px;
}

.related-card .related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-card:hover .related-thumb img {
    transform: scale(1.08);
}

.related-card .related-title {
    font-size: 13px;
    line-height: 1.5;
    font-weight: 500;
}

.related-card .related-title a {
    color: #333;
}

.related-card .related-title a:hover {
    color: #2997f7;
}

/* 评论区 */
.comment-section {
    background: #fff;
    border-radius: 8px;
    padding: 25px 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
}

.comment-section h3 {
    font-size: 17px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.comment-form {
    margin-bottom: 25px;
}

.comment-form textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px 15px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    resize: vertical;
    outline: none;
    font-family: inherit;
    transition: all 0.2s ease;
}

.comment-form textarea:focus {
    border-color: #2997f7;
    box-shadow: 0 0 0 3px rgba(41, 151, 247, 0.1);
}

.comment-form .form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.comment-form .btn-submit {
    padding: 8px 25px;
    background: #2997f7;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.comment-form .btn-submit:hover {
    background: #1a7dd8;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f5f5f5;
}

.comment-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.comment-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e5e7eb;
    overflow: hidden;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.comment-author {
    font-size: 13px;
    font-weight: 500;
    color: #333;
}

.comment-time {
    font-size: 12px;
    color: #bbb;
}

.comment-content {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

/* 侧边栏文章目录 */
.toc-list {
    font-size: 13px;
}

.toc-list > li {
    padding: 5px 0;
}

.toc-list li a {
    color: #555;
    display: block;
    padding: 3px 0;
    border-left: 2px solid transparent;
    padding-left: 10px;
    transition: all 0.2s ease;
}

.toc-list li a:hover,
.toc-list li a.active {
    color: #2997f7;
    border-left-color: #2997f7;
    background: #f0f7ff;
}

.toc-list .toc-child {
    padding-left: 15px;
    margin-top: 3px;
}

.toc-list .toc-child li a {
    font-size: 12px;
    color: #888;
}

/* 热评文章 */
.hot-comment-list li {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

.hot-comment-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.hot-comment-list li:first-child {
    padding-top: 0;
}

.hot-comment-list .hc-thumb {
    width: 60px;
    height: 45px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
}

.hot-comment-list .hc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hot-comment-list .hc-info {
    flex: 1;
    min-width: 0;
}

.hot-comment-list .hc-title {
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 4px;
}

.hot-comment-list .hc-title a {
    color: #333;
}

.hot-comment-list .hc-title a:hover {
    color: #2997f7;
}

.hot-comment-list .hc-count {
    font-size: 11px;
    color: #bbb;
}

/* ---------- 分页样式 ---------- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 25px;
    padding-top: 10px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.pagination a {
    color: #666;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.pagination a:hover {
    color: #2997f7;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.pagination .current {
    background: #2997f7;
    color: #fff;
    box-shadow: 0 2px 8px rgba(41, 151, 247, 0.3);
}

.pagination .dots {
    color: #ccc;
    padding: 0 5px;
}

.pagination .prev-page,
.pagination .next-page {
    font-weight: 500;
}

/* ---------- 底部Footer ---------- */
.footer {
    background: #2a2d34;
    color: #999;
    padding: 40px 0 20px;
    margin-top: 30px;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col {
    flex: 1;
    min-width: 200px;
}

.footer-col h4 {
    color: #fff;
    font-size: 15px;
    margin-bottom: 15px;
    font-weight: 500;
}

.footer-col ul li {
    margin-bottom: 8px;
    font-size: 13px;
}

.footer-col ul li a {
    color: #999;
    transition: color 0.2s ease;
}

.footer-col ul li a:hover {
    color: #2997f7;
}

.footer-col .footer-about {
    font-size: 13px;
    line-height: 1.7;
    color: #aaa;
}

.footer-bottom {
    border-top: 1px solid #3a3d44;
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
    color: #888;
}

.footer-bottom p {
    margin-bottom: 5px;
}

.footer-bottom p:last-child {
    margin-bottom: 0;
}

.footer-bottom a {
    color: #888;
}

.footer-bottom a:hover {
    color: #2997f7;
}

/* ---------- 响应式适配 ---------- */
@media screen and (max-width: 1200px) {
    .container {
        width: 100%;
    }

    .content-right {
        width: 280px;
    }
}

@media screen and (max-width: 992px) {
    .main-content {
        flex-direction: column;
    }

    .content-right {
        width: 100%;
    }

    .nav-menu {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .search-box {
        display: none;
    }

    .banner-slider {
        height: 280px;
    }

    .banner-item .banner-title {
        font-size: 18px;
    }

    .article-grid {
        grid-template-columns: 1fr;
    }

    .related-posts .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-inner {
        flex-direction: column;
    }
}

@media screen and (max-width: 768px) {
    body {
        font-size: 13px;
    }

    .header {
        height: 54px;
    }

    .header-inner {
        height: 54px;
    }

    .logo a {
        font-size: 18px;
    }

    .logo img {
        height: 30px;
    }

    .main-wrapper {
        padding: 12px 0;
    }

    .main-content {
        gap: 15px;
    }

    .banner-slider {
        height: 200px;
    }

    .banner-item .banner-overlay {
        padding: 25px 15px 15px;
    }

    .banner-item .banner-title {
        font-size: 15px;
    }

    .banner-item .banner-desc {
        display: none;
    }

    .sticky-article .sticky-thumb {
        height: 180px;
    }

    .sticky-article .sticky-body {
        padding: 15px;
    }

    .sticky-article .sticky-title {
        font-size: 16px;
    }

    .article-card {
        flex-direction: column;
    }

    .article-card .article-thumb {
        width: 100%;
        height: 180px;
    }

    .article-card .article-body {
        padding: 15px;
    }

    .article-card .article-title {
        font-size: 15px;
    }

    .article-detail {
        padding: 20px 18px;
    }

    .article-detail .article-header h1 {
        font-size: 20px;
    }

    .article-content {
        font-size: 14px;
    }

    .article-navigation {
        flex-direction: column;
    }

    .related-posts {
        padding: 18px 15px 15px;
    }

    .related-posts .related-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .comment-section {
        padding: 18px 15px;
    }

    .page-header {
        padding: 18px 20px;
    }

    .page-header h1 {
        font-size: 18px;
    }

    .pagination a,
    .pagination span {
        min-width: 32px;
        height: 32px;
        padding: 0 8px;
        font-size: 13px;
    }

    .section-title h2 {
        font-size: 16px;
    }

    .btn-login {
        height: 32px;
        padding: 0 14px;
        font-size: 12px;
    }
}

@media screen and (max-width: 480px) {
    .banner-slider {
        height: 160px;
    }

    .sticky-article .sticky-thumb {
        height: 150px;
    }

    .article-card .article-thumb {
        height: 150px;
    }

    .article-detail .article-header h1 {
        font-size: 18px;
    }

    .article-detail .article-header .article-meta {
        gap: 12px;
        font-size: 12px;
    }
}
