/* 问答详情页样式 */
body {
    background: #f5f5f5;
    margin: 0;
    padding: 0;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

.header {
    background: white;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.main-content {
    padding: 30px 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}

.question-detail {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.question-header {
    background: linear-gradient(135deg, #4ECDC4, #44A08D);
    color: white;
    padding: 30px;
}

.question-title {
    font-size: 28px;
    font-weight: bold;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.question-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    opacity: 0.9;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.ai-answer-section {
    padding: 30px;
    border-bottom: 1px solid #eee;
}

.ai-answer-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin: 0 0 20px 0;
}

.ai-answer-content {
    color: #555;
    line-height: 1.6;
    font-size: 16px;
    margin-bottom: 25px;
    white-space: pre-wrap;
    word-wrap: break-word;
    word-spacing: normal;
    max-width: 100%;
    overflow-wrap: break-word;
}

/* Markdown内容样式 */
.ai-answer-content h1,
.ai-answer-content h2,
.ai-answer-content h3,
.ai-answer-content h4,
.ai-answer-content h5,
.ai-answer-content h6 {
    color: #2c3e50;
    margin: 20px 0 15px 0;
    font-weight: 600;
}

.ai-answer-content h1 { font-size: 24px; }
.ai-answer-content h2 { font-size: 22px; }
.ai-answer-content h3 { font-size: 20px; }
.ai-answer-content h4 { font-size: 18px; }
.ai-answer-content h5 { font-size: 16px; }
.ai-answer-content h6 { font-size: 14px; }

.ai-answer-content p {
    margin: 15px 0;
    text-align: justify;
}

.ai-answer-content ul,
.ai-answer-content ol {
    margin: 15px 0;
    padding-left: 30px;
}

.ai-answer-content li {
    margin: 8px 0;
}

.ai-answer-content blockquote {
    border-left: 4px solid #4ECDC4;
    margin: 20px 0;
    padding: 15px 20px;
    background: #f8f9fa;
    color: #555;
    font-style: italic;
}

.ai-answer-content code {
    background: #f1f3f4;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    color: #d63384;
}

.ai-answer-content pre {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin: 20px 0;
    overflow-x: auto;
}

.ai-answer-content pre code {
    background: none;
    padding: 0;
    color: #333;
    font-size: 14px;
}

.ai-answer-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 20px 0;
}

.ai-answer-content th,
.ai-answer-content td {
    border: 1px solid #dee2e6;
    padding: 12px;
    text-align: left;
}

.ai-answer-content th {
    background: #f8f9fa;
    font-weight: 600;
}

.ai-answer-content strong {
    font-weight: 600;
    color: #2c3e50;
}

.ai-answer-content em {
    font-style: italic;
    color: #6c757d;
}

.ai-answer-content hr {
    border: none;
    border-top: 2px solid #e9ecef;
    margin: 30px 0;
}

.question-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: #f8f9fa;
}

.action-buttons {
    display: flex;
    gap: 15px;
}

.action-btn {
    background: white;
    border: 1px solid #dee2e6;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    color: #6c757d;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.action-btn:hover {
    background: #e9ecef;
    color: #495057;
}

.follow-up-item {
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: opacity 0.5s ease;
}

.follow-up-header {
    background: #f8f9fa;
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.follow-up-question {
    font-weight: bold;
    margin-bottom: 8px;
}

.follow-up-meta {
    display: flex;
    align-items: center;
    gap: 15px;
}

.follow-up-time {
    font-size: 12px;
    color: #999;
}

.delete-follow-up-btn {
    background: none;
    border: 1px solid #ff4d4f;
    color: #ff4d4f;
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.delete-follow-up-btn:hover {
    background: #ff4d4f;
    color: white;
}

.follow-up-answer {
    padding: 15px;
    background: white;
    color: #555;
    font-size: 16px;
    line-height: 1.8;
    white-space: pre-wrap; /* 保留空格和换行 */
    word-wrap: break-word; /* 长单词换行 */
    word-spacing: normal; /* 正常单词间距 */
    max-width: 100%; /* 限制最大宽度 */
    overflow-wrap: break-word; /* 强制长单词换行 */
}

/* 追问回答的Markdown样式 */
.follow-up-answer h1,
.follow-up-answer h2,
.follow-up-answer h3,
.follow-up-answer h4,
.follow-up-answer h5,
.follow-up-answer h6 {
    color: #2c3e50;
    margin: 20px 0 15px 0;
    font-weight: 600;
}

.follow-up-answer h1 { font-size: 22px; }
.follow-up-answer h2 { font-size: 20px; }
.follow-up-answer h3 { font-size: 18px; }
.follow-up-answer h4 { font-size: 16px; }
.follow-up-answer h5 { font-size: 14px; }
.follow-up-answer h6 { font-size: 12px; }

.follow-up-answer p {
    margin: 15px 0;
    text-align: justify;
}

.follow-up-answer ul,
.follow-up-answer ol {
    margin: 15px 0;
    padding-left: 30px;
}

.follow-up-answer li {
    margin: 8px 0;
}

.follow-up-answer blockquote {
    border-left: 4px solid #4ECDC4;
    margin: 20px 0;
    padding: 15px 20px;
    background: #f8f9fa;
    color: #555;
    font-style: italic;
}

.follow-up-answer code {
    background: #f1f3f4;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    color: #d63384;
}

.follow-up-answer pre {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin: 20px 0;
    overflow-x: auto;
}

.follow-up-answer pre code {
    background: none;
    padding: 0;
    color: #333;
    font-size: 14px;
}

.follow-up-answer table {
    border-collapse: collapse;
    width: 100%;
    margin: 20px 0;
}

.follow-up-answer th,
.follow-up-answer td {
    border: 1px solid #dee2e6;
    padding: 12px;
    text-align: left;
}

.follow-up-answer th {
    background: #f8f9fa;
    font-weight: 600;
}

.follow-up-answer strong {
    font-weight: 600;
    color: #2c3e50;
}

.follow-up-answer em {
    font-style: italic;
    color: #6c757d;
}

.follow-up-answer hr {
    border: none;
    border-top: 2px solid #e9ecef;
    margin: 30px 0;
}

.empty-placeholder {
    text-align: center;
    color: #999;
    padding: 20px;
}

.action-btn.liked {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.follow-up-section, .comments-section {
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.section-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin: 0 0 20px 0;
}

.follow-up-input, .comment-input {
    width: 100%;
    min-height: 100px;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 15px;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.follow-up-input:focus, .comment-input:focus {
    outline: none;
    border-color: #4ECDC4;
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.1);
}

.submit-btn {
    background: #4ECDC4;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.submit-btn:hover {
    background: #44A08D;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.sidebar-header {
    background: #4ECDC4;
    color: white;
    padding: 15px 20px;
    font-weight: bold;
    font-size: 16px;
}

.sidebar-content {
    padding: 20px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #4ECDC4;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #45b7aa;
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* 分享功能样式 */
.share-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.share-modal.show {
    display: flex;
}

.share-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.share-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.share-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #666;
}

.share-platforms {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.platform-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #333;
}

.platform-btn:hover {
    border-color: #4ECDC4;
    background: #f8f9fa;
    color: #333;
}

.platform-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.platform-icon.wechat { background: #07C160; }
.platform-icon.qq { background: #12B7F5; }
.platform-icon.weibo { background: #E6162D; }
.platform-icon.douyin { background: #000; }
.platform-icon.xiaohongshu { background: #FF2442; }
.platform-icon.copy { background: #6c757d; }

.platform-name {
    font-size: 12px;
    font-weight: 500;
}

.short-video-section {
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-top: 20px;
}

.short-video-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}

.generate-video-btn {
    background: linear-gradient(135deg, #FF6B6B, #FF8E53);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.generate-video-btn:hover {
    background: linear-gradient(135deg, #FF5252, #FF7043);
}

.generate-video-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.video-content-preview {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    display: none;
}

.video-content-preview.show {
    display: block;
}

.video-content-text {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 15px;
    white-space: pre-wrap;
}

.video-actions {
    display: flex;
    gap: 10px;
}

.copy-video-btn {
    background: #4ECDC4;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.copy-video-btn:hover {
    background: #44A08D;
}

@media (max-width: 768px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .question-title {
        font-size: 24px;
    }
    
    .question-header {
        padding: 20px;
    }
    
    .ai-answer-section, .follow-up-section, .comments-section {
        padding: 20px;
    }
}