/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.header {
    background: white;
    padding: 2rem 0;
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.logo p {
    color: #666;
    font-size: 1rem;
}


/* 主内容区域 */
.main {
    background: white;
    margin: 2rem auto;
    padding: 2rem;
}

/* 文章列表 */
.articles-list {
    max-width: 800px;
    margin: 0 auto;
}

.main h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 2rem;
    text-align: center;
}

/* 文章项 */
.article-item {
    border-bottom: 1px solid #eee;
    padding: 1.5rem 0;
}

.article-item:last-child {
    border-bottom: none;
}

.article-item h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.article-item h3 a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s ease;
}

.article-item h3 a:hover {
    color: #007bff;
}

.article-item p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.article-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #888;
}

.article-meta .date,
.article-meta .category {
    display: flex;
    align-items: center;
}

.article-meta .category {
    background: #f8f9fa;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
}

/* 页脚 */
.footer {
    background: #f8f9fa;
    padding: 1.5rem 0;
    text-align: center;
    margin-top: 3rem;
    border-top: 1px solid #eee;
}

.footer p {
    color: #666;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.footer a {
    color: #666;
    text-decoration: none;
    font-size: 0.8rem;
}

.footer a:hover {
    color: #007bff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .header {
        padding: 1.5rem 0;
    }

    .logo h1 {
        font-size: 1.8rem;
    }

    .logo p {
        font-size: 0.9rem;
    }

    .main {
        margin: 1rem;
        padding: 1.5rem;
    }

    .main h2 {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }

    .article-item {
        padding: 1rem 0;
    }

    .article-item h3 {
        font-size: 1.2rem;
    }

    .article-meta {
        font-size: 0.8rem;
    }

    .footer {
        padding: 1rem 0;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

/* 文章详情页样式 */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
}

.article-header {
    margin-bottom: 3rem;
}

.article-hero-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.article-meta-header {
    text-align: center;
}

.article-meta-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #333;
    line-height: 1.2;
}

.article-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 2rem;
}

.article-info .category {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: 500;
}

.article-detail .article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    max-width: 800px;
    margin: 0 auto;
}

.article-detail .article-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
}

.article-detail .article-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 1.5rem 0 0.8rem 0;
    color: #555;
}

.article-detail .article-content p {
    margin-bottom: 1.2rem;
    text-align: justify;
}

.article-detail .article-content ul,
.article-detail .article-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.article-detail .article-content li {
    margin-bottom: 0.5rem;
}

.code-block {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin: 1.5rem 0;
    overflow: hidden;
}

.code-block pre {
    margin: 0;
    padding: 1rem;
    background: #2d3748;
    color: #e2e8f0;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.code-block code {
    font-family: inherit;
}

.article-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding: 2rem 0;
    border-top: 1px solid #e9ecef;
}

.back-link,
.next-link {
    display: inline-flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-link:hover,
.next-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-card {
    animation: fadeInUp 0.6s ease-out;
}

.article-card:nth-child(2) {
    animation-delay: 0.1s;
}

.article-card:nth-child(3) {
    animation-delay: 0.2s;
}

/* 加载动画 */
.loading {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.3s forwards;
}
