/* 用户中心布局 */
.user-center-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-height: 120px; /* 可以根据实际内容调整 */
    max-width: 280px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    -webkit-backdrop-filter: blur(10px); /* 添加此行 */
    backdrop-filter: blur(10px);
    flex-grow: 1;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 8px;
    margin: 5px 0;
    flex: 1;
    justify-content: center;
}

.user-info div {
    width: 80%;
    max-width: 300px;
    position: relative;
    margin: 0 auto;
}

.currency-label {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #333;
    font-size: 16px;
    pointer-events: none;
    text-align: left;
}

.user-info input {
    width: 100%;
    padding: 8px 12px 8px 60px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.2);
    -webkit-backdrop-filter: blur(10px); /* 添加此行 */
    backdrop-filter: blur(10px);
    color: #333;
    font-size: 16px;
    cursor: default;
    box-sizing: border-box;
}

.currency-container {
    display: flex;
    align-items: center;
    gap: 5px;
    width: 100%;
    max-width: 240px;
    position: relative;
    margin: 0 auto;
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 5px;
    padding-bottom: 3px;
    flex-wrap: wrap;
}

.logout-btn, .admin-btn, .purchase-log-btn {
    flex: 1;
    min-width: 80px;
    max-width: 150px;
    padding: 6px 12px;
    background: rgba(0, 123, 255, 0.8);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    -webkit-backdrop-filter: blur(10px); /* 添加此行 */
    backdrop-filter: blur(10px);
    transition: background 0.3s ease;
}

.logout-btn:hover, .admin-btn:hover, .purchase-log-btn:hover {
    background: rgba(0, 86, 179, 0.9);
}

/* 调整左侧容器布局 */
.left-side {
    display: flex;
    flex-direction: column;
    gap: 17px; /* 将间距从18px减小到17px */
    width: 280px; /* 固定左侧容器宽度 */
}

/* 统一卡片样式 */
.user-center-box,
.recharge-box,
.purchase-log-box {
    width: 100%;
    max-width: 280px;
    min-height: 160px; /* 根据内容调整最小高度 */
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    -webkit-backdrop-filter: blur(10px); /* 添加此行 */
    backdrop-filter: blur(10px);
}

/* 购买记录盒子样式优化 */
.purchase-log-box {
    flex: 1;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto; /* 垂直滚动 */
    padding: 15px;
}

.purchase-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* 使用网格布局 */
    gap: 15px; /* 增加间距 */
    padding: 15px;
}

.purchase-item {
    display: flex;
    flex-direction: column; /* 垂直排列 */
    background: rgba(255, 255, 255, 0.1);
    padding: 10px; /* 减少内边距 */
    border-radius: 10px; /* 增加圆角 */
    transition: transform 0.2s ease;
}

.purchase-item:hover {
    transform: translateY(-3px); /* 悬停效果 */
    background: rgba(255, 255, 255, 0.2);
}

.item-name {
    font-size: 12px; /* 缩小字体 */
    color: red; /* 物品名换成红色 */
    font-weight: 500;
    word-break: break-word; /* 允许长单词换行 */
}

.item-details {
    display: flex;
    justify-content: space-between; /* 水平排列 */
    margin-top: 5px; /* 增加顶部间距 */
}

.item-time {
    font-size: 10px; /* 缩小字体 */
    color: #666;
    opacity: 0.8;
}

.item-cost {
    font-size: 12px; /* 缩小字体 */
    color: #444;
    font-weight: 500;
    text-align: right; /* 右对齐 */
}

/* 自定义滚动条样式 */
.purchase-log-box::-webkit-scrollbar {
    width: 4px;
}

.purchase-log-box::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}

.purchase-log-box::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 2px;
}

.purchase-log-box::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

.cart-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    -webkit-backdrop-filter: blur(10px); /* 添加此行 */
    backdrop-filter: blur(10px);
}

.cart-item .item-name {
    flex: 1;
    text-align: left;
}

.cart-item .item-quantity {
    margin-left: 12px;
}

.cart-item button {
    padding: 4px 8px;
    background: rgba(255, 0, 0, 0.8);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.cart-item button:hover {
    background: rgba(179, 0, 0, 0.9);
}

.qr-code-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 15px auto;
    padding: 10px;
    /* 移除白色背景 */
    background: transparent;
    border-radius: 8px;
    width: 180px;
    height: 180px;
    /* 添加微弱的阴影以提高可见度 */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.qr-code {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    /* 添加图片混合模式以优化显示效果 */
    mix-blend-mode: multiply;
}

.payment-methods {
    display: flex;
    justify-content: center;
    gap: 8px; /* 减小按钮之间的间距 */
    margin-top: 10px;
}

.payment-btn {
    flex: 0 0 85px; /* 固定宽度为85px，不允许伸缩 */
    padding: 6px 10px; /* 减小内边距 */
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 13px; /* 稍微减小字体大小 */
    transition: all 0.3s ease;
}

/* 充值金额输入框容器 */
.recharge-amount {
    display: flex;
    justify-content: center;
    margin: 10px auto;
    width: 80%; /* 控制容器宽度 */
    max-width: 200px;
}

.recharge-amount input {
    width: 180px; /* 收窄输入框宽度 */
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.2);
    -webkit-backdrop-filter: blur(10px); /* 添加此行 */
    backdrop-filter: blur(10px);
}

.wechat {
    background-color: #07c160;
}

.alipay {
    background-color: #1677ff;
}

/* 赞助说明卡片样式 */
.recharge-box {
    width: 100%;
    max-width: 280px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    -webkit-backdrop-filter: blur(10px); /* 添加此行 */
    backdrop-filter: blur(10px);
}

/* 赞助说明模态框和遮罩层的容器 */
.modal-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none; /* 允许点击穿透到底层元素 */
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 赞助说明模态框样式 */
.recharge-tips-modal {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 12px;
    max-width: 200px; /* 减小最大宽度 */
    width: 85%; /* 收窄宽度比例 */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: auto;
    margin: 0 auto;
}

/* 本地遮罩层样式 */
.modal-overlay {
    position: absolute; /* 改为absolute定位 */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent; /* 移除背景色 */
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: auto; /* 允许遮罩层可点击 */
}

/* 优化模态框内容样式 */
.recharge-tips-modal h3 {
    margin: 0 0 8px 0;
    font-size: 15px;
    color: #333;
}

.recharge-tips-modal ul {
    padding-left: 16px;
    margin: 8px 0;
}

.recharge-tips-modal li {
    font-size: 13px;
    line-height: 1.4;
    color: #666;
}

/* 遮罩层样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.modal-overlay.show {
    display: block;
    opacity: 1;
}

.recharge-tips-modal.show {
    display: block;
    opacity: 1;
}

.recharge-tips-modal h3 {
    margin-top: 0;
    font-size: 16px;
    color: #333;
}

.recharge-tips-modal ul {
    padding-left: 20px;
    margin: 10px 0;
}

.recharge-tips-modal li {
    font-size: 14px;
    line-height: 1.4;
    color: #666;
}

/* 移除关闭按钮样式，因为现在点击任何地方都能关闭 */
.close-btn {
    display: none;
}

.right-side {
    display: flex;
    flex-direction: column;
    width: calc(100% - 300px); /* 调整右侧容器宽度 */
    padding: 20px;
}

.shop-box {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    -webkit-backdrop-filter: blur(10px); /* 添加此行 */
    backdrop-filter: blur(10px);
}

