/* 页面整体样式 */
.view-framework-body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
	background: #f5f6fa;
	color: #333;
	min-height: 100%;
	padding: 24px;
}

.container {
	max-width: 800px;
	margin: 0 auto;
}

/* 页面标题 */
.page-header {
	text-align: center;
	margin-bottom: 24px;
}

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

.page-desc {
	font-size: 14px;
	color: #888;
	margin: 0;
}

/* 通用区块标题 */
.section-title {
	font-size: 16px;
	font-weight: 600;
	color: #333;
	margin-bottom: 16px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.section-title .title-icon {
	font-size: 18px;
}

.section-title .more-link {
	margin-left: auto;
	font-size: 13px;
	color: #667eea;
	text-decoration: none;
}

/* 提示信息 */
.info-alert {
	background: #e8f4fd;
	border: 1px solid #b3d8f0;
	border-radius: 10px;
	padding: 14px 18px;
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 24px;
}

.info-alert .alert-icon {
	font-size: 18px;
	flex-shrink: 0;
	margin-top: 1px;
}

.info-alert .alert-text {
	font-size: 13px;
	color: #2c6e9c;
	line-height: 1.6;
}

/* 网络选择标签 */
.network-tabs {
	display: flex;
	gap: 12px;
	margin-bottom: 24px;
}

.network-tab {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 18px 12px;
	background: #fff;
	border: 2px solid #e8e8e8;
	border-radius: 12px;
	cursor: pointer;
	transition: all 0.3s ease;
	position: relative;
}

.network-tab:hover {
	border-color: #667eea;
	box-shadow: 0 4px 12px rgba(102,126,234,0.1);
}

.network-tab.active {
	border-color: #667eea;
	background: linear-gradient(135deg, #667eea0d 0%, #764ba20d 100%);
	box-shadow: 0 4px 12px rgba(102,126,234,0.15);
}

.network-tab .tab-icon {
	font-size: 28px;
}

.network-tab .tab-name {
	font-size: 14px;
	font-weight: 600;
	color: #333;
}

.network-tab .tab-tag {
	position: absolute;
	top: -8px;
	right: -8px;
	padding: 2px 10px;
	background: linear-gradient(135deg, #667eea, #764ba2);
	color: #fff;
	border-radius: 10px;
	font-size: 11px;
	font-weight: 500;
}

.network-tab.active .tab-name {
	color: #667eea;
}

/* 充值地址区块 */
.address-section {
	background: #fff;
	border-radius: 14px;
	padding: 20px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.04);
	margin-bottom: 24px;
}

.address-box {
	display: flex;
	gap: 20px;
	align-items: flex-start;
}

.address-qrcode {
	width: 140px;
	height: 140px;
	background: #f8f9fa;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	border: 1px solid #eee;
}

.qrcode-placeholder {
	width: 120px;
	height: 120px;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	color: #999;
	border: 1px dashed #ddd;
	border-radius: 8px;
}

.address-info {
	flex: 1;
	min-width: 0;
}

.address-label {
	font-size: 13px;
	color: #888;
	margin-bottom: 8px;
}

.address-value {
	font-size: 14px;
	font-weight: 500;
	color: #333;
	word-break: break-all;
	background: #f8f9fa;
	padding: 10px 14px;
	border-radius: 8px;
	font-family: 'Courier New', monospace;
	margin-bottom: 12px;
	border: 1px solid #eee;
}

.copy-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 18px;
	background: #667eea;
	color: #fff;
	border: none;
	border-radius: 8px;
	font-size: 13px;
	cursor: pointer;
	transition: background 0.3s;
}

.copy-btn:hover {
	background: #5a6fd6;
}

.copy-btn .copy-icon {
	font-size: 14px;
}

.address-tips {
	margin-top: 14px;
}

.address-tips p {
	font-size: 12px;
	color: #999;
	margin: 4px 0;
	line-height: 1.5;
}

/* 金额输入区块 */
.amount-section {
	background: #fff;
	border-radius: 14px;
	padding: 20px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.04);
	margin-bottom: 24px;
}

.input-wrapper {
	display: flex;
	align-items: center;
	background: #f8f9fa;
	border: 2px solid #e8e8e8;
	border-radius: 10px;
	padding: 0 16px;
	transition: border-color 0.3s;
}

.input-wrapper:focus-within {
	border-color: #667eea;
}

.amount-input {
	flex: 1;
	border: none;
	background: transparent;
	padding: 14px 0;
	font-size: 20px;
	font-weight: 600;
	color: #333;
	outline: none;
	min-width: 0;
}

.amount-input::placeholder {
	color: #bbb;
	font-weight: 400;
}

.input-unit {
	font-size: 16px;
	font-weight: 600;
	color: #667eea;
	flex-shrink: 0;
}

.amount-presets {
	display: flex;
	gap: 8px;
	margin-top: 14px;
}

.preset-btn {
	flex: 1;
	padding: 10px 8px;
	background: #f8f9fa;
	border: 1px solid #e8e8e8;
	border-radius: 8px;
	font-size: 13px;
	color: #555;
	cursor: pointer;
	transition: all 0.3s;
}

