/* 主要布局 */
.main-wrapper {
    width: 100%;
    min-height: calc(100vh - 120px);
    background: #f6f6f6;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
}

.content {
    min-width: 0;
}

/* 项目详情样式 */
.project-detail {
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    border: 1px solid #d0d7de;
}

.project-header {
    padding: 24px;
    border-bottom: 1px solid #d0d7de;
}

.project-title {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.project-title h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #24292f;
    line-height: 1.25;
}

.project-category {
    padding: 4px 8px;
    background: #f6f8fa;
    border: 1px solid #d0d7de;
    border-radius: 5%;
    font-size: 12px;
    color: #656d76;
    text-transform: capitalize;
    font-weight: 500;
}

/* 标签和统计信息行 */
.project-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

/* 项目标签 */
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.tag {
    display: inline-block;
    padding: 4px 8px;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 5%;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #bfdbfe;
    transition: all 0.2s ease;
}

.tag:hover {
    background: #bfdbfe;
    transform: translateY(-1px);
}

.project-stats {
    display: flex;
    gap: 8px;
    align-items: center;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #f6f8fa;
    border: 1px solid #d0d7de;
    border-radius: 5%;
    font-size: 12px;
    font-weight: 500;
    color: #24292f;
}

.stat-item i {
    color: #ffd700;
    font-size: 14px;
}

/* 项目操作栏 */
.project-actions {
    padding: 16px 24px;
    border-bottom: 1px solid #d0d7de;
    display: flex;
    gap: 8px;
    background: #f6f8fa;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.project-actions .left-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.project-actions .right-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    background: #f6f8fa;
    color: #24292f;
    transition: all 0.2s ease;
    text-decoration: none;
}

.action-btn:hover {
    background: #f3f4f6;
    border-color: #afb8c1;
    text-decoration: none;
}

.action-btn.primary {
    background: #2da44e;
    color: white;
    border-color: #2da44e;
}

.action-btn.primary:hover {
    background: #2c974b;
    border-color: #2c974b;
}

/* 编辑按钮样式 */
.action-btn.edit-btn {
    background: #0969da;
    color: white;
    border-color: #0969da;
}

.action-btn.edit-btn:hover {
    background: #0860ca;
    border-color: #0860ca;
}

/* 删除按钮样式 */
.action-btn.danger {
    background: #da3633;
    color: white;
    border-color: #da3633;
}

.action-btn.danger:hover {
    background: #cd2b31;
    border-color: #cd2b31;
}

.action-btn i {
    font-size: 16px;
}

/* 投票按钮样式 - 参考帖子页面 */
.action-btn.vote-btn {
    background: #f6f8fa;
    color: #24292f;
    border-color: #d0d7de;
    position: relative;
    transition: all 0.3s ease;
}

.action-btn.vote-btn:hover {
    background: #f3f4f6;
    border-color: #1976d2;
    color: #1976d2;
}

.action-btn.vote-btn.voted {
    border-color: #1976d2;
    background-color: #f8fbff;
    color: #1976d2;
    animation: voteStateChange 0.5s ease;
}

.action-btn.vote-btn .vote-count {
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 4px;
}

.action-btn.vote-btn.voted .vote-count {
    background: #1976d2;
    color: white;
}

/* 项目热度分级颜色 - 与项目列表页面保持一致 */
.vote-count.heat-score-low { 
    color: #999 !important; 
    background: #f5f5f5 !important;
}
.vote-count.heat-score-medium { 
    color: #007bff !important; 
    background: #e3f2fd !important;
}
.vote-count.heat-score-high { 
    color: #fd7e14 !important; 
    background: #fff3e0 !important;
}
.vote-count.heat-score-hot { 
    color: #dc3545 !important; 
    background: #ffebee !important;
}

/* 投票状态切换动画 */
@keyframes voteStateChange {
    0% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.7;
        transform: scale(0.95);
    }
    100% { 
        opacity: 1;
        transform: scale(1);
    }
}

/* 星标按钮特殊样式 */
.star-btn {
    position: relative;
}

.star-btn i {
    color: #656d76;
    transition: all 0.2s ease;
}

