/* ============================================================
   Niu2 社区论坛样式（v12.259）
   使用主题 CSS 变量（--niu2-*），自动适配浅色/暗色模式
   ============================================================ */

.niu2-forum-wrap {
    max-width: 1080px;
    margin: 24px auto;
    padding: 0 16px;
    color: var(--niu2-text);
    box-sizing: border-box;
}

.niu2-forum-wrap * { box-sizing: border-box; }

/* ---------- 顶部标题区 ---------- */
.niu2-forum-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    background: var(--niu2-card-bg);
    border-radius: 14px;
    padding: 7px 14px;
    margin-bottom: 10px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.niu2-forum-header-text h1 {
    margin: 0;
    font-size: 16px;
    line-height: 1.3;
}

.niu2-forum-header-text p {
    margin: 1px 0 0;
    color: var(--niu2-text-secondary);
    font-size: 12px;
    font-weight: 500;
}

.niu2-forum-publish-btn {
    display: inline-block;
    background: var(--niu2-primary);
    color: #fff;
    padding: 6px 14px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: opacity .15s;
}

.niu2-forum-publish-btn:hover { opacity: .88; color: #fff; }

/* ---------- 区块 ---------- */
.niu2-forum-section {
    background: var(--niu2-card-bg);
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.niu2-forum-section-title {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 700;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    display: flex;
    align-items: center;
    gap: 8px;
}

.niu2-forum-section-title::before {
    content: '';
    width: 4px;
    height: 16px;
    border-radius: 2px;
    background: var(--niu2-primary);
}

/* ---------- 板块卡片网格 ---------- */
.niu2-forum-board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.niu2-forum-board-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.07);
    background: var(--niu2-bg);
    text-decoration: none;
    color: inherit;
    transition: transform .12s, box-shadow .12s;
}

.niu2-forum-board-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
    color: inherit;
}

.niu2-forum-board-avatar {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.niu2-forum-board-avatar-svg svg {
    width: 60%;
    height: 60%;
}

.niu2-forum-board-avatar-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.niu2-forum-board-info {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.niu2-forum-board-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--niu2-text);
}

