/*
Theme Name: My SEO Blog 自适应双栏博客
Theme URI: https://example.com
Author: 自定义
Author URI: https://example.com
Description: 自适应双栏WordPress博客主题，SEO优化，支持上下篇、相关文章
Version: 1.0
License: GPLv2
Text Domain: my-seo-blog
*/

/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: "Microsoft YaHei", sans-serif;
    line-height: 1.7;
    color: #333;
    background: #f5f5f5;
}
a {
    color: #2d5c96;
    text-decoration: none;
}
a:hover {
    color: #e64946;
}
img {
    max-width: 100%;
    height: auto;
    display: block;
}
.container {
    width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部 */
.header {
    background: #fff;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 99;
}
.logo {
    font-size: 24px;
    font-weight: bold;
}
.nav {
    margin-top: 10px;
}
.nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
}
.nav a {
    font-size: 16px;
    font-weight: 500;
}

/* 主体双栏 */
.main-wrapper {
    display: flex;
    gap: 30px;
    margin: 30px 0;
}
.content {
    flex: 0 0 770px;
    background: #fff;
    padding: 25px;
    border-radius: 5px;
}
.sidebar {
    flex: 1;
    background: #fff;
    padding: 25px;
    border-radius: 5px;
}

/* 文章列表 */
.article-item {
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 20px;
}
.article-title {
    font-size: 20px;
    margin-bottom: 10px;
}
.article-meta {
    color: #999;
    font-size: 13px;
    margin-bottom: 10px;
}
.article-excerpt {
    color: #666;
}

/* 文章页 */
.single-title {
    font-size: 26px;
    margin-bottom: 15px;
}
.single-content {
    margin: 25px 0;
    font-size: 16px;
    line-height: 1.8;
}
.single-content p {
    margin-bottom: 18px;
}
.breadcrumb {
    background: #f8f8f8;
    padding: 10px 15px;
    border-radius: 3px;
    font-size: 14px;
    margin-bottom: 20px;
    color: #666;
}

/* 上下篇 */
.post-nav {
    display: flex;
    justify-content: space-between;
    margin: 30px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
}
.prev-post, .next-post {
    width: 48%;
}

/* 相关文章 */
.related-posts {
    margin: 30px 0;
}
.related-title {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}
.related-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}
.related-item {
    width: 31%;
}
.related-item-title {
    font-size: 14px;
    margin-top: 8px;
}

/* 侧边栏 */
.widget {
    margin-bottom: 30px;
}
.widget-title {
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #eee;
}
.widget ul {
    list-style: none;
}
.widget li {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}

/* 底部 */
.footer {
    background: #2d3748;
    color: #fff;
    text-align: center;
    padding: 25px 0;
    margin-top: 30px;
}

/* 自适应（手机端自动变成单栏） */
@media (max-width: 1200px) {
    .container { width: 100%; }
    .content { flex: 0 0 65%; }
}
@media (max-width: 768px) {
    .main-wrapper { flex-direction: column; }
    .content, .sidebar { flex: 0 0 100%; }
    .nav ul { flex-wrap: wrap; gap: 15px; }
    .related-item { width: 100%; }
    .post-nav { flex-direction: column; gap: 15px; }
    .prev-post, .next-post { width: 100%; }
}

/* 返回顶部 */
.back-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #2d5c96;
    color: #fff;
    width: 40px;
    height: 40px;
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
}