.star-btn:hover i {
    color: #ffd700;
    transform: scale(1.1);
}

.star-btn.starred i {
    color: #ffd700;
    text-shadow: 0 0 4px rgba(255, 215, 0, 0.5);
}

/* 文件浏览器 */
.file-explorer {
    padding: 24px;
    border-bottom: 1px solid #d0d7de;
}

.file-explorer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.file-explorer-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #24292f;
}

.file-type-badge {
    padding: 3px 7px;
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.file-list {
    border: 1px solid #d0d7de;
    border-radius: 6px;
    overflow: hidden;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #d0d7de;
    font-size: 14px;
    color: #24292f;
    transition: background-color 0.2s ease;
}

.file-item:last-child {
    border-bottom: none;
}

.file-item:hover {
    background: #f6f8fa;
}

.file-item i {
    color: #0969da;
    width: 16px;
    text-align: center;
    font-size: 16px;
}

.file-item.folder i {
    color: #54aeff;
}

.file-name {
    flex: 1;
    font-weight: 500;
}

.file-size {
    color: #656d76;
    font-size: 12px;
    font-weight: 400;
}

/* 项目内容 */
.project-content {
    padding: 24px;
}

.project-content h2 {
    margin: 0 0 16px;
    font-size: 20px;
    font-weight: 600;
    color: #24292f;
    border-bottom: 1px solid #d0d7de;
    padding-bottom: 8px;
}

.markdown-content {
    line-height: 1.6;
    color: #24292f;
    font-size: 14px;
}

.markdown-content h1 {
    font-size: 24px;
    font-weight: 600;
    margin: 24px 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #d0d7de;
    color: #24292f;
}

.markdown-content h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 20px 0 12px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid #d0d7de;
    color: #24292f;
}

.markdown-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 16px 0 8px 0;
    color: #24292f;
}

.markdown-content p {
    margin: 12px 0;
    line-height: 1.6;
}

.markdown-content ul {
    margin: 12px 0;
    padding-left: 24px;
}

.markdown-content li {
    margin: 4px 0;
    line-height: 1.5;
}

.markdown-content strong {
    font-weight: 600;
    color: #24292f;
}

.markdown-content em {
    font-style: italic;
    color: #656d76;
}

.markdown-content code {
    background: #f6f8fa;
    border: 1px solid #d0d7de;
    border-radius: 3px;
    padding: 2px 4px;
    font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', monospace;
    font-size: 12px;
    color: #24292f;
}

.markdown-content pre {
    background: #f6f8fa;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    padding: 16px;
    margin: 16px 0;
    overflow-x: auto;
    font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', monospace;
    font-size: 12px;
    line-height: 1.45;
}

.markdown-content pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: inherit;
}

.markdown-content a {
    color: #0969da;
    text-decoration: none;
}

.markdown-content a:hover {
    text-decoration: underline;
}

.markdown-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 12px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.markdown-content blockquote {
    margin: 16px 0;
    padding: 0 16px;
    border-left: 4px solid #d0d7de;
    background: #f6f8fa;
    color: #656d76;
}

.markdown-content table {
    border-collapse: collapse;
    margin: 16px 0;
    width: 100%;
}

.markdown-content th,
.markdown-content td {
    border: 1px solid #d0d7de;
    padding: 8px 12px;
    text-align: left;
}

.markdown-content th {
    background: #f6f8fa;
    font-weight: 600;
}

/* 侧边栏样式 */
.sidebar {
    align-self: start;
}

.sidebar-box {
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    border: 1px solid #d0d7de;
    margin-bottom: 16px;
}

.sidebar-box h3 {
    padding: 16px;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #24292f;
    border-bottom: 1px solid #d0d7de;
    background: #f6f8fa;
    border-radius: 6px 6px 0 0;
}

/* 项目信息 */
.project-info {
    padding: 16px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 13px;
    color: #656d76;
}

.info-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.info-label i {
    color: #656d76;
    width: 16px;
    text-align: center;
    font-size: 14px;
}

.info-value {
    font-weight: 400;
    color: #24292f;
}

/* 作者卡片 */
.author-card {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #d0d7de;
}

