/* 新浪博客风格样式 */

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

body {
    font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* 顶部导航栏 */
.navbar {
    background: #fff;
    border-bottom: 2px solid #0066cc;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.navbar-brand {
    font-size: 24px;
    font-weight: bold;
    color: #0066cc;
    text-decoration: none;
}

.navbar-nav {
    display: flex;
    list-style: none;
    gap: 30px;
}

.navbar-nav a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
}

.navbar-nav a:hover {
    color: #0066cc;
}

/* 主容器 */
.main-container {
    max-width: 1200px;
    margin: 20px auto;
    display: flex;
    gap: 20px;
    padding: 0 20px;
}

/* 主内容区 */
.content-area {
    flex: 1;
    background: #fff;
    padding: 20px;
    border: 1px solid #e5e5e5;
}

/* 侧边栏 */
.sidebar {
    width: 300px;
    flex-shrink: 0;
}

.sidebar-widget {
    background: #fff;
    border: 1px solid #e5e5e5;
    padding: 15px;
    margin-bottom: 15px;
}

.sidebar-widget h3 {
    font-size: 16px;
    color: #0066cc;
    border-bottom: 2px solid #0066cc;
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.sidebar-widget ul {
    list-style: none;
}

.sidebar-widget ul li {
    padding: 5px 0;
    border-bottom: 1px dashed #e5e5e5;
}

.sidebar-widget ul li:last-child {
    border-bottom: none;
}

.sidebar-widget ul li a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.sidebar-widget ul li a:hover {
    color: #0066cc;
}

/* 文章列表 */
.post-list {
    list-style: none;
}

.post-item {
    padding: 20px 0;
    border-bottom: 1px solid #e5e5e5;
}

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

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

.post-title a {
    color: #333;
    text-decoration: none;
}

.post-title a:hover {
    color: #0066cc;
}

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

.post-meta span {
    margin-right: 15px;
}

.post-summary {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 10px;
}

.post-tags {
    font-size: 12px;
}

.post-tags a {
    display: inline-block;
    background: #f0f0f0;
    color: #666;
    padding: 2px 8px;
    margin-right: 5px;
    text-decoration: none;
    border-radius: 3px;
}

.post-tags a:hover {
    background: #0066cc;
    color: #fff;
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud a {
    display: inline-block;
    background: #f0f0f0;
    color: #666;
    padding: 4px 10px;
    text-decoration: none;
    border-radius: 3px;
    font-size: 13px;
}

.tag-cloud a:hover {
    background: #0066cc;
    color: #fff;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

.pagination a,
.pagination span {
    padding: 5px 12px;
    border: 1px solid #e5e5e5;
    text-decoration: none;
    color: #333;
}

.pagination a:hover {
    background: #0066cc;
    color: #fff;
    border-color: #0066cc;
}

.pagination .current {
    background: #0066cc;
    color: #fff;
    border-color: #0066cc;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    background: #0066cc;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}

.btn:hover {
    background: #0052a3;
}

.btn-danger {
    background: #d9534f;
}

.btn-danger:hover {
    background: #c9302c;
}

/* Flash 消息 */
.flash-messages {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

.alert {
    padding: 12px 20px;
    margin-bottom: 15px;
    border-radius: 3px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .navbar-container {
        flex-direction: column;
        gap: 15px;
    }

    .navbar-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
}
