
/* 主体样式定义 */

/* 全局设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', sans-serif; /* 主文字体 */
    color: #ffffff; /* 文字颜色 */
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364); /* 背景渐变 */
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    position: fixed; /* 固定导航栏 */
    top: 0;
    width: 100%;
    background: rgba(20, 29, 47, 0.9); /* 半透明背景 */
    padding: 15px 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 阴影效果 */
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar a {
    color: #ffffff;
    margin: 0 15px;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    rel="nofollow";
}

.navbar a:hover {
    color: #ff7e67; /* 悬停效果 */
}

/* 响应式菜单图标 */
.menu-icon {
    display: none;
    cursor: pointer;
}

@media (max-width: 768px) {
    .navbar a {
        display: none; /* 隐藏菜单项 */
    }

    .menu-icon {
        display: block; /* 显示菜单图标 */
    }

    .dropdown-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background: rgba(20, 29, 47, 0.95);
        position: absolute;
        top: 60px;
        left: 0;
    }

    .navbar.active .dropdown-menu {
        display: flex; /* 显示下拉菜单 */
    }

    .dropdown-menu a {
        margin: 15px 0;
        padding: 10px 20px;
    }
}

/* 英雄区样式 */
.hero-section {
    height: 100vh;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #ffffff;
    padding: 0 20px;
}

.hero-section h1 {
    font-family: 'Roboto', sans-serif; /* 标题字体 */
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5); /* 文字阴影 */
}

.hero-section p {
    font-family: 'Open Sans', sans-serif;
    font-size: 18px;
    max-width: 600px;
    margin-bottom: 30px;
}

.hero-section .cta-button {
    background-color: #ff7e67; /* CTA按钮主色 */
    color: #ffffff;
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    text-decoration: none;
}

.hero-section .cta-button:hover {
    background-color: #ff5733; /* 悬停变色 */
    transform: scale(1.05); /* 缩放效果 */
}

/* 章节导航样式 */
.chapter-nav {
    position: fixed;
    top: 100px;
    right: 30px;
    background: rgba(20, 29, 47, 0.8);
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 900;
}

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

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

/* 主要内容区 */
.content {
    padding: 120px 40px 60px 40px; /* 上方留出导航栏空间 */
    max-width: 1200px;
    margin: 0 auto;
}

.content h2, .content h3, .content h4 {
    font-family: 'Roboto', sans-serif;
    color: #ffffff;
    margin-top: 40px;
    margin-bottom: 20px;
}

.content p {
    font-size: 16px;
    color: #f0f0f0;
    margin-bottom: 20px;
}

.content pre {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
}

.content code {
    font-family: 'Courier New', Courier, monospace;
    color: #ff7e67;
}

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

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

/* 卡片式布局 */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 60px 40px;
}

.card {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px); /* 背景模糊 */
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-15px); /* 上移效果 */
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
}

.card h3 {
    font-family: 'Roboto', sans-serif;
    font-size: 24px;
    margin-bottom: 15px;
}

.card p {
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #f0f0f0;
}

/* 数据可视化图表 */
.chart-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.chart-bar {
    width: 40px;
    background-color: #1E90FF;
    margin: 0 15px;
    display: inline-block;
    vertical-align: bottom;
    transition: height 0.6s ease, background-color 0.3s ease;
}

.chart-bar:hover {
    background-color: #ff7e67;
    height: 200px;
}

/* 技术插画样式 */
.tech-illustration {
    width: 100px;
    height: 100px;
    background: url('https://images.gptkong.com/demo/sample1.png') no-repeat center center;
    background-size: contain;
    animation: rotate 10s linear infinite; /* 旋转动画 */
    margin: 20px auto;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 代码示例样式 */
.code-example {
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    margin: 20px 0;
}

.code-example code {
    color: #00ff00;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .navbar a {
        margin: 10px 0;
    }

    .cta-button {
        width: 100%;
        text-align: center;
    }

    .chapter-nav {
        top: 80px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 15px;
    }

    .cta-button {
        padding: 10px 20px;
        font-size: 14px;
    }

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

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