/* Debug: Ensure CSS is loaded */
body.nexis-forum-page {
    border: 5px solid red !important;
}

/* Forum wrapper */
#af-wrapper {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 20px !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
}

/* Forum header */
#af-wrapper #forum-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 20px !important;
    padding: 15px !important;
    background: #f1f1f1 !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 4px !important;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04) !important;
}

/* Navigation links */
#af-wrapper #forum-navigation {
    display: flex !important;
    align-items: center !important;
}

#af-wrapper #forum-navigation a {
    margin-right: 20px !important;
    text-decoration: none !important;
    color: #0073aa !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    padding: 8px 12px !important;
    border-radius: 3px !important;
    transition: background 0.2s !important;
    position: relative !important; /* Для позиционирования счетчика */
}

#af-wrapper #forum-navigation a:hover {
    color: #fff !important;
    background: #00a0d2 !important;
}

/* Search form */
#af-wrapper #forum-search {
    display: flex !important;
    align-items: center !important;
}

#af-wrapper #forum-search form {
    display: inline-block !important;
    margin: 0 !important;
}

#af-wrapper #forum-search input[type="search"] {
    padding: 10px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 16px !important;
    width: 250px !important;
    background: #fff !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

#af-wrapper #forum-search input[type="search"]:focus {
    border-color: #0073aa !important;
    outline: none !important;
}

/* Main title */
#af-wrapper .main-title {
    font-size: 28px !important;
    margin: 20px 0 !important;
    color: #23282d !important;
}

/* Table header */
#af-wrapper .title-element {
    background: #f1f1f1 !important;
    padding: 12px 15px !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    color: #23282d !important;
    display: flex !important;
    align-items: center !important;
    border-left: 4px solid #0073aa !important;
    box-sizing: border-box !important;
}

#af-wrapper .title-element span {
    box-sizing: border-box !important;
}

#af-wrapper .forum-title-header,
#af-wrapper .topic-title-header,
#af-wrapper .post-content-header {
    text-align: center !important;
    flex: 6 !important;
}

#af-wrapper .forum-stats-header,
#af-wrapper .topic-stats-header {
    flex: 1.5 !important;
    text-align: center !important;
}

#af-wrapper .post-author-header,
#af-wrapper .post-date-header {
    flex: 2 !important;
    text-align: center !important;
}

#af-wrapper .last-post-headline {
    flex: 2 !important;
    text-align: right !important;
}

/* Content container */
#af-wrapper .content-container {
    margin-bottom: 20px !important;
    background: #fff !important;
    border: 1px solid #d1d1d1 !important;
    border-radius: 4px !important;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04) !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 200px !important; /* Minimum height to ensure stretching */
}

#af-wrapper .content-container.topic-hidden {
    background: #f8f8f8 !important;
}

/* Pinned topic styling */
#af-wrapper .content-container.topic-pinned {
    background: #e6f3fa !important; /* Светло-голубой фон для закрепленных тем */
    border-left: 4px solid #0073aa !important; /* Синяя полоса слева */
}

/* Optional: Hover effect for pinned topics */
#af-wrapper .content-container.topic-pinned:hover {
    background: #d1e7f3 !important; /* Чуть темнее при наведении */
}

/* Ensure pinned topic button styling is consistent */
#af-wrapper .topic-pin-button {
    background: #0073aa !important;
    color: #fff !important;
    padding: 8px 15px !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    cursor: pointer !important;
    margin-left: 10px !important;
    transition: background 0.2s !important;
}

#af-wrapper .topic-pin-button:hover {
    background: #00a0d2 !important;
}

/* Forum, topic, and post elements */
#af-wrapper .content-element.forum,
#af-wrapper .content-element.topic,
#af-wrapper .content-element.post {
    padding: 15px !important;
    box-sizing: border-box !important;
}

#af-wrapper .content-element.forum {
    display: block !important;
}

