* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", sans-serif;
}

body {
    padding: 0;
    margin: 0;
    /* 背景图片样式 */
    background: url('https://www.222z.cn/wp-content/uploads/2025/12/29081806228.png') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
}

/* 背景遮罩（提升文字可读性） */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

/* 弹窗遮罩层 - 默认显示 */
.pay-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 10px; /* 减少左右内边距 */
    overflow-y: auto; /* 确保遮罩层可滚动 */
}

/* 支付弹窗主体 - 核心响应式优化 + 整体缩小10% */
.pay-modal {
    background-color: white;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh; /* 关键：限制弹窗最大高度为视口90% */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 10;
    overflow-y: auto; /* 内容超出时可滚动 */
    /* 核心修改：整体缩小10% */
    transform: scale(0.9);
    /* 保证缩放后依然居中 */
    transform-origin: center center;
}

/* 限时活动标签 */
.activity-tag {
    position: absolute;
    top: 1px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ff4d4f;
    color: white;
    font-size: 12px;
    padding: 4px 16px;
    border-radius: 20px;
    font-weight: 600;
    z-index: 11;
}

/* 弹窗头部 */
.pay-modal-header {
    padding: 15px 20px; /* 减少上下内边距 */
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    margin-top: 15px;
}

/* 关闭按钮 */
.pay-modal-close {
    position: absolute;
    top: 15px; /* 适配头部内边距调整 */
    right: 15px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #999;
    transition: color 0.2s ease;
    z-index: 11;
}

.pay-modal-close:hover {
    color: #333;
}

/* 会员权益标题 */
.pay-modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    text-align: center;
}

/* 会员权益描述 */
.pay-modal-desc {
    font-size: 14px;
    color: #666;
    text-align: center;
    line-height: 1.6;
    margin-bottom: 10px;
}

/* 倒计时样式 */
.countdown-box {
    background-color: #fff2f0;
    color: #ff4d4f;
    font-size: 16px;
    padding: 6px;
    border-radius: 4px;
    text-align: center;
    margin-top: 10px;
}

.countdown-text {
    font-weight: 600;
}

.countdown-time {
    font-family: monospace;
    margin: 0 4px;
}

/* 弹窗内容区 */
.pay-modal-body {
    padding: 15px 20px; /* 减少上下内边距 */
}

/* 会员套餐选项 */
.package-options {
    display: flex;
    flex-direction: column;
    gap: 10px; /* 减少套餐间距 */
    margin-bottom: 10px; /* 减少底部间距 */
}