.author-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.author-name {
    font-size: 14px;
    font-weight: 600;
    color: #0969da;
    text-decoration: none;
}

.author-name:hover {
    text-decoration: underline;
}

.author-title {
    font-size: 12px;
    color: #656d76;
    font-weight: 400;
}

/* 相关项目 */
.related-projects {
    padding: 16px;
}

.related-project-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    text-decoration: none;
    border-bottom: 1px solid #eee;
}

.related-project-item:last-child {
    border-bottom: none;
}

.project-name {
    font-size: 13px;
    color: #1a1a1a;
}

.project-stars {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #666;
}

.project-stars i {
    color: #778087;
}

/* 相关项目样式 */
.no-related {
    text-align: center;
    color: #656d76;
    font-size: 14px;
    margin: 0;
    padding: 20px 0;
    font-style: italic;
}

/* 评论区样式 */
.comments-section {
    background: white;
    border-radius: 3px;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.comments-section h3 {
    padding: 15px 20px;
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: #1a1a1a;
    border-bottom: 1px solid #eee;
    position: relative;
}

.comments-section h3:after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 20px;
    width: 30px;
    height: 2px;
    background: #4d5256;
}

.comment-list {
    padding: 0;
}

.comment-item {
    padding: 15px 20px;
    position: relative;
    scroll-margin-top: 20px;
}

.comment-item:not(:last-child):after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: #f5f5f5;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.comment-meta {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 3px;
    flex-shrink: 0;
}

.comment-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.user-main-info {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.author-name {
    color: #778087;
    font-weight: 500;
    text-decoration: none;
    font-size: 14px;
}

.author-name:hover {
    color: #4d5256;
}

/* 用户UID标签 */
.author-uid {
    padding: 0 2px;
    border: 1px solid #f0f0f0;
    border-radius: 2px;
    color: #bbb;
    font-size: 9px;
    line-height: 12px;
    opacity: 0.7;
}

/* 作者徽章 */
.author-badge {
    padding: 0 2px;
    border: 1px solid #e3f2fd;
    border-radius: 2px;
    color: #90caf9;
    font-size: 9px;
    line-height: 12px;
    opacity: 0.6;
    background: rgba(144, 202, 249, 0.1);
}

.author-badge.maker {
    border-color: #4CAF50;
    color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
}

/* 悬停时稍微增强显示 */
.author-uid:hover {
    opacity: 1;
    color: #999;
}

.author-badge:hover {
    opacity: 0.8;
    color: #42a5f5;
}

.author-badge.maker:hover {
    opacity: 0.8;
    color: #388E3C;
}

.user-meta-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #999;
}

.comment-time {
    color: #999;
    font-size: 11px;
}

.user-bio {
    color: #999;
    font-size: 11px;
    line-height: 1.4;
}

/* 评论内容 - 与用户昵称左对齐 */
.comment-content {
    margin-left: 48px; /* 头像宽度(36px) + 间距(12px) = 48px */
    margin-bottom: 8px;
    line-height: 1.6;
    color: #1a1a1a;
    font-size: 14px;
}

/* 评论控制区域 - 只包含楼层号，右对齐 */
.comment-controls {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

/* 楼层号样式 - 使用不显眼的配色，可点击复制链接 */
.comment-floor {
    padding: 1px 4px;
    border: 1px solid #f0f0f0;
    border-radius: 2px;
    color: #ccc;
    font-size: 11px;
    opacity: 0.6;
    transition: all 0.2s;
    cursor: pointer;
    flex-shrink: 0;
}

.comment-floor:hover {
    opacity: 0.8;
    color: #999;
    background: rgba(0, 0, 0, 0.05);
    border-color: #ddd;
}

/* 评论底部操作区域 - 左侧为操作按钮区，右侧为菜单 */
.comment-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    margin-left: 48px; /* 与评论内容左对齐 */
}

/* 左侧操作按钮组 */
.comment-actions-left {
    display: flex;
    align-items: center;
    gap: 8px; /* 按钮之间的间距 */
}

