/* ============================================================
   香港六合彩 — 登录 / 服务条款 共享样式
   复用 theme.css 的深色金红体系
   ============================================================ */

/* ---------- 通用舞台 ---------- */
.auth-stage {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
  background:
    radial-gradient(900px 520px at 50% -8%, rgba(232,196,134,.08), transparent 60%),
    radial-gradient(700px 500px at 88% 108%, rgba(178,48,47,.10), transparent 62%),
    var(--bg);
  position: relative; overflow: hidden;
}
.auth-stage::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 46px 46px; -webkit-mask-image: radial-gradient(70% 60% at 50% 40%, #000, transparent 80%);
  mask-image: radial-gradient(70% 60% at 50% 40%, #000, transparent 80%);
}

/* ---------- 登录卡 ---------- */
.auth-shell {
  position: relative; z-index: 1; width: 100%; max-width: 432px;
  background: linear-gradient(180deg, var(--bg2), #0e1620);
  border: 1px solid var(--line2); border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.04);
  overflow: hidden;
  display: grid; grid-template-columns: 1fr;
}

/* 品牌区 (经典 / 横幅共用基础) */
.auth-brandpanel {
  position: relative; padding: 34px 38px 8px; text-align: center;
}
.auth-mark {
  width: 60px; height: 60px; border-radius: 16px; margin: 0 auto 16px;
  background: linear-gradient(145deg, var(--red), var(--red-deep));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-num); font-size: 36px; font-weight: 700; color: #fff;
  box-shadow: 0 8px 22px rgba(178,48,47,.45), inset 0 1px 0 rgba(255,255,255,.28);
}
.auth-title { font-size: 24px; font-weight: 700; letter-spacing: .03em; }
.auth-title span {
  display: block; font-family: var(--font-num); font-size: 12px; letter-spacing: .26em;
  color: var(--gold); margin-top: 6px; font-weight: 600;
}
.auth-tagline { font-size: 13px; color: var(--txt2); margin-top: 12px; }

/* 上期开奖小球行 (横幅/双栏变体显示) */
.auth-draw {
  display: none; align-items: center; justify-content: center; gap: 7px;
  margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line2);
}
.auth-draw-k { font-size: 11px; color: var(--txt3); margin-right: 4px; white-space: nowrap; }
.auth-draw-plus { color: var(--gold); font-weight: 700; font-size: 15px; }

/* ---------- 表单 ---------- */
.auth-form { padding: 22px 38px 30px; display: flex; flex-direction: column; gap: 15px; }

.fld { display: flex; flex-direction: column; gap: 7px; }
.fld-label { font-size: 12.5px; color: var(--txt2); font-weight: 500; letter-spacing: .02em; }
.fld-input {
  position: relative; display: flex; align-items: center;
  background: var(--bg); border: 1px solid var(--line2); border-radius: 10px;
  transition: border-color .14s ease, box-shadow .14s ease;
}
.fld-input:focus-within { border-color: var(--gold-deep); box-shadow: 0 0 0 3px rgba(232,196,134,.10); }
.fld-ico { flex: none; width: 44px; display: flex; align-items: center; justify-content: center; color: var(--txt3); }
.fld-input:focus-within .fld-ico { color: var(--gold); }
.fld-input input {
  flex: 1; min-width: 0; background: none; border: none; outline: none;
  color: var(--txt); font-family: var(--font-zh); font-size: 15px;
  padding: 13px 14px 13px 0;
}
.fld-input input::placeholder { color: var(--txt3); }
.fld-input input.num { font-family: var(--font-num); letter-spacing: .14em; }
.fld-eye {
  flex: none; background: none; border: none; cursor: pointer; color: var(--txt3);
  padding: 0 14px; display: flex; align-items: center; height: 100%;
}
.fld-eye:hover { color: var(--gold); }

