
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Helvetica Neue', sans-serif; /* 使用现代无衬线字体 */
    background: linear-gradient(-45deg, #1E3A8A, #34C759, #FFAB40, #F5F5F5); /* 动态背景渐变 */
    background-size: 400% 400%;
    animation: gradientMove 15s ease infinite; /* 背景动画 */
    color: #333333;
    line-height: 1.6;
}

/* 渐变动画关键帧 */
@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 容器设置，使用网格布局 */
.container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 固定导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(30, 58, 138, 0.9); /* 半透明深蓝色 */
    color: #FFFFFF;
    padding: 15px 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: background-color 0.3s;
}

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

.navbar li {
    position: relative;
    margin: 0 20px;
}

.navbar a {
    color: #FFFFFF;
    text-decoration: none;
    padding: 5px 10px;
    transition: color 0.3s;
}

.navbar a:hover {
    color: #FFAB40; /* 点缀色橙色 */
}

.navbar li ul {
    display: none;
    position: absolute;
    top: 40px;
    left: 0;
    background-color: #F5F5F5;
    color: #1E3A8A;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.navbar li:hover ul {
    display: block;
}

.navbar li ul a {
    color: #1E3A8A;
}

.hero-section {
    grid-column: span 12;
    text-align: center;
    padding: 100px 20px 50px 20px; /* 顶部留出导航栏空间 */
    position: relative;
}

.hero-text {
    font-size: 3rem;
    font-weight: bold;
    color: #FFAB40;
    animation: fadeIn 2s ease-in-out;
}

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

/* 节点导航系统样式 */
.chapter-nav {
    position: fixed;
    top: 100px;
    right: 20px;
    background-color: rgba(30, 58, 138, 0.8);
    padding: 15px;
    border-radius: 8px;
    z-index: 999;
}

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

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

.chapter-nav a {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s;
}

.chapter-nav a:hover {
    color: #34C759; /* 点缀色绿色 */
}

/* 主要内容区域 */
.main-content {
    grid-column: span 9;
    padding: 20px;
}

.sidebar {
    grid-column: span 3;
    padding: 20px;
    background-color: rgba(245, 245, 245, 0.9);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 文章内容样式 */
article {
    margin-bottom: 60px;
}

article h2 {
    font-size: 2rem;
    color: #1E3A8A;
    margin-bottom: 20px;
    position: relative;
}

article h2::after {
    content: '';
    width: 50px;
    height: 4px;
    background-color: #FFAB40;
    position: absolute;
    bottom: -10px;
    left: 0;
}

article h3 {
    font-size: 1.5rem;
    color: #34C759;
    margin-top: 30px;
    margin-bottom: 15px;
}

article p {
    font-size: 1rem;
    color: #333333;
    margin-bottom: 15px;
}

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

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

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

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

/* 按钮样式 */
.button {
    background: linear-gradient(45deg, #1E3A8A, #34C759);
    border: none;
    border-radius: 25px;
    color: #FFFFFF;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    text-decoration: none;
    display: inline-block;
}

.button:hover {
    background: linear-gradient(45deg, #34C759, #1E3A8A);
    transform: translateY(-2px);
}

/* 智能客服按钮 */
.chatbot-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #34C759;
    color: #FFFFFF;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.chatbot-button:hover {
    background-color: #FFAB40;
    transform: scale(1.1);
}

.chatbot-icon {
    font-size: 24px;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

thead {
    background-color: #1E3A8A;
    color: #FFFFFF;
}

thead th {
    padding: 12px;
    text-align: left;
}

tbody tr {
    border-bottom: 1px solid #E0E0E0;
}

tbody tr:hover {
    background-color: #F5F5F5;
}

tbody td {
    padding: 12px;
}

/* 列表样式 */
ol, ul {
    margin: 20px 0;
    padding-left: 20px;
}

li {
    margin-bottom: 10px;
}

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

.collapsible:hover {
    background-color: #34C759;
}

.content {
    padding: 0 15px;
    display: none;
    overflow: hidden;
    background-color: #F5F5F5;
    border-radius: 5px;
    margin-bottom: 20px;
}

.content p {
    margin: 15px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        grid-template-columns: repeat(6, 1fr);
    }

    .sidebar {
        grid-column: span 6;
    }

    .main-content {
        grid-column: span 6;
    }

    .chapter-nav {
        top: 80px;
    }
}

@media (max-width: 480px) {
    .navbar ul {
        flex-direction: column;
        align-items: center;
    }

    .navbar li {
        margin: 10px 0;
    }

    .chapter-nav {
        display: none; /* 移动端隐藏章节导航 */
    }

    .hero-text {
        font-size: 2rem;
    }

    article h2 {
        font-size: 1.5rem;
    }

    article h3 {
        font-size: 1.2rem;
    }
}

/* 代码示例块样式 */
.code-sample {
    background-color: #2D2D2D;
    color: #CCCCCC;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    margin-bottom: 20px;
}

.code-sample code {
    color: #FFFFFF;
}

/* 留白与模块间隔 */
.section {
    margin: 40px 0;
    padding: 20px;
    background-color: rgba(245, 245, 245, 0.8);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.section + .section {
    margin-top: 60px;
}

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

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

::-webkit-scrollbar-thumb {
    background-color: #1E3A8A;
    border-radius: 6px;
    border: 3px solid #F5F5F5;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #34C759;
}

/* 表单样式 */
.form-input {
    width: 100%;
    padding: 10px 15px;
    margin: 10px 0;
    border: 1px solid #CCCCCC;
    border-radius: 5px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-input:focus {
    border-color: #34C759;
    box-shadow: 0 0 5px rgba(52, 199, 89, 0.5);
}

.form-label {
    display: block;
    margin-bottom: 5px;
    color: #1E3A8A;
    font-weight: bold;
}

/* 错误提示样式 */
.input-error {
    border-color: #FF4B4B;
    box-shadow: 0 0 5px rgba(255, 75, 75, 0.5);
}

.error-message {
    color: #FF4B4B;
    font-size: 0.9rem;
    margin-top: 5px;
}

/* 表单提交按钮 */
.submit-button {
    background: linear-gradient(45deg, #1E3A8A, #34C759);
    border: none;
    border-radius: 25px;
    color: #FFFFFF;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.submit-button:hover {
    background: linear-gradient(45deg, #34C759, #1E3A8A);
    transform: translateY(-2px);
}

/* 动画与过渡效果的协调 */
.transition-effect {
    transition: all 0.3s ease-in-out;
}

.transition-effect:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* 定制化字体 */
@font-face {
    font-family: 'CustomFont';
    src: url('fonts/CustomFont.woff2') format('woff2'),
         url('fonts/CustomFont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: 'CustomFont', sans-serif;
}

/* 功能性样式 */
.hidden {
    display: none;
}

/* 图片摆放样式 */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    grid-gap: 15px;
    margin: 20px 0;
}

/* 表单容器样式 */
.form-container {
    padding: 20px;
    background-color: rgba(245, 245, 245, 0.8);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

