/*!
Theme Name: 传奇暗黑攻略
Theme URI: https://你的域名
Author: Typecho Team
Author URI: http://typecho.org
Description: 基于官方Classic 22魔改的传奇游戏攻略主题，支持暗黑风格、SEO优化与右侧广告位。
Version: 1.0
License: GPLv2
*/

/* 基础重置 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: "Microsoft Yahei", sans-serif;
    line-height: 1.6;
    background: var(--bg-color);
    color: var(--text-color);
}
a { text-decoration: none; color: var(--primary-color); }
a:hover { opacity: 0.8; }
ul { list-style: none; }
img { max-width: 100%; height: auto; }

/* 容器 */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 顶部导航 */
.site-header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    margin-bottom: 30px;
}
.nav-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}
.site-title {
    font-size: 22px;
    color: var(--primary-color);
}
.site-title a { color: var(--primary-color); }
.site-nav ul {
    display: flex;
    gap: 20px;
}
.site-nav a {
    color: var(--text-color);
    padding: 5px 0;
    border-bottom: 2px solid transparent;
}
.site-nav a.active,
.site-nav a:hover {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
}

/* 主内容区 */
.main-content {
    min-height: 60vh;
}

/* 文章列表 */
.archive-title {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}
.post-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 20px 25px;
    margin-bottom: 20px;
    transition: all 0.2s;
}
.post-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}
.post-title {
    font-size: 20px;
    margin-bottom: 10px;
}
.post-title a {
    color: var(--title-color);
}
.post-title a:hover {
    color: var(--primary-color);
}
.post-meta {
    font-size: 13px;
    color: var(--muted-color);
    margin-bottom: 12px;
}
.meta-item {
    margin-right: 15px;
}
.post-excerpt {
    color: var(--text-color);
    margin-bottom: 12px;
}
.read-more a {
    font-size: 14px;
    color: var(--primary-color);
}

/* 文章详情 */
.post-detail {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 30px 35px;
}
.post-detail .post-title {
    font-size: 26px;
    text-align: center;
    margin-bottom: 15px;
    color: var(--title-color);
}
.post-detail .post-meta {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--border-color);
}
.post-content {
    font-size: 16px;
    line-height: 1.8;
}
.post-content h2,
.post-content h3 {
    margin: 25px 0 15px;
    color: var(--title-color);
}
.post-content p {
    margin-bottom: 15px;
}
.post-content img {
    border-radius: 4px;
    margin: 10px 0;
}
.post-tags {
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px dashed var(--border-color);
    font-size: 14px;
    color: var(--muted-color);
}
.post-tags a {
    margin: 0 5px;
    padding: 3px 8px;
    background: var(--border-color);
    border-radius: 3px;
    font-size: 13px;
}

/* 上下篇 */
.post-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 14px;
}

/* 分页 */
.pagination {
    text-align: center;
    margin: 30px 0;
}
.pagination a,
.pagination span {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 3px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
}
.pagination .current {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* 底部 */
.site-footer {
    background: var(--header-bg);
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
    margin-top: 50px;
    text-align: center;
    color: var(--muted-color);
    font-size: 14px;
}
.powered {
    margin-top: 5px;
    font-size: 12px;
}

/* 响应式 */
@media (max-width: 600px) {
    .nav-wrap { justify-content: center; }
    .post-item, .post-detail { padding: 15px; }
    .post-detail .post-title { font-size: 20px; }
}
/* 评论区 */
#comments {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}
.comments-title {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--title-color);
}
.comment-list {
    list-style: none;
    margin-bottom: 20px;
}
.comment-body {
    padding: 15px;
    margin-bottom: 15px;
    background: var(--bg-color);
    border-radius: 4px;
    border: 1px solid var(--border-color);
}
.comment-author {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}
.comment-meta {
    font-size: 12px;
    color: var(--muted-color);
    margin-bottom: 10px;
}
.comment-content {
    font-size: 14px;
    line-height: 1.6;
}
.comment-reply {
    text-align: right;
    font-size: 13px;
    margin-top: 8px;
}
.comment-children {
    margin-left: 30px;
    margin-top: 10px;
}
.respond {
    margin-top: 30px;
}
#response {
    margin-bottom: 15px;
    color: var(--title-color);
}
.comment-fields {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}
#comment-form textarea,
#comment-form input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-color);
    border-radius: 4px;
    font-family: inherit;
}
#comment-form textarea {
    margin-bottom: 10px;
    resize: vertical;
}
#comment-form button {
    padding: 8px 20px;
    background: var(--primary-color);
    color: #1a1208;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}
#comment-form button:hover {
    opacity: 0.9;
}
.cancel-comment-reply {
    display: inline-block;
    margin-left: 10px;
    font-size: 13px;
}

