/**
 * Cnlog 极简风模板样式
 * 简洁优雅的现代博客模板
 */

:root {
    --primary-color: #3498db;
    --primary-hover: #2980b9;
    --text-color: #333333;
    --text-light: #999999;
    --bg-color: #f5f6f7;
    --card-bg: #ffffff;
    --border-color: #e5e5e5;
    --shadow: 0 1px 3px rgba(0,0,0,0.05);
    --radius: 4px;
}

[data-theme="dark"] {
    --primary-color: #5dade2;
    --primary-hover: #3498db;
    --text-color: #e5e5e5;
    --text-light: #888888;
    --bg-color: #1a1a1a;
    --card-bg: #2a2a2a;
    --border-color: #3a3a3a;
    --shadow: 0 1px 3px rgba(0,0,0,0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-color);
}

/* 头部导航 */
#header {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
}

#header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#blogname {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-color);
    position: relative;
    overflow: hidden;
}

/* LOGO 扫光效果 */
#blogname.logo-shine {
    position: relative;
}

#blogname.logo-shine::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: logo-shine 3s infinite;
    pointer-events: none;
}

/* 暗色主题下的扫光效果 */
[data-theme="dark"] #blogname.logo-shine::after {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.15),
        transparent
    );
}

@keyframes logo-shine {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

#blogname a {
    color: var(--text-color);
}

#blogname a:hover {
    color: var(--primary-color);
}

#blogdescription {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

#nav {
    display: flex;
    gap: 20px;
}

#nav a {
    font-size: 14px;
    color: var(--text-color);
    padding: 5px 10px;
}

#nav a:hover {
    color: var(--primary-color);
}

/* 主容器 */
#content {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    display: flex;
    gap: 30px;
}

/* 淡入上升动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 文章区域 */
#loglist {
    flex: 1;
    min-width: 0;
}

.log-item {
    background-color: var(--card-bg);
    margin-bottom: 15px;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
    /* 淡入上升动画 */
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
}

/* 卡片交错延迟 - 依次出现效果 */
.log-item:nth-child(1) { animation-delay: 0.05s; }
.log-item:nth-child(2) { animation-delay: 0.1s; }
.log-item:nth-child(3) { animation-delay: 0.15s; }
.log-item:nth-child(4) { animation-delay: 0.2s; }
.log-item:nth-child(5) { animation-delay: 0.25s; }
.log-item:nth-child(6) { animation-delay: 0.3s; }
.log-item:nth-child(7) { animation-delay: 0.35s; }
.log-item:nth-child(8) { animation-delay: 0.4s; }
.log-item:nth-child(9) { animation-delay: 0.45s; }
.log-item:nth-child(10) { animation-delay: 0.5s; }

/* 详情页文章卡片样式（单列） */
#loglist .log-item {
    padding: 20px;
}

.log-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

/* 文章卡片包装器 */
.log-item-wrapper {
    display: flex;
    gap: 0;
    align-items: stretch;
}

/* 缩略图区域 */
.log-thumbnail {
    width: 150px;
    height: 110px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    margin: 15px 0 15px 15px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    background: var(--card-bg);
}

.log-thumbnail a {
    display: block;
    width: calc(100% - 6px);
    height: calc(100% - 6px);
    margin: 3px;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.log-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

/* 扫光效果 */
.log-thumbnail a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.6),
        transparent
    );
    transition: left 0.6s;
    z-index: 1;
}

.log-item:hover .log-thumbnail {
    border-color: var(--primary-color);
    box-shadow: 0 2px 12px rgba(102, 126, 234, 0.3);
}

.log-item:hover .log-thumbnail img {
    transform: scale(1.05);
}

.log-item:hover .log-thumbnail a::before {
    left: 100%;
}

/* 文章内容区域 */
.log-content-area {
    flex: 1;
    padding: 15px 20px 15px 12px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.loglist-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    line-height: 1.4;
}

.loglist-title a {
    color: var(--text-color);
    flex: 1;
    min-width: 0;
}

.loglist-title a:hover {
    color: var(--primary-color);
}