.niu2-forum-board-desc {
    font-size: 12px;
    color: var(--niu2-text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.niu2-forum-board-stats {
    flex: 0 0 auto;
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 11px;
    color: var(--niu2-text-muted);
}

.niu2-forum-board-stat b { font-size: 14px; color: var(--niu2-text); margin-right: 3px; }

.niu2-forum-board-today { color: var(--niu2-accent); }

/* ---------- 最新帖子：左轮播 + 右彩色序号列表 ---------- */
.niu2-forum-latest-flex {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.niu2-forum-latest-carousel {
    width: 300px;
    height: 250px;
    flex: 0 0 auto;
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--niu2-primary), var(--niu2-accent, var(--niu2-primary)));
}

.niu2-forum-carousel-slide {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.niu2-forum-carousel-slide.active { display: flex; }

.niu2-forum-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.niu2-forum-carousel-placeholder {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    padding: 0 24px;
    text-align: center;
    line-height: 1.5;
}

.niu2-forum-carousel-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 26px 14px 10px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.niu2-forum-carousel-dots {
    position: absolute;
    bottom: 8px;
    right: 12px;
    display: flex;
    gap: 5px;
}

.niu2-forum-carousel-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
}

.niu2-forum-carousel-dot.active { background: #fff; }

.niu2-forum-latest-list {
    flex: 1 1 300px;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.niu2-forum-latest-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 9px;
    text-decoration: none;
    transition: background .15s;
}

.niu2-forum-latest-item:hover { background: rgba(0, 0, 0, 0.04); }

.niu2-forum-latest-num {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--c);
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.niu2-forum-latest-title {
    color: var(--niu2-text);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.niu2-forum-latest-item:hover .niu2-forum-latest-title { color: var(--niu2-primary); }

body.dark-mode .niu2-forum-latest-item:hover { background: rgba(255, 255, 255, 0.07); }

/* ---------- 帖子列表（卡片化） ---------- */
.niu2-forum-topics {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.niu2-forum-topic-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    background: var(--niu2-card-bg);
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 12px;
    transition: box-shadow .15s, border-color .15s;
}

.niu2-forum-topic-row:hover {
    border-color: rgba(0, 0, 0, 0.13);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.niu2-forum-topic-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.niu2-forum-topic-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
}

.niu2-forum-topic-title a {
    color: var(--niu2-text);
    text-decoration: none;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.niu2-forum-topic-title a:hover { color: var(--niu2-primary); }

.niu2-forum-topic-excerpt {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--niu2-text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 缩略图网格：横排方格，统一尺寸对齐 */
.niu2-forum-topic-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 2px;
}

.niu2-forum-topic-thumb {
    width: 96px;
    height: 96px;
    border-radius: 9px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.05);
    flex: 0 0 auto;
}

.niu2-forum-topic-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.niu2-forum-topic-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: var(--niu2-text-muted);
    margin-top: 2px;
}

.niu2-forum-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.niu2-forum-meta-item img.avatar { border-radius: 50%; }

.niu2-forum-board-tag {
    display: inline-block;
    padding: 1px 9px;
    border-radius: 20px;
    border: 1px solid var(--niu2-primary);
    color: var(--niu2-primary);
    font-size: 11.5px;
    text-decoration: none;
    line-height: 1.6;
}

.niu2-forum-board-tag:hover { opacity: .8; }

.niu2-forum-topic-side {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 18px;
    padding-top: 2px;
}

.niu2-forum-count-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 11px;
    color: var(--niu2-text-muted);
}

.niu2-forum-count-item b {
    font-size: 15px;
    color: var(--niu2-text);
}

.niu2-forum-count-views b { color: var(--niu2-text-secondary); }

.niu2-forum-empty {
    padding: 40px 16px;
    text-align: center;
    color: var(--niu2-text-secondary);
    font-size: 14px;
}

.niu2-forum-err {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 16px;
}

/* ---------- 帖子详情 ---------- */
.niu2-forum-topic-detail {
    background: var(--niu2-card-bg);
    border-radius: 14px;
    padding: 26px 28px;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.niu2-forum-topic-detail-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 12.5px;
    color: var(--niu2-text-muted);
    margin-bottom: 14px;
}

.niu2-forum-topic-detail-title {
    margin: 0 0 20px;
    font-size: 23px;
    line-height: 1.4;
}

.niu2-forum-topic-detail-content {
    font-size: 15px;
    line-height: 1.8;
    color: var(--niu2-text);
    word-break: break-word;
}

.niu2-forum-topic-detail-content img { max-width: 100%; height: auto; border-radius: 8px; }

.niu2-forum-topic-detail-content a { color: var(--niu2-primary); }

.niu2-forum-topic-detail-foot {
    display: flex;
    gap: 20px;
    margin-top: 24px;
    padding-top: 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.07);
    font-size: 13px;
}

.niu2-forum-topic-detail-foot a { color: var(--niu2-text-secondary); text-decoration: none; }

.niu2-forum-topic-detail-foot a:hover { color: var(--niu2-primary); }

/* ---------- 发帖表单 ---------- */
.niu2-forum-publish-form { display: flex; flex-direction: column; gap: 18px; }

.niu2-forum-field label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 7px;
}

.niu2-forum-field label em { color: #dc2626; font-style: normal; }

.niu2-forum-field input[type="text"],
.niu2-forum-field select,
.niu2-forum-field textarea {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 9px;
    font-size: 14px;
    background: var(--niu2-bg);
    color: var(--niu2-text);
    font-family: inherit;
}

.niu2-forum-field input:focus,
.niu2-forum-field select:focus,
.niu2-forum-field textarea:focus {
    outline: none;
    border-color: var(--niu2-primary);
}

.niu2-forum-field-tip {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--niu2-text-muted);
}

/* ---------- 发帖验证码 ---------- */
.niu2-forum-cap-inline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--niu2-bg);
    border: 1px solid rgba(0, 0, 0, 0.10);
    border-radius: 10px;
    padding: 9px 12px;
    width: 100%;
    box-sizing: border-box;
}