@media (max-width: 600px) {
    .comment-fields {
        grid-template-columns: 1fr;
    }
}
.post-content img {
    display: block;
    margin: 15px auto;
    max-width: 100%;
}
/* ========== 首页新增区块样式 ========== */
/* 顶部横幅 */
.hero-banner {
    background: linear-gradient(135deg, #1a140a 0%, #2e2410 50%, #1a140a 100%);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 40px 30px;
    text-align: center;
    margin-bottom: 30px;
}
.hero-content h2 {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}
.hero-content p {
    color: var(--muted-color);
    font-size: 15px;
    margin: 0;
}

/* 区块标题 */
.section-title {
    font-size: 18px;
    color: var(--title-color);
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 3px solid var(--primary-color);
}

/* 分类卡片网格 */
.category-section {
    margin-bottom: 35px;
}
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 10px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.2s;
}
.cat-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.cat-name {
    font-size: 16px;
    font-weight: bold;
    color: var(--title-color);
    margin-bottom: 4px;
}
.cat-count {
    font-size: 12px;
    color: var(--muted-color);
}

/* 响应式适配 */
@media (max-width: 600px) {
    .hero-banner {
        padding: 25px 15px;
    }
    .hero-content h2 {
        font-size: 22px;
    }
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========== 文章详情页样式 ========== */
/* 面包屑导航 */
.breadcrumb {
    font-size: 13px;
    color: var(--muted-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--border-color);
}
.breadcrumb a {
    color: var(--muted-color);
    text-decoration: none;
}
.breadcrumb a:hover {
    color: var(--primary-color);
}
.breadcrumb .sep {
    margin: 0 8px;
}
.breadcrumb .current {
    color: var(--text-color);
}

/* 正文排版强化 */
.post-content {
    font-size: 16px;
    line-height: 1.85;
    margin: 20px 0;
}
.post-content h2,
.post-content h3,
.post-content h4 {
    margin: 30px 0 15px;
    color: var(--title-color);
    font-weight: bold;
    line-height: 1.4;
}
.post-content h2 {
    font-size: 20px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}
.post-content h3 {
    font-size: 18px;
    padding-left: 10px;
    border-left: 3px solid var(--primary-color);
}
.post-content p {
    margin-bottom: 18px;
    text-align: justify;
}
.post-content ul,
.post-content ol {
    margin: 15px 0;
    padding-left: 25px;
}
.post-content li {
    margin-bottom: 8px;
}
.post-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 20px auto;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}
.post-content blockquote {
    margin: 20px 0;
    padding: 12px 20px;
    background: rgba(212, 175, 55, 0.08);
    border-left: 4px solid var(--primary-color);
    color: var(--muted-color);
    border-radius: 0 4px 4px 0;
}
.post-content code {
    padding: 2px 6px;
    background: var(--border-color);
    border-radius: 3px;
    font-size: 14px;
}

/* 标签美化 */
.post-tags {
    margin-top: 35px;
    padding-top: 15px;
    border-top: 1px dashed var(--border-color);
    font-size: 14px;
}
.tags-label {
    color: var(--muted-color);
    margin-right: 5px;
}
.post-tags a {
    display: inline-block;
    margin: 0 4px 8px 0;
    padding: 4px 10px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 13px;
    color: var(--primary-color);
    transition: all 0.2s;
    text-decoration: none;
}
.post-tags a:hover {
    background: var(--primary-color);
    color: #1a1208;
}

/* 相关攻略 */
.related-posts {
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}
.related-title {
    font-size: 17px;
    color: var(--title-color);
    margin-bottom: 15px;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.related-card {
    display: block;
    padding: 12px 15px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.2s;
    text-decoration: none;
}
.related-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}
.related-card h5 {
    font-size: 14px;
    color: var(--text-color);
    margin: 0 0 5px 0;
    font-weight: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.related-card:hover h5 {
    color: var(--primary-color);
}
.related-date {
    font-size: 12px;
    color: var(--muted-color);
}

/* 上下篇导航美化 */
.post-nav {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 35px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}
.post-nav .nav-item {
    flex: 1;
    padding: 12px 15px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
}
.post-nav .nav-item:hover {
    border-color: var(--primary-color);
}
.post-nav .prev {
    text-align: left;
}
.post-nav .next {
    text-align: right;
}
.post-nav a {
    color: var(--text-color);
    text-decoration: none;
}
.post-nav .nav-item:hover a {
    color: var(--primary-color);
}

/* 移动端适配 */
@media (max-width: 600px) {
    .related-grid {
        grid-template-columns: 1fr;
    }
    .post-nav {
        flex-direction: column;
    }
    .post-nav .next {
        text-align: left;
    }
}
/* ========== 顶部导航升级样式 ========== */
.site-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}
.site-nav ul {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}
.site-nav a {
    color: var(--text-color);
    padding: 5px 0;
    border-bottom: 2px solid transparent;
    text-decoration: none;
    font-size: 15px;
}
.site-nav a.active,
.site-nav a:hover {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
}

