:root {
  --bg: #0a0b0d;
  --surface: #14171c;
  --surface-2: #1b1f26;
  --surface-3: #232833;
  --border: #262b34;
  --text: #eaecef;
  --muted: #848e9c;
  --accent: #2b6cff;
  --accent-2: #6f4bff;
  --green: #0ecb81;
  --red: #f6465d;
  --gold: #f5b544;
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: radial-gradient(1200px 600px at 70% -10%, #16203a 0%, transparent 55%),
              radial-gradient(900px 500px at 10% 0%, #1b1630 0%, transparent 50%),
              var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; }

.app { max-width: 1120px; margin: 0 auto; padding: 0 20px 40px; }

.navbar {
  display: flex; align-items: center; gap: 20px;
  padding: 18px 0; position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 8px; }
.logo {
  font-weight: 800; font-size: 22px; letter-spacing: -0.5px;
  color: #fff;
}
.logo span { color: var(--accent); }
.brand-sub {
  font-size: 11px; padding: 2px 7px; border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 700;
}
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.user-chip {
  display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 20px;
  background: rgba(43,108,255,0.14); border: 1px solid rgba(43,108,255,0.4);
  color: #7ea2ff; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.copy-line { display: flex; gap: 8px; }
.copy-line input { flex: 1; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }

.btn {
  border: none; border-radius: 10px; padding: 10px 18px;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: 0.2s;
  font-family: inherit;
}
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); }
.btn-ghost { background: var(--surface-3); color: var(--text); }
.btn-ghost:hover { background: #2c3341; }
.btn-block { width: 100%;margin-top: 10px; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.icon-btn {
  background: transparent; border: none; color: var(--muted);
  cursor: pointer; display: inline-flex; padding: 4px; border-radius: 6px;
}
.icon-btn:hover { color: var(--text); background: var(--surface-3); }

.main { padding-top: 12px; }
.grid {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px;
  align-items: start;
}
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-title { font-size: 15px; font-weight: 600; }

.balance-card {
  background: linear-gradient(160deg, #1a2340 0%, #14171c 60%);
  border: 1px solid #2a3350;
}
.account-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.06); padding: 4px 10px; border-radius: 20px;
  font-size: 12px; color: var(--muted); font-family: monospace;
}
.total-usd { font-size: 42px; font-weight: 800; letter-spacing: -1px; margin: 6px 0 2px; }
.total-cny { font-size: 15px; color: var(--muted); margin: 0 0 14px; }
.tron-status {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 20px; padding: 5px 12px; font-size: 12px;
  margin-bottom: 16px;
}
.tron-status:hover { border-color: var(--accent); }
.balance-actions { display: flex; gap: 10px; }
.action {
  display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  color: var(--text); border-radius: 12px; padding: 12px 4px; cursor: pointer;
  font-size: 13px; transition: 0.2s; font-family: inherit;
}
.action:hover { background: rgba(255,255,255,0.1); border-color: var(--accent); }
.action-ico { font-size: 18px; }

.connect-card { text-align: center; }
.connect-illus { font-size: 40px; margin-bottom: 10px; }
.connect-card h3 { margin-bottom: 8px; }
.connect-card p { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.connect-btns { display: flex; gap: 10px;margin-top: 10px; }
.connect-btns .btn { flex: 1; }
.readonly { display: flex; gap: 8px; margin-top: 16px; }
.readonly input { flex: 1; }

input, select {
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); border-radius: 10px; padding: 11px 12px;
  font-size: 14px; font-family: inherit; outline: none; width: 100%;
}
input:focus, select:focus { border-color: var(--accent); }
input[readonly] { color: var(--muted); cursor: default; }

.assets-card { grid-column: 2; grid-row: 1; }
.asset-list { display: flex; flex-direction: column; }
.asset-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 6px; border-bottom: 1px solid var(--border);
}
.asset-row:last-child { border-bottom: none; }
.token-ico {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: #fff;
}
.asset-main { flex: 1; }
.asset-main b { display: block; font-size: 15px; }
.asset-main small { color: var(--muted); font-size: 12px; display: block; margin-top: 2px; }
.asset-right { text-align: right; }
.asset-right b { display: block; font-size: 15px; }
.asset-right small { color: var(--muted); font-size: 12px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; font-size: 14px; }
.skeleton { color: var(--muted); padding: 20px 0; text-align: center; }

.history-card { min-height: 300px; margin-top: 20px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.row-2 .history-card { margin-top: 0; }
.tx-list { display: flex; flex-direction: column; }
.tx-row {
  display: flex; align-items: center; gap: 14px; padding: 14px 4px;
  border-bottom: 1px solid var(--border);
}
.tx-row:last-child { border-bottom: none; }
.tx-dir {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.tx-dir.in { background: rgba(14,203,129,0.15); color: var(--green); }
.tx-dir.out { background: rgba(246,70,93,0.15); color: var(--red); }
.tx-main { flex: 1; min-width: 0; }
.tx-main b { display: block; font-size: 14px; }
.tx-main small { color: var(--muted); font-size: 12px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-right { text-align: right; }
.tx-right b { display: block; font-size: 14px; }
.tx-right small { color: var(--muted); font-size: 12px; }
.tx-right a { color: var(--accent); text-decoration: none; font-size: 12px; }
.tag { font-size: 11px; padding: 2px 6px; border-radius: 4px; background: var(--surface-3); color: var(--muted); }
.status-tag { margin-left: 6px; cursor: pointer; }
.status-off { color: var(--gold); }
.status-on { color: var(--green); }

.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; }
.modal-mask { position: absolute; inset: 0; background: rgba(0,0,0,0.65); backdrop-filter: blur(4px); }
.modal-panel {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; width: 100%; max-width: 420px; padding: 22px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  animation: pop 0.18s ease-out;
}
.modal-panel.small { max-width: 360px; }
@keyframes pop { from { transform: scale(0.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.drawer { position: fixed; inset: 0; z-index: 100; }
.drawer-mask { position: absolute; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); }
.drawer-panel {
  position: absolute; top: 0; right: 0; height: 100%; width: 100%; max-width: 560px;
  background: var(--surface); border-left: 1px solid var(--border);
  padding: 22px;
  display: flex; flex-direction: column;
  animation: slideIn 0.2s ease-out;
}
.drawer-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.drawer-foot { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--border); }
.drawer-foot .btn { flex: 1; min-width: 120px; }
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.builtin-bal { font-size: 12px; color: var(--muted); line-height: 1.6; word-break: break-all; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal-head h3 { font-size: 17px; }
.modal-body { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 7px; font-size: 13px; color: var(--muted);margin-top: 10px; }
.field em { font-style: normal; float: right; }
.fee-line { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.fee-line b { color: var(--text); font-weight: 500; }
.network-badge {
  display: inline-block; align-self: center;
  background: rgba(255, 6, 10, 0.14); color: #ff6b6f;
  border: 1px solid rgba(255, 6, 10, 0.4);
  padding: 4px 14px; border-radius: 20px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.5px;
}
.qr-img { width: 200px; height: 200px; background: #fff; border-radius: 12px; padding: 8px; align-self: center; }
.receive-addr {
  font-family: monospace; font-size: 13px; word-break: break-all;
  background: var(--surface-2); padding: 12px; border-radius: 10px;
  margin: 10px 0;
}

.warn-banner {
  background: rgba(245, 181, 68, 0.12); border: 1px solid rgba(245, 181, 68, 0.4);
  color: #f5b544; font-size: 12px; line-height: 1.6; padding: 10px 12px; border-radius: 10px;
}
.builtin-list {
  display: flex; flex-direction: column; gap: 8px;
}
.builtin-item {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px; display: flex; flex-direction: column; gap: 8px;
}
.builtin-item.active { border-color: var(--accent); }
.builtin-head { display: flex; align-items: center; justify-content: space-between; }
.builtin-head b { font-size: 14px; word-break: break-all; min-width: 0; flex: 1; }
.builtin-addrs { font-family: monospace; font-size: 12px; color: var(--muted); line-height: 1.7; word-break: break-all; }
.builtin-actions { display: flex; gap: 8px; }
.builtin-actions .btn { flex: 1; }
.mnemonic-input {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 11px 12px; font-size: 13px; font-family: inherit;
  resize: vertical; outline: none; width: 100%;
}
.mnemonic-input:focus { border-color: var(--accent); }
.badge-builtin {
  font-size: 10px; padding: 1px 6px; border-radius: 4px; margin-left: 6px;
  background: rgba(43,108,255,0.2); color: #7ea2ff;
}

.confirm-body { display: flex; flex-direction: column; gap: 10px; }
.confirm-amount { font-size: 24px; font-weight: 800; text-align: center; padding: 4px 0 10px; }
.confirm-row { display: flex; justify-content: space-between; gap: 14px; font-size: 13px; }
.confirm-row span { color: var(--muted); flex-shrink: 0; }
.confirm-row b { text-align: right; word-break: break-all; font-weight: 600; }

.mnemonic-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px;
}
.mnemonic-word {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface-3); border-radius: 8px; padding: 8px 10px;
  font-family: monospace; font-size: 13px; color: var(--gold);
}
.mnemonic-word i { font-style: normal; color: var(--muted); font-size: 11px; min-width: 14px; }
.check-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); }
.check-line input { width: auto; }

.toast {
  position: fixed; top: 16px; right: 16px; transform: translateY(-16px);
  background: var(--surface-3); border: 1px solid var(--border); color: var(--text);
  padding: 12px 20px; border-radius: 12px; font-size: 14px; z-index: 300;
  opacity: 0; pointer-events: none; transition: 0.25s; max-width: 90vw;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { border-color: rgba(14,203,129,0.5); }
.toast.error { border-color: rgba(246,70,93,0.5); }

.top-status {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0;
  font-size: 12px; color: var(--muted);
}

/* ---------- 顶部 Tab ---------- */
.nav-tabs { display: flex; gap: 6px; }
.tab {
  background: transparent; border: 1px solid transparent; color: var(--muted);
  padding: 8px 14px; border-radius: 10px; font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: 0.2s;
}
.tab:hover { color: var(--text); background: var(--surface-3); }
.tab.active { color: #fff; background: var(--surface-3); border-color: var(--border); }

/* ---------- 批量转账 ---------- */
#batchPage .card + .card { margin-top: 16px; }
#gasPage .card + .card { margin-top: 16px; }
#rechargePage .card + .card { margin-top: 16px; }
#gasPage details.card summary { list-style: none; }
#gasPage details.card summary::-webkit-details-marker { display: none; }
.batch-table-wrap { overflow-x: auto; margin-top: 6px; }
.batch-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.batch-table th {
  text-align: left; color: var(--muted); font-weight: 500;
  padding: 6px 8px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.batch-table td { padding: 5px 6px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.batch-table tr:last-child td { border-bottom: none; }
.batch-table input, .batch-table select {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 6px 8px; font-size: 13px; font-family: inherit; width: 100%;
}
.batch-table input:focus, .batch-table select:focus { border-color: var(--accent); outline: none; }
.batch-table input.batch-addr { font-family: monospace; min-width: 230px; }
.batch-table input.batch-amt { min-width: 90px; }
.batch-table select { min-width: 76px; }
.batch-fee { color: var(--muted); white-space: nowrap; }
.batch-st { white-space: nowrap; font-size: 12px; line-height: 1.6; }
.batch-st .ok { color: var(--green); }
.batch-st .fail { color: var(--red); }
.batch-st .warn { color: var(--gold); }
.batch-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.batch-actions .btn { flex: 1; min-width: 120px; }
.batch-del { background: transparent; border: none; color: var(--muted); cursor: pointer; font-size: 15px; padding: 4px 6px; }
.batch-del:hover { color: var(--red); }

@media (max-width: 760px) {
  .navbar { flex-wrap: wrap; }
  .nav-tabs { order: 3; width: 100%; }
  .grid { grid-template-columns: 1fr; }
  .row-2 { grid-template-columns: 1fr; }
  .assets-card { grid-column: auto; grid-row: auto; }
  .total-usd { font-size: 34px; }
  .brand-sub { display: none; }
}

/* ================= 科技感增强 ================= */

/* 背景：动感网格 + 极光光晕（纯固定层，不参与布局、不接收事件） */
body { position: relative; }
body::before {
  content: ""; position: fixed; inset: -1px; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(43,108,255,0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43,108,255,0.10) 1px, transparent 1px);
  background-size: 38px 38px;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% -10%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 90% 80% at 50% -10%, #000 0%, transparent 75%);
  animation: gridPan 20s linear infinite;
}
body::after {
  content: ""; position: fixed; inset: -15%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(620px 380px at 12% 6%, rgba(43,108,255,0.32), transparent 60%),
    radial-gradient(540px 350px at 88% 12%, rgba(111,75,255,0.28), transparent 60%),
    radial-gradient(660px 430px at 60% 108%, rgba(0,229,255,0.16), transparent 62%);
  filter: blur(10px);
  animation: aurora 16s ease-in-out infinite alternate;
}
.app { position: relative; z-index: 1; }

@keyframes gridPan {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 38px 38px, 38px 38px; }
}
@keyframes aurora {
  from { transform: translate3d(0, 0, 0) scale(1); opacity: 0.9; }
  to   { transform: translate3d(0, -2%, 0) scale(1.08); opacity: 1; }
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes sheen {
  0% { transform: translateX(-160%); }
  60%, 100% { transform: translateX(260%); }
}

/* 品牌发光 */
.logo { text-shadow: 0 0 20px rgba(43,108,255,0.7); }
.total-usd {
  background: linear-gradient(180deg, #ffffff 20%, #9db7ff 70%, #6f9bff 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 顶部导航：霓虹底线 + 激活态发光 */
.navbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(43,108,255,0.7), rgba(0,229,255,0.7), rgba(111,75,255,0.7), transparent);
  box-shadow: 0 0 12px rgba(43,108,255,0.5);
}
.tab.active { box-shadow: 0 0 18px rgba(43,108,255,0.35), inset 0 0 14px rgba(43,108,255,0.14); }

/* 卡片：悬浮辉光 + 霓虹标题条 */
.card {
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card::before {
  content: ""; position: absolute; left: 16px; right: 16px; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(43,108,255,0.75), transparent);
  opacity: 0; transition: opacity 0.25s ease; pointer-events: none;
}
.card:hover {
  transform: translateY(-2px);
  border-color: rgba(43,108,255,0.55);
  box-shadow: 0 18px 50px rgba(0,0,0,0.5), 0 0 30px rgba(43,108,255,0.18);
}
.card:hover::before { opacity: 1; }
.balance-card { box-shadow: 0 0 50px rgba(43,108,255,0.14); border-color: rgba(43,108,255,0.35); }
.card-title::before {
  content: ""; display: inline-block; width: 3px; height: 14px; margin-right: 9px;
  background: linear-gradient(var(--accent), var(--accent-2)); border-radius: 2px;
  vertical-align: -2px; box-shadow: 0 0 10px rgba(43,108,255,0.9);
}

/* 按钮：渐变 + 扫光 + 辉光 */
.btn { position: relative; overflow: hidden; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 24px rgba(43,108,255,0.4);
}
.btn-primary::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: translateX(-160%); pointer-events: none;
}
.btn-primary:hover::after { animation: sheen 0.9s ease; }
.btn-primary:hover { box-shadow: 0 10px 34px rgba(43,108,255,0.65); }

/* 连接卡科技插画浮动 */
.connect-illus {
  width: 104px; height: 104px; margin-bottom: 6px;
  animation: floaty 5s ease-in-out infinite;
  filter: drop-shadow(0 0 24px rgba(43,108,255,0.55));
}

/* 地址等宽字体霓虹描边 */
.account-chip { border: 1px solid rgba(43,108,255,0.35); box-shadow: inset 0 0 12px rgba(43,108,255,0.15); }

/* 细滚动条：默认几乎透明，悬浮才亮 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(130,150,190,0.25);
  border: 2px solid transparent; background-clip: padding-box; border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(43,108,255,0.55); background-clip: padding-box; }

/* 尊重「减少动态效果」偏好 */
@media (prefers-reduced-motion: reduce) {
  body::before, body::after, .connect-illus, .btn-primary::after { animation: none; }
}

/* ================= 能量页 ================= */
.gas-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.gas-main, .gas-side { min-width: 0; }
#gasPage > .card { margin-top: 20px; }
@media (max-width: 900px) { .gas-layout { grid-template-columns: 1fr; } }

.gas-badge {
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px;
  color: var(--gold); background: rgba(245,181,68,0.12); border: 1px solid rgba(245,181,68,0.4);
}
.gas-unit-line { font-size: 13px; color: var(--muted); white-space: nowrap; }
.gas-unit-line b { color: #9db7ff; font-weight: 700; font-variant-numeric: tabular-nums; }

.gas-input-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.gas-step {
  width: 34px; height: 40px; flex: 0 0 auto; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  font-size: 20px; line-height: 1; cursor: pointer; font-family: inherit; transition: 0.2s;
}
.gas-step:hover { border-color: var(--accent); color: #9db7ff; }
.gas-energy-input { flex: 1 1 auto; min-width: 0; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.gas-convert { font-size: 12px; color: var(--muted); white-space: nowrap; }
.gas-unit-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; flex: 0 0 auto; }
.gas-unit-btn {
  background: transparent; border: none; color: var(--muted); padding: 9px 14px;
  font-size: 13px; cursor: pointer; font-family: inherit; transition: 0.2s;
}
.gas-unit-btn.active { background: rgba(43,108,255,0.16); color: #9db7ff; }

.gas-qty-btns { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 12px; }
.gas-qty-btn {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 10px 8px; font-size: 13px; cursor: pointer; font-family: inherit; transition: 0.2s;
  text-align: center;
}
.gas-qty-btn:hover { border-color: var(--accent); }
.gas-qty-btn.active {
  background: rgba(43,108,255,0.16); border-color: var(--accent); color: #9db7ff;
  box-shadow: 0 0 12px rgba(43,108,255,0.25);
}
@media (max-width: 560px) { .gas-qty-btns { grid-template-columns: repeat(3, 1fr); } }

.gas-req { color: var(--red); font-style: normal; }
.gas-addr-input { width: 100%; font-family: monospace; font-size: 13px; line-height: 1.7; min-height: 200px; }
.gas-addr-stat { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 12px 0; font-size: 13px; color: var(--muted); }
.gas-addr-stat b { color: var(--text); font-variant-numeric: tabular-nums; }
.gas-addr-stat .bad { color: var(--red); }
.gas-addr-stat .warn { color: var(--gold); }
.gas-addr-error { color: var(--red); font-size: 12px; margin-top: 4px; }

/* 开关 */
.gas-switch { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--muted); font-size: 13px; }
.gas-switch input { display: none; }
.gas-switch-track {
  width: 40px; height: 22px; border-radius: 999px; background: var(--surface-3);
  border: 1px solid var(--border); position: relative; transition: 0.2s; flex: 0 0 auto;
}
.gas-switch-track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; transition: 0.2s;
}
.gas-switch input:checked + .gas-switch-track { background: var(--accent); border-color: var(--accent); }
.gas-switch input:checked + .gas-switch-track::after { transform: translateX(18px); }

.gas-info-box {
  background: rgba(43,108,255,0.08); border: 1px solid rgba(43,108,255,0.3);
  border-radius: 10px; padding: 12px; margin: 14px 0 10px; font-size: 12px; line-height: 1.8; color: var(--muted);
}
.gas-info-box b { color: #9db7ff; display: block; margin-bottom: 4px; }
.gas-info-box ul { margin: 0; padding-left: 16px; }
.gas-warn-box {
  background: rgba(245,181,68,0.10); border: 1px solid rgba(245,181,68,0.4);
  border-radius: 10px; padding: 12px; margin-bottom: 14px; font-size: 12px; line-height: 1.8; color: var(--gold);
}
.gas-warn-box b { display: block; margin-bottom: 4px; }

.gas-guide { color: var(--accent); font-size: 13px; cursor: pointer; user-select: none; }
.gas-guide:hover { text-decoration: underline; }
.gas-pay-line { display: flex; align-items: baseline; justify-content: space-between; padding: 6px 0 10px; border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.gas-pay-line span { font-size: 15px; font-weight: 600; color: var(--text); }
.gas-pay-line b { font-size: 24px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.gas-buy-btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gas-buy-btn small { opacity: 0.85; font-weight: 500; font-size: 12px; }

.gas-range { display: inline-flex; gap: 6px; }
.gas-range-btn {
  background: transparent; border: 1px solid var(--border); color: var(--muted);
  border-radius: 8px; padding: 4px 10px; font-size: 12px; cursor: pointer; font-family: inherit; transition: 0.2s;
}
.gas-range-btn:hover { color: var(--text); border-color: var(--accent); }
.gas-range-btn.active { color: #fff; border-color: var(--accent); background: var(--surface-3); }

.gas-trend { margin-top: 6px; }
.gas-chart { width: 100%; height: 200px; display: block; }
.gas-bar { fill: var(--accent); opacity: 0.85; }
.gas-bar:hover { fill: var(--accent-2); opacity: 1; }
.gas-chart-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ================= 充值页 ================= */
.recharge-body { display: flex; gap: 18px; align-items: flex-start; margin-top: 6px; }
.recharge-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }

/* ================= 移动端适配 ================= */
@media (max-width: 760px) {
  .app { padding: 0 14px 30px; }
  .card { padding: 16px; }
  .card-head { flex-wrap: wrap; gap: 6px; }
  .modal-panel { width: calc(100% - 24px); padding: 18px; }
  .history-card { min-height: 0; }
}

@media (max-width: 560px) {
  .app { padding: 0 12px 28px; }
  .card { padding: 14px; }
  .navbar { padding: 12px 0; }
  .nav-right { gap: 8px; }
  .user-chip { padding: 4px 10px; }

  .gas-unit-line { white-space: normal; }
  .gas-input-row { flex-wrap: wrap; gap: 8px; }
  .gas-energy-input { flex: 1 1 110px; font-size: 16px; }
  .gas-step { width: 30px; height: 36px; font-size: 18px; }
  .gas-convert { flex: 1 1 auto; }
  .gas-unit-toggle { margin-left: auto; }
  .gas-unit-btn { padding: 8px 12px; }

  .gas-qty-btns { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .gas-qty-btn { padding: 9px 6px; }

  .gas-addr-stat { gap: 10px 14px; font-size: 12px; }
  .gas-switch { margin-left: 0; flex-basis: 100%; }
  .gas-addr-input { min-height: 150px; }

  .gas-pay-line span { font-size: 14px; }
  .gas-pay-line b { font-size: 20px; }
  .gas-chart { height: 150px; }

  .balance-actions { gap: 8px; }
  .action { font-size: 12px; padding: 10px 2px; }

  .recharge-body { flex-direction: column; align-items: center; }
  .recharge-info { width: 100%; }
}
