/* ============================================================
   预测军团 · 指挥舱样式
   深色指挥舱风格：深蓝黑底 #0a0e1a / 荧光绿 #00ff9c
   状态色：存活绿 / 待决策黄 / 阵亡红
   ============================================================ */

:root {
  --bg: #0a0e1a;
  --bg-panel: #10162a;
  --bg-card: #141b33;
  --bg-hover: #1a2342;
  --border: #233057;
  --neon: #00ff9c;
  --neon-dim: rgba(0, 255, 156, 0.35);
  --text: #d7e3f4;
  --text-dim: #7f8db3;
  --green: #00ff9c;
  --yellow: #ffd54a;
  --red: #ff4d5e;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, "Courier New", monospace;
  --sans: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

/* 背景网格装饰 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 255, 156, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 156, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 0;
}

.num, .mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

/* ---------- 顶部栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 24px;
  background: rgba(10, 14, 26, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(6px);
}

.topbar h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--neon);
  text-shadow: 0 0 12px var(--neon-dim);
  letter-spacing: 1px;
}

.season-badge {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 10px;
}

.health-bar {
  margin-left: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.health-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-dim);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 10px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
  flex: none;
}
.dot.ok { background: var(--green); box-shadow: 0 0 8px var(--green); }
.dot.warn { background: var(--yellow); box-shadow: 0 0 8px var(--yellow); }
.dot.bad { background: var(--red); box-shadow: 0 0 8px var(--red); }

/* ---------- 页面布局 ---------- */
.container {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 24px 48px;
}

.grid-main {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 960px) {
  .grid-main { grid-template-columns: 1fr; }
}

.section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::before {
  content: "";
  width: 4px;
  height: 14px;
  background: var(--neon);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--neon-dim);
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 0 0 1px rgba(0, 255, 156, 0.04), 0 4px 24px rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

a.card-link { text-decoration: none; color: inherit; display: block; }
a.card-link .card:hover,
.card.clickable:hover {
  border-color: var(--neon);
  box-shadow: 0 0 14px var(--neon-dim), 0 4px 24px rgba(0, 0, 0, 0.4);
  transform: translateY(-1px);
}

/* ---------- 积分榜 ---------- */
.board-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.board-table th {
  text-align: left;
  color: var(--text-dim);
  font-weight: 500;
  font-size: 12px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
}
.board-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(35, 48, 87, 0.5);
}
.board-table tr:last-child td { border-bottom: none; }
.board-table .rank {
  font-family: var(--mono);
  color: var(--neon);
  font-weight: 700;
  width: 40px;
}
.board-table .points {
  font-family: var(--mono);
  font-weight: 700;
}
.delta-up { color: var(--green); }
.delta-down { color: var(--red); }
.delta-flat { color: var(--text-dim); }

/* 状态徽章 */
.badge {
  display: inline-block;
  font-size: 12px;
  padding: 1px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge.alive, .badge.ok {
  color: var(--green);
  border-color: rgba(0, 255, 156, 0.5);
  background: rgba(0, 255, 156, 0.08);
}
.badge.pending, .badge.warn {
  color: var(--yellow);
  border-color: rgba(255, 213, 74, 0.5);
  background: rgba(255, 213, 74, 0.08);
}
.badge.dead, .badge.bad {
  color: var(--red);
  border-color: rgba(255, 77, 94, 0.5);
  background: rgba(255, 77, 94, 0.08);
}
.badge.dim {
  color: var(--text-dim);
  border-color: var(--border);
  background: var(--bg-panel);
}

/* ---------- 阵亡墙 ---------- */
.fallen-wall {
  margin-top: 16px;
  border-top: 1px dashed var(--border);
  padding-top: 12px;
}
.fallen-wall .fw-title {
  font-size: 13px;
  color: var(--red);
  margin-bottom: 8px;
  letter-spacing: 2px;
}
.fallen-item {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 12px;
  color: var(--text-dim);
  padding: 6px 10px;
  border: 1px solid rgba(255, 77, 94, 0.25);
  border-radius: 8px;
  margin-bottom: 6px;
  background: rgba(255, 77, 94, 0.04);
}
.fallen-item .fw-name { color: var(--red); font-weight: 700; }

/* ---------- 今日赛事 ---------- */
.match-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.match-card .mc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.match-card .mc-no {
  font-family: var(--mono);
  color: var(--neon);
  font-weight: 700;
}
.match-card .mc-league {
  color: var(--text-dim);
  font-size: 12px;
}
.match-card .mc-time {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
}
.match-card .mc-teams {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
}
.match-card .mc-teams .vs {
  color: var(--text-dim);
  font-size: 12px;
  margin: 0 8px;
  font-weight: 400;
}
.odds-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.odd-chip {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 10px;
  color: var(--text);
}
.odd-chip .odd-label { color: var(--text-dim); margin-right: 6px; }
.market-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }

