
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用现代无衬线字体 */
    background: linear-gradient(135deg, #1E90FF 70%, #7B68EE 25%, #FFA500 5%);
    color: #FFFFFF;
    line-height: 1.6;
    font-size: 16px;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.navbar ul {
    list-style: none;
    display: flex;
    justify-content: center;
    padding: 15px 0;
    margin: 0;
}

.navbar li {
    margin: 0 20px;
}

.navbar a {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 17px;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #FFA500;
}

/* 主内容区样式 */
.container {
    display: grid;
    grid-template-areas:
        "header"
        "main"
        "features"
        "data"
        "footer";
    grid-gap: 40px;
    padding: 100px 20px 50px 20px;
}

/* 首页提示信息 */
.intro {
    grid-area: header;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: #FFFFFF;
}

/* 章节导航 */
.chapter-nav {
    grid-area: main;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.chapter-nav a {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, background 0.3s ease;
}

.chapter-nav a:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.2);
}

/* 章节内容样式 */
.section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
}

.section h2, .section h3 {
    color: #FFFFFF;
}

.section p {
    color: #FFFFFF;
    font-size: 17px;
}

.section pre {
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
}

.section code {
    color: #7B68EE;
    font-family: 'Courier New', Courier, monospace;
}

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

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

/* CSS代码示例样式 */
.code-example {
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin-top: 20px;
}

.code-example code {
    color: #7B68EE;
    font-family: 'Courier New', Courier, monospace;
}

/* 响应式设计 */
@media (min-width: 768px) {
    .container {
        grid-template-areas:
            "header header"
            "main main"
            "features features"
            "data data"
            "footer footer";
    }

    .chapter-nav a {
        font-size: 18px;
        padding: 20px 30px;
    }

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

@media (min-width: 1200px) {
    .container {
        grid-template-areas:
            "header header"
            "main main"
            "features features"
            "data data"
            "footer footer";
    }

    .chapter-nav {
        justify-content: flex-start;
        gap: 30px;
    }

    .section {
        padding: 40px;
    }

    .section h2 {
        font-size: 2.5em;
    }

    .section h3 {
        font-size: 2em;
    }
}