/* 置顶徽章样式 */
.top-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    line-height: 1.5;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 首页置顶 - 蓝色 */
.top-home {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

/* 分类置顶 - 绿色 */
.top-category {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

/* 全部置顶 - 红色 */
.top-all {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

/* 最新标签 - 蓝色渐变 */
.new-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    line-height: 1.5;
    white-space: nowrap;
    flex-shrink: 0;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.loglist-content {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.loglist-info {
    font-size: 13px;
    color: var(--text-color);
    display: flex;
    gap: 12px;
    align-items: center;
}

.loglist-info .separator {
    color: #ccc;
    font-weight: bold;
}

.loglist-info a {
    color: var(--text-color);
    transition: color 0.2s;
}

.loglist-info a:hover {
    color: var(--primary-color);
}

.loglist-info time {
    color: var(--text-color);
}

/* 无文章卡片 */
.no-posts-card {
    background-color: var(--card-bg);
    padding: 60px 40px;
    margin-bottom: 25px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    text-align: center;
}

.no-posts-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.6;
}

.no-posts-card h3 {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 12px;
}

.no-posts-card p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
}

/* 侧边栏 */
#sidebar {
    width: 280px;
    flex-shrink: 0;
}

.side {
    background-color: var(--card-bg);
    padding: 12px 15px;
    margin-bottom: 12px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s;
}

.side:hover {
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
}

.side h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    position: relative;
}

.side h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s;
}

.side:hover h3::after {
    width: 60px;
}

/* 个人信息 */
.blogger {
    text-align: center;
    padding: 20px 15px;
}

.bloggeravatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    margin: 0 auto 15px;
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.bloggeravatar:hover {
    transform: scale(1.05);
}

.bloggername {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
}

.bloginfo {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.6;
}

/* 分类目录 */
.side-category {
    list-style: none;
    padding: 0;
}

.side-category li {
    margin-bottom: 4px;
}

.side-category a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    display: block;
    padding: 6px 10px;
    border-radius: 4px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.side-category a::before {
    content: '›';
    position: absolute;
    left: -15px;
    opacity: 0;
    transition: all 0.3s;
}

.side-category a:hover {
    background-color: var(--primary-color);
    color: #fff;
    padding-left: 20px;
}

.side-category a:hover::before {
    left: 8px;
    opacity: 1;
}

/* 最新评论 */
.side-comment {
    list-style: none;
    padding: 0;
}

.side-comment li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.side-comment li:last-child {
    border-bottom: none;
}

.comment-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid var(--border-color);
}

.comment-info {
    flex: 1;
    min-width: 0;
}

.comment-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-color);
}

.comment-time {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 4px;
}

.comment-content {
    font-size: 13px;
    color: var(--text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.5;
}

/* 最新文章/热门文章 */
.side-post {
    list-style: none;
    padding: 0;
}

.side-post li {
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
    position: relative;
    padding-left: 18px;
}

.side-post li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 18px;
    line-height: 1;
    transition: transform 0.2s;
}

.side-post li:hover::before {
    transform: scale(1.3);
}

.side-post li:last-child {
    border-bottom: none;
}

.side-post a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    display: block;
    transition: color 0.3s;
    line-height: 1.5;
}

.side-post a:hover {
    color: var(--primary-color);
}

.post-views {
    font-size: 12px;
    color: var(--text-light);
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.side-post a:hover .post-views {
    opacity: 1;
}

/* 阅读量图标样式 */
.view-icon {
    display: inline-block;
    margin-right: 3px;
    font-size: 13px;
    vertical-align: middle;
}

.view-icon.hot {
    color: #ff4444;
}

.view-icon.warm {
    color: #ffaa00;
}

.view-icon.normal {
    color: #999;
}

/* 侧边栏热门文章图标 */
.hot-icon {
    display: inline-block;
    margin-right: 5px;
    font-size: 14px;
    vertical-align: middle;
}

/* 文章分享功能 */
.article-share {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.share-label {
    font-size: 14px;
    color: var(--text-light);
    margin-right: 5px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.share-qq:hover {
    background: #12B7F5;
    border-color: #12B7F5;
    color: #fff;
}

.share-wechat:hover {
    background: #07C160;
    border-color: #07C160;
    color: #fff;
}

.share-weibo:hover {
    background: #E6162D;
    border-color: #E6162D;
    color: #fff;
}

.share-copy:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s;
}

.tag-item:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* 链接 */
.side-link {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
}

.side-link a {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s;
}

.side-link a:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: #fff;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 搜索 */
.searchbox {
    display: flex;
    gap: 8px;
}

.searchbox input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    transition: all 0.3s;
    background-color: var(--card-bg);
}

.searchbox input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.searchbox input::placeholder {
    color: var(--text-light);
}

.searchbox button {
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    white-space: nowrap;
}

.searchbox button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.searchbox button:active {
    transform: translateY(0);
}

/* 文章归档 */
.side-archive {
    list-style: none;
    padding: 0;
}

.side-archive li {
    margin-bottom: 8px;
}

.side-archive a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    display: block;
    padding: 6px 10px;
    border-radius: 4px;
    transition: all 0.3s;
}

