/* Автономный форум - теперь использует единый дизайн с основным сайтом */
/* ВАЖНО: Стили .forum-navbar, .forum-footer и связанные с ними больше не используются */
/* Форум теперь использует стандартные generateHeader() и generateFooter() из config.php */

/* Импорт шрифтов */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* CSS переменные */
:root {
    --forum-bg: #0c0c0d;
    --forum-panel: #18191b;
    --forum-accent: #3b82f6;
    --forum-accent-light: #478df7;
    --forum-text: #e1e1e3;
    --forum-text-dim: #9a9a9c;
    --forum-border: rgba(255, 255, 255, 0.08);
}

/* УСТАРЕВШИЕ СТИЛИ - оставлены для обратной совместимости */
/* Эти стили больше не используются, так как форум использует стандартный header/footer */

/* Сброс стилей - ОТКЛЮЧЕН, используются стили из common.css */
/*
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--forum-bg);
    color: var(--forum-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
*/

/* УСТАРЕВШИЕ СТИЛИ NAVBAR - больше не используются */
/* Форум использует стандартный .navbar из common.css */
/*
/* УСТАРЕВШИЕ СТИЛИ NAVBAR - больше не используются */
/* Форум использует стандартный .navbar из common.css */
/*
.forum-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: rgba(12, 12, 13, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--forum-border);
    z-index: 1000;
}

.forum-nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.forum-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.forum-logo-img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--forum-accent);
    object-fit: cover;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
    padding: 2px;
    background: var(--forum-bg);
}

.forum-logo-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.02em;
}

.forum-nav-links {
    display: flex;
    list-style: none;
    gap: 4px;
}

.forum-nav-links li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    height: 36px;
    color: var(--forum-text-dim);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s;
}

.forum-nav-links li a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.forum-account-menu {
    position: relative;
}

.forum-account-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    height: 36px;
    background: none;
    border: none;
    color: var(--forum-text-dim);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.forum-account-trigger:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.forum-dropdown {
    position: absolute;
    top: 45px;
    right: 0;
    min-width: 220px;
    background: var(--forum-panel);
    border: 1px solid var(--forum-border);
    border-radius: 10px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.forum-account-menu.active .forum-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.forum-dropdown a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--forum-text-dim);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s;
}

.forum-dropdown a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.forum-dropdown i {
    width: 18px;
    text-align: center;
    color: var(--forum-accent);
}
*/
/* КОНЕЦ УСТАРЕВШИХ СТИЛЕЙ NAVBAR */

/* Основной контейнер форума */
.forum-page-wrapper {
    min-height: 100vh;
    background: var(--forum-bg);
    padding-top: 80px;
    padding-bottom: 40px;
}

.forum-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Заголовок форума */
.forum-header {
    text-align: center;
    margin-bottom: 60px;
    padding: 60px 20px;
    background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #0f0f1a 100%);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.forum-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 50% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.forum-header-content {
    position: relative;
    z-index: 1;
}

.forum-badge {
    display: inline-block;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 8px 20px;
    border-radius: 30px;
    color: #60a5fa;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.forum-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 15px;
    background: linear-gradient(135deg, #fff 0%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.forum-subtitle {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.6);
    margin: 0 0 30px;
}

.forum-create-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.forum-create-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.5);
}

/* Статистика */
.forum-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.stat-box {
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.8) 0%, rgba(20, 20, 30, 0.9) 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(96, 165, 250, 0.1) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #60a5fa;
    margin: 0 auto 20px;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: #60a5fa;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Категории */
.forum-categories {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.category-item {
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.8) 0%, rgba(20, 20, 30, 0.9) 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 30px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.category-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
}

.category-item:hover::before {
    transform: scaleX(1);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 0;
}

.category-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(96, 165, 250, 0.1) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #60a5fa;
    flex-shrink: 0;
}

.category-info {
    flex: 1;
}

.category-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
}

.category-name a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
}

.category-name a:hover {
    color: #60a5fa;
}

.category-description {
    color: rgba(255,255,255,0.6);
    line-height: 1.6;
    margin: 0;
}

.category-stats {
    display: flex;
    gap: 30px;
    align-items: center;
}

.category-stat {
    text-align: center;
}

.category-stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: #60a5fa;
}

.category-stat-label {
    display: block;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
}

/* Подкатегории */
.subcategories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.subcategory-card {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    gap: 15px;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
}

.subcategory-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #3b82f6, #60a5fa);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.subcategory-card:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(59, 130, 246, 0.15);
}

.subcategory-card:hover::before {
    transform: scaleY(1);
}

.subcategory-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(96, 165, 250, 0.1));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #60a5fa;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.subcategory-card:hover .subcategory-icon {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(96, 165, 250, 0.2));
    transform: scale(1.1);
}

