
/* 全局样式重置 - 清除所有元素的默认样式 */
*{
    margin: 0;      /* 清除所有外边距 */
    padding: 0;     /* 清除所有内边距 */
    box-sizing: border-box;  /* 设置盒模型计算方式，使padding和border包含在width内 */
}

/* 页面基础样式设置 */
body {
    background-color: #2d2d2d;  /* 设置深灰色背景 */
    color: #fff;               /* 设置文字为白色 */

    background-image: url('img/背景.jpg');  /* 添加背景图片 */
    background-attachment: fixed;  /* 背景图片固定，不随页面滚动 */
    background-size: cover;  /* 背景图片覆盖整个视口 */
    background-position: center;  /* 背景图片居中 */
    background-repeat: no-repeat;  /* 背景图片不重复 */
    font-family: Arial, sans-serif;  /* 设置字体 */
    position: relative;  /* 设置定位 */
}

/* 添加渐变遮罩层 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(250, 249, 249, 0.01),  /* 顶部半透明 */
        rgba(250, 249, 249, 0.5),  /* 顶部半透明 */
        hsla(0, 0%, 20%, 2)   /* 底部更不透明 */
    );
    z-index: -1;  /* 确保遮罩在内容之下 */
}   

/* 顶部导航栏样式设置 */
.header {
    background-color: rgba(0, 0, 0, 0.5);  /* 设置半透明黑色背景 */
    padding: 10px 20px;  /* 内边距：上下10px，左右20px */
    display: flex;  /* 使用弹性布局 */
    justify-content: space-between;  /* 子元素两端对齐 */
    align-items: center;  /* 子元素垂直居中 */
    position: fixed;  /* 固定定位，使导航栏始终在顶部 */
    width: 100%;  /* 宽度占满整个视窗 */
    top: 0;  /* 顶部对齐 */
    z-index: 1000;  /* 设置层级，确保导航栏在最上层 */
}

/* Logo图片样式 */
.logo {
    height: 50px;  /* 设置Logo高度为50像素 */
}

/* 导航菜单容器样式 */
.nav {
    display: flex;  /* 使用弹性布局 */
    gap: 20px;  /* 设置子元素之间的间距为20px */
}

/* 导航菜单链接样式 */
.nav a {
    color: #fff;  /* 链接文字颜色为白色 */
    text-decoration: none;  /* 移除下划线 */
    padding: 5px 10px;  /* 内边距：上下5px，左右10px */
    transition: color 0.3s;  /* 添加颜色过渡动画，持续0.3秒 */
}

/* 导航菜单链接悬停效果 */
.nav a:hover {
    color: #ff6b6b;  /* 鼠标悬停时变为浅红色 */
}

/* 顶部横幅图片样式 */
.banner {
    margin-top: 70px;  /* 上外边距70px，避免被固定导航栏遮挡 */
    width: 100%;  /* 宽度100% */
    height: 300px;  /* 高度300px */
    background-size: cover;  /* 背景图片覆盖整个区域 */
    background-position: center;  /* 背景图片居中显示 */
    margin-bottom: 30px;  /* 下外边距30px */
}

/* 功能卡片区域容器样式 */
.function-area {
    display: flex;  /* 使用弹性布局 */
    justify-content: center;  /* 内容居中对齐 */
    gap: 20px;  /* 卡片之间间距20px */
    padding: 0 20px;  /* 左右内边距20px */
    margin-bottom: 40px;  /* 下外边距40px */
}

/* 功能卡片样式 */
.function-card {
    width: 250px;  /* 卡片宽度250px */
    height: 150px;  /* 卡片高度150px */
    background-color: rgba(255, 255, 255, 0.1);  /* 半透明白色背景 */
    border-radius: 10px;  /* 圆角10px */
    overflow: hidden;  /* 隐藏溢出内容 */
    transition: transform 0.3s;  /* 添加变换过渡动画 */
    position: relative;  /* 相对定位 */
    cursor: pointer;  /* 鼠标指针变为手型 */
    text-decoration: none;  /* 移除文字下划线 */
}

