/* ==================== 1. 全局变量与基础重置 ==================== */
:root {
    --bg-body: #1a1c20;
    --bg-header: #22252a;
    --bg-card: #24272c;
    --bg-hover: #2c3036;
    --primary-blue: #1890ff;
    --primary-blue-hover: #40a9ff;
    --gradient-orange: linear-gradient(135deg, #ff7a2f, #ff4d3a);
    --gradient-green: linear-gradient(90deg, #25b86f, #1e965b);
    --text-main: #e5e7eb;
    --text-muted: #9ca3af;
    --border-color: rgba(255, 255, 255, 0.06);
    --radius-md: 8px;
    --radius-sm: 4px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body, html {
    width: 100%;
    overflow-x: hidden;
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: color 0.2s, background 0.2s; }
a:hover { color: var(--primary-blue); }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; border-radius: var(--radius-sm); }

.container { max-width: 1280px; margin: 0 auto; padding: 0 15px; width: 100%; }

/* ==================== 2. 顶部导航 ==================== */
.header { background-color: var(--bg-header); position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); }
.header-inner { display: flex; align-items: center; height: 60px; min-width: 0; }
.logo { font-size: 20px; font-weight: 900; color: var(--primary-blue); font-style: italic; margin-right: 30px; flex-shrink: 0; }

.nav-menu { display: flex; gap: 5px; white-space: nowrap; width: 100%; align-items: center; }
.nav-item { position: relative; height: 60px; }
.nav-menu .nav-item>a { display: flex; align-items: center; font-size: 15px; font-weight: 500; padding: 0 15px; height: 60px; color: var(--text-main); opacity: 0.8; border-bottom: 2px solid transparent; }
.nav-menu .nav-item>a.active, .nav-menu .nav-item:hover>a { color: var(--primary-blue); opacity: 1; border-bottom-color: var(--primary-blue); }

.arrow { display: inline-block; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid var(--text-muted); margin-left: 6px; transition: transform 0.3s; }
.has-dropdown:hover .arrow { transform: rotate(180deg); border-top-color: var(--primary-blue); }

.dropdown-menu { position: absolute; top: 60px; left: 50%; transform: translateX(-50%) translateY(10px); background: #2a2e35; border-radius: 0 0 6px 6px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); min-width: 100px; padding: 5px 0; opacity: 0; visibility: hidden; transition: all 0.2s ease; z-index: 200; border: 1px solid rgba(255, 255, 255, 0.05); border-top: none; }
.has-dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.dropdown-menu a { display: block; height: 38px; line-height: 38px; padding: 0 20px; font-size: 14px; text-align: center; color: var(--text-main); opacity: 0.8; }
.dropdown-menu a:hover { background: rgba(24, 144, 255, 0.1); color: var(--primary-blue); opacity: 1; }

/* ==================== 3. 布局与通用组件 ==================== */
.breadcrumb { display: flex; align-items: center; font-size: 13px; color: var(--text-muted); padding: 15px 0; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary-blue); }
.breadcrumb span.sep { margin: 0 8px; color: #555; }
.breadcrumb span.current { color: var(--text-main); font-weight: 500; }

.main-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 25px; margin-top: 5px; }
main, aside { min-width: 0; }

.section-title { display: flex; align-items: center; font-size: 18px; font-weight: 600; margin-bottom: 15px; position: relative; padding-left: 15px; }
.section-title::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%) skewX(-15deg); width: 4px; height: 16px; background: var(--primary-blue); border-radius: 2px; }
.section-title::after { content: ''; position: absolute; left: 6px; top: 50%; transform: translateY(-50%) skewX(-15deg); width: 4px; height: 16px; background: #ff7a2f; border-radius: 2px; }

.card-panel { background: var(--bg-card); border-radius: var(--radius-md); padding: 20px; margin-bottom: 25px; border: 1px solid var(--border-color); min-width: 0; }

/* ==================== 4. 首页：焦点轮播与图文 ==================== */
.top-section { margin-top: 25px; }
.news-swiper { width: 100%; max-width: 100%; height: 380px; border-radius: var(--radius-md); margin-bottom: 15px; overflow: hidden; position: relative; background: #000; }
.news-swiper .swiper-slide { position: relative; width: 100%; height: 100%; }
.news-swiper .swiper-slide img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.news-swiper .slide-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 50%); display: flex; flex-direction: column; justify-content: flex-end; padding: 30px; pointer-events: none; }
.news-swiper .slide-title { font-size: 26px; font-weight: 700; color: #fff; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); white-space: normal; word-wrap: break-word; word-break: break-all; }
.news-swiper .slide-meta { font-size: 14px; color: var(--text-muted); }
.news-swiper .swiper-pagination { text-align: right; padding-right: 30px; bottom: 20px; }
.news-swiper .swiper-pagination-bullet { background: rgba(255, 255, 255, 0.4); opacity: 1; transition: all 0.3s; }
.news-swiper .swiper-pagination-bullet-active { background: var(--primary-blue); width: 24px; border-radius: 4px; }

.news-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 30px; min-width: 0; }
.news-card-h { display: flex; gap: 15px; background: rgba(255, 255, 255, 0.03); padding: 15px; border-radius: var(--radius-md); transition: background 0.2s; min-width: 0; border: 1px solid var(--border-color); }
.news-card-h:hover { background: var(--bg-hover); border-color: rgba(255, 255, 255, 0.1); }
.news-card-h img { width: 140px; height: 85px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }

