/*
Theme Name: 神马球讯 ShenmaBall
Theme URI: https://haotiyu.top
Author: HTY
Description: 神马搜索专用足球主题——移动优先，比分+资讯混合，API-Football v3 数据源，北京时间显示，全中文。
Version: 1.0.0
License: GPL-2.0+
Text Domain: shenmaball
*/

/* ============ 变量 ============ */
:root{
  --sm-bg:#0f141c;
  --sm-card:#161d28;
  --sm-line:#232c3a;
  --sm-txt:#e8edf4;
  --sm-sub:#8b97a8;
  --sm-accent:#00d18f;      /* 主色：草绿 */
  --sm-accent2:#ffb020;     /* 强调：金 */
  --sm-live:#ff4d4f;
  --sm-radius:10px;
  --sm-w:640px;             /* 移动优先内容宽 */
}

*{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%}
body{
  background:var(--sm-bg);color:var(--sm-txt);
  font:15px/1.6 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
  -webkit-font-smoothing:antialiased;
}
a{color:inherit;text-decoration:none}
img{max-width:100%;height:auto;display:block}

.sm-wrap{max-width:var(--sm-w);margin:0 auto;padding:0 12px}

/* ============ 头部（移动：logo 左，登录+汉堡 右）============ */
.sm-header{position:sticky;top:0;z-index:50;background:rgba(15,20,28,.96);
  backdrop-filter:saturate(1.2) blur(6px);border-bottom:1px solid var(--sm-line)}
.sm-header-in{max-width:var(--sm-w);margin:0 auto;height:52px;display:flex;
  align-items:center;justify-content:space-between;padding:0 12px}
.sm-logo{font-size:19px;font-weight:800;letter-spacing:.5px}
.sm-logo b{color:var(--sm-accent)}
.sm-header-right{display:flex;align-items:center;gap:10px}
.sm-btn-auth{font-size:13px;padding:6px 12px;border:1px solid var(--sm-accent);
  color:var(--sm-accent);border-radius:20px;line-height:1}
.sm-hamburger{width:26px;height:20px;position:relative;cursor:pointer;background:none;border:0}
.sm-hamburger span{position:absolute;left:0;width:100%;height:2px;background:var(--sm-txt);
  transition:.25s}
.sm-hamburger span:nth-child(1){top:0}
.sm-hamburger span:nth-child(2){top:9px}
.sm-hamburger span:nth-child(3){top:18px}
.sm-hamburger.on span:nth-child(1){top:9px;transform:rotate(45deg)}
.sm-hamburger.on span:nth-child(2){opacity:0}
.sm-hamburger.on span:nth-child(3){top:9px;transform:rotate(-45deg)}

/* 抽屉 */
.sm-drawer{position:fixed;inset:52px 0 0 auto;width:70%;max-width:280px;
  background:var(--sm-card);transform:translateX(100%);transition:.28s;z-index:49;
  border-left:1px solid var(--sm-line);overflow-y:auto}
.sm-drawer.on{transform:translateX(0)}
.sm-drawer a{display:block;padding:14px 18px;border-bottom:1px solid var(--sm-line);font-size:15px}
.sm-mask{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:48;opacity:0;
  visibility:hidden;transition:.28s}
.sm-mask.on{opacity:1;visibility:visible}

/* 顶部横向导航条 */
.sm-navstrip{background:var(--sm-card);border-bottom:1px solid var(--sm-line);
  overflow-x:auto;-webkit-overflow-scrolling:touch;white-space:nowrap;scrollbar-width:none}
.sm-navstrip::-webkit-scrollbar{display:none}
.sm-navstrip-in{max-width:var(--sm-w);margin:0 auto;display:inline-flex;padding:0 6px}
.sm-navstrip a{padding:11px 14px;font-size:14px;color:var(--sm-sub)}
.sm-navstrip a.on,.sm-navstrip a:active{color:var(--sm-accent)}

/* ============ 比分卡（首屏 hero）============ */
.sm-sec-title{display:flex;align-items:center;gap:8px;margin:16px 0 10px;font-size:16px;font-weight:700}
.sm-sec-title::before{content:"";width:4px;height:16px;background:var(--sm-accent);border-radius:2px}
.sm-sec-title .more{margin-left:auto;font-size:12px;color:var(--sm-sub);font-weight:400}

