/* bootstrap-markdown（BS3 环境下面板按钮样式兜底） */
.forum-wrap .md-editor,
.forum-body .md-editor {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    max-width: 100%;
}

.forum-wrap .md-editor .btn-light,
.forum-body .md-editor .btn-light {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #334155;
}

.forum-wrap .md-editor .md-header,
.forum-body .md-editor .md-header {
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px 10px;
    border-bottom: 1px solid #e2e8f0;
}

.forum-wrap .md-editor .md-input,
.forum-body .md-editor textarea.md-input {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    line-height: 1.55;
}

.forum-body,
html .forum-body {
    background: #f0f2f5;
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* layui Layer：避免被论坛侧栏/导航遮挡（仅 body 下全局弹层） */
body > .layui-layer-shade,
body > .layui-layer {
    z-index: 20010000 !important;
}

.main-nav {
    background: #fff;
    padding: 8px 36px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 0 rgba(16, 24, 40, 0.04);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 34px;
}

.logo a,
.logo a.forum-logo-link {
    color: #2c3e4f;
    font-weight: 700;
    font-size: 21px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.forum-site-logo {
    display: block;
    height: 36px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 28px;
}

.nav-links a {
    color: #626161;
    text-decoration: none;
    font-size: 14px;
}

.nav-links a:hover {
    color: #817553;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.nav-search {
    display: flex;
    align-items: center;
    background: rgba(181, 181, 181, 0.15);
    border-radius: 30px;
    padding: 4px 10px;
    gap: 8px;
}

.nav-search input {
    background: transparent;
    border: none;
    outline: none;
    width: 156px;
    font-size: 13px;
    color: #52525b;
}

.nav-search button {
    background: #2563eb;
    border: none;
    color: #fff;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 12px;
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #5a6874;
    text-decoration: none;
    font-size: 17px;
}

.nav-icon-btn:hover {
    background: #f0f2f5;
    color: #2563eb;
}

.nav-icon-btn .fa {
    line-height: 1;
}

.nav-message-btn {
    position: relative;
}

.nav-notice-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    border-radius: 999px;
    padding: 0 4px;
    font-size: 10px;
    text-align: center;
    color: #fff;
    background: #ef4444;
}

.user-profile {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.user-avatar-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-avatar-image {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 1px solid #e5e7eb;
}

.forum-user-menu {
    position: relative;
    flex-shrink: 0;
}

/* 填补头像与下拉之间的空隙，避免移入菜单时 hover 断开 */
.forum-user-menu::after {
    content: '';
    position: absolute;
    left: -8px;
    right: -8px;
    top: 100%;
    height: 12px;
}

.user-profile-trigger {
    cursor: pointer;
    border: none;
    background: transparent;
    padding: 0;
}

.forum-user-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 160px;
    padding: 6px 0;
    margin: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(16, 24, 40, 0.12);
    z-index: 1200;
}

.forum-user-dropdown::before {
    content: '';
    position: absolute;
    right: 10px;
    top: -6px;
    width: 10px;
    height: 10px;
    background: #fff;
    border-left: 1px solid #e5e7eb;
    border-top: 1px solid #e5e7eb;
    transform: rotate(45deg);
}

.forum-user-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    color: #344054;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
}

.forum-user-dropdown a:hover {
    background: #f2f4f7;
    color: #175cd3;
}

.forum-user-dropdown a .fa {
    color: #98a2b3;
    width: 1.2em;
    text-align: center;
}

.forum-user-dropdown a:hover .fa {
    color: #175cd3;
}

.forum-user-menu:hover .forum-user-dropdown {
    display: block;
}

.breadcrumb-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 36px;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
}

.breadcrumb {
    font-size: 14px;
    color: #6b7280;
}

.breadcrumb a {
    color: #6b7280;
    text-decoration: none;
}

.publish-btn {
    background: #2563eb;
    color: #fff;
    padding: 7px 13px;
    border-radius: 24px;
    text-decoration: none;
    font-size: 13px;
}

.forum-wrap {
    max-width: 1280px;
    margin: 20px auto;
}

.home-page,
.forum-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #eceef2;
    box-shadow: 0 2px 8px rgba(16, 24, 40, 0.05);
    margin-bottom: 14px;
}

.forum-card h4 {
    margin-top: 0;
    color: #1f2937;
    font-weight: 600;
}

.forum-card-topbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.home-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.home-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.home-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
}

.forum-type-select {
    min-width: 128px;
    height: 36px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 0 36px 0 12px;
    font-size: 13px;
    color: #334155;
    background-color: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%);
    background-position: calc(100% - 16px) 14px, calc(100% - 11px) 14px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.forum-type-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.home-header-actions .publish-btn {
    height: 36px;
    line-height: 22px;
    border-radius: 10px;
    padding: 7px 14px;
}

.list-table {
    width: 100%;
    border-collapse: collapse;
}

.list-table th {
    background: #f8fafc;
    color: #475467;
    font-weight: 600;
    font-size: 13px;
    border-bottom: 1px solid #e9edf3;
    padding: 13px 10px;
    text-align: left;
}

.list-table td {
    border-bottom: 1px solid #f0f2f5;
    padding: 13px 10px;
    font-size: 14px;
    color: #344054;
    vertical-align: middle;
}

.list-table td a {
    color: #344054;
    text-decoration: none;
}

.list-table td a:hover {
    color: #175cd3;
}

.type-badge {
    display: inline-block;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 4px;
}

.badge-normal {
    color: #175cd3;
    background: #eff6ff;
}

.badge-vote {
    color: #7a2e0e;
    background: #fff7ed;
}

.badge-event {
    color: #06603a;
    background: #ecfdf3;
}

.badge-log {
    color: #6b21a8;
    background: #f5f3ff;
}

.list-table tr:hover td {
    background: #f8fbff;
}

.pagination-bar {
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 4px;
}

.pagination {
    display: flex;
    gap: 8px;
}

.forum-pagination-wrap .pagination {
    margin: 0;
}

.forum-pagination-wrap .pagination > li > a,
.forum-pagination-wrap .pagination > li > span {
    color: #334155;
}

.forum-pagination-wrap .pagination > .active > a,
.forum-pagination-wrap .pagination > .active > a:focus,
.forum-pagination-wrap .pagination > .active > a:hover,
.forum-pagination-wrap .pagination > .active > span {
    background-color: #2563eb;
    border-color: #2563eb;
}

.page-item {
    background: #fff;
    border: 1px solid #d0d5dd;
    color: #344054;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all .2s ease;
    cursor: pointer;
}

.page-item:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #175cd3;
}

.page-item.disabled {
    opacity: .5;
    cursor: not-allowed;
}

.forum-topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.forum-content-block {
    line-height: 1.9;
    white-space: pre-wrap;
}

.post-detail-card {
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
    margin-top: 8px;
}

.post-detail {
    background: #fff;
    border: 1px solid #e6ebf2;
    border-radius: 12px;
    padding: 0;
    /* 勿用 overflow:hidden，否则楼层区横向略超时被裁切；圆角仍由子块背景覆盖 */
    overflow-x: auto;
    overflow-y: visible;
    max-width: 100%;
    box-sizing: border-box;
}

.back-link {
    padding: 14px 18px 0;
}

.back-link a {
    color: #4b5563;
    text-decoration: none;
    font-size: 13px;
}

.post-header-box {
    padding: 10px 18px 14px;
    border-bottom: 1px solid #e9ecef;
}

.floor-list {
    margin-top: 10px;
}

.floor-card {
    display: flex;
    gap: 12px;
    background: #fff;
    border: 1px solid #eceef2;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px;
    transition: all .2s ease;
}

.floor-card:hover {
    box-shadow: 0 6px 14px rgba(16, 24, 40, 0.06);
}

