/* Основные переменные в стиле CroudQuick */
:root {
    --primary-color: #87CEEB;
    --primary-dark: #5FA8D3;
    --primary-light: #B0E0F6;
    --text-dark: #333;
    --text-light: #666;
    --text-muted: #999;
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ========== Навигация в стиле лендинга ========== */
.forum-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(135, 206, 235, 0.25);
}

.forum-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.forum-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-dark);
}

.forum-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(95, 168, 211, 0.35);
}

.forum-brand-text {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.forum-nav-links {
    display: flex;
    gap: 8px;
}

.forum-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-light);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.forum-nav-link:hover {
    background: rgba(135, 206, 235, 0.1);
    color: var(--primary-dark);
}

.forum-nav-link.active {
    background: rgba(135, 206, 235, 0.15);
    color: var(--primary-dark);
}

.forum-nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.forum-nav-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1.5px solid rgba(95, 168, 211, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
    text-decoration: none;
    transition: all 0.2s;
}

.forum-nav-icon:hover {
    background: #f8fcff;
    border-color: rgba(95, 168, 211, 0.5);
}

.forum-btn {
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.forum-btn-outline {
    background: #fff;
    border: 1.5px solid rgba(95, 168, 211, 0.4);
    color: var(--primary-dark);
}

.forum-btn-outline:hover {
    background: #f4fbff;
}

.forum-btn-main {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    border: none;
    box-shadow: 0 4px 14px rgba(95, 168, 211, 0.35);
}

.forum-btn-main:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(95, 168, 211, 0.4);
}

.forum-profile-menu { position: relative; }

.forum-profile-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border: 1.5px solid rgba(95, 168, 211, 0.35);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.forum-avatar-sm {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.forum-profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: #fff;
    border: 1px solid rgba(95, 168, 211, 0.25);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    padding: 8px;
    display: none;
    z-index: 200;
}

.forum-profile-dropdown.show { display: block; }

.forum-profile-dropdown-header {
    display: flex;
    gap: 12px;
    padding: 12px;
}

.forum-avatar-md {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.forum-profile-name { font-weight: 600; color: var(--text-dark); }
.forum-profile-username { font-size: 13px; color: var(--text-muted); }
.forum-profile-divider { height: 1px; background: var(--border-color); margin: 6px 0; }

.forum-profile-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 14px;
    transition: all 0.2s;
}

.forum-profile-item:hover {
    background: linear-gradient(135deg, rgba(135, 206, 235, 0.1), rgba(176, 224, 246, 0.1));
}

