:root {
  --green-900: #06381f;
  --green-800: #0a5b31;
  --green-700: #137a42;
  --green-600: #1b8f50;
  --gold: #f0c14b;
  --gold-deep: #d9a323;
  --bg: #f3f6f4;
  --card: #ffffff;
  --ink: #14251b;
  --ink-2: #3d5448;
  --muted: #7c8f84;
  --line: #e2eae5;
  --live: #e23b3b;
  --radius: 16px;
  --shadow: 0 2px 4px rgba(9, 45, 27, .04), 0 10px 28px rgba(9, 45, 27, .07);
  --shadow-lg: 0 16px 50px rgba(9, 45, 27, .16);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--ink); min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  -webkit-font-smoothing: antialiased; line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img, svg { display: block; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 18px; }

/* ---------- 顶部 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(6, 56, 31, .94); backdrop-filter: blur(10px);
  border-bottom: 2px solid rgba(240, 193, 75, .55);
}
.nav { display: flex; align-items: center; gap: 8px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; color: #fff; min-width: 0; }
.brand .mark {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  background: linear-gradient(140deg, #f7d574, #d99f18); color: #08301b;
  display: grid; place-items: center; box-shadow: inset 0 -2px 0 rgba(0,0,0,.15);
}
.brand b { display: block; font-size: 16px; letter-spacing: .3px; white-space: nowrap; }
.brand small { display: block; font-size: 11px; color: #a9d9bd; letter-spacing: 1.6px; }
.navlinks { display: flex; gap: 2px; align-items: center; }
.navlinks a {
  color: #cde8d8; font-size: 15px; font-weight: 600; padding: 9px 14px; border-radius: 9px;
  transition: background .15s, color .15s;
}
.navlinks a:hover { background: rgba(255,255,255,.08); color: #fff; }
.navlinks a.on { background: rgba(240,193,75,.16); color: var(--gold); }
.nav-admin { color: #9ec7ae !important; font-size: 13px !important; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); display: inline-block; margin-right: 6px; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1);} 50% { opacity: .35; transform: scale(.8);} }

/* ---------- 首页头图 ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 380px at 80% -10%, rgba(240,193,75,.22), transparent 60%),
    linear-gradient(135deg, #06381f 0%, #0a5b31 55%, #0e6d3b 100%);
}
.hero::after {
  content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px;
  border-radius: 50%; border: 2px dashed rgba(255,255,255,.1);
}
.hero .wrap { padding-top: 34px; padding-bottom: 34px; position: relative; }
.eyebrow { font-size: 12px; letter-spacing: 5px; color: #9fd4b6; font-weight: 700; }
.hero h1 { font-size: 34px; line-height: 1.22; margin: 12px 0 14px; font-weight: 800; letter-spacing: .5px; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero .chips { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 22px; }
.chip {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
  padding: 6px 13px; border-radius: 999px; font-size: 13px; font-weight: 600; color: #eafff1;
}
.chip.gold { background: var(--gold); color: #21351f; border-color: var(--gold); }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 620px; }
.stat { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 12px 14px; }
.stat b { display: block; font-size: 24px; line-height: 1.2; color: #fff; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: #a9d9bd; }

/* ---------- 通用 ---------- */
main { padding: 26px 0 60px; }
.section { margin-top: 26px; }
.section:first-child { margin-top: 0; }
.sec-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.sec-head h2 { font-size: 20px; margin: 0; letter-spacing: .3px; }
.sec-head .sub { font-size: 13px; color: var(--muted); }
.sec-head .right { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--green-700); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 18px 20px; }
.grid2 { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }

