/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    color: #121212;
    font-size: 14px;
    line-height: 1.6;
}

/* 容器限制宽度 */
.zhihu-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* 页首样式 */
.zhihu-header {
    background-color: white;
    border-bottom: 1px solid #eee;
    padding: 8px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.zhihu-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.zhihu-logo {
    display: flex;
    align-items: center;
}

.zhihu-logo img {
    width: 32px;
    height: 32px;
}

.blog-name {
    font-size: 18px;
    color: #0f88eb;
    font-weight: 600;
    margin-left: 10px;
}

.zhihu-nav {
    margin-left: 30px;
}

.zhihu-nav ul {
    list-style: none;
    display: flex;
}

.zhihu-nav li {
    margin-right: 24px;
}

.nav-link {
    color: #8590a6;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s;
    display: inline-block;
    padding: 8px 0;
    position: relative;
}

.nav-link:hover {
    color: #0f88eb;
}

.nav-link.active {
    color: #0f88eb;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #0f88eb;
}

.zhihu-search {
    width: 300px;
}

.search-container {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1px solid #eee;
    border-radius: 40px;
    background-color: #f6f6f6;
    font-size: 14px;
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #0f88eb;
    background-color: white;
    box-shadow: 0 0 0 2px rgba(15, 136, 235, 0.1);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #8590a6;
}

/* 主内容区样式 */
#main {
    padding: 16px 0;
}

.zhihu-content {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

/* 文章列表和详情样式 - 限制最大宽度为1000px */
#post_list, .postDetail {
    width: 68%;
    max-width: 1000px;
}

.post, .postDetail {
    background-color: white;
    border-radius: 4px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid #eee;
    transition: all 0.2s;
}

.post:hover {
    border-color: #e0e0e0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.postTitle {
    margin-bottom: 8px;
}

.postTitle a {
    color: #121212;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.postTitle a:hover {
    color: #0f88eb;
}

.postCon {
    color: #646464;
    font-size: 15px;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.postDesc {
    color: #8590a6;
    font-size: 13px;
    display: flex;
    align-items: center;
}

.postDesc span {
    margin-right: 16px;
}

/* 侧边栏样式 */
#sideBar {
    width: 30%;
    max-width: 300px;
}

.sidebar-block {
    background-color: white;
    border-radius: 4px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid #eee;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 600;
    color: #121212;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

/* 文章详情页样式 */
.postDetail .postTitle {
    font-size: 24px;
    margin-bottom: 16px;
    line-height: 1.3;
}

.postDetail .postCon {
    font-size: 16px;
    line-height: 1.8;
    color: #121212;
    display: block;
}

.postDetail .postCon p {
    margin-bottom: 16px;
}

.postDetail .postDesc {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

/* 评论区样式 */
#comments {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.commentform {
    margin-bottom: 24px;
}

/* 页脚样式 */
.zhihu-footer {
    background-color: white;
    border-top: 1px solid #eee;
    padding: 24px 0;
    margin-top: 32px;
}

.footer-content {
    text-align: center;
}

.footer-links {
    margin-bottom: 12px;
}

.footer-links a {
    color: #8590a6;
    text-decoration: none;
    margin: 0 8px;
    font-size: 14px;
}

.footer-links a:hover {
    color: #0f88eb;
    text-decoration: underline;
}

.separator {
    color: #eee;
}

.copyright {
    color: #8590a6;
    font-size: 13px;
    line-height: 1.8;
}

.copyright a {
    color: #0f88eb;
    text-decoration: none;
}

.copyright a:hover {
    text-decoration: underline;
}

/* 按钮样式 */
#btnCommentSubmit, .like-btn {
    background-color: #0f88eb;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 14px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

#btnCommentSubmit:hover, .like-btn:hover {
    background-color: #0c71c3;
}

/* 代码块样式 */
.cnblogs_code {
    border: 1px solid #f0f0f0 !important;
    background-color: #f9f9f9 !important;
    border-radius: 4px !important;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace !important;
    padding: 12px !important;
    margin: 16px 0 !important;
    overflow-x: auto !important;
}

/* 引用样式 */
blockquote {
    border-left: 3px solid #0f88eb;
    padding: 10px 15px;
    margin: 16px 0;
    background-color: #f6f7f9;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .zhihu-content {
        flex-direction: column;
    }
    
    #post_list, .postDetail, #sideBar {
        width: 100%;
        max-width: 100%;
    }
    
    .zhihu-search {
        width: 180px;
    }
    
    .zhihu-nav {
        display: none;
    }
}
    