.sm-matches{display:flex;flex-direction:column;gap:8px}
.sm-match{background:var(--sm-card);border:1px solid var(--sm-line);border-radius:var(--sm-radius);
  padding:12px;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px}
.sm-match .team{display:flex;align-items:center;gap:8px;min-width:0}
.sm-match .team.away{flex-direction:row-reverse;text-align:right}
.sm-match .team img{width:24px;height:24px;border-radius:50%;background:#fff}
.sm-match .team span{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sm-match .mid{text-align:center;min-width:60px}
.sm-match .score{font-size:19px;font-weight:800}
.sm-match .status{font-size:11px;color:var(--sm-sub);margin-top:2px}
.sm-match .status.live{color:var(--sm-live);font-weight:700}
.sm-match .status.live::before{content:"●";margin-right:3px;animation:smblink 1.2s infinite}
@keyframes smblink{50%{opacity:.3}}
.sm-league-tag{grid-column:1/-1;font-size:11px;color:var(--sm-sub);
  border-top:1px dashed var(--sm-line);margin-top:8px;padding-top:6px}

/* ============ 资讯流 ============ */
.sm-news{display:flex;flex-direction:column;gap:10px}
.sm-news-item{background:var(--sm-card);border:1px solid var(--sm-line);border-radius:var(--sm-radius);
  overflow:hidden;display:flex;gap:10px;padding:10px}
.sm-news-item .thumb{flex:0 0 110px;height:74px;border-radius:6px;overflow:hidden;background:var(--sm-line)}
.sm-news-item .thumb img{width:100%;height:100%;object-fit:cover}
.sm-news-item .body{min-width:0;display:flex;flex-direction:column}
.sm-news-item h3{font-size:15px;font-weight:600;line-height:1.4;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.sm-news-item .meta{margin-top:auto;font-size:12px;color:var(--sm-sub);display:flex;gap:10px}

/* ============ 单篇 ============ */
.sm-article{background:var(--sm-card);border:1px solid var(--sm-line);
  border-radius:var(--sm-radius);padding:16px;margin-top:14px}
.sm-article h1{font-size:21px;line-height:1.4;margin-bottom:10px}
.sm-article .a-meta{font-size:12px;color:var(--sm-sub);margin-bottom:14px;
  padding-bottom:12px;border-bottom:1px solid var(--sm-line);display:flex;gap:12px;flex-wrap:wrap}
.sm-article .a-body{font-size:16px;line-height:1.85}
.sm-article .a-body p{margin:0 0 14px}
.sm-article .a-body img{border-radius:8px;margin:10px 0}
.sm-article .a-body h2{font-size:18px;margin:20px 0 10px}

/* ============ 底部广告条 ============ */
.sm-adbar{position:fixed;left:0;right:0;bottom:0;z-index:40;background:var(--sm-card);
  border-top:1px solid var(--sm-line);padding:8px 12px;display:flex;align-items:center;
  justify-content:center;gap:10px;transform:translateY(0);transition:.3s}
.sm-adbar.hide{transform:translateY(100%)}
.sm-adbar .ad-body{flex:1;text-align:center;font-size:13px;color:var(--sm-accent2);min-width:0;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sm-adbar .ad-close{background:none;border:0;color:var(--sm-sub);font-size:18px;line-height:1;cursor:pointer}

/* ============ 页脚 ============ */
.sm-footer{margin:20px 0 80px;padding:18px 0;border-top:1px solid var(--sm-line);
  text-align:center;font-size:12px;color:var(--sm-sub)}
.sm-footer a{color:var(--sm-sub);margin:0 6px}

.sm-pagination{display:flex;justify-content:center;gap:8px;margin:20px 0}
.sm-pagination a,.sm-pagination span{padding:7px 13px;border:1px solid var(--sm-line);
  border-radius:6px;font-size:14px;background:var(--sm-card)}
.sm-pagination .current{background:var(--sm-accent);color:#04110c;border-color:var(--sm-accent)}

/* ============ 桌面适配（保持移动优先，仅放宽）============ */
@media(min-width:720px){
  .sm-news-item .thumb{flex:0 0 160px;height:100px}
}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
