/* 付费阅读插件前端样式 */

.prp-paid-reading-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.prp-free-content {
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 5px;
    line-height: 1.6;
}

.prp-payment-notice {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
}

.prp-payment-notice h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 600;
}

.prp-payment-notice p {
    margin: 0;
    opacity: 0.9;
}

.prp-password-section,
.prp-payment-options {
    margin: 20px 0;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.prp-password-section h4,
.prp-payment-options h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 8px;
}

.prp-password-inputs {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.prp-input-group {
    flex: 1;
}

.prp-input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.prp-input-group input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.prp-input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.prp-submit-btn {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.prp-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.prp-submit-btn:active {
    transform: translateY(0);
}

.prp-price-info {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 100%);
    border-radius: 8px;
}

.prp-price {
    font-size: 28px;
    font-weight: 700;
    color: #d63031;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.prp-email-input {
    margin-bottom: 20px;
}

.prp-email-input input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.prp-email-input input:focus {
    outline: none;
    border-color: #00b894;
    box-shadow: 0 0 0 3px rgba(0, 184, 148, 0.1);
}

.prp-payment-buttons {
    display: flex;
    gap: 15px;
}

.prp-payment-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.prp-payment-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.prp-payment-btn:hover:before {
    left: 100%;
}

.prp-alipay-btn {
    background: linear-gradient(135deg, #1677ff 0%, #0050b3 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(22, 119, 255, 0.3);
}

.prp-alipay-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(22, 119, 255, 0.4);
}

.prp-wechat-btn {
    background: linear-gradient(135deg, #07c160 0%, #05a050 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(7, 193, 96, 0.3);
}

.prp-wechat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(7, 193, 96, 0.4);
}

.prp-payment-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.prp-payment-icon {
    font-size: 18px;
}

/* 会员分组选择样式 */
.prp-member-group-section {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.prp-member-group-section h5 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 14px;
    font-weight: 600;
}

.prp-member-group-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    transition: border-color 0.3s ease;
}

.prp-member-group-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

/* 消息提示样式 */
.prp-message {
    padding: 12px 16px;
    margin-bottom: 15px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    animation: messageSlideIn 0.3s ease-out;
}

.prp-message-success {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.prp-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 加载状态样式 */
.prp-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
}

.prp-loading:before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    border: 2px solid #e9ecef;
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s ease-in-out infinite;
}

/* 输入框错误状态 */
.prp-input-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.1) !important;
}

/* 微信支付模态框样式 */
.prp-wechat-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.prp-wechat-content {
    background: white;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.prp-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 0;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 20px;
}

.prp-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.prp-close-modal {
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.prp-close-modal:hover {
    background: #f8f9fa;
    color: #495057;
}

.prp-modal-body {
    padding: 0 24px 24px;
    text-align: center;
}

.prp-qr-code {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
    text-align: center;
}

.prp-qr-code img {
    max-width: 200px;
    height: auto;
    border-radius: 4px;
    margin: 10px auto;
    display: block;
    border: 1px solid #ddd;
}

.prp-qr-text {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
    border: 1px solid #e9ecef;
}

.prp-qr-text code {
    background: #fff;
    padding: 8px;
    border-radius: 3px;
    display: block;
    margin-top: 8px;
    border: 1px solid #ddd;
}

.prp-qr-fallback {
    margin: 15px 0;
}

.prp-qr-display {
    margin: 15px 0;
    text-align: center;
}

.prp-qr-loading {
    padding: 20px;
    color: #666;
    font-size: 14px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.prp-generate-qr {
    background: #07c160;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.prp-generate-qr:hover {
    background: #06ad56;
}

.prp-generate-qr:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.prp-pay-tips {
    color: #6c757d;
    font-size: 14px;
    margin: 15px 0;
}

.prp-order-info {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    margin: 15px 0;
    font-size: 13px;
    color: #495057;
}

.prp-order-info code {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.prp-payment-status {
    margin-top: 20px;
}

.prp-check-payment {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.prp-check-payment:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.prp-check-payment:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .prp-paid-reading-container {
        margin: 10px;
        padding: 15px;
    }
    
    .prp-password-inputs {
        flex-direction: column;
        gap: 10px;
    }
    
    .prp-payment-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .prp-price {
        font-size: 24px;
    }
    
    .prp-password-section,
    .prp-payment-options {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .prp-paid-reading-container {
        margin: 5px;
        padding: 10px;
    }
    
    .prp-payment-notice h3 {
        font-size: 18px;
    }
    
    .prp-price {
        font-size: 20px;
    }
    
    .prp-payment-btn {
        padding: 12px 15px;
        font-size: 14px;
    }
}

/* 加载动画 */
.prp-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* 成功提示样式 */
.prp-success-message {
    padding: 15px;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    margin-bottom: 15px;
}

/* 错误提示样式 */
.prp-error-message {
    padding: 15px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    margin-bottom: 15px;
}