/* 帖子详情页面样式 - Thread Detail Styles */

/* 主要内容区域 */
.main-content {
    padding: 20px 0;
}

.content-wrapper {
    display: flex;
    gap: 30px;
}

/* 左侧内容区域 */
.left-content {
    flex: 1;
    min-width: 0;
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 问题标题区域 */
.question-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.question-header h1 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #333;
    line-height: 1.3;
    font-weight: 600;
}
/* 标题前状态图标（置顶/精华） */
.question-header h1 .icon {
    margin-right: 6px; /* 与列表页一致 */
    font-size: 16px;   /* 与列表页一致 */
    vertical-align: middle;
}

.question-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
}

/* 仅帖子主内容（问题头部）头像：去掉外圈描边，直接显示头像 */
.question-header .author-avatar {
    border: none;
    overflow: hidden;
    background: transparent;
}
.question-header .author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* 正文与回复的马赛克遮罩 */
.masked {
    position: relative;
}
.masked .masked-content {
    filter: blur(6px);
    pointer-events: none;
    user-select: none;
    /* 强制长串断行，避免替换字符撑开内容区 */
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
}
.masked .mask-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: saturate(120%) blur(2px);
    z-index: 2;
}
.masked .mask-message {
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
}
.masked .mask-message .icon {
    display: inline-block;
    font-size: 16px;
    margin-right: 8px;
    line-height: 1;
}
 