.floor-left {
    width: 68px;
    text-align: center;
}

.floor-floor-num {
    font-size: 12px;
    color: #98a2b3;
    margin-bottom: 8px;
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.floor-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    margin: 0 auto;
    background: #2563eb;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.floor-avatar .floor-avatar-img,
.floor-avatar-link .floor-avatar-img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.floor-main {
    flex: 1;
}

.floor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.floor-name {
    font-weight: 600;
    color: #1f2937;
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.floor-time {
    color: #98a2b3;
    font-size: 12px;
}

.post-title {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
    color: #101828;
}

.post-meta {
    color: #667085;
    font-size: 13px;
    margin-bottom: 10px;
}

.forum-reply-header {
    display: flex;
    justify-content: space-between;
    color: #667085;
    margin-bottom: 8px;
}

.forum-reply-content {
    line-height: 1.8;
    color: #344054;
    word-break: break-word;
}

.forum-reply-children {
    margin-top: 10px;
    padding-left: 12px;
    border-left: 2px solid #dbeafe;
    background: #f8fbff;
    border-radius: 6px;
}

.forum-reply-child {
    margin-top: 6px;
    color: #475467;
    line-height: 1.7;
    border: 1px solid #e9eef5;
    border-radius: 8px;
    padding: 8px 10px;
    background: #fff;
}

.nested-reply-header {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 4px;
}

.nested-reply-name {
    color: #2563eb;
    font-weight: 600;
}

.nested-reply-group {
    color: #6b7280;
    font-size: 12px;
}

.nested-reply-time {
    color: #98a2b3;
    font-size: 12px;
}

.nested-reply-content {
    color: #344054;
}

.floor-actions {
    display: flex;
    gap: 16px;
    margin-top: 10px;
    font-size: 13px;
    color: #667085;
}

.floor-actions span {
    cursor: pointer;
}

.floor-actions span:hover {
    color: #175cd3;
}

.forum-filter-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.thread-search-wrapper {
    margin-bottom: 12px;
}

.thread-search-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    background: #f8fafc;
    border: 1px solid #e7ecf3;
    border-radius: 10px;
    padding: 10px;
}

.thread-search-input {
    flex: 1;
    min-width: 220px;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 30px;
    padding: 6px 14px;
}

.thread-search-input .form-control {
    border: none;
    box-shadow: none;
    padding: 0;
    height: 20px;
}

.thread-search-input .form-control:focus {
    box-shadow: none;
}

.thread-search-btn {
    border: none;
    background: #2563eb;
    color: #fff;
    border-radius: 30px;
    padding: 6px 22px;
    font-size: 13px;
    cursor: pointer;
}

.thread-filter-stats {
    background: #e7f3ff;
    border: 1px solid #2563eb;
    border-radius: 30px;
    padding: 8px 14px;
    margin-top: 10px;
    color: #2563eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.thread-clear-filter {
    color: #2563eb;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.forum-inline-input {
    max-width: 260px;
}

.forum-group-create-form {
    max-width: 560px;
}

.forum-group-name-row {
    margin-bottom: 12px;
}

.forum-group-name-row .form-control {
    max-width: 100%;
}

.forum-group-icon-field {
    margin-bottom: 12px;
}

.forum-group-icon-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #344054;
    margin-bottom: 6px;
}

.forum-group-icon-inputgroup .forum-group-icon-display {
    color: #667085;
    background: #fff;
    cursor: default;
    box-shadow: none;
}

.forum-icon-picker {
    padding: 10px;
    max-height: 70vh;
    overflow: auto;
}

.forum-icon-picker-ul {
    margin: 8px 0 0 0;
    padding: 0;
}

.forum-icon-picker-ul li {
    width: 42px;
    height: 42px;
    line-height: 42px;
    border: 1px solid #e5e7eb;
    padding: 0;
    margin: 2px;
    text-align: center;
    font-size: 18px;
    cursor: pointer;
    border-radius: 6px;
    background: #fff;
}

.forum-icon-picker-ul li:hover {
    border-color: #2563eb;
    background: #f5f8ff;
}

.forum-group-list {
    margin-top: 14px;
}

.group-card-name i {
    margin-right: 6px;
    color: #475467;
}

.forum-message-item {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all .2s ease;
    background: #fff;
}

.forum-message-item.unread {
    border-color: #d8dee8;
    background: #fff;
}

.forum-message-item:hover {
    box-shadow: 0 6px 14px rgba(16, 24, 40, 0.08);
    transform: translateY(-1px);
}

.msg-row {
    display: flex;
    gap: 10px;
}

.msg-avatar {
    width: 36px;
    min-width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #dbeafe;
    color: #1d4ed8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-weight: 700;
}

.msg-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.msg-body {
    min-width: 0;
    flex: 1;
}

.msg-title {
    color: #6b7280;
    margin-bottom: 2px;
    font-weight: 400;
}

.msg-content {
    color: #98a2b3;
    margin-bottom: 4px;
    word-break: break-word;
    font-weight: 400;
}

.msg-meta {
    color: #98a2b3;
    font-size: 12px;
}

.forum-message-item.unread .msg-title,
.forum-message-item.unread .msg-content {
    color: #111827;
    font-weight: 600;
}

.profile-page {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.profile-sidebar {
    width: 220px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.profile-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #eef2f6;
}

.profile-sidebar-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    flex: 1;
    min-width: 0;
}

.profile-sidebar-back-list {
    flex-shrink: 0;
    align-self: center;
}

.profile-menu {
    margin: 0;
    padding: 8px 0;
    list-style: none;
}

.profile-menu li {
    padding: 10px 16px;
    cursor: pointer;
    color: #475467;
}

.profile-menu li.active {
    background: #eef4ff;
    color: #175cd3;
    font-weight: 600;
}

.profile-content {
    flex: 1;
    min-width: 0;
}

