/* 微信/Telegram 小程序风格：系统字体，不用 Google Inter（否则发虚、不像原生） */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #f5f5f5;
  --white: #ffffff;
  --text: #1a1a1a;
  --text2: #666666;
  --text3: #999999;
  --border: #ededed;
  --primary: #07c160;
  --primary-light: #e8f8ef;
  --primary-rgb: 7, 193, 96;
  --sign-from: #ff8f4a;
  --sign-to: #ff4d4f;
  --blue: #576b95;
  --red: #fa5151;
  --orange: #ff976a;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.05);
  --shadow-lift: 0 4px 16px rgba(0, 0, 0, 0.06);
  --highlight-inset: none;
  --surface-dim: rgba(0, 0, 0, 0.03);
  --press-bg: rgba(var(--primary-rgb), 0.06);
  --press-bg-soft: rgba(0, 0, 0, 0.03);
  --focus-ring: rgba(var(--primary-rgb), 0.15);
  --focus-bg: #f8fdf9;
  --focus-border: rgba(var(--primary-rgb), 0.35);
  --font-sans: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-num: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'PingFang SC', 'Helvetica Neue', sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Menlo', 'Roboto Mono', monospace;
}

[data-theme="green"] { --primary: #34c759; --primary-light: #e8f8ed; --primary-rgb: 52,199,89; }
[data-theme="blue"] { --primary: #007aff; --primary-light: #e3f2fd; --primary-rgb: 0,122,255; }
[data-theme="purple"] { --primary: #af52de; --primary-light: #f3e5f5; --primary-rgb: 175,82,222; }
[data-theme="orange"] { --primary: #ff9500; --primary-light: #fff3e0; --primary-rgb: 255,149,0; }
[data-theme="red"] { --primary: #ff3b30; --primary-light: #fce4ec; --primary-rgb: 255,59,48; }
[data-theme="teal"] { --primary: #5ac8fa; --primary-light: #e0f7fa; --primary-rgb: 90,200,250; }
[data-theme="dark"] {
  --bg: #1c1c1e; --white: #2c2c2e; --text: #f5f5f7; --text2: #a1a1a6; --text3: #636366;
  --border: #3a3a3c; --primary: #30d158; --primary-light: #1a3a24; --primary-rgb: 48,209,88;
  --shadow: 0 1px 3px rgba(0,0,0,0.2), 0 4px 12px rgba(0,0,0,0.15);
}
[data-theme="dark-blue"] {
  --bg: #0d1117; --white: #161b22; --text: #c9d1d9; --text2: #8b949e; --text3: #484f58;
  --border: #30363d; --primary: #58a6ff; --primary-light: #0d2238; --primary-rgb: 88,166,255;
  --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 4px 12px rgba(0,0,0,0.2);
}
[data-theme="rose"] { --primary: #e91e63; --primary-light: #fce4ec; --primary-rgb: 233,30,99; }
[data-theme="gold"] { --primary: #ffc107; --primary-light: #fff8e1; --primary-rgb: 255,193,7; }
[data-theme="lime"] { --primary: #76ff03; --primary-light: #f1f8e9; --primary-rgb: 118,255,3; }
[data-theme="cyan"] { --primary: #00bcd4; --primary-light: #e0f7fa; --primary-rgb: 0,188,212; }
[data-theme="indigo"] { --primary: #3f51b5; --primary-light: #e8eaf6; --primary-rgb: 63,81,181; }
[data-theme="pink"] { --primary: #ff6090; --primary-light: #ffeef3; --primary-rgb: 255,96,144; }
[data-theme="neon"] {
  --bg: #0a0a0a; --white: #1a1a2e; --text: #e0e0e0; --text2: #a0a0b0; --text3: #505060;
  --border: #2a2a3e; --primary: #00ff88; --primary-light: #0a2a1a; --primary-rgb: 0,255,136;
  --shadow: 0 0 8px rgba(0,255,136,0.15), 0 4px 12px rgba(0,0,0,0.3);
}
[data-theme="sunset"] {
  --bg: #1a0a1e; --white: #2a1a2e; --text: #f0d0f0; --text2: #b090b0; --text3: #706070;
  --border: #3a2a3e; --primary: #ff6b35; --primary-light: #2a1510; --primary-rgb: 255,107,53;
  --shadow: 0 0 8px rgba(255,107,53,0.15), 0 4px 12px rgba(0,0,0,0.3);
}
[data-theme="ice"] {
  --bg: #e8f4f8; --white: #f0f8ff; --text: #1a3a4a; --text2: #4a7a8a; --text3: #8ab0c0;
  --border: #c0dae8; --primary: #00b4d8; --primary-light: #caf0f8; --primary-rgb: 0,180,216;
  --shadow: 0 1px 3px rgba(0,180,216,0.08), 0 4px 12px rgba(0,0,0,0.04);
}
[data-theme="dark-purple"] {
  --bg: #13111c; --white: #1e1b2e; --text: #d0c8e8; --text2: #9088a8; --text3: #504868;
  --border: #2e2a42; --primary: #b388ff; --primary-light: #1a1028; --primary-rgb: 179,136,255;
  --shadow: 0 0 8px rgba(179,136,255,0.12), 0 4px 12px rgba(0,0,0,0.3);
}
[data-theme="vivid"] {
  --bg: #f3f5fb;
  --white: #ffffff;
  --text: #111827;
  --text2: #1f2937;
  --text3: #374151;
  --border: #e4e7f0;
  --primary: #ff4d6d;
  --primary-light: #ffe8ee;
  --primary-rgb: 255, 77, 109;
  --sign-from: #ff8f4a;
  --sign-to: #ff4d6d;
  --blue: #2563eb;
  --red: #ef4444;
  --orange: #f59e0b;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 2px 8px rgba(17, 24, 39, 0.06);
  --shadow-card: 0 8px 22px rgba(17, 24, 39, 0.07);
  --shadow-lift: 0 10px 28px rgba(17, 24, 39, 0.1);
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  overflow-x: hidden;
  letter-spacing: 0;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 400;
}

/* 字重层级：粗标题 / 细说明（对齐微信小程序） */
.fw-bold { font-weight: 600; color: var(--text); }
.fw-medium { font-weight: 500; color: var(--text); }
.fw-regular { font-weight: 400; color: var(--text2); }
.fw-light { font-weight: 400; color: var(--text3); }

/* 金额、能量等大数字 */
.font-num,
.asset-value,
.free-energy-row strong,
.rent-bottom-price,
#exchangeResult,
.tier-price,
.tier-energy {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
  font-weight: 600;
  letter-spacing: 0;
}

/* ===== 矢量图标（替代 emoji） ===== */
.ico {
  width: 1em;
  height: 1em;
  display: block;
  flex-shrink: 0;
}
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: none;
}
.feature-icon .ico { width: 24px; height: 24px; }
.feature-icon.ic-green { background: #e8f8ef; color: #07c160; }
.feature-icon.ic-blue { background: #e8f4fd; color: #1989fa; }
.feature-icon.ic-orange { background: #fff3e6; color: #ff976a; }
.feature-icon.ic-purple { background: #f3edff; color: #8b5cf6; }
.feature-icon.ic-teal { background: #e6faf5; color: #00b578; }
.feature-icon.ic-pink { background: #ffeef3; color: #ff5c8a; }
.feature-icon.ic-gold { background: #fff8e6; color: #ffb020; }

.menu-icon-cell {
  width: 22px;
  height: 22px;
  margin-right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.menu-icon-cell .ico { width: 20px; height: 20px; }
.menu-icon-cell.ic-green,
.menu-icon-cell.ic-orange,
.menu-icon-cell.ic-blue,
.menu-icon-cell.ic-purple,
.menu-icon-cell.ic-gray { color: var(--primary); }

.nav-item .nav-ico {
  width: 26px;
  height: 26px;
  color: #b2b2b2;
}
.nav-item.active .nav-ico { color: var(--primary); }

.fab-support .ico { width: 24px; height: 24px; color: #fff; }
.sign-btn-large .ico-sign { width: 16px; height: 16px; color: #fff; }
.sign-tag .ico-tag { width: 12px; height: 12px; color: var(--primary); display: inline-block; vertical-align: -2px; margin-right: 2px; }

.section-header > span { font-weight: 600; color: var(--text); }
.section-header .ico-section { width: 16px; height: 16px; color: var(--primary); vertical-align: -3px; margin-right: 4px; display: inline-block; }

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  padding-bottom: 75px;
}

/* ===== 页面切换 ===== */
.page { display: none; }
.page.active {
  display: block;
  animation: page-slide-in 0.26s cubic-bezier(0.22, 0.61, 0.36, 1);
}
@keyframes page-slide-in {
  from { opacity: 0; transform: translateX(22px); }
  to { opacity: 1; transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .page.active { animation: none; }
}

/* ===== 首页 - 用户头部 ===== */
.site-logo-bar {
  display: none;
  align-items: center;
  padding: 10px 16px 0;
  background: var(--white);
}
.site-logo-bar img {
  height: 36px;
  max-width: 140px;
  object-fit: contain;
}
.user-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--white);
  position: relative;
  z-index: 2;
}
.user-header::after { display: none; }

.user-left { display: flex; align-items: center; gap: 12px; }

.avatar {
  width: 48px; height: 48px; border-radius: 50%;
  object-fit: cover;
  border: none;
  background: #f0f0f0;
  box-shadow: none;
}

.user-name { font-size: 16px; font-weight: 600; color: var(--text); line-height: 1.35; }
.user-id { font-size: 12px; color: var(--text3); margin-top: 3px; font-weight: 400; line-height: 1.4; }

.sign-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(var(--primary-rgb),0.25);
  transition: all 0.15s ease;
}

.sign-btn:active { transform: scale(0.96); }

.sign-btn.signed {
  background: var(--primary-light);
  color: var(--primary);
  box-shadow: none;
}

/* ===== Banner ===== */
.banner {
  margin: 12px 16px 10px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  box-shadow: none;
}
.banner-slider {
  display: flex;
  transition: transform 0.4s ease;
  width: 100%;
}
.banner-slide {
  min-width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
}
.banner-slide img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  object-fit: cover;
  aspect-ratio: 750 / 340;
  background: #060912;
}
.banner-default {
  background: #eef5ff;
  padding: 18px 16px;
  color: var(--text);
  border-radius: var(--radius);
  border: none;
  box-shadow: none;
  position: relative;
}
.banner-default::before { display: none; }
.banner-title { font-size: 18px; font-weight: 600; margin-bottom: 6px; color: var(--text); line-height: 1.4; }
.banner-sub { font-size: 13px; color: var(--text2); font-weight: 400; line-height: 1.5; }
.banner-cta {
  display: inline-block;
  margin-top: 12px;
  padding: 7px 14px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: none;
  position: relative;
  z-index: 1;
}
.banner-cta:active { opacity: 0.9; transform: scale(0.98); }
.banner-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 8px 0 4px;
}
.banner-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text3);
  transition: all 0.3s;
}
.banner-dot.active {
  width: 18px; border-radius: 3px;
  background: var(--primary);
}

/* ===== 功能入口（独立浮起卡片，明部+暗部） ===== */
.feature-list {
  margin: 0 16px 8px;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.feature-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: transparent;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--border);
  box-shadow: none;
  cursor: pointer;
  transition: background 0.12s ease;
  position: relative;
}
.feature-item::before { display: none; }

.feature-item:last-child { border-bottom: none; }
.feature-item:active {
  transform: scale(0.98);
  background: var(--press-bg-soft);
  box-shadow: none;
}

.feature-info { flex: 1; margin-left: 12px; min-width: 0; }
.feature-title { font-size: 14px; font-weight: 500; color: var(--text); line-height: 1.35; }
.feature-desc { font-size: 12px; color: var(--text3); margin-top: 2px; font-weight: 400; line-height: 1.45; }
.feature-arrow { color: #c8c8c8; font-size: 17px; font-weight: 300; line-height: 1; }

/* ===== Section ===== */
.section { margin-top: 20px; padding: 0 16px; }
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 15px;
}
.section-header a { color: var(--text3); font-size: 13px; text-decoration: none; font-weight: 400; }

.record-list {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  border: none;
  position: relative;
}
.record-list::before { display: none; }

.record-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

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

.record-left { display: flex; align-items: center; gap: 12px; }
.record-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}
.record-icon .ico { width: 18px; height: 18px; }
.record-title { font-size: 15px; font-weight: 600; color: var(--text); }
.record-time { font-size: 12px; color: var(--text3); margin-top: 3px; font-weight: 400; }
.record-right { text-align: right; }
.record-amount { font-size: 15px; font-weight: 600; color: var(--text); }
.record-status { font-size: 11px; color: var(--primary); margin-top: 2px; }

.empty-hint {
  text-align: center;
  padding: 40px 0;
  color: var(--text3);
  font-size: 13px;
}

/* ===== 能量页底部操作栏（主导航上方） ===== */
.energy-bottom-dock {
  position: fixed;
  bottom: calc(54px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  z-index: 99;
  background: var(--white);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
}

.energy-mode-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.energy-mode-btn {
  flex: 1;
  padding: 12px 8px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--text3);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.energy-mode-btn.active {
  color: var(--primary);
  background: var(--primary-light);
}

.rent-bottom-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 12px;
}

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

.rent-bottom-label {
  display: block;
  font-size: 12px;
  color: var(--text3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rent-bottom-price {
  display: block;
  font-size: 17px;
  font-weight: 600;
  color: var(--primary);
  margin-top: 2px;
}

.rent-bottom-btn {
  flex-shrink: 0;
  padding: 12px 22px;
  border: none;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--primary), var(--primary));
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.rent-bottom-btn:active {
  transform: scale(0.97);
}

#page-energy .energy-form,
#page-energy .transfer-rent-panel {
  padding-bottom: 80px;
}

/* ===== 能量租用页 ===== */
.page-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 16px;
  background: var(--white);
}

.page-title { font-size: 17px; font-weight: 600; }

.ui-version-banner {
  margin: 0 12px 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #e74c3c;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.build-badge {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted, #999);
  padding: 0 16px 8px;
  background: var(--white);
}

.balance-badge, .rate-badge {
  background: var(--primary-light);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
}

.back-btn {
  font-size: 20px;
  cursor: pointer;
  color: var(--text);
  background: none;
  border: none;
  padding: 0 8px;
}

.tab-bar {
  display: flex;
  padding: 0 16px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.tab-item {
  flex: 1;
  text-align: center;
  padding: 14px 0;
  font-size: 15px;
  font-weight: 400;
  color: var(--text3);
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  letter-spacing: 0.01em;
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
  user-select: none;
}

.tab-item:active {
  opacity: 0.72;
}

.tab-item.active {
  color: var(--text);
  font-weight: 600;
  border-bottom-color: var(--primary);
}

/* ===== Form ===== */
.energy-form { padding: 16px; }

.form-group { margin-bottom: 16px; }
.form-label { font-size: 14px; color: var(--text); margin-bottom: 8px; display: block; font-weight: 600; }

.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.form-label-row .form-label {
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
}

.input-box {
  display: flex;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.input-box:focus-within {
  border-color: var(--focus-border);
  background: var(--focus-bg);
  box-shadow: 0 0 0 3px var(--focus-ring), var(--shadow);
}

.input-icon {
  font-size: 16px;
  color: var(--text3);
  margin-right: 10px;
  flex-shrink: 0;
}

.form-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 14px 0;
  font-size: 14px;
  color: var(--text);
  background: transparent;
  font-family: inherit;
  font-weight: 500;
  letter-spacing: 0.01em;
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
}

.form-input::placeholder { color: #c7c7cc; font-weight: 400; }

.receiver-hint {
  margin: -8px 0 16px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.01em;
  border-radius: 8px;
}

.receiver-hint.has-u {
  background: #e8f5e9;
  color: #2e7d32;
}

.receiver-hint.no-u {
  background: #fff3e0;
  color: #e65100;
}

/* ===== 免费能量检测表单 ===== */
.detect-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.detect-input-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fafafa;
  overflow: hidden;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.detect-input-wrap:focus-within {
  border-color: var(--focus-border);
  background: var(--focus-bg);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.detect-input-wrap .form-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 10px 8px;
  font-size: 10px;
  line-height: 1.35;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: -0.04em;
  word-break: break-all;
  border-bottom: 1px solid var(--border);
}

.detect-copy-btn {
  align-self: flex-end;
  flex-shrink: 0;
  border: none;
  border-left: none;
  background: #fff;
  color: var(--text2);
  font-size: 12px;
  padding: 6px 12px;
  cursor: pointer;
  font-family: inherit;
}

.detect-copy-btn:active {
  background: #f2f2f7;
}

.detect-hint {
  color: #e53935;
  font-size: 12px;
  line-height: 1.65;
  margin: 2px 0 12px;
}

.detect-action-row {
  display: flex;
  justify-content: flex-end;
  margin: 4px 0 8px;
}

.detect-btn {
  border: none;
  background: #e8f7ee;
  color: var(--primary);
  font-size: 16px;
  font-weight: 700;
  padding: 10px 36px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}

.detect-btn:active {
  opacity: 0.85;
}

.detect-btn.loading {
  opacity: 0.85;
  pointer-events: none;
}

.detect-btn.loading::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 8px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: detect-spin 0.8s linear infinite;
  vertical-align: -2px;
}

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

.receiver-match-status {
  display: block;
  margin: 4px 0 10px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--primary);
  background: #e8f7ee;
  border-radius: 8px;
  text-align: center;
}

.receiver-match-status.loading::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: detect-spin 0.8s linear infinite;
  vertical-align: -2px;
}

.addr-field-wrap {
  position: relative;
}

.addr-field {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 10px 12px;
  border: 1.5px solid #e8e8e8;
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow);
  text-align: left;
  font: inherit;
  color: var(--text);
}

.addr-field-dispatch {
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s ease, background 0.12s ease;
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
}

.addr-field-dispatch:active {
  transform: scale(0.992);
  background: #f8fdf9;
  border-color: rgba(var(--primary-rgb), 0.35);
}

.addr-field-dispatch.has-value,
.addr-field-dispatch.open {
  border-color: rgba(var(--primary-rgb), 0.45);
  box-shadow: 0 0 0 1px rgba(var(--primary-rgb), 0.08);
}

.addr-field-receiver {
  border-left: 3px solid #8b5cf6;
  padding-left: 10px;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.addr-field-receiver:focus-within {
  border-color: rgba(var(--primary-rgb), 0.35);
  border-left-color: #8b5cf6;
  background: var(--focus-bg);
  box-shadow: 0 0 0 3px var(--focus-ring), var(--shadow);
}

.addr-field-receiver.validated {
  border-color: rgba(var(--primary-rgb), 0.35);
  border-left-color: #8b5cf6;
}

.addr-field-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
}

.addr-field-icon-green {
  background: #e8f7ee;
  color: var(--primary);
}

.addr-field-icon-green .ico {
  width: 16px;
  height: 16px;
}

.addr-field-icon-purple {
  background: #f3edff;
  color: #8b5cf6;
}

.addr-field-text {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
  letter-spacing: 0.01em;
  word-break: break-all;
  line-height: 1.5;
}

.addr-field-text.empty {
  color: var(--text3);
  font-family: var(--font-sans);
  font-variant-numeric: normal;
  letter-spacing: 0;
  font-size: 13px;
}

.addr-field-meta {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--primary);
}

.addr-field-count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #e8f7ee;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
}

.addr-field-chevron {
  width: 16px;
  height: 16px;
  transition: transform 0.15s;
}

.addr-field-dispatch.open .addr-field-chevron {
  transform: rotate(180deg);
}

.addr-field-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
  letter-spacing: 0.01em;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
}

.addr-field-input::placeholder {
  color: var(--text3);
  font-family: var(--font-sans);
  font-variant-numeric: normal;
  letter-spacing: 0;
}

.receiver-field-check {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e8f7ee;
  color: var(--primary);
}

.receiver-field-check .ico {
  width: 14px;
  height: 14px;
}

.addr-picker-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 220px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow-lift);
}

.addr-picker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 10px;
  border: none;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  font: inherit;
  color: var(--text);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
  transition: background 0.12s ease, transform 0.12s ease;
}

.addr-picker-item:active {
  background: #f0faf4;
  transform: scale(0.992);
}

.addr-picker-item.selected {
  background: #f3faf6;
}

.addr-picker-icon {
  flex-shrink: 0;
  color: var(--text3);
}

.addr-picker-icon .ico {
  width: 18px;
  height: 18px;
}

.addr-picker-text {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
  letter-spacing: 0.01em;
  word-break: break-all;
  line-height: 1.5;
}

.addr-picker-check {
  flex-shrink: 0;
  width: 20px;
  color: var(--primary);
}

.addr-picker-check .ico {
  width: 18px;
  height: 18px;
}

.addr-picker-empty {
  padding: 14px 10px;
  font-size: 13px;
  color: var(--text3);
  text-align: center;
}

.addr-picker-empty p {
  margin-bottom: 10px;
}

.addr-picker-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border: none;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.addr-picker-add-btn:active {
  opacity: 0.82;
  transform: scale(0.97);
}

.addr-manage-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border: 1px solid rgba(var(--primary-rgb), 0.22);
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.addr-manage-chip .ico {
  width: 14px;
  height: 14px;
}

.addr-manage-chip:active {
  opacity: 0.78;
  transform: scale(0.96);
}

/* 旧版全宽管理链接（兼容） */
.addr-manage-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 10px;
  padding: 8px 0;
  border: none;
  background: transparent;
  color: var(--primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.addr-manage-link .ico {
  width: 16px;
  height: 16px;
}

.addr-manage-desc {
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--text3);
  text-align: center;
}

.addr-manage-add-card {
  padding: 14px;
  margin-bottom: 18px;
  border: 1.5px dashed #d8e8de;
  border-radius: 14px;
  background: #f8fcf9;
}

.addr-manage-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 0 12px;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.addr-manage-input-row:focus-within {
  border-color: var(--focus-border);
  background: var(--focus-bg);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.addr-manage-input-icon {
  flex-shrink: 0;
  color: var(--text3);
}

.addr-manage-input-icon .ico {
  width: 18px;
  height: 18px;
}

.addr-manage-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
}

.addr-manage-input::placeholder {
  color: var(--text3);
}

.addr-manage-add-btn {
  width: 100%;
  margin-top: 4px;
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.addr-manage-add-btn:active {
  opacity: 0.88;
  transform: scale(0.98);
}

.addr-manage-saved-title {
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text2);
}

.addr-manage-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.addr-manage-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.addr-manage-card-body {
  flex: 1;
  min-width: 0;
}

.addr-manage-card-title {
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.addr-manage-card-addr {
  font-size: 12px;
  font-family: var(--font-num);
  color: var(--text3);
  word-break: break-all;
  line-height: 1.45;
}

.addr-manage-del {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: #fff5f5;
  color: #fa5151;
  cursor: pointer;
}

.addr-manage-del .ico {
  width: 18px;
  height: 18px;
}

.addr-manage-empty {
  padding: 24px 12px;
  font-size: 13px;
  color: var(--text3);
  text-align: center;
}

[dir="rtl"] .detect-copy-btn {
  align-self: flex-start;
}

/* ===== 能量档位 ===== */
.tier-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.tier-card {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow);
  position: relative;
}

.tier-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.tier-card.selected::after {
  content: '✓';
  position: absolute;
  top: 8px; right: 10px;
  width: 22px; height: 22px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tier-energy { font-size: 22px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.tier-desc { font-size: 12px; color: var(--text3); margin-bottom: 8px; font-weight: 400; line-height: 1.4; }
.tier-price { font-size: 16px; font-weight: 600; color: var(--primary); }

/* ===== 免费能量（仅展示余额，无开关） ===== */
.free-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: var(--white);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.free-toggle.free-energy-only { justify-content: flex-start; font-size: 14px; }
.free-toggle.free-energy-only .switch { display: none !important; }

.toggle-left { font-size: 14px; }
.free-count { font-size: 12px; color: var(--text3); display: block; margin-top: 2px; }

.switch { position: relative; width: 48px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; inset: 0;
  background: #ccc; border-radius: 26px;
  cursor: pointer; transition: 0.3s;
}
.slider::before {
  content: '';
  position: absolute;
  width: 22px; height: 22px;
  left: 2px; top: 2px;
  background: white; border-radius: 50%;
  transition: 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(22px); }

/* ===== 租赁摘要 ===== */
.rent-summary {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
  color: var(--text2);
  font-weight: 400;
}

.summary-row.total {
  padding-top: 10px;
  margin-top: 6px;
  border-top: 1px solid var(--border);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.total-price { color: var(--primary); font-size: 20px; font-weight: 600; }

/* ===== 租赁按钮 ===== */
.rent-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary));
  border: none;
  border-radius: 28px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 20px;
  box-shadow: 0 4px 16px rgba(var(--primary-rgb),0.3);
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
  font-family: 'Noto Sans SC', 'PingFang SC', sans-serif;
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
}

.rent-btn:active { transform: scale(0.98); box-shadow: 0 2px 8px rgba(var(--primary-rgb),0.3); opacity: 0.92; }
.rent-btn:disabled,
.rent-btn.rent-btn--pending {
  opacity: 0.42;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* ===== 使用说明 ===== */
.usage-guide {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.guide-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.guide-note { font-size: 13px; color: var(--primary); font-weight: 600; margin-bottom: 12px; }

.usage-guide ol {
  padding-left: 18px;
  font-size: 13px;
  color: var(--text2);
  line-height: 1.8;
}

.usage-guide ul {
  padding-left: 16px;
  margin: 4px 0;
  list-style-type: disc;
}

.guide-tip {
  margin-top: 14px;
  padding: 10px 14px;
  background: #e3f2fd;
  color: var(--blue);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* ===== 闪兑页 ===== */
.exchange-content { padding: 16px; }

.qr-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.qr-placeholder {
  width: 200px; height: 200px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-label { font-size: 14px; color: var(--text2); margin-bottom: 12px; }

.address-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
}

.deposit-addr {
  font-size: 12px;
  word-break: break-all;
  color: var(--text);
  font-family: monospace;
}

.copy-btn {
  background: none; border: none;
  font-size: 16px; cursor: pointer;
  padding: 4px;
}

.exchange-notice {
  display: flex;
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.5;
}

.exchange-notice.warning { background: #fff8e1; color: #f57f17; }
.exchange-notice.info { background: #e3f2fd; color: #1565c0; }
.exchange-notice.danger { background: #fce4ec; color: #c62828; }

.open-in-tg-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
}
.open-in-tg-overlay[hidden] { display: none !important; }
.open-in-tg-card {
  max-width: 360px;
  width: 100%;
  background: var(--white);
  border-radius: 16px;
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--shadow-lift);
}
.open-in-tg-icon { font-size: 40px; margin-bottom: 8px; }
.open-in-tg-title { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.open-in-tg-desc { font-size: 14px; line-height: 1.55; color: var(--text2); margin-bottom: 18px; }
.open-in-tg-btn {
  display: block;
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 10px;
  border-radius: 24px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: none;
}
.open-in-tg-secondary {
  width: 100%;
  padding: 10px;
  border: none;
  background: transparent;
  color: var(--text3);
  font-size: 13px;
  cursor: pointer;
}
.exchange-notice span { font-size: 16px; flex-shrink: 0; }

.balance-exchange-form { padding: 8px 0; }

.exchange-result {
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--white);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  font-size: 15px;
}

#exchangeResult { font-weight: 700; color: var(--primary); }

/* ===== 个人中心 ===== */
.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--white);
  padding: 16px;
  position: relative;
}
.profile-header::after { display: none; }

.profile-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
}

.avatar-lg {
  width: 52px; height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: none;
  background: #f0f0f0;
  box-shadow: none;
}

.profile-name { font-size: 16px; font-weight: 600; color: var(--text); }
.profile-id { font-size: 12px; color: var(--text3); margin-top: 3px; font-weight: 400; }

.profile-sign {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sign-btn-sm {
  background: var(--primary);
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 12px;
  cursor: pointer;
}

.sign-btn-sm.signed { background: var(--primary-light); color: var(--primary); }

.free-badge {
  background: var(--primary-light);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
}

/* ===== 资产卡片 ===== */
.assets-card {
  margin: 12px 16px;
  background: var(--white);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow-card);
  border: none;
  position: relative;
}
.assets-card::before { display: none; }

.assets-title {
  font-size: 13px;
  color: var(--text3);
  margin-bottom: 12px;
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 5px;
}
.assets-title .ico-eye { width: 14px; height: 14px; color: var(--text3); }

.assets-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.asset-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 14px 16px;
  border-radius: 14px;
  border: none;
  box-shadow: none;
  min-height: 92px;
}

.asset-item.trx {
  background: linear-gradient(160deg, #fff6f6 0%, #fdeef0 100%);
  align-items: flex-start;
  text-align: left;
}
.asset-item.usdt {
  background: linear-gradient(160deg, #f3fbf6 0%, #e9f6ee 100%);
  align-items: flex-end;
  text-align: right;
}

.asset-item-head {
  display: flex;
  align-items: center;
  gap: 6px;
}
.asset-item.usdt .asset-item-head { flex-direction: row; }

.asset-coin {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.asset-item.trx .asset-coin { background: #eb3943; }
.asset-item.usdt .asset-coin { background: #26a17b; }

.asset-icon { display: none; }

.asset-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
}
.asset-item.trx .asset-label { color: #1a1a1a; }
.asset-item.usdt .asset-label { color: #1a1a1a; }
.asset-value {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
  letter-spacing: 0;
  line-height: 1;
}
.asset-item.trx .asset-value { color: #eb3943; }
.asset-item.usdt .asset-value { color: #18b368; }

.asset-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.action-btn {
  padding: 13px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  border: none;
  transition: opacity 0.12s ease;
}
.action-btn:active { transform: scale(0.97); opacity: 0.9; }

.action-btn.primary {
  background: var(--primary);
  color: white;
  box-shadow: none;
}
.action-btn.outline {
  background: #fff;
  color: var(--text);
  border: 1px solid #e5e5e5;
  box-shadow: none;
}

.free-energy-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  margin-top: 0;
  border-top: none;
  font-size: 14px;
  background: #f3fbf6;
  border-radius: 12px;
  color: var(--text2);
}
.free-energy-row > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.free-energy-row .ico-free {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

.free-energy-row strong {
  color: var(--primary);
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ===== 菜单列表 ===== */
.menu-card {
  margin: 10px 16px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  border: none;
  position: relative;
}
.menu-card::before { display: none; }

.menu-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s ease;
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
}

.menu-item:last-child { border-bottom: none; }
.menu-item:active {
  background: var(--press-bg-soft);
  transform: scale(0.99);
}
.menu-text { flex: 1; font-size: 14px; font-weight: 400; color: var(--text); }
.menu-extra { font-size: 13px; color: var(--text3); margin-right: 4px; font-weight: 400; }
.menu-arrow { color: #c8c8c8; font-size: 17px; font-weight: 300; }

.version-text {
  text-align: center;
  padding: 16px 0;
  font-size: 12px;
  color: #ccc;
  letter-spacing: 2px;
}

/* ===== 底部导航（彩色图标 + 选中高亮块） ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 4px 8px env(safe-area-inset-bottom, 6px);
  z-index: 100;
  box-shadow: none;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 4px 4px;
  text-decoration: none;
  color: #9ca3af;
  font-size: 10px;
  cursor: pointer;
  transition: color 0.2s, transform 0.15s;
  position: relative;
  border: none;
  background: transparent;
}

.nav-item::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%) scale(0.85);
  width: 56px;
  height: 46px;
  border-radius: 14px;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  z-index: 0;
}

.nav-item.active::before {
  opacity: 1;
  transform: translateX(-50%) scale(1);
  background: linear-gradient(180deg, rgba(var(--primary-rgb), 0.14) 0%, rgba(var(--primary-rgb), 0.06) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 2px 8px rgba(var(--primary-rgb), 0.12);
}

.nav-item .nav-ico,
.nav-item .nav-text {
  position: relative;
  z-index: 1;
}

.nav-item .nav-ico {
  width: 26px;
  height: 26px;
  color: #b0b0b0;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.8));
  transition: color 0.2s, filter 0.2s;
}

.nav-item[data-tab="home"] .nav-ico { color: #b8b8b8; }
.nav-item[data-tab="energy"] .nav-ico { color: #9eb8a8; }
.nav-item[data-tab="exchange"] .nav-ico { color: #c4a88a; }
.nav-item[data-tab="profile"] .nav-ico { color: #a8a8b8; }

.nav-item.active { color: var(--primary); }
.nav-item.active .nav-ico {
  color: var(--primary);
  filter: drop-shadow(0 2px 6px rgba(var(--primary-rgb), 0.35));
}

.nav-icon { font-size: 24px; line-height: 1; }
.nav-text {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  word-break: keep-all;
  max-width: 4.5em;
}
.nav-item.active .nav-text { font-weight: 600; color: var(--primary); }
.nav-item:active { transform: scale(0.96); }

/* ===== 子页面 ===== */
.subpage-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 150;
}

.subpage {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 100%;
  max-width: 480px;
  left: 50%; transform: translateX(-50%);
  background: var(--bg);
  z-index: 200;
  overflow-y: auto;
}

.subpage-header {
  display: flex;
  align-items: center;
  padding: 16px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.subpage-back {
  background: none; border: none;
  font-size: 14px; color: var(--primary);
  cursor: pointer;
  padding: 4px 8px;
}

.subpage-title {
  flex: 1;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  margin-right: 40px;
}

.subpage-body { padding: 16px; padding-bottom: 40px; }

/* ===== 弹窗（参考曹操能量场样式） ===== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 20px;
}

.app-modal {
  background: #fff;
  border-radius: 16px;
  width: min(86vw, 300px);
  padding: 22px 20px 18px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.14);
  animation: modalIn 0.22s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

.app-modal-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  font-style: italic;
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1;
  color: #fff;
  background: #007aff;
  flex-shrink: 0;
}

.app-modal-icon--info { background: #007aff; }
.app-modal-icon--warn { background: #ff9500; font-style: normal; }
.app-modal-icon--error { background: #ff3b30; font-style: normal; }
.app-modal-icon--success { background: #34c759; font-style: normal; }

.app-modal-title {
  font-size: 17px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}

.app-modal-body {
  font-size: 14px;
  line-height: 1.65;
  color: #666;
  margin-bottom: 16px;
  text-align: center;
}

.app-modal-text {
  margin: 0;
  color: #666;
}

.app-modal-extra {
  margin-top: 12px;
  text-align: left;
  background: #fff8e6;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.75;
  color: #e65100;
}

.app-modal-btn {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 10px;
  background: #007aff;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.app-modal-btn:active {
  transform: scale(0.98);
  opacity: 0.88;
}

.app-modal-body .lang-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
}

.app-modal-body .lang-opt {
  padding: 11px;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  background: #fafafa;
  font-size: 15px;
  cursor: pointer;
}

.app-modal-body .lang-opt:active {
  background: #f0f0f0;
}

.app-modal-detail {
  text-align: left;
  font-size: 13px;
  line-height: 2;
  color: #444;
}

/* 兼容旧类名 */
.modal {
  background: var(--white);
  border-radius: var(--radius);
  width: 85%;
  max-width: 340px;
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 { font-size: 16px; }
.modal-close { background: none; border: none; font-size: 22px; color: var(--text3); cursor: pointer; }
.modal-body { padding: 20px 18px; font-size: 14px; line-height: 1.7; color: var(--text2); }

/* ===== Loading ===== */
.loading-overlay {
  position: fixed; inset: 0;
  background: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 400;
}

.loading-spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ===== Toast ===== */
.toast {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%) translateY(-80px);
  padding: 10px 24px;
  background: rgba(0,0,0,0.75);
  color: white;
  border-radius: 20px;
  font-size: 13px;
  z-index: 500;
  transition: transform 0.3s ease;
  white-space: nowrap;
  max-width: 85%;
}

.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--primary); }
.toast.error { background: var(--red); }

/* ===== 订单完成页 ===== */
.order-done-overlay {
  position: fixed; inset: 0;
  background: #f4f4f5;
  z-index: 350;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.order-done-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  position: relative;
}

.order-done-header .od-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--text);
}

.order-done-header .od-close {
  position: absolute;
  left: 16px;
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--blue);
  cursor: pointer;
}

.order-done-body {
  width: 100%;
  max-width: 420px;
  padding: 0 20px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.od-status-badge {
  display: inline-block;
  padding: 4px 16px;
  border-radius: 20px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}

.od-circle-wrap {
  width: 100px;
  height: 100px;
  margin-bottom: 20px;
  position: relative;
}

.od-circle-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.od-circle-bg {
  fill: none;
  stroke: #e8e8ed;
  stroke-width: 5;
}

.od-circle-fg {
  fill: none;
  stroke: var(--primary);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 283;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;
}

.od-timer {
  font-size: 26px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
}

.od-timer-label {
  font-size: 13px;
  color: var(--text3);
  font-weight: 400;
  margin-bottom: 24px;
}

.od-info-card {
  width: 100%;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0;
  margin-bottom: 20px;
  overflow: hidden;
}

.od-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  border-bottom: 1px solid #f0f0f2;
}

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

.od-info-label {
  font-size: 13px;
  font-weight: 400;
  color: var(--text3);
  flex-shrink: 0;
  margin-bottom: 2px;
}

.od-info-row-inner {
  flex: 1;
  min-width: 0;
}

.od-info-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  word-break: break-all;
  line-height: 1.4;
  letter-spacing: -0.1px;
}

.od-info-value.od-no-select,
.order-done-overlay .od-info-row-inner,
.order-done-overlay .od-info-card,
.order-done-overlay .od-info-row {
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-touch-callout: none !important;
}

.od-info-value.od-info-canvas-wrap {
  pointer-events: auto;
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-touch-callout: none !important;
  line-height: 0;
}

.od-addr-canvas {
  display: block;
  max-width: 100%;
  vertical-align: top;
  -webkit-touch-callout: none;
  user-select: none;
  pointer-events: none;
}

.od-info-value.od-no-select,
.order-done-overlay .od-info-row-inner {
  pointer-events: none;
}

.od-copy-btn {
  pointer-events: auto;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  flex-shrink: 0;
  margin-left: 10px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.od-copy-btn:active {
  background: #c8f0d4;
}

.od-insurance-btn {
  width: 100%;
  max-width: 320px;
  padding: 14px;
  margin-bottom: 12px;
  background: #fff;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 28px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.od-insurance-btn:active {
  opacity: 0.85;
}

.od-close-btn {
  width: 100%;
  max-width: 320px;
  padding: 16px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 28px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.2px;
  box-shadow: 0 4px 16px rgba(0,122,255,0.25);
  transition: opacity 0.15s;
}

.od-close-btn:active {
  opacity: 0.85;
}

/* ===== 响应式 ===== */
@media (min-width: 481px) {
  body { background: #eee; }
  #app {
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    box-shadow: 0 0 30px rgba(0,0,0,0.08);
  }
}

/* ===== 浮动客服按钮 ===== */
.fab-support {
  position: fixed;
  bottom: 85px;
  right: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(145deg, color-mix(in srgb, var(--primary) 75%, #fff) 0%, var(--primary) 100%);
  color: #fff;
  border: none;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(var(--primary-rgb), 0.42), 0 2px 6px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s;
}
.fab-support:active { transform: scale(0.92); }

/* ===== 充值/提现/支付 通用 ===== */
.subpage-page { padding: 16px; padding-bottom: 40px; }

.balance-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.balance-card-title { font-size: 13px; color: var(--text3); margin-bottom: 12px; font-weight: 500; }
.balance-row { display: flex; gap: 20px; }
.balance-item { flex: 1; }
.balance-item-label { font-size: 12px; color: var(--text3); margin-bottom: 4px; }
.balance-item-value { font-size: 22px; font-weight: 600; }
.balance-item-value.trx { color: var(--text); }
.balance-item-value.usdt { color: var(--primary); }

.currency-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.currency-tab {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--white);
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text2);
}
.currency-tab.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.amount-chip {
  padding: 10px 4px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--white);
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text);
}
.amount-chip.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.amount-input-row {
  display: flex;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.amount-input-row:focus-within {
  border-color: var(--focus-border);
  background: var(--focus-bg);
  box-shadow: 0 0 0 3px var(--focus-ring), var(--shadow);
}

.amount-input-row input {
  flex: 1;
  border: none;
  outline: none;
  padding: 14px 0;
  font-size: 18px;
  font-weight: 700;
  background: transparent;
  font-family: inherit;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
}
.amount-input-row .unit {
  font-size: 14px;
  color: var(--text3);
  font-weight: 600;
}

.confirm-btn {
  width: 100%;
  padding: 16px;
  background: var(--primary);
  border: none;
  border-radius: 28px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(var(--primary-rgb),0.3);
  transition: all 0.15s;
  letter-spacing: 0.02em;
}
.confirm-btn:active { transform: scale(0.97); }

/* ===== 支付页 ===== */
.payment-page {
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.payment-card {
  width: 100%;
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 20px;
  box-shadow: var(--shadow);
  text-align: center;
  margin-bottom: 16px;
}
.payment-qr {
  width: 200px;
  height: 200px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.payment-hint { font-size: 14px; color: var(--text2); margin-bottom: 12px; font-weight: 500; }
.payment-amount {
  font-size: 32px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.payment-amount .copy-icon {
  font-size: 18px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.payment-amount .copy-icon:active { opacity: 1; }

.payment-warning {
  background: #fff8e1;
  color: #f57f17;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12px;
  margin: 12px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.payment-addr-label { font-size: 13px; color: var(--text3); margin: 16px 0 8px; text-align: left; }
.payment-addr-box {
  display: flex;
  align-items: center;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  gap: 8px;
}
.payment-addr-text {
  flex: 1;
  font-size: 12px;
  word-break: break-all;
  color: var(--text);
  text-align: left;
  font-family: monospace;
}
.payment-addr-box .copy-icon {
  flex-shrink: 0;
  font-size: 16px;
  cursor: pointer;
  color: var(--text3);
  background: none;
  border: none;
  padding: 4px;
}

.cancel-order-btn {
  width: 100%;
  padding: 14px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 16px;
}

.payment-info {
  width: 100%;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 12px;
  color: var(--text2);
  line-height: 1.8;
  margin-top: 12px;
}
.payment-info li { margin-left: 16px; list-style: disc; }

/* ===== 提现页 ===== */
.withdraw-all-btn {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
}
.fee-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  color: var(--text2);
}
.fee-row.total {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 4px;
}
.withdraw-warning {
  background: #fff8e1;
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 12px;
  color: #e65100;
  line-height: 1.8;
  margin: 16px 0;
}
.withdraw-warning li { margin-left: 16px; list-style: disc; }

/* ===== 转账租用 Tab ===== */
.transfer-rent-panel {
  padding: 16px;
  display: none;
}
.transfer-rent-panel.active { display: block; }
.transfer-qr-card {
  background: var(--primary-light);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  margin-bottom: 16px;
}
.transfer-qr-card .qr-placeholder { margin: 0 auto 12px; }
.transfer-qr-label { font-size: 13px; color: var(--text3); margin-bottom: 10px; }
.transfer-addr-box {
  display: flex;
  align-items: center;
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  gap: 8px;
}
.transfer-addr-text {
  flex: 1;
  font-size: 13px;
  line-height: 1.55;
  word-break: break-all;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', ui-monospace, monospace;
  text-align: left;
}
.transfer-addr-box .copy-icon {
  flex-shrink: 0;
  font-size: 16px;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--text3);
  padding: 4px;
}

/* ===== 首页签到按钮改进 ===== */
.sign-btn-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.sign-btn-large {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(90deg, #ffb347, #ff6b35);
  color: #fff;
  border: none;
  padding: 7px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: none;
  transition: opacity 0.12s ease;
  white-space: nowrap;
}
.sign-btn-large:active { transform: none; opacity: 0.85; }
.sign-btn-large.signed {
  background: #f0f0f0;
  color: var(--text2);
  box-shadow: none;
}
.sign-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--primary-light);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 400;
  box-shadow: none;
}

/* ===== 全站立体风格：能量 / 闪兑 / 子页 / 弹窗 ===== */
.page {
  background: var(--bg);
  min-height: calc(100vh - 75px);
}

.page-top {
  background: var(--white);
  box-shadow: none;
  position: relative;
  z-index: 2;
  border-bottom: 1px solid var(--border);
}
.page-top::after { display: none; }

.balance-badge,
.rate-badge {
  background: var(--primary-light);
  box-shadow: none;
  border: none;
  color: var(--primary);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 14px;
}

.tab-bar {
  margin: 0 16px;
  background: var(--white);
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-bottom: none;
  position: relative;
}
.tab-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: var(--highlight-inset);
  pointer-events: none;
}
.tab-item.active {
  color: var(--primary);
  font-weight: 600;
  background: linear-gradient(180deg, rgba(var(--primary-rgb), 0.08) 0%, transparent 100%);
}

.energy-form,
.exchange-content,
.subpage-page {
  padding-left: 16px;
  padding-right: 16px;
}

.input-box,
.free-toggle,
.rent-summary,
.usage-guide,
.qr-card,
.exchange-result,
.balance-card,
.transfer-qr-card,
.tier-card,
.amount-input-row,
.payment-card,
.order-card,
.lang-opt {
  border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-card);
  position: relative;
}

.input-box::before,
.free-toggle::before,
.rent-summary::before,
.usage-guide::before,
.qr-card::before,
.exchange-result::before,
.balance-card::before,
.transfer-qr-card::before,
.tier-card::before,
.amount-input-row::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: var(--highlight-inset);
  pointer-events: none;
  z-index: 0;
}

.tier-card {
  background: var(--white);
  box-shadow: none;
  border: 1px solid var(--border);
}
.tier-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: none;
}

.rent-btn,
.rent-bottom-btn,
.confirm-btn {
  background: var(--primary);
  box-shadow: none;
  border: none;
  font-weight: 500;
}
.rent-btn:active,
.rent-bottom-btn:active,
.confirm-btn:active {
  box-shadow: none;
  opacity: 0.92;
  transform: scale(0.985);
}

/* ===== 水波涟漪（点击扩散圆） ===== */
.has-ripple {
  position: relative;
  overflow: hidden;
}
.ripple-dot {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: rgba(255, 255, 255, 0.45);
  pointer-events: none;
  animation: ripple-spread 0.55s ease-out;
}
.ripple-dot.ripple-dark { background: rgba(0, 0, 0, 0.08); }
@keyframes ripple-spread {
  to { transform: scale(2.4); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ripple-dot { animation: none; display: none; }
}

.energy-bottom-dock {
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}
.energy-mode-btn.active {
  background: linear-gradient(180deg, rgba(var(--primary-rgb), 0.12) 0%, var(--primary-light) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.exchange-notice {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-sm);
}
.exchange-notice.warning {
  background: linear-gradient(180deg, #fffde7 0%, #fff8e1 100%);
  border: 1px solid #ffe082;
}
.exchange-notice.danger {
  background: linear-gradient(180deg, #fff5f7 0%, #fce4ec 100%);
  border: 1px solid #f8bbd0;
}

.address-box {
  background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
  border: 1px solid #eee;
}

.subpage-header {
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
  box-shadow: 0 4px 12px var(--surface-dim);
  border-bottom: none;
}

.modal {
  position: relative;
  box-shadow: var(--shadow-lift);
  border: 1px solid rgba(255, 255, 255, 0.9);
}
.modal::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: var(--highlight-inset);
  pointer-events: none;
}

.currency-tab,
.amount-chip {
  background: linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.currency-tab.active,
.amount-chip.active {
  background: linear-gradient(180deg, #f0fdf4 0%, var(--primary-light) 100%);
  box-shadow: 0 3px 10px rgba(var(--primary-rgb), 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.receiver-hint.has-u {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  border: 1px solid #c8e6c9;
}
.receiver-hint.no-u {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  border: 1px solid #ffe0b2;
}

.order-done-overlay {
  background: var(--bg);
}
.od-card,
.od-info-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(255, 255, 255, 0.88);
}

.guide-tip {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  border: 1px solid #bbdefb;
}

/* ===== 子页 / 教程 / 弹窗：统一立体卡片 ===== */
.subpage-body {
  padding: 16px;
  padding-bottom: 40px;
}

.subpage-stack,
.subpage-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.content-card {
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
  border-radius: var(--radius);
  padding: 18px 16px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(255, 255, 255, 0.9);
  position: relative;
}
.content-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: var(--highlight-inset);
  pointer-events: none;
}

.tutorial-panel h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 10px;
}
.tutorial-panel h3:not(:first-child) { margin-top: 18px; }
.tutorial-panel ol,
.tutorial-panel ul {
  padding-left: 18px;
  font-size: 14px;
  color: var(--text2);
  line-height: 1.85;
}
.tutorial-panel li { margin-bottom: 4px; }
.tutorial-panel strong { color: var(--text); font-weight: 600; }

.invite-panel {
  text-align: center;
  padding: 8px 4px 4px;
}
.invite-panel .panel-emoji { font-size: 48px; margin-bottom: 10px; line-height: 1; }
.invite-panel .panel-title { font-weight: 600; font-size: 16px; color: var(--text); }
.invite-panel .panel-desc { font-size: 13px; color: var(--text3); margin-top: 6px; }
.invite-panel .panel-desc-sub { font-size: 12px; color: #bbb; margin-top: 4px; }
.invite-link-box {
  margin-top: 18px;
  padding: 14px;
  background: linear-gradient(180deg, #f8f9fa 0%, #f0f2f5 100%);
  border-radius: var(--radius-sm);
  border: 1px solid #e8e8e8;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
  text-align: left;
}
.invite-link-box .label { font-size: 12px; color: var(--text3); margin-bottom: 6px; }
.invite-link-box .link { font-size: 13px; word-break: break-all; color: var(--text); }
.invite-stat { margin-top: 18px; font-size: 14px; color: var(--text2); }
.invite-stat strong { color: var(--primary); font-size: 18px; }

.info-center-panel {
  text-align: center;
  padding: 12px 8px 8px;
}
.info-center-panel .panel-emoji { font-size: 48px; margin-bottom: 10px; }
.info-center-panel .panel-title { font-weight: 600; font-size: 16px; margin-bottom: 8px; color: var(--text); }
.info-center-panel .panel-desc { font-size: 13px; color: var(--text3); margin-top: 6px; }

.vip-benefits {
  text-align: left;
  padding-left: 20px;
  font-size: 13px;
  line-height: 2;
  color: var(--text2);
  margin: 12px 0;
}
.vip-price {
  margin-top: 14px;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
}
.vip-soon { font-size: 12px; color: var(--text3); margin-top: 6px; text-align: center; }

.modal-panel { margin: 0; }
.modal-body .content-card { margin-top: 0; }

.summary-panel {
  padding: 4px 2px;
}
.summary-panel .summary-row {
  padding: 10px 4px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.summary-panel .summary-row:last-child { border-bottom: none; }

.payment-info {
  width: 100%;
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(255, 255, 255, 0.88);
  position: relative;
}
.payment-info::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: var(--highlight-inset);
  pointer-events: none;
}
.payment-info ul {
  padding-left: 18px;
  font-size: 13px;
  color: var(--text2);
  line-height: 1.8;
  margin: 0;
}

.fee-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text2);
  background: linear-gradient(180deg, #fafafa 0%, #f5f5f5 100%);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  border: 1px solid #eee;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.fee-row.total {
  font-weight: 600;
  color: var(--text);
  background: linear-gradient(180deg, #f0fdf4 0%, var(--primary-light) 100%);
  border-color: rgba(var(--primary-rgb), 0.15);
}

.withdraw-warning {
  background: linear-gradient(180deg, #fffde7 0%, #fff8e1 100%);
  border: 1px solid #ffe082;
  border-radius: var(--radius-sm);
  padding: 14px;
  margin: 12px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.withdraw-warning ul {
  padding-left: 18px;
  font-size: 13px;
  color: #f57f17;
  line-height: 1.75;
  margin: 0;
}

.withdraw-all-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
}

.btn-secondary,
.rent-btn.btn-secondary {
  background: linear-gradient(180deg, #64b5f6 0%, #2196f3 55%, #1e88e5 100%);
  box-shadow: 0 5px 16px rgba(33, 150, 243, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  margin-top: 8px;
}

.cancel-order-btn {
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  border-radius: 22px;
  border: 1px solid #e0e0e0;
  background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
  color: var(--text2);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.payment-warning {
  border: 1px solid #ffe082;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.payment-addr-box {
  background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
  border: 1px solid #eee;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.subpage-stack > .record-list,
.subpage-stack > .empty-hint {
  border-radius: var(--radius);
}

.order-done-header {
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
  box-shadow: 0 4px 12px var(--surface-dim);
}

/* Telegram / iOS WebView：全站统一交互 — 无灰块，绿色淡反馈 */
a,
button,
input,
textarea,
select,
.tab-item,
.tier-card,
.feature-item,
.nav-item,
.menu-item,
.record-item,
.back-btn,
.copy-icon,
.lang-opt,
.lang-flag-btn,
.addr-manage-chip,
.addr-picker-add-btn,
.addr-manage-add-btn,
.addr-manage-del,
.addr-field-dispatch,
.addr-picker-item,
.confirm-btn,
.sign-btn,
.sign-btn-large,
.action-btn,
.fab-support,
.rent-btn,
.rent-bottom-btn,
.detect-btn,
.detect-copy-btn,
.od-copy-btn,
.od-insurance-btn,
.od-close-btn,
.banner-cta {
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
}

button,
.tab-item,
.addr-field-dispatch,
.addr-picker-item,
.lang-opt,
.lang-flag-btn {
  -webkit-appearance: none;
  appearance: none;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
textarea,
select {
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):focus,
textarea:focus,
select:focus {
  outline: none;
}

button:focus,
.tab-item:focus,
.addr-field-dispatch:focus,
.addr-picker-item:focus,
.rent-btn:focus,
a:focus {
  outline: none;
}

/* 独立输入框（无外层容器时） */
input[type="text"]:not(.addr-field-input):not(.form-input):not(.addr-manage-input):focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
  border-color: var(--focus-border) !important;
  background: var(--focus-bg) !important;
  box-shadow: 0 0 0 3px var(--focus-ring) !important;
}

/* 可点击项按下：轻微缩放 + 绿色淡底（替代灰色闪现） */
.record-item:active,
.lang-opt:active,
.banner-cta:active,
.back-btn:active,
.copy-icon:active,
.detect-copy-btn:active {
  transform: scale(0.98);
  opacity: 0.92;
}

.lang-opt:active {
  background: var(--press-bg);
  border-color: rgba(var(--primary-rgb), 0.25);
  opacity: 1;
}

.lang-flag-btn:active {
  transform: scale(0.94);
  border-color: rgba(var(--primary-rgb), 0.35);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.tier-card:active {
  transform: scale(0.98);
  background: linear-gradient(180deg, var(--focus-bg) 0%, var(--primary-light) 100%);
}

/* ===== RTL（阿拉伯语） ===== */
[dir="rtl"] .user-header,
[dir="rtl"] .profile-header,
[dir="rtl"] .feature-item,
[dir="rtl"] .menu-item,
[dir="rtl"] .record-item,
[dir="rtl"] .section-header,
[dir="rtl"] .summary-row,
[dir="rtl"] .page-top,
[dir="rtl"] .rent-bottom-bar,
[dir="rtl"] .free-energy-row,
[dir="rtl"] .exchange-result {
  flex-direction: row-reverse;
}
[dir="rtl"] .feature-info,
[dir="rtl"] .menu-icon-cell {
  margin-left: 14px;
  margin-right: 0;
}
[dir="rtl"] .menu-icon-cell {
  margin-left: 12px;
  margin-right: 0;
}
[dir="rtl"] .feature-arrow,
[dir="rtl"] .menu-arrow {
  transform: scaleX(-1);
}
[dir="rtl"] .user-left,
[dir="rtl"] .profile-user,
[dir="rtl"] .record-left {
  flex-direction: row-reverse;
}
[dir="rtl"] .record-right,
[dir="rtl"] .user-right,
[dir="rtl"] .sign-btn-wrap {
  text-align: left;
}
[dir="rtl"] .input-box {
  flex-direction: row-reverse;
}
[dir="rtl"] .subpage-back {
  direction: rtl;
}
.lang-picker {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lang-opt {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 16px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}
[dir="rtl"] .lang-opt {
  text-align: right;
}

/* ===== 国际站国旗语言切换 ===== */
.lang-flags {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px 16px 4px;
}
.lang-flag-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--white);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: border-color 0.15s, transform 0.12s ease, box-shadow 0.15s ease;
}
.lang-flag-btn.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 7, 193, 96), 0.25);
}
[data-app-variant="zh"] [data-intl-only],
html[data-app-variant="zh"] [data-intl-only] {
  display: none !important;
}
[dir="rtl"] .lang-flags {
  justify-content: flex-start;
}

/* ===== 中文站入门语言选择 ===== */
body.lang-gate-active #app,
body.lang-gate-active .bottom-nav {
  visibility: hidden;
  pointer-events: none;
}

.lang-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(165deg, var(--bg) 0%, var(--bg2, #f0f4f2) 55%, var(--bg) 100%);
}

.lang-gate-overlay[hidden] {
  display: none !important;
}

.lang-gate-card {
  width: 100%;
  max-width: 360px;
  text-align: center;
  padding: 32px 24px 28px;
  border-radius: 20px;
  background: var(--card, #fff);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.lang-gate-icon {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 16px;
}

.lang-gate-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
}

.lang-gate-sub {
  font-size: 13px;
  color: var(--text2);
  margin: 0 0 28px;
  line-height: 1.5;
}

.lang-gate-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lang-gate-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 16px 20px;
  border: 1.5px solid var(--border, #e5e5ea);
  border-radius: 14px;
  background: var(--bg);
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.lang-gate-btn:active {
  transform: scale(0.98);
  background: var(--primary-light, rgba(0, 168, 107, 0.08));
  border-color: var(--primary);
}

.lang-gate-flag {
  font-size: 24px;
  line-height: 1;
}

.lang-gate-name {
  min-width: 5em;
  text-align: left;
}

/* ===== 活动记录状态色 ===== */
.record-status.processing { color: var(--orange); }
.record-status.success { color: var(--primary); }

/* ===== 代理 Mini App 页面模板 ===== */
html[data-template="blank"] .banner { display: none !important; }
html[data-template="blank"] .sign-btn-wrap { display: none !important; }
html[data-template="blank"] .feature-list .feature-item:nth-child(n+2) { display: none !important; }
html[data-template="blank"] #page-home > .section { display: none !important; }
html[data-template="blank"] .fab-support { opacity: 0.85; }

html[data-template="minimal"] .banner { display: none !important; }
html[data-template="minimal"] .sign-btn-wrap { display: none !important; }
html[data-template="minimal"] .feature-list { display: none !important; }
html[data-template="minimal"] #page-home > .section { display: none !important; }
html[data-template="minimal"] .bottom-nav .nav-item[data-tab="exchange"],
html[data-template="minimal"] .bottom-nav .nav-item[data-tab="profile"] { display: none !important; }
html[data-template="minimal"] .user-header { padding-bottom: 8px; }

html[data-template="standard"] .agent-template-badge { display: none; }

/* ===== 订单卡片 / 余额记录（参考真实小程序） ===== */
.order-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-card);
  border: none;
}
.order-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.order-card-type {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}
.order-type-icon {
  width: 18px;
  height: 18px;
  color: #ffb020;
}
.order-status-badge {
  font-size: 12px;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.order-card-amount {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
}
.order-card-date {
  font-size: 12px;
  color: var(--text3);
  margin-bottom: 10px;
}
.order-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  padding: 8px 0 0;
  border-top: 1px solid var(--border);
}
.order-card-row + .order-card-row { padding-top: 6px; border-top: none; }
.order-card-row span:first-child { color: var(--text3); flex-shrink: 0; }
.order-card-row span:last-child {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  text-align: right;
  word-break: break-all;
}

.bal-record {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--white);
}
.bal-record:last-child { border-bottom: none; }
.bal-record-left {
  display: flex;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.bal-record-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--primary-light);
  color: var(--primary);
}
.bal-record-icon .ico { width: 16px; height: 16px; }
.bal-record-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}
.bal-record-amt { font-weight: 600; }
.bal-record-time {
  font-size: 12px;
  color: var(--text3);
  margin-top: 2px;
}
.bal-record-desc {
  font-size: 12px;
  color: var(--text2);
  margin-top: 2px;
}
.bal-record-bal {
  font-size: 12px;
  color: var(--text3);
  flex-shrink: 0;
  margin-left: 8px;
  padding-top: 2px;
}

.ico-copy { width: 18px; height: 18px; color: var(--text3); display: block; }
.copy-icon, .copy-btn {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.copy-icon:active, .copy-btn:active { opacity: 0.6; }

html[data-template="blank"] .agent-template-badge,
html[data-template="minimal"] .agent-template-badge {
  display: block;
  text-align: center;
  font-size: 11px;
  color: var(--text3);
  padding: 4px 12px 0;
  letter-spacing: 0.02em;
}

/* ===== 参考小程序质感：字体 / 闪兑 / 图标卡片 ===== */
body { font-size: 14px; }
.form-label { font-size: 13px; }
.nav-text { font-size: 11px; font-weight: 500; }
.page-title { font-size: 18px; font-weight: 650; letter-spacing: -0.02em; }
.feature-title,
.menu-text { font-size: 14px; font-weight: 600; }
.feature-desc { font-size: 12px; }

.feature-icon,
.menu-icon-cell {
  border-radius: 13px;
  background: rgba(var(--primary-rgb), 0.1);
}
.feature-icon .ico,
.menu-icon-cell .ico,
.nav-item .nav-ico {
  stroke-width: 2.15;
}

#page-exchange .page-top,
#page-energy .page-top {
  padding: 16px 20px 12px;
  border-bottom: 0;
}
.rate-badge,
.balance-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 5px 12px;
  border: 1px solid rgba(var(--primary-rgb), 0.16);
  background: linear-gradient(180deg, #effbf3 0%, #dff5e8 100%);
  color: #159755;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.85);
}
.rate-badge::before {
  content: '↻';
  font-size: 12px;
  line-height: 1;
}

.exchange-tabs,
#page-energy .tab-bar {
  margin: 8px 20px 8px;
  padding: 0;
  height: 42px;
  align-items: center;
  border: 0;
  border-radius: 14px;
  background: #f2f5f7;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
  overflow: visible;
}
.exchange-tabs::before,
#page-energy .tab-bar::before { display: none; }
.exchange-tabs .tab-item,
#page-energy .tab-item {
  height: 42px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 0;
  border-radius: 14px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 600;
}
.exchange-tabs .tab-item.active,
#page-energy .tab-item.active {
  background: #fff;
  color: #111827;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255,255,255,0.95);
}

.exchange-content { padding: 14px 20px 96px; }
.swap-card {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.92);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1), 0 2px 8px rgba(15, 23, 42, 0.05);
}
.qr-card.swap-card {
  padding: 24px 16px 18px;
  margin-bottom: 22px;
}
.qr-placeholder {
  width: 190px;
  height: 190px;
  margin-bottom: 18px;
  padding: 10px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
}
.qr-placeholder canvas,
.qr-placeholder img {
  max-width: 170px;
  max-height: 170px;
}
.qr-label {
  text-align: left;
  padding-left: 4px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.12em;
  color: #8a94a3;
}
.address-box {
  justify-content: space-between;
  min-height: 56px;
  padding: 0 12px 0 16px;
  border-radius: 13px;
  background: #f7f9fc;
  border: 1px solid #edf0f4;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}
.deposit-addr {
  font-family: var(--font-num);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.01em;
}
.address-box .copy-btn,
.transfer-addr-box .copy-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: #daf6e8;
  color: #20a864;
}
.exchange-notice {
  margin: 14px 0 0;
  padding: 13px 14px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.55;
}
.exchange-notice .notice-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid currentColor;
  font-size: 12px;
  font-weight: 800;
}
.exchange-notice.warning {
  color: #a46a10;
  background: linear-gradient(180deg, #fff9e8 0%, #fff2d2 100%);
  border: 1px solid #f8df9d;
}
.exchange-notice.danger {
  color: #b91c1c;
  background: linear-gradient(180deg, #fff1f2 0%, #fee2e2 100%);
  border: 1px solid #fecaca;
}

.balance-exchange-form.swap-card {
  padding: 18px 16px 20px;
  margin-bottom: 22px;
}
.swap-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 4px 8px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
}
.swap-row-head strong {
  color: #16a05d;
  font-weight: 750;
}
.swap-amount-box {
  min-height: 62px;
  padding: 0 12px 0 14px;
  border-radius: 13px;
  border: 1px solid #edf0f4;
  background: #fbfcfd;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
  display: flex;
  align-items: center;
  gap: 10px;
}
.swap-amount-input,
.swap-result-value {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #667180;
  font-family: var(--font-num);
  font-size: 28px;
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.03em;
}
.swap-amount-input::placeholder { color: #667180; opacity: 1; }
.coin-pill {
  height: 38px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  font-size: 13px;
}
.coin-mark {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}
.coin-pill.usdt .coin-mark { background: #26a17b; }
.coin-pill.trx .coin-mark { background: #eb3943; }
.coin-pill strong { color: #111827; font-weight: 800; }
.coin-mark .coin-svg { width: 13px; height: 13px; }
.asset-coin .coin-svg { width: 13px; height: 13px; }
.asset-item.usdt .asset-coin .coin-svg { width: 14px; height: 14px; }
.swap-middle-btn {
  width: 42px;
  height: 42px;
  margin: 16px auto;
  border-radius: 50%;
  background: linear-gradient(180deg, #2dcc77 0%, #18a85d 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 7px 16px rgba(22, 163, 74, 0.35);
}
.swap-middle-btn .ico {
  width: 20px;
  height: 20px;
  transform: rotate(90deg);
}
.swap-submit-btn {
  margin: 18px 0 0;
  border-radius: 12px;
  background: #83d39f;
  box-shadow: none;
  font-size: 16px;
}
.swap-history-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 2px 4px 12px;
  color: #111827;
  font-size: 16px;
  font-weight: 750;
}
.swap-history-title .ico-section {
  color: #19a85d;
  width: 18px;
  height: 18px;
}
.swap-empty-card {
  min-height: 150px;
  border: 1.5px dashed #e2e8f0;
  border-radius: 16px;
  color: #b9c0c8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
}
.swap-empty-icon {
  width: 42px;
  height: 42px;
  color: #d8dde4;
}

.order-card {
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 6px 18px rgba(15,23,42,0.06);
}
.order-card-amount {
  font-size: 17px;
  color: #111827;
  font-weight: 800;
}
.order-card-type {
  font-size: 15px;
  font-weight: 750;
}
.order-type-icon {
  width: 42px;
  height: 42px;
  padding: 10px;
  border-radius: 13px;
  color: #eab308;
  background: #fff8e6;
}
.order-card-date,
.order-card-row,
.order-card-row span:last-child {
  font-size: 12px;
}
.bal-record {
  margin-bottom: 12px;
  padding: 16px;
  border: 0;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(15,23,42,0.06);
}
.bal-record-title {
  font-size: 14px;
  font-weight: 750;
}
.bal-record-amt {
  color: #16a05d;
  font-size: 17px;
  font-weight: 800;
}
.bal-record-bal {
  display: block;
  margin-left: 0;
  padding-top: 4px;
  text-align: right;
}


/* ===== 邀请页 高级版 ===== */
.invite-pro { gap: 16px; }

.invite-hero { position: relative; border-radius: 22px; overflow: hidden; padding: 24px 20px 20px; color: #fff; box-shadow: 0 12px 30px rgba(16,142,80,.28); }
.invite-hero-bg { position: absolute; inset: 0; background: linear-gradient(135deg,#13b86a 0%,#0a8f53 55%,#0c7d6b 100%); }
.invite-hero-bg::before { content: ""; position: absolute; width: 220px; height: 220px; right: -60px; top: -90px; background: radial-gradient(circle,rgba(255,255,255,.25),transparent 70%); }
.invite-hero-bg::after { content: ""; position: absolute; width: 180px; height: 180px; left: -50px; bottom: -80px; background: radial-gradient(circle,rgba(255,255,255,.14),transparent 70%); }
.invite-hero-content { position: relative; z-index: 1; }
.invite-hero-badge { display: inline-block; background: rgba(255,255,255,.22); backdrop-filter: blur(4px); font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 999px; margin-bottom: 12px; }
.invite-hero-title { font-size: 19px; font-weight: 800; line-height: 1.4; }
.invite-hero-sub { font-size: 12.5px; opacity: .92; margin-top: 8px; line-height: 1.6; }
.invite-hero-stats { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; background: rgba(255,255,255,.16); border-radius: 16px; padding: 14px 8px; backdrop-filter: blur(6px); }
.invite-hero-stat { flex: 1; text-align: center; }
.invite-hero-num { font-size: 22px; font-weight: 800; line-height: 1.1; }
.invite-hero-lbl { font-size: 11px; opacity: .85; margin-top: 4px; }
.invite-hero-divider { width: 1px; height: 30px; background: rgba(255,255,255,.28); }

.invite-link-pro { background: #fff; border-radius: 18px; padding: 18px; box-shadow: 0 6px 18px rgba(0,0,0,.05); }
.invite-link-pro-label { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 10px; }
.invite-link-pro-row { display: flex; flex-direction: row; gap: 8px; align-items: stretch; }
.invite-link-pro-text { flex: 1; font-size: 12px; word-break: break-all; background: #f4f6f8; border: 1px dashed #d6e0da; border-radius: 12px; padding: 11px 12px; color: var(--text2); line-height: 1.5; }
.invite-link-pro-btn {
  border: none;
  background: linear-gradient(135deg,#13b86a,#0a8f53);
  color: #fff;
  border-radius: 12px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(16,142,80,.3);
  -webkit-appearance: none;
  appearance: none;
  flex-shrink: 0;
}
.invite-link-pro-btn:active { transform: scale(.97); }
.invite-link-pro-hint { font-size: 11.5px; color: var(--text3); margin-top: 10px; line-height: 1.5; }

.invite-list-pro { background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 6px 18px rgba(0,0,0,.05); }
.invite-list-pro-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 12px; }
.invite-list-pro-title { font-size: 15px; font-weight: 700; }
.invite-list-pro-count { font-size: 12px; color: #fff; background: var(--primary); min-width: 20px; text-align: center; padding: 2px 8px; border-radius: 999px; }
.invite-list-wrap { min-height: 90px; }
.invite-list-empty { padding: 32px 16px; text-align: center; color: var(--text3); font-size: 13px; }
.invite-empty-icon { font-size: 34px; margin-bottom: 8px; opacity: .6; }

.invite-row { display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-top: 1px solid #f1f3f2; cursor: pointer; transition: background .15s; }
.invite-row:active { background: #f7f9f8; }
.invite-row-avatar { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 700; color: #fff; flex-shrink: 0; background: linear-gradient(135deg,#9aa6b2,#7d8896); }
.invite-row-avatar.ok { background: linear-gradient(135deg,#22c277,#129d57); }
.invite-row-avatar.err { background: linear-gradient(135deg,#ff6b6b,#e04545); }
.invite-row-avatar.pending { background: linear-gradient(135deg,#f5b94b,#e89a1c); }
.invite-row-main { flex: 1; min-width: 0; }
.invite-row-name { font-size: 14.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.invite-row-sub { font-size: 11px; color: var(--text3); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.invite-row-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.invite-row-arrow { color: #c4ccd4; font-size: 20px; line-height: 1; }
.invite-pill { font-size: 11px; font-weight: 600; padding: 4px 11px; border-radius: 999px; white-space: nowrap; }
.invite-pill.ok { background: #e6f8ee; color: #129d57; }
.invite-pill.err { background: #ffecec; color: #e04545; }
.invite-pill.pending { background: #fff4e2; color: #d68a12; }

/* 详情页 */
.invite-detail-page { gap: 16px; }
.invite-detail-hero { border-radius: 22px; padding: 26px 20px; text-align: center; color: #fff; position: relative; overflow: hidden; box-shadow: 0 12px 28px rgba(0,0,0,.16); }
.invite-detail-hero.ok { background: linear-gradient(135deg,#22c277,#0a8f53); }
.invite-detail-hero.err { background: linear-gradient(135deg,#ff7676,#d83a3a); }
.invite-detail-hero.pending { background: linear-gradient(135deg,#f7be53,#e3901a); }
.invite-detail-avatar { width: 66px; height: 66px; border-radius: 50%; background: rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; margin: 0 auto 12px; border: 2px solid rgba(255,255,255,.5); }
.invite-detail-hname { font-size: 19px; font-weight: 800; }
.invite-detail-hid { font-size: 12px; opacity: .9; margin-top: 4px; word-break: break-all; }
.invite-detail-hero .invite-pill { background: rgba(255,255,255,.25); color: #fff; }
.invite-detail-reward { font-size: 26px; font-weight: 800; margin-top: 12px; }

.invite-detail-steps { display: flex; align-items: flex-start; justify-content: space-between; padding: 20px 14px; }
.invite-step { display: flex; flex-direction: column; align-items: center; gap: 8px; flex-shrink: 0; width: 72px; }
.invite-step-dot { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; background: #eef1f0; color: #aab4bd; }
.invite-step.done .invite-step-dot { background: linear-gradient(135deg,#22c277,#129d57); color: #fff; }
.invite-step.fail .invite-step-dot { background: linear-gradient(135deg,#ff6b6b,#e04545); color: #fff; }
.invite-step-label { font-size: 11px; color: var(--text3); text-align: center; }
.invite-step.done .invite-step-label { color: var(--text); }
.invite-step-line { flex: 1; height: 2px; background: #eef1f0; margin-top: 16px; }
.invite-detail-info { padding: 18px; }
.invite-info-row { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.invite-detail-text { font-size: 13px; line-height: 1.7; color: var(--text2); }
.invite-info-kv { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #f1f3f2; }
.invite-info-kv span { color: var(--text3); }
.invite-info-kv b { color: var(--text); font-weight: 600; word-break: break-all; text-align: right; }
.invite-stat strong { color: var(--primary); font-size: 18px; }

.info-center-panel {
  text-align: center;
  padding: 12px 8px 8px;
}
.info-center-panel .panel-emoji { font-size: 48px; margin-bottom: 10px; }
.info-center-panel .panel-title { font-weight: 600; font-size: 16px; margin-bottom: 8px; color: var(--text); }
.info-center-panel .panel-desc { font-size: 13px; color: var(--text3); margin-top: 6px; }

.vip-benefits {
  text-align: left;
  padding-left: 20px;
  font-size: 13px;
  line-height: 2;
  color: var(--text2);
  margin: 12px 0;
}
.vip-price {
  margin-top: 14px;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
}
.vip-soon { font-size: 12px; color: var(--text3); margin-top: 6px; text-align: center; }

.modal-panel { margin: 0; }
.modal-body .content-card { margin-top: 0; }

.summary-panel {
  padding: 4px 2px;
}
.summary-panel .summary-row {
  padding: 10px 4px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.summary-panel .summary-row:last-child { border-bottom: none; }

.payment-info {
  width: 100%;
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(255, 255, 255, 0.88);
  position: relative;
}
.payment-info::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: var(--highlight-inset);
  pointer-events: none;
}
.payment-info ul {
  padding-left: 18px;
  font-size: 13px;
  color: var(--text2);
  line-height: 1.8;
  margin: 0;
}

.fee-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text2);
  background: linear-gradient(180deg, #fafafa 0%, #f5f5f5 100%);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  border: 1px solid #eee;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.fee-row.total {
  font-weight: 600;
  color: var(--text);
  background: linear-gradient(180deg, #f0fdf4 0%, var(--primary-light) 100%);
  border-color: rgba(var(--primary-rgb), 0.15);
}

.withdraw-warning {
  background: linear-gradient(180deg, #fffde7 0%, #fff8e1 100%);
  border: 1px solid #ffe082;
  border-radius: var(--radius-sm);
  padding: 14px;
  margin: 12px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.withdraw-warning ul {
  padding-left: 18px;
  font-size: 13px;
  color: #f57f17;
  line-height: 1.75;
  margin: 0;
}

.withdraw-all-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
}

.btn-secondary,
.rent-btn.btn-secondary {
  background: linear-gradient(180deg, #64b5f6 0%, #2196f3 55%, #1e88e5 100%);
  box-shadow: 0 5px 16px rgba(33, 150, 243, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  margin-top: 8px;
}

.cancel-order-btn {
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  border-radius: 22px;
  border: 1px solid #e0e0e0;
  background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
  color: var(--text2);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.payment-warning {
  border: 1px solid #ffe082;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.payment-addr-box {
  background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
  border: 1px solid #eee;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.subpage-stack > .record-list,
.subpage-stack > .empty-hint {
  border-radius: var(--radius);
}

.order-done-header {
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
  box-shadow: 0 4px 12px var(--surface-dim);
}

/* Telegram / iOS WebView：全站统一交互 — 无灰块，绿色淡反馈 */
a,
button,
input,
textarea,
select,
.tab-item,
.tier-card,
.feature-item,
.nav-item,
.menu-item,
.record-item,
.back-btn,
.copy-icon,
.lang-opt,
.lang-flag-btn,
.addr-manage-chip,
.addr-picker-add-btn,
.addr-manage-add-btn,
.addr-manage-del,
.addr-field-dispatch,
.addr-picker-item,
.confirm-btn,
.sign-btn,
.sign-btn-large,
.action-btn,
.fab-support,
.rent-btn,
.rent-bottom-btn,
.detect-btn,
.detect-copy-btn,
.od-copy-btn,
.od-insurance-btn,
.od-close-btn,
.banner-cta {
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
}

button,
.tab-item,
.addr-field-dispatch,
.addr-picker-item,
.lang-opt,
.lang-flag-btn {
  -webkit-appearance: none;
  appearance: none;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
textarea,
select {
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):focus,
textarea:focus,
select:focus {
  outline: none;
}

button:focus,
.tab-item:focus,
.addr-field-dispatch:focus,
.addr-picker-item:focus,
.rent-btn:focus,
a:focus {
  outline: none;
}

/* 独立输入框（无外层容器时） */
input[type="text"]:not(.addr-field-input):not(.form-input):not(.addr-manage-input):focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
  border-color: var(--focus-border) !important;
  background: var(--focus-bg) !important;
  box-shadow: 0 0 0 3px var(--focus-ring) !important;
}

/* 可点击项按下：轻微缩放 + 绿色淡底（替代灰色闪现） */
.record-item:active,
.lang-opt:active,
.banner-cta:active,
.back-btn:active,
.copy-icon:active,
.detect-copy-btn:active {
  transform: scale(0.98);
  opacity: 0.92;
}

.lang-opt:active {
  background: var(--press-bg);
  border-color: rgba(var(--primary-rgb), 0.25);
  opacity: 1;
}

.lang-flag-btn:active {
  transform: scale(0.94);
  border-color: rgba(var(--primary-rgb), 0.35);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.tier-card:active {
  transform: scale(0.98);
  background: linear-gradient(180deg, var(--focus-bg) 0%, var(--primary-light) 100%);
}

/* ===== RTL（阿拉伯语） ===== */
[dir="rtl"] .user-header,
[dir="rtl"] .profile-header,
[dir="rtl"] .feature-item,
[dir="rtl"] .menu-item,
[dir="rtl"] .record-item,
[dir="rtl"] .section-header,
[dir="rtl"] .summary-row,
[dir="rtl"] .page-top,
[dir="rtl"] .rent-bottom-bar,
[dir="rtl"] .free-energy-row,
[dir="rtl"] .exchange-result {
  flex-direction: row-reverse;
}
[dir="rtl"] .feature-info,
[dir="rtl"] .menu-icon-cell {
  margin-left: 14px;
  margin-right: 0;
}
[dir="rtl"] .menu-icon-cell {
  margin-left: 12px;
  margin-right: 0;
}
[dir="rtl"] .feature-arrow,
[dir="rtl"] .menu-arrow {
  transform: scaleX(-1);
}
[dir="rtl"] .user-left,
[dir="rtl"] .profile-user,
[dir="rtl"] .record-left {
  flex-direction: row-reverse;
}
[dir="rtl"] .record-right,
[dir="rtl"] .user-right,
[dir="rtl"] .sign-btn-wrap {
  text-align: left;
}
[dir="rtl"] .input-box {
  flex-direction: row-reverse;
}
[dir="rtl"] .subpage-back {
  direction: rtl;
}
.lang-picker {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lang-opt {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 16px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}
[dir="rtl"] .lang-opt {
  text-align: right;
}

/* ===== 22 语言 · 国旗切换 ===== */
.lang-header-row {
  display: flex;
  justify-content: flex-end;
  padding: 8px 16px 0;
}
.lang-wrap {
  position: relative;
  z-index: 20;
}
.lang-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.lang-header-btn #langFlag {
  font-size: 18px;
  line-height: 1;
}
.lang-caret {
  font-size: 11px;
  opacity: 0.6;
}
.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  max-height: min(60vh, 360px);
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  display: none;
}
.lang-menu.open {
  display: block;
}
.lang-menu .lang-opt {
  width: 100%;
  margin: 0;
  border: none;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 15px;
  text-align: left;
  background: transparent;
}
.lang-menu .lang-opt.active,
.lang-menu .lang-opt:hover {
  background: rgba(var(--primary-rgb, 7, 193, 96), 0.1);
}
.lang-picker-flags {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  max-height: 60vh;
  overflow-y: auto;
}
.lang-flags {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px 16px 4px;
}
.lang-flag-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--white);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: border-color 0.15s, transform 0.12s ease, box-shadow 0.15s ease;
}
.lang-flag-btn.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 7, 193, 96), 0.25);
}
.live-feed-block.hidden{display:none!important}
.live-stats-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:0 16px 8px}
.live-stat-card{background:var(--white);border:1px solid var(--border);border-radius:12px;padding:10px 12px;box-shadow:0 2px 8px rgba(0,0,0,.04)}
.live-stat-label{font-size:11px;color:var(--text-muted,#888);font-weight:600}
.live-stat-num{font-size:20px;font-weight:800;color:var(--primary);margin-top:2px}
.live-feed-hint{font-size:10px;color:var(--text-muted,#888);padding:0 16px 10px;line-height:1.5}
.live-feed-head{font-size:13px;font-weight:700;padding:0 16px 8px}
.live-feed-scroll{display:flex;flex-direction:column;gap:10px;padding:0 16px 12px;max-height:none;overflow-y:visible}
.live-feed-scroll .order-card{margin-bottom:0}
.live-feed-scroll .order-card-mine{box-shadow:0 0 0 2px rgba(var(--primary-rgb,7,193,96),.18)}
.live-feed-page{padding:0 0 12px}
.live-feed-page .live-stats-row{padding:0 16px 8px}
.live-feed-page .live-feed-hint{padding:0 16px 10px}
.live-feed-page .live-feed-scroll{max-height:none;min-height:240px}

/* ===== 炫彩默认模板：粗体深色字 + 变色彩字 + 新排版 ===== */
@keyframes vivid-chroma {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}
@keyframes vivid-ink {
  0% { color: #e11d48; }
  18% { color: #d97706; }
  36% { color: #059669; }
  54% { color: #2563eb; }
  72% { color: #7c3aed; }
  100% { color: #e11d48; }
}
@keyframes vivid-aurora {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-4%, 3%, 0) scale(1.06); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}
@keyframes vivid-shine {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

[data-theme="vivid"] {
  --vivid-chroma: linear-gradient(90deg, #ff4d6d, #ffb020, #22c55e, #2ec4ff, #a855f7, #ff4d6d);
}

[data-theme="vivid"] body {
  font-weight: 700;
  color: #111827;
  background: #f3f5fb;
}

[data-theme="vivid"] body::before {
  content: '';
  position: fixed;
  inset: -20% -10% auto;
  height: 70vh;
  background:
    radial-gradient(42% 58% at 12% 18%, rgba(46, 196, 255, 0.32), transparent 70%),
    radial-gradient(38% 52% at 88% 8%, rgba(255, 77, 109, 0.26), transparent 68%),
    radial-gradient(46% 48% at 58% 72%, rgba(255, 176, 32, 0.22), transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: vivid-aurora 14s ease-in-out infinite;
}

[data-theme="vivid"] #app {
  position: relative;
  z-index: 1;
  background: transparent;
}

[data-theme="vivid"] .chroma-text,
[data-theme="vivid"] .banner-title,
[data-theme="vivid"] .banner-title.fw-bold,
[data-theme="vivid"] .page-title,
[data-theme="vivid"] .section-header > span,
[data-theme="vivid"] .feature-title,
[data-theme="vivid"] .user-name,
[data-theme="vivid"] .tier-energy,
[data-theme="vivid"] .tier-price,
[data-theme="vivid"] .live-stat-num,
[data-theme="vivid"] .rent-bottom-price,
[data-theme="vivid"] .asset-value,
[data-theme="vivid"] .free-energy-row strong,
[data-theme="vivid"] .balance-badge .fw-bold,
[data-theme="vivid"] .nav-item.active .nav-text {
  background: none;
  -webkit-text-fill-color: currentColor;
  color: #e11d48;
  animation: vivid-ink 3.6s linear infinite;
  font-weight: 800;
}

[data-theme="vivid"] .user-header,
[data-theme="vivid"] .banner,
[data-theme="vivid"] .feature-list,
[data-theme="vivid"] .section,
[data-theme="vivid"] .record-list,
[data-theme="vivid"] .energy-form,
[data-theme="vivid"] .page-top,
[data-theme="vivid"] .tab-bar {
  position: relative;
  z-index: 1;
}

[data-theme="vivid"] .user-header {
  margin: 12px 14px 0;
  padding: 14px 14px;
  border-radius: 20px;
  box-shadow: var(--shadow-card);
}

[data-theme="vivid"] .user-name { font-size: 17px; }
[data-theme="vivid"] .user-id {
  color: #1f2937;
  font-weight: 700;
}

[data-theme="vivid"] .sign-btn-large {
  background: var(--vivid-chroma);
  background-size: 200% 100%;
  animation: vivid-shine 3.2s linear infinite;
  font-weight: 800;
  color: #fff;
  -webkit-text-fill-color: #fff;
  box-shadow: 0 6px 16px rgba(255, 77, 109, 0.28);
  padding: 8px 14px;
}

[data-theme="vivid"] .sign-tag {
  background: #111827;
  color: #fff;
  font-weight: 800;
}

[data-theme="vivid"] .sign-tag .ico-tag { color: #ffd166; }

[data-theme="vivid"] .banner {
  margin: 12px 14px 14px;
}

[data-theme="vivid"] .banner-default {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.72)),
    var(--vivid-chroma);
  background-size: auto, 240% 100%;
  animation: vivid-shine 8s linear infinite;
  padding: 20px 18px 18px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-card);
}

[data-theme="vivid"] .banner-title {
  font-size: 20px;
  line-height: 1.35;
  margin-bottom: 8px;
}

[data-theme="vivid"] .banner-sub {
  color: #111827;
  font-weight: 700;
}

[data-theme="vivid"] .banner-cta {
  background: #111827;
  color: #fff;
  font-weight: 800;
  border-radius: 999px;
  padding: 8px 16px;
}

[data-theme="vivid"] .feature-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 14px 8px;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

[data-theme="vivid"] .feature-item {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding: 16px 14px 14px;
  background: #fff;
  border: none;
  border-radius: 18px;
  box-shadow: var(--shadow-card);
}

[data-theme="vivid"] .feature-item:last-child { border-bottom: none; }
[data-theme="vivid"] .feature-item:active {
  transform: scale(0.98);
  background: #fff;
}

[data-theme="vivid"] .feature-info { margin-left: 0; margin-top: 10px; }
[data-theme="vivid"] .feature-title { font-size: 15px; }
[data-theme="vivid"] .feature-desc {
  color: #1f2937;
  font-weight: 700;
  margin-top: 4px;
}
[data-theme="vivid"] .feature-arrow { display: none; }

[data-theme="vivid"] .feature-icon,
[data-theme="vivid"] .feature-icon.ic-green,
[data-theme="vivid"] .feature-icon.ic-blue,
[data-theme="vivid"] .feature-icon.ic-pink,
[data-theme="vivid"] .feature-icon.ic-gold {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  color: #fff;
}
[data-theme="vivid"] .feature-icon.ic-green { background: linear-gradient(135deg, #22c55e, #00d4aa); }
[data-theme="vivid"] .feature-icon.ic-blue { background: linear-gradient(135deg, #2ec4ff, #2563eb); }
[data-theme="vivid"] .feature-icon.ic-pink { background: linear-gradient(135deg, #ff4d6d, #a855f7); }
[data-theme="vivid"] .feature-icon.ic-gold { background: linear-gradient(135deg, #ffb020, #ff8f4a); }
[data-theme="vivid"] .feature-icon .ico { color: #fff; stroke: #fff; }

[data-theme="vivid"] .section { margin-top: 18px; padding: 0 14px; }
[data-theme="vivid"] .section-header {
  font-weight: 800;
  margin-bottom: 10px;
}
[data-theme="vivid"] .section-header a {
  color: #111827;
  font-weight: 800;
}

[data-theme="vivid"] .record-list,
[data-theme="vivid"] .energy-form,
[data-theme="vivid"] .transfer-rent-panel,
[data-theme="vivid"] .menu-card {
  box-shadow: var(--shadow-card);
}

[data-theme="vivid"] .form-label,
[data-theme="vivid"] .page-top,
[data-theme="vivid"] .tab-item,
[data-theme="vivid"] .detect-hint,
[data-theme="vivid"] .fw-bold,
[data-theme="vivid"] .fw-medium,
[data-theme="vivid"] .menu-item,
[data-theme="vivid"] .nav-item .nav-text,
[data-theme="vivid"] .live-stat-label,
[data-theme="vivid"] .live-feed-head {
  color: #111827;
  font-weight: 800;
}

[data-theme="vivid"] .fw-regular,
[data-theme="vivid"] .fw-light,
[data-theme="vivid"] .detect-hint,
[data-theme="vivid"] .empty-hint,
[data-theme="vivid"] .user-id {
  color: #1f2937;
  font-weight: 700;
}

[data-theme="vivid"] .page-title { font-size: 20px; }

[data-theme="vivid"] .tab-bar,
[data-theme="vivid"] .exchange-tabs,
[data-theme="vivid"] #page-energy .tab-bar {
  margin: 0 14px 12px;
  background: #fff;
  border-radius: 16px;
  padding: 4px;
  height: auto;
  box-shadow: var(--shadow);
}

[data-theme="vivid"] .balance-badge,
[data-theme="vivid"] .rate-badge {
  background: #111827;
  color: #fff;
  border: none;
  box-shadow: none;
}

[data-theme="vivid"] #page-energy .page-top,
[data-theme="vivid"] #page-exchange .page-top {
  padding: 16px 14px 8px;
}

[data-theme="vivid"] .tab-item.active,
[data-theme="vivid"] .exchange-tabs .tab-item.active,
[data-theme="vivid"] #page-energy .tab-item.active {
  background: var(--vivid-chroma);
  background-size: 200% 100%;
  animation: vivid-shine 3.2s linear infinite;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(255, 77, 109, 0.22);
}

[data-theme="vivid"] .rent-btn,
[data-theme="vivid"] .banner-cta {
  font-weight: 800;
}

[data-theme="vivid"] .rent-btn:not(:disabled):not(.rent-btn--pending):not(.btn-secondary) {
  background: var(--vivid-chroma);
  background-size: 200% 100%;
  animation: vivid-shine 3.2s linear infinite;
  box-shadow: 0 8px 20px rgba(255, 77, 109, 0.28);
}

[data-theme="vivid"] .bottom-nav {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  box-shadow: 0 -8px 24px rgba(17, 24, 39, 0.06);
}

[data-theme="vivid"] .nav-item { font-weight: 800; color: #4b5563; }
[data-theme="vivid"] .nav-item.active .nav-text {
  font-weight: 800;
}
[data-theme="vivid"] .nav-item.active .nav-ico {
  color: #ff4d6d;
}

@media (prefers-reduced-motion: reduce) {
  [data-theme="vivid"] body::before,
  [data-theme="vivid"] .sign-btn-large,
  [data-theme="vivid"] .banner-default,
  [data-theme="vivid"] .tab-item.active,
  [data-theme="vivid"] .exchange-tabs .tab-item.active,
  [data-theme="vivid"] #page-energy .tab-item.active,
  [data-theme="vivid"] .rent-btn:not(:disabled):not(.rent-btn--pending):not(.btn-secondary) {
    animation: none;
  }
}

[data-theme="vivid"] .chroma-text,
[data-theme="vivid"] .banner-title,
[data-theme="vivid"] .banner-title.fw-bold,
[data-theme="vivid"] .page-title,
[data-theme="vivid"] .section-header > span,
[data-theme="vivid"] .feature-title,
[data-theme="vivid"] .user-name,
[data-theme="vivid"] .tier-energy,
[data-theme="vivid"] .tier-price,
[data-theme="vivid"] .live-stat-num,
[data-theme="vivid"] .rent-bottom-price,
[data-theme="vivid"] .asset-value,
[data-theme="vivid"] .free-energy-row strong,
[data-theme="vivid"] .free-toggle .fw-bold,
[data-theme="vivid"] .nav-item.active .nav-text,
[data-theme="vivid"] .form-label,
[data-theme="vivid"] .qr-label,
[data-theme="vivid"] .transfer-qr-label,
[data-theme="vivid"] .swap-history-title,
[data-theme="vivid"] .swap-row-head,
[data-theme="vivid"] .swap-row-head strong,
[data-theme="vivid"] .swap-result-value,
[data-theme="vivid"] #exchangeResult,
[data-theme="vivid"] .profile-name,
[data-theme="vivid"] .assets-title,
[data-theme="vivid"] .assets-title span,
[data-theme="vivid"] .menu-text,
[data-theme="vivid"] .asset-label,
[data-theme="vivid"] .subpage-title,
[data-theme="vivid"] .app-modal-title,
[data-theme="vivid"] .record-amount,
[data-theme="vivid"] .total-price,
[data-theme="vivid"] .vip-price,
[data-theme="vivid"] .addr-field-count,
[data-theme="vivid"] .menu-extra,
[data-theme="vivid"] .balance-badge .fw-bold,
[data-theme="vivid"] .rate-badge {
  color: #e11d48 !important;
  -webkit-text-fill-color: currentColor !important;
  animation: vivid-ink 3.6s linear infinite !important;
  font-weight: 800 !important;
}

/* 能量 / 闪兑 / 我的 / 子弹窗：粗体深色说明 + 卡片排版 */
[data-theme="vivid"] .form-label,
[data-theme="vivid"] .detect-hint,
[data-theme="vivid"] .tier-desc,
[data-theme="vivid"] .addr-field-text,
[data-theme="vivid"] .transfer-addr-text,
[data-theme="vivid"] .deposit-addr,
[data-theme="vivid"] .profile-id,
[data-theme="vivid"] .empty-hint,
[data-theme="vivid"] .live-feed-hint,
[data-theme="vivid"] .exchange-notice p,
[data-theme="vivid"] .swap-empty-card,
[data-theme="vivid"] .subpage-back {
  font-weight: 800;
}

[data-theme="vivid"] .detect-hint,
[data-theme="vivid"] .tier-desc,
[data-theme="vivid"] .addr-field-text,
[data-theme="vivid"] .addr-field-text.empty,
[data-theme="vivid"] .profile-id,
[data-theme="vivid"] .empty-hint,
[data-theme="vivid"] .live-feed-hint {
  color: #1f2937;
}

[data-theme="vivid"] .energy-form,
[data-theme="vivid"] .transfer-rent-panel,
[data-theme="vivid"] .transfer-qr-card,
[data-theme="vivid"] .swap-card,
[data-theme="vivid"] .qr-card,
[data-theme="vivid"] .assets-card,
[data-theme="vivid"] .menu-card,
[data-theme="vivid"] .profile-header,
[data-theme="vivid"] .live-stat-card,
[data-theme="vivid"] .app-modal {
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow-card);
}

[data-theme="vivid"] .energy-form { margin: 0 14px 16px; padding: 16px; }
[data-theme="vivid"] .transfer-rent-panel { margin: 0 14px 16px; padding: 0; background: transparent; box-shadow: none; }
[data-theme="vivid"] .transfer-qr-card,
[data-theme="vivid"] .swap-card,
[data-theme="vivid"] .qr-card { margin-bottom: 14px; padding: 16px; }
[data-theme="vivid"] .profile-header { margin: 12px 14px 0; padding: 14px; }
[data-theme="vivid"] .assets-card,
[data-theme="vivid"] .menu-card { margin: 12px 14px 0; }

[data-theme="vivid"] .tier-card {
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: var(--shadow);
}
[data-theme="vivid"] .tier-card.selected {
  border-color: #ff4d6d;
  background: linear-gradient(180deg, #fff5f7 0%, #fff 70%);
  box-shadow: 0 8px 18px rgba(255, 77, 109, 0.16);
}
[data-theme="vivid"] .tier-card.selected::after {
  background: var(--vivid-chroma);
  background-size: 200% 100%;
  animation: vivid-shine 3.2s linear infinite;
}

[data-theme="vivid"] .addr-field,
[data-theme="vivid"] .addr-field-dispatch,
[data-theme="vivid"] .addr-field-receiver,
[data-theme="vivid"] .swap-amount-box,
[data-theme="vivid"] .transfer-addr-box,
[data-theme="vivid"] .address-box {
  border-radius: 14px;
  border-color: #e5e7eb;
  background: #f8fafc;
}

[data-theme="vivid"] .addr-manage-chip {
  color: #111827;
  font-weight: 800;
}

[data-theme="vivid"] .menu-icon-cell.ic-green { color: #22c55e; }
[data-theme="vivid"] .menu-icon-cell.ic-blue { color: #2563eb; }
[data-theme="vivid"] .menu-icon-cell.ic-orange { color: #f59e0b; }
[data-theme="vivid"] .menu-icon-cell.ic-purple { color: #7c3aed; }
[data-theme="vivid"] .menu-icon-cell.ic-gold { color: #d97706; }
[data-theme="vivid"] .menu-icon-cell.ic-gray { color: #4b5563; }

[data-theme="vivid"] .action-btn.primary,
[data-theme="vivid"] .app-modal-btn,
[data-theme="vivid"] .swap-submit-btn {
  font-weight: 800;
}
[data-theme="vivid"] .action-btn.primary,
[data-theme="vivid"] .app-modal-btn {
  background: var(--vivid-chroma);
  background-size: 200% 100%;
  animation: vivid-shine 3.2s linear infinite;
  color: #fff;
  border: none;
}

[data-theme="vivid"] .subpage-header {
  background: #fff;
  box-shadow: 0 4px 16px rgba(17, 24, 39, 0.05);
}
[data-theme="vivid"] .subpage {
  background: #f3f5fb;
}

[data-theme="vivid"] .rate-badge,
[data-theme="vivid"] .balance-badge {
  background: #111827 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  animation: none !important;
}
[data-theme="vivid"] .balance-badge .fw-bold {
  color: #ffd166 !important;
  -webkit-text-fill-color: #ffd166 !important;
  animation: vivid-ink 3.6s linear infinite !important;
}

.vip-page .panel-title { font-weight: 800; font-size: 18px; margin: 0 0 8px; }
.vip-page .panel-desc { font-size: 13px; line-height: 1.55; color: var(--text2); margin: 0 0 14px; font-weight: 600; }
.vip-balance { font-size: 13px; font-weight: 700; margin-bottom: 14px; color: var(--text); }
.vip-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.vip-tab {
  flex: 1;
  border: 2px solid var(--border, #e5e7eb);
  background: #fff;
  border-radius: 12px;
  padding: 10px 8px;
  font-weight: 800;
  cursor: pointer;
}
.vip-tab.active { border-color: var(--primary, #ff4d6d); }
.vip-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.vip-plans-4 { grid-template-columns: repeat(2, 1fr); }
.vip-plan {
  border: 2px solid var(--border, #e5e7eb);
  background: var(--card, #fff);
  border-radius: 14px;
  padding: 12px 6px;
  text-align: center;
  cursor: pointer;
  color: var(--text);
}
.vip-plan.active {
  border-color: var(--primary, #ff4d6d);
  box-shadow: 0 0 0 3px rgba(255, 77, 109, 0.12);
}
.vip-plan-m { font-size: 13px; font-weight: 800; }
.vip-plan-p { margin-top: 6px; font-size: 14px; font-weight: 800; color: var(--primary, #e11d48); }
.vip-user-input {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid var(--border, #e5e7eb);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
}
.vip-buy-btn { width: 100%; margin-top: 4px; }
.vip-dep-btn { width: 100%; margin-top: 10px; }
[data-theme="vivid"] .vip-plan-p,
[data-theme="vivid"] .vip-page .panel-title {
  color: #e11d48 !important;
  -webkit-text-fill-color: currentColor !important;
  animation: vivid-ink 3.6s linear infinite !important;
}
