
/* 全局样式设置，包括字体、背景色及排版 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Lato', sans-serif; /* 正文字体 */
    background: linear-gradient(135deg, #C6E2B5, #D2B48C, #F5F5DC); /* 背景渐变 */
    color: #333333;
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(198, 226, 181, 0.9); /* 半透明背景 */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.navbar.scrolled {
    background-color: rgba(198, 226, 181, 1); /* 滚动后背景不透明 */
}

.navbar ul {
    list-style: none;
    display: flex;
    justify-content: center;
    padding: 10px 0;
    margin: 0;
}

.navbar li {
    margin: 0 15px;
}

.navbar a {
    text-decoration: none;
    color: #2E7D32; /* 导航文字颜色 */
    font-weight: bold;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #03A9F4; /* 悬停颜色变化 */
}

/* 主内容区域的样式 */
.container {
    max-width: 1200px;
    margin: 100px auto 50px auto; /* 顶部留出导航栏空间 */
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* 卡片模块的样式 */
.card {
    background-color: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

/* 图片样式，添加圆角和阴影 */
.card img {
    width: 100%;
    height: auto;
    border-bottom: 1px solid #ddd;
    transition: transform 0.3s ease;
}

.card img:hover {
    transform: scale(1.05);
}

/* 文章内容的样式 */
article {
    grid-column: span 2;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

article h2, article h3 {
    font-family: 'Roboto', sans-serif; /* 标题字体 */
    color: #2E7D32;
}

article h2 {
    font-size: 2em;
    margin-bottom: 0.5em;
}

article h3 {
    font-size: 1.5em;
    margin-top: 1.5em;
}

article pre {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 20px 0;
}

article code {
    font-family: 'Courier New', Courier, monospace;
    color: #D32F2F; /* 代码颜色 */
}

/* 导航链接的样式 */
.nav-links {
    margin: 20px 0;
}

.nav-links a {
    display: block;
    color: #03A9F4;
    text-decoration: none;
    margin: 5px 0;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #0288D1;
}

/* 提示信息样式 */
.notice {
    text-align: center;
    font-size: 1.2em;
    color: #C62828;
    margin-bottom: 20px;
}

/* 底部样式 */
footer {
    background-color: rgba(198, 226, 181, 0.9);
    text-align: center;
    padding: 20px 0;
    position: fixed;
    width: 100%;
    bottom: 0;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
}

/* 响应式设计：手机端样式 */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
    }
    .navbar ul {
        flex-direction: column;
        align-items: center;
    }
    footer {
        position: static;
    }
}