#af-wrapper .content-element.topic {
    display: flex !important;
    flex-direction: column !important;
    border-bottom: 1px solid #f1f1f1 !important;
}

#af-wrapper .content-element.post {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    flex: 1 !important;
    min-height: 100% !important;
    height: 100% !important;
}

#af-wrapper .content-element.forum:last-child,
#af-wrapper .content-element.topic:last-child,
#af-wrapper .content-element.post:last-child {
    border-bottom: none !important;
}

#af-wrapper .forum-status,
#af-wrapper .topic-status {
    margin-right: 15px !important;
    font-size: 24px !important;
    color: #0073aa !important;
    flex: 0 0 auto !important;
}

#af-wrapper .forum-name,
#af-wrapper .topic-name {
    flex: 6 !important;
    font-size: 16px !important;
}

/* Forum details */
#af-wrapper .forum-details {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
}

/* Topic details */
#af-wrapper .topic-details {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
}

/* Post columns */
#af-wrapper .post-columns {
    display: flex !important;
    align-items: stretch !important;
    min-height: 100% !important;
    flex: 1 1 auto !important;
    height: 100% !important;
    padding-top: 5px;
}

#af-wrapper .post-content {
    flex: 6 !important;
    font-size: 16px !important;
    line-height: 1.6 !important;
    padding-left: 15px;
}

#af-wrapper .content-wrapper {
    display: block !important;
}

#af-wrapper .post-author,
#af-wrapper .post-date {
    flex: 2 !important;
    text-align: center !important;
    font-size: 14px !important;
    color: #666 !important;
}

#af-wrapper .post-author {
    background-color: #e6f3fa !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    border-radius: 4px !important;
    box-sizing: border-box !important;
    flex: 2 1 auto !important;
    width: 0px;
}

#af-wrapper .post-author-nickname {
    font-weight: bold !important;
    color: #d4a017 !important;
}

#af-wrapper .post-author-avatar {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 5px auto !important;
    font-size: 21px !important;
}

.post-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%; /* Опционально: круглый аватар */
}

#af-wrapper .forum-stats,
#af-wrapper .topic-stats {
    flex: 1.5 !important;
    text-align: center !important;
    font-size: 14px !important;
    color: #666 !important;
}

#af-wrapper .forum-last-post,
#af-wrapper .topic-last-post {
    flex: 2 !important;
    text-align: right !important;
    font-size: 14px !important;
}

#af-wrapper .forum-name .forum-title,
#af-wrapper .topic-name .topic-title {
    font-size: 18px !important;
    color: #0073aa !important;
    text-decoration: none !important;
    font-weight: 600 !important;
}

#af-wrapper .forum-name .forum-title:hover,
#af-wrapper .topic-name .topic-title:hover {
    color: #00a0d2 !important;
}

#af-wrapper .forum-description,
#af-wrapper .topic-author {
    display: block !important;
    color: #666 !important;
    font-size: 13px !important;
    margin-top: 5px !important;
}

#af-wrapper .forum-last-post small,
#af-wrapper .topic-last-post small {
    display: block !important;
    color: #666 !important;
}

#af-wrapper .pagination {
    margin-top: 20px !important;
    text-align: center !important;
}

#af-wrapper .pagination a {
    margin: 0 5px !important;
    text-decoration: none !important;
    color: #0073aa !important;
}

#af-wrapper .pagination a:hover {
    color: #00a0d2 !important;
}

/* Post header and buttons */
#af-wrapper .post-header,
#af-wrapper .topic-header {
    display: flex !important;
    justify-content: flex-end !important;
    margin-bottom: 10px !important;
    padding: 5px 0 !important;
    border-bottom: 1px solid #d1d1d1 !important;
}

#af-wrapper .post-reply-button,
#af-wrapper .post-quote-button,
#af-wrapper .edit-post-button,
#af-wrapper .delete-post-button,
#af-wrapper .topic-hide-button,
#af-wrapper .topic-pin-button,
#af-wrapper .topic-delete-button {
    background: #0073aa !important;
    padding: 8px 15px !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    cursor: pointer !important;
    margin-left: 10px !important;
    transition: background 0.2s !important;
    color: yellow;
}