.question-header .author-avatar .avatar-icon {
    width: 100%;
    height: 100%;
    border: none; /* 去掉任何公共样式中的边框 */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.author-details {
    display: flex;
    flex-direction: column;
}

.author-details .author-name {
    margin-bottom: 2px;
}

.author-details .author-meta {
    display: flex;
    align-items: baseline;
    flex-wrap: nowrap;
    white-space: nowrap;
    gap: 8px;
    color: #666;
    font-size: 12px;
    line-height: 1.4;
}

.author-details .author-meta .post-time { color: #666; display: inline-block; }
.author-details .author-meta .last-edit { color: #888; display: inline-block; }
.author-details .author-meta .sep { color: #ccc; display: inline-block; }

.author-name {
    font-weight: 600;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.author-name:hover {
    color: #0066cc;
}

.author-badge {
    background: #0066cc;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-top: 2px;
    align-self: flex-start;
}

.author-badge.expert {
    background: #ff9800;
}

.author-badge.moderator {
    background: #9c27b0;
}

/* 最佳回答徽章（含奖杯图标） */
.author-badge.best-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 14px;
    background: linear-gradient(90deg, #ffe082, #ffca28);
    color: #5d3b00;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.author-badge.best-badge .trophy-icon {
    width: 14px;
    height: 14px;
    fill: currentColor;
    filter: drop-shadow(0 1px 0 rgba(255,255,255,0.3));
}

.author-badge.best-badge .label {
    line-height: 1;
    font-weight: 600;
}

.post-time {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.question-stats {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #666;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-item .icon {
    font-size: 12px;
}

/* 问题内容区域 */
.question-content {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

/* 投票区域 */
.vote-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 60px;
    flex-shrink: 0;
}

.vote-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.vote-btn:hover {
    background: #e9ecef;
    color: #333;
}

.vote-btn.voted {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
}

.vote-count {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    min-height: 24px;
    display: flex;
    align-items: center;
}

.bookmark-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.bookmark-btn:hover {
    color: #0066cc;
}

.bookmark-btn.bookmarked {
    color: #ff9800;
}

/* 内容主体 - 极致阅读体验 */
.content-body {
    flex: 1;
    min-width: 0;
    line-height: 1.8;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
    overflow-wrap: break-word;
}

/* Headings */
.content-body h2 {
    font-size: 24px;
    margin: 32px 0 24px;
    padding-left: 16px;
    border-left: 4px solid #0066cc;
    color: #1a1a1a;
    font-weight: 600;
    line-height: 1.4;
    border-bottom: none;
    letter-spacing: -0.5px;
}
.content-body h3 {
    font-size: 20px;
    margin: 28px 0 16px;
    color: #2c3e50;
    font-weight: 600;
    line-height: 1.4;
}
.content-body h4 {
    font-size: 17px;
    margin: 24px 0 12px;
    color: #444;
    font-weight: 600;
}

/* Paragraphs & Lists */
.content-body p {
    margin: 0 0 20px;
    line-height: 1.8;
}
.content-body ul, .content-body ol {
    margin: 20px 0;
    padding-left: 28px;
}
.content-body li {
    margin-bottom: 10px;
    color: #444;
}

/* Links */
.content-body a {
    color: #0066cc;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}
.content-body a:hover {
    color: #0052a3;
    border-bottom-color: #0052a3;
}

/* Blockquotes */
.content-body blockquote {
    border-left: 4px solid #0066cc;
    margin: 28px 0;
    padding: 20px 24px;
    background-color: #f0f7ff;
    color: #2c3e50;
    border-radius: 0 6px 6px 0;
    font-style: normal;
    font-size: 15px;
}

/* Code Blocks */
.content-body pre,
.answer-body pre {
    background: #282c34;
    color: #abb2bf;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
    font-size: 14px;
    line-height: 1.6;
    margin: 24px 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    max-width: 100%;
}
.content-body code,
.answer-body code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
    background: rgba(27, 31, 35, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    color: #476582;
    font-size: 0.9em;
    word-break: break-word;
    overflow-wrap: anywhere;
}
.content-body pre code,
.answer-body pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
    border-radius: 0;
}

/* Images */
.content-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 24px auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Horizontal Rule */
.content-body hr {
    border: 0;
    height: 1px;
    background: #e0e0e0;
    margin: 36px 0;
}

/* Tables */
.content-body table {
    border-collapse: collapse;
    width: 100%;
    margin: 24px 0;
    font-size: 14px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 0 1px #e0e0e0, 0 2px 4px rgba(0,0,0,0.05);
}
.content-body th {
    background-color: #f8f9fa;
    color: #2c3e50;
    font-weight: 600;
    text-align: left;
    padding: 14px 20px;
    border-bottom: 1px solid #e0e0e0;
}
.content-body td {
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
    color: #444;
}
.content-body tr:last-child td {
    border-bottom: none;
}
.content-body tr:hover td {
    background-color: #fcfcfc;
}

/* 操作按钮区域 */
.action-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap;
}

/* 回答区域 */
.answers-section {
    margin-bottom: 40px;
}

.answers-section h3 {
    margin-bottom: 24px;
    font-size: 20px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.answers-count {
    background: #f0f0f0;
    color: #666;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 14px;
}

.answers-sort {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.sort-btn {
    background: none;
    border: 1px solid #ddd;
    padding: 6px 12px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 12px;
    color: #666;
    transition: all 0.3s ease;
}

.sort-btn.active,
.sort-btn:hover {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
}

/* 回答项目 */
.answer-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
}

.answer-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.answer-item.solution {
    background: #f0f8f0;
    border: 1px solid #d4edda;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.answer-item.solution::before {
    content: "✓ 已采纳的解决方案";
    position: absolute;
    top: -10px;
    left: 20px;
    background: #28a745;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* 楼层与@回复标识 */
.floor-badge {
    position: absolute;
    right: 0;
    top: 8px;
    background: #f7fafc;
    border: 1px solid #e5e7eb;
    color: #374151;
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 9999px;
    z-index: 1;
}

.reply-mention {
    color: #0066cc;
    font-weight: 500;
    margin-right: 6px;
    text-decoration: none;
}
.reply-mention:hover {
    text-decoration: underline;
}
/* 回复列表中的 @楼层 前的小图标，与链接同色 */
.reply-mention .reply-icon { display: inline-flex; width: 14px; height: 14px; margin-right: 4px; vertical-align: text-bottom; }
.reply-mention .reply-icon svg { width: 100%; height: 100%; display: block; stroke: currentColor; fill: none; opacity: 0.92; }

/* 正在回复指示条 */
.replying-to-indicator {
    display: grid;
    grid-template-columns: max-content fit-content(50%) minmax(0, 1fr);
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    gap: 8px;
    margin-bottom: 8px;
    padding: 8px 10px;
    border: 1px solid #ffe58f;
    background: #fffbe6;
    color: #8b7325;
    border-radius: 8px;
}
.replying-to-indicator[hidden] { display: none !important; }
.replying-to-indicator .replying-label { font-weight: 600; }
.replying-to-indicator .replying-target { color: #b36b00; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.replying-to-indicator .replying-target:hover { text-decoration: underline; }
.replying-to-indicator .replying-preview { color: #8b7325; opacity: 0.9; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (prefers-color-scheme: dark) {
    .floor-badge {
        background: #1f2937;
        border-color: #374151;
        color: #e5e7eb;
    }
    .replying-to-indicator {
        border-color: #745f2a;
        background: #2b2b1f;
        color: #d1c099;
    }
    .replying-to-indicator .replying-target { color: #e3b76b; }
    .replying-to-indicator .replying-preview { color: #d1c099; }
}

/* 小屏优化：目标链接更宽一些，预览也保持单行省略 */
@media (max-width: 640px) {
  .replying-to-indicator { grid-template-columns: max-content fit-content(65%) minmax(0, 1fr); }
}

.answer-vote {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 60px;
    flex-shrink: 0;
}

.answer-content {
    flex: 1;
    min-width: 0;
}

.answer-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

/* 目标回复高亮效果 */
.answer-item.reply-target-highlight {
    outline: 2px solid #ffe58f;
    outline-offset: 2px;
    border-radius: 8px;
}
@media (prefers-color-scheme: dark) {
    .answer-item.reply-target-highlight {
        outline-color: #745f2a;
    }
}

/* 回答区域头像：与主帖头像保持同款圆形裁剪与填充 */
.answer-header .author-avatar {
    overflow: hidden;
    background: transparent;
    border: none; /* 去掉轮廓，与问题头部一致 */
}
.answer-header .author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.answer-body {
    margin-bottom: 16px;
    line-height: 1.7;
}

.answer-body p {
    margin-bottom: 16px;
    color: #333;
}

.answer-body ul,
.answer-body ol {
    margin: 16px 0;
    padding-left: 30px;
}

.answer-body li {
    margin-bottom: 8px;
}

/* 回答操作 */
.answer-actions {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.action-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.action-btn:hover {
    background: #f8f9fa;
    color: #333;
}

/* 问题头部的版主/管理员操作区 */
.moderation-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.moderation-actions .mod-action {
    border: 1px solid #dee2e6;
    background: #f8f9fa;
    color: #666;
    padding: 4px 8px;   /* 与列表页一致 */
    border-radius: 6px;
    font-size: 12px;    /* 与列表页一致 */
}
.moderation-actions .mod-action:hover {
    background: #e9ecef;
    color: #333;
}
.moderation-actions .mod-action .icon {
    font-size: 12px;    /* 与列表页一致 */
    margin-right: 6px;
}
.moderation-actions .mod-action.danger {
    border-color: #f5c6cb;
    color: #c82333;
}
.moderation-actions .mod-action.danger:hover {
    background: #f8d7da;
    color: #a71d2a;
}

/* 回答操作中的危险按钮（删除）样式 */
.answer-actions .mod-action {
    border: 1px solid #dee2e6;
    background: #f8f9fa;
    color: #666;
    padding: 4px 8px;   /* 与列表页一致 */
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;    /* 与列表页一致 */
}
.answer-actions .mod-action:hover {
    background: #e9ecef;
    color: #333;
}
.answer-actions .mod-action .icon {
    font-size: 12px;    /* 与列表页一致 */
}
.answer-actions .mod-action.edit-comment {
    margin-left: auto;
}
.answer-actions .mod-action.danger {
    border-color: #f5c6cb;
    color: #c82333;
}
.answer-actions .mod-action.danger:hover {
    background: #f8d7da;
    color: #a71d2a;
}

.action-btn.active {
    color: #0066cc;
}

.action-btn .count {
    font-size: 12px;
}

/* 回复表单 */
.reply-form {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.reply-form h4 {
    margin-bottom: 16px;
    color: #333;
    font-size: 18px;
}

.reply-form .form-group {
    margin-bottom: 20px;
}

.reply-form textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.reply-form textarea:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.2);
}

.form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.form-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
}

.toolbar-btn {
    background: none;
    border: none;
    padding: 6px;
    border-radius: 4px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s;
}

.toolbar-btn:hover {
    background: #e9ecef;
    color: #333;
}

/* 附件工具栏与附件 chips */
.reply-form .attach-toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 14px;
    margin-bottom: 16px;
    padding: 10px 12px;
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.reply-form .attach-toolbar:hover {
    border-color: #d1d5db;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.reply-form .attach-toolbar .attach-hint {
    font-size: 12px;
    color: #6b7280;
}
.reply-form .attach-toolbar .attach-spacer {
    flex: 1;
}
.reply-form .attach-toolbar .attachment-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    margin-top: 6px;
}
.reply-form .att-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 16px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    font-size: 13px;
}
.reply-form .att-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6b7280; /* 配合 SVG 使用 currentColor */
}
.reply-form .att-icon-svg {
    width: 16px;
    height: 16px;
    display: block;
}
.reply-form .att-link {
    color: #1f2937;
    text-decoration: none;
}
.reply-form .att-link:hover {
    text-decoration: underline;
}
.reply-form .att-remove {
    appearance: none;
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 14px;
    line-height: 1;
    padding: 2px 4px;
    border-radius: 6px;
    cursor: pointer;
}
.reply-form .att-remove:hover {
    background: #e5e7eb;
}
.reply-form .att-remove:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}
.reply-form .att-chip:hover {
    border-color: #d1d5db;
}

.reply-form .attach-clear {
    margin-left: auto;
}
.reply-form .form-actions {
    margin-top: 4px; /* 与附件区保持舒适间距 */
}

@media (prefers-color-scheme: dark) {
    .reply-form .attach-toolbar { background: #111827; border-color: #374151; }
    .reply-form .attach-toolbar:hover { border-color: #4b5563; box-shadow: none; }
    .reply-form .att-chip { background: #1f2937; border-color: #374151; }
    .reply-form .att-link { color: #e5e7eb; }
    .reply-form .att-icon { color: #9ca3af; }
    .reply-form .att-remove { color: #9ca3af; }
    .reply-form .att-remove:hover { background: #374151; }
}

/* 帖子与回答的附件展示卡片 */
.attachments-card {
    margin-top: 12px;
    padding: 12px;
    background: #f9fafb; /* 与正文白底区分 */
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}
.attachments-card .attachments-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}
.attachments-card .att-icon { color: #6b7280; }
.attachments-card .att-icon-svg { width: 16px; height: 16px; display: block; }
.attachments-card .attachment-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.attachments-card .attachment-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    text-decoration: none;
    color: #1f2937;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.attachments-card .attachment-item:hover {
    background: #f3f4f6;
    color: #111827;
}
.attachments-card .att-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.attachments-card--answer {
    background: #f3f4f6; /* 中性灰方案：更通用、更克制 */
    border-color: #e5e7eb;
}
.attachments-card--answer .attachments-title { color: #374151; }
.attachments-card--answer .att-icon { color: #6b7280; }
.attachments-card--answer .attachment-item:hover { background: #e5e7eb; color: #111827; }

@media (prefers-color-scheme: dark) {
    .attachments-card { background: #111827; border-color: #374151; }
    .attachments-card--answer { background: #1f2937; border-color: #374151; }
    .attachments-card .attachments-title { color: #e5e7eb; }
    .attachments-card--answer .attachments-title { color: #e5e7eb; }
    .attachments-card .att-icon { color: #9ca3af; }
    .attachments-card--answer .att-icon { color: #9ca3af; }
    .attachments-card .attachment-item { color: #e5e7eb; }
    .attachments-card .attachment-item:hover { background: #374151; color: #ffffff; }
}

/* 右侧边栏 */
.right-sidebar {
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex-shrink: 0;
}

.sidebar-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sidebar-section h4 {
    margin-bottom: 16px;
    color: #333;
    font-size: 16px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 8px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.detail-item .label {
    color: #666;
    font-weight: 500;
}

.detail-item .value {
    color: #333;
    text-align: right;
}

.detail-item.detail-item--title {
    display: grid;
    grid-template-columns: 64px 1fr;
    column-gap: 8px;
    align-items: start;
}

.detail-item.detail-item--title .label {
    margin: 0;
    white-space: nowrap;
}

.detail-item .value.value-title {
    text-align: left;
    font-size: 13px;
    line-height: 1.6;
    display: block;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* 分享按钮 */
.share-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.share-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #dee2e6;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-btn:hover {
    background: #e9ecef;
    color: #333;
}

.share-btn.email:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.share-btn.copy:hover {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

/* 相关话题列表 */
.related-item,
.trending-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.related-item:last-child,
.trending-item:last-child {
    border-bottom: none;
}

.related-item a,
.trending-item a {
    color: #333;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.4;
    flex: 1;
    margin-right: 8px;
}

.related-item a:hover,
.trending-item a:hover {
    color: #0066cc;
}

.trend-count {
    background: #f8f9fa;
    color: #666;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    flex-shrink: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
    }
    
    .right-sidebar {
        width: 100%;
        order: -1;
    }
    
    .left-content {
        padding: 20px;
    }
    
    .question-header h1 {
        font-size: 24px;
    }
    
    .question-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .question-content {
        flex-direction: column;
    }
    
    .vote-section {
        flex-direction: row;
        justify-content: flex-start;
        width: auto;
        min-width: auto;
    }
    
    .answer-item {
        flex-direction: column;
        gap: 15px;
    }
    
    .answer-vote {
        flex-direction: row;
        justify-content: flex-start;
        width: auto;
        min-width: auto;
    }
    
    .action-buttons {
        flex-wrap: wrap;
    }
    
    .reply-form textarea {
        min-height: 100px;
    }
    
    .form-actions {
        flex-wrap: wrap;
    }
    
    .share-buttons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .left-content {
        padding: 15px;
    }
    
    .question-header h1 {
        font-size: 20px;
    }
    
    .author-info {
        gap: 8px;
    }
    
    .author-avatar {
        width: 32px;
        height: 32px;
    }
    
    .vote-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .vote-count {
        font-size: 16px;
    }
    
    .content-body {
        font-size: 14px;
    }
    
    .code-block pre {
        padding: 12px;
        font-size: 12px;
    }
    
    .answer-header {
        gap: 8px;
    }
    
    .sidebar-section {
        padding: 15px;
    }
    
    .detail-item {
        font-size: 13px;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .content-body,
    .answer-body {
        color: #e0e0e0;
    }
    
    .content-body h2,
    .content-body h3,
    .content-body h4 {
        color: #f0f0f0;
    }
    
    .code-block {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .code-block pre {
        color: #e0e0e0;
    }
    
    .content-body code {
        background: #4a5568;
        color: #fbb6ce;
    }
}
/* 黑白色调：仅用于详情页的管理操作入口图标 */
.question-actions .action-btn .icon,
.answer-actions .action-btn .icon,
.moderation-actions .action-btn .icon,
.mod-toolbar .action-btn .icon,
.answer-actions .mod-action .icon,
.moderation-actions .mod-action .icon {
  display: inline-block;
  filter: grayscale(100%) contrast(110%);
  opacity: 0.9;
}

.question-actions .action-btn:hover .icon,
.answer-actions .action-btn:hover .icon,
.question-actions .action-btn:focus .icon,
.answer-actions .action-btn:focus .icon,
.answer-actions .mod-action:hover .icon,
.answer-actions .mod-action:focus .icon {
  filter: grayscale(100%) contrast(115%) brightness(1.05);
  opacity: 1;
}

/* 管理入口：悬停/聚焦时切换为彩色 */
.moderation-actions .action-btn:hover .icon,
.moderation-actions .action-btn:focus .icon,
.mod-toolbar .action-btn:hover .icon,
.mod-toolbar .action-btn:focus .icon {
  filter: none;
  opacity: 1;
}

/* 回答评论的“设为最佳”操作：悬停/聚焦时切回彩色 */
.answer-actions .best-toggle:hover .icon,
.answer-actions .best-toggle:focus .icon {
  filter: none;
  opacity: 1;
}

/* 回答编辑按钮图标：保持彩色，与帖子编辑一致 */
.answer-actions .mod-action.edit-comment .icon,
.answer-actions .mod-action.edit-comment:hover .icon,
.answer-actions .mod-action.edit-comment:focus .icon {
  filter: none;
  opacity: 1;
}

.extra-info-card {
    margin-bottom: 16px;
    padding: 14px;
    background: var(--brand-primary-light, #f0f7ff);
    border: 1px solid var(--brand-primary-soft-border, #93c5fd);
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.extra-info-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--brand-primary, #1f2937);
    margin-bottom: 10px;
}
.extra-info-card .icon {
    font-size: 16px;
    line-height: 1;
    color: var(--brand-primary, inherit);
}
.extra-info-icon {
    width: 16px;
    height: 16px;
    display: block;
}
.extra-info-list {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 8px 12px;
}
.extra-info-item {
    display: contents;
}
.extra-info-key {
    color: #374151;
    font-weight: 600;
}
.extra-info-value {
    color: #111827;
    overflow-wrap: anywhere;
    word-break: break-word;
}
@media (prefers-color-scheme: dark) {
    .extra-info-card {
        background: #0b1220;
        border-color: #1e3a8a;
        box-shadow: none;
    }
    .extra-info-title { color: #e5e7eb; }
    .extra-info-key { color: #e5e7eb; }
    .extra-info-value { color: #e5e7eb; }
}