.preset-btn:hover {
	background: #e8f0fe;
	border-color: #667eea;
	color: #667eea;
}

.preset-btn.active {
	background: #667eea;
	border-color: #667eea;
	color: #fff;
}

/* 到账信息区块 */
.exchange-section {
	background: #fff;
	border-radius: 14px;
	padding: 20px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.04);
	margin-bottom: 24px;
}

.exchange-info {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.info-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 0;
	border-bottom: 1px solid #f5f5f5;
}

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

.info-label {
	font-size: 14px;
	color: #888;
}

.info-value {
	font-size: 14px;
	font-weight: 600;
	color: #333;
}

.info-row:last-child .info-value {
	color: #52c41a;
}

/* 提交区域 */
.submit-section {
	background: #fff;
	border-radius: 14px;
	padding: 20px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.04);
	margin-bottom: 24px;
	text-align: center;
}

.btn-submit {
	width: 100%;
	padding: 16px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
	border: none;
	border-radius: 10px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 4px 14px rgba(102,126,234,0.3);
}

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

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

.btn-submit:disabled {
	background: #ccc;
	cursor: not-allowed;
	box-shadow: none;
	transform: none;
}

.submit-tip {
	font-size: 12px;
	color: #999;
	margin-top: 12px;
}

.submit-tip .link {
	color: #667eea;
	text-decoration: none;
}

/* 充值记录区块 */
.history-section {
	background: #fff;
	border-radius: 14px;
	padding: 20px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.04);
	margin-bottom: 24px;
}

.history-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.history-item {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px;
	background: #f8f9fa;
	border-radius: 10px;
	transition: background 0.3s;
}

.history-item:hover {
	background: #f0f2f5;
}

.history-status {
	padding: 4px 12px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 500;
	flex-shrink: 0;
}

.history-status.success {
	background: #e6f7ed;
	color: #52c41a;
}

.history-status.pending {
	background: #fef3e2;
	color: #fa8c16;
}

.history-status.failed {
	background: #ffe8e8;
	color: #f5222d;
}

.history-info {
	flex: 1;
	min-width: 0;
}

.history-amount {
	font-size: 14px;
	font-weight: 600;
	color: #333;
}

.history-time {
	font-size: 12px;
	color: #888;
	margin-top: 2px;
}

.history-hash {
	font-size: 11px;
	color: #999;
	font-family: 'Courier New', monospace;
	flex-shrink: 0;
}

/* 响应式 */
@media (max-width: 768px) {
	.view-framework-body {
		padding: 16px;
	}

	.address-box {
		flex-direction: column;
		align-items: center;
	}

	.address-qrcode {
		width: 120px;
		height: 120px;
	}

	.qrcode-placeholder {
		width: 100px;
		height: 100px;
	}

	.network-tabs {
		gap: 8px;
	}

	.network-tab {
		padding: 14px 8px;
	}

	.amount-presets {
		flex-wrap: wrap;
	}

	.preset-btn {
		flex: 1 1 calc(33.33% - 8px);
	}
}

/* ===== 汇率加载中 / 失败态 ===== */
.rate-loader {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 400;
	color: #999;
	font-size: 13px;
}

.spinner {
	width: 16px;
	height: 16px;
	border: 2px solid #e8e8e8;
	border-top-color: #667eea;
	border-radius: 50%;
	animation: rate-spin 0.8s linear infinite;
}

.rate-retry {
	color: #667eea;
	cursor: pointer;
	text-decoration: underline;
	font-weight: 500;
}
.rate-retry:hover {
	opacity: 0.8;
}

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

/* ===== TRC20 钱包内置浏览器充值（tron-recharge） ===== */
.wallet-choice {
	background: #fff;
	border-radius: 14px;
	padding: 20px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.04);
	margin-bottom: 24px;
}

.wallet-tabs {
	display: flex;
	gap: 12px;
	margin-bottom: 16px;
}

.wallet-tab {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 12px;
	background: #fff;
	border: 2px solid #e8e8e8;
	border-radius: 12px;
	cursor: pointer;
	transition: all 0.3s ease;
	text-align: center;
}

.wallet-tab:hover {
	border-color: #667eea;
}

