/* 新中式数字美学风格 */
:root {
    --ink-color: #2A2A2A;
    --paper-color: #F8F4E9;
    --primary-color: #9E2F50;
    --secondary-color: #D4A76A;
    --accent-color: #4A6B7D;
    --border-style: 1px solid rgba(0, 0, 0, 0.1);
    --shadow-light: 0 2px 12px rgba(0, 0, 0, 0.05);
    --shadow-heavy: 0 4px 24px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Serif SC', 'Microsoft YaHei', serif;
}

body {
    background-color: var(--paper-color);
    color: var(--ink-color);
    line-height: 1.8;
    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="M20,20 L80,20 L80,80 L20,80 Z" fill="none" stroke="%23D4A76A" stroke-width="0.5" stroke-dasharray="5,5"/></svg>');
    background-size: 100px 100px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    position: relative;
}

a:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

a:hover:after {
    width: 100%;
}

.container {
    width: 92%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 4%;
}

/* 印章式头部设计 */
header {
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    background-color: rgba(248, 244, 233, 0.9);
    backdrop-filter: blur(5px);
    z-index: 100;
    border-bottom: var(--border-style);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    padding-left: 1.2rem;
}

.logo:before {
    content: '「';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--secondary-color);
}

.logo:after {
    content: '」';
    color: var(--secondary-color);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

nav ul li a {
    font-size: 1.1rem;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

nav ul li a:hover {
    border-bottom-color: var(--primary-color);
}

/* 卷轴式内容区 */
.main-content {
    background: white;
    padding: 2.5rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-light);
    border: var(--border-style);
    position: relative;
}

.main-content:before,
.main-content:after {
    content: '';
    position: absolute;
    height: 40px;
    width: calc(100% - 80px);
    left: 40px;
    background: var(--paper-color);
    z-index: -1;
    box-shadow: var(--shadow-heavy);
}

.main-content:before {
    top: -20px;
    transform: rotate(-1deg);
}

.main-content:after {
    bottom: -20px;
    transform: rotate(1deg);
}

.section-title {
    font-size: 1.6rem;
    margin-bottom: 1.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--secondary-color);
    position: relative;
    display: inline-block;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 40%;
    height: 3px;
    background: var(--primary-color);
}

/* 窗棂网格布局 */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.8rem;
}

.article-card {
    background: white;
    border: var(--border-style);
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    overflow: hidden;
}

.article-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid var(--secondary-color);
    opacity: 0;
    transition: opacity 0.3s;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.article-card:hover:before {
    opacity: 0.3;
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: var(--border-style);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--accent-color);
    margin-top: 1rem;
}

/* 文章详情页 - 册页样式 */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
}

.article-header {
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
}

.article-header:after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 25%;
    width: 50%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--secondary-color), transparent);
}

.article-title {
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    color: var(--accent-color);
    font-size: 0.95rem;
}

.article-image {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    margin: 2rem 0;
    border: 1px solid var(--secondary-color);
    padding: 8px;
    background: white;
    box-shadow: var(--shadow-light);
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.9;
}

.article-content p {
    margin-bottom: 1.5rem;
    text-indent: 2em;
}

.article-content img {
    max-width: 100%;
    height: auto;
    margin: 1.5rem auto;
    display: block;
    border: var(--border-style);
    padding: 5px;
    background: white;
}

/* 分页 - 古籍页码样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
}

.pagination a {
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--secondary-color);
    color: var(--ink-color);
    transition: all 0.3s;
}

.pagination a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 友情链接 - 题跋样式 */
.friend-links {
    background: white;
    padding: 2rem;
    margin: 2rem 0;
    border: var(--border-style);
    position: relative;
}

.friend-links:before {
    content: '友';
    position: absolute;
    top: -0.8rem;
    left: 1.5rem;
    background: var(--paper-color);
    padding: 0 1rem;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.friend-links h3 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    color: var(--primary-color);
}

.friend-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.friend-links-container a {
    padding: 0.4rem 1rem;
    border: 1px solid var(--secondary-color);
    font-size: 0.95rem;
    transition: all 0.3s;
}

.friend-links-container a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* 页脚 - 落款样式 */
footer {
    background: var(--ink-color);
    color: var(--paper-color);
    padding: 2rem 0;
    text-align: center;
    margin-top: 3rem;
    position: relative;
}

footer:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color), var(--accent-color));
}

.copyright {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1.2rem;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .main-content {
        padding: 1.5rem;
    }
    
    .article-title {
        font-size: 1.8rem;
    }
    
    .article-content p {
        text-indent: 1.5em;
    }
}