/* ================================================================
   BSC 链上工具台 · 用户端样式
   深色底 + BSC 金色。所有色值集中在 :root，后台可改品牌色。
   ================================================================ */
:root {
  --bg: #0a0d10;
  --bg-soft: #10151b;
  --panel: #141a20;
  --panel-2: #1a222b;
  --line: #26313d;
  --line-soft: #1e2833;
  --gold: #f0b90b;
  --gold-deep: #c99a08;
  --text: #e8eff5;
  --muted: #8695a4;
  --muted-2: #5f6d7b;
  --ok: #2ebd85;
  --err: #f6465d;
  --warn: #ff9f43;
  --radius: 14px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: radial-gradient(1100px 520px at 50% -180px, #17202a 0%, var(--bg) 62%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 24px 16px 90px; }

/* ---------- 顶部 ---------- */
header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo {
  width: 44px; height: 44px; border-radius: 13px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold), #8f6d05);
  display: grid; place-items: center;
  font-weight: 800; font-size: 17px; color: #0a0d10;
  box-shadow: 0 6px 18px rgba(240,185,11,.18);
}
.brand h1 { font-size: 20px; font-weight: 750; letter-spacing: .3px; }
.brand p { font-size: 12.5px; color: var(--muted); }

.top-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.badge {
  font-size: 12px; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); background: var(--panel);
  white-space: nowrap;
}
.badge.ok { color: var(--ok); border-color: rgba(46,189,133,.4); background: rgba(46,189,133,.08); }
.badge.err { color: var(--err); border-color: rgba(246,70,93,.4); background: rgba(246,70,93,.08); }

/* ---------- 按钮 ---------- */
.btn {
  border: none; border-radius: 10px; cursor: pointer; font-size: 14px; font-weight: 650;
  padding: 11px 18px; transition: .16s; font-family: inherit; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--gold); color: #0a0d10; }
