/* ===== 脑筋急转弯模块 · 墨绿谜题卡 ===== */

body.njjzw-page {
    --nj-bg-deep: #0a1f18;
    --nj-bg: #0e2a20;
    --nj-bg-2: #154032;
    --nj-paper: #f4f0e2;
    --nj-paper-2: #e8e1cb;
    --nj-ink: #17281f;
    --nj-ink-soft: #4a6153;
    --nj-gold: #d9b45f;
    --nj-gold-light: #f0d99a;
    --nj-red: #b5443c;
    --nj-text: #e9e5d4;
    --nj-text-dim: rgba(233, 229, 212, 0.62);

    background:
        radial-gradient(1200px 600px at 50% -10%, rgba(217, 180, 95, 0.10), transparent 60%),
        linear-gradient(180deg, var(--nj-bg-deep) 0%, var(--nj-bg) 40%, var(--nj-bg-2) 100%);
    background-attachment: fixed;
    color: var(--nj-text);
}

/* ===== 页面容器 ===== */
body.njjzw-page .article-wrapper {
    max-width: 1000px;
}

/* ===== 与全站共用框架的配色统一 ===== */
body.njjzw-page .top-bar {
    background: rgba(10, 31, 24, 0.95);
    border-bottom-color: rgba(217, 180, 95, 0.22);
}

body.njjzw-page .footer {
    background: rgba(7, 24, 18, 0.85);
    border-top-color: rgba(217, 180, 95, 0.22);
}

body.njjzw-page .place {
    color: var(--nj-text-dim);
}

body.njjzw-page .place strong {
    color: var(--nj-text);
}

body.njjzw-page .place a {
    color: var(--nj-gold);
}

/* ===== 题头 ===== */
.nj-masthead {
    padding: 46px 20px 10px;
    text-align: center;
}

.nj-masthead-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 26px;
    max-width: 1000px;
    margin: 0 auto;
}

.nj-lantern {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, var(--nj-gold-light), var(--nj-gold) 55%, #a8802f 100%);
    box-shadow: 0 0 18px rgba(217, 180, 95, 0.45);
    position: relative;
}

.nj-lantern::before,
.nj-lantern::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 3px;
    background: var(--nj-gold);
    border-radius: 2px;
}

.nj-lantern::before { top: -4px; }
.nj-lantern::after { bottom: -4px; }

.nj-masthead-title {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: 6px;
    background: linear-gradient(135deg, var(--nj-gold-light), var(--nj-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.nj-masthead-byline {
    margin-top: 10px;
    font-size: 14px;
    color: var(--nj-text-dim);
    letter-spacing: 2px;
}

.nj-rule {
    height: 2px;
    max-width: 1000px;
    margin: 26px auto 0;
    background: linear-gradient(90deg, transparent, var(--nj-gold), transparent);
    opacity: 0.65;
}

.nj-rule-sub {
    height: 1px;
    max-width: 1000px;
    margin: 6px auto 0;
    background: linear-gradient(90deg, transparent, rgba(217, 180, 95, 0.35), transparent);
}

.nj-masthead-tail {
    height: 34px;
    max-width: 1000px;
    margin: 0 auto;
}

/* ===== 题面卡 ===== */
.nj-question {
    background: linear-gradient(160deg, var(--nj-paper) 0%, var(--nj-paper-2) 100%);
    border-radius: 14px;
    padding: 34px 40px 30px;
    position: relative;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(217, 180, 95, 0.45);
    overflow: hidden;
}

.nj-question::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(180deg, var(--nj-gold), #a8802f);
}

.nj-question-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-left: 10px;
}

.nj-q-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #8a6f2a;
    background: rgba(217, 180, 95, 0.18);
    border: 1px solid rgba(217, 180, 95, 0.4);
    border-radius: 999px;
    padding: 4px 14px;
}

.nj-q-no {
    font-size: 13px;
    color: var(--nj-ink-soft);
    letter-spacing: 1px;
}

.nj-question-text {
    font-size: 27px;
    font-weight: 700;
    line-height: 1.7;
    color: var(--nj-ink);
    padding-left: 10px;
    word-break: break-word;
}

.nj-q-cat {
    margin-top: 20px;
    padding-left: 10px;
    font-size: 13px;
    color: var(--nj-ink-soft);
}

.nj-q-cat i {
    margin-right: 5px;
    color: #a8802f;
}

/* ===== 答案 ===== */
.nj-think {
    text-align: center;
    margin: 26px 0 18px;
    font-size: 14px;
    letter-spacing: 3px;
    color: var(--nj-gold-light);
}

.nj-think i {
    margin-right: 6px;
    opacity: 0.85;
}

.nj-answer {
    position: relative;
    background: linear-gradient(150deg, rgba(10, 31, 24, 0.92), rgba(21, 64, 50, 0.92));
    border: 1px solid rgba(217, 180, 95, 0.35);
    border-radius: 14px;
    padding: 28px 34px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.32);
    overflow: hidden;
}

