/* Enhanced Forum Styles - Modern Design */

/* Навигация форума */
.forum-navigation {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px 20px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.forum-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 14px;
}

.forum-breadcrumbs a {
    color: #5bc0de;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forum-breadcrumbs a:hover {
    color: #31b0d5;
    text-decoration: underline;
}

.forum-breadcrumbs .separator {
    color: rgba(255, 255, 255, 0.3);
    font-size: 16px;
}

.forum-breadcrumbs .current {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* Заголовок темы */
.topic-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.topic-title {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
    flex: 1;
}

.topic-actions {
    display: flex;
    gap: 8px;
}

.topic-actions .btn {
    white-space: nowrap;
}

@media (max-width: 768px) {
    .topic-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .topic-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .topic-title {
        font-size: 18px;
    }
}

/* Основной контейнер сообщения */
.topic-answers div[id^=answer] {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.topic-answers div[id^=answer]:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Верхняя часть - имя и дата */
.topic-answers div[id^=answer] .top-area {
    background: rgba(0, 0, 0, 0.2);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topic-answers div[id^=answer] .top-area .left-side a {
    color: #5bc0de;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.topic-answers div[id^=answer] .top-area .left-side a:hover {
    color: #31b0d5;
}

.topic-answers div[id^=answer] .top-area .right-side a {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    text-decoration: none;
}

/* Центральная часть - аватар и контент */
.topic-answers div[id^=answer] .center-area {
    padding: 0;
    display: flex;
    gap: 0;
}

.topic-answers div[id^=answer] .center-area::after {
    display: none !important;
}

/* Левая часть - аватар и информация */
.topic-answers div[id^=answer] .center-area .left-side {
    flex-shrink: 0;
    width: 180px;
    text-align: center;
    background: rgba(0, 0, 0, 0.15);
    padding: 15px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    align-self: stretch;
    display: flex;
    flex-direction: column;
}

@media (max-width: 991.99px) {
    .topic-answers div[id^=answer] .center-area {
        flex-direction: column;
    }
    
    .topic-answers div[id^=answer] .center-area .left-side {
        width: 100%;
    }
}

.topic-answers div[id^=answer] .center-area .left-side img {
    width: 120px;
    height: 120px;
    border-radius: 6px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
    margin: 15px auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    background: rgba(0, 0, 0, 0.2);
    padding: 0 !important;
    display: block;
}

.topic-answers div[id^=answer] .center-area .left-side p {
    font-size: 13px !important;
    margin: 8px 0 !important;
    line-height: 1.8 !important;
    white-space: normal !important;
    text-overflow: initial !important;
    overflow: visible !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100% !important;
    max-width: 100% !important;
    background: rgba(0, 0, 0, 0.25);
    padding: 8px 10px !important;
    border-radius: 4px;
    border-left: none;
    transition: all 0.3s ease;
}

/* Цвет текста только для элементов без inline стиля */
.topic-answers div[id^=answer] .center-area .left-side p:not([style*="color"]) {
    color: rgba(255, 255, 255, 0.7);
}

.topic-answers div[id^=answer] .center-area .left-side p:hover {
    background: rgba(0, 0, 0, 0.35);
}

.topic-answers div[id^=answer] .center-area .left-side p:after {
    display: none !important;
}

/* Группа пользователя */
.topic-answers div[id^=answer] .center-area .left-side p:first-of-type {
    font-size: 13px !important;
    margin-bottom: 15px !important;
    padding: 10px 12px !important;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 0, 0, 0.5) !important;
    border-radius: 4px !important;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3) !important;
}

.topic-answers div[id^=answer] .center-area .left-side p:first-of-type:hover {
    border-color: rgba(0, 0, 0, 0.6) !important;
}

/* Правая часть - текст сообщения */
.topic-answers div[id^=answer] .center-area .right-side {
    flex: 1;
    min-width: 0;
    padding: 20px;
}

.topic-answers div[id^=answer] .center-area .right-side #text_0,
.topic-answers div[id^=answer] .center-area .right-side .with_code {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    word-wrap: break-word;
}

.topic-answers div[id^=answer] .center-area .right-side .edited {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    text-align: right;
}

.topic-answers div[id^=answer] .center-area .right-side .signature {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-style: italic;
}

/* Нижняя часть - кнопки */
.topic-answers div[id^=answer] .bottom-area {
    background: rgba(0, 0, 0, 0.15);
    padding: 12px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topic-answers div[id^=answer] .bottom-area::after {
    display: none !important;
}

.topic-answers div[id^=answer] .bottom-area .left-side {
    width: auto !important;
    background: none !important;
    padding: 0 !important;
    border: none !important;
    text-align: left !important;
}

.topic-answers div[id^=answer] .bottom-area .btn-group {
    display: inline-flex !important;
    width: auto !important;
    margin: 0 !important;
    gap: 8px;
}

.topic-answers div[id^=answer] .bottom-area .btn-group .btn {
    width: auto !important;
    float: none !important;
    margin: 0 !important;
    padding: 6px 16px;
    font-size: 13px;
}

.topic-answers div[id^=answer] .bottom-area .right-side {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    width: auto !important;
    background: none !important;
    padding: 0 !important;
    border: none !important;
}

/* Clearfix не нужен при flex */
.topic-answers div[id^=answer] .center-area .clearfix,
.topic-answers div[id^=answer] .bottom-area .clearfix {
    display: none;
}

/* Адаптация кнопок для мобильных */
@media (max-width: 991.99px) {
    .topic-answers div[id^=answer] .bottom-area {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .topic-answers div[id^=answer] .bottom-area .btn-group {
        width: 100% !important;
        justify-content: center;
    }
}

/* Улучшение читаемости текста */
.topic-answers div[id^=answer] .with_code p {
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.85);
}

.topic-answers div[id^=answer] .with_code a {
    color: #5bc0de;
    text-decoration: none;
}

.topic-answers div[id^=answer] .with_code a:hover {
    color: #31b0d5;
    text-decoration: underline;
}

/* Стили для кода и цитат */
.topic-answers div[id^=answer] .with_code code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 3px;
    color: #5bc0de;
    font-size: 90%;
}

.topic-answers div[id^=answer] .with_code pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px;
    border-radius: 4px;
    border-left: 3px solid #5bc0de;
    overflow-x: auto;
}

.topic-answers div[id^=answer] .with_code blockquote {
    border-left: 3px solid rgba(255, 255, 255, 0.3);
    padding-left: 15px;
    margin: 10px 0;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}
