:root {
  --bg: #ffffff;
  --text: #1c2330;
  --muted: #7a8698;
  --line: #e6eaf0;
  --accent: #2563eb;
  --accent-soft: #eff4ff;
  --live: #e02424;
  --radius: 8px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* header */
.site-header { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 20; }
.header-row { display: flex; align-items: center; gap: 24px; height: 56px; }
.brand { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; }
.brand span { color: var(--accent); }
.main-nav { display: flex; gap: 4px; flex: 1; }
.main-nav a { padding: 6px 12px; border-radius: 6px; color: var(--muted); font-weight: 600; }
.main-nav a.on, .main-nav a:hover { color: var(--accent); background: var(--accent-soft); }
.header-right { display: flex; align-items: center; gap: 12px; }
.search-form { display: flex; gap: 6px; }
.search-form input { width: 200px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; }
.search-form button { padding: 6px 12px; border: 1px solid var(--line); background: #fff; border-radius: 6px; cursor: pointer; }
.lang-switch { position: relative; cursor: pointer; }
.lang-switch > a { font-weight: 600; color: var(--accent); }
.lang-menu { display: none; position: absolute; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(20,30,50,.12); min-width: 120px; padding: 4px; z-index: 30; }
/* 隐形桥接区：盖住触发器与菜单之间的空隙，鼠标经过时 :hover 不中断（否则菜单一移就消失） */
.lang-menu::before { content: ''; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.lang-switch:hover .lang-menu { display: block; }
.lang-menu a { display: block; padding: 7px 12px; border-radius: 6px; }
.lang-menu a:hover { background: var(--accent-soft); }

/* banner（新样式见文件尾「首页宣传站布局」段） */

/* notice ticker */
.notice-ticker { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; margin-bottom: 16px; overflow: hidden; }
.notice-tag { background: var(--accent); color: #fff; border-radius: 4px; padding: 2px 8px; font-size: 12px; flex-shrink: 0; }
.notice-list { display: flex; gap: 24px; overflow: hidden; white-space: nowrap; }
.notice-list a { color: var(--muted); }
.notice-list a:hover { color: var(--accent); }

/* sections */
.section { margin: 20px 0 28px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.section-head h2 { font-size: 15px; margin: 0; display: flex; align-items: center; gap: 8px; }
.section-head h2 small { color: var(--muted); font-weight: 500; }
.more { color: var(--accent); font-size: 13px; }
.live-dot { width: 8px; height: 8px; background: var(--live); border-radius: 50%; display: inline-block; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.empty { color: var(--muted); text-align: center; padding: 24px; border: 1px dashed var(--line); border-radius: var(--radius); }

/* league blocks */
.league-block { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden; }
.league-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #f7f9fc; border-bottom: 1px solid var(--line); }
.lg-logo { width: 18px; height: 18px; object-fit: contain; }
.lg-name { font-weight: 700; color: var(--text); }
.lg-name:hover { color: var(--accent); }

/* match table */
.match-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.match-table th { font-weight: 500; color: var(--muted); text-align: center; padding: 6px 4px; border-bottom: 1px solid var(--line); font-size: 12px; }
.match-table td { padding: 7px 4px; text-align: center; border-bottom: 1px solid #f0f3f8; }
.match-table tr:last-child td { border-bottom: none; }
.match-table .c-home, .match-table .c-away { text-align: left; width: 22%; }
.match-table .c-home a:hover, .match-table .c-away a:hover { color: var(--accent); }
.match-table .c-score a { font-weight: 700; }
.match-table .c-half { color: var(--muted); }
.table-scroll { overflow-x: auto; }
.match-table { min-width: 720px; }
.match-table .c-time { width: 54px; color: var(--muted); font-variant-numeric: tabular-nums; }
.match-table .c-status { width: 68px; }
.match-table .c-score { width: 76px; }
.match-table .c-half { width: 46px; }
.match-table .c-odds { width: 46px; color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
.match-table .c-ah, .match-table .c-ou { width: 104px; }
.match-table .c-home, .match-table .c-away { width: auto; }
.ocell { display: grid; grid-template-columns: 38px 1fr 1fr; gap: 4px; align-items: center; }
.ocell .ln { font-size: 11px; color: var(--muted); font-weight: 500; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ocell .op { font-size: 12.5px; font-weight: 600; color: var(--accent); text-align: right; font-variant-numeric: tabular-nums; }
.ocell .op + .op { border-left: 1px solid var(--line); padding-left: 4px; }
.ndash { color: var(--muted); }
.match-table tbody tr:hover td { background: #f8fafc; }
tr.st-live td { background: #fff8f7; }
tr.st-live .c-status { color: var(--live); font-weight: 700; }
tr.st-finished .c-status { color: var(--muted); }

/* page head & tabs */
.page-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 16px 0 8px; }
.page-head h1 { font-size: 18px; margin: 0; }
.muted { color: var(--muted); }
.day-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.day-tab { padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--muted); }
.day-tab.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.tab-switch { display: flex; gap: 2px; border: 1px solid var(--line); border-radius: 6px; padding: 2px; }
.tab-switch a { padding: 4px 14px; border-radius: 4px; font-size: 13px; color: var(--muted); }
.tab-switch a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.date-note { color: var(--muted); font-size: 13px; margin: 4px 0 12px; }
.league-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; font-size: 13px; }
.chip:hover { border-color: var(--accent); color: var(--accent); }

/* match board */
.match-board { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 16px 0; text-align: center; }
.mb-league { color: var(--muted); font-size: 13px; }
.mb-league a:hover { color: var(--accent); }
.mb-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin: 18px 0; }
.mb-team { display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.mb-team img { width: 48px; height: 48px; object-fit: contain; }
.mb-score .big { font-size: 30px; font-weight: 800; display: block; }
.mb-score .muted { color: var(--muted); }
.mb-status { color: var(--live); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; }
.mb-ht, .mb-time { color: var(--muted); font-size: 12px; display: block; }
.mb-stats { display: flex; justify-content: center; gap: 24px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 12px; font-size: 13px; }

/* markets */
.market-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.market-row { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.mk-title { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 8px; }
.mk-line { color: var(--muted); font-weight: 500; }
.scope { background: var(--accent-soft); color: var(--accent); font-style: normal; border-radius: 4px; padding: 1px 6px; font-size: 11px; }
.mk-live { background: var(--live); color: #fff; font-style: normal; border-radius: 4px; padding: 1px 6px; font-size: 11px; }
.mk-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.mk-opt { flex: 1; min-width: 90px; background: #f7f9fc; border-radius: 6px; padding: 6px 10px; display: flex; justify-content: space-between; align-items: center; }
.opt-label { color: var(--muted); font-size: 12px; }
.opt-price { color: var(--accent); }
.back-link { color: var(--accent); }

/* news */
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.news-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: block; transition: box-shadow .15s; }
.news-card:hover { box-shadow: 0 6px 20px rgba(20,30,50,.08); }
.nc-cover { width: 100%; height: 140px; object-fit: cover; display: block; }
.nc-body { padding: 12px 14px; }
.nc-body h3 { margin: 0 0 6px; font-size: 14px; line-height: 1.4; }
.nc-body time { color: var(--muted); font-size: 12px; }
.article-detail { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; margin: 16px 0; }
.article-detail h1 { margin: 0 0 8px; }
.pub-time { color: var(--muted); font-size: 13px; display: block; margin-bottom: 16px; }
.ad-cover { max-width: 100%; border-radius: var(--radius); margin-bottom: 16px; }
.ad-content { line-height: 1.8; }
.ad-content img { max-width: 100%; }

/* notices */
.notice-list-page { list-style: none; margin: 12px 0; padding: 0; }
.notice-list-page li { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 10px; }
.notice-list-page li.important { border-left: 3px solid var(--live); }
.nl-title { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.nl-badge { background: var(--live); color: #fff; border-radius: 4px; width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.nl-content { color: var(--text); line-height: 1.7; }
.notice-list-page time { color: var(--muted); font-size: 12px; }
.pager-nav { display: flex; gap: 12px; justify-content: center; align-items: center; margin: 16px 0; color: var(--muted); }
.pager-nav a { color: var(--accent); }

/* footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 20px 0 30px; color: var(--muted); font-size: 13px; }
.foot-links { display: flex; gap: 18px; margin-bottom: 8px; }
.foot-links a:hover { color: var(--accent); }

/* responsive */
@media (max-width: 900px) {
  .main-nav { display: none; }
  .search-form input { width: 130px; }
  .market-list { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .match-table .c-ah, .match-table .c-ou { display: none; }
}

/* ---------- 首页宣传站布局 ---------- */
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; margin-top: 16px; }
.home-main .section:first-child { margin-top: 0; }

/* 轮播升级：定高 + 圆点 */
.banner-carousel { position: relative; height: 300px; min-height: 0; margin-top: 16px; }
.banner-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .5s; pointer-events: none; }
.banner-slide.on { opacity: 1; pointer-events: auto; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; }
.banner-dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 5; }
.banner-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.55); cursor: pointer; transition: background .2s, width .2s; }
.banner-dots i.on { background: #fff; width: 22px; border-radius: 4px; }

/* 侧栏卡片 */
.side-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; }
.side-head { padding: 10px 14px; font-weight: 700; font-size: 14px; border-bottom: 1px solid var(--line); background: #f7f9fc; }
.side-list { list-style: none; margin: 0; padding: 0 6px; }
.side-list li a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 8px; border-bottom: 1px dashed var(--line); color: var(--text); font-size: 13px; }
.side-list li:last-child a { border-bottom: none; }
.side-list li a:hover { color: var(--accent); }
.side-list li a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-list li a em { font-style: normal; color: var(--muted); font-size: 12px; flex-shrink: 0; }
.side-foot { padding: 8px 14px; text-align: center; border-top: 1px solid var(--line); }
.side-foot a { color: var(--accent); font-size: 13px; }
.ad-card { padding: 10px; }
.ad-card img { width: 100%; border-radius: 6px; display: block; margin-bottom: 8px; }
.ad-card img:last-child { margin-bottom: 0; }
.ad-html img { max-width: 100%; }

/* 新闻区 */
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.news-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; transition: box-shadow .15s, transform .15s; }
.news-card:hover { box-shadow: 0 6px 20px rgba(20,30,50,.08); transform: translateY(-2px); }
.news-cover { aspect-ratio: 16 / 9; background: var(--accent-soft); }
.news-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-cover-ph { height: 100%; display: flex; align-items: center; justify-content: center; color: var(--accent); font-weight: 800; font-size: 22px; letter-spacing: -.5px; opacity: .5; }
.news-body { padding: 12px 14px 14px; }
.news-body h3 { margin: 0 0 6px; font-size: 15px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-card:hover .news-body h3 { color: var(--accent); }
.news-body p { margin: 0 0 8px; color: var(--muted); font-size: 13px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-body time { color: var(--muted); font-size: 12px; }

/* 页脚 */
.site-footer { border-top: 1px solid var(--line); background: #f7f9fc; margin-top: 32px; padding: 28px 0 20px; }
.foot-cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.foot-col b { display: block; margin-bottom: 8px; font-size: 14px; }
.foot-col p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.foot-col a { display: block; padding: 3px 0; color: var(--muted); font-size: 13px; }
.foot-col a:hover { color: var(--accent); }
.foot-note { display: flex; gap: 16px; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

/* 响应式 */
@media (max-width: 960px) {
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .home-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .side-card { margin-bottom: 0; }
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-cols { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 640px) {
  .home-side { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .banner-carousel { height: 180px; }
  .search-form input { width: 120px; }
}
.home-side { position: sticky; top: 72px; }
@media (max-width: 960px) { .home-side { position: static; } }
.banner-slide img { object-position: left center; }
.pager-nav { display: flex; justify-content: center; align-items: center; gap: 16px; margin: 28px 0; color: var(--muted); font-size: 13px; }
.pager-nav a { padding: 6px 14px; border: 1px solid var(--line); border-radius: 6px; color: var(--text); }
.pager-nav a:hover { border-color: var(--accent); color: var(--accent); }
