/* 全局扁平化深灰背景 */
body {
	margin: 0;
	font: 14px/1.4 sans-serif;
	background: #2b2b2b;
	color: #fff;
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 100vh;
}

h1 {
	margin: 0 0 16px;
	font-size: 20px;
	text-align: center;
}

input {
	width: 100%;
	padding: 10px;
	margin-bottom: 12px;
	border: none;
	border-radius: 4px;
	font-size: 14px;
	background: #3a3a3a;
	color: #fff;
	box-sizing: border-box;
}

button {
	width: 100%;
	padding: 10px;
	border: none;
	border-radius: 4px;
	font-size: 14px;
	font-weight: bold;
	cursor: pointer;
	transition: background .2s;
	box-sizing: border-box;
	background: #4a90e2;
	color: white;
}

button:hover {
	background: #357bd8;
}

button.logout {
	background: #999;
	margin-top: 16px;
}

button.logout:hover {
	background: #777;
}

.card {
	background: #333;
	padding: 24px;
	border-radius: 8px;
	width: 90%;
	max-width: 400px;
	box-shadow: 0 8px 24px rgba(0,0,0,.4);
}

.section {
	display: none;
}

.section.active {
	display: block;
}

/* 扁平卡片 */
.panel {
	background: #3a3a3a;
	padding: 16px;
	margin-bottom: 16px;
	border-radius: 6px;
}

.panel h2 {
	margin: 0 0 12px;
	font-size: 16px;
	font-weight: bold;
}

#balance {
	font-size: 24px;
	font-weight: bold;
	margin-bottom: 8px;
}

.addr {
	font-size: 12px;
	word-break: break-all;
	color: #ccc;
}

#codeShow {
	margin-top: 8px;
	font-size: 12px;
	font-weight: bold;
	word-break: break-all;
	white-space: pre-wrap;
	line-height: 1.3;
	background: rgba(255,255,255,0.1);
	padding: 8px;
	border-radius: 4px;
}

#hist {
	max-height: 120px;
	overflow-y: auto;
	font-size: 12px;
}

.item {
	padding: 6px 0;
	border-bottom: 1px solid #444;
}

.item:last-child {
	border: none;
}

.outgoing {
	color: #e74c3c;
	font-weight: bold;
}

.incoming {
	color: #27ae60;
	font-weight: bold;
}

.error {
	color: #e74c3c;
	font-size: 12px;
	margin-top: 5px;
	margin-bottom: 8px;
}

.success {
	color: #27ae60;
	font-size: 12px;
	margin-top: 5px;
}

.info {
	font-size: 12px;
	color: #3498db;
	margin-top: 8px;
	text-align: center;
}

/* ==================== 钱包卡片新增样式 ==================== */

.wallet-card {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border-radius: 15px;
	padding: 20px;
	color: white;
	box-shadow: 0 10px 20px rgba(0,0,0,0.2);
	margin-bottom: 20px;
}

.wallet-card h3 {
	margin-top: 0;
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 18px;
}

.wallet-card h3 i {
	font-size: 20px;
}

.wallet-detail {
	background: rgba(255,255,255,0.1);
	border-radius: 10px;
	padding: 15px;
	margin: 15px 0;
}

.wallet-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 10px 0;
	padding: 8px 0;
	border-bottom: 1px solid rgba(255,255,255,0.1);
}

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

.wallet-row .label {
	font-weight: bold;
	min-width: 100px;
	font-size: 13px;
}

.wallet-row .value {
	flex: 1;
	text-align: right;
	font-family: 'Courier New', monospace;
	margin: 0 10px;
	word-break: break-all;
	font-size: 13px;
}

.wallet-id {
	color: #ffd700;
	font-weight: bold;
	background: rgba(0,0,0,0.2);
	padding: 2px 6px;
	border-radius: 4px;
}

.copy-btn {
	background: rgba(255,255,255,0.2);
	border: none;
	border-radius: 5px;
	color: white;
	padding: 5px 10px;
	cursor: pointer;
	transition: background 0.3s;
	font-size: 12px;
	min-width: 40px;
}

.copy-btn:hover {
	background: rgba(255,255,255,0.3);
}

.balance-row {
	font-size: 1.5em;
	padding: 15px 0;
	border-top: 2px solid rgba(255,255,255,0.2);
	margin-top: 10px;
}

.balance {
	color: #4CAF50;
	font-weight: bold;
	font-size: 1.5em;
}

.wallet-footer {
	text-align: center;
	font-size: 0.8em;
	opacity: 0.8;
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid rgba(255,255,255,0.1);
}

.wallet-footer i {
	margin-right: 5px;
}

/* 操作消息通用样式 */
.op-msg {
	font-size: 12px;
	margin-top: 8px;
	padding: 8px;
	border-radius: 4px;
	transition: opacity 0.5s ease;
	min-height: 1.2em; /* 保持高度，避免布局抖动 */
}

/* 确保错误和成功样式对 .op-msg 也生效 */
.op-msg.error {
	color: #e74c3c;
	background: rgba(231, 76, 60, 0.1);
	border-left: 3px solid #e74c3c;
}

.op-msg.success {
	color: #27ae60;
	background: rgba(39, 174, 96, 0.1);
	border-left: 3px solid #27ae60;
}