/* ==========================================================================
   HSR 体育资讯模板  ——  基于 Bootstrap 5 的补充样式
   配色：深色导航 + 蓝色主色 + 琥珀色强调，参考 highspeedrailusa.com
   ========================================================================== */

:root {
    --hsr-dark: #0f1621;
    --hsr-dark-2: #161f2e;
    --hsr-primary: #1a56db;
    --hsr-primary-dark: #1443ad;
    --hsr-accent: #ffb020;
    --hsr-body: #f5f7fa;
    --hsr-text: #1f2937;
    --hsr-muted: #6b7280;
    --hsr-line: #e6e9ef;
    --hsr-radius: 10px;
    --hsr-shadow: 0 2px 14px rgba(16, 24, 40, .06);
    --hsr-shadow-lg: 0 10px 30px rgba(16, 24, 40, .12);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background: var(--hsr-body);
    color: var(--hsr-text);
    font-size: 15px;
    line-height: 1.75;
}

a { color: var(--hsr-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--hsr-primary-dark); }
img { max-width: 100%; }

.hsr-container { max-width: 1180px; }

/* ---------- 通用工具 ---------- */
.hsr-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.hsr-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hsr-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.hsr-btn-accent {
    background: var(--hsr-accent);
    border: 0;
    color: #1c1204;
    font-weight: 600;
    padding: .55rem 1.4rem;
    border-radius: 999px;
    display: inline-block;
    transition: transform .2s, box-shadow .2s;
}
.hsr-btn-accent:hover {
    color: #1c1204;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 176, 32, .38);
}

/* ---------- 顶部导航 ---------- */
.hsr-header {
    background: var(--hsr-dark);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
    transition: box-shadow .25s ease;
}
.hsr-header.scrolled { box-shadow: 0 6px 20px rgba(0, 0, 0, .3); }
.hsr-header .navbar-brand {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: .5px;
}
.hsr-header .navbar-brand span { color: var(--hsr-accent); }
.hsr-header .nav-link {
    color: rgba(255, 255, 255, .82);
    font-size: 15px;
    padding: .5rem .9rem !important;
    border-radius: 6px;
}
.hsr-header .nav-link:hover,
.hsr-header .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, .1);
}
.hsr-header .dropdown-menu {
    background: var(--hsr-dark-2);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 8px;
}
.hsr-header .dropdown-item { color: rgba(255, 255, 255, .8); font-size: 14px; }
.hsr-header .dropdown-item:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.hsr-search .form-control {
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .16);
    color: #fff;
    height: 36px;
    width: 160px;
}
.hsr-search .form-control::placeholder { color: rgba(255, 255, 255, .5); }
.hsr-search .form-control:focus {
    background: rgba(255, 255, 255, .16);
    color: #fff;
    box-shadow: none;
    border-color: var(--hsr-accent);
}
.hsr-search .btn { border: 0; background: var(--hsr-primary); color: #fff; height: 36px; }

/* ---------- Hero 首屏 ---------- */
.hsr-hero {
    background: linear-gradient(120deg, #0f1621 0%, #1b2b48 55%, #1a56db 130%);
    color: #fff;
    padding: 62px 0;
    position: relative;
    overflow: hidden;
}
.hsr-hero::after {
    content: "";
    position: absolute;
    right: -120px;
    top: -120px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 176, 32, .22), transparent 70%);
}
.hsr-hero h1 { font-size: 2.3rem; font-weight: 700; line-height: 1.3; }
.hsr-hero .hsr-hero-sub {
    color: var(--hsr-accent);
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: .8rem;
}
.hsr-hero p.lead { color: rgba(255, 255, 255, .8); font-size: 1rem; }
.hsr-hero-img img { border-radius: 14px; box-shadow: var(--hsr-shadow-lg); }
@media (max-width: 767.98px) {
    .hsr-hero { padding: 40px 0; text-align: center; }
    .hsr-hero h1 { font-size: 1.6rem; }
}

