/* =========================================================
   联赛聚合页 (足球 & 篮球通用) 样式表 - 终极修复版
   ========================================================= */

/* 全站统一紫调配色 */
:root { 
    --main-color: #8C6BE7; 
    --main-hover: #7b58d6; 
    --bg-light: #f5f6f7; 
    --border-color: #e8e8e8;
}
.portal-league-wrap { background: var(--bg-light); padding: 20px 0 40px; font-family: -apple-system, "Microsoft YaHei", sans-serif; }
.portal-inner { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* 联赛头部区 */
.league-header { background: #fff; border-top: 4px solid var(--main-color); padding: 20px 25px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); border-radius: 0 0 6px 6px;}
.league-title-box { display: flex; align-items: center; gap: 15px; }
.league-title-box h1 { font-size: 24px; font-weight: bold; margin: 0; color: #222; }
.league-top-logo { height: 45px; object-fit: contain; }
.league-nav-links a { display: inline-block; padding: 8px 18px; background: #f4f5f7; color: #555; text-decoration: none; border-radius: 4px; margin-left: 10px; font-size: 14px; font-weight: 500; transition: 0.2s;}
.league-nav-links a:hover, .league-nav-links a.active { background: var(--main-color); color: #fff; }

/* 左右布局 */
.layout-grid { display: flex; gap: 20px; align-items: flex-start; }
.layout-main { flex: 1; min-width: 0; }
.layout-side { width: 320px; flex-shrink: 0; }

/* 模块通用框 */
.mod-box { background: #fff; margin-bottom: 20px; border: 1px solid var(--border-color); border-radius: 6px; overflow: hidden; }
.mod-hd { padding: 15px 20px; background: #fafafa; border-bottom: 1px solid #f0f0f0; border-left: 4px solid var(--main-color); font-size: 16px; font-weight: bold; display: flex; justify-content: space-between; align-items: center;}
.mod-hd a { font-size: 13px; color: #888; font-weight: normal; text-decoration: none; transition: 0.2s;}
.mod-hd a:hover { color: var(--main-color); }

/* ====================================
   赛事列表 UI：PC端 
   ==================================== */
.match-row { display: flex; align-items: center; padding: 12px 15px; border-bottom: 1px solid #f0f0f0; background: #fff; text-decoration: none; color: #333; font-size: 13px; transition: background 0.2s; }
.match-row:hover { background-color: #f9f9fa; }
.match-row:last-child { border-bottom: none; }

.m-status-box { width: 60px; flex-shrink: 0; text-align: center; margin-right: 10px; }
.m-badge { display: inline-block; padding: 3px 6px; border-radius: 3px; font-size: 12px; color: #fff; }
.m-badge.ns { background-color: #e6403c; } 
.m-badge.live { background-color: #ff9800; animation: blink 1.5s infinite;}
.m-badge.ft { background-color: #999; }
.mob-status { display: none; } 

/* 核心修复：PC端时间并排显示 (图 030922 修复) */
.m-time { width: 100px; text-align: center; flex-shrink: 0; display: flex; align-items: center; justify-content: center; gap: 4px;}
.m-time .t-md { color: #888; font-size: 12px; display: inline-block;}
.m-time .t-hi { color: #333; font-family: Arial, sans-serif; font-weight: bold; display: inline-block;}

.m-team { flex: 1; display: flex; align-items: center; min-width: 0; font-size: 14px; font-weight: bold; color:#333; }
.m-team.h { justify-content: flex-end; text-align: right; }
.m-team.a { justify-content: flex-start; text-align: left; }
.m-team-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.m-logo { width: 26px; height: 26px; object-fit: contain; margin: 0 10px; }

.m-score { width: 90px; text-align: center; font-weight: bold; font-size: 16px; color: #333; flex-shrink: 0; font-family: Tahoma, sans-serif;}
.m-score.is-live { color: #e6403c; }

.m-links { width: 170px; font-size: 12px; text-align: right; flex-shrink: 0; display: flex; flex-direction: column; gap: 6px; line-height: 1.2; justify-content: center; margin-left:15px;}
.m-link-row1 { font-weight: bold; color: #333; font-size: 13px;}
.m-link-row1 i { color: var(--main-color); margin-right: 4px;}
.m-link-row2 { display: flex; justify-content: flex-end; align-items: center; gap: 6px;}

.dynamic-src { color: var(--main-color); border: 1px solid var(--main-color); padding: 2px 6px; border-radius: 3px; text-decoration: none; font-size: 11px; transition: 0.2s;}
.dynamic-src:hover { background: var(--main-color); color: #fff; }
.src-divider { color: #ddd; font-size: 11px; }

@keyframes blink { 50% { opacity: 0.6; } }

/* ====================================
   其他模块 (球队/新闻/录像)
   ==================================== */
.team-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 15px; padding: 25px 20px; }
.team-card { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: #444; padding: 15px 10px; border: 1px solid transparent; border-radius: 8px; transition: all 0.3s ease;}
.team-card:hover { background: #fff; border-color: var(--border-color); box-shadow: 0 5px 15px rgba(140, 107, 231, 0.1); transform: translateY(-3px);}
.team-card img { width: 60px; height: 60px; object-fit: contain; margin-bottom: 12px;}
.team-card span { display: block; font-size: 13px; font-weight: 500; text-align: center; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.news-list { list-style: none; padding: 15px 20px; margin: 0; }
.news-list li { margin-bottom: 15px; padding-left: 15px; position: relative; line-height: 1.5; font-size: 14px;}
.news-list li::before { content: ''; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; background: #ccc; border-radius: 50%; transition: 0.3s;}
.news-list a { color: #444; text-decoration: none; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
.news-list li:hover::before { background: var(--main-color); }
.news-list a:hover { color: var(--main-color); }
.video-list li::before { border-radius: 0; background: transparent; border-left: 6px solid #ccc; border-top: 4px solid transparent; border-bottom: 4px solid transparent; top: 6px; height: 0; width: 0;}
.video-list li:hover::before { border-left-color: var(--main-color); background: transparent;}
.btn-full-standings { display: block; padding: 12px; background: var(--main-color); color: #fff; border-radius: 4px; text-decoration: none; font-weight: bold; text-align: center; transition: 0.2s;}
.btn-full-standings:hover { background: var(--main-hover); color: #fff;}

/* ====================================
   移动端强效防重叠适配
   ==================================== */
@media (max-width: 768px) {
    .portal-inner { padding: 0; }
    .league-header { flex-direction: column; gap: 15px; border-radius: 0; padding: 15px;}
    .league-title-box h1 { font-size: 20px; }
    .league-top-logo { height: 35px; }
    .league-nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
    .league-nav-links a { margin: 0; padding: 6px 12px;}
    .layout-grid { flex-direction: column; gap: 10px;}
    .layout-side { width: 100%; }
    .mod-box { border-radius: 0; border-left: none; border-right: none; margin-bottom: 10px;}
    
    /* 移动端赛程：严格防止换行，释放空间给球队名 */
    .match-row { padding: 12px 10px; flex-wrap: nowrap !important; justify-content: space-between; gap: 4px; }
    
    .m-status-box { width: 34px; margin-right: 0; flex-shrink: 0;}
    .m-badge { padding: 3px 0; font-size: 10px; width: 100%; text-align: center; border-radius: 2px; font-weight: bold; letter-spacing: 0;}
    .pc-status { display: none; } 
    .mob-status { display: block; }
    
    /* 时间变成上下两行 */
    .m-time { width: 38px; flex-shrink: 0; text-align: center; display: flex; flex-direction: column; justify-content: center; gap: 0; line-height: 1.3; margin-right: 0;}
    .m-time .t-md { display: block; color: #999; font-size: 10px; margin-right: 0;}
    .m-time .t-hi { display: block; color: #333; font-size: 12px; font-weight: bold; }
    
    .m-team { flex: 1; gap: 4px; font-size: 13px; min-width: 0;}
    .m-team-name { max-width: 75px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: normal; display: block; }
    .m-logo { width: 18px !important; height: 18px !important; margin: 0 !important; flex-shrink: 0;}
    
    .m-score { width: 45px; font-size: 14px; letter-spacing: 0; flex-shrink: 0; }
    
    .m-links { display: none !important; }
    
    /* 手机端球队变成3列 */
    .team-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 15px;}
    .team-card img { width: 45px; height: 45px; margin-bottom: 8px;}
    .team-card span { font-size: 12px; }
}