/* ==========================================================
   knxylqx · 曼城直播 仿站主题（ddmuban_17 / static17）
   深绿色主调 / 英雄区 / 筛选 / 赛程列表 / 右侧栏
   ========================================================== */
:root{
  --kx-green:#0f5132;
  --kx-green-2:#146c43;
  --kx-green-3:#1a8a5a;
  --kx-green-soft:#e8f3ed;
  --kx-page:#eef3f0;
  --kx-text:#22312a;
  --kx-muted:#71827a;
  --kx-line:#dfe9e3;
  --kx-white:#fff;
  --kx-red:#d9382c;
}
html,body{max-width:100%;overflow-x:hidden}
body{
  margin:0;background:var(--kx-page)!important;color:var(--kx-text);
  font-family:-apple-system,BlinkMacSystemFont,"Microsoft YaHei","Noto Sans SC",Arial,sans-serif;
  font-size:14px;line-height:1.5;-webkit-text-size-adjust:100%;text-size-adjust:100%;
}
img{max-width:100%;height:auto;vertical-align:middle}
ul,ol{margin:0;padding:0;list-style:none}
h1,h2,h3,h4{margin:0}
a{color:inherit;text-decoration:none}
.kx-wrap{width:min(100% - 24px,1200px);margin:0 auto}

