
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    background-color: #FFFFFF; /* 纯白色背景 */
    font-family: 'Roboto', sans-serif; /* 使用Roboto无衬线字体 */
    color: #1E274F; /* 主色调 */
    line-height: 1.6;
    letter-spacing: 0.5px;
    font-size: 16px; /* 正文字号 */
}

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

.navbar a {
    color: #FFFFFF;
    text-decoration: none;
    margin: 0 15px;
    font-size: 16px;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #39FF14; /* 点缀色 */
}

/* 提示信息样式 */
.notice {
    text-align: center;
    padding: 60px 20px 20px 20px; /* 顶部留白以避开固定导航栏 */
    background-color: #F0F8FF;
    font-size: 18px;
    color: #1E274F;
    border-bottom: 2px solid #7B00FF; /* 辅色 */
}

/* 侧边栏样式 */
.sidebar {
    position: fixed;
    left: 0;
    top: 80px; /* 导航栏高度 */
    width: 200px;
    height: calc(100% - 80px);
    background-color: #1E274F; /* 主色 */
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.sidebar a {
    display: block;
    color: #B8B8C4; /* 辅色 */
    text-decoration: none;
    margin: 15px 0;
    font-size: 16px;
    transition: color 0.3s ease, background-color 0.3s ease;
    padding: 10px;
    border-radius: 5px;
}

.sidebar a:hover {
    color: #FFFFFF;
    background-color: #7B00FF; /* 辅色 */
}

/* 内容区样式 */
.content {
    margin-left: 220px; /* 侧边栏宽度 */
    padding: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        width: 150px;
    }
    .content {
        margin-left: 170px;
    }
}

@media (max-width: 480px) {
    .navbar, .sidebar, .content {
        padding: 10px;
    }
    .sidebar {
        display: none; /* 小屏幕隐藏侧边栏 */
    }
    .content {
        margin-left: 0;
    }
}

/* 图片样式 */
img.decorative {
    width: 100%;
    max-width: 320px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 20px 0;
}

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

/* 章节导航样式 */
.chapter-nav {
    position: sticky;
    top: 100px;
    padding: 20px;
    background-color: #F8F8F8;
    border: 1px solid #E0E0E0;
    border-radius: 5px;
    margin-bottom: 40px;
}

.chapter-nav h3 {
    font-size: 18px;
    color: #7B00FF;
    margin-bottom: 10px;
}

.chapter-nav ul {
    list-style: none;
    padding: 0;
}

.chapter-nav ul li {
    margin: 5px 0;
}

.chapter-nav ul li a {
    color: #1E274F;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

.chapter-nav ul li a:hover {
    color: #39FF14; /* 点缀色 */
}

/* 文章内容样式 */
article {
    max-width: 800px;
    margin: 0 auto;
}

article h2, article h3, article h4 {
    color: #7B00FF; /* 辅色 */
    margin: 30px 0 15px 0;
    font-size: 18px; /* 标题字号 */
}

article p {
    margin-bottom: 20px;
    font-size: 16px;
    color: #1E274F;
}

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

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

/* 动画效果 */
.fade-in {
    opacity: 0;
    animation: fadeIn 2s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.slide-up {
    transform: translateY(20px);
    opacity: 0;
    animation: slideUp 0.5s forwards;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 按钮样式 */
.button {
    background-color: #39FF14; /* 点缀色 */
    color: #1E274F;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    font-size: 16px;
}

.button:hover {
    background-color: #7B00FF; /* 辅色 */
    transform: scale(1.05);
}

/* 背景装饰 */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images.gptkong.com/demo/sample1.png');
    background-size: cover;
    background-position: center;
    filter: brightness(0.8) blur(3px);
    z-index: -1;
}

/* 页面过渡 */
html {
    scroll-behavior: smooth;
}