.side-archive a:hover {
    background-color: var(--primary-color);
    color: #fff;
    padding-left: 15px;
}

/* 页脚 */
#footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-light);
    font-size: 12px;
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
    margin-top: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

#footer span {
    white-space: nowrap;
}

#footer span:not(:last-child)::after {
    content: "|";
    margin-left: 12px;
    color: var(--text-light);
}

#footer a {
    color: var(--text-light);
}

#footer a:hover {
    color: var(--primary-color);
}

/* 分页 */
.page-navigator {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.page-navigator a {
    padding: 6px 14px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
}

.page-navigator a:hover,
.page-navigator .current {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* 搜索结果项样式 */
.search-result-item {
    transition: all 0.3s ease;
}

.search-result-item:hover {
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
    transform: translateY(-2px);
}

.search-summary mark {
    background: linear-gradient(120deg, rgba(255, 235, 59, 0.3) 0%, rgba(255, 235, 59, 0.15) 100%);
    color: #f57c00;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 500;
}

/* 隐藏式搜索框 */
#search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-container {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 600px;
    position: relative;
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-form input[type="text"] {
    flex: 1;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    outline: none;
    transition: border-color 0.3s;
}

.search-form input[type="text"]:focus {
    border-color: var(--primary-color);
}

.search-form button {
    padding: 12px 24px;
    font-size: 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-form button:hover {
    background-color: var(--primary-hover);
}

#search-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.3s;
}

#search-close:hover {
    color: var(--text-color);
}

/* 搜索按钮样式 */
#search-toggle {
    display: inline-flex;
    align-items: center;
    padding: 5px;
    color: var(--text-color);
    transition: color 0.3s;
}

#search-toggle:hover {
    color: var(--primary-color);
}

/* 响应式 */
@media (max-width: 768px) {
    #content {
        flex-direction: column;
    }
    
    /* 移动端隐藏侧边栏 */
    #sidebar {
        display: none;
    }
    
    /* 移动端内容区域占满全屏 */
    #loglist {
        width: 100%;
        margin-right: 0;
    }
    
    /* 移动端文章卡片改为垂直布局 */
    .log-item-wrapper {
        flex-direction: column;
    }
    
    /* 移动端缩略图显示在顶部 */
    .log-thumbnail {
        width: 100%;
        height: 200px;
        margin: 0;
        border-radius: 8px 8px 0 0;
        border: none;
        border-bottom: 2px solid var(--border-color);
    }
    
    /* 移动端缩略图只有上圆角 */
    .log-thumbnail img {
        border-radius: 8px 8px 0 0;
    }
    
    /* 移动端内容区域padding调整 */
    .log-content-area {
        padding: 20px;
    }
    
    /* 移动端标题字号调整 */
    .loglist-title {
        font-size: 18px;
    }
    
    #header .container {
        flex-direction: column;
        gap: 15px;
    }

    #nav {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* 留言板样式 */
.guestbook-header {
    background-color: var(--card-bg);
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    text-align: center;
}

.guestbook-header h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
}

.guestbook-header p {
    font-size: 14px;
    color: var(--text-light);
}

.comment-form-container {
    background-color: var(--card-bg);
    padding: 25px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.comment-form-container h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.form-group {
    margin-bottom: 15px;
}

/* 昵称、邮箱、网址三个字段的容器 */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-submit {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-submit {
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-cancel {
    padding: 12px 20px;
    background-color: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-cancel:hover {
    background-color: var(--border-color);
}

.comment-list-container {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.comment-list-container h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.comment-list {
    min-height: 100px;
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-top: 20px;
}

.comment-item {
    display: flex;
    gap: 15px;
    padding: 15px 20px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 1) 100%);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.comment-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.comment-item:last-child {
    margin-bottom: 0;
}

.comment-avatar {
    flex-shrink: 0;
}

.comment-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
}

/* 回复的头像缩小 */
.comment-avatar-small img {
    width: 28px;
    height: 28px;
    border-width: 1px;
}

/* 回复项缩进 - 使用圆角半圆分割 */
.comment-reply {
    margin-left: 50px;
    padding: 8px 10px 8px 14px;
    margin-bottom: 6px;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.03) 0%, rgba(52, 152, 219, 0.08) 100%);
    border-radius: 10px;
    border: 1px solid rgba(52, 152, 219, 0.12);
    border-left: 2px solid var(--primary-color);
}

/* 二级回复增加缩进 */
.comment-reply .comment-reply {
    margin-left: 30px;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.02) 0%, rgba(52, 152, 219, 0.06) 100%);
    border-left-width: 1.5px;
}