#af-wrapper .post-reply-button,
#af-wrapper .post-quote-button,
#af-wrapper .topic-pin-button {
    color: yellow !important;
}

#af-wrapper .edit-post-button,
#af-wrapper .delete-post-button {
    color: #ffeb3b !important; /* Жёлтый цвет шрифта для "Редактировать" и "Удалить" */
}

#af-wrapper .post-reply-button:hover,
#af-wrapper .post-quote-button:hover,
#af-wrapper .edit-post-button:hover,
#af-wrapper .delete-post-button:hover:not(:disabled),
#af-wrapper .topic-hide-button:hover,
#af-wrapper .topic-pin-button:hover,
#af-wrapper .topic-delete-button:hover:not(:disabled) {
    background: #00a0d2 !important;
}

#af-wrapper .delete-post-button:disabled,
#af-wrapper .topic-delete-button:disabled {
    background: #ccc !important;
    cursor: not-allowed !important;
}

/* Reply reference */
#af-wrapper .reply-reference {
    background: #f8f8f8 !important;
    padding: 8px 15px !important;
    margin-bottom: 10px !important;
    border-left: 4px solid #0073aa !important;
    font-size: 13px !important;
    color: #666 !important;
}

#af-wrapper .reply-reference a {
    color: #0073aa !important;
    text-decoration: none !important;
}

#af-wrapper .reply-reference a:hover {
    color: #00a0d2 !important;
    text-decoration: underline !important;
}

/* Topic and Post forms */
#af-wrapper #nexis-forum-topic-form,
#af-wrapper #nexis-forum-post-form {
    margin-top: 20px !important;
    background: #fff !important;
    padding: 20px !important;
    border: 1px solid #e5e5e5 !important;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04) !important;
}

#af-wrapper #nexis-forum-topic-form h2,
#af-wrapper #nexis-forum-post-form h2 {
    font-size: 20px !important;
    margin-bottom: 15px !important;
}

#af-wrapper #nexis-forum-topic-form p,
#af-wrapper #nexis-forum-post-form p {
    margin-bottom: 15px !important;
}

#af-wrapper #nexis-forum-topic-form label,
#af-wrapper #nexis-forum-post-form label {
    display: block !important;
    font-weight: 600 !important;
    margin-bottom: 5px !important;
}

#af-wrapper #nexis-forum-topic-form input[type="text"],
#af-wrapper #nexis-forum-post-form input[type="text"],
#af-wrapper #nexis-forum-topic-form textarea,
#af-wrapper #nexis-forum-post-form textarea {
    width: 100% !important;
    padding: 8px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 14px !important;
}

#af-wrapper #nexis-forum-topic-form textarea,
#af-wrapper #nexis-forum-post-form textarea {
    resize: vertical !important;
}

#af-wrapper #nexis-forum-topic-form button,
#af-wrapper #nexis-forum-post-form button {
    background: #0073aa !important;
    color: #fff !important;
    padding: 10px 20px !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer !important;
}

#af-wrapper #nexis-forum-topic-form button:hover,
#af-wrapper #nexis-forum-post-form button:hover {
    background: #00a0d2 !important;
}

#af-wrapper #nexis-form-message {
    margin-top: 10px !important;
    padding: 10px !important;
}

#af-wrapper #nexis-form-message.success {
    background: #dff0d8 !important;
    color: #3c763d !important;
}

#af-wrapper #nexis-form-message.error {
    background: #f2dede !important;
    color: #a94442 !important;
}

#af-wrapper .clear {
    clear: both !important;
}

/* Admin menu fix */
#adminmenu .wp-submenu {
    margin: 0 !important;
}

#adminmenu .wp-menu-open {
    margin-top: 0 !important;
}

