/* hidden 属性必须真的隐藏 */
[hidden] { display: none !important; }

/* 足球快乐联盟 — 视觉系统
   深色球场质感：墨绿底色 + 草坪纹理 + 金色强调 */

:root {
  --bg: #07100c;
  --bg-2: #0a1712;
  --surface: #0e1e17;
  --surface-2: #12261d;
  --elevated: #163023;
  --border: #1d3a2c;
  --border-strong: #2a5540;

  --text: #e8f2ec;
  --text-strong: #ffffff;
  --muted: #7d9a8c;

  --brand: #17c964;
  --brand-dim: #0f9e4d;
  --gold: #f5c451;
  --gold-dim: #c79a2c;

  --home: #43b0ff;
  --draw: #f5c451;
  --away: #ff7a6b;
  --ok: #17c964;
  --bad: #ff5c5c;
  --warn: #f5a623;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, .85);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  /* 草坪意象：横向条纹 + 顶部光晕 */
  background-image:
    radial-gradient(1200px 600px at 50% -10%, rgba(23, 201, 100, .13), transparent 65%),
    radial-gradient(800px 400px at 90% 10%, rgba(245, 196, 81, .06), transparent 60%),
    repeating-linear-gradient(180deg,
      rgba(255, 255, 255, .014) 0 64px,
      transparent 64px 128px);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ---------------- 顶栏 ---------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;               /* 品牌一行，导航+用户一行 */
  align-items: center;
  column-gap: 14px;
  row-gap: 8px;
  padding: 10px clamp(14px, 3vw, 32px) 8px;
  background: rgba(7, 16, 12, .82);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid rgba(29, 58, 44, .7);
}

/* 品牌独占第一行：宽度 100% 强制换行 */
.brand { flex: 0 0 100%; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .5px;
  cursor: pointer;
  white-space: nowrap;
  color: var(--text-strong);
}

.brand .ball {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 18px;
  background: radial-gradient(circle at 32% 28%, #1aff86, #0a8a45 60%, #063d20);
  box-shadow: 0 0 0 1px rgba(23, 201, 100, .5), 0 6px 18px -6px rgba(23, 201, 100, .8);
  animation: float 5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0) }
  50% { transform: translateY(-3px) }
}