/* ---------- 数据指标 ---------- */
.hsr-stats { background: #fff; padding: 46px 0; }
.hsr-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
.hsr-stats-item {
    background: var(--hsr-body);
    border: 1px solid var(--hsr-line);
    border-radius: var(--hsr-radius);
    padding: 22px 18px;
    text-align: center;
    transition: transform .25s, box-shadow .25s;
}
.hsr-stats-item:hover { transform: translateY(-4px); box-shadow: var(--hsr-shadow); }
.hsr-stats-item i { font-size: 26px; color: var(--hsr-primary); }
.hsr-stats-item .num { font-size: 1.6rem; font-weight: 700; margin: 8px 0 2px; }
.hsr-stats-item .label { color: var(--hsr-muted); font-size: 13px; margin: 0; }
@media (max-width: 767.98px) {
    .hsr-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 区块标题 ---------- */
.hsr-section { padding: 46px 0; }
.hsr-section-title { text-align: center; margin-bottom: 34px; }
.hsr-section-title h2 {
    font-size: 1.6rem;
    font-weight: 700;
    display: inline-block;
    padding-bottom: 12px;
    position: relative;
}
.hsr-section-title h2::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 52px;
    height: 3px;
    border-radius: 3px;
    background: var(--hsr-accent);
}
.hsr-section-title p { color: var(--hsr-muted); margin: 6px 0 0; }

/* ---------- 卡片 / 列表 ---------- */
.hsr-box {
    background: #fff;
    border: 1px solid var(--hsr-line);
    border-radius: var(--hsr-radius);
    box-shadow: var(--hsr-shadow);
    margin-bottom: 22px;
    overflow: hidden;
}
.hsr-box-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 18px;
    border-bottom: 1px solid var(--hsr-line);
}
.hsr-box-head h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    padding-left: 11px;
    border-left: 4px solid var(--hsr-primary);
    line-height: 1.2;
}
.hsr-box-head .more { font-size: 13px; color: var(--hsr-muted); }
.hsr-box-head .more:hover { color: var(--hsr-primary); }
.hsr-box-body { padding: 18px; }

/* 卡片式文章 */
.hsr-card {
    background: #fff;
    border: 1px solid var(--hsr-line);
    border-radius: var(--hsr-radius);
    overflow: hidden;
    height: 100%;
    transition: transform .25s, box-shadow .25s;
}
.hsr-card:hover { transform: translateY(-4px); box-shadow: var(--hsr-shadow-lg); }
.hsr-card-thumb { display: block; position: relative; padding-top: 58%; overflow: hidden; background: #eceff4; }
.hsr-card-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
}
.hsr-card:hover .hsr-card-thumb img { transform: scale(1.06); }
.hsr-card-body { padding: 14px 16px 16px; }
.hsr-card-body h4 { font-size: 1rem; font-weight: 600; line-height: 1.5; margin: 0 0 8px; }
.hsr-card-body h4 a { color: var(--hsr-text); }
.hsr-card-body h4 a:hover { color: var(--hsr-primary); }
.hsr-card-body .desc { color: var(--hsr-muted); font-size: 13px; margin: 0 0 10px; }
.hsr-meta { font-size: 12px; color: #9aa1ac; display: flex; gap: 14px; align-items: center; }
.hsr-meta i { margin-right: 4px; }

/* 横向图文列表 */
.hsr-list-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px dashed var(--hsr-line);
}
.hsr-list-item:last-child { border-bottom: 0; }
.hsr-list-thumb {
    flex: 0 0 200px;
    position: relative;
    padding-top: 118px;
    border-radius: 8px;
    overflow: hidden;
    background: #eceff4;
}
.hsr-list-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
}
.hsr-list-item:hover .hsr-list-thumb img { transform: scale(1.06); }
.hsr-list-content { flex: 1 1 auto; min-width: 0; }
.hsr-list-content h4 { font-size: 1.08rem; font-weight: 600; margin: 0 0 8px; line-height: 1.5; }
.hsr-list-content h4 a { color: var(--hsr-text); }
.hsr-list-content h4 a:hover { color: var(--hsr-primary); }
.hsr-list-content .desc { color: var(--hsr-muted); font-size: 13.5px; margin: 0 0 10px; }
@media (max-width: 575.98px) {
    .hsr-list-item { flex-direction: column; gap: 10px; }
    .hsr-list-thumb { flex: none; padding-top: 56%; }
}

