/* 购买页面样式 */

/* 头部导航优化 */
.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: white;
}

.nav {
    display: flex;
    gap: 20px;
}

.nav a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav a:hover,
.nav a.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* 购买页面主体 */
.buy-page {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
}

.page-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
    color: var(--text-primary);
}

/* 商品卡片 */
.product-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow);
    text-align: center;
    margin-bottom: 30px;
}

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

.product-info h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.product-desc {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.product-price {
    color: #ff5722;
    font-weight: 700;
}

.price-symbol {
    font-size: 24px;
    vertical-align: top;
}

.price-value {
    font-size: 48px;
}

/* 购买按钮 */
.buy-section {
    text-align: center;
    margin-bottom: 30px;
}

.buy-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #ff5722, #f44336);
    color: white;
    border: none;
    padding: 18px 60px;
    border-radius: 50px;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 87, 34, 0.4);
    transition: all 0.3s ease;
}

.buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 87, 34, 0.5);
}

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

.buy-tip {
    margin-top: 15px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* 加载状态 */
.payment-section,
.waiting-section,
.success-section,
.error-section,
.soldout-section {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow);
    text-align: center;
    margin-bottom: 30px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

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

.status-icon.success {
    color: #4CAF50;
}

.status-icon.error {
    color: #f44336;
}

/* 等待支付 */
.order-info {
    color: var(--text-secondary);
    margin: 10px 0;
}

.order-info span {
    font-family: monospace;
    background: #f5f5f5;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
}

.waiting-text {
    color: var(--text-secondary);
    margin: 10px 0 20px;
}

.progress-bar {
    width: 100%;
    max-width: 300px;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    margin: 20px auto;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    border-radius: 3px;
    width: 0%;
    animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
    0% { width: 0%; }
    50% { width: 100%; }
    100% { width: 0%; }
}

.check-text {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

.refresh-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    background: var(--primary-dark);
}

/* 支付成功 */
.success-text {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.code-box {
    background: linear-gradient(135deg, #f5f7fa, #e8f4f8);
    border: 2px dashed var(--primary-color);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.code-box code {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-dark);
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}

.copy-btn {
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: var(--primary-color);
    color: white;
}

.copy-btn.copied {
    background: #4CAF50;
    border-color: #4CAF50;
    color: white;
}

.code-notice {
    margin-top: 20px;
    padding: 15px;
    background: #fff3cd;
    border-radius: 10px;
    font-size: 14px;
    color: #856404;
}

.code-notice a {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* 错误状态 */
.error-text {
    color: #f44336;
    margin: 15px 0;
}

.retry-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background: var(--primary-dark);
}

/* 售罄状态 */
.soldout-section .back-link {
    display: inline-block;
    margin-top: 20px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    padding: 12px 30px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.soldout-section .back-link:hover {
    background: var(--primary-dark);
}

/* 说明区域 */
.info-section {
    max-width: 600px;
    margin: 40px auto;
    padding: 30px;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.info-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.info-list {
    list-style: none;
    padding: 0;
}

.info-list li {
    padding: 10px 0;
    padding-left: 25px;
    position: relative;
    color: var(--text-secondary);
    border-bottom: 1px solid #f0f0f0;
}

.info-list li:last-child {
    border-bottom: none;
}

.info-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 20px;
    line-height: 1;
}

.info-list a {
    color: var(--primary-color);
    text-decoration: none;
}

.info-list a:hover {
    text-decoration: underline;
}

/* 页脚链接 */
.footer .divider {
    margin: 0 10px;
    color: #666;
}

/* 响应式 */
@media (max-width: 768px) {
    .nav {
        gap: 10px;
    }
    
    .nav a {
        font-size: 13px;
        padding: 4px 10px;
    }
    
    .buy-page {
        padding: 20px 15px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .product-card {
        padding: 30px 20px;
    }
    
    .price-value {
        font-size: 36px;
    }
    
    .buy-btn {
        padding: 15px 40px;
        font-size: 18px;
    }
    
    .code-box code {
        font-size: 18px;
    }
}