/* 功能卡片悬停效果 */
.function-card:hover {
    transform: translateY(-5px);  /* 向上移动5px */
}

/* 功能卡片图片样式 */
.function-card img {
    width: 100%;  /* 图片宽度100% */
    height: 100%;  /* 图片高度100% */
    object-fit: cover;  /* 图片填充方式为覆盖 */
}

/* 卡片标题样式 */
.card-title {
    position: absolute;  /* 绝对定位 */
    bottom: 0;  /* 底部对齐 */
    left: 0;  /* 左侧对齐 */
    right: 0;  /* 右侧对齐 */
    background: rgba(0,0,0,0.7);  /* 半透明黑色背景 */
    color: white;  /* 文字颜色为白色 */
    padding: 10px;  /* 内边距10px */
    text-align: center;  /* 文字居中对齐 */
}

/* 主要内容区域布局样式 */
.content {
    display: grid;  /* 使用网格布局 */
    grid-template-columns: repeat(2, 1fr);  /* 创建两列等宽的网格 */
    gap: 30px;  /* 网格间距30px */
    padding: 20px;  /* 内边距20px */
    max-width: 800px;  /* 最大宽度800px */
    margin: 0 auto;  /* 水平居中对齐 */
}

/* 内容区块样式 */
.content-section {
    background-color: rgba(255, 255, 255, 0.2);  /* 微弱的半透明白色背景 */
    padding: 20px;  /* 内边距20px */
    border-radius: 10px;  /* 圆角10px */
}

/* 内容区块标题样式 */
.content-section h3 {
    margin-bottom: 15px;  /* 下外边距15px */
    color: #ff6b6b;  /* 标题颜色为浅红色 */
}

/* 内容区块列表样式 */
.content-section ul {
    list-style: none;  /* 移除列表项标记 */
}

/* 列表项样式 */
.content-section li {
    margin-bottom: 10px;  /* 列表项下外边距10px */
}

/* 列表项链接样式 */
.content-section a {
    color: #5e5b5b;  /* 链接颜色为白色 */
    text-decoration: none;  /* 移除下划线 */
    transition: color 0.3s;  /* 颜色过渡动画0.3秒 */
    cursor: pointer;  /* 鼠标指针变为手型 */
}

/* 列表项链接悬停效果 */
.content-section a:hover {
    color: #ff6b6b;  /* 悬停时变为浅红色 */
}

/* 弹窗基础样式 */
.modal {
    display: none;  /* 默认隐藏 */
    position: fixed;  /* 固定定位 */
    top: 0;  /* 顶部对齐 */
    left: 0;  /* 左侧对齐 */
    width: 100%;  /* 宽度100% */
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 1000;
}
/* 弹窗内容样式 - 定义弹窗主体的外观 */
.modal-content {
    background-color: #2d2d2d;  /* 设置深灰色背景 */
    margin: 5% auto;  /* 上下边距为5%，左右自动居中 */
    padding: 30px;  /* 内部填充30像素，使内容不贴边 */
    border: 1px solid #888;  /* 添加1像素灰色边框 */
    width: 60%;  /* 宽度为父容器的60% */
    max-width: 1000px;  /* 最大宽度限制为1000像素 */
    min-width: 300px;  /* 最小宽度不小于300像素 */
    border-radius: 10px;  /* 边框圆角为10像素 */
    position: relative;  /* 相对定位，作为子元素的定位参考 */
    max-height: 80vh;  /* 最大高度为视窗高度的80% */
    overflow-y: auto;  /* 垂直方向内容溢出时显示滚动条 */
}

/* 弹窗关闭按钮样式 - 定义关闭按钮"×"的外观 */
.close {
    color: #aaa;  /* 设置按钮颜色为灰色 */
    float: right;  /* 右浮动，使按钮位于右上角 */
    font-size: 28px;  /* 字体大小28像素 */
    font-weight: bold;  /* 字体加粗 */
    cursor: pointer;  /* 鼠标悬停时显示手型指针 */
}

/* 关闭按钮悬停效果 */
.close:hover {
    color: #fff;  /* 鼠标悬停时按钮变为白色 */
}

