
/* 基本样式重置，确保在不同浏览器上显示一致 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 设置整体字体与背景色，使用温暖的蓝色和浅灰色调 */
body {
    font-family: 'Roboto', sans-serif;
    background-color: #F5F5F5; /* 主背景色，浅灰色 */
    color: #333333; /* 主文字颜色，深灰 */
    line-height: 1.6;
}

/* 固定顶部导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #03A9F4; /* 主色调，蓝色 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.navbar.scrolled {
    background-color: #0288D1; /* 滚动后导航栏颜色变化 */
}

.navbar .logo {
    font-size: 1.5em;
    font-weight: bold;
    color: #FFFFFF;
    text-decoration: none;
}

.navbar ul {
    list-style: none;
    display: flex;
}

.navbar ul li {
    margin-left: 20px;
}

.navbar ul li a {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 1em;
    transition: color 0.3s ease;
}

.navbar ul li a:hover {
    color: #FFC107; /* 点缀色，黄色 */
}

/* 主视觉区样式 */
.hero {
    position: relative;
    height: 100vh;
    background: url('https://images.gptkong.com/demo/sample1.png') no-repeat center center/cover;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 169, 244, 0.5);
    animation: fadeIn 5s infinite;
}

.hero h1 {
    position: relative;
    color: #FFFFFF;
    font-size: 3em;
    z-index: 1;
    animation: fadeText 3s infinite;
}

@keyframes fadeIn {
    0% { opacity: 0.5; }
    50% { opacity: 0.7; }
    100% { opacity: 0.5; }
}

@keyframes fadeText {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* 章节导航样式 */
.section-nav {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background-color: rgba(3, 169, 244, 0.8);
    padding: 10px;
    border-radius: 10px;
}

.section-nav ul {
    list-style: none;
}

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

.section-nav ul li a {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 0.9em;
    display: block;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.section-nav ul li a:hover {
    background-color: #0288D1;
}

/* 模块化内容区样式 */
.module {
    padding: 80px 20px;
    background-color: #FFFFFF;
    border-bottom: 1px solid #E0E0E0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.module:nth-child(even) {
    background-color: #F5F5F5; /* 辅助色，浅灰 */
}

.module img {
    width: 100%;
    max-width: 320px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.module .content {
    flex: 1;
    padding: 20px;
}

.module h2 {
    font-size: 2em;
    margin-bottom: 15px;
    color: #03A9F4;
}

.module p {
    font-size: 1em;
    margin-bottom: 10px;
}

.module pre {
    background-color: #272822;
    color: #F8F8F2;
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    margin-top: 10px;
}

.module pre code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

/* 按钮样式 */
.button {
    background: linear-gradient(45deg, #03A9F4, #FFC107); /* 渐变色 */
    border: none;
    padding: 10px 25px;
    color: #FFFFFF;
    font-size: 1em;
    border-radius: 30px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.button:hover {
    background: linear-gradient(45deg, #FFC107, #03A9F4); /* 颜色反转 */
}

/* 折叠区域样式 */
.collapsible {
    background-color: #03A9F4;
    color: white;
    cursor: pointer;
    padding: 10px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 1em;
    border-radius: 5px;
    margin-top: 10px;
}

.active, .collapsible:hover {
    background-color: #0288D1;
}

.content-collapsible {
    padding: 0 18px;
    display: none;
    overflow: hidden;
    background-color: #f1f1f1;
    border-radius: 5px;
}

.content-collapsible p {
    padding: 10px 0;
    color: #333333;
}

/* 代码示例样式 */
.code-example {
    background-color: #272822;
    color: #F8F8F2;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    overflow-x: auto;
}

.code-example code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar ul {
        flex-direction: column;
        background-color: #03A9F4;
        position: absolute;
        top: 60px;
        right: 0;
        width: 200px;
        display: none;
    }

    .navbar ul.active {
        display: flex;
    }

    .navbar ul li {
        margin: 10px 0;
    }

    .section-nav {
        display: none;
    }

    .module {
        flex-direction: column;
        text-align: center;
    }

    .module .content {
        padding: 20px 0;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2em;
    }
}

