/* 问答头部 */
.qa-header {
    background: #fff;
    border-radius: 6px;
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.header-title {
    font-size: 22px;
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 搜索框 */
.search-bar {
    display: flex;
    margin-bottom: 15px;
}

.search-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
    outline: none;
}

.search-input:focus {
    border-color: #3498db;
}

.search-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 0 15px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

/* 分类筛选 */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 5px;
}

.category-item {
    padding: 5px 12px;
    border-radius: 15px;
    background: #f5f5f5;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.category-item:hover {
    background: #e8f4f8;
    color: #3498db;
}

.category-item.active {
    background: #3498db;
    color: white;
}

/* 主内容区 */
.qa-content {
    display: flex;
    gap: 20px;
}

/* 问题列表 */
.question-list {
    flex: 3;
}

.question-item {
    background: #fff;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid #eee;
    transition: border 0.3s;
}

.question-item:hover {
    border-color: #ddd;
}

.question-header {
    margin-bottom: 8px;
}

.question-title {
    font-size: 17px;
    color: #2c3e50;
    text-decoration: none;
    margin-bottom: 5px;
    display: block;
}

.question-title:hover {
    color: #3498db;
}

.question-top {
    display: inline-block;
    background: #e74c3c;
    color: white;
    font-size: 12px;
    padding: 1px 5px;
    border-radius: 2px;
    margin-right: 5px;
}

.question-meta {
    display: flex;
    justify-content: space-between;
    color: #7f8c8d;
    font-size: 13px;
}

.question-info {
    display: flex;
    gap: 12px;
}

.question-stats {
    display: flex;
    gap: 12px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    margin: 25px 0;
    gap: 4px;
}

.page-link {
    display: inline-block;
    padding: 5px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    color: #666;
    text-decoration: none;
    font-size: 13px;
}

.page-link:hover {
    border-color: #3498db;
    color: #3498db;
}

.page-link.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.page-link.disabled {
    color: #ccc;
    border-color: #eee;
    cursor: default;
}

/* 提问表单 */
.ask-module {
    background: white;
    border-radius: 6px;
    padding: 15px 20px;
    margin-top: 30px;
    border: 1px solid #eee;
}

.ask-title {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.ask-form .form-group {
    margin-bottom: 12px;
}

.ask-form label {
    display: block;
    margin-bottom: 6px;
    color: #2c3e50;
    font-size: 14px;
}

.ask-form input,
.ask-form textarea,
.ask-form select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.ask-form textarea {
    min-height: 120px;
    resize: vertical;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

.cancel-btn,
.submit-btn {
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.cancel-btn {
    background: #f5f5f5;
    border: 1px solid #ddd;
    color: #666;
}

.submit-btn {
    background: #3498db;
    border: none;
    color: white;
}

.submit-btn:hover {
    background: #2980b9;
}

/* 侧边栏 */
.sidebar {
    flex: 1;
}

.sidebar-card {
    background: #fff;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #eee;
}

.sidebar-title {
    font-size: 16px;
    color: #2c3e50;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.stats-list {
    display: flex;
    padding: 15px;
}

.stat-box {
    flex: 1;
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #3498db;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 13px;
    color: #666;
}

.sidebar-list {
    padding: 0;
    margin: 0;
    list-style: none;
}

.sidebar-item {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
}

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

.sidebar-item a {
    color: #2c3e50;
    text-decoration: none;
    display: block;
    line-height: 1.4;
}

.sidebar-item a:hover {
    color: #3498db;
}

.error-message {
    color: #e74c3c;
    margin-bottom: 15px;
    padding: 10px;
    background: #ffebee;
    border-radius: 4px;
}

/* 问答页面响应式调整 */
@media (max-width: 768px) {
    .qa-content {
        flex-direction: column;
    }
    
    .question-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .question-info,
    .question-stats {
        flex-wrap: wrap;
        gap: 10px;
    }
}