/**
 * 充值/提现独立页面样式
 * 统一的页面样式，适用于 Deposit 和 Withdraw 页面
 */

/* 页面容器 */
.deposit-page,
.withdraw-page {
    width: 100%;
    max-width: 100%;
    padding: 16px;
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    box-sizing: border-box;
}

/* 页面头部 */
.page-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px 0;
}

.back-button {
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.back-button:hover {
    transform: translateX(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.back-button i {
    font-size: 18px;
    color: #667eea;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
}

/* 余额卡片 */
.balance-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 24px;
    color: white;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.balance-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.balance-amount {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
}

.balance-info {
    display: flex;
    gap: 20px;
    font-size: 13px;
    opacity: 0.9;
}

/* 表单容器 */
.deposit-form,
.withdraw-form {
    width: 100%;
    max-width: 100%;
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
}

/* 表单区块 */
.form-section {
    margin-bottom: 24px;
}

.form-section:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

/* 输入组 */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input {
    width: 100%;
    max-width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s;
    background: #f8f9fb;
    box-sizing: border-box;
}

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

.input-suffix {
    position: absolute;
    right: 16px;
    font-size: 14px;
    font-weight: 600;
    color: #718096;
    pointer-events: none;
}

.form-hint {
    font-size: 12px;
    color: #718096;
    margin-top: 6px;
}

.form-hint.warning {
    color: #f59e0b;
}

/* 快捷金额 */
.quick-amounts {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.quick-amount-btn {
    width: 100%;
    max-width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    box-sizing: border-box;
    background: white;
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s;
}

.quick-amount-btn:hover {
    border-color: #667eea;
    color: #667eea;
    background: #f7f9fc;
}

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

/* 支付方式 */
.payment-method {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #f8f9fb;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    color: #4a5568;
}

.payment-method i {
    font-size: 20px;
    color: #667eea;
}

/* 地址显示 */
.address-display {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #f8f9fb;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
}

.address-display i {
    font-size: 20px;
    color: #667eea;
}

.address-text {
    flex: 1;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    color: #2d3748;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 汇总区块 */
.summary-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 12px;
    padding: 16px;
}

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

.summary-row:not(:last-child) {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.summary-row span {
    font-size: 14px;
    color: #4a5568;
}

.summary-row strong {
    font-size: 16px;
    color: #2d3748;
    font-weight: 700;
}

.summary-row strong.highlight {
    color: #667eea;
    font-size: 18px;
}

/* 须知区块 */
.deposit-notes,
.withdraw-notes {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 12px;
    padding: 16px;
}

.deposit-notes h4,
.withdraw-notes h4 {
    font-size: 14px;
    font-weight: 700;
    color: #92400e;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.deposit-notes h4:before,
.withdraw-notes h4:before {
    content: "ℹ️";
}

.deposit-notes ul,
.withdraw-notes ul {
    margin: 0;
    padding-left: 20px;
}

.deposit-notes li,
.withdraw-notes li {
    font-size: 13px;
    color: #78350f;
    line-height: 1.6;
    margin-bottom: 4px;
}

/* 提交按钮 */
.submit-button {
    width: 100%;
    max-width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    box-sizing: border-box;
}

.submit-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.submit-button:active:not(:disabled) {
    transform: translateY(0);
}

.submit-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.submit-button i {
    font-size: 18px;
}

/* 加载遮罩 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay p {
    margin-top: 16px;
    color: white;
    font-size: 16px;
    font-weight: 600;
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    .deposit-page,
    .withdraw-page {
        background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    }

    .page-title {
        color: #f7fafc;
    }

    .back-button {
        background: #2d3748;
    }

    .back-button i {
        color: #90cdf4;
    }

    .deposit-form,
    .withdraw-form {
        background: #2d3748;
    }

    .form-label {
        color: #e2e8f0;
    }

    .form-input {
        background: #1a202c;
        border-color: #4a5568;
        color: #f7fafc;
    }

    .form-hint {
        color: #a0aec0;
    }

    .quick-amount-btn {
        background: #1a202c;
        border-color: #4a5568;
        color: #e2e8f0;
    }

    .payment-method,
    .address-display {
        background: #1a202c;
        border-color: #4a5568;
        color: #e2e8f0;
    }

    .summary-row span,
    .summary-row strong {
        color: #e2e8f0;
    }
}

/* ===== 充值地址显示区域样式 ===== */
.address-display {
    width: 100%;
    max-width: 100%;
    margin-bottom: 12px;
    box-sizing: border-box;
}

.address-content {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.address-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    position: relative;
}

.address-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary, #6b7280);
    font-size: 14px;
}

.address-label {
    font-size: 12px;
    color: var(--text-secondary, #6b7280);
}

.address-value {
    width: 100%;
    max-width: 100%;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    font-weight: 500;
    color: var(--primary-color, #3b82f6);
    word-break: break-all;
    background: rgba(59, 130, 246, 0.1);
    padding: 10px 12px;
    border-radius: 8px;
    box-sizing: border-box;
    border: 1px solid var(--border-color, #e5e7eb);
}

.copy-button {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    color: var(--primary-color, #3b82f6);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

.copy-button i {
    font-size: 18px;
    line-height: 1;
}

.copy-button span {
    display: none;
}

.copy-button:hover {
    color: var(--primary-hover, #2563eb);
    transform: scale(1.1);
}

.copy-button:active {
    transform: scale(0.95);
}

.copy-button.copied {
    color: #10b981;
}

.address-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary, #6b7280);
    padding: 8px 12px;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 8px;
}

.optional-tag {
    font-size: 11px;
    color: var(--text-secondary, #6b7280);
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 6px;
}

