/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 支付表单容器 */
.payment-form-container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.payment-form {
    padding: 40px;
}

/* 表单组样式 */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafafa;
}

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

.input-help {
    margin-top: 6px;
    font-size: 0.85rem;
    color: #6b7280;
}

/* 提交按钮 */
.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

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

.btn-loading {
    display: none;
}

/* 特性展示 */
.features {
    padding: 30px 40px 40px;
    background: #f8fafc;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.feature-item:last-child {
    margin-bottom: 0;
}

.feature-icon {
    font-size: 2rem;
    margin-right: 16px;
    width: 50px;
    text-align: center;
}

.feature-text h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #374151;
}

.feature-text p {
    font-size: 0.9rem;
    color: #6b7280;
}

/* 支付页面样式 */
.payment-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.payment-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 40px;
}

.payment-header h1 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: center;
}

.order-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.order-item .label {
    opacity: 0.9;
}

.order-item .value {
    font-weight: 600;
}

.order-item .amount {
    font-size: 1.2rem;
    color: #fbbf24;
}

.payment-content {
    padding: 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

/* 二维码区域 */
.qr-section {
    text-align: center;
}

.qr-container {
    width: 280px;
    height: 280px;
    margin: 0 auto 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    position: relative;
}

.qr-container img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
}

.loading {
    text-align: center;
    color: #6b7280;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

.qr-tips {
    color: #6b7280;
    font-size: 0.9rem;
}

/* 状态区域 */
.status-section {
    text-align: center;
}

.status-indicator {
    margin-bottom: 30px;
}

.status-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.status-icon.waiting {
    animation: pulse 2s infinite;
}

.status-icon.success {
    color: #10b981;
}

.status-icon.failed {
    color: #ef4444;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: #374151;
}

.status-text p {
    color: #6b7280;
}

.countdown {
    background: #f3f4f6;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.countdown-label {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 8px;
}

.countdown-time {
    font-size: 2rem;
    font-weight: 700;
    color: #ef4444;
    font-family: 'Courier New', monospace;
}

/* 操作按钮 */
.payment-actions {
    padding: 20px 40px 40px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

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

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

.modal-header h3 {
    margin: 0;
    color: #374151;
}

.close {
    color: #9ca3af;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #374151;
}

.modal-body {
    padding: 30px;
    text-align: center;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* 成功模态框 */
.modal-content.success .modal-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #10b981;
}

.success-info {
    margin-top: 20px;
    text-align: left;
    background: #f0fdf4;
    padding: 20px;
    border-radius: 8px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item .label {
    color: #6b7280;
}

.info-item .value {
    font-weight: 600;
    color: #374151;
}

/* 错误模态框 */
.modal-content.error .modal-header {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #ef4444;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .payment-form {
        padding: 30px 20px;
    }
    
    .features {
        padding: 20px;
    }
    
    .payment-content {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 30px 20px;
    }
    
    .payment-header {
        padding: 20px;
    }
    
    .order-info {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .qr-container {
        width: 240px;
        height: 240px;
    }
    
    .payment-actions {
        flex-direction: column;
        padding: 20px;
    }
    
    .modal-content {
        margin: 20% auto;
        width: 95%;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-header,
    .modal-footer {
        padding: 15px 20px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .payment-form {
        padding: 20px 15px;
    }
    
    .qr-container {
        width: 200px;
        height: 200px;
    }
    
    .countdown-time {
        font-size: 1.5rem;
    }
}

