/* =========================================================
   球员大全 专属样式表 - 扁平硬核、修复文字撑破屏幕版
   ========================================================= */
:root { 
    --fb-color: #d63638; 
    --bk-color: #00529b; 
    --main-bg: #f5f6f7;
    --border-color: #e5e5e5;
    --text-main: #333;
    --text-muted: #888;
}

.dir-wrap { background-color: var(--main-bg); padding: 15px 0 50px; font-family: -apple-system, BlinkMacSystemFont, "Microsoft YaHei", sans-serif; }
.dir-inner { max-width: 1200px; margin: 0 auto; padding: 0 15px; box-sizing: border-box; }

/* 面包屑 */
.dir-breadcrumb { font-size: 13px; color: var(--text-muted); margin-bottom: 15px; }
.dir-breadcrumb a { color: #555; text-decoration: none; }
.dir-breadcrumb a:hover { color: var(--fb-color); }

/* 主体内容框 */
.dir-main-box { background: #fff; border: 1px solid var(--border-color); border-radius: 2px; }

/* 头部导航 */
.dir-header { padding: 25px 25px 15px; border-bottom: 1px solid var(--border-color); background: #fafafa;}
.fb-header { border-top: 3px solid var(--fb-color); }
.bk-header { border-top: 3px solid var(--bk-color); }

.dir-header h1 { font-size: 24px; font-weight: 700; color: var(--text-main); margin: 0 0 15px 0; }

/* 导航按键组 - 统一结构 */
.dir-quick-nav { display: block; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.nav-links a { display: inline-block; padding: 6px 14px; background: #fff; border: 1px solid #ddd; color: #555; text-decoration: none; font-size: 14px; border-radius: 2px; transition: 0.1s; font-weight: 500;}
.fb-header a:hover { background: var(--fb-color); border-color: var(--fb-color); color: #fff; }
.bk-header a:hover { background: var(--bk-color); border-color: var(--bk-color); color: #fff; }

/* 联赛区块 */
.dir-content { padding: 25px; }
.league-block { margin-bottom: 40px; }
.league-title { display: flex; justify-content: space-between; align-items: flex-end; padding-bottom: 10px; border-bottom: 2px solid var(--border-color); margin-bottom: 20px; }
.league-title.fb-border { border-bottom-color: rgba(214,54,56,0.3); }
.league-title.bk-border { border-bottom-color: rgba(0,82,155,0.3); }
.league-title h2 { font-size: 20px; font-weight: 700; margin: 0; color: var(--text-main); }
.league-title h2 span { font-size: 13px; font-weight: normal; color: var(--text-muted); margin-left: 8px; }
.more-link { font-size: 13px; color: #1e88e5; text-decoration: none; }
.more-link:hover { text-decoration: underline; }

/* 球队横幅 */
.team-block { margin-bottom: 20px; border: 1px solid #f0f0f0; }
.team-name-bar { background: #fafafa; padding: 10px 15px; border-left: 4px solid var(--fb-color); display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #f0f0f0;}
.team-name-bar.bk-bar { border-left-color: var(--bk-color); }
.team-name-bar h3 { font-size: 16px; margin: 0; color: #444; font-weight: 600; }
.team-name-bar a { font-size: 12px; color: var(--text-muted); text-decoration: none; }
.team-name-bar a:hover { color: var(--text-main); }

/* 球员微标矩阵 - 核心修复撑破问题 */
.player-grid { padding: 15px; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; background: #fff; }

/* Flex 必备：外层必须加 min-width: 0 且 overflow: hidden，否则子元素的超出截断(ellipsis)将无法生效！ */
.player-pill { 
    display: flex; 
    align-items: center; 
    padding: 4px; 
    border: 1px solid #eaeaea; 
    border-radius: 30px; 
    text-decoration: none; 
    color: #444; 
    transition: 0.1s; 
    background: #fff;
    min-width: 0; 
    overflow: hidden; 
}
.player-pill:hover { border-color: #bbb; background: #fdfdfd; }
.player-pill img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: #eee; margin-right: 8px; flex-shrink: 0;}

/* 文字内部设置块级并截断 */
.player-pill span { 
    font-size: 13px; 
    display: block;
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    padding-right: 5px; 
    flex: 1;
    min-width: 0; 
}

/* SEO描述块 */
.dir-seo-box { padding: 20px; background: #fff; border: 1px solid #eee; margin-top: 30px; border-radius: 2px;}
.dir-seo-box h3 { font-size: 15px; margin: 0 0 8px 0; color: #333; font-weight: 600;}
.fb-seo h3 { color: var(--fb-color); }
.bk-seo h3 { color: var(--bk-color); }
.dir-seo-box p { font-size: 13px; color: #666; line-height: 1.6; margin: 0 0 10px 0; }
.dir-seo-box p:last-child { margin: 0; }


/* ====================================
   移动端响应式 (极致防撑破)
   ==================================== */
@media (max-width: 768px) {
    .dir-inner { padding: 0; }
    .dir-breadcrumb { padding: 10px 15px 5px; margin-bottom: 0; }
    .dir-main-box { border-left: none; border-right: none; }
    
    .dir-header { padding: 15px; }
    .dir-header h1 { font-size: 18px; margin-bottom: 12px; }
    
    /* 横滑导航 */
    .nav-links { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 5px; -webkit-overflow-scrolling: touch; }
    .nav-links::-webkit-scrollbar { display: none; }
    .nav-links a { flex-shrink: 0; padding: 6px 14px; }

    .dir-content { padding: 15px; }
    .league-block { margin-bottom: 25px; }
    .league-title { padding-bottom: 5px; margin-bottom: 12px; }
    .league-title h2 { font-size: 16px; }
    .league-title h2 span { display: none; }

    .team-name-bar { padding: 8px 12px; }
    .team-name-bar h3 { font-size: 14px; }

    /* 移动端 3 列，配合强制截断绝对不溢出 */
    .player-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 12px; }
    .player-pill { padding: 2px; border-radius: 4px; border-color: #f0f0f0; }
    .player-pill img { width: 20px; height: 20px; margin-right: 4px; border-radius: 2px;}
    .player-pill span { font-size: 11px; padding-right: 0; transform: scale(0.96); transform-origin: left center;}

    .dir-seo-box { border-left: none; border-right: none; }
}