
/* 全局样式设置，包括字体、背景色和文字颜色 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    color: #0C2D48; /* 主色调深蓝色 */
    background: linear-gradient(135deg, #0C2D48 70%, #34C759 25%, #FFA500 5%); /* 渐变背景，符合黄金比例 */
    overflow-x: hidden; /* 防止水平滚动条出现 */
}

/* 导航栏样式，固定在页面顶部 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(12, 45, 72, 0.9); /* 半透明深蓝色背景 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 品牌Logo样式 */
.navbar .logo {
    font-size: 1.8em;
    color: #FFFFFF;
    text-decoration: none;
    font-weight: bold;
}

/* 导航链接容器 */
.navbar .nav-links {
    display: flex;
    gap: 20px;
}

/* 导航链接样式 */
.navbar .nav-links a {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 1em;
    transition: color 0.3s ease;
}

.navbar .nav-links a:hover {
    color: #FFA500; /* 点缀色橙色 */
}

/* 主视觉横幅样式 */
.hero {
    height: 100vh;
    background: linear-gradient(135deg, #0C2D48, #4A90E2);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding-top: 60px; /* 避免导航栏遮挡内容 */
}

/* 横幅文字样式 */
.hero h1 {
    color: #FFFFFF;
    font-size: 3em;
    text-align: center;
    animation: fadeIn 2s ease-in-out;
}

/* 渐入动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 章节导航样式 */
.section-nav {
    position: fixed;
    top: 80px;
    left: 20px;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.section-nav a {
    display: block;
    margin: 5px 0;
    color: #0C2D48;
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s ease;
}

.section-nav a:hover {
    color: #FFA500;
}

/* 文章内容区域样式 */
article {
    padding: 80px 20px 40px 20px; /* 上方留出导航栏空间 */
    max-width: 1200px;
    margin: auto;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 文章标题样式 */
article h2 {
    font-size: 2em;
    color: #0C2D48;
    margin-bottom: 20px;
    border-bottom: 2px solid #FFA500;
    padding-bottom: 10px;
}

/* 二级标题样式 */
article h3 {
    font-size: 1.5em;
    color: #34C759;
    margin-top: 30px;
    margin-bottom: 15px;
}

/* 正文段落样式 */
article p {
    line-height: 1.6;
    margin-bottom: 20px;
    color: #333333;
}

/* 强调文字样式 */
article p color {
    color: #FFA500;
    font-weight: bold;
}

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

article code {
    font-family: 'Source Code Pro', monospace;
    color: #0C2D48;
}

/* 图片样式，带圆角、阴影和悬停效果 */
.image-decor {
    width: 100%;
    max-width: 320px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 20px 0;
}

.image-decor:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

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

th, td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: center;
}

th {
    background-color: #0C2D48;
    color: #FFFFFF;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    background-color: #34C759;
    color: #FFFFFF;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    cursor: pointer;
}

.btn:hover {
    background-color: #FFA500;
    transform: scale(1.05);
}

.btn:active {
    transform: scale(0.95);
}

/* 回到顶部按钮样式 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #34C759;
    color: #FFFFFF;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: none; /* 默认隐藏 */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease, opacity 0.3s ease;
}

.back-to-top.show {
    display: flex;
    opacity: 1;
}

.back-to-top:hover {
    background-color: #FFA500;
}

/* 用户评价模块样式 */
.testimonials {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 40px 20px;
    background-color: #FFFFFF;
}

.testimonial {
    width: calc(33.333% - 20px);
    background-color: #f0f0f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.2);
}

.testimonial img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
}

.testimonial p {
    font-size: 1em;
    color: #333333;
}

/* 响应式设计，适配不同屏幕尺寸 */
@media (max-width: 1200px) {
    .testimonial {
        width: calc(50% - 20px);
    }
}

@media (max-width: 768px) {
    .navbar .nav-links {
        display: none;
        flex-direction: column;
        background-color: rgba(12, 45, 72, 0.9);
        position: absolute;
        top: 60px;
        right: 20px;
        width: 150px;
        border-radius: 8px;
    }

    .navbar .nav-links.show {
        display: flex;
    }

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

    .section-nav {
        top: 100px;
    }

    .testimonial {
        width: 100%;
    }
}

/* 汉堡菜单样式 */
.hamburger {
    width: 30px;
    height: 3px;
    background-color: #FFFFFF;
    position: relative;
    transition: all 0.3s ease;
    display: none; /* 默认隐藏 */
}

.hamburger::before,
.hamburger::after {
    content: '';
    width: 30px;
    height: 3px;
    background-color: #FFFFFF;
    position: absolute;
    left: 0;
    transition: all 0.3s ease;
}

.hamburger::before {
    top: -10px;
}

.hamburger::after {
    top: 10px;
}

.hamburger.active {
    background-color: transparent;
}

.hamburger.active::before {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active::after {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* 代码示例样式，与文章内容区分 */
.code-block {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.code-block code {
    font-family: 'Source Code Pro', monospace;
    color: #333333;
}

/* 页脚样式 */
footer {
    background-color: #0C2D48;
    color: #FFFFFF;
    text-align: center;
    padding: 20px;
    position: relative;
}

footer .contact-info {
    margin-bottom: 10px;
}

footer .back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #34C759;
    color: #FFFFFF;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease, opacity 0.3s ease;
}

footer .back-to-top.show {
    display: flex;
    opacity: 1;
}

footer .back-to-top:hover {
    background-color: #FFA500;
}

