/* ==========================================================================
   Tech Theme — com.sxxs.cn PC 端全站高级科技风主题层
   --------------------------------------------------------------------------
   策略：保留 news-blog.css 全部组件类名（.news-card / .news-panel / .news-hero …）
        仅重写视觉，使 143 个页面自动继承，零模板结构改动。
   依赖：沿用 Bootstrap 3.4.1（不引入 BS5）
   作用域：body.news-blog-page 及其后代
   ========================================================================== */

/* ---------- 设计令牌 ---------- */
:root {
    --th-bg-0: #05070d;
    --th-bg-1: #080d18;
    --th-bg-2: #0d1524;
    --th-surface: rgba(14, 22, 38, .72);
    --th-surface-solid: #0e1626;
    --th-surface-2: rgba(20, 30, 50, .58);
    --th-cyan: #22d3ee;
    --th-blue: #3b82f6;
    --th-violet: #8b5cf6;
    --th-line: rgba(34, 211, 238, .14);
    --th-line-2: rgba(34, 211, 238, .3);
    --th-line-strong: rgba(34, 211, 238, .5);
    --th-text: #e6eefc;
    --th-text-2: #a8b8d4;
    --th-text-dim: #74869f;
    --th-glow: 0 0 22px rgba(34, 211, 238, .3);
    --th-shadow: 0 18px 44px rgba(0, 0, 0, .46);
    --th-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    --th-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;

    /* 覆盖旧变量，让遗留组件自动跟随 */
    --nb-ink: var(--th-text);
    --nb-muted: var(--th-text-2);
    --nb-accent: var(--th-cyan);
    --nb-paper: var(--th-bg-0);
    --nb-card: var(--th-surface-solid);
    --nb-line: var(--th-line);
    --nb-serif: var(--th-sans);
    --nb-sans: var(--th-sans);
}

/* ---------- 全局底色（通铺，贯穿整页）---------- */
html { background: #05070d; }

/* body 层兜底（避免 Bootstrap 主题白底露出）*/
body.page-container-bg-solid,
body.news-blog-page {
    background-color: #05070d !important;
    background-image:
        radial-gradient(1200px 560px at 78% -6%, rgba(34, 211, 238, .12), transparent 62%),
        radial-gradient(1000px 520px at 12% 22%, rgba(59, 130, 246, .11), transparent 64%),
        radial-gradient(1100px 600px at 88% 68%, rgba(139, 92, 246, .1), transparent 66%),
        radial-gradient(900px 500px at 8% 96%, rgba(34, 211, 238, .08), transparent 68%),
        linear-gradient(180deg, #05070d 0%, #070c17 34%, #080e1c 62%, #05070d 100%) !important;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
}

/* 主容器（实际挂 news-blog-page 的元素）*/
.news-blog-page {
    position: relative;
    min-height: 100vh;
    background-color: #05070d;
    background-image:
        radial-gradient(1200px 560px at 78% -6%, rgba(34, 211, 238, .12), transparent 62%),
        radial-gradient(1000px 520px at 12% 22%, rgba(59, 130, 246, .11), transparent 64%),
        radial-gradient(1100px 600px at 88% 68%, rgba(139, 92, 246, .1), transparent 66%),
        radial-gradient(900px 500px at 8% 96%, rgba(34, 211, 238, .08), transparent 68%),
        linear-gradient(180deg, #05070d 0%, #070c17 34%, #080e1c 62%, #05070d 100%);
    background-repeat: no-repeat;
    background-size: cover;
    color: var(--th-text);
    font-family: var(--th-sans);
    font-size: 15px;
    line-height: 1.72;
    -webkit-font-smoothing: antialiased;
}

/* 内容层级提升（移除网格纹理，保留光晕氛围）*/
.news-blog-page > * { position: relative; z-index: 1; }

/* 主内容区背景与页面一致（避免出现分块色差）*/
.news-main { background: transparent; }
.news-root-home { background: transparent !important; padding: 0 0 82px; }

/* ---------- 链接与焦点 ---------- */
.news-blog-page a {
    color: inherit;
    text-decoration: none;
    transition: color .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.news-blog-page a:hover { color: var(--th-cyan); }

.news-blog-page a:focus-visible,
.news-blog-page button:focus-visible,
.news-blog-page input:focus-visible {
    outline: 2px solid var(--th-cyan);
    outline-offset: 3px;
}

/* ---------- 容器 ---------- */
.news-container { width: min(1200px, calc(100% - 48px)); margin: 0 auto; }

/* ==========================================================================
   顶部导航（header.html 内联样式已改，此处为兜底与增强）
   ========================================================================== */
.xr-site-nav {
    position: relative;
    background: rgba(6, 10, 20, .84) !important;
    border-bottom: 1px solid var(--th-line-2) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.xr-site-nav::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--th-cyan), var(--th-violet), transparent);
    opacity: .55;
}

.xr-site-nav .navbar-nav > li > a {
    display: flex;
    align-items: center;
    gap: 7px;
    height: 44px;
    padding: 0 15px;
    border: 1px solid transparent;
    border-radius: 3px;
    color: var(--th-text-2) !important;
    font-size: 13px;
    font-weight: 600;
    transition: color .2s ease, background .2s ease, border-color .2s ease;
}

.xr-site-nav .navbar-nav > li > a:hover,
.xr-site-nav .navbar-nav > li.active > a {
    border-color: var(--th-line-2);
    background: rgba(34, 211, 238, .09);
    color: var(--th-cyan) !important;
    box-shadow: var(--th-glow);
}

/* 搜索框 */
.page-header-menu .xr-site-search .input-group {
    border: 1px solid var(--th-line-2) !important;
    background: rgba(10, 16, 30, .7) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.page-header-menu .xr-site-search .form-control {
    color: var(--th-text) !important;
    background: transparent !important;
}

.page-header-menu .xr-site-search .form-control::placeholder { color: var(--th-text-dim) !important; }

.page-header-menu .xr-site-search .btn {
    color: var(--th-cyan) !important;
    background: transparent !important;
}

.page-header-menu .xr-site-search .input-group:focus-within {
    border-color: var(--th-cyan) !important;
    box-shadow: var(--th-glow);
}

/* ==========================================================================
   主区域
   ========================================================================== */
.news-main { min-height: 65vh; padding-top: 44px; padding-bottom: 84px; }

/* ---------- Eyebrow 小标签 ---------- */
.news-eyebrow {
    display: block;
    color: var(--th-cyan);
    font-family: var(--th-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
}

/* ---------- Hero（非首页的通用 hero）---------- */
.news-hero {
    position: relative;
    overflow: hidden;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 36px;
    margin-bottom: 48px;
    padding: 42px 50px;
    border: 1px solid var(--th-line-2);
    border-radius: 4px;
    background:
        radial-gradient(760px 340px at 82% -22%, rgba(59, 130, 246, .24), transparent 62%),
        linear-gradient(150deg, rgba(13, 21, 36, .94), rgba(8, 13, 24, .92));
    box-shadow: var(--th-shadow);
}

.news-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(circle at 24% 28%, rgba(34, 211, 238, .1), transparent 58%);
}

.news-hero > * { position: relative; z-index: 1; }

.news-hero h1,
.news-category-intro h1 {
    max-width: 620px;
    margin: 12px 0;
    color: var(--th-text);
    font: 800 clamp(32px, 4.4vw, 54px)/1.1 var(--th-sans);
    letter-spacing: -.035em;
}

.news-hero p,
.news-category-intro p { margin: 10px 0 0; color: var(--th-text-2); }

/* Hero 搜索 */
.news-hero-search {
    display: flex;
    align-items: center;
    min-width: 285px;
    border: 1px solid var(--th-line-2);
    border-radius: 3px;
    background: rgba(10, 16, 30, .68);
    padding: 0 6px;
}

.news-hero-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 11px 8px;
    color: var(--th-text);
    font: inherit;
}

.news-hero-search input::placeholder { color: var(--th-text-dim); }
.news-hero-search button { white-space: nowrap; padding: 11px 12px; }

/* ==========================================================================
   布局
   ========================================================================== */
.news-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 288px;
    gap: 48px;
    align-items: start;
}

.news-feed, .news-article { min-width: 0; }

/* ---------- 区块标题 ---------- */
.news-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--th-line);
}

