
/* 全局样式设置 */
/* 定义颜色变量 */
:root {
    --main-color: #032B44; /* 主色调，深蓝色 */
    --accent-color: #32CD32; /* 辅助色，亮绿色 */
    --background-color: #F5F5F5; /* 背景色，浅灰色 */
    --text-color: #333333; /* 文字颜色，深灰色 */
    --border-color: #E0E0E0; /* 边框颜色，浅灰色 */
    --highlight-color: #FFA500; /* 点缀色，橙色 */
}

/* 重置部分元素的默认样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 设置全局字体和背景 */
body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; /* 无衬线字体，现代感 */
    background-color: var(--background-color); /* 使用背景色变量 */
    color: var(--text-color); /* 使用文字颜色变量 */
    line-height: 1.6;
    padding-top: 60px; /* 为固定导航栏预留空间 */
}

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

/* 导航栏品牌标志 */
.navbar .brand {
    font-size: 1.5em;
    color: var(--main-color);
    text-decoration: none;
    font-weight: bold;
}

/* 导航栏菜单项 */
.navbar .nav-menu a {
    color: var(--main-color);
    text-decoration: none;
    margin-left: 20px;
    position: relative;
}

/* 导航栏菜单项悬停效果 */
.navbar .nav-menu a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 2px;
    background-color: var(--highlight-color);
    transition: width 0.3s ease;
}

.navbar .nav-menu a:hover::after {
    width: 100%;
}

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

/* 文章区域 */
article {
    grid-column: 1 / -1;
    background-color: #FFFFFF;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* 文章标题样式 */
article h2 {
    font-size: 2em;
    color: var(--main-color);
    margin-bottom: 20px;
}

/* 文章副标题样式 */
article h3 {
    font-size: 1.5em;
    color: var(--main-color);
    margin-top: 30px;
    margin-bottom: 10px;
}

/* 段落样式 */
article p {
    font-size: 1em;
    color: var(--text-color);
    margin-bottom: 20px;
    line-height: 1.8;
}

/* 代码块样式 */
article pre {
    background-color: #F0F0F0;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    margin-bottom: 20px;
}

/* 代码样式 */
article code {
    font-family: 'Courier New', Courier, monospace;
    background-color: #EFEFEF;
    padding: 2px 4px;
    border-radius: 4px;
    color: var(--main-color);
}

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

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

/* 响应式布局调整 */
@media (max-width: 1200px) {
    .container {
        grid-template-columns: repeat(8, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: repeat(4, 1fr);
        padding: 20px;
    }

    .navbar .nav-menu {
        display: none; /* 隐藏菜单，待移动端优化 */
    }

    .navbar .hamburger {
        display: block;
        cursor: pointer;
    }

    .navbar .nav-menu.active {
        display: block;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: #FFFFFF;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        flex-direction: column;
        align-items: center;
    }

    .navbar .nav-menu a {
        margin: 10px 0;
    }
}

/* 强调提示语样式 */
.highlight {
    font-size: 1.2em;
    color: var(--highlight-color);
    text-align: center;
    margin: 30px 0;
}

/* 按钮样式 */
.button {
    background: linear-gradient(45deg, var(--main-color), #005bb5);
    border: none;
    color: white;
    padding: 15px 30px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    border-radius: 4px;
    transition: background 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

.button:hover {
    background: linear-gradient(45deg, #005bb5, var(--main-color));
    transform: scale(1.05);
}

/* 浮动按钮样式 */
.chat-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--highlight-color);
    color: #FFFFFF;
    border: none;
    padding: 15px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* 代码片段样式 */
.code-block {
    background-color: #F0F0F0;
    padding: 20px;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.code-block code {
    font-family: 'Courier New', Courier, monospace;
    color: var(--main-color);
}

/* 用户评价模块样式 */
.testimonials {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 40px 20px;
    background-color: #F5F5F5;
}

.testimonial {
    flex: 1 1 30%;
    margin: 10px;
    padding: 20px;
    background-color: #FFFFFF;
    border-left: 4px solid var(--highlight-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial:hover {
    transform: translateY(-10px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.testimonial-content {
    font-size: 1em;
    color: #555555;
}

.testimonial-author {
    margin-top: 15px;
    font-weight: bold;
    color: var(--main-color);
}

/* 过渡效果的互动元素 */
.interactive-element {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.interactive-element.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 图标样式 */
.icon {
    width: 24px;
    height: 24px;
    fill: var(--main-color);
    transition: fill 0.3s ease;
    cursor: pointer;
}

.icon:hover {
    fill: var(--highlight-color);
}

/* 轮播图样式 */
.carousel {
    overflow: hidden;
    position: relative;
    height: 200px;
}

.carousel-inner {
    display: flex;
    width: 300%;
    animation: slide 15s infinite;
}

.carousel-item {
    flex: 1 0 100%;
    padding: 20px;
    box-sizing: border-box;
}

@keyframes slide {
    0% { transform: translateX(0); }
    33% { transform: translateX(-100%); }
    66% { transform: translateX(-200%); }
    100% { transform: translateX(0); }
}

/* 信息层次与留白 */
.section {
    padding: 60px 20px;
    margin: 20px 0;
    background-color: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

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