/* ===============================================
   СТИЛИ ФОРУМА "ДВИЖЕНИЕ ПЕРВЫХ"
   Полная переработка с исправлением конфликтов
   =============================================== */

/* ------------------------------------------------
   A - ПОЛНЫЙ СБРОС СТАРЫХ СТИЛЕЙ (origin.css)
   ------------------------------------------------ */
/* Эти правила отключают проблемные места из origin.css,
   чтобы они не мешали вашей верстке */

/* Отключаем абсолютное позиционирование в пагинации */
.punbb .linkst,
.punbb .linksb {
    position: static !important;
    height: auto !important;
    float: none !important;
    background: transparent !important;
    background-image: none !important;
    border: none !important;
    color: inherit !important;
    text-shadow: none !important;
    line-height: normal !important;
    padding: 0 !important;
    margin: 0 0 20px 0 !important;
}

.linkst .pagelink,
.linkst .postlink,
.linksb .pagelink,
.linksb .postlink {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: auto !important;
    text-align: left !important;
    float: none !important;
    display: inline-block !important;
}

/* Сбрасываем старую навигацию */
#pun-navlinks,
#profilenav {
    background: transparent !important;
    background-image: none !important;
    border-color: transparent !important;
    color: inherit !important;
    text-shadow: none !important;
    box-shadow: none !important;
}

/* Контейнер навигации НЕ сбрасываем - он использует наш дизайн */
#pun-navlinks .container {
    /* Стили находятся в секции L */
}


/* ПОЛНАЯ ЗАЧИСТКА СТРУКТУРЫ ПОСТА */
.punbb .post h3 {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.punbb .post h3 span {
    margin-left: 0 !important;
    border-left: none !important;
    border-bottom: none !important;
    padding: 0 !important;
    display: block !important;
}

.punbb .post h3 strong {
    float: none !important;
    width: auto !important;
    color: inherit !important;
    font-weight: normal !important;
}

.punbb .post .post-author {
    float: none !important;
    width: auto !important;
    margin-top: 0 !important;
    background: transparent !important;
}

.punbb .post-body {
    margin-left: 0 !important;
    border-left: none !important;
    padding: 0 !important;
}

.punbb .post-links {
    margin-left: 0 !important;
    border-left: none !important;
}

.punbb .post-links ul {
    margin-left: 0 !important;
    height: auto !important;
    line-height: normal !important;
    text-align: left !important;
    padding: 0 !important;
    background: transparent !important;
}

.pl-email, .pl-website {
    float: none !important;
}

/* Сбрасываем навигацию профиля */
#pun-profile #profilenav {
    margin: 0 !important;
}

