/* =========================================
   第五套模板完整样式
   桌面主体：1000px
   手机首页：推荐赛事 → 热门直播 → 新闻
   ========================================= */

.t5-page {
    --t5-primary: #1889d6;
    --t5-text: #243044;
    --t5-muted: #718096;
    --t5-line: #edf0f3;
    --t5-header: #08070f;
    --t5-footer: #020e14;
    --t5-radius: 8px;
    --t5-shadow: 0 2px 11px rgba(0, 0, 0, .12);

    margin: 0;
    background: #fff;
    color: var(--t5-text);
    font: 14px/1.65 Arial, "Microsoft YaHei", sans-serif;
    -webkit-text-size-adjust: 100%;
}

.t5-page *,
.t5-page *::before,
.t5-page *::after {
    box-sizing: border-box;
}

.t5-page a {
    color: inherit;
    text-decoration: none;
}

.t5-page button {
    font: inherit;
}

.t5-page img {
    max-width: 100%;
}

.t5-page [hidden] {
    display: none !important;
}

.t5-page a:focus-visible,
.t5-page button:focus-visible,
.t5-page [tabindex]:focus-visible {
    outline: 2px solid var(--t5-primary);
    outline-offset: 3px;
}

/* 主体容器 */

.t5-wrap {
    width: calc(100% - 32px);
    max-width: 1000px;
    margin-inline: auto;
}

/* 无障碍辅助 */

.t5-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.t5-skip {
    position: fixed;
    z-index: 100;
    top: 8px;
    left: 8px;
    padding: 8px 14px;
    transform: translateY(-180%);
    background: #fff;
    color: #111;
    border: 2px solid var(--t5-primary);
}

.t5-skip:focus {
    transform: translateY(0);
}

/* =========================================
   顶部导航
   ========================================= */

.t5-header {
    background: var(--t5-header);
    color: #fff;
    border-bottom: 1px solid #252330;
}

.t5-header-inner {
    min-height: 56px;
    display: flex;
    align-items: center;
    gap: 30px;
}

.t5-brand {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 0 1 auto;
    min-width: 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.t5-brand-symbol {
    flex-shrink: 0;
    color: #9f68ff;
    font-size: 32px;
}

.t5-navigation {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-shrink: 0;
    font-size: 15px;
}

.t5-navigation a {
    display: block;
    padding-block: 15px;
    white-space: nowrap;
}

.t5-navigation a:hover,
.t5-navigation a[aria-current="page"] {
    color: #93d3ff;
}

/* =========================================
   首页新闻
   ========================================= */

.t5-home-main {
    padding-top: 20px;
    padding-bottom: 0;
}

.t5-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: start;
    gap: 24px;
    margin-bottom: 42px;
}

.t5-feature {
    position: relative;
    display: block;
    min-width: 0;
    height: auto;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #eef3f8;
}

.t5-feature-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.t5-feature-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8f4ff, #f5f6fa);
    color: #6686a5;
    font-size: 30px;
}

.t5-feature-title {
    position: absolute;
    right: 16px;
    bottom: 0;
    left: 16px;
    display: -webkit-box;
    margin: 0;
    padding: 12px 14px;
    overflow: hidden;
    border-top: 3px solid #ff4c50;
    background: #fff;
    color: #182536;
    font-size: 23px;
    font-weight: 400;
    line-height: 1.5;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.t5-headlines {
    min-width: 0;
}

.t5-headlines ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.t5-headlines li {
    min-width: 0;
    border-bottom: 1px dotted #e9edf2;
}

.t5-headlines a {
    display: block;
    padding: 5px 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 14px;
    line-height: 1.65;
}

.t5-headlines li:first-child a {
    padding-bottom: 9px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.5;
}

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

/* =========================================
   推荐赛事卡片
   ========================================= */

.t5-recommendations {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 34px;
}

.t5-recommend-card {
    display: block;
    min-width: 0;
    padding: 12px;
    background: #fff;
    border-radius: var(--t5-radius);
    box-shadow: var(--t5-shadow);
}

.t5-recommend-card:hover {
    box-shadow: 0 3px 14px rgba(24, 137, 214, .2);
}

.t5-recommend-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 12px;
}

