/* ============ 赛事数据模块（仿 njstats 暗色主题） ============ */
.nj-app {
  --nj-bg: #0e1420;
  --nj-bg2: #141c2c;
  --nj-card: #1a2334;
  --nj-card2: #202c44;
  --nj-line: #2a3a55;
  --nj-text: #e8ecf4;
  --nj-sub: #8b95a8;
  --nj-dim: #5b6b85;
  --nj-green: #00c866;
  --nj-red: #ff5b6a;
  --nj-orange: #ff9f43;
  --nj-blue: #4da3ff;
  --nj-yellow: #ffd43b;
  min-height: 100vh;
  background: var(--nj-bg);
  color: var(--nj-text);
  font-size: 14px;
}
.nj-app .nj-header {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: rgba(14, 20, 32, .97);
  border-bottom: 1px solid var(--nj-line);
}
.nj-app .nj-back {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--nj-card); color: var(--nj-text);
  font-size: 16px; text-decoration: none; flex: none;
}
.nj-app .nj-back:active { background: var(--nj-card2); }
.nj-app .nj-header .nj-back[data-action="authBack"] {
  width: auto; min-width: 64px; padding: 0 10px; white-space: nowrap;
  cursor: pointer;
}
.nj-app .nj-title { font-size: 17px; font-weight: 600; flex: 1; }
.nj-app .nj-header .nj-hd-sub { font-size: 12px; color: var(--nj-sub); }

/* 左上角登录按钮 */
.nj-app .nj-login-btn {
  flex: none; display: flex; align-items: center; justify-content: center;
  min-width: 56px; height: 30px; padding: 0 10px; border-radius: 15px;
  background: var(--nj-card); border: 1px solid var(--nj-line);
  color: var(--nj-sub); font-size: 12px; cursor: pointer; white-space: nowrap;
  max-width: 96px; overflow: hidden; text-overflow: ellipsis;
}
.nj-app .nj-login-btn.logged {
  color: var(--nj-green);
  border-color: rgba(0, 200, 102, .45);
  background: rgba(0, 200, 102, .1);
}
.nj-app .nj-login-btn:active { background: var(--nj-card2); }

/* 登录 / 退出 弹窗 */
.nj-app .nj-login-mask {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(0, 0, 0, .62);
  display: flex; align-items: center; justify-content: center;
}
.nj-app .nj-login-box {
  width: 280px; max-width: calc(100vw - 48px); box-sizing: border-box;
  background: var(--nj-card); border: 1px solid var(--nj-line);
  border-radius: 14px; padding: 20px 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .5);
}
.nj-app .nj-login-title { font-size: 16px; font-weight: 600; margin-bottom: 14px; }
.nj-app .nj-login-input {
  width: 100%; box-sizing: border-box;
  height: 40px; margin-bottom: 10px; padding: 0 12px;
  border-radius: 8px; border: 1px solid var(--nj-line);
  background: var(--nj-bg2); color: var(--nj-text); font-size: 14px; outline: none;
}
.nj-app .nj-login-input:focus { border-color: var(--nj-green); }
.nj-app .nj-login-err { color: var(--nj-red); font-size: 12px; min-height: 16px; margin-bottom: 6px; }
.nj-app .nj-login-btns { display: flex; gap: 10px; margin-top: 4px; }
.nj-app .nj-login-btns button {
  flex: 1; height: 38px; border-radius: 8px; border: none;
  font-size: 14px; cursor: pointer;
}
.nj-app .nj-login-btn-ok { background: var(--nj-green); color: #04160c; font-weight: 600; }
.nj-app .nj-login-btn-cancel { background: var(--nj-card2); color: var(--nj-text); }
.nj-app .nj-login-btn-ok:active, .nj-app .nj-login-btn-cancel:active { opacity: .85; }
.nj-app .nj-login-tip { margin-top: 12px; font-size: 11px; color: var(--nj-dim); text-align: center; line-height: 1.6; }
.nj-app .nj-login-link { margin-top: 12px; text-align: center; font-size: 12px; color: var(--nj-dim); }
.nj-app .nj-login-link span { color: var(--nj-green); cursor: pointer; }
.nj-app .nj-login-link span:active { opacity: .8; }

/* 登录方式切换：账号密码 / 手机号验证码 */
.nj-app .nj-login-tabs {
  display: flex; gap: 6px; margin-bottom: 14px;
  border-bottom: 1px solid var(--nj-line);
}
.nj-app .nj-login-tab {
  flex: 1; position: relative; padding: 0 0 9px;
  text-align: center; font-size: 14px; color: var(--nj-dim); cursor: pointer;
}
.nj-app .nj-login-tab.on { color: var(--nj-green); font-weight: 600; }
.nj-app .nj-login-tab.on::after {
  content: ''; position: absolute; left: 50%; bottom: -1px;
  width: 28px; height: 2px; margin-left: -14px;
  border-radius: 1px; background: var(--nj-green);
}
.nj-app .nj-login-pane[hidden] { display: none; }
.nj-app .nj-login-row { display: flex; gap: 8px; }
.nj-app .nj-login-row .nj-login-input { flex: 1; min-width: 0; }
.nj-app .nj-login-captcha,
.nj-app .nj-login-send {
  flex: none; height: 40px; margin-bottom: 10px; padding: 0 10px;
  border: 1px solid var(--nj-line); border-radius: 8px;
  background: var(--nj-bg2); color: var(--nj-green);
  font-size: 13px; cursor: pointer; white-space: nowrap;
}
.nj-app .nj-login-captcha { width: 90px; color: var(--nj-text); font-size: 14px; letter-spacing: 1px; }
.nj-app .nj-login-send { min-width: 92px; }
.nj-app .nj-login-send.off { color: var(--nj-dim); }
.nj-app .nj-login-captcha:active,
.nj-app .nj-login-send:active { opacity: .8; }

/* 登录 / 注册整页界面（#login） */
.nj-app .nj-auth-page { padding: 16px 16px 40px; }
.nj-app .nj-auth-card {
  max-width: 420px; margin: 0 auto; box-sizing: border-box;
  padding: 18px 16px 20px;
  background: var(--nj-card); border: 1px solid var(--nj-line);
  border-radius: 14px;
}
.nj-app .nj-auth-body[hidden],
.nj-app .nj-auth-form[hidden] { display: none; }
/* 二级切换：账号密码 / 手机号验证码 */
.nj-app .nj-auth-seg {
  display: flex; gap: 6px; margin: 2px 0 14px; padding: 4px;
  border-radius: 9px; background: rgba(255, 255, 255, .05);
}
.nj-app .nj-auth-seg span {
  flex: 1; padding: 7px 0; border-radius: 7px;
  text-align: center; font-size: 13px; color: var(--nj-dim); cursor: pointer;
}
.nj-app .nj-auth-seg span.on {
  background: var(--nj-green); color: #04160c; font-weight: 600;
}
.nj-app .nj-auth-ok {
  width: 100%; height: 42px; margin-top: 2px;
  border: none; border-radius: 9px;
  background: var(--nj-green); color: #04160c;
  font-size: 15px; font-weight: 600; cursor: pointer;
}
.nj-app .nj-auth-ok:active { opacity: .85; }
.nj-app .nj-auth-ok:disabled { opacity: .6; }
.nj-app .nj-auth-foot {
  max-width: 420px; margin: 14px auto 0;
  text-align: center; font-size: 11px; color: var(--nj-dim);
}

/* 标签栏 */
.nj-app .nj-tabs {
  display: flex; gap: 6px; overflow-x: auto;
  padding: 10px 12px;
  scrollbar-width: none;
}
.nj-app .nj-tabs::-webkit-scrollbar { display: none; }
.nj-app .nj-tab {
  flex: none; padding: 6px 14px; border-radius: 16px;
  background: var(--nj-card); color: var(--nj-sub);
  font-size: 13px; cursor: pointer; border: 1px solid transparent;
  white-space: nowrap;
}
.nj-app .nj-tab.active {
  background: rgba(0, 200, 102, .15);
  color: var(--nj-green);
  border-color: rgba(0, 200, 102, .4);
  font-weight: 600;
}

/* 联赛筛选 */
.nj-app .nj-filter-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px; overflow-x: auto;
  border-bottom: 1px solid var(--nj-line);
  scrollbar-width: none;
}
.nj-app .nj-filter-bar::-webkit-scrollbar { display: none; }
.nj-app .nj-league-chip {
  flex: none; padding: 4px 12px; border-radius: 14px;
  background: var(--nj-bg2); border: 1px solid var(--nj-line);
  color: var(--nj-sub); font-size: 12px; cursor: pointer;
}
.nj-app .nj-league-chip.active {
  color: var(--nj-green); border-color: rgba(0, 200, 102, .5);
  background: rgba(0, 200, 102, .1);
}

