
/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 设定基础字体和背景 */
body {
    font-family: 'Roboto', 'Helvetica', sans-serif; /* 使用现代无衬线字体 */
    font-size: 16px; /* 基础字体大小为16px */
    color: #FFFFFF; /* 文字颜色为白色 */
    background: linear-gradient(135deg, #1E3A8A, #4CAF50, #FF5252); /* 渐变背景 */
    background-attachment: fixed; /* 背景固定，不随滚动 */
    line-height: 1.6; /* 行高 */
    overflow-x: hidden; /* 禁止水平滚动 */
}

/* 容器样式 */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto; /* 居中 */
    padding: 20px;
}

/* 头部样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2); /* 半透明边框 */
}

.header .logo {
    font-size: 24px;
    font-weight: bold;
}

.header nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.header nav ul li a {
    text-decoration: none;
    color: #FFFFFF;
    transition: color 0.3s ease;
}

.header nav ul li a:hover {
    color: #4CAF50; /* 辅助色悬停效果 */
}

/* 主标题样式 */
.main-title {
    text-align: center;
    margin: 40px 0;
    font-size: 36px;
    color: #FFFFFF;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5); /* 文字阴影 */
}

/* 章节导航样式 */
.navbar {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.navbar a {
    margin: 0 15px;
    text-decoration: none;
    color: #FFFFFF;
    font-size: 18px;
    position: relative;
}

.navbar a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #4CAF50;
    transition: width 0.3s;
    position: absolute;
    bottom: -5px;
    left: 0;
}

.navbar a:hover::after {
    width: 100%;
}

/* 文章内容样式 */
article {
    background: rgba(0, 0, 0, 0.6);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

/* 文章标题样式 */
article h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #FFFFFF;
    border-bottom: 2px solid #4CAF50; /* 边框 */
    padding-bottom: 10px;
}

/* 文章小节标题样式 */
article h3 {
    font-size: 22px;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #FF5252; /* 点缀色 */
}

/* 文章段落样式 */
article p {
    margin-bottom: 20px;
    color: #DDDDDD;
}

/* 代码块样式 */
article pre {
    background: #2C3E50;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 20px;
}

article pre code {
    color: #ECF0F1;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

/* 图片样式 */
.article-images {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 30px 0;
}

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

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

/* 提示信息样式 */
.notification {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-left: 5px solid #4CAF50;
    margin: 20px 0;
    font-size: 18px;
}

/* 页脚样式 */
.footer {
    text-align: center;
    padding: 20px 0;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    margin-top: 40px;
    color: #BBBBBB;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header, .navbar {
        flex-direction: column;
        align-items: center;
    }
    
    .navbar a {
        margin: 10px 0;
    }
    
    .article-images {
        flex-direction: column;
        align-items: center;
    }
    
    .article-images img {
        width: 90%;
        height: auto;
    }
}

/* 按钮样式 */
.button {
    display: inline-block;
    padding: 10px 20px;
    background: #4CAF50;
    color: #FFFFFF;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s, transform 0.3s;
}

.button:hover {
    background: #FF5252;
    transform: translateY(-5px);
}

