/* 通用样式：登录/注册/主页面 共用 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background: #f2f4f8; color: #222; min-height: 100vh;
}
.center { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.card {
  background: #fff; border-radius: 12px; padding: 28px 26px;
  width: 360px; box-shadow: 0 6px 24px rgba(0,0,0,.08);
}
.card h2 { text-align: center; margin-bottom: 18px; color: #1a4fa0; }
label { display: block; font-size: 13px; color: #555; margin: 12px 0 4px; }
input {
  width: 100%; padding: 10px 12px; border: 1px solid #d6dbe3;
  border-radius: 8px; font-size: 14px; outline: none;
}
input:focus { border-color: #1a4fa0; }
.hint { color: #aaa; font-size: 12px; }
button.primary {
  width: 100%; margin-top: 18px; padding: 11px; border: none; border-radius: 8px;
  background: #1a4fa0; color: #fff; font-size: 15px; cursor: pointer;
}
button.primary:hover { background: #16438a; }
button.ghost {
  width: 100%; margin-top: 14px; padding: 10px; border: 1px dashed #1a4fa0;
  background: #fff; color: #1a4fa0; border-radius: 8px; cursor: pointer; font-size: 14px;
}
button.ghost:hover { background: #eef3fb; }
.links { margin-top: 14px; font-size: 13px; text-align: center; }
.links a { color: #d23; text-decoration: none; margin: 0 8px; }
.links a:hover { text-decoration: underline; }
.msg { margin-top: 12px; text-align: center; font-size: 13px; min-height: 18px; }
.msg.err { color: #d23; }
.msg.ok { color: #18a058; }

/* 主页面布局 */
.app { display: flex; min-height: 100vh; }
.side {
  width: 200px; background: #1a2b4a; color: #fff; padding: 20px 0;
  display: flex; flex-direction: column;
}
.side .logo { text-align: center; font-size: 18px; font-weight: bold; padding: 0 10px 18px; border-bottom: 1px solid #2c3e5e; }
.side a {
  color: #cdd6e6; text-decoration: none; padding: 14px 22px; font-size: 15px;
  cursor: pointer; border-left: 4px solid transparent;
}
.side a:hover { background: #24385c; }
.side a.active { background: #24385c; border-left-color: #4f9bff; color: #fff; }
.main { flex: 1; padding: 26px 30px; overflow-y: auto; display: flex; flex-direction: column; align-items: center; }
.tabpane { display: none; }
.tabpane.active { display: block; }
.panel {
  background: #fff; border-radius: 10px; padding: 24px 28px; max-width: 820px; width: 100%;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}
.panel h3 { margin-bottom: 16px; color: #1a4fa0; }
.row { display: flex; align-items: center; justify-content: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f0f2f6; text-align: left; }
.row:last-child { border-bottom: none; }
.row .k { color: #666; }
.row .v { font-weight: 600; }
/* 我的账号：简洁列表（无表头、无线框、左侧标签带冒号、行色差） */
.acct-table { width: 100%; border-collapse: collapse; font-size: 15px; margin-top: 4px; }
.acct-table th, .acct-table td { border: none; padding: 12px 14px; text-align: left; vertical-align: middle; }
.acct-table thead { display: none; }
.acct-table tr.light { background: #f8fafd; }
.acct-table tr.dim { background: #f0f3f7; }
.acct-table td:first-child { color: #666; white-space: nowrap; width: 100px; }
.acct-table td:nth-child(2) { font-weight: 600; color: #333; width: 100%; }
.acct-table td:nth-child(3) { text-align: right; white-space: nowrap; }
.acct-table td:empty::after { content: "\2014"; color: #ccc; }
.btn-sm {
  padding: 6px 12px; border: 1px solid #1a4fa0; background: #fff; color: #1a4fa0;
  border-radius: 6px; cursor: pointer; font-size: 13px;
}
.btn-sm:hover { background: #1a4fa0; color: #fff; }
.btn-sm:disabled { opacity: .5; cursor: not-allowed; background: #f0f2f6; color: #aaa; border-color: #ddd; }
/* 【2026-08-11 修复】充值页钻石/金币输入框偶发灰底：根因是浏览器对 type=number 空值/不满足 min 的
   :invalid / :placeholder-shown 原生底色。强制所有伪类下白底，去掉“像被锁住”的灰底观感。 */
.biginput { font-size: 15px; padding: 12px; text-align: center; background:#fff !important; color:#222; }
/* 【2026-08-12】显式指定占位符为浅灰，避免 WebView 从 color:#222 派生出偏深的占位符色（钻石框比金币框更深的问题） */
.biginput::placeholder,
.biginput::-webkit-input-placeholder,
.biginput::-moz-placeholder { color:#9aa3b2; }
.biginput:invalid, .biginput:placeholder-shown, .biginput:disabled,
.biginput:-moz-ui-invalid, .biginput:-moz-submit-invalid,
.biginput::-webkit-inner-spin-button { background:#fff !important; }
/* 【2026-08-11 补刀】Chrome/Edge 自动填充(-webkit-autofill) 用 inset box-shadow 染浅蓝灰底，
   普通 background 盖不住。这里用同色 inset box-shadow 覆盖，并要求文字色，彻底去灰。
   增加 input[type="number"].biginput 选择器提升优先级，避免被其它 input 规则覆盖。 */
input.biginput:-webkit-autofill,
input.biginput:-webkit-autofill:hover,
input.biginput:-webkit-autofill:focus,
input.biginput:-webkit-autofill:active,
input[type="number"].biginput:-webkit-autofill,
input[type="number"].biginput:-webkit-autofill:hover,
input[type="number"].biginput:-webkit-autofill:focus,
input[type="number"].biginput:-webkit-autofill:active {
  -webkit-text-fill-color: #222 !important;
  -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
  box-shadow: 0 0 0 1000px #fff inset !important;
  background-color: #fff !important;
  transition: background-color 9999s ease-in-out 0s;
}
/* 充值看板：XX 页操作行（下载/上传/重签）底色区分，便于与 ABC 充值任务区分 */
tr.xx-row > td { background:#faf5ff; }
tr.xx-row:hover > td { background:#f2e9ff; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #333; margin-top: 12px; cursor: pointer; }
.check input { width: auto; padding: 0; }

/* 钻石输入区 */
.recharge-box { margin-top: 8px; }
.recharge-box .hint { margin-top: 6px; }

/* 套餐卡片 */
.pkg-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; max-width: 1080px; width: 100%; }
.pkg {
  border-radius: 12px; padding: 14px 12px; color: #fff; cursor: pointer;
  aspect-ratio: 2 / 3;            /* 统一宽:高 = 1:1.5 */
  min-height: 0;
  display: flex; flex-direction: column;
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
}
.pkg:hover { filter: brightness(.9); transform: translateY(-3px); box-shadow: 0 8px 22px rgba(0,0,0,.18); }
.pkg.蓝浅 { background: linear-gradient(135deg,#4f93e8,#1f63c4); }   /* 钻石12 蓝（已加深） */
.pkg.蓝深 { background: linear-gradient(135deg,#2f7be0,#1a4fa0); }   /* 钻石34 深蓝 */
.pkg.橙   { background: linear-gradient(135deg,#f0902a,#d9701a); }   /* VIP12 橙 */
.pkg h4 { font-size: 16px; margin-bottom: 3px; }
.pkg .price { font-size: 20px; font-weight: 700; margin: 3px 0 8px; }
.pkg ul { list-style: none; font-size: 12px; line-height: 1.55; opacity: .96; }
.pkg .tag { display: inline-block; margin-top: 8px; font-size: 11px; background: rgba(255,255,255,.2); padding: 2px 8px; border-radius: 10px; }
/* 获取邀请码单卡：复制 VIP套餐1（橙）样式，正方形，仅显示标题 */
.pkg-invite { aspect-ratio: 1 / 1; width: 220px; max-width: 70vw; display: flex; align-items: center; justify-content: center; text-align: center; grid-column: 1 / -1; justify-self: center; }
.pkg-invite h4 { font-size: 18px; margin: 0; }

/* 弹窗
   关键：始终保留在渲染树（display:flex），只切换 visibility/opacity（不碰 pointer-events）。
   - display:flex 常留 → 根治 iOS Safari「display:none→可见后首点被吞（onclick 不触发）」；
   - 不切换 pointer-events → 根治 ArkWeb/部分 Chromium WebView「pointer-events:none→auto 后首点被吞」；
   - visibility:hidden 本身即不可点击且点击穿透，无需 pointer-events 参与。
   所有页面统一用 .show class 显隐（不要用 style.display 直切）。 */
.modal-mask {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center; z-index: 50;
  visibility: hidden; opacity: 0; transition: opacity .18s ease;
}
.modal-mask.show { visibility: visible; opacity: 1; }
.modal {
  position: relative;
  background: #fff; border-radius: 12px; padding: 22px; width: 340px;
}
.modal h3 { margin-bottom: 14px; color: #1a4fa0; padding-right: 28px; }
.modal .close { position: absolute; top: 12px; right: 14px; font-size: 22px; line-height: 1; color: #999; cursor: pointer; }
.modal .close:hover { color: #333; }
.modal .actions { display: flex; gap: 10px; margin-top: 18px; }
.modal .actions button { flex: 1; padding: 10px; border-radius: 8px; border: none; cursor: pointer; font-size: 14px; }
.modal .actions .ok { background: #1a4fa0; color: #fff; }
.modal .actions .cancel { background: #eef1f6; color: #555; }
.info-body { font-size: 14px; line-height: 1.6; color: #333; margin-top: 6px; white-space: pre-wrap; }

/* 聊天浮窗 */
.chat-fab {
  position: fixed; right: 20px; bottom: 20px; width: 54px; height: 54px;
  border-radius: 50%; background: #1a4fa0; color: #fff; font-size: 24px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.25); z-index: 40;
}
.chat-box {
  position: fixed; right: 20px; bottom: 86px; width: 320px; height: 420px;
  background: #fff; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.25);
  display: flex; flex-direction: column; z-index: 41; overflow: hidden;
  visibility: hidden; opacity: 0; transition: opacity .18s ease;
}
.chat-box.show { visibility: visible; opacity: 1; }
.chat-head { background: #1a4fa0; color: #fff; padding: 10px 14px; font-size: 14px; display:flex; justify-content: space-between; }
.chat-head .close { cursor: pointer; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 12px; background: #f7f9fc; }
.chat-msgs .m { margin-bottom: 10px; max-width: 80%; padding: 8px 10px; border-radius: 8px; font-size: 13px; line-height: 1.4; }
.chat-msgs .m.user { background: #d6e6ff; margin-left: auto; }
.chat-msgs .m.operator { background: #fff; border: 1px solid #e2e6ee; }
.chat-input { display: flex; border-top: 1px solid #eee; }
.chat-input input { border: none; flex: 1; padding: 10px; }
.chat-input button { border: none; background: #1a4fa0; color: #fff; padding: 0 16px; cursor: pointer; }
.badge { background: #e23; color: #fff; border-radius: 10px; font-size: 11px; padding: 1px 6px; margin-left: 4px; }

/* ====== 商品展示卡（主页） ====== */
.product-list { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; margin-top: 10px; }
.product-card {
  width: 260px; background: #fff; border-radius: 14px; padding: 16px;
  box-shadow: 0 6px 20px rgba(0,0,0,.08); cursor: pointer; text-align: center;
  transition: transform .15s ease, box-shadow .15s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,.14); }
.product-card img { width: 100%; border-radius: 10px; display: block; aspect-ratio: 1/1; object-fit: cover; background: #eef2f8; }
.product-name { margin-top: 12px; font-size: 17px; font-weight: 700; color: #1a4fa0; }

/* ====== 游戏信息网格（查看弹窗：网页横排 / 手机竖排，自动居中） ====== */
.modal-lg { width: 520px; max-width: 92vw; }
.game-grid { display: flex; flex-direction: row; flex-wrap: wrap; gap: 16px; justify-content: center; margin-top: 6px; }
.game-card { flex: 1 1 260px; min-width: 240px; max-width: 320px; border: 1px solid #e2e8f2; border-radius: 12px; padding: 16px 18px; background: #fbfcfe; }
.game-title { font-size: 18px; font-weight: 700; color: #1a4fa0; margin-bottom: 10px; text-align: center; }
.game-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f0f2f6; font-size: 14px; }
.game-row:last-child { border-bottom: none; }
.game-row span { color: #777; white-space: nowrap; }
.game-row b { font-weight: 600; color: #333; text-align: right; }
.game-row.renew-row input { flex: 1; width: auto; }

/* ====== 顶部栏（游戏充值页） ====== */
.recharge-page { flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  background: #1a2b4a; color: #fff; padding: 12px 22px; position: sticky; top: 0; z-index: 30;
}
.topbar .tb-item { display: flex; flex-direction: column; line-height: 1.35; }
.topbar .tb-item span { font-size: 11px; color: #aab8d4; }
.topbar .tb-item b { font-size: 15px; font-weight: 600; }
.topbar .tb-actions { margin-left: auto; display: flex; gap: 10px; }
.tb-btn { padding: 8px 16px; border: none; border-radius: 8px; background: #4f9bff; color: #fff; cursor: pointer; font-size: 14px; }
.tb-btn:hover { background: #3d86e6; }
.tb-btn.tb-danger { background: #e2553a; }
.tb-btn.tb-danger:hover { background: #c8462d; }
.recharge-main { padding-top: 26px; }

/* ====== 联系客服弹窗（QQ/微信复制） ====== */
.contact-body { font-size: 14px; line-height: 1.7; color: #333; text-align: center; padding: 6px 0 2px; }
.contact-body b { color: #1a4fa0; font-size: 16px; }
.contact-btns { display: flex; gap: 12px; justify-content: center; margin-top: 14px; }
.contact-btns .ok { flex: 1; padding: 10px; border-radius: 8px; border: none; background: #1a4fa0; color: #fff; cursor: pointer; font-size: 14px; }
.contact-btns .ok:hover { background: #16438a; }

/* 手机端响应式：侧栏转顶部横条，卡片单列，面板满宽 */
@media (max-width: 768px) {
  .app { flex-direction: column; }
  .side { width: 100%; flex-direction: row; padding: 0; overflow-x: auto; }
  .side .logo { display: none; }
  .side a {
    padding: 12px 14px; border-left: none; border-bottom: 3px solid transparent;
    white-space: nowrap; font-size: 14px;
  }
  .side a.active { border-left: none; border-bottom-color: #4f9bff; }
  .main { padding: 16px 12px; align-items: center; }
  .panel { max-width: 100%; width: 100%; }
  .pkg-grid { grid-template-columns: 1fr 1fr; max-width: 100%; }   /* 手机端也两列，与电脑端一致 */
  .game-grid { flex-direction: column; align-items: stretch; }
  .topbar { gap: 14px; padding: 10px 14px; }
  .topbar .tb-item b { font-size: 14px; }
  .chat-box {
    width: calc(100% - 40px);
    right: 20px;
    bottom: 86px;
    height: calc(100vh - 120px);
    height: calc(100dvh - 120px);   /* 动态视口高度，规避移动端地址栏占用 */
    max-height: 85vh;
  }
  .entry-card { width: 220px; height: 220px; }
  .entry-title { font-size: 19px; }
}

/* ====== 主页入口卡（部族 / 测试） ====== */
.entry-card {
  width: 260px; height: 260px; border-radius: 14px; padding: 16px;
  box-shadow: 0 6px 20px rgba(0,0,0,.08); cursor: pointer; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: transform .15s ease, box-shadow .15s ease;
}
.entry-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,.14); }
/* 部族卡片：上绿下黄渐变，中心“充💎入口” */
.card-tribez { background: linear-gradient(to bottom, #2bb24c, #f5c518); color: #fff; }
/* 测试入口卡片：蓝→紫渐变 */
.card-test { background: linear-gradient(135deg, #3b82f6, #8b5cf6); color: #fff; }
.entry-title { font-size: 22px; font-weight: 800; text-shadow: 0 1px 3px rgba(0,0,0,.25); }
.entry-sub { font-size: 13px; margin-top: 8px; opacity: .9; }

/* ====== 申请解封页 ====== */
.apply-wrap { max-width: 720px; width: 100%; margin: 0 auto; }
.apply-warn {
  background: #fff7e6; border: 1px solid #ffd591; border-radius: 10px;
  padding: 16px 18px; color: #874d00; font-size: 14px; line-height: 1.7; margin-bottom: 20px;
}
.apply-warn b { color: #d4380d; }
.apply-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.apply-btn {
  border: none; border-radius: 12px; padding: 22px 16px; color: #fff; cursor: pointer;
  font-size: 16px; font-weight: 700; text-align: center; line-height: 1.5;
  box-shadow: 0 4px 14px rgba(0,0,0,.12); transition: filter .15s ease, transform .15s ease;
}
.apply-btn:hover { filter: brightness(.95); transform: translateY(-2px); }
.apply-btn .sub { display: block; font-size: 12px; font-weight: 400; opacity: .9; margin-top: 6px; }
.apply-btn.blue { background: linear-gradient(135deg,#4f9bff,#1a4fa0); }
.apply-btn.green { background: linear-gradient(135deg,#36b37e,#1a8a5c); }
@media (max-width: 768px) { .apply-grid { grid-template-columns: 1fr; } }

/* ====== 确认解封页（X/Y 共用） ====== */
.confirm-wrap { max-width: 680px; width: 100%; margin: 0 auto; }
.confirm-copy {
  background: #eef4ff; border: 1px solid #adc6ff; border-radius: 10px;
  padding: 14px 16px; color: #1d39c4; font-size: 15px; line-height: 1.8; margin-bottom: 18px;
}
.confirm-btns { display: flex; gap: 14px; justify-content: center; margin-top: 22px; }
.confirm-btns button { flex: 1; max-width: 240px; }
.btn-green.done { background: #237804; cursor: default; opacity: .9; }
.btn-green {
  background: #18a058; color: #fff; border: none; border-radius: 8px;
  padding: 12px 18px; font-size: 15px; cursor: pointer;
}
.btn-green:hover { background: #159150; }
.btn-red {
  background: #e2553a; color: #fff; border: none; border-radius: 8px;
  padding: 12px 18px; font-size: 15px; cursor: pointer;
}
.btn-red:hover { background: #c8462d; }
.btn-red:disabled { background: #f0a89c; cursor: not-allowed; }
/* 二级确认弹窗（3 秒倒计时解锁） */
.modal-box {
  position: relative; background: #fff; border-radius: 12px; padding: 22px; width: 360px; max-width: 92vw;
}
.modal-box h3 { margin-bottom: 14px; color: #cf1322; padding-right: 28px; }
.modal-box .close { position: absolute; top: 12px; right: 14px; font-size: 22px; line-height: 1; color: #999; cursor: pointer; }
.modal-box .close:hover { color: #333; }
.modal-box .actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-box .actions button { flex: 1; padding: 10px; border-radius: 8px; border: none; cursor: pointer; font-size: 14px; }
.modal-box .actions .ok { background: #e2553a; color: #fff; }
.modal-box .actions .ok:disabled { background: #f0a89c; cursor: not-allowed; }
.modal-box .actions .cancel { background: #eef1f6; color: #555; }
/* 绑定支持码弹窗：关闭按钮（右上角圆形） */
.modal-box .modal-close {
  position: absolute; top: 10px; right: 10px;
  width: 30px; height: 30px; border-radius: 50%;
  border: none; background: #f0f0f0; color: #888;
  font-size: 18px; line-height: 30px; text-align: center;
  cursor: pointer; transition: all .2s; z-index: 10;
}
.modal-box .modal-close:hover { background: #e0e0e0; color: #333; }
/* 绑定支持码弹窗：标题（居中、加黑加粗） */
.modal-box .modal-msg {
  text-align: center; font-size: 18px; font-weight: bold;
  color: #1a4fa0; margin-bottom: 14px; padding: 0 36px;
}
/* 关联码输入 */
.rel-input {
  width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 8px; font-size: 16px;
  text-align: center; letter-spacing: 2px;
}
.rel-input:focus { border-color: #1a4fa0; }
.confirm-submit { margin-top: 20px; text-align: center; }
.step-img { display: block; margin: 12px auto; max-width: 100%; border-radius: 8px; }