/* Убираем скрытые элементы из потока */
.acchide,
#pun-navlinks h2,
#pun-pagelinks h2,
#pun-status h2,
#pun-stats h2,
#pun-ulinks h2,
#viewprofile h2,
#profilenav h2,
.punbb p.crumbs strong {
    position: absolute !important;
    left: -9999px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* Очищаем фон у таблиц */
.punbb .main table {
    background: transparent !important;
}

.punbb .main td,
.punbb .main th {
    border: none !important;
    background: transparent !important;
}

/* Убираем старые иконки и маркеры */
.punbb div.icon {
    display: none !important;
}

.punbb tbody.hasicon td.tcl {
    padding: 0 !important;
}

/* ------------------------------------------------
   B - ОСНОВНЫЕ НАСТРОЙКИ (ваш дизайн)
   ------------------------------------------------ */
html, body {
    margin: 0;
    padding: 0;
    background: #ffffff;
}

.punbb * {
    margin: 0;
    box-sizing: border-box;
}

.punbb {
    font: normal 68.75% 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #000000;
    background: #ffffff;
}

.punbb ul, .punbb dl, .punbb li, .punbb dd, .punbb dt {
    padding: 0;
    list-style: none;
}

.punbb img {
    border: none;
}

.punbb .main table {
    width: 100%;
    border-collapse: collapse;
}

.checkfield input[type="checkbox"], 
.radiofield input[type="radio"] {
    margin: 0 0.3em;
    accent-color: #e10b17;
}

/* ------------------------------------------------
   C - ТИПОГРАФИКА
   ------------------------------------------------ */
body {
    font-size: 100.01%;
}

.punbb textarea, 
.punbb input, 
.punbb select, 
.punbb optgroup {
    font: 1em 'Segoe UI', Roboto, Arial, sans-serif;
    border-radius: 12px;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.punbb textarea:focus,
.punbb input:focus,
.punbb select:focus {
    border-color: #e10b17;
    outline: none;
    box-shadow: 0 0 0 3px rgba(225, 11, 23, 0.1);
}

.punbb h1, .punbb h2, .punbb h3, .punbb h4, .punbb th {
    font-size: 1em;
    font-weight: 600;
    color: #000000;
}

.punbb a {
    color: #e10b17;
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 6px;
}

.punbb a:hover {
    text-decoration: underline;
    background: rgba(225, 11, 23, 0.05);
}

/* ------------------------------------------------
   D - КОНТЕЙНЕРЫ И СЕКЦИИ
   ------------------------------------------------ */
#pun {
    margin: 30px auto;
    max-width: 1200px;
    position: relative;
    padding: 0 20px;
}

.punbb {
    float: left;
    width: 100%;
}

.punbb .container {
    border: none;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 20px;
    margin-bottom: 20px;
}

.punbb .section,
.punbb .main,
.punbb .category,
.punbb .post {
    margin-bottom: 20px;
    border: none;
}

/* ------------------------------------------------
   E - ИНФОРМАЦИОННЫЕ БЛОКИ
   ------------------------------------------------ */
.punbb .info-box {
    background: #f8f9fa;
    border-radius: 20px;
    padding: 24px;
    margin: 0 0 20px 0;
    border: 1px solid #eaeaea;
}

.punbb .info-box .legend {
    font-size: 1.2em;
    font-weight: 700;
    color: #e10b17;
    margin-bottom: 15px;
}

/* ------------------------------------------------
   F - КНОПКИ
   ------------------------------------------------ */
.punbb input[type="submit"],
.punbb button,
.punbb .button,
.punbb .postlink a,
.punbb .formsubmit input {
    background: #e10b17;
    color: #ffffff;
    border: none;
    border-radius: 30px;
    padding: 10px 24px;
    font-weight: 600;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(225, 11, 23, 0.3);
}

.punbb input[type="submit"]:hover,
.punbb button:hover,
.punbb .button:hover,
.punbb .postlink a:hover {
    background: #b00913;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(225, 11, 23, 0.4);
    text-decoration: none;
}

/* ------------------------------------------------
   G - ЗАГОЛОВКИ РАЗДЕЛОВ
   ------------------------------------------------ */
.punbb .section h2,
#pun-main h1,
#pun-main h2,
#pun-stats h2 {
    background: #e10b17;
    color: #ffffff;
    padding: 15px 25px;
    border-radius: 30px;
    font-size: 1.3em;
    font-weight: 700;
    margin: 0 0 20px 0;
    border: none;
    box-shadow: 0 4px 10px rgba(225, 11, 23, 0.2);
}

/* ------------------------------------------------
   H - ТАБЛИЦЫ
   ------------------------------------------------ */
.punbb .main table {
    table-layout: fixed !important;
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: #ffffff !important;
    border-radius: 20px !important;
    overflow: hidden !important;
}

.punbb .main td,
.punbb .main th {
    background: #ffffff !important;
    border-top: 1px solid #eaeaea !important;
    border-left: none !important;
    padding: 15px 20px !important;
    vertical-align: top !important;
}

.punbb tbody.hasicon td.tcl {
    padding: 15px 20px !important;
}

.punbb .main th {
    background: #f5f5f5;
    color: #000000;
    font-weight: 700;
    padding: 15px 20px;
    text-align: left;
}

.punbb .main td {
    padding: 15px 20px;
    border-top: 1px solid #eaeaea;
    color: #000000;
    vertical-align: top;
}

.punbb .main .tcl {
    width: 50%;
}

.punbb .main .tc2,
.punbb .main .tc3,
.punbb .main .tcmod {
    width: 6.5em;
    text-align: center;
}

.punbb .main .tcr {
    width: 30%;
}

.punbb tbody tr:hover td {
    background: #fafafa;
}