/* 三级及以上回复进一步缩进 */
.comment-reply .comment-reply .comment-reply {
    margin-left: 25px;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.01) 0%, rgba(52, 152, 219, 0.04) 100%);
    border-left-width: 1px;
}

.comment-reply:last-child {
    margin-bottom: 0;
}

/* 回复之间的分割线 - 使用更细的线 */
.comment-reply + .comment-reply {
    margin-top: 5px;
    padding-top: 8px;
    border-top: 0.5px solid rgba(52, 152, 219, 0.15);
}

/* 回复内容字体更小 */
.comment-reply .comment-author {
    font-size: 12px;
}

.comment-reply .comment-time {
    font-size: 10px;
}

.comment-reply .comment-reply-btn {
    font-size: 11px;
}

.comment-reply .comment-text {
    font-size: 12px;
    line-height: 1.5;
}

.comment-content {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.comment-author {
    font-weight: 600;
    color: var(--text-color);
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.comment-at {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 13px;
}

.comment-time {
    font-size: 12px;
    color: var(--text-light);
}

.comment-reply-btn {
    font-size: 13px;
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s;
}

.comment-reply-btn:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.comment-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-color);
    word-wrap: break-word;
}

.comment-replies {
    margin-top: 15px;
    margin-left: 20px;
    padding-left: 20px;
    border-left: 2px solid var(--border-color);
}

.comment-replies .comment-item {
    padding: 15px 0;
}

.comment-replies .comment-avatar img {
    width: 40px;
    height: 40px;
}

.no-comments {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
    font-size: 14px;
}

/* 独立回复框样式 */
.reply-form-container {
    background-color: var(--bg-color);
    padding: 15px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.reply-form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.reply-form-content {
    margin-bottom: 10px;
}

.reply-form-actions {
    display: flex;
    gap: 10px;
}

.btn-reply-submit {
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.btn-reply-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.4);
}

