/* ============================================================
 * 足球直播 ZUQIU TV —— 全站样式
 * 设计语言：紧凑胶囊布局 + 柔和半透明选中态 + 轻阴影分层
 * ============================================================ */

/* ---------- 设计变量 ---------- */
:root {
  --brand: #2163e8;
  --brand-600: #1a52c6;
  --brand-soft: #eef5ff;
  --brand-hover: #f3f7ff;
  --brand-line: #cfe0fb;

  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f7f9fd;
  --bar-bg: rgba(255, 255, 255, .84);

  --text: #16203a;
  --text-2: #5b6b86;
  --text-3: #95a2b8;

  --line: #e8eef7;
  --line-2: #f1f5fa;

  --live: #ef3b4e;
  --live-soft: #fdeef0;
  --up: #7d8aa3;
  --up-soft: #f1f4f9;
  --ok: #17ab5b;
  --ok-soft: #e9f8f0;

  --fb: #2163e8;
  --fb-soft: #eaf2ff;
  --bk: #e77b12;
  --bk-soft: #fff2e2;

  --radius: 14px;
  --radius-sm: 10px;
  --pill: 999px;

  --shadow: 0 1px 2px rgba(19, 33, 68, .04), 0 6px 18px rgba(19, 33, 68, .05);
  --shadow-hover: 0 2px 8px rgba(19, 33, 68, .07), 0 14px 30px rgba(19, 33, 68, .08);

  --sb-w: 252px;
  --bar-h: 60px;
}

[data-theme="dark"] {
  --brand: #5b94ff;
  --brand-600: #82adff;
  --brand-soft: rgba(71, 129, 255, .16);
  --brand-hover: rgba(71, 129, 255, .1);
  --brand-line: rgba(91, 148, 255, .34);

  --bg: #080e1c;
  --surface: #0f1729;
  --surface-2: #141e34;
  --bar-bg: rgba(10, 17, 32, .86);

  --text: #e8eefb;
  --text-2: #9aa9c4;
  --text-3: #6b7b98;

  --line: #1d2843;
  --line-2: #172035;

  --live: #ff5c6e;
  --live-soft: rgba(239, 59, 78, .18);
  --up: #8291ab;
  --up-soft: rgba(125, 138, 163, .14);
  --ok: #2ecc80;
  --ok-soft: rgba(23, 171, 91, .16);

  --fb: #5b94ff;
  --fb-soft: rgba(71, 129, 255, .16);
  --bk: #f5a04a;
  --bk-soft: rgba(231, 123, 18, .16);

  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 22px rgba(0, 0, 0, .28);
  --shadow-hover: 0 2px 10px rgba(0, 0, 0, .36), 0 16px 34px rgba(0, 0, 0, .34);
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color .24s ease, color .24s ease;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.ico { flex: none; display: block; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #c9d4e6; border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #2a3752; background-clip: content-box; }

/* ---------- 骨架布局 ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sb-w);
  display: flex;
  flex-direction: column;
  padding: 14px 12px 10px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 50;
}

.app-main {
  flex: 1;
  min-width: 0;
  margin-left: var(--sb-w);
  display: flex;
  flex-direction: column;
}

.content {
  flex: 1;
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
  padding: 16px 20px 26px;
}

/* 7:5 双栏 */
.cols {
  display: grid;
  grid-template-columns: minmax(0, 1.34fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* ---------- 侧栏 · 品牌 ---------- */
.brand { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 12px; }

.brand-logo { display: flex; align-items: center; gap: 10px; }

.brand-mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  color: #fff;
  border-radius: 11px;
  background: linear-gradient(140deg, #4a86ff, #1c4fd0);
  box-shadow: 0 4px 12px rgba(33, 99, 232, .3);
}

.brand-text b { display: block; font-size: 15px; font-weight: 700; letter-spacing: .5px; line-height: 1.25; }
.brand-text i { display: block; font-size: 9.5px; font-style: normal; letter-spacing: 1.7px; color: var(--text-3); }

.sidebar-close { display: none; }

/* ---------- 侧栏 · 数据概览（两列网格） ---------- */
.stat-card {
  padding: 6px;
  margin-bottom: 10px;
  border-radius: 12px;
  border: 1px solid #e3edff;
  background: linear-gradient(180deg, #f3f8ff, #edf4ff);
}
[data-theme="dark"] .stat-card { border-color: #1b2843; background: linear-gradient(180deg, #121c31, #0e1627); }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }

.stat {
  display: flex; flex-direction: column; gap: 1px;
  padding: 6px 9px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .72);
}
[data-theme="dark"] .stat { background: rgba(255, 255, 255, .04); }

.stat-num { font-size: 15px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-num.is-live { color: var(--live); }
.stat-label { font-size: 10.5px; color: var(--text-3); }

/* 自定义数据提示 */
.sidebar.is-custom .stat-card { border-color: var(--brand-line); }

/* ---------- 侧栏 · 导航 ---------- */
.nav { display: flex; flex-direction: column; gap: 1px; flex: 1; }

.nav-group {
  padding: 12px 10px 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--text-3);
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  transition: background-color .16s ease, color .16s ease;
}
.nav-item:hover { background: var(--brand-hover); color: var(--brand); }

.nav-item.is-active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}

.nav-ico { width: 18px; height: 18px; display: grid; place-items: center; flex: none; opacity: .92; }
.nav-txt { flex: 1; min-width: 0; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav-bar {
  width: 5px; height: 5px; flex: none;
  border-radius: 99px;
  background: var(--brand);
}

.nav-arrow { display: grid; place-items: center; flex: none; color: var(--text-3); transition: transform .2s ease; }
.nav-menu.is-open .nav-arrow { transform: rotate(90deg); color: var(--brand); }
.nav-menu.has-active > .nav-toggle { color: var(--brand); }

/* 子菜单：一行两个的胶囊网格 */
.nav-sub { display: none; padding: 5px 0 4px; }
.nav-menu.is-open .nav-sub { display: block; animation: subIn .18s ease; }

@keyframes subIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

.nav-sub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }

.nav-chip {
  display: flex; align-items: center; justify-content: center;
  height: 30px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--surface-2);
  font-size: 12.5px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color .16s ease, color .16s ease;
}
.nav-chip:hover { background: var(--brand-hover); color: var(--brand); }
.nav-chip.is-active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }

/* 侧栏底部 */
.sidebar-foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line-2);
}

