/* ============================================================
   WC26 预测中心 — 设计系统
   深夜蓝底 + 三主办国渐变（绿/蓝/红），玻璃拟态卡片
   ============================================================ */

:root {
  --bg: #070b16;
  --bg-soft: #0c1222;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-strong: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #eaeefb;
  --muted: #8d97b4;
  --faint: #5b6480;
  --green: #00e5a0;
  --blue: #3aa6ff;
  --red: #ff5470;
  --gold: #ffd166;
  --tri: linear-gradient(90deg, var(--green), var(--blue) 50%, var(--red));
  --tri-soft: linear-gradient(135deg, rgba(0,229,160,.16), rgba(58,166,255,.14) 50%, rgba(255,84,112,.16));
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --r-lg: 18px;
  --r-md: 13px;
  --r-sm: 9px;
  --font-display: "Archivo", "Noto Sans SC", "PingFang SC", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  --font-num: "Archivo", "SF Mono", ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(58, 166, 255, 0.13), transparent 60%),
    radial-gradient(900px 450px at -10% 10%, rgba(0, 229, 160, 0.10), transparent 55%),
    radial-gradient(800px 500px at 50% 110%, rgba(255, 84, 112, 0.08), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
}

::selection { background: rgba(58, 166, 255, 0.35); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb { background: #232c47; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #2f3a5e; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: none; }

/* ---------------- 顶部导航 ---------------- */
.topnav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 22px;
  padding: 0 26px; height: 62px;
  background: rgba(7, 11, 22, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand-ball { font-size: 22px; filter: drop-shadow(0 0 12px rgba(58,166,255,.6)); }
.brand-text { font-family: var(--font-display); font-weight: 900; font-size: 20px; letter-spacing: 0.5px; }
.brand-text em { font-style: normal; background: var(--tri); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-text small { font-size: 11px; font-weight: 500; color: var(--muted); margin-left: 8px; letter-spacing: 2px; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  color: var(--muted); font-weight: 500; font-size: 14px;
  padding: 7px 14px; border-radius: 999px; transition: all .18s;
}
.nav-links a:hover { color: var(--text); background: var(--panel-strong); }
.nav-links a.active { color: #06101f; background: var(--tri); font-weight: 700; }
.nav-burger { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--text); font-size: 18px; padding: 4px 12px; border-radius: 8px; cursor: pointer; }

/* ---------------- 布局 ---------------- */
.view { max-width: 1180px; margin: 0 auto; padding: 34px 26px 80px; min-height: calc(100vh - 220px); }
.section { margin-bottom: 42px; }

.page-head { margin-bottom: 26px; }
.page-head h1 {
  font-family: var(--font-display); font-size: 34px; font-weight: 900; letter-spacing: .5px;
  display: flex; align-items: center; gap: 12px;
}
.page-head .sub { color: var(--muted); margin-top: 6px; max-width: 760px; }

.h2 {
  font-family: var(--font-display); font-size: 20px; font-weight: 700; margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px;
}
.h2::before { content: ""; width: 5px; height: 20px; border-radius: 3px; background: var(--tri); }

/* ---------------- 卡片 ---------------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  backdrop-filter: blur(8px);
}
.card.hover { transition: transform .18s, border-color .18s, background .18s; cursor: pointer; }
.card.hover:hover { transform: translateY(-3px); border-color: var(--line-strong); background: var(--panel-strong); }

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

/* ---------------- 首页 Hero ---------------- */
.hero {
  position: relative; overflow: hidden;
  border-radius: 24px; border: 1px solid var(--line-strong);
  background: var(--tri-soft), var(--bg-soft);
  padding: 52px 46px;
  margin-bottom: 34px;
}
.hero::after {
  content: "⚽"; position: absolute; right: -30px; bottom: -60px;
  font-size: 280px; opacity: 0.05; transform: rotate(-15deg);
}
.hero .kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: 3px; font-weight: 700; color: var(--green);
  text-transform: uppercase; margin-bottom: 14px;
}
.hero .kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .4; } }
.hero h1 {
  font-family: var(--font-display); font-size: clamp(34px, 5vw, 56px); font-weight: 900; line-height: 1.12;
  margin-bottom: 14px;
}
.hero h1 .grad { background: var(--tri); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); max-width: 640px; font-size: 16px; margin-bottom: 26px; }
.hero-stats { display: flex; gap: 34px; flex-wrap: wrap; }
.hero-stat .n { font-family: var(--font-num); font-size: 30px; font-weight: 900; }
.hero-stat .l { font-size: 12px; color: var(--muted); letter-spacing: 1px; }
.hero-cta { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 999px; font-size: 14px; font-weight: 700;
  border: 1px solid var(--line-strong); color: var(--text); background: var(--panel-strong);
  cursor: pointer; transition: all .18s; font-family: var(--font-body);
}
.btn:hover { border-color: var(--blue); transform: translateY(-1px); }
.btn.primary { background: var(--tri); color: #06101f; border: none; }
.btn.primary:hover { filter: brightness(1.12); }
.btn.small { padding: 6px 14px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------------- 旗帜与队名 ---------------- */
.flag { font-size: 1.25em; line-height: 1; }
.team-inline { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; }
.team-inline:hover { color: var(--blue); }
.team-inline .en { color: var(--faint); font-size: .85em; font-weight: 400; }

/* ---------------- 表格 ---------------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th {
  text-align: left; color: var(--faint); font-weight: 500; font-size: 12px;
  letter-spacing: 1px; padding: 8px 10px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tbl td { padding: 9px 10px; border-bottom: 1px solid rgba(255,255,255,.045); }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr.rowlink { cursor: pointer; transition: background .15s; }
.tbl tr.rowlink:hover { background: var(--panel-strong); }
.tbl .num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.tbl .r { text-align: right; }
.tbl .c { text-align: center; }

/* ---------------- 概率条 ---------------- */
.pbar { display: flex; align-items: center; gap: 10px; }
.pbar .track { flex: 1; height: 7px; background: rgba(255,255,255,.07); border-radius: 4px; overflow: hidden; min-width: 50px; }
.pbar .fill { height: 100%; border-radius: 4px; background: var(--tri); transition: width .5s ease; }
.pbar .fill.green { background: linear-gradient(90deg, #00b380, var(--green)); }
.pbar .fill.blue { background: linear-gradient(90deg, #1d7fd6, var(--blue)); }
.pbar .fill.red { background: linear-gradient(90deg, #d63a55, var(--red)); }
.pbar .fill.gold { background: linear-gradient(90deg, #d9a93f, var(--gold)); }
.pbar .val { font-family: var(--font-num); font-size: 13px; font-weight: 700; min-width: 48px; text-align: right; }

/* 1X2 三段条 */
.bar3 { display: flex; height: 30px; border-radius: 8px; overflow: hidden; font-family: var(--font-num); font-size: 12px; font-weight: 700; }
.bar3 > div { display: flex; align-items: center; justify-content: center; color: #06101f; min-width: 2px; white-space: nowrap; overflow: hidden; }
.bar3 .w { background: linear-gradient(180deg, #19f0b0, #00c78b); }
.bar3 .d { background: linear-gradient(180deg, #aab4cf, #7d88a6); }
.bar3 .l { background: linear-gradient(180deg, #ff7088, #e84a66); }
.bar3-legend { display: flex; justify-content: space-between; margin-top: 7px; font-size: 12.5px; color: var(--muted); }

/* ---------------- 徽章 ---------------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: var(--panel-strong); border: 1px solid var(--line); color: var(--muted);
  letter-spacing: .5px; white-space: nowrap;
}
.chip.green { color: var(--green); border-color: rgba(0,229,160,.35); background: rgba(0,229,160,.08); }
.chip.blue { color: var(--blue); border-color: rgba(58,166,255,.35); background: rgba(58,166,255,.08); }
.chip.red { color: var(--red); border-color: rgba(255,84,112,.35); background: rgba(255,84,112,.08); }
.chip.gold { color: var(--gold); border-color: rgba(255,209,102,.35); background: rgba(255,209,102,.08); }

/* ---------------- 小组卡片 ---------------- */
.group-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.group-card .gname {
  font-family: var(--font-display); font-weight: 900; font-size: 17px;
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px;
}
.group-card .gname .letter {
  background: var(--tri); -webkit-background-clip: text; background-clip: text; color: transparent;
  font-size: 22px;
}
.group-row { display: flex; align-items: center; gap: 9px; padding: 7px 2px; border-bottom: 1px solid rgba(255,255,255,.05); }
.group-row:last-child { border-bottom: none; }
.group-row .nm { flex: 1; font-weight: 500; }
.group-row .meta { font-family: var(--font-num); font-size: 12px; color: var(--faint); }

/* ---------------- 赛程 ---------------- */
.day-block { margin-bottom: 26px; }
.day-title { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--muted); margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.day-title .d { color: var(--text); font-size: 17px; }
.match-card {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px;
  padding: 13px 18px; margin-bottom: 8px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md);
  cursor: pointer; transition: all .15s;
}
.match-card:hover { border-color: var(--line-strong); background: var(--panel-strong); transform: translateX(3px); }
.match-card .side { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15px; }
.match-card .side.home { justify-content: flex-end; text-align: right; }
.match-card .mid { text-align: center; min-width: 96px; }
.match-card .mid .vs { font-family: var(--font-num); font-weight: 900; font-size: 13px; color: var(--faint); }
.match-card .mid .score { font-family: var(--font-num); font-weight: 900; font-size: 20px; }
.match-card .mid .info { font-size: 11px; color: var(--faint); margin-top: 2px; }
.match-card .prob-hint { font-size: 11px; color: var(--faint); font-family: var(--font-num); }
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; align-items: center; }
.filter-bar select, .filter-bar input {
  background: var(--bg-soft); color: var(--text); border: 1px solid var(--line-strong);
  border-radius: 9px; padding: 8px 12px; font-size: 14px; font-family: var(--font-body);
}
.filter-bar select:focus, .filter-bar input:focus { outline: none; border-color: var(--blue); }

/* ---------------- 球队页 ---------------- */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.team-card { text-align: left; }
.team-card .top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.team-card .flag { font-size: 34px; }
.team-card .nm { font-weight: 900; font-size: 16.5px; font-family: var(--font-display); }
.team-card .en { font-size: 12px; color: var(--faint); }
.team-card .meta { display: flex; gap: 6px; flex-wrap: wrap; }

.team-hero { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.team-hero .flag { font-size: 64px; filter: drop-shadow(0 6px 18px rgba(0,0,0,.5)); }
.team-hero h1 { font-family: var(--font-display); font-size: 38px; font-weight: 900; }
.team-hero .en { color: var(--muted); font-size: 16px; }
.statline { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 8px; }
.statline .s .n { font-family: var(--font-num); font-weight: 900; font-size: 22px; }
.statline .s .l { font-size: 11.5px; color: var(--faint); letter-spacing: 1px; }

.kv { display: grid; grid-template-columns: 92px 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--faint); }
.kv dd { color: var(--text); }

/* ---------------- 比分热图 ---------------- */
.heatmap { display: inline-grid; gap: 3px; font-family: var(--font-num); font-size: 11.5px; }
.heatmap .hd { color: var(--faint); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.heatmap .cell {
  width: 52px; height: 38px; border-radius: 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(58,166,255,.06); transition: transform .12s; line-height: 1.2;
}
.heatmap .cell:hover { transform: scale(1.1); z-index: 2; }
.heatmap .cell .p { font-size: 10px; color: var(--muted); }
.heatmap .cell .s { font-weight: 700; font-size: 12.5px; }

/* ---------------- 投注 ---------------- */
.bet-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; }
.odds-input { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.odds-input label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 4px; }
.odds-input input {
  width: 100%; background: var(--bg-soft); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 9px; padding: 9px 12px;
  font-size: 16px; font-family: var(--font-num); font-weight: 700;
}
.odds-input input:focus { outline: none; border-color: var(--green); }
.ev-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.ev-row:last-child { border: none; }
.ev-pos { color: var(--green); font-weight: 900; }
.ev-neg { color: var(--red); font-weight: 700; }
.callout {
  border-left: 3px solid var(--gold); background: rgba(255,209,102,.06);
  padding: 14px 18px; border-radius: 0 var(--r-md) var(--r-md) 0; font-size: 13.5px; color: #d8c9a0;
}
.callout.red { border-color: var(--red); background: rgba(255,84,112,.06); color: #e3b6bf; }
.callout.blue { border-color: var(--blue); background: rgba(58,166,255,.06); color: #aecdef; }

/* ---------------- 预测页 ---------------- */
.sim-controls { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.sim-progress { flex: 1; min-width: 160px; height: 8px; background: rgba(255,255,255,.07); border-radius: 5px; overflow: hidden; display: none; }
.sim-progress .fill { height: 100%; background: var(--tri); width: 0%; transition: width .2s; }
.champ-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.champ-row .rk { font-family: var(--font-num); font-weight: 900; color: var(--faint); width: 26px; }

/* ---------------- 杂项 ---------------- */
.muted { color: var(--muted); }
.note { font-size: 12.5px; color: var(--faint); line-height: 1.75; margin: -2px 0 14px; }
[title] { cursor: help; }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.mb8 { margin-bottom: 8px; } .mb16 { margin-bottom: 16px; } .mb24 { margin-bottom: 24px; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex.between { justify-content: space-between; }
.flex.wrap { flex-wrap: wrap; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.grad-text { background: var(--tri); -webkit-background-clip: text; background-clip: text; color: transparent; }
.divider { height: 1px; background: var(--line); margin: 18px 0; border: none; }
.empty-tip { text-align: center; padding: 60px 20px; color: var(--faint); }
.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #15203c; border: 1px solid var(--line-strong); color: var(--text);
  padding: 12px 24px; border-radius: 12px; font-weight: 700; box-shadow: var(--shadow);
  opacity: 0; transition: all .3s; z-index: 999; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.footer { border-top: 1px solid var(--line); background: rgba(7,11,22,.6); }
.footer-inner {
  max-width: 1180px; margin: 0 auto; padding: 26px;
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; font-size: 13px;
}
.footer-muted { color: var(--faint); font-size: 12px; margin-top: 4px; line-height: 1.7; }
.footer-right { text-align: right; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1020px) {
  .group-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .bet-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .view { padding: 22px 16px 60px; }
  .nav-links {
    display: none; position: absolute; top: 62px; left: 0; right: 0;
    flex-direction: column; background: rgba(7,11,22,.97); padding: 12px 20px 18px;
    border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .nav-burger { display: block; }
  .hero { padding: 34px 24px; }
  .group-grid, .team-grid, .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .match-card { grid-template-columns: 1fr; gap: 6px; }
  .match-card .side.home { justify-content: flex-start; text-align: left; }
  .footer-right { text-align: left; }
  .heatmap .cell { width: 40px; height: 34px; }
}
