/* 支付弹窗样式 - 蓝色系统主题版 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap');

.payment-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 99999 !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
    overflow-y: auto;
    box-sizing: border-box;
}

.payment-modal-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
}

.payment-modal-overlay.active .payment-modal {
    transform: translateY(0) scale(1) !important;
    opacity: 1 !important;
}

/* 第一个页面 - 套餐选择，缩小尺寸 */
.payment-modal {
    width: 100% !important;
    max-width: 720px !important;
    min-width: 600px !important;
    background: #ffffff !important;
    border-radius: 20px !important;
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.25),
        0 10px 30px rgba(0, 0, 0, 0.15) !important;
    overflow: hidden !important;
    transform: translateY(20px) scale(0.96) !important;
    opacity: 0 !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif !important;
    z-index: 99999 !important;
    position: relative !important;
}

/* 头部区域 - 蓝色主题 */
.payment-header {
    background: linear-gradient(135deg, #1677ff 0%, #4096ff 50%, #69b1ff 100%) !important;
    color: white !important;
    padding: 24px 32px !important;
    position: relative !important;
    overflow: hidden !important;
}

.payment-header::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.payment-header::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: -40px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.payment-header h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
    letter-spacing: -0.3px;
}

.payment-header h2 i {
    color: #fff;
    margin-right: 8px;
}

.payment-header p {
    opacity: 0.9;
    font-size: 13px;
    position: relative;
    z-index: 1;
    font-weight: 300;
}

.close-payment {
    position: absolute;
    top: 18px;
    right: 18px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    backdrop-filter: blur(10px);
}

.close-payment:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg) scale(1.05);
}

.payment-content {
    padding: 28px !important;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%) !important;
}

.plan-selection {
    margin-bottom: 20px !important;
}

.plan-selection h3 {
    font-size: 15px !important;
    font-weight: 600 !important;
    margin-bottom: 16px !important;
    color: #1e293b !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.plan-selection h3 i {
    color: #1677ff !important;
    font-size: 16px !important;
}

/* 套餐卡片网格 - 两列布局 */
.plan-cards {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
    margin-bottom: 20px !important;
}

@media (max-width: 640px) {
    .plan-cards {
        grid-template-columns: 1fr;
    }

    .payment-content {
        padding: 20px;
    }

    .payment-header {
        padding: 20px;
    }

    .payment-modal {
        min-width: auto;
        width: 100%;
    }
}

/* 套餐卡片样式 */
.plan-card {
    background: white !important;
    border-radius: 16px !important;
    padding: 20px !important;
    box-shadow: 
        0 2px 12px rgba(0, 0, 0, 0.06),
        0 1px 2px rgba(0, 0, 0, 0.04) !important;
    border: 2px solid transparent !important;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    position: relative !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

/* 隐藏按量扣费套餐 */
.plan-card.pay-as-you-go {
    display: none !important;
}

.plan-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #e2e8f0, #cbd5e1);
    transition: all 0.35s ease;
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 12px 28px rgba(0, 0, 0, 0.1),
        0 4px 8px rgba(0, 0, 0, 0.06);
}

.plan-card.selected {
    border-color: #1677ff;
    box-shadow: 
        0 0 0 3px rgba(22, 119, 255, 0.12),
        0 12px 28px rgba(22, 119, 255, 0.12);
}

.plan-card.selected::before {
    background: linear-gradient(90deg, #1677ff, #4096ff);
}

/* 推荐标签 */
.plan-card.popular::after {
    content: '推荐';
    position: absolute;
    top: 12px;
    right: -28px;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: white;
    padding: 4px 28px;
    font-size: 11px;
    font-weight: 600;
    transform: rotate(45deg);
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
    letter-spacing: 0.5px;
}

.plan-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1565c0;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* 图标样式 */
.plan-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 14px;
    transition: all 0.3s ease;
}

.trial .plan-icon {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    color: #64748b;
}

.standard .plan-icon {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1677ff;
}

.pay-as-you-go .plan-icon {
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    color: #7c3aed;
}

.plan-card:hover .plan-icon {
    transform: scale(1.08) rotate(3deg);
}

.plan-card h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1e293b;
}

