/* ============================================================
   oo电竞 · 开屏规则同意弹窗 + 收银台条款拦截 1.4.4
   配色全部沿用客户端暗黑设计系统(--surface / --bg2 / --line / --txt),
   不引入新色板;高亮词继续用 .highlight(和规则页同一套)
   ============================================================ */

/* ---------- 开屏规则弹窗 ---------- */
.gate-bg {
  position: fixed; inset: 0; z-index: 99998;
  background: rgba(3, 6, 12, .88);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: calc(14px + var(--safe-top, env(safe-area-inset-top, 0px))) 14px calc(14px + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
}
body.gate-lock { overflow: hidden; }

.gate-box {
  width: 100%; max-width: 520px; max-height: 100%;
  height: min(92vh, 720px);
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line2);
  border-radius: 20px; overflow: hidden; box-shadow: var(--shadow);
  animation: pop .22s ease;
}

.gate-hd { padding: 17px 16px 14px; border-bottom: 1px solid var(--line); flex: none; }
.gate-t { font-size: 18px; font-weight: 800; color: #ffffff; letter-spacing: .3px; }
.gate-sub { font-size: 12.5px; color: var(--txt2); line-height: 1.65; margin-top: 7px; }

/* 规则正文:整篇平铺 + 自己滚动(弹窗里不搞手风琴,少点一次就是少一层门槛) */
.gate-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain; touch-action: pan-y; overflow-x: hidden;
  background: var(--bg2); padding: 4px 16px 0;
}
/* 底部渐隐:让「下面还有内容」看着是设计,而不是被硬生生切掉一行 */
.gate-body::after {
  content: ""; position: sticky; bottom: 0; display: block; height: 26px;
  background: linear-gradient(to top, var(--bg2) 25%, rgba(12, 19, 34, 0));
  pointer-events: none;
}
.gate-group { margin-top: 14px; }
.gate-group + .gate-group { border-top: 1px dashed var(--line); padding-top: 14px; }
.gate-gt {
  font-size: 14px; font-weight: 700; color: #ffffff;
  border-left: 3px solid var(--cyan); padding-left: 9px; line-height: 1.3;
}
.gate-rule { font-size: 12.8px; line-height: 1.78; color: #c9d1d9; margin-top: 10px; }
.gate-rule .highlight { color: var(--gold); font-weight: 700; }

.gate-ft { flex: none; padding: 13px 16px 15px; border-top: 1px solid var(--line); background: var(--surface); }
.gate-chk, .cash-chk { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--txt2); cursor: pointer; }
/* 自绘圆形勾选框:和规则页一样不吃系统默认白底,各版本 WebView 里长得一致 */
.gate-chk input, .cash-chk input {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; margin: 0; flex: none;
  border: 1.5px solid var(--line2); border-radius: 50%;
  background: var(--bg2); position: relative;
}
.gate-chk input:checked, .cash-chk input:checked { background: var(--grad); border-color: transparent; }
.gate-chk input:checked::after, .cash-chk input:checked::after {
  content: ""; position: absolute; left: 5.5px; top: 2.5px;
  width: 4px; height: 8px;
  border: 2px solid #04121a; border-top: 0; border-left: 0;
  transform: rotate(45deg);
}
.gate-ft .btn, .gate-chk + .btn { margin-top: 12px; }
.gate-tip { font-size: 11.5px; color: var(--txt3); text-align: center; margin-top: 9px; }

/* ---------- 收银台:条款一行 + 立即支付 ---------- */
.cash-ch {
  display: flex; align-items: center; gap: 11px; cursor: pointer;
  padding: 11px 12px; border-radius: 14px;
  background: var(--bg2); border: 1px solid var(--line);
  transition: border-color .18s, background-color .18s;
}
.cash-ch + .cash-ch { margin-top: 9px; }
.cash-ch.on { border-color: rgba(34, 211, 238, .55); background: var(--grad-soft); }

.cash-terms {
  display: flex; align-items: center; flex-wrap: wrap; gap: 2px;
  margin-top: 13px; font-size: 13px;
}
.cash-link {
  color: var(--cyan); font-size: 13px; text-decoration: underline;
  cursor: pointer; padding: 2px 0;
}
.cash-terms + .btn { margin-top: 12px; }

/* 未勾选时的「立即支付」:看着就是灰的、点不动 —— 但点得到,点一下会提示先勾选 */
.btn.primary.disabled {
  background: #2a3446; color: #7f8da8; font-weight: 700;
  box-shadow: none; border: 1px solid var(--line);
}
/* 开屏弹窗那颗「同意并进入」:灰着的时候也要是纯灰,不能还留着渐变的影子 */
.btn.primary[disabled] {
  background: #2a3446; color: #7f8da8; font-weight: 700;
  box-shadow: none; border: 1px solid var(--line); opacity: 1;
}