.side-link {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px;
  border-radius: 9px;
  font-size: 12px;
  color: var(--text-3);
  background: var(--surface-2);
  transition: background-color .16s ease, color .16s ease;
}
.side-link:hover { background: var(--brand-soft); color: var(--brand); }
.side-link.is-active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.side-link:only-child { grid-column: 1 / -1; }
.side-link .nav-ico { width: 15px; height: 15px; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--bar-h);
  padding: 0 20px;
  background: var(--bar-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar-title { min-width: 0; display: flex; flex-direction: column; }
.topbar-title h1 { font-size: 16px; font-weight: 700; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-kicker { font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--text-3); }

.topbar-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; min-width: 0; }

.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  width: 300px;
  height: 34px;
  padding: 0 12px;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  background: var(--surface-2);
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.search:focus-within { background: var(--surface); border-color: var(--brand-line); box-shadow: 0 0 0 3px rgba(33, 99, 232, .1); }
.search.is-sm { width: 210px; height: 30px; padding: 0 10px; }
.search-ico { display: grid; place-items: center; color: var(--text-3); }
.search-input {
  flex: 1; min-width: 0;
  border: 0; outline: 0; background: none;
  font-size: 13px;
}
.search-input::placeholder { color: var(--text-3); }
.search-input::-webkit-search-cancel-button { display: none; }
.search-kbd {
  flex: none;
  padding: 1px 5px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 9.5px;
  font-family: inherit;
  color: var(--text-3);
  letter-spacing: .3px;
}

.today-chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 11px;
  border-radius: var(--pill);
  background: var(--surface-2);
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
}

.icon-btn {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-2);
  transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}
.icon-btn:hover { background: var(--brand-soft); color: var(--brand); border-color: transparent; }

.only-mobile { display: none; }

