
/* 整体页面设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用无衬线字体，提升可读性 */
    color: #6C757D; /* 主要文字颜色，保持专业感 */
    background: linear-gradient(135deg, #007BFF 70%, #6C757D 25%, #FD7E14 5%); /* 渐变背景，符合色彩搭配要求 */
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    position: fixed; /* 固定在顶部 */
    top: 0;
    width: 100%;
    background: #007BFF; /* 主色调蓝色 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* 轻微阴影，增加层次感 */
    z-index: 1000;
}

/* 导航菜单列表 */
.navbar .menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* 导航菜单项 */
.navbar .menu li {
    margin: 0 15px;
}

/* 导航链接 */
.navbar .menu li a {
    color: #fff; /* 白色字体 */
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s; /* 平滑过渡效果 */
}

.navbar .menu li a:hover {
    color: #FD7E14; /* 点缀色橙色，吸引视觉 */
}

/* 移动设备导航菜单适配 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .navbar .menu {
        flex-direction: column;
        width: 100%;
    }
    .navbar .menu li {
        margin: 10px 0;
    }
}

/* 主要内容区域 */
.container {
    display: flex;
    flex-direction: column;
    padding: 100px 30px 30px 30px; /* 顶部留出导航栏空间 */
    max-width: 1200px;
    margin: 0 auto;
}

/* 章节标题样式 */
.container h2 {
    font-size: 24px;
    color: #007BFF;
    margin-bottom: 20px;
    position: relative;
}

.container h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: #FD7E14;
    margin-top: 10px;
    border-radius: 2px;
}

/* 文章段落样式 */
.container p {
    font-size: 16px;
    margin-bottom: 20px;
}

/* 代码块样式 */
.container pre {
    background: #f4f4f4;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.container code {
    font-family: 'Courier New', Courier, monospace;
    color: #d63384;
}

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

.container img:hover {
    transform: scale(1.05); /* 放大效果 */
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* 折叠区域样式 */
.collapsible {
    background-color: #f1f1f1;
    color: #007BFF;
    cursor: pointer;
    padding: 10px 15px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 16px;
    transition: background-color 0.3s;
    border-radius: 5px;
    margin-bottom: 10px;
}

.active, .collapsible:hover {
    background-color: #e2e6ea;
}

.content {
    padding: 0 15px;
    display: none;
    overflow: hidden;
    background-color: #fafafa;
    border-left: 3px solid #007BFF;
    margin-bottom: 20px;
    border-radius: 0 5px 5px 0;
}

/* 提示文本样式 */
.reference-text {
    background: #28A745;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    text-align: center;
    font-size: 18px;
    margin: 30px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 响应式布局 */
@media (max-width: 768px) {
    .container {
        padding: 80px 20px 20px 20px;
    }
    .navbar {
        padding: 10px 20px;
    }
    .navbar .menu li a {
        font-size: 14px;
    }
}

/* 过渡动画 */
.fade-in {
    animation: fadeIn 1s ease-in-out;
}

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

/* 导航链接滚动效果 */
html {
    scroll-behavior: smooth; /* 平滑滚动 */
}

/* 代码示例块美化 */
.code-example {
    background: #2d2d2d;
    color: #ccc;
    padding: 20px;
    border-radius: 5px;
    font-family: 'Courier New', Courier, monospace;
    overflow-x: auto;
    margin-bottom: 20px;
}

.code-example code {
    color: #f8f8f2;
}

/* 导航高亮 */
.navbar .menu li a.active {
    border-bottom: 2px solid #FD7E14; /* 当前章节高亮 */
}

/* 图片网格布局 */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.image-grid img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* 按钮样式 */
.btn {
    background-color: #007BFF;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 16px;
}

.btn:hover {
    background-color: #0056b3;
}

/* 页脚样式 */
.footer {
    background-color: #343a40;
    color: #fff;
    padding: 20px 30px;
    text-align: center;
}

.footer a {
    color: #FD7E14;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s;
}

.footer a:hover {
    color: #fff;
}

/* 定制滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #007BFF;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* 表单样式 */
.contact-form {
    display: flex;
    flex-direction: column;
    max-width: 500px;
    margin: 0 auto;
}

.contact-form input,
.contact-form textarea {
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

.contact-form button {
    padding: 10px;
    background: #28A745;
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 16px;
}

.contact-form button:hover {
    background: #218838;
}

/* 多语言切换按钮 */
.language-switcher {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.language-switcher button {
    background: none;
    border: 1px solid #ddd;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
    font-size: 14px;
}

.language-switcher button:hover {
    background: #6C757D;
    color: #fff;
}