/* ---------- 比赛卡 ---------- */
.match-row {
  display: grid; grid-template-columns: 86px 1fr auto; gap: 14px; align-items: center;
  padding: 13px 16px; border-bottom: 1px solid var(--line); transition: background .15s;
}
.match-row:last-child { border-bottom: 0; }
.match-row:hover { background: #f8fbf9; }
.meta-col { font-size: 12px; color: var(--muted); line-height: 1.5; }
.meta-col b { display: block; color: var(--ink-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.teams-col { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.team-line { display: flex; align-items: center; gap: 9px; min-width: 0; }
.team-line .nm { font-weight: 700; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-line .sc { margin-left: auto; font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; padding-left: 10px; }
.team-line.lose .nm, .team-line.lose .sc { color: #8b9a91; font-weight: 600; }
.badge {
  width: 26px; height: 26px; border-radius: 8px; flex: none; display: grid; place-items: center;
  font-size: 11px; font-weight: 800; color: #fff; border: 1px solid rgba(0,0,0,.08);
}
.badge.lg { width: 52px; height: 52px; border-radius: 14px; font-size: 19px; }
.badge.sm { width: 20px; height: 20px; border-radius: 6px; font-size: 9px; }
.state { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.state.scheduled { background: #eef4f0; color: #4d6b57; }
.state.live { background: #fdeaea; color: var(--live); }
.state.finished { background: #e8f4ec; color: var(--green-800); }
.kick { font-size: 15px; font-weight: 800; color: var(--green-800); }
.vs { font-size: 11px; color: var(--muted); font-weight: 700; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table.stand { width: 100%; border-collapse: collapse; font-size: 14px; }
table.stand th {
  font-size: 12px; color: var(--muted); font-weight: 700; text-align: center;
  padding: 10px 6px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.stand th:nth-child(2) { text-align: left; padding-left: 14px; }
table.stand td { text-align: center; padding: 11px 6px; border-bottom: 1px solid #eef3f0; font-variant-numeric: tabular-nums; }
table.stand td:nth-child(2) { text-align: left; padding-left: 14px; }
table.stand tr:last-child td { border-bottom: 0; }
table.stand tbody tr { transition: background .15s; }
table.stand tbody tr:hover { background: #f8fbf9; }
.rank { font-weight: 800; color: #9aa9a0; width: 34px; }
.rank.top { color: var(--green-700); }
.pos-1 .rank { color: var(--gold-deep); }
.pts { font-weight: 800; color: var(--green-800); }
.tname { display: flex; align-items: center; gap: 9px; font-weight: 700; white-space: nowrap; }
.form { display: flex; gap: 3px; justify-content: center; }
.form i { width: 17px; height: 17px; border-radius: 5px; font-style: normal; font-size: 10px; font-weight: 800; display: grid; place-items: center; color: #fff; }
.form i.W { background: #1b8f50; } .form i.D { background: #b9c4bd; } .form i.L { background: #d46a6a; }

/* ---------- 积分榜页 ---------- */
.group-block { margin-bottom: 22px; }
.group-head {
  display: flex; align-items: center; gap: 10px; padding: 14px 18px;
  background: linear-gradient(100deg, var(--green-800), var(--green-700)); color: #fff;
  border-radius: var(--radius) var(--radius) 0 0;
}
.group-head b { font-size: 17px; }
.group-head .tag { margin-left: auto; font-size: 12px; color: #c9e8d6; }
.qual-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); padding: 10px 16px 14px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 5px; }

/* ---------- 比赛详情 ---------- */
.match-hero { background: linear-gradient(150deg, #073a21, #0a5b31 60%, #0d6b39); color: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.match-hero .mh-top { display: flex; align-items: center; gap: 10px; padding: 14px 20px 0; font-size: 12.5px; color: #b7ddc7; }
.match-hero .mh-top .state.finished { background: rgba(255,255,255,.16); color: #eafff1; }
.match-hero .mh-top .state.live { background: #fff; color: var(--live); }
.match-hero .mh-top .state.scheduled { background: rgba(255,255,255,.14); color: #d9efe3; }
.scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 18px 18px 6px; }
.sb-team { display: flex; flex-direction: column; align-items: center; gap: 9px; text-align: center; }
.sb-team .badge { width: 62px; height: 62px; border-radius: 18px; font-size: 23px; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.sb-team .nm { font-size: 16px; font-weight: 800; line-height: 1.25; }
.sb-team .side { font-size: 11px; color: #9fceb3; letter-spacing: 2px; }
.sb-score { text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sb-score b { font-size: 46px; line-height: 1; letter-spacing: 2px; }
.sb-score .dash { color: #8fbfa4; font-size: 30px; margin: 0 8px; }
.sb-score .time { font-size: 12px; color: #b7ddc7; margin-top: 6px; }
.sb-score .big-vs { font-size: 22px; font-weight: 800; color: #9fceb3; letter-spacing: 3px; }
.mh-foot { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 14px 20px 16px; border-top: 1px solid rgba(255,255,255,.12); font-size: 12.5px; color: #c6e6d5; }
.mh-foot b { color: #fff; font-weight: 700; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-weight: 800; font-size: 15px; }
.panel-head .sub { font-weight: 500; font-size: 12px; color: var(--muted); margin-left: auto; }
.timeline { padding: 6px 12px 14px; }
.tl-row { display: grid; grid-template-columns: 1fr 54px 1fr; align-items: center; gap: 8px; padding: 7px 4px; }
.tl-min { text-align: center; font-size: 12px; font-weight: 800; color: var(--green-800); background: #eef6f1; border-radius: 999px; padding: 3px 0; }
.tl-ev { display: flex; align-items: center; gap: 7px; font-size: 14px; }
.tl-ev.right { justify-content: flex-end; }
.tl-ev .who { font-weight: 700; }
.tl-ev .as { font-size: 12px; color: var(--muted); }
.tl-ico { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 12px; flex: none; }
.tl-ico.goal, .tl-ico.pen { background: #e8f5ec; color: #1b8f50; }
.tl-ico.own_goal { background: #fdeeee; color: var(--live); }
.tl-ico.yellow { background: #fff8e1; color: #b78900; }
.tl-ico.red { background: #fdeaea; color: var(--live); }
.empty { padding: 30px 16px; text-align: center; color: var(--muted); font-size: 13.5px; }

.stat-line { padding: 9px 18px; }
.stat-top { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 5px; }
.stat-bar { display: flex; height: 7px; border-radius: 99px; overflow: hidden; background: #edf2ef; }
.stat-bar i { display: block; height: 100%; }
.stat-bar .h { background: var(--green-700); }
.stat-bar .a { background: #c8ad63; }

/* ---------- 赛程页 ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.tab { padding: 8px 15px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 13.5px; font-weight: 700; color: var(--ink-2); cursor: pointer; transition: all .15s; }
.tab:hover { border-color: #b9d2c3; }
.tab.on { background: var(--green-800); border-color: var(--green-800); color: #fff; }
.date-block { margin-bottom: 18px; }
.date-head { display: flex; align-items: baseline; gap: 10px; margin: 0 0 8px 4px; }
.date-head b { font-size: 16px; }
.date-head span { font-size: 12.5px; color: var(--muted); }

/* ---------- 球队页 ---------- */
.team-hero { display: flex; align-items: center; gap: 16px; padding: 22px; background: linear-gradient(120deg, #073a21, #0d6b39); color: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.team-hero .badge { width: 66px; height: 66px; border-radius: 20px; font-size: 24px; }
.team-hero h1 { margin: 0 0 4px; font-size: 24px; }
.team-hero .meta { font-size: 13px; color: #b7ddc7; }
.team-hero .color-chip { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.12); padding: 4px 10px; border-radius: 999px; font-size: 12px; margin-top: 8px; }
.team-hero .color-chip i { width: 11px; height: 11px; border-radius: 50%; border: 1px solid rgba(255,255,255,.5); }

/* ---------- 统计页 ---------- */
.leader-row { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--line); }
.leader-row:last-child { border-bottom: 0; }
.leader-row .no { width: 24px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.leader-row .no.g { color: var(--gold-deep); }
.leader-row .nm { font-weight: 700; }
.leader-row .tm { font-size: 12px; color: var(--muted); }
.leader-row .val { margin-left: auto; font-weight: 800; color: var(--green-800); font-size: 17px; font-variant-numeric: tabular-nums; }

/* ---------- 管理后台 ---------- */
.admin-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.admin-top h1 { font-size: 22px; margin: 0; }
.admin-top .sp { margin-left: auto; }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 700; font-size: 13.5px; padding: 9px 15px; border-radius: 10px; cursor: pointer; transition: all .15s; }
.btn:hover { border-color: #b9d2c3; background: #f8fbf9; }
.btn.primary { background: var(--green-800); border-color: var(--green-800); color: #fff; }
.btn.primary:hover { background: var(--green-700); }
.btn.danger { color: var(--live); border-color: #f3c9c9; }
.btn.sm { padding: 6px 10px; font-size: 12.5px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.login-card { max-width: 400px; margin: 40px auto; padding: 26px; }
.login-card h1 { font-size: 20px; margin: 0 0 6px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 5px; }
.input, select, textarea {
  width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 9px;
  padding: 9px 11px; font-size: 14px; font-family: inherit; color: var(--ink); outline: none;
}
.input:focus, select:focus, textarea:focus { border-color: var(--green-600); box-shadow: 0 0 0 3px rgba(27,143,80,.12); }
.admin-list { display: flex; flex-direction: column; }
.admin-item { display: grid; grid-template-columns: 66px 1fr auto; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.admin-item:last-child { border-bottom: 0; }
.admin-item .t { font-size: 12.5px; color: var(--muted); }
.admin-item .names { font-weight: 700; font-size: 14.5px; }
.admin-item .info { font-size: 12px; color: var(--muted); }
.score-input { width: 62px; text-align: center; font-weight: 800; font-size: 17px; padding: 6px; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat-grid .field { margin: 0; }
.stat-pair { display: grid; grid-template-columns: 1fr 34px 1fr; align-items: center; gap: 6px; }
.stat-pair .mid { text-align: center; font-size: 11px; color: var(--muted); font-weight: 700; }
.event-row { display: grid; grid-template-columns: 62px 70px 104px 1fr 1fr 34px; gap: 8px; align-items: center; margin-bottom: 8px; }
.event-row .input { padding: 7px 9px; font-size: 13px; }
.event-row.is-card { grid-template-columns: 62px 70px 104px 1fr 34px; }
.event-row.is-card .assist { display: none; }
.event-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.event-tools .btn.card-yellow { border-color: #e0b43c; background: #fff8e1; color: #8a6400; }
.event-tools .btn.card-red { border-color: #e08a8a; background: #fdeaea; color: #a11d1d; }
.event-tools .hint { margin-left: 2px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); background: #06381f; color: #fff; padding: 11px 18px; border-radius: 11px; font-size: 13.5px; font-weight: 600; opacity: 0; pointer-events: none; transition: all .25s; z-index: 90; box-shadow: var(--shadow-lg); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: #8f1f1f; }
.hint { font-size: 12px; color: var(--muted); }
.notice { background: #fff8e6; border: 1px solid #f2dfa8; color: #7a5a09; padding: 10px 13px; border-radius: 10px; font-size: 12.5px; }

/* 底部导航（移动端） */
.tabbar { display: none; }
footer.site { border-top: 1px solid var(--line); padding: 22px 0 30px; color: var(--muted); font-size: 12.5px; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }

@media (max-width: 880px) {
  .hero h1 { font-size: 26px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .brand small { display: none; }
  .navlinks { display: none; }
  .tabbar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
    background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a { flex: 1; text-align: center; font-size: 11px; color: var(--muted); padding: 5px 0; font-weight: 700; }
  .tabbar a.on { color: var(--green-800); }
  .tabbar a .ic { display: block; font-size: 18px; line-height: 1.3; }
  main { padding-bottom: 80px; }
  .match-hero .scoreboard { padding: 14px 10px 4px; }
  .sb-team .badge { width: 52px; height: 52px; font-size: 19px; }
  .sb-team .nm { font-size: 14px; }
  .sb-score b { font-size: 36px; }
  .match-row { grid-template-columns: 68px 1fr auto; gap: 10px; padding: 12px; }
  .team-line .nm { font-size: 14.5px; }
  .event-row { grid-template-columns: 58px 66px 96px 1fr 1fr 30px; }
  .event-row.is-card { grid-template-columns: 58px 66px 96px 1fr 30px; }
  .event-tools .hint { display: none; }
  .stat-grid { grid-template-columns: 1fr; }
}
