/* =========================================
   第五套新闻页面
   1000px主体，桌面双栏，手机单栏
   ========================================= */

.t5-news-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
    gap: 20px;
}

.t5-news-main,
.t5-news-sidebar {
    min-width: 0;
}

.t5-news-sidebar {
    display: grid;
    gap: 18px;
}

/* 新闻列表 */

.t5-news-list-panel {
    padding: 20px;
}

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

.t5-news-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 8px;
}

.t5-news-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 35px;
    padding: 6px 15px;
    border: 1px solid #e6edf4;
    border-radius: 6px;
    background: #f6f9fc;
    font-size: 13px;
}

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

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

.t5-news-item {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    align-items: start;
    gap: 14px;
    padding: 18px 0;
    border-bottom: 1px solid var(--t5-line);
}

.t5-news-item:last-child {
    border-bottom: 0;
}

.t5-news-item-image {
    display: block;
    overflow: hidden;
    border-radius: 5px;
    background: #f0f4f8;
    aspect-ratio: 3 / 2;
}

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

.t5-news-item-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 126px;
}

.t5-news-item h2,
.t5-news-item h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.t5-news-item h2 a:hover,
.t5-news-item h3 a:hover {
    color: var(--t5-primary);
}

.t5-news-item-summary {
    display: -webkit-box;
    margin: 8px 0;
    overflow: hidden;
    color: #617086;
    font-size: 12px;
    line-height: 1.8;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.t5-news-item-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 5px 10px;
    margin-top: auto;
    padding-top: 7px;
    color: var(--t5-primary);
    font-size: 11px;
    line-height: 1.6;
}

/* 分页 */

.t5-pagination {
    padding: 24px 0 8px;
}

.t5-pagination .pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.t5-pagination .pagination li {
    margin: 0;
}

.t5-pagination .pagination a,
.t5-pagination .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
    padding: 4px 9px;
    border: 1px solid #e6edf4;
    border-radius: 4px;
    background: #fff;
    font-size: 12px;
}

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

.t5-pagination .pagination .active span,
.t5-pagination .pagination .active a {
    border-color: var(--t5-primary);
    background: var(--t5-primary);
    color: #fff;
}

.t5-pagination .pagination .disabled span {
    color: #a1aab6;
    background: #f7f9fb;
}

/* 新闻正文 */

.t5-news-article {
    padding: 22px;
}

.t5-news-article-header {
    margin-bottom: 22px;
}

.t5-news-article-header h1 {
    margin: 0;
    color: #243044;
    font-size: 25px;
    font-weight: 500;
    line-height: 1.6;
    text-align: center;
    overflow-wrap: anywhere;
}

.t5-news-article-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px 16px;
    margin-top: 10px;
    color: var(--t5-primary);
    font-size: 11px;
    line-height: 1.8;
}

.t5-news-article-content {
    min-width: 0;
    font-size: 15px;
    line-height: 1.95;
    overflow-wrap: anywhere;
}

.t5-news-article-content p {
    margin: 0 0 18px;
}

.t5-news-article-content img {
    display: block;
    max-width: 100% !important;
    height: auto !important;
    margin: 18px auto;
    border-radius: 7px;
}

.t5-news-article-content a {
    color: var(--t5-primary);
}

.t5-news-article-content a:hover {
    text-decoration: underline;
}

.t5-news-article-content h2,
.t5-news-article-content h3 {
    margin: 24px 0 12px;
    line-height: 1.6;
}

.t5-news-article-content h2 {
    font-size: 21px;
}

.t5-news-article-content h3 {
    font-size: 18px;
}

.t5-news-article-content ul,
.t5-news-article-content ol {
    padding-left: 24px;
}

.t5-news-article-content blockquote {
    margin: 18px 0;
    padding: 12px 16px;
    border-left: 3px solid var(--t5-primary);
    background: #f5f9fc;
    color: #617086;
}

.t5-news-article-content iframe,
.t5-news-article-content video {
    max-width: 100%;
}

.t5-news-article-content pre {
    max-width: 100%;
    overflow: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.t5-news-article-content table {
    width: 100% !important;
    max-width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.t5-news-article-content th,
.t5-news-article-content td {
    padding: 7px;
    border: 1px solid #e6edf4;
    overflow-wrap: anywhere;
}

/* 上下篇 */

.t5-news-prev-next {
    display: grid;
    gap: 12px;
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid var(--t5-line);
    font-size: 13px;
    line-height: 1.8;
}

.t5-news-prev-next > div {
    min-width: 0;
    overflow-wrap: anywhere;
}

.t5-news-prev-next a {
    color: var(--t5-primary);
}

.t5-news-prev-next a:hover {
    text-decoration: underline;
}

.t5-news-navigation-empty {
    color: var(--t5-muted);
}

/* 相关资讯 */

.t5-related-news {
    margin-top: 20px;
    padding: 18px 20px;
}

.t5-news-related-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.t5-news-related-header h2 {
    margin: 0;
    font-size: 19px;
    font-weight: 500;
}

.t5-news-related-header > a {
    color: var(--t5-primary);
    font-size: 12px;
}

/* 右侧公共卡片 */

.t5-news-side-panel {
    min-width: 0;
    padding: 16px;
}

.t5-news-side-title {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
}

.t5-side-symbol {
    color: #3d8dff;
    font-size: 15px;
}

.t5-news-side-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.t5-side-more {
    color: var(--t5-primary) !important;
    font-size: 12px;
}

/* 右侧热门赛事 */

.t5-side-matches {
    margin: 0;
    padding: 0;
    list-style: none;
}

.t5-side-match {
    padding: 14px 0;
    border-bottom: 1px solid var(--t5-line);
}

.t5-side-match:last-child {
    border-bottom: 0;
}

.t5-side-match-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--t5-primary);
    font-size: 11px;
}

