/* ============================================================
   NEWS GAME HUB  — gh-* styles
   Companion to news2.css; loaded only on game hub pages
   ============================================================ */

/* ── Variables ────────────────────────────────────────────── */
:root {
    --hub-color: #0b85ea;
}

/* ══════════════════════════════════════════════════════════
   GAME HUB BANNER
══════════════════════════════════════════════════════════ */
.gh-banner {
    position: relative;
    background: linear-gradient(135deg, #0d1117 0%, color-mix(in srgb, var(--hub-color) 20%, #0d1117) 100%);
    border-bottom: 1px solid #1e2533;
    overflow: hidden;
    min-height: 260px;
}

.gh-banner-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    opacity: 0.15;
    filter: blur(2px);
    transform: scale(1.05);
}

.gh-banner-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 36px 0;
    min-height: 260px;
}

/* ── Left side ─────────────────────────────────────────── */
.gh-banner-left {
    flex: 1;
    min-width: 0;
}

.gh-banner-title-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.gh-game-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.12);
    flex-shrink: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.gh-title {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.15;
    color: #fff;
    letter-spacing: -0.5px;
    margin: 0 0 4px;
    font-family: 'Montserrat';
}

.gh-hub-word {
    color: var(--hub-color);
    font-style: italic;
}

.gh-desc {
    font-size: 0.95rem;
    color: #8b9ab0;
    line-height: 1.6;
    max-width: 520px;
    margin: 0;
}

/* ── Search row ────────────────────────────────────────── */
.gh-search-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 18px;
}

.gh-search {
    flex: 1;
    max-width: 420px;
}

.gh-article-count {
    font-size: 0.82rem;
    color: #8b9ab0;
    white-space: nowrap;
    background: rgba(255,255,255,0.06);
    border: 1px solid #252d3a;
    border-radius: 20px;
    padding: 4px 12px;
}

/* ── Right side (splash art) ───────────────────────────── */
.gh-banner-right {
    flex-shrink: 0;
    width: 380px;
    height: 220px;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.gh-splash {
    max-height: 240px;
    max-width: 100%;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 8px 32px rgba(0,0,0,0.6));
}

/* ── Multi-character splash ────────────────────────────── */
.gh-char-splash {
    position: relative;
    width: 100%;
    height: 100%;
}

.gh-splash-char {
    position: absolute;
    bottom: 0;
    height: 210px;
    object-fit: contain;
    filter: drop-shadow(0 4px 16px rgba(0,0,0,0.5));
    transition: transform 0.3s;
}

.gh-splash-char:hover {
    transform: translateY(-6px);
}

.gh-splash-char-0 { right: 10px; z-index: 4; }
.gh-splash-char-1 { right: 90px; z-index: 3; transform: scale(0.92); }
.gh-splash-char-2 { right: 170px; z-index: 2; transform: scale(0.84); }
.gh-splash-char-3 { right: 240px; z-index: 1; transform: scale(0.76); opacity: 0.8; }

/* ══════════════════════════════════════════════════════════
   FILTER BAR  (type tabs + sort)
══════════════════════════════════════════════════════════ */
.gh-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 24px 0 16px;
    flex-wrap: wrap;
}

.gh-type-tabs {
    flex: 1;
}

/* ══════════════════════════════════════════════════════════
   CHARACTER QUICK NAV
══════════════════════════════════════════════════════════ */
.gh-char-nav {
    margin: 0 0 20px;
    overflow: hidden;
}

.gh-char-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: #252d3a transparent;
}

.gh-char-scroll::-webkit-scrollbar { height: 4px; }
.gh-char-scroll::-webkit-scrollbar-track { background: transparent; }
.gh-char-scroll::-webkit-scrollbar-thumb { background: #252d3a; border-radius: 2px; }

.gh-char-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.gh-char-item:hover { transform: translateY(-2px); }

.gh-char-item span {
    font-size: 0.72rem;
    color: #8b9ab0;
    white-space: nowrap;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}

.gh-char-item.active span { color: var(--hub-color); }

/* ── Avatar circle ─────────────────────────────────────── */
.gh-char-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid #252d3a;
    overflow: hidden;
    background: #161b24;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.gh-char-item.active .gh-char-avatar {
    border-color: var(--hub-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--hub-color) 25%, transparent);
}

