/* 个人中心：右上角头像 → 右侧滑出（手机 / 电脑通用） */
.tj-profile-btn {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 960;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px 0 5px;
  max-width: 46vw;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 999px;
  background: rgba(16, 24, 40, .58);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(16, 24, 40, .28);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.tj-profile-btn:hover { background: rgba(16, 24, 40, .8); }
.tj-profile-btn .tj-avatar {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  color: #101828;
  font-size: 13px;
  font-weight: 800;
}
.tj-profile-btn .tj-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.auth-locked .tj-profile-btn,
body.auth-locked .tj-profile-mask,
body.auth-locked .tj-profile-panel { display: none !important; }

.tj-profile-mask {
  position: fixed;
  inset: 0;
  z-index: 965;
  background: rgba(16, 24, 40, .42);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}
.tj-profile-mask.show { opacity: 1; visibility: visible; }

.tj-profile-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 970;
  width: min(340px, 86vw);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border-left: 1px solid #e4e7ec;
  box-shadow: -16px 0 40px rgba(16, 24, 40, .2);
  transform: translateX(104%);
  transition: transform .24s ease;
}
.tj-profile-panel.show { transform: translateX(0); }
.tj-profile-head {
  flex: 0 0 auto;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 0 14px;
  border-bottom: 1px solid #eaecf0;
  background: #f8fafc;
}
.tj-profile-head strong { font-size: 16px; color: #101828; }
.tj-profile-head button {
  width: 32px;
  height: 32px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  color: #475467;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.tj-profile-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 14px; }
.tj-profile-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  background: #f8fafc;
}
.tj-profile-user .tj-avatar-lg {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #344054;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
}
.tj-profile-user b { display: block; font-size: 16px; color: #101828; line-height: 1.3; }
.tj-profile-user span { display: block; margin-top: 2px; font-size: 12px; color: #667085; }
.tj-profile-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.tj-profile-stats > div { padding: 10px; border: 1px solid #e4e7ec; border-radius: 10px; background: #fff; }
.tj-profile-stats span { display: block; font-size: 11px; color: #667085; }
.tj-profile-stats b { display: block; margin-top: 3px; font-size: 16px; color: #101828; font-variant-numeric: tabular-nums; word-break: break-all; }
.tj-profile-menu { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.tj-profile-menu button {
  height: 42px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: #fff;
  color: #344054;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.tj-profile-menu button:hover { background: #f7f9fb; }
.tj-profile-menu button.danger { color: #b42318; border-color: #fda29b; background: #fff6f5; }
.tj-profile-menu button.danger:hover { background: #fee4e2; }
.tj-profile-foot { margin-top: 18px; text-align: center; font-size: 11px; color: #98a2b3; line-height: 1.7; }

/* 修改密码入口已移到个人中心，隐藏导航栏上的旧按钮（点击仍可被个人中心触发） */
.subnav .auth-change-password-btn { display: none !important; }

@media (max-width: 760px) {
  .tj-profile-btn { top: 8px; right: 8px; height: 30px; padding: 0 9px 0 4px; font-size: 11px; }
  .tj-profile-btn .tj-avatar { width: 22px; height: 22px; flex: 0 0 22px; font-size: 12px; }
  .tj-profile-btn .tj-name { max-width: 64px; }
  .tj-profile-panel { width: min(320px, 88vw); }
  .tj-profile-body { padding: 12px; }
}

/* 手机上只显示头像圆点，避免遮住顶部“澳十六合彩”文字 */
@media (max-width: 760px) {
  .tj-profile-btn { padding: 0 3px !important; width: 34px !important; justify-content: center !important; }
  .tj-profile-btn .tj-name { display: none !important; }
  .tj-profile-btn .tj-avatar { width: 26px !important; height: 26px !important; flex: 0 0 26px !important; }
}

/* 给顶部最后一个彩种块留出右上角头像的位置，避免盖住“澳十六合彩”文字 */
@media (max-width: 760px) {
  .lottery-bar .lottery-item:last-child { padding-right: 48px !important; }
}

/* 个人中心 · 数据重置区块 */
.tj-profile-reset { margin-top: 16px; padding: 12px; border: 1px solid #fecdca; border-radius: 10px; background: #fff6f5; }
.tj-profile-reset-title { font-size: 12px; font-weight: 800; color: #b42318; }
.tj-profile-reset-row { display: flex; gap: 8px; margin-top: 8px; }
.tj-profile-reset-row select {
  flex: 1 1 auto;
  min-width: 0;
  height: 38px;
  padding: 0 8px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  color: #344054;
  font-size: 13px;
}
.tj-profile-reset-row button {
  flex: 0 0 auto;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #d92d20;
  border-radius: 8px;
  background: #d92d20;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.tj-profile-reset-row button:hover { background: #b42318; border-color: #b42318; }
.tj-profile-reset-note { margin-top: 6px; font-size: 11px; color: #b42318; line-height: 1.5; }
@media (max-width: 760px) {
  .tj-profile-reset-row { flex-wrap: wrap; }
  .tj-profile-reset-row select { flex: 1 1 100%; }
  .tj-profile-reset-row button { flex: 1 1 100%; }
}

/* 匹配注单内容框内的“粘贴”按钮 */
.tj-paste-btn {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 6;
  height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(52, 64, 84, .9);
  border-radius: 8px;
  background: rgba(52, 64, 84, .92);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(16, 24, 40, .18);
  -webkit-tap-highlight-color: transparent;
}
.tj-paste-btn:hover { background: #1d2939; border-color: #1d2939; }
.tj-paste-btn:active { transform: scale(.96); }
@media (max-width: 760px) {
  .tj-paste-btn { top: 6px; right: 8px; height: 30px; padding: 0 14px; font-size: 13px; }
}

/* 说明：收起/展开按钮 */
.entry-hint { position: relative; }
.entry-hint .tj-hint-toggle {
  position: absolute;
  top: 4px;
  right: 6px;
  height: 22px;
  padding: 0 8px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  background: #fff;
  color: #475467;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.entry-hint .tj-hint-toggle:hover { background: #f2f4f7; }
.entry-hint { padding-right: 62px !important; }
.entry-hint.tj-hint-collapsed span { display: none !important; }
.entry-hint.tj-hint-collapsed::after {
  content: '（已收起，点“展开”查看完整说明）';
  color: #98a2b3;
  font-size: 11px;
}

/* 匹配注单确认：手机端改为底部弹出，顶部保留输入框用于对比 */
@media (max-width: 760px) {
  .match-order-mask {
    align-items: flex-end !important;
    padding: 0 !important;
    background: rgba(16, 24, 40, .26) !important;
  }
  .match-order-dialog {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 76vh !important;
    border-radius: 14px 14px 0 0 !important;
    box-shadow: 0 -12px 32px rgba(16, 24, 40, .2) !important;
  }
  .match-order-dialog .confirm-head { border-radius: 14px 14px 0 0 !important; }
}

/* 个人中心：代理后台入口 */
.tj-profile-link {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  margin-bottom: 10px;
  border: 1px solid #b2ddff;
  border-radius: 10px;
  background: #eff8ff;
  color: #175cd3 !important;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.tj-profile-link:hover { background: #e0f2fe; }

/* 会员续费（USDT） */
.tj-profile-pay {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  margin-bottom: 10px;
  border: 1px solid #a6f4c5;
  border-radius: 10px;
  background: #ecfdf3;
  color: #067647 !important;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.tj-profile-pay:hover { background: #d1fadf; }
.tj-pay-mask {
  position: fixed; inset: 0; z-index: 980;
  background: rgba(16, 24, 40, .5);
  opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s ease;
}
.tj-pay-mask.show { opacity: 1; visibility: visible; }
.tj-pay-dialog {
  position: fixed; left: 50%; top: 50%; z-index: 981;
  width: min(390px, 92vw); max-height: 88vh; overflow: auto;
  background: #fff; border-radius: 14px; box-shadow: 0 20px 50px rgba(16, 24, 40, .28);
  transform: translate(-50%, -50%) scale(.96); opacity: 0; visibility: hidden;
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}
.tj-pay-dialog.show { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
.tj-pay-head {
  display: flex; align-items: center; justify-content: space-between;
  height: 50px; padding: 0 12px 0 14px; border-bottom: 1px solid #eaecf0; background: #f8fafc;
}
.tj-pay-head strong { font-size: 15px; color: #101828; }
.tj-pay-head button { width: 30px; height: 30px; border: 1px solid #d0d5dd; border-radius: 8px; background: #fff; color: #475467; font-size: 17px; cursor: pointer; }
.tj-pay-body { padding: 12px; }
.tj-pay-loading, .tj-pay-err { padding: 18px 8px; text-align: center; font-size: 13px; color: #667085; }
.tj-pay-err { color: #b42318; }
.tj-pay-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; font-size: 13px; color: #667085; border-bottom: 1px dashed #f2f4f7; }
.tj-pay-row b { color: #101828; font-size: 14px; }
.tj-pay-row input { width: 110px; height: 32px; padding: 0 8px; border: 1px solid #d0d5dd; border-radius: 8px; font-size: 13px; }
.tj-pay-days { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.tj-pay-day { flex: 1 1 22%; height: 34px; border: 1px solid #d0d5dd; border-radius: 8px; background: #fff; color: #344054; font-size: 13px; font-weight: 700; cursor: pointer; }
.tj-pay-day:hover { border-color: #344054; background: #f7f9fb; }
.tj-pay-note { margin: 10px 0; padding: 8px 10px; border-radius: 8px; background: #f8fafc; color: #667085; font-size: 12px; line-height: 1.6; }
.tj-pay-note b { color: #101828; }
.tj-pay-submit { width: 100%; height: 42px; margin-top: 6px; border: 0; border-radius: 10px; background: #344054; color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; }
.tj-pay-submit:hover { background: #1d2939; }
.tj-pay-amount { padding: 12px; margin-bottom: 8px; border-radius: 10px; background: #eff8ff; text-align: center; color: #175cd3; font-size: 14px; }
.tj-pay-amount b { font-size: 20px; }
.tj-pay-addr { display: flex; align-items: center; gap: 8px; margin: 8px 0; padding: 8px; border: 1px solid #e4e7ec; border-radius: 8px; background: #fbfcfd; }
.tj-pay-addr span { flex: 1 1 auto; min-width: 0; font-size: 12px; word-break: break-all; color: #101828; }
.tj-pay-addr button { flex: 0 0 auto; height: 30px; padding: 0 10px; border: 1px solid #344054; border-radius: 8px; background: #344054; color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; }
.tj-pay-qr { text-align: center; }
.tj-pay-qr img { width: 160px; height: 160px; border: 1px solid #eaecf0; border-radius: 8px; background: #fff; }
.tj-pay-status { margin-top: 8px; text-align: center; font-size: 12px; color: #b54708; }
.tj-pay-ok { padding: 18px 8px; text-align: center; font-size: 14px; color: #067647; line-height: 1.8; }