/* 列表 */
.nj-app .nj-list { padding: 6px 10px 80px; }
.nj-app .nj-match-card {
  background: var(--nj-card);
  border-radius: 12px; margin: 8px 0; overflow: hidden;
  cursor: pointer; border: 1px solid var(--nj-line);
}
.nj-app .nj-match-card:active { background: var(--nj-card2); }
.nj-app .nj-mc-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px 4px; font-size: 12px; color: var(--nj-sub);
}
.nj-app .nj-mc-league { display: flex; align-items: center; gap: 6px; }
.nj-app .nj-mc-league img { width: 16px; height: 16px; border-radius: 3px; }
.nj-app .nj-mc-status { display: flex; align-items: center; gap: 6px; }
.nj-app .nj-status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--nj-dim);
}
.nj-app .nj-status-dot.live { background: var(--nj-red); animation: nj-blink 1s infinite; }
.nj-app .nj-status-dot.ft { background: var(--nj-green); }
.nj-app .nj-mc-main {
  display: flex; align-items: center; padding: 4px 12px;
}
.nj-app .nj-team {
  flex: 1; display: flex; align-items: center; gap: 8px;
  font-size: 14px; min-width: 0;
}
.nj-app .nj-team .nj-team-name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nj-app .nj-team.home { flex-direction: row-reverse; text-align: right; }
.nj-app .nj-team.away { }
.nj-app .nj-team img { width: 22px; height: 22px; border-radius: 4px; flex: none; }
.nj-app .nj-score {
  flex: none; padding: 4px 12px;
  font-size: 22px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.nj-app .nj-score .nj-score-sep { color: var(--nj-dim); margin: 0 3px; font-weight: 400; }
.nj-app .nj-mc-sub {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px 8px; font-size: 11px; color: var(--nj-dim);
}
.nj-app .nj-mc-sub .nj-ht { }
.nj-app .nj-mc-sub .nj-xg { }
.nj-app .nj-mc-sub .nj-xg b { color: var(--nj-blue); font-weight: 600; }
.nj-app .nj-odds-strip {
  display: flex; align-items: center; gap: 4px;
  padding: 6px 12px; border-top: 1px solid var(--nj-line);
  background: rgba(255,255,255,.02);
  font-size: 11px; color: var(--nj-sub);
  overflow-x: auto; scrollbar-width: none;
}
.nj-app .nj-odds-strip::-webkit-scrollbar { display: none; }
.nj-app .nj-odds-item { flex: none; }
.nj-app .nj-odds-item b { color: var(--nj-orange); font-weight: 600; margin-right: 2px; }
.nj-app .nj-odds-item .sep { color: var(--nj-dim); margin: 0 2px; }

/* 加载/空态 */
.nj-app .nj-loading, .nj-app .nj-empty {
  text-align: center; padding: 60px 20px; color: var(--nj-sub); font-size: 13px;
}
.nj-app .nj-spinner {
  width: 28px; height: 28px; margin: 0 auto 12px;
  border: 3px solid var(--nj-line); border-top-color: var(--nj-green);
  border-radius: 50%; animation: nj-spin .8s linear infinite;
}
@keyframes nj-spin { to { transform: rotate(360deg); } }
@keyframes nj-blink { 50% { opacity: .3; } }

/* ============ 首页 ============ */
.nj-app .nj-home {
  padding: 20px 14px;
  display: flex; flex-direction: column; gap: 12px;
}
.nj-app .nj-home-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--nj-card);
  border: 1px solid var(--nj-line);
  border-radius: 14px;
  padding: 16px;
  text-decoration: none; color: var(--nj-text);
}
.nj-app .nj-home-card:active { background: var(--nj-card2); }
.nj-app .nj-home-card .ic {
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--nj-bg2);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex: none;
}
.nj-app .nj-home-card .tx { flex: 1; }
.nj-app .nj-home-card .tx .t { font-size: 16px; font-weight: 700; }
.nj-app .nj-home-card .tx .s { font-size: 12px; color: var(--nj-sub); margin-top: 3px; }
.nj-app .nj-home-card .go { color: var(--nj-dim); font-size: 20px; }

