/* 拟物化设计全局样式 */
:root {
    --primary-color: #8b4513; /*  saddle brown */
    --secondary-color: #a0522d; /* sienna */
    --light-color: #f5f5dc; /* beige */
    --dark-color: #4b3621; /* dark brown */
    --accent-color: #cd853f; /* peru */
    --text-color: #333;
    --shadow-heavy: 0 10px 20px rgba(0, 0, 0, 0.3), 0 6px 6px rgba(0, 0, 0, 0.2);
    --shadow-medium: 0 4px 8px rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Georgia', 'Times New Roman', serif;
}

body {
    background-color: #e6d5b8;
    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="%23d4b483" stroke-width="0.5" fill="none"/></svg>');
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 拟物化头部 - 皮革质感 */
header {
    background: linear-gradient(to bottom, #a67c52, #8b4513);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-heavy);
    border-bottom: 3px solid #6d3b0e;
    border-radius: 0 0 10px 10px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--light-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.2);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 15px;
}

nav ul li a {
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: bold;
    color: var(--light-color);
    background: rgba(139, 69, 19, 0.7);
    border: 1px solid #6d3b0e;
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.2), 0 2px 3px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

nav ul li a:hover {
    background: rgba(205, 133, 63, 0.8);
    color: #fff;
    text-decoration: none;
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.3), 0 2px 5px rgba(0, 0, 0, 0.4);
}

/* 拟物化主要内容区域 - 纸张效果 */
.main-content {
    background-color: var(--light-color);
    padding: 30px;
    margin: 30px 0;
    border-radius: 8px;
    box-shadow: var(--shadow-heavy);
    border: 1px solid #d4b483;
    position: relative;
    overflow: hidden;
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 15px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), transparent);
    border-radius: 8px 8px 0 0;
}

.section-title {
    font-size: 26px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--accent-color);
    color: var(--primary-color);
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100px;
    height: 2px;
    background: linear-gradient(to right, var(--primary-color), transparent);
}

/* 拟物化文章卡片 - 照片/便签效果 */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.article-card {
    background: white;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #ddd;
    box-shadow: var(--shadow-medium);
    position: relative;
    background: linear-gradient(to bottom, #fff 0%, #f9f9f9 100%);
}

.article-card:hover {
    transform: translateY(-5px) rotate(1deg);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: 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="%23eee" stroke-width="1" fill="none"/></svg>');
    opacity: 0.5;
}

.card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid #ddd;
}

.card-body {
    padding: 20px;
    position: relative;
}

.card-title {
    font-size: 18px;
    margin-bottom: 12px;
    font-weight: bold;
    color: var(--dark-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: #777;
    margin-top: 15px;
    border-top: 1px dashed #ccc;
    padding-top: 10px;
}

/* 拟物化分类标签 - 邮票效果 */
.category-tag {
    display: inline-block;
    padding: 3px 12px;
    background-color: var(--light-color);
    color: var(--primary-color);
    border-radius: 15px;
    font-size: 12px;
    margin-bottom: 15px;
    border: 1px solid var(--accent-color);
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.category-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px dashed var(--accent-color);
    border-radius: 15px;
    opacity: 0.3;
}

/* 拟物化文章详情页 - 书本效果 */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    box-shadow: var(--shadow-heavy);
    border: 1px solid #d4b483;
    position: relative;
}

.article-detail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 15px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), transparent);
}

.article-header {
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--accent-color);
}

.article-title {
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--dark-color);
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 25px;
    color: #777;
    margin-bottom: 25px;
    flex-wrap: wrap;
    font-style: italic;
}

.article-image {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-medium);
    border: 1px solid #ddd;
}

.article-content {
    line-height: 1.8;
    font-size: 17px;
    background: 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="%23eee" stroke-width="1" fill="none"/></svg>');
}

.article-content p {
    margin-bottom: 20px;
    text-indent: 2em;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 20px 0;
    box-shadow: var(--shadow-medium);
    border: 1px solid #ddd;
}

/* 拟物化分页导航 - 老式按钮效果 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

.pagination a {
    padding: 10px 20px;
    border-radius: 4px;
    background: linear-gradient(to bottom, #f5f5f5, #e0e0e0);
    border: 1px solid #ccc;
    color: #555;
    font-weight: bold;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2), inset 0 1px 2px rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    position: relative;
}

.pagination a:hover {
    background: linear-gradient(to bottom, #e0e0e0, #d0d0d0);
    color: #333;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3), inset 0 1px 2px rgba(255, 255, 255, 0.6);
    text-decoration: none;
}

.pagination a:active {
    background: linear-gradient(to bottom, #d0d0d0, #c0c0c0);
    box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.3);
    top: 1px;
}

/* 拟物化友情链接 - 索引卡片效果 */
.friend-links {
    background: white;
    border-radius: 8px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: var(--shadow-heavy);
    border: 1px solid #d4b483;
    position: relative;
}

.friend-links h3 {
    margin-bottom: 20px;
    color: var(--dark-color);
    font-size: 20px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid var(--accent-color);
    padding-bottom: 10px;
}

.friend-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.friend-links-container a {
    padding: 8px 15px;
    background: linear-gradient(to bottom, #f5f5f5, #e0e0e0);
    border-radius: 4px;
    font-size: 14px;
    border: 1px solid #ccc;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), inset 0 1px 2px rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.friend-links-container a:hover {
    background: linear-gradient(to bottom, #e0e0e0, #d0d0d0);
    color: #333;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2), inset 0 1px 2px rgba(255, 255, 255, 0.6);
    text-decoration: none;
}

/* 拟物化页脚 - 木质效果 */
footer {
    background: linear-gradient(to bottom, #8b4513, #6d3b0e);
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
    box-shadow: var(--shadow-heavy);
    border-top: 3px solid #5a2e0b;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 10px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.1), transparent);
}

.copyright {
    font-size: 14px;
    color: var(--light-color);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
    }
    
    .article-title {
        font-size: 26px;
    }
    
    .article-meta {
        gap: 15px;
    }
    
    .article-detail {
        padding: 20px;
    }
}