/* Quote styles */
#af-wrapper .forum-quote {
    background: #f8f8f8 !important;
    border-left: 4px solid #0073aa !important;
    padding: 15px !important;
    margin: 10px 0 !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    color: #333 !important;
}

#af-wrapper .quote-header {
    font-weight: 600 !important;
    margin-bottom: 8px !important;
    color: #23282d !important;
    font-size: 14px !important;
}

#af-wrapper .quote-link {
    color: #0073aa !important;
    text-decoration: none !important;
}

#af-wrapper .quote-link:hover {
    color: #00a0d2 !important;
    text-decoration: underline !important;
}

#af-wrapper .quote-content {
    font-style: italic !important;
}

/* Edit post form styles */
#af-wrapper .edit-post-form {
    margin-top: 10px !important;
}

#af-wrapper .edit-post-content {
    width: 100% !important;
    padding: 8px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    resize: vertical !important;
    min-height: 100px !important;
}

#af-wrapper .save-edit-button,
#af-wrapper .cancel-edit-button {
    background: #0073aa !important;
    color: #fff !important;
    padding: 8px 15px !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    cursor: pointer !important;
    margin-right: 10px !important;
    margin-top: 10px !important;
    transition: background 0.2s !important;
}

#af-wrapper .save-edit-button:hover,
#af-wrapper .cancel-edit-button:hover {
    background: #00a0d2 !important;
}

/* Стили для TinyMCE редактора */
#af-wrapper #nexis-forum-topic-form .wp-editor-wrap,
#af-wrapper #nexis-forum-post-form .wp-editor-wrap {
    margin-bottom:15px !important;
}

#af-wrapper #nexis-forum-topic-form .mce-tinymce,
#af-wrapper #nexis-forum-post-form .mce-tinymce {
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
}

#af-wrapper #nexis-forum-topic-form .wp-editor-tabs,
#af-wrapper #nexis-forum-post-form .wp-editor-tabs {
    margin-bottom: 5px !important;
}

#af-wrapper #nexis-forum-topic-form .quicktags-toolbar,
#af-wrapper #nexis-forum-post-form .quicktags-toolbar {
    background: #f1f1f1 !important;
    border-bottom: 1px solid #ddd !important;
    padding: 5px !important;
}

#af-wrapper .mce-btn {
    background: #0073aa !important;
    color: #fff !important;
    border: 1px solid #005f87 !important;
    border-radius: 3px !important;
    padding: 2px 5px !important;
    transition: background 0.2s !important;
}

#af-wrapper .mce-btn:hover,
#af-wrapper .mce-btn.mce-active {
    background: #00a0d2 !important;
    color: #fff !important;
}

#af-wrapper .mce-btn i,
#af-wrapper .mce-btn span {
    color: #fff !important;
}

#af-wrapper #nexis-forum-topic-form .wp-editor-container,
#af-wrapper #nexis-forum-post-form .wp-editor-container {
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
}

/* Стили для форматированного контента в постах */
#af-wrapper .post-content p {
    margin: 0 0 10px 0 !important;
    line-height: 1.6 !important;
}

#af-wrapper .post-content strong {
    font-weight: 700 !important;
}

#af-wrapper .post-content em {
    font-style: italic !important;
}

#af-wrapper .post-content ul,
#af-wrapper .post-content ol {
    margin: 10px 0 !important;
    padding-left: 20px !important;
}

#af-wrapper .post-content li {
    margin-bottom: 5px !important;
}

#af-wrapper .post-content a {
    color: #0073aa !important;
    text-decoration: underline !important;
}

#af-wrapper .post-content a:hover {
    color: #00a0d2 !important;
}

#af-wrapper .post-content h3,
#af-wrapper .post-content h4 {
    margin: 15px 0 10px 0 !important;
    font-weight: 600 !important;
}

#af-wrapper .post-content h3 {
    font-size: 18px !important;
}

#af-wrapper .post-content h4 {
    font-size: 16px !important;
}

