:root {
    --primary-color: #ff6600;
    --primary-hover: #e65c00;
    --background-color: #f6f6ef;
    --text-color: #222222;
    --secondary-text: #666666;
    --border-color: #eaeaea;
    --link-color: #0366d6;
    --link-hover: #0056b3;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --error-color: #dc3545;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background-color: var(--background-color);
    color: var(--text-color);
}

header {
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1rem 0; /* 修改这里，移除左右内边距 */
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.rss-button {
    display: inline-block;
    padding: 3px 8px;
    font-size: 0.9em;
    background-color: #ff6600;
    color: white;
    text-decoration: none;
    border-radius: 3px;
}

.rss-button:hover {
    background-color: #ff8533;
}

.rss-button::before {
    content: "📡";
    margin-right: 0.5rem;
}

.home-link {
    text-decoration: none;
    color: var(--primary-color);
}

main {
    max-width: 800px;
    margin: 120px auto 40px;  /* 增加上边距从100px到120px */
    padding: 0 20px;
}

/* .container {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    padding: 0 20px;  
    box-sizing: border-box;
} */

.article {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 24px;
    margin-bottom: 24px;
    transition: transform 0.2s, box-shadow 0.2s;
    animation: fadeIn 0.3s ease-in-out;
}

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

.article-title-link {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s;
}

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

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0 20px;
    font-size: 0.9rem;
    color: var(--secondary-text);
}

.article-links {
    display: flex;
    gap: 15px;
}

.original-link, .comments-link {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s;
}

.original-link:hover, .comments-link:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.summary h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.summary-content {
    line-height: 1.6;
    margin-bottom: 15px;
}

.read-more {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.read-more:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

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

.article h2 {
    margin: 0 0 10px;
    font-size: 1.25rem;
    line-height: 1.4;
}

.article h2 a {
    color: var(--text-color);
    text-decoration: none;
}

.article h2 a:hover {
    color: var(--primary-color);
}

.article-meta {
    margin-bottom: 16px;
    font-size: 0.9rem;
    color: var(--secondary-text);
}

.article-meta .time {
    margin-right: 16px;
}

.article-meta .comments-link {
    color: var(--primary-color);
    text-decoration: none;
}

.article-meta .comments-link:hover {
    text-decoration: underline;
}

.summary {
    margin: 16px 0;
    padding: 16px;
    background: var(--background-color);
    border-radius: 6px;
}

.summary h3 {
    margin: 0 0 8px;
    font-size: 1rem;
    color: var(--secondary-text);
}

.summary p {
    margin: 0;
    line-height: 1.6;
    color: var(--text-color);
    font-size: 0.95rem;
    text-align: justify;
    hyphens: auto;
}

/* 分页导航 */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0;
}

.pagination-button {
    background-color: white;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s;
}

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

.pagination-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.2s;
}

.page-number:hover {
    background-color: var(--border-color);
}

.page-number.current {
    background-color: var(--primary-color);
    color: white;
}

.page-ellipsis {
    color: var(--secondary-text);
}

footer {
    background: white;
    color: var(--secondary-text);
    text-align: center;
    padding: 1rem 0;
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}

.error-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
}

.error-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 400px;
}

.error-container h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.back-button {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.back-button:hover {
    background-color: #e65600;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.2rem;
        margin-left: 5px;  /* 标题左边加点边距 */
    }

    .article {
        padding: 16px;
    }

    .summary {
        padding: 12px;
    }

    .pagination {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .header-content {
        padding: 0; /* 确保移动端没有额外的内边距 */
    }

    .rss-button {
        padding: 2px 6px; /* 在移动端稍微减小按钮大小 */
        font-size: 0.85em;
        margin-right: 5px;  /* RSS按钮右边加点边距 */
    }

    .container {
        padding: 0 15px;  /* 移动端下稍微减小一点边距 */
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}