.back-to-top-container {
    position: fixed;
    right: 20px;
    bottom: 50%;
    transform: translateY(50%);
    z-index: 1000;
}

.back-to-top {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    margin-bottom: 5px;
}

.vertical-text {
    writing-mode: vertical-rl;
    text-orientation: upright;
}

.avatar-container {
    margin-right: 8px;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.team-logo {
    width: 20px;
    height: 11px;
    margin-right: 5px;
}

/* 消息容器样式 */
#message {
    max-width: 100%;
    padding: 0 10px;
}

/* 单条消息样式 */
.message-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 8px;
    background-color: #f8f9fa;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s;
}

.message-item:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* 用户消息和系统消息区分 */
.user-message {
    border-left: 3px solid #007bff;
}

.system-message {
    border-left: 3px solid #28a745;
}

.message-header {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.message-user-info {
    display: flex;
    align-items: center;
    margin-right: 10px;
}

.message-username {
    font-weight: bold;
    margin-right: 5px;
    font-size: 0.9rem;
}

.message-meta {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px solid #eee;
}

.message-time {
    color: #6c757d;
    font-size: 0.8rem;
}

.message-content {
    margin: 5px 0;
    word-break: break-word;
    line-height: 1;
}

.message-content .template-pre {
    white-space: pre-wrap;
    font-family: inherit;
    margin: 0;
}

.message-actions {
    margin-left: auto;
}

/* 媒体内容样式 */
.template-media {
    max-width: 200px;
    max-height: 200px;
    width: auto;
    height: auto;
    border-radius: 4px;
    margin-top: 5px;
    cursor: pointer;
}

video, audio {
    max-width: 100%;
    max-height: 300px;
    margin-top: 5px;
}

/* 音频转文本按钮样式 */
.audio-transcribe-btn {
    margin-top: 5px;
    margin-bottom: 5px;
    padding: 5px 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

.audio-transcribe-btn:hover {
    background-color: #0056b3;
}

.audio-transcribe-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* 转录文本显示区域 */
.transcribed-text {
    margin-top: 5px;
    padding: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    font-size: 0.9rem;
    white-space: pre-wrap;
    display: none;
}

.transcribed-text.show {
    display: block;
}

/* 引用消息样式 */
blockquote {
    border-left: 3px solid #007bff;
    padding: 5px 10px;
    margin: 5px 0;
    background-color: rgba(0, 123, 255, 0.05);
}

/* 按钮样式优化 */
.btn-group {
    margin-left: 10px;
}

/* 用户信息区域样式 */
#UserInfo {
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: none;
}

.user-info-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.user-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #007bff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.user-basic-info {
    flex: 1;
}

.user-name {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: #333;
}

.user-room-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-room-bg-container {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    max-width: 100%;
}

.user-room-bg {
    width: 100%;
    max-height: 150px;
    object-fit: cover;
    display: block;
}

.user-room-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
}

.user-room-text {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
}

.user-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.user-actions .btn {
    flex: 1;
    min-width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* 下一页按钮容器 */
.pagination-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 15px 0;
}

/* 图片查看器样式 */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.image-modal-content {
    max-width: 90%;
    max-height: 90%;
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}
/* 去除列表项前面的点 */
#user, #message {
    list-style: none;
    padding-left: 0;
}

.Box-row {
    list-style: none;
}
/* 添加滑动消息卡片相关样式 */
.swipe-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
}

.swipe-content {
    position: relative;
    display: flex;
    flex-direction: column; /* 添加这行，确保内容垂直排列 */
    transition: transform 0.3s ease;
    background-color: #f8f9fa;
}

.swipe-actions {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    display: flex;
    transform: translateX(100%);
}

.swipe-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
    min-width: 70px;
    padding: 0 10px;
    text-align: center;
}

.swipe-action-btn:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.swipe-action-btn:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* 不同操作按钮的颜色 */
.btn-message {
    background-color: #007bff; /* 蓝色 */
}

.btn-live {
    background-color: #28a745; /* 绿色 */
}

.btn-collect {
    background-color: #ffc107; /* 黄色 */
    color: #212529;
}

.btn-uncollect {
    background-color: #fd7e14; /* 橙色 */
}

.btn-info {
    background-color: #17a2b8; /* 青色 */
    color: #fff;
}

/* 滑动状态 */
.swipe-content.swiped {
    transform: translateX(-100%);
}

.swipe-actions.visible {
    transform: translateX(0);
}

/* 触摸操作相关 */
.touch-active {
    transition: none;
}
.swipe-content .message-header {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.swipe-content .message-content {
    margin: 5px 0;
    word-break: break-word;
    line-height: 1;
}

.swipe-content .message-meta {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px solid #eee;
}