.nj-answer::after {
    content: '';
    position: absolute;
    inset: 6px;
    border: 1px solid rgba(217, 180, 95, 0.16);
    border-radius: 9px;
    pointer-events: none;
}

.nj-answer-seal {
    position: absolute;
    top: 20px;
    right: 26px;
    width: 56px;
    height: 56px;
    border: 2px solid var(--nj-red);
    border-radius: 8px;
    color: var(--nj-red);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(-12deg);
    opacity: 0.9;
    background: rgba(181, 68, 60, 0.06);
    z-index: 2;
}

.nj-answer-body {
    position: relative;
    z-index: 1;
}

.nj-answer-text {
    font-size: 19px;
    line-height: 1.95;
    color: #f3efdf;
    padding-right: 76px;
}

.nj-answer-text + .nj-answer-text {
    margin-top: 12px;
}

.nj-answer-note {
    font-size: 16px;
    color: var(--nj-text-dim);
    padding-right: 76px;
}

/* ===== 卷尾信息 ===== */
.nj-meta {
    margin-top: 24px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--nj-text-dim);
}

.nj-meta i {
    margin-right: 5px;
    opacity: 0.7;
}

.nj-disclaimer {
    margin-top: 18px;
    padding: 14px 18px;
    font-size: 13px;
    line-height: 1.9;
    color: var(--nj-text-dim);
    background: rgba(0, 0, 0, 0.18);
    border-left: 3px solid rgba(217, 180, 95, 0.45);
    border-radius: 0 8px 8px 0;
}

.nj-disclaimer i {
    margin-right: 6px;
    color: var(--nj-gold);
}

/* ===== 上下篇导航 ===== */
.nj-nav {
    margin-top: 30px;
    display: flex;
    gap: 18px;
}

.nj-nav-item {
    flex: 1;
    min-width: 0;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(217, 180, 95, 0.2);
    border-radius: 10px;
    padding: 14px 18px;
    transition: all 0.25s;
}

.nj-nav-item:hover {
    background: rgba(217, 180, 95, 0.1);
    border-color: rgba(217, 180, 95, 0.45);
}

.nj-nav-label {
    display: block;
    font-size: 12px;
    letter-spacing: 2px;
    color: var(--nj-gold);
    margin-bottom: 6px;
}

