/* =========================================================
   ColaTV — 赛程与实时比分
   主题：黑色背景，红黄点缀（越南风格）
   ========================================================= */

:root {
  --bg: #08080a;
  --bg-2: #0f0f12;
  --card: #141418;
  --card-2: #1b1b21;
  --card-3: #23232b;
  --line: #24242c;
  --line-2: #32323c;
  --text: #f4f4f6;
  --text-2: #c9c9d1;
  --muted: #8b8b97;
  --red: #e4141f;
  --red-hi: #ff3442;
  --red-soft: rgba(228, 20, 31, .14);
  --gold: #ffcd1f;
  --gold-soft: rgba(255, 205, 31, .14);
  --green: #1fc46f;
  --green-soft: rgba(31, 196, 111, .14);
  --blue: #3a86ff;
  --blue-hi: #69a2ff;
  --blue-soft: rgba(58, 134, 255, .14);
  --orange: #ff8a1f;
  --radius: 14px;
  --radius-sm: 9px;
  --header-h: 60px;
  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Roboto, Arial, sans-serif;
  color-scheme: dark;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 56px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 14px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }

/* 球队、赛事 logo 统一放在白色圆底里：网站是深色的，深色 logo 也看得清。大尺寸的 logo 内边距相应加大 */
.logo { background: #fff; border-radius: 50%; padding: 2px; object-fit: contain; }
.player-list .p-info small img.logo { padding: 1px; }
.watch-team img.logo { padding: 4px; }
.next-match__teams img.logo { padding: 5px; }
.sb-team img.logo { padding: 6px; }
.league-hero__logo.logo { padding: 8px; border-radius: 50%; background: #fff; }
@media (min-width: 640px) {
  .sb-team img.logo { padding: 10px; }
  .league-hero__logo.logo { padding: 10px; }
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--gold); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 700; }
p { margin: 0 0 12px; }
ul, ol { margin: 0; padding: 0; list-style: none; }
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ic { width: 20px; height: 20px; flex: none; fill: none; }
.ic--sm { width: 16px; height: 16px; }
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 16px; } /* 电脑上最宽 1280px，居中 */
.scroll-x { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.scroll-x::-webkit-scrollbar { display: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8, 8, 10, .92);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-bar { display: flex; align-items: center; gap: 16px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 22px; letter-spacing: -.5px; flex: none; }
.brand:hover { color: var(--text); }
.brand img { width: 32px; height: 32px; }
.brand b { color: var(--red-hi); }
.main-nav { display: none; flex: 1; }
.main-nav ul { display: flex; gap: 2px; }
.main-nav a {
  display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px;
  font-weight: 600; color: var(--text-2); white-space: nowrap;
}
.main-nav a:hover { color: var(--text); background: var(--card-2); }
.main-nav a[aria-current="page"] { color: #fff; background: var(--red); }
.main-nav .ic { width: 18px; height: 18px; color: var(--gold); }
.main-nav a[aria-current="page"] .ic { color: #fff; }
.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  color: var(--text-2); background: var(--card);
  border: 1px solid var(--line);
}
.icon-btn:hover { color: var(--text); border-color: var(--line-2); }
.icon-btn.is-disabled { opacity: .35; pointer-events: none; }
.live-pill {
  display: none; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px;
  background: var(--red-soft); color: var(--red-hi); font-weight: 700; font-size: 13px;
  border: 1px solid rgba(228, 20, 31, .4);
}
.live-pill:hover { color: #fff; background: var(--red); }

.search-bar { border-top: 1px solid var(--line); padding: 10px 0; }
.search-form { display: flex; gap: 8px; }
.search-form input {
  flex: 1; min-width: 0; height: 42px; padding: 0 14px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--line-2); color: var(--text); font: inherit;
}
.search-form input:focus { outline: none; border-color: var(--gold); }

/* 搜索：头部下拉建议 + 搜索结果页共用的结果行 */
.search-suggest {
  margin-top: 8px; max-height: min(62vh, 480px); overflow-y: auto; overscroll-behavior: contain;
  border-radius: 12px; background: var(--card); border: 1px solid var(--line-2);
}
.sr-league { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-weight: 700; color: var(--text); }
.sr-league + .sr-league, .sr-match { border-top: 1px solid var(--line); }
.search-suggest > :first-child, .card__head + .sr-league, .card__head + .sr-match { border-top: 0; }
.sr-league img { width: 24px; height: 24px; flex: none; }
.sr-league small { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); }
.sr-match { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 12px; color: var(--text); }
.sr-league:hover, .sr-match:hover { color: var(--text); background: var(--card-2); }
.sr-match__meta { display: grid; gap: 1px; min-width: 0; text-align: center; font-size: 11px; color: var(--muted); }
.sr-match__meta b { font-size: 13px; color: var(--text-2); }
.sr-match.is-live .sr-match__meta b { color: var(--red-hi); }
.sr-match__league { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-match__teams { display: grid; gap: 6px; min-width: 0; }
.sr-team { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; }
.sr-team img { width: 20px; height: 20px; flex: none; }
.sr-team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-match__score { display: grid; gap: 6px; min-width: 22px; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.sr-match.is-live .sr-match__score { color: var(--red-hi); }
.sr-more { display: block; padding: 11px 12px; border-top: 1px solid var(--line); text-align: center; font-size: 13px; font-weight: 700; color: var(--gold); }
.sr-empty { padding: 18px 12px; text-align: center; font-size: 14px; color: var(--muted); }
.search-page__form { margin-bottom: 12px; }
.search-page__summary { font-size: 13px; color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 10px; font-weight: 700; white-space: nowrap;
  background: var(--card-2); border: 1px solid var(--line-2); color: var(--text);
}
.btn:hover { color: var(--text); border-color: var(--muted); }
.btn--primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-hi); border-color: var(--red-hi); color: #fff; }

/* 顶部公告：背景铺满屏幕，内容与页头共用 1280px 容器。随页面滚出，导航保持原有吸顶位置。 */
.notice-bar { width: 100%; background: #17232f; border-bottom: 1px solid #2b4053; color: #d7e2ed; font-size: 16px; line-height: 1.25; }
.notice-bar .container { display: flex; align-items: center; gap: 8px; padding-top: 5px; padding-bottom: 5px; }
.notice-bar .ic { flex: none; width: 16px; height: 16px; color: #8cb8da; }
.notice-bar p { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.notice-bar a { color: #ffe46b; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.notice-bar a:hover { color: #fff; }

/* 联赛快捷条 */
.league-strip { background: var(--bg-2); border-bottom: 1px solid var(--line); }
.league-strip ul { display: flex; gap: 8px; padding: 10px 0; }
.league-strip li { flex: none; } /* 按联赛名称长度自适应宽度，不被压缩（放不下时横向滑动） */
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px 0 6px;
  border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  font-size: 13px; font-weight: 600; color: var(--text-2); white-space: nowrap;
}
.chip img { width: 22px; height: 22px; }
.chip:hover { color: var(--text); border-color: var(--line-2); }
.chip[aria-current="page"] { border-color: var(--gold); color: var(--gold); }

/* 移动端抽屉菜单 */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .65); z-index: 80; }
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 90; width: min(320px, 86vw);
  background: var(--bg-2); border-right: 1px solid var(--line);
  transform: translateX(-100%); transition: transform .25s ease, visibility .25s; overflow-y: auto;
  padding: 16px; visibility: hidden;
}
.drawer.is-open { transform: none; visibility: visible; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 8px; background: var(--gold); color: #111; font-weight: 700; }
.skip-link:focus { top: 12px; color: #111; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.drawer__title { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 18px 0 8px; font-weight: 700; }
.drawer nav a { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; font-weight: 600; }
.drawer nav a:hover { background: var(--card); }
.drawer nav a[aria-current="page"] { background: var(--red-soft); color: var(--red-hi); }
.drawer nav img { width: 22px; height: 22px; }

/* Bottom nav (mobile) */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: rgba(15, 15, 18, .96); border-top: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav ul { display: grid; grid-template-columns: repeat(5, 1fr); }
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 7px;
  font-size: 11px; font-weight: 600; color: var(--muted);
}
.bottom-nav a[aria-current="page"] { color: var(--red-hi); }
.bottom-nav .ic { width: 22px; height: 22px; }
.bottom-nav .is-live { position: relative; }
.bottom-nav .is-live::after {
  content: ""; position: absolute; top: 6px; right: calc(50% - 16px);
  width: 8px; height: 8px; border-radius: 50%; background: var(--red-hi); box-shadow: 0 0 0 2px var(--bg-2);
}
body { padding-bottom: 64px; }

/* ---------- Layout ---------- */
.page { padding: 16px 0 32px; }
.layout { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.sidebar-left { display: none; }
.stack { display: grid; gap: 16px; align-content: start; }

.breadcrumb { margin-bottom: 14px; font-size: 13px; color: var(--muted); }
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.breadcrumb li { display: flex; align-items: center; gap: 4px; }
.breadcrumb li + li::before { content: "›"; color: var(--line-2); font-size: 16px; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb [aria-current] { color: var(--text-2); }

.page-head { margin-bottom: 14px; }
.page-title { font-size: 21px; font-weight: 800; letter-spacing: -.3px; }
.page-title span { color: var(--gold); }

/* ---------- Card ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card__head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
}
.card__title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; }
.card__title::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--red); }
.card__link { font-size: 13px; color: var(--muted); font-weight: 600; display: inline-flex; align-items: center; gap: 2px; }
.card__body { padding: 14px; }

/* ---------- Status badges ---------- */
.st { display: inline-flex; align-items: center; justify-content: center; gap: 5px; font-size: 12px; font-weight: 700; line-height: 1; white-space: nowrap; }
.st-live { color: var(--red-hi); }
.st-live::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor;
  animation: pulse 1.4s infinite;
}
.st-live--pill { padding: 5px 10px; border-radius: 999px; background: var(--red); color: #fff; }
.st-ft { color: var(--muted); }
.st-ns { color: var(--text-2); }
.st-postponed, .st-interrupted, .st-tbd { color: #b7791f; }
.st-cancelled, .st-abandoned { color: var(--muted); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 52, 66, .7); }
  70% { box-shadow: 0 0 0 7px rgba(255, 52, 66, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 52, 66, 0); }
}
@media (prefers-reduced-motion: reduce) { .st-live::before { animation: none; } html { scroll-behavior: auto; } }

/* ---------- 工具栏：运动 / 日期 / 筛选 ---------- */
.toolbar { display: grid; gap: 10px; margin-bottom: 14px; }
.seg { display: flex; gap: 4px; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.seg__btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; height: 38px;
  border-radius: 9px; font-weight: 700; color: var(--muted); white-space: nowrap;
}
.seg__btn:hover { color: var(--text); }
.seg__btn[aria-pressed="true"], .seg__btn[aria-selected="true"], .seg__btn[aria-current="page"] { background: var(--red); color: #fff; }

.date-strip ul { display: flex; gap: 6px; }
.date-strip li { flex: 1 1 0; min-width: 52px; } /* 日期平均铺满整行 */
.date-strip a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 54px; padding: 0 8px; border-radius: 11px;
  background: var(--card); border: 1px solid var(--line); color: var(--text-2); white-space: nowrap;
}
.date-strip a small { font-size: 11px; color: var(--muted); font-weight: 600; }
.date-strip a b { font-size: 14px; }
.date-strip a:hover { border-color: var(--line-2); color: var(--text); }
.date-strip a[aria-current="date"] { background: var(--gold); border-color: var(--gold); color: #111; }
.date-strip a[aria-current="date"] small { color: #3a2f00; }

.filters { display: flex; gap: 6px; }
.filter {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--text-2); white-space: nowrap;
}
.filter:hover { color: var(--text); }
.filter[aria-pressed="true"], .filter[aria-current="page"] { background: var(--text); color: #111; border-color: var(--text); }
.filter .count { font-size: 11px; padding: 1px 6px; border-radius: 999px; background: var(--red); color: #fff; }
.toolbar .filter { flex: 1 0 auto; justify-content: center; } /* 状态筛选铺满到右边 */

/* ---------- League group + match row ---------- */
.league-group + .league-group { margin-top: 12px; }
.league-head {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--card-2); border-bottom: 1px solid var(--line);
}
.league-head img { width: 24px; height: 24px; }
.league-head__name { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.league-head__name h2, .league-head__name h3 { font-size: 14px; font-weight: 700; }
.league-head__title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.league-head__link { display: inline-flex; align-items: center; height: 22px; padding: 0 4px 0 8px; border-radius: 999px; background: var(--card-3); font-size: 11px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.league-head__link:hover { color: var(--gold); }
.league-toggle {
  display: grid; place-items: center; width: 30px; height: 30px; margin: 0 -4px 0 auto; border-radius: 8px;
  color: var(--muted); flex: none;
}
.league-toggle:hover { color: var(--text); background: var(--card-3); }
.league-head__actions { display: flex; align-items: center; gap: 2px; margin-left: auto; flex: none; }
.league-head__actions .league-toggle { margin-left: 0; }
.league-pin { display: grid; place-items: center; width: 30px; height: 30px; color: var(--muted); border-radius: 8px; transition: color .15s, background .15s; }
.league-pin[hidden] { display: none; }
.league-pin:hover { color: var(--gold); background: var(--card-3); }
.league-pin[aria-pressed="true"] { color: var(--gold); background: var(--gold-soft); }
.league-pin[aria-pressed="true"] .ic { fill: var(--gold-soft); }
.league-toggle .ic { transition: transform .2s; }
.league-group.is-collapsed .league-toggle .ic { transform: rotate(-90deg); }
.league-group.is-collapsed .league-head { border-bottom: 0; }
.league-group.is-collapsed .match { display: none; }
.league-group.is-collapsed .league-more { display: none; }
.match.is-preview-extra { display: none; }
.league-more { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 36px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.league-more:hover { color: var(--gold); background: var(--card-2); }
.league-more .ic { transition: transform .2s; }
.league-more[aria-expanded="true"] .ic { transform: rotate(180deg); }
.league-group { scroll-margin-top: calc(var(--header-h) + 64px); }

/* 当前列表联赛：手机滚到第二张卡片后悬浮，电脑位于右侧积分榜下方。 */
.league-index { display: none; }
.league-index.is-ready.is-shown { display: block; position: fixed; top: var(--header-h); left: 0; right: 0; z-index: 45; border-radius: 0; background: rgba(15, 15, 18, .97); box-shadow: 0 4px 16px #0004; }
.league-index__bar { display: flex; align-items: stretch; }
.league-index__list { flex: 1; min-width: 0; display: flex; gap: 6px; padding: 8px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.league-index__list::-webkit-scrollbar { display: none; }
.league-index__list li { flex: none; }
.league-index__item { display: flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 10px; border: 1px solid transparent; border-radius: 8px; color: var(--text-2); font-size: 12px; white-space: nowrap; }
.league-index__item:hover { background: var(--card-2); color: var(--text); }
.league-index__item.is-active { background: var(--red-soft); border-color: var(--red); color: var(--red-hi); }
.league-index__item .logo { width: 20px; height: 20px; }
.league-index__count { color: var(--muted); font-size: 11px; }
.league-index__expand { flex: none; display: grid; place-items: center; width: 42px; border-left: 1px solid var(--line); background: var(--bg-2); color: var(--text-2); }
.league-index__expand:hover { color: var(--gold); }
.league-index__expand .ic { transition: transform .18s; }
.league-index.is-open .league-index__expand .ic { transform: rotate(180deg); }
.league-index__menu { position: relative; max-height: min(420px, 55dvh); overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--line); background: var(--bg-2); }
.league-index__options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 8px; }
.league-index__options .league-index__item { height: 100%; min-width: 0; white-space: normal; }
.league-index__options .league-index__item > span { min-width: 0; overflow-wrap: anywhere; }
.league-index__options .league-index__count { margin-left: auto; }
@media (min-width: 640px) {
  .league-index__options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .league-index.is-ready { display: block; position: sticky; top: calc(var(--header-h) + 16px); align-self: start; border-radius: var(--radius); box-shadow: none; }
  .league-index__bar { display: block; }
  .league-index__list { display: grid; gap: 2px; padding: 6px; max-height: min(600px, 72dvh, calc(100dvh - var(--header-h) - 32px)); overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; }
  .league-index__expand, .league-index__menu { display: none !important; }
  .league-index__list { grid-template-columns: minmax(0, 1fr); }
  .league-index__item { width: 100%; min-height: 32px; padding: 4px 8px; font-size: 12px; text-align: left; }
  .league-index__item > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; } /* 越南语联赛名较长：截断，保证右边的比赛数量显示 */
  .league-index__count { flex: none; margin-left: auto; }
}

.match {
  position: relative; display: grid; grid-template-columns: 54px minmax(0, 1fr) 40px; align-items: center;
  min-height: 60px; border-top: 1px solid var(--line);
}
.league-head + .match { border-top: 0; }
.match:hover { background: var(--card-2); }
.match.is-out { display: none; } /* 实时比分更新后不再属于本页的比赛 */
.match.is-live { background: linear-gradient(90deg, rgba(228, 20, 31, .09), transparent 40%); }
.match__time { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12px; color: var(--muted); text-align: center; padding-left: 4px; }
.match__time time { font-weight: 600; color: var(--text-2); }
.match__link {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "home sh" "away sa";
  align-items: center; gap: 6px 10px; padding: 10px 6px; color: var(--text);
}
.match__link:hover { color: var(--text); }
.match__link::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.team { grid-area: home; display: flex; align-items: center; gap: 8px; min-width: 0; }
.team--away { grid-area: away; }
.team img { width: 22px; height: 22px; flex: none; }
.team__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.team.is-winner .team__name { font-weight: 700; }
.is-ft .team:not(.is-winner) .team__name { color: var(--text-2); }
.score { font-weight: 800; font-size: 15px; min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.score--home { grid-area: sh; }
.score--away { grid-area: sa; }
.score-sep { display: none; color: var(--muted); }
.is-live .score { color: var(--red-hi); }
.is-ns .score { color: var(--muted); font-weight: 500; }
.match--bb .score { min-width: 34px; }
/* 直播 / 录像按钮：logo 同款瓶盖 + 电视图形。直播红色，录像蓝色，未开始灰黑色 */
.match__tv {
  grid-column: 3; justify-self: center; position: relative; z-index: 1; display: grid; place-items: center; width: 34px; height: 34px;
  color: #34343d; --cap-ink: #a3a3ad; transition: color .15s, transform .15s;
}
.match__tv .ic { width: 32px; height: 32px; }
.match__tv:hover { color: #464650; --cap-ink: #e4e4ea; transform: scale(1.06); }
.is-live .match__tv { color: var(--red); --cap-ink: #fff; }
.is-live .match__tv:hover { color: var(--red-hi); }
.is-live .match__tv { filter: drop-shadow(0 2px 6px rgba(228, 20, 31, .45)); }
.match__tv[data-mode="replay"] { color: var(--blue); --cap-ink: #fff; filter: drop-shadow(0 2px 6px rgba(58, 134, 255, .3)); }
.match__tv[data-mode="replay"]:hover { color: var(--blue-hi); }

.results-link { display: flex; align-items: center; gap: 4px; margin-top: 12px; padding: 14px; font-size: 14px; color: var(--text-2); }
.results-link b { color: var(--text); }
.results-link span { display: inline-flex; align-items: center; gap: 2px; margin-left: auto; font-weight: 700; color: var(--gold); }
.results-link:hover { color: var(--text); border-color: var(--line-2); }
.empty { padding: 36px 16px; text-align: center; color: var(--muted); }
.empty .ic { width: 40px; height: 40px; margin: 0 auto 10px; opacity: .5; }

/* ---------- Sidebar widgets ---------- */
.league-list a { display: flex; align-items: center; gap: 10px; padding: 9px 14px; font-weight: 500; color: var(--text-2); }
.league-list a:hover { background: var(--card-2); color: var(--text); }
.league-list a[aria-current="page"] { color: var(--gold); background: var(--gold-soft); }
.league-list img { width: 22px; height: 22px; }
.league-list__group { padding: 12px 14px 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* 侧栏积分榜的联赛 / 东西部切换 */
.seg--sm { margin: 10px 12px 6px; padding: 3px; gap: 2px; background: var(--bg); }
.seg--sm .seg__btn { height: 30px; padding: 0 2px; font-size: 13px; border-radius: 7px; }
.seg--sm .seg__btn img { width: 22px; height: 22px; }
.standings-tabs [role="tabpanel"][hidden] { display: none; }
/* 积分榜页顶部的联赛切换：联赛多时横向滑动 */
.seg--scroll { margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.seg--scroll::-webkit-scrollbar { display: none; }
.seg--scroll .seg__btn { flex: 1 0 auto; padding: 0 14px; }
.seg--scroll .seg__btn img { width: 20px; height: 20px; }
.mini-table th, .mini-table td { padding: 8px 6px; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; }
.mini-table th { font-size: 11px; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); }
.mini-table td { border-bottom: 1px solid var(--line); }
.mini-table tr:last-child td { border-bottom: 0; }
.mini-table .t-team { text-align: left; }
.mini-table .t-team a { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mini-table .t-team img { width: 18px; height: 18px; flex: none; }
.mini-table .t-team span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-table .t-pts { font-weight: 800; color: var(--text); }
.mini-table tr.is-hl td { background: var(--gold-soft); }

.player-list li { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--line); }
.player-list li:last-child { border-bottom: 0; }
.player-list .rank { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: var(--card-3); font-size: 12px; font-weight: 700; flex: none; }
.player-list li:first-child .rank { background: var(--gold); color: #111; }
.player-list .p-info { min-width: 0; flex: 1; line-height: 1.3; }
.player-list .p-info b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-list .p-info small { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 5px; }
.player-list .p-info small img { width: 14px; height: 14px; }
.player-list .p-val { font-weight: 800; font-size: 16px; color: var(--gold); }

.next-match { display: block; text-align: center; }
.next-match:hover { color: inherit; background: var(--card-2); }
.next-match__meta { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.next-match__teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.next-match__teams span { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
.next-match__teams img { width: 44px; height: 44px; }
.next-match__teams b { font-size: 16px; color: var(--muted); }
.next-match__teams b.next-match__score { font-size: 26px; font-weight: 800; color: var(--red-hi); white-space: nowrap; }
.kpi b small { font-size: 12px; color: var(--muted); font-weight: 600; }

/* ---------- 近期状态色块（胜/平/负） ---------- */
.form { display: inline-flex; gap: 3px; }
.form i {
  display: grid; place-items: center; width: 20px; height: 20px; border-radius: 5px;
  font-size: 10px; font-weight: 800; font-style: normal; color: #fff;
}
.form .w { background: var(--green); }
.form .d { background: #6b6b78; }
.form .l { background: var(--red); }

/* ---------- Standings table ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.standings { width: 100%; font-variant-numeric: tabular-nums; } /* 按列数自适应宽度，放不下（足球列多）时横向滑动 */
.standings th, .standings td { padding: 10px 8px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
.standings thead th { font-size: 12px; color: var(--muted); font-weight: 600; background: var(--card-2); position: sticky; top: 0; }
.standings tbody tr:hover td { background: var(--card-2); }
.standings .t-pos { width: 40px; position: relative; font-weight: 700; }
.standings .t-team { text-align: left; min-width: 120px; }
.t-team__in { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.standings .t-team img { width: 22px; height: 22px; flex: none; }
.standings .t-team b { font-weight: 600; }
.standings .t-pts { font-weight: 800; color: var(--gold); }
.standings--basketball { table-layout: fixed; }
.standings--basketball .st-col-rank { width: 40px; }
.standings--basketball .st-col-team { width: auto; }
.standings--basketball .st-col-result { width: 8%; }
.standings--basketball .st-col-rate { width: 18%; }
.standings--basketball .t-team { min-width: 0; }
.standings--basketball .t-team__in, .standings--basketball .t-team__name { min-width: 0; }
.standings--basketball .t-team__name { overflow: hidden; text-overflow: ellipsis; }
.standings--basketball thead th { white-space: normal; }
@media (max-width: 639px) {
  .standings.standings--basketball th, .standings.standings--basketball td { padding-inline: 3px; }
  .standings--basketball .st-col-rank { width: 32px; }
}
.standings tr[data-zone] .t-pos::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; }
.standings tr[data-zone="ucl"] .t-pos::before, .legend .z-ucl { background: var(--blue); }
.standings tr[data-zone="uel"] .t-pos::before, .legend .z-uel { background: var(--orange); }
.standings tr[data-zone="uecl"] .t-pos::before, .legend .z-uecl { background: var(--green); }
.standings tr[data-zone="rel"] .t-pos::before, .legend .z-rel { background: var(--red); }
.standings tr.is-hl td { background: var(--gold-soft); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 12px 14px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ---------- League hero ---------- */
.league-hero {
  position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center;
  padding: 18px; border-radius: var(--radius); border: 1px solid var(--line-2);
  background: radial-gradient(100% 140% at 0% 0%, rgba(61, 25, 91, .9), transparent 60%), linear-gradient(135deg, #15101d, var(--card));
}
.league-hero__logo { width: 64px; height: 64px; padding: 6px; border-radius: 16px; background: rgba(255, 255, 255, .06); }
.league-hero h1 { font-size: 22px; font-weight: 800; }
.league-hero__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; color: var(--text-2); font-size: 13px; }
.league-hero__meta span { display: inline-flex; align-items: center; gap: 5px; }
.league-hero__stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.kpi { background: rgba(0, 0, 0, .35); border: 1px solid var(--line); border-radius: 10px; padding: 10px; text-align: center; }
.kpi b { display: block; font-size: 18px; font-weight: 800; }
.kpi small { display: block; color: var(--muted); font-size: 11px; }
.kpi .form { display: flex; justify-content: center; margin: 3px 0 5px; } /* 近期状态：色块一行，文字在下 */

.subnav {
  position: sticky; top: calc(var(--header-h) + 3px); z-index: 40; margin: 14px 0;
  background: rgba(8, 8, 10, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.subnav ul { display: flex; gap: 2px; }
.subnav a, .subnav button {
  display: block; padding: 12px 14px; font-weight: 700; color: var(--muted); white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.subnav a:hover, .subnav button:hover { color: var(--text); }
.subnav a.is-active, .subnav [aria-selected="true"] { color: var(--text); border-bottom-color: var(--red); }

.round-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.round-nav b { font-size: 14px; }
.round-nav .icon-btn { width: 34px; height: 34px; }
.date-sep { padding: 8px 12px; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--bg-2); border-top: 1px solid var(--line); text-transform: capitalize; }

/* ---------- Match detail: scoreboard ---------- */
.scoreboard {
  position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line-2);
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(108, 171, 221, .28), transparent 55%),
    radial-gradient(90% 120% at 100% 0%, rgba(239, 1, 7, .28), transparent 55%),
    linear-gradient(180deg, #121217, var(--card));
}
.scoreboard--bb {
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(85, 37, 131, .45), transparent 55%),
    radial-gradient(90% 120% at 100% 0%, rgba(29, 66, 138, .45), transparent 55%),
    linear-gradient(180deg, #121217, var(--card));
}
.scoreboard__top { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 14px 0; font-size: 13px; color: var(--text-2); font-weight: 600; text-align: center; flex-wrap: wrap; }
.scoreboard__top img { width: 20px; height: 20px; }
.scoreboard__main { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; align-items: start; padding: 16px 12px 8px; }
.sb-team { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; min-width: 0; }
.sb-team img { width: 52px; height: 52px; filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .55)); }
.sb-team h2 { font-size: 14px; font-weight: 800; text-wrap: balance; }
.sb-team small { font-size: 11px; line-height: 1.4; color: var(--muted); }
.sb-center { text-align: center; padding-top: 6px; }
.sb-score { font-size: 36px; font-weight: 800; letter-spacing: 1px; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sb-score b { font-weight: inherit; }
.sb-score span { color: var(--muted); font-weight: 500; margin: 0 4px; }
.scoreboard--bb .sb-score { font-size: 28px; } /* 篮球三位数比分，手机上缩小 */
.sb-status { margin-top: 10px; }
.sb-sub { margin-top: 6px; font-size: 12px; color: var(--muted); }
.scoreboard__info { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; padding: 12px 14px; border-top: 1px solid var(--line); background: rgba(0, 0, 0, .25); font-size: 12px; color: var(--text-2); }
.scoreboard__info span { display: inline-flex; align-items: center; gap: 6px; }
.scoreboard__info .ic { width: 15px; height: 15px; color: var(--muted); }

/* 通用间距 */
.mt-16 { margin-top: 16px; }

/* Info list */
.info-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.info-list li:last-child { border-bottom: 0; }
.info-list span { color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.info-list b { font-weight: 600; text-align: right; }

/* ---------- 视频直播 / 录像回放：比分板按钮 + 信号列表弹窗（桌面居中，手机从底部滑出） ---------- */
.sb-watch {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px 0 6px; border-radius: 999px;
  font-size: 13px; font-weight: 700; color: #fff; background: var(--card-3); border: 1px solid var(--line-2); white-space: nowrap;
}
.sb-watch:hover { border-color: var(--red); }
.sb-watch .ic { width: 24px; height: 24px; color: #4a4a54; --cap-ink: #d4d4da; } /* 未开始：灰黑瓶盖 */
.sb-watch[data-mode="replay"] { background: var(--blue); border-color: var(--blue); }
.sb-watch[data-mode="replay"]:hover { background: var(--blue-hi); border-color: var(--blue-hi); }
.sb-watch[data-mode="replay"] .ic { color: #fff; --cap-ink: var(--blue); }
.sb-watch.is-live .ic { color: #fff; --cap-ink: var(--red); }
.sb-watch.is-live { background: var(--red); border-color: var(--red); }
.sb-watch.is-live:hover { background: var(--red-hi); }
.sb-watch.is-live::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .2; } }

.watch-dialog {
  width: min(560px, calc(100% - 32px)); max-height: 80vh; padding: 0; overflow: hidden;
  background: var(--card); color: var(--text); border: 1px solid var(--line-2); border-radius: var(--radius);
}
.watch-dialog::backdrop { background: rgba(0, 0, 0, .65); }
.watch-dialog:focus { outline: none; }
.watch-dialog[open] { display: flex; flex-direction: column; animation: dialog-in .2s ease; }
body:has(.watch-dialog[open]) { overflow: hidden; }
/* 弹窗表头：主队 logo VS logo 客队，右侧关闭按钮 */
.watch-head {
  position: relative; flex: none; padding: 16px 56px; border-bottom: 1px solid var(--line);
  background: radial-gradient(120% 150% at 50% 0%, rgba(228, 20, 31, .16), transparent 60%);
}
.watch-head__close { position: absolute; top: 50%; right: 10px; transform: translateY(-50%); }
.watch-head__teams { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 14px; }
.watch-team { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 17px; font-weight: 800; }
.watch-team--home { justify-content: flex-end; }
.watch-team img { width: 36px; height: 36px; object-fit: contain; flex: none; }
.watch-team__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.watch-vs { font-size: 13px; font-weight: 900; letter-spacing: 1px; color: var(--muted); }
.watch-dialog .watch__links { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes sheet-up { from { transform: translateY(100%); } }
@media (max-width: 639px) {
  .watch-dialog {
    width: 100%; max-width: 100%; max-height: 75vh; margin: auto 0 0;
    border-radius: 18px 18px 0 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom);
  }
  .watch-dialog[open] { animation: sheet-up .25s ease; }
  .watch-dialog .watch__links { grid-template-columns: 1fr; } /* 手机上一行一个信号 */
  .watch-head { padding: 12px 52px 14px; }
  .watch-head__teams { gap: 10px; }
  .watch-team { gap: 8px; font-size: 15px; }
  .watch-team img { width: 30px; height: 30px; }
  .watch-dialog::before { content: ""; align-self: center; width: 40px; height: 4px; margin-top: 8px; border-radius: 2px; background: var(--line-2); }
}
@media (prefers-reduced-motion: reduce) {
  .watch-dialog[open] { animation: none; }
  .sb-watch.is-live::after { animation: none; }
  .watch__link:hover { transform: none; }
}

/* 信号卡片 */
.watch__links { padding: 16px; display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.watch__empty { padding: 28px 20px; text-align: center; color: var(--text-2); }
.watch__link {
  display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; color: var(--text);
  background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.watch__link:hover { color: var(--text); border-color: rgba(228, 20, 31, .7); box-shadow: 0 8px 20px rgba(228, 20, 31, .16); transform: translateY(-1px); }
.watch__icon { display: grid; place-items: center; width: 42px; height: 42px; flex: none; color: var(--red); --cap-ink: #fff; filter: drop-shadow(0 3px 8px rgba(228, 20, 31, .4)); }
.watch__icon .ic { width: 42px; height: 42px; }
.watch__name { flex: 1; min-width: 0; font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.watch__go { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; flex: none; background: var(--card-3); color: var(--text-2); transition: background .15s, color .15s; }
.watch__link:hover .watch__go { background: var(--red); color: #fff; }
.watch-dialog[data-mode="replay"] .watch-head { background: radial-gradient(120% 150% at 50% 0%, var(--blue-soft), transparent 60%); }
.watch-dialog[data-mode="replay"] .watch__icon { color: var(--blue); filter: drop-shadow(0 3px 8px rgba(58, 134, 255, .4)); }
.watch-dialog[data-mode="replay"] .watch__link:hover { border-color: var(--blue); box-shadow: 0 8px 20px rgba(58, 134, 255, .16); }
.watch-dialog[data-mode="replay"] .watch__link:hover .watch__go { background: var(--blue); }
.watch__link.is-placeholder { cursor: default; }

/* 录像播放器：铺满整个屏幕，顶部是比赛名、信号切换和关闭按钮 */
.player {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: #000; color: #fff;
}
.player[open] { display: flex; flex-direction: column; }
.player::backdrop { background: #000; }
.player:focus { outline: none; }
.player__bar {
  display: flex; align-items: center; gap: 12px; flex: none;
  padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 10px max(12px, env(safe-area-inset-left));
  background: #0d0d10; border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.player__title { flex: none; max-width: 32%; font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player__sources { flex: 1; display: flex; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.player__sources::-webkit-scrollbar { display: none; }
.player__src {
  flex: none; height: 32px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap;
  color: var(--text-2); background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .1);
}
.player__src:hover { color: #fff; border-color: rgba(255, 255, 255, .25); }
.player__src[aria-selected="true"] { color: #fff; background: var(--red); border-color: var(--red); }
.player[data-mode="replay"] .player__src[aria-selected="true"] { background: var(--blue); border-color: var(--blue); }
.player__close { flex: none; margin-left: auto; }
.player__stage { position: relative; flex: 1; min-height: 0; background: #000; }
.player__video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.player__frame { width: 100%; height: 100%; border: 0; background: #000; }
.player__external { color: var(--text-2); white-space: nowrap; font-size: 12px; }
.player__msg {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); max-width: calc(100% - 32px);
  padding: 10px 16px; border-radius: 10px; background: rgba(0, 0, 0, .7); font-size: 14px; text-align: center; pointer-events: none;
}
@media (max-width: 639px) {
  .player__bar { flex-wrap: wrap; gap: 8px 10px; }
  .player__title { flex: 1; max-width: none; }
  .player__sources { order: 3; flex: 1 0 100%; }
}

/* 我的主队 */
.bottom-team-icon { position: relative; display: grid; place-items: center; width: 42px; height: 42px; margin-top: -16px; border: 1px solid var(--line-2); border-radius: 50%; background: var(--card); box-shadow: 0 0 0 4px var(--bg-2); color: var(--text); }
.bottom-team-icon::after { content: ""; position: absolute; right: -3px; bottom: -2px; width: 18px; height: 18px; z-index: 2; pointer-events: none; background: url('../img/heart-filled.svg') center / contain no-repeat; }
.bottom-team-icon > * { position: relative; z-index: 1; }
.bottom-team-icon .logo { width: 100%; height: 100%; min-height: 0; padding: 2px; border-radius: 50%; object-fit: contain; }
.my-team-plus { font-size: 26px; font-weight: 400; line-height: 1; }
.my-team-side, .my-team-add { display: flex; align-items: center; gap: 8px; padding: 10px 14px; width: 100%; text-align: left; }
.my-team-side:hover, .my-team-add:hover { background: var(--card-2); color: var(--text); }
.my-team-side span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.my-team-side small { font-size: 10px; color: var(--gold); }
.my-team-side .logo { flex: none; width: 26px; height: 26px; }
.my-team-add { color: var(--muted); font-size: 13px; }
.my-teams-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.my-teams-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.my-teams-heading__title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.my-teams-heading__edit { width: 28px; height: 28px; border-radius: 7px; }
.my-teams-heading__edit .ic { width: 16px; height: 16px; }
.my-team-chips { display: flex; flex-wrap: nowrap; gap: 8px; min-width: 0; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 2px 0 6px; }
.my-team-chips::-webkit-scrollbar { display: none; }
.my-team-chips:empty { display: none; }
.my-team-chip { flex: none; display: flex; align-items: center; gap: 7px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); white-space: nowrap; }
.my-team-chip .logo { width: 24px; height: 24px; }
.my-team-heart { width: 18px; height: 18px; flex: none; }
.my-team-chip[aria-pressed="true"] { border-color: var(--red); background: var(--red-soft); color: var(--text); }
.my-team-views { flex: none; gap: 2px; padding: 3px; border-radius: 10px; }
.my-team-views .seg__btn { height: 34px; min-height: 34px; padding: 0 16px; border-radius: 7px; font-size: 13px; }
.my-team-views [aria-pressed="true"] { background: var(--red); color: #fff; }
.my-match-day { container-type: inline-size; padding: 4px 0; background: var(--card); border-radius: var(--radius); overflow: hidden; }
.my-match-day__head { padding: 10px 12px 6px; }
.my-match-day__title { color: var(--text-2); font-size: 13px; font-weight: 600; }
[data-my-matches] .match { grid-template-columns: 84px minmax(0, 1fr) 44px; border: 0; min-height: 64px; padding-right: 12px; }
.my-match-day > .match + .match { border-top: 1px solid var(--line); }
[data-my-matches] .match__time { grid-column: 1; gap: 2px; padding-block: 4px; min-width: 0; }
[data-my-matches] .is-ns .match__time .st, [data-my-matches] .is-ft .match__time .st { display: none; }
.my-match-date { font-size: 11px; line-height: 1.3; }
.my-match-league { max-width: 100%; padding: 0 4px; color: var(--muted); font-size: 11px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* 赛事名一行，放不下截断，鼠标移入看全名 */
[data-my-matches] .match__link { grid-column: 2; }
[data-my-matches] .match__tv { grid-column: 3; }
@container (min-width: 500px) {
  [data-my-matches] .match { grid-template-columns: 100px minmax(0, 1fr) 44px; }
}
.my-team-feed-status { margin: 0; color: var(--muted); }
.team-picker { width: min(860px, calc(100% - 32px)); height: min(800px, 88dvh); max-height: min(840px, 88dvh); padding: 0; border: 1px solid var(--line-2); border-radius: 18px; background: var(--bg-2); color: var(--text); }
.team-picker[open] { display: flex; flex-direction: column; }
.team-picker::backdrop { background: rgba(0, 0, 0, .76); backdrop-filter: blur(4px); }
.team-picker__head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.team-picker__head h2 { font-size: 19px; }
.team-picker__body { flex: 1; padding: 16px 20px; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; min-height: 0; }
.team-picker__selected { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; padding: 2px 0; }
.team-picker__selected > p { color: var(--muted); font-size: 13px; margin: 0; }
.picked-team { flex: none; display: flex; align-items: center; gap: 6px; max-width: 100%; height: 42px; border: 1px solid var(--line-2); padding: 6px; border-radius: 9px; background: var(--card); font-size: 12px; transition: border-color .16s, box-shadow .16s; }
.picked-team.is-sorting { opacity: .3; border-color: var(--red); border-style: dashed; }
.picked-team--ghost { position: fixed; z-index: 10; margin: 0; pointer-events: none; border-color: var(--red); background: var(--card-2); box-shadow: 0 10px 28px #0008; will-change: transform; }
.picked-team__name { max-width: 110px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picked-team .logo { width: 23px; height: 23px; }
.picked-team__drag { display: grid; place-items: center; flex: none; width: 18px; height: 28px; color: var(--muted); cursor: grab; touch-action: none; user-select: none; }
.picked-team__drag::before { content: ""; width: 10px; height: 16px; background: radial-gradient(circle, currentColor 1.2px, transparent 1.5px) 0 0 / 5px 5px; }
.is-sorting .picked-team__drag { cursor: grabbing; color: var(--red-hi); }
.picked-team__remove { font-size: 20px; color: var(--muted); padding: 0 3px; }
.team-picker__search { flex: none; width: 100%; color: var(--text); background: var(--card); border: 1px solid var(--line-2); border-radius: 10px; padding: 11px 12px; font: inherit; }
.team-picker__tabs { flex: none; display: flex; gap: 6px; overflow-x: auto; margin: 14px 0; padding: 2px 0 4px; }
.team-picker__tabs button { flex: none; border-radius: 999px; padding: 8px 15px; background: var(--card); color: var(--text-2); }
.team-picker__tabs [aria-pressed="true"] { background: var(--red); color: #fff; }
.team-picker__grid { display: grid; align-content: start; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; padding-bottom: 4px; }
.team-choice { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; min-height: 104px; padding: 12px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-size: 13px; }
.team-choice .logo { width: 40px; height: 40px; padding: 4px; }
.team-choice:hover { border-color: var(--line-2); background: var(--card-2); }
.team-choice[aria-pressed="true"] { border-color: var(--red); background: var(--red-soft); box-shadow: inset 0 0 0 1px var(--red); }
.team-picker__foot { flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line); }
.team-picker__foot [role="status"] { color: var(--red-hi); font-size: 12px; }
@media (min-width: 1200px) {
  .my-teams-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .my-teams-layout .sidebar-left { display: block; }
  .my-teams-heading__edit { display: none; }
}
@media (max-width: 639px) {
  .team-picker { width: 100%; max-width: none; height: 90dvh; max-height: 90dvh; margin: auto 0 0; border-radius: 18px 18px 0 0; }
  .team-picker__head { padding: 16px; }
  .team-picker__body { padding: 14px; }
  .team-picker__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .team-picker__foot { padding: 12px 14px max(12px, env(safe-area-inset-bottom)); }
  .team-choice { font-size: 12px; }
  .team-picker__tabs button { padding: 8px 12px; }
}

/* ---------- SEO content block ---------- */
.seo-text { padding: 18px; color: var(--text-2); font-size: 14px; line-height: 1.75; }
.seo-text h2 { font-size: 18px; color: var(--text); margin-bottom: 10px; }
.seo-text h3 { font-size: 15px; color: var(--text); margin: 16px 0 6px; }
.seo-text a { color: var(--gold); }
.seo-text ul { list-style: disc; padding-left: 20px; margin-bottom: 12px; }
.seo-text li { margin-bottom: 4px; }
.seo-text * + h2 { margin-top: 18px; }
.seo-text .seo-links { display: flex; flex-wrap: wrap; gap: 6px 16px; padding-left: 0; list-style: none; } /* 联赛链接横排 */
.seo-text .seo-links li { margin-bottom: 0; }

/* 比赛页标签：赛事、主队、客队、两队交锋 */
.match-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.match-tag {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 6px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--text-2);
}
a.match-tag:hover { color: var(--text); border-color: var(--line-2); }
.match-tag img { width: 20px; height: 20px; }
.match-tag--h2h { padding: 0 12px; color: var(--gold); border-color: rgba(255, 205, 31, .35); }

/* 比赛合集页（球队页、月份归档、交锋页） */
.archive-hero__logos { display: flex; align-items: center; gap: 12px; }
.archive-hero__vs { font-weight: 900; letter-spacing: 1px; color: var(--muted); }
.archive-hero .league-hero__meta a { display: inline-flex; align-items: center; gap: 6px; }
.month-nav { margin-top: 12px; }
.archive-more { display: grid; gap: 10px; }
.archive-more__title { font-size: 13px; font-weight: 700; color: var(--muted); }
.archive-more__list { flex-wrap: wrap; }

/* 球队列表（球队大全、联赛全部球队） */
.teams-title { margin-bottom: 12px; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; padding: 12px; }
.team-card {
  display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 12px; border-radius: 10px;
  background: var(--card-2); border: 1px solid var(--line); color: var(--text); font-weight: 600;
}
.team-card:hover { color: var(--text); border-color: var(--line-2); }
.team-card img { width: 28px; height: 28px; flex: none; }
.team-card__pos { min-width: 18px; font-size: 12px; color: var(--muted); text-align: center; }
.team-card__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 639px) {
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 10px; }
  .archive-hero__logos { gap: 8px; }
}

.about-page { width: 100%; max-width: 1280px; }
.about-content { padding: 28px; }
.about-content h1 { margin-bottom: 24px; font-size: 26px; }
.about-content__body { color: var(--text-2); font-size: 15px; line-height: 1.9; overflow-wrap: anywhere; }
.about-content__body p { margin: 0 0 20px; white-space: pre-line; }
.about-content__body p:last-child { margin-bottom: 0; }
@media (max-width: 639px) {
  .about-content { padding: 18px 16px; }
  .about-content h1 { margin-bottom: 18px; font-size: 22px; }
  .about-content__body { font-size: 14px; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 28px 0 20px; margin-top: 24px; font-size: 13px; color: var(--muted); }
.footer-grid { display: grid; gap: 24px; grid-template-columns: 1fr 1fr; }
.footer-brand { grid-column: 1 / -1; }
.footer-brand p { margin-top: 10px; max-width: 420px; }
.site-footer h2 { font-size: 13px; color: var(--text); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.site-footer li { margin-bottom: 7px; }
.site-footer a:hover { color: var(--gold); }
.footer-bottom { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; font-size: 12px; text-align: center; }

.to-top {
  position: fixed; right: 16px; bottom: 80px; z-index: 55; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: var(--red); color: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
  opacity: 0; pointer-events: none; transform: translateY(10px); transition: .2s;
}
.to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }

/* =========================================================
   Responsive
   ========================================================= */

/* 容器足够宽时比赛行横排（主队 — 比分 — 客队），
   窄侧栏中仍保持紧凑的两行布局。 */
.card { container-type: inline-size; }
@container (min-width: 500px) {
  .match { grid-template-columns: 64px minmax(0, 1fr) 44px; }
  .match__link {
    grid-template-columns: minmax(0, 1fr) auto 12px auto minmax(0, 1fr);
    grid-template-areas: "home sh sep sa away"; gap: 0 8px; padding: 12px 6px;
  }
  .team--home { flex-direction: row-reverse; text-align: right; }
  .score-sep { display: block; grid-area: sep; text-align: center; }
  .score { font-size: 16px; min-width: 26px; }
  .match--bb .score { min-width: 38px; }
  .team img { width: 24px; height: 24px; }
}
@media (max-width: 639px) { /* 手机：页边距、卡片间距和圆角都收紧一点，一屏多放内容 */
  :root { --radius: 10px; }
  .container { padding: 0 8px; }
  .page { padding: 8px 0 20px; }
  .layout, .stack { gap: 8px; }
  .breadcrumb { margin-bottom: 8px; }
  .league-strip ul { gap: 6px; padding: 8px 0; }
  .toolbar { gap: 8px; margin-bottom: 8px; }
  .date-strip ul { gap: 4px; }
  .date-strip li { min-width: 0; }
  .date-strip li:first-child:not(:has([aria-current])) { display: none; } /* 少显示最早一天，6 天正好铺满不用横向滚动 */
  .league-group + .league-group { margin-top: 8px; }
  .league-head { padding: 8px 10px; }
  .match { min-height: 54px; }
  .match__link { padding: 8px 6px; }
  .card__head { padding: 10px 12px; }
  .results-link { margin-top: 8px; padding: 12px; }
  .seo-text { padding: 14px; }
  .standings th, .standings td { padding: 9px 5px; } /* 足球积分榜在手机上一屏放下，不用横向滑动 */
  .standings .t-pos { width: 32px; }
  .standings .t-team { min-width: 0; }
  .t-team__in { gap: 7px; }
}
@media (max-width: 359px) { /* 小屏手机（如 iPhone SE 一代） */
  .sb-team img { width: 44px; height: 44px; }
  .sb-team h2 { font-size: 13px; }
  .sb-score { font-size: 30px; }
  .scoreboard--bb .sb-score { font-size: 24px; }
}

@media (min-width: 480px) {
  .league-hero__stats { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 640px) {
  .page-title { font-size: 24px; }
  .league-hero { grid-template-columns: auto 1fr auto; padding: 22px; }
  .league-hero__logo { width: 84px; height: 84px; }
  .league-hero h1 { font-size: 26px; }
  .league-hero__stats { grid-column: 1 / -1; }
  .sb-team img { width: 88px; height: 88px; }
  .sb-team h2 { font-size: 20px; }
  .sb-score, .scoreboard--bb .sb-score { font-size: 40px; }
  .sb-watch { margin-top: 28px; }
  .sb-team small { font-size: 12px; }
  .scoreboard__main { padding: 22px 20px 10px; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .footer-brand { grid-column: auto; }
}

@media (min-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .bottom-nav { display: none; }
  body { padding-bottom: 0; }
  .to-top { bottom: 24px; }
  .live-pill { display: inline-flex; }
  .toolbar { grid-template-columns: auto minmax(0, 1fr); align-items: center; }
  .toolbar .date-strip { grid-column: 1 / -1; grid-row: 1; }
  .toolbar .seg__btn { flex: none; padding: 0 14px; }
}

@media (min-width: 1100px) {
  .main-nav { display: block; }
  .menu-toggle { display: none; }
}

@media (min-width: 1200px) {
  .container { padding: 0 24px; }
  .layout--3 { grid-template-columns: 220px minmax(0, 1fr) 300px; }
  .layout--3 .sidebar-left { display: block; }
  .sidebar-left .sidebar-stack { position: sticky; top: calc(var(--header-h) + 16px); display: grid; gap: 16px; }
}

/* 越南语长名称需要保留比分、状态和筛选按钮的空间。 */
html:lang(vi) .match__time .st { max-width: 100%; white-space: normal; line-height: 1.3; font-size: 11px; gap: 3px; }
html:lang(vi) .match__time .st::before { flex: none; width: 5px; height: 5px; }
html:lang(vi) .mini-table { table-layout: fixed; }
html:lang(vi) .mini-table th, html:lang(vi) .mini-table td { width: 26px; padding-inline: 3px; }
html:lang(vi) .mini-table .t-team { width: auto; }
html:lang(vi) .mini-table .t-team a { overflow: hidden; gap: 5px; }
html:lang(vi) .mini-table .t-team span { min-width: 0; }
html:lang(vi) .mini-table th:last-child, html:lang(vi) .mini-table td:last-child { width: 38px; }
html:lang(vi) .my-teams-heading { flex-wrap: wrap; row-gap: 10px; }
html:lang(vi) .my-teams-heading .page-title { white-space: nowrap; }
html:lang(vi) .my-team-views .seg__btn { padding: 0 11px; }
@media (max-width: 639px) {
  html:lang(vi) .my-teams-heading { column-gap: 8px; }
  html:lang(vi) .my-teams-heading .page-title { font-size: 18px; }
  html:lang(vi) .my-team-views .seg__btn { height: 32px; min-height: 32px; padding: 0 9px; font-size: 12px; }
}
html:lang(vi) .standings-tabs .card__title { font-size: 14px; }
@media (min-width: 640px) {
  html:lang(vi) .match { grid-template-columns: 80px minmax(0, 1fr) 44px; }
}
@media (min-width: 900px) {
  /* 运动切换和状态筛选保持一行：按钮收窄一点；实在放不下时状态筛选横向滚动 */
  html:lang(vi) .toolbar .seg__btn { padding: 0 10px; gap: 6px; }
  html:lang(vi) .toolbar .filters { gap: 5px; }
  html:lang(vi) .toolbar .filter { padding: 0 10px; }
}
@media (min-width: 900px) and (max-width: 999px), (min-width: 1200px) and (max-width: 1279px) {
  html:lang(vi) .toolbar { grid-template-columns: minmax(0, 1fr); }
  html:lang(vi) .toolbar > .seg { justify-self: start; }
}