.news-section-heading h1,
.news-section-heading h2,
.news-panel h2 {
    margin: 6px 0 0;
    color: var(--th-text);
    font: 700 26px/1.2 var(--th-sans);
    letter-spacing: -.03em;
}

.news-section-heading > a {
    color: var(--th-cyan);
    font-family: var(--th-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    white-space: nowrap;
}

.news-section-heading > a:hover { text-shadow: 0 0 14px rgba(34, 211, 238, .6); }

/* ==========================================================================
   文章卡片（复用 .news-card）
   ========================================================================== */
.news-card {
    position: relative;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 22px;
    margin: 0 0 16px;
    padding: 18px;
    border: 1px solid var(--th-line);
    border-radius: 4px;
    background: var(--th-surface);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
    transition: transform .28s cubic-bezier(.16, 1, .3, 1),
                border-color .28s ease,
                box-shadow .28s ease;
}

/* 左侧发光条 */
.news-card::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--th-cyan), var(--th-violet));
    transform: scaleY(0);
    transform-origin: top;
    transition: transform .38s cubic-bezier(.16, 1, .3, 1);
}

.news-card:hover {
    transform: translateY(-4px);
    border-color: var(--th-line-2);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .5), var(--th-glow);
}

.news-card:hover::before { transform: scaleY(1); }

.news-card__image {
    display: block;
    aspect-ratio: 4 / 3;
    min-height: 0;
    overflow: hidden;
    border-radius: 3px;
    background: linear-gradient(135deg, #101a2c, #0a1220);
}

.news-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    object-fit: cover;
    transition: transform .55s cubic-bezier(.16, 1, .3, 1);
}

.news-card:hover .news-card__image img { transform: scale(1.06); }

.news-card__body { min-width: 0; align-self: center; }

/* 元信息 */
.news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    color: var(--th-text-dim);
    font-family: var(--th-mono);
    font-size: 10.5px;
    letter-spacing: .04em;
}

.news-meta a { color: var(--th-cyan); font-weight: 700; }

.news-card h2,
.news-card h3 {
    margin: 9px 0;
    color: var(--th-text);
    font: 700 21px/1.36 var(--th-sans);
    letter-spacing: -.022em;
}

.news-card h2 a:hover,
.news-card h3 a:hover { color: var(--th-cyan); }

.news-card p {
    margin: 0 0 13px;
    color: var(--th-text-2);
    font-size: 13px;
    line-height: 1.72;
}

