/* ========== 帖子详情页专用样式 ========== */

/* AI回复提示按钮 */
.ai-reply-hint {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}
.ai-reply-hint:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}
.ai-reply-hint.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* AI建议面板 */
.ai-suggestions {
    background: #f8f9ff;
    border: 1px solid #e0e4ff;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    display: none;
}
.ai-suggestions.show {
    display: block;
}
.ai-suggestions h4 {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: #667eea;
}
.ai-suggestion-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}
.ai-suggestion-item:hover {
    border-color: #667eea;
    background: #f0f2ff;
}
.ai-suggestion-item:last-child {
    margin-bottom: 0;
}

/* 回复区头部 */
.replies-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.sort-toggle {
    font-size: 13px;
    color: #666;
    text-decoration: none;
    padding: 4px 12px;
    background: #f5f5f5;
    border-radius: 4px;
    transition: all 0.2s;
}
.sort-toggle:hover {
    background: #e0e0e0;
    color: #333;
}
.sort-active {
    background: #667eea !important;
    color: white !important;
}

/* 帖子头部 */
.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

/* 回复链接 */
.reply-link {
    font-size: 13px;
    color: #667eea;
    text-decoration: none;
    padding: 4px 10px;
    border: 1px solid #667eea;
    border-radius: 4px;
    transition: all 0.2s;
}
.reply-link:hover {
    background: #667eea;
    color: white;
}

/* 浮动回复框 */
.float-reply-box {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 800px;
    background: white;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    z-index: 1001;
    padding: 15px 20px;
}
.float-reply-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: 1000;
}
.float-reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.float-reply-header span {
    font-weight: 500;
    color: #333;
}
.float-reply-header .close-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f0f0f0;
    color: #666;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
}
.float-reply-header .close-btn:hover {
    background: #e0e0e0;
}
.float-reply-body textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    resize: none;
    font-family: inherit;
}
.float-reply-body textarea:focus {
    outline: none;
    border-color: #667eea;
}
.float-reply-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
}
.float-reply-footer .btn {
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
}

/* 浮动回复框工具栏 */
.float-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-top: 1px solid #f0f0f0;
    margin-top: 8px;
}

/* 表情选择器 */
.comment-icon {
    position: relative;
    width: auto;
    height: auto;
    cursor: pointer;
    display: inline-block;
}
.comment-icon .cicon {
    display: block;
    width: 28px;
    height: 28px;
    background: url(/images/sm.jpg) no-repeat;
    background-size: 100%;
}
.comment-icon:hover .cicon {
    opacity: 0.8;
}
.comment-icon .modal-tooltip {
    position: absolute;
    bottom: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 8px;
    z-index: 1000;
    min-width: 200px;
}
.comment-icon .modal-tooltip .tooltip {
    display: flex !important;
    flex-wrap: wrap;
    padding: 0 !important;
    width: auto !important;
}
.comment-icon .modal-tooltip .tooltip span {
    display: inline-block !important;
    width: 32px !important;
    height: 32px !important;
    padding: 4px !important;
    cursor: pointer;
    text-align: center;
    float: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}
.comment-icon .modal-tooltip .tooltip span:hover {
    background: #f0f0f0;
    border-radius: 4px;
}
.comment-icon .modal-tooltip .tooltip img {
    width: 24px !important;
    height: 24px !important;
    display: block !important;
    margin: 0 auto !important;
}

/* 上传和分享按钮 - 浮动框内 */
.float-reply-box .upload-btn-sm,
.float-reply-box .share-game-btn-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
    background: none;
    border: none;
}
.float-reply-box .upload-btn-sm:hover,
.float-reply-box .share-game-btn-sm:hover {
    color: #667eea;
}
.float-reply-box .image-preview-sm {
    display: inline-block;
    font-size: 12px;
    color: #999;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* AI帖子样式 */
.post.reply-post.ai-post {
    border-left: 3px solid #667eea;
    background: linear-gradient(90deg, #f8f9ff 0%, white 100%);
}
.post.reply-post.ai-post .username {
    color: #667eea;
}
.post.reply-post.ai-post .username::before {
    content: "🤖 ";
}

/* 无限滚动加载 */
.loading-more {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 14px;
}
.loading-more .spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: viewSpin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}
@keyframes viewSpin {
    to { transform: rotate(360deg); }
}
.no-more {
    text-align: center;
    padding: 20px;
    color: #bbb;
    font-size: 13px;
}
.load-more-btn {
    text-align: center;
    padding: 15px;
    color: #667eea;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.load-more-btn:hover {
    color: #764ba2;
}
.load-more-btn .spinner {
    display: none;
}
.load-more-btn.loading .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: viewSpin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

/* 点赞和分享按钮 */
.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #ddd;
    background: #f9f9f9;
    color: #666;
}
.action-btn:hover {
    background: #f0f0f0;
}
.action-btn.zaned {
    color: #27ae60;
    border-color: #27ae60;
    background: #f0faf4;
}
.action-btn.zaned:hover {
    background: #e8f8ef;
}
.topic-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* 分享弹窗 */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: none;
    align-items: flex-end;
    justify-content: center;
}
.share-modal.show {
    display: flex;
}
.share-content {
    background: white;
    border-radius: 16px 16px 0 0;
    padding: 20px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    animation: shareSlideUp 0.3s ease;
}
@keyframes shareSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.share-content h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
}
.share-links {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 15px;
}
.share-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 60px;
}
.share-link:hover {
    background: #f5f5f5;
}
.share-link img {
    width: 40px;
    height: 40px;
}
.share-icon {
    font-size: 28px;
    display: block;
}
.share-link span {
    font-size: 12px;
    color: #666;
}
.share-close {
    width: 100%;
    padding: 12px;
    background: #f5f5f5;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    color: #666;
    border: none;
    width: 100%;
}
.share-close:hover {
    background: #e0e0e0;
}
.copy-url {
    margin-top: 10px;
    padding: 10px;
    background: #667eea;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    width: 100%;
}