.nj-nav-item a {
    display: block;
    font-size: 15px;
    color: var(--nj-text);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nj-nav-item a:hover {
    color: var(--nj-gold-light);
}

.nj-nav-item:nth-child(2) {
    text-align: right;
}

/* ===== 操作条 ===== */
.nj-actions {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.nj-act {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.25s;
    border: 1px solid transparent;
}

.nj-act-primary {
    background: linear-gradient(135deg, var(--nj-gold), #b98f34);
    color: #16241d;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(217, 180, 95, 0.28);
}

.nj-act-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(217, 180, 95, 0.4);
}

.nj-act-ghost {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(217, 180, 95, 0.3);
    color: var(--nj-text);
}

.nj-act-ghost:hover {
    background: rgba(217, 180, 95, 0.12);
    color: var(--nj-gold-light);
}

/* ===== 列表页 ===== */
.nj-page-header {
    text-align: center;
    padding: 30px 20px 6px;
}

.nj-page-header h1 {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 3px;
    background: linear-gradient(135deg, var(--nj-gold-light), var(--nj-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nj-page-sub {
    margin-top: 8px;
    font-size: 14px;
    color: var(--nj-text-dim);
    letter-spacing: 1px;
}

.nj-search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 22px;
}

.nj-search-input {
    flex: 1;
    min-width: 0;
    padding: 11px 16px;
    border-radius: 8px;
    border: 1px solid rgba(217, 180, 95, 0.28);
    background: rgba(0, 0, 0, 0.28);
    color: var(--nj-text);
    font-size: 14px;
    outline: none;
    transition: border-color 0.25s;
}

.nj-search-input::placeholder {
    color: rgba(233, 229, 212, 0.38);
}

.nj-search-input:focus {
    border-color: rgba(217, 180, 95, 0.65);
}

.nj-search-btn {
    padding: 11px 24px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--nj-gold), #b98f34);
    color: #16241d;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.2s, box-shadow 0.2s;
}

.nj-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(217, 180, 95, 0.3);
}

.nj-result-count {
    margin-bottom: 18px;
    font-size: 14px;
    color: var(--nj-text-dim);
}

.nj-result-count strong {
    color: var(--nj-gold-light);
}

.nj-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.nj-card {
    display: flex;
    background: linear-gradient(160deg, rgba(244, 240, 226, 0.97), rgba(232, 225, 203, 0.97));
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(217, 180, 95, 0.4);
    transition: transform 0.25s, box-shadow 0.25s;
}

.nj-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.38);
}

.nj-card-bar {
    flex: 0 0 6px;
    background: linear-gradient(180deg, var(--nj-gold), #a8802f);
}

.nj-card-main {
    flex: 1;
    min-width: 0;
    padding: 16px 20px 14px;
}

.nj-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.nj-cat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    padding: 3px 11px;
    border-radius: 999px;
    background: rgba(23, 40, 31, 0.07);
    border: 1px solid rgba(23, 40, 31, 0.12);
    color: var(--nj-ink-soft);
}

.nj-cat i {
    font-size: 11px;
}

.nj-card-no {
    font-size: 12px;
    color: rgba(74, 97, 83, 0.65);
    letter-spacing: 1px;
}

.nj-card-title {
    display: block;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.7;
    color: var(--nj-ink);
    text-decoration: none;
    word-break: break-word;
}

.nj-card-title:hover {
    color: #8a6f2a;
}

.nj-card-foot {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 12px;
    color: rgba(74, 97, 83, 0.7);
}

.nj-card-foot i {
    margin-right: 4px;
    opacity: 0.6;
}

.nj-card-go {
    color: #8a6f2a;
    font-weight: 600;
}

.nj-highlight {
    background: rgba(217, 180, 95, 0.4);
    color: #7a5f16;
    border-radius: 3px;
    padding: 0 2px;
}

.nj-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--nj-text-dim);
}

.nj-empty i {
    font-size: 40px;
    color: rgba(217, 180, 95, 0.45);
    margin-bottom: 16px;
    display: block;
}

.nj-empty strong {
    color: var(--nj-gold-light);
}

.nj-empty-sub {
    margin-top: 10px;
    font-size: 13px;
}

/* ===== 分页 ===== */
body.njjzw-page .pagination-wrapper {
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
}

body.njjzw-page .page-info {
    font-size: 13px;
    color: var(--nj-text-dim);
}

body.njjzw-page .page-info strong {
    color: var(--nj-gold-light);
}

body.njjzw-page .page-btns {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

body.njjzw-page .page-btn,
body.njjzw-page .page-num {
    display: inline-block;
    min-width: 34px;
    padding: 7px 13px;
    text-align: center;
    border-radius: 7px;
    border: 1px solid rgba(217, 180, 95, 0.25);
    background: rgba(255, 255, 255, 0.04);
    color: var(--nj-text);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
}

body.njjzw-page .page-btn:hover,
body.njjzw-page .page-num:hover {
    background: rgba(217, 180, 95, 0.14);
    border-color: rgba(217, 180, 95, 0.5);
    color: var(--nj-gold-light);
}

body.njjzw-page .page-btn.disabled {
    opacity: 0.35;
    pointer-events: none;
}

body.njjzw-page .page-num.active {
    background: linear-gradient(135deg, var(--nj-gold), #b98f34);
    border-color: var(--nj-gold);
    color: #16241d;
    font-weight: 700;
}

body.njjzw-page .page-dots {
    padding: 0 4px;
    color: var(--nj-text-dim);
}

/* ===== 返回顶部 ===== */
.njjzw-page .back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--nj-gold), #a8802f);
    color: #16241d;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.38);
    transition: all 0.25s;
    z-index: 999;
}