/* 弹窗内容展示区样式 - 定义内容区域的外观 */
.content-display {
    background: rgba(0, 0, 0, 0.2);  /* 设置20%透明度的黑色背景 */
    border-radius: 8px;  /* 边框圆角为8像素 */
    padding: 20px;  /* 内部填充20像素 */
    margin-top: 20px;  /* 顶部外边距20像素 */
}

/* 弹窗图片样式 - 定义图片的显示方式 */
.content-image {
    width: 100%;  /* 图片宽度占满容器 */
    max-height: 400px;  /* 图片最大高度400像素 */
    object-fit: cover;  /* 图片填充方式为覆盖，保持比例裁剪 */
    border-radius: 8px;  /* 图片圆角为8像素 */
    margin-bottom: 25px;  /* 底部外边距25像素，与文字保持间距 */
}
.download-image {
    width: 100%;  /* 图片宽度占满容器 */
    max-height: 150px;  /* 图片最大高度400像素 */
    object-fit: cover;  /* 图片填充方式为覆盖，保持比例裁剪 */
    border-radius: 30px;  /* 图片圆角为8像素 */
    margin-bottom: 25px;  /* 底部外边距25像素，与文字保持间距 */
}

/* 弹窗文字内容样式 - 定义文字区域的布局 */
.content-text {
    padding: 0 15px;  /* 左右内边距15像素，上下无内边距 */
}

/* 弹窗文字标题样式 */
.content-text h3 {
    color: #ff6b6b;  /* 标题颜色设置为浅红色 */
    margin: 20px 0 15px 0;  /* 上边距20px，下边距15px，左右无边距 */
}

/* 弹窗文字段落样式 */
.content-text p {
    margin: 8px 0;  /* 段落上下外边距8像素 */
    line-height: 1.8;  /* 行高为字体大小的1.8倍，提高可读性 */
}

/* 自定义滚动条样式 - 美化滚动条外观 */
.modal-content::-webkit-scrollbar {
    width: 8px;  /* 设置滚动条宽度为8像素 */
}

/* 滚动条轨道样式 - 定义滚动条背景 */
.modal-content::-webkit-scrollbar-track {
    background: #2d2d2d;  /* 轨道背景色与弹窗背景色相同 */
}

/* 滚动条滑块样式 - 定义滚动条可拖动部分 */
.modal-content::-webkit-scrollbar-thumb {
    background: #888;  /* 滑块颜色为灰色 */
    border-radius: 4px;  /* 滑块圆角为4像素 */
}

/* 滚动条滑块悬停效果 */
.modal-content::-webkit-scrollbar-thumb:hover {
    background: #555;  /* 鼠标悬停时滑块变为深灰色 */
}


/* 下载按钮容器样式 */
.download-container {
padding: 20px;
text-align: center;  /* 内容居中 */
}

/* 下载按钮区域样式 */
.download-buttons {
display: flex;
flex-direction: column;
gap: 20px;  /* 按钮之间的间距 */
margin-top: 30px;
}

/* 下载按钮样式 */
.download-btn {
display: flex;
flex-direction: column;
align-items: center;
padding: 8px;
background: linear-gradient(145deg, #ff6b6b, #ff8e8e);  /* 渐变背景 */
color: white;
text-decoration: none;
border-radius: 10px;
transition: transform 0.3s, box-shadow 0.3s;
position: relative;
overflow: hidden;
}

/* 下载按钮悬停效果 */
.download-btn:hover {
transform: translateY(-3px);
box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

/* 下载按钮图标样式 */
.download-btn i {
font-size: 24px;
margin-bottom: 10px;
}

/* 下载按钮描述文字样式 */
.btn-desc {
font-size: 12px;
opacity: 0.8;
margin-top: 5px;
}

/* 下载按钮点击效果 */
.download-btn:active {
transform: translateY(1px);
box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
}

    /* 背景音乐控制 */
    .music-btn {
        position: fixed;
        right: 5px;
        top: 75px;
        padding: 10px;
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 50%;
        cursor: pointer;
        width: 20px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
    }