.forum-profile-item.admin { color: #f59e0b; font-weight: 600; }
.forum-profile-item.logout { color: #ef4444; }

.forum-hamburger {
    display: none;
    width: 40px;
    height: 40px;
    border: 1.5px solid rgba(95, 168, 211, 0.35);
    background: #fff;
    border-radius: 10px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.forum-mobile-menu {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(135, 206, 235, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 16px 20px;
    z-index: 99;
    flex-direction: column;
    gap: 8px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s, opacity 0.3s;
}

.forum-mobile-menu.active {
    display: flex;
    max-height: 500px;
    opacity: 1;
}

.forum-mobile-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
}

.forum-mobile-link:hover { background: rgba(135, 206, 235, 0.1); }
.forum-mobile-divider { height: 1px; background: var(--border-color); margin: 8px 0; }
.forum-mobile-lang { margin-top: 8px; }

/* Переключатель языка */
.forum-lang-switch { position: relative; display: inline-block; }

.forum-lang-toggle {
    height: 38px;
    border: 1.5px solid rgba(95, 168, 211, 0.35);
    border-radius: 10px;
    background: #fff;
    color: var(--text-dark);
    font-size: 13px;
    font-weight: 700;
    padding: 0 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: space-between;
}

.forum-lang-toggle:hover { background: #f8fcff; border-color: rgba(95, 168, 211, 0.5); }

.forum-lang-toggle .fi { width: 18px; height: 14px; border-radius: 2px; }

.forum-lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 160px;
    background: #fff;
    border: 1px solid rgba(95, 168, 211, 0.25);
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    padding: 6px;
    display: none;
    z-index: 120;
}

.forum-lang-switch.open .forum-lang-menu { display: block; }

.forum-lang-option {
    width: 100%;
    border: 0;
    background: transparent;
    border-radius: 8px;
    padding: 9px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
}

.forum-lang-option:hover { background: #f3f9ff; }
.forum-lang-option.active { background: #e9f5ff; color: var(--primary-dark); }

@media (max-width: 768px) {
    .forum-nav-links { display: none; }
    .forum-hamburger { display: flex; }
    .forum-nav-actions .forum-profile-menu,
    .forum-nav-actions .forum-btn { display: none; }
}

@media (min-width: 769px) {
    .forum-mobile-menu { display: none !important; }
}

/* Форумная раскладка */
.forum-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    margin-top: 20px;
}

.forum-main {
    min-height: 400px;
}

.forum-sidebar {
    position: sticky;
    top: 88px;
    height: fit-content;
}

/* Хлебные крошки — на всю ширину grid */
.breadcrumbs {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 0 25px 0;
    font-size: 14px;
    flex-wrap: wrap;
}

.breadcrumb-item {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb-item:hover {
    color: var(--primary-color);
}

.breadcrumb-item.active {
    color: var(--text-dark);
    font-weight: 600;
}

.breadcrumb-separator {
    color: var(--text-muted);
}

/* Категории */
.category-block {
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    overflow: hidden;
}

.category-header {
    padding: 20px;
    border-left: 4px solid var(--primary-color);
    background: linear-gradient(135deg, rgba(135, 206, 235, 0.05), rgba(176, 224, 246, 0.05));
}

.category-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.category-icon {
    font-size: 24px;
}

.category-title h2 {
    margin: 0;
    font-size: 22px;
    color: var(--text-dark);
}

.category-description {
    margin: 0;
    color: var(--text-light);
    font-size: 14px;
}

/* Разделы */
.sections-list {
    display: flex;
    flex-direction: column;
}

.section-item {
    display: grid;
    grid-template-columns: 50px 1fr 90px 200px;
    gap: 24px;
    align-items: center;
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    transition: background 0.3s;
}

.section-item:hover {
    background: var(--bg-light);
}

.section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(135, 206, 235, 0.1), rgba(176, 224, 246, 0.1));
    flex-shrink: 0;
}

.section-icon i {
    font-size: 24px;
}

.section-info {
    flex: 1;
}

.section-title {
    margin: 0 0 5px 0;
    font-size: 18px;
}

.section-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s;
}

.section-title a:hover {
    color: var(--primary-color);
}

.section-description {
    margin: 0;
    color: var(--text-light);
    font-size: 13px;
}

.section-stats {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    min-width: 90px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-muted);
    font-size: 14px;
}

.stat-item i {
    color: var(--primary-color);
}

.section-last-post {
    min-width: 200px;
    text-align: right;
}

.last-post-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-end;
    text-align: right;
}

.last-post-title {
    color: var(--text-dark);
    font-size: 13px;
    text-decoration: none;
    font-weight: 500;
}

.last-post-title:hover {
    color: var(--primary-color);
}

.last-post-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-light);
}

.last-post-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.last-post-time {
    color: var(--text-muted);
}

.no-posts {
    color: var(--text-muted);
    font-size: 13px;
    font-style: italic;
}

/* Заголовок страницы раздела */
.section-page-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 50%, rgba(135, 206, 235, 0.08) 100%);
    border-radius: 16px;
    padding: 28px 32px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(135, 206, 235, 0.2);
}

.section-page-header-content {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.section-page-header-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(135, 206, 235, 0.35);
    flex-shrink: 0;
}

.section-page-header-icon i {
    font-size: 28px;
    color: white;
}

.section-page-header-text {
    flex: 1;
    min-width: 0;
}

.section-page-header-text h1 {
    margin: 0 0 6px 0;
    font-size: 26px;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.3px;
    line-height: 1.3;
}

.section-page-description {
    margin: 0;
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.5;
}

.section-create-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    color: white;
    text-decoration: none;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    box-shadow: 0 4px 14px rgba(135, 206, 235, 0.4);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.section-create-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(135, 206, 235, 0.45);
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    color: white;
}

.section-create-btn:active {
    transform: translateY(0);
}

.section-create-btn i {
    font-size: 14px;
}

@media (max-width: 768px) {
    .section-page-header {
        padding: 20px;
    }
    
    .section-page-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .section-page-header-text h1 {
        font-size: 22px;
    }
    
    .section-create-btn {
        width: 100%;
    }
}

