/* 游戏新闻（/news 列表、/news/{slug} 文章）。颜色、字体、卡片沿用 home.css 的变量，只在新闻页加载。 */

.news-page {
    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto;
}

.news-page .content_h3 {
    margin: 12px 0 8px;
    font-family: var(--font-heading);
    font-size: 28px;
    color: var(--gold-soft);
}

.news-intro {
    max-width: 720px;
    margin-bottom: 20px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ---------- 游戏筛选标签 ---------- */
.news-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.news-filters a {
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-elevated);
    color: var(--text-muted);
    font-size: 13px;
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.news-filters a:hover {
    border-color: var(--gold-line);
    color: var(--gold-soft);
}

.news-filters a.is-active {
    border-color: var(--gold);
    background: rgba(255, 177, 0, 0.12);
    color: var(--gold);
    font-weight: 600;
}

/* 标签里的文章数 */
.news-filter-count {
    margin-left: 4px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    font-size: 11px;
    font-weight: 600;
}

.news-filters a.is-active .news-filter-count {
    background: rgba(255, 177, 0, 0.22);
}

/* 游戏页底部的报价入口跟文章页同款，只是放在列表下面 */
.news-cta-page {
    margin-top: 32px;
}

/* ---------- 卡片网格 ---------- */
.news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 640px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 960px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.news-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    color: var(--text);
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.news-card:hover,
.news-card:focus-visible {
    transform: translateY(-3px);
    border-color: var(--gold-line);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
}

.news-cover {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: var(--bg-elevated);
}

/* 没有封面图：按游戏上色的渐变底，游戏名做大字水印。 */
.news-cover-placeholder {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 15%, hsla(var(--hue), 70%, 55%, 0.35), transparent 60%),
        linear-gradient(145deg, hsl(var(--hue), 35%, 16%) 0%, #05070a 85%);
}

.news-cover-placeholder::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0 2px, transparent 2px 14px);
}

.news-cover-placeholder span {
    position: relative;
    z-index: 1;
    padding: 0 16px;
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    color: hsla(var(--hue), 60%, 82%, 0.78);
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
}

.news-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 18px 20px;
}

.news-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-muted);
}

.news-badge {
    padding: 2px 10px;
    border: 1px solid var(--gold-line);
    border-radius: 999px;
    background: rgba(201, 163, 92, 0.1);
    color: var(--gold-soft);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
}

.news-card-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--gold-soft);
}

.news-card:hover .news-card-title {
    color: var(--gold);
}

.news-card-summary {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}

/* 第一页的第一条放大成横幅卡片 */
@media (min-width: 960px) {
    .news-card.is-featured {
        grid-column: 1 / -1;
        flex-direction: row;
    }

    .news-card.is-featured .news-cover {
        width: 56%;
        aspect-ratio: auto;
        min-height: 280px;
    }

    .news-card.is-featured .news-card-body {
        justify-content: center;
        gap: 12px;
        padding: 28px 32px;
    }

    .news-card.is-featured .news-card-title {
        font-size: 26px;
    }

    .news-card.is-featured .news-card-summary {
        -webkit-line-clamp: 5;
        font-size: 15px;
    }
}

.news-empty {
    padding: 48px 0;
    text-align: center;
    color: var(--text-muted);
}

.news-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 28px;
    color: var(--text-muted);
    font-size: 14px;
}

.news-pager a {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--gold-soft);
    text-decoration: none;
}

.news-pager a:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* ---------- 文章页 ---------- */
.site-content > .news-article,
.site-content > .news-more {
    max-width: 920px;
}

.site-content .news-body {
    max-width: 780px;
}

.news-article-head h1 {
    margin: 12px 0 14px;
    font-family: var(--font-heading);
    font-size: 30px;
    line-height: 1.3;
    color: var(--gold-soft);
}

.site-content .news-article .news-lead {
    margin-bottom: 20px;
    padding-left: 14px;
    border-left: 3px solid var(--gold-line);
    color: var(--text);
    font-size: 17px;
    line-height: 1.65;
}

.news-article-cover {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1200 / 630;
    margin: 0 0 22px;
    border-radius: 10px;
    object-fit: cover;
}

.site-content .news-body p {
    color: var(--text);
    font-size: 16px;
    line-height: 1.8;
}

.site-content .news-body p + p {
    margin-top: 16px;
}

.site-content .news-article .news-source {
    margin-top: 26px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-size: 13px;
}