.news-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--th-cyan) !important;
    font-family: var(--th-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
}

.news-read-more i { transition: transform .22s ease; }
.news-read-more:hover i { transform: translateX(5px); }

/* ==========================================================================
   侧栏面板（复用 .news-panel）
   ========================================================================== */
.news-panel {
    position: relative;
    margin: 0 0 16px;
    padding: 24px;
    border: 1px solid var(--th-line);
    border-radius: 4px;
    background: var(--th-surface);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: border-color .28s ease, box-shadow .28s ease;
}

.news-panel:hover { border-color: var(--th-line-2); box-shadow: 0 12px 32px rgba(0, 0, 0, .38); }

.news-panel h2 {
    margin: 6px 0 15px;
    font-size: 20px;
    padding-bottom: 11px;
    border-bottom: 1px solid var(--th-line);
}

.news-panel > p { color: var(--th-text-2); font-size: 13px; }

/* 列表 */
.news-category-list,
.news-popular-list { margin: 0; padding: 0; list-style: none; }

.news-category-list li { border-top: 1px solid var(--th-line); }
.news-category-list li:first-child { border-top: 0; }

.news-category-list a {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    color: var(--th-text-2);
    font-size: 13px;
    transition: color .2s ease, padding-left .2s ease;
}

.news-category-list a:hover { color: var(--th-cyan); padding-left: 5px; }
.news-category-list i { color: var(--th-cyan); opacity: .75; }

.news-popular-list { counter-reset: popular; }
.news-popular-list li { counter-increment: popular; border-top: 1px solid var(--th-line); }
.news-popular-list li:first-child { border-top: 0; }

.news-popular-list a {
    display: grid;
    grid-template-columns: 26px 1fr;
    gap: 0 9px;
    padding: 12px 0;
    transition: padding-left .2s ease;
}

.news-popular-list a:hover { padding-left: 5px; }

.news-popular-list a::before {
    grid-row: span 2;
    content: counter(popular, decimal-leading-zero);
    color: var(--th-cyan);
    font: 700 15px/1.35 var(--th-mono);
    opacity: .8;
}

.news-popular-list span {
    color: var(--th-text-2);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.52;
    transition: color .2s ease;
}

.news-popular-list a:hover span { color: var(--th-cyan); }
.news-popular-list small { color: var(--th-text-dim); font-family: var(--th-mono); font-size: 10px; }

/* ==========================================================================
   面包屑 / 分类介绍
   ========================================================================== */
.news-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 26px;
    color: var(--th-text-dim);
    font-family: var(--th-mono);
    font-size: 11px;
    letter-spacing: .04em;
}

.news-breadcrumb a { color: var(--th-text-2); }
.news-breadcrumb a:hover { color: var(--th-cyan); }
.news-breadcrumb span { color: rgba(34, 211, 238, .5); }

.news-category-intro {
    position: relative;
    overflow: hidden;
    margin: 0 0 36px;
    padding: 36px 42px;
    border: 1px solid var(--th-line-2);
    border-radius: 4px;
    background:
        radial-gradient(680px 300px at 86% -30%, rgba(59, 130, 246, .22), transparent 62%),
        linear-gradient(150deg, rgba(13, 21, 36, .94), rgba(8, 13, 24, .92));
    box-shadow: var(--th-shadow);
}

.news-category-intro::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(circle at 22% 30%, rgba(34, 211, 238, .09), transparent 58%);
}

.news-category-intro > * { position: relative; z-index: 1; }

/* ==========================================================================
   分页（复用 .news-pagination）
   ========================================================================== */
.news-pagination { margin: 30px 0; text-align: center; }

.news-pagination a,
.news-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    margin: 3px;
    padding: 0 11px;
    border: 1px solid var(--th-line);
    border-radius: 3px;
    background: var(--th-surface);
    color: var(--th-text-2);
    font-family: var(--th-mono);
    font-size: 12px;
    transition: all .22s ease;
}

.news-pagination a:hover {
    border-color: var(--th-cyan);
    background: rgba(34, 211, 238, .12);
    color: var(--th-cyan);
    box-shadow: var(--th-glow);
}

.news-pagination .active {
    border-color: var(--th-cyan);
    background: linear-gradient(100deg, var(--th-cyan), var(--th-blue));
    color: #04121f;
    font-weight: 700;
    box-shadow: 0 4px 18px rgba(34, 211, 238, .34);
}

/* ==========================================================================
   标签 / 搜索
   ========================================================================== */
.news-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }

.news-tags a {
    padding: 5px 11px;
    border: 1px solid var(--th-line);
    border-radius: 2px;
    background: rgba(34, 211, 238, .04);
    color: var(--th-text-dim);
    font-family: var(--th-mono);
    font-size: 10px;
    letter-spacing: .04em;
    transition: all .2s ease;
}

.news-tags a:hover {
    border-color: var(--th-cyan);
    background: rgba(34, 211, 238, .12);
    color: var(--th-cyan);
}

.news-search-form {
    display: flex;
    align-items: center;
    width: min(100%, 540px);
    margin: 0 0 30px;
    padding: 0 6px;
    border: 1px solid var(--th-line-2);
    border-radius: 3px;
    background: rgba(10, 16, 30, .68);
}

.news-search-form input {
    width: 100%;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 12px 8px;
    color: var(--th-text);
    font: inherit;
}

