/* 微信支付模态框样式 */
.wechat-payment-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
}

.wechat-payment-modal .payment-modal-content.wechat-content {
    max-width: 500px;
    width: 100%;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    max-height: 90vh;
    overflow-y: auto;
}

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

.wechat-payment-modal .payment-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: bold;
    color: #1f2937;
}

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

.wechat-payment-modal .close-btn:hover {
    background-color: #f3f4f6;
}

.wechat-payment-modal .payment-modal-body {
    padding: 0 24px 24px;
}

/* 产品信息 */
.wechat-payment-modal .payment-amount-display {
    text-align: center;
    margin-bottom: 24px;
    padding: 20px 0;
    border-bottom: 1px solid #e5e7eb;
}

.wechat-payment-modal .payment-amount-display h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: bold;
    color: #059669;
}

.wechat-payment-modal .payment-amount-display p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
}


/* 支付步骤 */
.payment-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    text-align: center;
}

.step-number {
    width: 32px;
    height: 32px;
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 14px;
}

.step-text {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}

/* 二维码容器 */
.qr-code-container {
    text-align: center;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 24px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    background: #fafafa;
}

/* 二维码加载 */
.qr-code-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.qr-code-loading .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.qr-code-loading p {
    color: #6b7280;
    margin: 0;
}

/* 二维码显示 */
.qr-code-display {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.qr-code-display img {
    width: 200px;
    height: 200px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 12px;
}

.qr-tips {
    color: #6b7280;
    margin: 0 0 8px 0;
    font-size: 14px;
}

.payment-amount {
    font-size: 18px;
    font-weight: bold;
    color: #059669;
    margin: 0;
}

/* 二维码错误 */
.qr-code-error {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.qr-code-error .error-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.qr-code-error .error-message {
    color: #dc2626;
    margin: 0 0 16px 0;
}

/* 支付状态 */
.payment-status {
    text-align: center;
    margin-bottom: 20px;
    padding: 16px;
    background: #f0f9ff;
    border-radius: 8px;
    border: 1px solid #0ea5e9;
}

.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background: #0ea5e9;
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(14, 165, 233, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(14, 165, 233, 0);
    }
}

.status-indicator span {
    color: #0c4a6e;
    font-weight: 500;
}

.status-timer {
    color: #6b7280;
    font-size: 14px;
}

.status-timer #countdown {
    font-weight: bold;
    color: #dc2626;
}

/* 支付操作 */
.payment-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
}

.payment-actions .btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.payment-actions .btn.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.payment-actions .btn.btn-secondary:hover {
    background: #e5e7eb;
}

/* 支付成功 */
.payment-success {
    text-align: center;
    padding: 40px 20px;
}

.payment-success .success-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.payment-success h3 {
    color: #059669;
    margin: 0 0 16px 0;
    font-size: 24px;
}

.payment-success p {
    color: #6b7280;
    margin: 0 0 24px 0;
}

.success-features {
    text-align: left;
    max-width: 300px;
    margin: 0 auto;
}

.success-features p {
    font-weight: bold;
    color: #374151;
    margin-bottom: 12px;
}

.success-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.success-features li {
    padding: 6px 0;
    color: #059669;
    font-size: 14px;
}

/* 激活码显示区域 */
.activation-code-section {
    margin: 24px 0;
    padding: 20px;
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 12px;
}

.activation-code-header h4 {
    margin: 0 0 8px 0;
    color: #0c4a6e;
    font-size: 16px;
}

.activation-code-header p {
    margin: 0 0 16px 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.4;
}

.activation-code-display {
    margin-bottom: 16px;
}

.code-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border: 2px solid #0ea5e9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.activation-code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 18px;
    font-weight: bold;
    color: #0c4a6e;
    letter-spacing: 2px;
    flex: 1;
    user-select: all;
    padding: 4px 8px;
    background: #f8fafc;
    border-radius: 4px;
}

.copy-btn {
    padding: 8px 12px;
    background: #0ea5e9;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

.copy-btn:hover {
    background: #0284c7;
    transform: translateY(-1px);
}

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

.activation-code-tips {
    background: rgba(255, 255, 255, 0.8);
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid #0ea5e9;
}

.activation-code-tips p {
    margin: 0 0 8px 0;
    color: #0c4a6e;
    font-weight: 500;
    font-size: 14px;
}

.activation-code-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.activation-code-tips li {
    padding: 2px 0;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.4;
}

/* 成功页面操作区域 */
.success-actions {
    margin-top: 20px;
    text-align: center;
}

.success-actions .btn.btn-primary {
    background: #059669;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
    text-decoration: none;
}

.success-actions .btn.btn-primary:hover {
    background: #047857;
    transform: translateY(-1px);
}

.success-actions .btn.btn-primary:active {
    transform: translateY(0);
}

.success-note {
    margin: 12px 0 0 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.4;
}

/* 底部安全信息 */
.wechat-payment-modal .payment-modal-footer {
    padding: 16px 24px;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
}

.wechat-payment-modal .payment-security p {
    margin: 0;
    color: #6b7280;
    font-size: 12px;
    text-align: center;
    line-height: 1.4;
}

/* 移动端适配 */
@media (max-width: 640px) {
    .wechat-payment-modal {
        padding: 10px;
    }
    
    .wechat-payment-modal .payment-modal-content.wechat-content {
        max-width: 100%;
        margin: 0;
    }
    
    .wechat-payment-modal .payment-modal-header {
        padding: 16px 16px 0;
    }
    
    .wechat-payment-modal .payment-modal-body {
        padding: 0 16px 16px;
    }
    
    .payment-steps {
        flex-direction: column;
        gap: 12px;
    }
    
    .step {
        flex-direction: row;
        text-align: left;
    }
    
    .step-number {
        margin-right: 12px;
        margin-bottom: 0;
    }
    
    .qr-code-display img {
        width: 180px;
        height: 180px;
    }
    
    .payment-actions {
        flex-direction: column;
    }
    
    .payment-actions .btn {
        width: 100%;
    }
    
    /* 移动端激活码样式 */
    .activation-code-section {
        margin: 16px 0;
        padding: 16px;
    }
    
    .code-box {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }
    
    .activation-code {
        text-align: center;
        font-size: 16px;
        letter-spacing: 1px;
    }
    
    .copy-btn {
        width: 100%;
        padding: 12px;
    }
    
    /* 移动端成功页面按钮 */
    .success-actions .btn.btn-primary {
        width: 100%;
        padding: 14px 20px;
        font-size: 16px;
    }
    
    .success-note {
        font-size: 13px;
        margin: 10px 0 0 0;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .wechat-payment-modal .payment-modal-content.wechat-content {
        background: #1f2937;
        color: white;
    }
    
    .wechat-payment-modal .payment-modal-header {
        border-bottom-color: #374151;
    }
    
    .wechat-payment-modal .payment-modal-header h2 {
        color: white;
    }
    
    .wechat-payment-modal .close-btn {
        color: #9ca3af;
    }
    
    .wechat-payment-modal .close-btn:hover {
        background-color: #374151;
    }
    
    .wechat-payment-modal .payment-summary {
        border-bottom-color: #374151;
    }
    
    .payment-steps {
        background: #374151;
    }
    
    .qr-code-container {
        background: #374151;
        border-color: #4b5563;
    }
    
    .payment-status {
        background: #1e3a8a;
        border-color: #3b82f6;
    }
    
    .wechat-payment-modal .payment-modal-footer {
        background: #374151;
        border-top-color: #4b5563;
    }
}