.profile-section {
    display: none;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.profile-section.active {
    display: block;
}

.profile-form .form-group {
    margin-bottom: 12px;
}

.profile-avatar-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.profile-avatar-preview {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: #fff;
    font-size: 26px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar-tip {
    color: #667085;
    font-size: 13px;
}

.profile-avatar-preview.profile-avatar-editable {
    position: relative;
}

.profile-avatar-preview.profile-avatar-editable .faupload {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
    border: 0;
    padding: 0;
    margin: 0;
}

/* 个人中心 · 帖子动态 */
.profile-section-topics .profile-topics-header {
    margin-bottom: 14px;
}

.profile-section-topics .profile-topics-header h4 {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 700;
    color: #101828;
}

.profile-topics-desc {
    margin: 0;
    font-size: 13px;
    color: #667085;
    line-height: 1.5;
}

.forum-topic-segment {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px;
    margin-bottom: 16px;
    background: #f2f4f7;
    border-radius: 12px;
    border: 1px solid #e9ecf1;
}

.forum-topic-segment-item {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    background: transparent;
    color: #475467;
    font-size: 13px;
    font-weight: 500;
    padding: 9px 12px;
    border-radius: 9px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
}

.forum-topic-segment-item:hover {
    color: #175cd3;
    background: rgba(255, 255, 255, 0.65);
}

.forum-topic-segment-item.active {
    background: #fff;
    color: #175cd3;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.forum-topic-list-shell {
    min-height: 120px;
}

.forum-topic-feed {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.forum-topic-card {
    display: flex;
    align-items: stretch;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.forum-topic-card:hover {
    border-color: #c7d7fe;
    background: #fafbff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
}

.forum-topic-card:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.forum-topic-card-body {
    flex: 1;
    min-width: 0;
}

.forum-topic-title {
    font-size: 15px;
    font-weight: 600;
    color: #101828;
    line-height: 1.45;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.forum-topic-card:hover .forum-topic-title {
    color: #175cd3;
}

.forum-topic-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    font-size: 12px;
    color: #667085;
}

.forum-topic-meta .type-badge {
    margin-right: 0;
}

.forum-topic-author {
    color: #475467;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forum-topic-stat {
    color: #98a2b3;
}

.forum-topic-time {
    margin-left: auto;
    color: #98a2b3;
    white-space: nowrap;
}

.forum-topic-card-chevron {
    flex-shrink: 0;
    width: 10px;
    align-self: center;
    border: solid #cbd5e1;
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 4px;
    transform: rotate(-45deg);
    margin-right: 4px;
}

.forum-topic-empty {
    text-align: center;
    padding: 36px 20px 28px;
    border: 1px dashed #e5e7eb;
    border-radius: 12px;
    background: #fafbfc;
}

.forum-topic-empty-visual {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 14px;
    background: linear-gradient(145deg, #eef2ff, #f8fafc);
    border: 1px dashed #c7d2fe;
}

.forum-topic-empty-title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 600;
    color: #344054;
}

.forum-topic-empty-hint {
    margin: 0;
    font-size: 13px;
    color: #98a2b3;
    line-height: 1.5;
}

.forum-topic-empty--error .forum-topic-empty-visual {
    display: none;
}

.forum-topic-empty--error {
    border-style: solid;
    border-color: #fecaca;
    background: #fff5f5;
}

.forum-topic-empty--error .forum-topic-empty-title {
    color: #b42318;
}

@media (max-width: 640px) {
    .forum-topic-segment-item {
        flex: 1 1 calc(50% - 4px);
        font-size: 12px;
        padding: 8px 8px;
        white-space: normal;
        text-align: center;
        line-height: 1.35;
    }

    .forum-topic-time {
        margin-left: 0;
        width: 100%;
    }

    .forum-topic-card-chevron {
        display: none;
    }
}

.group-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
}

.group-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.group-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.group-card-name {
    font-weight: 600;
}

.group-card-count {
    color: #98a2b3;
    font-size: 12px;
}

.group-actions {
    color: #98a2b3;
    font-size: 12px;
    display: inline-flex;
    gap: 8px;
}

.group-actions .fa {
    cursor: pointer;
}

.group-actions .forum-group-edit:hover {
    color: #2563eb;
}

.group-actions .forum-group-delete:hover {
    color: #c0392b;
}

.group-users {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.group-user {
    background: #f2f4f7;
    border-radius: 16px;
    padding: 4px 10px;
    font-size: 12px;
    color: #475467;
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 6px;
}

.group-user-name {
    font-weight: 600;
    color: #344054;
}

.group-user-meta {
    color: #667085;
    font-weight: 400;
}

.group-user .remove {
    margin-left: 2px;
    color: #98a2b3;
    cursor: pointer;
}

.forum-editor-tools {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* detail page: align with demo3 second item style */
.post-detail-container {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow-x: auto;
    overflow-y: visible;
    margin: 0 0 20px 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.thread-search-wrapper {
    margin: 0 20px 20px 20px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.thread-search-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    background: transparent;
    border: none;
    padding: 0;
}

.thread-search-input {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 30px;
    padding: 6px 16px;
}

.thread-search-input input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 13px;
    background: transparent;
}

.thread-search-btn {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 6px 24px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.thread-group-filters-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.thread-group-badge {
    background: #f0f2f5;
    padding: 4px 16px;
    border-radius: 30px;
    font-size: 12px;
    cursor: pointer;
    border: 1px solid #dee2e6;
    transition: all 0.2s;
    white-space: nowrap;
}

.thread-group-badge:hover,
.thread-group-badge.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.thread-filter-stats {
    background: #e7f3ff;
    border: 1px solid #2563eb;
    border-radius: 30px;
    padding: 8px 16px;
    margin-top: 12px;
    font-size: 13px;
    color: #2563eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.thread-clear-filter {
    cursor: pointer;
    font-weight: 500;
    text-decoration: underline;
}

.floor-card {
    border-bottom: 1px solid #e9ecef;
    background: #fff;
    margin-bottom: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
}

.floor-card:last-child {
    border-bottom: none;
}

.floor-container {
    display: flex;
    padding: 20px;
    position: relative;
}

.floor-left {
    width: 170px;
    max-width: 170px;
    flex-shrink: 0;
    text-align: center;
    padding-right: 20px;
    border-right: 1px solid #e9ecef;
    box-sizing: border-box;
    overflow: hidden;
}

.floor-right {
    flex: 1;
    min-width: 0;
    padding-left: 24px;
}

/* 跟贴列表：强制纵向单列（多卡绝不可横排）。兼容 #forum-post-detail / .post-detail 包裹与通用 .floor-card{display:flex} */
#forum-post-detail #forum-reply-list,
.post-detail #forum-reply-list,
#forum-reply-list {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}
.post-detail > .post-detail-container {
    display: block !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
#forum-post-detail #forum-reply-list > .floor-card,
.post-detail #forum-reply-list > .floor-card,
#forum-reply-list > .floor-card {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: 0 0 auto !important;
    flex-direction: column !important;
    float: none !important;
    clear: both !important;
    box-sizing: border-box;
}
/* 单层卡片内部：左侧资料区 + 右侧正文区仍为左右结构 */
#forum-post-detail #forum-reply-list > .floor-card > .floor-container,
.post-detail #forum-reply-list > .floor-card > .floor-container,
#forum-reply-list > .floor-card > .floor-container {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

.floor-content {
    font-size: 14px;
    line-height: 1.7;
    color: #333;
    margin-bottom: 16px;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

/* 详情正文内图片：不超出版心、等比例（覆盖编辑器写入的宽高）
   同行图片与编辑器预览保持一致：统一底部对齐，不再垂直居中。 */
#forum-post-detail .floor-content img,
#forum-post-detail .nested-reply-content img {
    max-width: 100%;
    width: auto;
    height: auto;
    box-sizing: border-box;
    vertical-align: bottom;
}

.floor-content img.full-img {
    max-width: 100%;
    max-height: min(560px, 85vh);
    width: auto;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 8px;
    border: 1px solid #dee2e6;
    display: block;
    object-fit: contain;
}

.floor-department {
    color: #667085;
    font-size: 12px;
    margin-top: 4px;
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.floor-post-time {
    color: #98a2b3;
    font-size: 12px;
    margin-top: 4px;
}

.group-tags-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 8px 0 4px;
}

.group-tag-item {
    background: #e9f0ff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 12px;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.group-tag-remove {
    cursor: pointer;
    font-size: 11px;
    font-weight: bold;
    color: #dc3545;
    margin-left: 2px;
}

.group-tag-remove:hover {
    opacity: 0.7;
}

.group-tag-empty {
    font-size: 11px;
    color: #aaa;
}

.group-add-btn {
    display: inline-block;
    margin-top: 6px;
    font-size: 11px;
    font-family: inherit;
    line-height: 1.35;
    cursor: pointer;
    color: #2563eb;
    background: #fff;
    border: 1px solid #2563eb;
    border-radius: 14px;
    padding: 3px 10px;
    transition: all 0.2s;
    -webkit-appearance: none;
    appearance: none;
    max-width: 100%;
    position: relative;
    z-index: 1;
}

.group-add-btn:hover {
    background: #2563eb;
    color: #fff;
}

.forum-add-group-layer {
    overflow: hidden;
    border-radius: 20px !important;
    background: #fff !important;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22) !important;
}

.forum-add-group-layer .layui-layer-content {
    overflow: visible !important;
    border-radius: 20px;
}

.forum-add-group-layer .layui-layer-close {
    top: 14px !important;
    right: 14px !important;
    width: 30px !important;
    height: 30px !important;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.92) !important;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
    opacity: 0.9;
}

.forum-add-group-modal {
    padding: 26px 26px 22px;
    background: linear-gradient(180deg, #eff6ff 0, #ffffff 42%);
    color: #1f2937;
}

.forum-add-group-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    padding-right: 30px;
}

.forum-add-group-icon {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: #fff;
    font-size: 22px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.28);
}

.forum-add-group-title {
    font-size: 20px;
    line-height: 1.25;
    font-weight: 700;
    color: #0f172a;
}

.forum-add-group-desc {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.55;
}

.forum-add-group-label {
    display: block;
    margin: 0 0 8px;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
}

.forum-add-group-select-wrap {
    position: relative;
    margin-bottom: 20px;
}

.forum-add-group-select-wrap::after {
    content: '\\f107';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-family: FontAwesome;
    pointer-events: none;
}

.forum-add-group-select {
    height: 44px !important;
    padding: 9px 42px 9px 14px !important;
    border: 1px solid #dbe4f0 !important;
    border-radius: 12px !important;
    background: #fff !important;
    color: #0f172a !important;
    font-size: 14px !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
    outline: none !important;
    -webkit-appearance: none;
    appearance: none;
}

.forum-add-group-select:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14) !important;
}

.forum-add-group-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.forum-add-group-btn {
    min-width: 92px;
    height: 38px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.forum-add-group-btn:hover {
    transform: translateY(-1px);
}

.forum-add-group-btn-cancel {
    color: #475569;
    background: #f1f5f9;
}

.forum-add-group-btn-cancel:hover {
    background: #e2e8f0;
}

/* 删除帖子弹窗样式 */
.forum-delete-post-modal {
    padding: 26px 26px 22px;
    background: linear-gradient(180deg, #fef2f2 0, #ffffff 42%);
    color: #1f2937;
    position: relative;
    overflow: hidden;
}

.forum-delete-post-glow {
    position: absolute;
    top: -72px;
    right: -58px;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.24) 0%, rgba(239, 68, 68, 0.08) 44%, rgba(239, 68, 68, 0) 72%);
    pointer-events: none;
}

.forum-delete-post-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    padding-right: 30px;
    position: relative;
    z-index: 1;
}

.forum-delete-post-icon {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: #fff;
    font-size: 22px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 12px 24px rgba(239, 68, 68, 0.28);
}

.forum-delete-post-eyebrow {
    font-size: 12px;
    color: #ef4444;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.forum-delete-post-title {
    font-size: 20px;
    line-height: 1.25;
    font-weight: 700;
    color: #0f172a;
    margin-top: 4px;
}

.forum-delete-post-desc {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.55;
}

.forum-delete-post-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.forum-delete-post-btn {
    min-width: 92px;
    height: 38px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.forum-delete-post-btn:hover {
    transform: translateY(-1px);
}

.forum-delete-post-btn-cancel {
    color: #475569;
    background: #f1f5f9;
}

.forum-delete-post-btn-cancel:hover {
    background: #e2e8f0;
}

.forum-delete-post-btn-ok {
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.forum-delete-post-btn-ok:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.4);
}

.forum-add-group-btn-ok {
    color: #fff;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.24);
}

.forum-add-group-btn-ok:hover {
    box-shadow: 0 14px 26px rgba(37, 99, 235, 0.32);
}

@media (max-width: 480px) {
    .forum-add-group-layer {
        max-width: calc(100vw - 24px) !important;
        border-radius: 18px !important;
    }

    .forum-add-group-layer .layui-layer-content {
        border-radius: 18px;
    }

    .forum-add-group-layer .layui-layer-close {
        top: 10px !important;
        right: 10px !important;
        width: 28px !important;
        height: 28px !important;
    }

    .forum-add-group-modal {
        padding: 22px 16px 16px;
        background: linear-gradient(180deg, #eff6ff 0, #ffffff 48%);
    }

    .forum-add-group-hero {
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 18px;
        padding-right: 28px;
    }

    .forum-add-group-icon {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
        border-radius: 13px;
        font-size: 18px;
        box-shadow: 0 10px 20px rgba(37, 99, 235, 0.22);
    }

    .forum-add-group-title {
        font-size: 18px;
    }

    .forum-add-group-desc {
        margin-top: 4px;
        font-size: 12px;
        line-height: 1.45;
    }

    .forum-add-group-label {
        font-size: 12px;
    }

    .forum-add-group-select-wrap {
        margin-bottom: 16px;
    }

    .forum-add-group-select {
        height: 42px !important;
        font-size: 14px !important;
        border-radius: 11px !important;
    }

    .forum-add-group-actions {
        gap: 8px;
    }

    .forum-add-group-btn {
        flex: 1 1 0;
        min-width: 0;
        height: 40px;
        padding: 0 10px;
        font-size: 13px;
    }
}

@media (max-width: 340px) {
    .forum-add-group-actions {
        flex-direction: column-reverse;
    }

    .forum-add-group-btn {
        width: 100%;
    }
}

.floor-actions {
    display: flex;
    gap: 20px;
    padding-top: 12px;
    border-top: 1px solid #e9ecef;
    margin-top: 12px;
}

.floor-action {
    color: #666;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s;
}

.floor-action:hover {
    color: #2563eb;
}

.support-btn.active {
    color: #2563eb;
    font-weight: 500;
}

.nested-replies {
    margin-top: 16px;
    padding-left: 20px;
    border-left: 3px solid #e9ecef;
}

.nested-reply {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
}

.nested-reply-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.nested-reply-group {
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: #495057;
}

.nested-reply-time {
    font-size: 12px;
    color: #999;
}

.nested-reply-content {
    font-size: 13px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 8px;
}

.nested-reply-content img.thumbnail-img {
    max-width: 100%;
    max-height: 220px;
    width: auto;
    height: auto;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 6px;
    border: 1px solid #dee2e6;
    display: block;
    object-fit: contain;
    vertical-align: middle;
}

.nested-reply-actions {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #999;
}

.nested-reply-actions span {
    cursor: pointer;
}

.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 19910000;
    cursor: pointer;
}

.image-modal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
}