/* 验证码行 */
.fld-cap-row { display: flex; gap: 10px; align-items: stretch; }
.fld-cap-row .fld-input { flex: 1; }
.cap-box {
  flex: none; width: 118px; border-radius: 10px; overflow: hidden; cursor: pointer;
  border: 1px solid var(--line2); background: #11161f; position: relative;
}
.cap-box canvas { display: block; width: 100%; height: 100%; }
.cap-box .cap-img { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 40px; }
.cap-box .cap-img svg { display: block; width: 100%; height: 100%; }
.cap-box .cap-load { font-size: 11px; color: var(--txt3); }
.cap-box::after {
  content: "换一张"; position: absolute; inset: auto 0 0 0; font-size: 9px; text-align: center;
  color: var(--txt3); background: rgba(0,0,0,.42); padding: 1px 0; opacity: 0; transition: opacity .14s ease;
}
.cap-box:hover::after { opacity: 1; }

/* 行内辅助 */
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: -2px; }
.auth-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12.5px; color: var(--txt2); user-select: none; }
.auth-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.auth-check .box {
  width: 16px; height: 16px; border-radius: 5px; border: 1px solid var(--line2); background: var(--bg);
  display: flex; align-items: center; justify-content: center; flex: none; transition: all .14s ease;
}
.auth-check input:checked + .box { background: linear-gradient(180deg, var(--gold), var(--gold-deep)); border-color: var(--gold); }
.auth-check input:checked + .box::after { content: "✓"; font-size: 11px; color: #2a1d05; font-weight: 700; }
.auth-link { font-size: 12.5px; color: var(--txt3); cursor: pointer; background: none; border: none; font-family: var(--font-zh); }
.auth-link:hover { color: var(--gold); }

/* 错误条 */
.auth-msg {
  min-height: 0; font-size: 12.5px; color: var(--red); display: none; align-items: center; gap: 6px;
  background: rgba(217,67,67,.10); border: 1px solid rgba(217,67,67,.30); border-radius: 8px; padding: 9px 12px;
}
.auth-msg.show { display: flex; }

/* 提交 */
.auth-submit { width: 100%; padding: 14px; font-size: 16px; border-radius: 10px; margin-top: 4px; }
.auth-submit:disabled { opacity: .55; cursor: not-allowed; }

/* 卡脚 */
.auth-foot {
  padding: 0 38px 26px; text-align: center;
}
.auth-foot-note {
  font-size: 11.5px; color: var(--txt3); line-height: 1.7;
  display: flex; align-items: center; justify-content: center; gap: 7px; flex-wrap: wrap;
}
.auth-foot-note svg { color: var(--ok); flex: none; }
.auth-demo { font-size: 11.5px; color: var(--txt2); margin-top: 10px; }
.auth-demo b { color: var(--gold); font-family: var(--font-num); }

/* ============================================================
   变体 B：品牌横幅 (顶部红金 banner)
   ============================================================ */
.auth-shell[data-variant="banner"] .auth-brandpanel {
  background: linear-gradient(160deg, #2a1418, #14110d);
  border-bottom: 1px solid var(--gold-deep);
  padding: 30px 38px 24px; margin-bottom: 4px;
}
.auth-shell[data-variant="banner"] .auth-brandpanel::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px 160px at 50% 0%, rgba(232,196,134,.16), transparent 70%);
}
.auth-shell[data-variant="banner"] .auth-draw { display: flex; }
.auth-shell[data-variant="banner"] .auth-tagline { color: #cdb89a; }

/* ============================================================
   变体 C：双栏 (左品牌 / 右表单)
   ============================================================ */
.auth-shell[data-variant="split"] { max-width: 800px; grid-template-columns: 1fr 1fr; }
.auth-shell[data-variant="split"] .auth-aside {
  display: flex; flex-direction: column; justify-content: center; gap: 0;
  padding: 44px 40px;
  background:
    radial-gradient(360px 260px at 24% 18%, rgba(232,196,134,.12), transparent 70%),
    linear-gradient(165deg, #2a1418, #11100c);
  border-right: 1px solid var(--gold-deep);
}
.auth-aside { display: none; }
.auth-shell[data-variant="split"] .auth-brandpanel { display: none; }
.auth-shell[data-variant="split"] .auth-form { padding: 44px 40px 22px; }
.auth-shell[data-variant="split"] .auth-foot { padding: 0 40px 30px; }
.auth-aside-mark {
  width: 54px; height: 54px; border-radius: 14px;
  background: linear-gradient(145deg, var(--red), var(--red-deep));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-num); font-size: 30px; font-weight: 700; color: #fff;
  box-shadow: 0 8px 22px rgba(178,48,47,.45), inset 0 1px 0 rgba(255,255,255,.28); margin-bottom: 20px;
}
.auth-aside-title { font-size: 25px; font-weight: 700; line-height: 1.3; }
.auth-aside-title span { display: block; font-family: var(--font-num); font-size: 12px; letter-spacing: .24em; color: var(--gold); margin-top: 7px; }
.auth-aside-desc { font-size: 13px; color: #c7b699; line-height: 1.85; margin-top: 18px; }
.auth-aside-feats { display: flex; flex-direction: column; gap: 11px; margin-top: 24px; }
.auth-aside-feat { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #d9c8ab; }
.auth-aside-feat svg { color: var(--gold); flex: none; }

@media (max-width: 720px) {
  .auth-shell[data-variant="split"] { grid-template-columns: 1fr; max-width: 432px; }
  .auth-shell[data-variant="split"] .auth-aside { display: none; }
  .auth-shell[data-variant="split"] .auth-brandpanel { display: block; }
}

/* ============================================================
   H5 登录 (移动端)
   ============================================================ */
.auth-h5-stage {
  min-height: 100vh; display: flex; justify-content: center;
  background:
    radial-gradient(560px 380px at 50% 0%, rgba(232,196,134,.08), transparent 60%),
    radial-gradient(460px 360px at 90% 104%, rgba(178,48,47,.12), transparent 62%),
    #07090d;
}
.auth-h5 {
  width: 100%; max-width: 440px; min-height: 100vh; position: relative;
  display: flex; flex-direction: column; background: var(--bg);
  box-shadow: 0 0 60px rgba(0,0,0,.6); overflow: hidden;
}
.auth-h5-hero {
  flex: none; padding: 56px 26px 30px; text-align: center; position: relative;
  background: linear-gradient(170deg, #2a1418 0%, #14110d 58%, var(--bg) 100%);
}
.auth-h5-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(360px 200px at 50% 8%, rgba(232,196,134,.14), transparent 70%);
}
.auth-h5-mark {
  position: relative; z-index: 1; width: 64px; height: 64px; border-radius: 17px; margin: 0 auto 16px;
  background: linear-gradient(145deg, var(--red), var(--red-deep));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-num); font-size: 38px; font-weight: 700; color: #fff;
  box-shadow: 0 10px 26px rgba(178,48,47,.5), inset 0 1px 0 rgba(255,255,255,.28);
}
.auth-h5-title { position: relative; z-index: 1; font-size: 25px; font-weight: 700; letter-spacing: .03em; }
.auth-h5-title span { display: block; font-family: var(--font-num); font-size: 11.5px; letter-spacing: .26em; color: var(--gold); margin-top: 6px; }
.auth-h5-tagline { position: relative; z-index: 1; font-size: 12.5px; color: #cdb89a; margin-top: 11px; }
.auth-h5-form { flex: 1; padding: 26px 22px; display: flex; flex-direction: column; gap: 16px; }
.auth-h5-form .auth-submit { padding: 15px; }
.auth-h5-foot { flex: none; padding: 0 22px calc(26px + env(safe-area-inset-bottom)); text-align: center; }

/* ============================================================
   服务条款页 (PC)
   ============================================================ */
.terms-stage { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.terms-head {
  flex: none; display: flex; align-items: center; gap: 14px;
  padding: 16px 28px; background: linear-gradient(180deg, #101926, #0d141d);
  border-bottom: 1px solid var(--line2);
}
.terms-mark {
  width: 42px; height: 42px; border-radius: 11px; flex: none;
  background: linear-gradient(145deg, var(--red), var(--red-deep)); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-num); font-size: 25px; font-weight: 700;
  box-shadow: 0 4px 14px rgba(178,48,47,.4), inset 0 1px 0 rgba(255,255,255,.25);
}
.terms-head-name { font-size: 19px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.terms-head-name span { font-family: var(--font-num); font-size: 11px; color: var(--gold); letter-spacing: .16em; margin-left: 6px; }
.terms-head-sub { font-size: 11.5px; color: var(--txt3); margin-top: 3px; }
.terms-head-user { margin-left: auto; display: flex; align-items: center; gap: 11px; }
.terms-hu-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: linear-gradient(145deg, var(--bg4), var(--bg3)); border: 1px solid var(--gold-deep);
  color: var(--gold); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600;
}
.terms-hu-name { font-size: 14px; font-weight: 600; }
.terms-hu-name b { color: var(--gold); font-family: var(--font-num); margin-left: 2px; }
.terms-hu-role { font-size: 11px; color: var(--ok); margin-top: 2px; }

.terms-body { flex: 1; overflow-y: auto; padding: 30px 24px; min-height: 0; }
.terms-inner { max-width: 880px; margin: 0 auto; }

.terms-titlewrap { text-align: center; margin-bottom: 26px; }
.terms-kicker { font-family: var(--font-num); font-size: 12px; letter-spacing: .26em; color: var(--gold); }
.terms-title { font-size: 28px; font-weight: 700; margin: 10px 0 8px; letter-spacing: .02em; }
.terms-meta { font-size: 12.5px; color: var(--txt3); }

.terms-alert {
  display: flex; gap: 13px; align-items: flex-start;
  background: linear-gradient(165deg, rgba(217,67,67,.10), rgba(217,67,67,.02));
  border: 1px solid rgba(217,67,67,.34); border-radius: var(--r-md); padding: 16px 18px; margin-bottom: 24px;
}
.terms-alert svg { flex: none; color: var(--red); margin-top: 1px; }
.terms-alert-t { font-size: 14px; font-weight: 700; color: #f0a0a0; margin-bottom: 4px; }
.terms-alert-d { font-size: 13px; color: var(--txt2); line-height: 1.7; }

.terms-toc {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px;
  padding-bottom: 22px; border-bottom: 1px solid var(--line);
}
.terms-toc-chip {
  font-size: 12.5px; color: var(--txt2); background: var(--bg3); border: 1px solid var(--line2);
  border-radius: 20px; padding: 6px 14px; cursor: pointer; transition: all .12s ease; text-decoration: none;
}
.terms-toc-chip:hover { color: var(--gold); border-color: var(--gold-deep); }
.terms-toc-chip b { font-family: var(--font-num); color: var(--gold); margin-right: 5px; }

.terms-sec { margin-bottom: 26px; scroll-margin-top: 20px; }
.terms-sec-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.terms-sec-no {
  font-family: var(--font-num); font-size: 15px; font-weight: 700; color: #2a1d05;
  background: linear-gradient(180deg, var(--gold), var(--gold-deep)); border-radius: 7px;
  padding: 3px 10px; flex: none; line-height: 1.25;
}
.terms-sec-title { font-size: 18px; font-weight: 700; color: var(--txt); }
.terms-sec-body { padding-left: 4px; }
.terms-p { font-size: 14px; color: var(--txt2); line-height: 1.85; margin: 0 0 11px; }
.terms-list { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 9px; }
.terms-li { display: flex; gap: 11px; font-size: 13.5px; color: var(--txt2); line-height: 1.7; }
.terms-li-no {
  flex: none; font-family: var(--font-num); font-size: 12px; font-weight: 600; color: var(--gold);
  background: rgba(232,196,134,.1); border: 1px solid var(--gold-deep); border-radius: 6px;
  min-width: 30px; height: 23px; display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.terms-li-tx { flex: 1; min-width: 0; }
.terms-li b { color: var(--txt); font-weight: 600; }
.terms-note {
  font-size: 13px; color: var(--txt2); line-height: 1.7;
  background: var(--bg2); border: 1px solid var(--line); border-left: 3px solid var(--gold);
  border-radius: var(--r-sm); padding: 12px 15px; margin: 4px 0 8px;
}
.terms-divider { height: 1px; background: var(--line); margin: 30px 0; }
.terms-sign { font-size: 12.5px; color: var(--txt3); line-height: 1.8; text-align: center; }

/* 底部操作栏 */
.terms-actionbar {
  flex: none; display: flex; align-items: center; gap: 18px;
  padding: 16px 28px calc(16px + env(safe-area-inset-bottom));
  background: var(--bg2); border-top: 1px solid var(--line2);
  box-shadow: 0 -10px 30px rgba(0,0,0,.35);
}
.terms-action-note { font-size: 12.5px; color: var(--txt3); line-height: 1.6; flex: 1; min-width: 0; }
.terms-action-note b { color: var(--txt2); }
.terms-actions { display: flex; gap: 12px; flex: none; }
.terms-btn-decline { padding: 13px 28px; font-size: 15px; border-radius: 10px; }
.terms-btn-accept { padding: 13px 40px; font-size: 15px; border-radius: 10px; position: relative; }
.terms-btn-accept[disabled] { opacity: .5; cursor: not-allowed; }

/* 已读到底进度 (可选辅助) */
.terms-progress {
  flex: none; align-self: center; display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--txt3);
}
.terms-progress .bar { width: 88px; height: 5px; border-radius: 3px; background: var(--bg4); overflow: hidden; }
.terms-progress .bar i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--gold-deep), var(--gold)); transition: width .15s linear; }

/* ============================================================
   服务条款页 (H5)
   ============================================================ */
.terms-h5-stage { min-height: 100vh; display: flex; justify-content: center; background: #07090d; }
.terms-h5 {
  width: 100%; max-width: 440px; min-height: 100vh; height: 100vh; position: relative;
  display: flex; flex-direction: column; background: var(--bg);
  box-shadow: 0 0 60px rgba(0,0,0,.6); overflow: hidden;
}
.terms-h5-head {
  flex: none; display: flex; align-items: center; gap: 11px; padding: 14px 16px;
  background: linear-gradient(180deg, #101a27, #0d141d); border-bottom: 1px solid var(--line2);
}
.terms-h5-mark {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  background: linear-gradient(145deg, var(--red), var(--red-deep)); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-num); font-size: 21px; font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}
.terms-h5-hname { font-size: 16px; font-weight: 700; }
.terms-h5-hsub { font-size: 11px; color: var(--txt3); margin-top: 2px; }
.terms-h5-body { flex: 1; overflow-y: auto; padding: 18px 16px 8px; min-height: 0; -webkit-overflow-scrolling: touch; }
.terms-h5-body .terms-title { font-size: 22px; }
.terms-h5-body .terms-sec-title { font-size: 16px; }
.terms-h5-body .terms-toc { gap: 6px; }
.terms-h5-actionbar {
  flex: none; display: flex; flex-direction: column; gap: 10px;
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  background: var(--bg2); border-top: 1px solid var(--line2);
}
.terms-h5-actionbar .terms-action-note { text-align: center; font-size: 11.5px; }
.terms-h5-btnrow { display: flex; gap: 10px; }
.terms-h5-btnrow .btn { flex: 1; padding: 14px; font-size: 15px; border-radius: 10px; }
.terms-h5-btnrow .terms-btn-accept { flex: 1.4; }