/* ============ 详情页 ============ */
.nj-app .nj-detail-head {
  padding: 12px;
  background: linear-gradient(180deg, #16213a, #10182a);
  border-bottom: 1px solid var(--nj-line);
}
.nj-app .nj-dh-league {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  color: var(--nj-sub); font-size: 12px; margin-bottom: 10px;
}
.nj-app .nj-dh-league img { width: 16px; height: 16px; border-radius: 3px; }
.nj-app .nj-dh-main {
  display: flex; align-items: center;
}
.nj-app .nj-dh-team {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-width: 0;
}
.nj-app .nj-dh-team img { width: 44px; height: 44px; border-radius: 8px; }
.nj-app .nj-dh-team .nm { font-size: 13px; font-weight: 600; text-align: center; }
.nj-app .nj-dh-team .rank {
  font-size: 11px; color: var(--nj-green);
  background: rgba(0,200,102,.1); padding: 1px 8px; border-radius: 8px;
}
.nj-app .nj-dh-score {
  flex: none; padding: 0 12px; text-align: center;
}
.nj-app .nj-dh-score .sc {
  font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.nj-app .nj-dh-score .st { font-size: 11px; color: var(--nj-sub); margin-top: 2px; }
.nj-app .nj-dh-sub {
  display: flex; justify-content: center; gap: 14px; margin-top: 12px;
  font-size: 12px; color: var(--nj-sub);
}
.nj-app .nj-dh-sub b { color: var(--nj-blue); }
.nj-app .nj-dh-extra {
  display: flex; justify-content: center; gap: 18px; margin-top: 8px;
  font-size: 12px; color: var(--nj-sub); flex-wrap: wrap;
}
.nj-app .nj-dh-extra .it { text-align: center; }
.nj-app .nj-dh-extra .v { font-size: 15px; font-weight: 700; color: var(--nj-text); margin-top: 2px; }

/* 详情 Tab */
.nj-app .nj-detail-tabs {
  display: flex; gap: 4px; padding: 8px 12px;
  background: var(--nj-bg2); border-bottom: 1px solid var(--nj-line);
}
.nj-app .nj-detail-tab {
  flex: 1; text-align: center; padding: 8px 4px;
  border-radius: 8px; font-size: 13px; color: var(--nj-sub);
  cursor: pointer;
}
.nj-app .nj-detail-tab.active {
  color: var(--nj-green); background: rgba(0,200,102,.12);
  font-weight: 600;
}
.nj-app .nj-detail-tab.nj-tab-disabled {
  opacity: .4;
  cursor: default;
}

/* 详情提示条（无 oid 无法加载完整数据时） */
.nj-app .nj-detail-note {
  margin: 8px 12px 0; padding: 8px 10px;
  background: rgba(255, 193, 7, .12);
  border: 1px solid rgba(255, 193, 7, .35);
  border-radius: 8px;
  font-size: 12px; color: #c99700; line-height: 1.5;
}

/* 板块 */
.nj-app .nj-sec { padding: 10px 12px; }
.nj-app .nj-sec-title {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 600; color: var(--nj-text);
  padding: 4px 0 8px;
}
.nj-app .nj-sec-title .tag { font-size: 11px; color: var(--nj-sub); font-weight: 400; }

/* 指数表 */
.nj-app .nj-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.nj-app .nj-table th {
  color: var(--nj-sub); font-weight: 400; padding: 6px 8px;
  text-align: center; border-bottom: 1px solid var(--nj-line);
  font-size: 11px;
}
.nj-app .nj-table td {
  padding: 8px; text-align: center;
  border-bottom: 1px solid rgba(42,58,85,.4);
  font-variant-numeric: tabular-nums;
}
.nj-app .nj-table tr:last-child td { border-bottom: none; }
.nj-app .nj-table .comp {
  display: flex; align-items: center; gap: 4px;
  color: var(--nj-sub); justify-content: center;
}
.nj-app .nj-table .type-cell { color: var(--nj-text); font-weight: 600; }
.nj-app .nj-table .odds-3 { display: inline-flex; gap: 2px; align-items: center; }
.nj-app .nj-table .odds-3 span {
  background: var(--nj-bg2); padding: 2px 6px; border-radius: 4px; min-width: 34px;
}
.nj-app .nj-table .odds-3 .wtr { color: var(--nj-green); font-weight: 700; }
.nj-app .nj-table .odds-3 .hcp { color: var(--nj-orange); font-weight: 600; }
.nj-app .nj-table .odds-3 .ltr { color: var(--nj-red); }
.nj-app .nj-table .grp td {
  background: var(--nj-bg2); color: var(--nj-green);
  font-weight: 600; font-size: 11px; padding: 4px 8px;
}
.nj-app .nj-basic-odds { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px; margin-bottom: 10px; background: var(--nj-card); border: 1px solid var(--nj-border); border-radius: 8px; font-size: 13px; }
.nj-app .nj-basic-odds span { color: var(--nj-text); }
.nj-app .nj-basic-odds .wtr { color: var(--nj-green); font-weight: 700; }
.nj-app .nj-basic-odds .ltr { color: var(--nj-red); }

/* 概率条 */
.nj-app .nj-prob {
  background: var(--nj-card); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 8px;
}
.nj-app .nj-prob-row {
  display: flex; align-items: center; gap: 10px; padding: 5px 0;
}
.nj-app .nj-prob-label { flex: none; width: 120px; font-size: 12px; color: var(--nj-sub); }
.nj-app .nj-prob-bar { flex: 1; height: 10px; background: var(--nj-bg2); border-radius: 5px; overflow: hidden; }
.nj-app .nj-prob-fill {
  height: 100%; border-radius: 5px;
  background: linear-gradient(90deg, #00c866, #7ce8b0);
  transition: width .4s;
}
.nj-app .nj-prob-fill.low { background: linear-gradient(90deg, #ff9f43, #ffd43b); }
.nj-app .nj-prob-fill.hi { background: linear-gradient(90deg, #00c866, #7ce8b0); }
.nj-app .nj-prob-val { flex: none; width: 44px; text-align: right; font-size: 13px; font-weight: 700; }

/* 关键数据网格 */
.nj-app .nj-stats-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
  margin-bottom: 10px;
}
.nj-app .nj-stat-cell {
  background: var(--nj-card); border-radius: 10px; padding: 10px;
  display: flex; flex-direction: column; gap: 2px;
}
.nj-app .nj-stat-cell .k { font-size: 11px; color: var(--nj-sub); }
.nj-app .nj-stat-cell .v { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.nj-app .nj-stat-cell .v.small { font-size: 14px; }
.nj-app .nj-stat-cell .vs { font-size: 12px; color: var(--nj-blue); font-weight: 600; }

/* 对比条（主队 vs 客队） */
.nj-app .nj-vs-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.nj-app .nj-vs-row .lbl { flex: none; width: 80px; font-size: 11px; color: var(--nj-sub); }
.nj-app .nj-vs-row .side { flex: 1; display: flex; align-items: center; height: 8px; }
.nj-app .nj-vs-row .side .bar { height: 100%; border-radius: 4px; }
.nj-app .nj-vs-row .side.home { justify-content: flex-end; }
.nj-app .nj-vs-row .side.away { justify-content: flex-start; }
.nj-app .nj-vs-row .side.home .bar { background: var(--nj-green); border-radius: 4px 0 0 4px; }
.nj-app .nj-vs-row .side.away .bar { background: var(--nj-blue); border-radius: 0 4px 4px 0; }
.nj-app .nj-vs-row .side.home.empty .bar, .nj-app .nj-vs-row .side.away.empty .bar { background: var(--nj-line); }
.nj-app .nj-vs-row .val { flex: none; width: 34px; font-size: 12px; font-weight: 600; text-align: center; }
.nj-app .nj-vs-row .val.home { text-align: right; color: var(--nj-green); }
.nj-app .nj-vs-row .val.away { text-align: left; color: var(--nj-blue); }

/* 交锋 */
.nj-app .nj-h2h-head {
  display: flex; gap: 10px; margin-bottom: 10px;
}
.nj-app .nj-h2h-cell {
  flex: 1; background: var(--nj-card); border-radius: 10px; padding: 10px;
  text-align: center;
}
.nj-app .nj-h2h-cell .num { font-size: 20px; font-weight: 800; }
.nj-app .nj-h2h-cell .lbl { font-size: 11px; color: var(--nj-sub); margin-top: 2px; }
.nj-app .nj-h2h-cell.win .num { color: var(--nj-green); }
.nj-app .nj-h2h-cell.draw .num { color: var(--nj-yellow); }
.nj-app .nj-h2h-cell.lose .num { color: var(--nj-red); }
.nj-app .nj-h2h-list { }
.nj-app .nj-h2h-item {
  display: flex; align-items: center; gap: 8px;
  background: var(--nj-card); border-radius: 8px; padding: 8px 10px; margin-bottom: 6px;
  font-size: 12px;
}
.nj-app .nj-h2h-item .d { color: var(--nj-dim); width: 62px; flex: none; }
.nj-app .nj-h2h-item .tm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nj-app .nj-h2h-item .sc {
  flex: none; font-weight: 700; font-variant-numeric: tabular-nums;
  background: var(--nj-bg2); padding: 2px 8px; border-radius: 6px;
}
.nj-app .nj-h2h-item .sc.win { color: var(--nj-green); }
.nj-app .nj-h2h-item .sc.lose { color: var(--nj-red); }

/* ============ 阵容战术板 ============ */
.nj-app .nj-lineup-wrap { padding: 10px; }
.nj-app .nj-formation {
  position: relative; width: 100%; aspect-ratio: 3/4;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.02) 0 1px, transparent 1px 20%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.02) 0 1px, transparent 1px 20%),
    radial-gradient(circle at 50% 50%, rgba(0,200,102,.06) 0 30%, transparent 30%);
  border: 2px solid rgba(0,200,102,.35);
  border-radius: 8px; overflow: hidden;
  background-color: #101a2c;
}
.nj-app .nj-formation .line {
  position: absolute; left: 0; right: 0; height: 0;
  border-top: 1px dashed rgba(255,255,255,.08);
}
.nj-app .nj-formation .halfline { position: absolute; left: 0; right: 0; top: 50%; border-top: 1px dashed rgba(255,255,255,.12); }
.nj-app .nj-formation .center {
  position: absolute; left: 50%; top: 50%; width: 60px; height: 60px;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255,255,255,.12); border-radius: 50%;
}
.nj-app .nj-formation .player {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 1px;
}
.nj-app .nj-formation .player .pball {
  position: relative;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--nj-card2); border: 2px solid var(--nj-green);
  font-size: 12px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.nj-app .nj-formation .team-b .player .pball { border-color: var(--nj-blue); }
.nj-app .nj-formation .player .pnum { font-size: 12px; }
.nj-app .nj-formation .player .pevt {
  position: absolute; top: -6px; right: -8px; font-size: 10px;
}
.nj-app .nj-formation .player .pnm {
  font-size: 9px; color: var(--nj-sub); max-width: 56px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nj-app .nj-lineup-side {
  display: flex; align-items: center; gap: 8px; margin: 10px 0 4px;
}
.nj-app .nj-lineup-side img { width: 20px; height: 20px; border-radius: 4px; }
.nj-app .nj-lineup-side .nm { font-size: 13px; font-weight: 600; flex: 1; }
.nj-app .nj-lineup-side .fm {
  font-size: 11px; color: var(--nj-sub);
  background: var(--nj-card); padding: 2px 10px; border-radius: 10px;
}

/* 比分变化/进球时间线 */
.nj-app .nj-timeline { display: flex; flex-direction: column; gap: 4px; }
.nj-app .nj-tl-row { display: flex; gap: 6px; align-items: center; font-size: 12px; }
.nj-app .nj-tl-row .t {
  flex: none; width: 46px; color: var(--nj-orange);
  background: rgba(255,159,67,.12); border-radius: 4px; text-align: center;
  font-size: 11px; padding: 1px 0; font-variant-numeric: tabular-nums;
}
.nj-app .nj-tl-row .who { flex: 1; }
.nj-app .nj-tl-row .who.home { text-align: left; }
.nj-app .nj-tl-row .who.away { text-align: right; }
.nj-app .nj-tl-row .typ { color: var(--nj-sub); font-size: 11px; }

/* 数据统计对比（射门/角球/控球） */
.nj-app .nj-realstats {
  background: var(--nj-card); border-radius: 10px; padding: 12px; margin-bottom: 8px;
}
.nj-app .nj-realstats .rs-score {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 18px; font-weight: 700; margin-bottom: 10px;
}
.nj-app .nj-realstats .rs-score .h { color: var(--nj-green); }
.nj-app .nj-realstats .rs-score .a { color: var(--nj-blue); }
.nj-app .nj-realstats .rs-score .x { color: var(--nj-sub); font-weight: 400; font-size: 12px; }

/* ============ 详情弹窗（浮动小窗口，可拖动，不遮挡列表） ============ */
.nj-modal {
  position: fixed; inset: 0; z-index: 50;
  pointer-events: none;
}
.nj-modal-overlay {
  position: absolute; inset: 0;
  background: transparent;
  pointer-events: none;
}
.nj-modal-content {
  position: absolute; top: 16px; right: 16px; bottom: auto; left: auto;
  z-index: 1;
  width: 820px; max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  background: var(--nj-bg);
  border: 1px solid var(--nj-line);
  border-radius: 12px;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.45);
  animation: nj-modal-in .2s ease;
  pointer-events: auto;
}
@keyframes nj-modal-in {
  from { transform: translateY(6px) scale(.98); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* 弹窗头部 */
.nj-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  background: var(--nj-bg2);
  border-bottom: 1px solid var(--nj-line);
  cursor: move;
  user-select: none;
  -webkit-user-select: none;
}
.nj-modal-league {
  display: flex; align-items: center; gap: 8px;
}
.nj-modal-league img {
  width: 22px; height: 22px; border-radius: 4px;
}
.nj-modal-meta { display: flex; flex-direction: column; }
.nj-modal-lname { font-size: 13px; font-weight: 600; }
.nj-modal-ltime { font-size: 11px; color: var(--nj-sub); }
.nj-modal-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--nj-card); color: var(--nj-text);
  border: 1px solid var(--nj-line); font-size: 22px; line-height: 1;
  cursor: pointer;
}
.nj-modal-close:active { background: var(--nj-card2); }

/* 弹窗主体（可滚动） */
.nj-modal-body {
  flex: 1; overflow-y: auto;
  padding-bottom: 20px;
  scrollbar-width: thin;
}
.nj-modal-body::-webkit-scrollbar { width: 4px; }
.nj-modal-body::-webkit-scrollbar-thumb { background: var(--nj-line); border-radius: 2px; }

/* 球队与比分区 */
.nj-modal-teams {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px;
  background: linear-gradient(180deg, #16213a, #10182a);
}
.nj-modal-team {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px;
  min-width: 0;
}
.nj-modal-team img { width: 46px; height: 46px; border-radius: 8px; }
.nj-modal-tname { font-size: 13px; font-weight: 600; text-align: center; }
.nj-modal-rank { font-size: 11px; color: var(--nj-green); }
.nj-modal-ppg {
  display: flex; gap: 8px;
  font-size: 10px; color: var(--nj-sub);
}
.nj-modal-ppg span { background: var(--nj-card); padding: 2px 6px; border-radius: 4px; }
.nj-modal-score {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 0 10px; min-width: 90px;
}
.nj-countdown {
  font-size: 11px; color: var(--nj-sub);
  background: rgba(255,255,255,.05); padding: 2px 8px; border-radius: 10px;
}
.nj-modal-sc {
  font-size: 30px; font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.nj-modal-half { font-size: 11px; color: var(--nj-sub); }
.nj-detail-updated { padding: 3px 14px 8px; color: var(--nj-sub); font-size: 11px; text-align: right; }
.nj-event-empty { padding: 8px 14px; color: var(--nj-dim); font-size: 11px; text-align: center; }
.nj-event-ribbon { padding: 8px 20px 4px; background: var(--nj-bg2); }
.nj-event-marks { position: relative; height: 48px; }
.nj-event-mark { position: absolute; font-size: 15px; transform: translateX(-50%); white-space: nowrap; }
.nj-event-mark.home { bottom: 0; }.nj-event-mark.away { top: 0; }
.nj-event-track { position: relative; height: 24px; background: linear-gradient(90deg,#346c53,#3d8965); border-radius: 3px; }
.nj-event-track span { position: absolute; top: 3px; transform: translateX(-50%); font-size: 10px; color: #fff; }
.nj-modal-fav {
  width: 26px; height: 26px; border-radius: 50%;
  background: transparent; border: 1px solid var(--nj-line);
  color: var(--nj-sub); font-size: 16px; line-height: 1;
  cursor: pointer;
}

/* Tab 栏 */
.nj-detail-tabs {
  display: flex; gap: 2px; padding: 8px 10px;
  background: var(--nj-bg2); border-bottom: 1px solid var(--nj-line);
  overflow-x: auto; scrollbar-width: none;
}
.nj-detail-tabs::-webkit-scrollbar { display: none; }
.nj-detail-tab {
  flex: none; padding: 7px 10px; border-radius: 8px;
  font-size: 12px; color: var(--nj-sub); white-space: nowrap; cursor: pointer;
}
.nj-detail-tab.active {
  color: var(--nj-green); background: rgba(0,200,102,.12);
  font-weight: 600;
}
.nj-detail-tab.nj-tab-disabled { opacity: .35; cursor: default; }

/* 赛前数据卡片 */
.nj-pre-cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-bottom: 12px;
}
.nj-pre-card {
  background: var(--nj-card); border-radius: 10px;
  padding: 12px 6px; text-align: center;
  display: flex; flex-direction: column; gap: 4px;
}
.nj-pre-card .k { font-size: 11px; color: var(--nj-sub); }
.nj-pre-card .v { font-size: 17px; font-weight: 700; color: var(--nj-text); }

/* 实时/半场/角球 数据表 */
.nj-live-grid {
  background: var(--nj-card); border-radius: 10px; padding: 6px 10px;
}
.nj-live-row {
  display: flex; align-items: center; padding: 9px 4px;
  border-bottom: 1px solid rgba(42,58,85,.4);
}
.nj-live-row:last-child { border-bottom: none; }
.nj-live-row .l { flex: 1; font-size: 12px; color: var(--nj-sub); }
.nj-live-row .a, .nj-live-row .b {
  flex: none; width: 50px; text-align: center;
  font-size: 13px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.nj-live-row .a { color: var(--nj-green); }
.nj-live-row .b { color: var(--nj-blue); }

/* 时间线进球 */
.nj-timeline .nj-tl-row { padding: 4px 0; }
.nj-timeline .nj-tl-row.home { flex-direction: row; }
.nj-timeline .nj-tl-row.away { flex-direction: row-reverse; }
.nj-timeline .nj-tl-row.away .who { text-align: right; }

/* 进球时间：按球队分列 + 时段分布 */
.nj-app .nj-tl-typ {
  flex: none; font-size: 11px; color: var(--nj-sub);
  background: var(--nj-bg2); border-radius: 4px; padding: 1px 6px;
}
.nj-app .nj-tl-cols { display: flex; gap: 8px; margin-bottom: 8px; }
.nj-app .nj-tl-col { flex: 1; background: var(--nj-card); border-radius: 10px; padding: 10px; }
.nj-app .nj-tl-col-h {
  font-size: 12px; font-weight: 600; color: var(--nj-text); text-align: center;
  margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nj-app .nj-tl-chip {
  display: inline-block; margin: 0 4px 4px 0; padding: 2px 8px;
  background: rgba(255, 159, 67, .12); color: var(--nj-orange);
  border-radius: 10px; font-size: 12px; font-variant-numeric: tabular-nums;
}
.nj-app .nj-tl-chip.none { background: var(--nj-bg2); color: var(--nj-dim); }

/* ============ 未开赛占位 + AI 分析 + 观看比赛 ============ */
.nj-app .nj-nodata {
  text-align: center; padding: 34px 20px 26px;
}
.nj-app .nj-nodata-ico { font-size: 30px; line-height: 1; margin-bottom: 10px; }
.nj-app .nj-nodata-t { font-size: 15px; font-weight: 600; color: var(--nj-text); margin-bottom: 6px; }
.nj-app .nj-nodata-s { font-size: 12px; color: var(--nj-sub); line-height: 1.7; max-width: 320px; margin: 0 auto; }

.nj-app .nj-ai-btn {
  margin-top: 14px; padding: 8px 22px;
  border: 1px solid rgba(77, 163, 255, .5);
  border-radius: 18px; cursor: pointer;
  background: rgba(77, 163, 255, .12);
  color: var(--nj-blue);
  font-size: 13px; font-weight: 600;
  transition: background .15s;
}
.nj-app .nj-ai-btn:active { background: rgba(77, 163, 255, .24); }
.nj-app .nj-ai-btn:disabled { opacity: .6; cursor: default; }

.nj-app .nj-ai-out { margin-top: 12px; }
.nj-app .nj-ai-loading {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--nj-sub); font-size: 12px;
}
.nj-app .nj-ai-loading .nj-spinner { width: 16px; height: 16px; margin: 0; border-width: 2px; }
.nj-app .nj-ai-text {
  text-align: left; padding: 12px;
  background: var(--nj-bg2); border: 1px solid var(--nj-line);
  border-radius: 10px; color: var(--nj-text);
  font-size: 13px; line-height: 1.8; word-break: break-word;
}
.nj-app .nj-ai-text b { color: var(--nj-blue); }
.nj-app .nj-ai-src {
  margin-top: 8px; text-align: right;
  font-size: 11px; color: var(--nj-dim);
}

/* Tab 内嵌的 AI 入口（总览 / 情报） */
.nj-app .nj-ai-entry {
  margin: 10px 0 14px; padding: 12px;
  background: var(--nj-card); border: 1px solid var(--nj-line);
  border-radius: 12px;
}
.nj-app .nj-ai-entry-h { display: flex; align-items: center; gap: 10px; }
.nj-app .nj-ai-entry-t { flex: 1; font-size: 13px; font-weight: 600; color: var(--nj-text); }
.nj-app .nj-ai-entry .nj-ai-btn { margin-top: 0; padding: 6px 16px; font-size: 12px; }
.nj-app .nj-ai-entry .nj-ai-out { margin-top: 10px; }

/* 进行中：观看比赛 */
.nj-app .nj-watch-bar {
  display: flex; align-items: center; gap: 10px;
  margin: 10px 12px 0; flex-wrap: wrap;
}
.nj-app .nj-watch-btn {
  flex: none; padding: 8px 18px; border: none; border-radius: 18px;
  background: linear-gradient(135deg, #00c866, #00a854);
  color: #fff; font-size: 13px; font-weight: 700; cursor: pointer;
}
.nj-app .nj-watch-btn:active { filter: brightness(.92); }
.nj-app .nj-watch-note { font-size: 11px; color: var(--nj-dim); line-height: 1.5; }

/* ============ 竞彩专区（竞彩足球/北京单场/任九） ============ */
/* 玩法切换条 */
.nj-app .nl-sub-tabs {
  display: flex; gap: 6px; padding: 8px 12px 0;
  overflow-x: auto; scrollbar-width: none;
}
.nj-app .nl-sub-tabs::-webkit-scrollbar { display: none; }
.nj-app .nl-sub-tab {
  flex: none; padding: 5px 13px; border-radius: 14px;
  background: var(--nj-bg2); color: var(--nj-sub);
  font-size: 12px; border: 1px solid var(--nj-line); cursor: pointer;
  white-space: nowrap;
}
.nj-app .nl-sub-tab.active {
  color: var(--nj-green); border-color: rgba(0, 200, 102, .5);
  background: rgba(0, 200, 102, .1); font-weight: 600;
}
/* 日期条 */
.nj-app .nl-date-bar {
  display: flex; gap: 6px; padding: 8px 12px 8px;
  overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--nj-line);
}
.nj-app .nl-date-bar::-webkit-scrollbar { display: none; }
.nj-app .nl-date-chip {
  flex: none; min-width: 52px; padding: 5px 8px; border-radius: 12px;
  background: var(--nj-card); color: var(--nj-sub);
  font-size: 12px; cursor: pointer; border: 1px solid var(--nj-line);
  text-align: center; line-height: 1.2;
}
.nj-app .nl-date-chip .wk { display: block; color: var(--nj-dim); font-size: 10px; margin-top: 2px; }
.nj-app .nl-date-chip.active {
  background: rgba(0, 200, 102, .12); color: var(--nj-green);
  border-color: rgba(0, 200, 102, .4);
}
.nj-app .nl-date-chip.active .wk { color: var(--nj-green); }

/* 竞彩卡片 */
.nj-app .nl-lot-card {
  background: var(--nj-card);
  border: 1px solid var(--nj-line);
  border-radius: 12px; margin: 10px 0; overflow: hidden;
  cursor: pointer;
}
.nj-app .nl-lot-card:active { background: var(--nj-card2); }
.nj-app .nl-lot-head {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px 4px;
}
.nj-app .nl-lot-league {
  font-size: 11px; color: #fff; padding: 2px 8px; border-radius: 4px;
  font-weight: 600; flex: none;
}
.nj-app .nl-lot-time { font-size: 12px; color: var(--nj-sub); }
.nj-app .nl-lot-sn {
  margin-left: auto; font-size: 12px; color: var(--nj-blue); font-weight: 600;
}
.nj-app .nl-lot-single {
  font-size: 11px; color: var(--nj-yellow);
  border: 1px solid var(--nj-yellow); border-radius: 4px;
  padding: 0 4px; flex: none;
}
.nj-app .nl-lot-vs {
  display: flex; align-items: center; padding: 2px 12px 8px; gap: 8px;
}
.nj-app .nl-lot-team {
  flex: 1; font-size: 15px; font-weight: 600; text-align: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nj-app .nl-lot-mid { flex: none; width: 74px; text-align: center; }
.nj-app .nl-lot-status { font-size: 11px; color: var(--nj-dim); }
.nj-app .nl-lot-score { font-size: 20px; font-weight: 700; }
.nj-app .nl-lot-odds { border-top: 1px solid var(--nj-line); background: rgba(255,255,255,.02); }
.nj-app .nl-lot-row { display: grid; grid-template-columns: repeat(4, 1fr); }
.nj-app .nl-lot-row + .nl-lot-row { border-top: 1px solid rgba(42,58,85,.5); }
.nj-app .nl-lot-rq {
  padding: 7px 2px; text-align: center; font-size: 12px;
  color: var(--nj-orange); font-weight: 700;
  background: rgba(255,255,255,.02);
  border-right: 1px solid var(--nj-line);
}
.nj-app .nl-lot-cell {
  padding: 7px 2px; text-align: center; font-size: 13px;
  font-weight: 600; font-variant-numeric: tabular-nums;
  border-right: 1px solid var(--nj-line);
}
.nj-app .nl-lot-row .nl-lot-cell:last-child { border-right: none; }
.nj-app .nl-lot-more {
  padding: 7px; text-align: center; font-size: 12px;
  color: var(--nj-blue); border-top: 1px solid var(--nj-line);
  background: rgba(255,255,255,.02);
}

/* 竞彩玩法详情（弹窗内） */
.nj-app .nl-odds-sec { padding: 12px 12px 4px; }
.nj-app .nl-odds-sec h4 {
  font-size: 13px; color: var(--nj-orange); margin: 0 0 8px;
  display: flex; align-items: center; gap: 6px;
}
.nj-app .nl-odds-sec h4 .sub { color: var(--nj-dim); font-size: 11px; font-weight: 400; }
.nj-app .nl-odds-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.nj-app .nl-odds-box {
  background: var(--nj-bg2); border: 1px solid var(--nj-line);
  border-radius: 8px; padding: 8px 4px; text-align: center;
}
.nj-app .nl-odds-box .lb { font-size: 11px; color: var(--nj-sub); }
.nj-app .nl-odds-box .od { font-size: 14px; font-weight: 700; margin-top: 2px; }
.nj-app .nl-odds-box.hl { border-color: rgba(0,200,102,.4); }
.nj-app .nl-odds-box.hl .od { color: var(--nj-green); }

/* 未开赛：近期战绩（近 6 场） */
.nj-app .nj-form-block {
  background: var(--nj-card); border-radius: 10px;
  padding: 6px 10px; margin-bottom: 8px;
}
.nj-app .nj-form-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  padding: 4px 2px 7px; border-bottom: 1px solid rgba(42,58,85,.5);
}
.nj-app .nj-form-head b { font-size: 13px; color: var(--nj-text); }
.nj-app .nj-form-sum { font-size: 11px; color: var(--nj-sub); }
.nj-app .nj-form-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 2px; border-bottom: 1px solid rgba(42,58,85,.3);
}
.nj-app .nj-form-row:last-child { border-bottom: none; }
.nj-app .nj-form-res {
  flex: none; width: 18px; height: 18px; line-height: 18px;
  border-radius: 4px; text-align: center;
  font-size: 11px; font-weight: 700; color: #fff; background: #6b7a90;
}
.nj-app .nj-form-res.win { background: #e5453b; }
.nj-app .nj-form-res.draw { background: #62728a; }
.nj-app .nj-form-res.lose { background: #3d8ee0; }
.nj-app .nj-form-time { flex: none; width: 72px; font-size: 11px; color: var(--nj-sub); }
.nj-app .nj-form-opp {
  flex: 1; font-size: 12px; color: var(--nj-text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nj-app .nj-form-score {
  flex: none; font-size: 13px; font-weight: 700; color: var(--nj-text);
  font-variant-numeric: tabular-nums;
}
.nj-app .nj-form-half { flex: none; width: 52px; text-align: right; font-size: 11px; color: var(--nj-sub); }

/* 未开赛：本赛季交锋 */
.nj-app .nj-h2h { background: var(--nj-card); border-radius: 10px; padding: 6px 10px; }
.nj-app .nj-h2h-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 2px; border-bottom: 1px solid rgba(42,58,85,.5);
}
.nj-app .nj-h2h-row:last-child { border-bottom: none; }
.nj-app .nj-h2h-time { flex: none; width: 72px; font-size: 11px; color: var(--nj-sub); }
.nj-app .nj-h2h-teams {
  flex: 1; font-size: 12px; color: var(--nj-text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nj-app .nj-h2h-teams b { color: var(--nj-green); font-variant-numeric: tabular-nums; }
.nj-app .nj-h2h-half, .nj-app .nj-h2h-round { flex: none; font-size: 11px; color: var(--nj-sub); }

@media (max-width: 640px) {
  .nj-modal { pointer-events: auto; }
  .nj-modal-content { inset: 0; width: 100vw; max-width: none; height: 100dvh; max-height: none; border: 0; border-radius: 0; }
  .nj-modal-header { cursor: default; }
  .nj-detail-tab { padding: 7px 9px; }
  .nj-pre-cards { grid-template-columns: repeat(2, 1fr); }
}

