* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #eef1f5;
}

/* ✅ 只限制前台宽度：锁在 .app，不要动到后台的 .container */
body.front-page .bottom-nav{
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;

  width: 420px;           /* ✅ 跟 .app 一样宽 */
  max-width: 100%;
  z-index: 999;
}


/* ===== 上方 ===== */
.top-bar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 20px;
  background:#1f2633;
  color:white;
  font-weight:bold;
  position:relative;
}
.top-bar .dropdown{
  position:absolute;
  top:100%;
  right:20px;
  background:#fff;
  color:#000;
  border:1px solid #ccc;
  border-radius:6px;
  overflow:hidden;
}
.top-bar .dropdown.hidden{display:none;}
.top-bar .dropdown div{
  padding:10px;
  cursor:pointer;
}
.top-bar .dropdown div:hover{background:#f0f0f0;}

/* ===== 大按钮 ===== */
.big-buttons{
  display:flex;
  gap:20px;
  padding:20px;
}
.big-buttons button{
  flex:1;
  padding:18px;
  font-size:18px;
  border:none;
  border-radius:10px;
  color:white;
  cursor:pointer;
  box-shadow:0 4px 10px rgba(0,0,0,0.1);
}
.green{background:linear-gradient(45deg,#16c784,#0fa968);}
.red{background:linear-gradient(45deg,#ea3943,#c42f38);}

/* ===== 功能格 ===== */
.menu-grid{
  display:grid;
  grid-template-columns: repeat(3,1fr);
  gap:12px;
  padding:0 20px 20px;
}
.menu-grid button{
  padding:14px;
  border-radius:8px;
  border:1px solid #ddd;
  background:white;
  cursor:pointer;
}

/* ===== 公告 ===== */
.notice-banner{
  background:#ffb020;
  padding:12px;
  text-align:center;
  margin:10px 20px;
  border-radius:6px;
}

/* ===== 走勢圖 ===== */
.chart{
  min-height:180px;
  height:auto;
  background:#e5e9f0;
  margin:20px;
  border-radius:8px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#666;

  overflow:hidden;
  position:relative;
}


/* ===== 底部导航 ===== */
.bottom-nav{
  position:fixed;
  bottom:0;
  width:100%;
  display:flex;
  background:linear-gradient(180deg, #081427 0%, #050d1d 100%);
  border-top:1px solid rgba(255,255,255,.06);
  box-shadow:0 -6px 20px rgba(0,0,0,.28);
}
.bottom-nav button{
  flex:1;
  padding:14px;
  border:none;
  background:none;
  color:white;
  cursor:pointer;
}

/* ===== 交易页按钮 ===== */
.trade-buttons{
  display:flex;
  gap:10px;
  padding:10px;
}
.trade-buttons button{
  flex:1;
  padding:14px;
  font-size:18px;
  border:none;
  border-radius:10px;
}
.trade-green { background:#00c853; }
.trade-red { background:#d50000; }


/* ===== 金额输入框 ===== */
#amountInput {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #cccccc;
  background: #ffffff;
  color: #000000;
  font-size: 16px;
  margin-bottom: 12px;
  outline: none;
}

.money-input{
  width:100%;
  padding:12px;
  border-radius:8px;
  border:1px solid #cccccc;
  background:#ffffff;
  color:#000000;
  margin-bottom:10px;
  box-sizing:border-box;
}

.money-input:focus{border-color:#00c853;}

/* ===== 快速金额 & 秒数按钮 ===== */
.quick-money{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:10px;
}
.quick-money button,
.time-grid button{
  height:42px;
  border-radius:8px;
  border:1px solid #cccccc;
  background:#ffffff;
  color:#000000;
  cursor:pointer;
}
.time-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:10px;
}

/* 点击选中样式 */
.time-grid button.active,
.quick-money button:active{
  background:#00c853;
  color:#000000;
}

/* ===== 下单确认按钮 ===== */
.confirm{
  width:100%;
  padding:12px;
  background:#16c784;
  color:white;
  border:none;
  border-radius:6px;
  margin-top:15px;
}

/* ===== 余额显示 ===== */
.balance{
  margin-top:10px;
  color:#aaa;
  font-size:14px;
}

/* ===== 订单卡片 ===== */
.order-card{
  background: rgba(2,6,23,.35);
  color: #e5e7eb;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.22);
  box-shadow: 0 10px 24px rgba(0,0,0,0.25);
  margin-top: 10px;
  font-size: 13px;
}
.order-card .muted{ color: rgba(226,232,240,.75); }

/* ===== 圆圈倒计时 ===== */
.circle{
  width:80px;
  height:80px;
  border:5px solid #4cafef;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:24px;
  margin:10px auto;
}

/* ===== 模态框 ===== */
.modal{
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);

  display: none;              /* 🔥 改這裡 */
  align-items: flex-end;
  justify-content: center;
}

.modal.show{
  display: flex;              /* 🔥 新增這段 */
}


.modal-box{
  position: relative;
  width: min(520px, calc(100vw - 32px));
  max-height: 90vh;
  overflow: auto;
  background: #0b1220;
  color: rgba(255,255,255,.92);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 18px 60px rgba(0,0,0,.55);
}


@keyframes slideUp{
  from{transform: translateY(100%);}
  to{transform: translateY(0);}
}

/* ===== 结果弹窗 ===== */
.result-box{
  background:#fff;
  color:#000;
  padding:20px;
  border-radius:12px;
  box-shadow:0 4px 12px rgba(0,0,0,0.15);
  width:260px;
  margin:auto;
  text-align:center;
}
#resultBox h3{
  color:#000;
  font-weight:bold;
  font-size:20px;
  text-align:center;
  margin-bottom:10px;
}

/* ===== 行情表格 ===== */
.market-table{
  background:#111;
  border-radius:12px;
  overflow:hidden;
  width:100%;
  box-shadow:0 0 10px rgba(0,0,0,0.3);
}
.table-row{
  display:grid;
  grid-template-columns:2fr 1fr 1fr;
  padding:14px 16px;
  border-bottom:1px solid #222;
  color:#e6e6e6;
  font-size:15px;
}
.table-row.head{
  background:#1b1b1b;
  font-weight:bold;
  color:#fff;
  font-size:16px;
}
.table-row:hover{background:#1f1f1f;}
.up{color:#00c087;font-weight:bold;}
.down{color:#ff4d4f;font-weight:bold;}

/* ===== 币种列表 ===== */
.market-list{
  background:#111;
  border-radius:12px;
  padding:10px;
}
.coin-row{
  display:grid;
  grid-template-columns:2fr 1fr 1fr;
  padding:12px 10px;
  border-bottom:1px solid #222;
  color:#f0f0f0;
  font-size:14px;
}
.coin-row span{color:#e8e8e8;}

/* ===== 交易页顶部 & Tabs ===== */
.trade-top{
  display:flex;
  align-items:center;
  padding:10px;
  font-size:18px;
}
.menu-btn{font-size:22px;margin-right:10px;}
.trade-tabs{
  display:flex;
  justify-content:space-around;
  margin:12px 14px 28px; gap:10px;
}
.trade-tabs button{
  padding:8px 12px;
  border:none;
  background:#222;
  color:#fff;
  border-radius:8px;
}
.trade-tabs .active{background:#00c853;}

/* ===== 廣告輪播區 ===== */
.ad-banner {
  width: calc(100% - 40px);
  height: 160px;              /* ✅ 固定高度，避免撑爆 */
  margin: 10px 20px;
  overflow: hidden;
  border-radius: 12px;
  position: relative;
  background: #000;
}

.slider {
  display: flex;
  width: 400%;                /* 4 张图就是 400% */
  height: 100%;
  transition: transform 0.6s ease;
}

.slider img {
  width: 25%;                 /* 4 张图每张占 25% */
  height: 100%;
  object-fit: cover;          /* 想完整显示用 contain */
  display: block;
}

.finish-wrap{
  display:flex;
  justify-content:center;
  margin-top:12px;
}


#finishBtn{
  padding:10px 30px;
  border:none;
  background:#333;
  color:#fff;
  border-radius:8px;
  cursor:pointer;
}

.modal.hidden{
  display: none;
}
/* 讓所有 hidden 都能隱藏（不只 modal） */
.hidden{
  display: none !important;
}

/* ✅ 訂單中心狀態標籤 */
.pill{display:inline-block;padding:4px 10px;border-radius:999px;font-size:12px;font-weight:800;border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.06)}
.pill.ok{border-color:rgba(34,197,94,.35);background:rgba(34,197,94,.16)}
.pill.bad{border-color:rgba(239,68,68,.35);background:rgba(239,68,68,.16)}
.pill.pending{border-color:rgba(59,130,246,.35);background:rgba(59,130,246,.16)}

/* modal 顯示時的排版 */
.modal{
  display: none;              /* 預設不顯示 */
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  align-items: flex-end;
  justify-content: center;
}

/* 只要沒 hidden，就顯示 */
.modal:not(.hidden){
  display: flex;
}
.modal-box{
  position: relative; /* 讓右上角定位以 modal-box 為基準 */
}

.modal-close{
  position: absolute;
  top: 12px;
  right: 12px;
  cursor: pointer;
  font-size: 20px;
  line-height: 20px;
  color: rgba(255,255,255,.92);
}

.time-grid button{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.time-grid button small{
  font-size: 12px;
  opacity: 0.75;
}
/* modal 置中（結果水單也在正中） */
.modal{
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.45);
  z-index: 999;
}

/* 下注單容器：更像平台卡片 */
.modal-box{
  position: relative;
  width: 92%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans TC", Arial, sans-serif;
}

/* 水單大字更正常 */
.result-amount{
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.1;
}

.result-sub{
  margin-top: 6px;
  font-size: 14px;
  opacity: .7;
}

/* 資訊卡 */
.order-card{
  margin-top: 12px;
  background: #f6f7f9;
  border-radius: 12px;
  padding: 12px;
  color: #111;
  font-size: 14px;
  line-height: 1.55;
}

.finish-wrap{
  margin-top: 12px;
  display: flex;
  justify-content: center;
}

.finish-wrap button{
  min-width: 120px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: #111;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}
.toast.success{
  background: #111;   /* 黑色提示，比綠色更像平台 */
}
.min-tip{
  margin: 10px 0 6px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f6f7f9;
  color: #111;
  font-size: 13px;
}

.hidden{ display:none !important; }
/* ✅ 週期按鈕：4格排列（放在 style.css 最底部） */
.modal .time-grid{
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 10px !important;
  margin-top: 8px !important;
}

.modal .time-grid button{
  height: 64px !important;
  border-radius: 12px !important;
  border: 1px solid #e5e7eb !important;
  background: #fff !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
}

.modal .time-grid button small{
  font-size: 12px !important;
  opacity: .75 !important;
}

.modal .time-grid button.active{
  background: #16a34a !important;
  color: #fff !important;
  border-color: #16a34a !important;
}

.modal .time-grid button.active small{
  opacity: .95 !important;
}
#orderModal .modal-box{
  position: relative;
}

#orderModal .toast{
  position: absolute;
  left: 50%;
  top: 12px;
  transform: translateX(-50%) translateY(-8px);
  z-index: 10;

  min-width: 240px;
  max-width: calc(100% - 24px);

  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;

  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  text-align: center;

  background: #111;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
}

#orderModal .toast.show{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
/* 類型 */
#orderModal .toast.error{
  background: #dc2626;
}

#orderModal .toast.success{
  background: #16a34a;
}
/* 錯誤紅框 */
.input-error{
  border: 1px solid #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220,38,38,.15) !important;
}

/* 抖一下動畫 */
@keyframes shakeX{
  0%,100%{ transform: translateX(0); }
  20%{ transform: translateX(-6px); }
  40%{ transform: translateX(6px); }
  60%{ transform: translateX(-4px); }
  80%{ transform: translateX(4px); }
}
.shake{
  animation: shakeX .25s ease;
}
/* ===== 會員中心排版（UI 美化） ===== */
.user-wrap{
  max-width: 980px;
  margin: 18px auto;
  padding: 0 16px;
}

.user-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.card{
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:14px;
  box-shadow:0 10px 28px rgba(0,0,0,.06);
  padding: 16px;
}

.card-title{
  font-size:16px;
  font-weight:900;
  margin-bottom: 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.badge{
  font-size:12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight:800;
}
.badge.ok{ background:#e7f7ee; color:#15803d; }
.badge.warn{ background:#fff7ed; color:#c2410c; }

.form-row{
  display:flex;
  flex-direction:column;
  gap: 8px;
  margin-bottom: 10px;
}

.input{
  width:100%;
  height: 42px;
  border-radius: 10px;
  border:1px solid rgba(0,0,0,.14);
  padding: 0 12px;
  outline: none;
  font-size: 14px;
color: rgba(255,255,255,.92);
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.12);
  }
.input:focus{
  border-color:#2563eb;
  box-shadow:0 0 0 3px rgba(37,99,235,.12);
}

.btn-row{
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
}

.btn{
  height: 40px;
  border-radius: 10px;
  border:1px solid rgba(0,0,0,.12);
  padding: 0 14px;
  cursor:pointer;
  font-weight:900;
  background:#fff;
}

.btn.primary{
  background:#16a34a;
  color:#fff;
  border:none;
}
.btn.gray{
  background:#0f172a;
  color:#fff;
  border:none;
}

.wallet-box{
  display:flex;
  flex-direction:column;
  gap: 8px;
  font-size: 14px;
  line-height: 1.6;
}

.wallet-line{
  display:flex;
  justify-content:space-between;
  border-bottom:1px dashed rgba(0,0,0,.12);
  padding: 6px 0;
}

.hint{
  margin-top: 10px;
  font-size: 13px;
  color: rgba(0,0,0,.65);
}

@media(min-width: 860px){
  .user-grid{
    grid-template-columns: 1fr 1fr;
  }
}
/* ✅ 解决 input 超出卡片边框 */
* { box-sizing: border-box; }

.user-card input,
.login-card input,
.card input,
input[type="text"],
input[type="password"],
input[type="email"]{
  width: 100%;
  max-width: 100%;
  display: block;
}
.top-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 16px;
  background: linear-gradient(135deg,#0f172a,#1e293b);
  color:white;
}

.logo-box{
  display:flex;
  align-items:center;
  gap:8px;
}

.logo-icon{
  width:32px;
  height:32px;
  border-radius:8px;
  background:#00c853;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  color:black;
}

.logo-text{
  font-weight:700;
  font-size:15px;
}

.top-actions{
  display:flex;
  align-items:center;
  gap:10px;

  flex-wrap: wrap;
}

#langSelect{
  border:none;
  padding:4px 6px;
  border-radius:6px;
}

.support-btn{
  background:#00c853;
  border:none;
  padding:5px 10px;
  border-radius:8px;
  font-weight:600;
  cursor:pointer;
}
.support-wrapper{
  position:relative;
}

.support-dropdown{
  position:absolute;
  top:40px;
  right:0;
  background:#1e293b;
  border-radius:10px;
  padding:8px 0;
  display:none;
  min-width:150px;
  box-shadow:0 8px 20px rgba(0,0,0,0.3);
  z-index:999;
}

.support-dropdown a{
  display:block;
  padding:8px 14px;
  color:white;
  text-decoration:none;
  font-size:14px;
}

.support-dropdown a:hover{
  background:#00c853;
  color:black;
}
.support-wrapper{ position:relative; }
.support-dropdown{
  position:absolute; top:42px; right:0;
  background:#0b1220;
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px;
  padding:8px;
  display:none;
  min-width:170px;
  box-shadow:0 18px 40px rgba(0,0,0,.35);
  z-index:999;
}
.support-item{
  width:100%;
  display:block;
  padding:10px 12px;
  border-radius:10px;
  color:#e5e7eb;
  text-decoration:none;
  background:transparent;
  border:none;
  text-align:left;
  cursor:pointer;
  font-size:14px;
}
.support-item:hover{ background:rgba(0,200,83,.18); color:#fff; }

.msg{
  max-width:78%;
  padding:10px 12px;
  border-radius:14px;
  margin:8px 0;
  line-height:1.35;
  white-space:pre-wrap;
}
.msg.user{ margin-left:auto; background:rgba(0,200,83,.22); border:1px solid rgba(0,200,83,.25); }
.msg.agent{ margin-right:auto; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.08); }
#chatInput{
  flex:1;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:#060a12;
  color:#fff;
  padding:10px 12px;
  outline:none;
}
.func-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 14px;
}

.func-card{
  text-align:left;
  padding:12px;
  border-radius:14px;
  background:#0b1220;
  border:1px solid rgba(255,255,255,.08);
  color:#e5e7eb;
  cursor:pointer;
}
.func-card .ic{ font-size:20px; }
.func-card .t{ font-weight:800; margin-top:6px; }
.func-card .d{ opacity:.75; font-size:12px; margin-top:4px; }
.func-card:hover{ border-color: rgba(0,200,83,.35); }
.func-card{
  width: 100%;
}
/* ✅ 前台整個 App 固定手機寬 */
body.front-page .app{
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}
body.front-page{
  background: radial-gradient(1200px 600px at 50% -10%, rgba(40,130,255,.22), transparent 60%),
              linear-gradient(180deg, #0b1427 0%, #050a12 100%);
  min-height: 100vh;
}
/* ✅ 幣種切換列：不准變超大 */
.coin-switch{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:10px 14px;
}
.coin-switch button{
  width:auto !important;
  flex: 0 0 auto;
  padding:6px 10px;
  border-radius:10px;
  font-size:12px;
}
/* 五個功能區：更小更專業 */
.func-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
  padding: 0 14px;
}

.func-card{
  padding:10px 12px;
  border-radius:14px;
  min-height:74px;     /* 變矮 */
}

.func-card .ic{ font-size:18px; }
.func-card .t{ font-size:13px; font-weight:800; }
.func-card .d{ font-size:11px; opacity:.75; margin-top:2px; }
/* ===== 廣告輪播 Banner ===== */
.banner{
  width: 100%;
  height: 140px;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  margin: 14px 0;
  background:#0b1220;
}

.banner-track{
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.6s ease;
  will-change: transform;
}

.banner-track img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
}
/* 防止底部导航遮挡内容 */
#content{
  padding-bottom: 110px;
}

/* 确保底部导航高度固定 */
.bottom-nav{
  height: 70px;
}
/* =========================
   Professional Buttons System
========================= */

.deposit-btn-group{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-top:16px;
}

/* 主按钮 */
.btn-primary{
  width:100%;
  background: linear-gradient(135deg, #16a34a, #15803d);
  color:#fff;
  border:none;
  padding:12px 14px;
  border-radius:14px;
  font-weight:700;
  font-size:14px;
  cursor:pointer;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
  box-shadow:0 10px 22px rgba(22,163,74,.28);
}

.btn-primary:hover{
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow:0 14px 28px rgba(22,163,74,.34);
}

.btn-primary:active{
  transform: scale(.98);
}

/* 次按钮 */
.btn-secondary{
  width:100%;
  background:#f3f4f6;
  color:#111827;
  border:1px solid #d1d5db;
  padding:12px 14px;
  border-radius:14px;
  font-weight:700;
  font-size:14px;
  cursor:pointer;
  transition: background .18s ease, transform .18s ease;
}

.btn-secondary:hover{
  background:#e5e7eb;
  transform: translateY(-1px);
}

.btn-secondary:active{
  transform: scale(.99);
}

/* Tab 按钮（充值通道） */
.tab-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:10px 0 14px;
}

.tab-btn{
  border:1px solid #d1d5db;
  background:#fff;
  color:#111827;
  padding:7px 10px;
  font-size:12px;
  font-weight:700;
  border-radius:10px;
  cursor:pointer;
  transition: all .18s ease;
}

.tab-btn:hover{
  background:#f3f4f6;
}

.tab-btn.active{
  border-color: rgba(22,163,74,.35);
  background: rgba(22,163,74,.10);
  color:#0f5132;
}
.deposit-btn-group{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-top:16px;
}

.btn-primary{
  width:100%;
  background: linear-gradient(135deg, #16a34a, #15803d);
  color:#fff;
  border:none;
  padding:12px 14px;
  border-radius:14px;
  font-weight:700;
  font-size:14px;
  cursor:pointer;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
  box-shadow:0 10px 22px rgba(22,163,74,.28);
}
.btn-primary:hover{ transform: translateY(-1px); filter: brightness(1.03); }
.btn-primary:active{ transform: scale(.98); }

.btn-secondary{
  width:100%;
  background:#f3f4f6;
  color:#111827;
  border:1px solid #d1d5db;
  padding:12px 14px;
  border-radius:14px;
  font-weight:700;
  font-size:14px;
  cursor:pointer;
  transition: background .18s ease, transform .18s ease;
}
.btn-secondary:hover{ background:#e5e7eb; transform: translateY(-1px); }
.btn-secondary:active{ transform: scale(.99); }

.deposit-card{
  background:#ffffff;
  border-radius:22px;
  padding:18px 16px 20px;
  box-shadow:0 18px 40px rgba(0,0,0,.08);
  border:1px solid rgba(0,0,0,.05);
}

.addr-wrap{ margin-top:10px; }

.addr-label{
  text-align:center;
  font-size:13px;
  color:#6b7280;
  font-weight:700;
  margin:10px 0 8px;
  letter-spacing:.5px;
}

.addr-box{
  background:#f3f4f6;
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:12px 12px;
  cursor:pointer;
  user-select:text;
}

.addr-text{
  display:block;
  text-align:center;
  font-size:14px;
  font-weight:600;
  color:#111827;

  letter-spacing:.3px;
  word-break:break-all;
  overflow-wrap:anywhere;
  line-height:1.4;
}

.hint{
  margin-top:12px;
  background:#f8fafc;
  border:1px dashed #e5e7eb;
  padding:10px 12px;
  border-radius:14px;
  font-size:12px;
  color:#6b7280;
  line-height:1.45;
}
.qr-wrap{
  display:flex;
  justify-content:center;
  align-items:center;
  margin:18px 0 14px;
}

.qr-wrap img{
  width:200px;
  height:200px;
  border-radius:16px;
  background:#fff;
  padding:10px;
  box-shadow:0 12px 30px rgba(0,0,0,.08);
}

.auth-card{ max-width:420px; margin:14px auto; padding:18px; border-radius:16px; }
.auth-hd{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.auth-title{ font-weight:900; font-size:18px; }
.auth-sub{ margin-top:4px; color:#6b7280; font-size:12px; line-height:1.6; }
.auth-info{ margin:12px 0 10px; font-size:13px; }
.auth-form{ display:grid; gap:8px; margin-top:8px; }
.auth-label{ font-size:12px; color:#6b7280; margin-top:6px; }
.auth-btn{ width:100%; margin-top:12px; }
.auth-actions{ display:flex; justify-content:space-between; margin-top:10px; }
.auth-foot{ margin-top:10px; font-size:12px; line-height:1.6; }

.link-btn{ background:transparent; border:0; padding:0; color:#2563eb; font-weight:800; font-size:13px; cursor:pointer; }
.link-btn.danger{ color:#ef4444; }

.badge{ font-size:12px; padding:6px 10px; border-radius:999px; font-weight:800; }
.badge.gray{ background:#f3f4f6; color:#374151; }
.badge.green{ background:#dcfce7; color:#166534; }

/* 會員區：錢包摘要（專業版） */
.kv{ display:grid; gap:10px; margin-top:10px; }
.kv-row{
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 12px;
  border-radius:12px;
  background:#f9fafb;
  border:1px solid rgba(0,0,0,.06);
}
.kv-k{ color:#6b7280; font-size:12px; }
.kv-v{ font-weight:800; font-size:13px; }

/* =============================
============================= */

/* Ensure bottom nav doesn't overlap */
#content{ padding-bottom: 96px; }

/* =========================
   ✅ Dark finance theme (keep top/bottom nav styles)
   - Only override white/main surfaces
========================= */
body{ background:#0b1220; color: rgba(255,255,255,.92); }

/* =========================
   ✅ 全站「白底區塊」改為黑色金融風（不動頂部/底部）
   目標：避免文字看不見、登入輸入框看不到字
========================= */
body.front-page{
  background:#0b1220 !important;
  color:rgba(255,255,255,.92) !important;
}

/* 內容容器/卡片統一深色 */
body.front-page .app,
body.front-page #content,
body.front-page .card,
body.front-page .panel,
body.front-page .order-card,
body.front-page .market-card,
body.front-page .box,
body.front-page .section,
body.front-page .page,
body.front-page .trade-panel{
  background:#0f172a !important;
  color:rgba(255,255,255,.92) !important;
  border-color:rgba(255,255,255,.10) !important;
}

/* 表單（登入/註冊/充值/提現）字要看得見 */
body.front-page input,
body.front-page textarea,
body.front-page select{
  background:#0b1220 !important;
  color:rgba(255,255,255,.92) !important;
  border:1px solid rgba(255,255,255,.14) !important;
}
body.front-page input::placeholder,
body.front-page textarea::placeholder{
  color:rgba(255,255,255,.45) !important;
}

/* 一般文字/弱提示 */
body.front-page .muted,
body.front-page .hint,
body.front-page .sub{
  color:rgba(255,255,255,.68) !important;
}

/* 返回箭頭/小 icon 太淡：強制變亮 */
body.front-page .back,
body.front-page .back-btn,
body.front-page .backButton,
body.front-page .btn-back,
body.front-page .nav-back{
  color:rgba(255,255,255,.92) !important;
}

/* 表格表頭原本是白底：改深色，避免刺眼 */
body.front-page .tbl thead th{
  background:#111827 !important;
  color:rgba(255,255,255,.92) !important;
  border-bottom:1px solid rgba(255,255,255,.12) !important;
}

/* main content surfaces */
#content,
.page,
.container,
.panel,
.card,
.box,
.section,
.deposit-card,
.market-panel,
.list-card,
.gmodal .bd,
.ex-modal-panel,
.modal-panel,
.popup-panel,
.dialog-panel{
  background: transparent;
}

/* common white cards */
.card,
.panel,
.box,
.section,
.deposit-card,
.gmodal,
.ex-modal-panel,
.modal-panel,
.popup-panel,
.dialog-panel{
  background: rgba(15,23,42,.86) !important;
  border-color: rgba(255,255,255,.10) !important;
  color: rgba(255,255,255,.92);
}

/* tables / dividers */
.tbl th, .tbl td{ border-bottom: 1px solid rgba(255,255,255,.08) !important; }

/* form controls */
.input,
input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
input[type="tel"],
select,
textarea{
  background: rgba(0,0,0,.22) !important;
  color: rgba(255,255,255,.92) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
}
input::placeholder, textarea::placeholder{ color: rgba(255,255,255,.45) !important; }

/* keep top/bottom nav untouched */
.top-nav, .bottom-nav{ background: inherit; }

/* Member feature grid */
.feature-grid{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.feature-card{ text-align:left; border:1px solid rgba(0,0,0,.08); border-radius:14px; padding:12px; background:#fff; cursor:pointer; }
.feature-card .fc-title{ font-weight:800; }
.feature-card .fc-desc{ color:#6b7280; font-size:12px; margin-top:4px; }
.feature-card:active{ transform:scale(.99); }
.auth-card{
  width: min(420px, 92vw);
  margin: 22px auto;
  background:#fff;
  border-radius:16px;
  padding:18px;
  box-shadow:0 10px 26px rgba(0,0,0,.08);
}
.auth-card input{
  width:100%;
  height:44px;
  border:1px solid #e5e7eb;
  border-radius:10px;
  padding:0 12px;
  outline:none;
}
.auth-card button.primary{
  width:100%;
  height:46px;
  border-radius:12px;
  border:0;
  font-weight:700;
}

/* 讓客服按鈕「貼著 app 主體」而不是貼著整個螢幕右邊 */
@media (min-width: 700px){
}

/* 讓按鈕更像交易所：在底部導航上方一點 */


/* ===== Exchange-style Widget polish ===== */



/* ===== Chat widget styles moved to /css/chat-widget.css ===== */



/* =========================
   EXCHANGE PRO - Extra Modals (KYC / API) - scoped classes
   不影響其他功能區（只使用 .ex-modal 前綴）
========================= */
.ex-modal.hidden{ display:none; }
.ex-modal{ position:fixed; inset:0; z-index:99998; }
.ex-modal-backdrop{ position:absolute; inset:0; background: rgba(0,0,0,.55); backdrop-filter: blur(2px); }
.ex-modal-panel{
  position: absolute;
  left: 50%;
  top: 72px;
  transform: translateX(-50%);
  width: min(520px, calc(100vw - 24px));
  max-height: calc(100vh - 72px - 24px);
  overflow: hidden;
  border-radius: 18px;
  background: rgba(10,18,32,.98);
  color: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 20px 70px rgba(0,0,0,.55);
}
.ex-modal-hd{
  height: 52px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 0 14px;
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.ex-modal-bd{ padding: 14px; overflow:auto; max-height: calc(100vh - 72px - 52px - 24px); }
.ex-x{
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.20);
  color: rgba(255,255,255,.90);
  cursor:pointer;
}
.ex-x:hover{ background: rgba(255,255,255,.08); }

.kyc-row{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.kyc-badge{
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
}
.kyc-badge.ok{ border-color: rgba(34,197,94,.28); background: rgba(34,197,94,.12); color: rgba(255,255,255,.92); }
.kyc-badge.pending{ border-color: rgba(59,130,246,.28); background: rgba(59,130,246,.12); color: rgba(255,255,255,.92); }
.kyc-badge.bad{ border-color: rgba(239,68,68,.28); background: rgba(239,68,68,.12); color: rgba(255,255,255,.92); }

.api-item{
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
}
.api-badge{
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
}
.api-badge.ok{ border-color: rgba(34,197,94,.28); background: rgba(34,197,94,.12); }
.api-badge.bad{ border-color: rgba(239,68,68,.28); background: rgba(239,68,68,.12); }

.mono{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; word-break: break-all; }
@media (max-height: 520px){
  .ex-modal-panel{ top: 12px; max-height: calc(100vh - 24px); }
}

/* ✅ iOS 避免輸入時自動放大：input font-size >= 16px */
.inp{
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
  color: rgba(255,255,255,.92);
  outline: none;
  font-size: 16px; /* iOS 防 zoom */
  box-sizing: border-box;
}
.inp::placeholder{ color: rgba(255,255,255,.45); }


/* =========================
   ✅ iOS/手機輸入不放大（input font-size >= 16px）
========================= */
@media (max-width: 768px){
  input, select, textarea{
    font-size: 16px !important;
  }
}


/* 顶部区域：放 App 按钮，不遮挡 header */
.app-topbar{display:none !important;}

/* 专业 App 按钮（非 fixed） */
.app-btn{display:none !important;}

.app-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(95,111,255,.45);
}

.app-btn:active{
  transform: scale(.98);
}

.top-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap: nowrap;     /* ✅ 不要換行疊在一起 */
}
#langSelect{
  max-width: 92px;
}
.app-btn{
  white-space: nowrap;   /* ✅ App 不要變兩行 */
}

/* =========================
   Install banner (Exchange style)
========================= */
#installBannerHost{ width:100%; }
.install-banner{
  margin: 10px 10px 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(72,95,255,.95), rgba(140,77,255,.95));
  color: #fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  box-shadow: 0 10px 24px rgba(60,80,255,.25);
}
.install-left{ display:flex; align-items:center; gap:10px; min-width: 0; }
.install-icon{
  width:34px; height:34px; border-radius:10px;
  background: rgba(0,0,0,.25);
  display:flex; align-items:center; justify-content:center;
  font-weight:900; letter-spacing:.5px;
  flex: 0 0 auto;
}
.install-text{ min-width:0; }
.install-title{ font-weight:800; font-size:13px; line-height:1.1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.install-sub{ font-size:11px; opacity:.9; margin-top:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.install-cta{
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.95);
  color: #101828;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 800;
  font-size: 12px;
  display:flex; align-items:center; gap:6px;
  flex: 0 0 auto;
}
.install-cta-ic{ font-size: 12px; opacity: .9; }

@media (max-width:480px){
  .install-banner{ margin: 8px 10px 6px; }
  .install-title{ font-size: 12px; }
  .install-sub{ font-size: 10px; }
}


/* ✅ 安裝橫幅：關閉按鈕（避免一直擋住） */
.install-banner{ position: relative; }
.install-close{
  position:absolute;
  top:6px;
  right:8px;
  width:26px;
  height:26px;
  border:0;
  border-radius:13px;
  background: rgba(255,255,255,.22);
  color:#fff;
  font-size:18px;
  line-height:26px;
  cursor:pointer;
}
.install-close:hover{ background: rgba(255,255,255,.30); }


/* =========================
   ✅ Records Table（充值/提現紀錄）
========================= */
.table-wrap{ overflow:auto; border-radius:12px; border:1px solid rgba(0,0,0,.06); }
.tbl{ width:100%; border-collapse:collapse; font-size:12px; }
.tbl th, .tbl td{ padding:10px 10px; text-align:left; border-bottom:1px solid rgba(0,0,0,.06); white-space:nowrap; }
.tbl thead th{ background:#f8fafc; font-weight:800; color:#0f172a; position:sticky; top:0; z-index:1; }
.tbl tbody tr:hover{ background:rgba(2,6,23,.03); }

.tag{ display:inline-block; padding:4px 8px; border-radius:999px; font-size:11px; font-weight:800; }
.tag.pending{ background:rgba(251,191,36,.18); color:#92400e; }
.tag.approved{ background:rgba(34,197,94,.16); color:#166534; }
.tag.rejected{ background:rgba(239,68,68,.14); color:#991b1b; }



/* LXZ logo image */
.logo-img{width:32px;height:32px;display:block;object-fit:contain;}

.logo-icon-img{
  width:34px;
  height:34px;
  border-radius:10px;
  display:block;
  object-fit:cover;
  box-shadow:0 10px 22px rgba(0,0,0,.25);
}

/* spot/leverage demo panel (does not affect seconds-contract logic) */
.spot-panel{
  margin-top:12px;
  padding:12px;
  border-radius:14px;
  background: rgba(0,0,0,0.08);
}
.spot-panel .spot-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.spot-panel .spot-label{ font-weight:700; opacity:0.9; }
.spot-panel select{
  flex:1;
  max-width:140px;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid rgba(0,0,0,0.15);
  background: rgba(255,255,255,0.85);
}
.spot-panel .spot-actions .btn{
  flex:1;
  padding:12px 12px;
  border-radius:12px;
  border:none;
  cursor:pointer;
}


/* ===== 市场选择下拉（交易页） ===== */
.market-list-box{
  position: absolute;
  left: 12px;
  right: 12px;
  top: 64px;
  z-index: 50;
  /* ✅ 提高可讀性：原本太暗，選單文字不清楚 */
  background: rgba(255,255,255,0.97);
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.20);
  max-height: 52vh;
  overflow-y: auto;
}
.market-list-box.hidden{ display:none; }

.market-item{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 12px 12px;
  color:#111;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  cursor: pointer;
}
.market-item:last-child{ border-bottom:none; }
.market-item:hover{ background: rgba(0,0,0,0.04); }
.market-item.active{ background: rgba(0,0,0,0.06); }

.table-row .down, .coin-row .down{ color:#ff6b6b; }

/* ✅ 交易頁 Tabs 與 K 線間距（避免貼太近） */
.trade-tabs + .chart{ margin-top: 14px; }


/* ===== 下單表單 select 防止文字被切掉 ===== */
.order-form select, .order-row select{ min-width: 160px; }


/* =========================
   ✅ Coin icons + Earn UI
========================= */
.coin-ic{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  color:#fff;
  font-weight:900;
  flex: 0 0 auto;
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
}

.earn-asset-tabs{
  display:flex;
  gap:8px;
  overflow:auto;
  padding: 4px 2px;
  -webkit-overflow-scrolling: touch;
}
.earn-asset-btn{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 8px 10px;
  border-radius:999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(11,18,32,.85);
  color:#fff;
  font-weight:800;
  cursor:pointer;
  white-space:nowrap;
}
.earn-asset-btn.active{
  border-color: rgba(34,197,94,.55);
  box-shadow: 0 10px 18px rgba(0,0,0,.18);
}
.earn-asset-btn .coin-ic{ box-shadow:none; }

.earn-top-cards{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:10px;
  margin: 6px 0 12px;
}
.earn-stat{
  background: #0b1220;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  padding: 12px 12px;
  color: #fff;
}
.earn-stat-label{ font-size:12px; opacity:.75; }
.earn-stat-val{ margin-top:4px; font-size:18px; font-weight:900; }

.earn-list{ display:flex; flex-direction:column; gap:12px; }
.earn-card{
  background: #0b1220;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  padding: 14px;
  color:#fff;
  box-shadow: 0 12px 24px rgba(0,0,0,.18);
}
.earn-row{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.earn-left{ display:flex; align-items:center; gap:10px; min-width:0; }
.earn-title{ font-weight:900; font-size:16px; line-height:1.1; }
.earn-sub{ font-size:12px; opacity:.75; margin-top:2px; }
.earn-right{ text-align:right; }
.earn-apy{ font-size:18px; font-weight:900; }
.earn-apy-label{ font-size:12px; opacity:.75; }

.earn-meta{
  margin-top:10px;
  display:flex;
  justify-content:space-between;
  gap:10px;
  font-size:12px;
  opacity:.9;
}
.earn-meta .lab{ opacity:.75; margin-right:6px; }

.earn-bar{
  margin-top:10px;
  height:10px;
  border-radius:999px;
  background: rgba(255,255,255,.10);
  overflow:hidden;
}
.earn-bar-fill{
  height:100%;
  background: #00c853;
  border-radius:999px;
}

.earn-bottom{
  margin-top:12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.earn-sold{ font-size:12px; opacity:.85; }
.earn-btn{
  border:0;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight:900;
  background:#00c853;
  color:#0b1220;
  cursor:pointer;
}
.earn-btn.disabled{
  background: rgba(255,255,255,.16);
  color: rgba(255,255,255,.75);
  cursor: not-allowed;
}

/* =============================
   ✅ Earn groups
============================= */
.earn-group-head{
  display:flex;
  align-items:center;
  gap:8px;
  margin:14px 0 8px;
  padding:8px 10px;
  border-radius:12px;
  background: rgba(0,0,0,.20);
  color:#fff;
}
.earn-group-name{ font-weight:700; }
.earn-group-sub{ margin-left:auto; opacity:.7; font-size:12px; }

/* =============================
   ✅ Mining page
============================= */
.mine-page{
  padding:14px 14px 120px;
  color:#fff;
  background:#000;
  min-height: 100vh;
}
.mine-hero{
  display:flex;
  gap:12px;
  padding:14px;
  border-radius:18px;
  background: linear-gradient(135deg, rgba(30,30,30,.95), rgba(0,0,0,.95));
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  overflow:hidden;
}
.mine-hero-left{ flex:1; min-width:160px; }
.mine-hero-title{ font-size:16px; opacity:.85; }
.mine-hero-amount{ font-size:34px; font-weight:800; margin-top:6px; letter-spacing:.5px;}
.mine-hero-sub{ margin-top:8px; opacity:.8; font-size:13px; }
.mine-hero-right{ width:46%; min-width:160px; position:relative; }
.mine-orders-btn{
  position:absolute;
  top:8px;
  right:8px;
  z-index:3;
  background: rgba(255,255,255,.12);
  color:#fff;
  border:none;
  padding:8px 10px;
  border-radius:10px;
  cursor:pointer;
  font-weight:600;
}
.mine-hero-illu{
  height:120px;
  margin-top:24px;
  border-radius:14px;
  background:
    radial-gradient(circle at 30% 40%, rgba(0,255,190,.35), transparent 55%),
    radial-gradient(circle at 70% 60%, rgba(0,160,255,.35), transparent 55%),
    linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,0));
  border:1px solid rgba(255,255,255,.10);
}
.mine-hero-link{
  display:inline-block;
  margin-top:10px;
  color:#32ff8a;
  text-decoration:none;
  font-size:12px;
}
.mine-section-title{
  margin:14px 2px 10px;
  font-size:14px;
  font-weight:800;
  opacity:.9;
}
.mine-plan-list{ display:flex; flex-direction:column; gap:14px; }
.mine-plan{
  border-radius:18px;
  background: rgba(18,18,18,.95);
  border: 1px solid rgba(255,255,255,.08);
  overflow:hidden;
}

/* ✅ Mining 訂單頁：黑色金融科技風 + 標題置中 + 返回箭頭 */
.mine-orders-page{
  background:#050608;
  min-height:100vh;
  padding-bottom:90px;
}
.mine-orders-top{
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: 12px;
  background: rgba(5,6,8,.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.mine-orders-top .back{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: #fff;
  cursor: pointer;
}
.mine-orders-top .title{
  text-align:center;
  font-weight:800;
  letter-spacing:.5px;
  color:#fff;
}
.mine-orders-top .sp{ height:1px; }

/* 讓訂單卡更醒目 */
.mine-order-card{
  border: 1px solid rgba(46, 213, 115, .22);
  box-shadow: 0 14px 36px rgba(0,0,0,.45);
}

.mine-agree .agree-row{
  display:flex;
  gap:10px;
  align-items:flex-start;
  font-size:13px;
  opacity:.92;
}
.mine-agree .agree-row input{ margin-top:3px; }
.mine-plan-head{
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px;
}
.mine-plan-title .name{ font-weight:800; }
.mine-plan-title .days{ margin-top:6px; opacity:.75; font-size:12px; }
.mine-buy-btn{
  margin-left:auto;
  background:#17d06f;
  color:#001b0e;
  border:none;
  padding:10px 16px;
  border-radius:999px;
  cursor:pointer;
  font-weight:800;
}

.mine-plan-actions{ display:flex; align-items:center; gap:10px; }
.mine-spec-btn{
  padding:10px 14px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  color:#fff;
  font-weight:800;
  cursor:pointer;
}
.mine-spec-btn:active{ transform: translateY(1px); }

/* generic modal (for mining spec / buy) */
.gmodal{ position:fixed; inset:0; z-index:9999; display:none; }
.gmodal.show{ display:block; }
.gmodal .backdrop{ position:absolute; inset:0; background: rgba(0,0,0,.55); }
.gmodal .panel{
  position:absolute;
  left:50%;
  top:50%;
  transform: translate(-50%, -50%);
  width:min(520px, calc(100% - 28px));
  border-radius:18px;
  background: linear-gradient(180deg, rgba(24,24,24,.98), rgba(0,0,0,.98));
  border:1px solid rgba(255,255,255,.12);
  color:#fff;
  box-shadow: 0 20px 60px rgba(0,0,0,.55);
  overflow:hidden;

  background-clip: padding-box;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  isolation: isolate;
  will-change: transform;
}
.gmodal .hd{ display:flex; align-items:center; gap:10px; padding:14px 16px; border-bottom:1px solid rgba(255,255,255,.10); }
.gmodal .hd .t{ font-weight:900; }
.gmodal .hd .x{ margin-left:auto; cursor:pointer; opacity:.8; }
.gmodal .bd{ padding:14px 16px; max-height: 62vh; overflow:auto; }
.gmodal .ft{ display:flex; gap:10px; padding:12px 16px 16px; }
.gmodal .btn{
  flex:1;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.10);
  color:#fff;
  font-weight:900;
  cursor:pointer;
}
.gmodal .btn.primary{ background:#16c784; border-color:#16c784; color:#00160c; }
.mine-plan-grid{
  margin:0 14px 14px;
  border-radius:14px;
  background: rgba(255,255,255,.06);
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap:0;
}
.mine-plan-grid .cell{
  padding:14px 12px;
  text-align:center;
}
.mine-plan-grid .lab{ opacity:.75; font-size:12px; }
.mine-plan-grid .val{ margin-top:8px; font-weight:800; }
.mine-plan-grid .val.green{ color:#32ff8a; }



/* ====== Deposit Center v2 ====== */
.deposit-card{
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  padding: 14px;
}
.deposit-card .title{ font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.deposit-card .muted{ opacity: .75; font-size: 12px; }
.deposit-card .label{ opacity: .85; font-size: 12px; margin: 6px 0; }
.qr-box{ display:flex; gap:12px; align-items:center; background: rgba(0,0,0,0.18); padding: 10px; border-radius: 12px; }
.qr-box img{ width: 92px; height: 92px; border-radius: 10px; background:#fff; }
.addr-text{ word-break: break-all; font-size: 12px; opacity: .9; }
.mini-list{ display:flex; flex-direction:column; gap:8px; }
.mini-item{ background: rgba(0,0,0,0.18); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 10px; font-size: 12px; }
.st-ok{ color:#6ee7b7; }
.st-bad{ color:#fca5a5; }
.st-wait{ color:#fde68a; }

.inp{
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
}
.inp:focus{
  outline: none;
  border-color: rgba(99,102,241,0.65);
}

/* ====== Mining: brighter cards + image hero ====== */
.mine-hero-illu{
  background-image: linear-gradient(180deg, rgba(0,0,0,0.25), rgba(0,0,0,0.60)), url('/assets/mine-card.png');
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255,255,255,0.12);
}

.mine-order-card{
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
}
.mine-order-card .muted,
.mine-order-card .sub,
.mine-order-card .time{
  opacity: .82;
}
.mine-order-card .title,
.mine-order-card .name{
  color: rgba(255,255,255,0.95);
}

/* ✅ 國旗小圖示（桌機 emoji 不顯示的備援） */
.flag-ic{ width:18px; height:14px; border-radius:3px; display:inline-block; vertical-align:-2px; box-shadow:0 0 0 1px rgba(0,0,0,.08); margin-right:6px; }
.flag-ic-emoji{ display:inline-block; margin-right:6px; }


/* Center modal */
#centerModal{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;}
#centerModal .cm-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.55);}
#centerModal .cm-card{position:relative;width:min(420px,92vw);background:rgba(20,25,35,.96);border:1px solid rgba(255,255,255,.12);border-radius:16px;padding:16px;box-shadow:0 18px 60px rgba(0,0,0,.55);}
#centerModal .cm-title{font-weight:800;font-size:16px;margin-bottom:8px;color:#fff;}
#centerModal .cm-msg{color:rgba(255,255,255,.82);line-height:1.6;}
#centerModal .cm-actions{display:flex;justify-content:flex-end;margin-top:14px;}
#centerModal .cm-actions .btn{min-width:88px;}


input, textarea, select{color:inherit;}


/* Ensure modal text is readable in dark theme */
.modal-box h1,.modal-box h2,.modal-box h3,.modal-box h4,.modal-box label,.modal-box .muted,.modal-box p,.modal-box span{
  color: rgba(255,255,255,.92);
}
.modal-box .sub{ color: rgba(255,255,255,.72); }
.modal-box input,.modal-box select,.modal-box textarea{
  color: rgba(255,255,255,.92);
  -webkit-text-fill-color: rgba(255,255,255,.92);
}



/* ===== Language page refinements ===== */
.lang-list{display:flex;flex-direction:column;gap:10px;}
.lang-row{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
  color:rgba(255,255,255,.92);
}
.lang-row:hover{background:rgba(255,255,255,.06);}
.lang-row.active{border-color:rgba(34,197,94,.55); background:rgba(34,197,94,.10);}
.lang-title{font-weight:800;}
.lang-sub{font-size:12px; opacity:.75; margin-top:2px;}
.lang-tick{
  opacity:0; transition: opacity .15s ease;
  display:inline-flex;align-items:center;justify-content:center;
  width:26px;height:26px;border-radius:999px;
  background:rgba(34,197,94,.22); color:rgba(34,197,94,1); font-weight:900;
}


.lang-row.active .lang-tick{opacity:1;}
.lang-actions{margin-top:14px; padding:0 14px 14px;}
.lang-confirm{width:100%; height:44px; border-radius:12px; font-weight:800;}
.back-btn{width:36px;height:36px;border-radius:12px;}

/* ===== Modal title visibility ===== */
#periodTitle{color:#111 !important;}


/* Desktop layout polish (keep mobile unchanged) */
@media (min-width: 900px){
  body.front-page .app{
    max-width: 1180px;
    width: calc(100% - 120px);
  }
  body.front-page .bottom-nav{
    max-width: 1180px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 120px);
  }
  body.front-page #content{
    width: 100%;
  }
}

/* Card-style notification */
.card-toast-container{
  position: fixed;
  z-index: 9999;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: min(520px, calc(100% - 24px));
  pointer-events: none;
}
.card-toast{
  pointer-events: auto;
  background: rgba(10,18,34,.92);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #e9f1ff;
}
.card-toast .dot{
  width: 10px; height: 10px; border-radius: 999px;
  margin-top: 6px;
  background: #18c37e;
  flex: 0 0 auto;
}
.card-toast.warn .dot{ background: #ffb020; }
.card-toast.err .dot{ background: #ff4d4f; }
.card-toast .msg{ font-size: 14px; line-height: 1.35; }
@media (min-width: 900px){
  .card-toast-container{
    left: auto;
    right: 22px;
    transform: none;
    width: 420px;
  }
}

/* Center modal large for receipts */
.cm-card.cm-lg{ width:min(560px,94vw); padding:18px; border-radius:20px; }
.cm-card.cm-lg .cm-title{ font-size:18px; }


/* ===== Receipt V2 (Financial style) ===== */
.receiptV2{
  position:relative;
  background:#ffffff;
  color:#101828;
  border-radius:20px;
  padding:22px 18px 18px;
  box-shadow:0 14px 40px rgba(0,0,0,.35);
  border:1px solid rgba(16,24,40,.10);
  max-width:520px;
  margin:0 auto;
}
.receiptV2__dl{
  position:absolute;
  left:14px;
  top:14px;
  width:36px;
  height:36px;
  border-radius:12px;
  border:1px solid rgba(16,24,40,.12);
  background:rgba(255,255,255,.95);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}
.receiptV2__dl:active{ transform:scale(.98); }

.receiptV2__title{
  font-size:28px;
  font-weight:900;
  letter-spacing:.02em;
  text-align:center;
  margin-top:6px;
}
.receiptV2__amount{
  font-size:44px;
  font-weight:900;
  text-align:center;
  color:#10b981; /* green */
  margin:14px 0 6px;
}
.receiptV2__status{
  text-align:center;
  font-size:18px;
  font-weight:800;
  color:#111827;
  margin-bottom:18px;
}
.receiptV2__rows{
  border-top:1px solid rgba(16,24,40,.12);
}
.receiptV2__row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 2px;
  border-bottom:1px solid rgba(16,24,40,.12);
}
.receiptV2__k{
  font-weight:800;
  color:#111827;
  font-size:18px;
}
.receiptV2__v{
  font-weight:900;
  color:#111827;
  font-size:18px;
  text-align:right;
  word-break:break-all;
}
.receiptV2__confirm{
  width:100%;
  height:56px;
  border-radius:16px;
  font-size:22px;
  font-weight:900;
  margin-top:18px;
}
.team-dashboard{
background:#0f1b2d;
padding:15px;
border-radius:12px;
margin-top:20px;
}

.team-stats{
display:grid;
grid-template-columns:1fr 1fr;
gap:10px;
margin-bottom:20px;
}

.stat{
background:#14233a;
padding:10px;
border-radius:8px;
font-size:12px;
}

.stat b{
display:block;
font-size:16px;
color:#4fd1c5;
margin-top:5px;
}

.chart-box{
background:#14233a;
padding:10px;
border-radius:8px;
}

/* ===== Invite dashboard upgrade ===== */
body.front-page{ padding-bottom: 108px; }
body.front-page #content{ padding-bottom: 118px; }
.bottom-nav{ z-index: 1200; }
.invite-page-shell{ padding:18px 14px 118px; max-width:1100px; margin:0 auto; }
.invite-hero{ padding:16px; background:linear-gradient(180deg, rgba(15,23,42,.96), rgba(10,18,40,.96)); border:1px solid rgba(148,163,184,.14); }
.invite-hero-head{ display:flex; justify-content:space-between; gap:16px; align-items:flex-start; flex-wrap:wrap; }
.invite-eyebrow{ color:#60a5fa; font-size:12px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.invite-hero-title{ font-size:20px; font-weight:900; margin-top:6px; }
.invite-hero-sub{ margin-top:8px; color:#94a3b8; line-height:1.7; max-width:680px; }
.invite-badges{ display:grid; grid-template-columns:repeat(2,minmax(150px,1fr)); gap:10px; width:min(100%,360px); }
.invite-badge{ background:rgba(15,23,42,.75); border:1px solid rgba(255,255,255,.08); border-radius:16px; padding:14px; }
.invite-badge span{ display:block; font-size:12px; color:#94a3b8; }
.invite-badge b{ display:block; margin-top:8px; font-size:22px; color:#f8fafc; }
.invite-link-grid,.invite-grid-2,.invite-stats-grid{ display:grid; gap:12px; margin-top:12px; }
.invite-link-grid,.invite-grid-2{ grid-template-columns:repeat(2,minmax(0,1fr)); }
.invite-stats-grid{ grid-template-columns:repeat(4,minmax(0,1fr)); }
.invite-link-card,.invite-panel,.invite-stat-card{ background:rgba(11,18,32,.96); border:1px solid rgba(148,163,184,.12); border-radius:18px; }
.invite-link-card{ padding:14px; }
.invite-panel{ padding:14px; }
.invite-panel-title{ font-weight:800; font-size:16px; color:#f8fafc; }
.invite-panel-sub{ margin-top:4px; color:#94a3b8; line-height:1.6; }
.invite-copy-row{ display:flex; gap:10px; align-items:center; }
.invite-copy-row .btn{ width:auto; min-width:92px; white-space:nowrap; }
.invite-copy-row .inp{ flex:1; margin:0; }
.invite-stat-card{ padding:16px; box-shadow:inset 0 1px 0 rgba(255,255,255,.02); }
.invite-stat-card span{ display:block; color:#94a3b8; font-size:12px; }
.invite-stat-card b{ display:block; margin-top:10px; font-size:28px; line-height:1; color:#f8fafc; }
.invite-stat-card small{ display:block; margin-top:8px; color:#64748b; }
.invite-panel-head{ display:flex; justify-content:space-between; gap:10px; align-items:center; }
.invite-chip{ padding:6px 10px; border-radius:999px; font-size:12px; background:rgba(59,130,246,.14); color:#93c5fd; border:1px solid rgba(59,130,246,.28); }
.invite-chart-wrap{ align-items:stretch; }
.invite-chart-box{ position:relative; margin-top:14px; height:300px; width:100%; background:linear-gradient(180deg, rgba(15,23,42,.7), rgba(15,23,42,.35)); border:1px solid rgba(148,163,184,.08); border-radius:16px; padding:12px; }
.invite-downline-list{ margin-top:12px; min-height:280px; max-height:360px; overflow:auto; }
.invite-refresh-btn{ width:auto; margin:0; padding:8px 12px; }
.invite-label{ margin-bottom:8px; }
@media (max-width: 900px){
  .invite-link-grid,.invite-grid-2,.invite-stats-grid{ grid-template-columns:1fr 1fr; }
}
@media (max-width: 640px){
  .invite-page-shell{ padding:16px 12px 122px; }
  .invite-link-grid,.invite-grid-2,.invite-stats-grid,.invite-badges{ grid-template-columns:1fr; }
  .invite-copy-row{ flex-direction:column; align-items:stretch; }
  .invite-copy-row .btn{ width:100%; }
  .invite-chart-box{ height:240px; }
}
.chart-box{
height:260px;
margin-top:20px;
}

.invite-table{
width:100%;
margin-top:20px;
border-collapse:collapse;
}

.invite-table th,
.invite-table td{
padding:10px;
border-bottom:1px solid rgba(255,255,255,0.1);
}

.team-stats{
display:grid;
grid-template-columns:repeat(4,1fr);
gap:12px;
}

.stat{
background:#0f1b3a;
padding:15px;
border-radius:10px;
}

.wallet-balance-panel{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  margin:0 0 16px 0;
}

.wallet-balance-item{
  background:linear-gradient(180deg, rgba(20,28,45,.96), rgba(10,16,28,.96));
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
  padding:14px 12px;
  box-shadow:0 8px 24px rgba(0,0,0,.18);
}

.wallet-balance-label{
  font-size:12px;
  color:#94a3b8;
  margin-bottom:6px;
}

.wallet-balance-value{
  font-size:18px;
  font-weight:800;
  color:#fff;
  line-height:1.2;
  word-break:break-word;
}

@media (max-width:768px){
  .wallet-balance-panel{
    grid-template-columns:1fr;
  }
}

.val.green{
  color:#22c55e;
  font-weight:800;
  text-shadow:none;
  background:none !important;
  box-shadow:none !important;
  display:inline-block;
  line-height:1.4;
}

/* ===== records spacing fix ===== */
.records-card{
  max-width:min(92vw, 980px);
  margin:14px auto;
}

.records-wrap{
  overflow:auto;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(7,16,35,.72);
}

.records-table{
  width:100%;
  min-width:860px;
  border-collapse:separate;
  border-spacing:0;
  table-layout:fixed;
}

.records-table thead th{
  background:rgba(255,255,255,.04) !important;
  color:#e5e7eb !important;
  font-weight:800;
  padding:14px 16px !important;
  border-bottom:1px solid rgba(255,255,255,.08) !important;
}

.records-table tbody td{
  color:#f8fafc;
  padding:16px !important;
  border-bottom:1px solid rgba(255,255,255,.06) !important;
  vertical-align:top;
  white-space:normal !important;
  word-break:break-word;
  line-height:1.55;
}

.records-col-time{ width:170px; }
.records-col-asset{ width:120px; }
.records-col-amount{
  width:220px;
  text-align:left !important;
  font-weight:800;
}
.records-col-status{ width:120px; }
.records-col-method{ width:230px; }

.records-method-title{
  font-weight:800;
  color:#fff;
}

.records-method-id{
  margin-top:6px;
  font-size:12px;
  color:#94a3b8;
  line-height:1.5;
  word-break:break-all;
}

.records-table .tag.pending{ background:rgba(245,158,11,.18); color:#f59e0b; }
.records-table .tag.approved{ background:rgba(34,197,94,.18); color:#22c55e; }
.records-table .tag.rejected{ background:rgba(239,68,68,.18); color:#f87171; }
.records-table .tag.processing{ background:rgba(59,130,246,.18); color:#60a5fa; }
.records-table .tag.canceled{ background:rgba(148,163,184,.18); color:#cbd5e1; }

@media (max-width: 768px){
  .records-table{
    min-width:720px;
  }
  .records-table thead th,
  .records-table tbody td{
    padding:12px !important;
  }
}

.wallet-fiat-switcher{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin:0 0 10px 0;flex-wrap:wrap}
.wallet-fiat-switcher-label{font-size:12px;color:#94a3b8}
.wallet-fiat-select{min-width:120px;background:#0f172a;color:#fff;border:1px solid rgba(255,255,255,.12);border-radius:10px;padding:8px 10px}
.wallet-balance-fiat{margin-top:6px;font-size:12px;color:#94a3b8;line-height:1.4}

.records-table .tag.pending, .records-card .tag.pending{background:rgba(245,158,11,.18)!important;color:#f59e0b!important;border:1px solid rgba(245,158,11,.35)!important;}
.records-table .tag.processing, .records-card .tag.processing{background:rgba(59,130,246,.18)!important;color:#93c5fd!important;border:1px solid rgba(59,130,246,.35)!important;}
.records-table .tag.approved, .records-card .tag.approved{background:rgba(34,197,94,.18)!important;color:#22c55e!important;border:1px solid rgba(34,197,94,.35)!important;}
.records-table .tag.rejected, .records-card .tag.rejected{background:rgba(239,68,68,.18)!important;color:#f87171!important;border:1px solid rgba(239,68,68,.35)!important;}

/* ===== INVITE / AGENT UPGRADE ===== */
.invite-agent-actions .btn-gold,
.btn.btn-gold{background:linear-gradient(135deg,#f59e0b,#f97316);color:#fff;border:none}
.invite-tree-box{min-height:220px;max-height:360px;overflow:auto;padding-right:4px}
.invite-tree-node{padding:10px 0;border-bottom:1px solid rgba(255,255,255,.08)}
.invite-tree-root{font-weight:700;color:#f8fafc}
.invite-tree-children{padding-left:14px;margin-top:8px;display:grid;gap:6px}
.invite-tree-child{color:#cbd5e1}
.invite-tree-tag{display:inline-flex;align-items:center;padding:2px 8px;border-radius:999px;background:rgba(59,130,246,.15);color:#93c5fd;font-size:11px;margin-left:8px}
.invite-tree-tag.second{background:rgba(245,158,11,.15);color:#fbbf24}
.invite-rel-tag{display:inline-flex;align-items:center;padding:2px 8px;border-radius:999px;background:rgba(148,163,184,.15);color:#cbd5e1;font-size:11px;margin-left:8px}
#agentApplyModal{position:fixed;inset:0;background:rgba(2,6,23,.72);z-index:1200;align-items:center;justify-content:center;padding:16px}
#agentApplyModal .modal-card{width:min(560px,100%);background:#0b1220;border:1px solid rgba(148,163,184,.18);border-radius:18px;box-shadow:0 20px 60px rgba(0,0,0,.4);overflow:hidden}
#agentApplyModal .modal-head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid rgba(148,163,184,.12)}
#agentApplyModal .modal-title{font-size:18px;font-weight:800;color:#f8fafc}
#agentApplyModal .modal-close{background:none;border:none;color:#cbd5e1;font-size:18px;cursor:pointer}
#agentApplyModal .modal-body{padding:16px}
#agentApplyModal .modal-foot{padding:0 16px 16px}
#agentApplyModal textarea.inp{resize:vertical}
@media (max-width:768px){
  #agentApplyModal .grid2{grid-template-columns:1fr!important}
}


/* ===== LXZ GLOBAL BLACK-GOLD FINANCE THEME ===== */
body,
body.front-page{
  background:
    radial-gradient(circle at top right, rgba(212,175,55,.10), transparent 28%),
    linear-gradient(180deg,#05070b,#0a0d14) !important;
  color:#f5f7fb !important;
}
body.front-page .app{
  background:transparent !important;
}
body.front-page .top-bar,
.top-bar{
  background:linear-gradient(180deg,rgba(255,255,255,.02),rgba(255,255,255,.01)),rgba(14,19,28,.95) !important;
  border:1px solid rgba(212,175,55,.12) !important;
  color:#fff !important;
  box-shadow:0 18px 44px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.03) !important;
}
.top-bar .dropdown{
  background:#0f1520 !important;
  color:#fff !important;
  border:1px solid rgba(212,175,55,.18) !important;
  border-radius:12px !important;
}
.top-bar .dropdown div:hover{ background:rgba(255,255,255,.06) !important; }
body.front-page .bottom-nav,
.bottom-nav{
  background:rgba(15,21,32,.96) !important;
  border-top:1px solid rgba(212,175,55,.12) !important;
  box-shadow:0 -14px 30px rgba(0,0,0,.34) !important;
}
.bottom-nav button{
  color:#f5f7fb !important;
}
.bottom-nav button.active,
.bottom-nav button:hover{
  color:#f5d86b !important;
}
body.front-page .card,
body.front-page .panel,
body.front-page .section,
body.front-page .box,
body.front-page .deposit-card,
body.front-page .records-card,
body.front-page .gmodal,
body.front-page .gmodal .panel,
body.front-page .ex-modal-panel,
body.front-page .popup-panel{
  background:linear-gradient(180deg,rgba(255,255,255,.02),rgba(255,255,255,.01)), rgba(14,19,28,.94) !important;
  border:1px solid rgba(255,255,255,.08) !important;
  color:#f5f7fb !important;
  box-shadow:0 24px 60px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.03) !important;
}
body.front-page .menu-grid button,
body.front-page .btn,
body.front-page button.btn,
body.front-page .big-buttons button,
body.front-page .gmodal .btn,
body.front-page .ex-modal-panel .btn{
  background:#121926 !important;
  color:#f5f7fb !important;
  border:1px solid rgba(212,175,55,.16) !important;
  border-radius:14px !important;
  box-shadow:none !important;
}
body.front-page .btn.primary,
body.front-page button.primary,
body.front-page .confirm,
body.front-page .btn.green,
body.front-page .green,
body.front-page .big-buttons .green,
body.front-page .gmodal .btn.primary,
body.front-page .invite-agent-actions .btn-gold,
body.front-page .btn.btn-gold{
  background:linear-gradient(180deg,#f5d86b,#d4af37) !important;
  color:#111 !important;
  border:1px solid rgba(212,175,55,.35) !important;
}
body.front-page .red,
body.front-page .trade-red,
body.front-page .big-buttons .red{
  background:linear-gradient(180deg,#1a2232,#101723) !important;
  color:#f7df8a !important;
  border:1px solid rgba(212,175,55,.22) !important;
}
body.front-page .trade-green{
  background:linear-gradient(180deg,#f5d86b,#d4af37) !important;
  color:#111 !important;
  border:1px solid rgba(212,175,55,.35) !important;
}
body.front-page input,
body.front-page select,
body.front-page textarea,
body.front-page .input,
body.front-page .money-input,
body.front-page #amountInput,
body.front-page .inp{
  background:#121926 !important;
  color:#fff !important;
  border:1px solid rgba(255,255,255,.08) !important;
  border-radius:14px !important;
}
body.front-page input::placeholder,
body.front-page textarea::placeholder{ color:#7f8ba3 !important; }
body.front-page .chart,
body.front-page .chart-box,
body.front-page .invite-chart-box{
  background:linear-gradient(180deg,rgba(15,23,42,.86),rgba(15,23,42,.54)) !important;
  border:1px solid rgba(255,255,255,.08) !important;
  color:#cbd5e1 !important;
}
body.front-page .notice-banner{
  background:linear-gradient(180deg,#f5d86b,#d4af37) !important;
  color:#111 !important;
  border-radius:14px !important;
}
body.front-page .muted,
body.front-page .hint,
body.front-page .sub,
body.front-page .balance,
body.front-page .wallet-line,
body.front-page .deposit-hint{
  color:#94a3b8 !important;
}
body.front-page .records-table th,
body.front-page .tbl thead th{
  background:#111827 !important;
  color:#f3f4f6 !important;
}
body.front-page .records-table td,
body.front-page .tbl td{ color:#e5e7eb !important; }
body.front-page .tag.pending{ color:#f7df8a !important; border-color:rgba(212,175,55,.35)!important; background:rgba(212,175,55,.12)!important; }
body.front-page .tag.approved{ color:#f5d86b !important; background:rgba(212,175,55,.12)!important; border-color:rgba(212,175,55,.35)!important; }
body.front-page .tag.rejected{ color:#ff9b9b !important; background:rgba(220,38,38,.12)!important; border-color:rgba(220,38,38,.25)!important; }


.splash-text{
  color:#ffffff;
  font-size:34px;
  font-weight:600;
  letter-spacing:3px;
  font-family: "Segoe UI","Helvetica Neue",Arial,sans-serif;
  text-transform:uppercase;
}

.splash-sub{
  color:#cbd5e1;
  font-size:14px;
  margin-top:10px;
  letter-spacing:4px;
  font-weight:500;
  font-family: "Segoe UI","Helvetica Neue",Arial,sans-serif;
}

body.front-page{
  background:linear-gradient(180deg, #071427 0%, #08182f 45%, #050d1d 100%);
}

.app{
  background:transparent;
}

/* ===== 修正底部断层：统一页面底部背景 ===== */
html, body{
  background: #050d1d !important;
}

body.front-page{
  background: #050d1d !important;
}

/* 主外框 */
.app{
  background: linear-gradient(180deg, #081427 0%, #07162b 55%, #050d1d 100%) !important;
}

/* 主要内容区 */
#content,
.page,
.page-content,
.main,
.main-content,
.content,
.tab-content,
.view,
.screen{
  background: transparent !important;
}

/* 底部导航上方那块预留区域 */
body.front-page{
  padding-bottom: 88px !important;
}

#content{
  padding-bottom: 110px !important;
}

/* 底部导航本身 */
.bottom-nav{
  position: fixed;
  bottom: 0;
  width: 100%;
  display: flex;
  background: linear-gradient(180deg, #081427 0%, #050d1d 100%) !important;
  border-top: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 -6px 20px rgba(0,0,0,.28);
}

/* ===== FIX 底部导航颜色断层（安全版）===== */

body{
  background:#050d1d !important;
}

body.front-page{
  background:#050d1d !important;
}

/* 页面主容器统一深色 */
body.front-page .app{
  background:linear-gradient(180deg,#071427 0%,#08182f 60%,#050d1d 100%) !important;
}

/* 内容区域透明，让渐层连续 */
#content,
.page,
.container,
.section{
  background:transparent !important;
}

/* ===== 底部黑色断层最终修复（只加在最底部）===== */

/* 统一前台主背景 */
body.front-page{
  background:#08182f !important;
}

/* 整个 App 改成同一套底色，不要底部再变黑 */
body.front-page .app{
  background:#08182f !important;
}

/* 内容区连到底部导航预留区都保持同色 */
body.front-page #content{
  background:#08182f !important;
  padding-bottom:90px !important;   /* 原本 110px 太高，会露出一大块 */
}

/* 底部导航高度统一 */
body.front-page .bottom-nav{
  height:70px !important;
  background:#08182f !important;
  border-top:1px solid rgba(255,255,255,.06) !important;
}

.mine-page{
  background:#08182f !important;
}

/* ===== Demo 持倉卡 ===== */
.demo-position-card{
  background:rgba(2,10,24,.75);
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  padding:12px;
  margin-top:10px;
  color:#fff;
}

.demo-position-top{
  display:flex;
  justify-content:space-between;
  gap:10px;
}

.demo-position-side{
  font-weight:800;
  font-size:16px;
  margin-bottom:6px;
}

.demo-position-entry,
.demo-position-margin,
.demo-position-mark,
.demo-position-lev{
  font-size:14px;
  opacity:.92;
  margin-top:2px;
}

.demo-position-right{
  text-align:right;
}

.demo-position-pnl{
  font-size:24px;
  font-weight:900;
  margin-bottom:8px;
}

.demo-position-pnl.profit{
  color:#22c55e;
}

.demo-position-pnl.loss{
  color:#ef4444;
}

.demo-close-order-btn{
  width:100%;
  margin-top:12px;
  height:42px;
  border:none;
  border-radius:12px;
  background:linear-gradient(180deg,#0d1b34,#0a1324);
  color:#fff;
  font-weight:800;
  cursor:pointer;
}

.demo-mode-tag{
  margin-top:8px;
  font-size:12px;
  color:rgba(255,255,255,.55);
  text-align:center;
}

.demo-empty{
  color:#fff;
  text-align:center;
  padding:20px 0;
  opacity:.75;
}

/* ===== 平倉彈窗 ===== */
.demo-close-toast{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.35);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:99999;
}

.demo-close-card{
  width:min(360px,90vw);
  background:#0b1220;
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  padding:18px;
  text-align:center;
  color:#fff;
  box-shadow:0 18px 50px rgba(0,0,0,.35);
}

.demo-close-title{
  font-size:20px;
  font-weight:900;
}

.demo-close-symbol{
  margin-top:8px;
  font-size:14px;
  opacity:.8;
}

.demo-close-pnl{
  margin-top:14px;
  font-size:34px;
  font-weight:900;
}

.demo-close-toast.profit .demo-close-pnl{
  color:#22c55e;
}

.demo-close-toast.loss .demo-close-pnl{
  color:#ef4444;
}

.demo-close-roi{
  margin-top:6px;
  font-size:15px;
  opacity:.92;
}

.demo-close-tip{
  margin-top:10px;
  font-size:12px;
  color:rgba(255,255,255,.55);
}

.demo-close-btn{
  width:100%;
  margin-top:14px;
  height:42px;
  border:none;
  border-radius:12px;
  background:#111827;
  color:#fff;
  font-weight:800;
  cursor:pointer;
}

/* =========================
   U 本位持倉卡（交易所風）
========================= */
.um-pos-card{
  background: rgba(6,12,22,.78);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 10px 28px rgba(0,0,0,.18);
}

.um-pos-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.um-pos-symbol{
  font-size:18px;
  font-weight:900;
  color:#fff;
}

.um-pos-mode{
  margin-top:6px;
  display:flex;
  align-items:center;
  gap:8px;
}

.um-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:48px;
  height:24px;
  padding:0 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
}

.um-badge.long{
  background: rgba(34,197,94,.14);
  color:#34d399;
}

.um-badge.short{
  background: rgba(239,68,68,.14);
  color:#fb7185;
}

.um-sub{
  font-size:13px;
  opacity:.78;
  color:#cbd5e1;
}

.um-pos-pnl-wrap{
  text-align:right;
}

.um-pos-pnl-title{
  font-size:12px;
  color:#cbd5e1;
  opacity:.75;
}

.um-pos-pnl{
  margin-top:6px;
  font-size:18px;
  font-weight:900;
}

.um-pos-pnl.profit,
.um-value.profit{
  color:#22c55e;
}

.um-pos-pnl.loss,
.um-value.loss{
  color:#ef4444;
}

.um-pos-roi{
  font-size:14px;
  font-weight:800;
}

.um-pos-grid{
  margin-top:14px;
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:12px;
}

.um-col{
  min-width:0;
}

.um-label{
  font-size:12px;
  color:#cbd5e1;
  opacity:.72;
}

.um-value{
  margin-top:6px;
  font-size:16px;
  font-weight:800;
  color:#fff;
  word-break:break-all;
}

.um-value.liq{
  color:#fbbf24;
}

.um-pos-extra{
  margin-top:12px;
  display:flex;
  flex-wrap:wrap;
  gap:10px 16px;
  font-size:12px;
  color:#cbd5e1;
  opacity:.78;
}

.um-pos-actions{
  margin-top:14px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}

.um-action-btn{
  height:42px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.05);
  color:#fff;
  font-weight:800;
  cursor:pointer;
}

.um-action-btn.ghost{
  background: rgba(255,255,255,.03);
}

.um-action-btn:hover{
  filter: brightness(1.06);
}

/* 水單 */
.um-receipt-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.38);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:99999;
}

.um-receipt-card{
  width:min(420px,92vw);
  background:#0b1220;
  color:#fff;
  border-radius:18px;
  padding:18px;
  border:1px solid rgba(255,255,255,.08);
  box-shadow:0 20px 50px rgba(0,0,0,.35);
}

.um-receipt-title{
  font-size:20px;
  font-weight:900;
  text-align:center;
}

.um-receipt-sub{
  margin-top:8px;
  text-align:center;
  font-size:13px;
  color:#cbd5e1;
  opacity:.8;
}

.um-receipt-grid{
  margin-top:14px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:8px 12px;
  font-size:13px;
}

.um-receipt-pnl{
  margin-top:16px;
  text-align:center;
  font-size:28px;
  font-weight:900;
}

.um-receipt-pnl.profit{
  color:#22c55e;
}

.um-receipt-pnl.loss{
  color:#ef4444;
}

.um-receipt-roi{
  margin-top:8px;
  text-align:center;
  font-size:14px;
}

.um-receipt-mode{
  margin-top:8px;
  text-align:center;
  font-size:12px;
  opacity:.65;
}

.um-receipt-btn{
  width:100%;
  margin-top:16px;
  height:42px;
  border:none;
  border-radius:12px;
  background:#111827;
  color:#fff;
  font-weight:900;
  cursor:pointer;
}

@media (max-width: 640px){
  .um-pos-grid{
    grid-template-columns: 1fr 1fr;
  }
}

.um-history-title{
  margin:16px 0 10px;
  font-size:16px;
  font-weight:800;
  color:#fff;
}

.um-history-card{
  background: rgba(6,12,22,.72);
  border:1px solid rgba(255,255,255,.05);
  border-radius:14px;
  padding:12px;
  margin-bottom:10px;
  color:#fff;
}

.um-history-head{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
  font-size:13px;
  opacity:.85;
}

.um-history-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px 12px;
  font-size:13px;
}

.um-receipt-empty{
  margin-top:12px;
  color:rgba(255,255,255,.65);
}

.um-receipt-modal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.55);
  z-index:99999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
}

.um-receipt-poster{
  width:min(420px, 92vw);
  min-height:620px;
  border-radius:22px;
  padding:24px 20px;
  color:#fff;
  position:relative;
  overflow:hidden;
  background:
    radial-gradient(circle at 75% 78%, rgba(255,0,0,.22), transparent 18%),
    radial-gradient(circle at 62% 78%, rgba(0,80,255,.22), transparent 18%),
    linear-gradient(180deg, #05070d 0%, #070b14 100%);
  box-shadow:0 24px 60px rgba(0,0,0,.45);
  border:1px solid rgba(255,255,255,.06);
}

.um-receipt-brand{
  font-size:15px;
  font-weight:800;
  opacity:.9;
}

.um-receipt-symbol{
  margin-top:18px;
  font-size:32px;
  font-weight:900;
  letter-spacing:.5px;
}

.um-receipt-side{
  margin-top:10px;
  font-size:24px;
  font-weight:800;
  color:#ff5c7a;
}

.um-receipt-title-big{
  margin-top:22px;
  font-size:16px;
  opacity:.72;
}

.um-receipt-roi{
  margin-top:10px;
  font-size:46px;
  font-weight:900;
  line-height:1;
}

.um-receipt-pnl{
  margin-top:12px;
  font-size:34px;
  font-weight:900;
  line-height:1.1;
}

.um-receipt-roi.profit,
.um-receipt-pnl.profit{
  color:#22d36d;
}

.um-receipt-roi.loss,
.um-receipt-pnl.loss{
  color:#ff5a5a;
}

.um-receipt-grid{
  margin-top:28px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px 14px;
  font-size:14px;
}

.um-receipt-time{
  margin-top:28px;
  font-size:14px;
  opacity:.72;
}

.um-receipt-actions{
  margin-top:28px;
}

.um-receipt-btn{
  width:100%;
  height:46px;
  border:none;
  border-radius:12px;
  background:#111827;
  color:#fff;
  font-weight:900;
  cursor:pointer;
}

.um-receipt-close{
  position:absolute;
  right:14px;
  top:14px;
  width:36px;
  height:36px;
  border:none;
  border-radius:50%;
  background:rgba(255,255,255,.08);
  color:#fff;
  cursor:pointer;
}

.um-receipt-modal{
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0,0,0,.55) !important;
  z-index: 99999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
}

.um-receipt-poster{
  width: min(420px, 92vw) !important;
  min-height: 620px !important;
  border-radius: 22px !important;
  padding: 24px 20px !important;
  color: #fff !important;
  position: relative !important;
  overflow: hidden !important;
  background:
    radial-gradient(circle at 75% 78%, rgba(255,0,0,.22), transparent 18%),
    radial-gradient(circle at 62% 78%, rgba(0,80,255,.22), transparent 18%),
    linear-gradient(180deg, #05070d 0%, #070b14 100%) !important;
  box-shadow: 0 24px 60px rgba(0,0,0,.45) !important;
  border: 1px solid rgba(255,255,255,.06) !important;
  margin: 0 auto !important;
}

.um-receipt-brand-row{
  display:flex;
  align-items:center;
  gap:10px;
}

.um-receipt-logo{
  width:38px;
  height:38px;
  border-radius:10px;
  object-fit:cover;
  box-shadow:0 4px 12px rgba(0,0,0,.25);
}

.um-receipt-actions{
  margin-top:28px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.um-receipt-btn{
  height:44px;
  border:none;
  border-radius:12px;
  background:#111827;
  color:#fff;
  font-weight:800;
  cursor:pointer;
}

.um-receipt-btn.primary{
  grid-column:1 / -1;
  background:#1a2742;
}

.um-history-toolbar{
  margin:10px 0 14px;
}

.um-history-search{
  width:100%;
  height:40px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.04);
  color:#fff;
  padding:0 12px;
}

.um-history-actions{
  margin-top:12px;
  display:flex;
  justify-content:center;
}

.um-history-btn{
  min-width:120px;
  height:40px;
  border:none;
  border-radius:10px;
  background:#16233d;
  color:#fff;
  font-weight:800;
  cursor:pointer;
}