/**
 * 楼中楼评论系统样式
 */

/* 评论容器 */
.comments-section {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.comments-header {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
}

/* 评论表单 */
.comment-form {
    margin-bottom: 30px;
}

.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: vertical;
    min-height: 80px;
}

.comment-form button {
    margin-top: 10px;
}

/* 评论列表 */
.comments-container {
    margin-top: 20px;
}

.comment-item {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s;
}

.comment-item:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* 不同层级的缩进 */
.comment-item.depth-1 {
    border-left: 3px solid #007bff;
}

.comment-item.depth-2 {
    border-left: 3px solid #28a745;
    background: #f8fff9;
}

.comment-item.depth-3 {
    border-left: 3px solid #ffc107;
    background: #fffdf5;
}

/* 评论头部 */
.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
}

.comment-username {
    font-weight: bold;
    color: #333;
    margin-right: 10px;
}

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

/* 评论内容 */
.comment-text {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 10px;
    word-wrap: break-word;
}

/* 评论操作区 */
.comment-actions {
    display: flex;
    gap: 10px;
}

.reply-btn {
    padding: 2px 8px;
    font-size: 12px;
    color: #007bff;
    text-decoration: none;
    cursor: pointer;
}

.reply-btn:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* 回复表单 */
.reply-form {
    margin-top: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    border: 1px solid #dee2e6;
}

.reply-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    min-height: 60px;
    font-size: 14px;
}

.reply-form button {
    margin-top: 8px;
    margin-right: 5px;
}

/* 子评论容器 */
.replies-container {
    margin-top: 10px;
}

/* 空状态 */
.text-muted {
    color: #999;
    text-align: center;
    padding: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .comment-item {
        padding: 12px;
    }
    
    .comment-avatar {
        width: 32px;
        height: 32px;
    }
    
    .comment-username {
        font-size: 14px;
    }
    
    .comment-text {
        font-size: 13px;
    }
}

/* ==================== 勋章展示样式 ==================== */

.medal-icon {
    transition: transform 0.3s ease, filter 0.3s ease;
}

.medal-icon:hover {
    transform: scale(1.15);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* 勋章提示框样式优化 */
.medal-icon[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
}
