/* 支付页面样式 - 会员中心 */
.payment-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #f8f9ff 0%, #ffffff 100%);
    padding: 12px;
}

.payment-container {
    max-width: 1000px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 16px 20px 20px;
}

.payment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.payment-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    flex: 1;
}

.back-btn {
    background: none;
    border: none;
    color: #2563eb;
    font-size: 16px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.2s;
}

.back-btn:hover {
    background: #f3f4f6;
}

.payment-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 功能对比表格 */
.feature-comparison-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.comparison-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 10px 0;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 8px;
    background: #f9fafb;
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 6px;
}

.comparison-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 8px;
    padding: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.comparison-row:last-child {
    border-bottom: none;
}

.comparison-row:nth-child(even) {
    background: #f9fafb;
}

.comparison-cell {
    font-size: 14px;
    color: #111827;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comparison-header .comparison-cell {
    font-weight: 600;
    color: #111827;
}

/* 已移至 .cell-feature 类 */

/* 功能对比表中不同版本列的高亮（越高等级颜色越尊贵） */
/* 功能列 */
.comparison-cell.cell-feature {
    text-align: left;
    justify-content: flex-start;
    color: #6b7280;
}

/* 免费版列 */
.comparison-cell.cell-free {
    background: #f9fafb;
}

/* 专业版列 - 淡金黄背景，整列连续 */
.comparison-cell.cell-professional {
    background: #fffbeb; /* 淡黄色 */
}

/* 旗舰版列 - 更饱和的金黄色背景，整列连续 */
.comparison-cell.cell-flagship {
    background: #fef3c7; /* 金黄色系，但保持文字可读 */
    font-weight: 600;
}

/* 火热标记 */
.hot-badge {
    display: inline-block;
    font-size: 12px;
    vertical-align: super;
    margin-left: 2px;
}

.hot-badge-tab {
    display: inline-block;
    font-size: 10px;
    vertical-align: super;
    margin-left: 2px;
}

/* 绿色勾号 */
.check-mark {
    color: #10b981;
    font-weight: bold;
    font-size: 16px;
}

/* 版本选择Tab */
.version-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 12px;
}

.version-tab {
    padding: 8px 16px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.version-tab:hover {
    color: #2563eb;
}

.version-tab.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    font-weight: 600;
}

/* 版本卡片 */
.version-card {
    background: #fff;
    border-radius: 10px;
    border: 2px solid #e5e7eb;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.version-card-header {
    margin-bottom: 12px;
}

.version-card-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

/* 支付周期选择器 */
.period-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.period-btn {
    flex: 1;
    padding: 8px 12px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
}

.period-btn:hover {
    border-color: #2563eb;
    background: #f0f7ff;
    color: #2563eb;
}

.period-btn.active {
    background: #eff6ff;
    border-color: #2563eb;
    color: #2563eb;
    font-weight: 600;
}

.period-btn span {
    font-size: 12px;
    color: #f59e0b;
    margin-left: 4px;
}

/* 价格显示 */
.version-price {
    text-align: center;
    margin-bottom: 12px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 6px;
}

.price-symbol {
    font-size: 28px;
    font-weight: 600;
    color: #ef4444;
    vertical-align: top;
}

.price-amount {
    font-size: 28px;
    font-weight: 700;
    color: #ef4444;
}

.version-doc-info {
    font-size: 13px;
    color: #6b7280;
    margin-top: 8px;
}

/* 支付方式选择 */
.payment-method-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.payment-method-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.payment-method-option:hover {
    border-color: #2563eb;
    background: #f0f7ff;
}

.payment-method-option.selected {
    background: #dbeafe;
    border-color: #1d4ed8;
    border-width: 3px;
}

.payment-method-option input[type="radio"] {
    display: none;
}

.payment-method-option span {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
}

/* 支付方式图标 */
.payment-icon-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: inline-block;
}

/* 购买按钮 */
.buy-btn {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.buy-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.4);
}

.buy-btn:active:not(:disabled) {
    transform: translateY(0);
}

.buy-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
}

/* 二维码弹窗 */
.qrcode-dialog {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.qrcode-dialog-content {
    background: #fff;
    border-radius: 16px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.qrcode-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.qrcode-dialog-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.qrcode-dialog-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.qrcode-dialog-close:hover {
    background: #f3f4f6;
}

.qrcode-dialog-body {
    padding: 24px;
    text-align: center;
}

.qrcode-tip {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 20px;
}

.qrcode-image-container {
    position: relative;
    display: inline-block;
    margin-bottom: 16px;
}

.qrcode-image-container img {
    width: 250px;
    height: 250px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.qrcode-loading {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    width: auto;
    height: auto;
    z-index: 10;
}

/* 加载文字 */
.loading-text {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

/* 使用历史记录页面的转圈效果 */
.loading-text::before {
    content: '';
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 3px solid #bfdbfe;
    border-top-color: #3b82f6;
    margin-right: 8px;
    animation: spin 1s linear infinite;
    flex-shrink: 0;
}

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

.qrcode-status {
    font-size: 14px;
    min-height: 20px;
}

.qrcode-status.success {
    color: #10b981;
    font-weight: 600;
}

.qrcode-status.error {
    color: #ef4444;
}

/* 支付确认按钮组 */
.qrcode-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    justify-content: center;
}

.qrcode-action-btn {
    flex: 1;
    max-width: 140px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.qrcode-action-btn.primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.qrcode-action-btn.primary:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.qrcode-action-btn.secondary {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

.qrcode-action-btn.secondary:hover {
    background: #e5e7eb;
    color: #4b5563;
}

/* 移动端适配 */
@media (max-width: 767px) {
    .payment-page {
        padding: 10px;
    }
    
    .payment-container {
        padding: 20px 16px 24px;
    }
    
    .payment-header {
        margin-bottom: 24px;
    }
    
    .payment-header h2 {
        font-size: 20px;
    }
    
    .comparison-header,
    .comparison-row {
        grid-template-columns: 1fr 1fr 1fr 1fr;
        gap: 8px;
        font-size: 12px;
    }
    
    .version-tabs {
        gap: 8px;
    }
    
    .version-tab {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .version-card {
        padding: 20px 16px;
    }
    
    .period-selector {
        flex-direction: column;
        gap: 8px;
    }
    
    .period-btn {
        width: 100%;
    }
    
    .payment-method-selector {
        flex-direction: column;
    }
    
    .price-amount {
        font-size: 28px;
    }
    
    .qrcode-dialog {
        padding: 10px;
    }
    
    .qrcode-dialog-content {
        max-width: 100%;
    }
    
    .qrcode-image-container img {
        width: 200px;
        height: 200px;
    }
}

/* 移动端支付确认对话框 */
.mobile-payment-dialog-overlay {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    padding: 20px;
}

.mobile-payment-dialog {
    background: #fff;
    border-radius: 16px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.mobile-payment-dialog-content {
    padding: 24px;
}

.mobile-payment-dialog-content h3 {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}

.mobile-payment-dialog-content p {
    margin: 0 0 24px 0;
    font-size: 14px;
    color: #6b7280;
}

.mobile-payment-dialog-actions {
    display: flex;
    gap: 12px;
}

.mobile-payment-btn-cancel,
.mobile-payment-btn-confirm {
    flex: 1;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.mobile-payment-btn-cancel {
    background: #f3f4f6;
    color: #6b7280;
}

.mobile-payment-btn-cancel:hover {
    background: #e5e7eb;
}

.mobile-payment-btn-confirm {
    background: #667eea;
    color: #fff;
}

.mobile-payment-btn-confirm:hover {
    background: #5568d3;
}