/* 回复中「引用」块（与编辑器插入的 HTML 一致） */
.forum-user-quote {
    margin: 14px 0;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
    overflow: hidden;
}

.forum-user-quote-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
    font-size: 13px;
    color: #4338ca;
    background: rgba(67, 56, 202, 0.08);
    border-bottom: 1px solid #c7d2fe;
}

.forum-user-quote-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: #6366f1;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

.forum-user-quote-author {
    font-weight: 600;
    color: #312e81;
}

.forum-user-quote-inner {
    margin: 0;
    padding: 12px 14px 14px;
    font-size: 13px;
    line-height: 1.65;
    color: #475569;
    border-left: 3px solid #6366f1;
    background: #fff;
}

.floor-content .forum-user-quote,
.nested-reply-content .forum-user-quote {
    margin-top: 12px;
    margin-bottom: 12px;
}

.forum-wrap .edui-default {
    z-index: 1000;
}

/* 投票帖 */
.forum-vote-box {
    margin: 16px 0 0;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.forum-vote-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.forum-vote-title {
    font-weight: 600;
    font-size: 14px;
    color: #334155;
}

.forum-vote-title .fa {
    margin-right: 6px;
    color: #6366f1;
}

.forum-vote-tag {
    font-size: 12px;
    color: #64748b;
    background: #e2e8f0;
    padding: 2px 8px;
    border-radius: 4px;
}

.forum-vote-tag.forum-vote-ended {
    background: #fee2e2;
    color: #b91c1c;
}

.forum-vote-tag.forum-vote-multi {
    background: #dbeafe;
    color: #1d4ed8;
}

.forum-vote-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.forum-vote-option-wrap {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px 10px;
}

.forum-vote-option-wrap:hover {
    border-color: #c7d2fe;
}

.forum-vote-option {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 6px 0 2px;
    background: transparent;
    border: 0;
    border-radius: 0;
    cursor: pointer;
    font-weight: normal;
    width: 100%;
    box-sizing: border-box;
}

.forum-vote-option:hover {
    border-color: transparent;
}

.forum-vote-bar-track {
    height: 8px;
    border-radius: 999px;
    background: #eef2ff;
    overflow: hidden;
    margin-top: 4px;
}

.forum-vote-bar-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #818cf8 0%, #2563eb 100%);
    transition: width 0.35s ease;
}