.t5-league-ribbon {
    min-width: 0;
    max-width: 100px;
    padding: 1px 13px 1px 7px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    background: #f7cc62;
    color: #163ec1;
    font-size: 12px;
    clip-path: polygon(
        0 0,
        91% 0,
        100% 50%,
        91% 100%,
        0 100%
    );
}

.t5-mini-state {
    flex-shrink: 0;
    padding: 1px 5px;
    border: 1px solid #e4eaf0;
    border-radius: 8px;
    color: var(--t5-primary);
    font-size: 11px;
    white-space: nowrap;
}

.t5-mini-state.is-live {
    color: #df391f;
}

.t5-recommend-team {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    font-size: 13px;
}

.t5-recommend-team img {
    display: block;
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.t5-ellipsis {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.t5-card-vs {
    margin: -3px 0;
    padding-right: 1px;
    text-align: right;
    font-size: 12px;
}

.t5-recommend-time {
    display: block;
    margin-top: 7px;
    color: var(--t5-muted);
    font-size: 11px;
    text-align: center;
}

/* =========================================
   热门直播标题
   ========================================= */

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

.t5-section-header h2 {
    margin: 0;
    font-size: 34px;
    font-weight: 400;
    line-height: 1.3;
}

.t5-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 42px;
    padding: 9px 26px;
    border-radius: 7px;
    box-shadow: var(--t5-shadow);
    background: #fff;
    font-size: 13px;
    white-space: nowrap;
}

.t5-more span {
    color: var(--t5-primary);
    font-size: 23px;
    line-height: 1;
}

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

/* =========================================
   热门直播表格
   ========================================= */

.t5-panel {
    background: #fff;
    border-radius: var(--t5-radius);
    box-shadow: var(--t5-shadow);
}

.t5-match-panel {
    min-width: 0;
    overflow: hidden;
}

.t5-match-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 56px;
    padding: 10px 16px;
}

.t5-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.t5-filters button {
    padding: 6px 17px;
    border: 0;
    border-radius: 6px;
    background: #f1f6fa;
    color: #4a6075;
    font-size: 14px;
    cursor: pointer;
}

.t5-filters button:hover {
    background: #e5f1fa;
}

.t5-filters button.is-active {
    background: var(--t5-primary);
    color: #fff;
    box-shadow: 0 2px 5px rgba(24, 137, 214, .2);
}

.t5-match-range {
    flex-shrink: 0;
    color: var(--t5-muted);
    font-size: 12px;
}

.t5-table-scroll {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    max-height: 560px;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--t5-primary) #f1f4f7;
}

.t5-table-scroll::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.t5-table-scroll::-webkit-scrollbar-track {
    background: #f1f4f7;
}

.t5-table-scroll::-webkit-scrollbar-thumb {
    border-radius: 6px;
    background: var(--t5-primary);
}

.t5-match-table {
    width: 100%;
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    font-size: 13px;
}

.t5-col-league {
    width: 15%;
}

.t5-col-time {
    width: 23%;
}

.t5-col-teams {
    width: 45%;
}

.t5-col-action {
    width: 17%;
}

.t5-match-table thead th {
    position: sticky;
    z-index: 1;
    top: 0;
    height: 42px;
    padding: 6px;
    background: #222d3f;
    color: #fff;
    font-size: 13px;
    font-weight: 400;
    text-align: center;
}

.t5-match-table td {
    height: 46px;
    padding: 6px;
    text-align: center;
    vertical-align: middle;
}

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