.news-search-form input::placeholder { color: var(--th-text-dim); }
.news-search-form button { padding: 12px 15px; color: var(--th-cyan); }

.news-header-search {
    display: flex;
    align-items: center;
    min-width: 190px;
    border: 1px solid var(--th-line);
    border-radius: 3px;
    background: rgba(10, 16, 30, .6);
    padding: 0 6px;
}

.news-header-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 10px 6px;
    color: var(--th-text);
    font: inherit;
}

.news-header-search input::placeholder { color: var(--th-text-dim); }

/* ==========================================================================
   文章详情（复用 .news-article）
   ========================================================================== */
.news-article {
    position: relative;
    padding: clamp(24px, 5vw, 52px);
    border: 1px solid var(--th-line);
    border-radius: 4px;
    background: var(--th-surface);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.news-article__header { padding-bottom: 30px; border-bottom: 1px solid var(--th-line); }

.news-article__header h1 {
    margin: 10px 0 15px;
    color: var(--th-text);
    font: 800 clamp(30px, 4.3vw, 48px)/1.16 var(--th-sans);
    letter-spacing: -.035em;
}

.news-article__summary {
    max-width: 740px;
    margin: 22px 0 0;
    color: var(--th-text-2);
    font: 400 16px/1.72 var(--th-sans);
    padding-left: 16px;
    border-left: 2px solid var(--th-line-2);
}

.news-article__cover {
    display: block;
    width: 100%;
    max-height: 460px;
    margin-top: 26px;
    object-fit: cover;
    border-radius: 3px;
}

.news-article__content {
    padding: 28px 0;
    color: #cfdaec;
    font-size: 16px;
    line-height: 1.92;
    overflow-wrap: anywhere;
}

.news-article__content p { margin: 0 0 1.2em; }

.news-article__content h2,
.news-article__content h3 {
    margin: 1.7em 0 .75em;
    color: var(--th-text);
    font-family: var(--th-sans);
    font-weight: 700;
    line-height: 1.32;
}

.news-article__content h2 { font-size: 24px; }
.news-article__content h3 { font-size: 19px; }
.news-article__content img { max-width: 100%; height: auto; border-radius: 3px; }

.news-article__content blockquote {
    margin: 1.6em 0;
    padding: 14px 22px;
    border-left: 3px solid var(--th-cyan);
    border-radius: 0 3px 3px 0;
    background: rgba(34, 211, 238, .055);
    color: var(--th-text-2);
}

.news-article__content a { color: var(--th-cyan); border-bottom: 1px solid rgba(34, 211, 238, .34); }
.news-article__content a:hover { border-bottom-color: var(--th-cyan); }

.news-article__content code {
    padding: 2px 6px;
    border: 1px solid var(--th-line);
    border-radius: 3px;
    background: rgba(34, 211, 238, .07);
    color: var(--th-cyan);
    font-family: var(--th-mono);
    font-size: .88em;
}

.news-article__content pre {
    padding: 16px 18px;
    border: 1px solid var(--th-line);
    border-radius: 3px;
    background: rgba(3, 6, 12, .82);
    overflow-x: auto;
}

.news-article__content pre code { border: 0; background: none; padding: 0; }

.news-article__tags { padding: 20px 0; border-top: 1px solid var(--th-line); }

/* ---------- 反馈 / 操作按钮 ---------- */
.news-feedback {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 22px 0;
    border-top: 1px solid var(--th-line);
    border-bottom: 1px solid var(--th-line);
}

.news-feedback__vote {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    color: var(--th-text-2);
    font-size: 12px;
}

.news-action {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    border: 1px solid var(--th-line);
    border-radius: 3px;
    background: rgba(34, 211, 238, .045);
    color: var(--th-text-2) !important;
    font-size: 12px;
    transition: all .22s ease;
}

.news-action:hover {
    border-color: var(--th-cyan);
    background: rgba(34, 211, 238, .13);
    color: var(--th-cyan) !important;
    box-shadow: var(--th-glow);
}

.news-action b { color: var(--th-cyan); }

.news-action--donate { border-color: rgba(139, 92, 246, .42); color: #c4b5fd !important; }
.news-action--donate:hover { border-color: var(--th-violet); color: #ddd6fe !important; box-shadow: 0 0 22px rgba(139, 92, 246, .34); }

/* ---------- 上下篇 ---------- */
.news-prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 22px 0; }

.news-prevnext > div {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--th-line);
    border-radius: 3px;
    background: var(--th-surface-2);
    transition: border-color .24s ease, transform .24s ease;
}

.news-prevnext > div:hover { border-color: var(--th-line-2); transform: translateY(-2px); }

.news-prevnext small {
    display: block;
    margin-bottom: 6px;
    color: var(--th-text-dim);
    font-family: var(--th-mono);
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.news-prevnext a,
.news-prevnext span {
    display: block;
    overflow: hidden;
    color: var(--th-text-2);
    font-size: 12.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------- 相关阅读 ---------- */
.news-comments, .news-related { margin-top: 42px; }
.news-related__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

.news-related-card {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 4px 13px;
    align-items: center;
    padding: 11px;
    border: 1px solid var(--th-line);
    border-radius: 3px;
    background: var(--th-surface-2);
    color: var(--th-text-2);
    font-size: 12px;
    font-weight: 600;
    transition: border-color .24s ease, transform .24s ease;
}

.news-related-card:hover { border-color: var(--th-line-2); transform: translateY(-2px); color: var(--th-cyan); }
.news-related-card img { grid-row: span 2; width: 74px; height: 58px; object-fit: cover; border-radius: 2px; }
.news-related-card small { color: var(--th-text-dim); font-family: var(--th-mono); font-size: 10px; font-weight: 400; }

/* ==========================================================================
   页脚
   ========================================================================== */
.news-footer,
.page-footer {
    position: relative;
    padding: 26px 0;
    border-top: 1px solid var(--th-line) !important;
    background: rgba(5, 8, 15, .9) !important;
    color: var(--th-text-dim) !important;
    font-size: 11.5px;
}

.news-footer::before,
.page-footer::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--th-cyan), var(--th-violet), transparent);
    opacity: .45;
}