.news-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 28px;
    padding: 18px 22px;
    border: 1px solid var(--gold-line);
    border-radius: 12px;
    background: linear-gradient(120deg, rgba(255, 177, 0, 0.14), rgba(255, 177, 0, 0.03));
}

.news-cta div {
    display: flex;
    flex: 1 1 280px;
    flex-direction: column;
    gap: 4px;
}

.news-cta strong {
    font-family: var(--font-heading);
    font-size: 18px;
    color: var(--gold-soft);
}

.news-cta span {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
}

.site-content .news-cta .button {
    color: #1a1108;
}

.site-content > .news-more {
    margin-top: 24px;
}

.news-more .news-grid {
    margin-top: 14px;
}

@media (max-width: 639px) {
    .news-article-head h1 {
        font-size: 24px;
    }
}

/* ---------- /news 总页：顶部轮播 ---------- */
.news-hero {
    position: relative;
    margin-bottom: 32px;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.news-hero-track {
    display: grid;
}

/* 所有幻灯片叠在同一格，靠 is-active 切换显示，高度由最高的一张撑开，切换时页面不会跳。 */
.news-slide {
    grid-area: 1 / 1;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    color: var(--text);
    text-decoration: none;
    transition: opacity 0.35s ease, visibility 0.35s;
}

.news-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.news-slide-cover {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 340px;
    object-fit: cover;
    background: var(--bg-elevated);
}

.news-slide-cover.news-cover-placeholder span {
    font-size: 34px;
}

.news-slide-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px 22px 40px;
}

.news-slide-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--gold-soft);
}

.news-slide:hover .news-slide-title {
    color: var(--gold);
}

.news-slide-summary {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
}

.news-hero-arrow {
    position: absolute;
    top: 130px;
    width: 38px;
    height: 38px;
    border: 1px solid var(--gold-line);
    border-radius: 50%;
    background: rgba(5, 7, 10, 0.6);
    color: var(--gold-soft);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.news-hero-arrow:hover,
.news-hero-arrow:focus-visible {
    border-color: var(--gold);
    color: var(--gold);
}

.news-hero-prev { left: 12px; }
.news-hero-next { right: 12px; }

.news-hero-dots {
    position: absolute;
    right: 0;
    bottom: 10px;
    left: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.news-hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 1px solid var(--gold-line);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.news-hero-dots button.is-active {
    border-color: var(--gold);
    background: var(--gold);
}

@media (min-width: 960px) {
    .news-slide {
        flex-direction: row;
    }

    .news-slide-cover {
        width: 56%;
        aspect-ratio: auto;
        max-height: none;
        min-height: 320px;
    }

    .news-slide-body {
        justify-content: center;
        gap: 14px;
        padding: 28px 36px 40px;
    }

    .news-slide-title {
        font-size: 28px;
    }

    .news-hero-arrow {
        top: 50%;
        transform: translateY(-50%);
    }

    .news-hero-dots {
        right: 0;
        left: auto;
        width: 44%;
    }
}

/* ---------- /news 总页：按游戏分块 ---------- */
.news-blocks {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 800px) {
    .news-blocks {
        grid-template-columns: repeat(2, 1fr);
    }
}

.news-block {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.news-block-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 92px;
    text-decoration: none;
}

.news-block-banner:hover span,
.news-block-banner:focus-visible span {
    color: hsl(var(--hue), 70%, 90%);
}

.news-block-list {
    flex: 1;
    margin: 0;
    padding: 6px 18px;
    list-style: none;
}

.news-block-list li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.news-block-list li:last-child {
    border-bottom: 0;
}

.news-block-list a {
    color: var(--text);
    font-size: 15px;
    line-height: 1.4;
    text-decoration: none;
}

.news-block-list a:hover,
.news-block-list a:focus-visible {
    color: var(--gold);
}

.news-block-list time {
    flex: none;
    color: var(--text-muted);
    font-size: 12px;
}

.news-block-more {
    padding: 12px 18px 16px;
    color: var(--gold-soft);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.news-block-more:hover,
.news-block-more:focus-visible {
    color: var(--gold);
}

/* 版本徽章（WoW Forever、Classic Era…）比游戏徽章淡一点 */
.news-badge-version {
    border-color: var(--border);
    background: transparent;
    color: var(--text-muted);
}

a.news-badge-version:hover {
    border-color: var(--gold-line);
    color: var(--gold-soft);
}

.news-version-filters {
    margin-top: -8px;
}