/* ---------- 面板 ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-2);
}

.panel-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 700;
  letter-spacing: .2px;
  white-space: nowrap;
}

.panel-dot { width: 5px; height: 15px; border-radius: 3px; background: var(--brand); }
.panel-dot.red { background: var(--live); }
.panel-dot.green { background: var(--ok); }
.panel-dot.orange { background: var(--bk); }

.panel-count {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  background: var(--surface-2);
  border-radius: var(--pill);
  padding: 1px 7px;
  font-variant-numeric: tabular-nums;
}

.panel-body { padding: 8px; container-type: inline-size; }
.panel-body.is-flush { padding: 0; }
.panel-body.is-tight { padding: 4px; }

.panel-more {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 1px;
  height: 26px; padding: 0 10px 0 11px;
  border-radius: var(--pill);
  font-size: 12px;
  color: var(--text-2);
  background: var(--surface-2);
  transition: background-color .16s ease, color .16s ease;
}
.panel-more:hover { background: var(--brand-soft); color: var(--brand); }

/* ---------- 胶囊选项卡 ---------- */
.tabs {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: var(--pill);
  background: var(--surface-2);
}
.panel-title + .tabs { margin-left: auto; }
.tabs + .panel-more { margin-left: 0; }

.tab {
  height: 25px;
  padding: 0 12px;
  border-radius: var(--pill);
  font-size: 12.5px;
  color: var(--text-2);
  white-space: nowrap;
  transition: background-color .16s ease, color .16s ease, box-shadow .16s ease;
}
.tab:hover { color: var(--brand); }
.tab.is-active {
  background: var(--surface);
  color: var(--brand);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(19, 33, 68, .1);
}
[data-theme="dark"] .tab.is-active { background: rgba(255, 255, 255, .1); box-shadow: none; }

/* ---------- 比赛列表 ---------- */
.match-list { display: flex; flex-direction: column; gap: 1px; }

.match-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px 6px;
}

/* 面板宽度足够时才排两列，避免双栏布局下单个比赛行被挤得过窄 */
@container (min-width: 700px) {
  .match-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.match {
  display: grid;
  grid-template-columns: 24px auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  transition: background-color .16s ease;
}
.match:hover { background: var(--brand-hover); }

.match-ico {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 8px;
}
.match-ico.is-fb { color: var(--fb); background: var(--fb-soft); }
.match-ico.is-bk { color: var(--bk); background: var(--bk-soft); }

.match-info { display: flex; align-items: center; gap: 6px; min-width: 0; }
.match-time {
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: .2px;
}
.match-league {
  font-style: normal;
  font-size: 10.5px;
  color: var(--text-3);
  background: var(--surface-2);
  border-radius: 6px;
  padding: 1px 5px;
  white-space: nowrap;
  max-width: 68px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-teams { display: flex; align-items: center; gap: 5px; min-width: 0; }
.team {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.team.is-away { text-align: left; }

.match-score {
  flex: none;
  min-width: 36px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.match-score i {
  font-style: normal;
  font-weight: 500;
  font-size: 10px;
  color: var(--text-3);
  margin: 0 2px;
}
.match-score:not(.has-score) { color: var(--text-3); font-size: 10.5px; font-weight: 600; }

.match-state {
  display: inline-flex; align-items: center; gap: 4px;
  flex: none;
  height: 21px;
  padding: 0 8px;
  border-radius: var(--pill);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2px;
}
.match-state.is-live { color: var(--live); background: var(--live-soft); }
.match-state.is-up { color: var(--up); background: var(--up-soft); }
.match-state.is-end { color: var(--text-3); background: var(--up-soft); }

.pulse {
  width: 5px; height: 5px; flex: none;
  border-radius: 99px;
  background: currentColor;
  box-shadow: 0 0 0 0 currentColor;
  animation: pulse 1.6s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 59, 78, .5); }
  70% { box-shadow: 0 0 0 5px rgba(239, 59, 78, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 59, 78, 0); }
}

/* 紧凑形态（单列密集场景） */
.match.is-compact { grid-template-columns: 22px auto minmax(0, 1fr) auto; padding: 6px 8px; }
.match.is-compact .match-ico { width: 22px; height: 22px; }

/* ---------- 文本列表（资讯 / 推荐） ---------- */
.txt-list { display: flex; flex-direction: column; padding: 2px; }

.txt-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 9px;
  transition: background-color .16s ease;
}
.txt-item:hover { background: var(--brand-hover); }
.txt-item:hover .txt-title { color: var(--brand); }

.txt-dot {
  width: 4px; height: 4px; flex: none;
  border-radius: 99px;
  background: var(--brand-line);
}

.txt-title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .16s ease;
}

.txt-time {
  flex: none;
  font-size: 11px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* ---------- 空状态 ---------- */
.empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 40px 16px;
  color: var(--text-3);
}
.empty p { font-size: 13px; }

