/* 提示词兑换券购买弹窗样式 */
.coupon-purchase-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.coupon-purchase-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.coupon-purchase-content {
    position: relative;
    background-color: #fff;
    border-radius: 12px;
    width: 900px;
    /* 增加宽度以适应双栏布局 */
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    animation: couponPurchaseSlideIn 0.3s ease-out;
}

@keyframes couponPurchaseSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.coupon-purchase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.coupon-purchase-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.coupon-purchase-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.coupon-purchase-close:hover {
    color: #333;
}

.coupon-purchase-body {
    padding: 20px;
}

.coupon-purchase-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 20px 20px;
    border-top: 1px solid #eee;
}

/* 移植的样式 */
.tip-banner {
    margin-bottom: 20px;
    padding: 12px 16px;
    background-color: #e8f5e9;
    border-radius: 6px;
    font-size: 14px;
    color: #2e7d32;
    display: flex;
    align-items: center;
}

.layout {
    display: flex;
    gap: 30px;
}

.left-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 500px;
    overflow-y: auto;
}

.coupon-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 2px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    padding: 20px;
}

.coupon-card:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.coupon-card.selected {
    border-color: #3b82f6;
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.15);
}

.coupon-check {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #ddd;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.coupon-card.selected .coupon-check {
    background-color: #22c55e;
    border-color: #22c55e;
    width: 24px;
    height: 24px;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.coupon-check-icon {
    color: #fff;
    font-size: 14px;
    display: none;
}

.coupon-card.selected .coupon-check-icon {
    display: inline-block;
}

.coupon-title {
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 8px;
}

.coupon-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.coupon-price {
    color: #ef4444;
    font-size: 24px;
    font-weight: bold;
}

.coupon-count {
    background-color: #dcfce7;
    color: #16a34a;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.coupon-avg {
    font-size: 12px;
    color: #666;
}

/* 右侧支付区域 */
.pay-section {
    flex: 1;
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
}

.price-comparison {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 10px;
}

.simple-comparison {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #f1f5f9 0%, #f8fafc 100%);
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.comparison-item {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.single-item {
    background-color: #fef2f2;
    border: 1px solid #fee2e2;
}

.coupon-item {
    background-color: #f0fdf4;
    border: 1px solid #dcfce7;
}

.item-title {
    font-size: 14px;
    color: #374151;
    margin-bottom: 5px;
    font-weight: 500;
}

.item-price {
    font-size: 24px;
    font-weight: bold;
    color: #ef4444;
    margin-bottom: 5px;
}

.discount-price {
    font-size: 24px;
    color: #ef4444;
}

.vs-sign {
    font-size: 16px;
    font-weight: bold;
    color: #6b7280;
    margin: 0 10px;
    align-self: center;
    padding: 5px 10px;
    background-color: #fff;
    border-radius: 15px;
}

.discount-tag {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
}

.price-diff {
    text-align: center;
    margin-bottom: 15px;
    padding: 12px;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #92400e;
    border: 1px solid #fed7aa;
}

.saving-amount {
    color: #ef4444;
    font-weight: bold;
    font-size: 18px;
}

.purchase-info {
    text-align: center;
}

.total-section {
    margin-bottom: 15px;
    font-size: 16px;
}

.total-price {
    color: #ef4444;
    font-size: 24px;
    font-weight: bold;
}

.buy-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* 二维码区域 */
.alipay-section {
    text-align: center;
    padding-top: 20px;
}

.qr-box {
    width: 180px;
    height: 180px;
    background-color: #f5f5f5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.qr-code-container img,
.qr-code-container canvas {
    border-radius: 4px;
}

.qr-loading {
    width: 150px;
    height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loading-text {
    color: #999;
    font-size: 12px;
    margin-top: 10px;
}

.pay-tip {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.pay-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.amount-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.total-amount {
    font-size: 24px;
    font-weight: bold;
    color: #ef4444;
}

.after-tip {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.coupon-summary-count {
    color: #4caf50;
    font-weight: bold;
}

.loading-packages,
.error-msg {
    text-align: center;
    padding: 40px;
    color: #999;
}