.wallet-tab.active {
	border-color: #667eea;
	background: linear-gradient(135deg, #667eea0d 0%, #764ba20d 100%);
	box-shadow: 0 4px 12px rgba(102,126,234,0.15);
}

.wallet-tab .wallet-icon {
	font-size: 24px;
}

.wallet-tab .wallet-name {
	font-size: 14px;
	font-weight: 600;
	color: #333;
}

.wallet-tab.active .wallet-name {
	color: #667eea;
}

.wallet-entries {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.entry-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	border: 2px solid transparent;
	transition: all 0.3s;
}

.entry-deeplink {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
	box-shadow: 0 4px 14px rgba(102,126,234,0.3);
}

.entry-qr {
	background: #f8f9fa;
	border-color: #e8e8e8;
	color: #333;
}

.entry-copy {
	background: #f8f9fa;
	border-color: #e8e8e8;
	color: #333;
}

.entry-qr:hover,
.entry-copy:hover {
	border-color: #667eea;
	color: #667eea;
	background: #e8f0fe;
}

.entry-qr-box {
	margin-top: 14px;
	text-align: center;
}

.entry-qr-box img {
	width: 220px;
	height: 220px;
	border: 1px solid #eee;
	border-radius: 10px;
	background: #fff;
}

.entry-qr-tip {
	font-size: 12px;
	color: #999;
	margin-top: 8px;
}

/* 钱包内置浏览器环境状态 */
.env-section {
	background: #fff;
	border-radius: 14px;
	padding: 20px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.04);
	margin-bottom: 24px;
}

.env-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 0;
	border-bottom: 1px solid #f5f5f5;
	word-break: break-all;
}

.env-row:last-child {
	border-bottom: none;
}

.env-lbl {
	font-size: 13px;
	color: #888;
	flex-shrink: 0;
	margin-right: 12px;
}

.env-val {
	font-size: 13px;
	font-weight: 600;
	color: #333;
	word-break: break-all;
	text-align: right;
}

.env-val.ok {
	color: #52c41a;
}

.info-value.ok {
	color: #52c41a;
}

/* 到账状态文本换行避免挤压 */
#rechargeStatus {
	word-break: break-all;
}

/* 充值金额区 min 高度，避免环境切换布局跳动 */
.tron-recharge .history-section {
	background: #f8f9fa;
	box-shadow: none;
}

/* 旧充值页 → 钱包一键充值引导横幅 */
.wallet-entry-banner {
	display: flex;
	align-items: center;
	gap: 10px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
	border-radius: 12px;
	padding: 14px 18px;
	margin-bottom: 24px;
}

.wallet-entry-banner .banner-icon {
	font-size: 20px;
	flex-shrink: 0;
}

.wallet-entry-banner .banner-text {
	flex: 1;
	font-size: 13px;
	line-height: 1.5;
}

.wallet-entry-banner .banner-link {
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	background: rgba(255,255,255,0.22);
	padding: 6px 14px;
	border-radius: 8px;
	flex-shrink: 0;
}

.wallet-entry-banner .banner-link:hover {
	background: rgba(255,255,255,0.32);
}

/* ===== TRC20 充值引导页：二维码主视觉 + 支持钱包卡片（tron-recharge） ===== */
.guide-card {
	background: #fff;
	border-radius: 16px;
	padding: 26px 20px 22px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.05);
	margin-bottom: 20px;
	text-align: center;
}

.guide-qr-frame {
	display: inline-block;
	position: relative;
	padding: 12px;
	border: 1px solid #ececec;
	border-radius: 14px;
	background: #fff;
}

/* 二维码过期遮罩层：遮盖二维码本体，中央提供刷新图标 */
.guide-qr-mask {
	position: absolute;
	inset: 12px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 10px;
	background: rgba(255,255,255,0.94);
	border-radius: 8px;
	z-index: 2;
}
.guide-qr-mask[hidden] {
	display: none;
}
.qr-refresh-btn {
	width: 52px;
	height: 52px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 14px rgba(102,126,234,0.4);
}
.qr-refresh-text {
	color: #5a6072;
	font-size: 13px;
	text-align: center;
	line-height: 1.5;
}

.guide-qr {
	width: 240px;
	height: 240px;
	display: block;
	border-radius: 6px;
}

.guide-qr-tip {
	font-size: 13px;
	color: #666;
	margin: 14px 0 14px;
	line-height: 1.6;
}

.guide-rate {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 14px;
	font-size: 14px;
}

.guide-rate-label {
	color: #666;
	font-weight: 500;
}

.guide-rate-value {
	color: #e74c3c;
	font-weight: 700;
	font-size: 15px;
}

.wallets-card {
	background: #fff;
	border-radius: 16px;
	padding: 20px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.05);
	margin-bottom: 20px;
}

.wallets-title {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 15px;
	font-weight: 600;
	color: #333;
	margin-bottom: 16px;
}

.wallet-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
}

.wallet-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	background: #f8f9fb;
	border: 1px solid #eef0f3;
	border-radius: 12px;
	padding: 16px 8px 12px;
	transition: all 0.2s;
}

.wallet-card:hover {
	border-color: #c9d4f7;
	background: #f2f5fe;
}

.wallet-img {
	width: 56px;
	height: 56px;
	border-radius: 14px;
}

.wallet-name {
	font-size: 12px;
	color: #555;
	text-align: center;
	min-height: 32px;
	line-height: 1.3;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wallets-tip {
	margin-top: 14px;
	font-size: 12px;
	color: #999;
	text-align: center;
}

@media (max-width: 480px) {
	.wallet-grid { grid-template-columns: repeat(2, 1fr); }
	.guide-qr { width: 200px; height: 200px; }
}