/* Основные стили форума */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Шапка */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
}

.logo a {
    color: white;
    text-decoration: none;
}

.user-menu {
    display: flex;
    gap: 15px;
    align-items: center;
}

.user-menu a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background 0.3s;
}

.user-menu a:hover {
    background: rgba(255,255,255,0.1);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid white;
}

/* Навигация */
.nav-menu {
    background: #4a5568;
    padding: 10px 20px;
}

.nav-menu ul {
    display: flex;
    gap: 20px;
    list-style: none;
}

.nav-menu a {
    color: #cbd5e0;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: #2d3748;
    color: white;
}

/* Контент */
.content {
    padding: 20px;
}

/* Категории */
.category {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.category-header {
    background: #f7fafc;
    padding: 15px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.category-header h2 {
    margin: 0;
    font-size: 18px;
}

.category-header h2 a {
    color: #2d3748;
    text-decoration: none;
}

.category-header h2 a:hover {
    color: #667eea;
}

.category-description {
    color: #718096;
    font-size: 14px;
    margin-top: 5px;
}

.category-stats {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #718096;
    margin-top: 10px;
}

/* Темы */
.topics-table {
    width: 100%;
    border-collapse: collapse;
}

.topics-table th {
    background: #f7fafc;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #4a5568;
    border-bottom: 1px solid #e2e8f0;
}

.topics-table td {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.topic-title {
    font-size: 16px;
    margin-bottom: 5px;
}

.topic-title a {
    color: #2d3748;
    text-decoration: none;
    font-weight: 500;
}

.topic-title a:hover {
    color: #667eea;
}

.topic-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #718096;
}

.topic-author a {
    color: #667eea;
    text-decoration: none;
}

.topic-stats {
    display: flex;
    gap: 10px;
}

.topic-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.last-post {
    font-size: 13px;
    color: #718096;
}

.last-post a {
    color: #667eea;
    text-decoration: none;
}

/* Сообщения */
.post {
    display: flex;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.post:last-child {
    border-bottom: none;
}

.post-sidebar {
    flex: 0 0 200px;
    text-align: center;
}

.post-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 10px;
}

.post-author {
    font-weight: 600;
    margin-bottom: 5px;
}

.post-author a {
    color: #2d3748;
    text-decoration: none;
}

.post-author a:hover {
    color: #667eea;
}

.user-rank {
    display: inline-block;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    background: #edf2f7;
    color: #4a5568;
    margin-top: 5px;
}

.post-content {
    flex: 1;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.post-date {
    color: #718096;
    font-size: 14px;
}

.post-actions {
    display: flex;
    gap: 10px;
}

.post-actions a {
    color: #718096;
    text-decoration: none;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s;
}

.post-actions a:hover {
    background: #edf2f7;
    color: #4a5568;
}

.post-body {
    line-height: 1.7;
}

.post-body p {
    margin-bottom: 15px;
}

.post-body blockquote {
    border-left: 3px solid #667eea;
    padding-left: 15px;
    margin: 15px 0;
    color: #4a5568;
    background: #f7fafc;
    padding: 15px;
    border-radius: 4px;
}

.post-body pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 15px 0;
}

.post-body code {
    background: #edf2f7;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.post-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
    font-size: 13px;
    color: #718096;
}

/* Формы */
.form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
}

textarea.form-control {
    min-height: 200px;
    resize: vertical;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a67d8;
}

.btn-secondary {
    background: #a0aec0;
    color: white;
}

.btn-secondary:hover {
    background: #718096;
}

.btn-danger {
    background: #f56565;
    color: white;
}

.btn-danger:hover {
    background: #e53e3e;
}

.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Бейджи */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge.admin {
    background: #f56565;
    color: white;
}

.badge.moderator {
    background: #48bb78;
    color: white;
}

.badge.sticky {
    background: #ed8936;
    color: white;
}

.badge.closed {
    background: #a0aec0;
    color: white;
}

.badge.announcement {
    background: #9f7aea;
    color: white;
}

/* Пагинация */
.pagination {
    display: flex;
    gap: 5px;
    margin: 30px 0;
    justify-content: center;
}

.page-link {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    color: #4a5568;
    text-decoration: none;
    transition: all 0.3s;
}

.page-link:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.page-link.current {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Поиск */
.search-form {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.search-form input {
    flex: 1;
}

/* Уведомления */
.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-error {
    background: #fed7d7;
    color: #c53030;
    border: 1px solid #fc8181;
}

.alert-success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

/* Подвал */
.footer {
    margin-top: 40px;
    padding: 20px;
    text-align: center;
    color: #718096;
    border-top: 1px solid #e2e8f0;
}

.version-popup {
    cursor: pointer;
    color: #667eea;
    text-decoration: underline;
}

/* Хлебные крошки */
.breadcrumbs {
    margin-bottom: 20px;
    font-size: 14px;
}

.breadcrumbs a {
    color: #667eea;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .post {
        flex-direction: column;
    }
    
    .post-sidebar {
        flex: 0 0 auto;
        text-align: left;
        display: flex;
        align-items: center;
        gap: 15px;
    }
    
    .post-avatar {
        width: 50px;
        height: 50px;
    }
    
    .nav-menu ul {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .topic-stats {
        flex-wrap: wrap;
    }
}