/* 详情页显示全部内容，不截断 */
.post-content {
    display: block !important;
    -webkit-line-clamp: unset !important;
    overflow: visible !important;
}

/* 帖子正文图片大小限制 */
.post-content img {
    max-width: 100% !important;
    max-height: 400px !important;
    object-fit: contain !important;
    border-radius: 8px;
    cursor: pointer;
}

/* 回复图片 */
.reply-images {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.reply-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    cursor: pointer;
    object-fit: cover;
    transition: transform 0.2s;
}
.reply-image:hover {
    transform: scale(1.02);
}

/* 子回复 */
.sub-replies-wrapper {
    margin-top: 0;
    margin-bottom: 0;
}
.sub-replies {
    margin-left: 50px;
    padding-left: 16px;
    border-left: 3px solid #e8e8e8;
    margin-top: 8px;
    margin-bottom: 8px;
    overflow: visible;
}
.sub-reply {
    margin-bottom: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}
.sub-reply .avatar-sm {
    width: 32px !important;
    height: 32px !important;
}
.sub-floor {
    color: #999;
    font-size: 11px;
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
}
.sub-floor::before {
    content: "└ ";
}
.replies-toggle {
    margin: 8px 0 8px 50px;
}
.toggle-replies-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #4a90d9;
    font-size: 13px;
    text-decoration: none;
    padding: 4px 12px;
    background: #f0f7ff;
    border-radius: 16px;
    transition: all 0.2s;
}
.toggle-replies-btn:hover {
    background: #e0f0ff;
    color: #2a70c0;
}
.toggle-icon {
    font-size: 10px;
}

/* 作者链接 */
.author-link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.author-link:hover {
    opacity: 0.85;
}
.username-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
}
.username-link:hover {
    color: #667eea;
    text-decoration: underline;
}
.author-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* 私信按钮 */
.msg-btn {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 15px;
    font-size: 12px;
    text-decoration: none;
    margin-left: 10px;
    transition: all 0.2s;
}
.msg-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    color: #fff;
}
.msg-btn-sm {
    display: inline-block;
    padding: 2px 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 10px;
    font-size: 11px;
    text-decoration: none;
    margin-left: 6px;
    transition: all 0.2s;
}
.msg-btn-sm:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.4);
    color: #fff;
}

/* 版主操作按钮 */
.mod-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 12px;
    padding-left: 12px;
    border-left: 2px solid #e8e8e8;
}
.mod-label {
    font-size: 12px;
    color: #ff9800;
    font-weight: bold;
}
.mod-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    color: #666;
    background: #f0f0f0;
    text-decoration: none;
}
.mod-btn:hover {
    background: #e0e0e0;
    color: #333;
}
.mod-btn.active {
    background: #667eea;
    color: white;
}
.mod-hide {
    color: #e91e63;
}
.mod-hide:hover {
    background: #fce4ec;
}
.mod-hide.active {
    background: #e91e63;
    color: white;
}

/* 标签样式（覆盖style.css中的定义） */
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: normal;
    margin-right: 8px;
}
.tag-top {
    background: #ff5722;
    color: white;
}
.tag-jing {
    background: #ffc107;
    color: #333;
}
.tag-lock {
    background: #dc3545;
    color: white;
}
.tag-hide {
    background: #6c757d;
    color: white;
}

/* 隐藏帖子提示 */
.hidden-topic-notice {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    border: 1px solid #ff9800;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 15px;
    text-align: center;
    color: #e65100;
}
.hidden-topic-notice strong {
    color: #ff5722;
}