#af-wrapper .post-content s,
#af-wrapper .post-content strike {
    text-decoration: line-through !important;
}

/* Patch for forum list styles to override theme conflicts */
body.nexis-forum-page #af-wrapper .title-element {
    background: #f1f1f1 !important;
    padding: 12px 15px !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    color: #23282d !important;
    display: flex !important;
    align-items: center !important;
    border-left: 4px solid #0073aa !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    border-radius: 4px 4px 0 0 !important;
}

body.nexis-forum-page #af-wrapper .title-element .forum-title-header {
    flex: 6 !important;
    text-align: left !important;
}

body.nexis-forum-page #af-wrapper .title-element .forum-stats-header {
    flex: 1.5 !important;
    text-align: center !important;
}

body.nexis-forum-page #af-wrapper .title-element .last-post-headline {
    flex: 2 !important;
    text-align: right !important;
}

body.nexis-forum-page #af-wrapper .content-container {
    margin-bottom: 20px !important;
    background: #fff !important;
    border: 1px solid #d1d1d1 !important;
    border-radius: 0 0 4px 4px !important;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04) !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 200px !important; /* Minimum height to ensure stretching */
}

body.nexis-forum-page #af-wrapper .content-element.forum {
    padding: 15px !important;
    box-sizing: border-box !important;
    display: block !important;
    border-bottom: 1px solid #f1f1f1 !important;
}

body.nexis-forum-page #af-wrapper .content-element.forum:last-child {
    border-bottom: none !important;
}

body.nexis-forum-page #af-wrapper .content-element.forum .forum-details {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
}

body.nexis-forum-page #af-wrapper .content-element.forum .forum-status {
    margin-right: 15px !important;
    font-size: 24px !important;
    color: #0073aa !important;
    flex: 0 0 auto !important;
}

body.nexis-forum-page #af-wrapper .content-element.forum .forum-name {
    flex: 6 !important;
    font-size: 16px !important;
}

body.nexis-forum-page #af-wrapper .content-element.forum .forum-name .forum-title {
    font-size: 18px !important;
    color: #0073aa !important;
    text-decoration: none !important;
    font-weight: 600 !important;
}

body.nexis-forum-page #af-wrapper .content-element.forum .forum-name .forum-title:hover {
    color: #00a0d2 !important;
}

body.nexis-forum-page #af-wrapper .content-element.forum .forum-description {
    display: block !important;
    color: #666 !important;
    font-size: 13px !important;
    margin-top: 5px !important;
}

body.nexis-forum-page #af-wrapper .content-element.forum .forum-stats {
    flex: 1.5 !important;
    text-align: center !important;
    font-size: 14px !important;
    color: #666 !important;
}

body.nexis-forum-page #af-wrapper .content-element.forum .forum-last-post {
    flex: 2 !important;
    text-align: right !important;
    font-size: 14px !important;
}

body.nexis-forum-page #af-wrapper .content-element.forum .forum-last-post small {
    display: block !important;
    color: #666 !important;
}

/* Current forum name styling */
#af-wrapper #forum-navigation .current-forum {
    margin-right: 20px !important;
    color: #005f87 !important; /* Darker blue to distinguish from links */
    font-size: 18px !important;
    font-weight: 600 !important;
    padding: 8px 12px !important;
}

/* Forum stats container */
#af-wrapper .forum-stats-container {
    margin-top: 20px !important;
    padding: 10px 15px !important;
    background: #f8f8f8 !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 4px !important;
    text-align: center !important;
}

#af-wrapper .forum-stats-container p {
    margin: 0 !important;
    font-size: 14px !important;
    color: #666 !important;
    line-height: 1.5 !important;
}

#af-wrapper .forum-stats-container .stat-item {
    margin: 0 10px !important;
}

/* Стили для TinyMCE в форме редактирования поста */
#af-wrapper .edit-post-form .mce-tinymce {
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
}