.t5-league-name {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.t5-match-table time {
    white-space: nowrap;
}

.t5-table-teams {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        30px
        26px
        30px
        minmax(0, 1fr);
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.t5-table-teams img {
    display: block;
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.t5-team-name {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-align: left;
}

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

.t5-vs {
    color: #1949a9;
    font-size: 17px;
    font-weight: 800;
    font-style: italic;
    text-shadow: 1px -2px #f7c942;
}

.t5-watch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 96px;
    min-height: 29px;
    padding: 4px 10px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .13);
    font-size: 12px;
    white-space: nowrap;
}

.t5-watch:hover {
    box-shadow: 0 2px 9px rgba(24, 137, 214, .25);
}

.t5-play-icon {
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 16px;
    border-radius: 4px;
    background: #3b83ff;
    color: #fff;
    font-size: 9px;
}

.t5-watch.is-live {
    background: #e8320b;
    color: #fff;
}

.t5-watch.is-finished {
    color: #7b8794;
}

.t5-unavailable {
    color: var(--t5-muted);
    font-size: 12px;
}

.t5-empty {
    margin: 0;
    padding: 28px 15px;
    color: var(--t5-muted);
    font-size: 14px;
    text-align: center;
}

.t5-match-note {
    margin: 0;
    padding: 10px 16px;
    border-top: 1px solid var(--t5-line);
    color: var(--t5-muted);
    font-size: 12px;
}

/* =========================================
   页脚
   ========================================= */

.t5-footer {
    margin-top: 0;
    padding: 46px 0 32px;
    background: var(--t5-footer);
    color: #fff;
    font-size: 12px;
}

.t5-footer-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 35px;
    width: min(560px, 100%);
    margin: 0 auto 25px;
}

.t5-footer-columns section {
    min-width: 0;
}

.t5-footer-columns section + section {
    padding-left: 30px;
    border-left: 1px solid #b3bec4;
}

.t5-footer h2 {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 400;
}

.t5-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.t5-footer a:hover {
    color: #8bd0ff;
}

.t5-footer-description,
.t5-footer-custom,
.t5-copyright {
    margin: 8px 0 0;
    overflow-wrap: anywhere;
    line-height: 1.8;
    text-align: center;
}

/* =========================================
   平板端
   ========================================= */