.package-item {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px; /* 减少内边距 */
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* 选中的套餐样式 */
.package-item.active {
    border-color: #409eff;
    background-color: #f8faff;
}

.package-item:hover {
    border-color: #ccc;
}

/* 推荐标签 */
.recommend-tag {
    position: absolute;
    top: -10px;
    right: 15px;
    background-color: #f00;
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.package-info h3 {
    font-size: 16px; /* 缩小标题字体 */
    color: #333;
    margin-bottom: 2px; /* 减少间距 */
}

.package-info p {
    font-size: 13px; /* 缩小描述字体 */
    color: #666;
    margin-bottom: 2px; /* 减少间距 */
}

/* 原价样式 */
.package-original-price {
    font-size: 11px; /* 缩小原价字体 */
    color: #999;
    text-decoration: line-through;
}

.package-price {
    font-size: 18px; /* 缩小价格字体 */
    font-weight: 600;
    color: #ff4d4f;
}

/* 支付方式选择 */
.pay-methods {
    margin-bottom: 15px; /* 减少底部间距 */
}

.pay-methods-title {
    font-size: 15px; /* 缩小标题字体 */
    font-weight: 600;
    color: #333;
    margin-bottom: 8px; /* 减少间距 */
}

.pay-method-options {
    display: flex;
    gap: 10px;
}

/* 仅保留支付宝 */
.pay-method-item {
    width: 100%;
    border: 2px solid #409eff;
    border-radius: 8px;
    padding: 5px; /* 减少内边距 */
    background-color: #f8faff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pay-method-icon {
    width: 26px; /* 缩小图标 */
    height: 26px;
    background-color: #108ee9;
    border-radius: 4px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px; /* 缩小图标内字体 */
    font-weight: bold;
}

.pay-method-text {
    font-size: 15px; /* 缩小文字 */
    color: #333;
    font-weight: 500;
}

/* 自动发货提示 */
.delivery-tips {
    background-color: #f0f9ff;
    color: #409eff;
    font-size: 12px; /* 缩小提示字体 */
    padding: 6px 10px; /* 减少内边距 */
    border-radius: 4px;
    margin-bottom: 15px; /* 减少底部间距 */
    line-height: 1.5;
}

/* 确认支付按钮 */
.confirm-pay-btn {
    width: 100%;
    padding: 14px; /* 调整按钮内边距 */
    background-color: #ff4d4f;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 17px; /* 调整按钮字体 */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(255, 77, 79, 0.3);
}

.confirm-pay-btn:hover {
    background-color: #ff3333;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 77, 79, 0.4);
}

.confirm-pay-btn:active {
    transform: translateY(0);
}

/* 活动结束样式 */
.activity-ended .confirm-pay-btn {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 支付成功弹窗（隐藏）+ 同步缩小10% */
.success-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 10px; /* 减少内边距 */
    overflow-y: auto;
}

.success-content {
    background-color: white;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    max-height: 85vh; /* 限制成功弹窗高度 */
    padding: 20px 15px; /* 减少内边距 */
    text-align: center;
    overflow-y: auto; /* 内容超出可滚动 */
    /* 同步缩小成功弹窗 */
    transform: scale(0.9);
    transform-origin: center center;
}

.success-icon {
    font-size: 40px; /* 缩小图标 */
    color: #52c41a;
    margin-bottom: 12px; /* 减少间距 */
}

.success-title {
    font-size: 18px; /* 缩小标题 */
    color: #333;
    font-weight: 600;
    margin-bottom: 8px; /* 减少间距 */
}

.success-desc {
    font-size: 13px; /* 缩小描述 */
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px; /* 减少间距 */
}

.success-code {
    background-color: #f5f5f5;
    padding: 8px; /* 减少内边距 */
    border-radius: 4px;
    font-family: monospace;
    font-size: 15px; /* 缩小字体 */
    color: #ff4d4f;
    margin: 10px 0; /* 减少间距 */
    word-break: break-all;
}

.success-btn {
    padding: 10px 20px;
    background-color: #409eff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
}

/* 响应式适配 - 平板 (768px 以下) */
@media (max-width: 768px) {
    .pay-modal {
        max-width: 90%; /* 平板占90%宽度 */
        max-height: 85vh; /* 稍微降低高度 */
        transform: scale(0.9); /* 平板端保持10%缩小 */
    }
    
    .pay-modal-title {
        font-size: 19px;
    }
    
    .package-price {
        font-size: 17px;
    }

    .success-content {
        transform: scale(0.9); /* 平板端成功弹窗同步缩小 */
    }
}

/* 响应式适配 - 手机 (480px 以下) */
@media (max-width: 480px) {
    .pay-modal-overlay {
        padding: 5px; /* 进一步减少边距 */
    }
    
    .pay-modal {
        max-width: 95%; /* 手机占95%宽度 */
        max-height: 90vh; /* 占视口90%高度 */
        transform: scale(0.95); /* 手机端适度缩小（可选：避免太小） */
    }
    
    .pay-modal-header, .pay-modal-body {
        padding: 12px 15px; /* 大幅减少内边距 */
    }

    .pay-modal-title {
        font-size: 17px; /* 进一步缩小标题 */
    }
    
    .pay-modal-desc {
        font-size: 13px; /* 缩小描述 */
        line-height: 1.5;
    }
    
    .countdown-box {
        font-size: 14px; /* 缩小倒计时字体 */
        padding: 4px;
    }

    .package-item {
        padding: 8px; /* 减少套餐内边距 */
    }
    
    .package-info h3 {
        font-size: 14px;
    }
    
    .package-info p {
        font-size: 12px;
    }
    
    .package-price {
        font-size: 16px;
    }

    .confirm-pay-btn {
        padding: 13px;
        font-size: 16px;
    }
    
    .success-content {
        max-width: 95%;
        max-height: 80vh;
        padding: 15px 12px;
        transform: scale(0.95); /* 手机端成功弹窗适度缩小 */
    }
    
    .success-icon {
        font-size: 36px;
    }
    
    .success-title {
        font-size: 17px;
    }
    
    .success-desc {
        font-size: 12px;
    }
}