/* ---------- 资讯卡片 ---------- */
.news-card {
  display: grid;
  grid-template-columns: 98px minmax(0, 1fr);
  gap: 11px;
  padding: 9px;
  border-radius: 11px;
  transition: background-color .16s ease;
}
.news-card:hover { background: var(--brand-hover); }
.news-card:hover .news-title { color: var(--brand); }

.news-cover {
  position: relative;
  height: 68px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #fff;
  overflow: hidden;
  background: linear-gradient(135deg, #4d8bff, #1b4fd1);
}
.news-cover[data-cat="足球"] { background: linear-gradient(135deg, #4d8bff, #1b4fd1); }
.news-cover[data-cat="篮球"] { background: linear-gradient(135deg, #ffab52, #dd6a06); }
.news-cover[data-cat="电竞"] { background: linear-gradient(135deg, #a78bfa, #6d3fe0); }
.news-cover[data-cat="综合"] { background: linear-gradient(135deg, #3ee0af, #0b9d70); }
.news-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 82% 18%, rgba(255, 255, 255, .26), transparent 58%);
}
.news-cover em {
  position: absolute;
  left: 6px; bottom: 5px;
  font-style: normal;
  font-size: 9.5px;
  padding: 0 5px;
  border-radius: 5px;
  background: rgba(0, 0, 0, .28);
  backdrop-filter: blur(3px);
}

.news-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }

.news-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .16s ease;
}

.news-sub {
  font-size: 11.5px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-meta { display: flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--text-3); }
.news-meta .dot { opacity: .6; }

/* ---------- 视频 / 录像卡片 ---------- */
.media-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  padding: 8px;
  border-radius: 11px;
  transition: background-color .16s ease;
}
.media-card:hover { background: var(--brand-hover); }
.media-card:hover .media-title { color: var(--brand); }

.media-cover {
  position: relative;
  height: 60px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #fff;
  overflow: hidden;
}
.media-cover.is-fb { background: linear-gradient(135deg, #4d8bff, #1b4fd1); }
.media-cover.is-bk { background: linear-gradient(135deg, #ffab52, #dd6a06); }
.media-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 78% 20%, rgba(255, 255, 255, .24), transparent 60%);
}
.media-cover svg { position: relative; z-index: 1; opacity: .92; }

.media-dur {
  position: absolute;
  right: 5px; bottom: 4px;
  z-index: 1;
  font-style: normal;
  font-size: 9.5px;
  padding: 0 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, .42);
}

.media-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; justify-content: center; }
.media-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .16s ease;
}
.media-meta { display: flex; align-items: center; gap: 7px; font-size: 10.5px; color: var(--text-3); }
.media-tag {
  padding: 0 6px;
  border-radius: 5px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}

/* ---------- 资讯 / 媒体双列网格 ---------- */
.news-grid,
.media-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 8px; }

/* ---------- 电视频道卡片 ---------- */
.tv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; padding: 4px; }

.tv-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 11px;
  border: 1px solid var(--line-2);
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.tv-card:hover { background: var(--brand-hover); border-color: var(--brand-line); box-shadow: var(--shadow); }

.tv-logo {
  width: 54px; height: 34px; flex: none;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  padding: 0 3px;
}

.tv-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tv-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-desc { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-tag {
  flex: none;
  font-size: 10px;
  padding: 1px 7px;
  border-radius: var(--pill);
  background: var(--surface-2);
  color: var(--text-3);
}

/* ---------- 页面头部 ---------- */
.page-head {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 16px 18px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.page-head::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(33, 99, 232, .07), transparent 46%);
  pointer-events: none;
}

.page-head-main { position: relative; min-width: 0; flex: 1; }
.page-head-kicker {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: var(--pill);
  padding: 2px 9px;
  margin-bottom: 6px;
}
.page-head-title { font-size: 21px; font-weight: 800; letter-spacing: .3px; line-height: 1.3; }
.page-head-desc { margin-top: 3px; font-size: 12.5px; color: var(--text-2); }

.page-head-stats { position: relative; display: flex; gap: 8px; flex-wrap: wrap; }
.head-stat {
  min-width: 78px;
  padding: 7px 12px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
}
.head-stat b { display: block; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.25; }
.head-stat span { font-size: 10.5px; color: var(--text-3); }
.head-stat.is-live b { color: var(--live); }

/* ---------- 筛选工具条 ---------- */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-2);
}
.filter-label { font-size: 11.5px; color: var(--text-3); font-weight: 600; }
.filter-sep { width: 1px; height: 16px; background: var(--line); margin: 0 3px; }