.brand .txt {
  background: linear-gradient(92deg, #ffffff 10%, #7dffb0 55%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.topnav {
  display: flex;
  gap: 4px;
  margin-left: 8px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.topnav::-webkit-scrollbar { display: none; }

.topnav a {
  position: relative;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
  transition: color .18s, background .18s;
}
.topnav a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.topnav a.active {
  color: #06210f;
  font-weight: 600;
  background: linear-gradient(135deg, var(--brand), #57e694);
  box-shadow: 0 4px 16px -6px rgba(23, 201, 100, .9);
}

.userbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-left: auto;
}
.uname { color: var(--text); font-weight: 500; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- 布局 ---------------- */

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(16px, 2.5vw, 28px) clamp(12px, 3vw, 32px) 96px;
}

/* ---------------- 首页英雄区 ---------------- */

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: clamp(22px, 4vw, 40px);
  margin-bottom: 22px;
  background:
    radial-gradient(900px 380px at 12% 0%, rgba(23, 201, 100, .22), transparent 62%),
    radial-gradient(700px 340px at 92% 100%, rgba(245, 196, 81, .14), transparent 62%),
    linear-gradient(160deg, #10251b, #0a1711 70%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* 球场中圈装饰 */
.hero::after {
  content: "⚽";
  position: absolute;
  right: clamp(-30px, 2vw, 30px);
  bottom: -40px;
  font-size: 190px;
  line-height: 1;
  opacity: .05;
  transform: rotate(-8deg);
  pointer-events: none;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(24px, 4.6vw, 38px);
  line-height: 1.15;
  letter-spacing: -.5px;
  background: linear-gradient(100deg, #fff 20%, #8affc0 60%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  margin: 0;
  max-width: 620px;
  color: var(--muted);
  font-size: clamp(13px, 1.6vw, 14.5px);
  line-height: 1.7;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.chip {
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--text);
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--border);
}
.chip b { color: var(--brand); font-weight: 600; }
.chip.gold b { color: var(--gold); }

/* ---------------- 实时状态条 ---------------- */

.livebar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 16px;
  margin-bottom: 16px;
  border-radius: 12px;
  font-size: 12.5px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 0 rgba(23, 201, 100, .7);
  animation: pulse 2s infinite;
}
.dot.busy { background: var(--gold); box-shadow: 0 0 0 0 rgba(245, 196, 81, .7); }
@keyframes pulse {
  70% { box-shadow: 0 0 0 8px rgba(23, 201, 100, 0); }
  100% { box-shadow: 0 0 0 0 rgba(23, 201, 100, 0); }
}

.livebar .spacer { margin-left: auto; }

/* ---------------- 工具栏 ---------------- */

.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}

.field { position: relative; }

input, select, textarea {
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  outline: none;
  transition: border-color .16s, box-shadow .16s;
  max-width: 100%;
}
input::placeholder { color: #566b60; }
input:focus, select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(23, 201, 100, .15);
}
select { cursor: pointer; appearance: none; padding-right: 30px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
input[type="date"] { color-scheme: dark; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform .12s, background .16s, border-color .16s;
  white-space: nowrap;
}
.btn:hover { background: var(--elevated); border-color: var(--border-strong); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary {
  color: #04200f;
  font-weight: 700;
  background: linear-gradient(135deg, var(--brand), #4ade80);
  border-color: transparent;
  box-shadow: 0 8px 22px -10px rgba(23, 201, 100, .9);
}
.btn.primary:hover { filter: brightness(1.07); }
.btn.gold {
  color: #251a00;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold), #ffd97a);
  border-color: transparent;
}
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }

/* ---------------- 比赛卡片 ---------------- */

.match-list { display: flex; flex-direction: column; gap: 10px; }

.match {
  position: relative;
  display: grid;
  grid-template-columns: 96px 1fr 132px;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: linear-gradient(150deg, var(--surface), #0b1a13);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color .18s, transform .18s, box-shadow .18s;
  overflow: hidden;
}
.match::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--brand);
  opacity: 0;
  transition: opacity .18s;
}
.match:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: 0 18px 36px -22px rgba(0, 0, 0, .9);
}
.match:hover::before { opacity: 1; }

.match .meta { font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.match .lg { color: var(--brand); font-weight: 600; font-size: 11.5px; letter-spacing: .3px; }

.teams {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(14px, 1.8vw, 15.5px);
  font-weight: 600;
  color: var(--text-strong);
  flex-wrap: wrap;
}
.teams .vs { color: #46604f; font-size: 11px; font-weight: 400; }
.teams .score {
  margin-left: 6px;
  padding: 2px 9px;
  border-radius: 6px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
  background: rgba(245, 196, 81, .1);
  border: 1px solid rgba(245, 196, 81, .25);
}

.pred { text-align: right; }

.pick {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .5px;
}
.pick.home { color: #041d2e; background: linear-gradient(135deg, #6cc7ff, #2f9ee8); }
.pick.draw { color: #2a1d00; background: linear-gradient(135deg, #ffd97a, #e0a92e); }
.pick.away { color: #2d0703; background: linear-gradient(135deg, #ff9a8e, #ef5f4d); }

.detail { font-size: 11.5px; color: var(--muted); margin-top: 5px; line-height: 1.6; }

.hit-yes { color: var(--ok); font-weight: 600; }
.hit-no { color: var(--bad); font-weight: 600; }

/* 概率条 */
.prob-bar {
  display: flex;
  height: 6px;
  border-radius: 99px;
  overflow: hidden;
  margin-top: 8px;
  background: #0a1510;
}
.prob-bar i { display: block; transition: width .5s cubic-bezier(.4, 0, .2, 1); }
.prob-bar .h { background: linear-gradient(90deg, #2f9ee8, #6cc7ff); }
.prob-bar .d { background: linear-gradient(90deg, #c79a2c, #f5c451); }
.prob-bar .a { background: linear-gradient(90deg, #ef5f4d, #ff9a8e); }

/* ---------------- 卡片 / 详情 ---------------- */

.card {
  padding: clamp(16px, 2.4vw, 22px);
  margin-bottom: 16px;
  border-radius: var(--radius);
  background: linear-gradient(155deg, var(--surface), #0a1611);
  border: 1px solid var(--border);
}
.card h3 {
  margin: 0 0 14px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-strong);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card h3::before {
  content: "";
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--brand), var(--gold));
}

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

.detail-head {
  position: relative;
  overflow: hidden;
  padding: clamp(20px, 3vw, 30px);
  margin-bottom: 16px;
  border-radius: 20px;
  background:
    radial-gradient(700px 300px at 15% 0%, rgba(23, 201, 100, .2), transparent 65%),
    linear-gradient(160deg, #11251c, #0a1611);
  border: 1px solid var(--border);
}
.detail-head .ttl {
  font-size: clamp(20px, 3.4vw, 29px);
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -.3px;
}
.detail-head .sub {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.8;
}

/* 统计卡 */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.stat {
  padding: 16px;
  border-radius: var(--radius);
  background: linear-gradient(155deg, var(--surface-2), #0a1611);
  border: 1px solid var(--border);
  text-align: center;
}
.stat .n {
  font-size: clamp(20px, 2.6vw, 26px);
  font-weight: 700;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.stat .l { margin-top: 5px; font-size: 11.5px; color: var(--muted); }

/* 键值行 */
.kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  font-size: 13px;
  border-bottom: 1px dashed rgba(42, 85, 64, .45);
}
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--muted); flex-shrink: 0; }
.kv .v { color: var(--text); text-align: right; font-weight: 500; }

/* 表格 */
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }

/* 宽表格容器：横向滚动而不把父容器撑宽 */
.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll table { min-width: 100%; }
th {
  text-align: left;
  padding: 8px 10px;
  font-weight: 500;
  font-size: 11.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .4px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td { padding: 9px 10px; border-bottom: 1px solid rgba(29, 58, 44, .5); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(23, 201, 100, .045); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* 图表通用 */
.chart-wrap { overflow-x: auto; padding-top: 4px; }

.bar-row {
  display: grid;
  grid-template-columns: 74px 1fr 52px;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
  font-size: 12.5px;
}
.bar-row .lbl { color: var(--muted); font-size: 12px; }
.bar-row .track {
  height: 8px;
  border-radius: 99px;
  background: #0a1510;
  overflow: hidden;
}
.bar-row .fill {
  height: 100%;
  border-radius: 99px;
  transition: width .6s cubic-bezier(.4, 0, .2, 1);
}
.bar-row .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--text); font-weight: 500; }

/* 雷达图 */
.radar-box { display: grid; place-items: center; padding: 6px; }

/* 预测说明分块 */
.narr { display: flex; flex-direction: column; gap: 10px; }

.narr-sec {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .022);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
}
.narr-sec.mkt { border-left-color: var(--gold); }
.narr-sec.h2h { border-left-color: #9b7cf5; }
.narr-sec.form { border-left-color: var(--home); }
.narr-sec.concl { border-left-color: var(--ok); background: rgba(23, 201, 100, .06); }
.narr-sec.warn { border-left-color: var(--warn); }

.narr-sec h4 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-strong);
  display: flex;
  align-items: center;
  gap: 7px;
}
.narr-sec h4 .ico { font-size: 14px; }
.narr-sec p { margin: 0 0 6px; font-size: 12.8px; line-height: 1.85; color: #b9cdc3; }
.narr-sec p:last-child { margin-bottom: 0; }
.narr-sec .hl { color: var(--brand); font-weight: 600; }
.narr-sec .hl-gold { color: var(--gold); font-weight: 600; }
.narr-sec .hl-bad { color: var(--bad); font-weight: 600; }

/* 对比条（主客队）：单行三列，标签独占一行置中 */
.vs-row {
  display: grid;
  grid-template-columns: 1fr minmax(90px, 38%) 1fr;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 14px;
}
.vs-row .side { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs-row .side b { color: var(--text); font-weight: 600; }
.vs-row .side.r { text-align: right; }
.vs-row .mid { font-size: 11px; color: #46604f; white-space: nowrap; text-align: center; }

.dual-bar {
  display: flex;
  gap: 3px;
  height: 7px;
  border-radius: 99px;
  overflow: hidden;
  background: #0a1510;
}
.dual-bar .l { background: linear-gradient(90deg, #2f9ee8, #6cc7ff); border-radius: 99px 0 0 99px; }
.dual-bar .r { background: linear-gradient(90deg, #ef5f4d, #ff9a8e); margin-left: auto; border-radius: 0 99px 99px 0; }

/* 比分热区 */
.score-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  font-size: 11px;
}
.score-cell {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 5px;
  font-variant-numeric: tabular-nums;
  color: #cfe0d7;
  background: rgba(23, 201, 100, .07);
}

/* ---------------- 认证页 ---------------- */

.auth-wrap {
  display: grid;
  place-items: center;
  min-height: calc(100dvh - 200px);
  padding: 20px 0;
}

.auth-card {
  width: 100%;
  max-width: 430px;
  padding: clamp(24px, 4vw, 36px);
  border-radius: 22px;
  background:
    radial-gradient(500px 220px at 50% 0%, rgba(23, 201, 100, .16), transparent 70%),
    linear-gradient(160deg, var(--surface), #081209);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.auth-card h1 {
  margin: 0 0 6px;
  text-align: center;
  font-size: 24px;
  background: linear-gradient(100deg, #fff, #8affc0 60%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.auth-card .sub { margin: 0 0 22px; text-align: center; font-size: 12.5px; color: var(--muted); }

.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: #081209;
  border: 1px solid var(--border);
}
.tab {
  flex: 1;
  padding: 9px;
  font-size: 13.5px;
  color: var(--muted);
  background: transparent;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  transition: all .16s;
}
.tab.active { color: #04200f; font-weight: 600; background: linear-gradient(135deg, var(--brand), #4ade80); }

.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); }
.form input { width: 100%; padding: 11px 13px; font-size: 14px; }
.form .btn { margin-top: 6px; padding: 12px; font-size: 14.5px; }
.form-note {
  margin: 0;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--warn);
  background: rgba(245, 166, 35, .1);
  border: 1px solid rgba(245, 166, 35, .3);
  text-align: left;
}

.hint { margin: 16px 0 0; font-size: 11.5px; line-height: 1.75; color: var(--muted); text-align: center; }

.plans {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  margin-top: 18px;
}
.plans div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 4px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--border);
}
.plans b { font-size: 11.5px; color: var(--text); }
.plans span { font-size: 10.5px; color: var(--muted); }

/* ---------------- 提示 / 空态 ---------------- */

.empty {
  padding: 48px 20px;
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.8;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  padding: 11px 20px;
  font-size: 13.5px;
  color: #04200f;
  font-weight: 600;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--brand), #4ade80);
  box-shadow: 0 16px 40px -14px rgba(23, 201, 100, .9);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s, transform .22s;
  z-index: 200;
  max-width: min(90vw, 460px);
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { color: #fff; background: linear-gradient(135deg, #e5484d, #ff6b6b); }

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.badge.ok { color: #04200f; background: rgba(23, 201, 100, .9); }
.badge.warn { color: #2a1d00; background: rgba(245, 196, 81, .9); }
.badge.bad { color: #fff; background: rgba(229, 72, 77, .9); }

.code-chip {
  display: inline-block;
  padding: 4px 9px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .6px;
  color: var(--brand);
  background: rgba(23, 201, 100, .08);
  border: 1px solid rgba(23, 201, 100, .28);
  border-radius: 6px;
}

/* ---------------- 页脚 ---------------- */

.foot {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px clamp(12px, 3vw, 32px) 44px;
  text-align: center;
  border-top: 1px solid var(--border);
}
.foot .warn-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--warn);
  background: rgba(245, 166, 35, .08);
  border: 1px solid rgba(245, 166, 35, .28);
}
.foot .cp { margin-top: 14px; font-size: 11.5px; color: var(--muted); line-height: 1.8; }

/* ---------------- 响应式：手机 ---------------- */

/* ==========================================================================
   移动端适配
   --------------------------------------------------------------------------
   主要问题：顶部导航在手机上占了三行（品牌 / 导航 / 用户区），
   加上 iOS 安全区没处理，导致「显示不全」。
   方案：
   1. 顶栏永远单行；品牌文字 + 用户名在小屏隐藏，只留图标
   2. 导航改为底部固定栏（拇指可达），带图标
   3. 全面接入 env(safe-area-inset-*) 处理刘海/圆角/手势条
   4. 表格、比分格、对比条等密集内容降级为不挤压的形态
   ========================================================================== */

/* --- 平板 --- */
@media (max-width: 820px) {
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .grid4 { grid-template-columns: 1fr 1fr; }
  .detail-head { flex-wrap: wrap; }
}

/* --- 手机 --- */
@media (max-width: 640px) {
  :root { --radius: 14px; }

  /* >>> 顶栏：第一行品牌，第二行导航+用户 <<< */
  .topbar {
    flex-wrap: wrap;
    column-gap: 8px;
    row-gap: 6px;
    padding: 8px 12px;
    padding-top: calc(8px + env(safe-area-inset-top));
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
  .brand { flex: 0 0 100%; font-size: 15px; }
  .brand .ball { width: 26px; height: 26px; font-size: 14px; flex: none; }

  /* 导航不再隐藏：换到第二行，横向可滑 */
  .topnav {
    display: flex;
    flex: 1 1 0;          /* 可压缩到剩余空间，绝不吃掉用户区 */
    min-width: 0;
    margin-left: 0;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .topnav::-webkit-scrollbar { display: none; }
  .topnav a { padding: 6px 11px; font-size: 13px; }

  .userbox { margin-left: auto; flex: 0 0 auto; font-size: 12px; gap: 5px; }
  .uname { display: none; }
  .userbox .badge { font-size: 10px; padding: 2px 6px; white-space: nowrap; }
  .userbox .btn.sm { padding: 5px 8px; font-size: 12px; white-space: nowrap; }

}

/* 尊重减弱动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* 滚动条 */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #1d3a2c; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* ---------------- 球队风格画像 ---------------- */

.tag-rebuilt {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .3px;
  color: var(--gold);
  background: rgba(245, 196, 81, .12);
  border: 1px solid rgba(245, 196, 81, .3);
  vertical-align: middle;
}

.prof-head,
.prof-row {
  display: grid;
  grid-template-columns: 1fr 148px 1fr;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  font-size: 12.5px;
  border-bottom: 1px solid rgba(29, 58, 44, .55);
}
.prof-head {
  font-size: 11.5px;
  color: var(--muted);
  border-bottom-color: var(--border);
}
.prof-head .r { text-align: right; }
.prof-row:last-of-type { border-bottom: none; }
.prof-row .k {
  text-align: center;
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}
.prof-row .v {
  font-variant-numeric: tabular-nums;
  color: var(--text);
  font-weight: 500;
}
.prof-row .v.r { text-align: right; }
.prof-row .v.hi { color: var(--brand); }

.prof-poss { margin: 14px 0 10px; }
.prof-poss .lbl {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 5px;
}
.prof-poss .track {
  height: 7px;
  border-radius: 99px;
  background: #0a1510;
  overflow: hidden;
}
.prof-poss .track i {
  display: block;
  height: 100%;
  border-radius: 99px 0 0 99px;
  background: linear-gradient(90deg, #2f9ee8, #6cc7ff);
}

.prof-styles {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.prof-styles .r { text-align: right; margin-left: auto; }
.chip.sm { padding: 3px 10px; font-size: 11px; }

.prof-clash {
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--text);
  background: rgba(23, 201, 100, .07);
  border: 1px solid rgba(23, 201, 100, .2);
}
.prof-clash b { color: var(--brand); font-variant-numeric: tabular-nums; }

.prof-note {
  margin-top: 10px;
  font-size: 11px;
  line-height: 1.7;
  color: #5b7a6a;
}

@media (max-width: 640px) {
  .prof-head, .prof-row { grid-template-columns: 1fr 110px 1fr; font-size: 12px; }
  .prof-row .k { font-size: 10.5px; }
}

/* ---------------- 玩法展示 ---------------- */

.top-scores {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 7px;
  justify-content: flex-end;
}
.top-scores .ts {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 7px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.top-scores .ts b {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}
.top-scores .ts i {
  font-style: normal;
  font-size: 10.5px;
  color: var(--muted);
}
.top-scores .ts.lead {
  background: rgba(23, 201, 100, .1);
  border-color: rgba(23, 201, 100, .32);
}
.top-scores .ts.lead b { color: var(--brand); }
.top-scores .ts.lead i { color: #6fd6a0; }

/* 卡片内四行玩法 */
.match .mkt-list {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(29, 58, 44, .55);
}
.mkt-row {
  display: grid;
  grid-template-columns: 56px 1fr auto 46px;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 12px;
}
.mkt-name {
  color: var(--muted);
  font-size: 11.5px;
}
.mkt-note {
  color: #4f6d5e;
  font-size: 10.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mkt-pick {
  color: var(--text);
  font-weight: 600;
  font-size: 12px;
}
.mkt-pct {
  text-align: right;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 12px;
}

@media (max-width: 640px) {
  .mkt-row { grid-template-columns: 48px 1fr auto 42px; font-size: 11.5px; }
  .mkt-note { font-size: 10px; }
  .top-scores { justify-content: flex-start; }
}

.tag-live {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--brand);
  background: rgba(23, 201, 100, .13);
  border: 1px solid rgba(23, 201, 100, .35);
  vertical-align: middle;
}
.ws-star {
  color: var(--brand);
  font-size: 11px;
  margin-left: 1px;
}

/* ---- WhoScored 对照卡 ---- */
.tag-ext {
  display: inline-block; margin-left: 8px; padding: 2px 8px;
  border-radius: 999px; font-size: 10.5px; font-weight: 500;
  color: #d97706; background: rgba(217, 119, 6, .12);
  border: 1px solid rgba(217, 119, 6, .32); vertical-align: middle;
}
.xt-scores {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 10px;
  padding: 14px 0 12px; border-bottom: 1px solid var(--border);
}
.xt-side { text-align: center; }
.xt-label { font-size: 11.5px; color: var(--muted); margin-bottom: 6px; }
.xt-score {
  font-size: 30px; font-weight: 700; line-height: 1.1;
  font-variant-numeric: tabular-nums; letter-spacing: .5px;
}
.xt-score.same { color: var(--brand); }
.xt-sub { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.xt-mid { text-align: center; }
.same-badge, .diff-badge {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 500;
}
.same-badge { color: var(--ok); background: rgba(23,201,100,.13); border: 1px solid rgba(23,201,100,.32); }
.diff-badge { color: #d97706; background: rgba(217,119,6,.12); border: 1px solid rgba(217,119,6,.3); }
.xt-sec { padding-top: 12px; }
.xt-sec-t {
  font-size: 12px; color: var(--muted); margin-bottom: 8px;
  text-transform: none; font-weight: 500;
}
.xt-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0; border-bottom: 1px dashed var(--border);
  font-size: 13px;
}
.xt-row:last-child { border-bottom: 0; }
.xt-row .k { color: var(--muted); }
.xt-row .v { font-variant-numeric: tabular-nums; font-weight: 600; }

@media (max-width: 520px) {
  .xt-score { font-size: 24px; }
  .xt-scores { gap: 6px; }
}

/* ---- 澳客指数卡 ---- */
.tag-ix {
  display: inline-block; margin-left: 8px; padding: 2px 8px;
  border-radius: 999px; font-size: 10.5px; font-weight: 500;
  color: var(--info); background: rgba(56,132,255,.12);
  border: 1px solid rgba(56,132,255,.32); vertical-align: middle;
}
.ix-head, .ix-row {
  display: grid;
  grid-template-columns: 1.1fr .8fr 14px .8fr .9fr .8fr;
  align-items: center; gap: 6px;
  padding: 6px 0; font-variant-numeric: tabular-nums;
}
.ix-head {
  font-size: 11px; color: var(--muted);
  border-bottom: 1px solid var(--border); padding-bottom: 7px;
}
.ix-head .o, .ix-head .n, .ix-head .d, .ix-head .p { text-align: right; }
.ix-row { border-bottom: 1px dashed var(--border); font-size: 13px; }
.ix-row:last-of-type { border-bottom: 0; }
.ix-row .k { color: var(--muted); }
.ix-row .o { color: var(--muted); text-align: right; font-size: 12.5px; }
.ix-row .a { color: var(--border-strong); text-align: center; font-size: 11px; }
.ix-row .n { text-align: right; font-weight: 600; }
.ix-row .d { text-align: right; font-size: 11.5px; }
.ix-row .p { text-align: right; color: var(--muted); font-size: 12px; }
.dr.down { color: var(--ok); }
.dr.up { color: var(--danger); }
.dr.flat { color: var(--muted); }
.ix-exp { padding: 10px 0 4px; border-top: 1px solid var(--border); margin-top: 6px; }
.ix-exp-t { font-size: 11.5px; color: var(--muted); margin-bottom: 8px; }
.ix-exp-row {
  display: grid; grid-template-columns: 20px 1fr 54px;
  align-items: center; gap: 8px; padding: 3px 0;
}
.ix-exp-row .k { font-size: 12px; font-weight: 600; }
.ix-exp-row .track {
  height: 6px; background: var(--elevated); border-radius: 999px; overflow: hidden;
}
.ix-exp-row .fill { display: block; height: 100%; border-radius: 999px; }
.ix-exp-row .v { text-align: right; font-size: 11.5px; font-variant-numeric: tabular-nums; color: var(--muted); }
.ix-tags { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 10px; }
.ix-tag {
  padding: 3px 9px; border-radius: 999px; font-size: 11.5px;
  background: var(--elevated); color: var(--text); border: 1px solid var(--border);
}
@media (max-width: 520px) {
  .ix-head, .ix-row { grid-template-columns: 1fr .7fr 10px .7fr .8fr; }
  .ix-head .p, .ix-row .p { display: none; }
}

/* ==========================================================================
   登录页：验证码 / 记住我 / 声明勾选
   ========================================================================== */
.cap-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.cap-row input {
  flex: 1;
  min-width: 0;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.cap-row img {
  height: 42px;
  width: 118px;
  flex: 0 0 auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  background: #0a1a14;
  object-fit: cover;
  transition: border-color .15s, transform .1s;
}
.cap-row img:hover { border-color: var(--brand); }
.cap-row img:active { transform: scale(.97); }

label.chk {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  padding: 2px 0;
}
label.chk input[type=checkbox] {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: var(--brand);
  cursor: pointer;
  margin: 0;
}
label.chk a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
label.chk a:hover { color: #57e694; }

/* ==========================================================================
   声明弹窗
   ========================================================================== */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  padding-top: calc(20px + env(safe-area-inset-top));
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  background: rgba(2, 8, 5, .78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: maskIn .18s ease-out;
}
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  width: 100%;
  max-width: 640px;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 24px 70px -20px rgba(0, 0, 0, .9);
  animation: modalIn .22s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

.modal h2 {
  margin: 0;
  padding: 18px 22px 14px;
  font-size: 17px;
  border-bottom: 1px solid var(--border);
  flex: 0 0 auto;
}

.modal-body {
  padding: 16px 22px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--muted);
  flex: 1 1 auto;
  overscroll-behavior: contain;
}
.modal-body h3 {
  margin: 18px 0 6px;
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
}
.modal-body h3:first-of-type { margin-top: 4px; }
.modal-body p { margin: 0 0 10px; }
.modal-body ul { margin: 0 0 10px; padding-left: 20px; }
.modal-body li { margin-bottom: 4px; }
.modal-body strong { color: #ffd97a; font-weight: 600; }
.modal-body .terms-lead {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 200, 80, .08);
  border: 1px solid rgba(255, 200, 80, .22);
  color: #ffd97a;
  font-size: 13px;
}
.modal-body .terms-foot {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  text-align: right;
  opacity: .7;
}

.modal-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 22px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  flex: 0 0 auto;
}

@media (max-width: 640px) {
  .modal-mask { padding: 0; align-items: flex-end; }
  .modal {
    max-width: 100%;
    max-height: 92vh;
    border-radius: 18px 18px 0 0;
    border-bottom: none;
  }
  .modal h2 { padding: 16px 18px 12px; font-size: 16px; }
  .modal-body { padding: 14px 18px; font-size: 13px; line-height: 1.7; }
  .modal-foot { padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); }
  .modal-foot .btn { flex: 1; }
  .cap-row img { width: 104px; height: 42px; }
}
