/* =========================================
   第五套内容页
   主体宽度继续继承 main.css 的1000px
   ========================================= */

.t5-content-main {
    padding-top: 24px;
    padding-bottom: 28px;
}

/* 面包屑 */

.t5-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
    margin-bottom: 20px;
    padding-left: 10px;
    border-left: 3px solid #8d98a5;
    font-size: 12px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.t5-breadcrumb a:hover {
    color: var(--t5-primary);
}

.t5-breadcrumb [aria-current="page"] {
    color: var(--t5-primary);
}

/* =========================================
   直播列表
   ========================================= */

.t5-list-container {
    padding: 20px;
}

.t5-list-header {
    margin-bottom: 16px;
}

.t5-list-header h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 500;
    line-height: 1.4;
}

.t5-list-header p {
    margin: 7px 0 0;
    color: var(--t5-muted);
    font-size: 13px;
}

.t5-league-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.t5-league-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 5px 14px;
    border: 1px solid #e8edf3;
    border-radius: 6px;
    background: #f7f9fc;
    color: #52657b;
    font-size: 13px;
}

.t5-league-links a:hover {
    border-color: #acd7f5;
    color: var(--t5-primary);
}

.t5-league-links a.is-active {
    border-color: var(--t5-primary);
    background: var(--t5-primary);
    color: #fff;
}

/* 避免列表卡片内部再套一层阴影 */

.t5-live-list .t5-list-container > .t5-match-panel {
    border: 1px solid var(--t5-line);
    box-shadow: none;
}

/* 内容页不使用首页固定高度 */

.t5-live-list .t5-table-scroll,
.t5-live-detail .t5-table-scroll {
    max-height: none;
}

/*
 * 列表已通过服务端联赛链接筛选。
 * 不显示首页使用的客户端运动筛选工具栏。
 *
 * 对详情相关比赛同样隐藏，避免相关记录没有运动字段
 * 时误用首页运动筛选。
 */
.t5-live-list .t5-match-toolbar,
.t5-live-detail .t5-match-toolbar {
    display: none;
}

/* =========================================
   比赛详情
   ========================================= */

.t5-live-article {
    padding: 22px 26px 26px;
}

.t5-detail-title {
    margin: 0 0 20px;
    color: #243044;
    font-size: 27px;
    font-weight: 500;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.t5-match-information {
    margin: 0;
    font-size: 13px;
}

.t5-match-information > div {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding-block: 3px;
}

.t5-match-information dt {
    flex-shrink: 0;
    color: #52657b;
    font-weight: 600;
}

.t5-match-information dt::after {
    content: "：";
}

.t5-match-information dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
}

/* 对阵与比分 */

.t5-detail-scoreboard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, .9fr) minmax(0, 1fr);
    align-items: center;
    gap: 24px;
    padding: 48px 16px;
}

.t5-score-team {
    min-width: 0;
    text-align: center;
}

.t5-score-team img {
    display: block;
    width: 72px;
    height: 72px;
    margin: 0 auto 12px;
    object-fit: contain;
}

.t5-score-team h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.t5-score-center {
    min-width: 0;
    text-align: center;
}

.t5-score-league {
    margin: 0 0 8px;
    font-size: 16px;
}

.t5-score-numbers {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    font-size: 34px;
    line-height: 1.3;
}

.t5-score-numbers strong {
    font-size: 30px;
    font-weight: 400;
}

.t5-score-state {
    margin: 12px 0 0;
    color: var(--t5-primary);
    font-size: 16px;
}

/* 详情章节 */

.t5-detail-section + .t5-detail-section {
    margin-top: 26px;
}

.t5-content-heading {
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.5;
}

.t5-signal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.t5-signal-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 17px;
    border-radius: 5px;
    background: var(--t5-primary);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
}

.t5-signal-links a:hover {
    background: #0877c3;
}

.t5-signal-links .t5-empty {
    width: 100%;
    padding: 14px;
    border-radius: 6px;
    background: #f7f9fc;
    text-align: left;
}

.t5-detail-description {
    margin: 0;
    font-size: 14px;
    line-height: 1.9;
    overflow-wrap: anywhere;
}

.t5-detail-note {
    margin: 14px 0 0;
    padding: 12px 14px;
    border-radius: 6px;
    background: #f7f9fc;
    color: var(--t5-muted);
    font-size: 12px;
    line-height: 1.8;
}

/* 相关比赛 */

.t5-related-section {
    margin-top: 28px;
}

.t5-related-section .t5-section-header {
    margin-bottom: 16px;
}

.t5-related-section .t5-section-header h2 {
    font-size: 26px;
}

/* =========================================
   手机端
   ========================================= */

