/* =========================================================
   比赛详情页 (足球 & 篮球通用) 样式表 - 终极专业高转化版
   ========================================================= */

.portal-match-wrap { width: 100%; font-family: -apple-system, BlinkMacSystemFont, "Microsoft YaHei", sans-serif; background-color: #f5f6f7; padding-bottom: 40px; }
.portal-match-wrap * { box-sizing: border-box; margin: 0; padding: 0; }
.portal-inner { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* 🌟 顶部英雄看板 */
.hero-board { width: 100%; background-color: var(--theme-color); background-image: url('/wp-content/uploads/images/match_bg.png'); background-position: center; background-repeat: no-repeat; background-size: cover; padding: 40px 0; margin-bottom: 20px; position: relative; }
h1.hero-meta { text-align: center; color: rgba(255,255,255,0.9); font-size: 16px; font-weight: bold; margin-bottom: 30px; letter-spacing: 0.5px;}
.hero-vs-zone { display: flex; justify-content: center; align-items: center; max-width: 800px; margin: 0 auto; }
.hero-team { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; }
.hero-logo-box { width: 110px; height: 110px; background: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 15px rgba(0,0,0,0.15); margin-bottom: 15px; padding: 18px; border: 4px solid rgba(255,255,255,0.8);}
.hero-logo-box img { width: 100%; height: 100%; object-fit: contain; }
.hero-team-name { color: #fff; font-size: 22px; font-weight: bold; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;}
.hero-team a { text-decoration: none; display: flex; flex-direction: column; align-items: center; max-width: 100%;}
.hero-score-zone { flex: 0 0 250px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.hero-score-row { display: flex; align-items: center; justify-content: center; gap: 15px; margin-bottom: 12px; }
.hero-score-num { font-size: 65px; font-weight: 900; color: #fff; line-height: 1; text-shadow: 2px 2px 4px rgba(0,0,0,0.2);}
.hero-colon { font-size: 40px; color: rgba(255,255,255,0.6); font-weight: bold; line-height: 1; padding-bottom: 10px;}
.hero-status-btn { background: #fff; color: var(--theme-color); padding: 6px 24px; border-radius: 20px; font-size: 14px; font-weight: bold; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.hero-status-live { background: #ffeb3b; color: #d32f2f; animation: pulse 2s infinite; }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }

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

/* 🌟 主干基础区块 */
.portal-section { background: #fff; border: 1px solid #e8e8e8; border-radius: 8px; margin-bottom: 20px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.02);}
h2.portal-sec-header { background: #fafafa; padding: 15px 20px; font-size: 16px; font-weight: bold; color: #333; border-bottom: 1px solid #eee; border-left: 4px solid var(--theme-color); margin: 0; }
.portal-sec-body { padding: 20px; }

/* 🌟 直播信号源高转化网格 (修复：更符合UI的主题色调) */
.live-source-section { border-color: var(--theme-color); box-shadow: 0 4px 15px rgba(0,0,0,0.03); }
.live-source-section h2.portal-sec-header { background: rgba(0,0,0,0.02); }
.live-btn-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; } 
.live-btn { 
    display: flex; align-items: center; justify-content: center; gap: 8px; 
    background: #fdfdfd; color: var(--theme-color); text-decoration: none; 
    padding: 12px 10px; border-radius: 6px; font-size: 15px; font-weight: bold; 
    transition: all 0.3s; border: 1.5px solid var(--theme-color); min-width: 0;
}
.live-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.live-btn i { font-size: 18px; flex-shrink: 0; }
.live-btn:hover { background: var(--theme-color); color: #fff; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

/* 🌟 历史数据表格 */
.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table, .bk-quarter-table { width: 100%; border-collapse: collapse; text-align: center; font-size: 14px; min-width: 300px;}
.data-table th, .bk-quarter-table th { background: #f9f9f9; color: #666; font-weight: normal; padding: 10px; border-bottom: 1px solid #eee; }
.data-table td, .bk-quarter-table td { padding: 12px 8px; border-bottom: 1px dashed #eee; color: #333; }
.td-team-h { text-align: right; width: 40%; font-weight: 500;}
.td-team-a { text-align: left; width: 40%; font-weight: 500;}
.td-score { font-weight: bold; color: var(--theme-color); font-size: 15px; width: 20%; background: rgba(0,0,0,0.02); }
.bk-quarter-table th { background: #fff4f0; color: #d84b1b; font-weight: bold; min-width: 50px;}
.bk-quarter-table .td-team-name { text-align: left; font-weight: bold; color: #222; font-size: 15px; min-width: 100px;}

/* 🌟 文章讲解 */
.article-content { font-size: 15px; line-height: 1.8; color: #444; }
.article-content p { margin-bottom: 15px; }

/* 🌟 TAG 标签云 (主内容区底部) */
.tag-wrap { display: block; padding: 20px; background: #fff; border: 1px solid #e8e8e8; border-radius: 8px; margin-bottom: 20px; }
.tag-title { display: block; width: 100%; font-size: 15px; font-weight: bold; color: #333; margin-bottom: 15px; }
.tag-links { display: flex; flex-wrap: wrap; gap: 10px; }
/* 绝对防换行 */
.tag-links a { display: inline-block; background: #f0f2f5; color: #555; padding: 6px 14px; border-radius: 4px; text-decoration: none; font-size: 13px; transition: 0.2s; white-space: nowrap; border: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis;}
.tag-links a:hover { background: var(--theme-color); color: #fff; }

/* 🌟 相关赛事列表 */
.rel-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px dashed #eee; font-size: 14px; color: #333; text-decoration: none;}
.rel-row:last-child { border-bottom: none; }
.rel-time { width: 100px; color: #888; }
.rel-teams { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px;}
.rel-teams img { width: 22px; height: 22px; object-fit: contain; }
.rel-go { color: var(--theme-color); width: 70px; text-align: right; font-size: 13px;}

/* ================== 右侧边栏小组件 ================== */
.side-widget { background: #fff; border: 1px solid #e8e8e8; border-radius: 8px; margin-bottom: 20px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.02);}
.side-widget-hd { padding: 12px 18px; background: #fafafa; border-bottom: 1px solid #eee; font-size: 16px; font-weight: bold; border-left: 4px solid var(--theme-color); color: #333; display: flex; justify-content: space-between; align-items: center;}
.side-widget-hd a { font-size: 12px; font-weight: normal; color: #888; text-decoration: none; }
.side-widget-bd { padding: 15px; }

/* 球队资料名片 (完美支持数据展示) */
.mini-team-card { display: flex; flex-direction: column; padding: 15px; background: #fdfdfd; border: 1px solid #f0f0f0; border-radius: 6px; margin-bottom: 12px; transition: 0.2s; text-decoration: none; color: #333;}
.mini-team-card:hover { border-color: var(--theme-color); box-shadow: 0 4px 12px rgba(0,0,0,0.05); transform: translateY(-2px); }
.mini-team-card:last-child { margin-bottom: 0; }
.mtc-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.mtc-top img { width: 45px; height: 45px; object-fit: contain; flex-shrink: 0; background: #fff; border-radius: 50%; border: 1px solid #eee; padding: 2px;}
.mtc-name { font-size: 16px; font-weight: bold; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #222; }
.mtc-stats { background: rgba(0,0,0,0.03); padding: 8px 10px; border-radius: 4px; font-size: 12px; color: #555; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; line-height: 1.4;}
.mtc-stats .sep { color: #ccc; font-size: 10px; }
.mtc-stats strong { color: var(--theme-color); font-weight: bold;}

/* 图文列表 (新闻/录像) */
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px dashed #eee; display: flex; gap: 10px; align-items: flex-start;}
.side-list li:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.sl-img { width: 90px; height: 60px; border-radius: 4px; object-fit: cover; flex-shrink: 0; background: #f5f5f5;}
.sl-tit { font-size: 13px; color: #444; line-height: 1.5; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; transition: 0.2s;}
.sl-tit:hover { color: var(--theme-color); }

/* 侧边栏 TAG (不换行版) */
.side-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.side-tags a { display: inline-block; background: #f0f2f5; color: #555; padding: 5px 12px; font-size: 12px; border-radius: 4px; text-decoration: none; transition: 0.2s; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;}
.side-tags a:hover { background: var(--theme-color); color: #fff; }

/* 🌟 底部：热门比赛视频双排网格 */
.hub-bottom-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.hb-card { background: #fff; border: 1px solid #eee; border-radius: 6px; overflow: hidden; text-decoration: none; transition: 0.3s; display: flex; flex-direction: column;}
.hb-card:hover { border-color: var(--theme-color); box-shadow: 0 4px 12px rgba(0,0,0,0.08); transform: translateY(-3px);}
.hb-thumb { position: relative; width: 100%; aspect-ratio: 16/9; background: #000; overflow: hidden; }
.hb-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; transition: 0.4s; }
.hb-card:hover .hb-thumb img { opacity: 0.6; transform: scale(1.08); }
.hb-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border: 2px solid rgba(255,255,255,0.8); border-radius: 50%; display: flex; align-items: center; justify-content: center; z-index: 2; background: rgba(0,0,0,0.3);}
.hb-play::after { content: ''; border-left: 12px solid #fff; border-top: 8px solid transparent; border-bottom: 8px solid transparent; margin-left: 4px; }
.hb-tit { padding: 12px 10px; text-align: center; font-size: 13px; font-weight: bold; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ====================================================
   移动端极致自适应 (解决所有挤压、重叠问题)
   ==================================================== */
@media (max-width: 768px) {
    .portal-inner { padding: 0; }
    .hero-board { padding: 25px 15px; }
    h1.hero-meta { font-size: 12px; margin-bottom: 15px; }
    .hero-vs-zone { gap: 5px; }
    .hero-logo-box { width: 65px; height: 65px; padding: 10px; border-width: 2px; margin-bottom: 10px; }
    .hero-team-name { font-size: 14px; white-space: normal; line-height: 1.2; padding: 0 5px;}
    .hero-score-zone { flex: 0 0 100px; }
    .hero-score-row { gap: 8px; margin-bottom: 8px; }
    .hero-score-num { font-size: 38px; }
    .hero-colon { font-size: 26px; padding-bottom: 4px; }
    .hero-status-btn { padding: 4px 14px; font-size: 12px; }
    
    /* 模块全通栏 */
    .portal-section, .tag-wrap, .side-widget { border-left: none; border-right: none; border-radius: 0; margin-bottom: 10px; box-shadow: none; }
    h2.portal-sec-header, .side-widget-hd { font-size: 15px; padding: 12px 15px; }
    .portal-sec-body { padding: 15px; }
    .tag-wrap { padding: 15px; }
    
    /* 两栏改单栏下排 */
    .layout-grid { flex-direction: column; gap: 0; }
    .layout-main, .layout-side { width: 100%; }
    
    /* 直播源 1行2列防挤压 */
    .live-btn-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .live-btn { font-size: 13px; padding: 10px 5px; justify-content: center;}
    
    /* 侧边栏卡片适应 */
    .mtc-stats { justify-content: center; }
    .mtc-top { flex-direction: column; gap: 5px; text-align: center; }
    
    /* 表格压缩 */
    .data-table, .bk-quarter-table { font-size: 13px; }
    .data-table td, .bk-quarter-table td { padding: 10px 4px; }
    .td-team-h, .td-team-a { max-width: 90px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    
    /* 赛程列表压缩 */
    .rel-time { width: 70px; font-size: 12px; }
    .rel-teams { font-size: 13px; }
    .rel-teams span { max-width: 60px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-block; vertical-align: middle;}
    
    /* 底部模块变成双列 */
    .hub-bottom-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0;}
    .hb-tit { font-size: 12px; padding: 8px 5px; }
    .hb-play { width: 30px; height: 30px; }
    .hb-play::after { border-left-width: 8px; border-top-width: 5px; border-bottom-width: 5px; }
}