/* 怀旧复古风格全局样式 */
:root {
    --paper-color: #f5e7d0;
    --ink-color: #3a3226;
    --accent-color: #8b5a2b;
    --highlight-color: #d4a76a;
    --border-color: #d9c7a7;
    --shadow-color: rgba(0, 0, 0, 0.15);
    --old-paper: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="%23f5e7d0"/><path d="M0 0 L100 0 L100 5 L0 10 Z" fill="%23d9c7a7" opacity="0.3"/><path d="M0 10 L100 5 L100 10 L0 15 Z" fill="%23d9c7a7" opacity="0.2"/></svg>');
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Times New Roman', Georgia, serif;
}

body {
    background-color: var(--paper-color);
    color: var(--ink-color);
    line-height: 1.6;
    background-image: var(--old-paper);
    padding-bottom: 50px;
}

a {
    text-decoration: none;
    color: var(--accent-color);
    transition: all 0.3s ease;
    border-bottom: 1px dotted var(--accent-color);
}

a:hover {
    color: var(--highlight-color);
    border-bottom-style: solid;
}

.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 信纸风格的头部 */
header {
    background-color: var(--paper-color);
    padding: 30px 0 20px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

header::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, transparent, var(--border-color), transparent);
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo {
    font-size: 42px;
    font-weight: normal;
    font-family: 'Palatino Linotype', 'Book Antiqua', serif;
    color: var(--ink-color);
    text-shadow: 1px 1px 0 var(--border-color);
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.tagline {
    font-style: italic;
    color: var(--accent-color);
    margin-bottom: 20px;
}

nav ul {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

nav ul li a {
    padding: 5px 15px;
    border: 1px solid var(--border-color);
    border-radius: 15px;
    font-size: 16px;
    border-bottom: none;
}

nav ul li a:hover {
    background-color: var(--border-color);
    color: var(--ink-color);
}

/* 主要内容区域 - 复古卡片 */
.main-content {
    background-color: var(--paper-color);
    padding: 30px;
    margin: 30px 0;
    border: 1px solid var(--border-color);
    box-shadow: 0 3px 10px var(--shadow-color);
    position: relative;
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 15px;
    background: linear-gradient(to right, transparent, var(--border-color), transparent);
    opacity: 0.5;
}

.section-title {
    font-size: 28px;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
    font-weight: normal;
    font-family: 'Palatino Linotype', 'Book Antiqua', serif;
    letter-spacing: 1px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100px;
    height: 2px;
    background: linear-gradient(to right, var(--accent-color), transparent);
}

/* 复古文章列表 */
.article-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.article-item {
    background-color: var(--paper-color);
    border: 1px solid var(--border-color);
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.article-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.article-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 95%, var(--border-color) 96%);
    background-size: 10px 10px;
    opacity: 0.2;
    pointer-events: none;
}

.article-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border: 1px solid var(--border-color);
    margin-bottom: 15px;
}

.article-info {
    position: relative;
    z-index: 1;
}

.article-title {
    font-size: 20px;
    margin-bottom: 10px;
    font-weight: normal;
    font-family: 'Palatino Linotype', 'Book Antiqua', serif;
    line-height: 1.4;
}

.article-excerpt {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 15px;
    color: var(--ink-color);
    opacity: 0.9;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--accent-color);
    font-style: italic;
}

/* 分类标签 */
.category-label {
    display: inline-block;
    padding: 2px 10px;
    background-color: var(--border-color);
    color: var(--ink-color);
    font-size: 12px;
    margin-bottom: 10px;
    border-radius: 3px;
}

/* 文章详情页样式 */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
}

.article-header {
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.article-detail-title {
    font-size: 32px;
    margin-bottom: 15px;
    font-weight: normal;
    font-family: 'Palatino Linotype', 'Book Antiqua', serif;
    line-height: 1.3;
}

.article-detail-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: var(--accent-color);
    margin-bottom: 20px;
    font-style: italic;
    flex-wrap: wrap;
}

.article-detail-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border: 1px solid var(--border-color);
    margin-bottom: 25px;
    box-shadow: 0 3px 10px var(--shadow-color);
}

.article-content {
    line-height: 1.8;
    font-size: 17px;
}

.article-content p {
    margin-bottom: 20px;
    text-align: justify;
    text-indent: 2em;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border-color);
    margin: 20px auto;
    display: block;
    box-shadow: 0 3px 10px var(--shadow-color);
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    gap: 10px;
}

.pagination a {
    padding: 8px 20px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    font-family: 'Palatino Linotype', 'Book Antiqua', serif;
}

.pagination a:hover {
    background-color: var(--border-color);
    color: var(--ink-color);
}

/* 友情链接样式 */
.friend-links {
    background-color: var(--paper-color);
    padding: 25px;
    margin: 30px 0;
    border: 1px solid var(--border-color);
    box-shadow: 0 3px 10px var(--shadow-color);
}

.friend-links h3 {
    margin-bottom: 20px;
    font-weight: normal;
    font-family: 'Palatino Linotype', 'Book Antiqua', serif;
    font-size: 22px;
}

.friend-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.friend-links-container a {
    padding: 5px 15px;
    border: 1px solid var(--border-color);
    border-radius: 15px;
    font-size: 14px;
    border-bottom: none;
}

.friend-links-container a:hover {
    background-color: var(--border-color);
    color: var(--ink-color);
}

/* 页脚样式 */
footer {
    background-color: var(--paper-color);
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
    border-top: 1px solid var(--border-color);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, transparent, var(--border-color), transparent);
}

.copyright {
    font-size: 14px;
    color: var(--accent-color);
    font-style: italic;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .logo {
        font-size: 32px;
    }
    
    nav ul {
        gap: 10px;
    }
    
    .article-list {
        grid-template-columns: 1fr;
    }
    
    .article-detail-title {
        font-size: 26px;
    }
    
    .article-content p {
        text-indent: 1em;
    }
}

/* 复古装饰元素 */
.corner-decoration {
    position: absolute;
    width: 50px;
    height: 50px;
    opacity: 0.1;
}

.corner-decoration.tl {
    top: 0;
    left: 0;
    border-top: 2px solid var(--accent-color);
    border-left: 2px solid var(--accent-color);
}

.corner-decoration.tr {
    top: 0;
    right: 0;
    border-top: 2px solid var(--accent-color);
    border-right: 2px solid var(--accent-color);
}

.corner-decoration.bl {
    bottom: 0;
    left: 0;
    border-bottom: 2px solid var(--accent-color);
    border-left: 2px solid var(--accent-color);
}

.corner-decoration.br {
    bottom: 0;
    right: 0;
    border-bottom: 2px solid var(--accent-color);
    border-right: 2px solid var(--accent-color);
}