@media (max-width: 700px) {
    .t5-content-main {
        padding-top: 16px;
        padding-bottom: 20px;
    }

    .t5-breadcrumb {
        gap: 5px;
        margin-bottom: 16px;
        font-size: 12px;
    }

    .t5-list-container {
        padding: 14px 10px;
    }

    .t5-list-header h1 {
        font-size: 23px;
    }

    .t5-list-header p {
        font-size: 12px;
    }

    .t5-league-links {
        gap: 7px;
        margin-bottom: 16px;
    }

    .t5-league-links a {
        min-height: 34px;
        padding: 5px 11px;
        font-size: 12px;
    }

    .t5-live-article {
        padding: 16px 14px 20px;
    }

    .t5-detail-title {
        margin-bottom: 16px;
        font-size: 22px;
    }

    .t5-match-information {
        font-size: 12px;
    }

    .t5-match-information > div {
        gap: 3px;
    }

    .t5-detail-scoreboard {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(90px, .9fr)
            minmax(0, 1fr);
        gap: 8px;
        padding: 34px 0;
    }

    .t5-score-team img {
        width: 52px;
        height: 52px;
        margin-bottom: 9px;
    }

    .t5-score-team h2 {
        font-size: 13px;
        line-height: 1.6;
    }

    .t5-score-league {
        margin-bottom: 6px;
        font-size: 12px;
    }

    .t5-score-numbers {
        gap: 7px;
        font-size: 25px;
    }

    .t5-score-numbers strong {
        font-size: 23px;
    }

    .t5-score-state {
        margin-top: 8px;
        font-size: 13px;
    }

    .t5-content-heading {
        margin-bottom: 12px;
        font-size: 17px;
    }

    .t5-signal-links {
        gap: 8px;
    }

    .t5-signal-links a {
        min-height: 40px;
        padding: 8px 13px;
        font-size: 14px;
    }

    .t5-detail-description {
        font-size: 14px;
        line-height: 1.85;
    }

    .t5-detail-note {
        padding: 10px;
        font-size: 12px;
    }

    .t5-related-section {
        margin-top: 24px;
    }

    .t5-related-section .t5-section-header h2 {
        font-size: 24px;
    }

    .t5-live-list .t5-table-scroll,
    .t5-live-detail .t5-table-scroll {
        max-height: none;
    }
}

@media (max-width: 360px) {
    .t5-detail-title {
        font-size: 20px;
    }

    .t5-score-team img {
        width: 44px;
        height: 44px;
    }

    .t5-score-team h2 {
        font-size: 12px;
    }

    .t5-score-numbers {
        font-size: 22px;
    }

    .t5-score-numbers strong {
        font-size: 20px;
    }
}
/* 手机端：修复三位数比分与 VS 重叠 */
@media (max-width: 700px) {
    .t5-detail-scoreboard {
        grid-template-columns:
            minmax(0, 1fr)
            132px
            minmax(0, 1fr);
        gap: 6px;
        padding: 30px 0;
    }

    .t5-score-center {
        width: 132px;
        min-width: 0;
    }

    .t5-score-numbers {
        display: grid;
        grid-template-columns:
            minmax(0, 1fr)
            28px
            minmax(0, 1fr);
        align-items: center;
        gap: 4px;
        width: 100%;
        font-size: 23px;
        line-height: 1.4;
        font-variant-numeric: tabular-nums;
    }

    .t5-score-numbers > span {
        display: block;
        min-width: 0;
        white-space: nowrap;
        text-align: center;
        letter-spacing: -0.5px;
    }

    .t5-score-numbers > strong {
        display: block;
        width: 28px;
        font-size: 20px;
        font-weight: 400;
        line-height: 1.4;
        text-align: center;
        white-space: nowrap;
    }

    .t5-score-team img {
        width: 48px;
        height: 48px;
    }

    .t5-score-team h2 {
        font-size: 12px;
        line-height: 1.6;
        overflow-wrap: anywhere;
    }

    .t5-score-league,
    .t5-score-state {
        overflow-wrap: anywhere;
    }
}

/* 极窄手机：比分独占一行，避免压缩球队和比分 */
@media (max-width: 360px) {
    .t5-detail-scoreboard {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px 12px;
    }

    .t5-score-center {
        grid-column: 1 / -1;
        grid-row: 1;
        width: min(200px, 100%);
        justify-self: center;
    }

    .t5-score-team:first-child {
        grid-column: 1;
        grid-row: 2;
    }

    .t5-score-team:last-child {
        grid-column: 2;
        grid-row: 2;
    }

    .t5-score-numbers {
        grid-template-columns:
            minmax(0, 1fr)
            32px
            minmax(0, 1fr);
        gap: 8px;
        font-size: 28px;
    }

    .t5-score-numbers > strong {
        width: 32px;
        font-size: 23px;
    }
}
/* =========================================
   全站手机端比赛组件
   不使用横向滚动，每场比赛两行展示

   第一行：联赛                  时间
   第二行：主队 图标 VS 图标 客队  状态按钮
   ========================================= */