/* ---------- 比赛直播页 ---------- */
.live-grid { display: grid; grid-template-columns: minmax(0, 1fr) 322px; gap: 16px; align-items: start; }

.player {
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #1b2b4d, #070c18 72%);
  color: #fff;
  box-shadow: var(--shadow);
}
.player-inner { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 20px; }
.player-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px;
  border-radius: var(--pill);
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(255, 255, 255, .12);
  backdrop-filter: blur(6px);
}
.player-badge.is-live { background: rgba(239, 59, 78, .2); color: #ff8494; }
.player-name { font-size: 18px; font-weight: 700; }
.player-tip { font-size: 12px; color: rgba(255, 255, 255, .55); }
.player-play {
  width: 62px; height: 62px;
  display: grid; place-items: center;
  border-radius: 99px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  color: #fff;
  transition: transform .18s ease, background-color .18s ease;
}
.player-play:hover { transform: scale(1.06); background: rgba(255, 255, 255, .22); }

/* 比分板 */
.scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 16px 18px; }
.sb-team { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.sb-logo {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
  background: var(--fb-soft);
  color: var(--fb);
}
.sb-logo.is-bk { background: var(--bk-soft); color: var(--bk); }
.sb-name { font-size: 14px; font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sb-role { font-size: 10.5px; color: var(--text-3); }

.sb-center { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.sb-score {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.sb-score i { font-style: normal; font-size: 18px; color: var(--text-3); margin: 0 5px; }
.sb-vs { font-size: 12px; color: var(--text-3); font-weight: 600; letter-spacing: 1px; }
.sb-meta { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-3); }

/* 线路切换 */
.line-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; padding: 4px; }
.line-item {
  display: flex; align-items: center; gap: 7px;
  height: 36px;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 12.5px;
  color: var(--text-2);
  border: 1px solid transparent;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}
.line-item:hover { background: var(--brand-hover); color: var(--brand); }
.line-item.is-active { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-line); font-weight: 600; }
.line-item .lv {
  margin-left: auto;
  font-size: 9.5px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--ok-soft);
  color: var(--ok);
}

/* 信息行 */
.info-rows { display: flex; flex-direction: column; gap: 1px; padding: 4px; }
.info-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; font-size: 12.5px; }
.info-row:nth-child(odd) { background: var(--surface-2); }
.info-row span { color: var(--text-3); flex: none; width: 68px; }
.info-row b { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 文章页 ---------- */
.article-grid { display: grid; grid-template-columns: minmax(0, 1fr) 322px; gap: 16px; align-items: start; }
.article { padding: 22px 24px; }
.article-head { padding-bottom: 14px; border-bottom: 1px solid var(--line-2); margin-bottom: 16px; }
.article-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--brand); background: var(--brand-soft); border-radius: var(--pill); padding: 2px 10px; margin-bottom: 9px; }
.article-title { font-size: 22px; font-weight: 800; line-height: 1.45; letter-spacing: .2px; }
.article-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: var(--text-3); }

.article-figure {
  height: 180px;
  border-radius: 12px;
  margin-bottom: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #4d8bff, #1b4fd1);
  position: relative;
  overflow: hidden;
}
.article-figure::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 76% 22%, rgba(255, 255, 255, .25), transparent 60%); }

.article-body p { font-size: 15px; line-height: 1.95; color: var(--text-2); margin-bottom: 14px; }
.article-body h3 { font-size: 16px; font-weight: 700; margin: 22px 0 10px; }
.article-body blockquote {
  margin: 16px 0;
  padding: 12px 16px;
  border-left: 3px solid var(--brand);
  background: var(--brand-soft);
  border-radius: 0 10px 10px 0;
  font-size: 14px;
  color: var(--text-2);
}

