/* ==========================================================================
   aitopups · BEpusdt 收银台美化（nginx 注入 · 同时支持 official 与 langge）
   不改源码、不编译、不影响升级。

   official 模板：用 --color-* 变量 + .brand-logo / .brand-name / .card-footer
   langge   模板：用 --green 等变量 + .brand-symbol / .brand-mark / .checkout-footer
   两套的变量名不冲突，可以放在同一个文件里。
   ========================================================================== */

/* ==========================================================================
   第一块：official 模板
   ========================================================================== */
:root {
  --color-bg: #eef2f8;
  --color-card: #ffffff;
  --color-border: #e3e8f0;
  --color-text-primary: #0f172a;
  --color-text-secondary: #5b6472;
  --color-text-muted: #9aa3b2;
  --color-accent: #0071e3;          /* 官方默认是绿 #00b26a */
  --color-danger: #e5484d;
  --color-btn: #0071e3;             /* 官方默认是黑 #0d0d0d */
  --color-btn-hover: #0062c4;
  --radius-card: 18px;
  --radius-input: 12px;
  --radius-btn: 12px;
  --shadow-card: 0 8px 40px rgba(15, 23, 42, .10);
}

/* 背景渐变：用 :has() 限定，只在收银台页生效，不影响 BEpusdt 首页 */
body:has(.checkout-card) {
  background: radial-gradient(1200px 600px at 50% -10%, #ffffff 0%, #eef2f8 55%, #e6ecf5 100%) !important;
  background-attachment: fixed !important;
}

/* 隐藏官方模板的页脚（Powered by BEpusdt） */
.card-footer,
.modal-footer {
  display: none !important;
}

/* 品牌区：svg 图标 → ATU 文字标 */
.brand-logo svg { display: none !important; }
.brand-logo {
  width: 40px !important;
  height: 40px !important;
  border-radius: 11px !important;
  background: linear-gradient(135deg, #0a84ff 0%, #0071e3 100%) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 6px 18px rgba(0, 113, 227, .28) !important;
  position: relative;
}
.brand-logo::after {
  content: "ATU";
  font: 800 13px/1 "Inter", "Segoe UI", Arial, sans-serif;
  color: #fff;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* 站名：BEpusdt → aitopups */
.brand-name { font-size: 0 !important; }
.brand-name::after {
  content: "aitopups" !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
}

/* official 的金额 / 网络 / 地址 / 按钮 */
.amount-fiat { font-weight: 800 !important; letter-spacing: -.02em; }
.amount-crypto-value { color: var(--color-accent) !important; font-weight: 800 !important; }
.network-tag {
  border-radius: 999px !important;
  padding: 5px 14px !important;
  font-weight: 600 !important;
  background: rgba(0, 113, 227, .10) !important;
  color: #0071e3 !important;
  border: 1px solid rgba(0, 113, 227, .22) !important;
}
.timer-badge { border-radius: 999px !important; border-color: rgba(0, 113, 227, .30) !important; }
.timer-text { color: #0071e3 !important; font-weight: 800 !important; }
.timer-ring-bar { stroke: #0071e3 !important; }
.address-card {
  border-radius: 14px !important;
  border-style: dashed !important;
  border-color: #d4dce8 !important;
  background: #fbfcfe !important;
}
.address-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
  font-size: 13px !important;
  word-break: break-all;
  color: #0f172a !important;
}
.copy-trigger {
  border-radius: 999px !important;
  padding: 6px 12px !important;
  background: rgba(0, 113, 227, .10) !important;
  color: #0071e3 !important;
  border: 1px solid rgba(0, 113, 227, .22) !important;
  height: auto !important;
  width: auto !important;
}
#payBtn, .return-btn {
  background: linear-gradient(135deg, #0a84ff 0%, #0071e3 100%) !important;
  border: none !important;
  box-shadow: 0 8px 22px rgba(0, 113, 227, .28) !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
}
#payBtn:hover { filter: brightness(1.05); transform: translateY(-1px); }

/* ==========================================================================
   第二块：langge 模板
   ========================================================================== */
:root {
  --bg-start: #fbfcfe;
  --bg-end: #e9eff7;
  --bg: #f3f6fb;
  --panel: #ffffff;
  --line: #e2e8f2;
  --text: #0f172a;
  --muted: #5b6472;
  --soft: #eef3fa;
  --control: #ffffff;
  --code-bg: #f7f9fc;
  --code-text: #1e3a5f;
  --brand-bg: #0071e3;              /* 原墨绿 #13221f */
  --brand-text: #ffffff;
  --qr-bg: #ffffff;
  --active-bg: #eaf3ff;
  --active-line: #a6c8ee;
  --panel-tint: #f6faff;
  --green: #0071e3;                 /* 原绿 #16876a */
  --green-strong: #0062c4;
  --blue: #3b82f6;
  --amber: #b45309;
  --led-ring: rgba(0, 113, 227, .18);
  --blue-led-ring: rgba(59, 130, 246, .18);
  --shadow: 0 18px 45px rgba(15, 23, 42, .10);
}
:root[data-theme="dark"] {
  --green: #3b9dff;
  --green-strong: #62b4ff;
  --brand-bg: #0a84ff;
  --brand-text: #ffffff;
  --active-bg: #10243d;
  --active-line: #2f5c8f;
  --blue-led-ring: rgba(59, 157, 255, .22);
  --led-ring: rgba(59, 157, 255, .22);
}

/* 隐藏 langge 的页脚（Powered by BEpusdt · LangGe design） */
.checkout-footer { display: none !important; }

/* langge 品牌区 */
.brand-symbol { font-size: 0 !important; position: relative; }
.brand-symbol::after {
  content: "ATU";
  font: 800 13px/1 "Inter", "Segoe UI", Arial, sans-serif;
  color: var(--brand-text);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-mark strong { font-size: 0 !important; }
.brand-mark strong::after {
  content: "aitopups";
  font-size: 17px !important;
  font-weight: 800 !important;
  color: var(--text);
}
.brand-mark span[data-i18n="brand.subtitle"] { font-size: 0 !important; }
.brand-mark span[data-i18n="brand.subtitle"]::after {
  content: "Secure crypto checkout";
  font-size: 12px !important;
  color: var(--muted);
}

/* langge 按钮 */
#continueButton,
#copyAddressButton.copy-button,
.button.primary {
  background: linear-gradient(135deg, #0a84ff 0%, #0071e3 100%) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 8px 22px rgba(0, 113, 227, .26) !important;
  font-weight: 700 !important;
}
#continueButton:hover, .button.primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
#copyAddressButton.copy-button { box-shadow: 0 6px 16px rgba(0, 113, 227, .22) !important; }
.address-box code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
  word-break: break-all;
}

/* ==========================================================================
   第三块：两套模板共用 —— 【新增】红色警告框（官方模板都没有）
   文案由 JS 按当前网络动态生成
   ========================================================================== */
.atu-warn {
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff6f6 0%, #fff0f0 100%);
  border: 1px solid #ffd7d7;
  border-left: 4px solid #e5484d;
}
/* official 的容器有左右 24px 内边距，这里补上外边距 */
#paymentStage .atu-warn { margin: 4px 24px 8px; }
/* langge 的容器自己带内边距，不需要额外外边距 */
.transfer-console .atu-warn { margin: 0 0 16px; }

:root[data-theme="dark"] .atu-warn {
  background: linear-gradient(180deg, #2a1719 0%, #241416 100%);
  border-color: #5c2b2f;
  border-left-color: #ff6b6f;
}

.atu-warn-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 800;
  color: #c92a2a;
  margin-bottom: 9px;
}
:root[data-theme="dark"] .atu-warn-title { color: #ff8b8f; }
.atu-warn-title svg { width: 15px; height: 15px; flex: none; }

.atu-warn-body { font-size: 12.5px; line-height: 1.8; color: #8a2c2c; }
:root[data-theme="dark"] .atu-warn-body { color: #e0a3a5; }
.atu-warn-body b { color: #c92a2a; font-weight: 700; }
:root[data-theme="dark"] .atu-warn-body b { color: #ff9a9d; }
.atu-warn-body .atu-sep { height: 7px; }

/* ==========================================================================
   第四块：两套模板共用 —— 【新增】支付步骤
   （langge 自带 .instruction-grid，所以只在 official 上插入 .atu-steps）
   ========================================================================== */
.atu-steps {
  margin: 14px 0 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f7f9fc;
  border: 1px solid #e6ecf5;
}
.atu-steps-title { font-size: 13px; font-weight: 800; color: #0f172a; margin-bottom: 10px; }
.atu-steps ol { margin: 0; padding: 0; list-style: none; counter-reset: atu; }
.atu-steps li {
  counter-increment: atu;
  position: relative;
  padding-left: 26px;
  font-size: 12.5px;
  line-height: 1.9;
  color: #4a5464;
}
.atu-steps li::before {
  content: counter(atu);
  position: absolute;
  left: 0; top: 4px;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: rgba(0, 113, 227, .12);
  color: #0071e3;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ==========================================================================
   第五块：窄屏
   ========================================================================== */
@media (max-width: 480px) {
  .atu-warn { padding: 12px 13px; }
  .atu-warn-body { font-size: 12px; }
  #paymentStage .atu-warn { margin-left: 16px; margin-right: 16px; }
}
