
/* 全局样式设置，包括字体、背景色和基本布局 */
/* 设置页面背景为线性渐变，融合自然与科技色彩 */
body {
    background: linear-gradient(135deg, #5E8B7E, #D2B48C);
    color: #032B44;
    font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background 0.5s ease, color 0.5s ease;
}

/* 固定导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(94, 139, 126, 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);
}

/* 导航栏链接样式，添加悬停效果 */
.navbar a {
    color: #FFFFFF;
    text-decoration: none;
    margin: 0 20px;
    font-size: 16px;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #34C759;
}

/* 主要内容容器，使用CSS Grid布局 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 40px;
    padding: 100px 50px 50px 50px;
}

/* 模块块样式，含有阴影和圆角 */
.module {
    background-color: rgba(255, 255, 255, 0.85);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* 悬停时模块略微上升并加深阴影 */
.module:hover {
    transform: translateY(-10px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* 文章标题样式 */
.module h2, .module h3, .module h4 {
    color: #032B44;
    margin-bottom: 15px;
    font-weight: bold;
}

/* 正文段落样式，调整行高和字体大小 */
.module p {
    font-size: 16px;
    line-height: 1.6;
    color: #032B44;
}

/* 按钮样式，包括颜色、边框和圆角 */
.button {
    background-color: #34C759;
    color: #FFFFFF;
    padding: 10px 25px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.button:hover {
    background-color: #28a745;
}

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

/* 图片样式，包括圆角、阴影和悬停效果 */
img.decorative {
    width: 100%;
    max-width: 320px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

img.decorative:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* 代码块样式，确保可读性和与正文区分 */
pre code {
    display: block;
    padding: 15px;
    background-color: #f5f5f5;
    border-left: 5px solid #34C759;
    border-radius: 5px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    position: relative;
}

/* 代码块标题样式，通过::before伪元素添加 */
pre code::before {
    content: "代码示例";
    position: absolute;
    top: -20px;
    left: 15px;
    background-color: #34C759;
    color: #FFFFFF;
    padding: 2px 8px;
    font-size: 12px;
    border-radius: 3px;
}

/* 响应式设计：针对不同屏幕宽度进行调整 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .navbar a {
        margin: 10px 0;
    }

    .container {
        grid-template-columns: 1fr;
        padding: 120px 20px 20px 20px;
    }
}

/* 动画效果：淡入上升 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 应用动画到模块 */
.module {
    animation: fadeInUp 1s ease forwards;
    opacity: 0;
}

/* 过渡效果，增加页面互动感 */
button, .button {
    transition: all 0.3s ease;
}

/* 视觉引导区样式，应用渐变和动画 */
.hero-section {
    position: relative;
    width: 100%;
    height: 400px;
    background: url('https://images.gptkong.com/demo/sample1.png') no-repeat center center;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #FFFFFF;
    font-size: 24px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* 底部样式，包括切换按钮 */
.footer {
    background-color: #032B44;
    color: #FFFFFF;
    padding: 30px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer .switcher button {
    background-color: transparent;
    border: 1px solid #34C759;
    color: #34C759;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.footer .switcher button:hover {
    background-color: #34C759;
    color: #FFFFFF;
}

/* 图标与图文结合的样式 */
.icon {
    width: 50px;
    height: 50px;
    fill: #034;
    transition: fill 0.3s ease, transform 0.3s ease;
}

.icon:hover {
    fill: #34C759;
    transform: scale(1.1);
}

/* 可折叠菜单样式 */
.accordion {
    background-color: #D2B48C;
    cursor: pointer;
    padding: 18px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    transition: background-color 0.3s ease;
    border-radius: 5px;
    margin-bottom: 10px;
}

.accordion.active, .accordion:hover {
    background-color: #34C759;
}

.panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: #f1f1f1;
    padding: 0 18px;
    border-radius: 5px;
}

/* 工具提示样式 */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #34C759;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
    pointer-events: none;
}

.tooltip:hover::after {
    opacity: 1;
}

/* 表格样式，提升可读性 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.table thead {
    background-color: #5E8B7E;
    color: #FFFFFF;
}

.table th, .table td {
    padding: 12px 15px;
    border: 1px solid #dddddd;
    text-align: left;
}

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

.table tbody tr:hover {
    background-color: #f1f1f1;
}

/* 定制插画效果 */
.header-illustration {
    position: relative;
    width: 100%;
    height: 400px;
    background: url('https://images.gptkong.com/demo/sample2.png') no-repeat center / cover;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1), rgba(0,0,0,0));
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1), rgba(0,0,0,0));
}

/* 工具提示与信息展示 */
.tooltip-info {
    position: relative;
    display: inline-block;
    cursor: pointer;
    color: #34C759;
}

.tooltip-info::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 150%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #032B44;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
    pointer-events: none;
}

.tooltip-info:hover::after {
    opacity: 1;
}

