/* 古风样式设计 */

/* 古风配色 - 青竹淡翠主题 */
:root {
  --ancient-main: #5B7C7D; /* 主色 - 青竹色 */
  --ancient-secondary: #86A3A4; /* 辅助色 - 淡青色 */
  --ancient-accent: #F0F5F5; /* 点缀色 - 米白色 */
  --ancient-light: #F7F9F9; /* 背景色 - 浅灰绿 */
  --ancient-dark: #3A4F50; /* 深色 - 深青色 */
  --ancient-text: #3A4F50; /* 文字色 - 深青色 */
  --ancient-paper: #F2F7F7; /* 纸张色 - 仿古纸 */
  --ancient-border: #D0DCDC; /* 边框色 - 浅灰绿 */
  --ancient-gold: #B8A878; /* 金色 - 装饰用，如古铜 */
  --ancient-sepia: #8A8060; /* 深褐色 - 增强古风感 */
  --ancient-overlay: rgba(91, 124, 125, 0.85); /* 覆盖层 */
}

/* 字体 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;700&family=Ma+Shan+Zheng&display=swap');
@import url('https://cdn.jsdelivr.net/npm/@fontsource/zhi-mang-xing@5.0.9/index.css');
@import url('https://cdn.jsdelivr.net/npm/@fontsource/long-cang@5.0.9/index.css');

/* 纹理叠加效果 */
.paper-texture {
  position: relative;
  background-image: 
    linear-gradient(rgba(240, 245, 245, 0.3), rgba(240, 245, 245, 0.3)),
    url("../images/backgrounds/home_bg.webp");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-blend-mode: multiply;
  /* 背景图片缓存设置 */
  background-repeat: no-repeat;
}

.paper-texture::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 10% 20%, rgba(184, 168, 120, 0.1) 0%, transparent 25%),
    radial-gradient(circle at 90% 80%, rgba(184, 168, 120, 0.1) 0%, transparent 25%);
  pointer-events: none;
}

/* 全局样式 */
body {
    font-family: 'Long Cang', 'Zhi Mang Xing', 'Ma Shan Zheng', 'STXingkai', 'KaiTi', cursive, serif;
    background-color: var(--ancient-light);
    background-image: 
      linear-gradient(135deg, rgba(91, 124, 125, 0.1) 0%, rgba(58, 79, 80, 0.1) 100%),
      url("../images/backgrounds/home_bg.webp");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-blend-mode: multiply;
    color: var(--ancient-text);
    line-height: 1.8;
    position: relative;
    overflow-x: hidden;
    /* 背景图片缓存设置 */
    background-repeat: no-repeat;
}

/* 相册页面背景 */
.album-background {
  background-image: url("../images/backgrounds/album_bg.webp");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  /* 背景图片缓存设置 */
  background-repeat: no-repeat;
}

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

.decoration-corner::before,
.decoration-corner::after {
    content: "";
    position: absolute;
    width: 25px;
    height: 25px;
    border-color: var(--ancient-gold);
    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: 'Long Cang', 'Zhi Mang Xing', 'Ma Shan Zheng', cursive, serif;
    color: var(--ancient-dark);
    position: relative;
    padding: 15px 0;
    text-align: center;
    font-size: 2rem;
    letter-spacing: 2px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

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

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

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

/* 导航栏样式 */
.navbar {
    background: linear-gradient(to right, var(--ancient-dark), var(--ancient-main), var(--ancient-dark));
    border-bottom: 2px solid var(--ancient-gold);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    padding: 1rem 0;
    position: relative;
    z-index: 100;
}

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

.nav-link {
    font-family: 'STXingkai', 'KaiTi', serif;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: relative;
    color: var(--ancient-accent) !important;
}

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

.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%;
}

/* 标签页导航样式 */
.nav-tabs .nav-link {
    color: var(--ancient-secondary) !important;
    background-color: transparent;
    border: 1px solid transparent;
    border-bottom: 2px solid var(--ancient-border);
    font-family: 'STXingkai', 'KaiTi', serif;
    transition: all 0.3s ease;
}

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