/* ---------- 分页 ---------- */
.pager { display: flex; align-items: center; justify-content: center; gap: 5px; flex-wrap: wrap; padding: 14px 8px 6px; }
.pager-btn {
  min-width: 32px; height: 32px;
  padding: 0 11px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px;
  background: var(--surface-2);
  font-size: 12.5px;
  color: var(--text-2);
  transition: background-color .16s ease, color .16s ease;
}
.pager-btn:hover:not(:disabled) { background: var(--brand-hover); color: var(--brand); }
.pager-btn.is-active { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.pager-btn:disabled { opacity: .42; cursor: not-allowed; }
.pager-info { font-size: 12px; color: var(--text-3); margin-left: 6px; }

/* ---------- 页脚 ---------- */
.footer { margin-top: auto; border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner { max-width: 1560px; margin: 0 auto; padding: 14px 20px 16px; display: flex; flex-direction: column; gap: 6px; }
.footer-note { font-size: 11.5px; line-height: 1.75; color: var(--text-3); }

/* ---------- 回到顶部 ---------- */
.to-top {
  position: fixed;
  right: 22px; bottom: 22px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--pill);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-2);
  box-shadow: var(--shadow-hover);
  opacity: 0; visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
  z-index: 60;
}
.to-top.is-show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: var(--brand); border-color: var(--brand-line); }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%; bottom: 34px;
  transform: translate(-50%, 12px);
  padding: 9px 18px;
  border-radius: var(--pill);
  background: rgba(22, 32, 58, .93);
  color: #fff;
  font-size: 12.5px;
  box-shadow: 0 10px 30px rgba(10, 16, 32, .28);
  opacity: 0;
  transition: opacity .22s ease, transform .22s ease;
  z-index: 200;
  pointer-events: none;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.toast.is-ok { background: rgba(14, 132, 74, .95); }
.toast.is-err { background: rgba(206, 42, 60, .95); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px;
  padding: 0 15px;
  border-radius: var(--pill);
  background: var(--surface-2);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  transition: background-color .16s ease, color .16s ease, box-shadow .16s ease;
}
.btn:hover { background: var(--brand-soft); color: var(--brand); }
.btn.is-primary { background: var(--brand); color: #fff; }
.btn.is-primary:hover { background: var(--brand-600); box-shadow: 0 6px 16px rgba(33, 99, 232, .28); }
.btn.is-ghost { background: transparent; border: 1px solid var(--line); }
.btn.is-danger { background: var(--live-soft); color: var(--live); }
.btn.is-sm { height: 29px; padding: 0 11px; font-size: 12px; }

/* ---------- 表单 ---------- */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field > label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.input, .select, .textarea {
  width: 100%;
  height: 36px;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-2);
  outline: 0;
  font-size: 13px;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}
.textarea { height: auto; min-height: 96px; padding: 9px 11px; line-height: 1.7; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
  background: var(--surface);
  border-color: var(--brand-line);
  box-shadow: 0 0 0 3px rgba(33, 99, 232, .1);
}

/* ---------- 后台 ---------- */
.admin-layout { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 16px; align-items: start; }

.admin-nav { display: flex; flex-direction: column; gap: 2px; padding: 6px; }
.admin-nav-item {
  display: flex; align-items: center; gap: 9px;
  height: 36px;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-2);
  text-align: left;
  transition: background-color .16s ease, color .16s ease;
}
.admin-nav-item:hover { background: var(--brand-hover); color: var(--brand); }
.admin-nav-item.is-active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.admin-nav-item .cnt { margin-left: auto; font-size: 10.5px; color: var(--text-3); font-weight: 600; }

