/* 古风样式设计 */

/* 古风配色 */
:root {
  --ancient-main: #5D4037; /* 主色 - 棕褐色 */
  --ancient-secondary: #8D6E63; /* 辅助色 - 浅棕褐色 */
  --ancient-accent: #D7CCC8; /* 点缀色 - 浅米色 */
  --ancient-light: #EFEBE9; /* 背景色 - 更浅的米色 */
  --ancient-dark: #3E2723; /* 深色 - 深棕褐色 */
  --ancient-text: #4E342E; /* 文字色 - 棕色 */
  --ancient-paper: #FDF6E3; /* 纸张色 - 仿古纸 */
  --ancient-border: #A1887F; /* 边框色 - 中棕褐色 */
  --ancient-gold: #FFD700; /* 金色 - 装饰用 */
}

/* 字体 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;700&family=Ma+Shan+Zheng&display=swap');

/* 全局样式 */
body {
    font-family: 'Noto Serif SC', serif;
    background-color: var(--ancient-light);
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%238D6E63' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
    color: var(--ancient-text);
}

/* 古风装饰图案 */
.decoration-corner {
    position: relative;
}

.decoration-corner::before,
.decoration-corner::after {
    content: "";
    position: absolute;
    width: 30px;
    height: 30px;
    border-color: var(--ancient-border);
    border-style: solid;
}

.decoration-corner::before {
    top: 0;
    left: 0;
    border-width: 2px 0 0 2px;
}

.decoration-corner::after {
    top: 0;
    right: 0;
    border-width: 2px 2px 0 0;
}

.decoration-corner.bottom::before {
    top: auto;
    bottom: 0;
    border-width: 0 0 2px 2px;
}

.decoration-corner.bottom::after {
    top: auto;
    bottom: 0;
    border-width: 0 2px 2px 0;
}

/* 标题样式 */
.ancient-title {
    font-family: 'Ma Shan Zheng', cursive;
    color: var(--ancient-dark);
    position: relative;
    padding: 10px 0;
    text-align: center;
}

.ancient-title::before,
.ancient-title::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 30px;
    height: 2px;
    background: var(--ancient-gold);
}

.ancient-title::before {
    left: 20%;
}

.ancient-title::after {
    right: 20%;
}

/* 导航栏样式 */
.navbar {
    background: linear-gradient(to right, var(--ancient-dark), var(--ancient-main));
    border-bottom: 2px solid var(--ancient-gold);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.navbar-brand {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.8rem;
    color: var(--ancient-accent) !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.nav-link {
    color: var(--ancient-accent) !important;
    position: relative;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--ancient-gold) !important;
}

.nav-link::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--ancient-gold);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

/* 卡片样式 */
.card {
    background-color: var(--ancient-paper);
    border: 1px solid var(--ancient-border);
    border-radius: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--ancient-gold), transparent);
}

.card-header {
    background-color: rgba(141, 110, 99, 0.1);
    border-bottom: 1px solid var(--ancient-border);
    font-weight: 500;
    color: var(--ancient-dark);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* 按钮样式 */
.btn-primary {
    background-color: var(--ancient-main);
    border-color: var(--ancient-secondary);
    border-radius: 0;
}

.btn-primary:hover {
    background-color: var(--ancient-dark);
    border-color: var(--ancient-dark);
}

.btn-outline-primary {
    color: var(--ancient-main);
    border-color: var(--ancient-main);
}

.btn-outline-primary:hover {
    background-color: var(--ancient-main);
    border-color: var(--ancient-main);
}

/* 表单样式 */
.form-control {
    border: 1px solid var(--ancient-border);
    border-radius: 0;
    background-color: var(--ancient-paper);
}

.form-control:focus {
    border-color: var(--ancient-secondary);
    box-shadow: 0 0 0 0.2rem rgba(141, 110, 99, 0.25);
}

/* 页脚样式 */
footer {
    background: linear-gradient(to right, var(--ancient-dark), var(--ancient-main));
    border-top: 2px solid var(--ancient-gold);
    color: var(--ancient-accent);
    position: relative;
}

footer a {
    color: var(--ancient-accent);
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--ancient-gold);
    text-decoration: none;
}

/* 古风横幅 */
.hero-section {
    background: linear-gradient(rgba(94, 64, 55, 0.8), rgba(94, 64, 55, 0.9)), 
                url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23D7CCC8' fill-opacity='0.2' fill-rule='evenodd'/%3E%3C/svg%3E");
    background-size: cover;
    padding: 80px 0;
    margin-bottom: 30px;
    border-bottom: 3px solid var(--ancient-gold);
    position: relative;
}

.hero-title {
    font-family: 'Ma Shan Zheng', cursive;
    color: var(--ancient-accent);
    font-size: 3rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
}

.hero-subtitle {
    color: var(--ancient-accent);
    font-size: 1.3rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    margin-bottom: 30px;
}

.hero-btn {
    border-radius: 0;
    font-weight: 500;
    padding: 10px 25px;
    margin: 5px;
    border: 1px solid var(--ancient-gold);
    transition: all 0.3s ease;
}

.btn-light {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--ancient-accent) !important;
}

.btn-light:hover {
    background-color: rgba(255, 215, 0, 0.2);
    transform: translateY(-3px);
}

.btn-outline-light:hover {
    background-color: rgba(255, 215, 0, 0.2);
    transform: translateY(-3px);
}

/* 统计信息区域 */
.stats-section {
    background-color: var(--ancient-paper);
    padding: 30px 0;
    margin-bottom: 30px;
    border-radius: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-top: 2px solid var(--ancient-gold);
    border-bottom: 2px solid var(--ancient-gold);
}

.stat-item {
    text-align: center;
    padding: 15px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--ancient-main);
    font-family: 'Ma Shan Zheng', cursive;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--ancient-text);
}

/* 文章内容样式 */
.article-content {
    line-height: 1.8;
    font-size: 1.1rem;
}

.article-content p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    font-family: 'Ma Shan Zheng', cursive;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: var(--ancient-dark);
    position: relative;
    padding-left: 15px;
}

.article-content h1::before,
.article-content h2::before {
    content: "「";
    color: var(--ancient-gold);
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: 0;
}

.article-content h1::after,
.article-content h2::after {
    content: "」";
    color: var(--ancient-gold);
    font-size: 1.5rem;
}

.article-content blockquote {
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--ancient-gold);
    background-color: rgba(215, 204, 200, 0.2);
    font-style: italic;
}

.article-content code {
    background-color: rgba(141, 110, 99, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 0;
    color: var(--ancient-dark);
    font-size: 0.9rem;
}

.article-content pre {
    padding: 1rem;
    margin-bottom: 1.5rem;
    background-color: var(--ancient-dark);
    border-radius: 0;
    overflow-x: auto;
    color: var(--ancient-accent);
}

.article-content img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--ancient-border);
    margin: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 分页样式 */
.pagination .page-link {
    color: var(--ancient-main);
    background-color: var(--ancient-paper);
    border: 1px solid var(--ancient-border);
}

.pagination .page-item.active .page-link {
    background-color: var(--ancient-main);
    border-color: var(--ancient-main);
}

.pagination .page-link:hover {
    background-color: var(--ancient-secondary);
    color: var(--ancient-accent);
}

/* 古风装饰元素 */
.paper-texture {
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%238D6E63' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .ancient-title::before,
    .ancient-title::after {
        width: 20px;
    }
    
    .ancient-title::before {
        left: 10%;
    }
    
    .ancient-title::after {
        right: 10%;
    }
}