/* styles.css */

/* 全局设置，消除默认的内边距和外边距，并设置盒子模型 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 设置html和body标签的高度和字体 */
body, html {
    height: 100%;
    font-family: Arial, sans-serif;
}

/* 容器类，设置背景图和布局方式 */
.container {
    background: url('qyz.png') no-repeat center center;
    background-size: cover; /* 背景图自适应拉伸 */
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    color: white;
    padding: 20px;
}

/* 页眉样式，包含Logo，左对齐 */
header {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    padding: 20px;
}

.logo {
    width: 270px; /* 调整Logo宽度 */
    margin-left: 155px; /* 调整Logo左边距 */
}

h1, h2, .additional-info {
    text-align: left; /* 确保PC端字体左对齐 */
    margin-left: 170px; /* 调整文字左边距 */
}

h1 {
    font-size: 4.5em; /* 调整字体大小 */
    margin-top: 20px; /* 调整PC端标题的上间距 */
    margin-bottom: 10px; /* 调整PC端标题的下间距 */
}

h2 {
    font-size: 2.6em; /* 调整字体大小 */
    margin-top: 10px; /* 调整PC端副标题的上间距 */
    margin-bottom: 10px; /* 调整PC端副标题的下间距 */
}

.additional-info {
    font-size: 1.2em; /* 调整字体大小 */
    line-height: 1.5;
    margin-top: 20px; /* 调整PC端标题的上间距 */
    margin-bottom: 20px; /* 调整PC端附加信息的下间距 */
}

/* 动态图片样式，设置动画效果 */
.dynamic-image {
    width: 800px; /* 调整动态图片宽度 */
    position: absolute;
    right: 150px; /* 调整水平位置 */
    top: 50%; /* 调整垂直位置，使其居中 */
    transform: translateY(-50%); /* 使图片垂直居中 */
    animation: sway 6s infinite ease-in-out;
}

/* 动画关键帧，设置较大的左右晃动效果 */
@keyframes sway {
    0%, 100% { transform: translateY(-50%) rotate(0deg); }
    50% { transform: translateY(-50%) rotate(3deg); }
}

.download-button img {
    width: 230px; /* 调整下载按钮宽度 */
    margin-right: 10px; /* 调整下载按钮之间的间距 */
}

/* 版权信息样式 */
.copyright {
    text-align: center;
    font-size: 0.8em;
    margin-top: 10px;
    width: 100%; /* 确保版权信息占据整个页脚的宽度 */
}

/* 电脑端样式，针对宽度大于等于769px的设备 */
@media (min-width: 769px) {
    main {
        width: 100%;
        text-align: left; /* 调整字体左对齐 */
    }

    footer {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start; /* 页脚内容左对齐 */
        padding: 20px;
        padding-left: 0px; /* 调整下载按钮左边距 */
    }

    .download-buttons {
        display: flex;
        justify-content: flex-start; /* 使PC端下载按钮左对齐 */
        margin-left: 170px; /* 调整PC端下载按钮的左边距 */
        margin-top: -100px; /* 调整PC端下载按钮的上间距 */
        margin-bottom: 140px;
    }

    .copyright {
        text-align: center; /* 页脚版权信息居中 */
        margin-left: 0; /* 确保版权信息在PC端居中 */
        width: 100%; /* 确保版权信息占据整个页脚的宽度 */
    }
}

/* 移动端样式，针对宽度小于768px的设备 */
@media (max-width: 768px) {
    .container {
        align-items: center; /* 确保所有内容居中对齐 */
    }

    .logo {
        width: 140px; /* 调整移动端Logo宽度 */
        margin-top: -20px;
        margin-left: 0; /* 移动端Logo居中 */
    }

    h1 {
        font-size: 1.9em; /* 调整移动端字体大小 */
        text-align: center; /* 移动端字体居中 */
        margin-left: 0; /* 移动端字体居中 */
        margin-top: 0px; /* 调整移动端标题的上间距 */
        margin-bottom: 350px; /* 调整移动端标题的下间距 */
    }

    h2 {
        font-size: 1.1em; /* 调整移动端字体大小 */
        text-align: center; /* 移动端字体居中 */
        margin-left: 0; /* 移动端字体居中 */
        margin-top: 10px; /* 调整移动端副标题的上间距 */
        margin-bottom: 10px; /* 调整移动端副标题的下间距 */
    }

    .additional-info {
        font-size: 0.96em; /* 调整移动端附加信息字体大小 */
        text-align: center; /* 移动端附加信息居中 */
        margin-left: 0; /* 移动端附加信息居中 */
        margin-bottom: 15px;
    }

    .dynamic-image {
        width: 200px; /* 调整移动端动态图片宽度 */
        top: 50%; /* 调整移动端动态图片的垂直位置 */
        left: 30%; /* 调整水平位置，使其居中 */
        transform: translate(-50%, -50%); /* 使图片居中 */
    }

    .download-buttons {
        display: flex;
        justify-content: center;
        margin-bottom: 20px;
    }

    .download-button img {
        width: 150px; /* 调整移动端下载按钮宽度 */
        margin-right: 5px; /* 调整移动端下载按钮之间的间距 */
    }

    .download-button img:last-child {
        margin-right: 0; /* 去掉最后一个按钮的右边距 */
    }

    footer {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center; /* 页脚内容居中 */
        padding: 20px;
    }

    .copyright {
        text-align: center; /* 页脚版权信息居中 */
        margin-left: 0; /* 确保版权信息在移动端居中 */
        width: 100%; /* 确保版权信息占据整个页脚的宽度 */
    }
}
