/**
 * PDF魔法师 - 支付弹窗样式
 */

/* ==================== 支付遮罩层 ==================== */
.payment-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.payment-overlay.show {
    opacity: 1;
}

/* ==================== 支付弹窗 ==================== */
.payment-modal {
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.payment-overlay.show .payment-modal {
    transform: translateY(0);
}

/* 关闭按钮 */
.payment-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.payment-close:hover {
    background: #e0e0e0;
    color: #333;
}

/* ==================== 头部 ==================== */
.payment-header {
    text-align: center;
    padding: 2rem 2rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 16px 16px 0 0;
}

.payment-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.payment-header h2 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.payment-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.95rem;
}

/* ==================== 套餐选择 ==================== */
.payment-plans {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1.5rem;
}

.plan-card {
    position: relative;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.25rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.plan-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.plan-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.plan-card.popular {
    border-color: #667eea;
}

.plan-badge {
    position: absolute;
    top: -10px;
    right: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
    border-radius: 10px;
    font-weight: 600;
}

.plan-badge.sale {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.plan-name {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.plan-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.25rem;
}

.plan-price span {
    font-size: 0.85rem;
    font-weight: 400;
    color: #888;
}

.plan-desc {
    font-size: 0.8rem;
    color: #999;
}

/* ==================== 二维码区域 ==================== */
.payment-qr {
    padding: 1.5rem;
    text-align: center;
}

.payment-back {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    transition: color 0.2s;
}

.payment-back:hover {
    color: #764ba2;
}

.qr-title {
    font-size: 1rem;
    color: #333;
    margin-bottom: 1rem;
}

.qr-code {
    width: 200px;
    height: 200px;
    margin: 0 auto 1rem;
    background: #f9f9f9;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.qr-code img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qr-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: #666;
    font-size: 0.9rem;
}

.qr-loading .spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e0e0e0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.qr-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
}

.qr-placeholder-icon {
    font-size: 2.5rem;
    opacity: 0.5;
}

.qr-placeholder-text {
    color: #666;
    font-size: 0.9rem;
}

.qr-placeholder-hint {
    color: #999;
    font-size: 0.8rem;
}

.qr-amount {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 0.75rem;
}

.qr-amount span {
    color: #f5576c;
    font-weight: 700;
    font-size: 1.3rem;
}

.qr-status {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: #f5f5f5;
    display: inline-block;
}

.qr-status.waiting {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.qr-status.error {
    color: #f5576c;
    background: rgba(245, 87, 108, 0.1);
}

.qr-status.success {
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.payment-check-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    max-width: 280px;
}

.payment-check-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.payment-check-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ==================== 底部 ==================== */
.payment-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #eee;
    text-align: center;
}

.payment-footer p {
    margin: 0;
    font-size: 0.8rem;
    color: #999;
}

/* ==================== 用户状态栏 ==================== */
.user-status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
}

.vip-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
    color: #333;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: default;
}

.user-email {
    font-size: 0.85rem;
    color: #666;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.login-btn, .logout-btn {
    background: none;
    border: 1px solid #ddd;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    color: #666;
}

.login-btn:hover, .logout-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.login-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
}

.login-btn:hover {
    opacity: 0.9;
    color: #fff;
}

/* ==================== 付费提示 ==================== */
.premium-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 8px;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #667eea;
}

.premium-hint-icon {
    font-size: 1.1rem;
}

/* ==================== 登录弹窗 ==================== */
.login-modal {
    max-width: 400px;
}

.login-form {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.login-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #eee;
    text-align: center;
}

.login-footer p {
    margin: 0;
    font-size: 0.8rem;
    color: #999;
}

.current-user {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.15);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    display: inline-block;
}

/* ==================== 响应式 ==================== */
@media (max-width: 480px) {
    .payment-modal {
        width: 95%;
        max-height: 95vh;
    }
    
    .payment-header {
        padding: 1.5rem 1rem 1rem;
    }
    
    .payment-icon {
        font-size: 2.5rem;
    }
    
    .payment-header h2 {
        font-size: 1.25rem;
    }
    
    .payment-plans {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .plan-card {
        padding: 1rem;
    }
    
    .plan-price {
        font-size: 1.5rem;
    }
    
    .qr-code {
        width: 180px;
        height: 180px;
    }
    
    .user-status-badge {
        margin-left: 0.5rem;
    }
    
    .user-email {
        max-width: 80px;
    }
    
    .verification-input {
        flex-direction: column;
    }
    
    .resend-btn {
        width: 100%;
    }
}

