
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Lato', sans-serif; /* 正文字体 */
    background: linear-gradient(135deg, #C1E1C1 70%, #A57164 25%, #8E24AA 5%);
    color: #333333;
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(193, 225, 193, 0.9);
    padding: 15px 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar a {
    margin: 0 15px;
    text-decoration: none;
    color: #A57164;
    font-weight: bold;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #00BFFF;
}

/* 侧边导航样式 */
.sidebar {
    position: fixed;
    left: 20px;
    top: 100px;
    display: flex;
    flex-direction: column;
}

.sidebar a {
    margin: 10px 0;
    text-decoration: none;
    color: #87CEEB;
    transition: color 0.3s ease;
}

.sidebar a:hover {
    color: #8E24AA;
}

/* 主要内容容器 */
.container {
    max-width: 1200px;
    margin: 100px auto 50px auto;
    padding: 20px;
}

/* 章节导航 */
.chapter-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.chapter-nav a {
    background-color: #FFFFFF;
    padding: 10px 15px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-decoration: none;
    color: #A57164;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.chapter-nav a:hover {
    transform: translateY(-5px);
    background-color: #F0F8FF;
}

/* 文章内容样式 */
article {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

article h2, article h3, article h4 {
    font-family: 'Pacifico', cursive; /* 标题字体 */
    color: #8E24AA;
}

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

article code {
    font-family: 'Courier New', Courier, monospace;
    color: #C71585;
}

/* 图片样式 */
img {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

/* 按钮样式 */
.btn {
    background-color: #A57164;
    color: #FFFFFF;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    transition: background 0.5s ease, transform 0.3s ease;
    cursor: pointer;
    font-size: 16px;
}

.btn:hover {
    background: linear-gradient(45deg, #C1E1C1, #87CEEB);
    transform: translateY(-3px);
}

/* 背景效果 */
.background {
    position: relative;
    background-image: url('https://images.gptkong.com/demo/sample1.png');
    background-size: cover;
    background-position: center;
    #height: 100vh;
    overflow: hidden;
}

.background222::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3);
    #backdrop-filter: blur(5px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .sidebar {
        display: none;
    }

    .chapter-nav {
        flex-direction: column;
    }

    img {
        max-width: 100%;
    }
}

@media (min-width: 769px) and (max-width: 1200px) {
    .card {
        width: 45%;
    }
}

@media (min-width: 1201px) {
    .card {
        width: 30%;
    }
}

/* 代码示例块样式 */
.code-example {
    background-color: #F0F8FF;
    padding: 20px;
    border-left: 5px solid #8E24AA;
    border-radius: 5px;
    margin: 20px 0;
}

.code-example code {
    display: block;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #2E8B57;
    font-family: 'Courier New', Courier, monospace;
}

/* 装饰元素 */
.decorative {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 30px;
}

.decorative img {
    width: 150px;
    height: 150px;
}