/* ---------------- 顶栏 ---------------- */
.kx-topbar{background:#0b3d2e;color:#cfe6da;font-size:12px}
.kx-topbar .kx-wrap{display:flex;align-items:center;justify-content:space-between;min-height:30px;gap:12px}
.kx-topbar a{color:#cfe6da}
.kx-topbar .kx-top-links{display:flex;gap:16px}
.kx-header{background:#fff;border-bottom:1px solid var(--kx-line);position:relative;z-index:20}
.kx-header-row{display:flex;align-items:center;gap:18px;min-height:64px}
.kx-logo{flex:0 0 auto;max-width:230px;min-width:0}
.kx-logo a,.kx-logo h1{display:block;font-size:26px;line-height:64px;font-weight:900;color:var(--kx-green);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kx-logo h1{display:inline;margin:0}
.kx-nav{flex:1 1 auto;min-width:0}
.kx-nav ul{display:flex;align-items:center;justify-content:center;gap:4px}
.kx-nav a{display:flex;align-items:center;height:64px;padding:0 14px;font-size:15px;font-weight:500;color:#32443b;white-space:nowrap;position:relative}
.kx-nav a:hover,.kx-nav li.active a{color:var(--kx-green-2)}
.kx-nav li.active a::after{content:"";position:absolute;left:14px;right:14px;bottom:0;height:3px;background:var(--kx-green-2);border-radius:2px}
.kx-search{flex:0 0 auto;display:flex;align-items:center;gap:6px;color:#6b7d74;font-size:13px}
.kx-search-icon{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--kx-green-soft);color:var(--kx-green);font-size:14px}
.kx-toggle{display:none;width:38px;height:38px;border:0;background:transparent;flex-direction:column;align-items:center;justify-content:center;gap:5px;cursor:pointer}
.kx-toggle i{display:block;width:20px;height:2px;background:#233;border-radius:1px;transition:.2s}
.kx-toggle.is-open i:nth-child(1){transform:translateY(7px) rotate(45deg)}
.kx-toggle.is-open i:nth-child(2){opacity:0}
.kx-toggle.is-open i:nth-child(3){transform:translateY(-7px) rotate(-45deg)}

/* ---------------- 英雄区 ---------------- */
.kx-hero{padding:16px 0 0}
.kx-hero-card{
  position:relative;display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:22px;
  padding:24px 26px;border-radius:12px;color:#fff;overflow:hidden;
  background:linear-gradient(120deg,#0b3d2e 0%,#116148 55%,#1a7a55 100%);
}
.kx-hero-card::after{
  content:"";position:absolute;right:-80px;bottom:-120px;width:340px;height:340px;border-radius:50%;
  background:radial-gradient(circle,rgba(255,255,255,.12),rgba(255,255,255,0) 70%);
}
.kx-hero-main{position:relative;z-index:1;min-width:0}
.kx-hero-title{font-size:30px;font-weight:900;letter-spacing:1px}
.kx-hero-desc{margin:10px 0 0;max-width:560px;color:#d7ece2;font-size:13px;line-height:1.8}
.kx-hero-stats{display:flex;gap:38px;margin-top:20px}
.kx-stat b{display:block;font-size:26px;font-weight:900;line-height:1.2}
.kx-stat span{display:block;margin-top:2px;font-size:12px;color:#bfe0d1}
.kx-hero-match{
  position:relative;z-index:1;background:rgba(255,255,255,.10);border:1px solid rgba(255,255,255,.18);
  border-radius:10px;padding:14px 16px;min-width:0;
}
.kx-hm-top{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px;color:#cfe6da}
.kx-hm-pill{background:rgba(255,255,255,.16);border-radius:3px;padding:2px 8px;color:#fff}
.kx-hm-teams{display:grid;grid-template-columns:minmax(0,1fr) 46px minmax(0,1fr);align-items:center;gap:6px;margin-top:12px}
.kx-hm-team{display:flex;flex-direction:column;align-items:center;gap:6px;min-width:0;text-align:center;font-size:13px;font-weight:600}
.kx-hm-team span{max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kx-hm-team img{width:44px;height:44px;object-fit:contain}
.kx-hm-vs{font-size:15px;font-weight:800;text-align:center;color:#eafff5}
.kx-hm-btn{display:flex;align-items:center;justify-content:center;gap:6px;margin-top:12px;min-height:36px;border-radius:6px;background:#fff;color:var(--kx-green);font-size:13px;font-weight:700}
.kx-hm-btn:hover{background:#eafaf2}

/* ---------------- 筛选 ---------------- */
.kx-filter{margin-top:14px;background:#fff;border:1px solid var(--kx-line);border-radius:10px;padding:12px 14px}
.kx-filter-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.kx-filter-row + .kx-filter-row{margin-top:10px}
.kx-filter select,.kx-filter input{
  height:36px;border:1px solid #cfdcd5;border-radius:6px;padding:0 10px;background:#fff;color:#33463c;font-size:13px;outline:none;min-width:0;
}
.kx-filter select:focus,.kx-filter input:focus{border-color:var(--kx-green-3)}
.kx-filter input{flex:1 1 180px;min-width:120px}
.kx-filter-btn{height:36px;padding:0 18px;border:0;border-radius:6px;background:var(--kx-green-2);color:#fff;font-size:13px;font-weight:700;cursor:pointer}
.kx-filter-btn:hover{background:var(--kx-green)}
.kx-filter-label{font-size:13px;color:var(--kx-muted);flex:0 0 auto}

/* ---------------- 主体 ---------------- */
.kx-main{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:14px;align-items:start;padding:14px 0 0}
.kx-content{min-width:0;display:flex;flex-direction:column;gap:14px}
.kx-card{background:#fff;border:1px solid var(--kx-line);border-radius:10px;overflow:hidden}
.kx-card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 16px;border-bottom:1px solid #eef4f1}
.kx-card-head h2,.kx-card-head h3{position:relative;padding-left:11px;font-size:17px;font-weight:800;color:#1f3329}
.kx-card-head h2::before,.kx-card-head h3::before{content:"";position:absolute;left:0;top:50%;transform:translateY(-50%);width:4px;height:16px;border-radius:2px;background:var(--kx-green-2)}
.kx-card-head .kx-more{font-size:12px;color:var(--kx-muted)}
.kx-card-head .kx-tabs{display:flex;gap:14px;font-size:13px;color:var(--kx-muted)}
.kx-card-head .kx-tabs .on{color:var(--kx-green-2);font-weight:700}

/* 日期头 */
.kx-date{display:flex;align-items:center;gap:8px;padding:9px 16px;background:var(--kx-green-soft);color:var(--kx-green);font-size:14px;font-weight:700}
.kx-date::before{content:"";width:4px;height:14px;border-radius:2px;background:var(--kx-green-2)}

/* 比赛行 */
.kx-row{display:grid;grid-template-columns:76px 66px 70px minmax(0,1fr) 140px;align-items:center;gap:10px;padding:10px 16px;border-bottom:1px solid #eff5f1;background:#fff;cursor:pointer}
.kx-row:last-child{border-bottom:0}
.kx-row:hover{background:#f7fbf9}
.kx-row-time{font-size:13px;color:#42564b;font-weight:600;line-height:1.3}
.kx-row-time span{display:block;color:#98a8a0;font-size:11px;font-weight:400}
.kx-row-status{font-size:12px;color:var(--kx-muted);white-space:nowrap}
.kx-row-status.live{color:var(--kx-red);font-weight:700}
.kx-row-league{display:inline-flex;align-items:center;justify-content:center;min-height:26px;padding:0 8px;border-radius:4px;background:var(--kx-green-soft);color:var(--kx-green);font-size:12px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;justify-self:start;max-width:100%}
.kx-row-teams{display:flex;align-items:center;gap:10px;min-width:0}
.kx-team{display:flex;align-items:center;gap:8px;flex:1 1 0;min-width:0;font-size:14px;font-weight:600;color:#24382d}
.kx-team.home{justify-content:flex-end;text-align:right}
.kx-team.away{justify-content:flex-start}
.kx-team span{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kx-team img{width:28px;height:28px;object-fit:contain;flex:0 0 28px}
.kx-vs{flex:0 0 auto;font-size:12px;font-weight:800;color:#9fb0a7}
.kx-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px}
.kx-btn{display:inline-flex;align-items:center;justify-content:center;min-height:28px;padding:0 10px;border-radius:4px;font-size:12px;font-weight:600;white-space:nowrap;border:1px solid #cfe0d7;color:#3d5a4c;background:#fff}
.kx-btn:hover{border-color:var(--kx-green-3);color:var(--kx-green-2)}
.kx-btn.primary{background:var(--kx-green-2);border-color:var(--kx-green-2);color:#fff}
.kx-btn.primary:hover{background:var(--kx-green)}
.kx-btn.on{background:var(--kx-green-soft);border-color:#b9d8c8;color:var(--kx-green)}

/* 空状态 */
.kx-empty{padding:30px 16px;text-align:center;color:#95a69d;font-size:13px}

/* ---------------- 右侧栏 ---------------- */
.kx-side{min-width:0;display:flex;flex-direction:column;gap:14px}
.kx-side .kx-card{padding-bottom:6px}
.kx-news{padding:6px 14px 10px}
.kx-news a{display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px dashed #edf3ef;font-size:13px;color:#385045}
.kx-news a:last-child{border-bottom:0}
.kx-news a:hover{color:var(--kx-green-2)}
.kx-news .t{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kx-news .d{flex:0 0 auto;color:#a3b2aa;font-size:11px}
.kx-leagues{padding:10px 14px 12px;display:flex;flex-wrap:wrap;gap:8px}
.kx-leagues a{display:inline-block;padding:4px 10px;border-radius:3px;background:var(--kx-green-soft);color:var(--kx-green);font-size:12px;white-space:nowrap}
.kx-leagues a:hover{background:#d5ebe0}
.kx-media{padding:8px 14px 12px}
.kx-media a{display:flex;align-items:center;gap:8px;padding:7px 0;border-bottom:1px dashed #edf3ef;font-size:12px;color:#40564a}
.kx-media a:last-child{border-bottom:0}
.kx-media .t{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kx-tag{flex:0 0 auto;padding:1px 5px;border-radius:2px;background:#e7f2ec;color:var(--kx-green);font-size:10px}
.kx-tag.lx{background:#fdf0e8;color:#b4541f}

/* ---------------- SEO ---------------- */
.kx-seo{margin-top:14px;background:#fff;border:1px solid var(--kx-line);border-radius:10px;padding:18px 20px}
.kx-seo h2{font-size:18px;font-weight:800;color:#1f3329;margin-bottom:8px}
.kx-seo h3{font-size:15px;font-weight:700;color:#2b4437;margin:14px 0 6px}
.kx-seo p{margin:0 0 8px;color:#61756a;font-size:13px;line-height:1.9;word-break:break-word;overflow-wrap:anywhere}

/* ---------------- 页脚 ---------------- */
.kx-footer{margin-top:16px;background:#0b3d2e;color:#cfe6da;font-size:12px;line-height:1.9}
.kx-footer .kx-wrap{padding:22px 0 26px}
.kx-footer a{color:#cfe6da}
.kx-footer a:hover{color:#fff}
.kx-foot-links{display:flex;flex-wrap:wrap;gap:8px 16px;margin-bottom:10px}
.kx-foot-bottom{border-top:1px solid rgba(255,255,255,.12);padding-top:10px;margin-top:10px;color:#a9c9ba}

/* ---------------- 手机端 ---------------- */
@media screen and (max-width:1000px){
  .kx-main{grid-template-columns:1fr}
  .kx-side{display:grid;grid-template-columns:1fr 1fr;gap:12px}
}
@media screen and (max-width:768px){
  .kx-wrap{width:calc(100% - 16px)}
  .kx-topbar{display:none}
  .kx-header-row{min-height:54px;position:relative;display:block;padding:0 8px}
  .kx-logo{max-width:calc(100% - 96px);margin:0 auto;text-align:center}
  .kx-logo a,.kx-logo h1{font-size:21px;line-height:54px}
  .kx-toggle{display:flex;position:absolute;right:8px;top:8px;z-index:30}
  .kx-search{position:absolute;right:50px;top:12px}
  .kx-search .txt{display:none}
  .kx-nav{display:none;width:calc(100% + 16px);margin:0 -8px}
  .kx-nav.open{display:block}
  .kx-nav ul{flex-wrap:wrap;background:#fff;border-top:1px solid var(--kx-line)}
  .kx-nav li{flex:0 0 33.333%;justify-content:center;border-bottom:1px solid #f1f6f3}
  .kx-nav li.active{border-bottom-color:var(--kx-green-2)}
  .kx-nav a{height:auto;padding:11px 4px;font-size:14px}
  .kx-nav li.active a::after{display:none}

  .kx-hero{padding:10px 0 0}
  .kx-hero-card{grid-template-columns:1fr;padding:16px;gap:14px;border-radius:10px}
  .kx-hero-title{font-size:22px}
  .kx-hero-desc{font-size:12px;line-height:1.7}
  .kx-hero-stats{gap:24px;margin-top:12px}
  .kx-stat b{font-size:20px}
  .kx-hero-match{padding:12px}

  .kx-filter{padding:10px;margin-top:10px}
  .kx-filter-row{gap:8px}
  .kx-filter select{flex:1 1 42%;min-width:0}
  .kx-filter input{flex:1 1 100%}
  .kx-filter-btn{flex:1 1 100%}

  .kx-main{padding:10px 0 0}
  .kx-card-head{padding:10px 12px}
  .kx-card-head h2,.kx-card-head h3{font-size:16px}
  .kx-date{padding:8px 12px;font-size:13px}
  .kx-row{
    grid-template-columns:auto auto minmax(0,1fr);
    grid-template-areas:
      "time status league"
      "teams teams teams"
      "actions actions actions";
    gap:6px 8px;padding:10px 12px;
  }
  .kx-row-time{grid-area:time}
  .kx-row-status{grid-area:status}
  .kx-row-league{grid-area:league;justify-self:end}
  .kx-row-teams{grid-area:teams;margin-top:2px}
  .kx-team{font-size:13px}
  .kx-team img{width:22px;height:22px;flex-basis:22px}
  .kx-actions{grid-area:actions;justify-content:flex-start;margin-top:4px}
  .kx-btn{min-height:26px;padding:0 9px;font-size:11px}

  .kx-side{grid-template-columns:1fr}
  .kx-seo{padding:14px}
  .kx-seo h2{font-size:16px}
  .kx-footer .kx-wrap{padding:16px 0 20px}
}
@media screen and (max-width:390px){
  .kx-logo a,.kx-logo h1{font-size:19px}
  .kx-nav li{flex-basis:50%}
  .kx-team{font-size:12px}
}

/* v1 fix: live source buttons */
#stream-sources-mount a,#stream-sources-mount button,#stream-sources-mount span,.stream-sources__row a{color:#333!important;background:#f7f7f7!important;border:1px solid #ddd!important;border-radius:4px!important;padding:6px 14px!important;margin:0 8px 8px 0!important;min-height:34px;display:inline-flex!important;align-items:center;justify-content:center;font-size:14px!important;line-height:1.4;text-decoration:none!important;opacity:1!important}
#stream-sources-mount a:hover,#stream-sources-mount a.on,#stream-sources-mount a.active,#stream-sources-mount button:hover,.stream-sources__row a:hover{color:#fff!important;background:#333!important;border-color:#333!important}