/* =========================================================
   球员详情页 (足球 & 篮球通用) 样式表 - 终极自适应防竖排版
   ========================================================= */

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

/* 顶部沉浸式个人名片 (跟随主题色) */
.player-hero { 
    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: 50px 0 40px; margin-bottom: 20px; border-radius: 8px; position: relative; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}
.player-hero .bg-number { position:absolute; right:-20px; top:-20px; opacity:0.05; font-size:150px; font-weight:900; color:#fff; line-height:1; pointer-events:none;}
.hero-flex { display: flex; align-items: center; justify-content: center; gap: 30px; max-width: 800px; margin: 0 auto; position: relative; z-index: 2;}

.avatar-box { width: 140px; height: 140px; background: #fff; border-radius: 50%; padding: 5px; box-shadow: 0 5px 20px rgba(0,0,0,0.2); overflow: hidden; border: 4px solid rgba(255,255,255,0.8); flex-shrink: 0;}
.avatar-box img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.info-box { color: #fff; text-shadow: 1px 1px 3px rgba(0,0,0,0.3); }
.info-box h1 { font-size: 36px; font-weight: 900; margin-bottom: 10px; line-height: 1.2; }
.info-box .position-badge { display: inline-block; background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.4); padding: 4px 15px; border-radius: 20px; font-size: 14px; font-weight: bold; backdrop-filter: blur(5px);}
.info-box a.team-link { display:flex; align-items:center; background:rgba(255,255,255,0.15); padding:4px 12px; border-radius:20px; color:#fff; text-decoration:none; font-size:12px; transition:0.2s;}
.info-box a.team-link:hover { background:rgba(255,255,255,0.25); }

/* 内容区块 (大模块化) */
.portal-section { background: #fff; border: 1px solid #e8e8e8; margin-bottom: 20px; overflow: hidden; border-radius: 8px;}
.portal-sec-header { background: #fafafa; padding: 15px 20px; font-size: 18px; font-weight: bold; color: #333; border-bottom: 1px solid #eee; border-left: 4px solid var(--theme-color); margin: 0;}
.portal-sec-body { padding: 25px 20px; font-size: 15px; line-height: 1.8; color: #444; }

/* ====================================
   赛程列表通用 UI (绝对防挤压换行)
   ==================================== */
.match-row { display: flex; align-items: center; justify-content: space-between; padding: 15px 20px; border-bottom: 1px dashed #eee; transition: 0.2s; text-decoration: none; color: #333; background: #fff; flex-wrap: nowrap;}
.match-row:hover { background-color: #fdfdfd; }
.match-row:last-child { border-bottom: none; }

/* 时间 */
.m-time { flex: 0 0 80px; font-size: 13px; color: #666; text-align: center; }
.m-time .t-md { display: block; font-weight: bold; color: #333; font-size: 14px; margin-bottom: 2px;}
.m-time .t-hi { display: block; font-size: 12px; }

/* 状态 */
.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: #666; background-color: #e5e5e5; }
.m-badge.live { background-color: #ff9800; color: #fff; animation: blink 1.5s infinite;}
.mob-status { display: none; } /* PC 端隐藏短字母 */

/* 球队 */
.m-team { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.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; color: #555; display: block;}
.m-team-name.is-main { font-weight: bold; color: #000; }
.m-logo { width: 26px; height: 26px; object-fit: contain; flex-shrink: 0;}

/* 比分 */
.m-score { flex: 0 0 80px; text-align: center; font-weight: bold; font-size: 18px; font-family: Impact, sans-serif; letter-spacing: 1px; color: #333;}
.m-score.is-live { color: #e6403c; }

/* 动作按钮 */
.m-act { flex: 0 0 60px; text-align: right; font-size: 13px; }
.m-act span { background:#eef2f5; color:#555; padding:4px 10px; border-radius:4px; font-size:12px; transition: 0.2s;}
.match-row:hover .m-act span { background: var(--theme-color); color: #fff; }

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

/* SEO描述块 */
.seo-content-box { margin-top: 10px; padding: 20px; background: #fff; border: 1px dashed #e5e5e5; border-radius: 8px; color: #555; font-size: 14px; line-height: 1.8; margin-bottom: 40px; }


/* ====================================
   移动端绝杀自适应 (通栏无留白)
   ==================================== */
@media (max-width: 768px) {
    .portal-inner { padding: 0; }
    .player-hero { padding: 30px 15px 25px; border-radius: 0; }
    .hero-flex { flex-direction: column; gap: 15px; text-align: center; }
    .avatar-box { width: 110px; height: 110px; }
    .info-box h1 { font-size: 26px; }
    .info-box .position-badge { margin-bottom: 10px; }
    
    /* 区块变通栏 */
    .portal-section { border-left: none; border-right: none; border-radius: 0; margin-bottom: 10px; }
    .portal-sec-header { font-size: 16px; padding: 12px 15px; }
    .portal-sec-body { padding: 0; font-size: 14px; }
    .portal-sec-body > p { padding: 15px; margin: 0; }
    
    /* 赛程模块紧凑压榨，强力防折行 */
    .match-row { padding: 12px 10px; gap: 4px; }
    
    .m-time { flex: 0 0 38px; }
    .m-time .t-md { font-size: 11px; margin-bottom: 0; font-weight: normal; color: #999;}
    .m-time .t-hi { font-size: 11px; color: #333; font-weight: bold;}
    
    .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;}
    .pc-status { display: none; } 
    .mob-status { display: block; }
    
    /* 释放极大空间给球队名，保证一行显示 */
    .m-team { gap: 4px; font-size: 13px; }
    .m-team-name { max-width: 70px; font-size: 12px; }
    .m-logo { width: 18px; height: 18px; }
    
    .m-score { flex: 0 0 45px; font-size: 14px; }
    
    /* 移动端隐藏冗余的 "前瞻/战报" 文字，彻底让路给球队名 */
    .m-act { display: none; }
}

@media (max-width: 360px) {
    .m-team-name { max-width: 55px; }
}