.subcategory-info {
    flex: 1;
    min-width: 0;
}

.subcategory-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 8px;
    transition: color 0.3s;
}

.subcategory-card:hover .subcategory-name {
    color: #60a5fa;
}

.subcategory-description {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    margin: 0 0 10px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.subcategory-stats {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
}

.subcategory-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.subcategory-stats i {
    color: #60a5fa;
    font-size: 0.75rem;
}

/* Темы */
.topics-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.topic-item {
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.8) 0%, rgba(20, 20, 30, 0.9) 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 20px;
}

.topic-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

.topic-item.pinned {
    border-left: 4px solid #60a5fa;
}

.topic-item.locked {
    opacity: 0.7;
}

.topic-icon {
    width: 50px;
    height: 50px;
    background: rgba(59, 130, 246, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #60a5fa;
    flex-shrink: 0;
}

.topic-content {
    flex: 1;
    min-width: 0;
}

.topic-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 8px;
}

.topic-title a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
}

.topic-title a:hover {
    color: #60a5fa;
}

.topic-meta {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
}

.topic-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.topic-stats {
    display: flex;
    gap: 20px;
}

.topic-stat {
    text-align: center;
    padding: 10px 20px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
}

.topic-stat-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: #60a5fa;
}

.topic-stat-label {
    display: block;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
}

/* Посты */
.post-item {
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.8) 0%, rgba(20, 20, 30, 0.9) 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
}

.post-item.first-post {
    border: 2px solid rgba(59, 130, 246, 0.3);
}

.post-header {
    background: rgba(59, 130, 246, 0.05);
    padding: 20px 30px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    gap: 20px;
}

.post-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #60a5fa;
    object-fit: cover;
}

.post-author-info {
    flex: 1;
}

.post-author-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 5px;
}