.btn-primary:hover:not(:disabled) { background: #ffd23f; }
.btn-ghost { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover:not(:disabled) { border-color: var(--gold-deep); }
.btn-danger { background: rgba(246,70,93,.12); color: #ff7a8a; border: 1px solid rgba(246,70,93,.35); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; }

/* ---------- 公告 ---------- */
.announce {
  background: linear-gradient(90deg, rgba(240,185,11,.10), rgba(240,185,11,.03));
  border: 1px solid rgba(240,185,11,.22);
  border-radius: 12px; padding: 11px 16px; font-size: 13px;
  color: #e8d9a8; margin-bottom: 16px;
  display: flex; gap: 10px; align-items: flex-start;
}
.announce .ico { flex-shrink: 0; }

/* ---------- 广告位 ---------- */
.ad-zone { margin-bottom: 18px; }
.ad-pinned { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.ad-ticker {
  overflow: hidden; white-space: nowrap; border-radius: 12px;
  border: 1px solid var(--line); background: var(--panel);
  padding: 10px 0; position: relative;
}
.ad-ticker-track {
  display: inline-flex; gap: 44px; padding-left: 20px;
  animation: ticker 26s linear infinite; will-change: transform;
}
@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ad-item {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text); cursor: pointer;
}
.ad-item:hover { color: var(--gold); }
.ad-tag {
  font-size: 10.5px; padding: 2px 7px; border-radius: 5px;
  background: rgba(240,185,11,.16); color: var(--gold); font-weight: 700;
}
.ad-tag.pin { background: rgba(246,70,93,.16); color: #ff8896; }
.ad-pinned-item {
  border: 1px solid rgba(240,185,11,.3);
  background: linear-gradient(90deg, rgba(240,185,11,.09), rgba(240,185,11,.02));
  border-radius: 12px; padding: 12px 16px; cursor: pointer;
  display: flex; align-items: center; gap: 10px; font-size: 13.5px;
}
.ad-pinned-item:hover { border-color: var(--gold-deep); }
.ad-empty { font-size: 12.5px; color: var(--muted-2); padding: 8px 0; }

/* ---------- 功能导航 ---------- */
.nav {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px;
}
.nav-item {
  padding: 10px 16px; border-radius: 10px; font-size: 13.5px; font-weight: 650;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
  cursor: pointer; transition: .16s; display: flex; align-items: center; gap: 7px;
}
.nav-item:hover { color: var(--text); border-color: #354454; }
.nav-item.active {
  background: rgba(240,185,11,.1); color: var(--gold);
  border-color: rgba(240,185,11,.42);
}

/* ---------- 面板 ---------- */
.card {
  background: linear-gradient(180deg, var(--panel) 0%, #0e1318 100%);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; margin-bottom: 16px;
}
.card h2 {
  font-size: 15.5px; font-weight: 720; margin-bottom: 6px;
  display: flex; align-items: center; gap: 8px;
}
.card h2 .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.sub { font-size: 12.5px; color: var(--muted); margin-bottom: 18px; }

/* ---------- 表单 ---------- */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
label { font-size: 12.5px; color: var(--muted); font-weight: 620; }
.req { color: var(--err); }
input, select, textarea {
  background: #0b1015; border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 13px; color: var(--text); font-size: 13.5px;
  font-family: inherit; outline: none; transition: .16s; width: 100%;
}
textarea { resize: vertical; min-height: 84px; line-height: 1.6; }
input:focus, select:focus, textarea:focus {
  border-color: var(--gold-deep); box-shadow: 0 0 0 3px rgba(240,185,11,.07);
}
input::placeholder, textarea::placeholder { color: #4d5a67; }
.hint { font-size: 11.5px; color: var(--muted-2); }
.err-text { font-size: 12.5px; color: var(--err); margin-top: 8px; min-height: 16px; }

.row { display: flex; gap: 10px; align-items: flex-end; }
.row .field { flex: 1; }

/* ---------- 列表项 ---------- */
.item {
  display: flex; gap: 12px; align-items: center; padding: 13px 14px;
  border: 1px solid var(--line-soft); border-radius: 11px;
  background: var(--panel-2); margin-bottom: 9px; flex-wrap: wrap;
}
.item:hover { border-color: #354454; }
.item-main { flex: 1; min-width: 140px; }
.item-title { font-size: 13.5px; font-weight: 680; }
.item-meta { font-size: 11.5px; color: var(--muted-2); font-family: ui-monospace, monospace; }
.tag {
  font-size: 10.5px; padding: 2.5px 8px; border-radius: 5px; font-weight: 700;
  background: rgba(240,185,11,.13); color: var(--gold);
}
.tag.ok { background: rgba(46,189,133,.13); color: var(--ok); }
.tag.err { background: rgba(246,70,93,.13); color: #ff8896; }
.empty { text-align: center; color: var(--muted-2); font-size: 13px; padding: 28px 0; }

/* ---------- 代码块 ---------- */
.code-box {
  background: #080c10; border: 1px solid var(--line-soft); border-radius: 10px;
  padding: 14px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px; line-height: 1.7; color: #b9c6d2;
  max-height: 340px; overflow: auto; white-space: pre;
}

/* ---------- 提示条 ---------- */
.tip {
  border-radius: 10px; padding: 11px 14px; font-size: 12.5px; margin-bottom: 14px;
  background: rgba(240,185,11,.07); border: 1px solid rgba(240,185,11,.2); color: #e6d7a8;
}
.tip.err { background: rgba(246,70,93,.07); border-color: rgba(246,70,93,.25); color: #ff9aa6; }
.tip.ok { background: rgba(46,189,133,.07); border-color: rgba(46,189,133,.25); color: #8fe0c0; }

/* ---------- 进度 / Toast / 遮罩 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(18px);
  background: #1b232c; border: 1px solid var(--line); color: var(--text);
  padding: 12px 20px; border-radius: 11px; font-size: 13px; opacity: 0;
  transition: .24s; pointer-events: none; max-width: 90vw; z-index: 999;
  box-shadow: 0 10px 34px rgba(0,0,0,.55);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { border-color: rgba(246,70,93,.55); color: #ff9aa6; }
.toast.ok { border-color: rgba(46,189,133,.55); color: #8fe0c0; }

.overlay {
  position: fixed; inset: 0; background: rgba(4,7,10,.78); backdrop-filter: blur(3px);
  display: none; place-items: center; z-index: 900; padding: 20px;
}
.overlay.show { display: grid; }
.spinner-box { text-align: center; max-width: 420px; }
.spinner {
  width: 44px; height: 44px; margin: 0 auto 16px; border-radius: 50%;
  border: 3px solid rgba(240,185,11,.15); border-top-color: var(--gold);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spinner-box h3 { font-size: 15px; margin-bottom: 6px; }
.spinner-box p { font-size: 12.5px; color: var(--muted); word-break: break-all; }

/* ---------- 靓号 ---------- */
.vanity-out {
  border: 1px dashed rgba(240,185,11,.35); background: rgba(240,185,11,.05);
  border-radius: 12px; padding: 16px; margin-top: 14px;
}
.vanity-row { display: flex; gap: 8px; align-items: center; margin-bottom: 9px; flex-wrap: wrap; }
.vanity-key {
  font-family: ui-monospace, monospace; font-size: 12px; word-break: break-all;
  color: #ffd76a; background: #0a0f14; padding: 8px 10px; border-radius: 8px;
  border: 1px solid var(--line-soft); flex: 1; min-width: 200px;
}
.danger-note {
  font-size: 12px; color: #ff9aa6; background: rgba(246,70,93,.07);
  border: 1px solid rgba(246,70,93,.22); border-radius: 10px;
  padding: 10px 13px; margin-bottom: 14px; line-height: 1.65;
}

/* ---------- 统计小卡 ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat {
  background: var(--panel-2); border: 1px solid var(--line-soft);
  border-radius: 11px; padding: 12px 14px;
}
.stat-k { font-size: 11.5px; color: var(--muted-2); margin-bottom: 3px; }
.stat-v { font-size: 16px; font-weight: 720; color: var(--gold); }

/* ---------- 空投预览表 ---------- */
.airdrop-preview {
  max-height: 280px; overflow: auto; border: 1px solid var(--line-soft);
  border-radius: 10px; margin-top: 12px; font-size: 12px;
}
.airdrop-row {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 7px 12px; border-bottom: 1px solid var(--line-soft);
  font-family: ui-monospace, monospace;
}
.airdrop-row:last-child { border-bottom: none; }
.airdrop-row.bad { color: #ff8896; }

@media (max-width: 760px) {
  .grid { grid-template-columns: 1fr; }
  header { flex-direction: column; align-items: flex-start; }
  .top-right { width: 100%; }
  .wrap { padding: 18px 12px 80px; }
}

/* ---------- 语言切换 ---------- */
.lang-select {
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 9px;
  padding: 8px 10px; font-size: 12.5px; cursor: pointer;
  margin-right: 10px;
}
.lang-select:hover { border-color: var(--gold-deep); }
.lang-select option { background: #0f151c; color: #e6ebf1; }
html[data-lang="ar"] { unicode-bidi: plaintext; }
/* 阿拉伯语：文字右对齐 + 内部从右向左，但布局顺序不镜像 */
html[data-lang="ar"] .stage,
html[data-lang="ar"] .card,
html[data-lang="ar"] .sub,
html[data-lang="ar"] .item,
html[data-lang="ar"] .field,
html[data-lang="ar"] label,
html[data-lang="ar"] p,
html[data-lang="ar"] .item-title,
html[data-lang="ar"] .item-meta,
html[data-lang="ar"] .stat-k,
html[data-lang="ar"] .stat-v { text-align: right; }
html[data-lang="ar"] input,
html[data-lang="ar"] textarea,
html[data-lang="ar"] select { direction: rtl; text-align: right; }
html[data-lang="ar"] .mono,
html[data-lang="ar"] code,
html[data-lang="ar"] .addr,
html[data-lang="ar"] input[type="text"] { unicode-bidi: plaintext; }
