/* Web Notes 博客样式 */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --background-color: #f8f9fa;
    --text-color: #333;
    --link-color: #0056b3;
    --border-color: #dee2e6;
    --header-height: 60px;
    --footer-height: 60px;
    --sidebar-width: 300px;
    --max-content-width: 1200px;
}

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

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "WenQuanYi Micro Hei", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--primary-color);
}

ul, ol {
    list-style-position: inside;
}

.container {
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.header {
    height: var(--header-height);
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.logo a {
    color: var(--text-color);
}

.nav ul {
    display: flex;
    list-style: none;
}

.nav li {
    margin-left: 20px;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* 主要内容区域 */
.main {
    display: flex;
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height) - var(--footer-height));
}

.content {
    flex: 1;
    padding: 30px 0;
}

.sidebar {
    width: var(--sidebar-width);
    padding: 30px 20px 30px 0;
}

/* 文章列表 */
.post-list {
    margin-bottom: 30px;
}

.post-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.post-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.post-meta {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.post-excerpt {
    margin-bottom: 10px;
}

.read-more {
    display: inline-block;
    color: var(--primary-color);
}

/* 侧边栏样式 */
.widget {
    margin-bottom: 30px;
}

.widget-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border-color);
}

.widget ul {
    list-style: none;
}

.widget li {
    margin-bottom: 8px;
}

.tag-cloud a {
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 10px;
    padding: 2px 8px;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    font-size: 0.9rem;
}

.tag-cloud a:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* 页脚样式 */
.footer {
    height: var(--footer-height);
    background-color: #fff;
    border-top: 1px solid var(--border-color);
    text-align: center;
    padding: 20px 0;
    color: var(--secondary-color);
}

/* 文章内容样式 */
.post-content {
    line-height: 1.8;
}

.post-content h1, 
.post-content h2, 
.post-content h3, 
.post-content h4, 
.post-content h5, 
.post-content h6 {
    margin: 1.5em 0 0.8em;
}

.post-content p {
    margin-bottom: 1em;
}

.post-content img {
    max-width: 100%;
    height: auto;
}

.post-content pre {
    background-color: #f5f5f5;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 1em;
}

.post-content code {
    background-color: #f5f5f5;
    padding: 2px 5px;
    border-radius: 3px;
    font-family: Consolas, Monaco, 'Andale Mono', monospace;
}

.post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1em;
    margin-left: 0;
    margin-right: 0;
    color: var(--secondary-color);
}

/* 响应式样式 */
@media (max-width: 992px) {
    .main {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        padding: 30px 0;
        order: 2;
    }

    .content {
        order: 1;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .nav.active {
        display: block;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background-color: #fff;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }

    .nav.active ul {
        flex-direction: column;
    }

    .nav.active li {
        margin: 0 0 10px 0;
    }
} 