/* ============ Mountsea Wealth · 行情聚合 Pro ============ */
:root {
  --bg: #05070f;
  --bg2: #0a0f1f;
  --card: rgba(17, 24, 44, .58);
  --card2: rgba(13, 19, 38, .6);
  --line: rgba(120, 140, 180, .16);
  --line2: rgba(120, 140, 180, .28);
  --txt: #e8eef9;
  --dim: #93a0b8;
  --faint: #5c6a84;
  --gold: #f3c453;
  --gold-deep: #d9a531;
  --up: #2ee6a0;
  --down: #ff5b6e;
  --cyan: #39c6ff;
  --violet: #9a8cff;
  --teal: #2fd4c4;
  --r: 16px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, "Segoe UI", "Inter", "Roboto", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--txt);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(1100px 520px at 12% -8%, rgba(243, 196, 83, .07), transparent 60%),
    radial-gradient(900px 500px at 95% 0%, rgba(57, 120, 255, .08), transparent 60%),
    radial-gradient(800px 600px at 50% 115%, rgba(47, 212, 196, .05), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(140,160,210,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140,160,210,.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 0%, transparent 78%);
}
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: rgba(130,150,200,.22); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(130,150,200,.4); }
::selection { background: rgba(243,196,83,.3); }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }
.num { font-variant-numeric: tabular-nums; }

