﻿/* 设计稿的变量名（--bg/--ink/--red/--volt …）映射到主题令牌。
 * ⚠️ 必须挂在 body[data-theme] 上、不能写 :root —— --page-bg / --cs06-* 是在 body 上算出来的，
 * 写在 :root 里 var(--page-bg) 取不到，页头就会用兜底的 #080a0e，和内页真正的底色对不上。 */
body[data-theme]{
  --bg:var(--page-bg,#080a0e);
  --bg-2:var(--cs06-card-2,#0b0e14);
  --card:var(--cs06-card,#0e1219);
  --line:var(--cs06-line,rgba(255,255,255,.08));
  --line-2:var(--cs06-line-2,rgba(255,255,255,.16));
  --ink:var(--cs06-ink-title,#f2f5fa);
  --ink-2:var(--cs06-ink-2,#c3cad6);
  --muted:var(--cs06-muted,#8b94a4);
  --red:rgb(var(--cs06-hot-rgb,255 47 69));
  --volt:rgb(var(--accent-rgb,216 255 62));
  --disp:"Archivo","Noto Sans SC",system-ui,sans-serif;
}

/* 版心宽度：内页和首页统一 1240（2026-11-25 用户口径：内页菜单/内容要和首页一样宽） */
:root{--xj-wrap:1240px}
/* ---------- header ---------- */
/* 页头字体统一（用户口径 2026-11-25）：内页 body 被 app.css 预检重置成 Microsoft YaHei /
   行高 1.5，首页是 Noto Sans SC / 1.7 —— 菜单字重、联赛条字体、页头文字视觉高度全不一致，
   切换菜单跳变很明显。页头强制走首页同一套字体。 */
.site-head{
  font-family:"Noto Sans SC","Archivo",system-ui,-apple-system,"Segoe UI",sans-serif;
  line-height:1.7;
}
.site-head{
  position:sticky;top:0;z-index:50;
  background:color-mix(in srgb, var(--bg) 92%, transparent);
  border-bottom:1px solid var(--line);
  backdrop-filter:blur(14px);
  color:var(--ink);
}
.head-in{display:flex;align-items:center;gap:40px;height:76px}
.brand{display:flex;align-items:center;gap:12px;flex:none}
.brand img{width:40px;height:40px;object-fit:contain}
.brand b{font-family:var(--disp);font-weight:900;font-size:22px;letter-spacing:1px;line-height:1;color:var(--ink)}
.brand b em{font-style:normal;color:var(--red)}
/* 站名下的 LALIGA LIVE 小字已按用户口径去掉（2026-11-25），.brand small 不再有 */
.site-nav{display:flex;align-items:center;gap:30px;margin-left:8px}
.site-nav a{position:relative;font-size:14px;color:var(--ink-2);padding:6px 0;transition:color .2s}
.site-nav a:hover{color:var(--ink)}
.site-nav a.on{color:var(--ink);font-weight:700}
.site-nav a.on::after{content:"";position:absolute;left:0;right:0;bottom:-4px;height:2px;background:var(--red)}
.head-search{margin-left:auto;position:relative;display:flex;align-items:center}
.head-search svg{position:absolute;left:12px;width:14px;height:14px;color:var(--muted);pointer-events:none}
.head-search input{
  width:clamp(170px,17vw,250px);height:36px;
  border:1px solid var(--line-2);border-radius:99px;
  background:color-mix(in srgb, var(--ink) 5%, transparent);color:var(--ink);
  font:inherit;font-size:12.5px;padding:0 14px 0 34px;outline:none;transition:.2s;
}
.head-search input::placeholder{color:var(--muted)}
.head-search input:focus{border-color:color-mix(in srgb, var(--red) 55%, transparent);background:color-mix(in srgb, var(--ink) 8%, transparent)}
.head-search input::-webkit-search-cancel-button{-webkit-appearance:none}
.burger{display:none;margin-left:auto;width:40px;height:40px;border:1px solid var(--line);border-radius:10px;align-items:center;justify-content:center}
.burger span{display:block;width:16px;height:2px;background:var(--ink);position:relative}
.burger span::before,.burger span::after{content:"";position:absolute;left:0;width:16px;height:2px;background:var(--ink)}
.burger span::before{top:-5px}.burger span::after{top:5px}
.burger.is-open span{background:transparent}
.burger.is-open span::before{top:0;transform:rotate(45deg)}
.burger.is-open span::after{top:0;transform:rotate(-45deg)}

/* ---------- league bar ---------- */
.league-bar{border-top:1px solid var(--line)}
.league-bar-in{display:flex;align-items:center;gap:4px;height:38px;overflow-x:auto;scrollbar-width:none}
.league-bar-label{flex:none;font-size:11px;font-weight:700;color:var(--muted);letter-spacing:.5px;margin-right:2px}
.league-bar-in::-webkit-scrollbar{display:none}
.league-bar a{flex:none;font-size:12px;color:var(--ink-2);padding:5px 13px;border-radius:99px;letter-spacing:1px;transition:.2s}
.league-bar a:hover{color:var(--ink);background:color-mix(in srgb, var(--ink) 8%, transparent)}
.league-bar a.on{color:var(--ink);background:var(--red);font-weight:700}


/* ---------- footer ---------- */
.foot{border-top:1px solid var(--line);padding:26px 0 0;color:var(--ink)}
.foot-grid{display:flex;align-items:flex-end;justify-content:space-between;gap:16px 40px;flex-wrap:wrap;padding-bottom:22px}
.foot-brand{display:flex;align-items:center;gap:10px}
.foot-brand img{width:30px;height:30px}
.foot-brand b{font-family:var(--disp);font-size:16px;letter-spacing:.5px;color:var(--ink)}
.foot-desc{margin-top:10px;max-width:400px;font-size:12px;line-height:1.8;color:var(--muted)}
.foot-links-row{display:flex;align-items:center;flex-wrap:wrap;gap:10px 30px;font-size:12.5px;padding-bottom:2px}
.foot-links-row a{color:var(--muted);transition:color .2s;white-space:nowrap}
.foot-links-row a:hover{color:var(--ink)}
.fl-label{font-size:12.5px;color:var(--muted);white-space:nowrap}
.fl-label a{color:var(--muted)}
.foot-bar{border-top:1px solid var(--line);padding:13px 0 16px;display:flex;align-items:center;justify-content:space-between;gap:8px 24px;flex-wrap:wrap;font-size:11.5px;color:var(--muted)}
.foot-bar a{color:var(--muted);transition:color .2s}
.foot-bar a:hover{color:var(--ink)}
@media (max-width:900px){
  .foot-grid{flex-direction:column;align-items:flex-start;gap:14px;padding-bottom:18px}
}
@media (max-width:560px){
  .foot-bar{flex-direction:column;align-items:flex-start;gap:6px}
}


/* ---------- 页头 / 页脚宽度（不碰内页正文的 .wrap） ---------- */
.head-in,.league-bar-in,.foot-in{width:min(var(--xj-wrap),calc(100% - 64px));margin:0 auto}

.site-head{position:sticky;top:0;z-index:50}

/* 联赛条：当前联赛 */
.league-bar-in .on{color:var(--ink);background:var(--red);font-weight:700}

/* 回到顶部（原 epl-chrome.css 那份，跟着换令牌） */
.to-top{
  position:fixed;right:22px;bottom:26px;z-index:40;
  width:42px;height:42px;border-radius:50%;
  display:grid;place-items:center;
  border:1px solid var(--line-2);background:var(--card);color:var(--ink);
  box-shadow:0 8px 24px color-mix(in srgb,#000 28%,transparent);
  opacity:0;visibility:hidden;transform:translateY(8px);
  transition:opacity .2s,transform .2s,visibility .2s;
}
.to-top.on{opacity:1;visibility:visible;transform:none}
.to-top:hover{border-color:var(--red);color:var(--red)}

@media (max-width:900px){
  .head-in,.league-bar-in,.foot-in{width:calc(100% - 40px)}
  .foot-grid{flex-direction:column;align-items:flex-start;gap:14px;padding-bottom:18px}
}
@media (max-width:560px){
  .head-in,.league-bar-in,.foot-in{width:calc(100% - 32px)}
}

/* 内页正文版心：和页头同宽（1240），首页也是 1240 */

/* ---------- 9 个菜单项 + 搜索框：窄一点收一收，避免顶出容器 ---------- */
@media (max-width:1280px){
  .head-in{gap:24px}
  .site-nav{gap:20px}
  .head-search input{width:clamp(150px,14vw,210px)}
}
@media (max-width:1100px){
  .head-in{gap:16px}
  .site-nav{gap:14px}
  .site-nav a{font-size:13px}
  .head-search input{width:150px}
}

/* ---------- 内页版心 ----------
   原来这条是 epl-chrome.css 里的 .epl-chrome .wrap（max-width 1180 + 20 padding），
   换皮时漏掉了 —— 内页 <main class="wrap"> 就变成 100% 宽。这里补回来：
   · 内页：1240（和页头 .head-in、首页 .wrap 完全同宽）
   · 首页：包在 .xj-home-body 里，走 xj-home.css 的同一档 1240 */
body.xj-chrome:not(.xj-home-body) .wrap{width:min(var(--xj-wrap),calc(100% - 64px));margin:0 auto}
@media (max-width:900px){body.xj-chrome:not(.xj-home-body) .wrap{width:calc(100% - 40px)}}
@media (max-width:560px){body.xj-chrome:not(.xj-home-body) .wrap{width:calc(100% - 32px)}}

/* ---------- 移动端页头（≤900px：搜索框收起、菜单进汉堡抽屉） ---------- */
@media (max-width:900px){
  .head-in{height:66px;gap:16px}
  .head-search{display:none}
  .brand img{width:34px;height:34px}
  .brand b{font-size:19px}
  .site-nav{display:none}
  .burger{display:flex}
  .site-head{background:var(--bg)}
  .site-head .site-nav.open{
    /* 抽屉改固定定位、按视口通栏（用户口径 2026-11-25「两边占满」）：
       absolute 挂在头里时受祖先定位上下文影响，两边会露出页底色；
       fixed + --cs06-hd-h（layout_top 的脚本实时写头高，含联赛条）永远贴住页头下沿、左右顶满 */
    display:flex;flex-direction:column;align-items:flex-start;gap:0;
    margin-left:0; /* 桌面态 .site-nav 有 margin-left:8px（挨着站标的间距），抽屉通栏时必须清掉，不然左边多一条 */
    position:fixed;left:0;right:0;top:var(--cs06-hd-h,106px);
    background:var(--bg);border-bottom:1px solid var(--line);
    padding:6px 20px 18px;
    box-shadow:0 30px 60px color-mix(in srgb,#000 55%,transparent);
    max-height:calc(100dvh - var(--cs06-hd-h,106px));overflow:auto;
  }
  .site-head .site-nav.open a{width:100%;padding:15px 0;border-bottom:1px solid var(--line);font-size:15px;color:var(--ink-2)}
  .site-head .site-nav.open a:hover{color:var(--ink)}
  .site-head .site-nav.open a.on{color:var(--ink);font-weight:700}
  .site-head .site-nav.open a.on::after{display:none}
  .league-bar-in{height:40px}
}
