/* 现代BLOG风格样式 */
:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --text-color: #1e293b;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --bg-color: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-accent: #f1f5f9;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --hover-color: #1e40af;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 顶部导航栏 */
.header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

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

.site-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    letter-spacing: -0.025em;
}

.site-title:hover {
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
    background: var(--bg-secondary);
}

/* 主要内容容器 */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    align-items: start;
}

.content-main {
    min-width: 0;
}

.sidebar {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    position: sticky;
    top: 6rem;
    height: fit-content;
}

/* 文章页面样式 */
.article-container {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 3rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.article-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-color);
    margin: 0 0 1.5rem 0;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-icon {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.article-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-color);
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: var(--text-color);
    font-weight: 700;
    line-height: 1.3;
    margin: 2rem 0 1rem 0;
}

.article-content h2 {
    font-size: 1.75rem;
    border-bottom: 2px solid var(--bg-accent);
    padding-bottom: 0.5rem;
}

.article-content h3 {
    font-size: 1.5rem;
}

.article-content p {
    margin: 1.5rem 0;
}

.article-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.article-content a:hover {
    color: var(--hover-color);
    border-bottom-color: var(--hover-color);
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    margin: 2rem 0;
}

.article-content ul,
.article-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.article-content li {
    margin: 0.5rem 0;
}

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    background: var(--bg-secondary);
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--text-light);
}

/* 首页和列表页样式 */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 3rem 0;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-accent) 100%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.page-title {
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

.page-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    font-weight: 400;
}

.article-list {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 2rem;
}

.article-item {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.article-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.article-link {
    display: block;
    padding: 2rem;
    text-decoration: none;
    color: var(--text-color);
}

.article-item-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.article-item:hover .article-item-title {
    color: var(--primary-color);
}

.article-item-excerpt {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.article-item-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* 侧边栏样式 */
.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.sidebar-content {
    color: var(--text-light);
    line-height: 1.6;
}

.sidebar-list {
    list-style: none;
    padding: 0;
}

.sidebar-list li {
    margin-bottom: 0.75rem;
}

.sidebar-list a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

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

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

.pagination a {
    background: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.pagination a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .current {
    background: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
}

/* 广告横幅样式 */
.banner-container {
    margin: 3rem 0;
    text-align: center;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.banner-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.banner-image:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

/* 页脚样式 */
.footer {
    background: var(--text-color);
    color: white;
    padding: 3rem 0;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .main-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .sidebar {
        position: static;
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .main-container {
        padding: 1rem;
    }
    
    .article-container {
        padding: 2rem 1.5rem;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .article-content {
        font-size: 1rem;
    }
    
    .article-link {
        padding: 1.5rem;
    }
    
    .sidebar {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 1.5rem;
    }
    
    .nav-link {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .article-title {
        font-size: 1.75rem;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* 加载动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}
} 