/* 对话容器 */
.dialogue-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: white;
}

.dialogue-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    cursor: pointer;
    min-height: 0;
    position: relative;
}

/* 消息样式 */
.message {
    max-width: 80%;
    animation: messageAppear 0.3s ease;
    position: relative;
}

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-police {
    align-self: flex-end;
    text-align: right;
}

.message-driver {
    align-self: flex-start;
    text-align: left;
}

.message-header {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
    font-weight: 500;
}

.message-police .message-header {
    color: #1890ff;
}

.message-driver .message-header {
    color: #52c41a;
}

.message-content {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    position: relative;
    word-break: break-word;
    min-height: 20px;
}

.message-police .message-content {
    background: #e6f7ff;
    border: 1px solid #91d5ff;
    border-bottom-right-radius: 0;
}

.message-driver .message-content {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    border-bottom-left-radius: 0;
}

/* 打字机效果 */
.typing .message-content {
    position: relative;
    min-height: 20px;
}

.typing .message-content::after {
    content: '|';
    position: absolute;
    right: 8px;
    bottom: 8px;
    color: #1890ff;
    animation: blink 1s infinite;
    font-weight: bold;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* 对话结束提示 */
.dialogue-end {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 13px;
    font-style: italic;
    border-top: 1px dashed #e8e8e8;
    margin-top: 20px;
}

/* 点击提示 */
.click-hint {
    text-align: center;
    padding: 10px;
    color: #1890ff;
    font-size: 12px;
    animation: pulse 2s infinite;
    margin-bottom: 10px;
    opacity: 0.8;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}