/* MultiChainPay 支付页面样式 */

:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --bg-color: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* 加载状态 */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 60vh;
    color: var(--text-secondary);
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 错误页面 */
.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 60vh;
    text-align: center;
}

.error-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

/* 头部 */
.header {
    text-align: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.order-info {
    font-size: 14px;
    color: var(--text-secondary);
}

.order-info code {
    background: var(--bg-card);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
}

/* 金额显示 */
.amount-section {
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    border-radius: var(--border-radius);
    padding: 24px;
    text-align: center;
    margin-bottom: 24px;
}

.amount-cny .label {
    display: block;
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 4px;
}

.amount-cny .value {
    font-size: 36px;
    font-weight: 700;
}

/* 步骤容器 */
.step-container {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 24px;
}

.step-container h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.step-desc {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

/* 链选择列表 */
.chain-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chain-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s;
}

.chain-item:hover {
    border-color: var(--primary-color);
    background: var(--bg-card-hover);
}

.chain-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.chain-info {
    flex: 1;
}

.chain-name {
    font-weight: 600;
    margin-bottom: 2px;
}

.chain-network {
    font-size: 12px;
    color: var(--text-secondary);
}

.chain-arrow {
    color: var(--text-secondary);
    font-size: 20px;
}

/* 支付详情 */
.pay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.btn-back {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    padding: 8px 0;
}

.btn-back:hover {
    color: var(--text-primary);
}

.selected-chain {
    background: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.pay-amount {
    text-align: center;
    margin-bottom: 24px;
}

.pay-amount .label {
    display: block;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.amount-crypto {
    font-size: 32px;
    font-weight: 700;
    color: var(--success-color);
}

.amount-crypto #currency {
    font-size: 20px;
    margin-left: 8px;
    opacity: 0.8;
}

/* 二维码 */
.qr-section {
    text-align: center;
    margin-bottom: 24px;
}

.qrcode {
    display: inline-block;
    padding: 16px;
    background: #fff;
    border-radius: var(--border-radius);
    margin-bottom: 12px;
}

.qrcode canvas {
    display: block;
}

.qr-tip {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 钱包地址 */
.address-section {
    margin-bottom: 24px;
}

.address-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-color);
    padding: 12px 16px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.address {
    flex: 1;
    font-family: monospace;
    font-size: 12px;
    word-break: break-all;
    color: var(--text-primary);
}

.btn-copy {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    transition: background 0.2s;
}

.btn-copy:hover {
    background: var(--primary-hover);
}

.copy-tip {
    font-size: 12px;
    color: var(--success-color);
    text-align: center;
    margin-top: 8px;
    height: 18px;
}

/* 倒计时 */
.countdown-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--border-radius);
    margin-bottom: 24px;
}

.countdown-icon {
    font-size: 24px;
}

.countdown-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.countdown-text span:first-child {
    font-size: 12px;
    color: var(--text-secondary);
}

.countdown {
    font-size: 24px;
    font-weight: 700;
    color: var(--warning-color);
    font-family: monospace;
}

/* 注意事项 */
.notice-section {
    background: var(--bg-color);
    padding: 16px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.notice-section h3 {
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--warning-color);
}

.notice-section ul {
    list-style: none;
    font-size: 13px;
    color: var(--text-secondary);
}

.notice-section li {
    margin-bottom: 8px;
    padding-left: 16px;
    position: relative;
}

.notice-section li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--text-secondary);
}

.notice-section strong {
    color: var(--error-color);
}

/* 成功页面 */
.success-container {
    text-align: center;
    padding: 48px 24px;
}

.success-icon {
    font-size: 72px;
    margin-bottom: 16px;
}

.success-container h2 {
    color: var(--success-color);
    margin-bottom: 8px;
}

.redirect-tip {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 16px;
}

/* 过期页面 */
.expired-container {
    text-align: center;
    padding: 48px 24px;
}

.expired-icon {
    font-size: 72px;
    margin-bottom: 16px;
}

.expired-container h2 {
    color: var(--warning-color);
    margin-bottom: 8px;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
}

/* 响应式 */
@media (max-width: 480px) {
    .container {
        padding: 16px;
    }
    
    .amount-cny .value {
        font-size: 28px;
    }
    
    .amount-crypto {
        font-size: 24px;
    }
}