.admin-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.admin-bar .spacer { flex: 1; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 8px 11px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td { padding: 9px 11px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:hover td { background: var(--brand-hover); }
.table .col-act { text-align: right; white-space: nowrap; }
.table .cell-title { max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tag-mini {
  display: inline-flex; align-items: center;
  padding: 1px 7px;
  border-radius: var(--pill);
  font-size: 10.5px;
  background: var(--surface-2);
  color: var(--text-2);
}
.tag-mini.is-live { background: var(--live-soft); color: var(--live); }
.tag-mini.is-up { background: var(--up-soft); color: var(--up); }
.tag-mini.is-end { background: var(--up-soft); color: var(--text-3); }
.tag-mini.is-fb { background: var(--fb-soft); color: var(--fb); }
.tag-mini.is-bk { background: var(--bk-soft); color: var(--bk); }

.row-btn {
  display: inline-grid; place-items: center;
  width: 27px; height: 27px;
  border-radius: 8px;
  color: var(--text-3);
  transition: background-color .16s ease, color .16s ease;
}
.row-btn:hover { background: var(--brand-soft); color: var(--brand); }
.row-btn.is-danger:hover { background: var(--live-soft); color: var(--live); }

.admin-tip { font-size: 12px; line-height: 1.7; color: var(--text-3); margin-bottom: 10px; }

/* ---------- 后台表单网格 ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .field.is-wide { grid-column: 1 / -1; }
.field-hint { font-size: 11px; color: var(--text-3); }
.check-row { display: flex; align-items: center; gap: 8px; height: 36px; font-size: 12.5px; color: var(--text-2); }
.check-row input { width: 15px; height: 15px; accent-color: var(--brand); flex: none; }

@media (max-width: 620px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 模态框 ---------- */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(10, 16, 32, .5);
  backdrop-filter: blur(3px);
  z-index: 150;
}
.modal.is-open { display: grid; animation: fade .18s ease; }
body.modal-open { overflow: hidden; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  width: min(580px, 100%);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(10, 16, 32, .3);
  overflow: hidden;
  animation: pop .2s cubic-bezier(.2, .8, .3, 1);
}
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

.modal-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.modal-head h3 { font-size: 15px; font-weight: 700; flex: 1; }
.modal-body { padding: 16px 18px; overflow-y: auto; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line-2); background: var(--surface-2); }

/* ---------- 响应式 ---------- */
@media (max-width: 1320px) {
  .cols { grid-template-columns: minmax(0, 1fr); }
  .live-grid, .article-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1180px) {
  .news-grid, .media-grid { grid-template-columns: minmax(0, 1fr); }
  .search { width: 230px; }
}

@media (max-width: 940px) {
  .sidebar {
    transform: translateX(-102%);
    transition: transform .26s cubic-bezier(.2, .7, .3, 1);
    box-shadow: none;
  }
  body.nav-open .sidebar { transform: none; box-shadow: 0 0 50px rgba(10, 16, 32, .22); }
  body.nav-open::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(10, 16, 32, .42);
    animation: fade .2s ease;
  }
  .app-main { margin-left: 0; }
  .sidebar-close { display: grid; width: 30px; height: 30px; }
  .only-mobile { display: grid; }
  .only-desktop { display: none; }
  .topbar { padding: 0 14px; gap: 10px; }
  .content { padding: 12px 14px 22px; }
  .search { width: auto; flex: 1; max-width: 320px; }
  .search-kbd { display: none; }
}

@media (max-width: 720px) {
  .topbar-title { display: none; }
  .today-chip { display: none; }
  .page-head { padding: 14px; }
  .page-head-title { font-size: 18px; }
  .head-stat { min-width: 66px; padding: 6px 10px; }
  .head-stat b { font-size: 14px; }
  .panel-head { padding: 10px 11px; }
  .panel-title { font-size: 14px; }
  .tabs { overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .news-card { grid-template-columns: 84px minmax(0, 1fr); }
  .news-cover { height: 60px; }
  .media-card { grid-template-columns: 78px minmax(0, 1fr); }
  .media-cover { height: 54px; }
  .match { grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-areas: "ico teams state" "ico info state"; gap: 2px 8px; }
  .match-ico { grid-area: ico; align-self: start; margin-top: 3px; }
  .match-teams { grid-area: teams; }
  .match-info { grid-area: info; }
  .match-state { grid-area: state; }
  .article { padding: 16px; }
  .article-title { font-size: 18px; }
  .article-body p { font-size: 14px; }
  .scoreboard { padding: 12px; gap: 6px; }
  .sb-score { font-size: 22px; }
  .sb-logo { width: 38px; height: 38px; border-radius: 12px; font-size: 12px; }
  .sb-name { font-size: 12.5px; }
  .admin-layout { grid-template-columns: minmax(0, 1fr); }
  .admin-nav { flex-direction: row; overflow-x: auto; }
  .admin-nav-item { white-space: nowrap; }
  .admin-nav-item .cnt { display: none; }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .footer-inner { padding: 12px 14px 14px; }
}

@media (max-width: 420px) {
  .tv-grid { grid-template-columns: minmax(0, 1fr); }
  .line-list { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 静态生成页辅助 ---------- */
.is-hidden { display: none !important; }

/* 双列网格在窄面板（如首页右栏）中自动降为单列 */
@container (max-width: 520px) {
  .news-grid, .media-grid { grid-template-columns: minmax(0, 1fr); }
}

.search-kind {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: var(--pill);
  font-size: 10.5px;
  font-style: normal;
  font-weight: 500;
  color: var(--brand);
  background: var(--brand-soft);
  vertical-align: 1px;
}