.news-footer a, .page-footer a { color: var(--th-text-2) !important; }
.news-footer a:hover, .page-footer a:hover { color: var(--th-cyan) !important; }
.news-footer__meta { margin-top: 6px; color: var(--th-text-dim); }

/* 回到顶部 */
.scroll-to-top {
    border: 1px solid var(--th-line-2) !important;
    background: rgba(10, 16, 30, .86) !important;
    color: var(--th-cyan) !important;
    backdrop-filter: blur(10px);
}

.scroll-to-top:hover {
    background: rgba(34, 211, 238, .16) !important;
    box-shadow: var(--th-glow);
}

/* ==========================================================================
   表单元素（搜索、评论、会员等通用）
   ========================================================================== */
.news-blog-page input[type="text"],
.news-blog-page input[type="password"],
.news-blog-page input[type="email"],
.news-blog-page input[type="search"],
.news-blog-page textarea,
.news-blog-page select {
    border: 1px solid var(--th-line);
    border-radius: 3px;
    background: rgba(10, 16, 30, .6);
    color: var(--th-text);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.news-blog-page input:focus,
.news-blog-page textarea:focus,
.news-blog-page select:focus {
    border-color: var(--th-cyan);
    box-shadow: var(--th-glow);
    outline: none;
}

.news-blog-page ::placeholder { color: var(--th-text-dim); }

.news-blog-page .btn {
    border-radius: 3px;
    font-weight: 600;
    transition: all .22s ease;
}

.news-blog-page .btn-primary,
.news-blog-page .btn.blue {
    border-color: transparent;
    background: linear-gradient(100deg, var(--th-cyan), var(--th-blue));
    color: #04121f;
}

.news-blog-page .btn-primary:hover,
.news-blog-page .btn.blue:hover {
    box-shadow: 0 6px 22px rgba(34, 211, 238, .4);
    transform: translateY(-1px);
}

/* ==========================================================================
   移动端菜单按钮
   ========================================================================== */
.news-mobile-menu {
    display: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--th-line-2);
    border-radius: 50%;
    background: rgba(10, 16, 30, .7);
    color: var(--th-text);
    cursor: pointer;
    transition: all .22s ease;
}

.news-mobile-menu:hover { border-color: var(--th-cyan); color: var(--th-cyan); box-shadow: var(--th-glow); }

/* ==========================================================================
   移动端变体
   ========================================================================== */
.news-blog-page--mobile .news-header__inner { min-height: 62px; }

.news-nav--mobile {
    justify-content: flex-start;
    gap: 18px;
    width: 100%;
    padding: 0 20px;
    overflow-x: auto;
}

.news-nav--mobile a { padding: 12px 0 10px; }
.news-header-search--mobile { width: calc(100% - 40px); margin: 0 20px 12px; }
.news-main--mobile { width: 100%; padding-top: 20px; padding-bottom: 60px; }

.news-hero--mobile {
    display: block;
    min-height: 0;
    margin: 0 14px 22px;
    padding: 26px;
}

.news-hero--mobile h1 { font-size: 30px; }
.news-mobile-section-head { margin: 24px 16px 13px; }

.news-mobile-section-head h1,
.news-mobile-section-head h2 {
    margin: 4px 0;
    color: var(--th-text);
    font: 700 23px/1.26 var(--th-sans);
    letter-spacing: -.025em;
}

.news-feed--mobile { padding: 0 14px; }

.news-card--mobile {
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 14px;
    padding: 0;
    overflow: hidden;
}

.news-card--mobile .news-card__image { aspect-ratio: 16 / 9; height: auto; min-height: 0; max-height: none; border-radius: 0; }
.news-card--mobile .news-card__image img { height: 100%; min-height: 0; max-height: none; }
.news-card--mobile .news-card__body { padding: 17px; }
.news-card--mobile h2, .news-card--mobile h3 { font-size: 19px; }

.news-panel--mobile { margin: 22px 14px; padding: 20px; }
.news-category-intro--mobile { margin: 0 14px 20px; padding: 26px; }
.news-category-intro--mobile h1 { font-size: 30px; }
.news-article--mobile { margin: 0 12px; padding: 24px 18px; }
.news-article--mobile .news-article__header h1 { font-size: 30px; }
.news-article--mobile .news-article__content { font-size: 15.5px; }
.news-feedback--mobile { align-items: flex-start; }
.news-feedback--mobile .news-feedback__vote { align-items: flex-start; }
.news-feedback--mobile .news-action { font-size: 11px; }
.news-article--page { max-width: 880px; margin: 0 auto; }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 991px) {
    .news-container { width: min(100% - 32px, 760px); }
    .news-layout { grid-template-columns: minmax(0, 1fr) 250px; gap: 22px; }
    .news-hero { padding: 32px; }
    .news-card { grid-template-columns: 180px minmax(0, 1fr); }
}

