/* 设置页面整体样式 */
body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    height: 100vh;
    background-color: #f0f0f0;
}

/* 设置背景图片样式 */
.background-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('picture/background.jpg');  /* 替换为你的背景图片路径 */
    background-size: cover;
    background-position: center;
    z-index: -1;  /* 确保背景图片在内容下方 */
}

/* 设置搜索容器样式 */
.search-container {
    display: flex;
    align-items: center;
    justify-content: center; /* 添加，使内容居中 */
    margin-left: auto; /* 修改为auto，使搜索框和logo整体居中 */
    margin-right: auto; /* 添加auto，使搜索框和logo整体居中 */
}

/* 设置logo样式 */
.logo {
    width: 70px;
    height: 50px;
    margin-right: 5px; /* 将margin-right从300px调整为10px，使logo紧贴搜索框 */
}

/* 设置搜索框样式 */
.search-box {
    width: 600px;
    height: 50px;
    padding: 10px;
    border: 2px solid #ccc;
    border-radius: 25px;  /* 修改为整体椭圆化 */
    font-size: 16px;
    outline: none;
}

/* 设置搜索按钮样式 */
.search-button {
    width: 100px;
    height: 50px;
    border: none;
    background-color: #007BFF;
    color: white;
    font-size: 16px;
    border-radius: 25px;  /* 修改为整体椭圆化 */
    cursor: pointer;
}

/* 设置搜索按钮悬停效果 */
.search-button:hover {
    background-color: #0056b3;
}

/* 设置用户面板样式 */
.user-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 设置用户头像样式 */
.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #007BFF;
}

/* 设置登录按钮样式 */
.login-button, .register-button {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    color: white;
}

/* 设置登录按钮颜色 */
.login-button {
    background-color: #28a745;
}

/* 设置登录按钮悬停效果 */
.login-button:hover {
    background-color: #218838;
}

/* 设置注册按钮颜色 */
.register-button {
    background-color: #dc3545;
}

/* 设置注册按钮悬停效果 */
.register-button:hover {
    background-color: #c82333;
}

/* 设置积分容器样式 */
.points-container {
    position: absolute;
    top: 120px;
    left: 20px;
    width: 300px;
    background-color: rgba(255, 255, 255, 0.5);  /* 修改为半透明白色 */
    backdrop-filter: blur(10px);  /* 添加磨砂效果 */
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 设置我的当前积分样式 */
.my-points {
    position: absolute;
    top: -30px;
    left: 20px;
    font-size: 18px;
    font-weight: bold;
    color: #000000;
    font-family: 'Arial', sans-serif; /* 使用美观字体 */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1); /* 添加轻微阴影效果 */
}

/* 设置功能容器样式 */
.function-container {
    position: absolute;
    top: 200px; /* 调整顶部位置以填补右侧空缺 */
    right: 50px; /* 确保右侧对齐 */
    display: flex;
    flex-direction: column; /* 修改为纵向排列 */
    gap: 10px; /* 增加间距 */
    width: 100px; /* 设置固定宽度 */
}

/* 设置功能项样式 */
.function-item {
    width: 100%; /* 使每个功能项宽度占满容器 */
    height: auto; /* 修改高度为自动以适应文字 */
    display: flex;
    flex-direction: column; /* 垂直排列图标和文字 */
    justify-content: center;
    align-items: center;
    background-color: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    padding: 10px; /* 添加内边距以增加间距 */
}

