/* 内嵌媒体样式 */
.media-container-embedded {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.embedded-video {
    background: #1a1a2e;
    border-radius: 8px;
    overflow: hidden;
}

.embedded-video video {
    display: block;
    width: 100%;
    max-height: 350px;
    object-fit: contain;
    background: #000;
}

.video-title {
    padding: 10px 14px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.3);
}

.embedded-image {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.embedded-image img {
    display: block;
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.embedded-image:hover img {
    opacity: 0.9;
}

.image-title {
    padding: 8px 12px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
    font-size: 0.85rem;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

/* 消息文本内容样式 */
.message-text-content {
    line-height: 1.8;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.message-text-content p {
    margin-bottom: 12px;
}

.message-text-content p:last-child {
    margin-bottom: 0;
}

.message-text-content strong {
    color: var(--primary-color);
    font-weight: 600;
}

.message-text-content em {
    font-style: italic;
}

/* 视频播放控制优化 */
.embedded-video video::-webkit-media-controls {
    display: flex !important;
}

.embedded-video video::-webkit-media-controls-panel {
    background: rgba(0, 0, 0, 0.8);
}

/* H5移动端优化 */
@media (max-width: 768px) {
    .media-container-embedded {
        margin-top: 12px;
        gap: 10px;
    }
    
    .embedded-video video {
        max-height: 250px;
    }
    
    .embedded-image img {
        max-height: 300px;
    }
    
    .video-title,
    .image-title {
        font-size: 0.8rem;
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    .embedded-video video {
        max-height: 200px;
    }
    
    .embedded-image img {
        max-height: 250px;
    }
}