/* ============ 顶栏 ============ */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: rgba(6, 9, 18, .72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 14px; }
.logo {
  width: 42px; height: 42px; border-radius: 13px;
  display: grid; place-items: center;
  font-size: 22px; font-weight: 800; color: #071021;
  background: linear-gradient(135deg, #f8dd8d, var(--gold) 45%, var(--gold-deep));
  box-shadow: 0 4px 18px rgba(243, 196, 83, .35), inset 0 1px 0 rgba(255,255,255,.5);
}
.brand-txt h1 { font-size: 17px; letter-spacing: .4px; }
.brand-txt span { font-size: 11px; color: var(--dim); letter-spacing: 2px; }
.top-right { display: flex; align-items: center; gap: 14px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--dim);
  border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px;
  background: rgba(255,255,255,.03);
}
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-sim { background: #f5b942; box-shadow: 0 0 8px rgba(245,185,66,.8); }
.dot-live { background: var(--up); box-shadow: 0 0 8px rgba(46,230,160,.8); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.clock { font-size: 14px; color: var(--txt); font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.lang-sel {
  background: rgba(255,255,255,.04); color: var(--txt);
  border: 1px solid var(--line2); border-radius: 10px;
  padding: 6px 10px; font-size: 12.5px; outline: none; cursor: pointer;
  font-family: inherit;
}
.lang-sel:hover { border-color: var(--gold); }
.lang-sel option { background: #0d1426; color: var(--txt); }

/* ============ 滚动行情条 ============ */
.ticker-wrap {
  overflow: hidden; border-bottom: 1px solid var(--line);
  background: rgba(10, 15, 31, .5);
}
.ticker {
  display: flex; width: max-content;
  animation: marquee 36s linear infinite;
  padding: 8px 0;
}
.ticker:hover { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.tk { display: inline-flex; align-items: center; gap: 8px; margin: 0 26px; font-size: 12.5px; white-space: nowrap; }
.tk-l { color: var(--faint); font-weight: 500; }
.tk-v { color: var(--txt); font-variant-numeric: tabular-nums; }

/* ============ 布局 ============ */
.wrap { max-width: 1280px; margin: 0 auto; padding: 26px 28px 60px; }
section { margin-bottom: 34px; }
.sec-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; gap: 12px; flex-wrap: wrap;
}
.sec-title { display: flex; align-items: center; gap: 12px; }
.sec-title h2 { font-size: 18px; letter-spacing: .5px; }
.sec-sub { font-size: 12px; color: var(--dim); }
.sec-actions { display: flex; align-items: center; gap: 10px; }
.kicker {
  width: 4px; height: 20px; border-radius: 3px;
  background: linear-gradient(180deg, #f8dd8d, var(--gold-deep));
  box-shadow: 0 0 10px rgba(243,196,83,.5);
}
.kicker.teal { background: linear-gradient(180deg, #7ff0e4, #14b8a6); box-shadow: 0 0 10px rgba(47,212,196,.5); }

/* ============ 卡片 ============ */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 34px rgba(2, 6, 18, .45);
  transition: transform .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--line2); }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 0;
}
.card-title { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; }
.card-title em { font-style: normal; font-size: 11px; color: var(--faint); font-weight: 500; letter-spacing: 1px; }
.badge {
  font-size: 11px; padding: 3px 10px; border-radius: 99px;
  border: 1px solid var(--line2); color: var(--dim); background: rgba(255,255,255,.04);
}
.badge.live { color: var(--up); border-color: rgba(46,230,160,.4); }

/* ============ Hero ============ */
.hero {
  display: grid; grid-template-columns: minmax(360px, 460px) 1fr; gap: 18px;
}
.xau-card {
  padding-bottom: 18px;
  border-color: rgba(243, 196, 83, .28);
  background:
    linear-gradient(160deg, rgba(243,196,83,.07), transparent 42%),
    var(--card);
  box-shadow: 0 14px 40px rgba(2,6,18,.5), inset 0 0 60px rgba(243,196,83,.04);
}
.xau-main { display: flex; align-items: baseline; gap: 14px; padding: 14px 20px 0; flex-wrap: wrap; }
.xau-px { font-size: 44px; font-weight: 800; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.chg { font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 8px; }
.chg.up { color: var(--up); background: rgba(46,230,160,.12); }
.chg.down { color: var(--down); background: rgba(255,91,110,.12); }
.xau-unit { padding: 0 20px; font-size: 12px; color: var(--dim); }
.spark { padding: 10px 14px 4px; }
.spark svg { width: 100%; height: 64px; display: block; }
.xau-metrics {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px;
  padding: 12px 20px 0;
}
.xau-metrics > div {
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(255,255,255,.035); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 12px; font-size: 12px;
}
.xau-metrics span { color: var(--dim); }
.xau-metrics b { font-size: 13.5px; font-variant-numeric: tabular-nums; }
.xau-metrics b.gold { color: var(--gold); }

/* USDT 汇价 */
.usdt-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.ucard {
  padding: 16px 16px 14px; border-radius: var(--r);
  background: var(--card); border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  display: flex; flex-direction: column; gap: 8px;
  transition: transform .25s ease, border-color .25s ease;
}
.ucard:hover { transform: translateY(-3px); border-color: rgba(243,196,83,.4); }
.ucard .u-top { display: flex; align-items: center; justify-content: space-between; }
.ucard .u-cur { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.ucard .u-src { font-size: 10px; color: var(--faint); border: 1px solid var(--line); padding: 2px 7px; border-radius: 99px; }
.ucard .u-px { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ucard .u-sub { font-size: 11px; color: var(--dim); display: flex; justify-content: space-between; }
.ucard .u-sub b { font-variant-numeric: tabular-nums; font-weight: 600; }

/* ============ C2C 实盘报价 ============ */
.c2c-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.c2c-card { padding: 18px; border: 1px solid rgba(47,212,196,.28); border-radius: var(--r); background: linear-gradient(145deg, rgba(47,212,196,.08), transparent 48%), var(--card); }
.c2c-head { display: flex; justify-content: space-between; align-items: center; color: var(--dim); font-size: 12px; }
.c2c-head b { color: var(--txt); font-size: 14px; }
.c2c-head span { color: var(--teal); font-size: 11px; }
.c2c-price { color: var(--gold); font-weight: 800; font-size: 30px; margin: 13px 0 8px; font-variant-numeric: tabular-nums; }
.c2c-price small { color: var(--dim); font-size: 11px; font-weight: 500; }
.c2c-meta { color: var(--faint); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============ 表格 ============ */
.table-card { overflow: hidden; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl thead th {
  text-align: right; font-weight: 600; font-size: 12px; color: var(--dim);
  padding: 13px 18px; border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.025); white-space: nowrap;
}
.tbl thead th:first-child { text-align: left; }
.tbl tbody td {
  text-align: right; padding: 13px 18px;
  border-bottom: 1px solid rgba(120,140,180,.08);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr { transition: background .18s ease; }
.tbl tbody tr:hover { background: rgba(255,255,255,.03); }
.tbl td:first-child { text-align: left; }
.tbl td.u { color: var(--gold); font-weight: 600; }
.tbl td.dim { color: var(--dim); }
.tbl-foot { padding: 11px 18px; font-size: 11.5px; color: var(--faint); border-top: 1px solid var(--line); }
.metal-name { display: flex; align-items: center; gap: 9px; font-weight: 600; }
.dotm { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.dotm.gold { background: linear-gradient(135deg,#f8dd8d,#d9a531); }
.dotm.silver { background: linear-gradient(135deg,#dfe7f2,#98a7bd); }
.dotm.platinum { background: linear-gradient(135deg,#e6e2fa,#a89ee0); }
.dotm.palladium { background: linear-gradient(135deg,#d6f2ec,#6fbfb2); }
.tag-buy { color: var(--up); font-weight: 600; }
.tag-hold { color: var(--dim); }
.tag-sell { color: var(--down); font-weight: 600; }

/* ============ 区域基差 ============ */
.region-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 14px; }
.rcard {
  position: relative; padding: 18px 18px 16px; border-radius: var(--r);
  background: var(--card); border: 1px solid var(--line);
  backdrop-filter: blur(10px); overflow: hidden;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.rcard:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(2,6,18,.55); }
.rcard::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: .55;
}
.rcard .r-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.rcard .r-name { font-size: 14px; font-weight: 700; display: flex; gap: 8px; align-items: center; }
.rcard .r-flag { font-size: 17px; }
.r-basis { font-size: 11px; padding: 3px 9px; border-radius: 99px; font-variant-numeric: tabular-nums; }
.r-basis.up { color: var(--up); background: rgba(46,230,160,.1); }
.r-basis.down { color: var(--down); background: rgba(255,91,110,.1); }
.rcard .r-big { font-size: 27px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.rcard .r-big small { font-size: 12px; color: var(--dim); font-weight: 500; margin-left: 4px; }
.rcard .r-formula { font-size: 10.5px; color: var(--faint); margin: 7px 0 10px; line-height: 1.6; }
.rcard .r-rows { display: flex; flex-direction: column; gap: 6px; }
.rcard .r-rows > div {
  display: flex; justify-content: space-between; font-size: 12px;
  background: rgba(255,255,255,.03); border: 1px solid rgba(120,140,180,.1);
  padding: 6px 10px; border-radius: 8px;
}
.rcard .r-rows span { color: var(--dim); }
.rcard .r-rows b { font-variant-numeric: tabular-nums; font-weight: 600; }

/* ============ 按钮 ============ */
.btn {
  border: none; border-radius: 11px; padding: 11px 22px;
  font-size: 13.5px; font-weight: 700; color: #071021;
  background: linear-gradient(135deg, #f8dd8d, var(--gold) 50%, var(--gold-deep));
  box-shadow: 0 6px 18px rgba(243,196,83,.28);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 9px 24px rgba(243,196,83,.4); }
.btn:active { transform: translateY(1px); }
.btn:disabled { filter: grayscale(.6) brightness(.75); cursor: not-allowed; transform: none; }
.btn.ghost {
  background: transparent; color: var(--txt);
  border: 1px solid var(--line2); box-shadow: none;
}
.btn.ghost:hover { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 0 rgba(0,0,0,0); }
.btn.sm { padding: 7px 14px; font-size: 12px; border-radius: 9px; }
.btn.teal {
  background: linear-gradient(135deg, #7ff0e4, #2fd4c4 50%, #14b8a6);
  box-shadow: 0 6px 18px rgba(47,212,196,.25);
}

/* ============ 查U机器人 ============ */
.bot-shell {
  border: 1px solid rgba(47, 212, 196, .3);
  background:
    linear-gradient(150deg, rgba(47,212,196,.06), transparent 40%),
    var(--card);
  border-radius: 20px; padding: 22px;
  box-shadow: 0 16px 44px rgba(2,6,18,.5);
}
.bot-head { display: flex; align-items: center; gap: 15px; margin-bottom: 18px; flex-wrap: wrap; }
.bot-avatar {
  width: 52px; height: 52px; border-radius: 16px; font-size: 27px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(47,212,196,.25), rgba(20,184,166,.1));
  border: 1px solid rgba(47,212,196,.4);
  box-shadow: 0 0 22px rgba(47,212,196,.25);
  animation: bob 3.4s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.bot-head h3 { font-size: 17px; }
.bot-head p { font-size: 12px; color: var(--dim); margin-top: 3px; }
.bot-head .spacer { flex: 1; }

.switch { display: inline-flex; align-items: center; gap: 9px; font-size: 12px; color: var(--dim); cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch .track {
  width: 38px; height: 21px; border-radius: 99px;
  background: rgba(255,255,255,.1); border: 1px solid var(--line2);
  position: relative; transition: background .2s ease;
}
.switch .track::after {
  content: ""; position: absolute; top: 2px; left: 2.5px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--dim); transition: transform .2s ease, background .2s ease;
}
.switch input:checked + .track { background: rgba(47,212,196,.35); border-color: rgba(47,212,196,.6); }
.switch input:checked + .track::after { transform: translateX(17px); background: var(--teal); }

.bot-form { display: grid; grid-template-columns: 1fr auto auto auto; gap: 10px; margin-bottom: 12px; }
.inp {
  background: rgba(5,8,16,.65); border: 1px solid var(--line2); color: var(--txt);
  border-radius: 11px; padding: 12px 14px; font-size: 13.5px; outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
  min-width: 0;
}
.inp::placeholder { color: var(--faint); }
.inp:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(47,212,196,.14); }
select.inp { cursor: pointer; }
.bot-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip {
  font-size: 11.5px; color: var(--dim); cursor: pointer; user-select: none;
  border: 1px dashed var(--line2); border-radius: 99px; padding: 5px 13px;
  background: rgba(255,255,255,.02); transition: all .18s ease;
}
.chip:hover { color: var(--teal); border-color: rgba(47,212,196,.5); border-style: solid; }

.bot-grid { display: grid; grid-template-columns: 300px 1fr; gap: 16px; }
.bot-side { display: flex; flex-direction: column; gap: 14px; }

.bal-card {
  border-radius: var(--r); padding: 18px;
  background:
    radial-gradient(320px 120px at 85% -10%, rgba(46,230,160,.14), transparent),
    linear-gradient(160deg, rgba(46,230,160,.06), transparent 50%),
    var(--card2);
  border: 1px solid rgba(46,230,160,.25);
}
.bal-label { font-size: 11.5px; color: var(--dim); letter-spacing: 1px; margin-bottom: 6px; }
.bal-num { font-size: 32px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--up); word-break: break-all; }
.bal-num small { font-size: 14px; color: var(--dim); font-weight: 600; }
.bal-sub { font-size: 11.5px; color: var(--dim); margin-top: 8px; word-break: break-all; }
.bal-meta { display: flex; flex-direction: column; gap: 5px; margin-top: 12px; font-size: 12px; }
.bal-meta > div {
  display: flex; justify-content: space-between;
  background: rgba(255,255,255,.035); border: 1px solid rgba(120,140,180,.12);
  border-radius: 8px; padding: 6px 10px;
}
.bal-meta span { color: var(--dim); }
.bal-meta b { font-variant-numeric: tabular-nums; }

.stat-card { border-radius: var(--r); padding: 15px 16px; background: var(--card2); border: 1px solid var(--line); }
.stat-title { font-size: 12px; color: var(--dim); margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.stat-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: 12.5px; color: var(--dim); border-bottom: 1px dashed rgba(120,140,180,.12); }
.stat-row:last-of-type { border-bottom: none; }
.stat-row b { font-variant-numeric: tabular-nums; font-size: 13px; }
.up { color: var(--up); }
.down { color: var(--down); }

.watch-card { border-radius: var(--r); padding: 15px 16px; background: var(--card2); border: 1px solid var(--line); }
.watch-title { font-size: 12px; color: var(--dim); margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.watch-title button { background: none; border: 1px solid var(--line2); color: var(--dim); font-size: 11px; border-radius: 7px; padding: 4px 9px; transition: all .18s; }
.watch-title button:hover { color: var(--teal); border-color: rgba(47,212,196,.5); }
.watch-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px; border-radius: 10px; margin-bottom: 7px;
  background: rgba(255,255,255,.03); border: 1px solid rgba(120,140,180,.12);
  font-size: 11.5px;
}
.watch-item .w-main { flex: 1; min-width: 0; cursor: pointer; }
.watch-item .w-addr { color: var(--txt); font-family: ui-monospace, Consolas, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.watch-item .w-sub { color: var(--faint); margin-top: 2px; font-variant-numeric: tabular-nums; }
.watch-item .w-sub b { font-weight: 600; }
.watch-item .w-ops { display: flex; gap: 5px; }
.watch-item .w-ops button {
  background: none; border: 1px solid var(--line2); color: var(--dim);
  width: 24px; height: 24px; border-radius: 7px; font-size: 11px; line-height: 1;
  transition: all .15s;
}
.watch-item .w-ops button:hover { color: var(--teal); border-color: rgba(47,212,196,.5); }
.chain-tag { font-size: 10px; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line2); color: var(--dim); white-space: nowrap; }
.chain-tag.TRON { color: #ff3b3b; border-color: rgba(255,59,59,.35); }
.chain-tag.ETH { color: #8f9bff; border-color: rgba(143,155,255,.35); }
.chain-tag.BSC { color: var(--gold); border-color: rgba(243,196,83,.35); }

.bot-main { display: flex; flex-direction: column; gap: 13px; min-width: 0; }
.bot-log {
  display: flex; flex-direction: column; gap: 9px;
  max-height: 218px; overflow-y: auto; padding: 4px 2px;
}
.bubble {
  max-width: 92%; padding: 9px 14px; font-size: 12.5px; line-height: 1.65;
  border-radius: 13px; animation: pop .22s ease; word-break: break-word;
}
@keyframes pop { from { opacity: 0; transform: translateY(5px); } }
.bubble.bot { align-self: flex-start; background: rgba(255,255,255,.045); border: 1px solid var(--line); border-top-left-radius: 4px; color: var(--txt); }
.bubble.ok { align-self: flex-start; background: rgba(46,230,160,.08); border: 1px solid rgba(46,230,160,.3); border-top-left-radius: 4px; }
.bubble.err { align-self: flex-start; background: rgba(255,91,110,.08); border: 1px solid rgba(255,91,110,.3); border-top-left-radius: 4px; }
.bubble b { font-variant-numeric: tabular-nums; }
.bubble .mono { font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; }

.tx-filter { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tx-filter .cnt { font-size: 11.5px; color: var(--faint); margin-left: auto; }
.fchip {
  font-size: 11.5px; color: var(--dim); border: 1px solid var(--line2);
  padding: 4px 13px; border-radius: 99px; background: rgba(255,255,255,.02); cursor: pointer; transition: all .16s;
}
.fchip:hover { color: var(--txt); }
.fchip.on { color: #071021; background: linear-gradient(135deg,#7ff0e4,#2fd4c4); border-color: transparent; font-weight: 700; }
.fchip.g { color: var(--up); border-color: rgba(46,230,160,.35); }
.fchip.g.on { color: #052018; background: var(--up); }
.fchip.r { color: var(--down); border-color: rgba(255,91,110,.35); }
.fchip.r.on { color: #2a0509; background: var(--down); }

.tx-wrap {
  border: 1px solid var(--line); border-radius: var(--r);
  background: rgba(8,12,24,.5); overflow: auto; max-height: 380px;
}
.tx-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 620px; }
.tx-tbl thead th {
  position: sticky; top: 0; z-index: 2;
  text-align: left; font-size: 11px; font-weight: 600; color: var(--dim);
  padding: 10px 14px; background: #0b1120ee; backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.tx-tbl tbody td { padding: 9px 14px; border-bottom: 1px solid rgba(120,140,180,.08); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tx-tbl tbody tr:hover { background: rgba(255,255,255,.03); }
.dirchip { font-size: 10.5px; font-weight: 700; padding: 2.5px 9px; border-radius: 7px; }
.dirchip.in { color: var(--up); background: rgba(46,230,160,.12); border: 1px solid rgba(46,230,160,.25); }
.dirchip.out { color: var(--down); background: rgba(255,91,110,.12); border: 1px solid rgba(255,91,110,.25); }
.addr-btn {
  font-family: ui-monospace, Consolas, monospace; font-size: 11.5px;
  color: var(--cyan); background: none; border: none; cursor: pointer; padding: 0;
}
.addr-btn:hover { text-decoration: underline; }
.atag { font-size: 10px; color: var(--gold); border: 1px solid rgba(243,196,83,.35); border-radius: 5px; padding: 1px 5px; margin-left: 6px; }
.tx-tbl .amt-in { color: var(--up); font-weight: 600; }
.tx-tbl .amt-out { color: var(--down); font-weight: 600; }
.tx-tbl .t-hash { color: var(--cyan); font-family: ui-monospace, Consolas, monospace; font-size: 11px; }
.tx-tbl .t-time { color: var(--dim); font-size: 11.5px; }

.skel { position: relative; overflow: hidden; background: rgba(255,255,255,.05); border-radius: 8px; height: 16px; }
.skel::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.09), transparent);
  animation: shimmer 1.2s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.empty-tip { padding: 34px; text-align: center; color: var(--faint); font-size: 12.5px; }

/* ============ 涨跌闪烁 ============ */
.fu { animation: fu .9s ease; }
.fd { animation: fd .9s ease; }
@keyframes fu { 0% { color: var(--up); text-shadow: 0 0 14px rgba(46,230,160,.75); } 100% {} }
@keyframes fd { 0% { color: var(--down); text-shadow: 0 0 14px rgba(255,91,110,.75); } 100% {} }

/* ============ 弹窗 & Toast ============ */
.modal-mask {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: rgba(3,5,10,.68); backdrop-filter: blur(6px);
  align-items: center; justify-content: center; padding: 20px;
}
.modal-mask.show { display: flex; }
.modal {
  width: min(560px, 100%); border-radius: 18px; padding: 22px;
  background: linear-gradient(170deg, #121a30, #0b1122);
  border: 1px solid var(--line2); box-shadow: 0 30px 80px rgba(0,0,0,.6);
  animation: pop .22s ease;
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modal-head h3 { font-size: 16px; }
.modal-head .x { background: none; border: none; color: var(--dim); font-size: 16px; }
.modal-head .x:hover { color: var(--down); }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-grid + .modal-grid { margin-top: 14px; }
.modal-sub { font-size: 11.5px; color: var(--faint); margin: 14px 0 8px; padding-top: 12px; border-top: 1px dashed var(--line); }
.modal-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--dim); }
.modal-grid label i { font-style: normal; font-size: 10.5px; color: var(--faint); }
.modal-grid input {
  background: rgba(5,8,16,.7); border: 1px solid var(--line2); color: var(--txt);
  border-radius: 9px; padding: 9px 12px; font-size: 13.5px; outline: none;
}
.modal-grid input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(243,196,83,.14); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

#toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: rgba(12,18,34,.92); border: 1px solid rgba(243,196,83,.4); color: var(--txt);
  font-size: 12.5px; padding: 10px 18px; border-radius: 12px;
  backdrop-filter: blur(8px); box-shadow: 0 10px 30px rgba(0,0,0,.5);
  animation: pop .2s ease;
}
.toast.out { opacity: 0; transition: opacity .4s ease; }

/* ============ 阿拉伯语 RTL ============ */
[dir="rtl"] body { font-family: "Segoe UI", "Noto Naskh Arabic", "Traditional Arabic", Tahoma, sans-serif; }
[dir="rtl"] .tbl thead th { text-align: left; }
[dir="rtl"] .tbl thead th:first-child { text-align: right; }
[dir="rtl"] .tbl tbody td { text-align: left; }
[dir="rtl"] .tbl tbody td:first-child { text-align: right; }
[dir="rtl"] .tx-tbl thead th { text-align: right; }
[dir="rtl"] .tx-tbl tbody td { direction: ltr; text-align: left; }
[dir="rtl"] .tx-tbl tbody td:first-child { direction: rtl; }
[dir="rtl"] .xau-metrics > div,
[dir="rtl"] .rcard .r-rows > div,
[dir="rtl"] .bal-meta > div,
[dir="rtl"] .stat-row { flex-direction: row-reverse; }
[dir="rtl"] .sec-head { flex-direction: row-reverse; }
[dir="rtl"] .bot-form { direction: ltr; }
[dir="rtl"] .bot-form input { direction: rtl; }
[dir="rtl"] .bubble { text-align: right; }
[dir="rtl"] .brand-txt, [dir="rtl"] .sec-title h2, [dir="rtl"] .card-title { text-align: right; }
[dir="rtl"] .top-right { flex-direction: row-reverse; }
[dir="rtl"] .ticker { animation-direction: reverse; }
[dir="rtl"] .modal-head { flex-direction: row-reverse; }
[dir="rtl"] .modal-foot { justify-content: flex-start; }
[dir="rtl"] .bot-chips { flex-direction: row-reverse; }
[dir="rtl"] .tx-filter { flex-direction: row-reverse; }
[dir="rtl"] .u-sub, [dir="rtl"] .u-top { flex-direction: row-reverse; }
[dir="rtl"] .r-head { flex-direction: row-reverse; }
[dir="rtl"] .r-name { flex-direction: row-reverse; }
[dir="rtl"] .watch-item { flex-direction: row-reverse; }
[dir="rtl"] .modal-grid label { text-align: right; }
[dir="rtl"] footer { direction: rtl; }

/* ============ Footer ============ */
footer { text-align: center; padding: 28px 20px 40px; color: var(--faint); font-size: 11.5px; line-height: 1.9; border-top: 1px solid var(--line); }
footer .faint { opacity: .6; }

/* ============ 响应式 ============ */
@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; }
  .usdt-strip { grid-template-columns: repeat(3, 1fr); }
  .bot-grid { grid-template-columns: 1fr; }
}

/* ---- 手机 ---- */
@media (max-width: 760px) {
  /* 顶栏精简为一行，允许换行兜底 */
  .topbar { padding: 10px 14px; flex-wrap: wrap; row-gap: 8px; }
  .brand { gap: 10px; }
  .logo { width: 34px; height: 34px; border-radius: 10px; font-size: 17px; }
  .brand-txt h1 { font-size: 15px; }
  .brand-txt span { display: none; }
  .top-right { gap: 8px; margin-left: auto; }
  .clock { display: none; }
  .pill { font-size: 11px; padding: 4px 9px; gap: 5px; }
  #langSel { max-width: 132px; }

  .wrap { padding: 16px 12px 40px; }
  section { margin-bottom: 26px; }
  .sec-title h2 { font-size: 16px; }

  /* 伦敦金卡 */
  .card-head { padding: 14px 16px 0; }
  .xau-px { font-size: 34px; }
  .xau-main, .xau-unit { padding-left: 16px; padding-right: 16px; }
  .xau-metrics { padding: 12px 16px 0; gap: 8px 10px; }

  /* USDT 汇价：两列，末张奇数卡占满整行 */
  .usdt-strip { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .usdt-strip .ucard:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .ucard .u-px { font-size: 21px; }

  .c2c-grid { grid-template-columns: 1fr; }
  .c2c-card { padding: 15px 16px; }
  .c2c-price { font-size: 26px; }

  /* 数据表 → 堆叠卡片（data-th 作为行内标签） */
  .table-card { overflow: hidden; }
  .tbl, .tbl tbody { display: block; width: 100%; }
  .tbl thead { display: none; }
  .tbl tbody tr { display: block; padding: 12px 16px 10px; border-bottom: 1px solid var(--line); }
  .tbl tbody tr:last-child { border-bottom: none; }
  .tbl tbody td {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 5px 0; text-align: right; border-bottom: none; font-size: 13px;
  }
  .tbl tbody td::before {
    content: attr(data-th); font-size: 11.5px; color: var(--dim);
    font-weight: 500; white-space: normal; text-align: left; flex-shrink: 0;
  }
  .tbl tbody td:first-child {
    padding-bottom: 9px; margin-bottom: 5px;
    border-bottom: 1px dashed rgba(120, 140, 180, .22);
  }

  /* 查 U 机器人 */
  .bot-shell { padding: 16px 14px; }
  .bot-head { gap: 11px; }
  .bot-avatar { width: 42px; height: 42px; border-radius: 13px; font-size: 21px; }
  .bot-form { grid-template-columns: 1fr 1fr; }
  .bot-form .inp:first-child, #botWatch { grid-column: 1 / -1; }
  .bot-form .inp { width: 100%; }
  .bot-grid { gap: 12px; }
  .stat-title { flex-wrap: wrap; gap: 6px; }

  /* 流水表 → 堆叠 */
  .tx-wrap { max-height: none; }
  .tx-tbl, .tx-tbl tbody { display: block; width: 100%; min-width: 0; }
  .tx-tbl thead { display: none; }
  .tx-tbl tbody tr { display: block; padding: 10px 12px; border-bottom: 1px solid rgba(120, 140, 180, .12); }
  .tx-tbl tbody td {
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    padding: 3px 0; text-align: right; white-space: nowrap;
  }
  .tx-tbl tbody td::before {
    content: attr(data-th); font-size: 11px; color: var(--dim); font-weight: 500; text-align: left;
  }
  .tx-tbl tbody td[colspan] { display: block; }
  .tx-tbl tbody td[colspan]::before { content: none; }

  [dir="rtl"] .tbl tbody td, [dir="rtl"] .tx-tbl tbody td { flex-direction: row-reverse; }
  [dir="rtl"] .tbl tbody td::before, [dir="rtl"] .tx-tbl tbody td::before { text-align: right; }

  /* 弹窗限高可滚动 */
  .modal { padding: 16px; max-height: 86vh; max-height: calc(100dvh - 40px); overflow-y: auto; }
  .modal-grid { grid-template-columns: 1fr; }

  /* 输入类控件放大到 16px，避免 iOS 聚焦时自动缩放页面 */
  .inp, .modal-grid input, .lang-sel { font-size: 16px; }
  #toasts { bottom: calc(20px + env(safe-area-inset-bottom, 0px)); width: max-content; max-width: 88vw; }
}

/* ---- 小屏手机 ---- */
@media (max-width: 430px) {
  .brand-txt h1 { font-size: 14px; }
  .lang-sel { padding: 5px 6px; }
  .pill { font-size: 10.5px; }
  .xau-px { font-size: 30px; }
  .ucard .u-px { font-size: 19px; }
  .btn { padding: 10px 14px; }
  .btn.sm { padding: 6px 11px; }
}