/* ---------- 选手状态卡 ---------- */
.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.agent-card { position: relative; overflow: hidden; }
.agent-card::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--text-dim);
}
.agent-card.st-alive::after { background: var(--green); box-shadow: 0 0 10px var(--green); }
.agent-card.st-pending::after { background: var(--yellow); box-shadow: 0 0 10px var(--yellow); }
.agent-card.st-dead::after { background: var(--red); box-shadow: 0 0 10px var(--red); }

.agent-card .ac-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}
.agent-card .ac-name { font-size: 15px; font-weight: 700; }
.agent-card .ac-mbti {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--neon);
  border: 1px solid var(--neon-dim);
  border-radius: 4px;
  padding: 0 6px;
}
.agent-card .ac-archetype {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.agent-card .ac-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 10px;
}
.agent-card .ac-stat .v {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 700;
  color: var(--neon);
}
.agent-card.st-dead .ac-stat .v { color: var(--red); }
.agent-card .ac-stat .k {
  font-size: 11px;
  color: var(--text-dim);
}
.agent-card .ac-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* ---------- 提示状态 ---------- */
.empty, .loading, .error-box {
  text-align: center;
  color: var(--text-dim);
  padding: 28px 12px;
  font-size: 13px;
}
.error-box { color: var(--red); }

.refresh-note {
  font-size: 11px;
  color: var(--text-dim);
  text-align: right;
  margin-top: 8px;
  font-family: var(--mono);
}

/* ============================================================
   预测军团 · 页面组件补充样式（总览/详情/情报/管理）
   ============================================================ */