/* 回复按钮样式 - 使用不显眼的配色 */
.reply-btn {
    background: none;
    border: none;
    color: #ddd;
    font-size: 11px;
    cursor: pointer;
    transition: color 0.2s;
    padding: 1px 4px;
    border-radius: 2px;
    opacity: 0.6;
}

.reply-btn:hover {
    color: #999;
    opacity: 0.8;
}

/* 保留旧的评论操作样式以兼容 */
.comment-actions {
    margin-left: 48px; /* 与评论内容对齐 */
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.action-link {
    color: #999;
    text-decoration: none;
    font-size: 12px;
}

.action-link:hover {
    color: #4d5256;
}

/* 评论框 */
.comment-form {
    padding: 20px;
    position: relative;
}

.comment-form:before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: #eee;
}

.comment-input {
    width: 100%;
    height: 100px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    resize: vertical;
    font-size: 14px;
    margin-bottom: 10px;
    box-sizing: border-box;
}

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

.char-count {
    font-size: 12px;
    color: #999;
}

.submit-comment {
    padding: 8px 16px;
    background: #778087;
    color: white;
    border: none;
    border-radius: 3px;
    font-size: 14px;
    cursor: pointer;
}

.submit-comment:hover {
    background: #4d5256;
}

.submit-comment:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* 无评论状态 */
.no-comments {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.no-comments-icon {
    margin-bottom: 15px;
}

.no-comments p {
    margin: 0;
    font-size: 14px;
}

/* 引用回复样式 */
.quote-content {
    background: #f8f9fa;
    border-left: 3px solid #ddd;
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: 0 3px 3px 0;
}

/* 价值评论样式 - 红色左侧边框 */
.quote-content.valuable-quote {
    background: #fff8f5;
    border-left: 3px solid #dc3545;
}

.quote-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.quote-author {
    color: #4d5256;
    font-weight: 500;
    font-size: 12px;
}

.quote-text {
    color: #666;
    font-size: 12px;
    line-height: 1.4;
}

/* @提及样式 */
.mention {
    color: #4CAF50;
    font-weight: 500;
}

/* 登录提示 */
.login-to-comment {
    text-align: center;
    padding: 20px;
    color: #999;
}

.login-to-comment a {
    color: #4d5256;
    text-decoration: none;
}

.login-to-comment a:hover {
    text-decoration: underline;
}

/* 评论相关样式补充 */
.comment-form-inner {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 移动端响应式设计 */
@media screen and (max-width: 768px) {
    .main-container {
        grid-template-columns: 1fr;
        padding: 15px 10px;
        gap: 15px;
    }
    
    /* 隐藏侧边栏 */
    .sidebar {
        display: none;
    }
    
    .project-header {
        padding: 20px 16px;
    }
    
    .project-title {
        flex-direction: row;
        align-items: baseline;
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .project-title h1 {
        font-size: 20px;
    }
    
    .project-meta-row {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        justify-content: space-between;
    }
    
    .project-tags {
        flex: 1;
        justify-content: flex-end;
        flex-wrap: wrap;
    }
    
    .project-stats {
        flex-shrink: 0;
    }
    
    .project-actions {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: space-between;
    }
    
    .project-actions .left-actions {
        gap: 8px;
    }
    
    .project-actions .right-actions {
        gap: 8px;
    }
    
    .action-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .action-btn i {
        font-size: 16px;
    }
    
    /* 移动端只显示图标，隐藏文字 */
    .action-btn .btn-text {
        display: none;
    }
    
    .action-btn .vote-count {
        display: inline-block; /* 投票数量仍然显示 */
    }
    
    .file-explorer {
        padding: 16px;
    }
    
    .file-explorer-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .file-item {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .project-content {
        padding: 16px;
    }
    
    .project-content h2 {
        font-size: 18px;
    }
    
    .markdown-content {
        font-size: 13px;
    }
    
    .comments-section {
        margin: 15px 0;
        border-radius: 0;
    }
    
    .comment-item {
        padding: 12px 15px;
    }
    
    .comment-meta {
        gap: 8px;
    }
    
    .comment-avatar {
        width: 32px;
        height: 32px;
    }
    
    .comment-content {
        margin-left: 40px; /* 调整移动端的对齐 */
    }
    
    .comment-actions {
        margin-left: 40px;
    }
    
    .comment-form {
        padding: 15px;
    }
    
    .tag {
        font-size: 11px;
        padding: 2px 6px;
    }
    
    .stat-item {
        font-size: 11px;
        padding: 2px 6px;
    }
    
    .stat-item i {
        font-size: 12px;
    }
}

/* 超小屏幕适配 (350px及以上) */
@media screen and (max-width: 480px) {
    .main-container {
        padding: 10px 8px;
    }
    
    .project-header {
        padding: 16px 12px;
    }
    
    .project-title h1 {
        font-size: 18px;
        line-height: 1.3;
    }
    
    .project-category {
        font-size: 11px;
        padding: 1px 5px;
    }
    
    .project-meta-row {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        justify-content: space-between;
    }
    
    .project-actions {
        padding: 10px 12px;
        gap: 6px;
        justify-content: space-between;
    }
    
    .project-actions .left-actions {
        gap: 6px;
    }
    
    .project-actions .right-actions {
        gap: 6px;
    }
    
    .action-btn {
        padding: 6px 8px;
        font-size: 12px;
    }
    
    .action-btn i {
        font-size: 14px;
    }
    
    .file-explorer {
        padding: 12px;
    }
    
    .file-item {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .project-content {
        padding: 12px;
    }
    
    .project-content h2 {
        font-size: 16px;
    }
    
    .markdown-content {
        font-size: 12px;
    }
    
    .stat-item {
        font-size: 10px;
        padding: 1px 4px;
    }
    
    .stat-item i {
        font-size: 11px;
    }
    
    .tag {
        font-size: 10px;
        padding: 1px 4px;
    }
    
    .user-main-info {
        gap: 4px;
    }
    
    .author-uid,
    .author-badge {
        font-size: 8px;
        padding: 0 1px;
    }
    
    .comment-content {
        margin-left: 36px; /* 进一步调整超小屏幕的对齐 */
    }
    
    .comment-actions {
        margin-left: 36px;
    }
}

/* 最小宽度保证 */
@media screen and (max-width: 350px) {
    .main-wrapper {
        min-width: 350px;
    }
}

/* 评论高亮效果 - 用于楼层定位 */
.comment-item.highlighted {
    background: rgba(255, 193, 7, 0.15);
    border-left: 4px solid #ffc107;
    transition: all 0.3s ease;
    animation: highlightPulse 0.6s ease-in-out;
}

@keyframes highlightPulse {
    0% {
        background: rgba(255, 193, 7, 0.3);
        transform: scale(1.002);
    }
    50% {
        background: rgba(255, 193, 7, 0.2);
        transform: scale(1.001);
    }
    100% {
        background: rgba(255, 193, 7, 0.15);
        transform: scale(1);
    }
}

/* 评论编辑按钮 */
.edit-comment-btn {
    background: none;
    border: none;
    color: #656d76;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin-left: 8px;
}

.edit-comment-btn:hover {
    background: #f3f4f6;
    color: #24292f;
}

.edit-comment-btn i {
    font-size: 12px;
}

/* 评论编辑表单 */
.comment-edit-form {
    margin-top: 12px;
}

.comment-edit-textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    font-family: inherit;
    resize: vertical;
    background: #fff;
    transition: border-color 0.2s ease;
}

.comment-edit-textarea:focus {
    outline: none;
    border-color: #0969da;
    box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.1);
}

.edit-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e1e4e8;
}

.edit-char-count {
    color: #666;
    font-size: 12px;
}

.edit-buttons {
    display: flex;
    gap: 8px;
}

.cancel-edit {
    padding: 6px 12px;
    border: 1px solid #d0d7de;
    border-radius: 4px;
    background: #fff;
    color: #24292f;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cancel-edit:hover {
    background: #f3f4f6;
}

.save-edit {
    padding: 6px 12px;
    border: 1px solid #0969da;
    border-radius: 4px;
    background: #0969da;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.save-edit:hover {
    background: #0860ca;
}

.save-edit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 评论菜单 - 与帖子评论区完全一致 */
.comment-menu {
    position: relative;
    display: inline-block;
}

.comment-menu-trigger {
    background: none;
    border: none;
    color: #ddd;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    opacity: 0.6;
}

.comment-menu-trigger:hover {
    background: #f3f4f6;
    color: #999;
    opacity: 0.8;
}

.comment-menu-trigger i {
    font-size: 12px;
}

.comment-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 120px;
    background: #fff;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(140, 149, 159, 0.2);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.2s ease;
}

.comment-menu-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.comment-menu-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 8px 12px;
    background: none;
    border: none;
    text-align: left;
    color: #24292f;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.comment-menu-item:first-child {
    border-radius: 6px 6px 0 0;
}