/* Названия форумов */
.punbb .main h3,
.punbb .main h3 a {
    font-size: 1.3em;
    font-weight: 800;
    color: #e10b17;
    text-decoration: none;
    margin-bottom: 4px;
    display: block;
}

.punbb .main h3 a:hover {
    color: #b0050f;
    text-decoration: underline;
}

/* ------------------------------------------------
   I - ПОСТЫ И СООБЩЕНИЯ
   ------------------------------------------------ */
/* Контейнер поста - используем flex для вертикального размещения */
#pun-viewtopic .post,
.punbb .post {
    display: flex !important;
    flex-direction: column !important;
}

/* Заголовок поста (h3) */
#pun-viewtopic .post h3,
.punbb .post h3 {
    background: #f8f9fa !important;
    border-bottom: 2px solid #e10b17 !important;
    padding: 12px 20px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    order: 1 !important;
    margin: 0 0 15px 0 !important;
    border-radius: 24px 24px 0 0;
}

#pun-viewtopic .post h3 span,
.punbb .post h3 span {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    color: #000000;
    font-weight: 600;
}

#pun-viewtopic .post h3 .sharelink,
.punbb .post h3 .sharelink {
    margin-left: auto;
}

#pun-viewtopic .post h3 .permalink,
.punbb .post h3 .permalink {
    margin-right: auto;
}

#pun-viewtopic .post h3 strong,
.punbb .post h3 strong {
    margin: 0 15px;
    color: #e10b17;
}

/* Контейнер с автором и текстом - flex wrap для переноса меню вниз на всю ширину */
#pun-viewtopic .post .container,
.punbb .post .container {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    background: #ffffff !important;
    padding: 0 !important;
    overflow: visible !important;
    box-shadow: none !important;
    order: 2 !important;
    width: 100% !important;
}

/* Левая колонка - информация о пользователе */
#pun-viewtopic .post .post-author,
.punbb .post .post-author {
    float: none !important;
    width: 200px !important;
    min-width: 200px !important;
    padding: 20px !important;
    background: #f8f9fa !important;
    border-right: 2px solid #e10b17 !important;
    border-radius: 0 !important;
    flex-shrink: 0 !important;
    display: block !important;
}

.pa-author {
    font-size: 1.2em;
    font-weight: 700;
    color: #e10b17;
    margin-bottom: 10px;
}

/* Аватар */
.pa-avatar {
    text-align: center;
    margin-bottom: 15px;
}

.pa-avatar img {
    max-width: 120px;
    max-height: 150px;
    width: auto;
    height: auto;
    border: 3px solid #e10b17;
    border-radius: 50%;
    padding: 2px;
    display: block;
    margin: 0 auto;
}

/* Правая колонка - текст сообщения */
#pun-viewtopic .post .post-body,
.punbb .post .post-body {
    margin-left: 0 !important;
    padding: 20px !important;
    min-height: 200px;
    flex: 1 !important;
    border-left: none !important;
    display: block !important;
}

#pun-viewtopic .post-content,
.punbb .post-content {
    color: #000000;
    line-height: 1.6;
    font-size: 1.1em;
}

/* Ссылки под постом - занимают всю ширину для переноса на новую строку */
#pun-viewtopic .post-links,
.punbb .post-links {
    clear: none !important;
    margin-left: 0 !important;
    margin-top: 0 !important;
    border-top: 1px dashed #e0e0e0;
    padding: 15px 20px;
    background: #fafafa;
    order: 3 !important;
    border-radius: 0 0 24px 24px;
    flex-basis: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Кнопки под постом */
.post-links ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.post-links li a {
    display: inline-block;
    padding: 6px 15px;
    background: #f1f1f1;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
    transition: 0.2s;
}

.post-links li a:hover {
    background: #e10b17;
    color: #fff;
    border-color: #e10b17;
}

/* ------------------------------------------------
   J - ЦИТАТЫ И КОД
   ------------------------------------------------ */
.punbb .post-content .quote-box,
.punbb .post-content .code-box {
    background: #f8f9fa;
    border: 2px solid #e10b17;
    border-radius: 16px;
    padding: 20px;
    margin: 15px 0;
}

.punbb .quote-box cite,
.punbb .code-box strong.legend {
    color: #e10b17;
    font-size: 1.1em;
    font-weight: 700;
    margin-bottom: 10px;
    display: block;
}

/* ------------------------------------------------
   K - МЕНЮ ПРОФИЛЯ (с иконками)
   ------------------------------------------------ */
#profile .container {
    padding-left: 240px;
    position: relative;
}

