:root {
  --bg: #f4f6f9;
  --card: #ffffff;
  --primary: #1d6fb8;
  --primary-dark: #155a96;
  --accent: #e63946;
  --text: #1f2933;
  --muted: #7b8794;
  --border: #e4e8ee;
  --today: #fff7e6;
  --today-bar: #ff9f1c;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }

/* ---------- 顶部 ---------- */
.site-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  padding: 18px 16px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.site-header h1 { margin: 0; font-size: 22px; letter-spacing: 1px; }
.site-header .sub { margin: 4px 0 0; font-size: 13px; opacity: .85; }
.site-header .admin-link {
  position: absolute; top: 16px; right: 16px;
  font-size: 13px; color: #fff; border: 1px solid rgba(255,255,255,.6);
  padding: 4px 10px; border-radius: 20px;
}

/* ---------- 容器 ---------- */
.container { max-width: 1100px; margin: 0 auto; padding: 16px; }

/* ---------- 日期分组 ---------- */
.date-group { margin-bottom: 26px; }
.date-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 17px; font-weight: 700; color: var(--text);
  padding: 8px 0; border-bottom: 2px solid var(--primary);
  margin-bottom: 12px;
}
.date-head .badge {
  font-size: 12px; font-weight: 600; color: #fff;
  background: var(--primary); border-radius: 12px; padding: 2px 10px;
}
.date-head.today { border-color: var(--today-bar); }
.date-head.today .badge { background: var(--today-bar); }

