.forum-composer-card--rich {
    gap: 20px;
}

.forum-composer-form--rich {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.forum-cover-field {
    min-height: 100%;
}

.forum-cover-preview,
.forum-cover-empty {
    min-height: 120px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(19, 24, 37, 0.96), rgba(12, 17, 28, 0.98));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.forum-cover-empty {
    color: #8fa5bb;
    font-size: 13px;
    text-align: center;
    padding: 14px;
}

.forum-editor-layout {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.forum-editor-author {
    display: flex;
    justify-content: center;
}

.forum-editor-author img {
    width: 96px;
    height: 96px;
    border-radius: 22px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.28);
}

.forum-editor-main {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(28, 36, 58, 0.97), rgba(19, 25, 42, 0.99));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    padding: 14px;
}

.forum-editor-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(44, 55, 88, 0.96), rgba(35, 44, 73, 0.98));
}

.forum-editor-tool,
.forum-editor-select {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    min-width: 38px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 11px;
    background: rgba(18, 25, 44, 0.84);
    color: #dce6f3;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.forum-editor-tool:hover,
.forum-editor-select:hover {
    background: rgba(76, 97, 162, 0.32);
    border-color: rgba(158, 183, 255, 0.34);
    transform: translateY(-1px);
}

.forum-editor-tool i,
.forum-editor-select i {
    pointer-events: none;
}

.forum-editor-tool--color {
    padding: 0 10px;
    overflow: hidden;
}

.forum-editor-tool--color input {
    width: 26px;
    height: 26px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
}

.forum-editor-select select {
    appearance: none;
    border: none;
    background: transparent;
    color: #f2f6ff;
    font-size: 13px;
    font-weight: 700;
    min-width: 96px;
    outline: none;
}

.forum-editor-select--size select {
    min-width: 54px;
}

.forum-editor-divider {
    width: 1px;
    align-self: stretch;
    background: rgba(255, 255, 255, 0.08);
    margin: 0 2px;
}

.forum-editor-popover {
    position: absolute;
    top: 72px;
    left: 14px;
    z-index: 4;
    width: min(360px, calc(100% - 28px));
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: linear-gradient(180deg, rgba(32, 40, 66, 0.98), rgba(21, 27, 47, 0.99));
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.34);
}

.forum-editor-popover--emoji {
    width: min(420px, calc(100% - 28px));
}

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

.forum-editor-emoji-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
    gap: 8px;
    max-height: 260px;
    overflow-y: auto;
    padding-right: 4px;
}

.forum-editor-emoji {
    min-height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(20, 26, 45, 0.84);
    font-size: 22px;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.forum-editor-emoji:hover {
    background: rgba(76, 97, 162, 0.32);
    border-color: rgba(158, 183, 255, 0.34);
    transform: translateY(-1px);
}

.forum-editor-workspace {
    min-height: 380px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(19, 25, 42, 0.98), rgba(13, 18, 31, 0.99));
    padding: 18px;
}

.forum-editor-content {
    min-height: 340px;
    color: #eef4ff;
    font-size: 16px;
    line-height: 1.7;
    outline: none;
    word-break: break-word;
}

.forum-editor-content:empty::before {
    content: attr(data-placeholder);
    color: #7f92aa;
}

.forum-editor-content p {
    margin: 0 0 1rem;
}

.forum-editor-content p:last-child {
    margin-bottom: 0;
}

.forum-editor-content a {
    color: #8ab6ff;
    text-decoration: underline;
}

.forum-editor-content blockquote {
    margin: 1rem 0;
    padding: 12px 16px;
    border-left: 3px solid rgba(138, 182, 255, 0.48);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 0 14px 14px 0;
}

.forum-editor-figure,
.forum-editor-content figure {
    margin: 1.1rem 0;
}

.forum-editor-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.26);
}

.forum-editor-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    color: #9bb0c6;
    font-size: 12px;
    font-weight: 700;
}

.forum-article-richtext {
    color: #edf3ff;
    font-size: 16px;
    line-height: 1.7;
}

.forum-article-richtext p,
.forum-article-richtext div,
.forum-article-richtext blockquote,
.forum-article-richtext ul,
.forum-article-richtext ol {
    margin: 0 0 1rem;
}

.forum-article-richtext ul,
.forum-article-richtext ol {
    padding-left: 1.5rem;
}

.forum-article-richtext img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.25rem auto;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 32px rgba(0, 0, 0, 0.28);
}

.forum-article-richtext a {
    color: #8ab6ff;
    text-decoration: underline;
}

@media (max-width: 900px) {
    .forum-editor-layout {
        grid-template-columns: 1fr;
    }

    .forum-editor-author {
        justify-content: flex-start;
    }

    .forum-editor-workspace {
        min-height: 320px;
    }
}

@media (max-width: 720px) {
    .forum-editor-toolbar {
        gap: 6px;
    }

    .forum-editor-select {
        min-width: 100%;
        justify-content: flex-start;
    }

    .forum-editor-select select {
        width: 100%;
    }

    .forum-editor-divider {
        display: none;
    }
}