#profilenav {
    position: absolute;
    left: 0;
    top: 0;
    width: 220px;
    background: #f8f9fa;
    border-radius: 24px;
    padding: 20px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #eaeaea;
}

#profilenav ul {
    padding: 0;
    margin: 0;
}

#profilenav li {
    margin: 5px 10px;
    border-radius: 40px;
    transition: all 0.3s ease;
}

#profilenav li a {
    display: block;
    padding: 12px 20px 12px 45px;
    color: #000000;
    font-weight: 500;
    border-radius: 40px;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
}

/* Общие стили для иконок */
#profilenav li a:before {
    content: "";
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.7;
    transition: all 0.3s ease;
}

/* Активный пункт */
#profilenav li.isactive {
    background: #e10b17;
    box-shadow: 0 4px 10px rgba(225, 11, 23, 0.3);
}

#profilenav li.isactive a {
    color: #ffffff;
    font-weight: 700;
}

#profilenav li.isactive a:before {
    filter: brightness(0) invert(1);
    opacity: 1;
}

/* Иконка для Основного (item1) */
#profilenav li.item1 a:before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e10b17'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E");
}

/* Иконка для Персонального (item2) */
#profilenav li.item2 a:before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e10b17'%3E%3Cpath d='M20 21v-2c0-2.66-5.33-4-8-4s-8 1.34-8 4v2h16zm0-14h-4v2h4v2h-4v2h4v2h-6V7c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v10h14V7z'/%3E%3C/svg%3E");
}

/* Иконка для Всё прочитано (item3) */
#profilenav li.item3 a:before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e10b17'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
}

/* Иконка для Аватара (item4) */
#profilenav li.item4 a:before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e10b17'%3E%3Cpath d='M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z'/%3E%3C/svg%3E");
}

/* Иконка для Подписи (item5) */
#profilenav li.item5 a:before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e10b17'%3E%3Cpath d='M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z'/%3E%3C/svg%3E");
}

/* Иконка для Отображения (item6) */
#profilenav li.item6 a:before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e10b17'%3E%3Cpath d='M12 6c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zm0 10c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4z'/%3E%3C/svg%3E");
}

/* Иконка для Приватности (item7) */
#profilenav li.item7 a:before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e10b17'%3E%3Cpath d='M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z'/%3E%3C/svg%3E");
}

/* Иконка для Дополнительно (item8) */
#profilenav li.item8 a:before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e10b17'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E");
}

/* Иконка для Приглашений (item9) */
#profilenav li.item9 a:before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e10b17'%3E%3Cpath d='M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z'/%3E%3C/svg%3E");
}

/* Иконка для Загрузок (item10) */
#profilenav li.item10 a:before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e10b17'%3E%3Cpath d='M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z'/%3E%3C/svg%3E");
}

/* Иконка для Управления (item11) */
#profilenav li.item11 a:before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e10b17'%3E%3Cpath d='M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.23.09.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z'/%3E%3C/svg%3E");
}

/* Эффекты при наведении */
#profilenav li:not(.isactive):hover {
    background: rgba(225, 11, 23, 0.1);
}

#profilenav li:not(.isactive):hover a {
    color: #e10b17;
}

#profilenav li:not(.isactive):hover a:before {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

/* ------------------------------------------------
   L - ГОРИЗОНТАЛЬНАЯ НАВИГАЦИЯ
   ------------------------------------------------ */
#pun-navlinks .container {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    padding: 5px 20px;
    border-bottom: 3px solid #e10b17;
}

#pun-navlinks ul {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    margin: 0;
    padding: 0;
}

#pun-navlinks li a {
    display: inline-block;
    color: #000000;
    font-weight: 600;
    padding: 12px 20px;
    border-radius: 40px;
    transition: all 0.3s ease;
    font-size: 1.1em;
    white-space: nowrap;
}

