/* ==========================================================================
   首页新增模块样式（阶段 3 起逐步落地的模块统一放这里）
   依赖 theme.css 的设计 token（颜色/字体/圆角/阴影）
   ========================================================================== */

/* ==========================================================================
   Hero 赛事海报（静态单张 + 实时数据条，非轮播）
   ========================================================================== */
.hero-section {
    max-width: 1200px;
    margin: 16px auto 24px;
    padding: 0 16px;
}

.hero-poster-link {
    position: relative;
    display: block;
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    /* 预留固定宽高比，防止图片加载导致布局抖动（CLS ≤ 0.1） */
    aspect-ratio: 1200 / 360;
    background: linear-gradient(135deg, #2B2B33 0%, #1A1A1A 100%);
    box-shadow: var(--shadow);
}

.hero-poster-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-poster-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #FF6B35 0%, #C94A1C 100%);
}

.hero-fallback-name {
    font-size: 32px;
    font-weight: 700;
}

.hero-fallback-season {
    font-size: 16px;
    opacity: 0.9;
}

/* 底部渐变遮罩，保证文字可读 */
.hero-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 32px 28px 22px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.35) 55%, transparent 100%);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hero-info {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.hero-comp-name {
    font-size: 26px;
    font-weight: 700;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.hero-season {
    font-size: 14px;
    opacity: 0.85;
}

/* 实时数据条 */
.hero-match-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-match-round {
    font-size: 13px;
    opacity: 0.85;
}

.hero-match-teams {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.35);
    padding: 6px 14px;
    border-radius: 999px;
}

.hero-team {
    font-size: 15px;
    font-weight: 500;
}

.hero-score {
    font-size: 18px;
    color: var(--color-primary);
}

.hero-enter-btn {
    align-self: flex-start;
    margin-top: 2px;
}

/* Hero 响应式 */
@media (max-width: 768px) {
    .hero-section {
        padding: 0 12px;
        margin: 12px auto 16px;
    }

    .hero-poster-link {
        aspect-ratio: 4 / 3;
    }

    .hero-overlay {
        padding: 24px 16px 16px;
        gap: 8px;
    }

    .hero-comp-name {
        font-size: 20px;
    }

    .hero-team {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .hero-poster-link {
        aspect-ratio: 3 / 2.6;
    }

    .hero-comp-name {
        font-size: 18px;
    }

    .hero-fallback-name {
        font-size: 24px;
    }
}

/* ==========================================================================
   特色数据总入口卡片
   ========================================================================== */
.data-hub-section {
    max-width: 1200px;
    margin: 0 auto 24px;
    padding: 0 16px;
}

/* 2026-09-16：与全站卡片统一（白底/浅边框/8px 圆角），以橙色描边、左侧强调条、实底橙图标凸显 */
.data-hub-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 28px;
    background: var(--color-surface);
    border: 1px solid rgba(255, 107, 53, 0.35);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--color-text);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    overflow: hidden;
}

/* 左侧橙色强调条 */
.data-hub-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--color-primary);
}

.data-hub-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.data-hub-icon {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: var(--radius);
    background: var(--color-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.data-hub-body {
    flex: 1;
    min-width: 0;
}

.data-hub-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--color-text);
}

.data-hub-desc {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin: 0;
    line-height: 1.5;
}

.data-hub-btn {
    flex-shrink: 0;
}

@media (max-width: 560px) {
    .data-hub-card {
        flex-wrap: wrap;
        padding: 20px;
        gap: 14px;
    }

    .data-hub-icon {
        width: 48px;
        height: 48px;
    }

    .data-hub-title {
        font-size: 17px;
    }

    .data-hub-desc {
        font-size: 13px;
    }

    .data-hub-btn {
        width: 100%;
    }
}

/* ==========================================================================
   今日焦点 ---------- */
.focus-matches-section {
    max-width: 1200px;
    margin: 0 auto 24px;
    padding: 0 16px;
}

.section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-header-row .section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
    /* 覆盖全局 .section-title 的 border-left 竖线，统一只保留 .title-bar 一根（2026-09-16） */
    border-left: none;
    padding-left: 0;
}

.title-bar {
    display: inline-block;
    width: 4px;
    height: 20px;
    background: var(--color-primary);
    border-radius: 2px;
}

.section-header-row .section-more {
    font-size: 14px;
    color: var(--color-primary);
    text-decoration: none;
}

.section-header-row .section-more:hover {
    text-decoration: underline;
}

/* 双行横滑：最新赛果 / 即将开赛（2026-09-16） */
.focus-row+.focus-row {
    margin-top: 18px;
}

