/*
Theme Name: Ledgoal 赛果账本
Theme URI: https://ledgoal.com
Author: Ledgoal
Description: 赛果账本 Ledgoal 足球数据分析网站主题：比分赛程、模型预测、虚拟分析师、模型准确率、会员。
Version: 1.0.1
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: ledgoal
*/

:root {
  --ink: #1A1A1A;
  --ink-2: #2E2E30;
  --ink-3: #48484C;
  --red: #D42A34;
  --red-dark: #A81E28;
  --red-light: #FF5A63;
  --red-tint: #FBE3E4;
  --blue: #2B5AA8;
  --blue-dark: #1E4380;
  --blue-tint: #DCE6F5;
  --grey: #C4C4C8;
  --bg: #F4F4F5;
  --card: #FFFFFF;
  --line: #E4E4E7;
  --line-2: #F0F0F2;
  --soft: #FAFAFB;
  --chip: #E7E7EA;
  --text: #1A1A1A;
  --body: #3A3A3C;
  --muted: #636366;
  --muted-on-dark: #A1A1A6;
  --light-on-dark: #D1D1D6;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --radius: 12px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', 'Noto Sans CJK SC', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}
a { color: var(--red); }
a:hover { color: var(--red-dark); }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.3; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Header ---------- */
.site-header { background: var(--ink); color: #F4F4F5; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 22px; }
.brand:hover { color: #fff; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text small { font-size: 11px; font-weight: 600; letter-spacing: 2px; color: var(--muted-on-dark); }
.brand-goal { color: var(--red-light); }
.main-nav { display: flex; flex-wrap: wrap; gap: 2px; }
.main-nav a { color: var(--light-on-dark); text-decoration: none; padding: 12px 14px; border-bottom: 2px solid transparent; }
.main-nav a:hover { color: #fff; }
.main-nav a.is-active { color: #fff; font-weight: 700; border-bottom-color: var(--red); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--ink-3); background: transparent; color: #F4F4F5; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 8px; border: 0; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; font-family: inherit; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-2); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--grey); }

/* ---------- Layout ---------- */
.layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; padding-top: 24px; padding-bottom: 24px; }
.layout-main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.layout-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h2 { margin: 0 0 12px; font-size: 17px; }
.card-dark { background: var(--ink); color: #F4F4F5; border-color: var(--ink); }
.card-dark .muted { color: var(--muted-on-dark); }
.badge { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 4px; background: var(--chip); color: var(--muted); }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.pill-red { background: var(--red-tint); color: var(--red-dark); }
.pill-grey { background: #ECECEE; color: var(--body); }
.pill-blue { background: var(--blue-tint); color: var(--blue-dark); }
.pill-dark { background: var(--ink); color: #fff; }
.row-between { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }

/* ---------- Probability bars ---------- */
.pbar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; gap: 2px; }
.pbar.lg { height: 16px; border-radius: 8px; gap: 3px; }
.pbar .h { background: var(--red); }
.pbar .d { background: var(--grey); }
.pbar .a { background: var(--blue); }
.plabels { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; font-family: var(--mono); }
.plabels .h { color: var(--red); } .plabels .d { color: var(--muted); } .plabels .a { color: var(--blue); }
.meter { height: 8px; background: #EDEDF0; border-radius: 4px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--red); }

/* ---------- Home / fixtures ---------- */
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 4px; gap: 4px; }
.seg button, .seg a { border: 0; background: transparent; border-radius: 6px; padding: 10px 16px; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--body); text-decoration: none; }
.seg .on { background: var(--ink); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { border: 1px solid var(--line); background: #fff; color: var(--text); border-radius: 999px; padding: 10px 16px; font: inherit; font-size: 14px; cursor: pointer; }
.chips button.on { background: var(--red); border-color: var(--red); color: #fff; }
.legend { display: flex; justify-content: flex-end; gap: 14px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.league-group { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.league-group > header { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; background: var(--soft); border-bottom: 1px solid #EDEDF0; font-weight: 800; }
.fx { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 14px 18px; border-top: 1px solid var(--line-2); color: var(--text); text-decoration: none; }
.fx:hover { background: var(--soft); color: var(--text); }
.fx-status { width: 56px; font-size: 13px; font-weight: 700; }
.fx-status.live { color: var(--red); }
.fx-status.ft { color: var(--muted); }
.fx-teams { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.fx-teams div { display: flex; justify-content: space-between; }
.fx-teams b { font-family: var(--mono); }
.fx-prob { flex: 0 1 220px; display: flex; flex-direction: column; gap: 6px; }
.fx-note { font-size: 12px; color: var(--muted); }
.ad-slot { border: 1px dashed var(--grey); border-radius: var(--radius); min-height: 100px; display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--muted); }
.big-num { font-size: 44px; font-weight: 800; font-family: var(--mono); line-height: 1.1; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-2); color: var(--text); text-decoration: none; }
.list-row:hover { color: var(--text); }
.avatar { width: 38px; height: 38px; border-radius: 50%; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; }
.avatar.lg { width: 72px; height: 72px; font-size: 30px; }

/* ---------- Match page ---------- */
.match-hero { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 22px; }
.teams3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; text-align: center; gap: 12px; }
.team-crest { width: 64px; height: 64px; border-radius: 50%; background: var(--chip); margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); }
.team-name { font-size: 24px; font-weight: 800; }
.score-big { font-size: 44px; font-weight: 800; font-family: var(--mono); white-space: nowrap; }
.subnav { display: flex; flex-wrap: wrap; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 4px; }
.subnav a { flex: 1 1 120px; text-align: center; padding: 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 14px; }
.subnav a.on { background: var(--ink); color: #fff; font-weight: 700; }
.stat-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.stat-row .vals { display: flex; justify-content: space-between; font-size: 14px; }
.stat-row .vals b { font-family: var(--mono); }
.stat-bars { display: flex; gap: 4px; height: 8px; }
.stat-bars > div { flex: 1; display: flex; background: #EDEDF0; border-radius: 4px; overflow: hidden; }
.stat-bars > div:first-child { justify-content: flex-end; }
.stat-bars span { display: block; height: 100%; }
.stat-bars .h { background: var(--red); } .stat-bars .a { background: var(--blue); }
.pbar span { display: block; height: 100%; }
.form-dots { display: flex; gap: 5px; }
.form-dots span { width: 26px; height: 26px; border-radius: 6px; color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.f-W { background: var(--red); } .f-D { background: #8E8E93; } .f-L { background: var(--blue); }
.tile { background: var(--bg); border-radius: 10px; padding: 14px; }
.tile .k { font-size: 12px; color: var(--muted); }
.tile .v { font-size: 22px; font-weight: 800; font-family: var(--mono); }
.matrix { display: grid; grid-template-columns: 36px repeat(5, minmax(48px, 1fr)); gap: 6px; }
.matrix div { height: 44px; border-radius: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--mono); font-size: 13px; }
.matrix .hd { background: transparent; color: var(--muted); font-size: 12px; height: auto; }
.factor { display: grid; grid-template-columns: 96px 44px 84px minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-2); font-size: 14px; }
.factor b { font-size: 14px; }
.lock-note { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--red); }

/* ---------- Tables ---------- */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 6px; }
.tbl td { padding: 11px 6px; border-top: 1px solid var(--line-2); }

/* ---------- Membership ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.plan { border-radius: 14px; padding: 28px; display: flex; flex-direction: column; gap: 16px; background: #fff; border: 1px solid var(--line); }
.plan.pro { background: var(--ink); color: #F4F4F5; border: 2px solid var(--red); }
.plan ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.plan li::before { content: "✓"; color: var(--red); font-weight: 800; margin-right: 10px; }
.plan.pro li::before { color: var(--red-light); }
.price { font-size: 36px; font-weight: 800; font-family: var(--mono); }

/* ---------- FAQ ---------- */
details.faq { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 16px 20px; margin-bottom: 10px; }
details.faq summary { cursor: pointer; font-weight: 700; font-size: 16px; }
details.faq p { margin: 10px 0 0; color: var(--body); line-height: 1.8; }

/* ---------- Articles ---------- */
.prose { max-width: 760px; margin: 0 auto; padding: 40px 24px; }
.prose h1 { font-size: 34px; margin: 0 0 12px; }
.prose .entry-content { font-size: 17px; line-height: 1.85; color: #2A2A2C; }
.post-card { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; color: var(--text); text-decoration: none; }
.post-card:hover { color: var(--text); border-color: var(--grey); }
.post-card h2 { margin: 6px 0; font-size: 20px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--light-on-dark); margin-top: 24px; }
.site-footer .wrap { padding-top: 40px; padding-bottom: 28px; display: flex; flex-direction: column; gap: 28px; }
.footer-top { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; }
.footer-brand { flex: 1 1 260px; display: flex; flex-direction: column; gap: 12px; }
.footer-col { flex: 0 1 160px; display: flex; flex-direction: column; gap: 4px; }
.footer-col strong { color: #fff; font-size: 14px; padding-bottom: 6px; }
.footer-col a { color: var(--light-on-dark); text-decoration: none; font-size: 14px; padding: 6px 0; }
.footer-col a:hover { color: #fff; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; }
.socials a { display: inline-flex; align-items: center; gap: 8px; color: #fff; background: var(--ink-2); border-radius: 999px; padding: 8px 14px 8px 8px; font-size: 13px; text-decoration: none; }
.socials a span { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
.footer-bottom { border-top: 1px solid var(--ink-2); padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; font-size: 12px; color: var(--muted-on-dark); line-height: 1.7; }

/* ---------- Small screens ---------- */
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .main-nav { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .main-nav a { white-space: nowrap; padding: 10px 12px; }
  .header-actions .lang { display: none; }
  .team-name { font-size: 18px; }
  .score-big { font-size: 34px; }
  .match-hero { padding: 18px; }
  .factor { grid-template-columns: 80px 70px minmax(0, 1fr); }
  .factor .w { display: none; }
  .big-num { font-size: 36px; }
  .grid-3 { gap: 8px; }
}