.gh-char-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gh-char-all {
    color: #8b9ab0;
    background: #1e2533;
}

.gh-char-item.active .gh-char-all {
    color: var(--hub-color);
    background: color-mix(in srgb, var(--hub-color) 15%, #1e2533);
}

.gh-char-initial {
    font-size: 1.3rem;
    font-weight: 700;
    color: #8b9ab0;
    text-transform: uppercase;
}

/* ══════════════════════════════════════════════════════════
   ARTICLES SECTION
══════════════════════════════════════════════════════════ */
.gh-articles {
    margin-bottom: 40px;
}

/* ══════════════════════════════════════════════════════════
   MORE GAME HUBS SECTION
══════════════════════════════════════════════════════════ */
.gh-more-section {
    margin: 20px 0 40px;
}

.gh-more-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.gh-more-card {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    background: #161b24;
    border: 1px solid #1e2533;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.gh-more-card:hover {
    transform: translateY(-4px);
    border-color: #2d3748;
    box-shadow: 0 8px 28px rgba(0,0,0,0.35);
}

.gh-more-img {
    position: relative;
    height: 120px;
    background-size: cover;
    background-position: center;
    background-color: #1e2533;
}

.gh-more-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 30%, rgba(0,0,0,0.7));
}

.gh-more-icon {
    position: absolute;
    bottom: 10px;
    left: 12px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.15);
    z-index: 1;
}

.gh-more-body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.gh-more-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: #e2e8f0;
    line-height: 1.3;
}

.gh-more-count {
    font-size: 0.76rem;
    color: #6b7a93;
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
    .gh-banner-right { width: 300px; }
    .gh-more-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    .gh-banner-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        min-height: auto;
        padding: 28px 0;
    }
    .gh-banner-right {
        width: 100%;
        height: 160px;
        justify-content: flex-start;
    }
    .gh-splash { max-height: 160px; }
    .gh-splash-char { height: 150px; }
    .gh-title { font-size: 1.9rem; }
    .gh-more-grid { grid-template-columns: repeat(2, 1fr); }
    .gh-filter-bar { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
    .gh-title { font-size: 1.5rem; }
    .gh-game-icon { width: 54px; height: 54px; border-radius: 12px; }
    .gh-search-row { flex-wrap: wrap; }
    .gh-search { max-width: 100%; }
    .gh-more-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .gh-char-avatar { width: 44px; height: 44px; }
    .gh-char-item span { font-size: 0.68rem; }

    /* P3 筛选栏吸顶容器：横向滚动 */
    .gh-sticky-bar {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-left: 0;
        padding-right: 0;
    }
    .gh-sticky-bar::-webkit-scrollbar { display: none; }

    /* 内层 tabs：宽度撑开，左对齐，左侧留 16px 呼吸空间 */
    .gh-sticky-bar .gh-type-tabs {
        width: max-content !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 16px;
        flex-wrap: nowrap;
    }

    /* Banner 边距收窄 */
    .gh-banner { margin-top: 16px !important; }
    .gh-banner-inner { padding-left: 16px !important; padding-right: 16px !important; }
}

@media (max-width: 420px) {
    .gh-more-grid { grid-template-columns: 1fr 1fr; }
    .gh-banner-right { display: none; }
}

/* "View More" link above article grid */
.gh-view-more-wrap {
    text-align: right;
    margin: 14px 0 6px;
}
.gh-view-more-wrap.gh-view-more-hidden {
    display: none;
}
.gh-view-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #0b85ea;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s;
}
.gh-view-more:hover {
    color: #4ba6ff;
    text-decoration: underline;
}
