/* static/css/forum.css — ПОЛНОСТЬЮ АДАПТИВНЫЙ ФОРУМ */

/* === ОБЩИЕ СТИЛИ ФОРУМА === */
.forum-container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 1rem;
    background: #f8f9fa;
    min-height: 100vh;
}

.forum-header {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
    border-left: 4px solid #0d6efd;
}

.forum-header h1 {
    margin: 0;
    font-size: 1.8rem;
    color: #212529;
    font-weight: 600;
}

/* === КАТЕГОРИИ === */
.forum-category {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.forum-category:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.forum-category h3 {
    margin: 0 0 1rem 0;
    font-size: 1.4rem;
    color: #495057;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.forum-category h3::before {
    content: "📌";
    font-size: 1.2rem;
}

/* === СПИСОК ТЕМ === */
.forum-threads {
    list-style: none;
    padding: 0;
    margin: 0;
}

.forum-thread-item {
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
}

.forum-thread-item:hover {
    background: #f1f3f5;
    border-radius: 8px;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.forum-thread-item:last-child {
    border-bottom: none;
}

.forum-thread-link {
    color: #0d6efd;
    text-decoration: none;
    font-weight: 500;
    flex: 1;
}

.forum-thread-link:hover {
    text-decoration: underline;
}

.forum-thread-author {
    color: #6c757d;
    font-size: 0.9rem;
    margin-left: 1rem;
    white-space: nowrap;
}

/* === КНОПКА "НОВАЯ ТЕМА" === */
.btn-new-thread {
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    color: white;
    border: none;
    padding: 0.65rem 1.2rem;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.btn-new-thread:hover {
    background: linear-gradient(135deg, #0b5ed7, #0946b3);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
}

/* === ФОРМА СОЗДАНИЯ / РЕДАКТИРОВАНИЯ === */
.forum-form {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    max-width: 100%;
}

.forum-form .form-label {
    font-weight: 600;
    color: #495057;
}

.forum-form .form-control,
.forum-form textarea {
    border-radius: 8px;
    border: 1px solid #ced4da;
    padding: 0.75rem;
    font-size: 1rem;
}

.forum-form textarea {
    min-height: 150px;
    resize: vertical;
}

.forum-form .btn-primary {
    background: #0d6efd;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
}

.forum-form .btn-secondary {
    background: #6c757d;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
}

/* === ТЕМА (ДЕТАЛЬНАЯ СТРАНИЦА) === */
.forum-thread-detail {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
}

.forum-thread-detail h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #212529;
}

.forum-thread-meta {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.forum-thread-content {
    line-height: 1.7;
    color: #495057;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

/* === ОТВЕТЫ === */
.reply {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.reply:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.reply-author {
    font-weight: 600;
    color: #0d6efd;
}

.reply-date {
    color: #6c757d;
}

.reply-content {
    margin: 0;
    line-height: 1.6;
    color: #495057;
}

/* === ФОРМА ОТВЕТА === */
#reply-form {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-top: 1.5rem;
}

#reply-form textarea {
    width: 100%;
    min-height: 100px;
    resize: vertical;
    border-radius: 8px;
    border: 1px solid #ced4da;
    padding: 0.75rem;
    font-size: 1rem;
}

#reply-form button {
    margin-top: 0.75rem;
    background: #0d6efd;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

#reply-form button:hover {
    background: #0b5ed7;
}

/* === БЕЙДЖИ === */
.badge-moderation {
    background: #ffc107;
    color: #212529;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-weight: 500;
}

/* === АДАПТИВНОСТЬ === */
@media (max-width: 768px) {
    .forum-container {
        padding: 0.5rem;
    }
    
    .forum-header,
    .forum-category,
    .forum-form,
    .forum-thread-detail,
    #reply-form {
        padding: 1rem;
        border-radius: 8px;
    }
    
    .forum-thread-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .forum-thread-author {
        margin-left: 0;
    }
}