/**
 * 首页「机地游戏」风格布局（参考 jidiyouxi.com 复刻）
 * 左栏排行/新游面板 + 右栏统计/Banner/新鲜事儿/资讯。
 */

/* ---------- 首页复用分类页的格子背景 ---------- */

html,
body {
    min-height: 100%;
}

/* 格子背景铺满整个页面（随文档滚动延伸到底部，而非只覆盖首屏 100vh） */
/* 只在 body 上铺格子背景（单一网格原点，避免 main/.page 双重背景错位） */
/* 只在 body 上铺格子背景（body 与 main.page 共用 fixed 网格原点，align 一致） */
body.home,
body.blog {
    background-color: #f5f7fb !important;
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.09) 1px, transparent 1px) !important;
    background-size: 44px 44px !important;
    background-attachment: fixed !important;
}

html body.home main.page,
html body.home .page,
html body.blog main.page,
html body.blog .page {
    background: transparent !important;
    background-image: none !important;
}

[data-theme="dark"] body.home,
[data-theme="dark"] body.blog {
    background-color: #0b1220 !important;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.14) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.14) 1px, transparent 1px) !important;
    background-size: 44px 44px !important;
    background-attachment: fixed !important;
}

[data-theme="dark"] html body.home main.page,
[data-theme="dark"] html body.home .page,
[data-theme="dark"] html body.blog main.page,
[data-theme="dark"] html body.blog .page {
    background: transparent !important;
    background-image: none !important;
}

/* 首屏径向光晕仍由 bg-decoration 承担（fixed 100vh 即可，不影响底部） */
body.home .bg-decoration,
body.blog .bg-decoration {
    background: transparent !important;
    display: none !important;
}

[data-theme="dark"] body.home .bg-decoration,
[data-theme="dark"] body.blog .bg-decoration {
    background: transparent !important;
}
.jidi-home {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: calc(var(--nav-height, 72px) + 16px) clamp(14px, 3vw, 32px) 24px;
}

.jidi-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.jidi-side {
    flex: 0 0 300px;
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ---------- 面板卡片 ---------- */

.jidi-panel {
    background: var(--bg-surface, #fff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 14px;
    padding: 18px 20px 20px;
    box-shadow: var(--shadow-sm, 0 1px 2px 0 rgb(0 0 0 / 0.05));
}

.jidi-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.jidi-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.jidi-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted, #64748b);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.jidi-tab:hover {
    color: var(--text-main, #0f172a);
}

.jidi-tab.is-active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary, #2563eb), var(--primary-hover, #1d4ed8));
    box-shadow: 0 6px 16px -6px rgba(37, 99, 235, 0.6);
}

.jidi-more {
    flex: none;
    font-size: 0.85rem;
    color: var(--text-muted, #64748b);
    text-decoration: none;
    white-space: nowrap;
}

.jidi-more:hover {
    color: var(--primary, #2563eb);
}

/* ---------- 本周最热：排行列表 ---------- */

.jidi-rank-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 22px;
}

.jidi-rank-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 6px;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.15s ease;
}

.jidi-rank-item:hover {
    background: rgba(37, 99, 235, 0.06);
}

.jidi-rank-no {
    flex: none;
    width: 34px;
    text-align: center;
    font-size: 1rem;
    font-weight: 800;
    font-style: italic;
    color: #c2c9d4;
    letter-spacing: -0.02em;
}

.jidi-rank-no.is-top1 { color: #f43f5e; }
.jidi-rank-no.is-top2 { color: #3b82f6; }
.jidi-rank-no.is-top3 { color: #f97316; }

.jidi-rank-cover {
    flex: none;
    width: 66px;
    height: 46px;
    object-fit: cover;
    border-radius: 8px;
    background: #eef1f5;
}

.jidi-rank-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.jidi-rank-title {
    display: block;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-main, #0f172a);
}

.jidi-badge-hot {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 5px;
    font-size: 0.68rem;
    font-weight: 700;
    font-style: normal;
    color: #f43f5e;
    background: rgba(244, 63, 94, 0.1);
    vertical-align: 1px;
}

.jidi-rank-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.76rem;
    color: var(--text-muted, #94a3b8);
    white-space: nowrap;
    overflow: hidden;
}

.jidi-star {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: #22c55e;
    font-weight: 700;
}

.jidi-star svg {
    fill: #22c55e;
}

/* ---------- 必玩新游：卡片网格 ---------- */

.jidi-card-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px 16px;
}

.jidi-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-decoration: none;
    min-width: 0;
}

.jidi-card-cover {
    display: block;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    background: #eef1f5;
}

.jidi-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}

.jidi-card:hover .jidi-card-cover img {
    transform: scale(1.05);
}

.jidi-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main, #0f172a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jidi-card:hover .jidi-card-title {
    color: var(--primary, #2563eb);
}

.jidi-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.jidi-card-version {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--primary, #2563eb);
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.22);
}