.nav-tabs .nav-link.active {
    color: var(--ancient-dark) !important;
    background-color: rgba(255, 255, 255, 0.7);
    border-color: var(--ancient-border) var(--ancient-border) var(--ancient-gold);
    border-bottom: 2px solid var(--ancient-gold);
    font-weight: 600;
}

/* 卡片样式增强 */
.card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--ancient-border);
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(5px);
}

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

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: rgba(247, 249, 249, 0.8);
    border-bottom: 1px solid var(--ancient-border);
    font-weight: 600;
    font-family: 'STXingkai', 'KaiTi', serif;
    color: var(--ancient-dark);
}

.card-title {
    font-family: 'Long Cang', 'Ma Shan Zheng', cursive, serif;
    color: var(--ancient-dark);
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.card-title a {
    color: var(--ancient-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.card-title a:hover {
    color: var(--ancient-secondary);
}

.card-text {
    color: var(--ancient-text);
}

/* 按钮样式增强 */
.btn {
    border-radius: 30px;
    padding: 8px 20px;
    font-family: 'STXingkai', 'KaiTi', serif;
    font-weight: 500;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(to right, var(--ancient-main), var(--ancient-secondary));
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(to right, var(--ancient-dark), var(--ancient-main));
}

.btn-outline-secondary {
    border: 1px solid var(--ancient-border);
    color: var(--ancient-text);
}

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

/* 首页横幅增强 */
.hero-section {
    background: linear-gradient(135deg, var(--ancient-overlay) 0%, var(--ancient-overlay) 100%), 
                url("../images/backgrounds/home_bg.webp");
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
    padding: 4rem 0;
    margin-bottom: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(3px);
    border: 1px solid var(--ancient-gold);
}

.hero-section::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(184, 168, 120, 0.2) 0%, rgba(184, 168, 120, 0) 70%);
    animation: rotate 20s linear infinite;
    z-index: 0;
}

.hero-title {
    font-family: 'Long Cang', 'Ma Shan Zheng', cursive, serif;
    font-size: 3.5rem;
    color: var(--ancient-accent);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    letter-spacing: 3px;
    animation: fadeInDown 1s ease;
}

.hero-subtitle {
    font-family: 'STXingkai', 'KaiTi', serif;
    font-size: 1.5rem;
    color: var(--ancient-accent);
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease 0.3s both;
}

.hero-btn {
    position: relative;
    z-index: 1;
    margin: 0 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 1s ease 0.6s both;
}

/* 统计信息样式 */
.stats-section {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    padding: 2rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--ancient-border);
    backdrop-filter: blur(5px);
}

.stat-item {
    text-align: center;
    padding: 1rem;
    animation: fadeIn 0.5s ease;
}

.stat-number {
    font-family: 'Long Cang', 'Ma Shan Zheng', cursive, serif;
    font-size: 2.5rem;
    color: var(--ancient-main);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-family: 'STXingkai', 'KaiTi', serif;
    font-size: 1.1rem;
    color: var(--ancient-text);
}

/* 装饰性分隔线 */
.decorative-divider {
    height: 2px;
    background: linear-gradient(to right, transparent, var(--ancient-gold), transparent);
    margin: 2rem 0;
    position: relative;
}

.decorative-divider::before {
    content: "✦";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--ancient-light);
    padding: 0 15px;
    color: var(--ancient-gold);
    font-size: 1.2rem;
}

/* 页脚增强 */
footer {
    background: linear-gradient(to right, var(--ancient-dark), var(--ancient-main));
    color: var(--ancient-accent);
    border-top: 2px solid var(--ancient-gold);
    margin-top: 2rem;
    position: relative;
    z-index: 10;
}

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

footer a:hover {
    color: #fff;
    text-decoration: none;
}

footer .ancient-title {
    color: var(--ancient-accent);
    font-size: 1.5rem;
}

.text-muted {
    color: var(--ancient-secondary) !important;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .ancient-title {
        font-size: 1.7rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .paper-texture,
    body {
        background-attachment: scroll;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 淡入淡出效果 */
.animate__animated.animate__fadeIn {
    animation-duration: 1s;
}

.animate__animated.animate__fadeInUp {
    animation-duration: 1s;
}