/* ---------- 赛事卡片 ---------- */
.match {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 18px;
  margin-bottom: 12px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
  transition: box-shadow .15s, transform .15s;
}
.match:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); transform: translateY(-1px); }
.match.is-today { background: var(--today); border-color: #f5e3bd; }

.league-tag {
  color: #fff; font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 8px; white-space: nowrap;
  background: #1d6fb8;
}
.match-time {
  font-variant-numeric: tabular-nums;
  font-weight: 700; font-size: 16px; color: var(--accent);
  min-width: 52px;
}
.match-title { font-size: 16px; font-weight: 600; flex: 1 1 260px; }

.links { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.live-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: #f0f6fc; border: 1px solid var(--primary);
  color: var(--primary-dark); font-size: 13px; font-weight: 600;
  padding: 5px 12px; border-radius: 999px; white-space: nowrap;
  transition: background .15s, color .15s;
}
.live-btn::before { content: "▶"; font-size: 9px; }
.live-btn:hover { background: var(--primary); color: #fff; }

.empty {
  text-align: center; color: var(--muted);
  padding: 50px 0; font-size: 15px;
}

/* ---------- 底部 ---------- */
.site-footer {
  text-align: center; color: var(--muted);
  font-size: 12px; padding: 24px 16px 36px;
}

/* ---------- 管理后台通用 ---------- */
.admin-body { background: #eef1f5; }
.admin-bar {
  background: #1f2933; color: #fff; padding: 0 16px;
  display: flex; align-items: center; height: 52px;
}
.admin-bar .brand { font-weight: 700; font-size: 16px; }
.admin-bar nav { margin-left: auto; display: flex; gap: 4px; }
.admin-bar nav a {
  color: #cbd2d9; font-size: 14px; padding: 8px 12px; border-radius: 6px;
}
.admin-bar nav a:hover, .admin-bar nav a.active { background: #323f4b; color: #fff; }
.admin-wrap { max-width: 1320px; margin: 20px auto; padding: 0 16px; }
.panel { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 18px; margin-bottom: 18px; overflow-x: auto; }
.panel h2 { margin: 0 0 14px; font-size: 17px; }

/* 按钮 */
.btn {
  display: inline-block; cursor: pointer; border: none; border-radius: 6px;
  padding: 8px 16px; font-size: 14px; font-weight: 600; text-align: center;
  white-space: nowrap; line-height: 1.4;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: #eef1f5; color: var(--text); }
.btn-ghost:hover { background: #e0e5ec; }
.btn-danger { background: #fdecea; color: #c0392b; }
.btn-danger:hover { background: #f9d5d2; }
.btn-sm { padding: 5px 10px; font-size: 13px; }

/* 表格 */
table.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
table.grid th, table.grid td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
table.grid th { background: #f7f9fc; font-weight: 600; color: #52606d; white-space: nowrap; }
table.grid td { white-space: nowrap; }
table.grid td.wrap { white-space: normal; }
table.grid tr:hover td { background: #fafbfc; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; background: #eef1f5; color: #52606d; white-space: nowrap; }
.tag-collected { background: #e3f2ec; color: #1d7a52; }
.tag-manual { background: #eaf1fb; color: #1d6fb8; }

/* ---------- 面板头（标题 + 右侧操作按钮） ---------- */
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.panel-head h2 { margin: 0; }

/* ---------- 行内表单（添加/编辑一行式） ---------- */
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; background: #f7f9fc; border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; margin: 10px 0 14px; }
.inline-form .form-row label { font-size: 12px; color: #52606d; }
.inline-form select { appearance: none; -webkit-appearance: none; background: #fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2352606d' fill='none' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 10px center; padding-right: 28px; }

/* ---------- 标签页（可滚动） ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tabs a { display: inline-block; padding: 5px 13px; border-radius: 16px; font-size: 13px; font-weight: 600; background: #f1f5f9; color: #334e68; border: 1px solid transparent; white-space: nowrap; transition: background .12s, color .12s; }
.tabs a:hover { background: #e2e8f0; }
.tabs a.active { background: var(--primary); color: #fff; }
.tabs-scroll { max-height: 132px; overflow-y: auto; padding-right: 4px; }

/* ---------- 表格链接截断 ---------- */
.cell-url { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-url a { color: var(--primary-dark); }

/* ---------- 弹窗层 ---------- */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 60; align-items: flex-start; justify-content: center; padding: 48px 16px; overflow-y: auto; }
.modal-overlay.open { display: flex; }
.modal { background: #fff; border-radius: 12px; width: 100%; max-width: 760px; padding: 20px 22px; box-shadow: 0 24px 64px rgba(0,0,0,.28); animation: modalIn .18s ease-out; }
@keyframes modalIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }

/* 分页条 */
.pager { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 16px; font-size: 13px; }
.pager a, .pager .cur, .pager .dots { padding: 6px 12px; border-radius: 6px; border: 1px solid var(--border); background: #fff; color: #52606d; }
.pager a { text-decoration: none; transition: border-color .15s, color .15s; }
.pager a:hover { background: #f0f6fc; border-color: var(--primary); color: var(--primary-dark); }
.pager .cur { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.pager .dots { border: none; background: none; padding: 6px 2px; }
.pager .info { color: var(--muted); margin-left: auto; }

/* 标签页（频道地区切换等） */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs a {
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border);
  font-size: 13px; color: #52606d; background: #fff; white-space: nowrap;
  transition: border-color .15s, color .15s, background .15s;
}
.tabs a:hover { border-color: var(--primary); color: var(--primary-dark); background: #f0f6fc; }
.tabs a.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

/* 表单 */
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: #3e4c59; }
.form-row input[type=text], .form-row input[type=date], .form-row input[type=time], .form-row input[type=password], .form-row select, .form-row textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 14px; font-family: inherit; background: #fff; color: var(--text);
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
/* 统一输入框聚焦态，避免密码框与文本框观感不同 */
.form-row input[type=text]:focus, .form-row input[type=password]:focus, .form-row input[type=date]:focus, .form-row input[type=time]:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29,111,184,.15);
}
/* 标签颜色可视化编辑（取色器 + 输入框 + 实时预览 + 预设色板） */
.color-edit { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.color-edit input[type=color] {
  width: 42px; height: 38px; padding: 2px; border: 1px solid var(--border); border-radius: 6px;
  background: #fff; cursor: pointer; flex: none;
}
.color-edit input[type=text] { width: 130px; flex: none; }
.color-preview {
  display: inline-flex; align-items: center; justify-content: center; min-width: 86px; height: 34px;
  padding: 0 12px; border-radius: 4px; font-size: 13px; font-weight: 600; background: #1d6fb8; color: #fff;
}
.color-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.color-presets .swatch {
  width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(0,0,0,.12); cursor: pointer; padding: 0;
  transition: transform .1s, box-shadow .1s;
}
.color-presets .swatch:hover { transform: scale(1.15); box-shadow: 0 0 0 2px rgba(29,111,184,.35); }
/* 去除浏览器自动填充带来的黄色背景/圆角差异 */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
  box-shadow: 0 0 0 1000px #fff inset;
  transition: background-color 9999s ease-in-out 0s;
}
.form-row textarea { min-height: 90px; resize: vertical; }
.form-inline { display: flex; gap: 12px; flex-wrap: wrap; }
.form-inline .form-row { flex: 1; min-width: 160px; }

.link-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.link-row input { flex: 1; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }
.link-row .lname { max-width: 200px; }
.link-row .del { flex: 0 0 auto; }

/* 提示 */
.alert { padding: 10px 14px; border-radius: 6px; font-size: 14px; margin-bottom: 14px; }
.alert-ok { background: #e3f2ec; color: #1d7a52; border: 1px solid #bfe3cf; }
.alert-err { background: #fdecea; color: #c0392b; border: 1px solid #f5c6c0; }

.stats { display: flex; gap: 14px; flex-wrap: wrap; }
.stat { flex: 1; min-width: 140px; background: #f7f9fc; border: 1px solid var(--border); border-radius: 8px; padding: 14px; text-align: center; }
.stat .num { font-size: 26px; font-weight: 700; color: var(--primary); }
.stat .lbl { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ---------- 登录页 ---------- */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1200px 600px at 50% -10%, #2b6cb0 0%, #1a3a5c 45%, #122536 100%);
  padding: 20px;
}
.login-card {
  width: 100%; max-width: 380px; background: #fff; border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35); padding: 34px 30px 28px;
  animation: login-in .35s ease;
}
@keyframes login-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.login-card .logo {
  width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 26px; font-weight: 800; box-shadow: 0 6px 18px rgba(29,111,184,.4);
}
.login-card h1 { text-align: center; font-size: 20px; margin: 0 0 4px; color: var(--text); }
.login-card .sub { text-align: center; font-size: 13px; color: var(--muted); margin: 0 0 22px; }
.login-card .form-row input[type=text], .login-card .form-row input[type=password] {
  padding: 12px 14px; font-size: 15px; border-radius: 10px; border-color: #d7dee8;
}
.login-card .btn-primary { padding: 12px; font-size: 15px; border-radius: 10px; margin-top: 6px; }
.login-card .hint { text-align: center; font-size: 12px; color: var(--muted); margin: 16px 0 0; }

.log-line { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; background: #0f172a; color: #cbd5e1; padding: 12px; border-radius: 8px; max-height: 320px; overflow: auto; white-space: pre-wrap; }
@media (max-width:520px){
  .match-title{flex-basis:100%;}
  .links{width:100%;margin-left:0;}
  .admin-bar nav a{padding:6px 8px;font-size:13px;}
}

/* === 分类徽标 & 详情按钮 === */
.cat-badge {
  display: inline-block;
  font-size: 12px;
  line-height: 18px;
  padding: 0 8px;
  margin-right: 6px;
  border-radius: 10px;
  background: #eef2f7;
  color: #52606d;
  vertical-align: middle;
}
.live-btn-ghost {
  background: #fff !important;
  color: #1d6fb8 !important;
  border: 1px solid #1d6fb8;
}

/* === 首页分类标签（吸顶，美化） === */
.front-tabs {
  position: sticky; top: 0; z-index: 5;
  display: flex; gap: 10px; flex-wrap: wrap;
  background: linear-gradient(var(--bg), var(--bg));
  padding: 12px 0 10px; margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.front-tabs .tab {
  cursor: pointer; position: relative;
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--border); background: #fff;
  color: #52606d; font-size: 14px; font-weight: 600;
  padding: 8px 18px 8px 16px; border-radius: 999px;
  transition: all .15s ease; white-space: nowrap;
  box-shadow: 0 1px 2px rgba(16,24,40,.03);
}
.front-tabs .tab::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: #cbd5e1; flex: 0 0 auto;
}
.front-tabs .tab[data-tier="hot"]::before { background: #e63946; }
.front-tabs .tab[data-tier="normal"]::before { background: #1d6fb8; }
.front-tabs .tab[data-tier="all"]::before { background: #94a3b8; }
.front-tabs .tab .cnt {
  font-size: 12px; font-weight: 700; color: #94a3b8;
  background: #f1f5f9; border-radius: 10px; padding: 0 7px; margin-left: 2px;
}
.front-tabs .tab:hover { border-color: var(--primary); color: var(--primary-dark); transform: translateY(-1px); }
.front-tabs .tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: transparent; color: #fff;
  box-shadow: 0 4px 14px rgba(29,111,184,.35);
}
.front-tabs .tab.active::before { background: #fff; }
.front-tabs .tab.active .cnt { background: rgba(255,255,255,.25); color: #fff; }

/* === 后台筛选栏（横排紧凑） === */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.filter-bar .form-row {
  display: flex; align-items: center; gap: 6px; margin: 0; flex: 0 0 auto;
}
.filter-bar .form-row label { margin: 0; font-size: 12px; color: #7b8794; white-space: nowrap; }
.filter-bar .form-row input.input, .filter-bar .form-row select.input {
  width: auto; min-width: 88px; padding: 6px 8px; font-size: 13px;
}
.filter-bar .form-row input[type=date].input { min-width: 130px; }
.filter-actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }


/* === 批量操作栏 === */
.batch-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.batch-bar .info { color: var(--muted); font-size: 13px; margin-left: auto; }

/* === 状态切换（点击） === */
.status-toggle {
  display: inline-block; padding: 3px 11px; border-radius: 6px; font-size: 12px; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: background .12s, color .12s;
}
.status-toggle.on  { background: #e3f2ec; color: #1d7a52; border: 1px solid #bfe3cf; }
.status-toggle.off { background: #fdeeec; color: #c0392b; border: 1px solid #f5c6c0; }
.status-toggle:hover { filter: brightness(.97); }

/* === 即时比分页 === */
.scores-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.src-tabs { display: flex; gap: 8px; }
.src-tabs .tab { cursor: pointer; border: 1px solid var(--border); background: #fff; color: #52606d; font-size: 14px; font-weight: 600; padding: 7px 16px; border-radius: 999px; transition: all .12s; white-space: nowrap; }
.src-tabs .tab:hover { border-color: var(--primary); color: var(--primary-dark); }
.src-tabs .tab.active { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); border-color: transparent; color: #fff; }
.scores-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.scores-meta .auto label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.scores-note { font-size: 12px; color: var(--muted); margin: 0 0 12px; min-height: 16px; }

.sc-group { font-size: 15px; font-weight: 700; color: var(--text); margin: 18px 0 10px; padding-left: 10px; border-left: 4px solid var(--primary); }
.sc-group.live { border-left-color: var(--accent); }
.sc-group.finished { border-left-color: #94a3b8; }

.score-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 16px; margin-bottom: 10px; box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
.score-card.is-live { border-color: #f5c6c0; background: #fffafa; }
.sc-league { font-size: 12px; font-weight: 600; color: var(--primary); margin-bottom: 6px; }
.sc-body { display: flex; align-items: center; gap: 12px; }
.score-card .team { flex: 1; min-width: 0; }
.score-card .team.home { text-align: right; }
.score-card .team.away { text-align: left; }
.score-card .nm { font-size: 15px; font-weight: 600; color: var(--text); }
.sc-mid { flex: 0 0 auto; text-align: center; min-width: 78px; }
.sc-mid .sc { display: inline-block; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); letter-spacing: 1px; }
.sc-mid .sc-empty { font-size: 14px; color: var(--muted); font-weight: 600; }
.sc-mid .sc-status { font-size: 11px; color: var(--muted); margin-top: 2px; }
.sc-mid .sc-status .half { color: #b26a00; }
.score-card.is-live .sc { color: var(--accent); }
.score-card.is-live::before { content: ""; }
.sc-time { font-size: 12px; color: var(--muted); margin-top: 6px; text-align: center; }
/* 进行中卡片的脉冲指示点 */
.sc-group.live + .score-card.is-live .sc-league::after,
.score-card.is-live .sc-league::after {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: #e63946; margin-left: 6px; vertical-align: middle; animation: livePulse 1.2s infinite;
}
@keyframes livePulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }


/* ============ 即时比分：筛选弹窗 ============ */
.scores-title { font-size: 15px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.scores-title .sub-tag { font-size: 11px; font-weight: 400; color: #e63946; border: 1px solid #e63946; border-radius: 999px; padding: 0 7px; line-height: 16px; }
.filter-badge { display: inline-block; min-width: 16px; text-align: center; background: #e63946; color: #fff; border-radius: 999px; font-size: 11px; line-height: 16px; padding: 0 4px; margin-left: 4px; }
.filter-badge:empty { display: none; }
.filter-tip { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin: 0 0 10px; }
.filter-tip button { border: none; background: none; color: #e63946; cursor: pointer; font-size: 12px; padding: 0; text-decoration: underline; }
.fmodal-mask { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.45); z-index: 1000; align-items: center; justify-content: center; padding: 16px; }
.fmodal { background: var(--panel-bg, #fff); color: inherit; border-radius: 12px; width: 100%; max-width: 420px; max-height: 80vh; display: flex; flex-direction: column; box-shadow: 0 12px 40px rgba(0,0,0,.25); overflow: hidden; }
.fmodal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; font-size: 15px; font-weight: 700; }
.fmodal-x { border: none; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 4px; }
.fmodal-search { padding: 0 16px 10px; }
.fmodal-search input { width: 100%; box-sizing: border-box; padding: 8px 12px; border: 1px solid var(--border, #ddd); border-radius: 8px; font-size: 13px; background: transparent; color: inherit; }
.fmodal-actions { display: flex; align-items: center; gap: 8px; padding: 0 16px 10px; font-size: 12px; }
.fmodal-actions button { border: 1px solid var(--border, #ddd); background: transparent; color: inherit; border-radius: 999px; padding: 3px 12px; font-size: 12px; cursor: pointer; }
.fmodal-hint { color: var(--muted); margin-left: auto; }
.fmodal-list { overflow-y: auto; padding: 0 8px 12px; flex: 1; }
.fitem { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.fitem:hover { background: rgba(127,127,127,.12); }
.fitem input { flex: none; }
.fitem .fname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fitem .fcnt { flex: none; font-size: 11px; color: var(--muted); background: rgba(127,127,127,.15); border-radius: 999px; padding: 1px 7px; }

/* ============ 即时比分：场次置顶 ============ */
.score-card { position: relative; }
.pin-btn {
  position: absolute; top: 6px; right: 8px; z-index: 2;
  border: none; background: none; cursor: pointer;
  font-size: 15px; line-height: 1; padding: 2px 3px; color: #c0c7d0;
}
.pin-btn:hover { color: #e6a817; transform: scale(1.15); }
.pin-btn.on { color: #e6a817; }
.score-card.is-pinned { border-color: #f0d9a8; background: #fffdf5; }
.sc-group.pin { border-left-color: #e6a817; color: #b07d0a; }
/* === 赛事分类切换（热门/常规）=== */
.tier-toggle {
  display: inline-block; padding: 3px 11px; border-radius: 6px; font-size: 12px; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: background .12s, color .12s;
}
.tier-toggle.on  { background: #fff7e0; color: #b07d0a; border: 1px solid #f0d9a8; }
.tier-toggle.off { background: #eef2f7; color: #52606d; border: 1px solid #d3dbe4; }
.tier-toggle:hover { filter: brightness(.97); }

/* === 顶部导航菜单（标题下方：赛事直播 / 即时比分）=== */
.top-nav { display: flex; gap: 10px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.top-nav .tn-link {
  display: inline-block; padding: 7px 26px; border-radius: 999px;
  background: rgba(255,255,255,.16); color: #fff; font-size: 14px; font-weight: 600;
  text-decoration: none; transition: background .12s, color .12s;
}
.top-nav .tn-link:hover { background: rgba(255,255,255,.3); color: #fff; }
.top-nav .tn-link.active { background: #fff; color: var(--primary, #1d6fb8); }

/* === 首页：筛选类别按钮（置于标签行右侧）=== */
.front-tabs .tab-filter { margin-left: auto; color: #e63946; border-color: #f3c1c1; background: #fff; }
.front-tabs .tab-filter::before { display: none; }
.front-tabs .tab-filter:hover { border-color: #e63946; color: #e63946; transform: none; }
.front-tabs .tab-filter.active { background: #fff; color: #e63946; }
@media (max-width: 640px) { .front-tabs .tab-filter { margin-left: 0; } }

/* === 赛事结果页 === */
.res-group { background: var(--panel-bg, #fff); border: 1px solid var(--border, #e6ebf1); border-radius: 10px; margin-bottom: 14px; overflow: hidden; }
.res-group-head { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--border, #e6ebf1); background: rgba(127,127,127,.05); }
.res-sport { font-size: 11px; line-height: 16px; padding: 0 7px; border-radius: 999px; color: #fff; }
.res-sport.fb { background: #2a9d8f; }
.res-sport.bk { background: #e6862f; }
.res-cnt { margin-left: auto; font-size: 12px; color: var(--muted, #7b8794); }
.res-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px dashed var(--border, #eef1f5); font-size: 13px; }
.res-row:last-child { border-bottom: none; }
.res-row:hover { background: rgba(127,127,127,.05); }
.res-time { flex: none; width: 42px; color: var(--muted, #7b8794); font-size: 12px; }
.res-home { flex: 1; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-score { flex: none; font-weight: 700; color: #e63946; min-width: 44px; text-align: center; }
.res-away { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-half { flex: none; font-size: 11px; color: var(--muted, #7b8794); background: rgba(127,127,127,.1); border-radius: 999px; padding: 1px 7px; }
.res-round { flex: none; font-size: 11px; color: var(--muted, #7b8794); }
@media (max-width: 560px) { .res-round { display: none; } }

/* === 即时比分：进行中闪烁指示 + 实时时钟 === */
.live-dot {
  display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%;
  background: #e63946; box-shadow: 0 0 0 0 rgba(230,57,70,.7);
  animation: livePulse 1.2s ease-out infinite; vertical-align: middle;
}
@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 rgba(230,57,70,.65); opacity: 1; }
  70%  { box-shadow: 0 0 0 7px rgba(230,57,70,0);  opacity: .55; }
  100% { box-shadow: 0 0 0 0 rgba(230,57,70,0);    opacity: 1; }
}
.sc-status.live { color: #e63946; font-weight: 600; }
.sc-min { font-size: 13px; letter-spacing: .3px; }
.sc-phase { margin-left: 5px; font-size: 11px; color: #7b8794; font-weight: 400; }
.sc-group.live { color: #c82c39; }
.sc-time .half { margin-left: 6px; }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
