
/* 基本样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', sans-serif; /* 设置全局字体 */
    color: #ffffff; /* 正文字体颜色 */
    background: linear-gradient(135deg, #0d47a1, #6a1b9a); /* 背景渐变色 */
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7); /* 半透明背景 */
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.navbar a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 15px;
    font-size: 16px;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #00e676; /* 悬停颜色变化 */
}

/* 主页英雄图样式 */
.hero {
    height: 100vh;
    background: 
        linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
        url('https://images.gptkong.com/demo/sample1.png') no-repeat center center;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    animation: backgroundFade 10s infinite alternate;
}

@keyframes backgroundFade {
    from { background-position: left center; }
    to { background-position: right center; }
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color: #ffffff;
    animation: fadeIn 2s ease-in-out;
}

.hero p {
    font-size: 18px;
    max-width: 600px;
    line-height: 1.6;
    animation: fadeIn 2s ease-in-out 1s forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 内容区块样式 */
.section {
    padding: 60px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section:nth-child(even) {
    background: linear-gradient(45deg, #1e88e5, #8e24aa);
}

.section:nth-child(odd) {
    background: linear-gradient(135deg, #0d47a1, #6a1b9a);
}

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

.section p {
    font-size: 16px;
    max-width: 800px;
    text-align: center;
    line-height: 1.8;
    margin-bottom: 20px;
}

/* 图片样式 */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.image-gallery img {
    width: 320px;
    height: 320px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 按钮样式 */
.button {
    background: linear-gradient(45deg, #00c853, #00e676);
    border: none;
    padding: 15px 30px;
    color: #ffffff;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.5s ease, transform 0.3s ease;
}

.button:hover {
    background: linear-gradient(45deg, #00e676, #00c853);
    transform: translateY(-3px);
}

/* 导航系统样式 */
.nav-chapter {
    position: fixed;
    top: 100px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    padding: 15px;
    border-radius: 10px;
    z-index: 1000;
}

.nav-chapter a {
    display: block;
    color: #ffffff;
    text-decoration: none;
    margin: 10px 0;
    font-size: 14px;
    transition: color 0.3s ease;
}

.nav-chapter a:hover {
    color: #ff5722;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero p {
        font-size: 16px;
    }

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

    .section p {
        font-size: 14px;
    }

    .image-gallery img {
        width: 100%;
        height: auto;
    }

    .nav-chapter {
        top: auto;
        bottom: 20px;
        right: 50%;
        transform: translateX(50%);
        display: flex;
        gap: 10px;
    }

    .nav-chapter a {
        font-size: 12px;
    }
}

/* 代码示例样式 */
.code-example {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    margin: 20px 0;
    overflow-x: auto;
}

.code-example pre {
    margin: 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.6;
}

/* 其他装饰元素 */
.decorative-line {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #43cea2, #185a9d);
    margin: 20px 0;
    border-radius: 2px;
}

.footer {
    background: rgba(0, 0, 0, 0.8);
    padding: 40px 20px;
    text-align: center;
}

.footer p {
    font-size: 14px;
    color: #bbbbbb;
}