/* 设置新添加的图片样式 */
.new-image {
    width: 100%; /* 使图片宽度占满容器 */
    height: auto; /* 使图片高度自适应 */
    position: relative; /* 调整位置 */
    justify-content: center;
    align-items: center;
    background-color: #406080;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

/* 设置新图片悬停效果 */
.new-image:hover {
    transform: scale(1.1);
}

/* 设置功能项悬停效果 */
.function-item:hover {
    transform: scale(1.1);
}

/* 设置功能图标样式 */
.function-icon {
    width: 40px;
    height: 40px;
}

/* 设置图片展示板块样式 */
.image-slider {
    position: absolute;
    top: 50%;
    left: calc(50% + 40px); /* 修改为 calc(50% + 30px) 以向右平移30px */
    transform: translate(-50%, -50%);
    width: 750px;
    height: 450px;
    background-color: #fff;
    border: 2px solid #ccc;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 设置展示图片样式 */
.slider-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 1s ease-in-out; /* 添加过渡效果 */
}

/* 设置商品容器样式 */
.products {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 设置商品项样式 */
.product {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* 设置商品图片样式 */
.product-image {
    width: 150px;
    height: 150px;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

/* 设置商品图片悬停效果 */
.product-image:hover {
    transform: scale(1.05);
}

/* 设置商品名称样式 */
.product-name {
    font-size: 16px;
    font-weight: bold;
    margin-top: 10px;
}

/* 设置商品描述样式 */
.product-description {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* 设置商品积分样式 */
.product-points {
    font-size: 14px;
    color: #007BFF;
    margin-top: 5px;
}

/* 设置登录容器样式 */
.login-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    padding: 40px;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

/* 设置表单组样式 */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

/* 设置表单标签样式 */
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #333;
}

/* 设置表单输入框样式 */
.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    outline: none;
}

/* 设置登录提交按钮样式 */
.login-submit-button {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 5px;
    background-color: #28a745;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

/* 设置登录提交按钮悬停效果 */
.login-submit-button:hover {
    background-color: #218838;
}

/* 设置注册容器样式 */
.register-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    padding: 40px;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

/* 设置注册提交按钮样式 */
.register-submit-button {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 5px;
    background-color: #007BFF;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

/* 设置注册提交按钮悬停效果 */
.register-submit-button:hover {
    background-color: #0056b3;
}

/* 设置积分兑换容器样式 */
.points-exchange-container {
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 1200px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

/* 设置今日可兑换产品标题样式 */
.today-exchange {
    font-size: 24px;
    margin-bottom: 20px;
}

/* 设置产品网格样式 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 修改为每行显示3个产品 */
    gap: 15px; /* 调整间距以避免超出边界 */
    justify-content: center;
}

/* 设置产品项样式 */
.product-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* 设置产品图片样式 */
.product-image {
    width: 150px;
    height: 150px;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

/* 设置产品图片悬停效果 */
.product-image:hover {
    transform: scale(1.05);
}

/* 设置产品信息样式 */
.product-info {
    margin-top: 10px;
}

/* 设置产品积分样式 */
.product-points {
    font-size: 14px;
    color: #007BFF;
}

/* 设置产品描述样式 */
.product-description {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* 设置产品详情容器样式 */
.product-detail-container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* 设置产品详情背景样式 */
.product-detail-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(10px); /* 添加模糊效果 */
    z-index: -1;
}

/* 设置产品详情内容样式 */
.product-detail-content {
    position: relative;
    width: 80%;
    max-width: 600px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

/* 设置产品详情图片样式 */
.product-detail-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 20px;
}

/* 设置产品详情积分样式 */
.product-detail-points {
    font-size: 20px;
    color: #007BFF;
    margin-bottom: 10px;
}

/* 设置产品详情描述样式 */
.product-detail-description {
    font-size: 16px;
    color: #333;
    line-height: 1.5;
}

/* 设置我的账户按钮样式 */
.my-account-button {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    color: white;
    background-color: #007BFF; /* 使用蓝色作为主色调 */
    transition: background-color 0.3s ease; /* 添加平滑过渡效果 */
}

/* 设置我的账户按钮悬停效果 */
.my-account-button:hover {
    background-color: #0056b3; /* 悬停时颜色变深 */
}

/* 新增热门推荐板块样式 */
.hot-products-container {
    position: absolute;
    top: 700px; /* 将top从600px调整为700px */
    left: 50px;
    width: 40%;
    padding: 20px;
    background-color: transparent; /* 修改为透明 */
    backdrop-filter: none; /* 删除磨砂效果 */
    border-radius: 0; /* 删除圆角 */
    box-shadow: none; /* 删除阴影 */
}

/* 新增新品上架板块样式 */
.new-products-container {
    position: absolute;
    top: 700px; /* 将top从600px调整为700px */
    right: 50px;
    width: 40%;
    padding: 20px;
    background-color: transparent; /* 修改为透明 */
    backdrop-filter: none; /* 删除磨砂效果 */
    border-radius: 0; /* 删除圆角 */
    box-shadow: none; /* 删除阴影 */
}

/* 通用商品项样式 */
.product-item {
    background-color: #fff;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.product-item:hover {
    transform: translateY(-5px);
}

/* 通用标题样式 */
h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

/* 设置收藏图标样式 */
.favorite-icon {
    width: 24px;
    height: 24px;
    cursor: pointer;
    margin-left: 10px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.favorite-icon.empty {
    color: #ccc;
}

.favorite-icon.filled {
    color: #ffcc00;
}

.favorite-icon::after {
    content: "收藏";
    font-size: 14px;
    color: #333;
}