@media (max-width: 700px) {
    /* 清除原表格的最小宽度，防止撑宽页面 */
    .t5-page .t5-match-panel {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .t5-page .t5-table-scroll {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        overflow-x: hidden;
    }

    .t5-page .t5-match-table {
        display: block;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        border: 0;
        font-size: 12px;
    }

    /* 手机端使用每场比赛独立布局，不再使用桌面列宽 */
    .t5-page .t5-match-table colgroup {
        display: none;
    }

    /*
     * 表头视觉隐藏，保留在页面结构中。
     * 每场比赛的内容仍完整展示。
     */
    .t5-page .t5-match-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        clip-path: inset(50%);
        white-space: nowrap;
        border: 0;
    }

    .t5-page .t5-match-table tbody {
        display: block;
        width: 100%;
    }

    /* 每场比赛：两列两行 */
    .t5-page .t5-match-table tbody tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        align-items: center;
        column-gap: 8px;
        row-gap: 12px;
        width: 100%;
        padding: 12px 10px;
        border-bottom: 1px solid #edf0f3;
        background: #fff;
    }

    .t5-page .t5-match-table tbody tr:last-child {
        border-bottom: 0;
    }

    .t5-page .t5-match-table tbody tr:hover {
        background: #f7fbff;
    }

    .t5-page .t5-match-table tbody td {
        display: block;
        width: auto;
        min-width: 0;
        height: auto;
        padding: 0;
        border: 0;
        text-align: left;
    }

    /* 第一行左侧：联赛 */
    .t5-page .t5-match-table tbody td:nth-child(1) {
        grid-column: 1;
        grid-row: 1;
    }

    .t5-page .t5-league-name {
        display: block;
        overflow: visible;
        color: #52657b;
        font-size: 12px;
        font-weight: 600;
        line-height: 1.5;
        white-space: normal;
        overflow-wrap: anywhere;
        text-overflow: clip;
    }

    /* 第一行右侧：完整日期和开赛时间 */
    .t5-page .t5-match-table tbody td:nth-child(2) {
        grid-column: 2;
        grid-row: 1;
        text-align: right;
    }

    .t5-page .t5-match-table time {
        display: block;
        color: #718096;
        font-size: 11px;
        line-height: 1.5;
        white-space: nowrap;
    }

    /* 第二行左侧：球队对阵 */
    .t5-page .t5-match-table tbody td:nth-child(3) {
        grid-column: 1;
        grid-row: 2;
        min-width: 0;
    }

    .t5-page .t5-table-teams {
        display: grid;
        grid-template-columns:
            minmax(0, 1fr)
            20px
            18px
            20px
            minmax(0, 1fr);
        align-items: center;
        gap: 4px;
        width: 100%;
        min-width: 0;
    }

    .t5-page .t5-table-teams img {
        display: block;
        width: 20px;
        height: 20px;
        max-width: 100%;
        object-fit: contain;
    }

    /*
     * 球队名称允许换行，不使用省略号截掉。
     * 长球队名会增加该场比赛高度，不撑宽页面。
     */
    .t5-page .t5-table-teams .t5-team-name {
        display: block;
        min-width: 0;
        overflow: visible;
        color: #243044;
        font-size: 12px;
        line-height: 1.5;
        white-space: normal;
        overflow-wrap: anywhere;
        text-overflow: clip;
        text-align: left;
    }

    .t5-page .t5-table-teams .t5-team-home {
        text-align: right;
    }

    .t5-page .t5-table-teams .t5-vs {
        font-size: 13px;
        line-height: 1.3;
        text-align: center;
    }

    /* 第二行右侧：完整状态按钮 */
    .t5-page .t5-match-table tbody td:nth-child(4) {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
        align-self: center;
    }

    .t5-page .t5-match-table .t5-watch {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        width: auto;
        min-width: 78px;
        min-height: 36px;
        padding: 7px 8px;
        border-radius: 7px;
        font-size: 11px;
        line-height: 1.4;
        white-space: nowrap;
    }

    .t5-page .t5-match-table .t5-play-icon {
        flex-shrink: 0;
        width: 15px;
        height: 14px;
        font-size: 8px;
    }

    .t5-page .t5-match-table .t5-unavailable {
        display: block;
        font-size: 11px;
        line-height: 1.5;
        white-space: nowrap;
    }

    /*
     * 首页保留上下滚动，避免赛事太多占满首页。
     * 仅取消左右拖动，每场比赛的信息均在屏幕内。
     */
    .t5-home .t5-table-scroll {
        max-height: 560px;
        overflow-y: auto;
    }

    /* 列表页、详情相关比赛自然展开 */
    .t5-live-list .t5-table-scroll,
    .t5-live-detail .t5-table-scroll {
        max-height: none;
        overflow-y: visible;
    }
}

/* 窄屏进一步压缩间距，不隐藏任何比赛信息 */
@media (max-width: 360px) {
    .t5-page .t5-match-table tbody tr {
        column-gap: 6px;
        row-gap: 10px;
        padding: 11px 7px;
    }

    .t5-page .t5-table-teams {
        grid-template-columns:
            minmax(0, 1fr)
            17px
            15px
            17px
            minmax(0, 1fr);
        gap: 3px;
    }

    .t5-page .t5-table-teams img {
        width: 17px;
        height: 17px;
    }

    .t5-page .t5-table-teams .t5-team-name {
        font-size: 11px;
    }

    .t5-page .t5-table-teams .t5-vs {
        font-size: 11px;
    }

    .t5-page .t5-match-table .t5-watch {
        min-width: 72px;
        padding-inline: 6px;
    }

    .t5-page .t5-match-table time {
        font-size: 10px;
    }
}