.njjzw-page .back-to-top:hover {
    background: var(--nj-gold-light);
    transform: translateY(-3px);
}

.njjzw-page .back-to-top.show {
    display: flex;
}

/* ===== 404 ===== */
.nj-404-wrap {
    max-width: 640px;
    margin: 0 auto;
    padding: 60px 24px;
    text-align: center;
}

.nj-404-code {
    font-size: 108px;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(135deg, var(--nj-gold-light), var(--nj-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nj-404-seal {
    display: inline-block;
    margin-top: 20px;
    padding: 7px 18px;
    border: 2px solid var(--nj-red);
    border-radius: 8px;
    color: var(--nj-red);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 3px;
    transform: rotate(-4deg);
    background: rgba(181, 68, 60, 0.06);
}

.nj-404-title {
    margin-top: 14px;
    font-size: 25px;
    font-weight: 700;
    color: var(--nj-gold-light);
    letter-spacing: 2px;
}

.nj-404-desc {
    margin-top: 18px;
    font-size: 15px;
    line-height: 2;
    color: var(--nj-text-dim);
}

.nj-404-desc p {
    margin-bottom: 8px;
}

.nj-404-q {
    color: #f3efdf;
    font-size: 17px;
    font-weight: 700;
}

.nj-404-actions {
    margin-top: 28px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.nj-404-search {
    margin-top: 26px;
    display: flex;
    gap: 10px;
}

.nj-404-links {
    margin-top: 34px;
    text-align: left;
}

.nj-404-links h3 {
    font-size: 14px;
    letter-spacing: 2px;
    color: var(--nj-gold);
    margin-bottom: 12px;
    text-align: center;
}

.nj-404-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.nj-404-grid a {
    display: block;
    padding: 9px 12px;
    border-radius: 7px;
    background: rgba(217, 180, 95, 0.07);
    border: 1px solid rgba(217, 180, 95, 0.16);
    color: var(--nj-text);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
}

.nj-404-grid a:hover {
    background: rgba(217, 180, 95, 0.15);
    border-color: rgba(217, 180, 95, 0.4);
    color: var(--nj-gold-light);
}

.nj-404-foot {
    margin-top: 40px;
    padding-top: 18px;
    border-top: 1px solid rgba(217, 180, 95, 0.18);
    font-size: 13px;
    color: rgba(233, 229, 212, 0.45);
}

.nj-404-foot a {
    color: var(--nj-gold);
    text-decoration: none;
}

.nj-404-foot a:hover {
    color: var(--nj-gold-light);
}

/* ===== 响应式 ===== */
@media (max-width: 860px) {
    .nj-list {
        grid-template-columns: 1fr;
    }

    .nj-masthead-title {
        font-size: 30px;
        letter-spacing: 4px;
    }

    .nj-question {
        padding: 26px 22px 22px;
    }

    .nj-question-text {
        font-size: 21px;
    }

    .nj-answer {
        padding: 24px 20px;
    }

    .nj-answer-text {
        font-size: 17px;
        padding-right: 64px;
    }

    .nj-answer-seal {
        width: 46px;
        height: 46px;
        font-size: 16px;
        top: 16px;
        right: 18px;
    }

    .nj-nav {
        flex-direction: column;
    }

    .nj-nav-item:nth-child(2) {
        text-align: left;
    }

    .nj-404-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .nj-404-code {
        font-size: 78px;
    }

    .nj-404-title {
        font-size: 21px;
    }

    .nj-search-form,
    .nj-404-search {
        flex-wrap: wrap;
    }

    .nj-search-input {
        flex: 1 1 100%;
    }
}