.btn-reply-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-reply-cancel {
    padding: 8px 16px;
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-reply-cancel:hover {
    background-color: var(--border-color);
}

/* ========== 文章详情页样式 ========== */

/* 文章标题 */
.article-title {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0;
    color: var(--text-color);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* 文章标题区域（包含标题和操作按钮） */
.article-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.article-header .article-title {
    flex: 1;
}

/* 文章操作按钮 */
.article-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.btn-article-action {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    border: none;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
}

.btn-article-action svg {
    width: 12px;
    height: 12px;
}

.btn-article-action.btn-edit {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-article-action.btn-edit:hover {
    background-color: var(--primary-hover);
    opacity: 0.85;
}

.btn-article-action.btn-delete {
    background-color: transparent;
    color: #dc3545;
    border: 1px solid #dc3545;
}

.btn-article-action.btn-delete:hover {
    background-color: #dc3545;
    color: #fff;
    opacity: 0.85;
}

/* 文章元信息 */
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 15px 0;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border-color);
    font-size: 14px;
    color: var(--text-light);
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-meta svg {
    flex-shrink: 0;
}

.meta-category a {
    color: var(--primary-color);
}

.meta-category a:hover {
    text-decoration: underline;
}

/* 文章内容 */
.article-content {
    font-size: 16px;
    line-height: 1.9;
    color: var(--text-color);
    margin-bottom: 30px;
    word-spacing: 0.5px;
}

.article-content p {
    margin-bottom: 18px;
    text-align: justify;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 25px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    margin: 30px 0 15px;
    font-weight: 600;
    line-height: 1.4;
}

.article-content h1 { font-size: 24px; }
.article-content h2 { font-size: 22px; }
.article-content h3 { font-size: 20px; }
.article-content h4 { font-size: 18px; }

.article-content ul,
.article-content ol {
    margin: 16px 0;
    padding-left: 30px;
}

.article-content li {
    margin-bottom: 8px;
}

.article-content blockquote {
    margin: 25px 0;
    padding: 18px 24px;
    border-left: 4px solid var(--primary-color);
    background-color: var(--bg-color);
    color: var(--text-light);
    border-radius: 0 4px 4px 0;
    font-style: italic;
}

.article-content code {
    font-family: 'Courier New', Courier, monospace;
    background-color: var(--bg-color);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 13px;
}

.article-content pre {
    background-color: var(--bg-color);
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 20px 0;
}

.article-content pre code {
    background: none;
    padding: 0;
}

.article-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.article-content a:hover {
    color: var(--primary-hover);
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.article-content table th,
.article-content table td {
    padding: 10px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.article-content table th {
    background-color: var(--bg-color);
    font-weight: 600;
}

/* 文章标签 */
.article-tags {
    padding: 20px 0;
    border-top: 2px solid var(--border-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.tags-label {
    color: var(--text-light);
    font-size: 13px;
    margin-right: 10px;
}

.tag-item {
    display: inline-block;
    padding: 5px 14px;
    background-color: var(--bg-color);
    border-radius: 20px;
    font-size: 13px;
    margin-right: 8px;
    margin-bottom: 8px;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.tag-item:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3);
}

/* 文章底部信息 */
.article-footer {
    padding: 15px;
    background-color: var(--bg-color);
    border-radius: 4px;
    font-size: 12px;
    color: var(--text-light);
}

.article-footer a {
    color: var(--primary-color);
    word-break: break-all;
}

/* 上下篇导航 */
.article-nav {
    display: flex;
    gap: 20px;
    margin: 30px 0;
    padding: 20px;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.nav-item {
    flex: 1;
    padding: 15px;
    border-radius: 6px;
    background-color: var(--bg-color);
    transition: all 0.2s;
}

.nav-item:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.nav-item:hover .nav-title {
    color: #fff;
}

.nav-label {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.nav-item:hover .nav-label {
    color: rgba(255,255,255,0.8);
}

.nav-title {
    display: block;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 评论区标题 */
.section-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.comment-section {
    margin-top: 30px;
}

.comment-list {
    min-height: 100px;
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-top: 20px;
}

.loading-comments {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
    font-size: 14px;
}

.no-comments {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
    font-size: 14px;
}

/* 响应式 */
@media (max-width: 768px) {
    .article-title {
        font-size: 22px;
    }
    
    /* 移动端文章标题区域 */
    .article-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .article-actions {
        width: 100%;
    }
    
    .btn-article-action {
        flex: 1;
        justify-content: center;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .article-nav {
        flex-direction: column;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-row .form-group {
        width: 100%;
    }
}

/**
 * 搜索结果空白卡片
 */
.no-results-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    max-width: 100%;
    width: 100%;
}

.no-results-icon {
    font-size: 48px;
    margin-bottom: 16px;
    line-height: 1;
}

.no-results-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
}

.no-results-card > p {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.search-suggestions {
    background: rgba(52, 152, 219, 0.05);
    border-radius: 8px;
    padding: 16px 20px;
    text-align: left;
}

.search-suggestions > p {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 10px;
}

.search-suggestions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-suggestions li {
    position: relative;
    padding: 6px 0 6px 22px;
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.5;
}

.search-suggestions li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 12px;
}

/* 暗色模式适配 */
[data-theme="dark"] .no-results-card {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .search-suggestions {
    background: rgba(52, 152, 219, 0.1);
}

/* 返回首页按钮悬停效果 */
.no-results-card a[href] {
    transition: all 0.2s ease;
}

.no-results-card a[href]:hover {
    background: var(--primary-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* ========================================
   分页导航样式
   ======================================== */
.pagination-wrapper {
    margin-top: 30px;
    text-align: center;
}

.pagination {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-color);
    border-radius: 4px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.page-link:hover:not(.disabled):not(.active):not(.dots) {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(52, 152, 219, 0.05);
}

.page-link.active {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    font-weight: 600;
}

.page-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-color);
}

.page-link.dots {
    border: none;
    background: transparent;
    cursor: default;
    padding: 0 5px;
}

.page-info {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-light);
}

/* 暗色模式适配 */
[data-theme="dark"] .page-link {
    border-color: var(--border-color);
    background: var(--card-bg);
    color: var(--text-color);
}

[data-theme="dark"] .page-link:hover:not(.disabled):not(.active):not(.dots) {
    background: rgba(52, 152, 219, 0.15);
}

[data-theme="dark"] .page-link.disabled {
    background: var(--bg-color);
}

/* ========================================
   文章互动按钮（点赞/收藏）
   ======================================== */
.article-reactions {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: none;
    background: var(--bg-color);
    color: var(--text-light);
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.reaction-btn:hover {
    background: rgba(52, 152, 219, 0.1);
    color: var(--primary-color);
}

.reaction-btn.active {
    background: var(--primary-color);
    color: #ffffff;
}

.reaction-btn.active:hover {
    background: var(--primary-hover);
}

.reaction-btn svg {
    transition: all 0.2s ease;
}

.reaction-btn.active svg {
    animation: pulse 0.3s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.reaction-count {
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

/* 暗色模式适配 */
[data-theme="dark"] .reaction-btn {
    border-color: var(--border-color);
    background: var(--card-bg);
    color: var(--text-light);
}

[data-theme="dark"] .reaction-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
