
/* 网页通用样式设置 */
body {
    font-family: 'Montserrat', sans-serif; /* 使用Montserrat字体，现代简洁 */
    margin: 0;
    padding: 0;
    color: #ffffff; /* 默认文字颜色为白色 */
    background: linear-gradient(135deg, #0a0a33, #1a1a1a); /* 深蓝到深灰渐变背景，营造科技感 */
    overflow-x: hidden; /* 防止水平滚动条出现 */
}

/* 标题通用样式 */
h2, h3 {
    font-family: 'Roboto', sans-serif; /* 标题使用Roboto字体，更显粗犷 */
    font-weight: bold;
    color: #ffffff; /* 标题文字颜色为白色 */
    margin-top: 20px;
    margin-bottom: 15px;
    text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3); /* 标题文字阴影，增强立体感 */
}

h2 { font-size: 2.5em; } /* h2标题字号 */
h3 { font-size: 1.8em; } /* h3标题字号 */

p {
    font-size: 1em;
    line-height: 1.6; /* 行高，增加可读性 */
    color: #d0d0d0; /* 段落文字颜色，稍浅于白色 */
    margin-bottom: 15px;
}

a {
    color: #00bfff; /* 链接颜色，亮蓝色 */
    text-decoration: none; /* 移除默认下划线 */
    transition: color 0.3s ease; /* 颜色过渡效果 */
}

a:hover {
    color: #39ff14; /* 鼠标悬停链接颜色，亮绿色 */
}

/* 代码块样式 */
pre {
    background-color: #1e1e1e; /* 代码块背景色，深灰色 */
    color: #f8f8f2; /* 代码颜色，浅色 */
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto; /* 水平滚动条，当代码过长时 */
    font-family: 'Courier New', monospace; /* 代码字体 */
    font-size: 0.9em;
    line-height: 1.4;
    white-space: pre-wrap; /* 代码自动换行 */
    word-wrap: break-word; /* 长单词换行 */
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.5); /* 代码块阴影 */
    margin-bottom: 20px;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse; /* 合并边框 */
    margin-bottom: 20px;
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.5); /* 表格阴影 */
}

th, td {
    border: 1px solid #444; /* 表格边框颜色 */
    padding: 8px;
    text-align: left;
}

th {
    background-color: #333; /* 表头背景色 */
    font-weight: bold;
    color: #eee; /* 表头文字颜色 */
}

/* 页面主体容器 */
.container {
    width: 90%;
    max-width: 1200px; /* 最大宽度限制 */
    margin: 20px auto; /* 居中显示，上下留白 */
    padding: 30px;
    background-color: rgba(20, 20, 40, 0.85); /* 容器背景色，半透明深蓝色 */
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.6); /* 容器阴影，增强悬浮感 */
}

/* 首页全屏展示区域样式 */
.hero-section {
    position: relative;
    height: 600px; /* 初始高度，可根据内容调整 */
    overflow: hidden; /* 裁剪超出容器的内容 */
    border-radius: 10px;
    margin-bottom: 30px;
    background: linear-gradient(135deg, rgba(10, 10, 33, 0.9), rgba(26, 26, 26, 0.9)); /* Hero区域渐变背景 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.hero-section h1 {
    font-family: 'Roboto', sans-serif;
    font-size: 4em;
    font-weight: bolder;
    color: #fff;
    text-shadow: 4px 4px 5px rgba(0, 0, 0, 0.7); /* Hero标题阴影 */
    margin-bottom: 10px;
}

.hero-section p {
    font-size: 1.2em;
    color: #eee;
    max-width: 700px;
    margin: 0 auto 20px;
}

/* 模块化内容展示区域 */
.modules-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* 响应式列数 */
    gap: 30px; /* 模块间距 */
    margin-bottom: 30px;
}

.module {
    padding: 25px;
    background-color: rgba(30, 30, 50, 0.7); /* 模块背景色，半透明深蓝灰 */
    border-radius: 8px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.4); /* 模块阴影 */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* 模块动画效果 */
}

.module:hover {
    transform: translateY(-5px); /* 模块悬停上移效果 */
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.5); /* 模块悬停阴影增强 */
}

.module img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 15px;
    border-radius: 5px;
    box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3); /* 模块图片阴影 */
}

.module h3 {
    margin-top: 0;
}

/* 示例文章展示区域 */
.article-section {
    padding: 30px;
    background-color: rgba(25, 25, 45, 0.8); /* 文章区域背景色，稍深的半透明蓝灰 */
    border-radius: 8px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.4); /* 文章区域阴影 */
    margin-bottom: 30px;
}

.article-section h2 {
    border-bottom: 2px solid #555; /* 文章标题下划线 */
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.article-section article {
    padding: 0;
}

.article-section article h2, .article-section article h3, .article-section article p, .article-section article pre, .article-section article table {
    margin-left: 0;
    margin-right: 0;
}

/* 页脚样式 */
.footer {
    text-align: center;
    padding: 20px 0;
    font-size: 0.9em;
    color: #999; /* 页脚文字颜色，灰色 */
    border-top: 1px solid #444; /* 页脚顶部分割线 */
}

/* 响应式设计，针对不同屏幕尺寸调整样式 */
/* 小屏幕手机 (最大宽度 480px) */
@media screen and (max-width: 480px) {
    .container {
        width: 95%;
        padding: 20px;
        margin: 10px auto;
    }
    .hero-section {
        height: auto; /* 高度自适应内容 */
        padding: 30px 20px;
    }
    .hero-section h1 {
        font-size: 2.8em;
    }
    .hero-section p {
        font-size: 1em;
    }
    .modules-section {
        grid-template-columns: 1fr; /* 单列布局 */
        gap: 20px;
    }
    .module {
        padding: 20px;
    }
    .article-section {
        padding: 20px;
    }
    h2 { font-size: 2em; }
    h3 { font-size: 1.5em; }
    p { font-size: 0.9em; }
}

/* 平板电脑 (最小宽度 768px，最大宽度 1024px) */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    .container {
        width: 90%;
        padding: 25px;
    }
    .hero-section {
        height: 500px;
    }
    .hero-section h1 {
        font-size: 3.5em;
    }
    .modules-section {
        grid-template-columns: repeat(2, 1fr); /* 两列布局 */
    }
    .module {
        padding: 20px;
    }
    .article-section {
        padding: 25px;
    }
    h2 { font-size: 2.2em; }
    h3 { font-size: 1.6em; }
}

/* 中等屏幕及桌面显示器 (最小宽度 1024px) */
@media screen and (min-width: 1024px) {
    .container {
        padding: 40px;
    }
    .hero-section {
        height: 600px;
    }
    .modules-section {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* 多列布局 */
    }
    .module {
        padding: 25px;
    }
    .article-section {
        padding: 30px;
    }
}