#af-wrapper .edit-post-form .mce-btn {
    transform: scale(1.4) !important;
    transform-origin: left top !important;
    padding: 2px 3px !important;
    border: none !important;
    border-radius: 3px !important;
    background: #0073aa !important;
    color: #fff !important;
    font-size: 14px !important;
    cursor: pointer !important;
    margin-top: -3px;
    margin-bottom: 7px;
    margin-right: 20px !important;
    transition: background 0.2s !important;
}

#af-wrapper .edit-post-form .mce-btn i,
#af-wrapper .edit-post-form .mce-btn span {
    font-size: 14px !important;
    line-height: 1.4 !important;
}

#af-wrapper .edit-post-form .mce-toolbar-grp {
    padding: 3px !important;
}

#af-wrapper .edit-post-form .wp-editor-container {
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
}

#af-wrapper .edit-post-form .quicktags-toolbar {
    background: #f1f1f1 !important;
    border-bottom: 1px solid #ddd !important;
    padding: 4px !important;
}

#af-wrapper .edit-post-form .quicktags-toolbar input.button {
    font-size: 13px !important;
    padding: 3px 8px !important;
}

.nexis-forum-pagination {
    margin: 20px 0;
    text-align: center;
}

.nexis-forum-pagination a,
.nexis-forum-pagination span {
    display: inline-block;
    padding: 5px 10px;
    margin: 0 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-decoration: none;
    color: #333;
}

.nexis-forum-pagination a:hover {
    background-color: #f5f5f5;
}

.nexis-forum-pagination .current {
    background-color: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* Updated styling for latest posts list */
.latest-posts-container {
    margin: 20px 0;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.latest-posts-container h2 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #333;
}

.latest-posts-list {
    padding: 0;
    margin: 0;
}

.latest-post-item {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.latest-post-item:last-child {
    border-bottom: none;
}

.latest-post-item a {
    color: #0073aa;
    text-decoration: none;
}

.latest-post-item a:hover {
    text-decoration: underline;
}

.latest-post-item .post-author {
    color: #555;
    font-style: italic;
}

.latest-post-item .post-separator {
    color: #888;
    flex-shrink: 0;
}

.latest-post-item .post-forum,
.latest-post-item .post-topic,
.latest-post-item .post-author,
.latest-post-item .post-excerpt {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 1;
}

.hidden-forum {
    background-color: #f5f5f5; /* Светло-серый фон */
    opacity: 0.8; /* Лёгкая прозрачность для визуального отличия */
}

.hidden-forum .forum-title,
.hidden-forum .forum-description,
.hidden-forum .forum-stats,
.hidden-forum .forum-last-post {
    color: #555; /* Тёмно-серый цвет текста для лучшей читаемости */
}

.profile-status .profile-slogan .profile-reg-date .profile-post-count {
    font-size: 16px !important;
    color: #555 !important;
    margin: 5px 0 10px 0 !important;
    line-height: 1.4 !important;
    display: block !important;
    margin-left: 5px !important;
}

.profile-nickname {
    font-size: 18px;
    font-weight: bold;
    color: #005f87;
}

.profile-info {
    margin-left: 10px;
    margin-top: 10px;
}

.profile-info .profile-avatar {
    text-align: left !important; 
    margin-bottom: 10px;
    display: block; 
}

.profile-avatar-fallback {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    margin: 0 0 10px 0; 
}

.post-author {
    text-align: center !important; 
}

.post-author-avatar.avatar-fallback {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    margin: 0 auto 10px; 
}

/* Responsive styles for forum header */
@media screen and (max-width: 768px) {
    #af-wrapper #forum-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 10px !important;
    }

    #af-wrapper #forum-navigation {
        flex-direction: column !important;
        align-items: flex-start !important;
        width: 100% !important;
    }

    #af-wrapper #forum-navigation a {
        margin-right: 0 !important;
        margin-bottom: 10px !important;
        font-size: 16px !important;
        width: 100% !important;
        text-align: left !important;
        padding: 10px !important;
    }

    #af-wrapper #forum-navigation .current-forum {
        margin-right: 0 !important;
        margin-bottom: 10px !important;
        font-size: 16px !important;
        width: 100% !important;
        text-align: left !important;
        padding: 10px !important;
    }

    #af-wrapper #forum-search {
        width: 100% !important;
        margin-top: 10px !important;
    }

    #af-wrapper #forum-search input[type="search"] {
        width: 100% !important;
        font-size: 14px !important;
        padding: 8px !important;
    }
}

