/* 详情页专用样式 */

/* 提问详情页面容器 */
.question-detail-section {
    padding: 3rem 0;
    margin-top: 6rem;
}

/* 详情页主容器 */
.detail-container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

/* 左侧主要内容区域 */
.detail-main {
    flex: 3;
    width: 100%;
}

/* 右侧边栏 */
.detail-sidebar {
    flex: 1;
    width: 100%;
    position: sticky;
    top: 8rem;
}

/* 问题详情卡片 */
.question-detail {
    background-color: var(--background-primary);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-light);
    margin-bottom: 2rem;
    transition: var(--transition);
}

.question-detail:hover {
    box-shadow: var(--shadow-medium);
}

/* 问题标题 */
.question-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

/* 问题元信息 */
.question-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

/* 用户信息 */
.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--background-accent);
    border-radius: 50%;
    color: var(--primary-color);
}

.user-details .user-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.user-details .question-time,
.user-details .answer-time {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* 问题统计 */
.question-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

/* 问题内容 */
.question-content {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.question-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.question-content p:last-child {
    margin-bottom: 0;
}

/* 问题标签 */
.question-tags {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.tag {
    background-color: var(--background-accent);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
}

.tag:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 回答表单区域 */
.answer-form-section {
    background-color: var(--background-primary);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-light);
    margin-bottom: 2rem;
}

.answer-form-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.answer-form textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    transition: var(--transition);
    min-height: 150px;
}

.answer-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* 回答列表 */
.answers-section {
    background-color: var(--background-primary);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-light);
}

.answers-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

/* 回答项 */
.answer-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.answer-item:last-child {
    border-bottom: none;
}

.answer-item:hover {
    background-color: rgba(248, 250, 252, 0.5);
}

/* 回答头部 */
.answer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* 回答评分 */
.answer-rating {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--primary-color);
}

/* 回答内容 */
.answer-content {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.answer-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.answer-content p:last-child {
    margin-bottom: 0;
}

.answer-content ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.answer-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.answer-content li:last-child {
    margin-bottom: 0;
}

/* 回答操作按钮 */
.answer-actions {
    display: flex;
    gap: 1.5rem;
}

.answer-actions button {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    padding: 0.5rem 0;
}

.answer-actions button:hover {
    color: var(--primary-color);
}

/* 推荐提问区域 */
.recommended-questions {
    background-color: var(--background-primary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-light);
    margin-bottom: 1.5rem;
}

.recommended-questions h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.recommended-list .recommended-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.recommended-list .recommended-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.recommended-item h4 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.recommended-item h4 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
    line-height: 1.5;
}

.recommended-item h4 a:hover {
    color: var(--primary-color);
    transform: translateX(4px);
}

.recommended-item .question-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* 社区统计 */
.community-stats {
    background-color: var(--background-primary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-light);
}

.community-stats h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.stats-grid {
    display: grid;
    gap: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background-color: var(--background-secondary);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.stat-item:hover {
    background-color: var(--background-accent);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .detail-container {
        flex-direction: column;
    }
    
    .detail-sidebar {
        position: static;
        margin-top: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .question-detail-section {
        padding: 2rem 0;
        margin-top: 5rem;
    }
    
    .question-detail,
    .answer-form-section,
    .answers-section,
    .recommended-questions,
    .community-stats {
        padding: 1.5rem;
    }
    
    .question-title {
        font-size: 1.5rem;
    }
    
    .question-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .answer-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button {
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .question-detail,
    .answer-form-section,
    .answers-section,
    .recommended-questions,
    .community-stats {
        padding: 1.25rem;
    }
    
    .question-title {
        font-size: 1.35rem;
    }
    
    .answer-actions {
        flex-wrap: wrap;
        gap: 1rem;
    }
}