.plan-price {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 2px;
    color: #1677ff;
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.plan-price::before {
    content: '¥';
    font-size: 16px;
    font-weight: 500;
}

.plan-period {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 12px;
    font-weight: 400;
}

.plan-features {
    list-style: none;
    margin: 0;
    padding: 0;
    margin-bottom: 12px;
    flex: 1;
}

.plan-features li {
    font-size: 12px;
    line-height: 1.6;
    padding: 4px 0;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 8px;
}

.plan-features li i {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    border-radius: 50%;
}

.plan-features li .fas.fa-check {
    color: #10b981;
    background: #d1fae5;
}

.plan-features li .fas.fa-times {
    color: #ef4444;
    background: #fee2e2;
}

.plan-features li.disabled {
    color: #94a3b8;
    opacity: 0.7;
}

/* 自定义金额区域 */
.custom-amount-container {
    margin-top: 14px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.35s ease;
    visibility: hidden;
}

.custom-amount-container.active {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.custom-amount-label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.custom-amount-label i {
    color: #1677ff;
}

.custom-amount-input {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 6px;
    background: white;
    padding: 3px;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.custom-amount-input:focus-within {
    border-color: #1677ff;
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.1);
}

.amount-prefix {
    font-size: 20px;
    font-weight: 600;
    color: #1677ff;
    padding-left: 12px;
}

.custom-amount {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    background: transparent;
    outline: none;
}

.custom-amount::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.amount-suggestions {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

@media (max-width: 640px) {
    .amount-suggestions {
        grid-template-columns: repeat(3, 1fr);
    }
}

.amount-suggestion {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 4px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.25s ease;
}

.amount-suggestion:hover {
    border-color: #1677ff;
    background: #eff6ff;
    color: #1677ff;
    transform: translateY(-2px);
}

.amount-suggestion.active {
    border-color: #1677ff;
    background: #1677ff;
    color: white;
}

/* 支付按钮 */
.payment-actions {
    display: flex !important;
    justify-content: center !important;
    gap: 12px !important;
    margin-top: 20px !important;
    padding-top: 20px !important;
    border-top: 1px solid #e2e8f0 !important;
}

.payment-button {
    padding: 12px 32px !important;
    border: none !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    letter-spacing: 0.3px !important;
}

.payment-button.secondary {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 2px solid #e2e8f0 !important;
}

.payment-button.secondary:hover {
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
    transform: translateY(-2px) !important;
}

.payment-button.primary {
    background: linear-gradient(135deg, #1677ff 0%, #4096ff 100%) !important;
    color: white !important;
    box-shadow: 
        0 4px 16px rgba(22, 119, 255, 0.35),
        0 2px 6px rgba(22, 119, 255, 0.2) !important;
}

.payment-button.primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 
        0 6px 24px rgba(22, 119, 255, 0.45),
        0 3px 8px rgba(22, 119, 255, 0.3) !important;
}

.payment-button.primary:active {
    transform: translateY(-1px) !important;
}

.payment-button.primary.pulse {
    animation: pulse 2s infinite !important;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 
            0 4px 16px rgba(22, 119, 255, 0.35),
            0 0 0 0 rgba(22, 119, 255, 0.4);
    }
    50% {
        box-shadow: 
            0 4px 16px rgba(22, 119, 255, 0.35),
            0 0 0 10px rgba(22, 119, 255, 0);
    }
}

/* ==================== 支付宝支付弹窗 - 放大版 ==================== */
.qr-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 100000 !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 24px;
}

.qr-modal.active {
    opacity: 1 !important;
    visibility: visible !important;
}

.qr-modal.active .qr-container {
    transform: translateY(0) scale(1) !important;
    opacity: 1 !important;
}

/* 第二个页面 - 支付宝支付，放大尺寸 */
.qr-container {
    background: white !important;
    border-radius: 20px !important;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1) !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 480px !important;
    min-width: 360px !important;
    text-align: center !important;
    transform: translateY(20px) scale(0.95) !important;
    opacity: 0 !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow: hidden !important;
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* 头部 - 支付宝蓝色 */
.qr-header {
    background: linear-gradient(135deg, #1677ff 0%, #4096ff 50%, #69b1ff 100%) !important;
    color: white !important;
    padding: 24px 28px !important;
    position: relative !important;
    overflow: hidden !important;
}

.qr-header::before {
    content: '';
    position: absolute;
    top: -60%;
    right: -20%;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.qr-header::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -10%;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.qr-header h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.qr-header h3 i {
    font-size: 32px;
}

.qr-header p {
    font-size: 15px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
    font-weight: 300;
}

/* 金额显示 */
.qr-amount-section {
    padding: 24px 28px !important;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%) !important;
}

.qr-amount {
    font-size: 48px !important;
    font-weight: 700 !important;
    color: #1677ff !important;
    margin-bottom: 8px !important;
    display: flex !important;
    align-items: baseline !important;
    justify-content: center !important;
    gap: 4px !important;
}

.qr-amount::before {
    content: '¥' !important;
    font-size: 24px !important;
    font-weight: 500 !important;
    margin-right: 2px !important;
}

.qr-amount-label {
    font-size: 14px !important;
    color: #64748b !important;
    font-weight: 400 !important;
}

/* 支付内容区域 - 增加padding确保包裹按钮 */
.qr-content {
    padding: 0 28px 28px !important;
}

/* 加载状态 */
.alipay-loading {
    text-align: center !important;
    padding: 48px 24px !important;
}

.alipay-spinner {
    width: 64px !important;
    height: 64px !important;
    border: 4px solid #e2e8f0 !important;
    border-top-color: #1677ff !important;
    border-radius: 50% !important;
    animation: spin 1s linear infinite !important;
    margin: 0 auto 20px !important;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.alipay-loading p {
    color: #64748b !important;
    font-size: 15px !important;
}

/* 状态显示 */
.alipay-status {
    text-align: center !important;
    padding: 36px 24px !important;
}

.alipay-status-icon {
    width: 88px !important;
    height: 88px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 40px !important;
    margin: 0 auto 18px !important;
}

.alipay-status-icon.success {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0) !important;
    color: #16a34a !important;
}

.alipay-status-icon.error {
    background: linear-gradient(135deg, #fee2e2, #fecaca) !important;
    color: #dc2626 !important;
}

.alipay-status-text {
    font-size: 20px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
}

/* 支付说明 */
.qr-instructions {
    margin-bottom: 24px !important;
    text-align: left !important;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9) !important;
    border-radius: 16px !important;
    padding: 20px !important;
    border: 1px solid #e2e8f0 !important;
}

.qr-instructions h4 {
    font-size: 14px !important;
    font-weight: 600 !important;
    margin-bottom: 14px !important;
    color: #1e293b !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.qr-instructions h4 i {
    color: #1677ff !important;
    font-size: 16px !important;
}

.qr-instructions ol {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    counter-reset: step !important;
}

.qr-instructions li {
    font-size: 13px !important;
    line-height: 1.6 !important;
    padding: 10px 0 !important;
    color: #475569 !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px !important;
    border-bottom: 1px dashed #e2e8f0 !important;
}

.qr-instructions li:last-child {
    border-bottom: none !important;
}

.qr-instructions li::before {
    counter-increment: step !important;
    content: counter(step) !important;
    background: linear-gradient(135deg, #1677ff, #4096ff) !important;
    color: white !important;
    width: 22px !important;
    height: 22px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    flex-shrink: 0 !important;
    margin-top: 1px !important;
}

/* 按钮区域 - 三个按钮并排 */
.qr-actions {
    display: flex !important;
    gap: 12px !important;
    justify-content: space-between !important;
    padding: 0 8px 8px !important;
}

.qr-button {
    padding: 12px 16px !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    flex: 1 !important;
    letter-spacing: 0.2px !important;
    white-space: nowrap !important;
}

.qr-button.secondary {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 2px solid #e2e8f0 !important;
}

.qr-button.secondary:hover {
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
    transform: translateY(-2px) !important;
}

.qr-button.primary {
    background: linear-gradient(135deg, #1677ff 0%, #4096ff 100%) !important;
    color: white !important;
    box-shadow: 0 4px 16px rgba(22, 119, 255, 0.35) !important;
}

.qr-button.primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 24px rgba(22, 119, 255, 0.45) !important;
}

.qr-button.success {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%) !important;
    color: white !important;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35) !important;
}

.qr-button.success:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.45) !important;
}

/* 安全提示 */
.qr-security {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    margin-top: 24px !important;
    padding-top: 24px !important;
    border-top: 1px solid #e2e8f0 !important;
    font-size: 13px !important;
    color: #64748b !important;
}

.qr-security i {
    color: #10b981 !important;
}

/* 成功提示 */
.success-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
}
