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

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

#app {
    min-height: 100vh;
}

/* 页面容器 */
.page {
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* 头部样式 */
.header {
    text-align: center;
    padding: 40px 0;
}

.logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.title {
    font-size: 24px;
    font-weight: bold;
    color: white;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
}

/* 码信息展示 */
.code-section {
    background: rgba(255,255,255,0.95);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.code-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.code-value {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}

/* 按钮样式 */
.btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 12px;
}

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

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

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

.btn-secondary {
    background: #f5f5f5;
    color: #666;
}

.btn-secondary:not(:disabled):hover {
    background: #e8e8e8;
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 40px;
}

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

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

/* 结果展示 */
.result {
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.result.success {
    background: #d4edda;
    color: #155724;
}

.result.error {
    background: #f8d7da;
    color: #721c24;
}

.result.warning {
    background: #fff3cd;
    color: #856404;
}

.result-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.result-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
}

.result-message {
    font-size: 14px;
    line-height: 1.6;
}

/* 产品信息 */
.product-info {
    display: flex;
    align-items: center;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 16px;
}

.product-image {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    margin-right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

.product-details h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.product-details p {
    font-size: 12px;
    color: #666;
}

/* 红包金额展示 */
.amount-display {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 16px;
    margin-bottom: 20px;
}

.amount-label {
    font-size: 14px;
    color: rgba(255,255,255,0.9);
    margin-bottom: 8px;
}

.amount-value {
    font-size: 48px;
    font-weight: bold;
    color: white;
}

.amount-unit {
    font-size: 24px;
    color: rgba(255,255,255,0.9);
}

/* 步骤指示器 */
.steps {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

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

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 15px;
    right: -50%;
    width: 100%;
    height: 2px;
    background: rgba(255,255,255,0.3);
}

.step.active:not(:last-child)::after {
    background: white;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 8px;
}

.step.active .step-number {
    background: white;
    color: #667eea;
}

.step-label {
    font-size: 12px;
    color: rgba(255,255,255,0.8);
}

.step.active .step-label {
    color: white;
    font-weight: bold;
}

/* 提示信息 */
.tips {
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 16px;
    margin-top: 20px;
}

.tips-title {
    font-size: 14px;
    font-weight: bold;
    color: white;
    margin-bottom: 8px;
}

.tips-list {
    list-style: none;
    font-size: 12px;
    color: rgba(255,255,255,0.8);
    line-height: 1.8;
}

.tips-list li::before {
    content: '• ';
    color: white;
}

/* 用户信息 */
.user-info {
    display: flex;
    align-items: center;
    padding: 16px;
    background: white;
    border-radius: 12px;
    margin-bottom: 16px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #f0f0f0;
    margin-right: 16px;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-details h4 {
    font-size: 16px;
    margin-bottom: 4px;
}

.user-details p {
    font-size: 12px;
    color: #666;
}

/* 响应式适配 */
@media (max-width: 375px) {
    .page {
        padding: 16px;
    }
    
    .card {
        padding: 20px;
    }
    
    .title {
        font-size: 20px;
    }
    
    .amount-value {
        font-size: 36px;
    }
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
