
/* 网页通用样式设置 */
body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.7;
    color: #333;
    background-color: #f0f2f5; /* 页面背景色，淡灰色 */
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex; /* 采用Flex布局 */
    flex-direction: column; /* 垂直方向布局 */
    min-height: 100vh; /* 最小高度为视口高度 */
}

/* 容器通用样式，限制最大宽度，居中显示 */
.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* 标题通用样式 */
h2 {
    font-size: 2.2rem;
    font-weight: bold;
    color: #333; /* 深灰色标题颜色 */
    margin-top: 30px;
    margin-bottom: 20px;
    text-align: center; /* 居中标题 */
}

h3 {
    font-size: 1.8rem;
    font-weight: bold;
    color: #555; /* 稍浅灰色副标题颜色 */
    margin-top: 25px;
    margin-bottom: 15px;
}

p {
    font-size: 1.1rem;
    color: #666; /* 浅灰色正文颜色 */
    margin-bottom: 15px;
}

/* 代码块通用样式 */
pre {
    background-color: #f7f7f9; /* 代码块背景色，浅灰色 */
    color: #333; /* 代码颜色 */
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto; /* 水平滚动条，防止代码溢出 */
    font-family: monospace, monospace; /* 等宽字体 */
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap; /* 代码自动换行 */
}

/* 链接通用样式，移除默认样式，并添加nofollow属性 */
a {
    color: #007bff; /* 链接颜色，亮蓝色 */
    text-decoration: none; /* 移除下划线 */
}

a:hover {
    text-decoration: underline; /* 鼠标悬停时显示下划线 */
}

/* 页眉样式 */
.header {
    background: linear-gradient(to right, #6a11cb, #2575fc); /* 蓝色渐变背景 */
    padding: 30px 0;
    text-align: center;
    color: white; /* 白色文字颜色 */
    margin-bottom: 30px;
}

.header h1 {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 10px;
    letter-spacing: 1px; /* 增加字间距 */
}

.header p {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.8); /* 稍淡白色描述文字 */
}

/* 卡片容器样式，使用Grid布局 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* 响应式列数 */
    gap: 30px;
    padding: 30px;
}

/* 卡片样式 */
.card {
    background-color: #fff; /* 白色卡片背景 */
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08); /* 卡片阴影 */
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* 过渡效果 */
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px); /* 悬停时向上轻微移动 */
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12); /* 悬停时阴影加深 */
}

.card-body {
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* 内容垂直方向两端对齐 */
    flex-grow: 1; /* 允许内容区域扩展填充 */
}

.card-title {
    font-size: 1.6rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: #3a3a3a; /* 卡片标题颜色 */
}

.card-description {
    font-size: 1.1rem;
    color: #777; /* 卡片描述颜色 */
    margin-bottom: 20px;
    flex-grow: 1; /* 描述区域可扩展 */
}

.card-button {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 6px;
    background-color: #007bff; /* 按钮背景色，亮蓝色 */
    color: white; /* 按钮文字颜色 */
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease; /* 按钮背景色过渡效果 */
    border: none; /* 移除按钮边框 */
    font-size: 1rem;
}

.card-button:hover {
    background-color: #0056b3; /* 按钮悬停背景色，深蓝色 */
}

.card-image {
    width: 100%;
    height: auto;
    display: block;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    object-fit: cover; /* 图片填充方式 */
    margin-bottom: 20px; /* 图片下方留白 */
}

/* 示例文章展示区域样式 */
.article-section {
    background-color: #fff; /* 文章区域背景色，白色 */
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08); /* 文章区域阴影 */
    margin-bottom: 30px;
}

.article-section h2 {
    text-align: left; /* 文章标题左对齐 */
    margin-bottom: 25px;
    color: #2c3e50; /* 文章标题颜色，深蓝色 */
    border-bottom: 2px solid #eaeaea; /* 标题下划线 */
    padding-bottom: 10px;
}

.article-section h3, .article-section h4 {
    color: #34495e; /* 文章副标题颜色 */
    margin-top: 20px;
    margin-bottom: 10px;
}

.article-section p {
    color: #555; /* 文章正文颜色 */
}

.article-section pre {
    margin: 15px 0; /* 代码块上下外边距 */
}

.article-section table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    margin-bottom: 20px;
}

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

.article-section th {
    background-color: #f2f2f2; /* 表头背景色，浅灰色 */
    font-weight: bold;
}

/* 页脚样式 */
.footer {
    text-align: center;
    padding: 20px 0;
    color: #888; /* 页脚文字颜色 */
    border-top: 1px solid #eaeaea; /* 页脚上边框 */
    margin-top: auto; /* 页脚推到页面底部 */
}

/* 小屏幕适配 (最大宽度 768px) */
@media (max-width: 768px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    .header {
        padding: 20px 0;
    }
    .header h1 {
        font-size: 2.8rem;
    }
    .header p {
        font-size: 1.2rem;
    }
    .card-grid {
        grid-template-columns: 1fr; /* 小屏幕单列布局 */
        gap: 20px;
        padding: 20px;
    }
    .card-body {
        padding: 20px;
    }
    .card-title {
        font-size: 1.5rem;
    }
    .card-description {
        font-size: 1rem;
    }
    .card-button {
        font-size: 0.9rem;
        padding: 10px 20px;
    }
    .article-section {
        padding: 20px;
    }
    .article-section h2 {
        font-size: 2rem;
    }
    .article-section h3 {
        font-size: 1.6rem;
    }
    .article-section p {
        font-size: 1rem;
    }
}

/* 更小屏幕适配 (最大宽度 480px) */
@media (max-width: 480px) {
    .header h1 {
        font-size: 2.4rem;
    }
    .header p {
        font-size: 1rem;
    }
    .card-title {
        font-size: 1.4rem;
    }
    .card-description {
        font-size: 0.95rem;
    }
    .article-section h2 {
        font-size: 1.8rem;
    }
    .article-section h3 {
        font-size: 1.5rem;
    }
    .article-section p {
        font-size: 0.95rem;
    }
}