/* 侧栏纯文字榜单 */
.hsr-rank { list-style: none; margin: 0; padding: 0; counter-reset: rank; }
.hsr-rank li {
    counter-increment: rank;
    display: flex;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px dashed var(--hsr-line);
    font-size: 14px;
}
.hsr-rank li:last-child { border-bottom: 0; }
.hsr-rank li::before {
    content: counter(rank);
    flex: 0 0 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 4px;
    background: #eef1f6;
    color: var(--hsr-muted);
    font-size: 12px;
    font-weight: 600;
    margin-top: 3px;
}
.hsr-rank li:nth-child(-n+3)::before { background: var(--hsr-accent); color: #1c1204; }
.hsr-rank li a { color: var(--hsr-text); }
.hsr-rank li a:hover { color: var(--hsr-primary); }

/* 标签云 */
.hsr-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.hsr-tags a {
    display: inline-block;
    padding: 4px 12px;
    border: 1px solid var(--hsr-line);
    border-radius: 999px;
    font-size: 13px;
    color: var(--hsr-muted);
    background: #fafbfc;
}
.hsr-tags a:hover { background: var(--hsr-primary); border-color: var(--hsr-primary); color: #fff; }

/* ---------- 面包屑 ---------- */
.hsr-crumb { padding: 14px 0; font-size: 13px; color: var(--hsr-muted); }
.hsr-crumb ul { margin: 0; padding: 0; flex-wrap: wrap; }
.hsr-crumb li + li::before { content: "/"; margin: 0 8px; color: #c7ccd4; }
.hsr-crumb a { color: var(--hsr-muted); }
.hsr-crumb a:hover { color: var(--hsr-primary); }

/* ---------- 文章详情 ---------- */
.hsr-article-title { font-size: 1.7rem; font-weight: 700; line-height: 1.45; margin: 0 0 14px; }
.hsr-article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 13px;
    color: var(--hsr-muted);
    padding-bottom: 16px;
    border-bottom: 1px solid var(--hsr-line);
    margin-bottom: 20px;
}
.hsr-content { font-size: 16px; line-height: 1.95; color: #2b3441; word-wrap: break-word; }
.hsr-content p { margin-bottom: 1.1rem; }
.hsr-content img { height: auto !important; border-radius: 8px; margin: 10px 0; display: block; }
.hsr-content h2, .hsr-content h3, .hsr-content h4 {
    font-weight: 700;
    margin: 1.6rem 0 .9rem;
    line-height: 1.4;
}
.hsr-content h2 { font-size: 1.32rem; }
.hsr-content h3 { font-size: 1.16rem; }
.hsr-content blockquote {
    border-left: 4px solid var(--hsr-accent);
    background: #fffaf0;
    padding: 12px 16px;
    color: #57534e;
    margin: 1.2rem 0;
}
.hsr-content table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; }
.hsr-content table td, .hsr-content table th { border: 1px solid var(--hsr-line); padding: 8px 10px; }

.hsr-nextprev { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 24px; }
.hsr-nextprev div {
    background: #fafbfc;
    border: 1px solid var(--hsr-line);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 14px;
}
.hsr-nextprev p { color: var(--hsr-muted); font-size: 12px; margin: 0 0 4px; }
@media (max-width: 575.98px) { .hsr-nextprev { grid-template-columns: 1fr; } }

/* ---------- 分页（Paginationm 输出 .page-control > .pagination） ---------- */
.page-control { display: flex; justify-content: center; margin-top: 24px; }
.page-control .pagination { flex-wrap: wrap; gap: 6px; margin: 0; }
.page-control .page-item { list-style: none; }
.page-control .page-link,
.page-control .page-item.active .page-link {
    border: 1px solid var(--hsr-line);
    border-radius: 6px;
    color: var(--hsr-text);
    padding: 6px 13px;
    font-size: 14px;
}
.page-control .page-link:hover { background: var(--hsr-primary); border-color: var(--hsr-primary); color: #fff; }
.page-control .page-item.active .page-link { background: var(--hsr-primary); border-color: var(--hsr-primary); color: #fff; }

/* ---------- 空状态 ---------- */
.hsr-empty { text-align: center; padding: 46px 16px; color: #9aa1ac; }
.hsr-empty i { font-size: 40px; display: block; margin-bottom: 12px; color: #d5dae2; }

/* ---------- 页脚 ---------- */
.hsr-footer { background: var(--hsr-dark); color: rgba(255, 255, 255, .68); padding: 40px 0 22px; margin-top: 46px; }
.hsr-footer h5 { color: #fff; font-size: 1rem; font-weight: 600; margin-bottom: 16px; }
.hsr-footer a { color: rgba(255, 255, 255, .68); font-size: 14px; }
.hsr-footer a:hover { color: var(--hsr-accent); }
.hsr-footer ul { list-style: none; padding: 0; margin: 0; }
.hsr-footer ul li { margin-bottom: 8px; }
.hsr-footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; }
.hsr-copy {
    border-top: 1px solid rgba(255, 255, 255, .1);
    margin-top: 26px;
    padding-top: 18px;
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, .5);
}

/* 返回顶部 */
.hsr-totop {
    position: fixed;
    right: 18px;
    bottom: 24px;
    width: 42px;
    height: 42px;
    line-height: 42px;
    text-align: center;
    border-radius: 50%;
    background: var(--hsr-primary);
    color: #fff;
    box-shadow: var(--hsr-shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility .25s;
    z-index: 99;
}
.hsr-totop.show { opacity: 1; visibility: visible; }
.hsr-totop:hover { color: #fff; background: var(--hsr-primary-dark); }