/* 导航搜索框 */
.nav-search {
    position: relative;
    margin: 0;
}
.nav-search input {
    width: 160px;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
}
.nav-search input:focus {
    width: 200px;
    border-color: var(--primary-color);
}
.nav-search input::placeholder {
    color: var(--muted-color);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .nav-wrap {
        flex-direction: column;
        gap: 10px;
    }
    .site-nav {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    .site-nav ul {
        justify-content: center;
        gap: 12px;
    }
    .nav-search input {
        width: 100%;
    }
    .nav-search input:focus {
        width: 100%;
    }
}

/* ========== 404页面样式 ========== */
.error-page {
    text-align: center;
    padding: 80px 20px;
}
.error-code {
    font-size: 120px;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}
.error-title {
    font-size: 24px;
    color: var(--title-color);
    margin-bottom: 10px;
}
.error-desc {
    color: var(--muted-color);
    margin-bottom: 30px;
}
.error-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}
.btn-primary,
.btn-outline {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}
.btn-primary {
    background: var(--primary-color);
    color: #1a1208;
}
.btn-primary:hover {
    opacity: 0.9;
}
.btn-outline {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}
.btn-outline:hover {
    background: var(--primary-color);
    color: #1a1208;
}

/* ========== 首页公告栏样式 ========== */
.home-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    margin-bottom: 30px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    color: var(--primary-color);
    font-size: 14px;
}
.notice-icon {
    font-size: 16px;
    flex-shrink: 0;
}
.notice-text {
    flex: 1;
    line-height: 1.5;
}

/* ========== 评论区优化样式 ========== */
#comments {
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}
.comments-title {
    font-size: 18px;
    color: var(--title-color);
    margin-bottom: 20px;
    padding-left: 10px;
    border-left: 3px solid var(--primary-color);
}

/* 评论列表 - 自动楼层号 */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
    counter-reset: floor;
}
.comment-body {
    position: relative;
    padding: 15px 18px;
    margin-bottom: 15px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    counter-increment: floor;
}
.comment-body::before {
    content: "#" counter(floor) "楼";
    position: absolute;
    top: 12px;
    right: 15px;
    font-size: 12px;
    color: var(--muted-color);
}
.comment-author {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}
.comment-author .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}
.comment-meta {
    font-size: 12px;
    color: var(--muted-color);
    margin-bottom: 10px;
}
.comment-content {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-color);
}
.comment-reply {
    text-align: right;
    margin-top: 8px;
    font-size: 13px;
}
.comment-reply a {
    color: var(--muted-color);
}
.comment-reply a:hover {
    color: var(--primary-color);
}

/* 楼主标识 */
.comment-by-author {
    border-color: var(--primary-color);
    background: rgba(212, 175, 55, 0.05);
}
.comment-by-author .comment-author::after {
    content: "楼主";
    margin-left: 8px;
    padding: 1px 6px;
    background: var(--primary-color);
    color: #1a1208;
    border-radius: 3px;
    font-size: 12px;
    font-weight: normal;
}

/* 子评论缩进 */
.comment-children {
    margin-left: 30px;
    margin-top: 10px;
    list-style: none;
    padding: 0;
}

/* 评论表单 */
.respond {
    margin-top: 30px;
}
#response {
    margin-bottom: 15px;
    color: var(--title-color);
    font-size: 16px;
}
.login-tip {
    font-size: 14px;
    color: var(--muted-color);
    margin-bottom: 10px;
}
.comment-fields {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}
#comment-form textarea,
#comment-form input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
#comment-form textarea:focus,
#comment-form input:focus {
    border-color: var(--primary-color);
}
#comment-form textarea {
    margin-bottom: 10px;
    resize: vertical;
    min-height: 100px;
}
.submit-row {
    display: flex;
    align-items: center;
    gap: 15px;
}
#comment-form button {
    padding: 8px 22px;
    background: var(--primary-color);
    color: #1a1208;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: opacity 0.2s;
}
#comment-form button:hover {
    opacity: 0.9;
}
.cancel-comment-reply a {
    font-size: 13px;
    color: var(--muted-color);
}
.cancel-comment-reply a:hover {
    color: var(--primary-color);
}

.comment-closed {
    text-align: center;
    color: var(--muted-color);
    padding: 30px 0;
}