@media (min-width: 701px) and (max-width: 900px) {
    .t5-header-inner {
        gap: 20px;
    }

    .t5-brand {
        font-size: 21px;
    }

    .t5-navigation {
        gap: 20px;
        font-size: 14px;
    }

    .t5-hero {
        gap: 18px;
    }

    .t5-feature-title {
        right: 12px;
        left: 12px;
        padding: 10px 12px;
        font-size: 20px;
    }

    .t5-headlines a {
        padding-block: 4px;
        font-size: 13px;
    }

    .t5-headlines li:first-child a {
        font-size: 15px;
    }

    .t5-recommendations {
        gap: 10px;
    }

    .t5-recommend-card {
        padding: 10px 8px;
    }

    .t5-recommend-top {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .t5-recommend-team {
        grid-template-columns: 24px minmax(0, 1fr) auto;
        gap: 5px;
        font-size: 12px;
    }

    .t5-recommend-team img {
        width: 24px;
        height: 24px;
    }
}

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

@media (max-width: 700px) {
    .t5-wrap {
        width: calc(100% - 24px);
    }

    .t5-page {
        font-size: 14px;
    }

    /* 手机顶部导航 */

    .t5-header-inner {
        min-height: 0;
        flex-wrap: wrap;
        gap: 3px 14px;
        padding-top: 10px;
    }

    .t5-brand {
        font-size: 21px;
    }

    .t5-brand-symbol {
        font-size: 28px;
    }

    .t5-navigation {
        flex: 1 1 100%;
        min-width: 0;
        justify-content: space-between;
        gap: 8px;
        font-size: 14px;
    }

    .t5-navigation a {
        padding-block: 10px;
    }

    /* 手机首页顺序 */

    .t5-home .t5-home-main {
        display: flex;
        flex-direction: column;
        min-width: 0;
        padding-top: 16px;
    }

    .t5-home-main > .t5-recommendations {
        order: 1;
        width: 100%;
        min-width: 0;
    }

    .t5-home-main > .t5-section-header {
        order: 2;
        width: 100%;
    }

    .t5-home-main > .t5-match-panel {
        order: 3;
        width: 100%;
        min-width: 0;
    }

    .t5-home-main > .t5-hero {
        order: 4;
        width: 100%;
        min-width: 0;
        margin: 24px 0;
    }

    /* 推荐卡片 */

    .t5-recommendations {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-bottom: 25px;
    }

    .t5-recommend-card {
        padding: 10px 8px;
    }

    .t5-recommend-top {
        flex-wrap: wrap;
        gap: 5px;
        margin-bottom: 9px;
    }

    .t5-league-ribbon {
        max-width: 85px;
        font-size: 11px;
    }

    .t5-mini-state {
        font-size: 10px;
    }

    .t5-recommend-team {
        grid-template-columns: 24px minmax(0, 1fr) auto;
        gap: 5px;
        font-size: 12px;
    }

    .t5-recommend-team img {
        width: 24px;
        height: 24px;
    }

    .t5-card-vs {
        font-size: 11px;
    }

    .t5-recommend-time {
        margin-top: 6px;
        font-size: 11px;
    }

    /* 热门直播标题 */

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

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

    .t5-more {
        min-height: 36px;
        padding: 7px 13px;
        font-size: 12px;
    }

    .t5-more span {
        font-size: 20px;
    }

    /* 手机赛事表格 */

    .t5-match-toolbar {
        min-height: 49px;
        padding: 8px 10px;
    }

    .t5-filters {
        gap: 7px;
    }

    .t5-filters button {
        padding: 6px 13px;
        font-size: 13px;
    }

    .t5-match-range {
        display: none;
    }

    .t5-table-scroll {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        max-height: 520px;
        overflow: auto;
    }

    /*
     * 保留可读字号。
     * 超出手机屏幕的内容仅在表格内部横向滚动。
     */
    .t5-match-table {
        min-width: 720px;
        font-size: 12px;
    }

    .t5-match-table thead th {
        height: 38px;
        font-size: 12px;
    }

    .t5-match-table td {
        height: 44px;
        padding: 5px;
    }

    .t5-table-teams {
        grid-template-columns:
            minmax(0, 1fr)
            26px
            22px
            26px
            minmax(0, 1fr);
        gap: 5px;
    }

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

    .t5-vs {
        font-size: 15px;
    }

    .t5-watch {
        min-width: 88px;
        min-height: 28px;
        font-size: 12px;
    }

    .t5-match-note {
        padding: 9px 10px;
        font-size: 11px;
    }

    /* 新闻：热门直播下方，静态图文，无轮播 */

    .t5-home .t5-hero {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .t5-feature {
        height: auto;
        aspect-ratio: 16 / 10;
        border-radius: 8px;
    }

    .t5-feature-title {
        right: 10px;
        left: 10px;
        padding: 10px;
        font-size: 19px;
    }

    .t5-feature-placeholder {
        font-size: 26px;
    }

    .t5-headlines {
        min-width: 0;
        padding-top: 0;
    }

    .t5-headlines a {
        display: -webkit-box;
        padding: 10px 0;
        overflow: hidden;
        white-space: normal;
        overflow-wrap: anywhere;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        font-size: 14px;
        line-height: 1.7;
    }

    .t5-headlines li:first-child a {
        padding-bottom: 10px;
        font-size: 16px;
        line-height: 1.6;
    }

    /* 手机页脚 */

    .t5-footer {
        padding: 30px 0 25px;
        font-size: 12px;
    }

    .t5-footer-columns {
        gap: 16px;
    }

    .t5-footer-columns section + section {
        padding-left: 16px;
    }

    .t5-footer h2 {
        font-size: 14px;
    }

    .t5-footer nav {
        gap: 8px 12px;
    }
}

/* 小屏手机 */

@media (max-width: 360px) {
    .t5-navigation {
        gap: 5px;
        font-size: 12px;
    }

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

    .t5-more {
        padding-inline: 10px;
        font-size: 11px;
    }

    .t5-feature-title {
        font-size: 17px;
    }

    .t5-recommend-team {
        font-size: 11px;
    }

    .t5-recommend-time {
        font-size: 10px;
    }
}
