/* 基础样式和变量 */
:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --secondary-color: #2ecc71;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --gray-color: #95a5a6;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --success-color: #27ae60;
    --text-color: #333;
    --text-light: #7f8c8d;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.site-header {
    background-color: #fff;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.navbar-logo .navbar-brand {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.navbar-logo .logo-text {
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 5px 0;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn-login {
    color: var(--text-color);
    background: transparent;
}

.btn-login:hover {
    color: var(--primary-color);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-download {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 12px 28px;
    font-weight: 600;
}

/* 主要内容区域 */
.site-content {
    min-height: 70vh;
}

.content-area {
    padding: 40px 0;
}

/* 文章网格 */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.post-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-content {
    padding: 20px;
}

.post-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.post-title a {
    color: var(--dark-color);
    text-decoration: none;
}

.post-title a:hover {
    color: var(--primary-color);
}

.post-meta {
    display: flex;
    gap: 15px;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.post-excerpt {
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.7;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.read-more:hover {
    color: var(--primary-dark);
}

/* 分页样式 */
.pagination {
    margin-top: 40px;
    text-align: center;
}

.page-numbers {
    display: inline-flex;
    gap: 5px;
    list-style: none;
}

.page-numbers li {
    margin: 0 2px;
}

.page-numbers a,
.page-numbers span {
    display: inline-block;
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
}

.page-numbers a:hover,
.page-numbers .current {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 侧边栏 */
.sidebar {
    width: 100%;
    max-width: 300px;
    margin-left: 40px;
}

.widget {
    background: white;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.widget-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    color: var(--dark-color);
}

/* 页脚样式 */
.site-footer {
    background-color: var(--dark-color);
    color: white;
}

.footer-top {
    padding: 50px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-widget-title {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-widget-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-logo .footer-brand {
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    display: block;
    margin-bottom: 15px;
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 20px;
}

.footer-bottom {
    padding: 20px 0;
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.6);
}

.footer-menu {
    display: flex;
    list-style: none;
    gap: 20px;
}

.footer-menu a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-menu a:hover {
    color: white;
}

/* 响应式设计 */
.navbar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.toggle-bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px 0;
    transition: var(--transition);
}

/* 无内容样式 */
.no-content {
    text-align: center;
    padding: 60px 20px;
}

.no-content h2 {
    color: var(--text-light);
    margin-bottom: 20px;
}

.no-content p {
    color: var(--gray-color);
}