body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 70%; /* 页面内容宽度设置为70%，两侧自动留出15%的空白 */
    margin: auto; /* 自动边距确保内容水平居中 */
}

.header, .wallpaper-grid, .footer-container {
    width: 100%; /* 确保头部、网格和底部容器宽度与body一致 */
}
/* 搜索栏样式 */
.search-container {
    margin-top: 20px;
}

.search-container input, .search-container button {
    padding: 10px;
    margin-right: 5px;
}


header {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* 根据需要调整对齐方式center */
    width: 100%; /* 确保header宽度占满整个容器宽度 */
    padding: 20px; /* 添加一些内边距以避免内容紧贴屏幕边缘 */
}
.site-name {
    font-size: 34px; /* 调整字体大小 */
    margin-left: 20px; /* 和logo的间距 */
    color: #333; /* 字体颜色，确保它与背景有足够对比 */
}
header img.logo {
    max-width: 100px;
    margin: 20px 0;
}
.wallpaper-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); /* 根据图片实际宽度调整 */
    gap: 10px;
    padding: 0 20px;
    margin-bottom: 20px;
}

.wallpaper-grid img {
    width: 100%;
    height: auto;
    cursor: pointer;
    transition: transform 0.2s;
}
.wallpaper-grid img:hover {
    transform: scale(1.05);
}
.download-buttons {
    position: fixed;
    bottom: 20px;
    width: calc(100% - 40px);
    display: flex;
    justify-content: center;
    gap: 10px;
}
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
    text-align: center; /* 确保内容居中 */
    flex-direction: column; /* 设置Flex容器的主轴方向为垂直方向 */
    overflow-y: auto; /* 添加滚动条以防内容超出视窗 */
}

.overlay img {
    max-width: 80%;
    max-height: 80%;
}

.overlay-text {
    margin-top: 20px; /* 设置与图片的间隔 */
    font-size: 18px; /* 设置字体大小 */
    color: white; /* 设置文字颜色为白色 */
    font-weight: bold; /* 可选：设置文字加粗 */
}

.closeOverlay {
    position: absolute;
    top: 20px;
    right: 20px;
    cursor: pointer; /* 显示为可点击的光标 */
    color: white; /* 设置关闭按钮颜色为白色，可根据需要调整 */
    font-size: 24px; /* 设置关闭按钮的字体大小 */
}



/* 收款码遮罩层样式 */
#paymentCodeOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
    text-align: center;
}

#paymentCodeOverlay img {
    max-width: 80%;
    max-height: 80%;
}


.footer-container {
    width: 100%;
    padding: 20px 0;
    background-color: #f8f8f8; /* 轻灰色背景，根据需要调整 */
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1); /* 向上的阴影效果 */
    position: fixed;
    bottom: 0;

    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px; /* 按钮之间的间距 */
}

.footer-container button {
    padding: 15px 30px; /* 增大按钮的填充区域 */
    font-size: 18px; /* 增大字体大小 */
    cursor: pointer;
    border: none;
    border-radius: 5px; /* 轻微的圆角 */
    background-color: #007bff; /* 蓝色背景，根据需要调整 */
    color: white; /* 字体颜色 */
    transition: background-color 0.3s; /* 平滑的背景色过渡效果 */
}

.footer-container button:hover {
    background-color: #0056b3; /* 鼠标悬浮时的背景色变暗 */
}
/* 搜索容器样式，使其宽度与壁纸网格一致 */
.search-container {
    width: 90%; /* 与壁纸网格宽度一致 */
    margin: 20px auto; /* 上下外边距为20px，自动左右外边距使其居中 */
    display: flex;
    justify-content: space-between; /* 使输入框和按钮分布在两端 */
    padding: 10px; /* 内边距 */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* 添加阴影效果 */
    border-radius: 5px; /* 边角圆滑 */
}

/* 搜索输入框样式 */
.search-container input {
    width: 80%; /* 输入框占据大部分空间 */
    padding: 10px;
    border: 1px solid #ccc; /* 边框颜色 */
    border-radius: 5px; /* 边角圆滑 */
    margin-right: 10px; /* 与按钮的间距 */
}

/* 搜索按钮样式，进行美化 */
.search-container button {
    padding: 10px 20px;
    background-color: #007bff; /* 背景颜色 */
    color: white; /* 文字颜色 */
    border: none;
    border-radius: 5px; /* 边角圆滑 */
    cursor: pointer;
    transition: background-color 0.3s ease; /* 鼠标悬停时背景色变化的过渡效果 */
}

.search-container button:hover {
    background-color: #0056b3; /* 鼠标悬停时的背景色 */
}


.search-container input, .search-container button {
    padding: 10px;
    margin-right: 5px;
}

.image-container {
    position: relative; /* 为图片容器设置相对定位 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh; /* 确保容器至少和视窗一样高 */
    padding: 20px;
    box-sizing: border-box; /* 防止padding影响到总宽度和总高度 */
    background-color: #e5eccf; /* 更改背景色，根据需要调整 */
}

.image-container img {

    max-width: 100%;
    max-height: 90vh; /* 调整最大高度为视窗高度的80% */
    margin-bottom: 20px; /* 为图片和标题之间添加间距 */
}

.image-title {
    font-size: 24px;
    color: #080808; /* 修改标题颜色以提高可读性 */
    text-align: center;
    margin-bottom: 20px;
}

.back-button {
    position: absolute; /* 使用绝对定位 */
    top: 0; /* 对齐到容器的顶部 */
    left: 0; /* 对齐到容器的左侧 */
    transform: translate(-100%, 0); /* 将按钮移出容器外 */
    cursor: pointer;
    padding: 10px 20px;
    font-size: 18px;
    color: white;
    background-color: #007bff; /* 示例按钮颜色，根据需要调整 */
    border: none;
    border-radius: 5px;
    text-decoration: none; /* 移除下划线 */
}