.niu2-forum-cap-quiz {
    font-size: 14px;
    font-weight: 600;
    color: var(--niu2-text);
    white-space: nowrap;
    min-width: 72px;
    text-align: center;
}

.niu2-forum-cap-quiz b { color: var(--niu2-primary); }

.niu2-forum-cap-input {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    max-width: 130px;
    padding: 6px 10px !important;
    font-size: 13px;
    text-align: center;
    border-radius: 8px !important;
    background: var(--niu2-card-bg) !important;
}

.niu2-forum-cap-refresh {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    background: transparent;
    color: var(--niu2-text-secondary);
    font-size: 16px;
    cursor: pointer;
    transition: all .15s;
    line-height: 1;
    padding: 0;
}

.niu2-forum-cap-refresh:hover {
    border-color: var(--niu2-primary);
    color: var(--niu2-primary);
    transform: rotate(180deg);
}

.niu2-forum-cap-slider {
    position: relative;
    height: 46px;
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 10px;
    background: var(--niu2-bg);
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.niu2-forum-cap-slider-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: rgba(99, 102, 241, 0.16);
    transition: width .2s;
}

.niu2-forum-cap-slider-text {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--niu2-text-muted);
    pointer-events: none;
}

.niu2-forum-cap-slider-btn {
    position: absolute;
    left: 2px;
    top: 2px;
    bottom: 2px;
    width: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--niu2-primary);
    color: #fff;
    font-size: 17px;
    border-radius: 8px;
    cursor: grab;
    z-index: 2;
    transition: transform .2s;
    touch-action: none;
}

.niu2-forum-cap-slider-btn:active { cursor: grabbing; }

.niu2-cap-slider-ok {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.08);
}

.niu2-cap-slider-ok .niu2-forum-cap-slider-fill { background: rgba(34, 197, 94, 0.25); }

.niu2-cap-slider-ok .niu2-forum-cap-slider-btn {
    background: #22c55e;
    cursor: default;
}