.comment-menu-item:last-child {
    border-radius: 0 0 6px 6px;
}

.comment-menu-item:hover {
    background: #f6f8fa;
}

.comment-menu-item i {
    margin-right: 6px;
    width: 14px;
    text-align: center;
    font-size: 11px;
}

.comment-menu-item.danger {
    color: #d1242f;
}

.comment-menu-item.danger:hover {
    background: #fff1f1;
}

.comment-menu-item.primary {
    color: #0969da;
}

.comment-menu-item.primary:hover {
    background: #f1f8ff;
}

/* 举报弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    background: #fff;
    border-radius: 8px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    margin: auto;
}

.modal-header {
    padding: 20px 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #24292f;
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    color: #656d76;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #24292f;
}

.modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #24292f;
    font-weight: 500;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    border: 1px solid #d0d7de;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.radio-option:hover {
    background: #f6f8fa;
}

.radio-option input[type="radio"] {
    margin-right: 8px;
}

.radio-text {
    color: #24292f;
}

.form-group textarea {
    width: 100%;
    min-height: 80px;
    padding: 8px 12px;
    border: 1px solid #d0d7de;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
}

.form-group textarea:focus {
    outline: none;
    border-color: #0969da;
    box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.1);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
}

.btn {
    padding: 8px 16px;
    border: 1px solid;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary {
    background: #fff;
    border-color: #d0d7de;
    color: #24292f;
}

.btn-secondary:hover {
    background: #f3f4f6;
}

.btn-danger {
    background: #d1242f;
    border-color: #d1242f;
    color: #fff;
}

.btn-danger:hover {
    background: #b91c26;
}

.vote-count.heat-score-hot { 
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
}

.action-btn.report-btn {
    background: #f8f9fa;
    border: 1px solid #d0d7de;
    color: #656d76;
}

.action-btn.report-btn:hover {
    background: #f3f4f6;
    border-color: #c5c5c5;
    color: #e74c3c;
}

.action-btn.report-btn i {
    color: inherit;
}

/* 消息提示样式 */
.message-toast {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    background: white !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    border-left: 4px solid #1890ff !important;
    padding: 12px 16px !important;
    min-width: 300px !important;
    max-width: 400px !important;
    z-index: 9999 !important;
    transform: translateX(100%) !important;
    opacity: 0 !important;
    transition: all 0.3s ease !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    color: #333 !important;
}

.message-toast.show {
    transform: translateX(0) !important;
    opacity: 1 !important;
}

.message-toast.message-success {
    border-left-color: #52c41a !important;
}

.message-toast.message-error {
    border-left-color: #ff4d4f !important;
}

.message-toast.message-warning {
    border-left-color: #faad14 !important;
}

.message-content {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 14px !important;
    color: #333 !important;
}

.message-content i {
    color: #1890ff !important;
    font-size: 16px !important;
    flex-shrink: 0 !important;
}

.message-toast.message-success .message-content i {
    color: #52c41a !important;
}

.message-toast.message-error .message-content i {
    color: #ff4d4f !important;
}

.message-toast.message-warning .message-content i {
    color: #faad14 !important;
}

/* 移动端消息提示适配 */
@media (max-width: 768px) {
    .message-toast {
        left: 15px !important;
        right: 15px !important;
        top: 20px !important;
        min-width: auto !important;
        max-width: none !important;
        width: auto !important;
        box-sizing: border-box !important;
    }
    
    .message-content {
        font-size: 13px !important;
    }
    
    .message-content i {
        font-size: 14px !important;
    }
}