
/* 全局样式设置，包括字体、颜色和基本布局 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* 使用现代无衬线字体 */
    background: linear-gradient(135deg, #0d47a1, #1976d2); /* 主背景色采用深蓝色渐变 */
    color: #ffffff;
    line-height: 1.6;
}
/* 头部导航栏样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: rgba(0, 0, 0, 0.5); /* 半透明背景 */
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}
.header .logo {
    font-size: 24px;
    font-weight: bold;
}
.header nav a {
    color: #ffffff;
    text-decoration: none;
    margin-left: 20px;
    font-size: 16px;
    transition: color 0.3s ease;
}
.header nav a:hover {
    color: #00b0ff; /* 悬停时颜色变化 */
}
/* 主内容区域的布局 */
.main {
    padding: 100px 40px 40px 40px; /* 顶部留出导航栏空间 */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}
/* 模块化内容区块样式 */
.section {
    background-color: rgba(255, 255, 255, 0.1); /* 半透明背景 */
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.section:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 12px rgba(0,0,0,0.5);
}
/* 标题样式 */
h1, h2, h3, h4 {
    color: #ffffff;
    margin-bottom: 15px;
}
h1 {
    font-size: 32px;
}
h2 {
    font-size: 28px;
}
h3 {
    font-size: 24px;
}
h4 {
    font-size: 20px;
}
/* 正文内容样式 */
p {
    font-size: 16px;
    margin-bottom: 15px;
}
/* 图片样式 */
img.decorative {
    width: 100%;
    max-width: 320px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
img.decorative:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 12px rgba(0,0,0,0.5);
}
/* 分隔线样式 */
.separator {
    height: 2px;
    background: linear-gradient(90deg, #00b0ff, #00c853);
    margin: 40px 0;
    border: none;
}
/* 代码块样式 */
pre {
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 20px;
}
code {
    color: #00ffea;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}
/* 按钮样式 */
.button {
    display: inline-block;
    background: linear-gradient(45deg, #00c853, #00b0ff);
    color: #ffffff;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    text-decoration: none;
    font-size: 16px;
    cursor: pointer;
    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.3);
}
/* 响应式设计 */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
    }
    .header nav {
        margin-top: 10px;
    }
    .main {
        padding: 120px 20px 20px 20px;
    }
}