.jidi-card-size {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    color: var(--text-muted, #94a3b8);
}

.jidi-card-date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.76rem;
    color: var(--text-muted, #94a3b8);
    white-space: nowrap;
    overflow: hidden;
}

/* ---------- 分页 ---------- */

.jidi-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
}

.jidi-page {
    min-width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border: 0;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    line-height: 1;
    color: var(--text-muted, #64748b);
    background: transparent;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.jidi-page:hover {
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary, #2563eb);
}

.jidi-page.is-current {
    color: #fff;
    background: var(--primary, #2563eb);
}

/* ---------- 右栏：统计卡 ---------- */

.jidi-stats-card {
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    background: var(--bg-surface, #fff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 14px;
    padding: 14px 10px;
    box-shadow: var(--shadow-sm, 0 1px 2px 0 rgb(0 0 0 / 0.05));
}

.jidi-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 0;
}

.jidi-stat b {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-main, #0f172a);
    line-height: 1.1;
}

.jidi-stat b.is-hl {
    color: #f97316;
}

.jidi-stat i {
    font-style: normal;
    font-size: 0.72rem;
    color: var(--text-muted, #94a3b8);
}

/* ---------- 右栏：Banner ---------- */

.jidi-banner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding: 22px 20px;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    background:
        radial-gradient(120% 150% at 90% 10%, rgba(125, 211, 252, 0.35), transparent 55%),
        linear-gradient(135deg, #1d4ed8, #7c3aed 60%, #db2777);
    box-shadow: 0 14px 30px -12px rgba(29, 78, 216, 0.55);
}

.jidi-banner::after {
    content: 'GAME';
    position: absolute;
    right: -6px;
    bottom: -14px;
    font-size: 3.6rem;
    font-weight: 900;
    font-style: italic;
    letter-spacing: -0.04em;
    color: rgba(255, 255, 255, 0.12);
    pointer-events: none;
}

.jidi-banner-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.02em;
}

.jidi-banner-sub {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.85);
}

.jidi-banner-go {
    margin-top: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    backdrop-filter: blur(6px);
}

/* ---------- 右栏：侧栏面板 ---------- */

.jidi-side-panel {
    padding: 16px 16px 8px;
}

.jidi-side-title {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-main, #0f172a);
}

.jidi-comments {
    list-style: none;
    margin: 0;
    padding: 0;
}

.jidi-comments li + li {
    border-top: 1px dashed var(--border, #e2e8f0);
}

.jidi-comment {
    display: flex;
    gap: 10px;
    padding: 11px 0;
    text-decoration: none;
}

.jidi-c-avatar {
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: #eef1f5;
}

.jidi-c-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.jidi-c-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.jidi-c-top b {
    font-size: 0.82rem;
    color: var(--text-main, #0f172a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jidi-c-top time {
    flex: none;
    font-size: 0.7rem;
    color: var(--text-muted, #94a3b8);
}

.jidi-c-text {
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-muted, #64748b);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.jidi-c-post {
    font-size: 0.7rem;
    color: #a5b0bf;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- 右栏：资讯列表 ---------- */

.jidi-news {
    list-style: none;
    margin: 0;
    padding: 0;
}

.jidi-news li + li {
    border-top: 1px dashed var(--border, #e2e8f0);
}

.jidi-news-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 0;
    text-decoration: none;
}

.jidi-news-item img {
    flex: none;
    width: 64px;
    height: 42px;
    object-fit: cover;
    border-radius: 8px;
    background: #eef1f5;
}

.jidi-n-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.jidi-n-title {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-main, #0f172a);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.jidi-news-item:hover .jidi-n-title {
    color: var(--primary, #2563eb);
}

.jidi-news-item time {
    font-size: 0.7rem;
    color: var(--text-muted, #94a3b8);
}

/* ---------- 响应式 ---------- */

@media (max-width: 1100px) {
    .jidi-home {
        flex-direction: column;
    }

    .jidi-side {
        width: 100%;
        flex: 1 1 auto;
    }
}

@media (max-width: 900px) {
    .jidi-card-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .jidi-home {
        padding-top: calc(var(--nav-height, 72px) + 10px);
    }

    .jidi-panel {
        padding: 14px 14px 16px;
    }

    /* 排行榜：强制容器收缩并让标题溢出省略，碾压 min-content 撑宽 */
    .jidi-rank-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px 12px;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .jidi-rank-item {
        min-width: 0 !important;
        max-width: 100% !important;
        flex: 1 1 auto;
    }

    .jidi-rank-body {
        min-width: 0 !important;
    }

    .jidi-rank-title {
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .jidi-rank-cover {
        flex: none;
    }

    .jidi-card-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px 10px;
    }

    .jidi-rank-cover {
        width: 56px;
        height: 40px;
    }
}

@media (max-width: 520px) {
    .jidi-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .jidi-rank-grid {
        grid-template-columns: 1fr;
    }

    .jidi-stats-card {
        padding: 10px 6px;
    }

    .jidi-stat b {
        font-size: 1.05rem;
    }

    .jidi-tab {
        padding: 6px 10px;
        font-size: 0.84rem;
    }
}

/* ---------- jidi 移动端适配（防止内容溢出视口） ---------- */
@media (max-width: 1100px) {
    .jidi-main {
        min-width: 0;
        width: 100%;
    }

    .jidi-panel,
    .jidi-search-panel,
    .jidi-stats-card,
    .jidi-hotkeys,
    .jidi-search-form,
    .jidi-search-input,
    .jidi-pagination {
        max-width: 100%;
        box-sizing: border-box;
    }

    .jidi-rank-grid,
    .jidi-card-grid {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .jidi-card-cover,
    .jidi-card-cover img {
        width: 100%;
        height: auto;
    }

    .jidi-search-input {
        width: 100%;
        min-width: 0;
        padding-right: 110px;
    }

    .jidi-search-btn {
        flex: none;
    }

    .jidi-hotkeys {
        flex-wrap: wrap;
    }

    .jidi-hk-item {
        max-width: 100%;
        white-space: nowrap;
    }
}

.hidden {
    display: none !important;
}

/* ---------- 毛玻璃质感（面板 + 统计卡）：更透更磨砂 ---------- */

body.home .jidi-panel,
body.home .jidi-stats-card {
    background: rgba(255, 255, 255, 0.34) !important;
    backdrop-filter: blur(26px) saturate(180%);
    -webkit-backdrop-filter: blur(26px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.65) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.7) inset,
        0 12px 40px -8px rgba(2, 6, 23, 0.18) !important;
}

body.home .jidi-rank-item:hover {
    background: rgba(255, 255, 255, 0.4);
}

body.home .jidi-panel .jidi-search-input,
body.home .jidi-stats-card,
body.home .jidi-search-panel .jidi-search-form .jidi-search-input {
    backdrop-filter: blur(26px) saturate(180%);
    -webkit-backdrop-filter: blur(26px) saturate(180%);
}

[data-theme="dark"] body.home .jidi-panel,
[data-theme="dark"] body.home .jidi-stats-card {
    background: rgba(15, 23, 42, 0.38) !important;
    border: 1px solid rgba(148, 163, 184, 0.28) !important;
    box-shadow:
        0 1px 0 rgba(148, 163, 184, 0.14) inset,
        0 12px 40px -8px rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] body.home .jidi-rank-item:hover {
    background: rgba(148, 163, 184, 0.12);
}

/* ---------- 统计卡：桌面用侧栏原版，移动端移到搜索栏下方 ---------- */
.jidi-stats-card--mobile {
    display: none;
}

@media (max-width: 1100px) {
    .jidi-stats-card--mobile {
        display: flex;
        margin: 0 0 16px;
    }

    .jidi-side .jidi-stats-card {
        display: none;
    }
}

/* ---------- 搜索框模块 ---------- */

.jidi-search-panel {
    padding: 18px 20px 16px;
}

.jidi-search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.jidi-search-icon {
    position: absolute;
    left: 18px;
    color: var(--text-muted, #94a3b8);
    pointer-events: none;
}

.jidi-search-input {
    width: 100%;
    height: 50px;
    padding: 0 118px 0 48px;
    border: 1.5px solid var(--border, #e2e8f0);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    color: var(--text-main, #0f172a);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.jidi-search-input::placeholder {
    color: #a5b0bf;
}

.jidi-search-input:focus {
    border-color: var(--primary, #2563eb);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.jidi-search-btn {
    position: absolute;
    right: 6px;
    height: 40px;
    padding: 0 26px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary, #2563eb), var(--primary-hover, #1d4ed8));
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.15s ease;
}

.jidi-search-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.jidi-hotkeys {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.jidi-hk-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: none;
    font-size: 0.82rem;
    font-weight: 700;
    color: #f43f5e;
    margin-right: 2px;
}

.jidi-hk-label svg {
    color: #f97316;
}

.jidi-hk-item {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    color: var(--text-muted, #64748b);
    background: rgba(148, 163, 184, 0.12);
    text-decoration: none;
    transition: color 0.15s ease, background 0.15s ease, transform 0.15s ease;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jidi-hk-item:hover {
    color: var(--primary, #2563eb);
    background: rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

.jidi-hk-item.is-top {
    color: #f97316;
    background: rgba(249, 115, 22, 0.1);
}

.jidi-hk-item.is-top:hover {
    color: #ea580c;
    background: rgba(249, 115, 22, 0.16);
}

/* ---------- 搜索面板顶部像素小人队伍 ---------- */

.jidi-search-panel {
    position: relative;
    margin-top: 40px;
}

.jidi-mascot-row {
    position: absolute;
    bottom: 100%;
    left: 22px;
    right: 22px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    line-height: 0;
    z-index: 2;
    pointer-events: none;
}

.jidi-mascot-row img {
    width: 32px;
    height: auto;
    flex: 0 0 auto;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    filter: drop-shadow(0 4px 6px rgba(2, 6, 23, 0.14));
}

@media (max-width: 760px) {
    .jidi-mascot-row {
        left: 12px;
        right: 12px;
    }

    .jidi-mascot-row img {
        width: 22px;
    }
}

/* ---------- 顶部公告：毛玻璃胶囊条 ---------- */

.rnb-wrap {
    max-width: 1400px;
    margin: calc(var(--nav-height, 72px) + 12px) auto -6px;
    padding: 0 clamp(14px, 3vw, 32px);
}

.rnb-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px 9px 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.55) !important;
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    box-shadow: 0 10px 30px -8px rgba(2, 6, 23, 0.14);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

[data-theme="dark"] .rnb-bar {
    background: rgba(15, 23, 42, 0.55) !important;
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
}

.rnb-wrap.rnb-closing .rnb-bar {
    opacity: 0;
    transform: translateY(-8px);
}

.rnb-badge {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #fff;
    background: linear-gradient(135deg, var(--primary, #2563eb), #7c3aed);
    box-shadow: 0 6px 14px -6px rgba(37, 99, 235, 0.7);
}

.rnb-text {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.86rem;
    line-height: 1.5;
    color: var(--text-main, #0f172a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rnb-text a {
    color: var(--primary, #2563eb);
    font-weight: 600;
    text-decoration: none;
}

.rnb-text a:hover {
    text-decoration: underline;
}

.rnb-close {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.16);
    color: var(--text-muted, #64748b);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.rnb-close:hover {
    background: rgba(244, 63, 94, 0.14);
    color: #f43f5e;
    transform: rotate(90deg);
}

/* 公告条存在时收紧首页顶部留白 */
body.rnb-active .jidi-home {
    padding-top: 12px;
}

@media (max-width: 760px) {
    .rnb-wrap {
        margin-top: calc(var(--nav-height, 72px) + 10px);
    }

    .rnb-text {
        font-size: 0.78rem;
    }

    .rnb-badge {
        padding: 4px 10px;
        font-size: 0.7rem;
    }
}

/* ---------- 修复：首页无大图后导航改回实底玻璃风格 ---------- */

body.home .site-header-nav,
body.blog .site-header-nav {
    background: rgba(255, 255, 255, 0.78) !important;
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border-bottom: 1px solid rgba(226, 232, 240, 0.95) !important;
    box-shadow: 0 6px 24px -14px rgba(2, 6, 23, 0.18) !important;
}

body.home .site-header-nav:not(.scrolled) .logo-text,
body.home .site-header-nav:not(.scrolled) .main-navigation a,
body.home .site-header-nav:not(.scrolled) .mobile-menu-toggle,
body.blog .site-header-nav:not(.scrolled) .logo-text,
body.blog .site-header-nav:not(.scrolled) .main-navigation a,
body.blog .site-header-nav:not(.scrolled) .mobile-menu-toggle {
    color: var(--text-main, #0f172a) !important;
    text-shadow: none !important;
}

body.home .site-header-nav:not(.scrolled) .main-navigation a:hover,
body.blog .site-header-nav:not(.scrolled) .main-navigation a:hover {
    color: var(--primary, #2563eb) !important;
}

body.home .site-header-nav:not(.scrolled) .main-navigation a::after,
body.blog .site-header-nav:not(.scrolled) .main-navigation a::after {
    background: var(--primary, #2563eb) !important;
}

body.home .header-search-wrapper,
body.blog .header-search-wrapper {
    background: rgba(255, 255, 255, 0.85) !important;
    border: 1px solid var(--border, #e2e8f0) !important;
}

body.home .header-search-wrapper .header-search-input,
body.blog .header-search-wrapper .header-search-input {
    color: var(--text-main, #0f172a) !important;
}

[data-theme="dark"] body.home .site-header-nav,
[data-theme="dark"] body.blog .site-header-nav {
    background: rgba(11, 18, 32, 0.72) !important;
    border-bottom: 1px solid rgba(51, 65, 85, 0.9) !important;
}

[data-theme="dark"] body.home .header-search-wrapper,
[data-theme="dark"] body.blog .header-search-wrapper {
    background: rgba(30, 41, 59, 0.7) !important;
    border: 1px solid rgba(148, 163, 184, 0.25) !important;
}

[data-theme="dark"] body.home .header-search-wrapper .header-search-input,
[data-theme="dark"] body.blog .header-search-wrapper .header-search-input {
    color: #f1f5f9 !important;
}

/* 亮色模式：顶栏搜索框文字/占位符/图标恢复深色
   （style.css 的透明顶栏规则用 -webkit-text-fill-color:#fff !important 强制白字，必须以同样手段覆盖） */
body.home .site-header-nav:not(.scrolled) .header-search-input,
body.blog .site-header-nav:not(.scrolled) .header-search-input,
body.home .site-header-nav:not(.scrolled) .header-search-submit,
body.blog .site-header-nav:not(.scrolled) .header-search-submit {
    color: var(--text-main, #0f172a) !important;
    -webkit-text-fill-color: var(--text-main, #0f172a) !important;
    caret-color: var(--text-main, #0f172a);
}

body.home .site-header-nav:not(.scrolled) .header-search-input::placeholder,
body.blog .site-header-nav:not(.scrolled) .header-search-input::placeholder {
    color: #94a3b8 !important;
    -webkit-text-fill-color: #94a3b8 !important;
    opacity: 1;
}

/* ---------- 签到交互状态 ---------- */

body.home .checkin-btn.is-busy {
    opacity: 0.6;
    pointer-events: none;
}

body.home .checkin-card[data-state="checked"] .checkin-btn {
    opacity: 0.85;
}

body.home .checkin-reward.show {
    animation: jidiRewardPop 1.6s ease-out forwards;
}

@keyframes jidiRewardPop {
    0%   { opacity: 0; transform: translateY(6px) scale(0.8); }
    25%  { opacity: 1; transform: translateY(-4px) scale(1.15); }
    70%  { opacity: 1; transform: translateY(-14px) scale(1); }
    100% { opacity: 0; transform: translateY(-26px) scale(0.9); }
}

/* ---------- 底部三层波浪（移植原版 gr-wave 效果） ---------- */

.jidi-wave {
    position: relative;
    height: 180px;
    margin-top: 8px;
    overflow: hidden;
    pointer-events: none;
}

.jidi-wave-layer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    background-repeat: repeat-x;
    background-position: 0 bottom;
    background-size: 1440px auto;
    transform: translateZ(0);
    will-change: background-position;
}

/* back 层 (140px, 10s) */
.jidi-wave-back {
    height: 140px;
    opacity: 0.4;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 140' preserveAspectRatio='none'%3E%3Cpath fill='%2393c5fd' d='M0,80 C180,140 360,40 540,80 C720,120 900,40 1080,80 C1260,120 1350,60 1440,80 L1440,140 L0,140 Z'/%3E%3C/svg%3E");
    animation: jidiWaveMove 10s linear infinite;
}

/* front 层 (80px, 5s) */
.jidi-wave-front {
    height: 80px;
    opacity: 0.45;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath fill='%23dbeafe' d='M0,30 C240,80 480,0 720,30 C960,80 1200,0 1440,30 L1440,80 L0,80 Z'/%3E%3C/svg%3E");
    animation: jidiWaveMove 5s linear infinite;
}

@keyframes jidiWaveMove {
    from { background-position: 0 bottom; }
    to   { background-position: -1440px bottom; }
}

[data-theme="dark"] .jidi-wave-back {
    opacity: 0.45;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 140' preserveAspectRatio='none'%3E%3Cpath fill='%232563eb' d='M0,80 C180,140 360,40 540,80 C720,120 900,40 1080,80 C1260,120 1350,60 1440,80 L1440,140 L0,140 Z'/%3E%3C/svg%3E");
}

[data-theme="dark"] .jidi-wave-front {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath fill='%230f172a' d='M0,30 C240,80 480,0 720,30 C960,80 1200,0 1440,30 L1440,80 L0,80 Z'/%3E%3C/svg%3E");
}

/* 移动端不启用波浪 */
@media (max-width: 768px) {
    .jidi-wave {
        display: none;
    }
}

/* 底部免责声明容器：去掉实心纯白底，改毛玻璃，让格子背景透出（与详情页统一） */
body.home .disclaimer-section .disclaimer-container,
body.blog .disclaimer-section .disclaimer-container {
    background: rgba(255, 255, 255, 0.48) !important;
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    box-shadow: 0 10px 34px -6px rgba(2, 6, 23, 0.12) !important;
}

[data-theme="dark"] body.home .disclaimer-section .disclaimer-container,
[data-theme="dark"] body.blog .disclaimer-section .disclaimer-container {
    background: rgba(15, 23, 42, 0.5) !important;
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
}

body.home .disclaimer-section .disclaimer-container::before,
body.blog .disclaimer-section .disclaimer-container::before {
    border-color: rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] body.home .disclaimer-section .disclaimer-container::before,
[data-theme="dark"] body.blog .disclaimer-section .disclaimer-container::before {
    border-color: rgba(148, 163, 184, 0.25);
}

/* 首页主题悬浮切换按钮（右下角常驻） */
.gr-home-theme-toggle {
    position: fixed;
    right: 18px;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    z-index: 950;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    color: var(--text-main, #0f172a);
    font-size: 0.82rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(2, 6, 23, 0.14);
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.gr-home-theme-toggle:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary, #2563eb);
}

[data-theme="dark"] .gr-home-theme-toggle {
    background: rgba(30, 41, 59, 0.8);
    color: #f1f5f9;
    border-color: rgba(148, 163, 184, 0.3);
}

[data-theme="dark"] .gr-home-theme-toggle:hover {
    background: rgba(30, 41, 59, 0.95);
}

.gr-home-view[hidden] {
    display: none !important;
}

/* 旧 hero 主题下，隐藏底下的格子面板偏移（hero 自带深色背景） */
body.gr-home-hero .gr-home-theme-toggle {
    color: #fff;
    background: rgba(8, 13, 28, 0.55);
    border-color: rgba(255, 255, 255, 0.25);
}

/* ---------- hero 大背景主题：顶部菜单未滚动时透明 ---------- */

body.gr-home-hero .site-header-nav,
body.gr-home-hero .site-header-nav:not(.scrolled) {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: 1px solid transparent !important;
    box-shadow: none !important;
}

/* 未滚动时，透明导航上的文字/图标用白色（衬大背景图） */
body.gr-home-hero .site-header-nav:not(.scrolled) .logo-text,
body.gr-home-hero .site-header-nav:not(.scrolled) .main-navigation a,
body.gr-home-hero .site-header-nav:not(.scrolled) .mobile-menu-toggle,
body.gr-home-hero .site-header-nav:not(.scrolled) .header-user-btn,
body.gr-home-hero .site-header-nav:not(.scrolled) .mobile-search-toggle,
body.gr-home-hero .site-header-nav:not(.scrolled) .theme-toggle {
    color: #fff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45) !important;
    -webkit-text-fill-color: #fff !important;
}

body.gr-home-hero .site-header-nav:not(.scrolled) .main-navigation a:hover {
    color: rgba(255, 255, 255, 0.85) !important;
}

body.gr-home-hero .site-header-nav:not(.scrolled) .main-navigation a::after {
    background: #fff !important;
}

/* 未滚动时搜索框：透明底 + 白框白字，融入大背景 */
body.gr-home-hero .site-header-nav:not(.scrolled) .header-search-wrapper {
    background: rgba(255, 255, 255, 0.14) !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
}

body.gr-home-hero .site-header-nav:not(.scrolled) .header-search-input,
body.gr-home-hero .site-header-nav:not(.scrolled) .header-search-submit {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    caret-color: #fff;
}

body.gr-home-hero .site-header-nav:not(.scrolled) .header-search-input::placeholder {
    color: rgba(255, 255, 255, 0.78) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.78) !important;
}

/* 滚动后恢复实底玻璃 */
body.gr-home-hero .site-header-nav.scrolled {
    background: rgba(255, 255, 255, 0.78) !important;
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border-bottom: 1px solid rgba(226, 232, 240, 0.95) !important;
}

body.gr-home-hero .site-header-nav.scrolled .logo-text,
body.gr-home-hero .site-header-nav.scrolled .main-navigation a,
body.gr-home-hero .site-header-nav.scrolled .mobile-menu-toggle {
    color: var(--text-main, #0f172a) !important;
    text-shadow: none !important;
    -webkit-text-fill-color: var(--text-main, #0f172a) !important;
}

[data-theme="dark"] body.gr-home-hero .site-header-nav.scrolled {
    background: rgba(11, 18, 32, 0.78) !important;
    border-bottom: 1px solid rgba(51, 65, 85, 0.9) !important;
}

/* ---------- hero 主题：公告条移入大背景图内 ---------- */

/* hero 主题下，公告条绝对定位叠加在 hero 大背景容器顶部（紧贴导航下、大背景图之上） */
body.gr-home-hero .rnb-wrap {
    position: absolute !important;
    top: calc(var(--nav-height, 72px) + 10px);
    left: 50%;
    transform: translateX(-50%);
    width: min(1100px, calc(100% - 40px));
    margin: 0 !important;
    z-index: 40;
}

/* 让公告条以 hero-banner-wrapper 为定位参照：给它加 relative（本来就 relative，这里兜底） */
body.gr-home-hero .gr-home-view--hero {
    position: relative;
}

/* 大背景主题下公告条用玻璃深色，融入背景图 */
body.gr-home-hero .rnb-bar {
    background: rgba(4, 9, 22, 0.42) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
}

body.gr-home-hero .rnb-text {
    color: #fff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

body.gr-home-hero .rnb-close {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.16);
}

[data-theme="dark"] body.gr-home-hero .rnb-bar {
    background: rgba(2, 6, 23, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* hero 主题：隐藏 header 里的原公告条，改用 hero 大背景内部的公告 */
body.gr-home-hero .rnb-wrap {
    display: none !important;
}

/* hero 大背景内部的公告条（叠在大背景图顶部） */
.gr-hero-announce {
    position: absolute;
    top: calc(var(--nav-height, 72px) + 28px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: min(1100px, calc(100% - 48px));
    padding: 8px 12px 8px 8px;
    border-radius: 999px;
    background: rgba(4, 9, 22, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    color: #fff;
}

.gr-hero-announce-badge {
    flex: none;
    display: inline-flex;
    align-items: center;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #fff;
    background: linear-gradient(135deg, var(--primary, #2563eb), #7c3aed);
}

.gr-hero-announce-text {
    min-width: 0;
    font-size: 0.84rem;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gr-hero-announce-text a {
    color: #fff;
    font-weight: 600;
}

.gr-hero-announce-close {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.gr-hero-announce-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 640px) {
    .gr-hero-announce {
        gap: 7px;
        padding: 6px 10px 6px 6px;
    }

    .gr-hero-announce-text {
        font-size: 0.76rem;
    }
}

/* hero 主题：内容整体下移避让公告，同时压缩背景图高度让主体在首屏内 */
body.gr-home-hero .hero-banner-wrapper {
    min-height: 0 !important;
    padding-bottom: 0 !important;
}

body.gr-home-hero .hero-banner-wrapper.has-bg {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
}

body.gr-home-hero .hero-banner-content {
    padding-top: calc(var(--nav-height, 72px) + 96px) !important;
    padding-bottom: 3rem !important;
}

/* 主体文本压缩：减小标题/搜索/统计的纵向间距，让背景图内装得下 */
body.gr-home-hero .hero-banner-wrapper.has-bg .hero {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

body.gr-home-hero .hero-banner-wrapper.has-bg .hero-title {
    margin-bottom: 0.5rem !important;
}

body.gr-home-hero .hero-banner-wrapper.has-bg .search-section {
    margin-top: 0.75rem !important;
}

body.gr-home-hero .hero-banner-wrapper.has-bg .stats-container {
    margin-top: 1rem !important;
}

@media (max-width: 760px) {
    body.gr-home-hero .hero-banner-content {
        padding-top: calc(var(--nav-height, 72px) + 84px) !important;
    }
}

/* 新鲜事儿：签到动态头像 */
.jidi-c-avatar--checkin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(16, 185, 129, 0.1));
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.jidi-c-avatar--checkin svg {
    display: block;
}

/* 管理员金色徽标（复用「新游发布」pill 样式 · 金色 · 大一点） */
.jidi-admin-badge {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    margin-left: 7px;
    padding: 3px 9px;
    border-radius: 999px;
    vertical-align: middle;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.03em;
    color: #8a5b00;
    background: linear-gradient(135deg, rgba(255, 214, 90, 0.35), rgba(245, 179, 1, 0.18));
    border: 1px solid #e0a800;
    box-shadow: 0 1px 5px rgba(229, 176, 0, 0.45);
}

.jidi-admin-badge svg {
    display: block;
    color: #b8860b;
    flex: none;
}

[data-theme="dark"] .jidi-admin-badge {
    color: #ffe6a0;
    background: linear-gradient(135deg, rgba(255, 214, 90, 0.22), rgba(184, 134, 11, 0.28));
    border-color: #caa226;
}
