
/* 全局样式设置 */
/* 导入Roboto字体 */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

/* 设置全局盒模型为border-box，方便布局 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* 设置body的字体、背景渐变色以及主色调 */
body {
    font-family: 'Roboto', sans-serif; /* 使用Roboto无衬线字体 */
    background: linear-gradient(135deg, #0B2447 70%, #3498DB 25%, #FFA500 5%);
    color: #333333; /* 主文字颜色 */
    line-height: 1.6;
    overflow-x: hidden; /* 防止出现水平滚动条 */
}

/* 固定顶部导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(11, 36, 71, 0.9); /* 半透明深蓝色背景 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* 阴影效果 */
}

/* 导航链接样式 */
.navbar a {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 16px;
    margin-left: 20px;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #FFA500; /* 橙色悬停 */
}

/* 主内容区域的容器，采用响应式网格布局 */
.container {
    display: grid;
    grid-template-columns: repeat(12, 1fr); /* 12列网格 */
    gap: 20px;
    padding: 100px 40px 40px 40px; /* 上部留出导航栏空间 */
}

/* 各个板块的样式，确保最小宽度不小于500px */
.section {
    grid-column: span 12;
    background-color: rgba(255, 255, 255, 0.8); /* 半透明白色背景 */
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section:hover {
    transform: translateY(-10px); /* 悬停时微微上移 */
    box-shadow: 0 10px 15px rgba(0,0,0,0.2);
}

/* 标题样式 */
.section h2, .section h3, .section h4 {
    color: #0B2447;
    margin-bottom: 20px;
}

.section h2 {
    font-size: 32px;
}

.section h3 {
    font-size: 24px;
}

.section h4 {
    font-size: 20px;
}

/* 正文段落样式 */
.section p {
    font-size: 16px;
    margin-bottom: 20px;
    color: #333333;
}

/* 图片样式，圆角、阴影与悬浮效果 */
.section img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section img:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 15px rgba(0,0,0,0.2);
}

/* 按钮样式，渐变与缩放动效 */
.button {
    background: linear-gradient(45deg, #3498DB, #0B2447);
    border: none;
    color: #FFFFFF;
    padding: 15px 30px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    border-radius: 25px;
    transition: background 0.5s ease, transform 0.3s ease;
    cursor: pointer;
}

.button:hover {
    background: linear-gradient(45deg, #FFA500, #3498DB);
    transform: scale(1.05);
}

/* 响应式设计：调整不同屏幕下的网格布局 */
@media (max-width: 1200px) {
    .section {
        grid-column: span 12;
    }
}

@media (max-width: 768px) {
    .section {
        grid-column: span 12;
        padding: 20px;
    }
}

/* 代码块样式，区分正文 */
pre {
    background-color: #F5F5F5;
    padding: 20px;
    border-radius: 10px;
    overflow: auto;
    position: relative;
    margin-bottom: 20px;
}

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

/* 添加代码块标题 */
pre code::before {
    content: '代码示例';
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
}

/* 客服按钮样式 */
.chatbot {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #FFA500;
    color: #FFFFFF;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 165, 0, 0.7);
    }
    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 20px rgba(255, 165, 0, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 165, 0, 0);
    }
}

