/* 无畏契约战绩分析 · 深色液态玻璃 */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  color: #eef3f6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------- 雾感背景 ---------- */
#bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: #10151c; }
#bgSharp { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#fog { position: absolute; inset: 0; width: 100%; height: 100%; }
#bgShade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,12,17,.34), rgba(8,12,17,.52)); }

/* ---------- 通用 ---------- */
#app { max-width: 560px; margin: 0 auto; padding: 18px 14px 120px; }
.glass {
  background: linear-gradient(160deg, rgba(24,33,44,.62), rgba(13,19,27,.55));
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 20px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.20), inset 0 -1px 0 rgba(255,255,255,.05), 0 12px 32px rgba(0,0,0,.35);
}
.card { padding: 16px; margin-bottom: 14px; }
h1 { font-size: 22px; margin: 4px 0 6px; letter-spacing: .5px; }
h2 { font-size: 16px; margin: 2px 0 12px; }
h3 { font-size: 13px; margin: 2px 0 10px; color: #b9c8d2; font-weight: 600; }
.sub { color: #b9c8d2; margin: 0 0 14px; font-size: 13px; }
.dim { color: #9db0bd; font-size: 12px; }
.center { text-align: center; }
.msg { min-height: 18px; font-size: 13px; color: #ffd9a0; margin: 10px 0 0; }
.tip { color: #8fa5b3; font-size: 12px; line-height: 1.6; margin: 12px 0 0; }
.up { color: #46d586; }
.down { color: #fb6f92; }

/* ---------- 按钮（拟态按压反馈） ---------- */
.btn {
  appearance: none; border: 1px solid rgba(255,255,255,.20);
  background: linear-gradient(180deg, rgba(255,255,255,.20), rgba(255,255,255,.07));
  color: #fff; border-radius: 999px; padding: 11px 22px; font-size: 14px; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -2px 4px rgba(0,0,0,.18), 0 6px 16px rgba(0,0,0,.30);
  transition: transform .13s ease, box-shadow .13s ease, background .13s ease;
  touch-action: manipulation; user-select: none;
}
.btn:active {
  transform: scale(.94);
  box-shadow: inset 0 3px 9px rgba(0,0,0,.50), inset 0 -1px 0 rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.16));
}
.btn.primary { background: linear-gradient(180deg, rgba(64,180,120,.85), rgba(38,140,88,.85)); width: 100%; }
.btn.small { padding: 7px 14px; font-size: 12.5px; }
.btn.ghost { background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03)); }

/* ---------- 分段滑块 ---------- */
.seg {
  position: relative; display: flex; padding: 4px; border-radius: 999px;
  background: rgba(10,16,22,.45); border: 1px solid rgba(255,255,255,.12);
  box-shadow: inset 0 2px 6px rgba(0,0,0,.45);
  margin-bottom: 14px;
}
.seg button {
  flex: 1; position: relative; z-index: 1; appearance: none; border: none; background: none;
  color: #a9bcc9; font-size: 13.5px; padding: 8px 0; border-radius: 999px; cursor: pointer;
  transition: color .25s ease, transform .12s ease; touch-action: manipulation;
}
.seg button:active { transform: scale(.93); }
.seg button.on { color: #fff; font-weight: 600; }
.seg-pill {
  position: absolute; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.30), rgba(255,255,255,.12));
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 5px 12px rgba(0,0,0,.35);
  transition: transform .42s cubic-bezier(.34,1.45,.6,1), width .42s cubic-bezier(.34,1.45,.6,1);
}

/* ---------- 登录 ---------- */
.login-card { text-align: center; margin-top: 6vh; }
.qr-box {
  width: 216px; height: 216px; margin: 6px auto 14px; border-radius: 16px;
  background: rgba(255,255,255,.92); display: flex; align-items: center; justify-content: center;
  overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.4), 0 8px 22px rgba(0,0,0,.35);
}
.qr-box img { width: 100%; height: 100%; object-fit: contain; }
.qr-hint { color: #5a6a75; font-size: 13px; padding: 0 18px; }
.login-card .seg { max-width: 280px; margin-left: auto; margin-right: auto; }

/* ---------- 顶栏与同步条 ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-radius: 18px; margin-bottom: 14px;
}
#profName { font-size: 16px; font-weight: 700; }
.top-actions { display: flex; gap: 8px; }
.syncbar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; margin-bottom: 14px; }
.sync-track { flex: 1; height: 6px; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; }
#syncFill { height: 100%; width: 0%; border-radius: 3px; background: linear-gradient(90deg, #46d586, #57b7ff); transition: width .5s ease; }
#syncText { font-size: 12px; color: #b9c8d2; white-space: nowrap; }

/* ---------- 概览 ---------- */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid2 .card { margin-bottom: 14px; }
.big3 { display: flex; justify-content: space-between; text-align: center; }
.big3 .num { display: block; font-size: 21px; font-weight: 700; }
.big3 label { font-size: 11.5px; color: #9db0bd; }
.stat p { margin: 10px 0 0; line-height: 1.7; }
#kline { width: 100%; height: 240px; display: block; touch-action: pan-y; }
.day-info { margin-top: 8px; line-height: 1.7; }
.day-games { margin-top: 8px; border-top: 1px solid rgba(255,255,255,.09); }
.day-games .dg { display: flex; justify-content: space-between; padding: 7px 2px; font-size: 12.5px; border-bottom: 1px solid rgba(255,255,255,.05); }
.day-games .dg:last-child { border-bottom: none; }

/* ---------- 对局列表 ---------- */
.mcard {
  display: block; width: 100%; text-align: left; appearance: none; cursor: pointer;
  padding: 13px 15px; margin-bottom: 10px; border-radius: 16px; color: #eef3f6;
  transition: transform .13s ease, box-shadow .13s ease;
}
.mcard:active { transform: scale(.975); box-shadow: inset 0 3px 10px rgba(0,0,0,.5); }
.mrow1 { display: flex; justify-content: space-between; align-items: baseline; }
.mmap { font-size: 15px; font-weight: 700; }
.mtime { font-size: 11.5px; color: #9db0bd; }
.mrow2 { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 12.5px; color: #c3d2dc; }
.badge { font-size: 11px; padding: 2.5px 9px; border-radius: 999px; font-weight: 700; }
.badge.win { background: rgba(70,213,134,.18); color: #46d586; border: 1px solid rgba(70,213,134,.4); }
.badge.lose { background: rgba(251,111,146,.14); color: #fb6f92; border: 1px solid rgba(251,111,146,.4); }
.badge.draw { background: rgba(255,255,255,.10); color: #c3d2dc; border: 1px solid rgba(255,255,255,.25); }
.chg { font-weight: 700; font-size: 13px; }
.perf-line { margin-top: 5px; font-size: 12px; color: #ffd9a0; }

/* ---------- 详情 ---------- */
.team-title { font-size: 13px; font-weight: 700; margin: 14px 0 8px; color: #b9c8d2; }
.prow { padding: 9px 4px; border-bottom: 1px solid rgba(255,255,255,.06); }
.prow:last-child { border-bottom: none; }
.prow.me { background: rgba(87,183,255,.08); border-radius: 10px; }
.prow .p1 { display: flex; justify-content: space-between; font-size: 13.5px; }
.prow .pname { font-weight: 600; }
.prow .p2 { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-size: 11.5px; color: #9db0bd; }
.rr-strip { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.rr-cell {
  width: 30px; height: 30px; border-radius: 9px; font-size: 11px; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.10); color: #c3d2dc;
}
.rr-cell.win { background: rgba(70,213,134,.20); color: #46d586; border-color: rgba(70,213,134,.45); }
.rr-cell.lose { background: rgba(251,111,146,.16); color: #fb6f92; border-color: rgba(251,111,146,.4); }
.round-row { display: flex; justify-content: space-between; padding: 6.5px 2px; font-size: 12.5px; border-bottom: 1px solid rgba(255,255,255,.05); }

/* ---------- 队友 ---------- */
.mate-row { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid rgba(255,255,255,.06); }
.mate-row:last-child { border-bottom: none; }
.mate-rank { width: 26px; height: 26px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 700; background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.18); }
.mate-main { flex: 1; }
.mate-name { font-size: 14px; font-weight: 600; word-break: break-all; }
.mate-sub { font-size: 11.5px; color: #9db0bd; margin-top: 2px; }

/* ---------- 底部导航（液态玻璃胶囊 + 滑块） ---------- */
#tabbar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 50;
  width: min(430px, calc(100vw - 28px));
}
.tabs {
  position: relative; display: flex; padding: 5px; border-radius: 999px;
  background: linear-gradient(160deg, rgba(30,42,56,.55), rgba(14,20,28,.50));
  backdrop-filter: blur(22px) saturate(1.6);
  -webkit-backdrop-filter: blur(22px) saturate(1.6);
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.30), inset 0 -6px 14px rgba(255,255,255,.05), 0 16px 38px rgba(0,0,0,.45);
}
.tabs button {
  flex: 1; position: relative; z-index: 1; appearance: none; border: none; background: none;
  color: #a9bcc9; font-size: 14px; padding: 10px 0; border-radius: 999px; cursor: pointer;
  transition: color .25s ease, transform .12s ease; touch-action: manipulation;
}
.tabs button:active { transform: scale(.92); }
.tabs button.on { color: #fff; font-weight: 700; }
.tab-pill {
  position: absolute; top: 5px; bottom: 5px; left: 0; width: 0; border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.34), rgba(255,255,255,.13));
  border: 1px solid rgba(255,255,255,.30);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), inset 0 -3px 8px rgba(255,255,255,.08), 0 6px 16px rgba(0,0,0,.35);
  transition: transform .45s cubic-bezier(.34,1.5,.6,1), width .45s cubic-bezier(.34,1.5,.6,1);
}

#disclaimer {
  text-align: center; color: rgba(200,215,225,.55); font-size: 11px;
  padding: 18px 10px 4px; letter-spacing: .3px;
}
.empty { text-align: center; color: #9db0bd; font-size: 13px; padding: 22px 0; }