.forum-vote-option input {
    margin: 0;
    flex-shrink: 0;
}

.forum-vote-option-text {
    flex: 1;
    min-width: 120px;
    font-size: 14px;
    color: #1e293b;
}

.forum-vote-count {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
}

.forum-vote-actions {
    margin-top: 14px;
}

.post-detail-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 20px;
    padding: 12px 0;
}

.post-detail-title-row h1 {
    flex: 1;
}

.post-detail-topbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 0;
    margin: 0;
}

.topbar-btn {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    border-radius: 24px;
    padding: 7px 13px;
    font-size: 13px;
    line-height: 1.3;
    cursor: pointer;
    white-space: nowrap;
    transition: all .2s ease;
}

.topbar-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

.topbar-btn i {
    margin-right: 4px;
}

.post-detail-topbar .back-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.post-delete-btn {
    border: 1px solid #fca5a5;
    background: #ffffff;
    color: #dc2626;
    border-radius: 24px;
    padding: 7px 13px;
    font-size: 13px;
    line-height: 1.3;
    cursor: pointer;
    white-space: nowrap;
    transition: all .2s ease;
}

.post-delete-btn:hover {
    background: #fef2f2;
    border-color: #f87171;
    color: #b91c1c;
    box-shadow: 0 1px 2px rgba(220, 38, 38, .16);
}

.post-delete-btn i {
    margin-right: 4px;
}

