
/* 基本样式设置 */
body {
    font-family: 'Open Sans', sans-serif; /* 使用清晰易读的正文字体 */
    background: radial-gradient(circle, #f0f4f8 0%, #d9e2ec 100%); /* 使用径向渐变背景，增加层次感 */
    color: #333333; /* 正文字体颜色 */
    margin: 0;
    padding: 0;
}

/* 导航栏样式 */
.navbar {
    position: fixed; /* 固定导航栏 */
    top: 0;
    width: 100%;
    background: linear-gradient(90deg, #4CAF50 70%, #2196F3 30%); /* 线性渐变背景 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 阴影效果 */
    z-index: 1000;
}

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

.navbar a:hover {
    color: #FFD700; /* 鼠标悬停时颜色变化 */
}

/* 响应式菜单 */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: #ffffff;
    margin: 4px;
    transition: all 0.3s ease;
}

/* 主容器样式 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr)); /* 确保每个板块宽度不低于500px */
    gap: 40px;
    padding: 120px 60px 60px 60px; /* 留出导航栏空间 */
}

/* 文章板块样式 */
.article-section {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-section:hover {
    transform: translateY(-10px); /* 悬停时微动效 */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.article-section h2, .article-section h3, .article-section h4 {
    font-family: 'Roboto', sans-serif; /* 使用现代感标题字体 */
    color: #4CAF50; /* 标题颜色 */
    margin-bottom: 15px;
}

.article-section p {
    font-size: 16px;
    line-height: 1.6;
    color: #555555;
}

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

.article-section img:hover {
    transform: scale(1.05); /* 悬停时放大效果 */
}

/* 表格样式 */
.article-section table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.article-section th, .article-section td {
    border: 1px solid #dddddd;
    text-align: left;
    padding: 8px;
}

.article-section th {
    background-color: #4CAF50;
    color: white;
}

.article-section tr:nth-child(even) {
    background-color: #f2f2f2;
}

/* 代码块样式 */
pre {
    background: #f4f4f4;
    padding: 15px;
    border-radius: 5px;
    overflow: auto;
    position: relative;
}

pre::before {
    content: "代码示例";
    position: absolute;
    top: -20px;
    left: 10px;
    background: #4CAF50;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
}

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

/* 按钮样式 */
.button {
    background: linear-gradient(45deg, #4CAF50, #2196F3);
    border: none;
    border-radius: 25px;
    color: white;
    padding: 10px 30px;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
    font-size: 16px;
}

.button:hover {
    transform: scale(1.05);
    background: linear-gradient(90deg, #4CAF50, #2196F3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        padding: 10px 20px;
    }

    .navbar a {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .container {
        grid-template-columns: 1fr;
        padding: 120px 20px 20px 20px;
    }
}