#pun-navlinks li a:hover {
    background: #e10b17;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(225, 11, 23, 0.3);
    text-decoration: none;
}

/* Пользовательские ссылки */
#pun-ulinks .container {
    background: transparent;
    box-shadow: none;
    padding: 10px 20px;
}

#pun-ulinks ul {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    margin: 0;
    padding: 0;
}

#pun-ulinks li a {
    display: inline-block;
    color: #666666;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.95em;
    transition: all 0.2s ease;
    white-space: nowrap;
}

#pun-ulinks li a:hover {
    background: #e10b17;
    color: #ffffff;
    text-decoration: none;
}

#pun-ulinks li.item1 a {
    background: #e10b17;
    color: #ffffff;
    font-weight: 600;
}

/* ------------------------------------------------
   M - ПАГИНАЦИЯ
   ------------------------------------------------ */
.punbb .pagelink {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    margin: 10px 0;
}

.linkst, .linksb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
}

.punbb .pagelink a,
.punbb .pagelink strong {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 30px;
    background: #f0f0f0;
    color: #000000;
    transition: all 0.3s ease;
    min-width: 35px;
    text-align: center;
}

.punbb .pagelink strong {
    background: #e10b17;
    color: #ffffff;
}

.punbb .pagelink a:hover {
    background: #e10b17;
    color: #ffffff;
}

/* ------------------------------------------------
   N - ХЛЕБНЫЕ КРОШКИ
   ------------------------------------------------ */
#pun-crumbs1 p.container,
#pun-crumbs2 .container {
    background: #f8f9fa;
    border-radius: 40px;
    padding: 12px 25px;
    font-size: 1.1em;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

#pun-crumbs1 a,
#pun-crumbs2 a {
    color: #e10b17;
    padding: 5px 10px;
    border-radius: 20px;
}

#pun-crumbs1 a:hover,
#pun-crumbs2 a:hover {
    background: rgba(225, 11, 23, 0.1);
    text-decoration: none;
}

/* ------------------------------------------------
   W - РЕЗУЛЬТАТЫ ПОИСКА
   ------------------------------------------------ */
/* Исправляем отображение пути темы в одну строку */
.search .post h3 span {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 5px !important;
}

.search .post h3 strong {
    flex-shrink: 0 !important;
    margin-right: 5px !important;
}

.search .post h3 a {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}

.search .post h3 em {
    flex-shrink: 0 !important;
    margin: 0 3px !important;
}

/* ------------------------------------------------
   O - СТАТИСТИКА
   ------------------------------------------------ */
#pun-stats .container {
    background: linear-gradient(135deg, #e10b17 0%, #b00913 100%);
    color: #ffffff;
    border-radius: 30px;
    padding: 25px;
}

#pun-stats ul {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
}

#pun-stats li {
    flex: 1 1 auto;
}

li#onlinelist {
    margin-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 15px;
    width: 100%;
}

#pun-stats a {
    color: #ffffff;
}

#pun-stats a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
}

/* ------------------------------------------------
   P - ФОРМЫ
   ------------------------------------------------ */
.punbb fieldset {
    border: 2px solid #eaeaea;
    border-radius: 24px;
    padding: 25px;
    margin: 0 0 20px 0;
}

.punbb fieldset legend {
    color: #e10b17;
    font-size: 1.2em;
    font-weight: 700;
    padding: 0 15px;
}

.punbb .required label {
    color: #e10b17;
    font-weight: 700;
}

/* ------------------------------------------------
   Q - ПРОСМОТР ПРОФИЛЯ
   ------------------------------------------------ */
/* Контейнер профиля - размещаем меню слева от карточки */
#viewprofile-next,
#pun-profile #viewprofile-next {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 0 !important;
    padding: 0 !important;
    padding-left: 240px !important;
    background: transparent !important;
    box-shadow: none !important;
    position: relative !important;
}

#viewprofile {
    flex: 1;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #eaeaea;
    overflow: hidden;
}

#profile-left {
    width: 250px;
    padding: 20px;
    text-align: center;
    vertical-align: top;
    background: #fcfcfc;
}

#pa-avatar {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