@media (max-width: 640px) {
    .news-container { width: calc(100% - 28px); }
    .news-layout { display: block; }
    .news-sidebar { display: none; }
    .news-hero { display: block; min-height: 0; margin-bottom: 26px; padding: 26px; }
    .news-hero h1 { font-size: 31px; }
    .news-hero-search { min-width: 0; margin-top: 20px; }
    .news-section-heading h1, .news-section-heading h2 { font-size: 22px; }
    .news-card { grid-template-columns: 1fr; gap: 0; margin-bottom: 14px; padding: 0; overflow: hidden; }
    .news-card__image { aspect-ratio: 16 / 9; height: auto; min-height: 0; max-height: none; border-radius: 0; }
    .news-card__image img { height: 100%; min-height: 0; max-height: none; }
    .news-card__body { padding: 17px; }
    .news-card h2, .news-card h3 { font-size: 19px; }
    .news-article { padding: 24px 18px; }
    .news-article__header h1 { font-size: 29px; }
    .news-article__content { font-size: 15.5px; }
    .news-related__grid { grid-template-columns: 1fr; }
    .news-prevnext { gap: 10px; }
    .news-prevnext > div { padding: 12px; }
    .news-feedback__vote { align-items: flex-start; }
    .news-action { padding: 8px; font-size: 11px; }
    .news-category-intro { padding: 26px; }
    .news-category-intro h1 { font-size: 30px; }
    .news-mobile-menu { display: flex; margin-left: auto; }
}

/* ==========================================================================
   无障碍：尊重减弱动效
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    .news-blog-page *,
    .news-blog-page *::before,
    .news-blog-page *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}


/* ==========================================================
   修复：移除 Bootstrap 包装层白色背景 + 导航底部白线
   ========================================================== */

/* 所有 Bootstrap Metronic 包装层透明化 */
.page-wrapper,
.page-wrapper-row,
.page-wrapper-top,
.page-wrapper-bottom,
.page-content-wrapper,
.page-content,
.page-container-bg-solid {
    background: transparent !important;
    box-shadow: none !important;
}

/* 去掉 page-header 的白色 border-bottom（白色细线来源）*/
.page-header,
.page-header.navbar {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Hero 区彻底透明，与页面通铺底色无缝 */
.th-hero {
    background: transparent !important;
    margin-top: 0 !important;
}

/* hero 上方 page-wrapper-top 到 hero 之间零间距 */
.page-wrapper-top {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* 内容区透明，不产生断层 */
.news-root-home {
    background: transparent !important;
    padding-top: 0 !important;
}

/* ==========================================================================
   首页内容区改版 — 移除侧栏 · 一行 5 个竖版卡片 · 版面居中
   --------------------------------------------------------------------------
   注意：.news-layout / .news-feed / .news-card 同时被 news 模块页
         （news/index.html、list.html、category.html、search.html、show.html）
         复用，因此以下选择器全部加了首页专属父级 .news-root-home 限定，
         只对首页生效，不影响栏目页 / 列表页 / 搜索页 / 详情页。

   为什么用 flex 而不是 grid：
         需求是「一行 5 个」且「版面居中」。grid 的显式轨道始终占位，
         当文章不足 5 篇时卡片会靠左；flex + justify-content:center
         可在满 5 个时正好铺满，不足 5 个时自动居中。
   ========================================================================== */

/* 1) 单列满宽：去掉右侧栏列 */
.news-root-home .news-layout--full {
    display: block;
}

/* 2) 卡片容器：一行 5 个 + 居中 */
.news-root-home .news-feed--grid5 .news-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 18px;
    margin: 0 auto;
}

/* 每张卡固定占 1/5 宽（减去 4 个间距），保证正好 5 个一行 */
.news-root-home .news-grid .news-card {
    flex: 0 0 calc((100% - 72px) / 5 - 0.02px);
    max-width: calc((100% - 72px) / 5 - 0.02px);
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
}

/* 3) 卡片改为竖版：图在上、文在下 */
.news-root-home .news-grid .news-card__image {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 0;
}

.news-root-home .news-grid .news-card__body {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    flex: 1;
    padding: 15px 16px 17px;
}

/* 4) 字号适配窄卡片，并限制行数保证多卡等高 */
.news-root-home .news-grid .news-card h3 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 7px 0 8px;
    font-size: 15.5px;
    line-height: 1.42;
    letter-spacing: -.01em;
}

.news-root-home .news-grid .news-card p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 12px;
    font-size: 12.5px;
    line-height: 1.66;
}

.news-root-home .news-grid .news-meta { gap: 8px; font-size: 10px; }

/* 阅读全文固定推到底部，多卡之间底部对齐 */
.news-root-home .news-grid .news-read-more { margin-top: auto; }

/* 5) 响应式：窄屏依次降列，始终居中 */
@media (max-width: 1199px) {
    .news-root-home .news-grid .news-card {
        flex-basis: calc((100% - 54px) / 4 - 0.02px);
        max-width: calc((100% - 54px) / 4 - 0.02px);
    }
}