/* Сайдбар карточки */
.sidebar-card {
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-card h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-card h3 i {
    color: var(--primary-color);
}

/* Блок поиска на главной — выделенный */
.sidebar-search-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(248, 252, 255, 1));
    border: 1px solid rgba(135, 206, 235, 0.3);
    box-shadow: 0 4px 20px rgba(95, 168, 211, 0.15), 0 0 0 1px rgba(135, 206, 235, 0.08);
}

.sidebar-search-card h3 {
    color: var(--primary-dark);
}

/* Форма поиска */
.search-form {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.search-form .input {
    flex: 1;
    min-height: 42px;
    border-radius: 10px;
    border: 1.5px solid rgba(95, 168, 211, 0.35);
    padding: 10px 14px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-form .input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(135, 206, 235, 0.2);
}

.search-form .btn-primary {
    padding: 0 20px;
    min-height: 42px;
    border-radius: 10px;
    font-weight: 600;
}

/* Быстрые действия */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-light);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
}

.quick-action-btn:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-color: var(--primary-color);
    transform: translateX(4px);
}

.quick-action-btn i {
    color: var(--primary-color);
    font-size: 16px;
}

/* Последние темы в сайдбаре */
.recent-topics-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recent-topic-item {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.recent-topic-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.recent-topic-title {
    display: block;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.recent-topic-title:hover {
    color: var(--primary-color);
}

.recent-topic-title:hover {
    color: var(--primary-color);
}

.recent-topic-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 11px;
    color: var(--text-muted);
}

.recent-topic-section {
    display: flex;
    align-items: center;
    gap: 4px;
}

.recent-topic-section i {
    color: var(--primary-color);
}

/* Страница ошибки */
.error-page {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin: 40px 0;
}

.error-icon {
    font-size: 80px;
    color: #ff4757;
    margin-bottom: 20px;
}

.error-page h1 {
    font-size: 32px;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.error-message {
    color: var(--text-light);
    font-size: 16px;
    margin-bottom: 30px;
}

.error-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Адаптивность */
@media (max-width: 968px) {
    .forum-layout {
        grid-template-columns: 1fr;
    }
    
    .forum-sidebar {
        position: static;
        order: -1;
    }
    
    .section-item {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .section-stats,
    .section-last-post {
        justify-self: start;
    }
    
    .stats-items {
        flex-direction: row;
        gap: 30px;
        align-items: center;
        padding: 0 15px;
    }
    
    .stat-item {
        font-size: 14px;
        padding: 6px 12px;
    }
    
    .stat-item i {
        font-size: 18px;
    }
    
    .stat-item span {
        font-size: 15px;
    }
}

@media (max-width: 600px) {
    .category-header {
        padding: 15px;
    }
    
    .category-title h2 {
        font-size: 18px;
    }
    
    .section-item {
        padding: 15px;
    }
    
    .section-icon {
        width: 40px;
        height: 40px;
    }
    
    .section-icon i {
        font-size: 20px;
    }
    
    .error-page {
        padding: 40px 15px;
    }
    
    .error-icon {
        font-size: 60px;
    }
    
    .error-page h1 {
        font-size: 24px;
    }
    
    .error-actions {
        flex-direction: column;
    }
    
    .error-actions .btn-primary,
    .error-actions .btn-secondary {
        width: 100%;
    }
}

/* ============================================
   Страница поиска
   ============================================ */

.search-page {
    padding: 30px 0 60px;
}

.search-header {
    margin-bottom: 35px;
}

.search-header h1 {
    font-size: 28px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.search-header h1 i {
    color: var(--primary-color);
}

.search-form {
    margin-bottom: 45px;
}

.search-form-card {
    background: white;
    border-radius: 16px;
    padding: 28px 32px;
    box-shadow: var(--shadow);
    width: 100%;
    box-sizing: border-box;
}

.search-input-row {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.search-input {
    flex: 1;
    padding: 14px 20px;
    font-size: 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(135, 206, 235, 0.2);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-submit-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    white-space: nowrap;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.search-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(135, 206, 235, 0.4);
}

.search-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.search-filter-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-filter-item label {
    font-size: 14px;
    color: var(--text-muted);
}

/* =================================================================
   Custom Select — кастомные выпадающие списки (стиль основного сайта)
   ================================================================= */

.custom-select {
    position: relative;
    width: 100%;
    min-width: 140px;
}

.custom-select-trigger {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid rgba(95, 168, 211, 0.35);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-sizing: border-box;
    cursor: pointer;
    background: linear-gradient(to bottom, #ffffff 0%, #fafbff 100%);
    color: var(--text-dark);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    position: relative;
}

.custom-select-trigger:hover {
    border-color: rgba(95, 168, 211, 0.55);
    background: linear-gradient(to bottom, #fafbff 0%, #f0f9ff 100%);
    box-shadow: 0 2px 6px rgba(95, 168, 211, 0.15);
}

.custom-select-trigger.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(135, 206, 235, 0.25);
    background: linear-gradient(to bottom, #f0f9ff 0%, #e0f2fe 100%);
}

.custom-select-trigger .placeholder {
    flex: 1;
    text-align: left;
}

.custom-select-trigger .arrow {
    position: absolute;
    right: 12px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.custom-select-trigger.active .arrow {
    transform: rotate(180deg);
}

.custom-select-options {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    max-height: 260px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.custom-select-options.active {
    display: block;
    animation: customSelectSlideDown 0.2s ease;
}

@keyframes customSelectSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.custom-select-option {
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.15s ease;
    font-size: 14px;
    color: var(--text-dark);
    text-align: left;
}

.custom-select-option:hover {
    background: rgba(135, 206, 235, 0.1);
}

.custom-select-option.selected {
    background: rgba(135, 206, 235, 0.15);
    font-weight: 500;
}

.custom-select-options::-webkit-scrollbar {
    width: 6px;
}

.custom-select-options::-webkit-scrollbar-thumb {
    background: rgba(135, 206, 235, 0.5);
    border-radius: 3px;
}

/* Стили для search-filters (компактные) */
.search-filters .custom-select {
    min-width: 160px;
}

.search-input-group {
    display: flex;
    gap: 12px;
}

.search-input-group .btn,
.search-input-group .btn-primary {
    padding: 14px 28px;
    white-space: nowrap;
    border-radius: 10px;
}

.search-results-header {
    margin-bottom: 25px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
}

.search-results-header h2 {
    font-size: 20px;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.results-count {
    color: var(--primary-color);
    font-weight: 600;
}

.search-query {
    font-size: 15px;
    color: var(--text-muted);
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-result-item {
    background: white;
    border-radius: 12px;
    padding: 22px 24px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.search-result-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

.result-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 20px;
}

.topic-result .result-icon {
    background: linear-gradient(135deg, rgba(135, 206, 235, 0.2), rgba(95, 168, 211, 0.2));
    color: var(--primary-dark);
}

.post-result .result-icon {
    background: linear-gradient(135deg, rgba(176, 224, 246, 0.3), rgba(135, 206, 235, 0.2));
    color: var(--primary-dark);
}

.result-content {
    flex: 1;
    min-width: 0;
}

.result-type {
    display: inline-block;
    padding: 4px 10px;
    background: var(--bg-light);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.result-title {
    font-size: 18px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.result-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.2s;
}

.result-title a:hover {
    color: var(--primary-color);
}

.result-excerpt {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.result-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.result-meta i {
    color: var(--primary-color);
    font-size: 12px;
}

.result-meta a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s;
}

.result-meta a:hover {
    color: var(--primary-color);
}

.empty-results {
    text-align: center;
    padding: 50px 24px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.empty-results > i {
    font-size: 64px;
    color: var(--primary-color);
    opacity: 0.5;
    margin-bottom: 24px;
    display: block;
}

.empty-results h3 {
    font-size: 22px;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.empty-results p {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 28px;
}

.search-tips {
    max-width: 480px;
    margin: 0 auto;
    text-align: left;
    background: var(--bg-light);
    padding: 20px 24px;
    border-radius: 12px;
}

.search-tips h4 {
    font-size: 15px;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.search-tips ul {
    list-style: none;
    padding: 0;
}

.search-tips li {
    padding: 6px 0;
    color: var(--text-muted);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-tips li:before {
    content: "→";
    color: var(--primary-color);
    font-weight: 600;
}

.search-empty {
    text-align: center;
    padding: 60px 24px;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.search-empty > i {
    font-size: 72px;
    color: var(--primary-color);
    opacity: 0.4;
    margin-bottom: 24px;
    display: block;
}

.search-empty h3 {
    font-size: 24px;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.search-empty p {
    font-size: 16px;
    color: var(--text-muted);
}

.search-page .pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 35px;
}

.search-page .pagination-btn,
.search-page .page-link {
    padding: 10px 18px;
    border-radius: 8px;
    background: var(--bg-light);
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.search-page .pagination-btn:hover,
.search-page .page-link:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.search-page .pagination-page,
.search-page .page-number {
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--bg-light);
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.search-page .pagination-page:hover,
.search-page .page-number:hover {
    background: var(--primary-light);
}

.search-page .pagination-page.active,
.search-page .page-number.active {
    background: var(--primary-color);
    color: white;
}

.search-page .pagination-ellipsis,
.search-page .page-ellipsis {
    padding: 0 6px;
    color: var(--text-muted);
}

/* Адаптивность для поиска */
@media (max-width: 768px) {
    .search-page {
        padding: 20px 0 40px;
    }
    
    .search-header h1 {
        font-size: 22px;
    }
    
    .search-form-card {
        padding: 20px;
    }
    
    .search-input-row,
    .search-input-group {
        flex-direction: column;
    }
    
    .search-submit-btn,
    .search-input-group .btn,
    .search-input-group .btn-primary {
        width: 100%;
        justify-content: center;
    }
    
    .search-filters {
        flex-direction: column;
        gap: 12px;
    }
    
    .search-filters .custom-select {
        min-width: 100%;
    }
    
    .search-result-item {
        flex-direction: column;
        gap: 16px;
        padding: 18px;
    }
    
    .result-icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    
    .result-title {
        font-size: 16px;
    }
    
    .result-meta {
        gap: 10px;
        font-size: 13px;
    }
}

/* =================================================================
   СОЗДАНИЕ ТЕМЫ
   ================================================================= */

.create-topic-page {
    margin-top: 0;
}

.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 32px;
    color: var(--text-dark);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-header h1 i {
    color: var(--primary-color);
}

.page-description {
    font-size: 16px;
    color: var(--text-muted);
}

.topic-form {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.topic-form .form-group {
    margin-bottom: 25px;
}

.topic-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 15px;
}

.topic-form .required {
    color: #ef4444;
}

.topic-form .form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s;
    box-sizing: border-box;
}

.topic-form .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(135, 206, 235, 0.1);
}

.topic-form textarea.form-control {
    resize: vertical;
    min-height: 200px;
    line-height: 1.6;
}

.topic-form .form-text {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.form-actions .btn-primary,
.form-actions .btn-secondary {
    padding: 12px 24px;
    font-size: 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.3s;
}

.form-actions .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

/* Адаптивность */
@media (max-width: 768px) {
    .topic-form {
        padding: 20px;
    }
    
    .page-header h1 {
        font-size: 24px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn-primary,
    .form-actions .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* =================================================================
   СТРАНИЦА ТЕМЫ
   ================================================================= */

.topic-page {
    max-width: 1200px;
    margin: 0 auto;
}

.topic-header {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.topic-header h1 {
    font-size: 28px;
    color: var(--text-dark);
    margin-bottom: 15px;
    line-height: 1.4;
}

.topic-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.topic-actions-header {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.topic-stats-inline {
    display: flex;
    gap: 20px;
    color: var(--text-muted);
    font-size: 14px;
}

.topic-stats-inline i {
    color: var(--primary-color);
}

/* Посты */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.post-item {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: 200px 1fr;
    overflow: hidden;
}

.post-author {
    background: linear-gradient(135deg, rgba(135, 206, 235, 0.05), rgba(176, 224, 246, 0.05));
    padding: 20px;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    display: block;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), #5FA8D3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 600;
}

.author-info {
    text-align: center;
}

.author-name {
    font-weight: 600;
    color: var(--text-dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    justify-content: center;
}

.author-name:hover {
    color: var(--primary-color);
}

.author-stats {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 5px;
}

.verified {
    color: #4A9FD8;
    font-size: 14px;
}

.post-content-wrapper {
    padding: 20px 25px;
}

.post-header-small {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 13px;
    color: var(--text-muted);
}

.post-edited {
    font-style: italic;
}

.post-content {
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 15px;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
    display: block;
}

/* Форматирование из редактора (заголовки, выравнивание, размер и т.д.) */
.post-content h1 { font-size: 1.75em; margin: 0.75em 0 0.4em; font-weight: 700; }
.post-content h2 { font-size: 1.4em; margin: 0.6em 0 0.35em; font-weight: 600; }
.post-content h3 { font-size: 1.2em; margin: 0.5em 0 0.3em; font-weight: 600; }
.post-content .ql-align-center { text-align: center; }
.post-content .ql-align-right { text-align: right; }
.post-content .ql-align-justify { text-align: justify; }
.post-content .ql-indent-1 { padding-left: 2em; }
.post-content .ql-indent-2 { padding-left: 4em; }
.post-content .ql-indent-3 { padding-left: 6em; }
.post-content .ql-indent-4 { padding-left: 8em; }
.post-content .ql-indent-5 { padding-left: 10em; }
.post-content .ql-indent-6 { padding-left: 12em; }
.post-content .ql-indent-7 { padding-left: 14em; }
.post-content .ql-indent-8 { padding-left: 16em; }
.post-content .ql-size-small { font-size: 0.85em; }
.post-content .ql-size-large { font-size: 1.2em; }
.post-content .ql-size-huge { font-size: 1.5em; }
.post-content code { background: var(--bg-light); padding: 0.2em 0.4em; border-radius: 4px; font-size: 0.9em; }
.post-content pre.ql-syntax, .post-content .ql-code-block { background: #1e1e1e; color: #d4d4d4; padding: 1em; border-radius: 8px; overflow-x: auto; margin: 0.8em 0; }

.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.post-likes {
    display: flex;
    gap: 10px;
}

.like-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    transition: all 0.3s;
    font-size: 14px;
}

.like-btn:hover {
    background: var(--hover-bg);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.like-btn.active {
    background: linear-gradient(135deg, rgba(135, 206, 235, 0.1), rgba(176, 224, 246, 0.1));
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.like-count {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 14px;
}

.post-buttons {
    display: flex;
    gap: 15px;
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    transition: color 0.3s;
}

.btn-text:hover {
    color: var(--primary-color);
}

.btn-text.text-danger:hover {
    color: #ef4444;
}

/* Форма ответа */
.reply-form-wrapper {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-top: 20px;
    box-shadow: var(--shadow);
}

.reply-form-wrapper h3 {
    margin-bottom: 15px;
    color: var(--text-dark);
}

.reply-form textarea {
    width: 100%;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.3s;
}

.reply-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(135, 206, 235, 0.1);
}

/* Форма редактирования поста (inline) */
.edit-form {
    margin-top: 10px;
    padding: 16px;
    background: var(--bg-light);
    border-radius: 8px;
    border: 2px solid var(--border-color);
}

.edit-form textarea,
.edit-form .ql-editor {
    width: 100%;
    min-height: 120px;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.6;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s;
}

.edit-form textarea:focus,
.edit-form .ql-container.ql-snow:focus-within {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(135, 206, 235, 0.15);
}

.edit-form .form-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

/* Quill editor wrapper */
.quill-editor-wrapper {
    margin-bottom: 15px;
}

.quill-editor-wrapper .ql-toolbar.ql-snow {
    border: 2px solid var(--border-color);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    background: #fafafa;
}

.quill-editor-wrapper .ql-container.ql-snow {
    border: 2px solid var(--border-color);
    border-radius: 0 0 8px 8px;
    min-height: 200px;
    font-size: 15px;
}

.quill-editor-wrapper .ql-editor {
    min-height: 200px;
}

.quill-editor-wrapper .ql-editor.ql-blank::before {
    color: var(--text-muted);
    font-style: normal;
}

/* Убираем невидимые отступы у картинок в редакторе (baseline gap) */
.quill-editor-wrapper .ql-editor img,
.edit-form .ql-editor img {
    display: block;
    vertical-align: bottom;
    margin: 0;
}

.reply-form .quill-editor-wrapper .ql-container.ql-snow,
.reply-form .quill-editor-wrapper .ql-editor {
    min-height: 150px;
}

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

/* Адаптивность для темы */
@media (max-width: 968px) {
    .post-item {
        grid-template-columns: 1fr;
    }
    
    .post-author {
        flex-direction: row;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .author-avatar {
        width: 50px;
        height: 50px;
    }
    
    .author-info {
        text-align: left;
    }
    
    .avatar-placeholder {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .topic-header {
        padding: 20px;
    }
    
    .topic-header h1 {
        font-size: 22px;
    }
    
    .topic-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .post-content-wrapper {
        padding: 15px;
    }
    
    .post-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .reply-form-wrapper {
        padding: 20px;
    }
}

/* =================================================================
   СПИСОК ТЕМ В РАЗДЕЛЕ
   ================================================================= */

.topics-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.topic-item {
    background: white;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: 50px 1fr 90px 200px;
    gap: 24px;
    align-items: center;
    transition: all 0.3s;
}

.topic-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.topic-item.pinned {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), rgba(251, 191, 36, 0.05));
    border-left: 4px solid #f59e0b;
}

.topic-item.locked {
    opacity: 0.7;
}

.topic-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(135, 206, 235, 0.1), rgba(176, 224, 246, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary-color);
}

.topic-item.pinned .topic-icon {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(251, 191, 36, 0.1));
    color: #f59e0b;
}

.topic-item.locked .topic-icon {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.1), rgba(156, 163, 175, 0.1));
    color: #6b7280;
}

.topic-content {
    flex: 1;
    min-width: 0;
}

.topic-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
}

.topic-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s;
}

.topic-title a:hover {
    color: var(--primary-color);
}

.topic-title .badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-secondary {
    background: #e5e7eb;
    color: #4b5563;
}

.topic-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    color: var(--text-muted);
}

.topic-author {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
}

.topic-author:hover {
    color: var(--primary-color);
}

.topic-author img,
.topic-author .avatar-placeholder {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.topic-author .avatar-placeholder {
    background: linear-gradient(135deg, var(--primary-color), #5FA8D3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.topic-author .verified {
    color: #4A9FD8;
    font-size: 14px;
}

.topic-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.topic-stats {
    display: flex;
    gap: 20px;
    justify-content: center;
    min-width: 90px;
}

.topic-stats .stat {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 14px;
}

.topic-stats .stat i {
    color: var(--primary-color);
}

.topic-last-post {
    min-width: 200px;
    text-align: right;
}


.last-post-info a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.3s;
}

.last-post-info a:hover {
    color: var(--primary-color);
}

.last-post-date {
    display: flex;
    align-items: center;
    gap: 5px;
    justify-content: flex-end;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.empty-state > i {
    font-size: 64px;
    color: var(--primary-color);
    opacity: 0.5;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 24px;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 25px;
}

/* Список сообщений (Мои сообщения) */
.posts-list-compact {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.post-item-compact {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: white;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: var(--shadow);
    transition: all 0.2s;
}

.post-item-compact:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.post-item-compact-content {
    flex: 1;
    min-width: 0;
}

.post-item-compact-topic {
    font-size: 17px;
    margin-bottom: 8px;
    line-height: 1.3;
}

.post-item-compact-topic a {
    color: var(--text-dark);
    text-decoration: none;
}

.post-item-compact-topic a:hover {
    color: var(--primary-color);
}

.post-item-compact-excerpt {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 10px;
}

.post-item-compact-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.post-item-compact-meta i {
    color: var(--primary-color);
    margin-right: 4px;
}

.post-item-compact-link {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--primary-color);
    transition: all 0.2s;
}

.post-item-compact-link:hover {
    background: rgba(135, 206, 235, 0.2);
}

/* Адаптивность для списка тем */
@media (max-width: 1200px) {
    .topic-item {
        grid-template-columns: 50px 1fr 90px;
    }
    
    .topic-last-post {
        display: none;
    }
}

@media (max-width: 768px) {
    .topic-item {
        grid-template-columns: 40px 1fr;
        padding: 15px;
        gap: 12px;
    }
    
    .topic-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .topic-title {
        font-size: 16px;
    }
    
    .topic-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .topic-stats {
        grid-column: 1 / -1;
        justify-content: flex-start;
        padding-top: 12px;
        border-top: 1px solid var(--border-color);
        margin-top: 8px;
    }
    
    .empty-state {
        padding: 40px 20px;
    }
    
    .empty-state > i {
        font-size: 48px;
    }
    
    .empty-state h3 {
        font-size: 20px;
    }
    
    .post-item-compact {
        flex-direction: column;
        padding: 16px;
        gap: 12px;
    }
    
    .post-item-compact-link {
        align-self: flex-end;
    }
}

/* =================================================================
   ПРОФИЛЬ ПОЛЬЗОВАТЕЛЯ
   ================================================================= */

.profile-page {
    max-width: 1200px;
    margin: 0 auto;
}

.profile-header {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 30px;
    align-items: center;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.profile-avatar-large {
    flex-shrink: 0;
}

.profile-avatar-large img,
.avatar-placeholder-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-placeholder-large {
    background: linear-gradient(135deg, var(--primary-color), #5FA8D3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 600;
}

.profile-info {
    flex: 1;
}

.profile-info h1 {
    font-size: 32px;
    color: var(--text-dark);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-bio {
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.profile-meta {
    display: flex;
    gap: 20px;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

.profile-meta i {
    color: var(--primary-color);
}

.profile-actions {
    display: flex;
    gap: 12px;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.profile-page .stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.profile-page .stat-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-hover);
}

.profile-page .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-page .stat-icon i {
    font-size: 24px;
    color: white !important;
}

.profile-page .stat-info {
    flex: 1;
    min-width: 0;
}

.profile-page .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
}

.profile-page .stat-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 2px;
}

.profile-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.content-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.content-section h2 {
    font-size: 22px;
    color: var(--text-dark);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.content-section h2 i {
    color: var(--primary-color);
}

.profile-topics-list,
.profile-posts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-topic-item {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 16px;
    align-items: center;
    padding: 16px 20px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: all 0.3s;
}

.profile-topic-item:hover {
    border-color: var(--primary-color);
    background: rgba(135, 206, 235, 0.05);
}

.topic-icon-small {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white !important;
    font-size: 18px;
    flex-shrink: 0;
}

.profile-topic-item.pinned .topic-icon-small {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.profile-topic-item.locked .topic-icon-small {
    background: linear-gradient(135deg, #6b7280, #4b5563);
}

.topic-info-small {
    flex: 1;
}

.topic-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    display: block;
    margin-bottom: 8px;
    transition: color 0.3s;
}

.topic-link:hover {
    color: var(--primary-color);
}

.topic-details {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.topic-details i {
    color: var(--primary-color);
}

.profile-post-item {
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: all 0.3s;
}

.post-details a {
    color: var(--primary-color);
    text-decoration: none;
}

.post-details a:hover {
    text-decoration: underline;
}

.profile-post-item:hover {
    border-color: var(--primary-color);
    background: rgba(135, 206, 235, 0.05);
}

.post-content-preview {
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 12px;
}

.post-details {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.post-details a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.post-details a:hover {
    text-decoration: underline;
}

.post-details i {
    color: var(--primary-color);
}

.no-content {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-style: italic;
}

/* Адаптивность профиля */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 25px;
    }
    
    .profile-info h1 {
        font-size: 24px;
        justify-content: center;
    }
    
    .profile-meta {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .profile-actions {
        justify-content: center;
    }
    
    .profile-stats {
        grid-template-columns: 1fr;
    }
    
    .profile-page .stat-card {
        padding: 20px;
    }
    
    .content-section {
        padding: 20px;
    }
    
    .content-section h2 {
        font-size: 18px;
    }
    
    .profile-topic-item {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .topic-icon-small {
        justify-self: start;
    }
}

/* =================================================================
   СТРАНИЦЫ МОИ ТЕМЫ / ПОДПИСКИ
   ================================================================= */

.page-header-simple {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
}

.page-header-simple h1 {
    font-size: 28px;
    color: var(--text-dark);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-header-simple h1 i {
    color: var(--primary-color);
}

.page-header-simple p {
    color: var(--text-muted);
    font-size: 15px;
    margin: 0;
}

.topic-actions-inline {
    display: flex;
    gap: 10px;
    align-items: center;
}

@media (max-width: 1200px) {
    .topic-item .topic-actions-inline {
        display: none;
    }
}

@media (max-width: 768px) {
    .page-header-simple {
        padding: 20px;
    }
    
    .page-header-simple h1 {
        font-size: 22px;
    }
}

/* Ресайз картинок в редакторе */
.forum-img-resize-overlay {
    position: absolute;
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    pointer-events: none;
    box-sizing: border-box;
    z-index: 9999;
}

.forum-img-resize-overlay .forum-img-resize-handle {
    pointer-events: auto;
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border: 2px solid white;
    border-radius: 4px;
    cursor: se-resize;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.forum-img-resize-overlay .forum-img-resize-handle:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
}