.focus-row-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.focus-row-title::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.focus-row-title-results::before {
    background: var(--color-text-muted, #999);
}

.focus-row-title-upcoming::before {
    background: var(--color-primary);
}

.focus-row-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.focus-row-scroll::-webkit-scrollbar {
    display: none;
}

/* 一屏 3 场：(100% - 两个间距) / 3 */
.focus-row-scroll .focus-match-card {
    flex: 0 0 calc((100% - 24px) / 3);
    min-width: 0;
    scroll-snap-align: start;
}

.focus-match-card {
    display: block;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.focus-match-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* 顶部：赛事名 + 状态 */
.focus-match-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.focus-match-comp {
    font-size: 12px;
    color: var(--color-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

/* 中部：对阵 + 比分 */
.focus-match-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.focus-team {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.focus-team-away {
    flex-direction: row-reverse;
    text-align: right;
}

.focus-team-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

.focus-team-logo-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-primary-light);
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.focus-team-name {
    font-size: 14px;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 比分/时间区域 */
.focus-score-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    min-width: 70px;
}

.focus-score {
    color: var(--color-text);
    line-height: 1.1;
}

.focus-score-sep {
    font-size: 16px;
    color: var(--color-text-muted);
    margin: 0 2px;
}

.focus-time {
    font-size: 16px;
    color: var(--color-primary);
    line-height: 1.2;
}

.focus-time-sm {
    font-size: 12px;
    color: var(--color-text-muted);
}

/* 底部：地点 */
.focus-match-bottom {
    margin-top: 8px;
    text-align: center;
    font-size: 12px;
}

/* 空状态 */
.focus-matches-empty {
    text-align: center;
    padding: 40px 0;
    color: var(--color-text-muted);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
    .focus-matches-section {
        padding: 0 12px;
        margin-bottom: 16px;
    }

    /* 平板/大屏手机一屏约 2.2 张，露边提示可滑 */
    .focus-row-scroll .focus-match-card {
        flex: 0 0 calc((100% - 12px) / 2.2);
    }

    .focus-match-card {
        padding: 12px;
    }

    .section-header-row .section-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {

    /* 小屏手机一屏 1.2 张 */
    .focus-row-scroll .focus-match-card {
        flex: 0 0 calc((100% - 10px) / 1.2);
    }

    .focus-row-scroll {
        gap: 10px;
    }

    .focus-team-name {
        font-size: 13px;
    }

    .focus-team-logo,
    .focus-team-logo-placeholder {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .focus-score-area {
        min-width: 60px;
    }
}

/* ==========================================================================
   首页单列容器（2026-09-16 替代原 three-main-container 三栏）
   ========================================================================== */
.home-single-column {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 24px;
    padding: 0 16px;
}

@media (max-width: 768px) {
    .home-single-column {
        padding: 0 12px;
        margin-bottom: 16px;
    }
}

/* ==========================================================================
   热点资讯推送（图片为主、文字为辅，尺寸小于赛事卡片）
   ========================================================================== */
.hot-news-section {
    /* 位于 three-main-content 内，沿用其宽度约束 */
}

.hot-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.hot-news-card {
    display: block;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.hot-news-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* 缩略图区（图片为主） */
.hot-news-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--color-bg);
    overflow: hidden;
}

.hot-news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hot-news-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 16px;
    background: var(--color-bg);
}

.hot-news-cat-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--color-primary);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    line-height: 1.5;
}

/* 文案区（文字为辅） */
.hot-news-body {
    padding: 10px 12px;
}

.hot-news-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hot-news-meta {
    font-size: 12px;
    color: var(--color-text-muted);
}

.hot-news-empty {
    text-align: center;
    padding: 40px 0;
    color: var(--color-text-muted);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

/* 响应式：平板 2 列，手机 1 列 */
@media (max-width: 900px) {
    .hot-news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .hot-news-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   赛事专题卡片组（一行 3 个 + 左右箭头滚动）
   ========================================================================== */
.competition-cards-section {
    max-width: 1200px;
    margin: 0 auto 24px;
    padding: 0 16px;
}

.competition-cards-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 横向滚动容器 */
.competition-cards-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding: 4px 2px;
    flex: 1;
}

.competition-cards-scroll::-webkit-scrollbar {
    display: none;
}

/* 单个卡片：固定宽度，PC 一行约 3 个 */
.competition-card-new {
    flex: 0 0 calc((100% - 32px) / 3);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 16px;
    text-decoration: none;
    color: inherit;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.competition-card-new:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
    border-color: var(--color-primary);
}

/* 顶部 LOGO */
.comp-card-logo {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.comp-card-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.comp-card-logo-default {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--color-primary-light);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
}

/* 中部：名称 + 赛季 + 轮次 */
.comp-card-body {
    width: 100%;
}

.comp-card-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.comp-card-season {
    display: block;
    font-size: 12px;
    color: var(--color-text-secondary);
    margin-bottom: 4px;
}

.comp-card-round {
    display: inline-block;
    font-size: 11px;
    color: var(--color-primary);
    background: var(--color-primary-light);
    padding: 2px 8px;
    border-radius: 999px;
}

/* 底部：快捷入口预览 */
.comp-card-links {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--color-border);
    font-size: 12px;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
}

.comp-card-links i {
    font-style: normal;
    opacity: 0.4;
}

/* 空状态 */
.competition-cards-empty {
    width: 100%;
    text-align: center;
    padding: 40px 0;
    color: var(--color-text-muted);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

/* 左右滚动箭头按钮 */
.comp-scroll-btn {
    flex-shrink: 0;
    width: 36px;
    height: 60px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-text);
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
    z-index: 2;
}

.comp-scroll-btn:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.comp-scroll-btn[disabled] {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* 赛事卡片响应式：平板 2 个，手机 1 个 */
@media (max-width: 900px) {
    .competition-card-new {
        flex-basis: calc((100% - 16px) / 2);
    }
}

@media (max-width: 560px) {
    .competition-card-new {
        flex-basis: 100%;
    }

    .comp-scroll-btn {
        width: 32px;
        height: 48px;
        font-size: 20px;
    }

    .comp-card-logo,
    .comp-card-logo-default {
        width: 56px;
        height: 56px;
        font-size: 22px;
    }
}