@media (max-width: 991px) {
    .news-root-home .news-grid .news-card {
        flex-basis: calc((100% - 36px) / 3 - 0.02px);
        max-width: calc((100% - 36px) / 3 - 0.02px);
    }
}

@media (max-width: 767px) {
    .news-root-home .news-feed--grid5 .news-grid { gap: 14px; }
    .news-root-home .news-grid .news-card {
        flex-basis: calc((100% - 14px) / 2 - 0.02px);
        max-width: calc((100% - 14px) / 2 - 0.02px);
    }
}

/* ==========================================================================
   打赏卡片弹窗（文章详情页）
   ========================================================================== */
.donate-modal {
    position: fixed;
    inset: 0;
    z-index: 99990;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .28s ease, visibility .28s ease;
}
.donate-modal.is-open { opacity: 1; visibility: visible; }
.donate-modal__mask {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 15, .78);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
.donate-modal__card {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 30px;
    border: 1px solid rgba(34, 211, 238, .28);
    border-radius: 20px;
    background:
        radial-gradient(700px 260px at 85% -10%, rgba(139, 92, 246, .25), transparent 60%),
        linear-gradient(160deg, #0d1728 0%, #070d18 100%);
    box-shadow: 0 30px 90px rgba(0, 0, 0, .62), 0 0 60px rgba(34, 211, 238, .12);
    transform: translateY(18px) scale(.98);
    transition: transform .28s cubic-bezier(.16, 1, .3, 1);
}
.donate-modal.is-open .donate-modal__card { transform: translateY(0) scale(1); }
.donate-modal__close {
    position: absolute;
    right: 14px;
    top: 14px;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(34, 211, 238, .2);
    border-radius: 50%;
    background: rgba(255, 255, 255, .04);
    color: #a8b8d4;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: all .2s ease;
}
.donate-modal__close:hover { border-color: #22d3ee; color: #22d3ee; background: rgba(34, 211, 238, .1); }
.donate-modal__eyebrow {
    display: block;
    color: #22d3ee;
    font-family: var(--th-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
}
.donate-modal__head h3 {
    margin: 10px 0 8px;
    color: var(--th-text);
    font: 800 26px/1.2 var(--th-sans);
    letter-spacing: -.02em;
}
.donate-modal__head p { margin: 0; color: var(--th-text-2); font-size: 13px; line-height: 1.7; }
.donate-modal__amounts { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 18px; }
.donate-modal__amounts button {
    min-width: 62px;
    height: 38px;
    padding: 0 14px;
    border: 1px solid var(--th-line);
    border-radius: 10px;
    background: rgba(255, 255, 255, .03);
    color: var(--th-text-2);
    font: 600 13px var(--th-sans);
    cursor: pointer;
    transition: all .2s ease;
}
.donate-modal__amounts button:hover,
.donate-modal__amounts button.is-active {
    border-color: rgba(34, 211, 238, .65);
    background: rgba(34, 211, 238, .12);
    color: #22d3ee;
    box-shadow: 0 0 18px rgba(34, 211, 238, .18);
}
.donate-modal__form { padding-top: 18px; border-top: 1px solid var(--th-line); }
.donate-modal__form form { margin: 0; }
.donate-modal__form .form-group { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; }
.donate-modal__form .control-label {
    flex: 0 0 88px;
    width: 88px;
    padding: 0;
    text-align: left;
    color: var(--th-text-2);
    font: 500 13px/1.5 var(--th-sans);
}
.donate-modal__form .col-md-2,
.donate-modal__form .col-md-3,
.donate-modal__form .col-md-5,
.donate-modal__form .col-md-8,
.donate-modal__form .col-md-9 {
    flex: 1 1 auto;
    width: auto;
    max-width: none;
    padding: 0;
}
.donate-modal__form .form-control {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--th-line-2);
    border-radius: 10px;
    background: rgba(5, 9, 17, .72);
    color: var(--th-text);
    font: 600 15px var(--th-sans);
    box-shadow: none;
}
.donate-modal__form .form-control:focus {
    border-color: #22d3ee;
    box-shadow: 0 0 0 3px rgba(34, 211, 238, .12);
    outline: 0;
}
.donate-modal__form .form-control-static { padding: 0; color: var(--th-text); font-size: 14px; }
.donate-modal__form .btn-group { display: flex; flex-wrap: wrap; gap: 8px; }
.donate-modal__form .btn {
    border: 1px solid var(--th-line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .03);
    color: var(--th-text-2);
    padding: 9px 14px;
    font-size: 12px;
    font-weight: 600;
}
.donate-modal__form .btn.active,
.donate-modal__form .btn:hover {
    border-color: rgba(34, 211, 238, .65);
    background: rgba(34, 211, 238, .12);
    color: #22d3ee;
}
.donate-modal__form .form-actions { display: flex; justify-content: flex-end; padding: 4px 0 0; }
.donate-modal__form .fc-form-submit { flex: 0 0 auto; }
.donate-modal__form .btn.green,
.donate-modal__form .btn.blue {
    min-width: 132px;
    height: 44px;
    padding: 0 24px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(100deg, #22d3ee, #3b82f6);
    color: #04121f;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 8px 24px rgba(34, 211, 238, .28);
}
.donate-modal__form .btn.green:hover,
.donate-modal__form .btn.blue:hover { filter: brightness(1.08); box-shadow: 0 10px 30px rgba(34, 211, 238, .4); }
body.donate-modal-open { overflow: hidden; }

@media (max-width: 640px) {
    .donate-modal { padding: 14px; }
    .donate-modal__card { padding: 24px 18px; border-radius: 16px; }
    .donate-modal__head h3 { font-size: 22px; }
    .donate-modal__amounts button { flex: 1 1 calc(33.333% - 6px); min-width: 0; }
    .donate-modal__form .form-group { align-items: stretch; flex-direction: column; gap: 7px; }
    .donate-modal__form .control-label { flex: 0 0 auto; width: 100%; }
    .donate-modal__form .col-md-2,
    .donate-modal__form .col-md-3,
    .donate-modal__form .col-md-5,
    .donate-modal__form .col-md-8,
    .donate-modal__form .col-md-9 { flex: 1 1 100%; width: 100%; }
    .donate-modal__form .form-actions { justify-content: stretch; }
    .donate-modal__form .fc-form-submit { width: 100%; }
    .donate-modal__form .btn.green,
    .donate-modal__form .btn.blue { width: 100%; }
}

/* ==========================================================================
   2026-11-09 追加：新闻卡片封面统一 3:4 + 栏目页一行 5 个卡片瀑布流
   放在文件末尾，用于覆盖前面所有 4/3、16/9 的旧比例设置
   ========================================================================== */

/* 1) 所有新闻卡片封面统一为 3:4 竖版比例 */
.news-card__image,
.news-root-home .news-grid .news-card__image,
.news-root-cat .news-grid .news-card__image {
    aspect-ratio: 3 / 4;
    height: auto;
    min-height: 0;
    max-height: none;
}

@media (max-width: 640px) {
    .news-card__image,
    .news-root-home .news-grid .news-card__image,
    .news-root-cat .news-grid .news-card__image {
        aspect-ratio: 3 / 4;
        border-radius: 3px;
    }
}

/* 2) 栏目页：去掉右侧栏，满宽，一行 5 个卡片 */
.news-root-cat .news-layout { display: block; }

.news-root-cat .news-feed--grid5 .news-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: stretch;
    gap: 18px;
    margin: 0 auto;
}

.news-root-cat .news-grid .news-card {
    flex: 0 0 calc((100% - 72px) / 5 - 0.02px);
    max-width: calc((100% - 72px) / 5 - 0.02px);
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
}

.news-root-cat .news-grid .news-card__image {
    width: 100%;
    border-radius: 0;
}

.news-root-cat .news-grid .news-card__body {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    flex: 1;
    padding: 13px 14px 15px;
}

.news-root-cat .news-grid .news-card h3 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    font-size: 15px;
    line-height: 1.45;
    letter-spacing: -.01em;
}

.news-root-cat .news-grid .news-card h3 a { color: inherit; }

/* 3) 响应式：窄屏依次降列 */
@media (max-width: 1199px) {
    .news-root-cat .news-grid .news-card {
        flex-basis: calc((100% - 54px) / 4 - 0.02px);
        max-width: calc((100% - 54px) / 4 - 0.02px);
    }
}

@media (max-width: 991px) {
    .news-root-cat .news-grid .news-card {
        flex-basis: calc((100% - 36px) / 3 - 0.02px);
        max-width: calc((100% - 36px) / 3 - 0.02px);
    }
}

@media (max-width: 767px) {
    .news-root-cat .news-feed--grid5 .news-grid { gap: 14px; }
    .news-root-cat .news-grid .news-card {
        flex-basis: calc((100% - 14px) / 2 - 0.02px);
        max-width: calc((100% - 14px) / 2 - 0.02px);
    }
}

/* ==========================================================================
   2026-11-09 追加 2：栏目页 hero 居中放大 + 卡片正文补齐（与首页一致）
   ========================================================================== */

/* 1) 栏目页 hero：整块居中，字号放大 */
.news-root-cat .news-section-heading {
    justify-content: center;
    text-align: center;
    padding-bottom: 20px;
}

.news-root-cat .news-section-heading > div { width: 100%; }

.news-root-cat .news-section-heading .news-eyebrow {
    font-size: 12px;
    letter-spacing: .26em;
}

.news-root-cat .news-section-heading h1 {
    margin-top: 12px;
    font-size: 44px;
    line-height: 1.15;
    letter-spacing: -.035em;
}

@media (max-width: 991px) {
    .news-root-cat .news-section-heading h1 { font-size: 36px; }
}

@media (max-width: 767px) {
    .news-root-cat .news-section-heading { padding-bottom: 16px; }
    .news-root-cat .news-section-heading .news-eyebrow { font-size: 11px; letter-spacing: .2em; }
    .news-root-cat .news-section-heading h1 { margin-top: 8px; font-size: 28px; }
}

/* 2) 栏目页卡片正文：恢复栏目标签/时间、标题、摘要、阅读全文，与首页卡片一致 */
.news-root-cat .news-grid .news-card h3 {
    margin: 7px 0 8px;
}

.news-root-cat .news-grid .news-card p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 12px;
    font-size: 12.5px;
    line-height: 1.66;
}

.news-root-cat .news-grid .news-meta {
    gap: 8px;
    font-size: 10px;
}

/* 阅读全文固定推到底部，多卡之间底部对齐 */
.news-root-cat .news-grid .news-read-more { margin-top: auto; }