.post-author-role {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.post-author-role.admin {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.post-author-role.support {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.post-author-role.user {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.post-date {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
}

.post-body {
    padding: 30px;
    color: rgba(255,255,255,0.8);
    line-height: 1.8;
    font-size: 1.05rem;
}

.post-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.post-attachment img {
    max-width: 400px;
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Формы */
.forum-form {
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.8) 0%, rgba(20, 20, 30, 0.9) 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 40px;
    margin-top: 30px;
}

.forum-form h2 {
    color: #60a5fa;
    margin: 0 0 30px;
    font-size: 1.8rem;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    color: #fff;
    margin-bottom: 10px;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: rgba(255, 255, 255, 0.05);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2360a5fa' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 15px) center;
    cursor: pointer;
    color: #fff;
}

.form-group select:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(59, 130, 246, 0.5);
}

.form-group select:focus {
    background-color: rgba(255, 255, 255, 0.08);
}

.form-group select option {
    background-color: #18191b;
    color: #e1e1e3;
    padding: 12px 16px;
    border: none;
}

.form-group select option:hover,
.form-group select option:checked,
.form-group select option:focus {
    background-color: #3b82f6;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
}

/* Для Firefox */
.form-group select option:checked {
    background-color: #3b82f6 !important;
    color: #fff !important;
}

/* Для WebKit браузеров */
.form-group select option:checked {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-primary {
    padding: 14px 30px;
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    padding: 14px 30px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

/* Breadcrumb */
.forum-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.forum-breadcrumb a {
    color: #60a5fa;
    text-decoration: none;
    transition: color 0.3s;
}

.forum-breadcrumb a:hover {
    color: #fff;
}

.forum-breadcrumb span {
    color: rgba(255,255,255,0.5);
}

/* Пагинация */
.forum-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
}

.page-link {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s;
}

.page-link:hover,
.page-link.active {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    border-color: #60a5fa;
}

/* Пустое состояние */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state i {
    font-size: 5rem;
    color: rgba(59, 130, 246, 0.3);
    margin-bottom: 20px;
}

.empty-state h3 {
    color: #fff;
    font-size: 1.8rem;
    margin: 0 0 10px;
}

.empty-state p {
    color: rgba(255,255,255,0.6);
    font-size: 1.1rem;
}

/* Уведомления */
.forum-notice {
    padding: 20px 30px;
    border-radius: 12px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.forum-notice.info {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

.forum-notice.warning {
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

.forum-notice.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* Адаптивность */
@media (max-width: 768px) {
    .forum-title {
        font-size: 2.5rem;
    }
    
    .forum-subtitle {
        font-size: 1rem;
    }
    
    .category-header {
        flex-direction: column;
        text-align: center;
    }
    
    .category-stats {
        justify-content: center;
    }
    
    .topic-item {
        flex-direction: column;
        text-align: center;
    }
    
    .topic-stats {
        width: 100%;
        justify-content: center;
    }
    
    .post-header {
        flex-direction: column;
        text-align: center;
    }
}


/* Footer форума */
.forum-footer {
    background: var(--forum-panel);
    padding: 60px 0 0;
    margin-top: 80px;
    border-top: 1px solid var(--forum-border);
    position: relative;
}

.forum-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--forum-accent), transparent);
    opacity: 0.5;
}

.forum-footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px 50px;
    display: flex;
    justify-content: space-between;
    gap: 60px;
}

.forum-footer-branding {
    flex: 0 0 auto;
    max-width: 280px;
}

.forum-footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.forum-footer-logo-img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 2px solid var(--forum-accent);
    padding: 2px;
    background: var(--forum-bg);
    object-fit: cover;
}

.forum-footer-logo-text {
    color: #fff;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.forum-footer-description {
    color: var(--forum-text-dim);
    font-size: 0.9rem;
    line-height: 1.6;
}

.forum-footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 50px;
}

.forum-footer-group h4 {
    color: #fff;
    margin-bottom: 18px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.forum-footer-group ul {
    list-style: none;
}

.forum-footer-group ul li {
    margin-bottom: 10px;
}

.forum-footer-group ul li a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--forum-text-dim);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.forum-footer-group ul li a:hover {
    color: var(--forum-accent);
}

.forum-footer-group ul li a i {
    width: 16px;
    text-align: center;
    font-size: 0.75rem;
    color: var(--forum-accent);
}

.forum-footer-bottom {
    background: rgba(0, 0, 0, 0.25);
    padding: 20px 40px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.forum-footer-bottom p {
    color: var(--forum-text-dim);
    font-size: 0.8rem;
    margin: 0;
}

/* Адаптивность навигации и футера */
@media (max-width: 768px) {
    .forum-nav-container {
        padding: 0 20px;
    }
    
    .forum-nav-links {
        display: none;
    }
    
    .category-header {
        flex-direction: column;
        text-align: center;
    }
    
    .category-stats {
        justify-content: center;
    }
    
    .subcategories-grid {
        grid-template-columns: 1fr;
    }
    
    .forum-footer-content {
        flex-direction: column;
        padding: 0 20px 35px;
    }
    
    .forum-footer-branding {
        max-width: 100%;
    }
    
    .forum-footer-links {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .forum-footer-bottom {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .subcategory-card {
        flex-direction: column;
        text-align: center;
    }
    
    .subcategory-icon {
        margin: 0 auto;
    }
}


/* Дополнительные стили для select в разных браузерах */
@supports (-webkit-appearance: none) or (-moz-appearance: none) {
    .form-group select {
        background-color: rgba(255, 255, 255, 0.05);
    }
}

/* Стили для dropdown в Chrome/Safari */
.form-group select::-webkit-scrollbar {
    width: 12px;
}

.form-group select::-webkit-scrollbar-track {
    background: #18191b;
}

.form-group select::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 6px;
}

.form-group select::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

/* Альтернативный стиль для select - кастомный dropdown */
.custom-select-wrapper {
    position: relative;
}

.custom-select-wrapper select {
    width: 100%;
}

/* Убираем стандартную стрелку в IE */
.form-group select::-ms-expand {
    display: none;
}


/* Дополнительные состояния для select */
.form-group select.select-focused {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-group select.has-value {
    color: #fff;
    font-weight: 500;
}

/* Placeholder стиль для пустого select */
.form-group select option[value=""] {
    color: #9a9a9c;
}

/* Стили для выбранного option */
.form-group select option:checked {
    font-weight: 600;
}


/* ========== СТИЛИ СТРАНИЦЫ ТЕМЫ (TOPIC.PHP) ========== */

/* Заголовок темы */
.topic-header {
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.8) 0%, rgba(20, 20, 30, 0.9) 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.topic-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.topic-title {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 15px;
    line-height: 1.3;
}

.topic-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
}

.topic-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.topic-meta i {
    color: #60a5fa;
}

.topic-meta a {
    color: #60a5fa;
    text-decoration: none;
    transition: color 0.2s;
}

.topic-meta a:hover {
    color: #93c5fd;
}

/* Карточки постов */
.post-card {
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.8) 0%, rgba(20, 20, 30, 0.9) 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    transition: all 0.3s ease;
}

.post-card:hover {
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.1);
}

/* Автор поста */
.post-author {
    min-width: 140px;
    max-width: 140px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.post-author img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 2px solid rgba(59, 130, 246, 0.3);
    margin-bottom: 8px;
    object-fit: cover;
    transition: all 0.3s ease;
}

.post-author img:hover {
    border-color: #60a5fa;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

.post-author strong {
    display: block;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
    word-break: break-word;
}

.post-author > div:last-child {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    padding: 3px 10px;
    background: rgba(59, 130, 246, 0.15);
    border-radius: 10px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    white-space: nowrap;
}

/* Контент поста */
.post-content {
    flex: 1;
    color: rgba(255,255,255,0.85);
    min-width: 0;
}

.post-content > div:first-child {
    line-height: 1.7;
    font-size: 0.95rem;
    word-wrap: break-word;
    word-break: break-word;
    margin-bottom: 12px;
    white-space: pre-wrap;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.4);
    font-size: 0.85rem;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.post-meta i {
    color: #60a5fa;
}

/* Форма ответа */
.reply-form {
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.8) 0%, rgba(20, 20, 30, 0.9) 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 30px;
    margin-top: 30px;
}

.reply-form h3 {
    color: #fff;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.reply-form h3 i {
    color: #60a5fa;
}

.reply-form p {
    color: rgba(255,255,255,0.6);
    font-size: 1rem;
    margin: 0;
}

.reply-form p a {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.reply-form p a:hover {
    color: #93c5fd;
}

.reply-form textarea {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    background: rgba(12, 12, 13, 0.6);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    transition: all 0.3s ease;
}

.reply-form textarea:focus {
    outline: none;
    border-color: #60a5fa;
    background: rgba(12, 12, 13, 0.8);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.reply-form textarea::placeholder {
    color: rgba(255,255,255,0.3);
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    background: rgba(255,255,255,0.1);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Пагинация */
.forum-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 30px 0;
}

.forum-pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 15px;
    background: rgba(30, 30, 40, 0.8);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.forum-pagination .page-link:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: #60a5fa;
    color: #fff;
    transform: translateY(-2px);
}

.forum-pagination .page-link.active {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    border-color: #60a5fa;
    color: #fff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

/* Breadcrumb */
.forum-breadcrumb {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
}

.forum-breadcrumb a {
    color: #60a5fa;
    text-decoration: none;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.forum-breadcrumb a:hover {
    color: #93c5fd;
}

.forum-breadcrumb i.fa-chevron-right {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.3);
}

/* Адаптивность */
@media (max-width: 768px) {
    .post-card {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }
    
    .post-author {
        min-width: auto;
        max-width: none;
        flex-direction: row;
        text-align: left;
        gap: 12px;
        align-items: center;
    }
    
    .post-author img {
        width: 50px;
        height: 50px;
        margin-bottom: 0;
    }
    
    .post-author > div {
        text-align: left;
    }
    
    .topic-title {
        font-size: 1.5rem;
    }
    
    .topic-meta {
        gap: 15px;
        font-size: 0.85rem;
    }
    
    .reply-form {
        padding: 20px;
    }
    
    .reply-form textarea {
        min-height: 120px;
    }
}


/* ========== ВЛОЖЕНИЯ В ПОСТАХ ========== */

.post-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 15px 0;
}

.attachment-image {
    display: block;
    max-width: 300px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(59, 130, 246, 0.2);
    transition: all 0.3s ease;
}

.attachment-image:hover {
    border-color: #60a5fa;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
    transform: scale(1.02);
}

.attachment-image img {
    width: 100%;
    height: auto;
    display: block;
}

.attachment-file {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    color: #60a5fa;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.attachment-file:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: #60a5fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

.attachment-file i {
    font-size: 1.1rem;
}

/* ========== АНИМАЦИЯ НОВЫХ ПОСТОВ ========== */

.post-card.new-post {
    animation: slideInPost 0.5s ease-out;
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
}

@keyframes slideInPost {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Плавный переход после анимации */
.post-card {
    transition: all 0.3s ease;
}


/* ========== ЗАГРУЗКА ФАЙЛОВ В ФОРМЕ ОТВЕТА ========== */

.file-upload-section {
    margin: 15px 0;
}

.file-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 10px;
    color: #60a5fa;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-label:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: #60a5fa;
    transform: translateY(-1px);
}

.file-upload-label i {
    font-size: 1rem;
}

.file-info {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
    margin-left: 5px;
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(30, 30, 40, 0.6);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.file-item:hover {
    background: rgba(30, 30, 40, 0.8);
    border-color: rgba(59, 130, 246, 0.2);
}

.file-item i {
    color: #60a5fa;
    font-size: 1.1rem;
}

.file-name {
    flex: 1;
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    color: rgba(255,255,255,0.5);
    font-size: 0.8rem;
}

.remove-file {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.remove-file:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    transform: scale(1.1);
}

.remove-file i {
    font-size: 0.85rem;
}

/* Адаптивность для загрузки файлов */
@media (max-width: 768px) {
    .file-upload-label {
        width: 100%;
        justify-content: center;
    }
    
    .file-item {
        flex-wrap: wrap;
    }
    
    .file-name {
        flex-basis: 100%;
        margin-bottom: 5px;
    }
}