/* ==================== 模板B 浅色清爽信息流 · 全局变量 ==================== */
:root {
    --bg-body: #f3f5f9;
    --bg-header: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #f0f5ff;
    --primary-blue: #2563eb;
    --primary-blue-hover: #1d4ed8;
    --accent: #f97316;
    --gradient-orange: linear-gradient(135deg, #fb923c, #f97316);
    --gradient-green: linear-gradient(90deg, #16a34a, #15803d);
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e8ebf0;
    --shadow-card: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
    --shadow-hover: 0 8px 24px rgba(37, 99, 235, 0.10);
    --radius-md: 14px;
    --radius-sm: 8px;
}

* { 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, "PingFang SC", 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%; }

/* ==================== 顶部导航（白底） ==================== */
.header { background-color: var(--bg-header); position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 0 var(--border-color); }
.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); border-bottom: 2px solid transparent; }
.nav-menu .nav-item>a.active, .nav-menu .nav-item:hover>a { color: var(--primary-blue); 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: #fff; border-radius: 0 0 10px 10px; box-shadow: var(--shadow-hover); min-width: 100px; padding: 5px 0; opacity: 0; visibility: hidden; transition: all 0.2s ease; z-index: 200; border: 1px solid var(--border-color); 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); }
.dropdown-menu a:hover { background: var(--bg-hover); color: var(--primary-blue); }

/* ==================== 布局与通用组件 ==================== */
.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: #b6bcc8; }
.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: 700; margin-bottom: 15px; position: relative; padding-left: 15px; color: #111827; }
.section-title::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 4px; height: 16px; background: var(--primary-blue); border-radius: 2px; }
.section-title::after { content: ''; position: absolute; left: 6px; top: 50%; transform: translateY(-50%); width: 4px; height: 16px; background: var(--accent); 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); box-shadow: var(--shadow-card); min-width: 0; }

/* ==================== 首页：焦点轮播 ==================== */
.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; box-shadow: var(--shadow-card); }
.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.85) 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; }
.news-swiper .slide-meta { font-size: 14px; color: #d1d5db; }
.news-swiper .swiper-pagination { text-align: right; padding-right: 30px; bottom: 20px; }
.news-swiper .swiper-pagination-bullet { background: rgba(255, 255, 255, 0.5); 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: #fff; padding: 15px; border-radius: var(--radius-md); transition: box-shadow 0.2s, transform 0.2s; min-width: 0; border: 1px solid var(--border-color); box-shadow: var(--shadow-card); }
.news-card-h:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.news-card-h img { width: 140px; height: 85px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; background: #eef1f6; }

.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: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.5; white-space: normal; }
.news-card-h-summary { font-size: 13px; color: var(--text-muted); 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); }

/* ==================== 列表页：分类标签 ==================== */
.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; background: #eef1f6; }
.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: 700; 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: #9ca3af; }

/* ==================== 分页 ==================== */
.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; }
.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: #4b5563; background-color: #fff;
    border: 1px solid var(--border-color); border-radius: 8px;
    text-decoration: none; transition: all 0.2s ease-in-out;
}
.pagination .page-link:hover { color: var(--primary-blue); background: var(--bg-hover); border-color: var(--primary-blue); }
.pagination .page-item.active .page-link {
    color: #ffffff !important; background-color: var(--primary-blue) !important;
    border-color: var(--primary-blue) !important; font-weight: 600;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25); cursor: default;
}
.pagination .page-item.disabled .page-link { color: #b6bcc8 !important; background-color: #f6f7f9 !important; border-color: var(--border-color) !important; cursor: not-allowed; opacity: 0.7; }
@media (max-width: 576px) {
    .pagination .page-link { min-width: 32px; height: 32px; padding: 0 10px; font-size: 13px; }
}

/* ==================== 首页：比赛列表 ==================== */
.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; }
@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: #9ca3af; }
.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; color: #1f2937; }
.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; border: 1px solid var(--border-color); 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: #f3f4f6; border-radius: 6px; 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(249, 115, 22, 0.2); transition: transform 0.2s; white-space: nowrap; }
.btn-live:hover { transform: translateY(-2px); color: #fff; }

/* ==================== 右侧边栏 ==================== */
.side-widget { background: var(--bg-card); border-radius: var(--radius-md); padding: 20px; margin-bottom: 25px; border: 1px solid var(--border-color); box-shadow: var(--shadow-card); 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: #eef1f6; color: var(--text-muted); font-size: 13px; font-weight: bold; border-radius: 6px; font-style: italic; }
.rank-item:nth-child(1) .rank-num { background: #ef4444; color: #fff; }
.rank-item:nth-child(2) .rank-num { background: #f97316; color: #fff; }
.rank-item:nth-child(3) .rank-num { background: #f59e0b; 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; background: #eef1f6; }
.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; }
.video-card:hover span { color: var(--primary-blue); }

/* 标签云 */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-cloud a { background: #f3f5f9; padding: 5px 12px; border-radius: 20px; font-size: 12px; color: #4b5563; border: 1px solid var(--border-color); white-space: nowrap; }
.tag-cloud a:hover { background: var(--bg-hover); color: var(--primary-blue); border-color: var(--primary-blue); }

/* ==================== 底部横向版块 ==================== */
.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, box-shadow 0.2s; min-width: 0; box-shadow: var(--shadow-card); }
.data-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--primary-blue); }
.data-card img { width: 100%; height: 110px; object-fit: cover; margin-bottom: 10px; border-radius: var(--radius-sm); background: #eef1f6; }
.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 var(--border-color); 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; }

/* ==================== 移动端自适应 ==================== */
@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: #fff;
        box-shadow: var(--shadow-card);
    }
    .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; }
    .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; }
}
