
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: #ffffff;
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: linear-gradient(to right, #000428, #004e92);
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
}

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

.navbar li {
    margin: 0 15px;
}

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

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

/* 主内容区域样式 */
.main-content {
    padding-top: 100px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 标题样式 */
h2 {
    font-size: 24px;
    margin-top: 40px;
    margin-bottom: 20px;
    border-left: 5px solid #ff6a00;
    padding-left: 10px;
}

h3 {
    font-size: 20px;
    margin-top: 30px;
    margin-bottom: 15px;
    border-left: 4px solid #00d2ff;
    padding-left: 8px;
}

/* 段落样式 */
p {
    font-size: 16px;
    margin-bottom: 15px;
    text-align: justify;
}

/* 图片样式 */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 30px;
}

.image-gallery 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;
}

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

/* 代码块样式 */
.code-block {
    background: #2a2a2a;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

.code-block pre {
    margin: 0;
    font-family: 'Courier New', Courier, monospace;
    color: #00ff00;
}

.code-block pre span {
    color: #ffffff;
}

/* 按钮样式 */
.button {
    background: linear-gradient(to right, #ff7e5f, #feb47b);
    border: none;
    padding: 12px 25px;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
    border-radius: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 章节导航系统样式 */
.chapter-nav {
    position: fixed;
    right: 20px;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chapter-nav a {
    background: #004e92;
    color: #ffffff;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s ease;
}

.chapter-nav a:hover {
    background: #ff6a00;
}

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

    .navbar li {
        margin: 10px 0;
    }

    .chapter-nav {
        display: none;
    }
}

@media (max-width: 480px) {
    h2 {
        font-size: 20px;
    }

    h3 {
        font-size: 18px;
    }

    p {
        font-size: 14px;
    }

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

/* 背景动画效果 */
@keyframes backgroundAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body {
    background: linear-gradient(-45deg, #1e3c72, #2a5298, #ff6a00, #ee0979);
    background-size: 400% 400%;
    animation: backgroundAnimation 15s ease infinite;
}

/* 代码块内关键字高亮 */
.code-block .keyword {
    color: #ff4081;
}

.code-block .selector {
    color: #00d2ff;
}

.code-block .property {
    color: #fdffb6;
}

.code-block .value {
    color: #caffbf;
}

