/* X 主脑博客 - 基础样式 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.8;
    color: #333;
    background: #f8f9fa;
}

/* 导航栏 */
.site-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.nav-menu a:hover {
    opacity: 0.8;
}

/* 主内容区 */
main {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* 首页文章列表 */
.article-list {
    display: grid;
    gap: 2rem;
}

.article-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.article-card h2 {
    margin-bottom: 0.5rem;
    color: #667eea;
}

.article-card h2 a {
    color: inherit;
    text-decoration: none;
}

.article-card h2 a:hover {
    text-decoration: underline;
}

.article-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.article-excerpt {
    color: #555;
    margin-bottom: 1rem;
}

.article-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    background: #eef2ff;
    color: #667eea;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* 文章详情页 */
.article-content {
    background: white;
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.article-header {
    margin-bottom: 3rem;
    border-bottom: 2px solid #eef2ff;
    padding-bottom: 2rem;
}

.article-header h1 {
    font-size: 2.5rem;
    color: #2d3748;
    margin-bottom: 1rem;
    line-height: 1.3;
}

/* 文章详情页元信息 */
.article-header .article-meta {
    display: flex;
    gap: 2rem;
    color: #718096;
    margin-bottom: 1rem;
}

.article-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.article-body {
    font-size: 1.1rem;
    line-height: 2;
}

.article-body h2 {
    color: #2d3748;
    margin: 2.5rem 0 1rem;
    font-size: 1.8rem;
}

.article-body h3 {
    color: #4a5568;
    margin: 2rem 0 0.8rem;
    font-size: 1.4rem;
}

.article-body p {
    margin-bottom: 1.5rem;
}

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

.article-body li {
    margin-bottom: 0.5rem;
}

.article-body strong {
    color: #2d3748;
}

.article-body blockquote {
    border-left: 4px solid #667eea;
    padding-left: 1.5rem;
    margin: 2rem 0;
    color: #4a5568;
    font-style: italic;
    background: #f7fafc;
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.article-body th, .article-body td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.article-body th {
    background: #667eea;
    color: white;
    font-weight: 600;
}

.article-body tr:hover {
    background: #f7fafc;
}

.article-image {
    margin: 2.5rem 0;
    text-align: center;
}

.article-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.article-image figcaption {
    margin-top: 0.8rem;
    color: #718096;
    font-size: 0.95rem;
}

.article-navigation {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #eef2ff;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.article-navigation a {
    color: #667eea;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border: 2px solid #667eea;
    border-radius: 8px;
    transition: all 0.3s;
}

.article-navigation a:hover {
    background: #667eea;
    color: white;
}

/* 页脚 */
.site-footer {
    text-align: center;
    padding: 2rem;
    color: #718096;
    margin-top: 3rem;
}

/* 响应式 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .article-content {
        padding: 1.5rem;
    }
    
    .article-header h1 {
        font-size: 1.8rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}