.news-card-h-info { display: flex; flex-direction: column; justify-content: space-between; padding: 2px 0; min-width: 0; flex: 1; }
.news-card-h-title { font-size: 15px; color: var(--text-main); font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.5; white-space: normal; word-wrap: break-word; word-break: break-all; }
.news-card-h-summary { font-size: 13px; color: #888; margin-top: 6px; margin-bottom: 6px; line-height: 1.5; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.news-card-h-meta { font-size: 13px; color: var(--text-muted); }

/* ==================== 5. 列表页：新闻列表模块（你漏掉的核心代码） ==================== */
.tab-group { width: 100%; min-width: 0; }
.category-tabs { display: flex; gap: 10px; border-bottom: 1px solid var(--border-color); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.category-tabs::-webkit-scrollbar { display: none; }
.category-tab { padding: 10px 15px; font-size: 16px; cursor: pointer; color: var(--text-muted); white-space: nowrap; border-bottom: 2px solid transparent; flex-shrink: 0; }
.category-tab.active, .category-tab:hover { color: var(--primary-blue); border-bottom-color: var(--primary-blue); font-weight: bold; }

.news-list { display: flex; flex-direction: column; gap: 20px; }
.news-item-v { display: flex; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border-color); transition: background 0.3s; }
.news-item-v:last-child { border-bottom: none; padding-bottom: 0; }
.news-item-v:hover .news-item-v-title { color: var(--primary-blue); }
.news-item-v:hover .news-item-v-img img { transform: scale(1.05); }

.news-item-v-img { width: 220px; height: 140px; flex-shrink: 0; border-radius: var(--radius-sm); overflow: hidden; position: relative; }
.news-item-v-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.news-item-v-tag { position: absolute; top: 8px; left: 8px; background: var(--gradient-orange); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 4px; z-index: 2; }

.news-item-v-content { display: flex; flex-direction: column; justify-content: space-between; flex: 1; min-width: 0; padding: 2px 0; }
.news-item-v-title { font-size: 20px; font-weight: 600; color: var(--text-main); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color 0.2s; }
.news-item-v-desc { font-size: 14px; color: var(--text-muted); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 10px; }
.news-item-v-meta { display: flex; justify-content: space-between; align-items: center; color: var(--text-muted); font-size: 13px; margin-top: 15px; }
.news-item-v-meta-left span { margin-right: 15px; }
.news-item-v-meta-left span i { margin-right: 4px; font-style: normal; color: #555; }

/* 分页控件 */

/* ==================== 帝国CMS 伪静态极简高级分页样式 ==================== */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0 15px 0;
    width: 100%;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;                  /* 按钮之间的间距 */
    padding-left: 0;
    margin: 0;
    list-style: none !important; /* 彻底绝杀那颗烦人的黑点 */
}

/* 确保所有继承的 li 标签都不带圆点 */
.pagination .page-item {
    list-style: none !important;
    margin: 0;
    padding: 0;
}

/* 基础按钮样式 */
.pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 14px;
    font-size: 14px;
    font-weight: 500;
    color: #9cb3c9;            /* 优雅的浅蓝灰字色 */
    background-color: #1e2430; /* 深色卡片背景色，契合体育站暗色调 */
    border: 1px solid #2f384c; /* 质感边框 */
    border-radius: 6px;        /* 圆角 */
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

/* 悬浮交互效果 */
.pagination .page-link:hover {
    color: #ffffff;
    background-color: #2b354a;
    border-color: #435375;
}

/* 激活高亮状态（当前所在页码） */
.pagination .page-item.active .page-link {
    color: #ffffff !important;
    background-color: #0076ff !important; /* 主流运动科技蓝 */
    border-color: #0076ff !important;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 118, 255, 0.3);
    cursor: default;
}

/* 禁用状态（不可点击的首页/上一页/尾页） */
.pagination .page-item.disabled .page-link {
    color: #4e5d7c !important;
    background-color: #161b24 !important;
    border-color: #222936 !important;
    cursor: not-allowed;
    opacity: 0.6;
}

/* 移动端智能适配：防止页码过多撑破屏幕 */
@media (max-width: 576px) {
    .pagination .page-link {
        min-width: 32px;
        height: 32px;
        padding: 0 10px;
        font-size: 13px;
    }
}

/* ==================== 6. 首页：比赛列表模块 ==================== */
.tabs { display: flex; gap: 10px; border-bottom: 1px solid var(--border-color); margin-bottom: 15px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tab-item { padding: 8px 15px; cursor: pointer; color: var(--text-muted); white-space: nowrap; border-bottom: 2px solid transparent; flex-shrink: 0; font-size: 15px; }
.tab-item.active { color: var(--primary-blue); border-bottom-color: var(--primary-blue); font-weight: bold; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.match-list { display: flex; flex-direction: column; min-width: 0; }
.match-row { display: grid; grid-template-columns: 60px 80px 80px 1fr 60px 1fr 100px; align-items: center; padding: 14px 10px; border-bottom: 1px solid var(--border-color); transition: background 0.2s; min-width: 0; }
.match-row:hover { background: var(--bg-hover); }
.match-row:last-child { border-bottom: none; }
.m-status { padding: 4px 0; text-align: center; border-radius: var(--radius-sm); font-size: 12px; color: #fff; background: #4a5564; }
.m-status.live { background: var(--gradient-green); animation: pulse 2s infinite; }
.m-time, .m-league { color: var(--text-muted); font-size: 13px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-team { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; overflow: hidden; min-width: 0; }
.m-team.home { justify-content: flex-end; }
.m-team.away { justify-content: flex-start; }
.m-team img { width: 24px; height: 24px; background: #fff; border-radius: 50%; padding: 2px; flex-shrink: 0; }
.m-team span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-score { text-align: center; font-size: 16px; font-weight: bold; color: var(--text-main); background: rgba(255, 255, 255, 0.05); border-radius: 4px; padding: 4px 0; }
.m-action { text-align: right; }
.btn-live { display: inline-block; padding: 6px 15px; background: var(--gradient-orange); color: #fff; font-size: 12px; font-weight: bold; border-radius: 20px; box-shadow: 0 4px 10px rgba(255, 77, 58, 0.2); transition: transform 0.2s; white-space: nowrap; }
.btn-live:hover { transform: translateY(-2px); color: #fff; }

/* ==================== 7. 全局右侧边栏 (24小时热榜、视频等) ==================== */
.side-widget { background: var(--bg-card); border-radius: var(--radius-md); padding: 20px; margin-bottom: 25px; border: 1px solid var(--border-color); min-width: 0; }
.side-list li { border-bottom: 1px dashed var(--border-color); }
.side-list li:last-child { border-bottom: none; }
.side-list a { display: block; padding: 10px 0; font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-list a:hover { color: var(--primary-blue); padding-left: 5px; }

/* 排行榜 */
.rank-list { display: flex; flex-direction: column; gap: 12px; }
.rank-item { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.rank-num { flex-shrink: 0; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.08); color: var(--text-muted); font-size: 13px; font-weight: bold; border-radius: 4px; font-style: italic; }
.rank-item:nth-child(1) .rank-num { background: #ff4d3a; color: #fff; }
.rank-item:nth-child(2) .rank-num { background: #ff7a2f; color: #fff; }
.rank-item:nth-child(3) .rank-num { background: #f0c36a; color: #fff; }
.rank-info { flex: 1; min-width: 0; }
.rank-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; color: var(--text-main); line-height: 1.5; transition: color 0.2s; }
.rank-item:hover .rank-title { color: var(--primary-blue); }

/* 视频网格 */
.side-video-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.video-card { display: flex; flex-direction: column; gap: 5px; min-width: 0; position: relative; }
.video-card-img { position: relative; width: 100%; height: 80px; border-radius: var(--radius-sm); overflow: hidden; }
.video-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.video-card:hover .video-card-img img { transform: scale(1.05); }
.video-play-icon { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 28px; height: 28px; background: rgba(0, 0, 0, 0.5); border-radius: 50%; border: 1.5px solid #fff; display: flex; align-items: center; justify-content: center; }
.video-play-icon::after { content: ''; border-left: 8px solid #fff; border-top: 5px solid transparent; border-bottom: 5px solid transparent; margin-left: 3px; }
.video-card span { font-size: 12px; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; white-space: normal; word-wrap: break-word; }
.video-card:hover span { color: var(--primary-blue); }

/* 标签云 */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-cloud a { background: rgba(255, 255, 255, 0.05); padding: 5px 12px; border-radius: 20px; font-size: 12px; color: var(--text-muted); border: 1px solid var(--border-color); white-space: nowrap; }
.tag-cloud a:hover { background: rgba(24, 144, 255, 0.1); color: var(--primary-blue); border-color: var(--primary-blue); }

/* ==================== 8. 全局底部横向版块 ==================== */
.bottom-section { margin-top: 5px; }
.bottom-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 15px; margin-bottom: 25px; min-width: 0; }
.data-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 10px; text-align: center; transition: transform 0.2s; min-width: 0; }
.data-card:hover { transform: translateY(-3px); border-color: var(--primary-blue); }
.data-card img { width: 100%; height: 110px; object-fit: cover; margin-bottom: 10px; border-radius: var(--radius-sm); }
.data-card span { font-size: 13px; color: var(--text-main); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.avatar-row { display: flex; gap: 20px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.avatar-row::-webkit-scrollbar { display: none; }
.avatar-item { flex: 0 0 80px; text-align: center; min-width: 0; }
.avatar-item img { width: 66px; height: 66px; border-radius: 50%; background: #fff; padding: 5px; margin: 0 auto 8px; border: 2px solid transparent; transition: border-color 0.2s; }
.avatar-item:hover img { border-color: var(--primary-blue); }
.avatar-item span { font-size: 13px; color: var(--text-muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.footer { background: var(--bg-header); text-align: center; padding: 25px 0; color: var(--text-muted); font-size: 13px; border-top: 1px solid var(--border-color); margin-top: 40px; }

/* ==================== 9. 移动端终极自适应防溢出 ==================== */
@media (max-width: 992px) {
    /* 核心布局单列化 */
    .main-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .news-grid { grid-template-columns: minmax(0, 1fr); }
    .bottom-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    /* 手机端导航调整 */
    .nav-menu { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .nav-menu::-webkit-scrollbar { display: none; }
    .dropdown-menu, .arrow { display: none !important; }

    /* 首页顶部资讯适应手机 */
    .news-swiper { height: 220px; }
    .news-swiper .slide-title { font-size: 16px; line-height: 1.4; }
    .news-card-h img { width: 110px; height: 80px; }
    .news-card-h-title { font-size: 13px; }

    /* 内页新闻列表改上图下文 */
    .news-item-v { flex-direction: column; gap: 12px; padding-bottom: 15px; }
    .news-item-v-img { width: 100%; height: 180px; }
    .news-item-v-title { font-size: 17px; }
    .news-item-v-desc { font-size: 13px; -webkit-line-clamp: 3; }

    /* 赛事列表手机端重构定位（完美防止撑破） */
    .match-row {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        grid-template-areas:
            "status time league"
            "team1 score team2"
            "action action action";
        gap: 12px 5px;
        padding: 15px;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        margin-bottom: 12px;
        background: rgba(255, 255, 255, 0.02);
    }
    .m-status { grid-area: status; justify-self: start; width: 60px; margin: 0; }
    .m-time { grid-area: time; text-align: center; }
    .m-league { grid-area: league; text-align: right; color: var(--primary-blue); }
    .m-team.home { grid-area: team1; justify-content: flex-end; text-align: right; }
    .m-score { grid-area: score; background: transparent; font-size: 18px; }
    .m-team.away { grid-area: team2; justify-content: flex-start; text-align: left; flex-direction: row-reverse; }
    .m-team img { display: none; }
    .m-team span { font-size: 15px; width: 100%; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
    .m-action { grid-area: action; justify-self: center; margin-top: 5px; }
}