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

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

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

/* 表格基础样式 */
.jzt-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;}
.jzt-table-standings td { font-size: 14px; color: #333; text-align: center; vertical-align: middle; border-bottom: 1px dashed #eee; padding: 12px 6px;}
.jzt-table-standings tr:hover { background-color: #fcfcfc; }

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

/* 排名方块默认灰色 */
.jzt-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) .jzt-rank-box, tr:nth-child(2) .jzt-rank-box, tr:nth-child(3) .jzt-rank-box, tr:nth-child(4) .jzt-rank-box, tr:nth-child(5) .jzt-rank-box, tr:nth-child(6) .jzt-rank-box { background: var(--theme-primary); color: #fff; } 
tr:nth-child(7) .jzt-rank-box, tr:nth-child(8) .jzt-rank-box, tr:nth-child(9) .jzt-rank-box, tr:nth-child(10) .jzt-rank-box { background: var(--theme-primary); color: #fff; } 

/* 近况小方块 (胜平负) */
.jzt-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; } 

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

/* ====================================
   移动端响应式 (彻底解决表格挤压重叠 + 极限减小留白)
   ==================================== */
@media (max-width: 768px) {
    /* 1. 强制干掉 Bootstrap 默认的 mt-2 顶部边距 */
    .container.mt-2 { margin-top: 0 !important; }
    
    /* 2. 强制将 Bootstrap 容器的左右留白缩小到 8px */
    .container { 
        padding-left: 8px !important; 
        padding-right: 8px !important; 
    }

    .portal-table-container { padding: 15px 10px; margin-bottom: 20px; border-radius: 0; border-left: none; border-right: none;}
    
    /* 3. 强制覆盖 H1 的内联 style，改字号为 16px */
    .portal-table-container h1 { font-size: 16px !important; }

    /* 核心修复：强制开启横向滑动，包裹表格 */
    .table-responsive { 
        width: 100%; 
        overflow-x: auto; 
        -webkit-overflow-scrolling: touch; /* 让苹果手机滑动如丝般顺滑 */
        border: 1px solid #eee; 
        border-radius: 6px;
        margin-bottom: 15px;
    }
    
    /* 核心容器：大幅缩小上下左右留白 */
        .jzt-league-matrix-nav {
            padding: 8px 10px !important; /* 原为 12px 或 15px，大幅压薄 */
            border-radius: 4px; /* 稍微收敛圆角，更现代 */
            margin-bottom: 12px !important; /* 减小离下方表格的距离 */
        }
        
        /* 标题和图标 */
        .jzt-league-matrix-nav .tit {
            font-size: 13px !important; /* 字号略微缩小 */
            margin-bottom: 8px !important; /* 减小离下方按钮的间距 */
            gap: 6px !important; /* 图标和文字间距缩小 */
        }
        
        /* 按钮列表：减小按钮间距 */
        .jzt-league-matrix-nav .nav-list {
            gap: 5px !important; /* 原为 10px 或 12px，极致压缩间距 */
        }
        
        /* 胶囊按钮本身：大幅变薄、变窄 */
        .jzt-league-matrix-nav a {
            padding: 3px 10px !important; /* 原为 4px 16px 或 6px 16px，胶囊极限变薄 */
            font-size: 11px !important; /* 字号略微缩小一号 */
            border-radius: 20px !important; /* 胶囊圆角，更精致 */
            font-weight: bold;
        }
        
        /* 激活状态按钮 (英超) */
        .jzt-league-matrix-nav a.active {
            box-shadow: 0 1px 3px rgba(236,72,153,0.3); /* 弱化阴影，更精致 */
        }
    
    /* 核心修复：强制表格内容绝对不换行 */
    .jzt-table-standings th, .jzt-table-standings td { 
        white-space: nowrap !important; /* 绝对禁止换行 */
        padding: 8px 10px; 
        font-size: 13px; 
    }
    
    /* 给球队列固定一个合理的最小宽度，防止太拥挤 */
    .jzt-td-team { min-width: 120px; }
    .jzt-td-team a { gap: 6px; }
    .team-logo { width: 20px; height: 20px; }

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