/* 通用布局 */
.container { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto; padding: 20px 16px 60px; }
.panel { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 12px; padding: 18px; margin-bottom: 20px; }
.panel-title { font-size: 15px; letter-spacing: 1px; margin-bottom: 14px; color: var(--neon); border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.sub-title { font-size: 13px; color: var(--text-dim); margin: 16px 0 8px; }
.tag { background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; padding: 2px 10px; font-size: 12px; margin-left: 10px; }
.health { font-size: 12px; color: var(--text-dim); margin-left: 16px; }
.health.healthy { color: var(--neon); }
.health.warn { color: var(--yellow); }
.dim { color: var(--text-dim); }
.result-line, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* 积分榜表格 */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { text-align: left; color: var(--text-dim); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.data-table td { padding: 8px 10px; border-bottom: 1px solid rgba(35, 48, 87, 0.5); }
.data-table tr:hover td { background: var(--bg-hover); }

/* 状态色 */
.status-alive { color: var(--green); }
.status-pending { color: var(--yellow); }
.status-dead { color: var(--red); }
.status-chip { font-size: 11px; padding: 1px 8px; border-radius: 10px; border: 1px solid; margin-left: 6px; }
.status-chip.status-alive { color: var(--green); border-color: var(--green); }
.status-chip.status-pending { color: var(--yellow); border-color: var(--yellow); }
.status-chip.status-dead { color: var(--red); border-color: var(--red); }

/* 阵亡墙 */
.fallen-wall { display: flex; flex-direction: column; gap: 6px; }
.fallen-item { display: flex; gap: 12px; align-items: center; font-size: 13px; }

/* 赛事卡片（总览） */
.match-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.match-card { display: block; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 12px; text-decoration: none; color: var(--text); transition: border-color .2s, transform .2s; }
.match-card:hover { border-color: var(--neon-dim); transform: translateY(-2px); }
.match-league { font-size: 12px; color: var(--neon); }
.match-teams { font-size: 15px; font-weight: 600; margin: 6px 0; }
.match-odds { font-size: 13px; color: var(--text); }
.match-sold { font-size: 12px; color: var(--text-dim); margin-top: 6px; }

/* 选手卡片（总览） */
.agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.agent-card { display: block; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 12px; text-decoration: none; color: var(--text); transition: border-color .2s, transform .2s; }
.agent-card:hover { border-color: var(--neon-dim); transform: translateY(-2px); }
.agent-name { display: flex; align-items: center; justify-content: space-between; font-size: 14px; font-weight: 600; }
.agent-meta { font-size: 12px; margin-top: 4px; }
.agent-points { font-size: 18px; color: var(--neon); margin: 8px 0 4px; }
.agent-mem { font-size: 12px; }

/* 选手详情 */
.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px 20px; }
.kv { display: flex; gap: 8px; font-size: 13px; }
.kv-label { flex: 0 0 90px; }
.kv-value { flex: 1; }
.status-box { display: flex; flex-wrap: wrap; gap: 16px 32px; }
.memory-list, .bet-list { display: flex; flex-direction: column; gap: 10px; }
.memory-item, .bet-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.memory-head { margin-bottom: 4px; }
.memory-att { color: var(--neon); font-size: 12px; }
.bet-head { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 6px; color: var(--text-dim); }
.bet-legs { font-size: 13px; }
.bet-meta { font-size: 12px; margin-top: 4px; }
.bet-logic { font-size: 12px; color: var(--text); margin-top: 6px; border-left: 2px solid var(--neon-dim); padding-left: 8px; }
.bet-result { font-size: 12px; margin-top: 6px; color: var(--neon); }

/* 情报页 */
.match-panels, .intel-panels { display: flex; flex-direction: column; gap: 14px; }
.match-detail, .intel-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.match-detail-head { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.market-line { font-size: 13px; margin-top: 4px; }
.intel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; }
.intel-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 4px 16px; }
.intel-field { display: flex; gap: 8px; font-size: 12px; }
.intel-field .dim { flex: 0 0 90px; }
.intel-sources { font-size: 11px; margin-top: 8px; }
.intel-note { font-size: 12px; color: var(--yellow); margin-top: 6px; }
.conversion-table { display: flex; flex-direction: column; gap: 6px; }
.conversion-row { font-size: 12px; }

/* 管理后台 */
.admin-row, .admin-grid { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.admin-grid { margin-bottom: 8px; }
.input { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; color: var(--text); padding: 8px 10px; font-size: 13px; flex: 1; min-width: 180px; }
.input:focus { outline: none; border-color: var(--neon-dim); }
.btn { background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; color: var(--neon); padding: 8px 16px; font-size: 13px; cursor: pointer; transition: border-color .2s; }
.btn:hover { border-color: var(--neon); }
.btn-danger { color: var(--red); border-color: var(--red); }
.btn-group { display: flex; flex-wrap: wrap; gap: 8px; }
.warn-panel { border-color: rgba(255, 77, 94, 0.4); }
.result-box { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 12px; font-size: 12px; overflow-x: auto; min-height: 80px; white-space: pre-wrap; }

/* 顶部链接 */
.topbar a { color: var(--text); text-decoration: none; }

/* 补充语义容器类 */
.logo { font-size: 16px; color: var(--neon); letter-spacing: 1px; }
.match-markets { margin-top: 8px; }