.niu2-cap-slider-ok .niu2-forum-cap-slider-text { color: #16a34a; }

/* ---------- 富文本编辑器（发帖页） ---------- */
.niu2-forum-wrap .wp-editor-container {
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 9px;
    overflow: hidden;
    background: var(--niu2-bg);
}

.niu2-forum-wrap .mce-tinymce {
    border: none !important;
}

.niu2-forum-wrap .wp-media-buttons {
    margin-bottom: 8px;
}

.niu2-forum-wrap .wp-media-buttons .button {
    font-size: 13px;
}

.niu2-forum-wrap .mce-panel {
    background: var(--niu2-card-bg) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

.niu2-forum-wrap .mce-top-part::before {
    box-shadow: none !important;
}

.niu2-forum-wrap .mce-btn button {
    color: var(--niu2-text) !important;
}

.niu2-forum-wrap .mce-edit-area iframe {
    min-height: 220px;
    background: var(--niu2-bg) !important;
}

body.dark-mode .niu2-forum-wrap .wp-editor-container {
    border-color: rgba(255, 255, 255, 0.18);
}

/* ---------- 后台板块图标选择器（点击弹出） ---------- */
.niu2-forum-icon-picker {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.niu2-forum-icon-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid #dcdcde;
    border-radius: 9px;
    background: #fff;
    color: #6366f1;
    overflow: hidden;
}

.niu2-forum-icon-current svg {
    width: 55%;
    height: 55%;
}

.niu2-forum-icon-current img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.niu2-forum-icon-none {
    font-size: 11px;
    color: #bbb;
}

.niu2-forum-icon-url-row {
    margin-top: 8px;
}

.niu2-forum-icon-url-row input {
    width: 340px !important;
}

.niu2-forum-icon-modal {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
}

.niu2-forum-icon-modal-mask {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.niu2-forum-icon-modal-panel {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(640px, 92vw);
    max-height: 72vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.niu2-forum-icon-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #eee;
    font-size: 15px;
}

.niu2-forum-icon-modal-close {
    font-size: 20px;
    line-height: 1;
    color: #888;
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
}

.niu2-forum-icon-modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
    gap: 8px;
    padding: 16px 18px;
    overflow-y: auto;
}

.niu2-forum-icon-opt {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    border: 1px solid #e2e2e6;
    border-radius: 8px;
    background: #fafafa;
    color: #666;
    cursor: pointer;
    padding: 0;
    transition: all .12s;
}

.niu2-forum-icon-opt svg {
    width: 55%;
    height: 55%;
}

.niu2-forum-icon-opt:hover {
    border-color: #6366f1;
    color: #6366f1;
}

.niu2-forum-icon-opt.active {
    border-color: #6366f1;
    background: #eef0ff;
    color: #6366f1;
    box-shadow: 0 0 0 1px #6366f1;
}

.niu2-forum-icon-modal-panel > .description {
    padding: 0 18px 14px;
    margin: 0;
}

/* ---------- 等级徽章 ---------- */
.niu2-forum-level-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 8px;
    border-radius: 20px;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.7;
    color: var(--lv, #6366f1);
    background: color-mix(in srgb, var(--lv, #6366f1) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--lv, #6366f1) 45%, transparent);
    white-space: nowrap;
    vertical-align: middle;
}

.niu2-forum-level-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--lv, #6366f1);
    flex: 0 0 auto;
}

.niu2-forum-level-badge-sm {
    font-size: 10px;
    padding: 0 6px;
}

.niu2-forum-level-badge-sm::before {
    width: 5px;
    height: 5px;
}

.niu2-forum-level-badge-lg {
    font-size: 12px;
    padding: 2px 10px;
    gap: 5px;
}

.niu2-forum-level-badge-lg::before {
    width: 7px;
    height: 7px;
}

/* ---------- 每日签到卡片 ---------- */
.niu2-forum-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.niu2-forum-sign-card {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: var(--niu2-card-bg);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 6px 10px;
    max-width: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.niu2-forum-sign-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.niu2-forum-sign-user img {
    border-radius: 50%;
    width: 30px;
    height: 30px;
}

.niu2-forum-sign-user-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.niu2-forum-sign-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--niu2-text);
}

.niu2-forum-sign-exp {
    flex: 1 1 180px;
    min-width: 180px;
}

.niu2-forum-sign-exp-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    color: var(--niu2-text-secondary);
    margin-bottom: 3px;
}

.niu2-forum-sign-exp-top b {
    color: var(--niu2-text);
    font-size: 13px;
}

.niu2-forum-sign-bar {
    height: 5px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.niu2-forum-sign-bar i {
    display: block;
    height: 100%;
    border-radius: 5px;
    transition: width .4s ease;
}

.niu2-forum-sign-btn {
    display: inline-block;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    padding: 4px 10px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: opacity .15s;
    white-space: nowrap;
}

.niu2-forum-sign-btn:hover { opacity: .88; }

.niu2-forum-sign-btn:disabled {
    background: linear-gradient(135deg, #9ca3af, #9ca3af);
    cursor: default;
    opacity: 1;
}

/* 板块页返回论坛按钮（浅色小按钮） */
.niu2-forum-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f3f4f6;
    color: #374151;
    padding: 4px 12px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid #e5e7eb;
    margin-bottom: 10px;
    transition: background .15s, color .15s;
}

.niu2-forum-back-btn:hover {
    background: var(--niu2-primary-color, #6366f1);
    color: #fff;
    border-color: transparent;
}

.niu2-forum-header-board .niu2-forum-header-text h1 { margin-top: 4px; }

.niu2-forum-sign-msg {
    font-size: 11px;
    color: var(--niu2-text-secondary);
    width: 100%;
}

/* ---------- 后台经验与等级设置 ---------- */
.niu2-forum-exp-admin {
    max-width: 680px;
}

.niu2-forum-exp-switch {
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.niu2-forum-exp-gain {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.niu2-forum-exp-gain-item {
    flex: 1 1 150px;
    background: #f9f9fb;
    border: 1px solid #e5e5e8;
    border-radius: 10px;
    padding: 10px 14px;
}

.niu2-forum-exp-gain-item label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 13px;
}

.niu2-forum-exp-gain-item input {
    width: 70px;
}

.niu2-forum-exp-levels {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 8px;
}

.niu2-forum-exp-level {
    display: flex;
    align-items: center;
    gap: 9px;
    background: #fff;
    border: 1px solid #e5e5e8;
    border-radius: 10px;
    padding: 8px 12px;
}

.niu2-forum-exp-level-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.niu2-forum-exp-level-name {
    flex: 1 1 auto;
    font-size: 13px;
    font-weight: 600;
}

.niu2-forum-exp-level-th {
    font-size: 12px;
    color: #666;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.niu2-forum-exp-level-th input {
    width: 70px;
}

.niu2-forum-exp-level-preview {
    flex: 0 0 60px;
    height: 8px;
    border-radius: 5px;
}

/* ---------- 后台首页模块排序 ---------- */
.niu2-forum-module-sort {
    max-width: 420px;
    margin: 0;
    list-style: none;
}

.niu2-forum-module-sort li {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: move;
}

.niu2-forum-module-sort li.ui-sortable-helper {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.niu2-forum-module-sort-grip {
    color: #999;
    font-size: 14px;
    user-select: none;
}

/* ---------- 回帖验证码（评论表单内） ---------- */
.niu2-forum-comment-cap {
    margin: 10px 0 4px;
}

.niu2-forum-comment-cap label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--niu2-text);
}

.niu2-forum-comment-cap .niu2-forum-cap-inline {
    max-width: 320px;
}

/* ---------- 移动端 ---------- */
@media (max-width: 640px) {
    .niu2-forum-wrap { padding: 0 12px; margin: 16px auto; }
    .niu2-forum-header { padding: 8px 10px; position: relative; }
    .niu2-forum-header-text h1 { font-size: 16px; font-weight: 700; }
    .niu2-forum-header-text p { font-size: 12px; margin-top: 1px; font-weight: 500; }
    .niu2-forum-section { padding: 16px; }
    .niu2-forum-topic-detail { padding: 18px 16px; }
    .niu2-forum-topic-detail-title { font-size: 19px; }
    .niu2-forum-board-grid { grid-template-columns: 1fr; }
    .niu2-forum-header-actions { width: 100%; flex-direction: column; align-items: stretch; }
    .niu2-forum-sign-card { width: 100%; justify-content: space-between; padding: 6px 10px; }
    .niu2-forum-sign-btn { position: absolute; top: 8px; right: 10px; }
    .niu2-forum-sign-name { font-size: 14px; font-weight: 700; }
    .niu2-forum-sign-exp-top { font-size: 12.5px; }
    .niu2-forum-sign-exp-top b { font-size: 13.5px; }
    .niu2-forum-publish-btn { width: 100%; text-align: center; }
    .niu2-forum-back-btn { margin-bottom: 4px; }
    .niu2-forum-topic-row { gap: 10px; padding: 12px 12px; }
    .niu2-forum-topic-thumb { width: 76px; height: 76px; }
    .niu2-forum-topic-thumbs { gap: 6px; }
    .niu2-forum-topic-excerpt { -webkit-line-clamp: 1; }
    .niu2-forum-topic-side { gap: 12px; }
    .niu2-forum-count-item b { font-size: 14px; }
    .niu2-forum-topic-meta { gap: 8px; }
    /* 最新帖子模块：移动端只显示标题列表，隐藏轮播图 */
    .niu2-forum-latest-carousel { display: none; }
    .niu2-forum-latest-flex { gap: 0; }
    .niu2-forum-latest-list { flex-basis: 100%; max-width: 100%; gap: 1px; }
    .niu2-forum-latest-item { padding: 4px 3px; gap: 7px; }
    .niu2-forum-latest-num { width: 16px; height: 16px; font-size: 10.5px; border-radius: 5px; }
    .niu2-forum-latest-title { font-size: 12.5px; }
}
