
/* 全局样式设置 */
/* 使用黄金比例布局，主色70%，辅色25%，点缀色5% */
/* 引入字体 */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans&family=Playfair+Display&display=swap');

body {
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', sans-serif; /* 正文字体 */
    background: linear-gradient(135deg, #D4A373 70%, #C2B097 25%, #F2CC8F 5%); /* 背景渐变色 */
    color: #6B705C; /* 文字主色 */
}

/* 导航栏样式 */
.navbar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: rgba(59, 105, 120, 0.9); /* 导航栏背景色 */
    position: fixed;
    width: 100%;
    top: 0;
    padding: 20px 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* 导航栏阴影 */
}

.navbar a {
    color: #F2CC8F; /* 导航链接颜色 */
    text-decoration: none;
    font-size: 18px; /* 导航链接字体大小 */
    transition: color 0.3s;
}

.navbar a:hover {
    color: #D4A373; /* 悬停时导航链接颜色 */
}

/* 侧边导航栏样式 */
.sidebar {
    position: fixed;
    top: 100px;
    right: 20px;
    width: 200px;
    background-color: rgba(198, 208, 197, 0.8); /* 侧边导航背景色 */
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* 侧边导航阴影 */
}

.sidebar a {
    display: block;
    margin-bottom: 15px;
    color: #6B705C; /* 侧边导航链接颜色 */
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
}

.sidebar a:hover {
    color: #F2CC8F; /* 悬停时侧边导航链接颜色 */
}

/* 容器样式 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    padding: 140px 20px 20px 20px; /* 上方留出导航栏空间 */
}

/* 提示信息样式 */
.notice {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 24px;
    color: #3B6978;
    margin: 40px 0;
    animation: fadeIn 2s ease-in-out;
}

/* 文章样式 */
article {
    background-color: #FFFFFF;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* 文章阴影 */
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

article:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

article img {
    width: 100%;
    height: auto;
    border-bottom: 2px solid #C2B097; /* 图片下边框 */
}

article .content {
    padding: 20px;
}

article h2 {
    font-family: 'Playfair Display', serif; /* 标题字体 */
    color: #3B6978;
    font-size: 22px;
    margin-bottom: 15px;
}

article p {
    font-size: 16px;
    line-height: 1.6;
    color: #6B705C;
    margin-bottom: 15px;
}

/* 按钮样式 */
.button {
    background-color: #F2CC8F;
    color: #3B6978;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    font-size: 16px;
}

.button:hover {
    background-color: #3B6978;
    color: #F2CC8F;
}

/* 加载动画样式 */
.loader {
    border: 8px solid #C2B097;
    border-top: 8px solid #6B705C;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 2s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 渐变背景样式示例 */
.background-gradient {
    background: linear-gradient(135deg, #D4A373 25%, #C2B097 50%, #6B705C 75%);
    height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 字体样式设置 */
body {
    font-family: 'Open Sans', sans-serif;
}

h2, h3, h4 {
    font-family: 'Playfair Display', serif;
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
    }

    .sidebar {
        position: static;
        width: 100%;
        margin-top: 20px;
    }

    .container {
        grid-template-columns: 1fr;
    }
}

/* 图片装饰样式 */
.decorative-img {
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.decorative-img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 12px rgba(0,0,0,0.2);
}

/* 过渡效果 */
a, .button {
    transition: all 0.3s ease;
}

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