/* =========================================================
   积分榜 (足球 & 篮球通用) 样式表 - 移动端防挤压修复版
   ========================================================= */

/* 核心容器 */
.portal-table-container { background: #fff; padding: 20px; border: 1px solid #e5e5e5; border-top: 3px solid #d63638; margin-bottom: 40px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.02);}

/* 顶部联赛切换矩阵 */
.league-matrix-nav { background: #fff; border: 1px solid #eee; border-radius: 8px; padding: 15px; margin-bottom: 20px; }

/* 表格基础样式 */
.table-standings th { background-color: #f8f9fa; color: #666; font-weight: normal; font-size: 13px; text-align: center; border-bottom: 1px solid #ddd; padding: 12px 6px;}
.table-standings td { font-size: 14px; color: #333; text-align: center; vertical-align: middle; border-bottom: 1px dashed #eee; padding: 12px 6px;}
.table-standings tr:hover { background-color: #fcfcfc; }

/* 球队列对齐与样式 */
.td-team { text-align: left !important; font-weight: 500; }
.td-team a { color: #333; text-decoration: none; display: flex; align-items: center; gap: 10px; transition: 0.2s;}
.td-team a:hover { color: #d63638; }
.team-logo { width: 24px; height: 24px; object-fit: contain; flex-shrink: 0;}

/* 排名方块默认灰色 */
.rank-box { display: inline-block; width: 22px; height: 22px; line-height: 22px; border-radius: 3px; font-size: 12px; font-weight: bold; background: #e5e5e5; color: #666; text-align: center; }

/* 排名高亮逻辑 (前几名标红) */
tr:nth-child(1) .rank-box, tr:nth-child(2) .rank-box, tr:nth-child(3) .rank-box, tr:nth-child(4) .rank-box, tr:nth-child(5) .rank-box, tr:nth-child(6) .rank-box { background: #d63638; color: #fff; } 
tr:nth-child(7) .rank-box, tr:nth-child(8) .rank-box, tr:nth-child(9) .rank-box, tr:nth-child(10) .rank-box { background: #f0ad4e; color: #fff; } 

/* 近况小方块 (胜平负) */
.form-box { display: inline-block; width: 18px; height: 18px; line-height: 18px; text-align: center; color: #fff; font-size: 11px; margin-right: 2px; border-radius: 2px; font-weight: bold;}
.form-w { background-color: #dc3545; } 
.form-d { background-color: #6c757d; } 
.form-l { background-color: #198754; } 

/* 篮球的东西部切换器 */
.conf-tabs { margin-bottom: 15px; border-bottom: 1px solid #eee; padding-bottom: 10px;}
.conf-tabs .nav-link { color: #555; font-weight: bold; padding: 8px 25px; border-radius: 4px; margin-right: 10px; transition: 0.2s;}
.conf-tabs .nav-link.active { background-color: #00529b; color: white; }

/* ====================================
   移动端响应式 (彻底解决表格挤压重叠)
   ==================================== */
@media (max-width: 768px) {
    .portal-table-container { padding: 15px 10px; margin-bottom: 20px; border-radius: 0; border-left: none; border-right: none;}
    .portal-table-container h1 { font-size: 18px !important; }
    
    .league-matrix-nav { padding: 12px; border-radius: 0; border-left: none; border-right: none; }
    .league-matrix-nav a { padding: 4px 10px !important; font-size: 12px !important; }

    /* 核心修复：强制开启横向滑动，包裹表格 */
    .table-responsive { 
        width: 100%; 
        overflow-x: auto; 
        -webkit-overflow-scrolling: touch; /* 让苹果手机滑动如丝般顺滑 */
        border: 1px solid #eee; 
        border-radius: 6px;
        margin-bottom: 15px;
    }
    
    /* 核心修复：强制表格内容绝对不换行 */
    .table-standings th, .table-standings td { 
        white-space: nowrap !important; /* 绝对禁止换行 */
        padding: 8px 10px; 
        font-size: 13px; 
    }
    
    /* 给球队列固定一个合理的最小宽度，防止太拥挤 */
    .td-team { min-width: 120px; }
    .td-team a { gap: 6px; }
    .team-logo { width: 20px; height: 20px; }

    /* 东西部按钮自适应 */
    .conf-tabs .nav-link { padding: 6px 15px; font-size: 13px; margin-right: 5px; }
}