:root {
    --primary-color: #3366FF;
    --header-height: 70px;
    --footer-height: 60px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    margin: 0;
    padding-top: var(--header-height);
    padding-bottom: var(--footer-height);
    min-height: 100vh;
    position: relative;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.logo-container {
    display: flex;
    align-items: center;
    margin-right: 30px;
}

.logo {
    height: 36px;
    margin-right: 10px;
}

.site-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
}

.user-menu {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
    border: 2px solid #eee;
}

.user-name {
    margin-right: 10px;
}

.search-section {
    background-color: white;
    padding: 50px 0 40px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.search-box {
    max-width: 700px;
    margin: 0 auto;
}

.main-content {
    padding-bottom: 40px;
}

.category-card {
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.category-title {
    color: var(--primary-color);
}

.question-list {
    margin-top: 15px;
}

.question-item {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

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

.question-link {
    color: #333;
    text-decoration: none;
    display: block;
    padding: 5px 0;
    transition: color 0.2s;
}

.question-link:hover {
    color: var(--primary-color);
}

.views-count {
    font-size: 12px;
    color: #6c757d;
    margin-left: 5px;
}

.popular-questions {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-top: 40px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.popular-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.popular-icon {
    margin-right: 10px;
}

.popular-list .question-item {
    padding: 10px 0;
}

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--footer-height);
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-link {
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--primary-color);
}

/* Стили для страницы вопроса */
.question-content {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.question-helpful {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.sidebar-categories, .sidebar-popular {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Стили для тикетов */
.ticket-message, .reply-message {
    white-space: pre-line;
}

/* Адаптивность */
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
        --footer-height: 50px;
    }
    
    .header {
        padding: 0 10px;
    }
    
    .logo {
        height: 30px;
    }
    
    .site-title {
        font-size: 18px;
    }
    
    .search-section {
        padding: 30px 15px;
    }
    
    .user-name {
        display: none;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .footer-link {
        font-size: 14px;
    }
}