/*
Theme Name: 精简文字主题
Theme URI:
Description: 简约版WordPress主题，支持PC全宽和手机优化
Version: 1.0
Author:
Text Domain: wechat-style
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f4f4f4;
    color: #333;
    line-height: 1.75;
}

a {
    color: #576b95;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1em 0;
}

/* 头部样式 */
.site-header {
    background: #fff;
    padding: 20px 40px;
    border-bottom: 1px solid #eee;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    font-size: 24px;
    font-weight: bold;
    color: #2d3748;
}

.site-logo:hover {
    text-decoration: none;
}

.search-form {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    width: 300px;
    margin-left: 100px;
}

.search-input {
    flex: 1;
    padding: 10px 14px;
    border: none;
    outline: none;
    font-size: 14px;
    background: #fff;
    color: #333;
}

.search-input::placeholder {
    color: #999;
}

.search-button {
    padding: 10px 16px;
    border: none;
    background: #2d3748;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
}

.search-button:hover {
    background: #1a202c;
}

/* 主内容区域 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 40px;
}

/* 文章列表 */
.post-list {
    max-width: 1200px;
    margin: 0 auto;
}

.post-item {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 20px;
}

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

.post-title {
    font-size: 20px;
    margin: 0 0 8px;
    color: #2d3748;
}

.post-title a {
    color: #2d3748;
}

.post-meta {
    color: #777;
    font-size: 14px;
    margin-bottom: 10px;
}

.post-excerpt {
    color: #444;
    line-height: 1.7;
}

/* 分页 */
.pagination {
    margin-top: 30px;
    text-align: center;
}

.pagination a, .pagination span {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #2d3748;
}

.pagination a:hover {
    background: #f5f5f5;
}

.pagination .current {
    background-color: #2d3748;
    color: #fff;
    border-color: #2d3748;
}

/* 文章内容 */
.single-post {
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    padding: 40px;
}

.single-post .post-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 20px;
}

.single-post .post-meta {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.post-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #333;
}

.post-content p {
    margin-bottom: 1.2em;
    text-align: justify;
}

.post-content h2 {
    font-size: 1.25rem;
    margin: 1.6em 0 0.8em;
    font-weight: bold;
}

.post-content h3 {
    font-size: 1.15rem;
    margin: 1.4em 0 0.7em;
    font-weight: bold;
}

.post-content ul,
.post-content ol {
    padding-left: 1.6em;
    margin: 1em 0;
}

.post-content blockquote {
    border-left: 4px solid #d9d9d9;
    padding: 10px 14px;
    background: #f7f7f7;
    margin: 1.2em 0;
    color: #666;
}

.post-content pre {
    background-color: #1e1e1e;
    color: #d4d4d4;
    padding: 1.25rem;
    border-radius: 6px;
    overflow: auto;
    font-family: "Consolas", "Monaco", "Courier New", monospace;
    font-size: 14px;
    line-height: 1.5;
    margin: 1.2em 0;
    white-space: pre;
    word-wrap: normal;
    border: 1px solid #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.post-content pre code {
    background: none;
    color: inherit;
    padding: 0;
    border-radius: 0;
    font-family: inherit;
}

.post-content pre .comment { color: #6a9955; }
.post-content pre .string { color: #ce9178; }
.post-content pre .keyword { color: #569cd6; }
.post-content pre .function { color: #dcdcaa; }
.post-content pre .variable { color: #9cdcfe; }
.post-content pre .number { color: #b5cea8; }

/* 搜索结果 */
.search-results h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #2d3748;
}

/* 单页面 */
.page-content {
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    padding: 40px;
}

.page-content .post-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
}

/* 页脚 */
.site-footer {
    background: #f4f4f4;
    color: #1a202c;
    padding: 10px 20px;
    margin-top: 40px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-copyright {
    font-size: 14px;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .site-header {
        padding: 15px 16px;
    }
    
    .header-container {
        flex-direction: row;
        align-items: center;
    }
    
    .site-logo {
        font-size: 18px;
        flex-shrink: 0;
    }
    
    .search-form {
        width: auto;
        margin-left: 0;
        flex: 1;
        margin-left: 10px;
        max-width: 200px;
    }
    
    .search-input {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .search-button {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .container {
        padding: 20px 16px;
    }
    
    .post-item {
        padding: 16px;
    }
    
    .post-title {
        font-size: 18px;
    }
    
    .single-post,
    .page-content {
        padding: 20px 16px;
    }
    
    .single-post .post-title,
    .page-content .post-title {
        font-size: 22px;
    }
    
    .pagination a, .pagination span {
        padding: 6px 10px;
        font-size: 13px;
        margin: 0 2px;
    }
}

@media (max-width: 480px) {
    .search-form {
        max-width: 150px;
    }
    
    .site-logo {
        font-size: 16px;
    }
}