.t5-side-match-meta time {
    flex-shrink: 0;
}

.t5-side-league {
    min-width: 0;
    max-width: 120px;
    padding: 2px 9px;
    border-radius: 6px;
    background: #dcefff;
    overflow-wrap: anywhere;
    text-align: center;
}

.t5-side-match-teams {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        24px
        18px
        24px
        minmax(0, 1fr);
    align-items: center;
    gap: 4px;
    min-width: 0;
    margin-bottom: 12px;
}

.t5-side-match-teams img {
    display: block;
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.t5-side-match-teams .t5-vs {
    font-size: 13px;
    text-align: center;
}

.t5-side-team-name {
    min-width: 0;
    font-size: 11px;
    line-height: 1.6;
    overflow-wrap: anywhere;
    text-align: center;
}

.t5-side-match-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 34px;
    padding: 6px;
    border: 1px solid #81beff;
    border-radius: 7px;
    color: var(--t5-primary) !important;
    font-size: 12px;
}

.t5-side-match-button:hover {
    background: #f0f8ff;
}

.t5-side-match-unavailable {
    display: block;
    color: var(--t5-muted);
    font-size: 12px;
    text-align: center;
}

.t5-side-note {
    margin: 10px 0 0;
    color: var(--t5-muted);
    font-size: 11px;
    line-height: 1.7;
}

.t5-side-empty {
    padding: 20px 0 10px;
    color: var(--t5-muted);
    font-size: 12px;
}

/* 右侧录像 */

.t5-side-video-list {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

.t5-side-video-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--t5-line);
}

.t5-side-video-list li:last-child {
    border-bottom: 0;
}

.t5-side-video-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    min-width: 0;
}

.t5-side-video-title {
    min-width: 0;
    font-size: 12px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.t5-side-video-list .t5-play-icon {
    flex-shrink: 0;
}

.t5-side-video-list a:hover {
    color: var(--t5-primary);
}

.t5-side-video-unavailable {
    font-size: 12px;
    color: var(--t5-muted);
    overflow-wrap: anywhere;
}

/* 平板 */

@media (min-width: 701px) and (max-width: 900px) {
    .t5-news-layout {
        grid-template-columns: minmax(0, 1fr) 240px;
        gap: 14px;
    }

    .t5-news-list-panel,
    .t5-news-article {
        padding: 16px;
    }

    .t5-news-item {
        grid-template-columns: 135px minmax(0, 1fr);
        gap: 12px;
    }

    .t5-news-item-body {
        min-height: 90px;
    }

    .t5-news-item h2,
    .t5-news-item h3 {
        font-size: 14px;
    }

    .t5-news-item-summary {
        -webkit-line-clamp: 2;
    }

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

    .t5-news-side-panel {
        padding: 13px;
    }
}

/* 手机：正文优先，侧栏排在正文和相关资讯下方 */

@media (max-width: 700px) {
    .t5-news-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .t5-news-list-panel {
        padding: 16px 12px;
    }

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

    .t5-news-item {
        grid-template-columns: 110px minmax(0, 1fr);
        gap: 11px;
        padding: 15px 0;
    }

    .t5-news-item-body {
        min-height: 74px;
    }

    .t5-news-item h2,
    .t5-news-item h3 {
        font-size: 14px;
        line-height: 1.65;
    }

    .t5-news-item-summary {
        margin: 6px 0;
        font-size: 12px;
        -webkit-line-clamp: 2;
    }

    .t5-news-item-meta {
        gap: 4px 8px;
        font-size: 11px;
    }

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

    .t5-news-article-header h1 {
        font-size: 22px;
        line-height: 1.6;
        text-align: left;
    }

    .t5-news-article-meta {
        justify-content: flex-start;
        font-size: 11px;
    }

    .t5-news-article-content {
        font-size: 15px;
        line-height: 1.9;
    }

    .t5-news-article-content h2 {
        font-size: 20px;
    }

    .t5-news-article-content h3 {
        font-size: 17px;
    }

    .t5-news-prev-next {
        font-size: 13px;
    }

    .t5-related-news {
        padding: 16px 12px;
    }

    .t5-news-side-panel {
        padding: 16px;
    }

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

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

    .t5-side-match-button {
        min-height: 38px;
        font-size: 13px;
    }

    .t5-side-video-title {
        font-size: 13px;
    }

    .t5-pagination .pagination {
        gap: 6px;
    }

    .t5-pagination .pagination a,
    .t5-pagination .pagination span {
        min-width: 34px;
        min-height: 36px;
    }
}

@media (max-width: 360px) {
    .t5-news-item {
        grid-template-columns: 90px minmax(0, 1fr);
        gap: 9px;
    }

    .t5-news-item h2,
    .t5-news-item h3 {
        font-size: 13px;
    }

    .t5-news-article-header h1 {
        font-size: 20px;
    }
}