/* @ 提醒：正文与编辑器内统一为「可点击的蓝色链接」观感 */
.forum-mention-token {
    display: inline;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #2563eb;
    font-weight: inherit;
    white-space: nowrap;
    user-select: none;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.forum-mention-token:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

a.forum-mention-token:visited {
    color: #2563eb;
}

/* 编辑器内 @ 提醒（UEditor/Simditor/CKEditor 内易被主题色覆盖，用 !important 对齐为链接蓝） */
.simditor-body .forum-mention-token,
.edui-editor-iframeholder .forum-mention-token,
.edui-body-container .forum-mention-token,
.ck-content .forum-mention-token,
.ck.ck-editor__editable_inline .forum-mention-token {
    display: inline !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #2563eb !important;
    font-weight: inherit !important;
    text-decoration: underline !important;
    text-underline-offset: 2px !important;
    cursor: pointer !important;
}

.floor-content .forum-mention-token {
    color: #2563eb;
    background: transparent;
}

/* 正文中附件下载链接（上传合并生成） */
.forum-upload-file-wrap {
    margin: 0.4em 0 0;
    line-height: 1.5;
}

.forum-upload-file-wrap .forum-upload-file {
    font-weight: 600;
    word-break: break-all;
}

.floor-content .forum-upload-file-wrap .forum-upload-file {
    border-bottom: 1px dashed rgba(15, 23, 42, 0.25);
    text-decoration: none;
    color: #175cd3;
}

.floor-content .forum-upload-file-wrap .forum-upload-file:hover {
    border-bottom-color: #175cd3;
}

/* 编辑器内图片：不撑破；保留 width/height 属性以便拖动与弹层改尺寸生效（勿用 height:auto 覆盖属性） */
.simditor .simditor-body img,
.simditor .simditor-body .simditor-image img {
    max-width: 100%;
    vertical-align: bottom;
}

/* 选中图片后的虚线框 + 右下角缩放手柄（forum_form_simditor.js） */
.simditor .simditor-body .forum-simditor-img-overlay {
    border: 2px dashed #175cd3;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9) inset;
    pointer-events: none;
}

.simditor .forum-simditor-img-handle {
    position: absolute;
    right: -7px;
    bottom: -7px;
    width: 14px;
    height: 14px;
    background: #fff;
    border: 2px solid #175cd3;
    border-radius: 50%;
    box-sizing: border-box;
    cursor: nwse-resize;
    pointer-events: auto;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
}

.simditor .forum-simditor-img-handle:hover {
    background: #e8f1ff;
    border-color: #154fb5;
}

/* HTML 源码模式：内联源码框，非弹窗 */
.simditor .forum-simditor-html-view {
    display: none;
    width: 100%;
    box-sizing: border-box;
    min-height: 200px;
    padding: 10px 12px;
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.45;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    resize: vertical;
    background: #f8fafc;
    color: #0f172a;
}

.simditor.forum-html-mode .simditor-body,
.simditor.forum-html-mode .simditor-placeholder {
    display: none !important;
}

.simditor.forum-html-mode .forum-simditor-html-view {
    display: block !important;
}

/* 源码模式下弱化工具栏，仅「HTML」按钮可点 */
.simditor.forum-html-mode .simditor-toolbar > ul > li {
    opacity: 0.45;
    pointer-events: none;
}

.simditor.forum-html-mode .simditor-toolbar > ul > li:last-child {
    opacity: 1;
    pointer-events: auto;
}

.simditor .toolbar-item-forum-html.active {
    background: rgba(15, 23, 42, 0.08);
    border-radius: 4px;
}

.forum-card .form-control,
.forum-card select.form-control,
.profile-form .form-control,
.forum-group-create-form .form-control,
.thread-search-input input {
    border-radius: 10px;
}

.forum-attachment-list {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.forum-attachment-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #dbe2ea;
    background: #f8fafc;
    color: #334155;
    border-radius: 14px;
    padding: 4px 10px;
    max-width: 320px;
    font-size: 12px;
    cursor: pointer;
}

.forum-attachment-item .file-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.forum-attachment-item .remove {
    color: #ef4444;
    cursor: pointer;
    margin-left: 2px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .main-nav {
        padding: 10px 14px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .main-nav .nav-left {
        width: 100%;
        justify-content: space-between;
    }

    .main-nav .nav-links {
        gap: 12px;
    }

    .breadcrumb-bar {
        padding: 10px 14px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .container.forum-wrap {
        padding: 0 8px;
    }

    .home-page,
    .forum-card,
    .detail-page,
    .messages-page,
    .profile-page {
        border-radius: 10px;
        padding: 12px;
    }

    .home-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .post-detail-title-row {
        flex-direction: column;
        align-items: stretch;
    }

    .post-detail-topbar {
        justify-content: flex-start;
    }

    .home-header-actions {
        width: 100%;
    }

    .home-header .forum-type-select,
    .home-header-actions .publish-btn {
        width: 100%;
        text-align: center;
    }

    .list-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .pagination-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .thread-search-row {
        flex-wrap: wrap;
        gap: 8px;
    }

    .thread-search-input {
        width: 100%;
    }

    .thread-search-btn {
        width: 100%;
    }

    .thread-group-filters-inline {
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 4px;
    }

    .floor-container {
        flex-direction: column;
    }

    .floor-left {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        border-right: 0;
        border-bottom: 1px solid #eef2f7;
        padding-bottom: 10px;
        margin-bottom: 10px;
    }

    .floor-right {
        width: 100%;
        padding: 0;
    }

    .profile-page {
        flex-direction: column;
    }

    .profile-sidebar {
        width: 100%;
    }

    .profile-menu {
        display: flex;
        gap: 8px;
        overflow-x: auto;
    }

    .profile-menu li {
        border-radius: 999px;
        white-space: nowrap;
    }

    .forum-editor-tools {
        flex-wrap: wrap;
    }

    .forum-add-group-modal {
        padding: 24px 18px 18px;
    }

    .forum-add-group-hero {
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 18px;
    }

    .forum-add-group-icon {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
        border-radius: 14px;
        font-size: 19px;
    }

    .forum-add-group-title {
        font-size: 18px;
    }

    .forum-add-group-actions {
        flex-direction: column-reverse;
    }

    .forum-add-group-btn {
        width: 100%;
        height: 40px;
    }
}

/* —— 2026 会后：大气简洁导航与分区 —— */
.forum-body {
    background: linear-gradient(180deg, #f4f6fb 0%, #eef1f8 420px, #f8fafc 100%);
    min-height: 100vh;
}

.forum-main-nav {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

.forum-main-nav .nav-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.forum-main-nav .nav-link-item {
    padding: 8px 14px;
    border-radius: 10px;
    color: #475467;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.forum-main-nav .nav-link-item:hover {
    background: #eef4ff;
    color: #175cd3;
}

.forum-breadcrumb-min {
    background: transparent;
    border: 0;
    padding: 12px 0 0;
}

.forum-breadcrumb-min .breadcrumb {
    color: #64748b;
    font-size: 13px;
}

.forum-page-hero {
    margin: 8px 0 20px;
}

.forum-page-title {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.forum-page-sub {
    margin: 0;
    font-size: 14px;
    color: #64748b;
}

.forum-home-modern .home-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.forum-partition-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}

.forum-part-tab {
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475467;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

a.forum-part-tab {
    text-decoration: none;
    display: inline-block;
    box-sizing: border-box;
}

a.forum-part-tab:visited {
    color: inherit;
}

a.forum-part-tab.active,
a.forum-part-tab.active:visited {
    color: #fff;
}

.forum-part-tab:hover {
    border-color: #93c5fd;
    color: #1d4ed8;
}

.forum-part-tab.active {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.publish-btn-lg {
    padding: 10px 20px;
    font-weight: 600;
    border-radius: 12px;
}

.forum-post-type-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    margin-right: 6px;
    vertical-align: middle;
}

.forum-top-tag {
    display: inline-block;
    margin-right: 6px;
    margin-left: 0;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
    background: #fef2f2;
    color: #b42318;
    border: 1px solid #fecaca;
}

.forum-home-table .col-title {
    min-width: 200px;
}

.forum-title-link {
    color: #0f172a;
    font-weight: 600;
    text-decoration: none;
}

.forum-title-link:hover {
    color: #175cd3;
}

.forum-author-link {
    color: #475467;
    text-decoration: none;
    font-weight: 500;
}

.forum-author-link:hover {
    color: #175cd3;
}

.forum-stat-sep {
    color: #cbd5e1;
    margin: 0 4px;
}

.forum-detail-head-inner {
    padding: 12px 20px 16px;
    border-bottom: 1px solid #e9ecef;
}

.post-detail-h1 {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.35;
}

.forum-detail-type-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 8px;
    border: 1px solid;
    margin-left: 10px;
    vertical-align: middle;
}

.post-detail-meta-line {
    color: #64748b;
    font-size: 13px;
    margin-top: 10px;
}

.forum-author-inline {
    color: #175cd3;
    font-weight: 600;
    text-decoration: none;
}

.forum-author-inline:hover {
    text-decoration: underline;
}

/* 管理员：置顶与顺序（与下方楼内搜索区留白） */
.forum-admin-pin-bar {
    margin: 10px 20px 20px;
    padding: 0;
}

.forum-admin-pin-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    padding: 12px 16px;
    background: linear-gradient(165deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.forum-admin-pin-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    letter-spacing: 0.02em;
}

.forum-admin-pin-title .fa {
    color: #64748b;
    font-size: 14px;
}

.forum-pin-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: #1e293b;
    cursor: pointer;
    user-select: none;
}

.forum-pin-checkbox input {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    accent-color: #175cd3;
}

.forum-pin-sort-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.forum-pin-sort-hint {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: none;
}

.forum-pin-sort-input {
    width: 76px;
    height: 34px;
    padding: 4px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    text-align: center;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.forum-pin-sort-input:hover {
    border-color: #94a3b8;
}

.forum-pin-sort-input:focus {
    outline: none;
    border-color: #175cd3;
    box-shadow: 0 0 0 3px rgba(23, 92, 211, 0.2);
}

.forum-pin-save {
    margin-left: auto;
    border: 1px solid #175cd3;
    background: #175cd3;
    color: #fff;
    border-radius: 999px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
}

.forum-pin-save:hover {
    background: #154fb5;
    border-color: #154fb5;
    box-shadow: 0 2px 8px rgba(23, 92, 211, 0.25);
}

.forum-pin-save:active {
    transform: translateY(1px);
}

@media (max-width: 576px) {
    .forum-admin-pin-bar {
        margin: 10px 12px 18px;
    }

    .forum-admin-pin-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .forum-pin-save {
        margin-left: 0;
        width: 100%;
    }
}

.forum-vote-admin {
    margin: 10px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.floor-name-link,
.floor-avatar-link {
    color: inherit;
    text-decoration: none;
}

.floor-name-link:hover {
    color: #175cd3;
}

.floor-avatar-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* 搜索页：与顶栏 .nav-search 同款，整行拉满卡片宽度 */
.forum-search-card .forum-page-search.nav-search {
    width: 100%;
    max-width: 100%;
    margin-bottom: 20px;
    padding: 6px 12px;
    box-sizing: border-box;
}

.forum-search-card .forum-page-search.nav-search input {
    flex: 1;
    width: auto;
    min-width: 0;
    font-size: 14px;
}

.forum-search-card .forum-page-search.nav-search button {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    padding: 4px 12px;
    cursor: pointer;
}

.forum-search-card .forum-page-search.nav-search button .fa {
    font-size: 14px;
    line-height: 1;
}

.forum-search-block-title {
    font-size: 16px;
    font-weight: 700;
    margin: 20px 0 12px;
    color: #0f172a;
}

.forum-search-user-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.forum-user-chip {
    display: inline-flex;
    flex-direction: column;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
    text-decoration: none;
    color: #0f172a;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.forum-user-chip:hover {
    border-color: #93c5fd;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.12);
}

.forum-user-chip .chip-name {
    font-weight: 600;
}

.forum-user-chip .chip-id {
    font-size: 12px;
    color: #94a3b8;
}

.forum-search-post-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.forum-search-post-list li {
    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
}

.forum-search-post-title {
    font-weight: 600;
    color: #0f172a;
    text-decoration: none;
    font-size: 15px;
}

.forum-search-post-title:hover {
    color: #175cd3;
}

.forum-search-post-excerpt {
    font-size: 13px;
    color: #64748b;
    margin-top: 6px;
    line-height: 1.5;
}

.forum-search-post-meta {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 6px;
}

.forum-user-space {
    max-width: 1100px;
    margin: 0 auto;
}

.forum-user-hero {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 28px 24px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}

.forum-user-hero-avatar img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
}

.forum-user-hero-letter {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
}

.forum-user-name {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
}

.forum-user-bio {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.forum-user-space-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.forum-user-space-tab {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.forum-user-space-tab:hover {
    border-color: #cbd5e1;
    color: #1e293b;
    text-decoration: none;
}

.forum-user-space-tab--active {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
    font-weight: 600;
}

.forum-user-single-panel {
    margin-top: 0;
}

.forum-user-single-panel-title {
    margin-top: 0;
}

.forum-user-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

@media (max-width: 768px) {
    .forum-user-columns {
        grid-template-columns: 1fr;
    }
}

.forum-user-col {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px 18px;
    min-height: 200px;
}

.forum-user-col-title {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.forum-user-line {
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}

.forum-user-line a {
    color: #0f172a;
    font-weight: 600;
    text-decoration: none;
}

.forum-user-line a:hover {
    color: #175cd3;
}

.forum-user-line-meta {
    display: block;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}

.forum-user-mini-badge {
    display: inline-block;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 6px;
    background: #eff6ff;
    color: #1d4ed8;
    margin-right: 6px;
}

.forum-user-reply-snippet {
    font-size: 12px;
    color: #64748b;
    margin: 4px 0;
}

.forum-compose-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    background: transparent;
    border-radius: 0;
}

.forum-compose-tabs-inline {
    margin-bottom: 8px;
}

/* 切换条在编辑器下方时的留白（发帖/回复/弹层编辑） */
.forum-compose-tabs-after-editor {
    margin-top: 14px;
    margin-bottom: 4px;
}

.forum-compose-tabs-after-editor.forum-compose-tabs-inline {
    margin-bottom: 6px;
}

/* 底部「上传附件」与附件芯片、与后续主按钮之间留白 */
.forum-compose-tabs-after-editor + .form-group.forum-md-hidden-spacer .forum-editor-tools,
.forum-compose-tabs-after-editor + .form-group.m-field-card .forum-editor-tools,
.forum-compose-tabs-after-editor + .forum-edit-post-tools {
    margin-top: 12px;
}

.forum-attachment-list-below-upload,
.forum-md-hidden-spacer .forum-attachment-list,
.forum-edit-post-tools .forum-attachment-list {
    margin-top: 12px;
    margin-bottom: 18px;
}

/* 发帖页：发布 / 预览同一行（电脑端与帖子详情 btn-primary / topbar-btn 一致；手机端见 forum-mobile.css） */
.forum-compose-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

body.forum-body-mobile .forum-compose-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 42px;
    padding: 10px 24px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    border: 0;
    cursor: pointer;
    box-sizing: border-box;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

body.forum-body-mobile .forum-compose-btn .fa {
    font-size: 14px;
    line-height: 1;
}

body.forum-body-mobile .forum-compose-btn--publish {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.22);
}

body.forum-body-mobile .forum-compose-btn--publish:hover,
body.forum-body-mobile .forum-compose-btn--publish:focus {
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

body.forum-body-mobile .forum-compose-btn--preview {
    background: #fff;
    color: #2563eb;
    border: 1.5px solid rgba(37, 99, 235, 0.42);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
}

body.forum-body-mobile .forum-compose-btn--preview:hover,
body.forum-body-mobile .forum-compose-btn--preview:focus {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: #2563eb;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.12);
}

body.forum-body-mobile .forum-compose-btn:active {
    transform: translateY(1px);
    opacity: 0.96;
}

#forum-reply-form > .btn-primary[type="submit"] {
    margin-top: 6px;
}

/* PC：Layui page 弹层内容区可纵向滚动（编辑帖子弹层 Simditor 较高时避免底部工具被裁切） */
body.forum-body:not(.forum-body-mobile) .layui-layer.layui-layer-page .layui-layer-content {
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

body.forum-body:not(.forum-body-mobile) .layui-layer.layui-layer-page .forum-edit-layer-root {
    padding: 16px 24px 28px;
    box-sizing: border-box;
}

body.forum-body:not(.forum-body-mobile) .layui-layer.layui-layer-page .forum-edit-catalog-fields {
    margin-bottom: 4px;
}

body.forum-body:not(.forum-body-mobile) .layui-layer.layui-layer-page .forum-edit-catalog-fields .form-group {
    margin-bottom: 12px;
}

body.forum-body:not(.forum-body-mobile) .layui-layer.layui-layer-page .forum-edit-catalog-fields label {
    font-weight: 600;
    margin-bottom: 6px;
}

body.forum-body:not(.forum-body-mobile) .layui-layer.layui-layer-page .forum-edit-post-tools {
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    margin-top: 12px;
    padding-top: 4px;
}

body.forum-body:not(.forum-body-mobile) .layui-layer.layui-layer-page .forum-edit-post-tools .forum-edit-attach-hint {
    flex: 1 1 100%;
    margin: 0;
    line-height: 1.45;
}

.forum-edit-layer-root--post .forum-edit-post-title-field {
    margin-bottom: 10px;
}

.forum-edit-post-title-label {
    font-weight: 600;
}

.forum-compose-tab {
    border:1px solid #eee;
    background:none;
    padding: 4px 9px;
    cursor: pointer;
}

.forum-compose-tab:hover {
    border: 1px solid #d7d7d7;
    color: #303030;
}

.forum-compose-tab.active {
    color: #363636;
}

.forum-compose-tab:before{
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #d3d3d3;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
    transform: translateY(-2px);
}

.forum-compose-tab.active:before{
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #ff4444;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
    transform: translateY(-2px);
}

.forum-at-picker-body {
    padding: 12px;
}

/* @ 用户选择弹窗内列表（原内联 max-height，抽出便于 H5 覆盖） */
.forum-at-user-list-ul {
    margin-top: 10px;
    max-height: 260px;
    overflow: auto;
}

.forum-at-picker-hint {
    margin-top: 8px;
    font-size: 12px;
}

.forum-page-sep {
    margin: 0 8px;
    color: #cbd5e1;
}

.nav-link-dropdown {
    position: relative;
    display: inline-block;
}

.nav-link-parent {
    cursor: default;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-caret {
    font-size: 12px;
    opacity: 0.75;
}

.nav-submenu {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 6px;
    min-width: 160px;
    padding: 6px 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    z-index: 50;
}

/* 使用伪元素填补父元素与子菜单之间的间隙，防止鼠标移动时 hover 断开 */
.nav-submenu::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -6px;
    height: 6px;
}

.nav-link-dropdown:hover .nav-submenu {
    display: block;
}

.nav-submenu-item {
    display: block;
    padding: 8px 14px;
    font-size: 13px;
    color: #475467;
    text-decoration: none;
    white-space: nowrap;
}

.nav-submenu-item:hover {
    background: #eef4ff;
    color: #175cd3;
}

.forum-user-pagination {
    margin-top: 14px;
}

.forum-compose-panel {
    margin-bottom: 12px;
}

.forum-md-textarea {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
    border-radius: 12px;
}

.catalog-bind-types label {
    margin-right: 10px;
    margin-bottom: 6px;
    display: inline-block;
}

/* Mobile-first polish: final overrides */
@media (max-width: 768px) {
    .forum-wrap {
        margin: 12px auto;
        padding: 0 10px;
    }

    .forum-main-nav,
    .main-nav {
        padding: 10px 12px;
        gap: 10px;
    }

    .forum-main-nav .nav-left,
    .main-nav .nav-left {
        width: 100%;
        gap: 10px;
        align-items: center;
    }

    .forum-main-nav .logo a,
    .main-nav .logo a {
        font-size: 18px;
    }

    .forum-main-nav .forum-site-logo,
    .main-nav .forum-site-logo {
        height: 32px;
        max-width: 160px;
    }

    .forum-main-nav .nav-links,
    .main-nav .nav-links {
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 2px;
        -webkit-overflow-scrolling: touch;
    }

    .forum-main-nav .nav-link-item,
    .main-nav .nav-link-item {
        white-space: nowrap;
        padding: 7px 12px;
        border-radius: 999px;
        font-size: 13px;
    }

    .nav-right {
        width: 100%;
        justify-content: flex-end;
    }

    .forum-user-dropdown {
        right: 0;
        min-width: 148px;
    }

    .breadcrumb-bar {
        padding: 10px 12px;
    }

    .forum-card {
        border-radius: 12px;
        padding: 12px;
    }

    .post-detail-title-row {
        margin: 0 12px;
        padding: 10px 0;
        gap: 10px;
    }

    .post-detail-h1 {
        font-size: 18px;
        line-height: 1.5;
    }

    .post-detail-topbar {
        flex-wrap: wrap;
        gap: 6px;
    }

    .post-detail-topbar .topbar-btn,
    .post-detail-topbar .post-delete-btn,
    .post-detail-topbar .back-link-btn {
        height: 34px;
        line-height: 34px;
        padding: 0 12px;
        border-radius: 999px;
        font-size: 12px;
    }

    .thread-search-wrapper,
    .post-detail-container {
        margin-left: 0;
        margin-right: 0;
    }

    .thread-search-wrapper {
        padding: 10px 12px;
        margin-bottom: 12px;
    }

    .floor-card {
        padding: 10px;
        border-radius: 10px;
    }

    .floor-actions {
        flex-wrap: wrap;
        gap: 8px 12px;
    }

    .pagination-bar {
        gap: 6px;
    }

    .pagination > li > a,
    .pagination > li > span {
        padding: 6px 10px;
    }

    .forum-user-col {
        padding: 12px;
        min-height: 140px;
    }
}

@media (max-width: 576px) {
    .forum-home-table thead {
        display: none;
    }

    .forum-home-table,
    .forum-home-table tbody,
    .forum-home-table tr,
    .forum-home-table td {
        display: block;
        width: 100%;
    }

    .forum-home-table tr {
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        margin-bottom: 10px;
        padding: 10px 12px;
    }

    .forum-home-table td {
        border: 0 !important;
        padding: 2px 0;
        white-space: normal;
    }

    .forum-home-table .col-title {
        font-size: 14px;
        font-weight: 600;
        margin-bottom: 4px;
    }

    .forum-home-table .col-author {
        font-size: 12px;
        color: #64748b;
    }

    .forum-home-table .col-stat,
    .forum-home-table .col-time {
        display: inline-block;
        width: auto;
        font-size: 12px;
        color: #64748b;
        margin-right: 10px;
    }
}

/* 论坛前台不展示面包屑条（含历史/预留类名） */
.forum-body .breadcrumb-bar,
.forum-body .forum-breadcrumb-min,
.forum-body ol.breadcrumb {
    display: none !important;
}

/* 回复框：对楼/楼中楼进行回复时，在底部展示回复目标 */
.forum-reply-target-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 8px;
    padding: 8px 12px;
    margin: 0 0 12px 0;
    background: #e8f4fd;
    border: 1px solid #b8d9f3;
    border-radius: 4px;
    font-size: 13px;
    color: #2563ab;
    line-height: 1.4;
}

.forum-reply-target-bar--hidden {
    display: none !important;
}

.forum-reply-target-hint {
    color: #64748b;
    font-weight: 500;
}

.forum-reply-target-text {
    font-weight: 600;
    word-break: break-all;
}

.forum-reply-target-cancel {
    margin-left: auto;
    white-space: nowrap;
}

/* 外置浏览器：本页展示 OAuth2 链接二维码 */
.forum-wecom-browser {
    max-width: 520px;
    margin: 28px auto 48px;
}

.forum-wecom-browser-card {
    padding: 24px 28px 32px;
}

.forum-wecom-browser-title {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}

.forum-wecom-browser-hint {
    font-size: 14px;
    line-height: 1.6;
    color: #475467;
    margin: 0 0 20px;
}

.forum-wecom-qr {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 16px 0 24px;
}

.forum-wecom-browser-copy {
    margin: 16px 0 6px;
    color: #64748b;
}

.forum-wecom-oauth-copy {
    font-size: 11px;
    line-height: 1.35;
}

/* ---------- 论坛全站按钮与消息顶栏（弱化素颜 Bootstrap default） ---------- */
body.forum-body .forum-messages-toolbar {
    padding: 6px 6px 6px 10px;
    margin-bottom: 12px;
}

body.forum-body .forum-messages-toolbar-inner {
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

body.forum-body .forum-messages-toolbar-inner .checkbox-inline {
    margin-left: 0 !important;
    vertical-align: middle;
}

/* 消息顶栏一行：按钮与「仅看未读」控件同高（对齐 btn-sm） */
body.forum-body .forum-messages-toolbar-inner .btn.btn-sm {
    box-sizing: border-box;
    height: 30px;
    padding-top: 0;
    padding-bottom: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body.forum-body .forum-msg-filter-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0 10px 0 12px;
    box-sizing: border-box;
    height: 30px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.94);
    cursor: pointer;
    user-select: none;
    vertical-align: middle;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

body.forum-body .forum-msg-filter-toggle:hover {
    border-color: #cbd5f5;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.1);
}

body.forum-body .forum-msg-filter-toggle:focus-within {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

body.forum-body .forum-msg-filter-toggle:has(.forum-msg-filter-input:checked) {
    border-color: #7eb0fc;
    background: linear-gradient(180deg, #fbfdff 0%, #eff6ff 100%);
    box-shadow:
        0 3px 16px rgba(37, 99, 235, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

body.forum-body .forum-msg-filter-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
    pointer-events: none;
}

body.forum-body .forum-msg-filter-text {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #475569;
    line-height: 1;
    transition: color 0.2s ease;
}

body.forum-body .forum-msg-filter-input:checked ~ .forum-msg-filter-text {
    color: #1e40af;
}

body.forum-body .forum-msg-filter-track {
    position: relative;
    width: 38px;
    height: 20px;
    flex-shrink: 0;
    border-radius: 999px;
    background: #e2e8f0;
    box-shadow: inset 0 2px 6px rgba(15, 23, 42, 0.1);
    transition: background 0.22s ease, box-shadow 0.22s ease;
}

body.forum-body .forum-msg-filter-track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
    box-shadow:
        0 1px 4px rgba(15, 23, 42, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.85) inset;
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

body.forum-body .forum-msg-filter-input:checked ~ .forum-msg-filter-track {
    background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%);
    box-shadow: inset 0 2px 8px rgba(15, 23, 42, 0.12);
}

body.forum-body .forum-msg-filter-input:checked ~ .forum-msg-filter-track::after {
    transform: translateX(18px);
    background: #fff;
}

body.forum-body .btn-default {
    border-radius: 999px;
    border: 1px solid #93c5fd;
    background: linear-gradient(180deg, #ffffff 0%, #f0f5ff 100%);
    color: #1e40af;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.1), 0 1px 3px rgba(15, 23, 42, 0.06);
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

body.forum-body .btn-default:hover,
body.forum-body .btn-default:focus {
    border-color: #2563eb;
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    color: #1d4ed8;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.2);
}

body.forum-body .btn-default:active {
    box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.07);
}

body.forum-body .btn-default.btn-lg {
    border-radius: 12px;
}

body.forum-body .btn-primary {
    border-color: transparent;
    background-image: linear-gradient(180deg, #3b82f6 0%, #2563eb 55%, #1d4ed8 100%);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

body.forum-body .btn-primary:hover,
body.forum-body .btn-primary:focus {
    border-color: transparent;
    background-image: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.42);
}

body.forum-body .input-group-btn > .btn-default {
    border-radius: 0 !important;
}

body.forum-body .input-group-btn > .btn-default:first-child {
    border-radius: 10px 0 0 10px !important;
}

body.forum-body .input-group-btn > .btn-default:last-child {
    border-radius: 0 10px 10px 0 !important;
}

body.forum-body .input-group-btn > .btn-default:first-child:last-child {
    border-radius: 10px !important;
}

/* PC 论坛布局未加载 index.css 时，隐藏误插入的下拉刷新占位（文案「松开即可刷新」等） */
body.forum-body:not(.forum-body-mobile) .home-pull-refresh {
    display: none !important;
}