/* 移动端适配 */
@media (max-width: 600px) {
    .comment-fields {
        grid-template-columns: 1fr;
    }
    .comment-children {
        margin-left: 15px;
    }
}

/* ========== 搜索结果页样式 ========== */
.search-page {
    padding: 10px 0;
}
.search-header {
    margin-bottom: 20px;
}
.search-tip {
    color: var(--muted-color);
    font-size: 14px;
    margin: 8px 0 0 0;
}
.search-tip .keyword {
    color: var(--primary-color);
    font-weight: bold;
}

/* 搜索表单 */
.search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}
.search-form input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.search-form input:focus {
    border-color: var(--primary-color);
}
.search-form button {
    padding: 0 20px;
    background: var(--primary-color);
    color: #1a1208;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: opacity 0.2s;
}
.search-form button:hover {
    opacity: 0.9;
}

.search-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 20px 0;
}

/* 无结果提示 */
.no-result {
    text-align: center;
    padding: 60px 20px;
}
.no-result-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}
.no-result h4 {
    color: var(--title-color);
    margin-bottom: 8px;
    font-size: 18px;
}
.no-result p {
    color: var(--muted-color);
    margin-bottom: 20px;
    font-size: 14px;
}

/* ========== 首页热门攻略排行 ========== */
.hot-section {
    margin-bottom: 35px;
}
.hot-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.hot-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
}
.hot-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.hot-rank {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    border-radius: 4px;
    background: var(--border-color);
    color: var(--muted-color);
    font-size: 14px;
    font-weight: bold;
}
/* 前三名金色高亮 */
.hot-rank.rank-1,
.hot-rank.rank-2,
.hot-rank.rank-3 {
    background: var(--primary-color);
    color: #1a1208;
}
.hot-info {
    flex: 1;
    min-width: 0;
}
.hot-info h4 {
    font-size: 14px;
    color: var(--text-color);
    margin: 0 0 4px 0;
    font-weight: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hot-card:hover .hot-info h4 {
    color: var(--primary-color);
}
.hot-meta {
    font-size: 12px;
    color: var(--muted-color);
}

/* 移动端适配 */
@media (max-width: 600px) {
    .hot-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== 文章缩略图样式 ========== */
/* 首页列表左图右文布局 */
.post-item.has-thumb {
    display: flex;
    gap: 20px;
}
.post-thumb {
    flex-shrink: 0;
    width: 220px;
    height: 140px;
    border-radius: 4px;
    overflow: hidden;
    text-decoration: none;
}
.post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.post-item.has-thumb:hover .post-thumb img {
    transform: scale(1.05);
}
.post-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.post-body .post-excerpt {
    flex: 1;
}

/* 相关文章卡片缩略图 */
.related-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}
.related-thumb {
    width: 100%;
    height: 100px;
    overflow: hidden;
}
.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.related-card:hover .related-thumb img {
    transform: scale(1.05);
}
.related-info {
    padding: 10px 12px;
}

/* 移动端适配 */
@media (max-width: 600px) {
    .post-item.has-thumb {
        flex-direction: column;
    }
    .post-thumb {
        width: 100%;
        height: 180px;
    }
}

/* ========== 侧边栏布局 ========== */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 25px;
    align-items: start;
}
.main-col {
    min-width: 0;
}

/* 侧边栏组件 */
.sidebar .widget {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 18px;
    margin-bottom: 20px;
}
.widget-title {
    font-size: 16px;
    color: var(--title-color);
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
}

/* 热门排行列表 */
.hot-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: none;
}
.hot-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-color);
}
.hot-list li:last-child {
    border-bottom: none;
}
.rank-num {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 3px;
    background: var(--border-color);
    color: var(--muted-color);
    font-size: 12px;
    font-weight: bold;
    margin-top: 2px;
}
.rank-num.rank-1,
.rank-num.rank-2,
.rank-num.rank-3 {
    background: var(--primary-color);
    color: #1a1208;
}
.hot-list li a {
    flex: 1;
    font-size: 14px;
    color: var(--text-color);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.5;
}
.hot-list li a:hover {
    color: var(--primary-color);
}

/* 分类列表 */
.cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.cat-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-color);
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
}
.cat-list li:last-child a {
    border-bottom: none;
}
.cat-list li a:hover {
    color: var(--primary-color);
}
.cat-list .count {
    font-size: 12px;
    color: var(--muted-color);
    background: var(--border-color);
    padding: 1px 6px;
    border-radius: 10px;
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tag-item {
    padding: 4px 10px;
    background: var(--border-color);
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s;
}
.tag-item:hover {
    background: var(--primary-color);
    color: #1a1208;
}

/* 移动端适配 */
@media (max-width: 900px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        order: 2;
    }
}