@media screen and (max-width: 480px) {
    #af-wrapper #forum-header {
        padding: 8px !important;
    }

    #af-wrapper #forum-navigation a,
    #af-wrapper #forum-navigation .current-forum {
        font-size: 14px !important;
        padding: 8px !important;
    }

    #af-wrapper #forum-search input[type="search"] {
        font-size: 12px !important;
        padding: 6px !important;
    }

    #af-wrapper .main-title {
        font-size: 24px !important;
    }
}

/* Responsive styles for forum header */
@media screen and (max-width: 768px) {
    #af-wrapper #forum-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 10px !important;
    }

    #af-wrapper #forum-navigation {
        flex-direction: column !important;
        align-items: flex-start !important;
        width: 100% !important;
    }

    #af-wrapper #forum-navigation a,
    #af-wrapper #forum-navigation .current-forum {
        margin-right: 0 !important;
        margin-bottom: 10px !important;
        font-size: 16px !important;
        width: 100% !important;
        text-align: left !important;
        padding: 10px !important;
    }

    #af-wrapper #messages-count {
        font-size: 13px !important;
        margin-left: 4px !important;
    }

    #af-wrapper #forum-search {
        width: 100% !important;
        margin-top: 10px !important;
    }

    #af-wrapper #forum-search input[type="search"] {
        width: 100% !important;
        font-size: 14px !important;
        padding: 8px !important;
    }
}

@media screen and (max-width: 480px) {
    #af-wrapper #forum-header {
        padding: 8px !important;
    }

    #af-wrapper #forum-navigation a,
    #af-wrapper #forum-navigation .current-forum {
        font-size: 14px !important;
        padding: 8px !important;
    }

    #af-wrapper #messages-count {
        font-size: 12px !important;
        margin-left: 3px !important;
    }

    #af-wrapper #forum-search input[type="search"] {
        font-size: 12px !important;
        padding: 6px !important;
    }
}

/* Styles for search results page */
.nexis-forum-search-page #af-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.nexis-forum-search-page .search-results-container {
    margin-bottom: 20px;
}

.nexis-forum-search-page .search-results-list {
    list-style: none;
    padding: 0;
}

.nexis-forum-search-page .search-results-list li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.nexis-forum-search-page .search-results-list li a {
    font-size: 18px;
    color: #0073aa;
    text-decoration: none;
}

.nexis-forum-search-page .search-results-list li a:hover {
    text-decoration: underline;
}

.nexis-forum-search-page .search-results-list li p {
    margin: 5px 0 0;
    color: #666;
}

.nexis-forum-search-page .pagination {
    margin-top: 20px;
}

.nexis-forum-search-page .pagination a,
.nexis-forum-search-page .pagination span {
    margin: 0 5px;
    padding: 5px 10px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #0073aa;
}

.nexis-forum-search-page .pagination .current {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* Ensure sidebar stays in place */
@media (min-width: 768px) {
    .nexis-forum-search-page #content {
        display: flex;
        flex-wrap: wrap;
    }

    .nexis-forum-search-page #main-content {
        flex: 0 0 70%;
        padding-right: 20px;
        box-sizing: border-box;
    }

    .nexis-forum-search-page #sidebar {
        flex: 0 0 30%;
        box-sizing: border-box;
    }
}

/* Highlight search keywords */
.nexis-forum-search-page .search-results-list strong {
    font-weight: bold;
    background-color: #fff3cd;
    padding: 0 2px;
}