/* 拟物化设计主题 */
:root {
    --wood-color: #c19a6b;
    --paper-color: #f5f5f0;
    --ink-color: #33312e;
    --metal-color: #b8b8b8;
    --highlight-color: #8b5a2b;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Times New Roman', Georgia, serif;
}

body {
    background-color: #e0d8c0;
    background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h100v100H0z" fill="none"/><path d="M20 20h60v60H20z" stroke="%23d0c8b0" stroke-width="1" fill="none"/></svg>');
    color: var(--ink-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--highlight-color);
    transition: all 0.3s;
}

a:hover {
    color: #6b4b2b;
    text-decoration: underline;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 木质纹理头部 */
header {
    background-color: var(--wood-color);
    background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h100v100H0z" fill="%23a07a4b"/><path d="M0 50h100v10H0z" fill="%238b5a2b" opacity="0.2"/><path d="M0 30h100v5H0z" fill="%238b5a2b" opacity="0.1"/><path d="M0 70h100v5H0z" fill="%238b5a2b" opacity="0.1"/></svg>');
    padding: 15px 0;
    border-bottom: 5px solid #8b5a2b;
    box-shadow: 0 5px 15px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 3px var(--shadow-color);
    letter-spacing: 1px;
    padding: 10px 20px;
    background-color: var(--highlight-color);
    border: 2px solid #6b4b2b;
    border-radius: 5px;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.2), 3px 3px 5px var(--shadow-color);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 15px;
}

nav ul li a {
    color: white;
    padding: 8px 15px;
    background-color: rgba(139, 90, 43, 0.7);
    border-radius: 20px;
    border: 1px solid #6b4b2b;
    box-shadow: 2px 2px 3px var(--shadow-color);
    text-shadow: 1px 1px 1px var(--shadow-color);
}

nav ul li a:hover {
    background-color: #8b5a2b;
    text-decoration: none;
    transform: translateY(-2px);
}

/* 纸质内容区域 */
.main-content {
    background-color: var(--paper-color);
    background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h100v100H0z" fill="%23f5f5f0"/><path d="M10 10h80v80H10z" fill="none" stroke="%23e0d8c0" stroke-width="1"/></svg>');
    padding: 30px;
    margin: 30px 0;
    border: 1px solid #d0c8b0;
    border-radius: 2px;
    box-shadow: 5px 5px 15px var(--shadow-color), inset 0 0 30px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, transparent 40%, rgba(0,0,0,0.05) 40%, rgba(0,0,0,0.05) 60%, transparent 60%);
}

.section-title {
    font-size: 26px;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 1px solid #d0c8b0;
    color: var(--highlight-color);
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100px;
    height: 2px;
    background: linear-gradient(to right, var(--highlight-color), transparent);
}

/* 拟物化卡片 */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.article-card {
    background-color: white;
    border-radius: 3px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #d0c8b0;
    box-shadow: 3px 3px 8px var(--shadow-color);
    position: relative;
}

.article-card:hover {
    transform: translateY(-5px) rotate(1deg);
    box-shadow: 5px 10px 15px var(--shadow-color);
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(to right, var(--wood-color), var(--highlight-color), var(--wood-color));
}

.card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid #d0c8b0;
}

.card-body {
    padding: 20px;
    background-color: var(--paper-color);
}

.card-title {
    font-size: 18px;
    margin-bottom: 12px;
    font-weight: bold;
    color: var(--ink-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #7a7a7a;
    margin-top: 15px;
    border-top: 1px dashed #d0c8b0;
    padding-top: 10px;
}

/* 分类标签 */
.category-tag {
    display: inline-block;
    padding: 3px 10px;
    background-color: var(--metal-color);
    color: var(--ink-color);
    border-radius: 3px;
    font-size: 12px;
    margin-bottom: 10px;
    border: 1px solid #a0a0a0;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
}

/* 文章详情页 */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    padding: 40px;
    border: 1px solid #d0c8b0;
    box-shadow: 5px 5px 15px var(--shadow-color);
    position: relative;
}

.article-detail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 5px;
    background: linear-gradient(to right, transparent, var(--wood-color), transparent);
}

.article-header {
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 1px solid #d0c8b0;
    padding-bottom: 20px;
}

.article-title {
    font-size: 32px;
    margin-bottom: 15px;
    color: var(--highlight-color);
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 25px;
    color: #7a7a7a;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.article-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border: 5px solid white;
    box-shadow: 0 0 10px var(--shadow-color);
    margin-bottom: 30px;
}

.article-content {
    line-height: 1.8;
    font-size: 17px;
}

.article-content p {
    margin-bottom: 20px;
    text-indent: 2em;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border: 3px solid white;
    box-shadow: 0 0 8px var(--shadow-color);
    margin: 20px auto;
    display: block;
}

/* 分页导航 - 类似书本页码 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

.pagination a {
    padding: 8px 15px;
    border-radius: 3px;
    background-color: var(--paper-color);
    border: 1px solid #d0c8b0;
    box-shadow: 2px 2px 5px var(--shadow-color);
    transition: all 0.3s;
    color: var(--highlight-color);
}

.pagination a:hover {
    background-color: var(--highlight-color);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

/* 友情链接 - 类似便签纸 */
.friend-links {
    background-color: white;
    padding: 25px;
    margin: 30px 0;
    border: 1px solid #d0c8b0;
    box-shadow: 5px 5px 15px var(--shadow-color);
    position: relative;
}

.friend-links::before {
    content: '';
    position: absolute;
    top: 10px;
    left: -5px;
    width: 100%;
    height: 100%;
    background-color: rgba(193, 154, 107, 0.2);
    z-index: -1;
    transform: rotate(-1deg);
}

.friend-links h3 {
    margin-bottom: 20px;
    color: var(--highlight-color);
    font-size: 20px;
    border-bottom: 1px solid #d0c8b0;
    padding-bottom: 10px;
}

.friend-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.friend-links-container a {
    padding: 5px 10px;
    background-color: var(--paper-color);
    border-radius: 3px;
    font-size: 14px;
    border: 1px solid #d0c8b0;
    box-shadow: 1px 1px 3px var(--shadow-color);
}

.friend-links-container a:hover {
    background-color: var(--highlight-color);
    color: white;
    transform: rotate(1deg);
}

/* 金属质感的页脚 */
footer {
    background-color: var(--metal-color);
    background-image: linear-gradient(to bottom, #c0c0c0, #a0a0a0);
    padding: 20px 0;
    text-align: center;
    margin-top: 50px;
    border-top: 3px solid #808080;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
}

.copyright {
    font-size: 14px;
    color: var(--ink-color);
    text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.5);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
    }
    
    .article-title {
        font-size: 26px;
    }
    
    .article-detail {
        padding: 20px;
    }
}