#pa-avatar div {
    width: 180px;
    height: 180px;
    overflow: hidden;
    border-radius: 50%;
    border: 4px solid #e10b17;
    box-shadow: 0 4px 15px rgba(225, 11, 23, 0.2);
}

#pa-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#profile-name {
    font-size: 1.6em;
    color: #e10b17;
    margin-bottom: 5px;
}

#profile-right {
    padding: 20px 30px;
    vertical-align: top;
    border-left: 1px solid #eee;
}

#profile-right li {
    margin-bottom: 8px;
    border-bottom: 1px solid #f9f9f9;
    padding-bottom: 4px;
}

#profile-right span {
    color: #666;
    font-weight: 600;
    margin-right: 5px;
}

/* ------------------------------------------------
   R - ПОДВАЛ
   ------------------------------------------------ */
#pun-about .container {
    background: transparent;
    text-align: center;
    color: #666666;
    border-top: 2px solid #e10b17;
    border-radius: 0;
    box-shadow: none;
}

/* ------------------------------------------------
   S - ЗАГОЛОВОК САЙТА
   ------------------------------------------------ */
#pun-title {
    background: none;
    border: none;
    display: flex;
    justify-content: center;
    padding: 40px 0;
}

#pun-title .title-logo {
    font-family: 'Dela Gothic One', sans-serif;
    color: #E30613;
    text-transform: uppercase;
    font-size: 42px;
    letter-spacing: 2px;
    text-align: center;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
    border: none;
}

#pun-title .title-logo::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 4px;
    background: #E30613;
    box-shadow: 0 0 10px rgba(227, 6, 19, 0.4);
    border-radius: 2px;
}

/* ------------------------------------------------
   T - ОПРОСЫ
   ------------------------------------------------ */
.poll1 td {
    font-size: 1.1em;
    padding: 10px 15px;
}

.poll1 input[type="checkbox"],
.poll1 input[type="radio"] {
    width: 20px;
    height: 20px;
    margin: 5px 10px 5px 0;
    accent-color: #e10b17;
}

/* ------------------------------------------------
   U - СКРЫТИЕ НЕНУЖНЫХ ЭЛЕМЕНТОВ
   ------------------------------------------------ */
#table-area,
#spoiler-area,
#video-area,
#image-area,
#font-area,
#size-area,
#color-area,
#keyboard-area,
#addition-area,
#button-table,
#button-spoiler,
#button-video,
#button-font,
#button-size,
#button-keyboard,
#button-addition,
.modmenu p.container span,
#topic-modmenu span,
a[href*="rss"],
a[href*="atom"],
a[title*="RSS"],
a[title*="Atom"],
#profile-links,
.profile-links {
    display: none !important;
}

/* ------------------------------------------------
   V - АДАПТИВНОСТЬ
   ------------------------------------------------ */
@media (max-width: 900px) {
    #profile .container {
        padding-left: 0;
    }
    
    #viewprofile-next,
    #pun-profile #viewprofile-next {
        padding-left: 0 !important;
    }
    
    #profilenav {
        position: static;
        width: 100%;
        margin-bottom: 20px;
    }
    
    #profilenav ul {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }
    
    #profilenav li {
        flex: 1 1 auto;
        min-width: 120px;
    }
    
    #viewprofile-next {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .punbb .post .post-author,
    .punbb .post-body,
    .punbb .post-links {
        float: none;
        width: auto;
        margin-left: 0;
    }
    
    .punbb .post .post-author {
        border-right: none;
        border-bottom: 2px solid #e10b17;
    }
    
    #pun-navlinks ul,
    #pun-ulinks ul {
        justify-content: center;
    }
    
    #pun-navlinks li a,
    #pun-ulinks li a {
        padding: 8px 12px;
        font-size: 0.9em;
    }
    
    #pun-stats ul {
        flex-direction: column;
        gap: 10px;
    }
    
    #profile-left,
    #profile-right {
        display: block;
        width: 100%;
        border-left: none;
    }
    
    #profile-left {
        border-radius: 20px 20px 0 0;
    }
}

@media (max-width: 600px) {
    .linkst, .linksb {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .post-links ul {
        flex-direction: column;
        width: 100%;
    }
    
    .post-links li a {
        display: block;
        text-align: center;
    }
}