﻿/**
 * 论坛模块样式
 */

/* 帖子内容区域 */
.topic-content {
    line-height: 1.8;
}

.topic-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 8px 0;
}

.topic-content a {
    color: #54b601;
    text-decoration: underline;
}

.topic-content a:hover {
    color: #3d8a01;
}

.topic-content blockquote {
    border-left: 3px solid #54b601;
    padding-left: 12px;
    margin: 12px 0;
    color: #666;
    background: #f9fafb;
    padding: 12px 16px;
    border-radius: 0 4px 4px 0;
}

.topic-content pre,
.topic-content code {
    background: #1f2937;
    color: #e5e7eb;
    border-radius: 4px;
    font-family: Consolas, Monaco, 'Courier New', monospace;
}

.topic-content pre {
    padding: 12px 16px;
    overflow-x: auto;
    margin: 12px 0;
}

.topic-content code {
    padding: 2px 6px;
    font-size: 0.9em;
}

.topic-content pre code {
    padding: 0;
    background: none;
}

.topic-content ul,
.topic-content ol {
    padding-left: 24px;
    margin: 8px 0;
}

.topic-content li {
    margin: 4px 0;
}

/* 版块标签激活状态 */
.column-tab.active {
    background-color: #54b601;
    color: white;
}

/* 活跃用户排名颜色 */
.rank-1 { background-color: #f59e0b; color: white; }
.rank-2 { background-color: #fb923c; color: white; }
.rank-3 { background-color: #fdba74; color: white; }

/* 表格条纹效果 */
#topicList > div:nth-child(even) {
    background-color: #fafafa;
}

/* 帖子列表分隔线 */
#topicList > div {
    border-bottom: 1px solid #f3f4f6;
}

#topicList > div:last-child {
    border-bottom: none;
}

/* 头像占位 */
.avatar-placeholder {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
}

/* 编辑器工具栏按钮 */
.editor-toolbar button:hover {
    background-color: #e5e7eb;
}

.editor-toolbar button.active {
    background-color: #54b601;
    color: white;
}

/* 标签悬停效果 */
.tag-item {
    transition: all 0.2s ease;
}

.tag-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 回复框聚焦效果 */
#replyContent:focus,
#content:focus {
    outline: none;
    box-shadow: none;
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top-color: #54b601;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 消息提示 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    background: #1f2937;
    color: white;
    border-radius: 4px;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.toast.success {
    background: #059669;
}

.toast.error {
    background: #dc2626;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .topic-content {
        font-size: 14px;
    }
}
